@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,70 @@
|
|
|
1
|
+
import { accessSync, constants, existsSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { BUNDLE_DIRS, SHIM_FILES } from "../../packaging/layout.js";
|
|
4
|
+
// AR: فحوص البيئة. كلّها محلّية بالكامل: نسخة العُقدة، ملفّ التشغيل، وقابلية الكتابة في مجلد
|
|
5
|
+
// البيانات. لا نداء شبكة هنا، فتعمل هذه الفحوص والنواة ميّتة — وهي الحالة التي يُستدعى فيها
|
|
6
|
+
// doctor غالبًا.
|
|
7
|
+
// EN: Environment checks. Entirely local: runtime version, resolved profile, and whether the data
|
|
8
|
+
// directory can be written. No network call here, so these work with the core dead — which is
|
|
9
|
+
// the state `doctor` is usually called in.
|
|
10
|
+
/** أدنى نسخة عُقدة يعلنها engines في كل مساحات العمل. */
|
|
11
|
+
const MIN_NODE_MAJOR = 20;
|
|
12
|
+
function majorOf(version) {
|
|
13
|
+
return Number.parseInt(version.replace(/^v/, "").split(".")[0] ?? "0", 10);
|
|
14
|
+
}
|
|
15
|
+
export const nodeVersionCheck = {
|
|
16
|
+
id: "env.node",
|
|
17
|
+
category: "environment",
|
|
18
|
+
title: "Node runtime",
|
|
19
|
+
async run() {
|
|
20
|
+
const major = majorOf(process.version);
|
|
21
|
+
return {
|
|
22
|
+
status: major >= MIN_NODE_MAJOR ? "pass" : "fail",
|
|
23
|
+
detail: process.version,
|
|
24
|
+
evidence: `requires >= ${MIN_NODE_MAJOR}`,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
// AR: العلاج يختلف باختلاف الأرض. **على جهاز العميل «ثبّت Node» نصيحة خاطئة** منذ ٠١٨: الجهاز لا
|
|
28
|
+
// يُطالَب بتثبيت شيء، والحزمة تشحن زمن تشغيلها. فإصدارٌ قديم هناك يعني أن الأمر لم يمرّ بالشيمة،
|
|
29
|
+
// وهو ما يُصلَح باستعمالها لا بتثبيت Node على آلة العميل.
|
|
30
|
+
// EN: The remedy differs by ground. **On a customer's appliance "install Node" is wrong advice** as
|
|
31
|
+
// of 018: the appliance is asked to install nothing, and the bundle ships its own runtime. So an
|
|
32
|
+
// old version there means the command did not go through the shim, which is fixed by using it
|
|
33
|
+
// rather than by installing Node on a customer's machine.
|
|
34
|
+
remedy: (result, { profile }) => profile.kind === "appliance"
|
|
35
|
+
? `The appliance never needs Node installed — the bundle ships its own. Run the command through ${join(profile.root, BUNDLE_DIRS.bin, SHIM_FILES.command)} instead of a globally installed CLI.`
|
|
36
|
+
: `Install Node ${MIN_NODE_MAJOR} or newer; this process is running ${result.detail ?? "an unknown version"}.`,
|
|
37
|
+
};
|
|
38
|
+
export const profileCheck = {
|
|
39
|
+
id: "env.profile",
|
|
40
|
+
category: "environment",
|
|
41
|
+
title: "Profile",
|
|
42
|
+
async run({ profile }) {
|
|
43
|
+
return { status: "pass", detail: profile.kind, evidence: profile.root };
|
|
44
|
+
},
|
|
45
|
+
// يمرّ دائمًا: لو تعذّر الاستنتاج لخرج الأمر بالرمز 5 قبل أن يصل أي فحص إلى هنا.
|
|
46
|
+
remedy: () => "Pass --profile dev or --profile appliance explicitly.",
|
|
47
|
+
};
|
|
48
|
+
export const dataDirCheck = {
|
|
49
|
+
id: "env.data-dir",
|
|
50
|
+
category: "environment",
|
|
51
|
+
title: "Data directory writable",
|
|
52
|
+
async run({ profile }) {
|
|
53
|
+
if (!existsSync(profile.dataDir)) {
|
|
54
|
+
// غيابه ليس فشلًا: أول تشغيل لم يُنشئه بعد، وsetup هو من يُنشئه.
|
|
55
|
+
return { status: "warn", detail: "missing", evidence: profile.dataDir };
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
accessSync(profile.dataDir, constants.W_OK);
|
|
59
|
+
return { status: "pass", detail: "writable", evidence: profile.dataDir };
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return { status: "fail", detail: "not writable", evidence: profile.dataDir };
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
remedy: (result, { profile }) => result.detail === "missing"
|
|
66
|
+
? `Run: fantastic setup — it creates ${profile.dataDir} and applies migrations.`
|
|
67
|
+
: `Grant write access to ${profile.dataDir}, or run the terminal as an administrator.`,
|
|
68
|
+
};
|
|
69
|
+
export const environmentChecks = [nodeVersionCheck, profileCheck, dataDirCheck];
|
|
70
|
+
//# sourceMappingURL=environment.check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.check.js","sourceRoot":"","sources":["../../../src/doctor/checks/environment.check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGpE,6FAA6F;AAC7F,gGAAgG;AAChG,uBAAuB;AACvB,kGAAkG;AAClG,kGAAkG;AAClG,+CAA+C;AAE/C,2DAA2D;AAC3D,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,SAAS,OAAO,CAAC,OAAe;IAC9B,OAAO,MAAM,CAA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doctor/checks/integrity.check.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAe,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAqCtE,eAAO,MAAM,sBAAsB,EAAE,eAwDpC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,EAA6B,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { BUNDLE_DIRS } from "../../packaging/layout.js";
|
|
4
|
+
import { hashDirectory } from "../../packaging/manifest.js";
|
|
5
|
+
// AR: فحص السلامة مقابل updates/versions.json.
|
|
6
|
+
//
|
|
7
|
+
// **نطاقه معلَن بصراحة داخل رسالته: يكشف التلف والعبث، ولا يثبت الأصالة.** ما دام الحقل
|
|
8
|
+
// signature فارغًا (وهو كذلك حتى تصل ميزة التحديثات)، فمن يستطيع تعديل ملف يستطيع تعديل بصمته
|
|
9
|
+
// المسجَّلة معه. ادّعاء «سليم» هنا بمعنى «موثوق» سيكون كذبًا مريحًا، ونحن نرفضه صراحةً بدل أن
|
|
10
|
+
// نتركه ضمنيًا.
|
|
11
|
+
//
|
|
12
|
+
// لا وجود لبيان الإصدارات في المستودع، وهذا **ليس فشلًا**: البيان يُكتب عند التغليف وحده.
|
|
13
|
+
// EN: Integrity against updates/versions.json.
|
|
14
|
+
//
|
|
15
|
+
// **Its scope is stated inside its own message: it detects corruption and tampering, and does
|
|
16
|
+
// not prove authenticity.** While `signature` is null — and it is, until the update feature
|
|
17
|
+
// lands — whoever can alter a file can alter the fingerprint recorded beside it. Claiming "ok"
|
|
18
|
+
// here in the sense of "trusted" would be a comfortable lie, and we reject it explicitly rather
|
|
19
|
+
// than leaving it implied.
|
|
20
|
+
//
|
|
21
|
+
// A repository has no manifest, and that is **not a failure**: it is written at bundle time.
|
|
22
|
+
const MANIFEST_RELATIVE = join("updates", "versions.json");
|
|
23
|
+
// AR: **البصمة تُستورَد ولا تُستنسَخ.** كانت هنا نسخة ثانية من الخوارزمية «بنفس المنطق»، وقد انحرفت:
|
|
24
|
+
// كاتب البيان يضمّ **المسار النسبي** لكل ملف (فنقلُ ملفٍّ بلا تغيير محتواه يُكشَف)، وهذه النسخة
|
|
25
|
+
// كانت تضمّ **اسمه فقط**. فالبصمتان مختلفتان لأي شجرة فيها مجلد واحد، وفحص السلامة كان يعلن
|
|
26
|
+
// «تغيّرت المكوّنات» على كل جهاز مركّب سليم — إنذارٌ كاذب دائم يُدرَّب الفنّي على تجاهله، وهو أسوأ
|
|
27
|
+
// من غياب الفحص لأنه يُبطل الفحص الحقيقي معه يوم يقع تلفٌ فعليّ.
|
|
28
|
+
// مصدرٌ واحد يجعل الانحراف مستحيلًا بالبنية لا بالانتباه.
|
|
29
|
+
// EN: **The fingerprint is imported, never re-implemented.** A second copy of the algorithm lived
|
|
30
|
+
// here "with the same logic", and it had drifted: the manifest writer folds in each file's
|
|
31
|
+
// **relative path** (so moving a file without changing its content is detected), while this copy
|
|
32
|
+
// folded in **its name alone**. The two digests differ for any tree containing a directory, and
|
|
33
|
+
// the integrity check therefore reported "components changed" on every sound installation — a
|
|
34
|
+
// permanent false alarm that trains a technician to ignore it, which is worse than no check at
|
|
35
|
+
// all, because it disables the real one on the day damage actually occurs.
|
|
36
|
+
// One source makes the drift structurally impossible rather than a matter of vigilance.
|
|
37
|
+
export const manifestIntegrityCheck = {
|
|
38
|
+
id: "integrity.manifest",
|
|
39
|
+
category: "integrity",
|
|
40
|
+
title: "Installed components",
|
|
41
|
+
async run({ profile }) {
|
|
42
|
+
const manifestPath = join(profile.root, MANIFEST_RELATIVE);
|
|
43
|
+
if (!existsSync(manifestPath)) {
|
|
44
|
+
return {
|
|
45
|
+
status: profile.kind === "appliance" ? "warn" : "pass",
|
|
46
|
+
detail: profile.kind === "appliance" ? "no manifest" : "not applicable in a repository",
|
|
47
|
+
evidence: manifestPath,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
let manifest;
|
|
51
|
+
try {
|
|
52
|
+
manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return { status: "fail", detail: "manifest is unreadable", evidence: manifestPath };
|
|
56
|
+
}
|
|
57
|
+
const mismatched = [];
|
|
58
|
+
let compared = 0;
|
|
59
|
+
for (const [name, component] of Object.entries(manifest.components)) {
|
|
60
|
+
if (!("sha256" in component) || !("files" in component))
|
|
61
|
+
continue;
|
|
62
|
+
// الواجهة وحدها بصمتها على interface\client لا على interface: هكذا كتبها البيان، فهكذا تُقرأ.
|
|
63
|
+
const relative = name === "interface" ? BUNDLE_DIRS.interfaceClient : name;
|
|
64
|
+
const dir = join(profile.root, relative);
|
|
65
|
+
if (!existsSync(dir) || !statSync(dir).isDirectory()) {
|
|
66
|
+
mismatched.push(`${name} (missing)`);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
compared += 1;
|
|
70
|
+
if (hashDirectory(dir).sha256 !== component.sha256)
|
|
71
|
+
mismatched.push(name);
|
|
72
|
+
}
|
|
73
|
+
if (mismatched.length > 0) {
|
|
74
|
+
return { status: "fail", detail: `${mismatched.length} changed`, evidence: mismatched.join(", ") };
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
status: "pass",
|
|
78
|
+
// النطاق مكتوب في القيمة المعروضة نفسها، لا في حاشية يتخطّاها القارئ.
|
|
79
|
+
detail: `${compared} match · detects damage, not authenticity`,
|
|
80
|
+
evidence: manifest.bundle.unverified ? "this bundle was produced without a smoke boot" : undefined,
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
remedy: (result) => result.detail === "manifest is unreadable"
|
|
84
|
+
? "The bundle manifest is corrupt. Reinstall from the original archive."
|
|
85
|
+
: `Components differ from what was installed (${result.evidence ?? "unknown"}). ` +
|
|
86
|
+
"Reinstall from the original archive; do not patch files in place.",
|
|
87
|
+
};
|
|
88
|
+
export const integrityChecks = [manifestIntegrityCheck];
|
|
89
|
+
//# sourceMappingURL=integrity.check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrity.check.js","sourceRoot":"","sources":["../../../src/doctor/checks/integrity.check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,iDAAiD;AACjD,EAAE;AACF,4FAA4F;AAC5F,oGAAoG;AACpG,kGAAkG;AAClG,oBAAoB;AACpB,EAAE;AACF,8FAA8F;AAC9F,+CAA+C;AAC/C,EAAE;AACF,kGAAkG;AAClG,gGAAgG;AAChG,mGAAmG;AACnG,oGAAoG;AACpG,+BAA+B;AAC/B,EAAE;AACF,iGAAiG;AAEjG,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;AAE3D,qGAAqG;AACrG,oGAAoG;AACpG,gGAAgG;AAChG,uGAAuG;AACvG,qEAAqE;AACrE,8DAA8D;AAC9D,kGAAkG;AAClG,+FAA+F;AAC/F,qGAAqG;AACrG,oGAAoG;AACpG,kGAAkG;AAClG,mGAAmG;AACnG,+EAA+E;AAC/E,4FAA4F;AAE5F,MAAM,CAAC,MAAM,sBAAsB,GAAoB;IACrD,EAAE,EAAE,oBAAoB;IACxB,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,sBAAsB;IAC7B,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE;QACnB,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QAE3D,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAC9B,OAAO;gBACL,MAAM,EAAE,OAAO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I,aAAa,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,MAAM;gBAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5E,CAAC;QAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACrG,CAAC;QAED,OAAO;YACL,MAAM,EAAE,MAAM;YACd,sEAAsE;YACtE,MAAM,EAAE,GAAG,QAAQ,2CAA2C;YAC9D,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,+CAA+C,CAAC,CAAC,CAAC,SAAS;SACnG,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CACjB,MAAM,CAAC,MAAM,KAAK,wBAAwB;QACxC,CAAC,CAAC,sEAAsE;QACxE,CAAC,CAAC,8CAA8C,MAAM,CAAC,QAAQ,IAAI,SAAS,KAAK;YAC/E,mEAAmE;CAC1E,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAsB,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DiagnosticCheck } from "../check.types.js";
|
|
2
|
+
/**
|
|
3
|
+
* AR: أي node.exe يشغّل هذه العملية الآن، وأين هو. حين يشتكي فنّي يومًا يُقطع السؤال بسطر بدل
|
|
4
|
+
* تخمين: زمن تشغيل الحزمة أم زمن تشغيل الجهاز؟ والسؤال ليس نظريًّا — أربعة أعطال ميدانية سببها
|
|
5
|
+
* كان بالضبط أن الواجهة تعمل بـNode الجهاز.
|
|
6
|
+
* EN: Which `node.exe` is running this process right now, and where it lives. When a technician one
|
|
7
|
+
* day reports trouble, this settles in a line what would otherwise be guesswork: the bundle's
|
|
8
|
+
* runtime or the machine's? The question is not theoretical — four field failures came down to
|
|
9
|
+
* exactly this, the CLI running on the machine's Node.
|
|
10
|
+
*/
|
|
11
|
+
export declare const runtimeCheck: DiagnosticCheck;
|
|
12
|
+
/**
|
|
13
|
+
* AR: **يمسك خرق القاعدة I آليًّا.** bin\ على PATH هو ما يجعل الأمر fantastic متاحًا؛ وruntime\
|
|
14
|
+
* على PATH هو ما يُبطل الميزة كلّها، لأن node المجرّدة تصير نسختَنا فتُكسَر مشاريع العميل.
|
|
15
|
+
* الأول غيابه إزعاج، والثاني وجوده عطبٌ جسيم — فيُصنَّفان تبعًا لذلك: تحذير وفشل.
|
|
16
|
+
* EN: **Catches a breach of rule I automatically.** `bin\` on PATH is what makes the `fantastic`
|
|
17
|
+
* command available; `runtime\` on PATH is what defeats the entire feature, because a bare `node`
|
|
18
|
+
* then resolves to our copy and the customer's projects break. Missing the first is an
|
|
19
|
+
* inconvenience; the presence of the second is serious damage — and they are graded accordingly:
|
|
20
|
+
* a warning and a failure.
|
|
21
|
+
*/
|
|
22
|
+
export declare const pathIsolationCheck: DiagnosticCheck;
|
|
23
|
+
/**
|
|
24
|
+
* AR: **أيّ fantastic يعمل حين تُكتب الكلمة مجرّدة؟**
|
|
25
|
+
*
|
|
26
|
+
* التثبيت يُلحق bin\ في **آخر** PATH عمدًا (القاعدة I: لا نحجب شيئًا على جهاز لا نملكه). ونتيجته
|
|
27
|
+
* أن تثبيتًا قديمًا بـnpm install -g — إن بقي على الجهاز — يسبقنا فيفوز، فيكتب الفنّي
|
|
28
|
+
* fantastic ويصل إلى الواجهة القديمة تعمل بـNode الجهاز. وهذا يُعيد بالضبط العطب الذي وُجدت
|
|
29
|
+
* هذه الميزة لإسقاطه: على Node 16 تنهار عند التحليل بـInvalid regular expression flags قبل أن
|
|
30
|
+
* تنفّذ سطرًا.
|
|
31
|
+
*
|
|
32
|
+
* رُصد على جهاز عميل حقيقي: النظام مثبَّت وسليم ويعمل، والفنّي يرى شاشة أخطاء لأنه يخاطب نسخة
|
|
33
|
+
* أخرى تمامًا. ولا شيء في النظام يشتكي، لأن لا شيء فيه معطوب.
|
|
34
|
+
* EN: **Which `fantastic` runs when the bare word is typed?**
|
|
35
|
+
*
|
|
36
|
+
* The installer appends `bin\` to the **end** of PATH deliberately (rule I: we shadow nothing on a
|
|
37
|
+
* machine we do not own). The consequence is that an older `npm install -g` — if it is still on
|
|
38
|
+
* the machine — comes first and wins, so the technician types `fantastic` and reaches the old CLI
|
|
39
|
+
* running on the machine's Node. That reinstates precisely the defect this feature exists to
|
|
40
|
+
* remove: on Node 16 it dies at parse time with `Invalid regular expression flags` before running
|
|
41
|
+
* a line.
|
|
42
|
+
*
|
|
43
|
+
* Observed on a real customer machine: the system installed, sound and running, while the
|
|
44
|
+
* technician read a screen of errors because they were addressing an entirely different copy. And
|
|
45
|
+
* nothing in the system complains, because nothing in it is broken.
|
|
46
|
+
*/
|
|
47
|
+
export declare const commandShadowCheck: DiagnosticCheck;
|
|
48
|
+
export declare const isolationChecks: DiagnosticCheck[];
|
|
49
|
+
//# sourceMappingURL=isolation.check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isolation.check.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/isolation.check.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAyCzD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,eAgD1B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAmChC,CAAC;AAgBF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAmDhC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,EAA2D,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { delimiter, join, relative, resolve } from "node:path";
|
|
3
|
+
import { BUNDLE_DIRS, RUNTIME_FILES } from "../../packaging/layout.js";
|
|
4
|
+
import { SHIM_FILES } from "../../packaging/layout.js";
|
|
5
|
+
// AR: فحوص العزل (٠١٨/P4). **تُثبت ما تدّعيه الوثيقة بدل أن يبقى ادّعاءً.**
|
|
6
|
+
//
|
|
7
|
+
// الميزة كلّها قائمة على أن زمنَي تشغيل يتعايشان على آلة واحدة بلا أن يعرف أحدهما بالآخر. وهذه
|
|
8
|
+
// فرضيّة تنكسر بصمت: تعديلٌ مستقبليّ حسن النيّة يضيف runtime\ إلى PATH «ليسهل التشخيص»، فيحجب
|
|
9
|
+
// Node العميل ويعطّل مشاريعه — ولا شيء يشتكي عندنا لأن نظامنا يعمل. الفحصان هنا يجعلان الكسر
|
|
10
|
+
// مرئيًّا في السطر الأول من doctor بدل أن يُكتشَف عند عميل.
|
|
11
|
+
// EN: Isolation checks (018/P4). **They prove what the document claims instead of leaving it a
|
|
12
|
+
// claim.**
|
|
13
|
+
//
|
|
14
|
+
// The whole feature rests on two runtimes coexisting on one machine without either knowing about
|
|
15
|
+
// the other. That premise breaks silently: a well-meaning future change adds `runtime\` to PATH
|
|
16
|
+
// "to make diagnosis easier", shadowing the customer's Node and breaking their projects — and
|
|
17
|
+
// nothing complains on our side, because our system works. These two checks make the break
|
|
18
|
+
// visible in `doctor`'s first screen rather than at a customer site.
|
|
19
|
+
function pathEntries() {
|
|
20
|
+
return (process.env.PATH ?? process.env.Path ?? "")
|
|
21
|
+
.split(delimiter)
|
|
22
|
+
.map((entry) => entry.trim())
|
|
23
|
+
.filter((entry) => entry.length > 0);
|
|
24
|
+
}
|
|
25
|
+
/** ويندوز لا يفرّق بين حالتَي الأحرف ولا يبالي بشرطة أخيرة؛ المقارنة النصّية الخام تكذب هنا. */
|
|
26
|
+
function isSameDirectory(a, b) {
|
|
27
|
+
const normalise = (value) => resolve(value).replace(/[\\/]+$/, "").toLowerCase();
|
|
28
|
+
return normalise(a) === normalise(b);
|
|
29
|
+
}
|
|
30
|
+
/** ملفّان بنفس المسار الفعليّ. نفس قاعدة حالة الأحرف، بلا حذف شرطة أخيرة (المسار ملفّ لا مجلد). */
|
|
31
|
+
function isSameFile(a, b) {
|
|
32
|
+
return resolve(a).toLowerCase() === resolve(b).toLowerCase();
|
|
33
|
+
}
|
|
34
|
+
/** هل directory داخل parent (أو هو نفسه)؟ يُستعمل لمعرفة إن كان مسارٌ ما تحت جذر التثبيت. */
|
|
35
|
+
function isInside(parent, directory) {
|
|
36
|
+
const step = relative(resolve(parent), resolve(directory));
|
|
37
|
+
return step === "" || (!step.startsWith("..") && !/^[a-z]:/i.test(step));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* AR: أي node.exe يشغّل هذه العملية الآن، وأين هو. حين يشتكي فنّي يومًا يُقطع السؤال بسطر بدل
|
|
41
|
+
* تخمين: زمن تشغيل الحزمة أم زمن تشغيل الجهاز؟ والسؤال ليس نظريًّا — أربعة أعطال ميدانية سببها
|
|
42
|
+
* كان بالضبط أن الواجهة تعمل بـNode الجهاز.
|
|
43
|
+
* EN: Which `node.exe` is running this process right now, and where it lives. When a technician one
|
|
44
|
+
* day reports trouble, this settles in a line what would otherwise be guesswork: the bundle's
|
|
45
|
+
* runtime or the machine's? The question is not theoretical — four field failures came down to
|
|
46
|
+
* exactly this, the CLI running on the machine's Node.
|
|
47
|
+
*/
|
|
48
|
+
export const runtimeCheck = {
|
|
49
|
+
id: "isolation.runtime",
|
|
50
|
+
category: "environment",
|
|
51
|
+
title: "Runtime in use",
|
|
52
|
+
async run({ profile }) {
|
|
53
|
+
const bundled = join(profile.root, BUNDLE_DIRS.runtime, RUNTIME_FILES.node);
|
|
54
|
+
const running = process.execPath;
|
|
55
|
+
if (profile.kind !== "appliance") {
|
|
56
|
+
// على جهاز التطوير لا حزمة ولا runtime\؛ الإبلاغ عمّا يعمل يكفي ولا شيء يُشترط.
|
|
57
|
+
return { status: "pass", detail: `${process.version} (development)`, evidence: running };
|
|
58
|
+
}
|
|
59
|
+
const usingBundled = isSameDirectory(running, bundled);
|
|
60
|
+
// AR: **الفحص انقلب في ٠٢٦، ولم يُحذف.**
|
|
61
|
+
//
|
|
62
|
+
// كان يحذّر حين لا تعمل هذه العملية على runtime\ المشحون، وكان محقًّا: الواجهة كانت
|
|
63
|
+
// تُشحن داخل الحزمة، وعملُها على Node الجهاز هو ما تسبّب في أربعة أعطالٍ ميدانية.
|
|
64
|
+
//
|
|
65
|
+
// وقد خرجت الواجهة إلى سِجلّ الحزم، فصار عملُها على Node العميل **هو الحالة الطبيعية**
|
|
66
|
+
// — وهو الاستثناء الوحيد المنصوص عليه في فقرة النطاق بالمبدأ الأول. وتحذيرٌ يظهر في كل
|
|
67
|
+
// تشخيصٍ سليم يُدرَّب الفنّي على تجاهله، فيتجاهل معه التحذير الحقيقيّ يوم يظهر.
|
|
68
|
+
//
|
|
69
|
+
// **وما يُحرَس بقي محروسًا**: الخدمات. doctor يبقى يفحص أن النواة وخدمة البثّ تعملان
|
|
70
|
+
// على البيئة المشحونة (core.check وsupervisor.check)، وهناك يقع الخطر الذي كُتب هذا
|
|
71
|
+
// الفحص لأجله — لا هنا.
|
|
72
|
+
// EN: **This check inverted in 026; it was not deleted.**
|
|
73
|
+
//
|
|
74
|
+
// It used to warn when this process was not running on the shipped `runtime\`, and it was
|
|
75
|
+
// right: the CLI shipped inside the bundle, and running it on the machine's Node is what
|
|
76
|
+
// caused four field failures.
|
|
77
|
+
//
|
|
78
|
+
// The CLI has since moved to a package registry, so running on the customer's Node **is the
|
|
79
|
+
// normal state** — the single stated exception in principle I's scope paragraph. And a
|
|
80
|
+
// warning appearing in every sound diagnosis teaches the technician to ignore it, and with it
|
|
81
|
+
// the real warning on the day it appears.
|
|
82
|
+
//
|
|
83
|
+
// **What was guarded stays guarded**: the services. `doctor` still checks that the core and
|
|
84
|
+
// the live service run on the shipped runtime (`core.check`, `supervisor.check`), and that is
|
|
85
|
+
// where the danger this check was written for actually lives — not here.
|
|
86
|
+
return {
|
|
87
|
+
status: "pass",
|
|
88
|
+
detail: `${process.version} · ${usingBundled ? "bundled" : "the machine's own (expected since 026)"}`,
|
|
89
|
+
evidence: `running: ${running}\nbundled: ${bundled}`,
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
remedy: () => "",
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* AR: **يمسك خرق القاعدة I آليًّا.** bin\ على PATH هو ما يجعل الأمر fantastic متاحًا؛ وruntime\
|
|
96
|
+
* على PATH هو ما يُبطل الميزة كلّها، لأن node المجرّدة تصير نسختَنا فتُكسَر مشاريع العميل.
|
|
97
|
+
* الأول غيابه إزعاج، والثاني وجوده عطبٌ جسيم — فيُصنَّفان تبعًا لذلك: تحذير وفشل.
|
|
98
|
+
* EN: **Catches a breach of rule I automatically.** `bin\` on PATH is what makes the `fantastic`
|
|
99
|
+
* command available; `runtime\` on PATH is what defeats the entire feature, because a bare `node`
|
|
100
|
+
* then resolves to our copy and the customer's projects break. Missing the first is an
|
|
101
|
+
* inconvenience; the presence of the second is serious damage — and they are graded accordingly:
|
|
102
|
+
* a warning and a failure.
|
|
103
|
+
*/
|
|
104
|
+
export const pathIsolationCheck = {
|
|
105
|
+
id: "isolation.path",
|
|
106
|
+
category: "environment",
|
|
107
|
+
title: "PATH isolation",
|
|
108
|
+
async run({ profile }) {
|
|
109
|
+
if (profile.kind !== "appliance") {
|
|
110
|
+
return { status: "pass", detail: "not applicable in development", evidence: "no bundle root" };
|
|
111
|
+
}
|
|
112
|
+
const binDir = join(profile.root, BUNDLE_DIRS.bin);
|
|
113
|
+
const runtimeDir = join(profile.root, BUNDLE_DIRS.runtime);
|
|
114
|
+
const entries = pathEntries();
|
|
115
|
+
// أي مُدخَل داخل runtime\ لا المجلد بعينه فقط: مجلد فرعي منه على PATH يكفي لحجب node.
|
|
116
|
+
const leaked = entries.filter((entry) => isInside(runtimeDir, entry));
|
|
117
|
+
if (leaked.length > 0) {
|
|
118
|
+
return { status: "fail", detail: "the bundled runtime is exposed", evidence: leaked.join("\n") };
|
|
119
|
+
}
|
|
120
|
+
const hasBin = entries.some((entry) => isSameDirectory(entry, binDir));
|
|
121
|
+
if (!hasBin) {
|
|
122
|
+
const installed = existsSync(join(binDir, SHIM_FILES.command));
|
|
123
|
+
return {
|
|
124
|
+
status: "warn",
|
|
125
|
+
detail: installed ? "bin\\ is not on this process's PATH" : "bin\\ is missing",
|
|
126
|
+
evidence: binDir,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return { status: "pass", detail: "bin\\ exposed · runtime\\ hidden", evidence: binDir };
|
|
130
|
+
},
|
|
131
|
+
remedy: (result, { profile }) => result.status === "fail"
|
|
132
|
+
? `Remove every entry under ${join(profile.root, BUNDLE_DIRS.runtime)} from the machine PATH. Exposing it makes a bare "node" resolve to the appliance's copy and breaks the customer's own projects. Only ${join(profile.root, BUNDLE_DIRS.bin)} belongs on PATH.`
|
|
133
|
+
: `Add ${join(profile.root, BUNDLE_DIRS.bin)} to the machine PATH, or open a new terminal if it was added during this session — PATH is read once when a process starts.`,
|
|
134
|
+
};
|
|
135
|
+
/** أول ما يجده ويندوز حين تُكتب الكلمة مجرّدة: أوّل مجلد على PATH فيه ملفّ بهذا الاسم وامتداد تنفيذي. */
|
|
136
|
+
function resolveOnPath(command) {
|
|
137
|
+
const extensions = (process.env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean);
|
|
138
|
+
for (const entry of pathEntries()) {
|
|
139
|
+
for (const extension of extensions) {
|
|
140
|
+
const candidate = join(entry, `${command}${extension.toLowerCase()}`);
|
|
141
|
+
if (existsSync(candidate))
|
|
142
|
+
return candidate;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* AR: **أيّ fantastic يعمل حين تُكتب الكلمة مجرّدة؟**
|
|
149
|
+
*
|
|
150
|
+
* التثبيت يُلحق bin\ في **آخر** PATH عمدًا (القاعدة I: لا نحجب شيئًا على جهاز لا نملكه). ونتيجته
|
|
151
|
+
* أن تثبيتًا قديمًا بـnpm install -g — إن بقي على الجهاز — يسبقنا فيفوز، فيكتب الفنّي
|
|
152
|
+
* fantastic ويصل إلى الواجهة القديمة تعمل بـNode الجهاز. وهذا يُعيد بالضبط العطب الذي وُجدت
|
|
153
|
+
* هذه الميزة لإسقاطه: على Node 16 تنهار عند التحليل بـInvalid regular expression flags قبل أن
|
|
154
|
+
* تنفّذ سطرًا.
|
|
155
|
+
*
|
|
156
|
+
* رُصد على جهاز عميل حقيقي: النظام مثبَّت وسليم ويعمل، والفنّي يرى شاشة أخطاء لأنه يخاطب نسخة
|
|
157
|
+
* أخرى تمامًا. ولا شيء في النظام يشتكي، لأن لا شيء فيه معطوب.
|
|
158
|
+
* EN: **Which `fantastic` runs when the bare word is typed?**
|
|
159
|
+
*
|
|
160
|
+
* The installer appends `bin\` to the **end** of PATH deliberately (rule I: we shadow nothing on a
|
|
161
|
+
* machine we do not own). The consequence is that an older `npm install -g` — if it is still on
|
|
162
|
+
* the machine — comes first and wins, so the technician types `fantastic` and reaches the old CLI
|
|
163
|
+
* running on the machine's Node. That reinstates precisely the defect this feature exists to
|
|
164
|
+
* remove: on Node 16 it dies at parse time with `Invalid regular expression flags` before running
|
|
165
|
+
* a line.
|
|
166
|
+
*
|
|
167
|
+
* Observed on a real customer machine: the system installed, sound and running, while the
|
|
168
|
+
* technician read a screen of errors because they were addressing an entirely different copy. And
|
|
169
|
+
* nothing in the system complains, because nothing in it is broken.
|
|
170
|
+
*/
|
|
171
|
+
export const commandShadowCheck = {
|
|
172
|
+
id: "isolation.command",
|
|
173
|
+
category: "environment",
|
|
174
|
+
title: "The `fantastic` command",
|
|
175
|
+
async run({ profile }) {
|
|
176
|
+
if (profile.kind !== "appliance") {
|
|
177
|
+
return { status: "pass", detail: "not applicable in development", evidence: "no installed shim" };
|
|
178
|
+
}
|
|
179
|
+
// AR: **السؤال انقلب في ٠٢٦.** كان: «هل يصل fantastic إلى شيمتنا أم إلى نسخةٍ عالميةٍ قديمة
|
|
180
|
+
// تسبقها على PATH؟» — وكان الجواب الصحيح وقتها «شيمتنا».
|
|
181
|
+
//
|
|
182
|
+
// واليوم النسخة العالمية **هي** الصحيحة، والشيمة صارت طريق مهمّة الإقلاع لا طريق الفنّي.
|
|
183
|
+
// فما يُفحَص هو ما بقي خطِرًا فعلًا: **أن تكون الشيمة موجودة** — غيابها يعني جهازًا لا
|
|
184
|
+
// تعود خدماته بعد انقطاع كهرباء — و**ألّا يبقى مُدخَل PATH قديمٌ** يشير إليها ويسبق
|
|
185
|
+
// الحزمة العالمية، فيصل الفنّي إلى مُشرِفٍ لا يفهم أوامره.
|
|
186
|
+
// EN: **The question inverted in 026.** It used to be: "does `fantastic` reach our shim, or an
|
|
187
|
+
// older global copy that precedes it on PATH?" — and the right answer then was "our shim".
|
|
188
|
+
//
|
|
189
|
+
// Today the global copy **is** the right one, and the shim has become the boot task's route
|
|
190
|
+
// rather than the technician's. So what is checked is what remains genuinely dangerous: **that
|
|
191
|
+
// the shim exists** — its absence means an appliance whose services never return after a power
|
|
192
|
+
// cut — and **that no stale PATH entry** still points at it ahead of the global package, which
|
|
193
|
+
// would land the technician on a supervisor that understands none of their commands.
|
|
194
|
+
const ours = join(profile.root, BUNDLE_DIRS.bin, SHIM_FILES.command);
|
|
195
|
+
if (!existsSync(ours)) {
|
|
196
|
+
return { status: "fail", detail: "the supervisor shim is missing", evidence: ours };
|
|
197
|
+
}
|
|
198
|
+
const found = resolveOnPath("fantastic");
|
|
199
|
+
if (!found)
|
|
200
|
+
return { status: "pass", detail: "the shim is in place; the command comes from npm", evidence: ours };
|
|
201
|
+
if (isSameFile(found, ours)) {
|
|
202
|
+
return {
|
|
203
|
+
status: "warn",
|
|
204
|
+
detail: "a stale PATH entry reaches the shim",
|
|
205
|
+
evidence: `resolves to: ${found}\nshim: ${ours}`,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return { status: "pass", detail: "resolves to the global package", evidence: found };
|
|
209
|
+
},
|
|
210
|
+
remedy: (result, { profile }) => {
|
|
211
|
+
if (result.status === "pass")
|
|
212
|
+
return "";
|
|
213
|
+
if (result.detail === "the supervisor shim is missing") {
|
|
214
|
+
return `The boot task calls ${join(profile.root, BUNDLE_DIRS.bin, SHIM_FILES.command)} to bring the services back after a power cut, and it is not there. Reinstall the product to restore it: fantastic install`;
|
|
215
|
+
}
|
|
216
|
+
return `Typing "fantastic" reaches this appliance's supervisor shim through an old PATH entry left by a pre-026 installation — it takes no commands. Clear it: fantastic migrate-cli`;
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
export const isolationChecks = [runtimeCheck, pathIsolationCheck, commandShadowCheck];
|
|
220
|
+
//# sourceMappingURL=isolation.check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isolation.check.js","sourceRoot":"","sources":["../../../src/doctor/checks/isolation.check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,4EAA4E;AAC5E,EAAE;AACF,mGAAmG;AACnG,oGAAoG;AACpG,iGAAiG;AACjG,kEAAkE;AAClE,+FAA+F;AAC/F,eAAe;AACf,EAAE;AACF,qGAAqG;AACrG,oGAAoG;AACpG,kGAAkG;AAClG,+FAA+F;AAC/F,yEAAyE;AAEzE,SAAS,WAAW;IAClB,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;SAChD,KAAK,CAAC,SAAS,CAAC;SAChB,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IAAI,EAAE,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,OAAO,CAAC,4HAA4H,CAAC;QACpN,CAAC;QAED,OAAO,8KAA8K,CAAC;IACxL,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAsB,CAAC,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DiagnosticCheck } from "../check.types.js";
|
|
2
|
+
/** يُفرَغ بين التشغيلات في الاختبارات، مثل مخبأ فحوص النواة. */
|
|
3
|
+
export declare function resetLicenceCheckCache(): void;
|
|
4
|
+
export declare const licencePresentCheck: DiagnosticCheck;
|
|
5
|
+
export declare const licenceValidCheck: DiagnosticCheck;
|
|
6
|
+
export declare const licenceCheckInCheck: DiagnosticCheck;
|
|
7
|
+
export declare const licenceChecks: DiagnosticCheck[];
|
|
8
|
+
//# sourceMappingURL=licence.check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"licence.check.d.ts","sourceRoot":"","sources":["../../../src/doctor/checks/licence.check.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA6B,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA0CpF,gEAAgE;AAChE,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAQD,eAAO,MAAM,mBAAmB,EAAE,eAsBjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eA+E/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eAqBjC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,EAI1C,CAAC"}
|