@noldova/desktop.runtime 0.0.0-stage → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +82 -2
- package/api/index.d.ts +16404 -0
- package/api/index.js +256 -0
- package/api/index.js.map +1 -0
- package/api/testing.d.ts +2132 -0
- package/api/testing.js +20 -0
- package/api/testing.js.map +1 -0
- package/enums/agent-control-failure.js +13 -0
- package/enums/agent-control-failure.js.map +1 -0
- package/enums/build-relation.js +14 -0
- package/enums/build-relation.js.map +1 -0
- package/enums/data-directory-state.js +14 -0
- package/enums/data-directory-state.js.map +1 -0
- package/enums/endpoint-kind.js +13 -0
- package/enums/endpoint-kind.js.map +1 -0
- package/enums/permission-decision.js +18 -0
- package/enums/permission-decision.js.map +1 -0
- package/enums/permission-detail-kind.js +15 -0
- package/enums/permission-detail-kind.js.map +1 -0
- package/enums/permission-option.js +16 -0
- package/enums/permission-option.js.map +1 -0
- package/enums/session-state.js +17 -0
- package/enums/session-state.js.map +1 -0
- package/enums/tool-abort-reason.js +16 -0
- package/enums/tool-abort-reason.js.map +1 -0
- package/enums/tool-content-kind.js +13 -0
- package/enums/tool-content-kind.js.map +1 -0
- package/enums/tool-failure-code.js +22 -0
- package/enums/tool-failure-code.js.map +1 -0
- package/enums/tool-risk.js +14 -0
- package/enums/tool-risk.js.map +1 -0
- package/enums/unknown-schema-failure.js +14 -0
- package/enums/unknown-schema-failure.js.map +1 -0
- package/enums/update-barrier-state.js +14 -0
- package/enums/update-barrier-state.js.map +1 -0
- package/enums/update-barrier-status.js +14 -0
- package/enums/update-barrier-status.js.map +1 -0
- package/enums/window-state-kind.js +13 -0
- package/enums/window-state-kind.js.map +1 -0
- package/exceptions/addon-incomplete.exception.js +17 -0
- package/exceptions/addon-incomplete.exception.js.map +1 -0
- package/exceptions/addon-load-failed.exception.js +17 -0
- package/exceptions/addon-load-failed.exception.js.map +1 -0
- package/exceptions/addon-load.exception.js +14 -0
- package/exceptions/addon-load.exception.js.map +1 -0
- package/exceptions/addon-missing.exception.js +19 -0
- package/exceptions/addon-missing.exception.js.map +1 -0
- package/exceptions/addon-unexpected-value.exception.js +17 -0
- package/exceptions/addon-unexpected-value.exception.js.map +1 -0
- package/exceptions/agent-control.exception.js +28 -0
- package/exceptions/agent-control.exception.js.map +1 -0
- package/exceptions/answerer-registered.exception.js +10 -0
- package/exceptions/answerer-registered.exception.js.map +1 -0
- package/exceptions/app-image-copy-unavailable.exception.js +17 -0
- package/exceptions/app-image-copy-unavailable.exception.js.map +1 -0
- package/exceptions/app-image-copy-unlisted.exception.js +17 -0
- package/exceptions/app-image-copy-unlisted.exception.js.map +1 -0
- package/exceptions/backup-verification.exception.js +15 -0
- package/exceptions/backup-verification.exception.js.map +1 -0
- package/exceptions/batch-argument-refused.exception.js +17 -0
- package/exceptions/batch-argument-refused.exception.js.map +1 -0
- package/exceptions/batch-system-root-missing.exception.js +15 -0
- package/exceptions/batch-system-root-missing.exception.js.map +1 -0
- package/exceptions/build-mismatch.exception.js +18 -0
- package/exceptions/build-mismatch.exception.js.map +1 -0
- package/exceptions/call-unanswered.exception.js +17 -0
- package/exceptions/call-unanswered.exception.js.map +1 -0
- package/exceptions/command-failed.exception.js +18 -0
- package/exceptions/command-failed.exception.js.map +1 -0
- package/exceptions/command-registered.exception.js +10 -0
- package/exceptions/command-registered.exception.js.map +1 -0
- package/exceptions/connection-closed.exception.js +16 -0
- package/exceptions/connection-closed.exception.js.map +1 -0
- package/exceptions/connection-refused.exception.js +14 -0
- package/exceptions/connection-refused.exception.js.map +1 -0
- package/exceptions/connection.exception.js +16 -0
- package/exceptions/connection.exception.js.map +1 -0
- package/exceptions/data-directory-owned.exception.js +18 -0
- package/exceptions/data-directory-owned.exception.js.map +1 -0
- package/exceptions/declaration-field-invalid.exception.js +10 -0
- package/exceptions/declaration-field-invalid.exception.js.map +1 -0
- package/exceptions/declaration-not-object.exception.js +8 -0
- package/exceptions/declaration-not-object.exception.js.map +1 -0
- package/exceptions/declarations-format.exception.js +14 -0
- package/exceptions/declarations-format.exception.js.map +1 -0
- package/exceptions/declarations-unreadable.exception.js +18 -0
- package/exceptions/declarations-unreadable.exception.js.map +1 -0
- package/exceptions/declarations-version-unsupported.exception.js +10 -0
- package/exceptions/declarations-version-unsupported.exception.js.map +1 -0
- package/exceptions/discovery-field-invalid.exception.js +10 -0
- package/exceptions/discovery-field-invalid.exception.js.map +1 -0
- package/exceptions/discovery-format.exception.js +14 -0
- package/exceptions/discovery-format.exception.js.map +1 -0
- package/exceptions/discovery-not-object.exception.js +8 -0
- package/exceptions/discovery-not-object.exception.js.map +1 -0
- package/exceptions/discovery-unreadable.exception.js +18 -0
- package/exceptions/discovery-unreadable.exception.js.map +1 -0
- package/exceptions/discovery-version-unsupported.exception.js +10 -0
- package/exceptions/discovery-version-unsupported.exception.js.map +1 -0
- package/exceptions/endpoint-unavailable.exception.js +15 -0
- package/exceptions/endpoint-unavailable.exception.js.map +1 -0
- package/exceptions/environment-unreadable.exception.js +15 -0
- package/exceptions/environment-unreadable.exception.js.map +1 -0
- package/exceptions/event-declared.exception.js +10 -0
- package/exceptions/event-declared.exception.js.map +1 -0
- package/exceptions/event-withdrawn.exception.js +10 -0
- package/exceptions/event-withdrawn.exception.js.map +1 -0
- package/exceptions/exit-code-unreadable.exception.js +17 -0
- package/exceptions/exit-code-unreadable.exception.js.map +1 -0
- package/exceptions/exit-wait-timed-out.exception.js +19 -0
- package/exceptions/exit-wait-timed-out.exception.js.map +1 -0
- package/exceptions/folder-not-private.exception.js +19 -0
- package/exceptions/folder-not-private.exception.js.map +1 -0
- package/exceptions/foreground-group-read-failed.exception.js +18 -0
- package/exceptions/foreground-group-read-failed.exception.js.map +1 -0
- package/exceptions/foreground-group-unreadable.exception.js +19 -0
- package/exceptions/foreground-group-unreadable.exception.js.map +1 -0
- package/exceptions/handshake-closed.exception.js +15 -0
- package/exceptions/handshake-closed.exception.js.map +1 -0
- package/exceptions/handshake-identity-mismatch.exception.js +15 -0
- package/exceptions/handshake-identity-mismatch.exception.js.map +1 -0
- package/exceptions/handshake-timed-out.exception.js +15 -0
- package/exceptions/handshake-timed-out.exception.js.map +1 -0
- package/exceptions/job-assignment-failed.exception.js +19 -0
- package/exceptions/job-assignment-failed.exception.js.map +1 -0
- package/exceptions/job-closed-before-exit.exception.js +17 -0
- package/exceptions/job-closed-before-exit.exception.js.map +1 -0
- package/exceptions/launch-descriptors-unavailable.exception.js +15 -0
- package/exceptions/launch-descriptors-unavailable.exception.js.map +1 -0
- package/exceptions/launch-limit-reached.exception.js +17 -0
- package/exceptions/launch-limit-reached.exception.js.map +1 -0
- package/exceptions/launch-shell-unavailable.exception.js +15 -0
- package/exceptions/launch-shell-unavailable.exception.js.map +1 -0
- package/exceptions/launch-start-failed.exception.js +17 -0
- package/exceptions/launch-start-failed.exception.js.map +1 -0
- package/exceptions/launch-timed-out.exception.js +15 -0
- package/exceptions/launch-timed-out.exception.js.map +1 -0
- package/exceptions/launch.exception.js +14 -0
- package/exceptions/launch.exception.js.map +1 -0
- package/exceptions/main-process-refused-again.exception.js +15 -0
- package/exceptions/main-process-refused-again.exception.js.map +1 -0
- package/exceptions/method-failure.exception.js +16 -0
- package/exceptions/method-failure.exception.js.map +1 -0
- package/exceptions/method-registered.exception.js +10 -0
- package/exceptions/method-registered.exception.js.map +1 -0
- package/exceptions/migration.exception.js +17 -0
- package/exceptions/migration.exception.js.map +1 -0
- package/exceptions/module-activation.exception.js +17 -0
- package/exceptions/module-activation.exception.js.map +1 -0
- package/exceptions/module-database.exception.js +17 -0
- package/exceptions/module-database.exception.js.map +1 -0
- package/exceptions/module-id-device.exception.js +10 -0
- package/exceptions/module-id-device.exception.js.map +1 -0
- package/exceptions/module-load.exception.js +15 -0
- package/exceptions/module-load.exception.js.map +1 -0
- package/exceptions/module-stopping.exception.js +19 -0
- package/exceptions/module-stopping.exception.js.map +1 -0
- package/exceptions/move-aside-refused.exception.js +17 -0
- package/exceptions/move-aside-refused.exception.js.map +1 -0
- package/exceptions/no-job-for-exit-code.exception.js +17 -0
- package/exceptions/no-job-for-exit-code.exception.js.map +1 -0
- package/exceptions/no-runtime.exception.js +17 -0
- package/exceptions/no-runtime.exception.js.map +1 -0
- package/exceptions/not-contributed.exception.js +14 -0
- package/exceptions/not-contributed.exception.js.map +1 -0
- package/exceptions/notification-command-not-allowed.exception.js +12 -0
- package/exceptions/notification-command-not-allowed.exception.js.map +1 -0
- package/exceptions/notification-kind-changed.exception.js +12 -0
- package/exceptions/notification-kind-changed.exception.js.map +1 -0
- package/exceptions/ownership-released.exception.js +15 -0
- package/exceptions/ownership-released.exception.js.map +1 -0
- package/exceptions/permission-access.exception.js +14 -0
- package/exceptions/permission-access.exception.js.map +1 -0
- package/exceptions/permissions-closed.exception.js +8 -0
- package/exceptions/permissions-closed.exception.js.map +1 -0
- package/exceptions/permissions-module-only.exception.js +10 -0
- package/exceptions/permissions-module-only.exception.js.map +1 -0
- package/exceptions/pre-shell-data-found.exception.js +18 -0
- package/exceptions/pre-shell-data-found.exception.js.map +1 -0
- package/exceptions/pre-shell-data.exception.js +19 -0
- package/exceptions/pre-shell-data.exception.js.map +1 -0
- package/exceptions/process-start-failed.exception.js +17 -0
- package/exceptions/process-start-failed.exception.js.map +1 -0
- package/exceptions/process-start.exception.js +14 -0
- package/exceptions/process-start.exception.js.map +1 -0
- package/exceptions/process-table-row-unreadable.exception.js +17 -0
- package/exceptions/process-table-row-unreadable.exception.js.map +1 -0
- package/exceptions/product-file.exception.js +18 -0
- package/exceptions/product-file.exception.js.map +1 -0
- package/exceptions/program-not-found.exception.js +17 -0
- package/exceptions/program-not-found.exception.js.map +1 -0
- package/exceptions/program-path-relative.exception.js +17 -0
- package/exceptions/program-path-relative.exception.js.map +1 -0
- package/exceptions/pseudo-terminal-batch-refused.exception.js +17 -0
- package/exceptions/pseudo-terminal-batch-refused.exception.js.map +1 -0
- package/exceptions/pseudo-terminal-command-line-batch-refused.exception.js +17 -0
- package/exceptions/pseudo-terminal-command-line-batch-refused.exception.js.map +1 -0
- package/exceptions/pseudo-terminal-command-line-refused.exception.js +17 -0
- package/exceptions/pseudo-terminal-command-line-refused.exception.js.map +1 -0
- package/exceptions/pseudo-terminal-command-line-with-arguments.exception.js +17 -0
- package/exceptions/pseudo-terminal-command-line-with-arguments.exception.js.map +1 -0
- package/exceptions/pseudo-terminals-undeclared.exception.js +19 -0
- package/exceptions/pseudo-terminals-undeclared.exception.js.map +1 -0
- package/exceptions/registration.exception.js +14 -0
- package/exceptions/registration.exception.js.map +1 -0
- package/exceptions/runtime-exited-without-reason.exception.js +15 -0
- package/exceptions/runtime-exited-without-reason.exception.js.map +1 -0
- package/exceptions/runtime-exited.exception.js +17 -0
- package/exceptions/runtime-exited.exception.js.map +1 -0
- package/exceptions/runtime-handover.exception.js +18 -0
- package/exceptions/runtime-handover.exception.js.map +1 -0
- package/exceptions/runtime-unreachable.exception.js +17 -0
- package/exceptions/runtime-unreachable.exception.js.map +1 -0
- package/exceptions/runtime.exception.js +14 -0
- package/exceptions/runtime.exception.js.map +1 -0
- package/exceptions/secret-not-owned.exception.js +12 -0
- package/exceptions/secret-not-owned.exception.js.map +1 -0
- package/exceptions/service-access.exception.js +14 -0
- package/exceptions/service-access.exception.js.map +1 -0
- package/exceptions/service-missing.exception.js +10 -0
- package/exceptions/service-missing.exception.js.map +1 -0
- package/exceptions/service-not-allowed.exception.js +12 -0
- package/exceptions/service-not-allowed.exception.js.map +1 -0
- package/exceptions/service-not-owned.exception.js +12 -0
- package/exceptions/service-not-owned.exception.js.map +1 -0
- package/exceptions/service-published.exception.js +10 -0
- package/exceptions/service-published.exception.js.map +1 -0
- package/exceptions/service-type-mismatch.exception.js +12 -0
- package/exceptions/service-type-mismatch.exception.js.map +1 -0
- package/exceptions/setting-needs-device.exception.js +11 -0
- package/exceptions/setting-needs-device.exception.js.map +1 -0
- package/exceptions/setting-not-readable.exception.js +12 -0
- package/exceptions/setting-not-readable.exception.js.map +1 -0
- package/exceptions/setting-not-writable.exception.js +12 -0
- package/exceptions/setting-not-writable.exception.js.map +1 -0
- package/exceptions/setting-scope-not-allowed.exception.js +13 -0
- package/exceptions/setting-scope-not-allowed.exception.js.map +1 -0
- package/exceptions/setting-scope-not-owned.exception.js +12 -0
- package/exceptions/setting-scope-not-owned.exception.js.map +1 -0
- package/exceptions/setting-unknown.exception.js +11 -0
- package/exceptions/setting-unknown.exception.js.map +1 -0
- package/exceptions/setting-value-invalid.exception.js +11 -0
- package/exceptions/setting-value-invalid.exception.js.map +1 -0
- package/exceptions/setting.exception.js +14 -0
- package/exceptions/setting.exception.js.map +1 -0
- package/exceptions/stop-refused.exception.js +17 -0
- package/exceptions/stop-refused.exception.js.map +1 -0
- package/exceptions/stop-timed-out.exception.js +15 -0
- package/exceptions/stop-timed-out.exception.js.map +1 -0
- package/exceptions/system-command.exception.js +14 -0
- package/exceptions/system-command.exception.js.map +1 -0
- package/exceptions/system-root-missing.exception.js +15 -0
- package/exceptions/system-root-missing.exception.js.map +1 -0
- package/exceptions/tool-endpoint.exception.js +15 -0
- package/exceptions/tool-endpoint.exception.js.map +1 -0
- package/exceptions/tool-failure.exception.js +16 -0
- package/exceptions/tool-failure.exception.js.map +1 -0
- package/exceptions/tool-registered.exception.js +10 -0
- package/exceptions/tool-registered.exception.js.map +1 -0
- package/exceptions/unknown-schema.exception.js +30 -0
- package/exceptions/unknown-schema.exception.js.map +1 -0
- package/exceptions/update-in-progress.exception.js +19 -0
- package/exceptions/update-in-progress.exception.js.map +1 -0
- package/exceptions/update-preparing.exception.js +19 -0
- package/exceptions/update-preparing.exception.js.map +1 -0
- package/exceptions/user-identity-unreadable.exception.js +17 -0
- package/exceptions/user-identity-unreadable.exception.js.map +1 -0
- package/exceptions/verbatim-batch-refused.exception.js +17 -0
- package/exceptions/verbatim-batch-refused.exception.js.map +1 -0
- package/exceptions/web-view-failure.exception.js +17 -0
- package/exceptions/web-view-failure.exception.js.map +1 -0
- package/exceptions/work-in-progress.exception.js +17 -0
- package/exceptions/work-in-progress.exception.js.map +1 -0
- package/interfaces/i-app-shortcuts.js +9 -0
- package/interfaces/i-app-shortcuts.js.map +1 -0
- package/interfaces/i-app-windows.js +9 -0
- package/interfaces/i-app-windows.js.map +1 -0
- package/interfaces/i-environment-source.js +9 -0
- package/interfaces/i-environment-source.js.map +1 -0
- package/interfaces/i-event-sink.js +9 -0
- package/interfaces/i-event-sink.js.map +1 -0
- package/interfaces/i-file-share-options.js +9 -0
- package/interfaces/i-file-share-options.js.map +1 -0
- package/interfaces/i-folder-protector.js +9 -0
- package/interfaces/i-folder-protector.js.map +1 -0
- package/interfaces/i-idle-participant.js +9 -0
- package/interfaces/i-idle-participant.js.map +1 -0
- package/interfaces/i-issued-grant.js +9 -0
- package/interfaces/i-issued-grant.js.map +1 -0
- package/interfaces/i-line-process-listener.js +9 -0
- package/interfaces/i-line-process-listener.js.map +1 -0
- package/interfaces/i-line-process-starter.js +9 -0
- package/interfaces/i-line-process-starter.js.map +1 -0
- package/interfaces/i-line-process.js +9 -0
- package/interfaces/i-line-process.js.map +1 -0
- package/interfaces/i-main-process-check.js +9 -0
- package/interfaces/i-main-process-check.js.map +1 -0
- package/interfaces/i-method-handler.js +9 -0
- package/interfaces/i-method-handler.js.map +1 -0
- package/interfaces/i-module-database.js +9 -0
- package/interfaces/i-module-database.js.map +1 -0
- package/interfaces/i-module-log.js +9 -0
- package/interfaces/i-module-log.js.map +1 -0
- package/interfaces/i-module-secrets.js +9 -0
- package/interfaces/i-module-secrets.js.map +1 -0
- package/interfaces/i-module-settings.js +9 -0
- package/interfaces/i-module-settings.js.map +1 -0
- package/interfaces/i-peer-process-api.js +9 -0
- package/interfaces/i-peer-process-api.js.map +1 -0
- package/interfaces/i-permission-answerer.js +9 -0
- package/interfaces/i-permission-answerer.js.map +1 -0
- package/interfaces/i-permission-detail.js +9 -0
- package/interfaces/i-permission-detail.js.map +1 -0
- package/interfaces/i-permission-request.js +9 -0
- package/interfaces/i-permission-request.js.map +1 -0
- package/interfaces/i-permissions-context.js +9 -0
- package/interfaces/i-permissions-context.js.map +1 -0
- package/interfaces/i-posix-process-addon.js +9 -0
- package/interfaces/i-posix-process-addon.js.map +1 -0
- package/interfaces/i-posix-process-api.js +9 -0
- package/interfaces/i-posix-process-api.js.map +1 -0
- package/interfaces/i-posix-process-table-api.js +9 -0
- package/interfaces/i-posix-process-table-api.js.map +1 -0
- package/interfaces/i-process-ender.js +9 -0
- package/interfaces/i-process-ender.js.map +1 -0
- package/interfaces/i-process-starter.js +9 -0
- package/interfaces/i-process-starter.js.map +1 -0
- package/interfaces/i-process-table.reader.js +9 -0
- package/interfaces/i-process-table.reader.js.map +1 -0
- package/interfaces/i-profile-watch.js +9 -0
- package/interfaces/i-profile-watch.js.map +1 -0
- package/interfaces/i-pseudo-terminal-exit.js +9 -0
- package/interfaces/i-pseudo-terminal-exit.js.map +1 -0
- package/interfaces/i-pseudo-terminal-handle.js +9 -0
- package/interfaces/i-pseudo-terminal-handle.js.map +1 -0
- package/interfaces/i-pseudo-terminal-library.js +9 -0
- package/interfaces/i-pseudo-terminal-library.js.map +1 -0
- package/interfaces/i-pseudo-terminal-options.js +9 -0
- package/interfaces/i-pseudo-terminal-options.js.map +1 -0
- package/interfaces/i-pseudo-terminal-start-options.js +9 -0
- package/interfaces/i-pseudo-terminal-start-options.js.map +1 -0
- package/interfaces/i-pseudo-terminal-subscription.js +9 -0
- package/interfaces/i-pseudo-terminal-subscription.js.map +1 -0
- package/interfaces/i-resolved-file.js +9 -0
- package/interfaces/i-resolved-file.js.map +1 -0
- package/interfaces/i-runtime-client-listener.js +9 -0
- package/interfaces/i-runtime-client-listener.js.map +1 -0
- package/interfaces/i-runtime-discovery-json.js +9 -0
- package/interfaces/i-runtime-discovery-json.js.map +1 -0
- package/interfaces/i-runtime-files.js +9 -0
- package/interfaces/i-runtime-files.js.map +1 -0
- package/interfaces/i-runtime-part-context.js +9 -0
- package/interfaces/i-runtime-part-context.js.map +1 -0
- package/interfaces/i-runtime-part-loader.js +9 -0
- package/interfaces/i-runtime-part-loader.js.map +1 -0
- package/interfaces/i-runtime-part.js +9 -0
- package/interfaces/i-runtime-part.js.map +1 -0
- package/interfaces/i-runtime-web-views.js +9 -0
- package/interfaces/i-runtime-web-views.js.map +1 -0
- package/interfaces/i-secret-backend.js +9 -0
- package/interfaces/i-secret-backend.js.map +1 -0
- package/interfaces/i-session-listener.js +9 -0
- package/interfaces/i-session-listener.js.map +1 -0
- package/interfaces/i-tool-call-options.js +9 -0
- package/interfaces/i-tool-call-options.js.map +1 -0
- package/interfaces/i-tool-call-permissions.js +9 -0
- package/interfaces/i-tool-call-permissions.js.map +1 -0
- package/interfaces/i-tool-deadline.js +9 -0
- package/interfaces/i-tool-deadline.js.map +1 -0
- package/interfaces/i-tool-descriptor.js +9 -0
- package/interfaces/i-tool-descriptor.js.map +1 -0
- package/interfaces/i-tool-endpoint-handler.js +9 -0
- package/interfaces/i-tool-endpoint-handler.js.map +1 -0
- package/interfaces/i-tool-endpoint.js +9 -0
- package/interfaces/i-tool-endpoint.js.map +1 -0
- package/interfaces/i-tool-handler.js +9 -0
- package/interfaces/i-tool-handler.js.map +1 -0
- package/interfaces/i-tool-hints.js +9 -0
- package/interfaces/i-tool-hints.js.map +1 -0
- package/interfaces/i-tool-limits.js +9 -0
- package/interfaces/i-tool-limits.js.map +1 -0
- package/interfaces/i-tool-risk-range.js +9 -0
- package/interfaces/i-tool-risk-range.js.map +1 -0
- package/interfaces/i-tool-schema.validator.js +2 -0
- package/interfaces/i-tool-schema.validator.js.map +1 -0
- package/interfaces/i-tool-session-host.js +9 -0
- package/interfaces/i-tool-session-host.js.map +1 -0
- package/interfaces/i-tools-context.js +9 -0
- package/interfaces/i-tools-context.js.map +1 -0
- package/interfaces/i-web-view-relay.js +9 -0
- package/interfaces/i-web-view-relay.js.map +1 -0
- package/interfaces/i-windows-peer-addon.js +9 -0
- package/interfaces/i-windows-peer-addon.js.map +1 -0
- package/interfaces/i-windows-process-addon.js +9 -0
- package/interfaces/i-windows-process-addon.js.map +1 -0
- package/interfaces/i-windows-process-api.js +9 -0
- package/interfaces/i-windows-process-api.js.map +1 -0
- package/interfaces/i-windows-signature.js +9 -0
- package/interfaces/i-windows-signature.js.map +1 -0
- package/models/app-image-copy-record.js +49 -0
- package/models/app-image-copy-record.js.map +1 -0
- package/models/app-image-source.js +48 -0
- package/models/app-image-source.js.map +1 -0
- package/models/attach-options.js +16 -0
- package/models/attach-options.js.map +1 -0
- package/models/capability-token.js +29 -0
- package/models/capability-token.js.map +1 -0
- package/models/caught-failure.js +15 -0
- package/models/caught-failure.js.map +1 -0
- package/models/client-closure.js +16 -0
- package/models/client-closure.js.map +1 -0
- package/models/client-settings.js +26 -0
- package/models/client-settings.js.map +1 -0
- package/models/connected-client.js +16 -0
- package/models/connected-client.js.map +1 -0
- package/models/data-directory-inspection.js +16 -0
- package/models/data-directory-inspection.js.map +1 -0
- package/models/endpoint.js +46 -0
- package/models/endpoint.js.map +1 -0
- package/models/event-channel.js +25 -0
- package/models/event-channel.js.map +1 -0
- package/models/granted-file.js +41 -0
- package/models/granted-file.js.map +1 -0
- package/models/image-size.js +22 -0
- package/models/image-size.js.map +1 -0
- package/models/kept-program.js +16 -0
- package/models/kept-program.js.map +1 -0
- package/models/launch-settings.js +44 -0
- package/models/launch-settings.js.map +1 -0
- package/models/migration.js +22 -0
- package/models/migration.js.map +1 -0
- package/models/module-activation.js +23 -0
- package/models/module-activation.js.map +1 -0
- package/models/module-declaration.js +203 -0
- package/models/module-declaration.js.map +1 -0
- package/models/notification-handle.js +24 -0
- package/models/notification-handle.js.map +1 -0
- package/models/owned-process.js +42 -0
- package/models/owned-process.js.map +1 -0
- package/models/packaged-path.js +14 -0
- package/models/packaged-path.js.map +1 -0
- package/models/peer-process.js +18 -0
- package/models/peer-process.js.map +1 -0
- package/models/pending-call.js +28 -0
- package/models/pending-call.js.map +1 -0
- package/models/permission-outcome.js +22 -0
- package/models/permission-outcome.js.map +1 -0
- package/models/permission-question.js +23 -0
- package/models/permission-question.js.map +1 -0
- package/models/permission-record.js +23 -0
- package/models/permission-record.js.map +1 -0
- package/models/permission-revocation.js +18 -0
- package/models/permission-revocation.js.map +1 -0
- package/models/process-ending.js +24 -0
- package/models/process-ending.js.map +1 -0
- package/models/process-exit.js +24 -0
- package/models/process-exit.js.map +1 -0
- package/models/process-killing.js +20 -0
- package/models/process-killing.js.map +1 -0
- package/models/process-launch-command.js +46 -0
- package/models/process-launch-command.js.map +1 -0
- package/models/process-launch.js +21 -0
- package/models/process-launch.js.map +1 -0
- package/models/process-record.js +41 -0
- package/models/process-record.js.map +1 -0
- package/models/process-request.js +40 -0
- package/models/process-request.js.map +1 -0
- package/models/process-settings.js +31 -0
- package/models/process-settings.js.map +1 -0
- package/models/process-table-entry.js +30 -0
- package/models/process-table-entry.js.map +1 -0
- package/models/process-table.js +55 -0
- package/models/process-table.js.map +1 -0
- package/models/product-info.js +68 -0
- package/models/product-info.js.map +1 -0
- package/models/pseudo-terminal-console.js +41 -0
- package/models/pseudo-terminal-console.js.map +1 -0
- package/models/pseudo-terminal-exit.js +24 -0
- package/models/pseudo-terminal-exit.js.map +1 -0
- package/models/pseudo-terminal-request.js +44 -0
- package/models/pseudo-terminal-request.js.map +1 -0
- package/models/pseudo-terminal.js +104 -0
- package/models/pseudo-terminal.js.map +1 -0
- package/models/refusal.js +16 -0
- package/models/refusal.js.map +1 -0
- package/models/registered-tool.js +22 -0
- package/models/registered-tool.js.map +1 -0
- package/models/registration.js +17 -0
- package/models/registration.js.map +1 -0
- package/models/remembered-permission.js +26 -0
- package/models/remembered-permission.js.map +1 -0
- package/models/request-context.js +27 -0
- package/models/request-context.js.map +1 -0
- package/models/running-process.js +25 -0
- package/models/running-process.js.map +1 -0
- package/models/running-program.js +26 -0
- package/models/running-program.js.map +1 -0
- package/models/running-tool-call.js +111 -0
- package/models/running-tool-call.js.map +1 -0
- package/models/runtime-build.js +17 -0
- package/models/runtime-build.js.map +1 -0
- package/models/runtime-command.js +39 -0
- package/models/runtime-command.js.map +1 -0
- package/models/runtime-discovery.js +85 -0
- package/models/runtime-discovery.js.map +1 -0
- package/models/runtime-options.js +63 -0
- package/models/runtime-options.js.map +1 -0
- package/models/server-settings.js +34 -0
- package/models/server-settings.js.map +1 -0
- package/models/started-runtime.js +29 -0
- package/models/started-runtime.js.map +1 -0
- package/models/system-error-code.js +29 -0
- package/models/system-error-code.js.map +1 -0
- package/models/terminal-size.js +19 -0
- package/models/terminal-size.js.map +1 -0
- package/models/tool-call.js +65 -0
- package/models/tool-call.js.map +1 -0
- package/models/tool-content.js +44 -0
- package/models/tool-content.js.map +1 -0
- package/models/tool-descriptor.js +104 -0
- package/models/tool-descriptor.js.map +1 -0
- package/models/tool-failure.js +39 -0
- package/models/tool-failure.js.map +1 -0
- package/models/tool-result.js +22 -0
- package/models/tool-result.js.map +1 -0
- package/models/tool-session.js +29 -0
- package/models/tool-session.js.map +1 -0
- package/models/tool-turns.js +31 -0
- package/models/tool-turns.js.map +1 -0
- package/models/update-barrier.js +39 -0
- package/models/update-barrier.js.map +1 -0
- package/models/watched-pseudo-terminal-handle.js +118 -0
- package/models/watched-pseudo-terminal-handle.js.map +1 -0
- package/models/web-view-protocol-event.js +20 -0
- package/models/web-view-protocol-event.js.map +1 -0
- package/models/windows-device-names.js +15 -0
- package/models/windows-device-names.js.map +1 -0
- package/models/work-item.js +29 -0
- package/models/work-item.js.map +1 -0
- package/native/darwin-arm64/posix-process.node +0 -0
- package/native/darwin-x64/posix-process.node +0 -0
- package/native/linux-arm64/posix-process.node +0 -0
- package/native/linux-x64/posix-process.node +0 -0
- package/native/win32-arm64/windows-process.node +0 -0
- package/native/win32-x64/windows-process.node +0 -0
- package/package.json +59 -3
- package/resources.js +1786 -0
- package/resources.js.map +1 -0
- package/services/app-surface/app-shortcuts-changed-method.js +24 -0
- package/services/app-surface/app-shortcuts-changed-method.js.map +1 -0
- package/services/app-surface/app-surface.js +57 -0
- package/services/app-surface/app-surface.js.map +1 -0
- package/services/app-surface/app-windows-changed-method.js +24 -0
- package/services/app-surface/app-windows-changed-method.js.map +1 -0
- package/services/app-surface/main-window-changed-method.js +24 -0
- package/services/app-surface/main-window-changed-method.js.map +1 -0
- package/services/app-surface/main-window-method.js +10 -0
- package/services/app-surface/main-window-method.js.map +1 -0
- package/services/app-surface/module-app-shortcuts.js +27 -0
- package/services/app-surface/module-app-shortcuts.js.map +1 -0
- package/services/app-surface/module-app-windows.js +24 -0
- package/services/app-surface/module-app-windows.js.map +1 -0
- package/services/app-surface/reported-list.js +61 -0
- package/services/app-surface/reported-list.js.map +1 -0
- package/services/client/app-image-copy-launch.js +187 -0
- package/services/client/app-image-copy-launch.js.map +1 -0
- package/services/client/app-image-extraction.js +39 -0
- package/services/client/app-image-extraction.js.map +1 -0
- package/services/client/app-image-keepalive.js +63 -0
- package/services/client/app-image-keepalive.js.map +1 -0
- package/services/client/build-comparer.js +25 -0
- package/services/client/build-comparer.js.map +1 -0
- package/services/client/runtime-client.js +203 -0
- package/services/client/runtime-client.js.map +1 -0
- package/services/client/runtime-launcher.js +259 -0
- package/services/client/runtime-launcher.js.map +1 -0
- package/services/commands/shell-commands.js +18 -0
- package/services/commands/shell-commands.js.map +1 -0
- package/services/commands/system-command.js +31 -0
- package/services/commands/system-command.js.map +1 -0
- package/services/data-directory/data-directory-inspector.js +49 -0
- package/services/data-directory/data-directory-inspector.js.map +1 -0
- package/services/data-directory/data-directory-locator.js +25 -0
- package/services/data-directory/data-directory-locator.js.map +1 -0
- package/services/data-directory/data-directory.js +85 -0
- package/services/data-directory/data-directory.js.map +1 -0
- package/services/database/backup-guard.js +64 -0
- package/services/database/backup-guard.js.map +1 -0
- package/services/database/database-backup.js +122 -0
- package/services/database/database-backup.js.map +1 -0
- package/services/database/migrated-database.js +198 -0
- package/services/database/migrated-database.js.map +1 -0
- package/services/database/module-database.js +21 -0
- package/services/database/module-database.js.map +1 -0
- package/services/database/shell-database.js +25 -0
- package/services/database/shell-database.js.map +1 -0
- package/services/database/shell-migrations.js +22 -0
- package/services/database/shell-migrations.js.map +1 -0
- package/services/database/update-backup.js +57 -0
- package/services/database/update-backup.js.map +1 -0
- package/services/diagnostics/diagnostic-redactor.js +75 -0
- package/services/diagnostics/diagnostic-redactor.js.map +1 -0
- package/services/diagnostics/log-file.js +56 -0
- package/services/diagnostics/log-file.js.map +1 -0
- package/services/diagnostics/log-text.js +15 -0
- package/services/diagnostics/log-text.js.map +1 -0
- package/services/diagnostics/standard-error-cap.js +107 -0
- package/services/diagnostics/standard-error-cap.js.map +1 -0
- package/services/discovery/discovery-publisher.js +64 -0
- package/services/discovery/discovery-publisher.js.map +1 -0
- package/services/discovery/discovery.reader.js +44 -0
- package/services/discovery/discovery.reader.js.map +1 -0
- package/services/discovery/folder-protector-factory.js +19 -0
- package/services/discovery/folder-protector-factory.js.map +1 -0
- package/services/discovery/mac-folder-protector.js +37 -0
- package/services/discovery/mac-folder-protector.js.map +1 -0
- package/services/discovery/posix-folder-protector.js +15 -0
- package/services/discovery/posix-folder-protector.js.map +1 -0
- package/services/discovery/windows-folder-protector.js +57 -0
- package/services/discovery/windows-folder-protector.js.map +1 -0
- package/services/endpoint/client-closures.js +27 -0
- package/services/endpoint/client-closures.js.map +1 -0
- package/services/endpoint/client-session.js +120 -0
- package/services/endpoint/client-session.js.map +1 -0
- package/services/endpoint/main-process-check.js +48 -0
- package/services/endpoint/main-process-check.js.map +1 -0
- package/services/endpoint/runtime-server.js +355 -0
- package/services/endpoint/runtime-server.js.map +1 -0
- package/services/endpoint/window-closed-method.js +19 -0
- package/services/endpoint/window-closed-method.js.map +1 -0
- package/services/environment/current-environment.js +43 -0
- package/services/environment/current-environment.js.map +1 -0
- package/services/environment/line-process-starter.js +21 -0
- package/services/environment/line-process-starter.js.map +1 -0
- package/services/environment/line-process.js +83 -0
- package/services/environment/line-process.js.map +1 -0
- package/services/environment/login-shell-environment.js +162 -0
- package/services/environment/login-shell-environment.js.map +1 -0
- package/services/environment/profile-watch.js +247 -0
- package/services/environment/profile-watch.js.map +1 -0
- package/services/environment/windows-environment.js +181 -0
- package/services/environment/windows-environment.js.map +1 -0
- package/services/files/discard-file-grants-method.js +24 -0
- package/services/files/discard-file-grants-method.js.map +1 -0
- package/services/files/end-file-grants-method.js +25 -0
- package/services/files/end-file-grants-method.js.map +1 -0
- package/services/files/file-grant-table.js +154 -0
- package/services/files/file-grant-table.js.map +1 -0
- package/services/files/file-identity.js +14 -0
- package/services/files/file-identity.js.map +1 -0
- package/services/files/file-presence.js +26 -0
- package/services/files/file-presence.js.map +1 -0
- package/services/files/file-renamer.js +35 -0
- package/services/files/file-renamer.js.map +1 -0
- package/services/files/folder-watch.js +134 -0
- package/services/files/folder-watch.js.map +1 -0
- package/services/files/grant-file-method.js +24 -0
- package/services/files/grant-file-method.js.map +1 -0
- package/services/files/module-files.js +68 -0
- package/services/files/module-files.js.map +1 -0
- package/services/files/resolve-file-share-method.js +23 -0
- package/services/files/resolve-file-share-method.js.map +1 -0
- package/services/installation/device-folder.js +24 -0
- package/services/installation/device-folder.js.map +1 -0
- package/services/installation/installation.js +207 -0
- package/services/installation/installation.js.map +1 -0
- package/services/installation/process-presence.js +45 -0
- package/services/installation/process-presence.js.map +1 -0
- package/services/lifetime/app-image-copy-cleanup.js +78 -0
- package/services/lifetime/app-image-copy-cleanup.js.map +1 -0
- package/services/lifetime/idle-monitor.js +47 -0
- package/services/lifetime/idle-monitor.js.map +1 -0
- package/services/lifetime/move-aside-method.js +18 -0
- package/services/lifetime/move-aside-method.js.map +1 -0
- package/services/lifetime/quit-answered-method.js +19 -0
- package/services/lifetime/quit-answered-method.js.map +1 -0
- package/services/lifetime/quit-method.js +17 -0
- package/services/lifetime/quit-method.js.map +1 -0
- package/services/lifetime/quit-relay.js +91 -0
- package/services/lifetime/quit-relay.js.map +1 -0
- package/services/lifetime/runtime-host.js +405 -0
- package/services/lifetime/runtime-host.js.map +1 -0
- package/services/lifetime/runtime-log.js +74 -0
- package/services/lifetime/runtime-log.js.map +1 -0
- package/services/lifetime/stop-method.js +39 -0
- package/services/lifetime/stop-method.js.map +1 -0
- package/services/lifetime/update-method.js +24 -0
- package/services/lifetime/update-method.js.map +1 -0
- package/services/lifetime/update-preparation.js +167 -0
- package/services/lifetime/update-preparation.js.map +1 -0
- package/services/lifetime/update-saved-method.js +19 -0
- package/services/lifetime/update-saved-method.js.map +1 -0
- package/services/modules/commands-method.js +17 -0
- package/services/modules/commands-method.js.map +1 -0
- package/services/modules/dependency-states.js +33 -0
- package/services/modules/dependency-states.js.map +1 -0
- package/services/modules/module-context.js +206 -0
- package/services/modules/module-context.js.map +1 -0
- package/services/modules/module-declaration.reader.js +46 -0
- package/services/modules/module-declaration.reader.js.map +1 -0
- package/services/modules/module-host.js +287 -0
- package/services/modules/module-host.js.map +1 -0
- package/services/modules/module-log.js +25 -0
- package/services/modules/module-log.js.map +1 -0
- package/services/modules/modules-method.js +17 -0
- package/services/modules/modules-method.js.map +1 -0
- package/services/modules/package-runtime-part-loader.js +33 -0
- package/services/modules/package-runtime-part-loader.js.map +1 -0
- package/services/modules/run-command-method.js +28 -0
- package/services/modules/run-command-method.js.map +1 -0
- package/services/native/native-addon.js +65 -0
- package/services/native/native-addon.js.map +1 -0
- package/services/notifications/clear-notifications-method.js +18 -0
- package/services/notifications/clear-notifications-method.js.map +1 -0
- package/services/notifications/dismiss-notification-method.js +19 -0
- package/services/notifications/dismiss-notification-method.js.map +1 -0
- package/services/notifications/mark-notifications-read-method.js +18 -0
- package/services/notifications/mark-notifications-read-method.js.map +1 -0
- package/services/notifications/notification-center.js +87 -0
- package/services/notifications/notification-center.js.map +1 -0
- package/services/notifications/notification-policy.js +54 -0
- package/services/notifications/notification-policy.js.map +1 -0
- package/services/notifications/notification-settings.js +32 -0
- package/services/notifications/notification-settings.js.map +1 -0
- package/services/notifications/notifications-method.js +21 -0
- package/services/notifications/notifications-method.js.map +1 -0
- package/services/notifications/post-notification-method.js +26 -0
- package/services/notifications/post-notification-method.js.map +1 -0
- package/services/ownership/ownership-lock.js +73 -0
- package/services/ownership/ownership-lock.js.map +1 -0
- package/services/permissions/module-permissions.js +36 -0
- package/services/permissions/module-permissions.js.map +1 -0
- package/services/permissions/permission-center.js +172 -0
- package/services/permissions/permission-center.js.map +1 -0
- package/services/permissions/permission-request-checker.js +146 -0
- package/services/permissions/permission-request-checker.js.map +1 -0
- package/services/permissions/remembered-permission-store.js +52 -0
- package/services/permissions/remembered-permission-store.js.map +1 -0
- package/services/process/batch-command-line.js +32 -0
- package/services/process/batch-command-line.js.map +1 -0
- package/services/process/child-process-starter.js +68 -0
- package/services/process/child-process-starter.js.map +1 -0
- package/services/process/foreground-process-group.reader.js +64 -0
- package/services/process/foreground-process-group.reader.js.map +1 -0
- package/services/process/linux-process-folder.js +55 -0
- package/services/process/linux-process-folder.js.map +1 -0
- package/services/process/posix-peer-process-api.js +95 -0
- package/services/process/posix-peer-process-api.js.map +1 -0
- package/services/process/posix-process-api.js +50 -0
- package/services/process/posix-process-api.js.map +1 -0
- package/services/process/posix-process-ender.js +199 -0
- package/services/process/posix-process-ender.js.map +1 -0
- package/services/process/posix-process-table.reader.js +24 -0
- package/services/process/posix-process-table.reader.js.map +1 -0
- package/services/process/posix-responsibility-api.js +38 -0
- package/services/process/posix-responsibility-api.js.map +1 -0
- package/services/process/process-clock.js +38 -0
- package/services/process/process-clock.js.map +1 -0
- package/services/process/process-ender-factory.js +22 -0
- package/services/process/process-ender-factory.js.map +1 -0
- package/services/process/process-environment.js +53 -0
- package/services/process/process-environment.js.map +1 -0
- package/services/process/process-record-store.js +35 -0
- package/services/process/process-record-store.js.map +1 -0
- package/services/process/process-signals.js +56 -0
- package/services/process/process-signals.js.map +1 -0
- package/services/process/process-supervisor.js +489 -0
- package/services/process/process-supervisor.js.map +1 -0
- package/services/process/program-launch-resolver.js +88 -0
- package/services/process/program-launch-resolver.js.map +1 -0
- package/services/process/program-locator.js +95 -0
- package/services/process/program-locator.js.map +1 -0
- package/services/process/programs-method.js +17 -0
- package/services/process/programs-method.js.map +1 -0
- package/services/process/windows-peer-process-api.js +52 -0
- package/services/process/windows-peer-process-api.js.map +1 -0
- package/services/process/windows-process-api.js +69 -0
- package/services/process/windows-process-api.js.map +1 -0
- package/services/process/windows-process-ender.js +137 -0
- package/services/process/windows-process-ender.js.map +1 -0
- package/services/process/windows-process-job.js +63 -0
- package/services/process/windows-process-job.js.map +1 -0
- package/services/process/windows-process-killer.js +58 -0
- package/services/process/windows-process-killer.js.map +1 -0
- package/services/process/windows-process-table.reader.js +46 -0
- package/services/process/windows-process-table.reader.js.map +1 -0
- package/services/recent-commands/recent-commands-method.js +18 -0
- package/services/recent-commands/recent-commands-method.js.map +1 -0
- package/services/recent-commands/recent-commands-store.js +29 -0
- package/services/recent-commands/recent-commands-store.js.map +1 -0
- package/services/recent-commands/record-command-method.js +21 -0
- package/services/recent-commands/record-command-method.js.map +1 -0
- package/services/registry/command-registry.js +51 -0
- package/services/registry/command-registry.js.map +1 -0
- package/services/registry/event-registry.js +34 -0
- package/services/registry/event-registry.js.map +1 -0
- package/services/registry/method-registry.js +26 -0
- package/services/registry/method-registry.js.map +1 -0
- package/services/registry/service-registry.js +26 -0
- package/services/registry/service-registry.js.map +1 -0
- package/services/runtime-entry.js +87 -0
- package/services/runtime-entry.js.map +1 -0
- package/services/secrets/machine-secret-backend.js +121 -0
- package/services/secrets/machine-secret-backend.js.map +1 -0
- package/services/secrets/module-secrets.js +37 -0
- package/services/secrets/module-secrets.js.map +1 -0
- package/services/secrets/remove-secret-method.js +19 -0
- package/services/secrets/remove-secret-method.js.map +1 -0
- package/services/secrets/save-secret-method.js +20 -0
- package/services/secrets/save-secret-method.js.map +1 -0
- package/services/secrets/secret-answered-method.js +19 -0
- package/services/secrets/secret-answered-method.js.map +1 -0
- package/services/secrets/secret-status-method.js +18 -0
- package/services/secrets/secret-status-method.js.map +1 -0
- package/services/secrets/secret-table.js +26 -0
- package/services/secrets/secret-table.js.map +1 -0
- package/services/settings/module-settings.js +69 -0
- package/services/settings/module-settings.js.map +1 -0
- package/services/settings/setting-read-method.js +18 -0
- package/services/settings/setting-read-method.js.map +1 -0
- package/services/settings/setting-reset-method.js +20 -0
- package/services/settings/setting-reset-method.js.map +1 -0
- package/services/settings/setting-write-method.js +20 -0
- package/services/settings/setting-write-method.js.map +1 -0
- package/services/settings/settings-read-method.js +18 -0
- package/services/settings/settings-read-method.js.map +1 -0
- package/services/settings/settings.service.js +162 -0
- package/services/settings/settings.service.js.map +1 -0
- package/services/settings/shell-settings.js +78 -0
- package/services/settings/shell-settings.js.map +1 -0
- package/services/tools/agent-control.js +49 -0
- package/services/tools/agent-control.js.map +1 -0
- package/services/tools/image-size.reader.js +35 -0
- package/services/tools/image-size.reader.js.map +1 -0
- package/services/tools/image-size.resources.js +24 -0
- package/services/tools/image-size.resources.js.map +1 -0
- package/services/tools/module-tools.js +77 -0
- package/services/tools/module-tools.js.map +1 -0
- package/services/tools/tool-endpoint.js +131 -0
- package/services/tools/tool-endpoint.js.map +1 -0
- package/services/tools/tool-registry.js +386 -0
- package/services/tools/tool-registry.js.map +1 -0
- package/services/tools/tool-result.validator.js +93 -0
- package/services/tools/tool-result.validator.js.map +1 -0
- package/services/tools/tool-schema.resources.js +45 -0
- package/services/tools/tool-schema.resources.js.map +1 -0
- package/services/tools/tool-schema.validator.js +232 -0
- package/services/tools/tool-schema.validator.js.map +1 -0
- package/services/web-views/module-web-view-relay.js +33 -0
- package/services/web-views/module-web-view-relay.js.map +1 -0
- package/services/web-views/module-web-views.js +46 -0
- package/services/web-views/module-web-views.js.map +1 -0
- package/services/web-views/web-view-answered-method.js +19 -0
- package/services/web-views/web-view-answered-method.js.map +1 -0
- package/services/web-views/web-view-center.js +119 -0
- package/services/web-views/web-view-center.js.map +1 -0
- package/services/web-views/web-view-events-method.js +19 -0
- package/services/web-views/web-view-events-method.js.map +1 -0
- package/services/window-state/window-state-read-method.js +20 -0
- package/services/window-state/window-state-read-method.js.map +1 -0
- package/services/window-state/window-state-store.js +24 -0
- package/services/window-state/window-state-store.js.map +1 -0
- package/services/window-state/window-state-write-method.js +22 -0
- package/services/window-state/window-state-write-method.js.map +1 -0
- package/services/work/work-method.js +17 -0
- package/services/work/work-method.js.map +1 -0
- package/services/work/work-tracker.js +56 -0
- package/services/work/work-tracker.js.map +1 -0
- package/testing/models/fake-app-shortcuts.js +18 -0
- package/testing/models/fake-app-shortcuts.js.map +1 -0
- package/testing/models/fake-app-windows.js +17 -0
- package/testing/models/fake-app-windows.js.map +1 -0
- package/testing/models/fake-module-database.js +17 -0
- package/testing/models/fake-module-database.js.map +1 -0
- package/testing/models/fake-module-log.js +12 -0
- package/testing/models/fake-module-log.js.map +1 -0
- package/testing/models/fake-module-secrets.js +15 -0
- package/testing/models/fake-module-secrets.js.map +1 -0
- package/testing/models/fake-module-settings.js +23 -0
- package/testing/models/fake-module-settings.js.map +1 -0
- package/testing/models/fake-permissions-context.js +28 -0
- package/testing/models/fake-permissions-context.js.map +1 -0
- package/testing/models/fake-runtime-files.js +13 -0
- package/testing/models/fake-runtime-files.js.map +1 -0
- package/testing/models/fake-runtime-part-context.js +70 -0
- package/testing/models/fake-runtime-part-context.js.map +1 -0
- package/testing/models/fake-runtime-web-views.js +26 -0
- package/testing/models/fake-runtime-web-views.js.map +1 -0
- package/testing/models/fake-tools-context.js +72 -0
- package/testing/models/fake-tools-context.js.map +1 -0
- package/testing/models/fake-web-view-relay.js +23 -0
- package/testing/models/fake-web-view-relay.js.map +1 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { RecentCommands } from "@noldova/desktop.protocol";
|
|
9
|
+
import { Resources } from "../../resources.js";
|
|
10
|
+
export class RecentCommandsStore {
|
|
11
|
+
database;
|
|
12
|
+
constructor(database) {
|
|
13
|
+
this.database = database;
|
|
14
|
+
}
|
|
15
|
+
read(device) {
|
|
16
|
+
return new RecentCommands(this.readIds(device));
|
|
17
|
+
}
|
|
18
|
+
record(use) {
|
|
19
|
+
return this.database.transaction(() => {
|
|
20
|
+
this.database.run(Resources.recordRecentCommandStatement, use.device, use.id);
|
|
21
|
+
this.database.run(Resources.trimRecentCommandsStatement, use.device, Resources.maximumRecentCommands);
|
|
22
|
+
return new RecentCommands(this.readIds(use.device), use.device);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
readIds(device) {
|
|
26
|
+
return this.database.readAll(Resources.readRecentCommandsStatement, device).map(t => String(t[Resources.idColumn]));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=recent-commands-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recent-commands-store.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/recent-commands/recent-commands-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAyB,MAAM,2BAA2B,CAAC;AAElF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,OAAO,mBAAmB;IACb,QAAQ,CAAgB;IAEzC,YAAmB,QAAuB;QACxC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,IAAI,CAAC,MAAc;QACxB,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD,CAAC;IAEM,MAAM,CAAC,GAAqB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE;YACpC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,4BAA4B,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;YAC9E,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,2BAA2B,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,qBAAqB,CAAC,CAAC;YACtG,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,OAAO,CAAC,MAAc;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtH,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { RecentCommandUse } from "@noldova/desktop.protocol";
|
|
9
|
+
export class RecordCommandMethod {
|
|
10
|
+
store;
|
|
11
|
+
changed;
|
|
12
|
+
constructor(store, changed) {
|
|
13
|
+
this.store = store;
|
|
14
|
+
this.changed = changed;
|
|
15
|
+
}
|
|
16
|
+
handleAsync(context) {
|
|
17
|
+
this.changed.publish(this.store.record(RecentCommandUse.fromJson(context.payload)).toJson());
|
|
18
|
+
return Promise.resolve(null);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=record-command-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-command-method.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/recent-commands/record-command-method.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAO7D,MAAM,OAAO,mBAAmB;IACb,KAAK,CAAsB;IAC3B,OAAO,CAAe;IAEvC,YAAmB,KAA0B,EAAE,OAAqB;QAClE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,WAAW,CAAC,OAAuB;QACxC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC7F,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { CommandList } from "@noldova/desktop.protocol";
|
|
9
|
+
import { CommandRegisteredException } from "../../exceptions/command-registered.exception.js";
|
|
10
|
+
import { Registration } from "../../models/registration.js";
|
|
11
|
+
export class CommandRegistry {
|
|
12
|
+
commands = new Map();
|
|
13
|
+
watches = new Map();
|
|
14
|
+
changed;
|
|
15
|
+
sequence = 0;
|
|
16
|
+
constructor(changed = () => undefined) {
|
|
17
|
+
this.changed = changed;
|
|
18
|
+
}
|
|
19
|
+
get list() {
|
|
20
|
+
return new CommandList([...this.commands.values()].map(t => t.info), this.sequence);
|
|
21
|
+
}
|
|
22
|
+
listFor(client) {
|
|
23
|
+
return new CommandList([...this.commands.values()].filter(t => Object.isNull(t.onlyFor) || t.onlyFor === client).map(t => t.info), this.sequence);
|
|
24
|
+
}
|
|
25
|
+
register(command) {
|
|
26
|
+
const name = command.info.name.text;
|
|
27
|
+
if (this.commands.has(name))
|
|
28
|
+
throw new CommandRegisteredException(name);
|
|
29
|
+
this.commands.set(name, command);
|
|
30
|
+
this.watches.set(command, command.onChanged(() => this.publish()));
|
|
31
|
+
this.publish();
|
|
32
|
+
return new Registration(() => this.unregister(command));
|
|
33
|
+
}
|
|
34
|
+
find(name) {
|
|
35
|
+
return this.commands.get(name.text);
|
|
36
|
+
}
|
|
37
|
+
unregister(command) {
|
|
38
|
+
const name = command.info.name.text;
|
|
39
|
+
if (this.commands.get(name) !== command)
|
|
40
|
+
return;
|
|
41
|
+
this.commands.delete(name);
|
|
42
|
+
this.watches.get(command)?.[Symbol.dispose]();
|
|
43
|
+
this.watches.delete(command);
|
|
44
|
+
this.publish();
|
|
45
|
+
}
|
|
46
|
+
publish() {
|
|
47
|
+
this.sequence++;
|
|
48
|
+
this.changed(this.list);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=command-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-registry.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/registry/command-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAsB,MAAM,2BAA2B,CAAC;AAE5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,MAAM,OAAO,eAAe;IACT,QAAQ,GAAgC,IAAI,GAAG,EAAE,CAAC;IAClD,OAAO,GAAsC,IAAI,GAAG,EAAE,CAAC;IACvD,OAAO,CAA8B;IAC9C,QAAQ,GAAW,CAAC,CAAC;IAE7B,YAAmB,UAAuC,GAAG,EAAE,CAAC,SAAS;QACvE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,WAAW,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,C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,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QACpC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,OAAO;YACrC,OAAO;QACT,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAEO,OAAO;QACb,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { Event } from "@noldova/desktop.protocol";
|
|
10
|
+
import { EventDeclaredException } from "../../exceptions/event-declared.exception.js";
|
|
11
|
+
import { EventWithdrawnException } from "../../exceptions/event-withdrawn.exception.js";
|
|
12
|
+
import { EventChannel } from "../../models/event-channel.js";
|
|
13
|
+
export class EventRegistry {
|
|
14
|
+
names = new Set();
|
|
15
|
+
sink;
|
|
16
|
+
constructor(sink) {
|
|
17
|
+
this.sink = sink;
|
|
18
|
+
}
|
|
19
|
+
declare(name) {
|
|
20
|
+
if (this.names.has(name.text))
|
|
21
|
+
throw new EventDeclaredException(name.text);
|
|
22
|
+
this.names.add(name.text);
|
|
23
|
+
return new EventChannel((payload, connection, window) => this.publish(name, payload, connection, window), () => this.names.delete(name.text));
|
|
24
|
+
}
|
|
25
|
+
publish(name, payload, connection, window) {
|
|
26
|
+
if (!this.names.has(name.text))
|
|
27
|
+
throw new EventWithdrawnException(name.text);
|
|
28
|
+
if (Object.isUndefined(connection))
|
|
29
|
+
this.sink.broadcast(new Event(name, payload));
|
|
30
|
+
else
|
|
31
|
+
this.sink.send(new Event(name, payload, window ?? undefined), connection);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=event-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-registry.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/registry/event-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAsB,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,MAAM,OAAO,aAAa;IACP,KAAK,GAAgB,IAAI,GAAG,EAAE,CAAC;IAC/B,IAAI,CAAa;IAElC,YAAmB,IAAgB;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,OAAO,CAAC,IAAmB;QAChC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YAC3B,MAAM,IAAI,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE9C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,OAAO,IAAI,YAAY,CACrB,CAAC,OAAkB,EAAE,UAAmB,EAAE,MAAsB,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,EACpH,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC,CAAC;IAEO,OAAO,CAAC,IAAmB,EAAE,OAAkB,EAAE,UAAmB,EAAE,MAAsB;QAClG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YAC5B,MAAM,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,IAAI,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;;YAE9C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAC9E,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { MethodRegisteredException } from "../../exceptions/method-registered.exception.js";
|
|
9
|
+
import { Registration } from "../../models/registration.js";
|
|
10
|
+
export class MethodRegistry {
|
|
11
|
+
handlers = new Map();
|
|
12
|
+
register(name, handler) {
|
|
13
|
+
if (this.handlers.has(name.text))
|
|
14
|
+
throw new MethodRegisteredException(name.text);
|
|
15
|
+
this.handlers.set(name.text, handler);
|
|
16
|
+
return new Registration(() => this.unregister(name, handler));
|
|
17
|
+
}
|
|
18
|
+
find(name) {
|
|
19
|
+
return this.handlers.get(name.text);
|
|
20
|
+
}
|
|
21
|
+
unregister(name, handler) {
|
|
22
|
+
if (this.handlers.get(name.text) === handler)
|
|
23
|
+
this.handlers.delete(name.text);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=method-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-registry.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/registry/method-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,OAAO,cAAc;IACR,QAAQ,GAAgC,IAAI,GAAG,EAAE,CAAC;IAE5D,QAAQ,CAAC,IAAmB,EAAE,OAAuB;QAC1D,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,MAAM,IAAI,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEjD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAChE,CAAC;IAEM,IAAI,CAAC,IAAmB;QAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAEO,UAAU,CAAC,IAAmB,EAAE,OAAuB;QAC7D,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO;YAC1C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { ServicePublishedException } from "../../exceptions/service-published.exception.js";
|
|
9
|
+
import { Registration } from "../../models/registration.js";
|
|
10
|
+
export class ServiceRegistry {
|
|
11
|
+
services = new Map();
|
|
12
|
+
publish(name, service) {
|
|
13
|
+
if (this.services.has(name.text))
|
|
14
|
+
throw new ServicePublishedException(name.text);
|
|
15
|
+
this.services.set(name.text, service);
|
|
16
|
+
return new Registration(() => this.withdraw(name, service));
|
|
17
|
+
}
|
|
18
|
+
find(name) {
|
|
19
|
+
return this.services.get(name.text);
|
|
20
|
+
}
|
|
21
|
+
withdraw(name, service) {
|
|
22
|
+
if (this.services.get(name.text) === service)
|
|
23
|
+
this.services.delete(name.text);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=service-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-registry.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/registry/service-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,OAAO,eAAe;IACT,QAAQ,GAAwB,IAAI,GAAG,EAAE,CAAC;IAEpD,OAAO,CAAC,IAAmB,EAAE,OAAe;QACjD,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;YAC9B,MAAM,IAAI,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEjD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9D,CAAC;IAEM,IAAI,CAAC,IAAmB;QAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAEO,QAAQ,CAAC,IAAmB,EAAE,OAAe;QACnD,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO;YAC1C,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { inspect } from "node:util";
|
|
10
|
+
import "@noldova/context.core";
|
|
11
|
+
import { DataDirectoryOwnedException } from "../exceptions/data-directory-owned.exception.js";
|
|
12
|
+
import { UpdateInProgressException } from "../exceptions/update-in-progress.exception.js";
|
|
13
|
+
import { RuntimeOptions } from "../models/runtime-options.js";
|
|
14
|
+
import { SystemErrorCode } from "../models/system-error-code.js";
|
|
15
|
+
import { Resources } from "../resources.js";
|
|
16
|
+
import { ProcessPresence } from "./installation/process-presence.js";
|
|
17
|
+
import { RuntimeHost } from "./lifetime/runtime-host.js";
|
|
18
|
+
import { PosixResponsibilityApi } from "./process/posix-responsibility-api.js";
|
|
19
|
+
export class RuntimeEntry {
|
|
20
|
+
static get entryPath() {
|
|
21
|
+
return fileURLToPath(import.meta.url);
|
|
22
|
+
}
|
|
23
|
+
static async runAsync(entryArguments, platform, environment, signals, error, responsibility = PosixResponsibilityApi.create(platform)) {
|
|
24
|
+
RuntimeEntry.guard(error);
|
|
25
|
+
let options;
|
|
26
|
+
try {
|
|
27
|
+
options = RuntimeOptions.parse(entryArguments);
|
|
28
|
+
}
|
|
29
|
+
catch (failure) {
|
|
30
|
+
error.write(Resources.formatUsageFailure(String(failure)));
|
|
31
|
+
return Resources.usageExitCode;
|
|
32
|
+
}
|
|
33
|
+
let host;
|
|
34
|
+
try {
|
|
35
|
+
host = await RuntimeHost.startAsync(options, platform, environment, ProcessPresence.create(platform));
|
|
36
|
+
}
|
|
37
|
+
catch (failure) {
|
|
38
|
+
if (failure instanceof DataDirectoryOwnedException)
|
|
39
|
+
return Resources.ownedExitCode;
|
|
40
|
+
error.write(Resources.formatFailureLine(String(failure)));
|
|
41
|
+
return failure instanceof UpdateInProgressException ? Resources.updatingExitCode : Resources.failureExitCode;
|
|
42
|
+
}
|
|
43
|
+
const note = RuntimeEntry.describeResponsibility(responsibility);
|
|
44
|
+
if (!Object.isNull(note))
|
|
45
|
+
host.log.writeLine(note);
|
|
46
|
+
const stop = () => host.requestStop(Resources.stoppedBySignal);
|
|
47
|
+
const report = (failure) => host.log.writeLine(inspect(failure));
|
|
48
|
+
for (const signal of Resources.stopSignals)
|
|
49
|
+
signals.on(signal, stop);
|
|
50
|
+
signals.on(Resources.uncaughtExceptionEvent, report);
|
|
51
|
+
try {
|
|
52
|
+
await host.waitForStopAsync();
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
for (const signal of Resources.stopSignals)
|
|
57
|
+
signals.off(signal, stop);
|
|
58
|
+
signals.off(Resources.uncaughtExceptionEvent, report);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
static async settleAsync(run, error, exit) {
|
|
62
|
+
try {
|
|
63
|
+
exit.exitCode = await run;
|
|
64
|
+
}
|
|
65
|
+
catch (failure) {
|
|
66
|
+
error.write(Resources.formatFailureLine(inspect(failure)));
|
|
67
|
+
exit.exitCode = Resources.failureExitCode;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
static guard(error) {
|
|
71
|
+
error.on(Resources.errorEvent, (failure) => {
|
|
72
|
+
if (!SystemErrorCode.isAny(failure, Resources.unwritableStreamCodes))
|
|
73
|
+
throw failure;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
static describeResponsibility(responsibility) {
|
|
77
|
+
try {
|
|
78
|
+
return responsibility?.describe(process.pid) ?? null;
|
|
79
|
+
}
|
|
80
|
+
catch (failure) {
|
|
81
|
+
return inspect(failure);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (import.meta.main)
|
|
86
|
+
void RuntimeEntry.settleAsync(RuntimeEntry.runAsync(process.argv.slice(Resources.entryArgumentsStart), process.platform, process.env, process, process.stderr), process.stderr, process);
|
|
87
|
+
//# sourceMappingURL=runtime-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-entry.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.runtime/src/services/runtime-entry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,MAAM,OAAO,YAAY;IAChB,MAAM,KAAK,SAAS;QACzB,OAAO,aAA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AAI,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,qBAAqB,CAAC;gBAClE,MAAM,OAAO,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,MAAM,CAAC,sBAAsB,CAAC,cAA6C;QACjF,IAAI,CAAC;YACH,OAAO,cAAc,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;QACvD,CAAC;QACD,OAAO,OAAO,EAAE,CAAC;YACf,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;CACF;AAED,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI;IAClB,KAAK,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { Failure, FailureCode, SecretAction, SecretCommand, SecretFailureKind, SecretFailureReason, SecretFailures } from "@noldova/desktop.protocol";
|
|
10
|
+
import { MethodFailureException } from "../../exceptions/method-failure.exception.js";
|
|
11
|
+
import { ProductInfo } from "../../models/product-info.js";
|
|
12
|
+
import { Resources } from "../../resources.js";
|
|
13
|
+
export class MachineSecretBackend {
|
|
14
|
+
channel;
|
|
15
|
+
calls = new Map();
|
|
16
|
+
writes = new Map();
|
|
17
|
+
target = null;
|
|
18
|
+
table = null;
|
|
19
|
+
device = null;
|
|
20
|
+
nextCall = 1;
|
|
21
|
+
constructor(channel = null) {
|
|
22
|
+
this.channel = channel;
|
|
23
|
+
}
|
|
24
|
+
open(table) {
|
|
25
|
+
this.table = table;
|
|
26
|
+
}
|
|
27
|
+
async saveAsync(name, value) {
|
|
28
|
+
await this.writeInOrderAsync(name, async () => {
|
|
29
|
+
const [table, device] = await this.requireStoreAsync();
|
|
30
|
+
table.save(device, name, await this.commandAsync(SecretAction.Encrypt, value, name));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async readAsync(name) {
|
|
34
|
+
const [table, device] = await this.requireStoreAsync();
|
|
35
|
+
const ciphertext = table.read(device, name);
|
|
36
|
+
return Object.isNull(ciphertext) ? null : await this.commandAsync(SecretAction.Decrypt, ciphertext, name);
|
|
37
|
+
}
|
|
38
|
+
async removeAsync(name) {
|
|
39
|
+
await this.writeInOrderAsync(name, async () => {
|
|
40
|
+
const [table, device] = await this.requireStoreAsync();
|
|
41
|
+
table.remove(device, name);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
async isSetAsync(name) {
|
|
45
|
+
const [table, device] = await this.requireStoreAsync();
|
|
46
|
+
return !Object.isNull(table.read(device, name));
|
|
47
|
+
}
|
|
48
|
+
answer(connection, answered) {
|
|
49
|
+
const call = this.calls.get(answered.call);
|
|
50
|
+
if (Object.isUndefined(call) || call.connection !== connection)
|
|
51
|
+
return;
|
|
52
|
+
this.calls.delete(answered.call);
|
|
53
|
+
if (!Object.isNull(answered.value))
|
|
54
|
+
call.wait.resolve(answered.value);
|
|
55
|
+
else if (!Object.isNull(answered.failure))
|
|
56
|
+
call.wait.reject(MachineSecretBackend.failureOf(answered.failure, call.action, call.name));
|
|
57
|
+
}
|
|
58
|
+
check(connection) {
|
|
59
|
+
const channel = this.channel;
|
|
60
|
+
const target = Object.isNull(connection) || Object.isNull(channel) ? null : { connection, channel };
|
|
61
|
+
if (target?.connection === this.target?.connection)
|
|
62
|
+
return;
|
|
63
|
+
const calls = [...this.calls.values()];
|
|
64
|
+
this.calls.clear();
|
|
65
|
+
for (const call of calls)
|
|
66
|
+
call.wait.reject(MachineSecretBackend.needsApp());
|
|
67
|
+
this.target = target;
|
|
68
|
+
}
|
|
69
|
+
async writeInOrderAsync(name, write) {
|
|
70
|
+
const key = name.text;
|
|
71
|
+
const written = (this.writes.get(key) ?? Promise.resolve()).then(write);
|
|
72
|
+
const settled = written.catch(() => undefined);
|
|
73
|
+
this.writes.set(key, settled);
|
|
74
|
+
try {
|
|
75
|
+
await written;
|
|
76
|
+
}
|
|
77
|
+
finally {
|
|
78
|
+
if (this.writes.get(key) === settled)
|
|
79
|
+
this.writes.delete(key);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async requireStoreAsync() {
|
|
83
|
+
const table = this.table;
|
|
84
|
+
if (Object.isNull(table))
|
|
85
|
+
throw MachineSecretBackend.needsApp();
|
|
86
|
+
return [table, await this.requireDeviceAsync()];
|
|
87
|
+
}
|
|
88
|
+
async requireDeviceAsync() {
|
|
89
|
+
this.device ??= await this.commandAsync(SecretAction.Device, null, null);
|
|
90
|
+
return this.device;
|
|
91
|
+
}
|
|
92
|
+
commandAsync(action, value, name) {
|
|
93
|
+
const target = this.target;
|
|
94
|
+
if (Object.isNull(target))
|
|
95
|
+
return Promise.reject(MachineSecretBackend.needsApp());
|
|
96
|
+
const command = new SecretCommand(this.nextCall, action, value);
|
|
97
|
+
this.nextCall += 1;
|
|
98
|
+
const wait = Promise.withResolvers();
|
|
99
|
+
this.calls.set(command.call, { connection: target.connection, action, name, wait });
|
|
100
|
+
target.channel.publishTo(target.connection, null, command.toJson());
|
|
101
|
+
return wait.promise;
|
|
102
|
+
}
|
|
103
|
+
static needsApp() {
|
|
104
|
+
return MachineSecretBackend.unavailable(SecretFailureReason.NotConnected, Resources.formatSecretsNeedApp(ProductInfo.current.name));
|
|
105
|
+
}
|
|
106
|
+
static failureOf(kind, action, name) {
|
|
107
|
+
switch (kind) {
|
|
108
|
+
case SecretFailureKind.NoDevice:
|
|
109
|
+
return MachineSecretBackend.unavailable(SecretFailureReason.NoDevice, Resources.formatSecretsNoDevice(ProductInfo.current.name));
|
|
110
|
+
case SecretFailureKind.Unprotected:
|
|
111
|
+
return MachineSecretBackend.unavailable(SecretFailureReason.Unprotected, action === SecretAction.Decrypt
|
|
112
|
+
? Resources.formatSecretUnreadable(ProductInfo.current.name, String(name)) : Resources.formatSecretsUnprotected(ProductInfo.current.name));
|
|
113
|
+
default:
|
|
114
|
+
return MachineSecretBackend.unavailable(SecretFailureReason.Undecryptable, Resources.formatSecretUndecryptable(String(name)));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
static unavailable(reason, message) {
|
|
118
|
+
return new MethodFailureException(new Failure(FailureCode.Unavailable, message, SecretFailures.detailsOf(reason)));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=machine-secret-backend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine-secret-backend.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/secrets/machine-secret-backend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAsB,YAAY,EAAuB,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE/L,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAGtF,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,OAAO,oBAAoB;IACd,OAAO,CAAsB;IAC7B,KAAK,GAAkK,IAAI,GAAG,EAAE,CAAC;IACjL,MAAM,GAA+B,IAAI,GAAG,EAAE,CAAC;IACxD,MAAM,GAA2E,IAAI,CAAC;IACtF,K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;QAChG,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,iBAAiB,CAAC,QAAQ;gBAC7B,OAAO,oBAAoB,CAAC,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,SAAS,CAAC,qBAAqB,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACnI,KAAK,iBAAiB,CAAC,WAAW;gBAChC,OAAO,oBAAoB,CAAC,WAAW,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,KAAK,YAAY,CAAC,OAAO;oBACtG,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC/I;gBACE,OAAO,oBAAoB,CAAC,WAAW,CAAC,mBAAmB,CAAC,aAAa,EAAE,SAAS,CAAC,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClI,CAAC;IACH,CAAC;IAEO,MAAM,CAAC,WAAW,CAAC,MAA2B,EAAE,OAAe;QACrE,OAAO,IAAI,sBAAsB,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACrH,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { QualifiedName, SecretValue } from "@noldova/desktop.protocol";
|
|
9
|
+
import { SecretNotOwnedException } from "../../exceptions/secret-not-owned.exception.js";
|
|
10
|
+
export class ModuleSecrets {
|
|
11
|
+
moduleId;
|
|
12
|
+
backend;
|
|
13
|
+
constructor(moduleId, backend) {
|
|
14
|
+
this.moduleId = moduleId;
|
|
15
|
+
this.backend = backend;
|
|
16
|
+
}
|
|
17
|
+
async saveAsync(name, value) {
|
|
18
|
+
const secret = new SecretValue(this.requireOwn(name), value);
|
|
19
|
+
await this.backend.saveAsync(secret.name, secret.value);
|
|
20
|
+
}
|
|
21
|
+
async readAsync(name) {
|
|
22
|
+
return await this.backend.readAsync(this.requireOwn(name));
|
|
23
|
+
}
|
|
24
|
+
async removeAsync(name) {
|
|
25
|
+
await this.backend.removeAsync(this.requireOwn(name));
|
|
26
|
+
}
|
|
27
|
+
async isSetAsync(name) {
|
|
28
|
+
return await this.backend.isSetAsync(this.requireOwn(name));
|
|
29
|
+
}
|
|
30
|
+
requireOwn(name) {
|
|
31
|
+
const qualified = QualifiedName.parse(name);
|
|
32
|
+
if (qualified.owner !== this.moduleId)
|
|
33
|
+
throw new SecretNotOwnedException(this.moduleId, name);
|
|
34
|
+
return qualified;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=module-secrets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-secrets.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/secrets/module-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAIzF,MAAM,OAAO,aAAa;IACP,QAAQ,CAAS;IACjB,OAAO,CAAiB;IAEzC,YAAmB,QAAgB,EAAE,OAAuB;QAC1D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,IAAY,EAAE,KAAa;QAChD,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;QAC7D,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,IAAY;QACjC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,IAAY;QACnC,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACxD,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,IAAY;QAClC,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,CAAC;IAEO,UAAU,CAAC,IAAY;QAC7B,MAAM,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,SAAS,CAAC,KAAK,KAAK,IAAI,CAAC,QAAQ;YACnC,MAAM,IAAI,uBAAuB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACzD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { SecretReference } from "@noldova/desktop.protocol";
|
|
9
|
+
export class RemoveSecretMethod {
|
|
10
|
+
backend;
|
|
11
|
+
constructor(backend) {
|
|
12
|
+
this.backend = backend;
|
|
13
|
+
}
|
|
14
|
+
async handleAsync(context) {
|
|
15
|
+
await this.backend.removeAsync(SecretReference.fromJson(context.payload).name);
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=remove-secret-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-secret-method.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/secrets/remove-secret-method.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAM5D,MAAM,OAAO,kBAAkB;IACZ,OAAO,CAAiB;IAEzC,YAAmB,OAAuB;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,OAAuB;QAC9C,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;QAC/E,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { SecretValue } from "@noldova/desktop.protocol";
|
|
9
|
+
export class SaveSecretMethod {
|
|
10
|
+
backend;
|
|
11
|
+
constructor(backend) {
|
|
12
|
+
this.backend = backend;
|
|
13
|
+
}
|
|
14
|
+
async handleAsync(context) {
|
|
15
|
+
const secret = SecretValue.fromJson(context.payload);
|
|
16
|
+
await this.backend.saveAsync(secret.name, secret.value);
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=save-secret-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-secret-method.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/secrets/save-secret-method.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAMxD,MAAM,OAAO,gBAAgB;IACV,OAAO,CAAiB;IAEzC,YAAmB,OAAuB;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,OAAuB;QAC9C,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACrD,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { SecretAnswered } from "@noldova/desktop.protocol";
|
|
9
|
+
export class SecretAnsweredMethod {
|
|
10
|
+
backend;
|
|
11
|
+
constructor(backend) {
|
|
12
|
+
this.backend = backend;
|
|
13
|
+
}
|
|
14
|
+
handleAsync(context) {
|
|
15
|
+
this.backend.answer(context.connection, SecretAnswered.fromJson(context.payload));
|
|
16
|
+
return Promise.resolve(null);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=secret-answered-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-answered-method.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/secrets/secret-answered-method.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAM3D,MAAM,OAAO,oBAAoB;IACd,OAAO,CAAuB;IAE/C,YAAmB,OAA6B;QAC9C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,WAAW,CAAC,OAAuB;QACxC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAClF,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { SecretReference } from "@noldova/desktop.protocol";
|
|
9
|
+
export class SecretStatusMethod {
|
|
10
|
+
backend;
|
|
11
|
+
constructor(backend) {
|
|
12
|
+
this.backend = backend;
|
|
13
|
+
}
|
|
14
|
+
async handleAsync(context) {
|
|
15
|
+
return await this.backend.isSetAsync(SecretReference.fromJson(context.payload).name);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=secret-status-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-status-method.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/secrets/secret-status-method.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAM5D,MAAM,OAAO,kBAAkB;IACZ,OAAO,CAAiB;IAEzC,YAAmB,OAAuB;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,OAAuB;QAC9C,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;IACvF,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { Resources } from "../../resources.js";
|
|
10
|
+
export class SecretTable {
|
|
11
|
+
database;
|
|
12
|
+
constructor(database) {
|
|
13
|
+
this.database = database;
|
|
14
|
+
}
|
|
15
|
+
save(device, name, ciphertext) {
|
|
16
|
+
this.database.run(Resources.saveSecretStatement, device, name.owner, name.member, ciphertext);
|
|
17
|
+
}
|
|
18
|
+
read(device, name) {
|
|
19
|
+
const row = this.database.read(Resources.readSecretStatement, device, name.owner, name.member);
|
|
20
|
+
return Object.isUndefined(row) ? null : String(row[Resources.valueColumn]);
|
|
21
|
+
}
|
|
22
|
+
remove(device, name) {
|
|
23
|
+
this.database.run(Resources.removeSecretStatement, device, name.owner, name.member);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=secret-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-table.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/secrets/secret-table.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAG/B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,OAAO,WAAW;IACL,QAAQ,CAAgB;IAEzC,YAAmB,QAAuB;QACxC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,IAAI,CAAC,MAAc,EAAE,IAAmB,EAAE,UAAkB;QACjE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAChG,CAAC;IAEM,IAAI,CAAC,MAAc,EAAE,IAAmB;QAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/F,OAAO,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7E,CAAC;IAEM,MAAM,CAAC,MAAc,EAAE,IAAmB;QAC/C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACtF,CAAC;CACF"}
|