@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,154 @@
|
|
|
1
|
+
import type { BundleManifest } from "../contracts/core.js";
|
|
2
|
+
export interface InstallCheck {
|
|
3
|
+
name: string;
|
|
4
|
+
ok: boolean;
|
|
5
|
+
detail: string;
|
|
6
|
+
remedy?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface InstallSource {
|
|
9
|
+
/** مجلد حزمة مفكوك، أو أرشيف .zip. */
|
|
10
|
+
path: string;
|
|
11
|
+
isArchive: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function classifySource(path: string): InstallSource;
|
|
14
|
+
/** يقرأ البيان من أرشيف بلا فكّه — نحتاجه للتحقّق من المنصّة قبل أي كتابة. */
|
|
15
|
+
export declare function manifestFromArchive(file: string): Promise<BundleManifest | undefined>;
|
|
16
|
+
/**
|
|
17
|
+
* AR: منفذ تحتاجه خدمة، وهل هو حرّ. **قائمة لا رقمًا واحدًا**: الجهاز خدمتان، وفحص منفذ النواة وحده
|
|
18
|
+
* كان يمرّر تثبيتًا يفشل بعد الهجرات عند تشغيل خدمة البثّ — أي بعد الكتابة، فيتراجع كل شيء
|
|
19
|
+
* برسالة «الخدمات لم تبدأ» لا تسمّي المنفذ المتعارض. الفحص قبل الكتابة يجب أن يشمل ما يُحتاج
|
|
20
|
+
* فعلًا، لا أشهره.
|
|
21
|
+
* EN: A port a service needs, and whether it is free. **A list, not a single number**: the appliance
|
|
22
|
+
* has two services, and checking the core's port alone let an install proceed that then failed
|
|
23
|
+
* after the migrations, when the live service started — that is, after writing, so everything
|
|
24
|
+
* rolled back under a "the services did not start" message that named no port. A pre-write check
|
|
25
|
+
* must cover what is actually needed, not what is best known.
|
|
26
|
+
*/
|
|
27
|
+
export interface RequiredPort {
|
|
28
|
+
label: string;
|
|
29
|
+
port: number;
|
|
30
|
+
free: boolean;
|
|
31
|
+
/** العَلَم الذي يغيّر هذا المنفذ. يُذكَر في العلاج فيعرف القارئ ماذا يكتب لا أن «يحرّر منفذًا». */
|
|
32
|
+
flag: string;
|
|
33
|
+
}
|
|
34
|
+
export interface PreInstallInput {
|
|
35
|
+
source: InstallSource;
|
|
36
|
+
root: string;
|
|
37
|
+
ports: RequiredPort[];
|
|
38
|
+
/** هل تعمل هذه العملية بصلاحيات مسؤول؟ يقرّر إن كان PATH سيُسجَّل أصلًا. */
|
|
39
|
+
elevated: boolean;
|
|
40
|
+
expectedSha256?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* AR: هل نملك صلاحيات المسؤول؟ الدليل عمليّ لا نظريّ: نحاول فتح مفتاح سِجل لا يُفتَح للكتابة إلّا
|
|
44
|
+
* بها. سؤال ويندوز عن «الدور» يكذب تحت UAC، والمحاولة تصدق.
|
|
45
|
+
* EN: Do we hold administrator rights? The evidence is practical rather than declared: we try to open
|
|
46
|
+
* a registry key that only opens for writing with them. Asking Windows about the "role" lies under
|
|
47
|
+
* UAC; attempting the thing tells the truth.
|
|
48
|
+
*/
|
|
49
|
+
export declare function hasAdminRights(): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* الفحوص قبل الكتابة. تُعيد قائمة، والأمر يرفض إن كان فيها فشل واحد.
|
|
52
|
+
*/
|
|
53
|
+
export declare function preInstallChecks(input: PreInstallInput): Promise<InstallCheck[]>;
|
|
54
|
+
/** يفكّ أرشيف حزمة إلى الجذر، رافضًا أي مدخل يخرج منه. */
|
|
55
|
+
export declare function extractBundle(archive: string, root: string): Promise<number>;
|
|
56
|
+
/**
|
|
57
|
+
* AR: ينسخ مجلد حزمة مفكوك، **مُكوِّنًا مُكوِّنًا لا شجرةً واحدة**، وdata/ لا يُنسَخ إطلاقًا.
|
|
58
|
+
*
|
|
59
|
+
* كان هذا نداءً واحدًا على الجذر كلّه. وقد فشل فشلًا صامتًا حين تكون الوجهة تحوي data/ عامرًا:
|
|
60
|
+
* العملية تموت بلا استثناء يُلتقَط وبلا سطر في السجلّ، ولا يُنسَخ بايت — بينما النسخ إلى مجلد
|
|
61
|
+
* فارغ ينجح، والنسخ مُكوِّنًا مُكوِّنًا إلى الوجهة **نفسها** ينجح. (قِيس على ويندوز أثناء ٠١٨؛
|
|
62
|
+
* السبب الجذري لم يُحسَم — عملية النسخ الضخمة قد تكون أوقفها دفاعٌ على الجهاز — لكن الشكل الذي
|
|
63
|
+
* يعمل معلوم ومُثبَت.)
|
|
64
|
+
*
|
|
65
|
+
* وللشكل الجديد فائدتان تتجاوزان تفادي العطب:
|
|
66
|
+
* ١ — **data/ يُستثنى صراحةً** بدل الاتّكال على أن دمج مجلد فارغ فوق مكتبة العميل غير مؤذٍ.
|
|
67
|
+
* القاعدة الرابعة تصير سطرًا في الشيفرة لا نتيجةً عرَضية.
|
|
68
|
+
* ٢ — الفشل يُنسَب إلى مكوّنه، فيقول الخطأ **أيّ** جزء تعذّر بدل «تعذّر النسخ».
|
|
69
|
+
* EN: Copies an extracted bundle directory, **component by component rather than as one tree**, and
|
|
70
|
+
* `data/` is never copied at all.
|
|
71
|
+
*
|
|
72
|
+
* This used to be a single call on the whole root. It failed silently when the destination held a
|
|
73
|
+
* populated `data/`: the process died with no catchable exception and no log line, and not one
|
|
74
|
+
* byte was copied — while copying into an empty directory succeeded, and copying component by
|
|
75
|
+
* component into the **same** destination succeeded. (Measured on Windows during 018; the root
|
|
76
|
+
* cause is unresolved — a security product may have stopped the bulk write — but the shape that
|
|
77
|
+
* works is known and proven.)
|
|
78
|
+
*
|
|
79
|
+
* The new shape earns two things beyond avoiding the fault:
|
|
80
|
+
* 1 — **`data/` is excluded explicitly** rather than relying on merging an empty directory over a
|
|
81
|
+
* customer's library being harmless. Rule IV becomes a line of code, not an incidental
|
|
82
|
+
* outcome.
|
|
83
|
+
* 2 — A failure names its component, so the error says **which** part could not be copied instead
|
|
84
|
+
* of "the copy failed".
|
|
85
|
+
*/
|
|
86
|
+
export declare function copyBundle(source: string, root: string): void;
|
|
87
|
+
/**
|
|
88
|
+
* AR: ما الذي ينقص شجرةً كي تُعدّ حزمةً مكتملة؟ **سؤال المُثبِّت، فانتقل معه** (٠٢٦).
|
|
89
|
+
*
|
|
90
|
+
* كانت هذه القائمة في خطّ الإنتاج (packaging/pipeline.ts) لأن الباني كان يقرأها ليتحقّق ممّا
|
|
91
|
+
* أنتج. وقد افترق المستودعان: الباني في مستودع المنتج، والمُثبِّت هنا. وموضعها الصحيح **حيث
|
|
92
|
+
* يُقرأ الجواب لا حيث يُكتب**: الحزمة تُبنى مرّةً وتُقرأ على أجهزةٍ كثيرة لسنوات.
|
|
93
|
+
*
|
|
94
|
+
* وتُفحَص بعد الفكّ وقبل تشغيل أيّ خدمة، فأرشيفٌ وصل ناقصًا يُوقف التثبيت ويُتراجَع عنه بدل
|
|
95
|
+
* أن يُنتج جهازًا نصف مركَّب يفشل عند أول مشاهد.
|
|
96
|
+
* EN: What must a tree contain before it counts as a complete bundle? **The installer's question, so
|
|
97
|
+
* it travelled with the installer** (026).
|
|
98
|
+
*
|
|
99
|
+
* This list used to live in the production pipeline (`packaging/pipeline.ts`), because the
|
|
100
|
+
* builder read it to verify what it had produced. The repositories have since separated: the
|
|
101
|
+
* builder lives in the product repository and the installer here. Its right home is **where the
|
|
102
|
+
* answer is read, not where it is written**: a bundle is built once and read on many machines
|
|
103
|
+
* for years.
|
|
104
|
+
*
|
|
105
|
+
* It runs after extraction and before any service starts, so an archive that arrived incomplete
|
|
106
|
+
* stops the install and is rolled back, rather than producing a half-assembled appliance that
|
|
107
|
+
* fails in front of the first viewer.
|
|
108
|
+
*/
|
|
109
|
+
export declare function verifyInstalled(root: string): string[];
|
|
110
|
+
/**
|
|
111
|
+
* التراجع: يزيل ما كُتب ويترك data/ كما كان.
|
|
112
|
+
*
|
|
113
|
+
* يُستدعى عند أي فشل **قبل** بدء الخدمات، فتعود الآلة إلى حالتها السابقة بدل أن تبقى نصف مثبَّتة.
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* AR: **التراجع لا يُفشِل نفسه، ولا يحجب سبب الفشل الذي استدعاه.**
|
|
117
|
+
*
|
|
118
|
+
* كان يرمي عند أوّل ملفّ متعذّر، وهو يجري داخل catch الأصلي — فيحلّ خطؤه محلّ الخطأ الحقيقي:
|
|
119
|
+
* يقرأ الفنّي «EBUSY … fantastic.db» ولا يعرف شيئًا عمّا فشل أصلًا. والأسوأ أن الحلقة تتوقّف
|
|
120
|
+
* عند ذلك الملفّ، فتبقى الشجرة **نصف محذوفة**: بعض المكوّنات ذهب وبعضها بقي — وهي الحالة التي
|
|
121
|
+
* وُجد التراجع ليمنعها.
|
|
122
|
+
* وسبب EBUSY معروف ومتوقَّع: عملية بدأت للتوّ ثم تعثّر إقلاعها ما تزال تمسك قاعدة البيانات
|
|
123
|
+
* لحظاتٍ بعد قتلها. إعادة المحاولة تكفي، وما يبقى متعذّرًا يُبلَّغ عنه ولا يُخفى.
|
|
124
|
+
* EN: **The rollback neither fails itself nor hides the failure that summoned it.**
|
|
125
|
+
*
|
|
126
|
+
* It used to throw on the first stubborn file, and it runs inside the original `catch` — so its
|
|
127
|
+
* error replaced the real one: the technician reads "EBUSY … fantastic.db" and learns nothing
|
|
128
|
+
* about what actually failed. Worse, the loop stopped at that file, leaving the tree **half
|
|
129
|
+
* deleted**: some components gone, others left — precisely the state a rollback exists to prevent.
|
|
130
|
+
* And the cause of that EBUSY is known and expected: a process that had just started and then
|
|
131
|
+
* failed to come up still holds the database for a moment after being killed. Retrying is enough,
|
|
132
|
+
* and whatever remains is reported rather than concealed.
|
|
133
|
+
*/
|
|
134
|
+
export declare function rollbackInstall(root: string, dataExistedBefore: boolean): string[];
|
|
135
|
+
export interface RemovalPlan {
|
|
136
|
+
removed: string[];
|
|
137
|
+
kept: string[];
|
|
138
|
+
}
|
|
139
|
+
/** ما تُزيله الإزالة وما تُبقيه. data/ يبقى ما لم يُطلَب حذفه صراحةً. */
|
|
140
|
+
export declare function planRemoval(root: string, purge: boolean): RemovalPlan;
|
|
141
|
+
/**
|
|
142
|
+
* AR: ينفّذ الخطة ويعيد ما تعذّر حذفه. **لا يتوقّف عند أول عثرة**: التوقّف يترك الشجرة نصف محذوفة —
|
|
143
|
+
* الشيمة والواجهة ذهبتا والخدمات باقية — وهي حالة لا يستطيع الفنّي أن يصلحها بأمر، لأن الأمر
|
|
144
|
+
* الذي يصلحها هو ما حُذف للتوّ. يُحذَف ما يمكن، ويُسمَّى ما بقي، فيبقى القرار بيد قارئٍ يعرف.
|
|
145
|
+
* EN: Applies the plan and returns whatever could not be deleted. **It does not stop at the first
|
|
146
|
+
* stumble**: stopping leaves the tree half removed — the shim and the CLI gone, the services still
|
|
147
|
+
* there — a state the technician cannot repair with a command, because the command that would
|
|
148
|
+
* repair it is the one just deleted. What can go, goes; what remains is named, leaving the
|
|
149
|
+
* decision with a reader who knows.
|
|
150
|
+
*/
|
|
151
|
+
export declare function applyRemoval(root: string, plan: RemovalPlan): string[];
|
|
152
|
+
/** حجم شجرة للتقرير. */
|
|
153
|
+
export declare function sizeOf(root: string): number;
|
|
154
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/packaging/install.ts"],"names":[],"mappings":"AAK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gB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAe7D;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAUtD;AAED;;;;GAIG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,GAAG,MAAM,EAAE,CAiBlF;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,2EAA2E;AAC3E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,CAYrE;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,MAAM,EAAE,CAYtE;AAED,wBAAwB;AACxB,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW3C"}
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import { createWriteStream, cpSync, existsSync, mkdirSync, readdirSync, rmSync, statSync } from "node:fs";
|
|
2
|
+
import { dirname, join, normalize, resolve, sep } from "node:path";
|
|
3
|
+
import { pipeline as streamPipeline } from "node:stream/promises";
|
|
4
|
+
import { execa } from "execa";
|
|
5
|
+
import yauzl from "yauzl";
|
|
6
|
+
import { BUNDLE_DIRS, SUPERVISOR_ENTRY, MANIFEST_FILE, RUNTIME_FILES } from "./layout.js";
|
|
7
|
+
import { hashFile, readManifest } from "./manifest.js";
|
|
8
|
+
export function classifySource(path) {
|
|
9
|
+
return { path, isArchive: path.toLowerCase().endsWith(".zip") };
|
|
10
|
+
}
|
|
11
|
+
/** يقرأ البيان من أرشيف بلا فكّه — نحتاجه للتحقّق من المنصّة قبل أي كتابة. */
|
|
12
|
+
export function manifestFromArchive(file) {
|
|
13
|
+
return new Promise((resolvePromise, rejectPromise) => {
|
|
14
|
+
yauzl.open(file, { lazyEntries: true }, (error, zip) => {
|
|
15
|
+
if (error || !zip)
|
|
16
|
+
return rejectPromise(error ?? new Error("the archive could not be opened"));
|
|
17
|
+
const wanted = MANIFEST_FILE.replace(/\\/g, "/");
|
|
18
|
+
let found = false;
|
|
19
|
+
zip.on("entry", (entry) => {
|
|
20
|
+
if (entry.fileName !== wanted) {
|
|
21
|
+
zip.readEntry();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
found = true;
|
|
25
|
+
zip.openReadStream(entry, (streamError, stream) => {
|
|
26
|
+
if (streamError || !stream)
|
|
27
|
+
return rejectPromise(streamError ?? new Error("unreadable manifest"));
|
|
28
|
+
const chunks = [];
|
|
29
|
+
stream.on("data", (chunk) => chunks.push(chunk));
|
|
30
|
+
stream.on("end", () => {
|
|
31
|
+
try {
|
|
32
|
+
resolvePromise(JSON.parse(Buffer.concat(chunks).toString("utf8")));
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
resolvePromise(undefined);
|
|
36
|
+
}
|
|
37
|
+
zip.close();
|
|
38
|
+
});
|
|
39
|
+
stream.on("error", rejectPromise);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
zip.on("end", () => {
|
|
43
|
+
if (!found)
|
|
44
|
+
resolvePromise(undefined);
|
|
45
|
+
});
|
|
46
|
+
zip.on("error", rejectPromise);
|
|
47
|
+
zip.readEntry();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* AR: هل نملك صلاحيات المسؤول؟ الدليل عمليّ لا نظريّ: نحاول فتح مفتاح سِجل لا يُفتَح للكتابة إلّا
|
|
53
|
+
* بها. سؤال ويندوز عن «الدور» يكذب تحت UAC، والمحاولة تصدق.
|
|
54
|
+
* EN: Do we hold administrator rights? The evidence is practical rather than declared: we try to open
|
|
55
|
+
* a registry key that only opens for writing with them. Asking Windows about the "role" lies under
|
|
56
|
+
* UAC; attempting the thing tells the truth.
|
|
57
|
+
*/
|
|
58
|
+
export async function hasAdminRights() {
|
|
59
|
+
if (process.platform !== "win32")
|
|
60
|
+
return true;
|
|
61
|
+
try {
|
|
62
|
+
await execa("powershell.exe", [
|
|
63
|
+
"-NoProfile",
|
|
64
|
+
"-NonInteractive",
|
|
65
|
+
"-Command",
|
|
66
|
+
"try { [void][Microsoft.Win32.Registry]::LocalMachine.OpenSubKey('SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment', $true); exit 0 } catch { exit 1 }",
|
|
67
|
+
], { timeout: 15_000 });
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* الفحوص قبل الكتابة. تُعيد قائمة، والأمر يرفض إن كان فيها فشل واحد.
|
|
76
|
+
*/
|
|
77
|
+
export async function preInstallChecks(input) {
|
|
78
|
+
const checks = [];
|
|
79
|
+
// ١ — المصدر موجود.
|
|
80
|
+
if (!existsSync(input.source.path)) {
|
|
81
|
+
checks.push({
|
|
82
|
+
name: "Source",
|
|
83
|
+
ok: false,
|
|
84
|
+
detail: `not found: ${input.source.path}`,
|
|
85
|
+
remedy: "Check the path passed to --from.",
|
|
86
|
+
});
|
|
87
|
+
return checks;
|
|
88
|
+
}
|
|
89
|
+
checks.push({ name: "Source", ok: true, detail: input.source.isArchive ? "archive" : "directory" });
|
|
90
|
+
// ٢ — البصمة إن أُعطيت. تكشف تلف النقل، ولا تثبت الأصالة (لا توقيع بعد).
|
|
91
|
+
if (input.source.isArchive && input.expectedSha256) {
|
|
92
|
+
const actual = hashFile(input.source.path);
|
|
93
|
+
const matches = actual === input.expectedSha256;
|
|
94
|
+
checks.push({
|
|
95
|
+
name: "Archive fingerprint",
|
|
96
|
+
ok: matches,
|
|
97
|
+
detail: matches ? "matches" : "does not match",
|
|
98
|
+
remedy: matches ? undefined : "The archive was damaged in transfer. Copy it again.",
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
// ٣ — البيان والمنصّة. عدم التطابق **يرفض** ولا يحذّر: حزمة لمنصّة أخرى لن تعمل أبدًا.
|
|
102
|
+
const manifest = input.source.isArchive
|
|
103
|
+
? await manifestFromArchive(input.source.path)
|
|
104
|
+
: readManifest(input.source.path);
|
|
105
|
+
if (!manifest) {
|
|
106
|
+
checks.push({
|
|
107
|
+
name: "Bundle manifest",
|
|
108
|
+
ok: false,
|
|
109
|
+
detail: "missing or unreadable",
|
|
110
|
+
remedy: "This is not a Fantastic bundle, or it was produced by an older CLI.",
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
const platformOk = manifest.bundle.platform === "win32-x64";
|
|
115
|
+
checks.push({
|
|
116
|
+
name: "Platform",
|
|
117
|
+
ok: platformOk,
|
|
118
|
+
detail: manifest.bundle.platform,
|
|
119
|
+
remedy: platformOk ? undefined : "This bundle targets another platform. Build one for win32-x64.",
|
|
120
|
+
});
|
|
121
|
+
if (manifest.bundle.unverified) {
|
|
122
|
+
checks.push({
|
|
123
|
+
name: "Verification",
|
|
124
|
+
ok: false,
|
|
125
|
+
detail: "this bundle was produced with --skip-smoke and never booted",
|
|
126
|
+
remedy: "Rebuild without --skip-smoke. An unverified bundle must not reach a customer.",
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// ٤ — لا تثبيت سابق. الترقية في المكان هي ميزة التحديثات المؤجَّلة، لا هذه.
|
|
131
|
+
const installed = existsSync(join(input.root, BUNDLE_DIRS.core, "main.js"));
|
|
132
|
+
checks.push({
|
|
133
|
+
name: "Prior installation",
|
|
134
|
+
ok: !installed,
|
|
135
|
+
detail: installed ? `already installed at ${input.root}` : "none",
|
|
136
|
+
remedy: installed
|
|
137
|
+
? "Remove it first (fantastic uninstall keeps data/ by default), or install to another --root."
|
|
138
|
+
: undefined,
|
|
139
|
+
});
|
|
140
|
+
// AR: ٥ — الصلاحيات. **يُعلَن قبل الكتابة لا بعدها.** التثبيت بلا صلاحيات مسؤول ينجح في كل شيء
|
|
141
|
+
// إلّا تسجيل PATH، فينتهي بنظام يعمل وأمرٍ لا يعرفه ويندوز — والفنّي لا يملك ما يربط بينهما.
|
|
142
|
+
// وهو **ليس فشلًا حاجبًا**: النظام يعمل بمساره الكامل، وإجبار المسؤول على كل تثبيت ثمنٌ أكبر
|
|
143
|
+
// من فائدته. فيُقال هنا صراحةً ليَعرف قبل أن يبدأ.
|
|
144
|
+
// EN: 5 — rights. **Stated before writing, not after.** An install without administrator rights
|
|
145
|
+
// succeeds at everything except registering PATH, ending with a working system and a command
|
|
146
|
+
// Windows does not know — and the technician has nothing connecting the two. It is **not
|
|
147
|
+
// blocking**: the system runs by its full path, and forcing an elevated prompt on every install
|
|
148
|
+
// costs more than it earns. So it is said here, plainly, before anything begins.
|
|
149
|
+
checks.push({
|
|
150
|
+
name: "Administrator",
|
|
151
|
+
ok: true,
|
|
152
|
+
detail: input.elevated ? "yes · PATH will be registered" : "no · the `fantastic` command will need its full path",
|
|
153
|
+
remedy: input.elevated
|
|
154
|
+
? undefined
|
|
155
|
+
: "Run install.cmd from a terminal opened as administrator if you want the bare `fantastic` command to work.",
|
|
156
|
+
});
|
|
157
|
+
// ٦ — المنافذ، كلّها. العلاج يسمّي العَلَم الذي يغيّر هذا المنفذ بعينه لا علمًا عامًّا.
|
|
158
|
+
for (const required of input.ports) {
|
|
159
|
+
checks.push({
|
|
160
|
+
name: `Port ${required.port}`,
|
|
161
|
+
ok: required.free,
|
|
162
|
+
detail: required.free ? `free · ${required.label}` : `in use · needed by ${required.label}`,
|
|
163
|
+
remedy: required.free ? undefined : `Free it, or install with ${required.flag} <other>.`,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
return checks;
|
|
167
|
+
}
|
|
168
|
+
/** يفكّ أرشيف حزمة إلى الجذر، رافضًا أي مدخل يخرج منه. */
|
|
169
|
+
export async function extractBundle(archive, root) {
|
|
170
|
+
const zip = await new Promise((resolvePromise, rejectPromise) => {
|
|
171
|
+
yauzl.open(archive, { lazyEntries: true, autoClose: false }, (error, handle) => {
|
|
172
|
+
if (error || !handle)
|
|
173
|
+
rejectPromise(error ?? new Error("the archive could not be opened"));
|
|
174
|
+
else
|
|
175
|
+
resolvePromise(handle);
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
let written = 0;
|
|
179
|
+
const rootResolved = resolve(root);
|
|
180
|
+
await new Promise((resolvePromise, rejectPromise) => {
|
|
181
|
+
zip.on("entry", (entry) => {
|
|
182
|
+
if (entry.fileName.endsWith("/")) {
|
|
183
|
+
zip.readEntry();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const target = resolve(root, entry.fileName);
|
|
187
|
+
// نفس فحص الهروب في الاستعادة، وللسبب نفسه: اسمٌ داخل أرشيف يصير مسارًا على القرص هنا.
|
|
188
|
+
if (target !== rootResolved && !normalize(target).startsWith(rootResolved + sep)) {
|
|
189
|
+
zip.readEntry();
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
zip.openReadStream(entry, (error, stream) => {
|
|
193
|
+
if (error || !stream)
|
|
194
|
+
return rejectPromise(error ?? new Error(`unreadable: ${entry.fileName}`));
|
|
195
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
196
|
+
streamPipeline(stream, createWriteStream(target))
|
|
197
|
+
.then(() => {
|
|
198
|
+
written += 1;
|
|
199
|
+
zip.readEntry();
|
|
200
|
+
})
|
|
201
|
+
.catch(rejectPromise);
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
zip.on("end", () => resolvePromise());
|
|
205
|
+
zip.on("error", rejectPromise);
|
|
206
|
+
zip.readEntry();
|
|
207
|
+
});
|
|
208
|
+
zip.close();
|
|
209
|
+
return written;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* AR: ينسخ مجلد حزمة مفكوك، **مُكوِّنًا مُكوِّنًا لا شجرةً واحدة**، وdata/ لا يُنسَخ إطلاقًا.
|
|
213
|
+
*
|
|
214
|
+
* كان هذا نداءً واحدًا على الجذر كلّه. وقد فشل فشلًا صامتًا حين تكون الوجهة تحوي data/ عامرًا:
|
|
215
|
+
* العملية تموت بلا استثناء يُلتقَط وبلا سطر في السجلّ، ولا يُنسَخ بايت — بينما النسخ إلى مجلد
|
|
216
|
+
* فارغ ينجح، والنسخ مُكوِّنًا مُكوِّنًا إلى الوجهة **نفسها** ينجح. (قِيس على ويندوز أثناء ٠١٨؛
|
|
217
|
+
* السبب الجذري لم يُحسَم — عملية النسخ الضخمة قد تكون أوقفها دفاعٌ على الجهاز — لكن الشكل الذي
|
|
218
|
+
* يعمل معلوم ومُثبَت.)
|
|
219
|
+
*
|
|
220
|
+
* وللشكل الجديد فائدتان تتجاوزان تفادي العطب:
|
|
221
|
+
* ١ — **data/ يُستثنى صراحةً** بدل الاتّكال على أن دمج مجلد فارغ فوق مكتبة العميل غير مؤذٍ.
|
|
222
|
+
* القاعدة الرابعة تصير سطرًا في الشيفرة لا نتيجةً عرَضية.
|
|
223
|
+
* ٢ — الفشل يُنسَب إلى مكوّنه، فيقول الخطأ **أيّ** جزء تعذّر بدل «تعذّر النسخ».
|
|
224
|
+
* EN: Copies an extracted bundle directory, **component by component rather than as one tree**, and
|
|
225
|
+
* `data/` is never copied at all.
|
|
226
|
+
*
|
|
227
|
+
* This used to be a single call on the whole root. It failed silently when the destination held a
|
|
228
|
+
* populated `data/`: the process died with no catchable exception and no log line, and not one
|
|
229
|
+
* byte was copied — while copying into an empty directory succeeded, and copying component by
|
|
230
|
+
* component into the **same** destination succeeded. (Measured on Windows during 018; the root
|
|
231
|
+
* cause is unresolved — a security product may have stopped the bulk write — but the shape that
|
|
232
|
+
* works is known and proven.)
|
|
233
|
+
*
|
|
234
|
+
* The new shape earns two things beyond avoiding the fault:
|
|
235
|
+
* 1 — **`data/` is excluded explicitly** rather than relying on merging an empty directory over a
|
|
236
|
+
* customer's library being harmless. Rule IV becomes a line of code, not an incidental
|
|
237
|
+
* outcome.
|
|
238
|
+
* 2 — A failure names its component, so the error says **which** part could not be copied instead
|
|
239
|
+
* of "the copy failed".
|
|
240
|
+
*/
|
|
241
|
+
export function copyBundle(source, root) {
|
|
242
|
+
mkdirSync(root, { recursive: true });
|
|
243
|
+
for (const entry of readdirSync(source)) {
|
|
244
|
+
if (entry === BUNDLE_DIRS.data)
|
|
245
|
+
continue;
|
|
246
|
+
try {
|
|
247
|
+
cpSync(join(source, entry), join(root, entry), { recursive: true, dereference: true });
|
|
248
|
+
}
|
|
249
|
+
catch (error) {
|
|
250
|
+
throw new Error(`could not copy ${entry}: ${error instanceof Error ? error.message : String(error)}`);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
// مجلد بيانات فارغ لأوّل تثبيت، وبلا مساس بما وُجد: mkdir على قائم لا يفعل شيئًا.
|
|
254
|
+
mkdirSync(join(root, BUNDLE_DIRS.data), { recursive: true });
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* AR: ما الذي ينقص شجرةً كي تُعدّ حزمةً مكتملة؟ **سؤال المُثبِّت، فانتقل معه** (٠٢٦).
|
|
258
|
+
*
|
|
259
|
+
* كانت هذه القائمة في خطّ الإنتاج (packaging/pipeline.ts) لأن الباني كان يقرأها ليتحقّق ممّا
|
|
260
|
+
* أنتج. وقد افترق المستودعان: الباني في مستودع المنتج، والمُثبِّت هنا. وموضعها الصحيح **حيث
|
|
261
|
+
* يُقرأ الجواب لا حيث يُكتب**: الحزمة تُبنى مرّةً وتُقرأ على أجهزةٍ كثيرة لسنوات.
|
|
262
|
+
*
|
|
263
|
+
* وتُفحَص بعد الفكّ وقبل تشغيل أيّ خدمة، فأرشيفٌ وصل ناقصًا يُوقف التثبيت ويُتراجَع عنه بدل
|
|
264
|
+
* أن يُنتج جهازًا نصف مركَّب يفشل عند أول مشاهد.
|
|
265
|
+
* EN: What must a tree contain before it counts as a complete bundle? **The installer's question, so
|
|
266
|
+
* it travelled with the installer** (026).
|
|
267
|
+
*
|
|
268
|
+
* This list used to live in the production pipeline (`packaging/pipeline.ts`), because the
|
|
269
|
+
* builder read it to verify what it had produced. The repositories have since separated: the
|
|
270
|
+
* builder lives in the product repository and the installer here. Its right home is **where the
|
|
271
|
+
* answer is read, not where it is written**: a bundle is built once and read on many machines
|
|
272
|
+
* for years.
|
|
273
|
+
*
|
|
274
|
+
* It runs after extraction and before any service starts, so an archive that arrived incomplete
|
|
275
|
+
* stops the install and is rolled back, rather than producing a half-assembled appliance that
|
|
276
|
+
* fails in front of the first viewer.
|
|
277
|
+
*/
|
|
278
|
+
export function verifyInstalled(root) {
|
|
279
|
+
const required = [
|
|
280
|
+
join(BUNDLE_DIRS.runtime, RUNTIME_FILES.node),
|
|
281
|
+
join(BUNDLE_DIRS.core, "main.js"),
|
|
282
|
+
join(BUNDLE_DIRS.live, "main.js"),
|
|
283
|
+
join(BUNDLE_DIRS.interfaceClient, "index.html"),
|
|
284
|
+
SUPERVISOR_ENTRY,
|
|
285
|
+
];
|
|
286
|
+
return required.filter((relative) => !existsSync(join(root, relative)));
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* التراجع: يزيل ما كُتب ويترك data/ كما كان.
|
|
290
|
+
*
|
|
291
|
+
* يُستدعى عند أي فشل **قبل** بدء الخدمات، فتعود الآلة إلى حالتها السابقة بدل أن تبقى نصف مثبَّتة.
|
|
292
|
+
*/
|
|
293
|
+
/**
|
|
294
|
+
* AR: **التراجع لا يُفشِل نفسه، ولا يحجب سبب الفشل الذي استدعاه.**
|
|
295
|
+
*
|
|
296
|
+
* كان يرمي عند أوّل ملفّ متعذّر، وهو يجري داخل catch الأصلي — فيحلّ خطؤه محلّ الخطأ الحقيقي:
|
|
297
|
+
* يقرأ الفنّي «EBUSY … fantastic.db» ولا يعرف شيئًا عمّا فشل أصلًا. والأسوأ أن الحلقة تتوقّف
|
|
298
|
+
* عند ذلك الملفّ، فتبقى الشجرة **نصف محذوفة**: بعض المكوّنات ذهب وبعضها بقي — وهي الحالة التي
|
|
299
|
+
* وُجد التراجع ليمنعها.
|
|
300
|
+
* وسبب EBUSY معروف ومتوقَّع: عملية بدأت للتوّ ثم تعثّر إقلاعها ما تزال تمسك قاعدة البيانات
|
|
301
|
+
* لحظاتٍ بعد قتلها. إعادة المحاولة تكفي، وما يبقى متعذّرًا يُبلَّغ عنه ولا يُخفى.
|
|
302
|
+
* EN: **The rollback neither fails itself nor hides the failure that summoned it.**
|
|
303
|
+
*
|
|
304
|
+
* It used to throw on the first stubborn file, and it runs inside the original `catch` — so its
|
|
305
|
+
* error replaced the real one: the technician reads "EBUSY … fantastic.db" and learns nothing
|
|
306
|
+
* about what actually failed. Worse, the loop stopped at that file, leaving the tree **half
|
|
307
|
+
* deleted**: some components gone, others left — precisely the state a rollback exists to prevent.
|
|
308
|
+
* And the cause of that EBUSY is known and expected: a process that had just started and then
|
|
309
|
+
* failed to come up still holds the database for a moment after being killed. Retrying is enough,
|
|
310
|
+
* and whatever remains is reported rather than concealed.
|
|
311
|
+
*/
|
|
312
|
+
export function rollbackInstall(root, dataExistedBefore) {
|
|
313
|
+
if (!existsSync(root))
|
|
314
|
+
return [];
|
|
315
|
+
const stubborn = [];
|
|
316
|
+
for (const entry of readdirSync(root)) {
|
|
317
|
+
// بيانات العميل لا تُحذف في التراجع إن كانت موجودة قبله.
|
|
318
|
+
if (entry === BUNDLE_DIRS.data && dataExistedBefore)
|
|
319
|
+
continue;
|
|
320
|
+
try {
|
|
321
|
+
rmSync(join(root, entry), { recursive: true, force: true, maxRetries: 5, retryDelay: 300 });
|
|
322
|
+
}
|
|
323
|
+
catch {
|
|
324
|
+
stubborn.push(entry);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
return stubborn;
|
|
328
|
+
}
|
|
329
|
+
/** ما تُزيله الإزالة وما تُبقيه. data/ يبقى ما لم يُطلَب حذفه صراحةً. */
|
|
330
|
+
export function planRemoval(root, purge) {
|
|
331
|
+
const removed = [];
|
|
332
|
+
const kept = [];
|
|
333
|
+
if (!existsSync(root))
|
|
334
|
+
return { removed, kept };
|
|
335
|
+
for (const entry of readdirSync(root)) {
|
|
336
|
+
if (entry === BUNDLE_DIRS.data && !purge)
|
|
337
|
+
kept.push(entry);
|
|
338
|
+
else
|
|
339
|
+
removed.push(entry);
|
|
340
|
+
}
|
|
341
|
+
return { removed, kept };
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* AR: ينفّذ الخطة ويعيد ما تعذّر حذفه. **لا يتوقّف عند أول عثرة**: التوقّف يترك الشجرة نصف محذوفة —
|
|
345
|
+
* الشيمة والواجهة ذهبتا والخدمات باقية — وهي حالة لا يستطيع الفنّي أن يصلحها بأمر، لأن الأمر
|
|
346
|
+
* الذي يصلحها هو ما حُذف للتوّ. يُحذَف ما يمكن، ويُسمَّى ما بقي، فيبقى القرار بيد قارئٍ يعرف.
|
|
347
|
+
* EN: Applies the plan and returns whatever could not be deleted. **It does not stop at the first
|
|
348
|
+
* stumble**: stopping leaves the tree half removed — the shim and the CLI gone, the services still
|
|
349
|
+
* there — a state the technician cannot repair with a command, because the command that would
|
|
350
|
+
* repair it is the one just deleted. What can go, goes; what remains is named, leaving the
|
|
351
|
+
* decision with a reader who knows.
|
|
352
|
+
*/
|
|
353
|
+
export function applyRemoval(root, plan) {
|
|
354
|
+
const stubborn = [];
|
|
355
|
+
for (const entry of plan.removed) {
|
|
356
|
+
try {
|
|
357
|
+
rmSync(join(root, entry), { recursive: true, force: true, maxRetries: 5, retryDelay: 300 });
|
|
358
|
+
}
|
|
359
|
+
catch {
|
|
360
|
+
stubborn.push(entry);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
return stubborn;
|
|
364
|
+
}
|
|
365
|
+
/** حجم شجرة للتقرير. */
|
|
366
|
+
export function sizeOf(root) {
|
|
367
|
+
let bytes = 0;
|
|
368
|
+
const walk = (dir) => {
|
|
369
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
370
|
+
const full = join(dir, entry.name);
|
|
371
|
+
if (entry.isDirectory())
|
|
372
|
+
walk(full);
|
|
373
|
+
else if (entry.isFile())
|
|
374
|
+
bytes += statSync(full).size;
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
if (existsSync(root))
|
|
378
|
+
walk(root);
|
|
379
|
+
return bytes;
|
|
380
|
+
}
|
|
381
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/packaging/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAiCvD,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;AAClE,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,IAAI,OAAO,CAAC,CAAC,cAAc,EAAE,aAAa,EAAE,EAAE;Q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