Crate sharing

Crate sharing 

Source
Expand description

§sharing

Shared primitives consumed by every binary and package in the workspace.

The crate is intentionally a grab-bag of small utilities that would create a dependency cycle if they lived in any one binary:

This crate also exports constants that are baked into binaries and consumed by installer-side code and scripts, so they must stay the single source of truth. The most important ones are PNA_ALLOWED_ORIGINS (Chrome/Edge allow-list for the local WebSocket) and CLOUDFLARE_ORIGIN_CA (the CA PEM filename written at install time).

§Windows specifics

The installer and the elevator rely on create_registry_entries and remove_registry_entries to register the app under HKLM\SOFTWARE\... for auto-start, the Run key, and uninstall metadata. Writing to HKLM requires admin rights, so these must be invoked from a code path that has already passed through pispas-elevator.exe.

Re-exports§

pub use natives::api::Lock;
pub use natives::api::SingleInstance;

Modules§

crypto
download_file
env
fs
natives
paths
proc
service
string
types
utils

Constants§

APP_DEV_HOST
APP_PRO_HOST
BASE_FOLDER
BEEPER_PDF_FILE
BINARIES_PATH
CHANNEL_NAME
CHANNEL_NAME_CFG
CHANNEL_NAME_OLD
CLOUDFLARE_ORIGIN_CA
Filename used for the Cloudflare Origin CA when the installer writes the embedded PEM to disk before calling certutil -addstore -f Root.
CONFIG_FILE_NAME
CONF_PATH
DATA_DELIMITER
DATA_VALUES_DELIMITER
ENVIRONMENT
ENV_FILE_NAME
ICON_PISPAS
LIBRARIES_PATH
LOGS_PATH
MYPOS_SERVER_FILE
NAME_LEGAL
NAME_SHORTCUT_DESKTOP
OLD_SERVICE_PYTHON_NAME
ORDER_KITCHEN
PDF_INFO_FILE
PERSISTANCE_FILE_NAME
Filename of the on-disk persistence blob used by the persistence module in pispas-modules. Lives under the install bin/ directory.
PISPAS_CONFIGURATOR
PISPAS_ELEVATOR
PISPAS_INSTALLER
PNA_ALLOWED_ORIGINS
Origins allowed to make Local Network Access requests to the local WebSocket service.
POS_DRIVER_FILE
PRINTER_TEST_FILE
PRINTSVC_PYTHON_NAME
PRINTSVC_PYTHON_NAME_NEW
PRINT_SERVICE
PROGRAM_FILES_KEY
PYTHON_FOLDER
SERVICE_NAME
SERVICE_NAME_EXE
SERVICE_PYTHON_NAME
SUMATRA_FILE
TMP_KEY
TRAY_ICON_FOLDER
TRAY_ICON_NAME
USER_PROFILE_KEY
VERSION
VOLATILE_ENVIRONMENT
WKHTMLTOPDF_FILE

Functions§

add_envs
create_registry_entries
get_info_parent
get_path_env
get_path_mypos_server
get_persistance_path
get_python_path_install
get_version
is_windows_7
launch_tray_icon
remove_registry_entries
stop_pispas_modules

Type Aliases§

CancelToken
PisPasResult