@wasmsoft/fantastic 1.0.0
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/README.md +65 -0
- package/bin/run.js +27 -0
- package/bin/supervisor.js +65 -0
- package/dist/acquire/central-url.d.ts +9 -0
- package/dist/acquire/central-url.d.ts.map +1 -0
- package/dist/acquire/central-url.js +74 -0
- package/dist/acquire/central-url.js.map +1 -0
- package/dist/acquire/code.d.ts +21 -0
- package/dist/acquire/code.d.ts.map +1 -0
- package/dist/acquire/code.js +66 -0
- package/dist/acquire/code.js.map +1 -0
- package/dist/acquire/compatibility.d.ts +18 -0
- package/dist/acquire/compatibility.d.ts.map +1 -0
- package/dist/acquire/compatibility.js +36 -0
- package/dist/acquire/compatibility.js.map +1 -0
- package/dist/acquire/fetch.d.ts +26 -0
- package/dist/acquire/fetch.d.ts.map +1 -0
- package/dist/acquire/fetch.js +72 -0
- package/dist/acquire/fetch.js.map +1 -0
- package/dist/acquire/latest.d.ts +24 -0
- package/dist/acquire/latest.d.ts.map +1 -0
- package/dist/acquire/latest.js +95 -0
- package/dist/acquire/latest.js.map +1 -0
- package/dist/backup/archive.d.ts +26 -0
- package/dist/backup/archive.d.ts.map +1 -0
- package/dist/backup/archive.js +123 -0
- package/dist/backup/archive.js.map +1 -0
- package/dist/backup/restore.d.ts +46 -0
- package/dist/backup/restore.d.ts.map +1 -0
- package/dist/backup/restore.js +164 -0
- package/dist/backup/restore.js.map +1 -0
- package/dist/base-command.d.ts +54 -0
- package/dist/base-command.d.ts.map +1 -0
- package/dist/base-command.js +120 -0
- package/dist/base-command.js.map +1 -0
- package/dist/bundle-format/index.d.ts +6 -0
- package/dist/bundle-format/index.d.ts.map +1 -0
- package/dist/bundle-format/index.js +36 -0
- package/dist/bundle-format/index.js.map +1 -0
- package/dist/commands/activate.d.ts +15 -0
- package/dist/commands/activate.d.ts.map +1 -0
- package/dist/commands/activate.js +139 -0
- package/dist/commands/activate.js.map +1 -0
- package/dist/commands/backup.d.ts +11 -0
- package/dist/commands/backup.d.ts.map +1 -0
- package/dist/commands/backup.js +75 -0
- package/dist/commands/backup.js.map +1 -0
- package/dist/commands/config/get.d.ts +10 -0
- package/dist/commands/config/get.d.ts.map +1 -0
- package/dist/commands/config/get.js +33 -0
- package/dist/commands/config/get.js.map +1 -0
- package/dist/commands/config/list.d.ts +7 -0
- package/dist/commands/config/list.d.ts.map +1 -0
- package/dist/commands/config/list.js +43 -0
- package/dist/commands/config/list.js.map +1 -0
- package/dist/commands/config/set.d.ts +11 -0
- package/dist/commands/config/set.d.ts.map +1 -0
- package/dist/commands/config/set.js +56 -0
- package/dist/commands/config/set.js.map +1 -0
- package/dist/commands/db/migrate.d.ts +10 -0
- package/dist/commands/db/migrate.d.ts.map +1 -0
- package/dist/commands/db/migrate.js +67 -0
- package/dist/commands/db/migrate.js.map +1 -0
- package/dist/commands/dev.d.ts +19 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +149 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/doctor.d.ts +11 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +75 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/health.d.ts +12 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +109 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/install.d.ts +60 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +486 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/iptv/snapshot.d.ts +10 -0
- package/dist/commands/iptv/snapshot.d.ts.map +1 -0
- package/dist/commands/iptv/snapshot.js +55 -0
- package/dist/commands/iptv/snapshot.js.map +1 -0
- package/dist/commands/library/drives.d.ts +7 -0
- package/dist/commands/library/drives.d.ts.map +1 -0
- package/dist/commands/library/drives.js +71 -0
- package/dist/commands/library/drives.js.map +1 -0
- package/dist/commands/library/relink.d.ts +10 -0
- package/dist/commands/library/relink.d.ts.map +1 -0
- package/dist/commands/library/relink.js +72 -0
- package/dist/commands/library/relink.js.map +1 -0
- package/dist/commands/library/scan.d.ts +16 -0
- package/dist/commands/library/scan.d.ts.map +1 -0
- package/dist/commands/library/scan.js +87 -0
- package/dist/commands/library/scan.js.map +1 -0
- package/dist/commands/library/sections.d.ts +7 -0
- package/dist/commands/library/sections.d.ts.map +1 -0
- package/dist/commands/library/sections.js +33 -0
- package/dist/commands/library/sections.js.map +1 -0
- package/dist/commands/library/status.d.ts +7 -0
- package/dist/commands/library/status.d.ts.map +1 -0
- package/dist/commands/library/status.js +37 -0
- package/dist/commands/library/status.js.map +1 -0
- package/dist/commands/list.d.ts +7 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +73 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/live/channels.d.ts +10 -0
- package/dist/commands/live/channels.d.ts.map +1 -0
- package/dist/commands/live/channels.js +55 -0
- package/dist/commands/live/channels.js.map +1 -0
- package/dist/commands/live/test.d.ts +15 -0
- package/dist/commands/live/test.d.ts.map +1 -0
- package/dist/commands/live/test.js +116 -0
- package/dist/commands/live/test.js.map +1 -0
- package/dist/commands/logs.d.ts +16 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +77 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/migrate-cli.d.ts +11 -0
- package/dist/commands/migrate-cli.d.ts.map +1 -0
- package/dist/commands/migrate-cli.js +116 -0
- package/dist/commands/migrate-cli.js.map +1 -0
- package/dist/commands/owner/reset.d.ts +7 -0
- package/dist/commands/owner/reset.d.ts.map +1 -0
- package/dist/commands/owner/reset.js +74 -0
- package/dist/commands/owner/reset.js.map +1 -0
- package/dist/commands/restart.d.ts +11 -0
- package/dist/commands/restart.d.ts.map +1 -0
- package/dist/commands/restart.js +53 -0
- package/dist/commands/restart.js.map +1 -0
- package/dist/commands/restore.d.ts +17 -0
- package/dist/commands/restore.d.ts.map +1 -0
- package/dist/commands/restore.js +148 -0
- package/dist/commands/restore.js.map +1 -0
- package/dist/commands/self-update.d.ts +10 -0
- package/dist/commands/self-update.d.ts.map +1 -0
- package/dist/commands/self-update.js +98 -0
- package/dist/commands/self-update.js.map +1 -0
- package/dist/commands/setup.d.ts +19 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +111 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/shell.d.ts +118 -0
- package/dist/commands/shell.d.ts.map +1 -0
- package/dist/commands/shell.js +415 -0
- package/dist/commands/shell.js.map +1 -0
- package/dist/commands/start.d.ts +12 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +108 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +8 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +115 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/stop.d.ts +11 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +45 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands/stream/cancel.d.ts +13 -0
- package/dist/commands/stream/cancel.d.ts.map +1 -0
- package/dist/commands/stream/cancel.js +31 -0
- package/dist/commands/stream/cancel.js.map +1 -0
- package/dist/commands/stream/encoders.d.ts +7 -0
- package/dist/commands/stream/encoders.d.ts.map +1 -0
- package/dist/commands/stream/encoders.js +42 -0
- package/dist/commands/stream/encoders.js.map +1 -0
- package/dist/commands/stream/queue.d.ts +7 -0
- package/dist/commands/stream/queue.d.ts.map +1 -0
- package/dist/commands/stream/queue.js +52 -0
- package/dist/commands/stream/queue.js.map +1 -0
- package/dist/commands/stream/sessions.d.ts +7 -0
- package/dist/commands/stream/sessions.d.ts.map +1 -0
- package/dist/commands/stream/sessions.js +44 -0
- package/dist/commands/stream/sessions.js.map +1 -0
- package/dist/commands/uninstall.d.ts +23 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +290 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +21 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +290 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/watch.d.ts +10 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +38 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/config/local-config.d.ts +22 -0
- package/dist/config/local-config.d.ts.map +1 -0
- package/dist/config/local-config.js +79 -0
- package/dist/config/local-config.js.map +1 -0
- package/dist/core-scripts/run.d.ts +22 -0
- package/dist/core-scripts/run.d.ts.map +1 -0
- package/dist/core-scripts/run.js +65 -0
- package/dist/core-scripts/run.js.map +1 -0
- package/dist/doctor/check.types.d.ts +51 -0
- package/dist/doctor/check.types.d.ts.map +1 -0
- package/dist/doctor/check.types.js +14 -0
- package/dist/doctor/check.types.js.map +1 -0
- package/dist/doctor/checks/core.check.d.ts +11 -0
- package/dist/doctor/checks/core.check.d.ts.map +1 -0
- package/dist/doctor/checks/core.check.js +104 -0
- package/dist/doctor/checks/core.check.js.map +1 -0
- package/dist/doctor/checks/data.check.d.ts +11 -0
- package/dist/doctor/checks/data.check.d.ts.map +1 -0
- package/dist/doctor/checks/data.check.js +70 -0
- package/dist/doctor/checks/data.check.js.map +1 -0
- package/dist/doctor/checks/environment.check.d.ts +6 -0
- package/dist/doctor/checks/environment.check.d.ts.map +1 -0
- package/dist/doctor/checks/environment.check.js +70 -0
- package/dist/doctor/checks/environment.check.js.map +1 -0
- package/dist/doctor/checks/integrity.check.d.ts +4 -0
- package/dist/doctor/checks/integrity.check.d.ts.map +1 -0
- package/dist/doctor/checks/integrity.check.js +89 -0
- package/dist/doctor/checks/integrity.check.js.map +1 -0
- package/dist/doctor/checks/isolation.check.d.ts +49 -0
- package/dist/doctor/checks/isolation.check.d.ts.map +1 -0
- package/dist/doctor/checks/isolation.check.js +220 -0
- package/dist/doctor/checks/isolation.check.js.map +1 -0
- package/dist/doctor/checks/licence.check.d.ts +8 -0
- package/dist/doctor/checks/licence.check.d.ts.map +1 -0
- package/dist/doctor/checks/licence.check.js +172 -0
- package/dist/doctor/checks/licence.check.js.map +1 -0
- package/dist/doctor/checks/ports.check.d.ts +4 -0
- package/dist/doctor/checks/ports.check.d.ts.map +1 -0
- package/dist/doctor/checks/ports.check.js +52 -0
- package/dist/doctor/checks/ports.check.js.map +1 -0
- package/dist/doctor/checks/supervisor.check.d.ts +19 -0
- package/dist/doctor/checks/supervisor.check.d.ts.map +1 -0
- package/dist/doctor/checks/supervisor.check.js +152 -0
- package/dist/doctor/checks/supervisor.check.js.map +1 -0
- package/dist/doctor/checks/tooling.check.d.ts +3 -0
- package/dist/doctor/checks/tooling.check.d.ts.map +1 -0
- package/dist/doctor/checks/tooling.check.js +43 -0
- package/dist/doctor/checks/tooling.check.js.map +1 -0
- package/dist/doctor/registry.d.ts +15 -0
- package/dist/doctor/registry.d.ts.map +1 -0
- package/dist/doctor/registry.js +53 -0
- package/dist/doctor/registry.js.map +1 -0
- package/dist/exit-codes.d.ts +18 -0
- package/dist/exit-codes.d.ts.map +1 -0
- package/dist/exit-codes.js +23 -0
- package/dist/exit-codes.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/logs/sink.d.ts +11 -0
- package/dist/logs/sink.d.ts.map +1 -0
- package/dist/logs/sink.js +73 -0
- package/dist/logs/sink.js.map +1 -0
- package/dist/logs/tail.d.ts +17 -0
- package/dist/logs/tail.d.ts.map +1 -0
- package/dist/logs/tail.js +98 -0
- package/dist/logs/tail.js.map +1 -0
- package/dist/packaging/boot-task.d.ts +56 -0
- package/dist/packaging/boot-task.d.ts.map +1 -0
- package/dist/packaging/boot-task.js +151 -0
- package/dist/packaging/boot-task.js.map +1 -0
- package/dist/packaging/install.d.ts +154 -0
- package/dist/packaging/install.d.ts.map +1 -0
- package/dist/packaging/install.js +381 -0
- package/dist/packaging/install.js.map +1 -0
- package/dist/packaging/layout.d.ts +153 -0
- package/dist/packaging/layout.d.ts.map +1 -0
- package/dist/packaging/layout.js +168 -0
- package/dist/packaging/layout.js.map +1 -0
- package/dist/packaging/machine-path.d.ts +52 -0
- package/dist/packaging/machine-path.d.ts.map +1 -0
- package/dist/packaging/machine-path.js +237 -0
- package/dist/packaging/machine-path.js.map +1 -0
- package/dist/packaging/manifest.d.ts +37 -0
- package/dist/packaging/manifest.d.ts.map +1 -0
- package/dist/packaging/manifest.js +115 -0
- package/dist/packaging/manifest.js.map +1 -0
- package/dist/packaging/shims.d.ts +31 -0
- package/dist/packaging/shims.d.ts.map +1 -0
- package/dist/packaging/shims.js +165 -0
- package/dist/packaging/shims.js.map +1 -0
- package/dist/probes/internal-paths.d.ts +35 -0
- package/dist/probes/internal-paths.d.ts.map +1 -0
- package/dist/probes/internal-paths.js +58 -0
- package/dist/probes/internal-paths.js.map +1 -0
- package/dist/probes/internal.client.d.ts +54 -0
- package/dist/probes/internal.client.d.ts.map +1 -0
- package/dist/probes/internal.client.js +123 -0
- package/dist/probes/internal.client.js.map +1 -0
- package/dist/probes/port.probe.d.ts +21 -0
- package/dist/probes/port.probe.d.ts.map +1 -0
- package/dist/probes/port.probe.js +42 -0
- package/dist/probes/port.probe.js.map +1 -0
- package/dist/probes/service.probe.d.ts +29 -0
- package/dist/probes/service.probe.d.ts.map +1 -0
- package/dist/probes/service.probe.js +65 -0
- package/dist/probes/service.probe.js.map +1 -0
- package/dist/profiles/appliance.profile.d.ts +20 -0
- package/dist/profiles/appliance.profile.d.ts.map +1 -0
- package/dist/profiles/appliance.profile.js +137 -0
- package/dist/profiles/appliance.profile.js.map +1 -0
- package/dist/profiles/dev.profile.d.ts +22 -0
- package/dist/profiles/dev.profile.d.ts.map +1 -0
- package/dist/profiles/dev.profile.js +104 -0
- package/dist/profiles/dev.profile.js.map +1 -0
- package/dist/profiles/resolve.d.ts +37 -0
- package/dist/profiles/resolve.d.ts.map +1 -0
- package/dist/profiles/resolve.js +198 -0
- package/dist/profiles/resolve.js.map +1 -0
- package/dist/profiles/types.d.ts +57 -0
- package/dist/profiles/types.d.ts.map +1 -0
- package/dist/profiles/types.js +15 -0
- package/dist/profiles/types.js.map +1 -0
- package/dist/registry/local-registry.d.ts +79 -0
- package/dist/registry/local-registry.d.ts.map +1 -0
- package/dist/registry/local-registry.js +252 -0
- package/dist/registry/local-registry.js.map +1 -0
- package/dist/render/banner.d.ts +13 -0
- package/dist/render/banner.d.ts.map +1 -0
- package/dist/render/banner.js +83 -0
- package/dist/render/banner.js.map +1 -0
- package/dist/render/boot.render.d.ts +123 -0
- package/dist/render/boot.render.d.ts.map +1 -0
- package/dist/render/boot.render.js +288 -0
- package/dist/render/boot.render.js.map +1 -0
- package/dist/render/brand.d.ts +16 -0
- package/dist/render/brand.d.ts.map +1 -0
- package/dist/render/brand.js +22 -0
- package/dist/render/brand.js.map +1 -0
- package/dist/render/doctor.render.d.ts +12 -0
- package/dist/render/doctor.render.d.ts.map +1 -0
- package/dist/render/doctor.render.js +95 -0
- package/dist/render/doctor.render.js.map +1 -0
- package/dist/render/json.d.ts +29 -0
- package/dist/render/json.d.ts.map +1 -0
- package/dist/render/json.js +19 -0
- package/dist/render/json.js.map +1 -0
- package/dist/render/licence.render.d.ts +10 -0
- package/dist/render/licence.render.d.ts.map +1 -0
- package/dist/render/licence.render.js +167 -0
- package/dist/render/licence.render.js.map +1 -0
- package/dist/render/status.render.d.ts +6 -0
- package/dist/render/status.render.d.ts.map +1 -0
- package/dist/render/status.render.js +52 -0
- package/dist/render/status.render.js.map +1 -0
- package/dist/render/theme.d.ts +66 -0
- package/dist/render/theme.d.ts.map +1 -0
- package/dist/render/theme.js +89 -0
- package/dist/render/theme.js.map +1 -0
- package/dist/runtime-guard.d.ts +19 -0
- package/dist/runtime-guard.d.ts.map +1 -0
- package/dist/runtime-guard.js +57 -0
- package/dist/runtime-guard.js.map +1 -0
- package/dist/shell/input-mode.d.ts +25 -0
- package/dist/shell/input-mode.d.ts.map +1 -0
- package/dist/shell/input-mode.js +17 -0
- package/dist/shell/input-mode.js.map +1 -0
- package/dist/shell/parse-line.d.ts +6 -0
- package/dist/shell/parse-line.d.ts.map +1 -0
- package/dist/shell/parse-line.js +62 -0
- package/dist/shell/parse-line.js.map +1 -0
- package/dist/shell/suggestions.d.ts +14 -0
- package/dist/shell/suggestions.d.ts.map +1 -0
- package/dist/shell/suggestions.js +35 -0
- package/dist/shell/suggestions.js.map +1 -0
- package/dist/supervisor/dependencies.d.ts +2 -0
- package/dist/supervisor/dependencies.d.ts.map +1 -0
- package/dist/supervisor/dependencies.js +38 -0
- package/dist/supervisor/dependencies.js.map +1 -0
- package/dist/supervisor/entry.d.ts +36 -0
- package/dist/supervisor/entry.d.ts.map +1 -0
- package/dist/supervisor/entry.js +171 -0
- package/dist/supervisor/entry.js.map +1 -0
- package/dist/supervisor/inspect.d.ts +17 -0
- package/dist/supervisor/inspect.d.ts.map +1 -0
- package/dist/supervisor/inspect.js +39 -0
- package/dist/supervisor/inspect.js.map +1 -0
- package/dist/supervisor/invocation.d.ts +27 -0
- package/dist/supervisor/invocation.d.ts.map +1 -0
- package/dist/supervisor/invocation.js +33 -0
- package/dist/supervisor/invocation.js.map +1 -0
- package/dist/supervisor/monitor.d.ts +63 -0
- package/dist/supervisor/monitor.d.ts.map +1 -0
- package/dist/supervisor/monitor.js +141 -0
- package/dist/supervisor/monitor.js.map +1 -0
- package/dist/supervisor/orchestrator.d.ts +52 -0
- package/dist/supervisor/orchestrator.d.ts.map +1 -0
- package/dist/supervisor/orchestrator.js +154 -0
- package/dist/supervisor/orchestrator.js.map +1 -0
- package/dist/supervisor/pidfile.d.ts +21 -0
- package/dist/supervisor/pidfile.d.ts.map +1 -0
- package/dist/supervisor/pidfile.js +39 -0
- package/dist/supervisor/pidfile.js.map +1 -0
- package/dist/supervisor/process-identity.d.ts +19 -0
- package/dist/supervisor/process-identity.d.ts.map +1 -0
- package/dist/supervisor/process-identity.js +51 -0
- package/dist/supervisor/process-identity.js.map +1 -0
- package/dist/supervisor/readiness.d.ts +17 -0
- package/dist/supervisor/readiness.d.ts.map +1 -0
- package/dist/supervisor/readiness.js +52 -0
- package/dist/supervisor/readiness.js.map +1 -0
- package/dist/supervisor/restart-consumer.d.ts +37 -0
- package/dist/supervisor/restart-consumer.d.ts.map +1 -0
- package/dist/supervisor/restart-consumer.js +119 -0
- package/dist/supervisor/restart-consumer.js.map +1 -0
- package/dist/supervisor/runner.d.ts +2 -0
- package/dist/supervisor/runner.d.ts.map +1 -0
- package/dist/supervisor/runner.js +118 -0
- package/dist/supervisor/runner.js.map +1 -0
- package/dist/supervisor/schedule-timer.d.ts +38 -0
- package/dist/supervisor/schedule-timer.d.ts.map +1 -0
- package/dist/supervisor/schedule-timer.js +148 -0
- package/dist/supervisor/schedule-timer.js.map +1 -0
- package/dist/supervisor/spawn.d.ts +18 -0
- package/dist/supervisor/spawn.d.ts.map +1 -0
- package/dist/supervisor/spawn.js +119 -0
- package/dist/supervisor/spawn.js.map +1 -0
- package/dist/supervisor/state-files.d.ts +33 -0
- package/dist/supervisor/state-files.d.ts.map +1 -0
- package/dist/supervisor/state-files.js +110 -0
- package/dist/supervisor/state-files.js.map +1 -0
- package/dist/supervisor/tree-kill.d.ts +14 -0
- package/dist/supervisor/tree-kill.d.ts.map +1 -0
- package/dist/supervisor/tree-kill.js +82 -0
- package/dist/supervisor/tree-kill.js.map +1 -0
- package/dist/ui/health-panel.d.ts +8 -0
- package/dist/ui/health-panel.d.ts.map +1 -0
- package/dist/ui/health-panel.js +91 -0
- package/dist/ui/health-panel.js.map +1 -0
- package/dist/updating/apply.d.ts +50 -0
- package/dist/updating/apply.d.ts.map +1 -0
- package/dist/updating/apply.js +172 -0
- package/dist/updating/apply.js.map +1 -0
- package/dist/updating/download.d.ts +44 -0
- package/dist/updating/download.d.ts.map +1 -0
- package/dist/updating/download.js +144 -0
- package/dist/updating/download.js.map +1 -0
- package/dist/updating/rollback.d.ts +33 -0
- package/dist/updating/rollback.d.ts.map +1 -0
- package/dist/updating/rollback.js +54 -0
- package/dist/updating/rollback.js.map +1 -0
- package/dist/updating/self.d.ts +16 -0
- package/dist/updating/self.d.ts.map +1 -0
- package/dist/updating/self.js +50 -0
- package/dist/updating/self.js.map +1 -0
- package/dist/updating/verify.d.ts +25 -0
- package/dist/updating/verify.d.ts.map +1 -0
- package/dist/updating/verify.js +51 -0
- package/dist/updating/verify.js.map +1 -0
- package/dist/updating/versions.d.ts +31 -0
- package/dist/updating/versions.d.ts.map +1 -0
- package/dist/updating/versions.js +78 -0
- package/dist/updating/versions.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +29 -0
- package/dist/version.js.map +1 -0
- package/package.json +106 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine-path.js","sourceRoot":"","sources":["../../src/packaging/machine-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,mDAAmD;AACnD,EAAE;AACF,qGAAqG;AACrG,qEAAqE;AACrE,EAAE;AACF,uFAAuF;AACvF,qFAAqF;AACrF,2DAA2D;AAC3D,gGAAgG;AAChG,mGAAmG;AACnG,qFAAqF;AACrF,iGAAiG;AACjG,gDAAgD;AAChD,mGAAmG;AACnG,yCAAyC;AACzC,uEAAuE;AACvE,EAAE;AACF,qGAAqG;AACrG,mGAAmG;AACnG,qEAAqE;AACrE,EAAE;AACF,uGAAuG;AACvG,uGAAuG;AACvG,sGAAsG;AACtG,iGAAiG;AACjG,iFAAiF;AACjF,oGAAoG;AACpG,qGAAqG;AACrG,qFAAqF;AACrF,qGAAqG;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AO,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE;QAChE,UAAU,EAAE,wDAAwD;QACpE,SAAS,EAAE,iBAAiB;QAC5B,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,UAAU;KACnB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { BundleManifest } from "../contracts/core.js";
|
|
2
|
+
/**
|
|
3
|
+
* بصمة مجلد: اسم كل ملف ومحتواه، بترتيب مستقرّ.
|
|
4
|
+
*
|
|
5
|
+
* الترتيب مقصود: readdirSync لا يضمن ترتيبًا عبر أنظمة الملفات، فبصمة غير مرتّبة تختلف بين آلتين
|
|
6
|
+
* لنفس المحتوى — وتصير عديمة المعنى ككشفٍ للتغيير.
|
|
7
|
+
*/
|
|
8
|
+
export declare function hashDirectory(root: string): {
|
|
9
|
+
sha256: string;
|
|
10
|
+
files: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function hashFile(path: string): string;
|
|
13
|
+
export interface ManifestInput {
|
|
14
|
+
bundleRoot: string;
|
|
15
|
+
bundleVersion: string;
|
|
16
|
+
versions: {
|
|
17
|
+
core: string;
|
|
18
|
+
live: string;
|
|
19
|
+
interface: string;
|
|
20
|
+
supervisor: string;
|
|
21
|
+
};
|
|
22
|
+
ffmpeg: string;
|
|
23
|
+
ffprobe: string;
|
|
24
|
+
builtAt: string;
|
|
25
|
+
unverified: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* AR: أدنى إصدار واجهة يقرأ هذه الحزمة (٠٢٦). يكتبه الباني ويقرؤه المُثبِّت قبل التنزيل.
|
|
28
|
+
* EN: The lowest CLI version that reads this bundle (026). The builder writes it; the installer
|
|
29
|
+
* reads it before downloading.
|
|
30
|
+
*/
|
|
31
|
+
minCliVersion: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function writeManifest(input: ManifestInput): BundleManifest;
|
|
34
|
+
export declare function readManifest(bundleRoot: string): BundleManifest | undefined;
|
|
35
|
+
/** حجم شجرة، للتقرير. */
|
|
36
|
+
export declare function treeBytes(root: string): number;
|
|
37
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/packaging/manifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAiB5E;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CA0B7E;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C;AAOD,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAChF,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CAoClE;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAS3E;AAED,yBAAyB;AACzB,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa9C"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { BUNDLE_DIRS, MANIFEST_FILE } from "./layout.js";
|
|
5
|
+
// AR: بصمات المكوّنات وبيان الحزمة.
|
|
6
|
+
//
|
|
7
|
+
// **نطاق البصمة معلَن ولا يُبالَغ فيه:** تكشف التلف وتلف النقل والعبث العابر، ولا تثبت الأصالة.
|
|
8
|
+
// ما دام signature فارغًا — وهو كذلك حتى تصل ميزة التحديثات — فمن يعدّل ملفًا يعدّل بصمته
|
|
9
|
+
// المسجَّلة بجواره. لذلك يُكتب الحقل null صراحةً لا يُحذَف: الحقل الغائب يُقرأ «لم يُنفَّذ»،
|
|
10
|
+
// وnull يُقرأ «لا توقيع، ونحن نعلم».
|
|
11
|
+
// EN: Component fingerprints and the bundle manifest.
|
|
12
|
+
//
|
|
13
|
+
// **The fingerprint's scope is declared and not overstated:** it detects damage, transfer
|
|
14
|
+
// corruption and casual tampering, and does not prove authenticity. While `signature` is null —
|
|
15
|
+
// and it is, until the update feature lands — whoever edits a file can edit the fingerprint
|
|
16
|
+
// recorded beside it. Hence the field is written as an explicit null rather than omitted: an
|
|
17
|
+
// absent field reads "not implemented", a null reads "there is no signature, and we know it".
|
|
18
|
+
/**
|
|
19
|
+
* بصمة مجلد: اسم كل ملف ومحتواه، بترتيب مستقرّ.
|
|
20
|
+
*
|
|
21
|
+
* الترتيب مقصود: readdirSync لا يضمن ترتيبًا عبر أنظمة الملفات، فبصمة غير مرتّبة تختلف بين آلتين
|
|
22
|
+
* لنفس المحتوى — وتصير عديمة المعنى ككشفٍ للتغيير.
|
|
23
|
+
*/
|
|
24
|
+
export function hashDirectory(root) {
|
|
25
|
+
const hash = createHash("sha256");
|
|
26
|
+
let files = 0;
|
|
27
|
+
const walk = (dir, prefix) => {
|
|
28
|
+
const entries = readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
29
|
+
for (const entry of entries) {
|
|
30
|
+
const full = join(dir, entry.name);
|
|
31
|
+
const relative = prefix ? `${prefix}/${entry.name}` : entry.name;
|
|
32
|
+
if (entry.isDirectory()) {
|
|
33
|
+
walk(full, relative);
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
if (!entry.isFile())
|
|
37
|
+
continue;
|
|
38
|
+
// المسار النسبي جزء من البصمة: نقل ملف بلا تغيير محتواه تغييرٌ يجب أن يُكشَف.
|
|
39
|
+
hash.update(relative);
|
|
40
|
+
hash.update(readFileSync(full));
|
|
41
|
+
files += 1;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
if (existsSync(root))
|
|
45
|
+
walk(root, "");
|
|
46
|
+
return { sha256: hash.digest("hex"), files };
|
|
47
|
+
}
|
|
48
|
+
export function hashFile(path) {
|
|
49
|
+
return createHash("sha256").update(readFileSync(path)).digest("hex");
|
|
50
|
+
}
|
|
51
|
+
function component(root, version) {
|
|
52
|
+
const { sha256, files } = hashDirectory(root);
|
|
53
|
+
return { version, sha256, files };
|
|
54
|
+
}
|
|
55
|
+
export function writeManifest(input) {
|
|
56
|
+
const { bundleRoot } = input;
|
|
57
|
+
const runtimeDir = join(bundleRoot, BUNDLE_DIRS.runtime);
|
|
58
|
+
const runtimeHash = hashDirectory(runtimeDir).sha256;
|
|
59
|
+
const manifest = {
|
|
60
|
+
bundle: {
|
|
61
|
+
version: input.bundleVersion,
|
|
62
|
+
builtAt: input.builtAt,
|
|
63
|
+
platform: "win32-x64",
|
|
64
|
+
nodeVersion: process.version.replace(/^v/, ""),
|
|
65
|
+
minCliVersion: input.minCliVersion,
|
|
66
|
+
...(input.unverified ? { unverified: true } : {}),
|
|
67
|
+
},
|
|
68
|
+
components: {
|
|
69
|
+
core: component(join(bundleRoot, BUNDLE_DIRS.core), input.versions.core),
|
|
70
|
+
live: component(join(bundleRoot, BUNDLE_DIRS.live), input.versions.live),
|
|
71
|
+
interface: component(join(bundleRoot, BUNDLE_DIRS.interfaceClient), input.versions.interface),
|
|
72
|
+
// AR: المُشرِف المشحون مكوّن كامل، كما كانت الواجهة منذ ٠١٨ وللسبب نفسه: بصمته تكشف تلفه،
|
|
73
|
+
// وإصداره هو ما تقارنه خدمة التحديث. وما تغيّر في ٠٢٦ هو **ما يُشحن** لا كيف يُسجَّل.
|
|
74
|
+
// EN: The shipped supervisor is a full component, as the CLI was from 018 and for the same
|
|
75
|
+
// reason: its digest catches corruption and its version is what the update service
|
|
76
|
+
// compares. What 026 changed is **what ships**, not how it is recorded.
|
|
77
|
+
supervisor: component(join(bundleRoot, BUNDLE_DIRS.supervisor), input.versions.supervisor),
|
|
78
|
+
runtime: { ffmpeg: input.ffmpeg, ffprobe: input.ffprobe, sha256: runtimeHash },
|
|
79
|
+
},
|
|
80
|
+
// صراحةً null. انظر رأس الملف.
|
|
81
|
+
signature: null,
|
|
82
|
+
};
|
|
83
|
+
const path = join(bundleRoot, MANIFEST_FILE);
|
|
84
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
85
|
+
writeFileSync(path, `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
|
|
86
|
+
return manifest;
|
|
87
|
+
}
|
|
88
|
+
export function readManifest(bundleRoot) {
|
|
89
|
+
const path = join(bundleRoot, MANIFEST_FILE);
|
|
90
|
+
if (!existsSync(path))
|
|
91
|
+
return undefined;
|
|
92
|
+
try {
|
|
93
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** حجم شجرة، للتقرير. */
|
|
100
|
+
export function treeBytes(root) {
|
|
101
|
+
let bytes = 0;
|
|
102
|
+
const walk = (dir) => {
|
|
103
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
104
|
+
const full = join(dir, entry.name);
|
|
105
|
+
if (entry.isDirectory())
|
|
106
|
+
walk(full);
|
|
107
|
+
else if (entry.isFile())
|
|
108
|
+
bytes += statSync(full).size;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
if (existsSync(root))
|
|
112
|
+
walk(root);
|
|
113
|
+
return bytes;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/packaging/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEzD,oCAAoC;AACpC,EAAE;AACF,oGAAoG;AACpG,gGAAgG;AAChG,mGAAmG;AACnG,2CAA2C;AAC3C,sDAAsD;AACtD,EAAE;AACF,8FAA8F;AAC9F,oGAAoG;AACpG,gGAAgG;AAChG,iGAAiG;AACjG,kGAAkG;AAElG;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,MAAc,EAAQ,EAAE;QACjD,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAEvG,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,IAAI,GAAG,IAAI,CA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;QAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AR: شيمة المُشرِف بعد التثبيت، في bin\ (٠٢٦).
|
|
3
|
+
*
|
|
4
|
+
* **كانت هذه شيمة الأمر fantastic للفنّي، وصارت شيمة المُشرِف للآلة.** الفنّي يكتب
|
|
5
|
+
* fantastic فيصل إلى الحزمة العالمية المثبَّتة بـnpm؛ أمّا هذا الملفّ فمُناديه واحدٌ لا
|
|
6
|
+
* ثانيَ له: مهمّة الإقلاع في جدولة ويندوز.
|
|
7
|
+
*
|
|
8
|
+
* **ولماذا شيمةٌ أصلًا بدل أن تنادي المهمّةُ node.exe مباشرةً؟** لأن الشيمة تحسب مسار زمن
|
|
9
|
+
* التشغيل من موقعها هي، فينتقل التثبيت مع --root D:\... بلا أن تُعاد كتابة المهمّة. ولأن
|
|
10
|
+
* .cmd تعمل تحت سياسة ويندوز الافتراضية Restricted التي تمنع .ps1 (القرار D-018-03).
|
|
11
|
+
*
|
|
12
|
+
* ولا تُمرَّر وسائط: المُشرِف لا يقبل شيئًا، ومهمّةٌ تمرّر watch إلى ملفٍّ لا يقرأ الوسائط
|
|
13
|
+
* كانت ستُخفي خطأً يومًا.
|
|
14
|
+
* EN: The supervisor's shim after installation, in `bin\` (026).
|
|
15
|
+
*
|
|
16
|
+
* **This used to be the technician's `fantastic` shim; it is now the machine's supervisor
|
|
17
|
+
* shim.** The technician types `fantastic` and reaches the global package installed with npm;
|
|
18
|
+
* this file has exactly one caller: the Windows scheduled boot task.
|
|
19
|
+
*
|
|
20
|
+
* **Why a shim at all, rather than the task calling `node.exe` directly?** Because the shim
|
|
21
|
+
* computes the runtime's path from its own location, so an installation moved with
|
|
22
|
+
* `--root D:\...` travels without the task being rewritten. And because `.cmd` runs under
|
|
23
|
+
* Windows' default `Restricted` policy, which blocks `.ps1` (decision D-018-03).
|
|
24
|
+
*
|
|
25
|
+
* No arguments are forwarded: the supervisor accepts none, and a task passing `watch` to a file
|
|
26
|
+
* that ignores arguments would have hidden a mistake one day.
|
|
27
|
+
*/
|
|
28
|
+
export declare function commandShimContent(): string;
|
|
29
|
+
/** يكتب شيمة المُشرِف في bin\ أثناء التثبيت. */
|
|
30
|
+
export declare function writeCommandShim(root: string): string;
|
|
31
|
+
//# sourceMappingURL=shims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../../src/packaging/shims.ts"],"names":[],"mappings":"AAoIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAK3C;AAED,kDAAkD;AAClD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOrD"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { BUNDLE_DIRS, SUPERVISOR_ENTRY, RUNTIME_FILES, SHIM_FILES } from "./layout.js";
|
|
4
|
+
// AR: الشيمتان اللتان تصلان زمن تشغيل الحزمة بواجهتها (٠١٨).
|
|
5
|
+
//
|
|
6
|
+
// **الفكرة كلّها سطر واحد**: نداءٌ بمسار مطلق محسوب من موقع الملفّ نفسه. لا كلمة node مجرّدة،
|
|
7
|
+
// ولا استشارة لـPATH، ولا npm. وبهذا تتعايش نسخة Node الخاصّة بالعميل مع نسختنا على الآلة
|
|
8
|
+
// نفسها بلا أن تعرف إحداهما بالأخرى — وهي فرضية الميزة كلّها (القاعدة I).
|
|
9
|
+
//
|
|
10
|
+
// ولماذا .cmd: سياسة ويندوز الافتراضية Restricted تمنع .ps1، وقد أوقفت التثبيت الأول ميدانيًّا.
|
|
11
|
+
// رفع السياسة تغييرٌ في أمان جهاز العميل، ولا يجوز أن يكون ثمن تثبيت منتجنا (D-018-03).
|
|
12
|
+
// EN: The two shims that connect the bundle's runtime to its CLI (018).
|
|
13
|
+
//
|
|
14
|
+
// **The whole idea is one line**: a call by an absolute path computed from the file's own
|
|
15
|
+
// location. No bare `node`, no consulting `PATH`, no npm. That is how the customer's own Node and
|
|
16
|
+
// ours live on the same machine without either knowing about the other — the premise of the whole
|
|
17
|
+
// feature (rule I).
|
|
18
|
+
//
|
|
19
|
+
// And why `.cmd`: Windows' default `Restricted` policy blocks `.ps1`, and it stopped the very
|
|
20
|
+
// first field installation. Raising that policy is a change to the customer's machine security,
|
|
21
|
+
// and must not be the price of installing our product (D-018-03).
|
|
22
|
+
/**
|
|
23
|
+
* AR: %~dp0 هو مجلد ملفّ الدفعة نفسه، **منتهيًا بشرطة مائلة خلفية**. وتلك الشرطة هي الفخّ: كتابة
|
|
24
|
+
* "%~dp0" تُنتج "C:\Fantastic\" فتُقرأ الشرطة هروبًا لعلامة الاقتباس عند من يفكّ سطر الأوامر،
|
|
25
|
+
* فيبتلع الوسيط التالي. إلحاق نقطة يُنهي المسار بمُكوِّن حقيقي — "C:\Fantastic\." — فيسلم
|
|
26
|
+
* الاقتباس ويبقى المسار صحيحًا. الدرس نفسه المسجَّل في shell/parse-line.ts: الشرطة المائلة
|
|
27
|
+
* الخلفية فاصل مسار على ويندوز لا محرف هروب، ومَن يعاملها هروبًا يُفتّت المسارات.
|
|
28
|
+
* EN: `%~dp0` is the batch file's own directory, **ending in a backslash**. That backslash is the
|
|
29
|
+
* trap: writing `"%~dp0"` yields `"C:\Fantastic\"`, where the backslash reads as an escape for the
|
|
30
|
+
* closing quote to a command-line parser, which then swallows the next argument. Appending a dot
|
|
31
|
+
* ends the path on a real component — `"C:\Fantastic\."` — so the quote survives and the path
|
|
32
|
+
* still resolves. The same lesson recorded in `shell/parse-line.ts`: on Windows a backslash is a
|
|
33
|
+
* path separator, not an escape, and treating it as one shatters paths.
|
|
34
|
+
*/
|
|
35
|
+
const SELF_DIR = "%~dp0";
|
|
36
|
+
/**
|
|
37
|
+
* AR: %* يمرّر بقيّة سطر الأوامر **كما كُتب حرفيًّا**، بعلامات اقتباسه. فمسار فيه مسافة
|
|
38
|
+
* (--root "D:\My Media") يعبر الشيمة سليمًا بلا أي إعادة ترميز من طرفنا — وأي محاولة لتفكيك
|
|
39
|
+
* الوسائط وإعادة تجميعها هنا كانت ستكسر ما يعمل أصلًا.
|
|
40
|
+
* EN: `%*` forwards the rest of the command line **exactly as typed**, quotes included. So a path with
|
|
41
|
+
* a space (`--root "D:\My Media"`) crosses the shim intact with no re-encoding on our part — and
|
|
42
|
+
* any attempt to split and reassemble the arguments here would break what already works.
|
|
43
|
+
*/
|
|
44
|
+
const FORWARD_ARGS = "%*";
|
|
45
|
+
/**
|
|
46
|
+
* AR: رمز الخروج جزء من عقد الواجهة: سكربتات البوّابة تقرأه (EXIT_CODE_HELP في base-command.ts).
|
|
47
|
+
* ملفّ الدفعة يورّث رمز آخر أمر فيه ضمنًا، لكن التصريح به يجعل العقد صريحًا لا معتمِدًا على سلوك.
|
|
48
|
+
* EN: The exit code is part of the CLI's contract: gate scripts read it (`EXIT_CODE_HELP` in
|
|
49
|
+
* `base-command.ts`). A batch file inherits its last command's code implicitly, but stating it
|
|
50
|
+
* makes the contract explicit rather than behavioural.
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* AR: **ملفّ .cmd يُنقَر نقرًا مزدوجًا يفتح نافذة تُغلق لحظة انتهائه.** فيرى الفنّي شاشة تومض
|
|
54
|
+
* وتختفي، ويذهب معها كل ما يحتاجه: عناوين الدخول، وكلمة مرور المالك الأولى، وأيّ تحذير — ومنه
|
|
55
|
+
* تحذير تعذّر الكتابة في PATH، الذي يفسّر بالضبط لماذا لا يعرف ويندوز الأمر fantastic بعدها.
|
|
56
|
+
* رُصد على جهاز عميل: التثبيت ينجح والفنّي لا يرى منه شيئًا، ثم يكتب fantastic فيُقال له
|
|
57
|
+
* «غير معرَّف»، ولا شيء على الشاشة يربط الأمرين.
|
|
58
|
+
*
|
|
59
|
+
* **والعلامة هي --yes لا شكل سطر الاستدعاء.** جُرّب أوّلًا فحص %cmdcmdline% بحثًا عن cmd /c،
|
|
60
|
+
* وسقط لسببين: يبدأ بعلامة اقتباس حين يُستدعى cmd.exe بمساره الكامل فيكسر جملة if نحويًّا،
|
|
61
|
+
* وcmd /c نفسه هو ما تستعمله السكربتات أيضًا فلا يميّز شيئًا. أمّا --yes فمعناه المعلن «لا
|
|
62
|
+
* تسألني» — ومن قالها لا يريد أن يُنتظَر منه ضغط مفتاح. والقراءة بحلقة for مع %%~A تنزع
|
|
63
|
+
* الاقتباس، فيعبر مسارٌ فيه مسافة سليمًا.
|
|
64
|
+
* EN: **A double-clicked `.cmd` opens a window that closes the instant it finishes.** The technician
|
|
65
|
+
* sees a screen flash and vanish, taking with it everything they needed: the sign-in URLs, the
|
|
66
|
+
* first owner password, and any warning — including the one about PATH not being writable, which
|
|
67
|
+
* is precisely what explains why Windows does not know the `fantastic` command afterwards.
|
|
68
|
+
* Observed at a customer site: the install succeeds, the technician sees none of it, then types
|
|
69
|
+
* `fantastic` and is told it is not recognised, with nothing on screen connecting the two.
|
|
70
|
+
*
|
|
71
|
+
* **The signal is `--yes`, not the shape of the invocation.** Testing `%cmdcmdline%` for `cmd /c`
|
|
72
|
+
* was tried first and failed twice over: it begins with a quote when `cmd.exe` is invoked by its
|
|
73
|
+
* full path, which breaks the `if` statement syntactically, and `cmd /c` is also what scripts use,
|
|
74
|
+
* so it distinguishes nothing. `--yes`, by contrast, means exactly "do not ask me" — and whoever
|
|
75
|
+
* said that does not want to be waited on for a keypress. Reading it with a `for` loop and `%%~A`
|
|
76
|
+
* strips the quoting, so a path with a space crosses intact.
|
|
77
|
+
*/
|
|
78
|
+
const HOLD_WINDOW_OPEN = [
|
|
79
|
+
`set FANTASTIC_UNATTENDED=`,
|
|
80
|
+
`for %%A in (${FORWARD_ARGS}) do if /i "%%~A"=="--yes" set FANTASTIC_UNATTENDED=1`,
|
|
81
|
+
`if not defined FANTASTIC_UNATTENDED (`,
|
|
82
|
+
` echo.`,
|
|
83
|
+
` echo Press any key to close this window.`,
|
|
84
|
+
` pause >nul`,
|
|
85
|
+
`)`,
|
|
86
|
+
];
|
|
87
|
+
function shim(lines, options = {}) {
|
|
88
|
+
const body = [
|
|
89
|
+
"@echo off",
|
|
90
|
+
...UTF8_PREAMBLE,
|
|
91
|
+
...lines,
|
|
92
|
+
...(options.holdWindowOpen ? ["set FANTASTIC_EXIT=%ERRORLEVEL%", ...HOLD_WINDOW_OPEN, "exit /b %FANTASTIC_EXIT%"] : ["exit /b %ERRORLEVEL%"]),
|
|
93
|
+
];
|
|
94
|
+
return `${body.join("\r\n")}\r\n`;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* AR: **تُفتَح الطرفية على UTF-8 قبل أن يُكتب فيها حرف.**
|
|
98
|
+
*
|
|
99
|
+
* «موجّه الأوامر» التقليدي يعمل بصفحة ترميز قديمة (437 أو 720 على ويندوز عربيّ)، فكل محرف
|
|
100
|
+
* خارج ASCII يخرج ? — والرسائل عندنا عربية، فتصير الشاشة صفوفًا من علامات الاستفهام. رُصد على
|
|
101
|
+
* جهاز عميل: التثبيت يعمل تمامًا والفنّي يقرأ ما يبدو خرابًا.
|
|
102
|
+
* وchcp محصور بهذه النافذة وحدها ولا يمسّ إعداد الجهاز، ومخرَجه يُبتلع فلا يزاحم أوّل سطر.
|
|
103
|
+
*
|
|
104
|
+
* **ولا يُعلَن أن الطرفية صارت قادرة على الرسم.** كانت هذه المقدّمة تضبط FANTASTIC_UTF8 فتقول
|
|
105
|
+
* للواجهة «استعملي رموزك»، وكان ذلك خطأً: صفحة الترميز نصف المسألة، ونصفها الآخر **الخطّ**.
|
|
106
|
+
* «موجّه الأوامر» التقليدي يعمل بخطّ نقطيّ لا يحوي ━ ولا ✔ أصلًا، فتبقى علامات استفهام مهما
|
|
107
|
+
* كان الترميز. قِيس على جهاز عميل: chcp 65001 نُفِّذ، والشاشة ظلّت صفوفًا من ?.
|
|
108
|
+
* ولا سبيل إلى سؤال الطرفية عن خطّها، فيبقى الحكم لما تُعلنه عن نفسها (theme.ts) — والافتراض
|
|
109
|
+
* عند الشكّ هو ASCII.
|
|
110
|
+
* EN: **The console is switched to UTF-8 before a character is written to it.**
|
|
111
|
+
*
|
|
112
|
+
* The classic Command Prompt runs on a legacy code page (437, or 720 on an Arabic Windows), so
|
|
113
|
+
* every non-ASCII character comes out as `?`. `chcp` is scoped to this window alone and touches no
|
|
114
|
+
* machine setting, and its output is swallowed so it does not crowd the first line.
|
|
115
|
+
*
|
|
116
|
+
* **But it does not declare the console able to draw.** This preamble used to set `FANTASTIC_UTF8`,
|
|
117
|
+
* telling the CLI "use your own glyphs", and that was wrong: the code page is half the problem and
|
|
118
|
+
* the other half is **the font**. The classic Command Prompt uses a raster font that contains
|
|
119
|
+
* neither `━` nor `✔`, so question marks remain whatever the encoding. Measured at a customer
|
|
120
|
+
* site: `chcp 65001` ran, and the screen stayed rows of `?`.
|
|
121
|
+
* A terminal cannot be asked about its font, so the judgement rests on what it announces about
|
|
122
|
+
* itself (theme.ts) — and when in doubt the assumption is ASCII.
|
|
123
|
+
*/
|
|
124
|
+
const UTF8_PREAMBLE = ["chcp 65001 >nul"];
|
|
125
|
+
/**
|
|
126
|
+
* AR: شيمة المُشرِف بعد التثبيت، في bin\ (٠٢٦).
|
|
127
|
+
*
|
|
128
|
+
* **كانت هذه شيمة الأمر fantastic للفنّي، وصارت شيمة المُشرِف للآلة.** الفنّي يكتب
|
|
129
|
+
* fantastic فيصل إلى الحزمة العالمية المثبَّتة بـnpm؛ أمّا هذا الملفّ فمُناديه واحدٌ لا
|
|
130
|
+
* ثانيَ له: مهمّة الإقلاع في جدولة ويندوز.
|
|
131
|
+
*
|
|
132
|
+
* **ولماذا شيمةٌ أصلًا بدل أن تنادي المهمّةُ node.exe مباشرةً؟** لأن الشيمة تحسب مسار زمن
|
|
133
|
+
* التشغيل من موقعها هي، فينتقل التثبيت مع --root D:\... بلا أن تُعاد كتابة المهمّة. ولأن
|
|
134
|
+
* .cmd تعمل تحت سياسة ويندوز الافتراضية Restricted التي تمنع .ps1 (القرار D-018-03).
|
|
135
|
+
*
|
|
136
|
+
* ولا تُمرَّر وسائط: المُشرِف لا يقبل شيئًا، ومهمّةٌ تمرّر watch إلى ملفٍّ لا يقرأ الوسائط
|
|
137
|
+
* كانت ستُخفي خطأً يومًا.
|
|
138
|
+
* EN: The supervisor's shim after installation, in `bin\` (026).
|
|
139
|
+
*
|
|
140
|
+
* **This used to be the technician's `fantastic` shim; it is now the machine's supervisor
|
|
141
|
+
* shim.** The technician types `fantastic` and reaches the global package installed with npm;
|
|
142
|
+
* this file has exactly one caller: the Windows scheduled boot task.
|
|
143
|
+
*
|
|
144
|
+
* **Why a shim at all, rather than the task calling `node.exe` directly?** Because the shim
|
|
145
|
+
* computes the runtime's path from its own location, so an installation moved with
|
|
146
|
+
* `--root D:\...` travels without the task being rewritten. And because `.cmd` runs under
|
|
147
|
+
* Windows' default `Restricted` policy, which blocks `.ps1` (decision D-018-03).
|
|
148
|
+
*
|
|
149
|
+
* No arguments are forwarded: the supervisor accepts none, and a task passing `watch` to a file
|
|
150
|
+
* that ignores arguments would have hidden a mistake one day.
|
|
151
|
+
*/
|
|
152
|
+
export function commandShimContent() {
|
|
153
|
+
const node = `"${SELF_DIR}..\\${join(BUNDLE_DIRS.runtime, RUNTIME_FILES.node)}"`;
|
|
154
|
+
const entry = `"${SELF_DIR}..\\${SUPERVISOR_ENTRY}"`;
|
|
155
|
+
return shim([`${node} ${entry}`]);
|
|
156
|
+
}
|
|
157
|
+
/** يكتب شيمة المُشرِف في bin\ أثناء التثبيت. */
|
|
158
|
+
export function writeCommandShim(root) {
|
|
159
|
+
const dir = join(root, BUNDLE_DIRS.bin);
|
|
160
|
+
mkdirSync(dir, { recursive: true });
|
|
161
|
+
const path = join(dir, SHIM_FILES.command);
|
|
162
|
+
writeFileSync(path, commandShimContent(), "utf8");
|
|
163
|
+
return path;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=shims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shims.js","sourceRoot":"","sources":["../../src/packaging/shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEvF,6DAA6D;AAC7D,EAAE;AACF,oGAAoG;AACpG,gGAAgG;AAChG,8EAA8E;AAC9E,EAAE;AACF,0GAA0G;AAC1G,4FAA4F;AAC5F,wEAAwE;AACxE,EAAE;AACF,8FAA8F;AAC9F,sGAAsG;AACtG,sGAAsG;AACtG,wBAAwB;AACxB,EAAE;AACF,kGAAkG;AAClG,oGAAoG;AACpG,sEAAsE;AAEtE;;;;;;;;;;;;GAYG;AACH,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEzB;;;;;;;GAOG;AACH,MAAM,YAAY,GAAG,IAAI,CAAC;AAE1B;;;;;;GAMG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,gBAAgB,GAAG;IACvB,2BAA2B;IAC3B,eAAe,YAAY,uDAAuD;IAClF,uCAAuC;IACvC,SAAS;IACT,4CAA4C;IAC5C,cAAc;IACd,GAAG;CACJ,CAAC;AAEF,SAAS,IAAI,CAAC,KAAe,EAAE,UAAwC,EAAE;IACvE,MAAM,IAAI,GAAG;QACX,WAAW;QACX,GAAG,aAAa;QAChB,GAAG,KAAK;QACR,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,iCAAiC,EAAE,GAAG,gBAAgB,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC;KAC9I,CAAC;IAEF,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;AACpC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,aAAa,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,kBAAkB;IAChC,MAAM,IAAI,GAAG,IAAI,QAAQ,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC;IACjF,MAAM,KAAK,GAAG,IAAI,QAAQ,OAAO,gBAAgB,GAAG,CAAC;IAErD,OAAO,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IACxC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3C,aAAa,CAAC,IAAI,EAAE,kBAAkB,EAAE,EAAE,MAAM,CAAC,CAAC;IAClD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const INTERNAL_PATHS: {
|
|
2
|
+
/** اللقطة الغنيّة: نفس HealthService الذي تقرأ منه /api/health، بحقولها الاختيارية مملوءة. */
|
|
3
|
+
readonly HEALTH: "/internal/health";
|
|
4
|
+
/** لقطة قاعدة متّسقة عبر VACUUM INTO. تُنفَّذ في النواة لأن الـ CLI ممنوع من فتح القاعدة. */
|
|
5
|
+
readonly BACKUP_SNAPSHOT: "/internal/backup/snapshot";
|
|
6
|
+
readonly SECTIONS: "/internal/sections";
|
|
7
|
+
readonly DRIVES: "/internal/drives";
|
|
8
|
+
readonly SCAN_RESULTS: "/internal/scan/results";
|
|
9
|
+
readonly SCAN_DISCONNECTED: "/internal/scan/disconnected-drive";
|
|
10
|
+
readonly SCAN_START: "/internal/scan";
|
|
11
|
+
readonly SCAN_RELINK: "/internal/scan/relink";
|
|
12
|
+
readonly TRANSCODE_JOBS: "/internal/transcode/jobs";
|
|
13
|
+
readonly TRANSCODE_ENCODERS: "/internal/transcode/encoders";
|
|
14
|
+
readonly TRANSCODE_CANCEL: (id: number) => string;
|
|
15
|
+
readonly STREAM_SESSIONS: "/internal/streams/sessions";
|
|
16
|
+
readonly LIVE_CHANNELS: "/internal/live/channels";
|
|
17
|
+
/**
|
|
18
|
+
* حالة خادم الـ FTP وقاعدة جدار الحماية معًا (٠٢٠/FR-027). نصفان لا يكفي أحدهما: «يعمل» وحدها
|
|
19
|
+
* تكذب حين يحجبه الجدار، و«القاعدة غائبة» وحدها إنذار كاذب حين يكون الـ FTP مطفأً أصلًا.
|
|
20
|
+
*/
|
|
21
|
+
readonly REMOTE_FTP: "/internal/remote/ftp";
|
|
22
|
+
readonly LICENSE_STATUS: "/internal/license/status";
|
|
23
|
+
readonly LICENSE_ACTIVATE: "/internal/license/activate";
|
|
24
|
+
readonly LICENSE_DEACTIVATE: "/internal/license/deactivate";
|
|
25
|
+
/**
|
|
26
|
+
* AR: التحديثات (P5.4). **نفس قاعدة الترخيص حرفيًّا:** الـ CLI يسأل النواة، والنواة تسأل
|
|
27
|
+
* المركز — لأن هوية الجهاز وعنوان المركز والمفتاح العام تعيش هناك وحدها.
|
|
28
|
+
* EN: Updates (P5.4). **Exactly the licensing rule:** the CLI asks the core and the core asks
|
|
29
|
+
* the centre — because the device identity, the centre's address and the public key live
|
|
30
|
+
* there and nowhere else.
|
|
31
|
+
*/
|
|
32
|
+
readonly UPDATES_CHECK: "/internal/updates/check";
|
|
33
|
+
};
|
|
34
|
+
export type InternalPath = (typeof INTERNAL_PATHS)[keyof typeof INTERNAL_PATHS];
|
|
35
|
+
//# sourceMappingURL=internal-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-paths.d.ts","sourceRoot":"","sources":["../../src/probes/internal-paths.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,cAAc;IACzB,kGAAkG;;IAElG,+FAA+F;;;;;;;;;;oCAcxE,MAAM;;;IAM7B;;;OAGG;;;;;IAaH;;;;;;OAMG;;CAEK,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// AR: سِجل مسارات السطح الداخلي للنواة. **المكان الوحيد الذي يظهر فيه نصّ مسار داخلي** — لا في أمر
|
|
2
|
+
// ولا في عارضة، مطابقةً للمبدأ الثالث كما يطبّقه api-paths.ts على الواجهة.
|
|
3
|
+
//
|
|
4
|
+
// ولماذا سِجلّ مستقلّ بدل الإضافة إلى apps/client-portal/src/lib/api-paths.ts؟ لأن الواجهة
|
|
5
|
+
// **لا تنادي هذه المسارات ولا تستطيع**: السطح محميّ باللوب-باك، فشحن أسمائه داخل حزمة المتصفّح
|
|
6
|
+
// يُعلن للضيوف عن سطحٍ لا يبلغونه — ضجيج بلا فائدة وإشارة لمن يفتّش.
|
|
7
|
+
//
|
|
8
|
+
// EN: The registry of the core's internal-surface paths. **The only place an internal path string
|
|
9
|
+
// appears** — never in a command or a renderer, mirroring how api-paths.ts applies principle III
|
|
10
|
+
// on the portal side.
|
|
11
|
+
//
|
|
12
|
+
// Why a separate registry rather than adding to the portal's api-paths.ts? Because the portal
|
|
13
|
+
// **does not and cannot call these**: the surface is loopback-guarded, so shipping its route
|
|
14
|
+
// names inside the browser bundle advertises to guests a surface they can never reach — noise
|
|
15
|
+
// with no benefit, and a signpost for anyone probing.
|
|
16
|
+
export const INTERNAL_PATHS = {
|
|
17
|
+
/** اللقطة الغنيّة: نفس HealthService الذي تقرأ منه /api/health، بحقولها الاختيارية مملوءة. */
|
|
18
|
+
HEALTH: "/internal/health",
|
|
19
|
+
/** لقطة قاعدة متّسقة عبر VACUUM INTO. تُنفَّذ في النواة لأن الـ CLI ممنوع من فتح القاعدة. */
|
|
20
|
+
BACKUP_SNAPSHOT: "/internal/backup/snapshot",
|
|
21
|
+
// المكتبة
|
|
22
|
+
SECTIONS: "/internal/sections",
|
|
23
|
+
DRIVES: "/internal/drives",
|
|
24
|
+
SCAN_RESULTS: "/internal/scan/results",
|
|
25
|
+
SCAN_DISCONNECTED: "/internal/scan/disconnected-drive",
|
|
26
|
+
SCAN_START: "/internal/scan",
|
|
27
|
+
SCAN_RELINK: "/internal/scan/relink",
|
|
28
|
+
// البثّ والتحويل
|
|
29
|
+
TRANSCODE_JOBS: "/internal/transcode/jobs",
|
|
30
|
+
TRANSCODE_ENCODERS: "/internal/transcode/encoders",
|
|
31
|
+
TRANSCODE_CANCEL: (id) => `/internal/transcode/jobs/${id}/cancel`,
|
|
32
|
+
STREAM_SESSIONS: "/internal/streams/sessions",
|
|
33
|
+
// البث المباشر
|
|
34
|
+
LIVE_CHANNELS: "/internal/live/channels",
|
|
35
|
+
/**
|
|
36
|
+
* حالة خادم الـ FTP وقاعدة جدار الحماية معًا (٠٢٠/FR-027). نصفان لا يكفي أحدهما: «يعمل» وحدها
|
|
37
|
+
* تكذب حين يحجبه الجدار، و«القاعدة غائبة» وحدها إنذار كاذب حين يكون الـ FTP مطفأً أصلًا.
|
|
38
|
+
*/
|
|
39
|
+
REMOTE_FTP: "/internal/remote/ftp",
|
|
40
|
+
// AR: الترخيص (P4.4). الـ CLI **لا ينادي البوّابة المركزية** — ينادي هذه المسارات، والنواة
|
|
41
|
+
// هي التي تنادي المركز بنفس LicenseService الذي تناديه شاشة التفعيل. مسارا تفعيل في
|
|
42
|
+
// مشروع واحد يفترقان أوّل يوم يتغيّر فيه شيء.
|
|
43
|
+
// EN: Licensing (P4.4). The CLI **never calls the central portal** — it calls these, and the
|
|
44
|
+
// core calls the centre through the same `LicenseService` the activation screen uses. Two
|
|
45
|
+
// activation paths in one project diverge the first day anything changes.
|
|
46
|
+
LICENSE_STATUS: "/internal/license/status",
|
|
47
|
+
LICENSE_ACTIVATE: "/internal/license/activate",
|
|
48
|
+
LICENSE_DEACTIVATE: "/internal/license/deactivate",
|
|
49
|
+
/**
|
|
50
|
+
* AR: التحديثات (P5.4). **نفس قاعدة الترخيص حرفيًّا:** الـ CLI يسأل النواة، والنواة تسأل
|
|
51
|
+
* المركز — لأن هوية الجهاز وعنوان المركز والمفتاح العام تعيش هناك وحدها.
|
|
52
|
+
* EN: Updates (P5.4). **Exactly the licensing rule:** the CLI asks the core and the core asks
|
|
53
|
+
* the centre — because the device identity, the centre's address and the public key live
|
|
54
|
+
* there and nowhere else.
|
|
55
|
+
*/
|
|
56
|
+
UPDATES_CHECK: "/internal/updates/check",
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=internal-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-paths.js","sourceRoot":"","sources":["../../src/probes/internal-paths.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,iFAAiF;AACjF,EAAE;AACF,iGAAiG;AACjG,mGAAmG;AACnG,yEAAyE;AACzE,EAAE;AACF,kGAAkG;AAClG,qGAAqG;AACrG,0BAA0B;AAC1B,EAAE;AACF,kGAAkG;AAClG,iGAAiG;AACjG,kGAAkG;AAClG,0DAA0D;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,kGAAkG;IAClG,MAAM,EAAE,kBAAkB;IAC1B,+FAA+F;IAC/F,eAAe,EAAE,2BAA2B;IAE5C,UAAU;IACV,QAAQ,EAAE,oBAAoB;IAC9B,MAAM,EAAE,kBAAkB;IAC1B,YAAY,EAAE,wBAAwB;IACtC,iBAAiB,EAAE,mCAAmC;IACtD,UAAU,EAAE,gBAAgB;IAC5B,WAAW,EAAE,uBAAuB;IAEpC,iBAAiB;IACjB,cAAc,EAAE,0BAA0B;IAC1C,kBAAkB,EAAE,8BAA8B;IAClD,gBAAgB,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS;IACzE,eAAe,EAAE,4BAA4B;IAE7C,eAAe;IACf,aAAa,EAAE,yBAAyB;IAExC;;;OAGG;IACH,UAAU,EAAE,sBAAsB;IAElC,2FAA2F;IAC3F,0FAA0F;IAC1F,kDAAkD;IAClD,6FAA6F;IAC7F,8FAA8F;IAC9F,8EAA8E;IAC9E,cAAc,EAAE,0BAA0B;IAC1C,gBAAgB,EAAE,4BAA4B;IAC9C,kBAAkB,EAAE,8BAA8B;IAElD;;;;;;OAMG;IACH,aAAa,EAAE,yBAAyB;CAChC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ActivationResult, DeviceInfo, HealthSnapshot } from "../contracts/core.js";
|
|
2
|
+
import { type Profile } from "../profiles/types.js";
|
|
3
|
+
export type InternalResult<T> = {
|
|
4
|
+
ok: true;
|
|
5
|
+
data: T;
|
|
6
|
+
} | {
|
|
7
|
+
ok: false;
|
|
8
|
+
/** سبب الفشل للعرض. */
|
|
9
|
+
reason: string;
|
|
10
|
+
/** صحيح حين تعذّر الوصول أصلًا — يميّز «النواة متوقّفة» عن «ردّت بخطأ». */
|
|
11
|
+
unreachable: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* AR: غلاف الخطأ من النواة حين ردّت به. **بلا هذا الحقل كان الفنّي يقرأ «the core
|
|
14
|
+
* responded with status 400» على كودٍ أخطأ في حرف** — رسالةٌ عن بروتوكول HTTP
|
|
15
|
+
* مكان رسالةٍ عربية تقول له بالضبط ما يصحّحه. النواة تكتبها جاهزةً للعرض، وكانت
|
|
16
|
+
* تُرمى هنا.
|
|
17
|
+
* EN: The core's error envelope when it answered with one. **Without this field the
|
|
18
|
+
* technician read "the core responded with status 400" for a mistyped character** — an
|
|
19
|
+
* HTTP-protocol message where an Arabic one telling him exactly what to fix belonged.
|
|
20
|
+
* The core writes it display-ready, and it was being discarded here.
|
|
21
|
+
*/
|
|
22
|
+
error?: {
|
|
23
|
+
code: string;
|
|
24
|
+
message: string;
|
|
25
|
+
details?: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/** اللقطة الغنيّة من /internal/health. الحقول الاختيارية الغائبة تُرسَم شرطةً لا صفرًا. */
|
|
29
|
+
export declare function fetchInternalHealth(profile: Profile, timeoutMs?: number): Promise<InternalResult<HealthSnapshot>>;
|
|
30
|
+
/** قراءة عامة من السطح الداخلي. */
|
|
31
|
+
export declare function getInternal<T>(profile: Profile, path: string, timeoutMs?: number): Promise<InternalResult<T>>;
|
|
32
|
+
/**
|
|
33
|
+
* كتابة على السطح الداخلي. المهلة أطول بكثير من القراءة: VACUUM INTO على قاعدة كبيرة يستغرق
|
|
34
|
+
* ثوانيَ حقيقية، وقطعُه في منتصفه يترك أرشيفًا ناقصًا — وهو بالضبط ما بُني هذا المسار لتفاديه.
|
|
35
|
+
*/
|
|
36
|
+
export declare function postInternal<T>(profile: Profile, path: string, body: unknown, timeoutMs?: number): Promise<InternalResult<T>>;
|
|
37
|
+
/** حالة الرخصة على هذا الجهاز، كما تصفها النواة لشاشة التفعيل حرفًا بحرف. */
|
|
38
|
+
export declare function fetchLicenseStatus(profile: Profile, timeoutMs?: number): Promise<InternalResult<DeviceInfo>>;
|
|
39
|
+
/**
|
|
40
|
+
* AR: يفعّل هذا الجهاز. المهلة **دقيقة كاملة** لا الافتراضيةَ القصيرة: النداء يعبر النواةَ إلى
|
|
41
|
+
* المركز عبر الإنترنت، والنواة تعيد المحاولة ثلاثًا بتباعد أسّي حين لا يجيب. قطعُه بعد
|
|
42
|
+
* ثانيتين ونصف كان يقول «النواة لا تجيب» بينما هي تنتظر ردًّا سيصل.
|
|
43
|
+
* EN: Activates this machine. The timeout is **a full minute** rather than the short default: the
|
|
44
|
+
* call travels through the core to the centre over the internet, and the core retries three
|
|
45
|
+
* times with exponential backoff when there is no answer. Cutting it off after 2.5 seconds
|
|
46
|
+
* reported "the core is not answering" while it was waiting for a reply that would arrive.
|
|
47
|
+
*/
|
|
48
|
+
export declare function activateLicense(profile: Profile, code: string): Promise<InternalResult<ActivationResult>>;
|
|
49
|
+
/** يوقف تفعيل هذا الجهاز ويحرّر مقعده في المركز. يُنادى من uninstall قبل حذف أي ملف. */
|
|
50
|
+
export declare function deactivateLicense(profile: Profile): Promise<InternalResult<{
|
|
51
|
+
ok: boolean;
|
|
52
|
+
message: string;
|
|
53
|
+
}>>;
|
|
54
|
+
//# sourceMappingURL=internal.client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.client.d.ts","sourceRoot":"","sources":["../../src/probes/internal.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAA8B,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAsBhF,MAAM,MAAM,cAAc,CAAC,CAAC,IACxB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GACrB;IACE,EAAE,EAAE,KAAK,CAAC;IACV,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,WAAW,EAAE,OAAO,CAAC;IACrB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;CAC9E,CAAC;AA8EN,6FAA6F;AAC7F,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,SAAS,SAAqB,GAC7B,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,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