jishushell 0.5.22 → 0.6.18
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/apps/anythingllm-container.yaml +20 -177
- package/apps/browserless-chromium-container.yaml +17 -12
- package/apps/filebrowser-container.yaml +22 -9
- package/apps/hermes-container.yaml +23 -2
- package/apps/jishu-kb-container.yaml +152 -0
- package/apps/ollama-binary.yaml +32 -28
- package/apps/ollama-cpu-container.yaml +5 -0
- package/apps/ollama-with-hollama-binary.yaml +33 -28
- package/apps/openclaw-binary.yaml +34 -10
- package/apps/openclaw-container.yaml +33 -8
- package/apps/openclaw-with-ollama-container.yaml +8 -2
- package/apps/openclaw-with-searxng-container.yaml +18 -6
- package/apps/searxng-container.yaml +12 -7
- package/apps/weknora-container.yaml +29 -23
- package/dependencies/jishushell-panel-0.6.18.tgz +0 -0
- package/dist/cli/app.js +494 -192
- package/dist/cli/app.js.map +1 -1
- package/dist/cli/backup.js +112 -139
- package/dist/cli/backup.js.map +1 -1
- package/dist/cli/core.d.ts +30 -0
- package/dist/cli/core.js +1415 -0
- package/dist/cli/core.js.map +1 -0
- package/dist/cli/doctor.d.ts +1 -1
- package/dist/cli/doctor.js +50 -61
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/job.js +62 -14
- package/dist/cli/job.js.map +1 -1
- package/dist/cli/llm.d.ts +1 -18
- package/dist/cli/llm.js +103 -83
- package/dist/cli/llm.js.map +1 -1
- package/dist/cli/managed-list.d.ts +1 -3
- package/dist/cli/managed-list.js +18 -16
- package/dist/cli/managed-list.js.map +1 -1
- package/dist/cli/migrate.d.ts +2 -0
- package/dist/cli/migrate.js +160 -0
- package/dist/cli/migrate.js.map +1 -0
- package/dist/cli.js +26 -2
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +53 -44
- package/dist/config.js +216 -146
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +0 -4
- package/dist/constants.js.map +1 -1
- package/dist/control.d.ts +7 -7
- package/dist/control.js +32 -24
- package/dist/control.js.map +1 -1
- package/dist/core.d.ts +5 -0
- package/dist/core.js +6 -0
- package/dist/core.js.map +1 -0
- package/dist/install.d.ts +3 -10
- package/dist/install.js +118 -43
- package/dist/install.js.map +1 -1
- package/dist/routes/apps.d.ts +1 -1
- package/dist/routes/apps.js +100 -234
- package/dist/routes/apps.js.map +1 -1
- package/dist/routes/auth.d.ts +1 -3
- package/dist/routes/auth.js +7 -14
- package/dist/routes/auth.js.map +1 -1
- package/dist/routes/backup.js +137 -334
- package/dist/routes/backup.js.map +1 -1
- package/dist/routes/external-mounts.d.ts +1 -1
- package/dist/routes/external-mounts.js +7 -7
- package/dist/routes/external-mounts.js.map +1 -1
- package/dist/routes/file-mounts.d.ts +4 -3
- package/dist/routes/file-mounts.js +51 -30
- package/dist/routes/file-mounts.js.map +1 -1
- package/dist/routes/files-organize.d.ts +2 -2
- package/dist/routes/files-organize.js +5 -5
- package/dist/routes/files-organize.js.map +1 -1
- package/dist/routes/files.d.ts +1 -1
- package/dist/routes/files.js +1 -1
- package/dist/routes/files.js.map +1 -1
- package/dist/routes/instances.d.ts +11 -4
- package/dist/routes/instances.js +482 -923
- package/dist/routes/instances.js.map +1 -1
- package/dist/routes/integration-apps.d.ts +14 -0
- package/dist/routes/integration-apps.js +81 -0
- package/dist/routes/integration-apps.js.map +1 -0
- package/dist/routes/integrations.d.ts +9 -0
- package/dist/routes/integrations.js +12 -0
- package/dist/routes/integrations.js.map +1 -0
- package/dist/routes/llm-proxy.d.ts +2 -0
- package/dist/routes/llm-proxy.js +294 -0
- package/dist/routes/llm-proxy.js.map +1 -0
- package/dist/routes/llm.d.ts +1 -1
- package/dist/routes/llm.js +25 -75
- package/dist/routes/llm.js.map +1 -1
- package/dist/routes/setup.js +93 -93
- package/dist/routes/setup.js.map +1 -1
- package/dist/routes/system.js +248 -54
- package/dist/routes/system.js.map +1 -1
- package/dist/routes/webdav.d.ts +1 -1
- package/dist/routes/webdav.js +2 -2
- package/dist/routes/webdav.js.map +1 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +343 -312
- package/dist/server.js.map +1 -1
- package/dist/services/app-common/app-compiler.js +186 -0
- package/dist/services/app-common/app-compiler.js.map +1 -0
- package/dist/services/app-common/app-shared.d.ts +15 -0
- package/dist/services/app-common/app-shared.js +64 -0
- package/dist/services/app-common/app-shared.js.map +1 -0
- package/dist/services/app-common/capability-service.d.ts +45 -0
- package/dist/services/app-common/capability-service.js +331 -0
- package/dist/services/app-common/capability-service.js.map +1 -0
- package/dist/services/app-common/catalog-service.d.ts +59 -0
- package/dist/services/app-common/catalog-service.js +308 -0
- package/dist/services/app-common/catalog-service.js.map +1 -0
- package/dist/services/app-common/create-pipeline.d.ts +26 -0
- package/dist/services/app-common/create-pipeline.js +298 -0
- package/dist/services/app-common/create-pipeline.js.map +1 -0
- package/dist/services/app-common/delete-service.d.ts +5 -0
- package/dist/services/app-common/delete-service.js +104 -0
- package/dist/services/app-common/delete-service.js.map +1 -0
- package/dist/services/app-common/execution-owner.d.ts +23 -0
- package/dist/services/app-common/execution-owner.js +124 -0
- package/dist/services/app-common/execution-owner.js.map +1 -0
- package/dist/services/app-common/execution-service.d.ts +23 -0
- package/dist/services/app-common/execution-service.js +105 -0
- package/dist/services/app-common/execution-service.js.map +1 -0
- package/dist/services/app-common/id-normalizer.d.ts +31 -0
- package/dist/services/app-common/id-normalizer.js +83 -0
- package/dist/services/app-common/id-normalizer.js.map +1 -0
- package/dist/services/app-common/install-store.d.ts +34 -0
- package/dist/services/app-common/install-store.js +261 -0
- package/dist/services/app-common/install-store.js.map +1 -0
- package/dist/services/app-common/instance-store.d.ts +78 -0
- package/dist/services/app-common/instance-store.js +495 -0
- package/dist/services/app-common/instance-store.js.map +1 -0
- package/dist/services/app-common/integration-refs.d.ts +17 -0
- package/dist/services/app-common/integration-refs.js +47 -0
- package/dist/services/app-common/integration-refs.js.map +1 -0
- package/dist/services/app-common/lifecycle-pipeline.d.ts +62 -0
- package/dist/services/app-common/lifecycle-pipeline.js +317 -0
- package/dist/services/app-common/lifecycle-pipeline.js.map +1 -0
- package/dist/services/app-common/lifecycle-scripts.d.ts +38 -0
- package/dist/services/app-common/lifecycle-scripts.js +935 -0
- package/dist/services/app-common/lifecycle-scripts.js.map +1 -0
- package/dist/services/app-common/lifecycle-service.d.ts +68 -0
- package/dist/services/app-common/lifecycle-service.js +467 -0
- package/dist/services/app-common/lifecycle-service.js.map +1 -0
- package/dist/services/app-common/paths.d.ts +29 -0
- package/dist/services/app-common/paths.js +34 -0
- package/dist/services/app-common/paths.js.map +1 -0
- package/dist/services/app-common/platform-transform.d.ts +32 -0
- package/dist/services/app-common/platform-transform.js +65 -0
- package/dist/services/app-common/platform-transform.js.map +1 -0
- package/dist/services/app-common/provide-resolver.d.ts +29 -0
- package/dist/services/app-common/provide-resolver.js +129 -0
- package/dist/services/app-common/provide-resolver.js.map +1 -0
- package/dist/services/app-common/remote-spec.d.ts +14 -0
- package/dist/services/app-common/remote-spec.js +58 -0
- package/dist/services/app-common/remote-spec.js.map +1 -0
- package/dist/services/app-common/runtime-builder.d.ts +1 -0
- package/dist/services/app-common/runtime-builder.js +2 -0
- package/dist/services/app-common/runtime-builder.js.map +1 -0
- package/dist/services/app-common/runtime-facts.d.ts +19 -0
- package/dist/services/app-common/runtime-facts.js +126 -0
- package/dist/services/app-common/runtime-facts.js.map +1 -0
- package/dist/services/app-common/service.d.ts +9 -0
- package/dist/services/app-common/service.js +10 -0
- package/dist/services/app-common/service.js.map +1 -0
- package/dist/services/app-common/spec-materializer.d.ts +9 -0
- package/dist/services/app-common/spec-materializer.js +361 -0
- package/dist/services/app-common/spec-materializer.js.map +1 -0
- package/dist/services/app-common/status-refresh.d.ts +33 -0
- package/dist/services/app-common/status-refresh.js +759 -0
- package/dist/services/app-common/status-refresh.js.map +1 -0
- package/dist/services/app-common/task-service.d.ts +29 -0
- package/dist/services/app-common/task-service.js +93 -0
- package/dist/services/app-common/task-service.js.map +1 -0
- package/dist/services/app-common/terminal-session-manager.js +157 -0
- package/dist/services/app-common/terminal-session-manager.js.map +1 -0
- package/dist/services/app-modules/browserless/routes.d.ts +9 -0
- package/dist/services/app-modules/browserless/routes.js +517 -0
- package/dist/services/app-modules/browserless/routes.js.map +1 -0
- package/dist/services/app-modules/routes.d.ts +2 -0
- package/dist/services/app-modules/routes.js +5 -0
- package/dist/services/app-modules/routes.js.map +1 -0
- package/dist/services/backup/backup-admin.d.ts +95 -0
- package/dist/services/backup/backup-admin.js +246 -0
- package/dist/services/backup/backup-admin.js.map +1 -0
- package/dist/services/backup/backup-manager.d.ts +264 -0
- package/dist/services/backup/backup-manager.js +2318 -0
- package/dist/services/backup/backup-manager.js.map +1 -0
- package/dist/services/backup/backup-verify.js +240 -0
- package/dist/services/backup/backup-verify.js.map +1 -0
- package/dist/services/capabilities/browser-policy.d.ts +14 -0
- package/dist/services/capabilities/browser-policy.js +141 -0
- package/dist/services/capabilities/browser-policy.js.map +1 -0
- package/dist/services/capabilities/contract.d.ts +50 -0
- package/dist/services/capabilities/contract.js +129 -0
- package/dist/services/capabilities/contract.js.map +1 -0
- package/dist/services/capabilities/endpoint-validator.d.ts +42 -0
- package/dist/services/capabilities/endpoint-validator.js +114 -0
- package/dist/services/capabilities/endpoint-validator.js.map +1 -0
- package/dist/services/capabilities/health.d.ts +16 -0
- package/dist/services/capabilities/health.js +121 -0
- package/dist/services/capabilities/health.js.map +1 -0
- package/dist/services/capabilities/registry.d.ts +56 -0
- package/dist/services/capabilities/registry.js +222 -0
- package/dist/services/capabilities/registry.js.map +1 -0
- package/dist/services/capabilities/sync.d.ts +7 -0
- package/dist/services/capabilities/sync.js +223 -0
- package/dist/services/capabilities/sync.js.map +1 -0
- package/dist/services/capability-proxy/html-rewriters/browserless.d.ts +1 -0
- package/dist/services/capability-proxy/html-rewriters/browserless.js +83 -0
- package/dist/services/capability-proxy/html-rewriters/browserless.js.map +1 -0
- package/dist/services/capability-proxy/html-rewriters/index.d.ts +12 -0
- package/dist/services/capability-proxy/html-rewriters/index.js +25 -0
- package/dist/services/capability-proxy/html-rewriters/index.js.map +1 -0
- package/dist/services/capability-proxy/html-rewriters/jishukb.d.ts +1 -0
- package/dist/services/capability-proxy/html-rewriters/jishukb.js +161 -0
- package/dist/services/capability-proxy/html-rewriters/jishukb.js.map +1 -0
- package/dist/services/connections/admin.d.ts +80 -0
- package/dist/services/connections/admin.js +327 -0
- package/dist/services/connections/admin.js.map +1 -0
- package/dist/services/connections/apply.d.ts +110 -0
- package/dist/services/connections/apply.js +444 -0
- package/dist/services/connections/apply.js.map +1 -0
- package/dist/services/connections/resolver.d.ts +82 -0
- package/dist/services/connections/resolver.js +289 -0
- package/dist/services/connections/resolver.js.map +1 -0
- package/dist/services/connections/suggestions.d.ts +27 -0
- package/dist/services/connections/suggestions.js +124 -0
- package/dist/services/connections/suggestions.js.map +1 -0
- package/dist/services/connections/transactor.d.ts +39 -0
- package/dist/services/connections/transactor.js +307 -0
- package/dist/services/connections/transactor.js.map +1 -0
- package/dist/services/files/external-mounts.js +187 -0
- package/dist/services/files/external-mounts.js.map +1 -0
- package/dist/services/files/files-manager.d.ts +265 -0
- package/dist/services/files/files-manager.js +1189 -0
- package/dist/services/files/files-manager.js.map +1 -0
- package/dist/services/files/files-mounts.d.ts +42 -0
- package/dist/services/files/files-mounts.js +207 -0
- package/dist/services/files/files-mounts.js.map +1 -0
- package/dist/services/files/organize/applier.js +218 -0
- package/dist/services/files/organize/applier.js.map +1 -0
- package/dist/services/files/organize/rules.js +286 -0
- package/dist/services/files/organize/rules.js.map +1 -0
- package/dist/services/files/organize/scanner.js +366 -0
- package/dist/services/files/organize/scanner.js.map +1 -0
- package/dist/services/files/organize/store.js +82 -0
- package/dist/services/files/organize/store.js.map +1 -0
- package/dist/services/files/webdav/server.d.ts +47 -0
- package/dist/services/files/webdav/server.js +329 -0
- package/dist/services/files/webdav/server.js.map +1 -0
- package/dist/services/files/webdav/xml-builder.js.map +1 -0
- package/dist/services/instances/admin.d.ts +23 -0
- package/dist/services/instances/admin.js +218 -0
- package/dist/services/instances/admin.js.map +1 -0
- package/dist/services/instances/clone.d.ts +26 -0
- package/dist/services/instances/clone.js +78 -0
- package/dist/services/instances/clone.js.map +1 -0
- package/dist/services/instances/config-admin.d.ts +17 -0
- package/dist/services/instances/config-admin.js +181 -0
- package/dist/services/instances/config-admin.js.map +1 -0
- package/dist/services/instances/manager.d.ts +231 -0
- package/dist/services/instances/manager.js +1348 -0
- package/dist/services/instances/manager.js.map +1 -0
- package/dist/services/instances/passwords.js +173 -0
- package/dist/services/instances/passwords.js.map +1 -0
- package/dist/services/instances/types.d.ts +21 -0
- package/dist/services/instances/types.js +2 -0
- package/dist/services/instances/types.js.map +1 -0
- package/dist/services/integrations/anythingllm/integration.d.ts +25 -0
- package/dist/services/integrations/anythingllm/integration.js +251 -0
- package/dist/services/integrations/anythingllm/integration.js.map +1 -0
- package/dist/services/integrations/catalog.d.ts +3 -0
- package/dist/services/integrations/catalog.js +73 -0
- package/dist/services/integrations/catalog.js.map +1 -0
- package/dist/services/integrations/custom/integration.d.ts +28 -0
- package/dist/services/integrations/custom/integration.js +179 -0
- package/dist/services/integrations/custom/integration.js.map +1 -0
- package/dist/services/integrations/hermes/integration.d.ts +194 -0
- package/dist/services/integrations/hermes/integration.js +1669 -0
- package/dist/services/integrations/hermes/integration.js.map +1 -0
- package/dist/services/integrations/index.d.ts +40 -0
- package/dist/services/integrations/index.js +59 -0
- package/dist/services/integrations/index.js.map +1 -0
- package/dist/services/integrations/installable/catalog.d.ts +33 -0
- package/dist/services/integrations/installable/catalog.js +88 -0
- package/dist/services/integrations/installable/catalog.js.map +1 -0
- package/dist/services/integrations/installable/index.d.ts +35 -0
- package/dist/services/integrations/installable/index.js +170 -0
- package/dist/services/integrations/installable/index.js.map +1 -0
- package/dist/services/integrations/installable/installers/integration-probes.d.ts +50 -0
- package/dist/services/integrations/installable/installers/integration-probes.js +231 -0
- package/dist/services/integrations/installable/installers/integration-probes.js.map +1 -0
- package/dist/services/integrations/installable/installers/integration.d.ts +30 -0
- package/dist/services/integrations/installable/installers/integration.js +177 -0
- package/dist/services/integrations/installable/installers/integration.js.map +1 -0
- package/dist/services/integrations/installable/installers/registry-probe.js.map +1 -0
- package/dist/services/integrations/installable/installers/shell-script.d.ts +46 -0
- package/dist/services/integrations/installable/installers/shell-script.js +487 -0
- package/dist/services/integrations/installable/installers/shell-script.js.map +1 -0
- package/dist/services/integrations/installable/types.d.ts +130 -0
- package/dist/services/integrations/installable/types.js +19 -0
- package/dist/services/integrations/installable/types.js.map +1 -0
- package/dist/services/integrations/jishukb/integration.d.ts +22 -0
- package/dist/services/integrations/jishukb/integration.js +189 -0
- package/dist/services/integrations/jishukb/integration.js.map +1 -0
- package/dist/services/integrations/openclaw/anythingllm-shim.d.ts +46 -0
- package/dist/services/integrations/openclaw/anythingllm-shim.js +281 -0
- package/dist/services/integrations/openclaw/anythingllm-shim.js.map +1 -0
- package/dist/services/integrations/openclaw/drive-shim.d.ts +54 -0
- package/dist/services/integrations/openclaw/drive-shim.js +490 -0
- package/dist/services/integrations/openclaw/drive-shim.js.map +1 -0
- package/dist/services/integrations/openclaw/integration.d.ts +424 -0
- package/dist/services/integrations/openclaw/integration.js +4402 -0
- package/dist/services/integrations/openclaw/integration.js.map +1 -0
- package/dist/services/integrations/openclaw/jishukb-shim.d.ts +48 -0
- package/dist/services/integrations/openclaw/jishukb-shim.js +750 -0
- package/dist/services/integrations/openclaw/jishukb-shim.js.map +1 -0
- package/dist/services/integrations/openclaw/mcporter-lite.d.ts +24 -0
- package/dist/services/integrations/openclaw/mcporter-lite.js +276 -0
- package/dist/services/integrations/openclaw/mcporter-lite.js.map +1 -0
- package/dist/services/integrations/openclaw/mcporter.d.ts +46 -0
- package/dist/services/integrations/openclaw/mcporter.js +112 -0
- package/dist/services/integrations/openclaw/mcporter.js.map +1 -0
- package/dist/services/integrations/openclaw/routes.d.ts +21 -0
- package/dist/services/integrations/openclaw/routes.js +1191 -0
- package/dist/services/integrations/openclaw/routes.js.map +1 -0
- package/dist/services/integrations/registry.d.ts +17 -0
- package/dist/services/integrations/registry.js +36 -0
- package/dist/services/integrations/registry.js.map +1 -0
- package/dist/services/integrations/routes.d.ts +2 -0
- package/dist/services/integrations/routes.js +9 -0
- package/dist/services/integrations/routes.js.map +1 -0
- package/dist/services/integrations/types.d.ts +469 -0
- package/dist/services/integrations/types.js +2 -0
- package/dist/services/integrations/types.js.map +1 -0
- package/dist/services/legacy-migrator/classifier.d.ts +44 -0
- package/dist/services/legacy-migrator/classifier.js +309 -0
- package/dist/services/legacy-migrator/classifier.js.map +1 -0
- package/dist/services/legacy-migrator/executor.d.ts +42 -0
- package/dist/services/legacy-migrator/executor.js +637 -0
- package/dist/services/legacy-migrator/executor.js.map +1 -0
- package/dist/services/legacy-migrator/index.d.ts +31 -0
- package/dist/services/legacy-migrator/index.js +34 -0
- package/dist/services/legacy-migrator/index.js.map +1 -0
- package/dist/services/legacy-migrator/planner.d.ts +8 -0
- package/dist/services/legacy-migrator/planner.js +154 -0
- package/dist/services/legacy-migrator/planner.js.map +1 -0
- package/dist/services/legacy-migrator/provider-settings.d.ts +6 -0
- package/dist/services/legacy-migrator/provider-settings.js +72 -0
- package/dist/services/legacy-migrator/provider-settings.js.map +1 -0
- package/dist/services/legacy-migrator/report.d.ts +9 -0
- package/dist/services/legacy-migrator/report.js +99 -0
- package/dist/services/legacy-migrator/report.js.map +1 -0
- package/dist/services/legacy-migrator/scanner.d.ts +13 -0
- package/dist/services/legacy-migrator/scanner.js +157 -0
- package/dist/services/legacy-migrator/scanner.js.map +1 -0
- package/dist/services/legacy-migrator/types.d.ts +97 -0
- package/dist/services/legacy-migrator/types.js +23 -0
- package/dist/services/legacy-migrator/types.js.map +1 -0
- package/dist/services/llm-proxy/adapters.js +5 -4
- package/dist/services/llm-proxy/adapters.js.map +1 -1
- package/dist/services/llm-proxy/index.d.ts +8 -105
- package/dist/services/llm-proxy/index.js +12 -889
- package/dist/services/llm-proxy/index.js.map +1 -1
- package/dist/services/llm-proxy/instance-proxy.d.ts +61 -0
- package/dist/services/llm-proxy/instance-proxy.js +702 -0
- package/dist/services/llm-proxy/instance-proxy.js.map +1 -0
- package/dist/services/llm-proxy/probe.js +5 -14
- package/dist/services/llm-proxy/probe.js.map +1 -1
- package/dist/services/llm-proxy/providers.d.ts +21 -0
- package/dist/services/llm-proxy/providers.js +88 -0
- package/dist/services/llm-proxy/providers.js.map +1 -0
- package/dist/services/llm-proxy/proxy-runtime.d.ts +12 -0
- package/dist/services/llm-proxy/proxy-runtime.js +65 -0
- package/dist/services/llm-proxy/proxy-runtime.js.map +1 -0
- package/dist/services/llm-proxy/sse.d.ts +13 -3
- package/dist/services/llm-proxy/sse.js.map +1 -1
- package/dist/services/llm-proxy/ssrf.d.ts +11 -4
- package/dist/services/llm-proxy/ssrf.js +45 -7
- package/dist/services/llm-proxy/ssrf.js.map +1 -1
- package/dist/services/llm-proxy/validate-key.js +27 -51
- package/dist/services/llm-proxy/validate-key.js.map +1 -1
- package/dist/services/repair/runtime-repair.d.ts +22 -0
- package/dist/services/repair/runtime-repair.js +307 -0
- package/dist/services/repair/runtime-repair.js.map +1 -0
- package/dist/services/runtime/driver-registry.d.ts +21 -0
- package/dist/services/runtime/driver-registry.js +22 -0
- package/dist/services/runtime/driver-registry.js.map +1 -0
- package/dist/services/runtime/drivers/nomad.d.ts +260 -0
- package/dist/services/runtime/drivers/nomad.js +3092 -0
- package/dist/services/runtime/drivers/nomad.js.map +1 -0
- package/dist/services/runtime/errors.d.ts +3 -3
- package/dist/services/runtime/errors.js +3 -3
- package/dist/services/runtime/instance.d.ts +14 -16
- package/dist/services/runtime/instance.js +93 -110
- package/dist/services/runtime/instance.js.map +1 -1
- package/dist/services/runtime/job-id.d.ts +9 -0
- package/dist/services/runtime/job-id.js +15 -0
- package/dist/services/runtime/job-id.js.map +1 -0
- package/dist/services/runtime/mcp-shims/firewall.d.ts +2 -2
- package/dist/services/runtime/mcp-shims/firewall.js +2 -2
- package/dist/services/runtime/mcp-shims/searxng-shim.d.ts +3 -5
- package/dist/services/runtime/mcp-shims/searxng-shim.js +3 -5
- package/dist/services/runtime/mcp-shims/searxng-shim.js.map +1 -1
- package/dist/services/runtime/mcp-shims/write-mcp-entry.d.ts +20 -20
- package/dist/services/runtime/mcp-shims/write-mcp-entry.js +16 -16
- package/dist/services/runtime/mcp-shims/write-mcp-entry.js.map +1 -1
- package/dist/services/runtime/ownership-marker.d.ts +83 -0
- package/dist/services/runtime/ownership-marker.js +109 -0
- package/dist/services/runtime/ownership-marker.js.map +1 -0
- package/dist/services/runtime/types.d.ts +23 -511
- package/dist/services/runtime/types.js +0 -12
- package/dist/services/runtime/types.js.map +1 -1
- package/dist/services/runtime/workload-compiler.d.ts +17 -0
- package/dist/services/runtime/workload-compiler.js +525 -0
- package/dist/services/runtime/workload-compiler.js.map +1 -0
- package/dist/services/runtime/workload-types.d.ts +11 -0
- package/dist/services/runtime/workload-types.js +2 -0
- package/dist/services/runtime/workload-types.js.map +1 -0
- package/dist/services/setup/core-manager.d.ts +50 -0
- package/dist/services/setup/core-manager.js +456 -0
- package/dist/services/setup/core-manager.js.map +1 -0
- package/dist/services/setup/plugin-installer.js +136 -0
- package/dist/services/setup/plugin-installer.js.map +1 -0
- package/dist/services/setup/setup-manager.d.ts +158 -0
- package/dist/services/setup/setup-manager.js +2768 -0
- package/dist/services/setup/setup-manager.js.map +1 -0
- package/dist/services/system/cli-command.d.ts +5 -0
- package/dist/services/system/cli-command.js +18 -0
- package/dist/services/system/cli-command.js.map +1 -0
- package/dist/services/system/macos-launchd.d.ts +100 -0
- package/dist/services/system/macos-launchd.js +312 -0
- package/dist/services/system/macos-launchd.js.map +1 -0
- package/dist/services/system/repair-orchestrator.d.ts +71 -0
- package/dist/services/system/repair-orchestrator.js +412 -0
- package/dist/services/system/repair-orchestrator.js.map +1 -0
- package/dist/services/system/system-monitor.js +96 -0
- package/dist/services/system/system-monitor.js.map +1 -0
- package/dist/services/system/system-ollama-provider.d.ts +14 -0
- package/dist/services/system/system-ollama-provider.js +129 -0
- package/dist/services/system/system-ollama-provider.js.map +1 -0
- package/dist/services/system/system-reconciler.d.ts +59 -0
- package/dist/services/system/system-reconciler.js +710 -0
- package/dist/services/system/system-reconciler.js.map +1 -0
- package/dist/services/system/update-manager.d.ts +43 -0
- package/dist/services/system/update-manager.js +315 -0
- package/dist/services/system/update-manager.js.map +1 -0
- package/dist/services/system/upgrade-finalize.d.ts +80 -0
- package/dist/services/system/upgrade-finalize.js +507 -0
- package/dist/services/system/upgrade-finalize.js.map +1 -0
- package/dist/services/tasks/registry.d.ts +44 -0
- package/dist/services/tasks/registry.js +90 -0
- package/dist/services/tasks/registry.js.map +1 -0
- package/dist/services/telemetry/activation.d.ts +8 -4
- package/dist/services/telemetry/activation.js +12 -8
- package/dist/services/telemetry/activation.js.map +1 -1
- package/dist/services/telemetry/device-fingerprint.js +6 -1
- package/dist/services/telemetry/device-fingerprint.js.map +1 -1
- package/dist/services/telemetry/heartbeat.d.ts +8 -4
- package/dist/services/telemetry/heartbeat.js +12 -8
- package/dist/services/telemetry/heartbeat.js.map +1 -1
- package/dist/services/workspaces/builder.d.ts +29 -0
- package/dist/services/workspaces/builder.js +186 -0
- package/dist/services/workspaces/builder.js.map +1 -0
- package/dist/types.d.ts +361 -72
- package/dist/utils/docker-inspect.d.ts +19 -0
- package/dist/utils/docker-inspect.js +74 -0
- package/dist/utils/docker-inspect.js.map +1 -0
- package/dist/utils/instance-lock.d.ts +2 -2
- package/dist/utils/instance-lock.js +2 -2
- package/dist/utils/sudo-askpass.d.ts +23 -0
- package/dist/utils/sudo-askpass.js +83 -0
- package/dist/utils/sudo-askpass.js.map +1 -0
- package/install/jishu-install.sh +627 -109
- package/install/jishu-uninstall.sh +48 -12
- package/install/post-install.sh +316 -93
- package/install/post-uninstall.sh +99 -9
- package/node_modules/@fastify/accept-negotiator/LICENSE +22 -0
- package/node_modules/@fastify/accept-negotiator/README.md +52 -0
- package/node_modules/@fastify/accept-negotiator/index.js +170 -0
- package/node_modules/@fastify/accept-negotiator/package.json +77 -0
- package/node_modules/@fastify/accept-negotiator/types/index.d.ts +17 -0
- package/node_modules/@fastify/ajv-compiler/.gitattributes +2 -0
- package/node_modules/@fastify/ajv-compiler/.github/.stale.yml +21 -0
- package/node_modules/@fastify/ajv-compiler/.github/dependabot.yml +13 -0
- package/node_modules/@fastify/ajv-compiler/.github/tests_checker.yml +8 -0
- package/node_modules/@fastify/ajv-compiler/.github/workflows/ci.yml +33 -0
- package/node_modules/@fastify/ajv-compiler/LICENSE +23 -0
- package/node_modules/@fastify/ajv-compiler/README.md +237 -0
- package/node_modules/@fastify/ajv-compiler/benchmark/small-object.mjs +37 -0
- package/node_modules/@fastify/ajv-compiler/eslint.config.js +6 -0
- package/node_modules/@fastify/ajv-compiler/index.js +53 -0
- package/node_modules/@fastify/ajv-compiler/lib/default-ajv-options.js +14 -0
- package/node_modules/@fastify/ajv-compiler/lib/serializer-compiler.js +27 -0
- package/node_modules/@fastify/ajv-compiler/lib/validator-compiler.js +58 -0
- package/node_modules/@fastify/ajv-compiler/package.json +84 -0
- package/node_modules/@fastify/ajv-compiler/standalone.js +44 -0
- package/node_modules/@fastify/ajv-compiler/test/.gitkeep +0 -0
- package/node_modules/@fastify/ajv-compiler/test/duplicated-id-compile.test.js +55 -0
- package/node_modules/@fastify/ajv-compiler/test/index.test.js +307 -0
- package/node_modules/@fastify/ajv-compiler/test/plugins.test.js +246 -0
- package/node_modules/@fastify/ajv-compiler/test/serialization.test.js +279 -0
- package/node_modules/@fastify/ajv-compiler/test/standalone.test.js +203 -0
- package/node_modules/@fastify/ajv-compiler/types/index.d.ts +87 -0
- package/node_modules/@fastify/ajv-compiler/types/index.test-d.ts +302 -0
- package/node_modules/@fastify/error/.gitattributes +2 -0
- package/node_modules/@fastify/error/.github/dependabot.yml +13 -0
- package/node_modules/@fastify/error/.github/workflows/ci.yml +28 -0
- package/node_modules/@fastify/error/LICENSE +21 -0
- package/node_modules/@fastify/error/README.md +140 -0
- package/node_modules/@fastify/error/benchmarks/create.js +9 -0
- package/node_modules/@fastify/error/benchmarks/instantiate.js +18 -0
- package/node_modules/@fastify/error/benchmarks/no-stack.js +13 -0
- package/node_modules/@fastify/error/benchmarks/toString.js +11 -0
- package/node_modules/@fastify/error/eslint.config.js +6 -0
- package/node_modules/@fastify/error/index.js +100 -0
- package/node_modules/@fastify/error/package.json +75 -0
- package/node_modules/@fastify/error/test/index.test.js +232 -0
- package/node_modules/@fastify/error/test/instanceof.test.js +263 -0
- package/node_modules/@fastify/error/types/index.d.ts +49 -0
- package/node_modules/@fastify/error/types/index.test-d.ts +92 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/.eslintrc +1 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/.gitattributes +2 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/.github/dependabot.yml +13 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/.github/workflows/ci.yml +28 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/LICENSE +21 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/README.md +128 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/eslint.config.js +6 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/index.js +8 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/package.json +71 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/standalone.js +58 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/test/duplicate-schema.test.js +26 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/test/plugin.test.js +78 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/test/standalone.test.js +230 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/types/index.d.ts +41 -0
- package/node_modules/@fastify/fast-json-stringify-compiler/types/index.test-d.ts +142 -0
- package/node_modules/@fastify/forwarded/LICENSE +24 -0
- package/node_modules/@fastify/forwarded/README.md +43 -0
- package/node_modules/@fastify/forwarded/index.js +59 -0
- package/node_modules/@fastify/forwarded/package.json +74 -0
- package/node_modules/@fastify/forwarded/types/index.d.ts +14 -0
- package/node_modules/@fastify/merge-json-schemas/.gitattributes +2 -0
- package/node_modules/@fastify/merge-json-schemas/.github/dependabot.yml +13 -0
- package/node_modules/@fastify/merge-json-schemas/.github/workflows/ci.yml +23 -0
- package/node_modules/@fastify/merge-json-schemas/LICENSE +21 -0
- package/node_modules/@fastify/merge-json-schemas/README.md +119 -0
- package/node_modules/@fastify/merge-json-schemas/eslint.config.js +6 -0
- package/node_modules/@fastify/merge-json-schemas/index.js +357 -0
- package/node_modules/@fastify/merge-json-schemas/lib/errors.js +36 -0
- package/node_modules/@fastify/merge-json-schemas/lib/resolvers.js +127 -0
- package/node_modules/@fastify/merge-json-schemas/package.json +67 -0
- package/node_modules/@fastify/merge-json-schemas/test/additional-items.test.js +164 -0
- package/node_modules/@fastify/merge-json-schemas/test/additional-properties.test.js +129 -0
- package/node_modules/@fastify/merge-json-schemas/test/all-of.test.js +43 -0
- package/node_modules/@fastify/merge-json-schemas/test/any-of.test.js +81 -0
- package/node_modules/@fastify/merge-json-schemas/test/const.test.js +58 -0
- package/node_modules/@fastify/merge-json-schemas/test/contains.test.js +55 -0
- package/node_modules/@fastify/merge-json-schemas/test/custom-resolvers.test.js +50 -0
- package/node_modules/@fastify/merge-json-schemas/test/default-resolver.test.js +111 -0
- package/node_modules/@fastify/merge-json-schemas/test/default.test.js +50 -0
- package/node_modules/@fastify/merge-json-schemas/test/definitions.test.js +46 -0
- package/node_modules/@fastify/merge-json-schemas/test/defs.test.js +46 -0
- package/node_modules/@fastify/merge-json-schemas/test/dependencies.test.js +75 -0
- package/node_modules/@fastify/merge-json-schemas/test/dependent-required.test.js +75 -0
- package/node_modules/@fastify/merge-json-schemas/test/dependent-schemas.test.js +76 -0
- package/node_modules/@fastify/merge-json-schemas/test/enum.test.js +44 -0
- package/node_modules/@fastify/merge-json-schemas/test/exclusive-maximum.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/exclusive-minimum.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/format.test.js +36 -0
- package/node_modules/@fastify/merge-json-schemas/test/id.test.js +22 -0
- package/node_modules/@fastify/merge-json-schemas/test/if-then-else.test.js +550 -0
- package/node_modules/@fastify/merge-json-schemas/test/items.test.js +152 -0
- package/node_modules/@fastify/merge-json-schemas/test/max-items.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/max-length.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/max-properties.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/maximum.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/merge-schema.test.js +29 -0
- package/node_modules/@fastify/merge-json-schemas/test/min-items.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/min-length.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/min-properties.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/minimum.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/multiple-of.test.js +36 -0
- package/node_modules/@fastify/merge-json-schemas/test/not.test.js +29 -0
- package/node_modules/@fastify/merge-json-schemas/test/nullable.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/one-of.test.js +144 -0
- package/node_modules/@fastify/merge-json-schemas/test/properties.test.js +312 -0
- package/node_modules/@fastify/merge-json-schemas/test/property-names.test.js +49 -0
- package/node_modules/@fastify/merge-json-schemas/test/required.test.js +30 -0
- package/node_modules/@fastify/merge-json-schemas/test/type.test.js +52 -0
- package/node_modules/@fastify/merge-json-schemas/test/unique-items.test.js +38 -0
- package/node_modules/@fastify/merge-json-schemas/test/utils.js +9 -0
- package/node_modules/@fastify/merge-json-schemas/types/index.d.ts +61 -0
- package/node_modules/@fastify/merge-json-schemas/types/index.test-d.ts +52 -0
- package/node_modules/@fastify/proxy-addr/.gitattributes +2 -0
- package/node_modules/@fastify/proxy-addr/.github/dependabot.yml +13 -0
- package/node_modules/@fastify/proxy-addr/.github/stale.yml +21 -0
- package/node_modules/@fastify/proxy-addr/.github/workflows/ci.yml +28 -0
- package/node_modules/@fastify/proxy-addr/LICENSE +24 -0
- package/node_modules/@fastify/proxy-addr/README.md +141 -0
- package/node_modules/@fastify/proxy-addr/benchmark/compiling.js +50 -0
- package/node_modules/@fastify/proxy-addr/benchmark/index.js +30 -0
- package/node_modules/@fastify/proxy-addr/benchmark/kind.js +57 -0
- package/node_modules/@fastify/proxy-addr/benchmark/matching.js +78 -0
- package/node_modules/@fastify/proxy-addr/eslint.config.js +6 -0
- package/node_modules/@fastify/proxy-addr/index.js +331 -0
- package/node_modules/@fastify/proxy-addr/package.json +73 -0
- package/node_modules/@fastify/proxy-addr/test/all.test.js +55 -0
- package/node_modules/@fastify/proxy-addr/test/base.test.js +365 -0
- package/node_modules/@fastify/proxy-addr/test/compile.test.js +58 -0
- package/node_modules/@fastify/proxy-addr/types/index.d.ts +18 -0
- package/node_modules/@fastify/proxy-addr/types/index.test-d.ts +27 -0
- package/node_modules/@fastify/send/.gitattributes +2 -0
- package/node_modules/@fastify/send/.github/dependabot.yml +13 -0
- package/node_modules/@fastify/send/.github/workflows/ci.yml +28 -0
- package/node_modules/@fastify/send/HISTORY.md +521 -0
- package/node_modules/@fastify/send/LICENSE +23 -0
- package/node_modules/@fastify/send/README.md +310 -0
- package/node_modules/@fastify/send/benchmarks/collapseLeadingSlashes.js +13 -0
- package/node_modules/@fastify/send/benchmarks/containsDotFile.js +15 -0
- package/node_modules/@fastify/send/benchmarks/isUtf8MimeType.js +23 -0
- package/node_modules/@fastify/send/benchmarks/normalizeList.js +14 -0
- package/node_modules/@fastify/send/benchmarks/parseBytesRange.js +15 -0
- package/node_modules/@fastify/send/eslint.config.js +6 -0
- package/node_modules/@fastify/send/examples/index.html +1 -0
- package/node_modules/@fastify/send/examples/simple.js +15 -0
- package/node_modules/@fastify/send/index.js +28 -0
- package/node_modules/@fastify/send/lib/collapseLeadingSlashes.js +25 -0
- package/node_modules/@fastify/send/lib/containsDotFile.js +23 -0
- package/node_modules/@fastify/send/lib/contentRange.js +18 -0
- package/node_modules/@fastify/send/lib/createHtmlDocument.js +29 -0
- package/node_modules/@fastify/send/lib/createHttpError.js +23 -0
- package/node_modules/@fastify/send/lib/isUtf8MimeType.js +12 -0
- package/node_modules/@fastify/send/lib/normalizeList.js +28 -0
- package/node_modules/@fastify/send/lib/parseBytesRange.js +133 -0
- package/node_modules/@fastify/send/lib/parseTokenList.js +46 -0
- package/node_modules/@fastify/send/lib/send.js +729 -0
- package/node_modules/@fastify/send/package.json +81 -0
- package/node_modules/@fastify/send/test/collapseLeadingSlashes.test.js +22 -0
- package/node_modules/@fastify/send/test/containsDotFile.test.js +18 -0
- package/node_modules/@fastify/send/test/fixtures/.hidden.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/.mine/.hidden.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/.mine/name.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/do..ts.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/empty.txt +0 -0
- package/node_modules/@fastify/send/test/fixtures/images/node-js.png +0 -0
- package/node_modules/@fastify/send/test/fixtures/name.d/name.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/name.dir/name.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/name.html +1 -0
- package/node_modules/@fastify/send/test/fixtures/name.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/no_ext +1 -0
- package/node_modules/@fastify/send/test/fixtures/nums.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/pets/.hidden.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/pets/index.html +3 -0
- package/node_modules/@fastify/send/test/fixtures/snow /342/230/203/index.html +0 -0
- package/node_modules/@fastify/send/test/fixtures/some thing.txt +1 -0
- package/node_modules/@fastify/send/test/fixtures/thing.html.html +1 -0
- package/node_modules/@fastify/send/test/fixtures/tobi.html +1 -0
- package/node_modules/@fastify/send/test/isUtf8MimeType.test.js +22 -0
- package/node_modules/@fastify/send/test/mime.test.js +56 -0
- package/node_modules/@fastify/send/test/normalizeList.test.js +28 -0
- package/node_modules/@fastify/send/test/parseBytesRange.test.js +103 -0
- package/node_modules/@fastify/send/test/send.1.test.js +646 -0
- package/node_modules/@fastify/send/test/send.2.test.js +977 -0
- package/node_modules/@fastify/send/test/send.3.test.js +133 -0
- package/node_modules/@fastify/send/test/utils.js +36 -0
- package/node_modules/@fastify/send/types/index.d.ts +167 -0
- package/node_modules/@fastify/send/types/index.test-d.ts +67 -0
- package/node_modules/@fastify/static/.gitattributes +5 -0
- package/node_modules/@fastify/static/.github/dependabot.yml +13 -0
- package/node_modules/@fastify/static/.github/workflows/ci.yml +33 -0
- package/node_modules/@fastify/static/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/@fastify/static/LICENSE +21 -0
- package/node_modules/@fastify/static/README.md +538 -0
- package/node_modules/@fastify/static/eslint.config.js +7 -0
- package/node_modules/@fastify/static/example/public/.hidden/sample.json +1 -0
- package/node_modules/@fastify/static/example/public/images/sample.jpg +0 -0
- package/node_modules/@fastify/static/example/public/index.css +9 -0
- package/node_modules/@fastify/static/example/public/index.html +11 -0
- package/node_modules/@fastify/static/example/public/index.js +8 -0
- package/node_modules/@fastify/static/example/public2/test.css +4 -0
- package/node_modules/@fastify/static/example/public2/test.html +8 -0
- package/node_modules/@fastify/static/example/server-benchmark.js +39 -0
- package/node_modules/@fastify/static/example/server-compress.js +15 -0
- package/node_modules/@fastify/static/example/server-dir-list.js +38 -0
- package/node_modules/@fastify/static/example/server-hidden-file.js +15 -0
- package/node_modules/@fastify/static/example/server.js +13 -0
- package/node_modules/@fastify/static/index.js +726 -0
- package/node_modules/@fastify/static/lib/dirList.js +225 -0
- package/node_modules/@fastify/static/package.json +89 -0
- package/node_modules/@fastify/static/test/content-type/binary +0 -0
- package/node_modules/@fastify/static/test/content-type/binary.br +1 -0
- package/node_modules/@fastify/static/test/content-type/index.css +0 -0
- package/node_modules/@fastify/static/test/content-type/index.css.br +1 -0
- package/node_modules/@fastify/static/test/content-type/index.html +5 -0
- package/node_modules/@fastify/static/test/content-type/index.html.br +0 -0
- package/node_modules/@fastify/static/test/content-type/sample.jpg +0 -0
- package/node_modules/@fastify/static/test/content-type/test.txt +0 -0
- package/node_modules/@fastify/static/test/content-type/test.txt.br +1 -0
- package/node_modules/@fastify/static/test/content-type.test.js +144 -0
- package/node_modules/@fastify/static/test/dir-list.test.js +820 -0
- package/node_modules/@fastify/static/test/static/.example +1 -0
- package/node_modules/@fastify/static/test/static/100%.txt +1 -0
- package/node_modules/@fastify/static/test/static/a .md +1 -0
- package/node_modules/@fastify/static/test/static/deep/path/for/test/index.html +5 -0
- package/node_modules/@fastify/static/test/static/deep/path/for/test/purpose/foo.html +5 -0
- package/node_modules/@fastify/static/test/static/foo.html +3 -0
- package/node_modules/@fastify/static/test/static/foobar.html +3 -0
- package/node_modules/@fastify/static/test/static/index.css +0 -0
- package/node_modules/@fastify/static/test/static/index.html +5 -0
- package/node_modules/@fastify/static/test/static/shallow/sample.jpg +0 -0
- package/node_modules/@fastify/static/test/static-dotfiles/.aaa +0 -0
- package/node_modules/@fastify/static/test/static-dotfiles/dir/index.html +0 -0
- package/node_modules/@fastify/static/test/static-dotfiles/test.txt +0 -0
- package/node_modules/@fastify/static/test/static-encode/[...]/a .md +1 -0
- package/node_modules/@fastify/static/test/static-filtered/bar.private +1 -0
- package/node_modules/@fastify/static/test/static-filtered/deep/path/to/baz.html +3 -0
- package/node_modules/@fastify/static/test/static-filtered/deep/path/to/baz.private +1 -0
- package/node_modules/@fastify/static/test/static-filtered/index.html +3 -0
- package/node_modules/@fastify/static/test/static-hidden/.hidden/sample.json +1 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/all-three.html +5 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/all-three.html.br +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/all-three.html.gz +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/baz.json +3 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/dir/index.html +5 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/dir/index.html.br +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/dir-gz/index.html +5 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/dir-gz/index.html.gz +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/empty/.gitkeep +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/gzip-only.html +3 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/gzip-only.html.gz +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/index.html +5 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/index.html.br +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/sample.jpg +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/sample.jpg.br +0 -0
- package/node_modules/@fastify/static/test/static-pre-compressed/uncompressed.html +3 -0
- package/node_modules/@fastify/static/test/static-symbolic-link/origin/subdir/subdir/index.html +3 -0
- package/node_modules/@fastify/static/test/static.test.js +4115 -0
- package/node_modules/@fastify/static/test/static2/bar.html +3 -0
- package/node_modules/@fastify/static/test/static2/index.html +3 -0
- package/node_modules/@fastify/static/types/index.d.ts +136 -0
- package/node_modules/@fastify/static/types/index.test-d.ts +240 -0
- package/node_modules/@lukeed/ms/dist/index.js +37 -0
- package/node_modules/@lukeed/ms/dist/index.min.js +1 -0
- package/node_modules/@lukeed/ms/dist/index.mjs +34 -0
- package/node_modules/@lukeed/ms/index.d.ts +2 -0
- package/node_modules/@lukeed/ms/license +9 -0
- package/node_modules/@lukeed/ms/package.json +48 -0
- package/node_modules/@lukeed/ms/readme.md +133 -0
- package/node_modules/@pinojs/redact/.github/dependabot.yml +13 -0
- package/node_modules/@pinojs/redact/.github/workflows/ci.yml +48 -0
- package/node_modules/@pinojs/redact/.github/workflows/publish-release.yml +43 -0
- package/node_modules/@pinojs/redact/LICENSE +21 -0
- package/node_modules/@pinojs/redact/README.md +350 -0
- package/node_modules/@pinojs/redact/benchmarks/basic.js +184 -0
- package/node_modules/@pinojs/redact/eslint.config.js +1 -0
- package/node_modules/@pinojs/redact/index.d.ts +52 -0
- package/node_modules/@pinojs/redact/index.js +529 -0
- package/node_modules/@pinojs/redact/index.test-d.ts +22 -0
- package/node_modules/@pinojs/redact/package.json +37 -0
- package/node_modules/@pinojs/redact/scripts/sync-version.mjs +20 -0
- package/node_modules/@pinojs/redact/test/actual-redact-comparison.test.js +211 -0
- package/node_modules/@pinojs/redact/test/index.test.js +824 -0
- package/node_modules/@pinojs/redact/test/integration.test.js +390 -0
- package/node_modules/@pinojs/redact/test/multiple-wildcards.test.js +227 -0
- package/node_modules/@pinojs/redact/test/prototype-pollution.test.js +223 -0
- package/node_modules/@pinojs/redact/test/selective-clone.test.js +115 -0
- package/node_modules/@pinojs/redact/tsconfig.json +19 -0
- package/node_modules/abstract-logging/Readme.md +47 -0
- package/node_modules/abstract-logging/index.js +18 -0
- package/node_modules/abstract-logging/package.json +25 -0
- package/node_modules/abstract-logging/test.js +17 -0
- package/node_modules/ajv/.runkit_example.js +23 -0
- package/node_modules/ajv/LICENSE +22 -0
- package/node_modules/ajv/README.md +207 -0
- package/node_modules/ajv/dist/2019.d.ts +19 -0
- package/node_modules/ajv/dist/2019.js +61 -0
- package/node_modules/ajv/dist/2019.js.map +1 -0
- package/node_modules/ajv/dist/2020.d.ts +19 -0
- package/node_modules/ajv/dist/2020.js +55 -0
- package/node_modules/ajv/dist/2020.js.map +1 -0
- package/node_modules/ajv/dist/ajv.d.ts +18 -0
- package/node_modules/ajv/dist/ajv.js +50 -0
- package/node_modules/ajv/dist/ajv.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
- package/node_modules/ajv/dist/compile/codegen/code.js +156 -0
- package/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
- package/node_modules/ajv/dist/compile/codegen/index.js +697 -0
- package/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
- package/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
- package/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
- package/node_modules/ajv/dist/compile/errors.d.ts +13 -0
- package/node_modules/ajv/dist/compile/errors.js +123 -0
- package/node_modules/ajv/dist/compile/errors.js.map +1 -0
- package/node_modules/ajv/dist/compile/index.d.ts +80 -0
- package/node_modules/ajv/dist/compile/index.js +242 -0
- package/node_modules/ajv/dist/compile/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
- package/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
- package/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
- package/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -0
- package/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
- package/node_modules/ajv/dist/compile/jtd/types.js +14 -0
- package/node_modules/ajv/dist/compile/jtd/types.js.map +1 -0
- package/node_modules/ajv/dist/compile/names.d.ts +20 -0
- package/node_modules/ajv/dist/compile/names.js +28 -0
- package/node_modules/ajv/dist/compile/names.js.map +1 -0
- package/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
- package/node_modules/ajv/dist/compile/ref_error.js +12 -0
- package/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
- package/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
- package/node_modules/ajv/dist/compile/resolve.js +155 -0
- package/node_modules/ajv/dist/compile/resolve.js.map +1 -0
- package/node_modules/ajv/dist/compile/rules.d.ts +28 -0
- package/node_modules/ajv/dist/compile/rules.js +26 -0
- package/node_modules/ajv/dist/compile/rules.js.map +1 -0
- package/node_modules/ajv/dist/compile/util.d.ts +40 -0
- package/node_modules/ajv/dist/compile/util.js +178 -0
- package/node_modules/ajv/dist/compile/util.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
- package/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
- package/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
- package/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
- package/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
- package/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
- package/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
- package/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
- package/node_modules/ajv/dist/compile/validate/index.js +520 -0
- package/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
- package/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
- package/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
- package/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
- package/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
- package/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
- package/node_modules/ajv/dist/core.d.ts +174 -0
- package/node_modules/ajv/dist/core.js +618 -0
- package/node_modules/ajv/dist/core.js.map +1 -0
- package/node_modules/ajv/dist/jtd.d.ts +47 -0
- package/node_modules/ajv/dist/jtd.js +72 -0
- package/node_modules/ajv/dist/jtd.js.map +1 -0
- package/node_modules/ajv/dist/refs/data.json +13 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +1 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +1 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
- package/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
- package/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
- package/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
- package/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
- package/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
- package/node_modules/ajv/dist/refs/jtd-schema.js.map +1 -0
- package/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/equal.js +7 -0
- package/node_modules/ajv/dist/runtime/equal.js.map +1 -0
- package/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
- package/node_modules/ajv/dist/runtime/parseJson.js +185 -0
- package/node_modules/ajv/dist/runtime/parseJson.js.map +1 -0
- package/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/quote.js +30 -0
- package/node_modules/ajv/dist/runtime/quote.js.map +1 -0
- package/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/re2.js +6 -0
- package/node_modules/ajv/dist/runtime/re2.js.map +1 -0
- package/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/timestamp.js +42 -0
- package/node_modules/ajv/dist/runtime/timestamp.js.map +1 -0
- package/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
- package/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
- package/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
- package/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
- package/node_modules/ajv/dist/runtime/uri.js +6 -0
- package/node_modules/ajv/dist/runtime/uri.js.map +1 -0
- package/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
- package/node_modules/ajv/dist/runtime/validation_error.js +11 -0
- package/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
- package/node_modules/ajv/dist/standalone/index.d.ts +6 -0
- package/node_modules/ajv/dist/standalone/index.js +90 -0
- package/node_modules/ajv/dist/standalone/index.js.map +1 -0
- package/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
- package/node_modules/ajv/dist/standalone/instance.js +35 -0
- package/node_modules/ajv/dist/standalone/instance.js.map +1 -0
- package/node_modules/ajv/dist/types/index.d.ts +183 -0
- package/node_modules/ajv/dist/types/index.js +3 -0
- package/node_modules/ajv/dist/types/index.js.map +1 -0
- package/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
- package/node_modules/ajv/dist/types/json-schema.js +3 -0
- package/node_modules/ajv/dist/types/json-schema.js.map +1 -0
- package/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
- package/node_modules/ajv/dist/types/jtd-schema.js +3 -0
- package/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
- package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
- package/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
- package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
- package/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
- package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
- package/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
- package/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
- package/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
- package/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
- package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
- package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
- package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
- package/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
- package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
- package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
- package/node_modules/ajv/dist/vocabularies/code.js +131 -0
- package/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
- package/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
- package/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
- package/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
- package/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
- package/node_modules/ajv/dist/vocabularies/draft2020.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
- package/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
- package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/errors.js +3 -0
- package/node_modules/ajv/dist/vocabularies/errors.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
- package/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
- package/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
- package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
- package/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
- package/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
- package/node_modules/ajv/dist/vocabularies/jtd/error.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
- package/node_modules/ajv/dist/vocabularies/jtd/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
- package/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
- package/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
- package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
- package/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
- package/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
- package/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
- package/node_modules/ajv/dist/vocabularies/jtd/union.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
- package/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
- package/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/next.js +8 -0
- package/node_modules/ajv/dist/vocabularies/next.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
- package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
- package/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
- package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
- package/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
- package/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
- package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
- package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
- package/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
- package/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
- package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
- package/node_modules/ajv/lib/2019.ts +81 -0
- package/node_modules/ajv/lib/2020.ts +75 -0
- package/node_modules/ajv/lib/ajv.ts +70 -0
- package/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
- package/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
- package/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
- package/node_modules/ajv/lib/compile/errors.ts +184 -0
- package/node_modules/ajv/lib/compile/index.ts +324 -0
- package/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
- package/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
- package/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
- package/node_modules/ajv/lib/compile/names.ts +27 -0
- package/node_modules/ajv/lib/compile/ref_error.ts +13 -0
- package/node_modules/ajv/lib/compile/resolve.ts +149 -0
- package/node_modules/ajv/lib/compile/rules.ts +50 -0
- package/node_modules/ajv/lib/compile/util.ts +213 -0
- package/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
- package/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
- package/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
- package/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
- package/node_modules/ajv/lib/compile/validate/index.ts +582 -0
- package/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
- package/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
- package/node_modules/ajv/lib/core.ts +892 -0
- package/node_modules/ajv/lib/jtd.ts +132 -0
- package/node_modules/ajv/lib/refs/data.json +13 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
- package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
- package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
- package/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
- package/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
- package/node_modules/ajv/lib/runtime/equal.ts +7 -0
- package/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
- package/node_modules/ajv/lib/runtime/quote.ts +31 -0
- package/node_modules/ajv/lib/runtime/re2.ts +6 -0
- package/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
- package/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
- package/node_modules/ajv/lib/runtime/uri.ts +6 -0
- package/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
- package/node_modules/ajv/lib/standalone/index.ts +100 -0
- package/node_modules/ajv/lib/standalone/instance.ts +36 -0
- package/node_modules/ajv/lib/types/index.ts +244 -0
- package/node_modules/ajv/lib/types/json-schema.ts +187 -0
- package/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
- package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
- package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
- package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
- package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
- package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
- package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
- package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
- package/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
- package/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
- package/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
- package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
- package/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
- package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
- package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
- package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
- package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
- package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
- package/node_modules/ajv/lib/vocabularies/code.ts +168 -0
- package/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
- package/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
- package/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
- package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
- package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
- package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
- package/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
- package/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
- package/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
- package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
- package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
- package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
- package/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
- package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
- package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
- package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
- package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
- package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
- package/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
- package/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
- package/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
- package/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
- package/node_modules/ajv/lib/vocabularies/next.ts +8 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
- package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
- package/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
- package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
- package/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
- package/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
- package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
- package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
- package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
- package/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
- package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
- package/node_modules/ajv/package.json +127 -0
- package/node_modules/ajv-formats/LICENSE +21 -0
- package/node_modules/ajv-formats/README.md +125 -0
- package/node_modules/ajv-formats/dist/formats.d.ts +9 -0
- package/node_modules/ajv-formats/dist/formats.js +208 -0
- package/node_modules/ajv-formats/dist/formats.js.map +1 -0
- package/node_modules/ajv-formats/dist/index.d.ts +15 -0
- package/node_modules/ajv-formats/dist/index.js +37 -0
- package/node_modules/ajv-formats/dist/index.js.map +1 -0
- package/node_modules/ajv-formats/dist/limit.d.ts +10 -0
- package/node_modules/ajv-formats/dist/limit.js +69 -0
- package/node_modules/ajv-formats/dist/limit.js.map +1 -0
- package/node_modules/ajv-formats/package.json +74 -0
- package/node_modules/ajv-formats/src/formats.ts +269 -0
- package/node_modules/ajv-formats/src/index.ts +62 -0
- package/node_modules/ajv-formats/src/limit.ts +99 -0
- package/node_modules/atomic-sleep/.travis.yml +11 -0
- package/node_modules/atomic-sleep/LICENSE +22 -0
- package/node_modules/atomic-sleep/index.js +38 -0
- package/node_modules/atomic-sleep/package.json +37 -0
- package/node_modules/atomic-sleep/readme.md +58 -0
- package/node_modules/atomic-sleep/test.js +47 -0
- package/node_modules/avvio/.borp.yaml +2 -0
- package/node_modules/avvio/.gitattributes +2 -0
- package/node_modules/avvio/.github/dependabot.yml +13 -0
- package/node_modules/avvio/.github/release-drafter.yml +4 -0
- package/node_modules/avvio/.github/workflows/ci.yml +33 -0
- package/node_modules/avvio/LICENSE +24 -0
- package/node_modules/avvio/README.md +700 -0
- package/node_modules/avvio/boot.js +621 -0
- package/node_modules/avvio/eslint.config.js +6 -0
- package/node_modules/avvio/examples/example.js +72 -0
- package/node_modules/avvio/index.d.ts +95 -0
- package/node_modules/avvio/lib/create-promise.js +45 -0
- package/node_modules/avvio/lib/debug.js +19 -0
- package/node_modules/avvio/lib/errors.js +38 -0
- package/node_modules/avvio/lib/execute-with-thenable.js +36 -0
- package/node_modules/avvio/lib/get-plugin-name.js +34 -0
- package/node_modules/avvio/lib/is-bundled-or-typescript-plugin.js +23 -0
- package/node_modules/avvio/lib/is-promise-like.js +17 -0
- package/node_modules/avvio/lib/plugin.js +279 -0
- package/node_modules/avvio/lib/symbols.js +26 -0
- package/node_modules/avvio/lib/thenify.js +60 -0
- package/node_modules/avvio/lib/time-tree.js +200 -0
- package/node_modules/avvio/lib/validate-plugin.js +26 -0
- package/node_modules/avvio/package.json +74 -0
- package/node_modules/avvio/test/after-and-ready.test.js +903 -0
- package/node_modules/avvio/test/after-pass-through.test.js +33 -0
- package/node_modules/avvio/test/after-self-promise.test.js +20 -0
- package/node_modules/avvio/test/after-throw.test.js +26 -0
- package/node_modules/avvio/test/after-use-after.test.js +87 -0
- package/node_modules/avvio/test/async-await.test.js +323 -0
- package/node_modules/avvio/test/await-after.test.js +448 -0
- package/node_modules/avvio/test/await-self.test.js +31 -0
- package/node_modules/avvio/test/await-use.test.js +295 -0
- package/node_modules/avvio/test/basic.test.js +459 -0
- package/node_modules/avvio/test/callbacks.test.js +116 -0
- package/node_modules/avvio/test/catch-override-exception.test.js +27 -0
- package/node_modules/avvio/test/chainable.test.js +70 -0
- package/node_modules/avvio/test/close.test.js +562 -0
- package/node_modules/avvio/test/errors.test.js +26 -0
- package/node_modules/avvio/test/esm.mjs +12 -0
- package/node_modules/avvio/test/esm.test.js +8 -0
- package/node_modules/avvio/test/events-listeners.test.js +23 -0
- package/node_modules/avvio/test/expose.test.js +76 -0
- package/node_modules/avvio/test/fixtures/dummy.txt +1 -0
- package/node_modules/avvio/test/fixtures/esm.mjs +3 -0
- package/node_modules/avvio/test/fixtures/plugin-no-next.js +5 -0
- package/node_modules/avvio/test/gh-issues/bug-205.test.js +17 -0
- package/node_modules/avvio/test/lib/create-promise.test.js +56 -0
- package/node_modules/avvio/test/lib/execute-with-thenable.test.js +86 -0
- package/node_modules/avvio/test/lib/get-plugin-name.test.js +67 -0
- package/node_modules/avvio/test/lib/is-bundled-or-typescript-plugin.test.js +20 -0
- package/node_modules/avvio/test/lib/is-promise-like.test.js +20 -0
- package/node_modules/avvio/test/lib/thenify.test.js +140 -0
- package/node_modules/avvio/test/lib/time-tree.test.js +391 -0
- package/node_modules/avvio/test/lib/validate-plugin.test.js +19 -0
- package/node_modules/avvio/test/load-plugin.test.js +132 -0
- package/node_modules/avvio/test/no-done.test.js +19 -0
- package/node_modules/avvio/test/on-ready-timeout-await.test.js +33 -0
- package/node_modules/avvio/test/override.test.js +385 -0
- package/node_modules/avvio/test/plugin-loaded-so-far.test.js +81 -0
- package/node_modules/avvio/test/plugin-name.test.js +58 -0
- package/node_modules/avvio/test/plugin-timeout-await.test.js +33 -0
- package/node_modules/avvio/test/plugin-timeout.test.js +227 -0
- package/node_modules/avvio/test/pretty-print.test.js +76 -0
- package/node_modules/avvio/test/reentrant.test.js +126 -0
- package/node_modules/avvio/test/symbol-async-dispose.test.js +28 -0
- package/node_modules/avvio/test/to-json.test.js +130 -0
- package/node_modules/avvio/test/twice-done.test.js +23 -0
- package/node_modules/avvio/test/types/index.ts +412 -0
- package/node_modules/avvio/test/types/tsconfig.json +9 -0
- package/node_modules/balanced-match/LICENSE.md +23 -0
- package/node_modules/balanced-match/README.md +57 -0
- package/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
- package/node_modules/balanced-match/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/node_modules/balanced-match/dist/commonjs/index.js.map +1 -0
- package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
- package/node_modules/balanced-match/dist/esm/index.d.ts.map +1 -0
- package/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/node_modules/balanced-match/dist/esm/index.js.map +1 -0
- package/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/node_modules/balanced-match/package.json +68 -0
- package/node_modules/brace-expansion/LICENSE +23 -0
- package/node_modules/brace-expansion/README.md +94 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +6 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +201 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
- package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts +6 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
- package/node_modules/brace-expansion/dist/esm/index.js +197 -0
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
- package/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/brace-expansion/package.json +64 -0
- package/node_modules/content-disposition/LICENSE +22 -0
- package/node_modules/content-disposition/README.md +141 -0
- package/node_modules/content-disposition/index.js +536 -0
- package/node_modules/content-disposition/package.json +40 -0
- package/node_modules/cookie/LICENSE +24 -0
- package/node_modules/cookie/README.md +295 -0
- package/node_modules/cookie/dist/index.d.ts +148 -0
- package/node_modules/cookie/dist/index.js +350 -0
- package/node_modules/cookie/dist/index.js.map +1 -0
- package/node_modules/cookie/package.json +47 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/dequal/dist/index.js +86 -0
- package/node_modules/dequal/dist/index.min.js +1 -0
- package/node_modules/dequal/dist/index.mjs +84 -0
- package/node_modules/dequal/index.d.ts +1 -0
- package/node_modules/dequal/license +21 -0
- package/node_modules/dequal/lite/index.d.ts +1 -0
- package/node_modules/dequal/lite/index.js +31 -0
- package/node_modules/dequal/lite/index.min.js +1 -0
- package/node_modules/dequal/lite/index.mjs +29 -0
- package/node_modules/dequal/package.json +57 -0
- package/node_modules/dequal/readme.md +112 -0
- package/node_modules/escape-html/LICENSE +24 -0
- package/node_modules/escape-html/Readme.md +43 -0
- package/node_modules/escape-html/index.js +78 -0
- package/node_modules/escape-html/package.json +24 -0
- package/node_modules/fast-decode-uri-component/.travis.yml +12 -0
- package/node_modules/fast-decode-uri-component/LICENSE +23 -0
- package/node_modules/fast-decode-uri-component/README.md +43 -0
- package/node_modules/fast-decode-uri-component/bench.js +35 -0
- package/node_modules/fast-decode-uri-component/index.js +115 -0
- package/node_modules/fast-decode-uri-component/package.json +33 -0
- package/node_modules/fast-decode-uri-component/test.js +32 -0
- package/node_modules/fast-deep-equal/LICENSE +21 -0
- package/node_modules/fast-deep-equal/README.md +96 -0
- package/node_modules/fast-deep-equal/es6/index.d.ts +2 -0
- package/node_modules/fast-deep-equal/es6/index.js +72 -0
- package/node_modules/fast-deep-equal/es6/react.d.ts +2 -0
- package/node_modules/fast-deep-equal/es6/react.js +79 -0
- package/node_modules/fast-deep-equal/index.d.ts +4 -0
- package/node_modules/fast-deep-equal/index.js +46 -0
- package/node_modules/fast-deep-equal/package.json +61 -0
- package/node_modules/fast-deep-equal/react.d.ts +2 -0
- package/node_modules/fast-deep-equal/react.js +53 -0
- package/node_modules/fast-json-stringify/.gitattributes +2 -0
- package/node_modules/fast-json-stringify/.github/dependabot.yml +13 -0
- package/node_modules/fast-json-stringify/.github/workflows/ci.yml +33 -0
- package/node_modules/fast-json-stringify/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/fast-json-stringify/LICENSE +22 -0
- package/node_modules/fast-json-stringify/README.md +742 -0
- package/node_modules/fast-json-stringify/benchmark/bench-cmp-branch.js +116 -0
- package/node_modules/fast-json-stringify/benchmark/bench-cmp-lib.js +339 -0
- package/node_modules/fast-json-stringify/benchmark/bench-thread.js +33 -0
- package/node_modules/fast-json-stringify/benchmark/bench.js +391 -0
- package/node_modules/fast-json-stringify/build/build-schema-validator.js +26 -0
- package/node_modules/fast-json-stringify/eslint.config.js +9 -0
- package/node_modules/fast-json-stringify/examples/example.js +81 -0
- package/node_modules/fast-json-stringify/examples/server.js +42 -0
- package/node_modules/fast-json-stringify/index.js +1312 -0
- package/node_modules/fast-json-stringify/lib/location.js +24 -0
- package/node_modules/fast-json-stringify/lib/merge-schemas.js +9 -0
- package/node_modules/fast-json-stringify/lib/schema-validator.js +1134 -0
- package/node_modules/fast-json-stringify/lib/serializer.js +141 -0
- package/node_modules/fast-json-stringify/lib/standalone.js +34 -0
- package/node_modules/fast-json-stringify/lib/validator.js +96 -0
- package/node_modules/fast-json-stringify/package.json +89 -0
- package/node_modules/fast-json-stringify/test/additionalProperties.test.js +332 -0
- package/node_modules/fast-json-stringify/test/allof.test.js +751 -0
- package/node_modules/fast-json-stringify/test/any.test.js +231 -0
- package/node_modules/fast-json-stringify/test/anyof.test.js +812 -0
- package/node_modules/fast-json-stringify/test/array.test.js +688 -0
- package/node_modules/fast-json-stringify/test/asNumber.test.js +13 -0
- package/node_modules/fast-json-stringify/test/basic.test.js +400 -0
- package/node_modules/fast-json-stringify/test/bigint.test.js +76 -0
- package/node_modules/fast-json-stringify/test/clean-cache.test.js +47 -0
- package/node_modules/fast-json-stringify/test/const.test.js +314 -0
- package/node_modules/fast-json-stringify/test/date.test.js +639 -0
- package/node_modules/fast-json-stringify/test/debug-mode.test.js +142 -0
- package/node_modules/fast-json-stringify/test/defaults.test.js +376 -0
- package/node_modules/fast-json-stringify/test/enum.test.js +37 -0
- package/node_modules/fast-json-stringify/test/fix-604.test.js +25 -0
- package/node_modules/fast-json-stringify/test/fixtures/.keep +0 -0
- package/node_modules/fast-json-stringify/test/if-then-else.test.js +540 -0
- package/node_modules/fast-json-stringify/test/inferType.test.js +92 -0
- package/node_modules/fast-json-stringify/test/infinity.test.js +55 -0
- package/node_modules/fast-json-stringify/test/integer.test.js +194 -0
- package/node_modules/fast-json-stringify/test/invalidSchema.test.js +38 -0
- package/node_modules/fast-json-stringify/test/issue-479.test.js +57 -0
- package/node_modules/fast-json-stringify/test/issue-793.test.js +107 -0
- package/node_modules/fast-json-stringify/test/issue-794.test.js +177 -0
- package/node_modules/fast-json-stringify/test/issue-836.test.js +183 -0
- package/node_modules/fast-json-stringify/test/json-add-comma.test.js +57 -0
- package/node_modules/fast-json-stringify/test/json-schema-test-suite/README.md +10 -0
- package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft4/required.json +54 -0
- package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft4.test.js +12 -0
- package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft6/required.json +70 -0
- package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft6.test.js +12 -0
- package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft7/required.json +70 -0
- package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft7.test.js +12 -0
- package/node_modules/fast-json-stringify/test/json-schema-test-suite/util.js +31 -0
- package/node_modules/fast-json-stringify/test/missing-values.test.js +88 -0
- package/node_modules/fast-json-stringify/test/multi-type-serializer.test.js +19 -0
- package/node_modules/fast-json-stringify/test/nestedObjects.test.js +63 -0
- package/node_modules/fast-json-stringify/test/nullable.test.js +543 -0
- package/node_modules/fast-json-stringify/test/oneof.test.js +510 -0
- package/node_modules/fast-json-stringify/test/patternProperties.test.js +168 -0
- package/node_modules/fast-json-stringify/test/recursion.test.js +245 -0
- package/node_modules/fast-json-stringify/test/ref.json +12 -0
- package/node_modules/fast-json-stringify/test/ref.test.js +2077 -0
- package/node_modules/fast-json-stringify/test/regex.test.js +32 -0
- package/node_modules/fast-json-stringify/test/required.test.js +204 -0
- package/node_modules/fast-json-stringify/test/requiresAjv.test.js +50 -0
- package/node_modules/fast-json-stringify/test/sanitize.test.js +141 -0
- package/node_modules/fast-json-stringify/test/sanitize2.test.js +18 -0
- package/node_modules/fast-json-stringify/test/sanitize3.test.js +17 -0
- package/node_modules/fast-json-stringify/test/sanitize4.test.js +16 -0
- package/node_modules/fast-json-stringify/test/sanitize5.test.js +16 -0
- package/node_modules/fast-json-stringify/test/sanitize6.test.js +22 -0
- package/node_modules/fast-json-stringify/test/sanitize7.test.js +68 -0
- package/node_modules/fast-json-stringify/test/side-effect.test.js +196 -0
- package/node_modules/fast-json-stringify/test/standalone-mode.test.js +219 -0
- package/node_modules/fast-json-stringify/test/string.test.js +84 -0
- package/node_modules/fast-json-stringify/test/surrogate.test.js +67 -0
- package/node_modules/fast-json-stringify/test/toJSON.test.js +203 -0
- package/node_modules/fast-json-stringify/test/typebox.test.js +36 -0
- package/node_modules/fast-json-stringify/test/typesArray.test.js +550 -0
- package/node_modules/fast-json-stringify/test/unknownFormats.test.js +27 -0
- package/node_modules/fast-json-stringify/test/webpack.test.js +50 -0
- package/node_modules/fast-json-stringify/types/index.d.ts +231 -0
- package/node_modules/fast-json-stringify/types/index.tst.ts +259 -0
- package/node_modules/fast-querystring/LICENSE +25 -0
- package/node_modules/fast-querystring/README.md +114 -0
- package/node_modules/fast-querystring/lib/index.d.ts +14 -0
- package/node_modules/fast-querystring/lib/index.js +20 -0
- package/node_modules/fast-querystring/lib/internals/querystring.js +96 -0
- package/node_modules/fast-querystring/lib/parse.js +126 -0
- package/node_modules/fast-querystring/lib/stringify.js +69 -0
- package/node_modules/fast-querystring/package.json +56 -0
- package/node_modules/fast-uri/.gitattributes +2 -0
- package/node_modules/fast-uri/.github/dependabot.yml +13 -0
- package/node_modules/fast-uri/.github/workflows/ci.yml +106 -0
- package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +24 -0
- package/node_modules/fast-uri/LICENSE +30 -0
- package/node_modules/fast-uri/README.md +152 -0
- package/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
- package/node_modules/fast-uri/benchmark/equal.mjs +51 -0
- package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
- package/node_modules/fast-uri/benchmark/package.json +17 -0
- package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
- package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
- package/node_modules/fast-uri/eslint.config.js +6 -0
- package/node_modules/fast-uri/index.js +406 -0
- package/node_modules/fast-uri/lib/schemes.js +267 -0
- package/node_modules/fast-uri/lib/utils.js +443 -0
- package/node_modules/fast-uri/package.json +68 -0
- package/node_modules/fast-uri/test/ajv.test.js +43 -0
- package/node_modules/fast-uri/test/equal.test.js +117 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +501 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
- package/node_modules/fast-uri/test/parse.test.js +323 -0
- package/node_modules/fast-uri/test/resolve.test.js +87 -0
- package/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
- package/node_modules/fast-uri/test/security-normalization.test.js +39 -0
- package/node_modules/fast-uri/test/security.test.js +133 -0
- package/node_modules/fast-uri/test/serialize.test.js +151 -0
- package/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
- package/node_modules/fast-uri/test/uri-js.test.js +912 -0
- package/node_modules/fast-uri/test/util.test.js +38 -0
- package/node_modules/fast-uri/tsconfig.json +9 -0
- package/node_modules/fast-uri/types/index.d.ts +60 -0
- package/node_modules/fast-uri/types/index.test-d.ts +17 -0
- package/node_modules/fastify/.borp.yaml +3 -0
- package/node_modules/fastify/.markdownlint-cli2.yaml +22 -0
- package/node_modules/fastify/.prettierignore +1 -0
- package/node_modules/fastify/GOVERNANCE.md +4 -0
- package/node_modules/fastify/LICENSE +21 -0
- package/node_modules/fastify/PROJECT_CHARTER.md +126 -0
- package/node_modules/fastify/README.md +423 -0
- package/node_modules/fastify/SECURITY.md +220 -0
- package/node_modules/fastify/SPONSORS.md +24 -0
- package/node_modules/fastify/build/build-error-serializer.js +35 -0
- package/node_modules/fastify/build/build-validation.js +169 -0
- package/node_modules/fastify/build/sync-version.js +11 -0
- package/node_modules/fastify/docs/Guides/Benchmarking.md +60 -0
- package/node_modules/fastify/docs/Guides/Database.md +321 -0
- package/node_modules/fastify/docs/Guides/Delay-Accepting-Requests.md +608 -0
- package/node_modules/fastify/docs/Guides/Detecting-When-Clients-Abort.md +172 -0
- package/node_modules/fastify/docs/Guides/Ecosystem.md +730 -0
- package/node_modules/fastify/docs/Guides/Fluent-Schema.md +127 -0
- package/node_modules/fastify/docs/Guides/Getting-Started.md +620 -0
- package/node_modules/fastify/docs/Guides/Index.md +43 -0
- package/node_modules/fastify/docs/Guides/Migration-Guide-V3.md +287 -0
- package/node_modules/fastify/docs/Guides/Migration-Guide-V4.md +267 -0
- package/node_modules/fastify/docs/Guides/Migration-Guide-V5.md +727 -0
- package/node_modules/fastify/docs/Guides/Plugins-Guide.md +520 -0
- package/node_modules/fastify/docs/Guides/Prototype-Poisoning.md +383 -0
- package/node_modules/fastify/docs/Guides/Recommendations.md +378 -0
- package/node_modules/fastify/docs/Guides/Serverless.md +604 -0
- package/node_modules/fastify/docs/Guides/Style-Guide.md +246 -0
- package/node_modules/fastify/docs/Guides/Testing.md +481 -0
- package/node_modules/fastify/docs/Guides/Write-Plugin.md +103 -0
- package/node_modules/fastify/docs/Guides/Write-Type-Provider.md +34 -0
- package/node_modules/fastify/docs/Reference/ContentTypeParser.md +271 -0
- package/node_modules/fastify/docs/Reference/Decorators.md +436 -0
- package/node_modules/fastify/docs/Reference/Encapsulation.md +194 -0
- package/node_modules/fastify/docs/Reference/Errors.md +377 -0
- package/node_modules/fastify/docs/Reference/HTTP2.md +94 -0
- package/node_modules/fastify/docs/Reference/Hooks.md +958 -0
- package/node_modules/fastify/docs/Reference/Index.md +73 -0
- package/node_modules/fastify/docs/Reference/LTS.md +86 -0
- package/node_modules/fastify/docs/Reference/Lifecycle.md +99 -0
- package/node_modules/fastify/docs/Reference/Logging.md +268 -0
- package/node_modules/fastify/docs/Reference/Middleware.md +79 -0
- package/node_modules/fastify/docs/Reference/Plugins.md +245 -0
- package/node_modules/fastify/docs/Reference/Principles.md +73 -0
- package/node_modules/fastify/docs/Reference/Reply.md +1001 -0
- package/node_modules/fastify/docs/Reference/Request.md +295 -0
- package/node_modules/fastify/docs/Reference/Routes.md +802 -0
- package/node_modules/fastify/docs/Reference/Server.md +2389 -0
- package/node_modules/fastify/docs/Reference/Type-Providers.md +256 -0
- package/node_modules/fastify/docs/Reference/TypeScript.md +1729 -0
- package/node_modules/fastify/docs/Reference/Validation-and-Serialization.md +1130 -0
- package/node_modules/fastify/docs/Reference/Warnings.md +58 -0
- package/node_modules/fastify/docs/index.md +24 -0
- package/node_modules/fastify/docs/resources/encapsulation_context.drawio +1 -0
- package/node_modules/fastify/docs/resources/encapsulation_context.svg +3 -0
- package/node_modules/fastify/eslint.config.js +35 -0
- package/node_modules/fastify/examples/asyncawait.js +38 -0
- package/node_modules/fastify/examples/benchmark/body.json +3 -0
- package/node_modules/fastify/examples/benchmark/hooks-benchmark-async-await.js +44 -0
- package/node_modules/fastify/examples/benchmark/hooks-benchmark.js +52 -0
- package/node_modules/fastify/examples/benchmark/parser.js +47 -0
- package/node_modules/fastify/examples/benchmark/simple.js +30 -0
- package/node_modules/fastify/examples/benchmark/webstream.js +27 -0
- package/node_modules/fastify/examples/hooks.js +91 -0
- package/node_modules/fastify/examples/http2.js +39 -0
- package/node_modules/fastify/examples/https.js +38 -0
- package/node_modules/fastify/examples/parser.js +53 -0
- package/node_modules/fastify/examples/plugin.js +12 -0
- package/node_modules/fastify/examples/route-prefix.js +38 -0
- package/node_modules/fastify/examples/shared-schema.js +38 -0
- package/node_modules/fastify/examples/simple-stream.js +20 -0
- package/node_modules/fastify/examples/simple.js +32 -0
- package/node_modules/fastify/examples/simple.mjs +27 -0
- package/node_modules/fastify/examples/typescript-server.ts +79 -0
- package/node_modules/fastify/examples/use-plugin.js +29 -0
- package/node_modules/fastify/fastify.d.ts +253 -0
- package/node_modules/fastify/fastify.js +985 -0
- package/node_modules/fastify/integration/server.js +29 -0
- package/node_modules/fastify/integration/test.sh +23 -0
- package/node_modules/fastify/lib/config-validator.js +1266 -0
- package/node_modules/fastify/lib/content-type-parser.js +413 -0
- package/node_modules/fastify/lib/content-type.js +160 -0
- package/node_modules/fastify/lib/context.js +98 -0
- package/node_modules/fastify/lib/decorate.js +152 -0
- package/node_modules/fastify/lib/error-handler.js +173 -0
- package/node_modules/fastify/lib/error-serializer.js +134 -0
- package/node_modules/fastify/lib/error-status.js +14 -0
- package/node_modules/fastify/lib/errors.js +516 -0
- package/node_modules/fastify/lib/four-oh-four.js +190 -0
- package/node_modules/fastify/lib/handle-request.js +195 -0
- package/node_modules/fastify/lib/head-route.js +45 -0
- package/node_modules/fastify/lib/hooks.js +429 -0
- package/node_modules/fastify/lib/initial-config-validation.js +37 -0
- package/node_modules/fastify/lib/logger-factory.js +136 -0
- package/node_modules/fastify/lib/logger-pino.js +68 -0
- package/node_modules/fastify/lib/noop-set.js +10 -0
- package/node_modules/fastify/lib/plugin-override.js +90 -0
- package/node_modules/fastify/lib/plugin-utils.js +169 -0
- package/node_modules/fastify/lib/promise.js +23 -0
- package/node_modules/fastify/lib/reply.js +1030 -0
- package/node_modules/fastify/lib/req-id-gen-factory.js +52 -0
- package/node_modules/fastify/lib/request.js +387 -0
- package/node_modules/fastify/lib/route.js +686 -0
- package/node_modules/fastify/lib/schema-controller.js +164 -0
- package/node_modules/fastify/lib/schemas.js +207 -0
- package/node_modules/fastify/lib/server.js +441 -0
- package/node_modules/fastify/lib/symbols.js +71 -0
- package/node_modules/fastify/lib/validation.js +280 -0
- package/node_modules/fastify/lib/warnings.js +57 -0
- package/node_modules/fastify/lib/wrap-thenable.js +84 -0
- package/node_modules/fastify/package.json +225 -0
- package/node_modules/fastify/scripts/validate-ecosystem-links.js +179 -0
- package/node_modules/fastify/test/404s.test.js +2035 -0
- package/node_modules/fastify/test/500s.test.js +422 -0
- package/node_modules/fastify/test/allow-unsafe-regex.test.js +92 -0
- package/node_modules/fastify/test/als.test.js +65 -0
- package/node_modules/fastify/test/async-await.test.js +705 -0
- package/node_modules/fastify/test/async-dispose.test.js +20 -0
- package/node_modules/fastify/test/async_hooks.test.js +52 -0
- package/node_modules/fastify/test/body-limit.test.js +224 -0
- package/node_modules/fastify/test/buffer.test.js +74 -0
- package/node_modules/fastify/test/build/error-serializer.test.js +36 -0
- package/node_modules/fastify/test/build/version.test.js +14 -0
- package/node_modules/fastify/test/build-certificate.js +109 -0
- package/node_modules/fastify/test/bundler/README.md +29 -0
- package/node_modules/fastify/test/bundler/esbuild/bundler-test.js +32 -0
- package/node_modules/fastify/test/bundler/esbuild/package.json +10 -0
- package/node_modules/fastify/test/bundler/esbuild/src/fail-plugin-version.js +14 -0
- package/node_modules/fastify/test/bundler/esbuild/src/index.js +9 -0
- package/node_modules/fastify/test/bundler/webpack/bundler-test.js +32 -0
- package/node_modules/fastify/test/bundler/webpack/package.json +11 -0
- package/node_modules/fastify/test/bundler/webpack/src/fail-plugin-version.js +14 -0
- package/node_modules/fastify/test/bundler/webpack/src/index.js +9 -0
- package/node_modules/fastify/test/bundler/webpack/webpack.config.js +15 -0
- package/node_modules/fastify/test/case-insensitive.test.js +102 -0
- package/node_modules/fastify/test/chainable.test.js +40 -0
- package/node_modules/fastify/test/child-logger-factory.test.js +128 -0
- package/node_modules/fastify/test/client-timeout.test.js +38 -0
- package/node_modules/fastify/test/close-pipelining.test.js +78 -0
- package/node_modules/fastify/test/close.test.js +706 -0
- package/node_modules/fastify/test/conditional-pino.test.js +47 -0
- package/node_modules/fastify/test/connection-timeout.test.js +42 -0
- package/node_modules/fastify/test/constrained-routes.test.js +1138 -0
- package/node_modules/fastify/test/content-length.test.js +174 -0
- package/node_modules/fastify/test/content-parser.test.js +739 -0
- package/node_modules/fastify/test/content-type.test.js +181 -0
- package/node_modules/fastify/test/context-config.test.js +164 -0
- package/node_modules/fastify/test/custom-http-server.test.js +118 -0
- package/node_modules/fastify/test/custom-parser-async.test.js +59 -0
- package/node_modules/fastify/test/custom-parser.0.test.js +701 -0
- package/node_modules/fastify/test/custom-parser.1.test.js +266 -0
- package/node_modules/fastify/test/custom-parser.2.test.js +91 -0
- package/node_modules/fastify/test/custom-parser.3.test.js +208 -0
- package/node_modules/fastify/test/custom-parser.4.test.js +218 -0
- package/node_modules/fastify/test/custom-parser.5.test.js +130 -0
- package/node_modules/fastify/test/custom-querystring-parser.test.js +129 -0
- package/node_modules/fastify/test/decorator.test.js +1330 -0
- package/node_modules/fastify/test/delete.test.js +344 -0
- package/node_modules/fastify/test/diagnostics-channel/404.test.js +49 -0
- package/node_modules/fastify/test/diagnostics-channel/async-delay-request.test.js +65 -0
- package/node_modules/fastify/test/diagnostics-channel/async-request.test.js +64 -0
- package/node_modules/fastify/test/diagnostics-channel/error-before-handler.test.js +35 -0
- package/node_modules/fastify/test/diagnostics-channel/error-request.test.js +53 -0
- package/node_modules/fastify/test/diagnostics-channel/error-status.test.js +123 -0
- package/node_modules/fastify/test/diagnostics-channel/init.test.js +50 -0
- package/node_modules/fastify/test/diagnostics-channel/sync-delay-request.test.js +49 -0
- package/node_modules/fastify/test/diagnostics-channel/sync-request-reply.test.js +51 -0
- package/node_modules/fastify/test/diagnostics-channel/sync-request.test.js +54 -0
- package/node_modules/fastify/test/encapsulated-child-logger-factory.test.js +69 -0
- package/node_modules/fastify/test/encapsulated-error-handler.test.js +237 -0
- package/node_modules/fastify/test/esm/errorCodes.test.mjs +10 -0
- package/node_modules/fastify/test/esm/esm.test.mjs +13 -0
- package/node_modules/fastify/test/esm/index.test.js +8 -0
- package/node_modules/fastify/test/esm/named-exports.mjs +14 -0
- package/node_modules/fastify/test/esm/other.mjs +8 -0
- package/node_modules/fastify/test/esm/plugin.mjs +8 -0
- package/node_modules/fastify/test/fastify-instance.test.js +300 -0
- package/node_modules/fastify/test/find-route.test.js +152 -0
- package/node_modules/fastify/test/fluent-schema.test.js +209 -0
- package/node_modules/fastify/test/genReqId.test.js +426 -0
- package/node_modules/fastify/test/handler-context.test.js +45 -0
- package/node_modules/fastify/test/handler-timeout.test.js +367 -0
- package/node_modules/fastify/test/has-route.test.js +88 -0
- package/node_modules/fastify/test/header-overflow.test.js +55 -0
- package/node_modules/fastify/test/helper.js +496 -0
- package/node_modules/fastify/test/hooks-async.test.js +1099 -0
- package/node_modules/fastify/test/hooks.on-listen.test.js +1162 -0
- package/node_modules/fastify/test/hooks.on-ready.test.js +421 -0
- package/node_modules/fastify/test/hooks.test.js +3578 -0
- package/node_modules/fastify/test/http-methods/copy.test.js +35 -0
- package/node_modules/fastify/test/http-methods/custom-http-methods.test.js +114 -0
- package/node_modules/fastify/test/http-methods/get.test.js +412 -0
- package/node_modules/fastify/test/http-methods/head.test.js +263 -0
- package/node_modules/fastify/test/http-methods/lock.test.js +108 -0
- package/node_modules/fastify/test/http-methods/mkcalendar.test.js +143 -0
- package/node_modules/fastify/test/http-methods/mkcol.test.js +35 -0
- package/node_modules/fastify/test/http-methods/move.test.js +42 -0
- package/node_modules/fastify/test/http-methods/propfind.test.js +136 -0
- package/node_modules/fastify/test/http-methods/proppatch.test.js +105 -0
- package/node_modules/fastify/test/http-methods/report.test.js +142 -0
- package/node_modules/fastify/test/http-methods/search.test.js +233 -0
- package/node_modules/fastify/test/http-methods/trace.test.js +21 -0
- package/node_modules/fastify/test/http-methods/unlock.test.js +38 -0
- package/node_modules/fastify/test/http2/closing.test.js +270 -0
- package/node_modules/fastify/test/http2/constraint.test.js +109 -0
- package/node_modules/fastify/test/http2/head.test.js +34 -0
- package/node_modules/fastify/test/http2/plain.test.js +68 -0
- package/node_modules/fastify/test/http2/secure-with-fallback.test.js +113 -0
- package/node_modules/fastify/test/http2/secure.test.js +67 -0
- package/node_modules/fastify/test/http2/unknown-http-method.test.js +34 -0
- package/node_modules/fastify/test/https/custom-https-server.test.js +58 -0
- package/node_modules/fastify/test/https/https.test.js +136 -0
- package/node_modules/fastify/test/imports.test.js +17 -0
- package/node_modules/fastify/test/inject.test.js +502 -0
- package/node_modules/fastify/test/input-validation.js +335 -0
- package/node_modules/fastify/test/internals/all.test.js +38 -0
- package/node_modules/fastify/test/internals/content-type-parser.test.js +111 -0
- package/node_modules/fastify/test/internals/context.test.js +31 -0
- package/node_modules/fastify/test/internals/decorator.test.js +156 -0
- package/node_modules/fastify/test/internals/errors.test.js +982 -0
- package/node_modules/fastify/test/internals/handle-request.test.js +270 -0
- package/node_modules/fastify/test/internals/hook-runner.test.js +449 -0
- package/node_modules/fastify/test/internals/hooks.test.js +96 -0
- package/node_modules/fastify/test/internals/initial-config.test.js +383 -0
- package/node_modules/fastify/test/internals/logger.test.js +163 -0
- package/node_modules/fastify/test/internals/plugin.test.js +170 -0
- package/node_modules/fastify/test/internals/promise.test.js +63 -0
- package/node_modules/fastify/test/internals/reply-serialize.test.js +714 -0
- package/node_modules/fastify/test/internals/reply.test.js +1920 -0
- package/node_modules/fastify/test/internals/req-id-gen-factory.test.js +133 -0
- package/node_modules/fastify/test/internals/request-validate.test.js +1402 -0
- package/node_modules/fastify/test/internals/request.test.js +506 -0
- package/node_modules/fastify/test/internals/schema-controller-perf.test.js +40 -0
- package/node_modules/fastify/test/internals/server.test.js +91 -0
- package/node_modules/fastify/test/internals/validation.test.js +352 -0
- package/node_modules/fastify/test/issue-4959.test.js +118 -0
- package/node_modules/fastify/test/keep-alive-timeout.test.js +42 -0
- package/node_modules/fastify/test/listen.1.test.js +154 -0
- package/node_modules/fastify/test/listen.2.test.js +113 -0
- package/node_modules/fastify/test/listen.3.test.js +83 -0
- package/node_modules/fastify/test/listen.4.test.js +168 -0
- package/node_modules/fastify/test/listen.5.test.js +122 -0
- package/node_modules/fastify/test/logger/instantiation.test.js +341 -0
- package/node_modules/fastify/test/logger/logger-test-utils.js +47 -0
- package/node_modules/fastify/test/logger/logging.test.js +460 -0
- package/node_modules/fastify/test/logger/options.test.js +579 -0
- package/node_modules/fastify/test/logger/request.test.js +292 -0
- package/node_modules/fastify/test/logger/response.test.js +183 -0
- package/node_modules/fastify/test/logger/tap-parallel-not-ok +0 -0
- package/node_modules/fastify/test/max-requests-per-socket.test.js +113 -0
- package/node_modules/fastify/test/middleware.test.js +37 -0
- package/node_modules/fastify/test/noop-set.test.js +19 -0
- package/node_modules/fastify/test/nullable-validation.test.js +187 -0
- package/node_modules/fastify/test/options.error-handler.test.js +5 -0
- package/node_modules/fastify/test/options.test.js +5 -0
- package/node_modules/fastify/test/output-validation.test.js +140 -0
- package/node_modules/fastify/test/patch.error-handler.test.js +5 -0
- package/node_modules/fastify/test/patch.test.js +5 -0
- package/node_modules/fastify/test/plugin.1.test.js +230 -0
- package/node_modules/fastify/test/plugin.2.test.js +314 -0
- package/node_modules/fastify/test/plugin.3.test.js +287 -0
- package/node_modules/fastify/test/plugin.4.test.js +504 -0
- package/node_modules/fastify/test/plugin.helper.js +8 -0
- package/node_modules/fastify/test/plugin.name.display.js +10 -0
- package/node_modules/fastify/test/post-empty-body.test.js +38 -0
- package/node_modules/fastify/test/pretty-print.test.js +366 -0
- package/node_modules/fastify/test/promises.test.js +125 -0
- package/node_modules/fastify/test/proto-poisoning.test.js +145 -0
- package/node_modules/fastify/test/put.error-handler.test.js +5 -0
- package/node_modules/fastify/test/put.test.js +5 -0
- package/node_modules/fastify/test/register.test.js +184 -0
- package/node_modules/fastify/test/reply-code.test.js +148 -0
- package/node_modules/fastify/test/reply-early-hints.test.js +100 -0
- package/node_modules/fastify/test/reply-error.test.js +815 -0
- package/node_modules/fastify/test/reply-trailers.test.js +445 -0
- package/node_modules/fastify/test/reply-web-stream-locked.test.js +37 -0
- package/node_modules/fastify/test/request-error.test.js +624 -0
- package/node_modules/fastify/test/request-header-host.test.js +339 -0
- package/node_modules/fastify/test/request-id.test.js +118 -0
- package/node_modules/fastify/test/request-port.test.js +72 -0
- package/node_modules/fastify/test/request-timeout.test.js +53 -0
- package/node_modules/fastify/test/route-hooks.test.js +635 -0
- package/node_modules/fastify/test/route-prefix.test.js +904 -0
- package/node_modules/fastify/test/route-shorthand.test.js +48 -0
- package/node_modules/fastify/test/route.1.test.js +259 -0
- package/node_modules/fastify/test/route.2.test.js +100 -0
- package/node_modules/fastify/test/route.3.test.js +213 -0
- package/node_modules/fastify/test/route.4.test.js +127 -0
- package/node_modules/fastify/test/route.5.test.js +211 -0
- package/node_modules/fastify/test/route.6.test.js +306 -0
- package/node_modules/fastify/test/route.7.test.js +406 -0
- package/node_modules/fastify/test/route.8.test.js +225 -0
- package/node_modules/fastify/test/router-options.test.js +1108 -0
- package/node_modules/fastify/test/same-shape.test.js +124 -0
- package/node_modules/fastify/test/schema-examples.test.js +661 -0
- package/node_modules/fastify/test/schema-feature.test.js +2198 -0
- package/node_modules/fastify/test/schema-serialization.test.js +1171 -0
- package/node_modules/fastify/test/schema-special-usage.test.js +1348 -0
- package/node_modules/fastify/test/schema-validation.test.js +1593 -0
- package/node_modules/fastify/test/scripts/validate-ecosystem-links.test.js +339 -0
- package/node_modules/fastify/test/serialize-response.test.js +186 -0
- package/node_modules/fastify/test/server.test.js +347 -0
- package/node_modules/fastify/test/set-error-handler.test.js +69 -0
- package/node_modules/fastify/test/skip-reply-send.test.js +317 -0
- package/node_modules/fastify/test/stream-serializers.test.js +40 -0
- package/node_modules/fastify/test/stream.1.test.js +94 -0
- package/node_modules/fastify/test/stream.2.test.js +129 -0
- package/node_modules/fastify/test/stream.3.test.js +198 -0
- package/node_modules/fastify/test/stream.4.test.js +176 -0
- package/node_modules/fastify/test/stream.5.test.js +188 -0
- package/node_modules/fastify/test/sync-routes.test.js +32 -0
- package/node_modules/fastify/test/throw.test.js +359 -0
- package/node_modules/fastify/test/toolkit.js +63 -0
- package/node_modules/fastify/test/trust-proxy.test.js +274 -0
- package/node_modules/fastify/test/type-provider.test.js +22 -0
- package/node_modules/fastify/test/types/content-type-parser.test-d.ts +72 -0
- package/node_modules/fastify/test/types/decorate-request-reply.test-d.ts +18 -0
- package/node_modules/fastify/test/types/dummy-plugin.ts +9 -0
- package/node_modules/fastify/test/types/errors.test-d.ts +90 -0
- package/node_modules/fastify/test/types/fastify.test-d.ts +352 -0
- package/node_modules/fastify/test/types/hooks.test-d.ts +550 -0
- package/node_modules/fastify/test/types/import.ts +2 -0
- package/node_modules/fastify/test/types/instance.test-d.ts +588 -0
- package/node_modules/fastify/test/types/logger.test-d.ts +277 -0
- package/node_modules/fastify/test/types/plugin.test-d.ts +97 -0
- package/node_modules/fastify/test/types/register.test-d.ts +237 -0
- package/node_modules/fastify/test/types/reply.test-d.ts +254 -0
- package/node_modules/fastify/test/types/request.test-d.ts +188 -0
- package/node_modules/fastify/test/types/route.test-d.ts +553 -0
- package/node_modules/fastify/test/types/schema.test-d.ts +135 -0
- package/node_modules/fastify/test/types/serverFactory.test-d.ts +37 -0
- package/node_modules/fastify/test/types/type-provider.test-d.ts +1213 -0
- package/node_modules/fastify/test/types/using.test-d.ts +17 -0
- package/node_modules/fastify/test/upgrade.test.js +52 -0
- package/node_modules/fastify/test/url-rewriting.test.js +122 -0
- package/node_modules/fastify/test/use-semicolon-delimiter.test.js +168 -0
- package/node_modules/fastify/test/validation-error-handling.test.js +900 -0
- package/node_modules/fastify/test/versioned-routes.test.js +603 -0
- package/node_modules/fastify/test/web-api.test.js +616 -0
- package/node_modules/fastify/test/wrap-thenable.test.js +30 -0
- package/node_modules/fastify/types/content-type-parser.d.ts +75 -0
- package/node_modules/fastify/types/context.d.ts +22 -0
- package/node_modules/fastify/types/errors.d.ts +92 -0
- package/node_modules/fastify/types/hooks.d.ts +875 -0
- package/node_modules/fastify/types/instance.d.ts +609 -0
- package/node_modules/fastify/types/logger.d.ts +107 -0
- package/node_modules/fastify/types/plugin.d.ts +44 -0
- package/node_modules/fastify/types/register.d.ts +42 -0
- package/node_modules/fastify/types/reply.d.ts +81 -0
- package/node_modules/fastify/types/request.d.ts +95 -0
- package/node_modules/fastify/types/route.d.ts +199 -0
- package/node_modules/fastify/types/schema.d.ts +61 -0
- package/node_modules/fastify/types/server-factory.d.ts +19 -0
- package/node_modules/fastify/types/type-provider.d.ts +130 -0
- package/node_modules/fastify/types/utils.d.ts +98 -0
- package/node_modules/fastify-plugin/.gitattributes +2 -0
- package/node_modules/fastify-plugin/.github/dependabot.yml +13 -0
- package/node_modules/fastify-plugin/.github/stale.yml +21 -0
- package/node_modules/fastify-plugin/.github/workflows/ci.yml +28 -0
- package/node_modules/fastify-plugin/LICENSE +23 -0
- package/node_modules/fastify-plugin/README.md +188 -0
- package/node_modules/fastify-plugin/eslint.config.js +6 -0
- package/node_modules/fastify-plugin/lib/getPluginName.js +25 -0
- package/node_modules/fastify-plugin/lib/toCamelCase.js +10 -0
- package/node_modules/fastify-plugin/package.json +70 -0
- package/node_modules/fastify-plugin/plugin.js +67 -0
- package/node_modules/fastify-plugin/test/bundlers.test.js +110 -0
- package/node_modules/fastify-plugin/test/checkVersion.test.js +67 -0
- package/node_modules/fastify-plugin/test/composite.test.js +14 -0
- package/node_modules/fastify-plugin/test/esm/esm.mjs +11 -0
- package/node_modules/fastify-plugin/test/esm/index.test.js +11 -0
- package/node_modules/fastify-plugin/test/extractPluginName.test.js +49 -0
- package/node_modules/fastify-plugin/test/mu1tip1e.composite.test.js +15 -0
- package/node_modules/fastify-plugin/test/test.js +396 -0
- package/node_modules/fastify-plugin/test/toCamelCase.test.js +24 -0
- package/node_modules/fastify-plugin/types/example-async.test-d.ts +19 -0
- package/node_modules/fastify-plugin/types/example-callback.test-d.ts +19 -0
- package/node_modules/fastify-plugin/types/plugin.d.ts +61 -0
- package/node_modules/fastify-plugin/types/plugin.test-d.ts +166 -0
- package/node_modules/fastq/LICENSE +13 -0
- package/node_modules/fastq/README.md +310 -0
- package/node_modules/fastq/SECURITY.md +15 -0
- package/node_modules/fastq/bench.js +66 -0
- package/node_modules/fastq/eslint.config.js +11 -0
- package/node_modules/fastq/example.js +14 -0
- package/node_modules/fastq/example.mjs +9 -0
- package/node_modules/fastq/index.d.ts +59 -0
- package/node_modules/fastq/package.json +49 -0
- package/node_modules/fastq/queue.js +346 -0
- package/node_modules/fastq/test/example.ts +83 -0
- package/node_modules/fastq/test/promise.js +325 -0
- package/node_modules/fastq/test/test.js +733 -0
- package/node_modules/fastq/test/tsconfig.json +11 -0
- package/node_modules/find-my-way/.github/dependabot.yml +34 -0
- package/node_modules/find-my-way/.github/workflows/node.js.yml +68 -0
- package/node_modules/find-my-way/LICENSE +21 -0
- package/node_modules/find-my-way/README.md +885 -0
- package/node_modules/find-my-way/benchmark/bench-thread.js +35 -0
- package/node_modules/find-my-way/benchmark/bench.js +156 -0
- package/node_modules/find-my-way/benchmark/compare-branches.js +113 -0
- package/node_modules/find-my-way/benchmark/uri-decoding.js +55 -0
- package/node_modules/find-my-way/example.js +29 -0
- package/node_modules/find-my-way/index.d.ts +247 -0
- package/node_modules/find-my-way/index.js +872 -0
- package/node_modules/find-my-way/lib/constrainer.js +172 -0
- package/node_modules/find-my-way/lib/handler-storage.js +175 -0
- package/node_modules/find-my-way/lib/http-methods.js +13 -0
- package/node_modules/find-my-way/lib/node.js +228 -0
- package/node_modules/find-my-way/lib/null-object.js +8 -0
- package/node_modules/find-my-way/lib/pretty-print.js +168 -0
- package/node_modules/find-my-way/lib/strategies/accept-host.js +36 -0
- package/node_modules/find-my-way/lib/strategies/accept-version.js +64 -0
- package/node_modules/find-my-way/lib/strategies/http-method.js +15 -0
- package/node_modules/find-my-way/lib/url-sanitizer.js +105 -0
- package/node_modules/find-my-way/package.json +57 -0
- package/node_modules/find-my-way/test/case-insensitive.test.js +230 -0
- package/node_modules/find-my-way/test/constraint.custom-versioning.test.js +130 -0
- package/node_modules/find-my-way/test/constraint.custom.async.test.js +111 -0
- package/node_modules/find-my-way/test/constraint.custom.test.js +273 -0
- package/node_modules/find-my-way/test/constraint.default-versioning.test.js +289 -0
- package/node_modules/find-my-way/test/constraint.host.test.js +104 -0
- package/node_modules/find-my-way/test/constraints.test.js +108 -0
- package/node_modules/find-my-way/test/custom-querystring-parser.test.js +46 -0
- package/node_modules/find-my-way/test/errors.test.js +484 -0
- package/node_modules/find-my-way/test/fastify-issue-3129.test.js +34 -0
- package/node_modules/find-my-way/test/fastify-issue-3957.test.js +23 -0
- package/node_modules/find-my-way/test/find-route.test.js +275 -0
- package/node_modules/find-my-way/test/find.test.js +16 -0
- package/node_modules/find-my-way/test/for-in-loop.test.js +22 -0
- package/node_modules/find-my-way/test/full-url.test.js +30 -0
- package/node_modules/find-my-way/test/has-route.test.js +218 -0
- package/node_modules/find-my-way/test/host-storage.test.js +27 -0
- package/node_modules/find-my-way/test/http2/constraint.host.test.js +44 -0
- package/node_modules/find-my-way/test/issue-101.test.js +31 -0
- package/node_modules/find-my-way/test/issue-104.test.js +206 -0
- package/node_modules/find-my-way/test/issue-110.test.js +31 -0
- package/node_modules/find-my-way/test/issue-132.test.js +80 -0
- package/node_modules/find-my-way/test/issue-145.test.js +24 -0
- package/node_modules/find-my-way/test/issue-149.test.js +21 -0
- package/node_modules/find-my-way/test/issue-151.test.js +54 -0
- package/node_modules/find-my-way/test/issue-154.test.js +21 -0
- package/node_modules/find-my-way/test/issue-161.test.js +88 -0
- package/node_modules/find-my-way/test/issue-17.test.js +397 -0
- package/node_modules/find-my-way/test/issue-175.test.js +80 -0
- package/node_modules/find-my-way/test/issue-182.test.js +18 -0
- package/node_modules/find-my-way/test/issue-190.test.js +44 -0
- package/node_modules/find-my-way/test/issue-20.test.js +79 -0
- package/node_modules/find-my-way/test/issue-206.test.js +121 -0
- package/node_modules/find-my-way/test/issue-221.test.js +50 -0
- package/node_modules/find-my-way/test/issue-234.test.js +94 -0
- package/node_modules/find-my-way/test/issue-238.test.js +119 -0
- package/node_modules/find-my-way/test/issue-240.test.js +30 -0
- package/node_modules/find-my-way/test/issue-241.test.js +32 -0
- package/node_modules/find-my-way/test/issue-247.test.js +51 -0
- package/node_modules/find-my-way/test/issue-254.test.js +31 -0
- package/node_modules/find-my-way/test/issue-28.test.js +618 -0
- package/node_modules/find-my-way/test/issue-280.test.js +14 -0
- package/node_modules/find-my-way/test/issue-285.test.js +37 -0
- package/node_modules/find-my-way/test/issue-330.test.js +231 -0
- package/node_modules/find-my-way/test/issue-44.test.js +149 -0
- package/node_modules/find-my-way/test/issue-46.test.js +75 -0
- package/node_modules/find-my-way/test/issue-49.test.js +108 -0
- package/node_modules/find-my-way/test/issue-59.test.js +131 -0
- package/node_modules/find-my-way/test/issue-62.test.js +28 -0
- package/node_modules/find-my-way/test/issue-63.test.js +23 -0
- package/node_modules/find-my-way/test/issue-67.test.js +50 -0
- package/node_modules/find-my-way/test/issue-93.test.js +19 -0
- package/node_modules/find-my-way/test/lookup-async.test.js +29 -0
- package/node_modules/find-my-way/test/lookup.test.js +58 -0
- package/node_modules/find-my-way/test/matching-order.test.js +17 -0
- package/node_modules/find-my-way/test/max-param-length.test.js +44 -0
- package/node_modules/find-my-way/test/methods.test.js +830 -0
- package/node_modules/find-my-way/test/null-object.test.js +36 -0
- package/node_modules/find-my-way/test/on-bad-url.test.js +72 -0
- package/node_modules/find-my-way/test/optional-params.test.js +216 -0
- package/node_modules/find-my-way/test/params-collisions.test.js +126 -0
- package/node_modules/find-my-way/test/path-params-match.test.js +53 -0
- package/node_modules/find-my-way/test/path-utils.test.js +68 -0
- package/node_modules/find-my-way/test/pretty-print-tree.test.js +596 -0
- package/node_modules/find-my-way/test/pretty-print.test.js +680 -0
- package/node_modules/find-my-way/test/querystring.test.js +54 -0
- package/node_modules/find-my-way/test/regex.test.js +269 -0
- package/node_modules/find-my-way/test/repro-issue-414.test.js +57 -0
- package/node_modules/find-my-way/test/routes-registered.test.js +45 -0
- package/node_modules/find-my-way/test/server.test.js +368 -0
- package/node_modules/find-my-way/test/shorthands.test.js +44 -0
- package/node_modules/find-my-way/test/store.test.js +49 -0
- package/node_modules/find-my-way/test/types/router.test-d.ts +188 -0
- package/node_modules/find-my-way/test/url-sanitizer.test.js +43 -0
- package/node_modules/glob/LICENSE.md +63 -0
- package/node_modules/glob/README.md +1203 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts +396 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/glob.js +248 -0
- package/node_modules/glob/dist/commonjs/glob.js.map +1 -0
- package/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
- package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
- package/node_modules/glob/dist/commonjs/ignore.d.ts +24 -0
- package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
- package/node_modules/glob/dist/commonjs/index.d.ts +97 -0
- package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/index.js +68 -0
- package/node_modules/glob/dist/commonjs/index.js.map +1 -0
- package/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/node_modules/glob/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/glob/dist/commonjs/package.json +3 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts +79 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/pattern.js +223 -0
- package/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
- package/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
- package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/node_modules/glob/dist/commonjs/processor.js.map +1 -0
- package/node_modules/glob/dist/commonjs/walker.d.ts +97 -0
- package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/node_modules/glob/dist/commonjs/walker.js.map +1 -0
- package/node_modules/glob/dist/esm/glob.d.ts +396 -0
- package/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/glob.js +244 -0
- package/node_modules/glob/dist/esm/glob.js.map +1 -0
- package/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
- package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/node_modules/glob/dist/esm/has-magic.js.map +1 -0
- package/node_modules/glob/dist/esm/ignore.d.ts +24 -0
- package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/ignore.js +115 -0
- package/node_modules/glob/dist/esm/ignore.js.map +1 -0
- package/node_modules/glob/dist/esm/index.d.ts +97 -0
- package/node_modules/glob/dist/esm/index.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/index.js +55 -0
- package/node_modules/glob/dist/esm/index.js.map +1 -0
- package/node_modules/glob/dist/esm/index.min.js +4 -0
- package/node_modules/glob/dist/esm/index.min.js.map +7 -0
- package/node_modules/glob/dist/esm/package.json +3 -0
- package/node_modules/glob/dist/esm/pattern.d.ts +79 -0
- package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/pattern.js +219 -0
- package/node_modules/glob/dist/esm/pattern.js.map +1 -0
- package/node_modules/glob/dist/esm/processor.d.ts +59 -0
- package/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/processor.js +294 -0
- package/node_modules/glob/dist/esm/processor.js.map +1 -0
- package/node_modules/glob/dist/esm/walker.d.ts +97 -0
- package/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/walker.js +381 -0
- package/node_modules/glob/dist/esm/walker.js.map +1 -0
- package/node_modules/glob/package.json +98 -0
- package/node_modules/http-errors/HISTORY.md +186 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +290 -0
- package/node_modules/http-errors/package.json +54 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/ipaddr.js/LICENSE +19 -0
- package/node_modules/ipaddr.js/README.md +229 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js +1082 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +72 -0
- package/node_modules/ipaddr.js/package.json +36 -0
- package/node_modules/jishushell-panel/LICENSE +6 -0
- package/node_modules/jishushell-panel/README.md +47 -0
- package/node_modules/jishushell-panel/output/dist/server.d.ts +13 -0
- package/node_modules/jishushell-panel/output/dist/server.js +466 -0
- package/node_modules/jishushell-panel/output/dist/server.js.map +1 -0
- package/node_modules/jishushell-panel/output/public/assets/ApiKeyField-NKcbHjNz.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/Dashboard-Da1fL38t.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/HermesChatPanel-DZvmYsoh.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/HermesConfigForm-BLUWlKwm.js +4 -0
- package/node_modules/jishushell-panel/output/public/assets/InitPassword-BAKsshzk.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/InstanceDetail-Dgyc_TX5.js +14 -0
- package/node_modules/jishushell-panel/output/public/assets/Login-DHeOmwI8.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/NewInstance-CIy0cYtp.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/ProviderRecommendations-H0ByEYF0.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/Settings-DAT-UMfP.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/Setup-g3uckFYR.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/WeixinLoginPanel-D-T6BxkQ.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/api-C70Gt678.js +4 -0
- package/node_modules/jishushell-panel/output/public/assets/index-DnnqTf7s.css +1 -0
- package/node_modules/jishushell-panel/output/public/assets/index-ERt6_ngA.js +23 -0
- package/node_modules/jishushell-panel/output/public/assets/registry-DF93EzIb.js +2 -0
- package/node_modules/jishushell-panel/output/public/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/setup-task-q21GnI0E.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/usePolling-DeoThIQn.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/vendor-i18n-CS8DFbkQ.js +1 -0
- package/node_modules/jishushell-panel/output/public/assets/vendor-react-Cc84NArf.js +8 -0
- package/node_modules/jishushell-panel/output/public/index.html +22 -0
- package/node_modules/jishushell-panel/package.json +33 -0
- package/node_modules/json-schema-ref-resolver/.gitattributes +2 -0
- package/node_modules/json-schema-ref-resolver/.github/dependabot.yml +13 -0
- package/node_modules/json-schema-ref-resolver/.github/workflows/ci.yml +25 -0
- package/node_modules/json-schema-ref-resolver/LICENSE +21 -0
- package/node_modules/json-schema-ref-resolver/README.md +406 -0
- package/node_modules/json-schema-ref-resolver/eslint.config.js +6 -0
- package/node_modules/json-schema-ref-resolver/index.js +284 -0
- package/node_modules/json-schema-ref-resolver/package.json +76 -0
- package/node_modules/json-schema-ref-resolver/test/anchor.test.js +56 -0
- package/node_modules/json-schema-ref-resolver/test/collisions.test.js +199 -0
- package/node_modules/json-schema-ref-resolver/test/deref-schema.test.js +287 -0
- package/node_modules/json-schema-ref-resolver/test/get-deref-schema.test.js +363 -0
- package/node_modules/json-schema-ref-resolver/test/get-schema-dependencies.test.js +158 -0
- package/node_modules/json-schema-ref-resolver/test/get-schema-refs.test.js +87 -0
- package/node_modules/json-schema-ref-resolver/test/get-schema.test.js +222 -0
- package/node_modules/json-schema-ref-resolver/test/has-schema.test.js +28 -0
- package/node_modules/json-schema-ref-resolver/types/index.d.ts +67 -0
- package/node_modules/json-schema-ref-resolver/types/index.test-d.ts +23 -0
- package/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
- package/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
- package/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
- package/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
- package/node_modules/json-schema-traverse/LICENSE +21 -0
- package/node_modules/json-schema-traverse/README.md +95 -0
- package/node_modules/json-schema-traverse/index.d.ts +40 -0
- package/node_modules/json-schema-traverse/index.js +93 -0
- package/node_modules/json-schema-traverse/package.json +43 -0
- package/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
- package/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
- package/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
- package/node_modules/light-my-request/.gitattributes +2 -0
- package/node_modules/light-my-request/.github/dependabot.yml +13 -0
- package/node_modules/light-my-request/.github/stale.yml +21 -0
- package/node_modules/light-my-request/.github/workflows/benchmark.yml +30 -0
- package/node_modules/light-my-request/.github/workflows/ci.yml +23 -0
- package/node_modules/light-my-request/LICENSE +32 -0
- package/node_modules/light-my-request/README.md +261 -0
- package/node_modules/light-my-request/benchmark/benchmark.js +164 -0
- package/node_modules/light-my-request/build/build-validation.js +100 -0
- package/node_modules/light-my-request/eslint.config.js +9 -0
- package/node_modules/light-my-request/index.js +194 -0
- package/node_modules/light-my-request/lib/config-validator.js +919 -0
- package/node_modules/light-my-request/lib/form-data.js +79 -0
- package/node_modules/light-my-request/lib/parse-url.js +47 -0
- package/node_modules/light-my-request/lib/request.js +290 -0
- package/node_modules/light-my-request/lib/response.js +240 -0
- package/node_modules/light-my-request/node_modules/process-warning/.gitattributes +2 -0
- package/node_modules/light-my-request/node_modules/process-warning/.github/dependabot.yml +13 -0
- package/node_modules/light-my-request/node_modules/process-warning/.github/workflows/ci.yml +24 -0
- package/node_modules/light-my-request/node_modules/process-warning/.taprc +2 -0
- package/node_modules/light-my-request/node_modules/process-warning/LICENSE +21 -0
- package/node_modules/light-my-request/node_modules/process-warning/README.md +118 -0
- package/node_modules/light-my-request/node_modules/process-warning/benchmarks/warn.js +25 -0
- package/node_modules/light-my-request/node_modules/process-warning/eslint.config.js +6 -0
- package/node_modules/light-my-request/node_modules/process-warning/examples/example.js +11 -0
- package/node_modules/light-my-request/node_modules/process-warning/index.js +124 -0
- package/node_modules/light-my-request/node_modules/process-warning/package.json +73 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/emit-interpolated-string.test.js +29 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/emit-once-only.test.js +28 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/emit-reset.test.js +36 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/emit-set.test.js +30 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/emit-unlimited.test.js +37 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/index.test.js +99 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/issue-88.test.js +33 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/jest.test.js +22 -0
- package/node_modules/light-my-request/node_modules/process-warning/test/no-warnings.test.js +80 -0
- package/node_modules/light-my-request/node_modules/process-warning/types/index.d.ts +37 -0
- package/node_modules/light-my-request/node_modules/process-warning/types/index.test-d.ts +36 -0
- package/node_modules/light-my-request/package.json +85 -0
- package/node_modules/light-my-request/test/async-await.test.js +55 -0
- package/node_modules/light-my-request/test/index.test.js +2316 -0
- package/node_modules/light-my-request/test/request.test.js +16 -0
- package/node_modules/light-my-request/test/response.test.js +19 -0
- package/node_modules/light-my-request/test/stream.test.js +359 -0
- package/node_modules/light-my-request/types/index.d.ts +128 -0
- package/node_modules/light-my-request/types/index.test-d.ts +149 -0
- package/node_modules/mime/CHANGELOG.md +312 -0
- package/node_modules/mime/LICENSE +21 -0
- package/node_modules/mime/Mime.js +97 -0
- package/node_modules/mime/README.md +178 -0
- package/node_modules/mime/cli.js +46 -0
- package/node_modules/mime/index.js +4 -0
- package/node_modules/mime/lite.js +4 -0
- package/node_modules/mime/package.json +52 -0
- package/node_modules/mime/types/other.js +1 -0
- package/node_modules/mime/types/standard.js +1 -0
- package/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/minimatch/README.md +528 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +22 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts +174 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts +22 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.js +841 -0
- package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/index.d.ts +174 -0
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/index.js +1114 -0
- package/node_modules/minimatch/dist/esm/index.js.map +1 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- package/node_modules/minimatch/package.json +73 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.d.ts +545 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/on-exit-leak-free/.github/dependabot.yml +12 -0
- package/node_modules/on-exit-leak-free/.github/workflows/ci.yml +46 -0
- package/node_modules/on-exit-leak-free/LICENSE +21 -0
- package/node_modules/on-exit-leak-free/README.md +54 -0
- package/node_modules/on-exit-leak-free/index.js +108 -0
- package/node_modules/on-exit-leak-free/package.json +37 -0
- package/node_modules/on-exit-leak-free/test/base.test.js +30 -0
- package/node_modules/on-exit-leak-free/test/event-emitter-leak.test.js +23 -0
- package/node_modules/on-exit-leak-free/test/fixtures/beforeExit.js +33 -0
- package/node_modules/on-exit-leak-free/test/fixtures/close.js +21 -0
- package/node_modules/on-exit-leak-free/test/fixtures/gc-not-close.js +24 -0
- package/node_modules/on-exit-leak-free/test/fixtures/unregister.js +24 -0
- package/node_modules/path-scurry/LICENSE.md +55 -0
- package/node_modules/path-scurry/README.md +636 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts +1115 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
- package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
- package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts +1115 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
- package/node_modules/path-scurry/dist/esm/index.js +1983 -0
- package/node_modules/path-scurry/dist/esm/index.js.map +1 -0
- package/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/path-scurry/node_modules/lru-cache/README.md +469 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js +1726 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js +1722 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/package.json +154 -0
- package/node_modules/path-scurry/package.json +72 -0
- package/node_modules/pino/.nojekyll +0 -0
- package/node_modules/pino/.prettierignore +1 -0
- package/node_modules/pino/CNAME +1 -0
- package/node_modules/pino/CONTRIBUTING.md +30 -0
- package/node_modules/pino/LICENSE +21 -0
- package/node_modules/pino/README.md +177 -0
- package/node_modules/pino/SECURITY.md +87 -0
- package/node_modules/pino/benchmarks/basic.bench.js +95 -0
- package/node_modules/pino/benchmarks/child-child.bench.js +52 -0
- package/node_modules/pino/benchmarks/child-creation.bench.js +73 -0
- package/node_modules/pino/benchmarks/child.bench.js +62 -0
- package/node_modules/pino/benchmarks/deep-object.bench.js +88 -0
- package/node_modules/pino/benchmarks/formatters.bench.js +50 -0
- package/node_modules/pino/benchmarks/internal/custom-levels.js +67 -0
- package/node_modules/pino/benchmarks/internal/just-pino-heavy.bench.js +76 -0
- package/node_modules/pino/benchmarks/internal/just-pino.bench.js +182 -0
- package/node_modules/pino/benchmarks/internal/parent-vs-child.bench.js +75 -0
- package/node_modules/pino/benchmarks/internal/redact.bench.js +86 -0
- package/node_modules/pino/benchmarks/long-string.bench.js +81 -0
- package/node_modules/pino/benchmarks/multi-arg.bench.js +193 -0
- package/node_modules/pino/benchmarks/multistream.js +98 -0
- package/node_modules/pino/benchmarks/object.bench.js +82 -0
- package/node_modules/pino/benchmarks/utils/generate-benchmark-doc.js +36 -0
- package/node_modules/pino/benchmarks/utils/runbench.js +138 -0
- package/node_modules/pino/benchmarks/utils/wrap-log-level.js +55 -0
- package/node_modules/pino/bin.js +6 -0
- package/node_modules/pino/browser.js +547 -0
- package/node_modules/pino/build/sync-version.js +25 -0
- package/node_modules/pino/docs/api.md +1593 -0
- package/node_modules/pino/docs/asynchronous.md +40 -0
- package/node_modules/pino/docs/benchmarks.md +55 -0
- package/node_modules/pino/docs/browser.md +278 -0
- package/node_modules/pino/docs/bundling.md +40 -0
- package/node_modules/pino/docs/child-loggers.md +95 -0
- package/node_modules/pino/docs/diagnostics.md +16 -0
- package/node_modules/pino/docs/ecosystem.md +86 -0
- package/node_modules/pino/docs/help.md +345 -0
- package/node_modules/pino/docs/lts.md +64 -0
- package/node_modules/pino/docs/pretty.md +35 -0
- package/node_modules/pino/docs/redaction.md +135 -0
- package/node_modules/pino/docs/transports.md +1376 -0
- package/node_modules/pino/docs/web.md +309 -0
- package/node_modules/pino/eslint.config.js +28 -0
- package/node_modules/pino/examples/basic.js +43 -0
- package/node_modules/pino/examples/transport.js +68 -0
- package/node_modules/pino/favicon.ico +0 -0
- package/node_modules/pino/file.js +12 -0
- package/node_modules/pino/inc-version.sh +42 -0
- package/node_modules/pino/index.html +55 -0
- package/node_modules/pino/lib/caller.js +30 -0
- package/node_modules/pino/lib/constants.js +28 -0
- package/node_modules/pino/lib/deprecations.js +8 -0
- package/node_modules/pino/lib/levels.js +241 -0
- package/node_modules/pino/lib/meta.js +3 -0
- package/node_modules/pino/lib/multistream.js +203 -0
- package/node_modules/pino/lib/proto.js +256 -0
- package/node_modules/pino/lib/redaction.js +114 -0
- package/node_modules/pino/lib/symbols.js +74 -0
- package/node_modules/pino/lib/time.js +39 -0
- package/node_modules/pino/lib/tools.js +427 -0
- package/node_modules/pino/lib/transport-stream.js +56 -0
- package/node_modules/pino/lib/transport.js +289 -0
- package/node_modules/pino/lib/worker.js +194 -0
- package/node_modules/pino/package.json +120 -0
- package/node_modules/pino/pino.d.ts +908 -0
- package/node_modules/pino/pino.js +234 -0
- package/node_modules/pino/test/basic.test.js +886 -0
- package/node_modules/pino/test/broken-pipe.test.js +59 -0
- package/node_modules/pino/test/browser-child.test.js +132 -0
- package/node_modules/pino/test/browser-disabled.test.js +87 -0
- package/node_modules/pino/test/browser-early-console-freeze.test.js +12 -0
- package/node_modules/pino/test/browser-is-level-enabled.test.js +101 -0
- package/node_modules/pino/test/browser-levels.test.js +241 -0
- package/node_modules/pino/test/browser-serializers.test.js +352 -0
- package/node_modules/pino/test/browser-timestamp.test.js +88 -0
- package/node_modules/pino/test/browser-transmit.test.js +417 -0
- package/node_modules/pino/test/browser.test.js +698 -0
- package/node_modules/pino/test/complex-objects.test.js +36 -0
- package/node_modules/pino/test/crlf.test.js +34 -0
- package/node_modules/pino/test/custom-levels.test.js +267 -0
- package/node_modules/pino/test/diagnostics.test.js +107 -0
- package/node_modules/pino/test/error-key.test.js +37 -0
- package/node_modules/pino/test/error.test.js +403 -0
- package/node_modules/pino/test/escaping.test.js +93 -0
- package/node_modules/pino/test/esm/esm.mjs +14 -0
- package/node_modules/pino/test/esm/index.test.js +21 -0
- package/node_modules/pino/test/esm/named-exports.mjs +29 -0
- package/node_modules/pino/test/exit.test.js +79 -0
- package/node_modules/pino/test/fixtures/broken-pipe/basic.js +9 -0
- package/node_modules/pino/test/fixtures/broken-pipe/destination.js +10 -0
- package/node_modules/pino/test/fixtures/broken-pipe/syncfalse.js +12 -0
- package/node_modules/pino/test/fixtures/console-transport.js +13 -0
- package/node_modules/pino/test/fixtures/crashing-transport.js +13 -0
- package/node_modules/pino/test/fixtures/default-exit.js +8 -0
- package/node_modules/pino/test/fixtures/destination-exit.js +8 -0
- package/node_modules/pino/test/fixtures/eval/index.js +13 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/14-files.js +3 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/2-files.js +3 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file1.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file10.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file11.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file12.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file13.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file14.js +11 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file2.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file3.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file4.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file5.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file6.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file7.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file8.js +5 -0
- package/node_modules/pino/test/fixtures/eval/node_modules/file9.js +5 -0
- package/node_modules/pino/test/fixtures/noop-transport.js +10 -0
- package/node_modules/pino/test/fixtures/pretty/null-prototype.js +8 -0
- package/node_modules/pino/test/fixtures/stdout-hack-protection.js +11 -0
- package/node_modules/pino/test/fixtures/syncfalse-child.js +6 -0
- package/node_modules/pino/test/fixtures/syncfalse-exit.js +9 -0
- package/node_modules/pino/test/fixtures/syncfalse-flush-exit.js +10 -0
- package/node_modules/pino/test/fixtures/syncfalse.js +6 -0
- package/node_modules/pino/test/fixtures/syntax-error-esm.mjs +2 -0
- package/node_modules/pino/test/fixtures/to-file-transport-with-transform.js +20 -0
- package/node_modules/pino/test/fixtures/to-file-transport.js +13 -0
- package/node_modules/pino/test/fixtures/to-file-transport.mjs +8 -0
- package/node_modules/pino/test/fixtures/transport/index.js +12 -0
- package/node_modules/pino/test/fixtures/transport/package.json +5 -0
- package/node_modules/pino/test/fixtures/transport-exit-immediately-with-async-dest.js +16 -0
- package/node_modules/pino/test/fixtures/transport-exit-immediately.js +11 -0
- package/node_modules/pino/test/fixtures/transport-exit-on-ready.js +12 -0
- package/node_modules/pino/test/fixtures/transport-invalid-node-options.js +26 -0
- package/node_modules/pino/test/fixtures/transport-main.js +9 -0
- package/node_modules/pino/test/fixtures/transport-many-lines.js +29 -0
- package/node_modules/pino/test/fixtures/transport-preload-main.mjs +13 -0
- package/node_modules/pino/test/fixtures/transport-preload.mjs +13 -0
- package/node_modules/pino/test/fixtures/transport-string-stdout.js +9 -0
- package/node_modules/pino/test/fixtures/transport-transform.js +21 -0
- package/node_modules/pino/test/fixtures/transport-uses-pino-config.js +33 -0
- package/node_modules/pino/test/fixtures/transport-with-on-exit.js +12 -0
- package/node_modules/pino/test/fixtures/transport-worker-data.js +19 -0
- package/node_modules/pino/test/fixtures/transport-worker-name.js +24 -0
- package/node_modules/pino/test/fixtures/transport-worker.js +15 -0
- package/node_modules/pino/test/fixtures/transport-wrong-export-type.js +3 -0
- package/node_modules/pino/test/fixtures/ts/to-file-transport-native.mts +15 -0
- package/node_modules/pino/test/fixtures/ts/to-file-transport-with-transform.ts +18 -0
- package/node_modules/pino/test/fixtures/ts/to-file-transport.ts +11 -0
- package/node_modules/pino/test/fixtures/ts/transpile.cjs +36 -0
- package/node_modules/pino/test/fixtures/ts/transport-exit-immediately-with-async-dest.ts +15 -0
- package/node_modules/pino/test/fixtures/ts/transport-exit-immediately.ts +10 -0
- package/node_modules/pino/test/fixtures/ts/transport-exit-on-ready.ts +11 -0
- package/node_modules/pino/test/fixtures/ts/transport-main.ts +8 -0
- package/node_modules/pino/test/fixtures/ts/transport-string-stdout.ts +8 -0
- package/node_modules/pino/test/fixtures/ts/transport-worker.ts +14 -0
- package/node_modules/pino/test/formatters.test.js +364 -0
- package/node_modules/pino/test/helper.d.ts +4 -0
- package/node_modules/pino/test/helper.js +155 -0
- package/node_modules/pino/test/hooks.test.js +114 -0
- package/node_modules/pino/test/http.test.js +214 -0
- package/node_modules/pino/test/internals/version.test.js +17 -0
- package/node_modules/pino/test/is-level-enabled.test.js +179 -0
- package/node_modules/pino/test/jest/basic.spec.js +10 -0
- package/node_modules/pino/test/levels.test.js +810 -0
- package/node_modules/pino/test/metadata.test.js +120 -0
- package/node_modules/pino/test/mixin-merge-strategy.test.js +57 -0
- package/node_modules/pino/test/mixin.test.js +241 -0
- package/node_modules/pino/test/multistream.test.js +729 -0
- package/node_modules/pino/test/redact.test.js +893 -0
- package/node_modules/pino/test/serializers.test.js +257 -0
- package/node_modules/pino/test/stdout-protection.test.js +41 -0
- package/node_modules/pino/test/syncfalse.test.js +186 -0
- package/node_modules/pino/test/timestamp-nano.test.js +37 -0
- package/node_modules/pino/test/timestamp.test.js +124 -0
- package/node_modules/pino/test/transport/big.test.js +42 -0
- package/node_modules/pino/test/transport/bundlers-support.test.js +99 -0
- package/node_modules/pino/test/transport/caller.test.js +24 -0
- package/node_modules/pino/test/transport/core.test.js +733 -0
- package/node_modules/pino/test/transport/core.transpiled.test.ts +114 -0
- package/node_modules/pino/test/transport/crash.test.js +36 -0
- package/node_modules/pino/test/transport/module-link.test.js +241 -0
- package/node_modules/pino/test/transport/native-type-stripping.test.mjs +151 -0
- package/node_modules/pino/test/transport/node-options.test.js +116 -0
- package/node_modules/pino/test/transport/pipeline.test.js +137 -0
- package/node_modules/pino/test/transport/preload.test.js +54 -0
- package/node_modules/pino/test/transport/repl.test.js +15 -0
- package/node_modules/pino/test/transport/sync-false.test.js +67 -0
- package/node_modules/pino/test/transport/sync-true.test.js +57 -0
- package/node_modules/pino/test/transport/targets.test.js +48 -0
- package/node_modules/pino/test/transport/uses-pino-config.test.js +166 -0
- package/node_modules/pino/test/transport-stream.test.js +40 -0
- package/node_modules/pino/test/types/pino-import.test-d.cts +30 -0
- package/node_modules/pino/test/types/pino-multistream.test-d.ts +28 -0
- package/node_modules/pino/test/types/pino-top-export.test-d.ts +34 -0
- package/node_modules/pino/test/types/pino-transport.test-d.ts +156 -0
- package/node_modules/pino/test/types/pino-type-only.test-d.ts +75 -0
- package/node_modules/pino/test/types/pino.test-d.ts +683 -0
- package/node_modules/pino/test/types/pino.ts +91 -0
- package/node_modules/pino/tsconfig.json +14 -0
- package/node_modules/pino-abstract-transport/.github/dependabot.yml +13 -0
- package/node_modules/pino-abstract-transport/.github/workflows/ci.yml +80 -0
- package/node_modules/pino-abstract-transport/.husky/pre-commit +4 -0
- package/node_modules/pino-abstract-transport/LICENSE +21 -0
- package/node_modules/pino-abstract-transport/README.md +171 -0
- package/node_modules/pino-abstract-transport/index.d.ts +122 -0
- package/node_modules/pino-abstract-transport/index.js +128 -0
- package/node_modules/pino-abstract-transport/package.json +41 -0
- package/node_modules/pino-abstract-transport/test/base.test.js +473 -0
- package/node_modules/pino-abstract-transport/test/fixtures/transport-async-iteration.js +22 -0
- package/node_modules/pino-abstract-transport/test/fixtures/transport-on-data.js +22 -0
- package/node_modules/pino-abstract-transport/test/fixtures/transport-transform.js +24 -0
- package/node_modules/pino-abstract-transport/test/fixtures/worker-pipeline.js +15 -0
- package/node_modules/pino-abstract-transport/test/match.js +24 -0
- package/node_modules/pino-abstract-transport/test/types/index.test-d.ts +31 -0
- package/node_modules/pino-abstract-transport/test/worker.test.js +372 -0
- package/node_modules/pino-std-serializers/.editorconfig +13 -0
- package/node_modules/pino-std-serializers/.github/dependabot.yml +13 -0
- package/node_modules/pino-std-serializers/.github/workflows/ci.yml +81 -0
- package/node_modules/pino-std-serializers/LICENSE +7 -0
- package/node_modules/pino-std-serializers/Readme.md +182 -0
- package/node_modules/pino-std-serializers/eslint.config.js +7 -0
- package/node_modules/pino-std-serializers/index.d.ts +145 -0
- package/node_modules/pino-std-serializers/index.js +36 -0
- package/node_modules/pino-std-serializers/lib/err-helpers.js +118 -0
- package/node_modules/pino-std-serializers/lib/err-proto.js +48 -0
- package/node_modules/pino-std-serializers/lib/err-with-cause.js +48 -0
- package/node_modules/pino-std-serializers/lib/err.js +45 -0
- package/node_modules/pino-std-serializers/lib/req.js +100 -0
- package/node_modules/pino-std-serializers/lib/res.js +47 -0
- package/node_modules/pino-std-serializers/package.json +42 -0
- package/node_modules/pino-std-serializers/test/err-with-cause.test.js +187 -0
- package/node_modules/pino-std-serializers/test/err.test.js +200 -0
- package/node_modules/pino-std-serializers/test/req.test.js +477 -0
- package/node_modules/pino-std-serializers/test/res.test.js +120 -0
- package/node_modules/pino-std-serializers/test/types/index.test-d.ts +71 -0
- package/node_modules/pino-std-serializers/tsconfig.json +13 -0
- package/node_modules/process-warning/.gitattributes +2 -0
- package/node_modules/process-warning/.github/dependabot.yml +13 -0
- package/node_modules/process-warning/.github/workflows/ci.yml +22 -0
- package/node_modules/process-warning/LICENSE +21 -0
- package/node_modules/process-warning/README.md +118 -0
- package/node_modules/process-warning/benchmarks/warn.js +25 -0
- package/node_modules/process-warning/eslint.config.js +6 -0
- package/node_modules/process-warning/examples/example.js +11 -0
- package/node_modules/process-warning/index.js +124 -0
- package/node_modules/process-warning/package.json +73 -0
- package/node_modules/process-warning/test/emit-interpolated-string.test.js +34 -0
- package/node_modules/process-warning/test/emit-once-only.test.js +33 -0
- package/node_modules/process-warning/test/emit-reset.test.js +40 -0
- package/node_modules/process-warning/test/emit-set.test.js +35 -0
- package/node_modules/process-warning/test/emit-unlimited.test.js +42 -0
- package/node_modules/process-warning/test/index.test.js +99 -0
- package/node_modules/process-warning/test/issue-88.test.js +38 -0
- package/node_modules/process-warning/test/jest.test.js +24 -0
- package/node_modules/process-warning/test/no-warnings.test.js +80 -0
- package/node_modules/process-warning/test/promise.js +10 -0
- package/node_modules/process-warning/types/index.d.ts +37 -0
- package/node_modules/process-warning/types/index.test-d.ts +36 -0
- package/node_modules/quick-format-unescaped/.github/workflows/ci.yml +21 -0
- package/node_modules/quick-format-unescaped/LICENSE +21 -0
- package/node_modules/quick-format-unescaped/benchmark.js +24 -0
- package/node_modules/quick-format-unescaped/index.js +109 -0
- package/node_modules/quick-format-unescaped/package.json +29 -0
- package/node_modules/quick-format-unescaped/readme.md +66 -0
- package/node_modules/quick-format-unescaped/test/index.js +136 -0
- package/node_modules/real-require/LICENSE.md +21 -0
- package/node_modules/real-require/README.md +51 -0
- package/node_modules/real-require/package.json +49 -0
- package/node_modules/real-require/src/index.js +14 -0
- package/node_modules/require-from-string/index.js +34 -0
- package/node_modules/require-from-string/license +21 -0
- package/node_modules/require-from-string/package.json +28 -0
- package/node_modules/require-from-string/readme.md +56 -0
- package/node_modules/ret/LICENSE +21 -0
- package/node_modules/ret/README.md +539 -0
- package/node_modules/ret/dist/index.d.ts +7 -0
- package/node_modules/ret/dist/index.js +26 -0
- package/node_modules/ret/dist/index.js.map +1 -0
- package/node_modules/ret/dist/reconstruct.d.ts +2 -0
- package/node_modules/ret/dist/reconstruct.js +77 -0
- package/node_modules/ret/dist/reconstruct.js.map +1 -0
- package/node_modules/ret/dist/sets-lookup.d.ts +5 -0
- package/node_modules/ret/dist/sets-lookup.js +51 -0
- package/node_modules/ret/dist/sets-lookup.js.map +1 -0
- package/node_modules/ret/dist/sets.d.ts +9 -0
- package/node_modules/ret/dist/sets.js +43 -0
- package/node_modules/ret/dist/sets.js.map +1 -0
- package/node_modules/ret/dist/tokenizer.d.ts +8 -0
- package/node_modules/ret/dist/tokenizer.js +361 -0
- package/node_modules/ret/dist/tokenizer.js.map +1 -0
- package/node_modules/ret/dist/types/index.d.ts +3 -0
- package/node_modules/ret/dist/types/index.js +16 -0
- package/node_modules/ret/dist/types/index.js.map +1 -0
- package/node_modules/ret/dist/types/set-lookup.d.ts +8 -0
- package/node_modules/ret/dist/types/set-lookup.js +3 -0
- package/node_modules/ret/dist/types/set-lookup.js.map +1 -0
- package/node_modules/ret/dist/types/tokens.d.ts +41 -0
- package/node_modules/ret/dist/types/tokens.js +3 -0
- package/node_modules/ret/dist/types/tokens.js.map +1 -0
- package/node_modules/ret/dist/types/types.d.ts +10 -0
- package/node_modules/ret/dist/types/types.js +15 -0
- package/node_modules/ret/dist/types/types.js.map +1 -0
- package/node_modules/ret/dist/util.d.ts +18 -0
- package/node_modules/ret/dist/util.js +82 -0
- package/node_modules/ret/dist/util.js.map +1 -0
- package/node_modules/ret/dist/write-set-tokens.d.ts +14 -0
- package/node_modules/ret/dist/write-set-tokens.js +108 -0
- package/node_modules/ret/dist/write-set-tokens.js.map +1 -0
- package/node_modules/ret/package.json +42 -0
- package/node_modules/reusify/.github/dependabot.yml +7 -0
- package/node_modules/reusify/.github/workflows/ci.yml +96 -0
- package/node_modules/reusify/LICENSE +22 -0
- package/node_modules/reusify/README.md +139 -0
- package/node_modules/reusify/SECURITY.md +15 -0
- package/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
- package/node_modules/reusify/benchmarks/fib.js +13 -0
- package/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
- package/node_modules/reusify/eslint.config.js +14 -0
- package/node_modules/reusify/package.json +50 -0
- package/node_modules/reusify/reusify.d.ts +14 -0
- package/node_modules/reusify/reusify.js +33 -0
- package/node_modules/reusify/test.js +66 -0
- package/node_modules/reusify/tsconfig.json +11 -0
- package/node_modules/rfdc/.github/workflows/ci.yml +21 -0
- package/node_modules/rfdc/LICENSE +15 -0
- package/node_modules/rfdc/default.js +3 -0
- package/node_modules/rfdc/index.d.ts +13 -0
- package/node_modules/rfdc/index.js +198 -0
- package/node_modules/rfdc/index.test-d.ts +13 -0
- package/node_modules/rfdc/package.json +73 -0
- package/node_modules/rfdc/readme.md +181 -0
- package/node_modules/rfdc/test/index.js +306 -0
- package/node_modules/safe-regex2/.gitattributes +2 -0
- package/node_modules/safe-regex2/.github/dependabot.yml +13 -0
- package/node_modules/safe-regex2/.github/workflows/ci.yml +33 -0
- package/node_modules/safe-regex2/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/safe-regex2/LICENSE +21 -0
- package/node_modules/safe-regex2/README.md +68 -0
- package/node_modules/safe-regex2/bin/safe-regex2.js +58 -0
- package/node_modules/safe-regex2/eslint.config.js +6 -0
- package/node_modules/safe-regex2/example/safe.js +5 -0
- package/node_modules/safe-regex2/index.js +76 -0
- package/node_modules/safe-regex2/package.json +78 -0
- package/node_modules/safe-regex2/test/regex.test.js +58 -0
- package/node_modules/safe-regex2/types/index.d.ts +9 -0
- package/node_modules/safe-regex2/types/index.test-d.ts +12 -0
- package/node_modules/safe-stable-stringify/LICENSE +21 -0
- package/node_modules/safe-stable-stringify/esm/package.json +4 -0
- package/node_modules/safe-stable-stringify/esm/wrapper.d.ts +4 -0
- package/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
- package/node_modules/safe-stable-stringify/index.d.ts +22 -0
- package/node_modules/safe-stable-stringify/index.js +625 -0
- package/node_modules/safe-stable-stringify/package.json +65 -0
- package/node_modules/safe-stable-stringify/readme.md +179 -0
- package/node_modules/secure-json-parse/.airtap.yml +7 -0
- package/node_modules/secure-json-parse/.gitattributes +2 -0
- package/node_modules/secure-json-parse/.github/dependabot.yml +13 -0
- package/node_modules/secure-json-parse/.github/stale.yml +21 -0
- package/node_modules/secure-json-parse/.github/workflows/ci.yml +149 -0
- package/node_modules/secure-json-parse/LICENSE +19 -0
- package/node_modules/secure-json-parse/README.md +132 -0
- package/node_modules/secure-json-parse/benchmarks/ignore.js +35 -0
- package/node_modules/secure-json-parse/benchmarks/no__proto__.js +40 -0
- package/node_modules/secure-json-parse/benchmarks/package.json +15 -0
- package/node_modules/secure-json-parse/benchmarks/remove.js +39 -0
- package/node_modules/secure-json-parse/benchmarks/throw.js +49 -0
- package/node_modules/secure-json-parse/benchmarks/valid.js +49 -0
- package/node_modules/secure-json-parse/eslint.config.js +6 -0
- package/node_modules/secure-json-parse/index.js +161 -0
- package/node_modules/secure-json-parse/package.json +74 -0
- package/node_modules/secure-json-parse/test/index.test.js +649 -0
- package/node_modules/secure-json-parse/types/index.d.ts +60 -0
- package/node_modules/secure-json-parse/types/index.test-d.ts +43 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +573 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/set-cookie-parser/LICENSE +21 -0
- package/node_modules/set-cookie-parser/README.md +202 -0
- package/node_modules/set-cookie-parser/lib/set-cookie.js +242 -0
- package/node_modules/set-cookie-parser/package.json +45 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/sonic-boom/.eslintignore +2 -0
- package/node_modules/sonic-boom/.taprc +3 -0
- package/node_modules/sonic-boom/LICENSE +21 -0
- package/node_modules/sonic-boom/README.md +153 -0
- package/node_modules/sonic-boom/bench.js +98 -0
- package/node_modules/sonic-boom/check.js +18 -0
- package/node_modules/sonic-boom/example.js +8 -0
- package/node_modules/sonic-boom/fixtures/firehose.js +22 -0
- package/node_modules/sonic-boom/index.js +733 -0
- package/node_modules/sonic-boom/package.json +52 -0
- package/node_modules/sonic-boom/test/destroy.test.js +49 -0
- package/node_modules/sonic-boom/test/end.test.js +98 -0
- package/node_modules/sonic-boom/test/flush-sync.test.js +140 -0
- package/node_modules/sonic-boom/test/flush.test.js +419 -0
- package/node_modules/sonic-boom/test/fsync.test.js +63 -0
- package/node_modules/sonic-boom/test/helper.js +42 -0
- package/node_modules/sonic-boom/test/minlength.test.js +35 -0
- package/node_modules/sonic-boom/test/mode.test.js +116 -0
- package/node_modules/sonic-boom/test/periodicflush.test.js +61 -0
- package/node_modules/sonic-boom/test/reopen.test.js +239 -0
- package/node_modules/sonic-boom/test/retry.test.js +414 -0
- package/node_modules/sonic-boom/test/sync.test.js +261 -0
- package/node_modules/sonic-boom/test/write.test.js +515 -0
- package/node_modules/sonic-boom/types/index.d.ts +63 -0
- package/node_modules/sonic-boom/types/tests/test.ts +4 -0
- package/node_modules/split2/LICENSE +13 -0
- package/node_modules/split2/README.md +85 -0
- package/node_modules/split2/bench.js +27 -0
- package/node_modules/split2/index.js +141 -0
- package/node_modules/split2/package.json +39 -0
- package/node_modules/split2/test.js +409 -0
- package/node_modules/statuses/HISTORY.md +87 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +139 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/thread-stream/.claude/settings.local.json +15 -0
- package/node_modules/thread-stream/.github/dependabot.yml +13 -0
- package/node_modules/thread-stream/.github/workflows/ci.yml +74 -0
- package/node_modules/thread-stream/LICENSE +21 -0
- package/node_modules/thread-stream/README.md +138 -0
- package/node_modules/thread-stream/bench.js +85 -0
- package/node_modules/thread-stream/eslint.config.js +10 -0
- package/node_modules/thread-stream/index.d.ts +99 -0
- package/node_modules/thread-stream/index.js +645 -0
- package/node_modules/thread-stream/lib/indexes.js +11 -0
- package/node_modules/thread-stream/lib/wait.js +77 -0
- package/node_modules/thread-stream/lib/worker.js +298 -0
- package/node_modules/thread-stream/node_modules/real-require/LICENSE.md +21 -0
- package/node_modules/thread-stream/node_modules/real-require/README.md +51 -0
- package/node_modules/thread-stream/node_modules/real-require/package.json +38 -0
- package/node_modules/thread-stream/node_modules/real-require/src/index.js +14 -0
- package/node_modules/thread-stream/package.json +50 -0
- package/node_modules/thread-stream/test/base.test.js +259 -0
- package/node_modules/thread-stream/test/bench.test.js +38 -0
- package/node_modules/thread-stream/test/bundlers.test.js +59 -0
- package/node_modules/thread-stream/test/close-on-gc.js +37 -0
- package/node_modules/thread-stream/test/commonjs-fallback.test.js +75 -0
- package/node_modules/thread-stream/test/context.test.js +21 -0
- package/node_modules/thread-stream/test/create-and-exit.js +16 -0
- package/node_modules/thread-stream/test/custom-worker.js +9 -0
- package/node_modules/thread-stream/test/dir with spaces/test-package.zip +0 -0
- package/node_modules/thread-stream/test/emit-event.js +22 -0
- package/node_modules/thread-stream/test/end.test.js +56 -0
- package/node_modules/thread-stream/test/error.js +14 -0
- package/node_modules/thread-stream/test/esm.test.mjs +46 -0
- package/node_modules/thread-stream/test/event.test.js +24 -0
- package/node_modules/thread-stream/test/exit.js +14 -0
- package/node_modules/thread-stream/test/flush-worker.js +68 -0
- package/node_modules/thread-stream/test/flush.test.js +112 -0
- package/node_modules/thread-stream/test/get-context.js +22 -0
- package/node_modules/thread-stream/test/helper.d.ts +1 -0
- package/node_modules/thread-stream/test/helper.js +26 -0
- package/node_modules/thread-stream/test/indexes.test.js +11 -0
- package/node_modules/thread-stream/test/message-without-code.js +19 -0
- package/node_modules/thread-stream/test/multibyte-chars.test.mjs +75 -0
- package/node_modules/thread-stream/test/multibyte-overrun.test.mjs +33 -0
- package/node_modules/thread-stream/test/on-message.js +18 -0
- package/node_modules/thread-stream/test/pkg/index.js +37 -0
- package/node_modules/thread-stream/test/pkg/pkg.config.json +14 -0
- package/node_modules/thread-stream/test/pkg/pkg.test.js +45 -0
- package/node_modules/thread-stream/test/port.js +16 -0
- package/node_modules/thread-stream/test/post-message.test.js +23 -0
- package/node_modules/thread-stream/test/report-thread-name.js +16 -0
- package/node_modules/thread-stream/test/string-limit-2.test.js +35 -0
- package/node_modules/thread-stream/test/string-limit.test.js +37 -0
- package/node_modules/thread-stream/test/syntax-error.mjs +2 -0
- package/node_modules/thread-stream/test/thread-management.test.js +150 -0
- package/node_modules/thread-stream/test/to-file-on-destroy.js +23 -0
- package/node_modules/thread-stream/test/to-file-on-final.js +24 -0
- package/node_modules/thread-stream/test/to-file.js +12 -0
- package/node_modules/thread-stream/test/to-file.mjs +8 -0
- package/node_modules/thread-stream/test/to-next.js +9 -0
- package/node_modules/thread-stream/test/transpiled.test.js +29 -0
- package/node_modules/thread-stream/test/ts/to-file.ts +10 -0
- package/node_modules/thread-stream/test/ts/transpile.sh +19 -0
- package/node_modules/thread-stream/test/ts-commonjs-default-export.zip +0 -0
- package/node_modules/thread-stream/test/ts-native.test.mjs +35 -0
- package/node_modules/thread-stream/test/ts-node-fallback.test.js +35 -0
- package/node_modules/thread-stream/test/uncaughtException.js +21 -0
- package/node_modules/thread-stream/test/unhandledRejection.js +21 -0
- package/node_modules/thread-stream/test/watch-mode.test.js +30 -0
- package/node_modules/thread-stream/test/worker-name.test.js +43 -0
- package/node_modules/thread-stream/test/yarnrc.yml +7 -0
- package/node_modules/thread-stream/tsconfig.json +8 -0
- package/node_modules/toad-cache/LICENSE +21 -0
- package/node_modules/toad-cache/README.md +265 -0
- package/node_modules/toad-cache/dist/toad-cache.cjs +878 -0
- package/node_modules/toad-cache/dist/toad-cache.mjs +852 -0
- package/node_modules/toad-cache/package.json +84 -0
- package/node_modules/toad-cache/toad-cache.d.cts +138 -0
- package/node_modules/toad-cache/toad-cache.d.ts +128 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/package.json +43 -20
- package/scripts/build-local.sh +10 -11
- package/scripts/check-app-path-boundaries.mjs +121 -0
- package/scripts/check-app-spec.mjs +127 -25
- package/scripts/check-colima-launchd.mjs +26 -22
- package/scripts/check-integration-isolation.ts +541 -0
- package/scripts/check-new-file-tests.mjs +16 -47
- package/scripts/check-open-core-boundaries.mjs +334 -0
- package/scripts/check-test-layering.sh +86 -0
- package/scripts/fixtures/instances/hermes-sample/instance.json +3 -2
- package/scripts/fixtures/instances/legacy-openclaw-sample/instance.json +1 -1
- package/scripts/local-web-upgrade-test.README +147 -0
- package/scripts/local-web-upgrade-test.example.env +54 -0
- package/scripts/local-web-upgrade-test.sh +894 -0
- package/scripts/pack-gui-and-send-pi.sh +41 -0
- package/scripts/pack-with-gui.mjs +391 -0
- package/scripts/perf/instances.js +1 -1
- package/scripts/prune-open-core-dist.mjs +91 -0
- package/scripts/run.sh +24 -25
- package/scripts/setup-pi.sh +2 -2
- package/scripts/smoke/hermes-bootstrap.sh +7 -7
- package/scripts/smoke-backend.mjs +33 -1
- package/templates/hermes-entrypoint.sh +19 -29
- package/apps/openwebui-container.yaml +0 -97
- package/apps/playwright-container.yaml +0 -126
- package/dist/cli/panel.d.ts +0 -27
- package/dist/cli/panel.js +0 -805
- package/dist/cli/panel.js.map +0 -1
- package/dist/crypto-shim.d.ts +0 -1
- package/dist/crypto-shim.js +0 -2
- package/dist/crypto-shim.js.map +0 -1
- package/dist/routes/agent-apps.d.ts +0 -15
- package/dist/routes/agent-apps.js +0 -78
- package/dist/routes/agent-apps.js.map +0 -1
- package/dist/routes/internal.d.ts +0 -2
- package/dist/routes/internal.js +0 -59
- package/dist/routes/internal.js.map +0 -1
- package/dist/routes/runtime.d.ts +0 -15
- package/dist/routes/runtime.js +0 -69
- package/dist/routes/runtime.js.map +0 -1
- package/dist/services/agent-apps/catalog.d.ts +0 -33
- package/dist/services/agent-apps/catalog.js +0 -88
- package/dist/services/agent-apps/catalog.js.map +0 -1
- package/dist/services/agent-apps/index.d.ts +0 -36
- package/dist/services/agent-apps/index.js +0 -171
- package/dist/services/agent-apps/index.js.map +0 -1
- package/dist/services/agent-apps/installers/adapter-probes.d.ts +0 -49
- package/dist/services/agent-apps/installers/adapter-probes.js +0 -223
- package/dist/services/agent-apps/installers/adapter-probes.js.map +0 -1
- package/dist/services/agent-apps/installers/adapter.d.ts +0 -30
- package/dist/services/agent-apps/installers/adapter.js +0 -171
- package/dist/services/agent-apps/installers/adapter.js.map +0 -1
- package/dist/services/agent-apps/installers/registry-probe.js.map +0 -1
- package/dist/services/agent-apps/installers/shell-script.d.ts +0 -47
- package/dist/services/agent-apps/installers/shell-script.js +0 -488
- package/dist/services/agent-apps/installers/shell-script.js.map +0 -1
- package/dist/services/agent-apps/types.d.ts +0 -128
- package/dist/services/agent-apps/types.js +0 -17
- package/dist/services/agent-apps/types.js.map +0 -1
- package/dist/services/app/app-compiler.js +0 -172
- package/dist/services/app/app-compiler.js.map +0 -1
- package/dist/services/app/app-manager.d.ts +0 -174
- package/dist/services/app/app-manager.js +0 -2741
- package/dist/services/app/app-manager.js.map +0 -1
- package/dist/services/app/custom-manager.d.ts +0 -27
- package/dist/services/app/custom-manager.js +0 -285
- package/dist/services/app/custom-manager.js.map +0 -1
- package/dist/services/app/hermes-agent-manager.d.ts +0 -20
- package/dist/services/app/hermes-agent-manager.js +0 -292
- package/dist/services/app/hermes-agent-manager.js.map +0 -1
- package/dist/services/app/id-normalizer.d.ts +0 -27
- package/dist/services/app/id-normalizer.js +0 -77
- package/dist/services/app/id-normalizer.js.map +0 -1
- package/dist/services/app/ollama-manager.d.ts +0 -18
- package/dist/services/app/ollama-manager.js +0 -207
- package/dist/services/app/ollama-manager.js.map +0 -1
- package/dist/services/app/openclaw-manager.d.ts +0 -63
- package/dist/services/app/openclaw-manager.js +0 -1210
- package/dist/services/app/openclaw-manager.js.map +0 -1
- package/dist/services/app/paths.d.ts +0 -47
- package/dist/services/app/paths.js +0 -68
- package/dist/services/app/paths.js.map +0 -1
- package/dist/services/app/platform-transform.d.ts +0 -32
- package/dist/services/app/platform-transform.js +0 -65
- package/dist/services/app/platform-transform.js.map +0 -1
- package/dist/services/app/provide-resolver.d.ts +0 -29
- package/dist/services/app/provide-resolver.js +0 -112
- package/dist/services/app/provide-resolver.js.map +0 -1
- package/dist/services/app/registry.d.ts +0 -17
- package/dist/services/app/registry.js +0 -31
- package/dist/services/app/registry.js.map +0 -1
- package/dist/services/app/remote-spec.d.ts +0 -14
- package/dist/services/app/remote-spec.js +0 -58
- package/dist/services/app/remote-spec.js.map +0 -1
- package/dist/services/app/terminal-session-manager.js +0 -157
- package/dist/services/app/terminal-session-manager.js.map +0 -1
- package/dist/services/app/types.d.ts +0 -72
- package/dist/services/app/types.js +0 -16
- package/dist/services/app/types.js.map +0 -1
- package/dist/services/app-passwords.js +0 -173
- package/dist/services/app-passwords.js.map +0 -1
- package/dist/services/backup-manager.d.ts +0 -264
- package/dist/services/backup-manager.js +0 -2264
- package/dist/services/backup-manager.js.map +0 -1
- package/dist/services/backup-verify.js +0 -240
- package/dist/services/backup-verify.js.map +0 -1
- package/dist/services/capability-endpoint-validator.d.ts +0 -41
- package/dist/services/capability-endpoint-validator.js +0 -123
- package/dist/services/capability-endpoint-validator.js.map +0 -1
- package/dist/services/capability-health.d.ts +0 -16
- package/dist/services/capability-health.js +0 -121
- package/dist/services/capability-health.js.map +0 -1
- package/dist/services/capability-registry.d.ts +0 -106
- package/dist/services/capability-registry.js +0 -313
- package/dist/services/capability-registry.js.map +0 -1
- package/dist/services/connection-apply.d.ts +0 -91
- package/dist/services/connection-apply.js +0 -475
- package/dist/services/connection-apply.js.map +0 -1
- package/dist/services/connection-resolver.d.ts +0 -65
- package/dist/services/connection-resolver.js +0 -281
- package/dist/services/connection-resolver.js.map +0 -1
- package/dist/services/connection-transactor.d.ts +0 -39
- package/dist/services/connection-transactor.js +0 -351
- package/dist/services/connection-transactor.js.map +0 -1
- package/dist/services/external-mounts.js +0 -187
- package/dist/services/external-mounts.js.map +0 -1
- package/dist/services/files-manager.d.ts +0 -252
- package/dist/services/files-manager.js +0 -1075
- package/dist/services/files-manager.js.map +0 -1
- package/dist/services/files-mounts.d.ts +0 -42
- package/dist/services/files-mounts.js +0 -207
- package/dist/services/files-mounts.js.map +0 -1
- package/dist/services/instance-manager.d.ts +0 -191
- package/dist/services/instance-manager.js +0 -1296
- package/dist/services/instance-manager.js.map +0 -1
- package/dist/services/macos-launchd.d.ts +0 -89
- package/dist/services/macos-launchd.js +0 -273
- package/dist/services/macos-launchd.js.map +0 -1
- package/dist/services/nomad-manager.d.ts +0 -290
- package/dist/services/nomad-manager.js +0 -3953
- package/dist/services/nomad-manager.js.map +0 -1
- package/dist/services/organize/applier.js +0 -218
- package/dist/services/organize/applier.js.map +0 -1
- package/dist/services/organize/rules.js +0 -286
- package/dist/services/organize/rules.js.map +0 -1
- package/dist/services/organize/scanner.js +0 -366
- package/dist/services/organize/scanner.js.map +0 -1
- package/dist/services/organize/store.js +0 -82
- package/dist/services/organize/store.js.map +0 -1
- package/dist/services/panel-manager.d.ts +0 -50
- package/dist/services/panel-manager.js +0 -472
- package/dist/services/panel-manager.js.map +0 -1
- package/dist/services/plugin-installer.js +0 -128
- package/dist/services/plugin-installer.js.map +0 -1
- package/dist/services/process-manager.d.ts +0 -25
- package/dist/services/process-manager.js +0 -568
- package/dist/services/process-manager.js.map +0 -1
- package/dist/services/runtime/adapters/custom.d.ts +0 -20
- package/dist/services/runtime/adapters/custom.js +0 -146
- package/dist/services/runtime/adapters/custom.js.map +0 -1
- package/dist/services/runtime/adapters/hermes.d.ts +0 -204
- package/dist/services/runtime/adapters/hermes.js +0 -1631
- package/dist/services/runtime/adapters/hermes.js.map +0 -1
- package/dist/services/runtime/adapters/openclaw-mcporter.d.ts +0 -45
- package/dist/services/runtime/adapters/openclaw-mcporter.js +0 -108
- package/dist/services/runtime/adapters/openclaw-mcporter.js.map +0 -1
- package/dist/services/runtime/adapters/openclaw-routes.d.ts +0 -23
- package/dist/services/runtime/adapters/openclaw-routes.js +0 -1014
- package/dist/services/runtime/adapters/openclaw-routes.js.map +0 -1
- package/dist/services/runtime/adapters/openclaw.d.ts +0 -393
- package/dist/services/runtime/adapters/openclaw.js +0 -3853
- package/dist/services/runtime/adapters/openclaw.js.map +0 -1
- package/dist/services/runtime/index.d.ts +0 -34
- package/dist/services/runtime/index.js +0 -51
- package/dist/services/runtime/index.js.map +0 -1
- package/dist/services/runtime/mcp-shims/anythingllm-shim.d.ts +0 -46
- package/dist/services/runtime/mcp-shims/anythingllm-shim.js +0 -281
- package/dist/services/runtime/mcp-shims/anythingllm-shim.js.map +0 -1
- package/dist/services/runtime/mcp-shims/drive-shim.d.ts +0 -54
- package/dist/services/runtime/mcp-shims/drive-shim.js +0 -489
- package/dist/services/runtime/mcp-shims/drive-shim.js.map +0 -1
- package/dist/services/runtime/migrations.d.ts +0 -23
- package/dist/services/runtime/migrations.js +0 -125
- package/dist/services/runtime/migrations.js.map +0 -1
- package/dist/services/runtime/registry.d.ts +0 -13
- package/dist/services/runtime/registry.js +0 -32
- package/dist/services/runtime/registry.js.map +0 -1
- package/dist/services/setup-manager.d.ts +0 -136
- package/dist/services/setup-manager.js +0 -2149
- package/dist/services/setup-manager.js.map +0 -1
- package/dist/services/suggestions.d.ts +0 -27
- package/dist/services/suggestions.js +0 -133
- package/dist/services/suggestions.js.map +0 -1
- package/dist/services/system-monitor.js +0 -79
- package/dist/services/system-monitor.js.map +0 -1
- package/dist/services/task-registry.d.ts +0 -44
- package/dist/services/task-registry.js +0 -76
- package/dist/services/task-registry.js.map +0 -1
- package/dist/services/types-shim.d.ts +0 -16
- package/dist/services/types-shim.js +0 -2
- package/dist/services/types-shim.js.map +0 -1
- package/dist/services/update-manager.d.ts +0 -47
- package/dist/services/update-manager.js +0 -323
- package/dist/services/update-manager.js.map +0 -1
- package/dist/services/webdav/server.d.ts +0 -24
- package/dist/services/webdav/server.js +0 -420
- package/dist/services/webdav/server.js.map +0 -1
- package/dist/services/webdav/xml-builder.js.map +0 -1
- package/dist/services/workspace-builder.d.ts +0 -29
- package/dist/services/workspace-builder.js +0 -188
- package/dist/services/workspace-builder.js.map +0 -1
- package/public/assets/ApiKeyField-CvyAOcJS.js +0 -1
- package/public/assets/Dashboard-AuJESBlJ.js +0 -1
- package/public/assets/HermesChatPanel-CByPREwb.js +0 -1
- package/public/assets/HermesConfigForm-DRda8FKX.js +0 -4
- package/public/assets/InitPassword-ka4wNpM5.js +0 -1
- package/public/assets/InstanceDetail-Cg1nS8HX.js +0 -92
- package/public/assets/Login-aPajuQzf.js +0 -1
- package/public/assets/NewInstance-Dd1ebNIx.js +0 -1
- package/public/assets/ProviderRecommendations-DFmADQ7V.js +0 -1
- package/public/assets/Settings-BYQnbLYL.js +0 -1
- package/public/assets/Setup-D05lwDOV.js +0 -1
- package/public/assets/WeixinLoginPanel-D89kdhP4.js +0 -9
- package/public/assets/index-HSXCsceK.css +0 -1
- package/public/assets/index-bnBu0nlQ.js +0 -19
- package/public/assets/registry-C_qeFTkZ.js +0 -2
- package/public/assets/usePolling-Bn93fe7M.js +0 -1
- package/public/assets/vendor-i18n-flxcMVeP.js +0 -9
- package/public/assets/vendor-react-ZC5T_huj.js +0 -59
- package/public/index.html +0 -20
- package/scripts/build-image.sh +0 -55
- package/scripts/check-adapter-isolation.ts +0 -293
- package/scripts/check-i18n.mjs +0 -154
- /package/dist/services/{app → app-common}/app-compiler.d.ts +0 -0
- /package/dist/services/{app → app-common}/terminal-session-manager.d.ts +0 -0
- /package/dist/services/{backup-verify.d.ts → backup/backup-verify.d.ts} +0 -0
- /package/dist/services/{external-mounts.d.ts → files/external-mounts.d.ts} +0 -0
- /package/dist/services/{organize → files/organize}/applier.d.ts +0 -0
- /package/dist/services/{organize → files/organize}/rules.d.ts +0 -0
- /package/dist/services/{organize → files/organize}/scanner.d.ts +0 -0
- /package/dist/services/{organize → files/organize}/store.d.ts +0 -0
- /package/dist/services/{webdav → files/webdav}/xml-builder.d.ts +0 -0
- /package/dist/services/{webdav → files/webdav}/xml-builder.js +0 -0
- /package/dist/services/{app-passwords.d.ts → instances/passwords.d.ts} +0 -0
- /package/dist/services/{agent-apps → integrations/installable}/installers/registry-probe.d.ts +0 -0
- /package/dist/services/{agent-apps → integrations/installable}/installers/registry-probe.js +0 -0
- /package/dist/services/{plugin-installer.d.ts → setup/plugin-installer.d.ts} +0 -0
- /package/dist/services/{system-monitor.d.ts → system/system-monitor.d.ts} +0 -0
- /package/{public → node_modules/jishushell-panel/output/public}/assets/logo-black-theme-DywLAtFy.png +0 -0
- /package/{public → node_modules/jishushell-panel/output/public}/assets/logo-white-theme-DXffFAWw.png +0 -0
- /package/{public → node_modules/jishushell-panel/output/public}/favicon.png +0 -0
- /package/{public → node_modules/jishushell-panel/output/public}/logos/hermes.png +0 -0
- /package/{public → node_modules/jishushell-panel/output/public}/logos/ollama.png +0 -0
- /package/{public → node_modules/jishushell-panel/output/public}/logos/openclaw.svg +0 -0
|
@@ -1,2149 +0,0 @@
|
|
|
1
|
-
import { execFileSync, execSync, spawn as nodeSpawn } from "child_process";
|
|
2
|
-
import { chmodSync, copyFileSync, existsSync, mkdtempSync, readFileSync, renameSync, rmSync, symlinkSync, unlinkSync } from "fs";
|
|
3
|
-
import { userInfo, platform as osPlatform, arch as osArch, cpus as osCpus } from "node:os";
|
|
4
|
-
import { randomBytes } from "node:crypto";
|
|
5
|
-
import { tmpdir } from "node:os";
|
|
6
|
-
import { dirname, join } from "path";
|
|
7
|
-
import { StringDecoder } from "string_decoder";
|
|
8
|
-
import { fileURLToPath } from "url";
|
|
9
|
-
import { JISHUSHELL_HOME, getPanelConfig, savePanelConfig, setOpenclawDockerImage, getOpenclawDockerImage, DEFAULT_OPENCLAW_DOCKER_IMAGE, getRuntimeCatalogEntry, OPENCLAW_MODULES, OPENCLAW_BIN_DIR, } from "../config.js";
|
|
10
|
-
import { ensureDirContainer, ensureDirHost, writeConfigFile, writeSecretFile, writeExecutableFile, writeSystemTmpFile } from "../utils/fs.js";
|
|
11
|
-
import { buildDockerClientEnv, managedColimaSocketPath, managedColimaDockerHost, resolveDockerHost } from "../utils/docker-host.js";
|
|
12
|
-
import { appleSiliconGuard, buildColimaWrapperScript, buildColimaPlist, buildNomadWaitWrapper, buildNomadPlist, buildPanelGateWrapper, buildPanelPlist, } from "./macos-launchd.js";
|
|
13
|
-
import { getAdapter, listRegisteredAdapters } from "./runtime/index.js";
|
|
14
|
-
// Internal usage of task primitives — re-exports further down preserve the
|
|
15
|
-
// public import surface used by runtime/adapters/*, routes, and CLI.
|
|
16
|
-
import { createTask, emitTask, getRunningTasks } from "./task-registry.js";
|
|
17
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
-
const __dirname = dirname(__filename);
|
|
19
|
-
// ── Paths ──────────────────────────────────────────────────────────
|
|
20
|
-
const BIN_DIR = join(JISHUSHELL_HOME, "bin");
|
|
21
|
-
const NOMAD_BIN = join(BIN_DIR, "nomad");
|
|
22
|
-
const NOMAD_CONFIG_DIR = join(JISHUSHELL_HOME, "nomad");
|
|
23
|
-
const NOMAD_DATA_DIR = join(JISHUSHELL_HOME, "nomad", "data");
|
|
24
|
-
const NOMAD_ALLOC_DIR = join(JISHUSHELL_HOME, "nomad", "data", "alloc");
|
|
25
|
-
const _COLIMA_DIR = join(JISHUSHELL_HOME, "colima");
|
|
26
|
-
const COLIMA_PROFILE = "jishushell";
|
|
27
|
-
const _COLIMA_SOCKET = managedColimaSocketPath(JISHUSHELL_HOME, COLIMA_PROFILE);
|
|
28
|
-
const NOMAD_VERSION = "1.6.5";
|
|
29
|
-
let _serverPort = 8090;
|
|
30
|
-
export function setServerPort(port) { _serverPort = port; }
|
|
31
|
-
// ── Resolve non-root service user (board-agnostic) ─────────────────
|
|
32
|
-
/**
|
|
33
|
-
* Determine which user the systemd service should run as.
|
|
34
|
-
*
|
|
35
|
-
* Strategy (in order):
|
|
36
|
-
* 1. If current process is NOT root, return the real username directly.
|
|
37
|
-
* 2. Under sudo, trust the kernel-set SUDO_UID (numeric, hard to spoof)
|
|
38
|
-
* and reverse-lookup via `getent passwd <uid>`.
|
|
39
|
-
* 3. Fallback: scan /etc/passwd for the first user with UID >= 1000
|
|
40
|
-
* (works on any board — pi, orangepi, rock, nvidia, etc.).
|
|
41
|
-
* 4. Throw instead of guessing — running as the wrong user is worse
|
|
42
|
-
* than a visible installation error.
|
|
43
|
-
*/
|
|
44
|
-
function resolveServiceUser() {
|
|
45
|
-
const current = userInfo();
|
|
46
|
-
if (current.uid !== 0)
|
|
47
|
-
return current.username;
|
|
48
|
-
// Under sudo: SUDO_UID is set by the kernel and is numeric
|
|
49
|
-
const sudoUid = parseInt(process.env.SUDO_UID || "", 10);
|
|
50
|
-
if (Number.isFinite(sudoUid) && sudoUid >= 1000) {
|
|
51
|
-
try {
|
|
52
|
-
const entry = execFileSync("getent", ["passwd", String(sudoUid)], {
|
|
53
|
-
encoding: "utf8",
|
|
54
|
-
timeout: 3000,
|
|
55
|
-
}).trim();
|
|
56
|
-
const name = entry.split(":")[0];
|
|
57
|
-
if (name)
|
|
58
|
-
return name;
|
|
59
|
-
}
|
|
60
|
-
catch { /* getent failed, continue */ }
|
|
61
|
-
}
|
|
62
|
-
// Board-agnostic fallback: first real user (UID >= 1000, exclude nobody)
|
|
63
|
-
try {
|
|
64
|
-
const firstUser = execFileSync("getent", ["passwd"], {
|
|
65
|
-
encoding: "utf8",
|
|
66
|
-
timeout: 3000,
|
|
67
|
-
})
|
|
68
|
-
.split("\n")
|
|
69
|
-
.map((line) => line.split(":"))
|
|
70
|
-
.find((cols) => {
|
|
71
|
-
const uid = parseInt(cols[2], 10);
|
|
72
|
-
return uid >= 1000 && uid < 65534;
|
|
73
|
-
});
|
|
74
|
-
if (firstUser?.[0])
|
|
75
|
-
return firstUser[0];
|
|
76
|
-
}
|
|
77
|
-
catch { /* /etc/passwd unreadable */ }
|
|
78
|
-
throw new Error("Cannot determine service user. Run with a non-root user or set SUDO_UID.");
|
|
79
|
-
}
|
|
80
|
-
// ── Task tracker (for SSE progress) ────────────────────────────────
|
|
81
|
-
// Storage, event dispatch, and subscribe plumbing now live in
|
|
82
|
-
// task-registry.ts so non-setup callers (runtime-apps/*) can publish
|
|
83
|
-
// tasks without pulling in the rest of setup-manager's bootstrap
|
|
84
|
-
// surface. These re-exports preserve the original import surface used
|
|
85
|
-
// by runtime/adapters/*, routes, and CLI.
|
|
86
|
-
export { createTask, emitTask, getTask, getTaskSnapshot, getRunningTasks, subscribeTask, } from "./task-registry.js";
|
|
87
|
-
const ANSI_ESCAPE_RE = /\u001B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g;
|
|
88
|
-
function sanitizeTaskLine(line) {
|
|
89
|
-
return line
|
|
90
|
-
.replace(ANSI_ESCAPE_RE, "")
|
|
91
|
-
.replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g, "")
|
|
92
|
-
.trimEnd();
|
|
93
|
-
}
|
|
94
|
-
/** Run a shell command as a spawned process, streaming output to a task */
|
|
95
|
-
export function spawnWithTask(task, cmd, args, options = {}) {
|
|
96
|
-
return new Promise((resolve) => {
|
|
97
|
-
const env = { ...process.env, ...options.env };
|
|
98
|
-
const child = nodeSpawn(cmd, args, {
|
|
99
|
-
env,
|
|
100
|
-
cwd: options.cwd,
|
|
101
|
-
timeout: options.timeout || 600000,
|
|
102
|
-
});
|
|
103
|
-
let output = "";
|
|
104
|
-
const stdoutDecoder = new StringDecoder("utf8");
|
|
105
|
-
const stderrDecoder = new StringDecoder("utf8");
|
|
106
|
-
let stdoutPending = "";
|
|
107
|
-
let stderrPending = "";
|
|
108
|
-
const emitLine = (rawLine) => {
|
|
109
|
-
const line = sanitizeTaskLine(rawLine);
|
|
110
|
-
if (!line.trim())
|
|
111
|
-
return;
|
|
112
|
-
// Try to parse progress
|
|
113
|
-
if (options.progressParser) {
|
|
114
|
-
const pct = options.progressParser(line);
|
|
115
|
-
if (pct !== null) {
|
|
116
|
-
emitTask(task, { type: "progress", message: line, progress: pct });
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
emitTask(task, { type: "log", message: line });
|
|
121
|
-
};
|
|
122
|
-
const handleDecodedText = (text, stream) => {
|
|
123
|
-
if (!text)
|
|
124
|
-
return;
|
|
125
|
-
output += text;
|
|
126
|
-
const normalized = `${stream === "stdout" ? stdoutPending : stderrPending}${text}`
|
|
127
|
-
.replace(/\r\n/g, "\n")
|
|
128
|
-
.replace(/\r/g, "\n");
|
|
129
|
-
const lines = normalized.split("\n");
|
|
130
|
-
const pending = lines.pop() ?? "";
|
|
131
|
-
if (stream === "stdout")
|
|
132
|
-
stdoutPending = pending;
|
|
133
|
-
else
|
|
134
|
-
stderrPending = pending;
|
|
135
|
-
for (const line of lines) {
|
|
136
|
-
emitLine(line);
|
|
137
|
-
}
|
|
138
|
-
};
|
|
139
|
-
child.stdout?.on("data", (data) => {
|
|
140
|
-
handleDecodedText(stdoutDecoder.write(data), "stdout");
|
|
141
|
-
});
|
|
142
|
-
child.stderr?.on("data", (data) => {
|
|
143
|
-
handleDecodedText(stderrDecoder.write(data), "stderr");
|
|
144
|
-
});
|
|
145
|
-
child.on("close", (code) => {
|
|
146
|
-
handleDecodedText(stdoutDecoder.end(), "stdout");
|
|
147
|
-
handleDecodedText(stderrDecoder.end(), "stderr");
|
|
148
|
-
emitLine(stdoutPending);
|
|
149
|
-
emitLine(stderrPending);
|
|
150
|
-
resolve({ ok: code === 0, output });
|
|
151
|
-
});
|
|
152
|
-
child.on("error", (err) => {
|
|
153
|
-
emitTask(task, { type: "log", message: `Error: ${err.message}` });
|
|
154
|
-
resolve({ ok: false, output: err.message });
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
// ── Progress parsers ───────────────────────────────────────────────
|
|
159
|
-
export function npmProgressParser(line) {
|
|
160
|
-
// npm shows "added X packages" at the end
|
|
161
|
-
if (line.includes("added") && line.includes("packages"))
|
|
162
|
-
return 100;
|
|
163
|
-
// npm progress: "reify:packagename: timing"
|
|
164
|
-
if (line.includes("reify:"))
|
|
165
|
-
return null; // just a log line
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
export function dockerBuildProgressParser(line) {
|
|
169
|
-
// Docker build steps: "Step 1/6", "Step 2/6", etc.
|
|
170
|
-
const legacyMatch = line.match(/Step\s+(\d+)\/(\d+)/);
|
|
171
|
-
if (legacyMatch) {
|
|
172
|
-
return Math.round((parseInt(legacyMatch[1], 10) / parseInt(legacyMatch[2], 10)) * 100);
|
|
173
|
-
}
|
|
174
|
-
// BuildKit plain output: "#5 [2/4] COPY node_modules ..."
|
|
175
|
-
const buildkitMatch = line.match(/\[(\d+)\/(\d+)\]/);
|
|
176
|
-
if (buildkitMatch) {
|
|
177
|
-
return Math.round((parseInt(buildkitMatch[1], 10) / parseInt(buildkitMatch[2], 10)) * 100);
|
|
178
|
-
}
|
|
179
|
-
if (/exporting to image/i.test(line))
|
|
180
|
-
return 95;
|
|
181
|
-
if (/naming to /i.test(line))
|
|
182
|
-
return 98;
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
|
-
function curlProgressParser(line) {
|
|
186
|
-
// curl with -# shows progress
|
|
187
|
-
const match = line.match(/(\d+\.?\d*)%/);
|
|
188
|
-
if (match)
|
|
189
|
-
return Math.round(parseFloat(match[1]));
|
|
190
|
-
return null;
|
|
191
|
-
}
|
|
192
|
-
// ── Dir size tracker for npm installs ──────────────────────────────
|
|
193
|
-
export function getDirSizeMB(dir) {
|
|
194
|
-
try {
|
|
195
|
-
const result = execFileSync("du", ["-sm", dir], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] });
|
|
196
|
-
return parseInt(result.split("\t")[0], 10) || 0;
|
|
197
|
-
}
|
|
198
|
-
catch {
|
|
199
|
-
return 0;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
function checkCommand(cmd, versionFlag = "--version") {
|
|
203
|
-
try {
|
|
204
|
-
const version = execFileSync(cmd, [versionFlag], { encoding: "utf-8", timeout: 10000, stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
205
|
-
let cmdPath = "";
|
|
206
|
-
try {
|
|
207
|
-
cmdPath = execFileSync("which", [cmd], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
208
|
-
}
|
|
209
|
-
catch { }
|
|
210
|
-
return { ok: true, version, path: cmdPath };
|
|
211
|
-
}
|
|
212
|
-
catch {
|
|
213
|
-
return { ok: false, version: "", path: "" };
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
function isPortListening(port) {
|
|
217
|
-
if (!Number.isInteger(port) || port < 1 || port > 65535)
|
|
218
|
-
return false;
|
|
219
|
-
const p = String(port);
|
|
220
|
-
const matchesPort = (output) => new RegExp(`:${p}\\s`).test(output);
|
|
221
|
-
try {
|
|
222
|
-
if (process.platform === "darwin") {
|
|
223
|
-
try {
|
|
224
|
-
const result = execFileSync("lsof", ["-iTCP:" + p, "-sTCP:LISTEN", "-t"], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] });
|
|
225
|
-
if (result.trim().length > 0)
|
|
226
|
-
return true;
|
|
227
|
-
}
|
|
228
|
-
catch {
|
|
229
|
-
}
|
|
230
|
-
try {
|
|
231
|
-
const result = execFileSync("ss", ["-tlnp"], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] });
|
|
232
|
-
if (matchesPort(result))
|
|
233
|
-
return true;
|
|
234
|
-
}
|
|
235
|
-
catch {
|
|
236
|
-
}
|
|
237
|
-
const result = execFileSync("netstat", ["-tlnp"], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] });
|
|
238
|
-
return matchesPort(result);
|
|
239
|
-
}
|
|
240
|
-
// Linux: prefer ss, fall back to netstat
|
|
241
|
-
try {
|
|
242
|
-
const result = execFileSync("ss", ["-tlnp"], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] });
|
|
243
|
-
return matchesPort(result);
|
|
244
|
-
}
|
|
245
|
-
catch {
|
|
246
|
-
const result = execFileSync("netstat", ["-tlnp"], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] });
|
|
247
|
-
return matchesPort(result);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
catch {
|
|
251
|
-
return false;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
function checkSudo() {
|
|
255
|
-
try {
|
|
256
|
-
execSync("sudo -n true 2>/dev/null", { timeout: 3000 });
|
|
257
|
-
return true;
|
|
258
|
-
}
|
|
259
|
-
catch {
|
|
260
|
-
return false;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
/** Check if kernel memory cgroup is enabled (required for Docker memory stats on RPi) */
|
|
264
|
-
function isCgroupMemoryEnabled() {
|
|
265
|
-
try {
|
|
266
|
-
const cgroups = readFileSync("/proc/cgroups", "utf-8");
|
|
267
|
-
const memLine = cgroups.split("\n").find(l => l.startsWith("memory\t"));
|
|
268
|
-
if (!memLine)
|
|
269
|
-
return false;
|
|
270
|
-
// Format: name hierarchy num_cgroups enabled
|
|
271
|
-
return memLine.trim().endsWith("1");
|
|
272
|
-
}
|
|
273
|
-
catch {
|
|
274
|
-
return true; /* non-Linux or unreadable — assume ok */
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
/** Enable cgroup memory in boot cmdline if not already enabled. Returns true if a reboot is needed. */
|
|
278
|
-
export function ensureCgroupMemory() {
|
|
279
|
-
if (isCgroupMemoryEnabled())
|
|
280
|
-
return false;
|
|
281
|
-
const candidates = ["/boot/firmware/cmdline.txt", "/boot/cmdline.txt"];
|
|
282
|
-
for (const f of candidates) {
|
|
283
|
-
if (!existsSync(f))
|
|
284
|
-
continue;
|
|
285
|
-
try {
|
|
286
|
-
const content = readFileSync(f, "utf-8").trim();
|
|
287
|
-
if (content.includes("cgroup_memory=1"))
|
|
288
|
-
return false; // already in cmdline, just needs reboot
|
|
289
|
-
const patched = `${content} cgroup_memory=1 cgroup_enable=memory`;
|
|
290
|
-
execFileSync("sudo", ["cp", f, f + ".bak"], { timeout: 5000 });
|
|
291
|
-
// Write to tmp file then sudo cp to avoid shell interpolation of file content
|
|
292
|
-
const tmpPath = join(dirname(f), ".cmdline.tmp");
|
|
293
|
-
writeSystemTmpFile(tmpPath, patched + "\n");
|
|
294
|
-
execFileSync("sudo", ["cp", tmpPath, f], { timeout: 5000 });
|
|
295
|
-
try {
|
|
296
|
-
unlinkSync(tmpPath);
|
|
297
|
-
}
|
|
298
|
-
catch { }
|
|
299
|
-
console.log(`[setup] enabled cgroup memory in ${f} (reboot required)`);
|
|
300
|
-
return true;
|
|
301
|
-
}
|
|
302
|
-
catch (e) {
|
|
303
|
-
console.warn(`[setup] failed to patch ${f}:`, e.message);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
return false;
|
|
307
|
-
}
|
|
308
|
-
function canAccessDockerDaemon(timeout = 10000) {
|
|
309
|
-
const env = buildDockerClientEnv({
|
|
310
|
-
jishuHome: JISHUSHELL_HOME,
|
|
311
|
-
colimaProfile: COLIMA_PROFILE,
|
|
312
|
-
});
|
|
313
|
-
try {
|
|
314
|
-
execFileSync("docker", ["info"], { timeout, stdio: "ignore", env });
|
|
315
|
-
return true;
|
|
316
|
-
}
|
|
317
|
-
catch { }
|
|
318
|
-
try {
|
|
319
|
-
execFileSync("sudo", ["-n", "docker", "info"], { timeout, stdio: "ignore", env });
|
|
320
|
-
return true;
|
|
321
|
-
}
|
|
322
|
-
catch { }
|
|
323
|
-
return false;
|
|
324
|
-
}
|
|
325
|
-
function getDockerVersionLine(timeout = 10000) {
|
|
326
|
-
try {
|
|
327
|
-
return execFileSync("docker", ["--version"], { encoding: "utf-8", timeout }).trim();
|
|
328
|
-
}
|
|
329
|
-
catch { }
|
|
330
|
-
try {
|
|
331
|
-
return execFileSync("sudo", ["-n", "docker", "--version"], { encoding: "utf-8", timeout }).trim();
|
|
332
|
-
}
|
|
333
|
-
catch { }
|
|
334
|
-
return "installed";
|
|
335
|
-
}
|
|
336
|
-
export async function getSetupStatus() {
|
|
337
|
-
// Fast path: if setup is already complete, do lightweight checks before returning cached result
|
|
338
|
-
const config = getPanelConfig();
|
|
339
|
-
if (config.service_manager) {
|
|
340
|
-
const localBin = join(OPENCLAW_BIN_DIR, "openclaw");
|
|
341
|
-
const localBinOk = existsSync(localBin);
|
|
342
|
-
const fastDockerImageReady = checkDockerImageExists();
|
|
343
|
-
const openclawOk = localBinOk || fastDockerImageReady;
|
|
344
|
-
// Lightweight validation: verify critical services are actually available
|
|
345
|
-
const dockerOk = canAccessDockerDaemon(5000);
|
|
346
|
-
const nomadOk = isPortListening(4646);
|
|
347
|
-
const hasSudo = checkSudo();
|
|
348
|
-
// If any critical check fails, fall through to the slow full check path
|
|
349
|
-
if (!openclawOk || !dockerOk || !nomadOk || !hasSudo) {
|
|
350
|
-
// Fall through to full check below
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
// Fetch real versions (cheap execs, no fallback to slow path)
|
|
354
|
-
let dockerVer = "installed";
|
|
355
|
-
try {
|
|
356
|
-
dockerVer = execFileSync("docker", ["--version"], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] }).trim().split("\n")[0];
|
|
357
|
-
}
|
|
358
|
-
catch { }
|
|
359
|
-
let nomadVer = "installed";
|
|
360
|
-
try {
|
|
361
|
-
nomadVer = execFileSync(NOMAD_BIN, ["--version"], { encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] }).trim().split("\n")[0];
|
|
362
|
-
}
|
|
363
|
-
catch { }
|
|
364
|
-
let openclawVer = "installed";
|
|
365
|
-
let openclawPath = localBin;
|
|
366
|
-
// Prefer npm package.json for accurate OpenClaw version.
|
|
367
|
-
try {
|
|
368
|
-
const pkg = join(OPENCLAW_MODULES, "openclaw", "package.json");
|
|
369
|
-
if (existsSync(pkg))
|
|
370
|
-
openclawVer = JSON.parse(readFileSync(pkg, "utf-8")).version || openclawVer;
|
|
371
|
-
}
|
|
372
|
-
catch { }
|
|
373
|
-
const ready = openclawOk && fastDockerImageReady;
|
|
374
|
-
return {
|
|
375
|
-
node: { name: "Node.js", installed: true, running: true, version: process.version, path: process.execPath },
|
|
376
|
-
docker: { name: "Docker", installed: true, running: true, version: dockerVer, path: "" },
|
|
377
|
-
nomad: { name: "Nomad", installed: true, running: true, version: nomadVer, path: NOMAD_BIN },
|
|
378
|
-
openclaw: { name: "OpenClaw", installed: openclawOk, running: false, version: openclawVer, path: openclawPath },
|
|
379
|
-
dockerImageReady: fastDockerImageReady,
|
|
380
|
-
ready,
|
|
381
|
-
providerConfigured: !!config.default_provider,
|
|
382
|
-
hasSudo: true,
|
|
383
|
-
runtimes: await buildRuntimesStatus(),
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
const NODE_MINIMUM_MAJOR = 22;
|
|
388
|
-
// Use the currently-running Node binary (process.execPath) as the ground
|
|
389
|
-
// truth — avoids false-negative when PATH doesn't include nvm's bin dir
|
|
390
|
-
// (e.g. when started via systemd with a minimal environment).
|
|
391
|
-
const nodeVersion = process.version;
|
|
392
|
-
const nodeMajor = parseInt(nodeVersion.replace("v", "").split(".")[0], 10);
|
|
393
|
-
const nodeStatus = {
|
|
394
|
-
name: "Node.js",
|
|
395
|
-
installed: true,
|
|
396
|
-
running: true,
|
|
397
|
-
version: nodeVersion,
|
|
398
|
-
path: process.execPath,
|
|
399
|
-
needsUpgrade: nodeMajor < NODE_MINIMUM_MAJOR,
|
|
400
|
-
};
|
|
401
|
-
const docker = checkCommand("docker");
|
|
402
|
-
// Use docker info to verify daemon accessibility (not just process existence)
|
|
403
|
-
// Also try sudo in case the user hasn't logged out since being added to the docker group
|
|
404
|
-
const dockerRunning = canAccessDockerDaemon(10000);
|
|
405
|
-
const dockerStatus = {
|
|
406
|
-
name: "Docker",
|
|
407
|
-
installed: docker.ok,
|
|
408
|
-
running: dockerRunning,
|
|
409
|
-
version: docker.version.split("\n")[0],
|
|
410
|
-
path: docker.path,
|
|
411
|
-
};
|
|
412
|
-
let nomad = checkCommand("nomad");
|
|
413
|
-
if (!nomad.ok && existsSync(NOMAD_BIN)) {
|
|
414
|
-
nomad = checkCommand(NOMAD_BIN);
|
|
415
|
-
}
|
|
416
|
-
const nomadRunning = isPortListening(4646);
|
|
417
|
-
const nomadStatus = {
|
|
418
|
-
name: "Nomad",
|
|
419
|
-
installed: nomad.ok,
|
|
420
|
-
running: nomadRunning,
|
|
421
|
-
version: nomad.version.split("\n")[0],
|
|
422
|
-
path: nomad.path || NOMAD_BIN,
|
|
423
|
-
};
|
|
424
|
-
let openclaw = checkCommand("openclaw");
|
|
425
|
-
if (!openclaw.ok) {
|
|
426
|
-
const localBin = join(OPENCLAW_BIN_DIR, "openclaw");
|
|
427
|
-
if (existsSync(localBin)) {
|
|
428
|
-
let ver = "installed";
|
|
429
|
-
try {
|
|
430
|
-
const pkg = join(OPENCLAW_MODULES, "openclaw", "package.json");
|
|
431
|
-
if (existsSync(pkg)) {
|
|
432
|
-
const pkgJson = JSON.parse(readFileSync(pkg, "utf-8"));
|
|
433
|
-
ver = pkgJson.version || "installed";
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
catch { }
|
|
437
|
-
openclaw = { ok: true, version: ver, path: localBin };
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
const dockerImageReady = checkDockerImageExists();
|
|
441
|
-
// If the Docker image already exists, treat openclaw as installed even when
|
|
442
|
-
// the local npm package is absent — the image is all that's needed to run instances.
|
|
443
|
-
if (!openclaw.ok && dockerImageReady) {
|
|
444
|
-
const imageTag = resolveDockerImageTag();
|
|
445
|
-
const tagVersion = imageTag.split(":").pop() || "local";
|
|
446
|
-
openclaw = { ok: true, version: tagVersion, path: imageTag };
|
|
447
|
-
}
|
|
448
|
-
const openclawStatus = {
|
|
449
|
-
name: "OpenClaw",
|
|
450
|
-
installed: openclaw.ok,
|
|
451
|
-
running: false,
|
|
452
|
-
version: openclaw.version.split("\n")[0],
|
|
453
|
-
path: openclaw.path,
|
|
454
|
-
};
|
|
455
|
-
const ready = nodeStatus.installed && !nodeStatus.needsUpgrade && dockerStatus.installed && dockerStatus.running && nomadStatus.installed && nomadStatus.running && openclawStatus.installed && dockerImageReady;
|
|
456
|
-
const providerConfigured = !!getPanelConfig().default_provider;
|
|
457
|
-
// Read-only check: report whether cgroup memory needs fixing (actual fix is in POST install routes)
|
|
458
|
-
let needsReboot;
|
|
459
|
-
if (dockerStatus.installed && !isCgroupMemoryEnabled()) {
|
|
460
|
-
needsReboot = true;
|
|
461
|
-
}
|
|
462
|
-
const runningTasks = getRunningTasks();
|
|
463
|
-
return { node: nodeStatus, docker: dockerStatus, nomad: nomadStatus, openclaw: openclawStatus, ready, providerConfigured, dockerImageReady, hasSudo: checkSudo(), needsReboot, runningTasks: runningTasks.length ? runningTasks : undefined, runtimes: await buildRuntimesStatus() };
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Build the per-runtime install status block by iterating over every
|
|
467
|
-
* registered adapter. A new adapter that implements `getInstallStatus()`
|
|
468
|
-
* automatically appears here — no change required in this function.
|
|
469
|
-
*
|
|
470
|
-
* Each probe is bounded by a short timeout so a hung adapter (slow docker
|
|
471
|
-
* socket, DNS stall) cannot block the `/api/setup/status` endpoint. This
|
|
472
|
-
* mirrors the pattern used by `routes/runtime.ts:probeInstallStatus` so
|
|
473
|
-
* Setup wizard and `/api/runtime/catalog` see a consistent view.
|
|
474
|
-
*/
|
|
475
|
-
const BUILD_RUNTIMES_PROBE_TIMEOUT_MS = 2500;
|
|
476
|
-
async function buildRuntimesStatus() {
|
|
477
|
-
const adapters = listRegisteredAdapters().filter((a) => typeof a.getInstallStatus === "function");
|
|
478
|
-
const probes = adapters.map(async (adapter) => {
|
|
479
|
-
try {
|
|
480
|
-
const status = await Promise.race([
|
|
481
|
-
Promise.resolve(adapter.getInstallStatus()),
|
|
482
|
-
new Promise((_, reject) => setTimeout(() => reject(new Error("install-status probe timed out")), BUILD_RUNTIMES_PROBE_TIMEOUT_MS)),
|
|
483
|
-
]);
|
|
484
|
-
if (!status)
|
|
485
|
-
return null;
|
|
486
|
-
const sync = status;
|
|
487
|
-
return [adapter.agentType, { ...sync, required: !!adapter.required }];
|
|
488
|
-
}
|
|
489
|
-
catch {
|
|
490
|
-
return null;
|
|
491
|
-
}
|
|
492
|
-
});
|
|
493
|
-
const out = {};
|
|
494
|
-
for (const result of await Promise.all(probes)) {
|
|
495
|
-
if (result)
|
|
496
|
-
out[result[0]] = result[1];
|
|
497
|
-
}
|
|
498
|
-
return Object.keys(out).length ? out : undefined;
|
|
499
|
-
}
|
|
500
|
-
// ── Upgrade Node.js ────────────────────────────────────────────────
|
|
501
|
-
export async function upgradeNode(targetMajor = 22) {
|
|
502
|
-
try {
|
|
503
|
-
const current = process.version; // e.g. "v20.20.1"
|
|
504
|
-
const currentMajor = parseInt(current.replace("v", "").split(".")[0], 10);
|
|
505
|
-
if (currentMajor >= targetMajor) {
|
|
506
|
-
return { ok: true, message: `Node.js ${current} already meets requirement (>= ${targetMajor})` };
|
|
507
|
-
}
|
|
508
|
-
const task = createTask("node-upgrade");
|
|
509
|
-
emitTask(task, { type: "progress", message: `升级 Node.js: ${current} → v${targetMajor}`, progress: 0 });
|
|
510
|
-
if (process.platform === "darwin") {
|
|
511
|
-
try {
|
|
512
|
-
execSync("brew --version", { timeout: 5000 });
|
|
513
|
-
}
|
|
514
|
-
catch {
|
|
515
|
-
emitTask(task, { type: "error", message: "未找到 Homebrew" });
|
|
516
|
-
task.status = "error";
|
|
517
|
-
return { ok: false, message: "Homebrew not found", error: "Install Homebrew first: https://brew.sh", taskId: task.id };
|
|
518
|
-
}
|
|
519
|
-
emitTask(task, { type: "progress", message: `安装 Node.js ${targetMajor} (brew)...`, progress: 20 });
|
|
520
|
-
const installResult = await spawnWithTask(task, "brew", ["install", `node@${targetMajor}`], { timeout: 300000 });
|
|
521
|
-
if (!installResult.ok) {
|
|
522
|
-
emitTask(task, { type: "error", message: "Node.js 安装失败" });
|
|
523
|
-
task.status = "error";
|
|
524
|
-
return { ok: false, message: "Node.js install failed", error: installResult.output, taskId: task.id };
|
|
525
|
-
}
|
|
526
|
-
emitTask(task, { type: "progress", message: "链接 Node.js...", progress: 80 });
|
|
527
|
-
try {
|
|
528
|
-
execSync(`brew link --overwrite --force node@${targetMajor}`, { timeout: 30000 });
|
|
529
|
-
}
|
|
530
|
-
catch { }
|
|
531
|
-
}
|
|
532
|
-
else {
|
|
533
|
-
// Use NodeSource setup script
|
|
534
|
-
emitTask(task, { type: "log", message: "下载 NodeSource 安装脚本..." });
|
|
535
|
-
emitTask(task, { type: "progress", message: "配置软件源...", progress: 10 });
|
|
536
|
-
// Use a unique temp path to prevent TOCTOU race: a fixed name like
|
|
537
|
-
// /tmp/nodesource_setup_22.sh could be replaced by another process
|
|
538
|
-
// between download (curl) and execution (sudo bash).
|
|
539
|
-
const nsScriptPath = join(tmpdir(), `nodesource_setup_${targetMajor}_${randomBytes(8).toString("hex")}.sh`);
|
|
540
|
-
const dlResult = await spawnWithTask(task, "curl", ["-fsSL", `https://deb.nodesource.com/setup_${targetMajor}.x`, "-o", nsScriptPath], { timeout: 60000 });
|
|
541
|
-
if (!dlResult.ok) {
|
|
542
|
-
emitTask(task, { type: "error", message: "NodeSource 脚本下载失败" });
|
|
543
|
-
task.status = "error";
|
|
544
|
-
return { ok: false, message: "NodeSource script download failed", error: dlResult.output, taskId: task.id };
|
|
545
|
-
}
|
|
546
|
-
const setupResult = await spawnWithTask(task, "sudo", ["-E", "bash", nsScriptPath], { timeout: 120000 });
|
|
547
|
-
if (!setupResult.ok) {
|
|
548
|
-
emitTask(task, { type: "error", message: "NodeSource 配置失败" });
|
|
549
|
-
task.status = "error";
|
|
550
|
-
return { ok: false, message: "Node.js source setup failed", error: setupResult.output, taskId: task.id };
|
|
551
|
-
}
|
|
552
|
-
emitTask(task, { type: "progress", message: "安装 Node.js...", progress: 50 });
|
|
553
|
-
const installResult = await spawnWithTask(task, "sudo", ["apt-get", "install", "-y", "nodejs"], { timeout: 300000 });
|
|
554
|
-
if (!installResult.ok) {
|
|
555
|
-
emitTask(task, { type: "error", message: "Node.js 安装失败" });
|
|
556
|
-
task.status = "error";
|
|
557
|
-
return { ok: false, message: "Node.js install failed", error: installResult.output, taskId: task.id };
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
const newVersion = execSync("node --version", { encoding: "utf-8", timeout: 5000 }).trim();
|
|
561
|
-
emitTask(task, { type: "done", message: `Node.js 升级完成: ${newVersion}`, progress: 100 });
|
|
562
|
-
task.status = "done";
|
|
563
|
-
return { ok: true, message: `Node.js upgraded to ${newVersion}. 请重启 JishuShell 以使用新版本。`, taskId: task.id };
|
|
564
|
-
}
|
|
565
|
-
catch (e) {
|
|
566
|
-
return { ok: false, message: "Node.js upgrade failed", error: e.message };
|
|
567
|
-
}
|
|
568
|
-
}
|
|
569
|
-
// ── Install Docker (async with progress) ───────────────────────────
|
|
570
|
-
async function installDockerWithTask(task) {
|
|
571
|
-
try {
|
|
572
|
-
emitTask(task, { type: "progress", message: "开始安装 Docker...", progress: 0 });
|
|
573
|
-
// macOS short-circuit: the rest of this function targets apt/get.docker.com,
|
|
574
|
-
// both of which silently no-op or hard-fail on Darwin. Docker on macOS is
|
|
575
|
-
// provided by Colima (auto-installed by the bash installer at
|
|
576
|
-
// install/jishu-install.sh) — not by this code path. Refuse early with a
|
|
577
|
-
// clear pointer so the user doesn't see a confusing apt error.
|
|
578
|
-
if (process.platform === "darwin") {
|
|
579
|
-
const msg = "macOS Docker 需要 Colima。请运行 shell 安装器 (curl -fsSL https://raw.githubusercontent.com/nicepkg/jishushell/main/install/jishu-install.sh | bash),或参阅 docs/macos-colima.md 手动安装 Colima。";
|
|
580
|
-
emitTask(task, { type: "error", message: msg });
|
|
581
|
-
task.status = "error";
|
|
582
|
-
return { ok: false, message: msg, error: "darwin-not-supported-via-this-path" };
|
|
583
|
-
}
|
|
584
|
-
const user = execSync("whoami", { encoding: "utf-8", timeout: 5000 }).trim();
|
|
585
|
-
// ── Try the get.docker.com convenience script ─────────────────
|
|
586
|
-
emitTask(task, { type: "log", message: "下载 Docker 安装脚本..." });
|
|
587
|
-
emitTask(task, { type: "progress", message: "下载中...", progress: 5 });
|
|
588
|
-
// Unique temp path prevents TOCTOU: another user can't swap a fixed /tmp/get-docker.sh
|
|
589
|
-
// between our download and the sudo sh invocation.
|
|
590
|
-
const dockerScriptPath = join(tmpdir(), `get-docker_${randomBytes(8).toString("hex")}.sh`);
|
|
591
|
-
const dlResult = await spawnWithTask(task, "curl", ["-fsSL", "https://get.docker.com", "-o", dockerScriptPath], {
|
|
592
|
-
timeout: 60000,
|
|
593
|
-
});
|
|
594
|
-
let scriptOk = false;
|
|
595
|
-
if (dlResult.ok) {
|
|
596
|
-
emitTask(task, { type: "log", message: "运行 Docker 安装脚本..." });
|
|
597
|
-
const scriptResult = await spawnWithTask(task, "sudo", ["sh", dockerScriptPath], {
|
|
598
|
-
timeout: 600000,
|
|
599
|
-
progressParser: (line) => {
|
|
600
|
-
if (line.includes("Executing docker install script"))
|
|
601
|
-
return 10;
|
|
602
|
-
if (line.includes("apt-get update"))
|
|
603
|
-
return 20;
|
|
604
|
-
if (line.includes("Installing packages"))
|
|
605
|
-
return 40;
|
|
606
|
-
if (line.includes("docker-ce"))
|
|
607
|
-
return 60;
|
|
608
|
-
if (line.includes("containerd"))
|
|
609
|
-
return 70;
|
|
610
|
-
if (line.includes("Created symlink"))
|
|
611
|
-
return 85;
|
|
612
|
-
return null;
|
|
613
|
-
},
|
|
614
|
-
});
|
|
615
|
-
scriptOk = scriptResult.ok;
|
|
616
|
-
if (!scriptOk) {
|
|
617
|
-
emitTask(task, { type: "log", message: "便捷脚本安装失败,尝试 apt 仓库方式..." });
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
else {
|
|
621
|
-
emitTask(task, { type: "log", message: "下载便捷脚本失败,尝试 apt 仓库方式..." });
|
|
622
|
-
}
|
|
623
|
-
// ── Fallback: apt-repo manual install (handles Debian trixie pre-releases) ─
|
|
624
|
-
if (!scriptOk) {
|
|
625
|
-
emitTask(task, { type: "progress", message: "通过 apt 仓库安装 Docker...", progress: 15 });
|
|
626
|
-
// Detect system ID + codename; downgrade trixie/sid to bookworm.
|
|
627
|
-
let codename = "bookworm";
|
|
628
|
-
let repoOs = "debian";
|
|
629
|
-
try {
|
|
630
|
-
const osRelease = readFileSync("/etc/os-release", "utf-8");
|
|
631
|
-
const codenameMatch = osRelease.match(/^VERSION_CODENAME=(.+)$/m);
|
|
632
|
-
const distroId = (osRelease.match(/^ID=(.+)$/m)?.[1] || "debian").trim();
|
|
633
|
-
const raw = (codenameMatch?.[1] || "").trim();
|
|
634
|
-
repoOs = (distroId === "ubuntu") ? "ubuntu" : "debian";
|
|
635
|
-
// Debian testing/unstable (trixie, sid) → use the previous stable repo.
|
|
636
|
-
const unstableCodenames = new Set(["trixie", "forky", "sid", "unstable", "testing"]);
|
|
637
|
-
const ubuntuFallback = "noble";
|
|
638
|
-
if (distroId === "ubuntu" && unstableCodenames.has(raw)) {
|
|
639
|
-
codename = ubuntuFallback;
|
|
640
|
-
}
|
|
641
|
-
else if (unstableCodenames.has(raw)) {
|
|
642
|
-
codename = "bookworm";
|
|
643
|
-
}
|
|
644
|
-
else {
|
|
645
|
-
codename = raw || "bookworm";
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
catch { }
|
|
649
|
-
emitTask(task, { type: "log", message: `使用仓库 codename: ${codename} (OS: ${repoOs})` });
|
|
650
|
-
const aptSteps = [
|
|
651
|
-
["sudo", ["apt-get", "update", "-qq"]],
|
|
652
|
-
["sudo", ["apt-get", "install", "-y", "-qq", "ca-certificates", "curl", "gnupg"]],
|
|
653
|
-
["sudo", ["install", "-m", "0755", "-d", "/etc/apt/keyrings"]],
|
|
654
|
-
["sudo", ["bash", "-c",
|
|
655
|
-
`curl -fsSL https://download.docker.com/linux/${repoOs}/gpg | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg && chmod a+r /etc/apt/keyrings/docker.gpg`
|
|
656
|
-
]],
|
|
657
|
-
["sudo", ["bash", "-c",
|
|
658
|
-
`echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/${repoOs} ${codename} stable" > /etc/apt/sources.list.d/docker.list`
|
|
659
|
-
]],
|
|
660
|
-
["sudo", ["apt-get", "update", "-qq"]],
|
|
661
|
-
["sudo", ["apt-get", "install", "-y", "-qq",
|
|
662
|
-
"docker-ce", "docker-ce-cli", "containerd.io", "docker-buildx-plugin", "docker-compose-plugin"
|
|
663
|
-
]],
|
|
664
|
-
];
|
|
665
|
-
const progressSteps = [5, 15, 20, 30, 35, 45, 80];
|
|
666
|
-
for (let i = 0; i < aptSteps.length; i++) {
|
|
667
|
-
const [cmd, args] = aptSteps[i];
|
|
668
|
-
emitTask(task, { type: "progress", message: `${cmd} ${args[0]}...`, progress: progressSteps[i] });
|
|
669
|
-
const r = await spawnWithTask(task, cmd, args, { timeout: 300000 });
|
|
670
|
-
if (!r.ok) {
|
|
671
|
-
emitTask(task, { type: "error", message: `apt 安装失败 (步骤 ${i + 1}): ${args.join(" ")}` });
|
|
672
|
-
task.status = "error";
|
|
673
|
-
return { ok: false, message: "Docker apt installation failed", error: r.output, taskId: task.id };
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
// ── Wrap up ────────────────────────────────────────────────────
|
|
678
|
-
emitTask(task, { type: "progress", message: "配置用户权限...", progress: 90 });
|
|
679
|
-
try {
|
|
680
|
-
execFileSync("sudo", ["groupadd", "docker"], { timeout: 10000 });
|
|
681
|
-
}
|
|
682
|
-
catch { }
|
|
683
|
-
try {
|
|
684
|
-
execFileSync("sudo", ["usermod", "-aG", "docker", user], { timeout: 10000 });
|
|
685
|
-
}
|
|
686
|
-
catch { }
|
|
687
|
-
emitTask(task, { type: "log", message: "注意: Docker 用户组变更可能需要重新登录才能生效" });
|
|
688
|
-
emitTask(task, { type: "progress", message: "启动 Docker 服务...", progress: 93 });
|
|
689
|
-
try {
|
|
690
|
-
execSync("sudo systemctl enable --now docker", { timeout: 30000 });
|
|
691
|
-
}
|
|
692
|
-
catch { }
|
|
693
|
-
// Enable cgroup memory for Docker stats (RPi default has it disabled)
|
|
694
|
-
const needsReboot = ensureCgroupMemory();
|
|
695
|
-
if (needsReboot) {
|
|
696
|
-
emitTask(task, { type: "log", message: "已启用内存 cgroup(需要重启生效,Docker 内存统计才会正常)" });
|
|
697
|
-
}
|
|
698
|
-
const version = getDockerVersionLine(10000);
|
|
699
|
-
// Verify the daemon via `sudo docker` (needed when the current user is not in the docker group yet).
|
|
700
|
-
const daemonOk = canAccessDockerDaemon(10000);
|
|
701
|
-
if (daemonOk) {
|
|
702
|
-
const doneMsg = needsReboot
|
|
703
|
-
? `Docker 安装完成: ${version}(需要重启以启用内存统计)`
|
|
704
|
-
: `Docker 安装完成: ${version}`;
|
|
705
|
-
emitTask(task, { type: "done", message: doneMsg, progress: 100 });
|
|
706
|
-
task.status = "done";
|
|
707
|
-
return { ok: true, message: `Docker installed: ${version}`, needsReboot, taskId: task.id };
|
|
708
|
-
}
|
|
709
|
-
else {
|
|
710
|
-
emitTask(task, { type: "error", message: `Docker 已安装但 daemon 未运行: ${version}` });
|
|
711
|
-
task.status = "error";
|
|
712
|
-
return { ok: false, message: `Docker installed but daemon not accessible`, error: "Try: sudo systemctl start docker", taskId: task.id };
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
catch (e) {
|
|
716
|
-
return { ok: false, message: "Docker installation failed", error: e.message };
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
/** Ensure current user is in docker group and service is enabled (idempotent) */
|
|
720
|
-
function ensureDockerPostInstall() {
|
|
721
|
-
try {
|
|
722
|
-
const user = execSync("whoami", { encoding: "utf-8", timeout: 5000 }).trim();
|
|
723
|
-
try {
|
|
724
|
-
execFileSync("sudo", ["groupadd", "docker"], { timeout: 5000, stdio: "pipe" });
|
|
725
|
-
}
|
|
726
|
-
catch { }
|
|
727
|
-
try {
|
|
728
|
-
execFileSync("sudo", ["usermod", "-aG", "docker", user], { timeout: 5000 });
|
|
729
|
-
}
|
|
730
|
-
catch { }
|
|
731
|
-
try {
|
|
732
|
-
execFileSync("sudo", ["systemctl", "enable", "--now", "docker"], { timeout: 10000 });
|
|
733
|
-
}
|
|
734
|
-
catch { }
|
|
735
|
-
}
|
|
736
|
-
catch { }
|
|
737
|
-
}
|
|
738
|
-
export async function installDocker() {
|
|
739
|
-
if (canAccessDockerDaemon(5000)) {
|
|
740
|
-
ensureDockerPostInstall();
|
|
741
|
-
const needsReboot = ensureCgroupMemory();
|
|
742
|
-
return { ok: true, message: "Docker already installed", needsReboot };
|
|
743
|
-
}
|
|
744
|
-
const task = createTask("docker");
|
|
745
|
-
return installDockerWithTask(task);
|
|
746
|
-
}
|
|
747
|
-
export function startInstallDocker() {
|
|
748
|
-
if (canAccessDockerDaemon(5000)) {
|
|
749
|
-
ensureDockerPostInstall();
|
|
750
|
-
ensureCgroupMemory();
|
|
751
|
-
return { ok: true, message: "Docker already installed" };
|
|
752
|
-
}
|
|
753
|
-
const task = createTask("docker");
|
|
754
|
-
void installDockerWithTask(task).catch((err) => {
|
|
755
|
-
emitTask(task, { type: "error", message: `Docker 安装失败: ${err?.message || err}` });
|
|
756
|
-
task.status = "error";
|
|
757
|
-
});
|
|
758
|
-
return { ok: true, message: "Docker install started", taskId: task.id };
|
|
759
|
-
}
|
|
760
|
-
// ── Install Nomad (async with progress) ────────────────────────────
|
|
761
|
-
function getNomadDownloadUrl() {
|
|
762
|
-
const arch = process.arch === "arm64" ? "arm64" : "amd64";
|
|
763
|
-
const os = process.platform === "linux" ? "linux" : "darwin";
|
|
764
|
-
return `https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_${os}_${arch}.zip`;
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* Signal nomad agents by exact process name (pgrep -x nomad) to avoid the
|
|
768
|
-
* classic pkill -f self-match bug: a command line like "pkill -f 'nomad agent'"
|
|
769
|
-
* literally contains the pattern and pkill kills itself before reaching the
|
|
770
|
-
* real nomad process. pgrep's own comm is "pgrep" (not "nomad") so -x nomad
|
|
771
|
-
* cannot self-match. Unprivileged kill is tried first; sudo -n as a fallback
|
|
772
|
-
* if the running nomad is owned by root (1.6.5 User=root unit).
|
|
773
|
-
*/
|
|
774
|
-
function killNomadByProcName() {
|
|
775
|
-
const collect = () => {
|
|
776
|
-
try {
|
|
777
|
-
const out = execSync("pgrep -x nomad 2>/dev/null || true", { encoding: "utf-8" }).trim();
|
|
778
|
-
return out.split("\n").filter(Boolean);
|
|
779
|
-
}
|
|
780
|
-
catch {
|
|
781
|
-
return [];
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
const sendSignal = (sig, pids) => {
|
|
785
|
-
if (pids.length === 0)
|
|
786
|
-
return;
|
|
787
|
-
try {
|
|
788
|
-
execFileSync("sudo", ["-n", "kill", `-${sig}`, ...pids], { timeout: 5000, stdio: "pipe" });
|
|
789
|
-
return;
|
|
790
|
-
}
|
|
791
|
-
catch { }
|
|
792
|
-
try {
|
|
793
|
-
execSync(`kill -${sig} ${pids.join(" ")} 2>/dev/null || true`, { timeout: 5000 });
|
|
794
|
-
}
|
|
795
|
-
catch { }
|
|
796
|
-
};
|
|
797
|
-
let pids = collect();
|
|
798
|
-
sendSignal("TERM", pids);
|
|
799
|
-
if (pids.length > 0) {
|
|
800
|
-
// Short grace period, then SIGKILL any survivors.
|
|
801
|
-
execSync("sleep 2");
|
|
802
|
-
pids = collect();
|
|
803
|
-
sendSignal("KILL", pids);
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
/** Compare two "a.b.c" semver strings; returns a > b. */
|
|
807
|
-
function isNomadVersionGreater(a, b) {
|
|
808
|
-
const parse = (v) => v.replace(/^v/, "").split(".").map(n => parseInt(n, 10) || 0);
|
|
809
|
-
const [aMaj, aMin, aPat] = parse(a);
|
|
810
|
-
const [bMaj, bMin, bPat] = parse(b);
|
|
811
|
-
if (aMaj !== bMaj)
|
|
812
|
-
return aMaj > bMaj;
|
|
813
|
-
if (aMin !== bMin)
|
|
814
|
-
return aMin > bMin;
|
|
815
|
-
return aPat > bPat;
|
|
816
|
-
}
|
|
817
|
-
/**
|
|
818
|
-
* Auto-migrate from a higher Nomad version (e.g. 1.11.3 BSL) back to the
|
|
819
|
-
* jishushell target (1.6.5 MPL). Called when installNomad detects a local
|
|
820
|
-
* binary whose semver is > NOMAD_VERSION. Destructive to Nomad's raft state
|
|
821
|
-
* (schema is not backward compatible) but preserves instance configs under
|
|
822
|
-
* ~/.jishushell/instances/*. A single tar.gz snapshot of the old data_dir
|
|
823
|
-
* is kept under ~/.jishushell/nomad/backups/ for forensic inspection.
|
|
824
|
-
*
|
|
825
|
-
* Safe-first: the new binary is downloaded and verified BEFORE any existing
|
|
826
|
-
* state is touched. If any stage 1 step fails, state is untouched.
|
|
827
|
-
*
|
|
828
|
-
* Throws on failure so the caller's outer catch reports the error.
|
|
829
|
-
*/
|
|
830
|
-
async function migrateNomadToTarget(currentVersion) {
|
|
831
|
-
console.log(`[nomad] Auto-migrating v${currentVersion} → v${NOMAD_VERSION} (BSL → MPL)`);
|
|
832
|
-
console.log("[nomad] Raft state is not backward-compatible; allocation history will be reset.");
|
|
833
|
-
console.log("[nomad] Instance configs under ~/.jishushell/instances/ are preserved.");
|
|
834
|
-
// ── Stage 1: download + verify new binary into a staging dir ─────────
|
|
835
|
-
const stageDir = mkdtempSync(join(tmpdir(), "nomad-migrate-"));
|
|
836
|
-
let backupFile = "";
|
|
837
|
-
try {
|
|
838
|
-
const stagedBin = join(stageDir, "nomad");
|
|
839
|
-
const zipPath = join(stageDir, "nomad.zip");
|
|
840
|
-
const url = getNomadDownloadUrl();
|
|
841
|
-
const arch = process.arch === "arm64" ? "arm64" : "amd64";
|
|
842
|
-
const os = process.platform === "linux" ? "linux" : "darwin";
|
|
843
|
-
const sumsUrl = `https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_SHA256SUMS`;
|
|
844
|
-
const sumsPath = join(stageDir, "SHA256SUMS");
|
|
845
|
-
console.log(`[nomad] Staging v${NOMAD_VERSION} (${os}/${arch})...`);
|
|
846
|
-
execFileSync("curl", ["-fsSL", url, "-o", zipPath], { timeout: 300000, stdio: "pipe" });
|
|
847
|
-
execFileSync("curl", ["-fsSL", sumsUrl, "-o", sumsPath], { timeout: 30000, stdio: "pipe" });
|
|
848
|
-
const sums = readFileSync(sumsPath, "utf-8");
|
|
849
|
-
const sumLine = sums.split("\n").find(l => l.includes(`nomad_${NOMAD_VERSION}_${os}_${arch}.zip`));
|
|
850
|
-
if (!sumLine)
|
|
851
|
-
throw new Error(`No checksum entry for nomad_${NOMAD_VERSION}_${os}_${arch}.zip`);
|
|
852
|
-
const expected = sumLine.split(/\s+/)[0];
|
|
853
|
-
// Match the bash installer: prefer sha256sum (GNU coreutils, Linux),
|
|
854
|
-
// fall back to shasum -a 256 (BSD, macOS default — sha256sum is not
|
|
855
|
-
// preinstalled there). Without this, triggering auto-migration from
|
|
856
|
-
// the WebUI / Node path on macOS would fail even though the shell
|
|
857
|
-
// installer works fine.
|
|
858
|
-
let actual;
|
|
859
|
-
try {
|
|
860
|
-
actual = execSync(`sha256sum "${zipPath}" | awk '{print $1}'`, { encoding: "utf-8" }).trim();
|
|
861
|
-
}
|
|
862
|
-
catch {
|
|
863
|
-
actual = execSync(`shasum -a 256 "${zipPath}" | awk '{print $1}'`, { encoding: "utf-8" }).trim();
|
|
864
|
-
}
|
|
865
|
-
if (expected !== actual) {
|
|
866
|
-
throw new Error(`Nomad checksum mismatch: expected ${expected}, got ${actual}`);
|
|
867
|
-
}
|
|
868
|
-
console.log("[nomad] Checksum verified");
|
|
869
|
-
execFileSync("unzip", ["-o", zipPath, "-d", stageDir], { timeout: 30000 });
|
|
870
|
-
chmodSync(stagedBin, 0o755);
|
|
871
|
-
const stagedVersionLine = execFileSync(stagedBin, ["version"], { encoding: "utf-8", timeout: 5000 }).trim().split("\n")[0];
|
|
872
|
-
if (!stagedVersionLine.includes(`v${NOMAD_VERSION}`)) {
|
|
873
|
-
throw new Error(`Staged binary reports "${stagedVersionLine}", expected v${NOMAD_VERSION}`);
|
|
874
|
-
}
|
|
875
|
-
console.log(`[nomad] Staged ${stagedVersionLine}`);
|
|
876
|
-
// ── Stage 2: destructive state changes begin ───────────────────────
|
|
877
|
-
console.log("[nomad] Stopping services...");
|
|
878
|
-
try {
|
|
879
|
-
execFileSync("sudo", ["-n", "systemctl", "stop", "jishushell"], { timeout: 15000, stdio: "pipe" });
|
|
880
|
-
}
|
|
881
|
-
catch { }
|
|
882
|
-
try {
|
|
883
|
-
execFileSync("sudo", ["-n", "systemctl", "stop", "nomad"], { timeout: 15000, stdio: "pipe" });
|
|
884
|
-
}
|
|
885
|
-
catch { }
|
|
886
|
-
// pkill -f 'nomad agent' matches pkill's own cmdline and self-terminates
|
|
887
|
-
// before reaching the real nomad process. Use pgrep -x nomad (exact proc
|
|
888
|
-
// name match; pgrep's comm is "pgrep") to avoid the self-match bug.
|
|
889
|
-
killNomadByProcName();
|
|
890
|
-
await new Promise(r => setTimeout(r, 2000));
|
|
891
|
-
// ── Stage 3: tar backup (single snapshot, overwrite any previous) ──
|
|
892
|
-
const backupDir = join(NOMAD_CONFIG_DIR, "backups");
|
|
893
|
-
if (existsSync(NOMAD_DATA_DIR)) {
|
|
894
|
-
try {
|
|
895
|
-
ensureDirHost(backupDir);
|
|
896
|
-
}
|
|
897
|
-
catch { }
|
|
898
|
-
const ts = new Date().toISOString().replace(/[-:]/g, "").replace(/\..+/, "").replace("T", "-");
|
|
899
|
-
const candidate = join(backupDir, `data-${ts}.tar.gz`);
|
|
900
|
-
console.log(`[nomad] Backing up raft state → ${candidate}`);
|
|
901
|
-
try {
|
|
902
|
-
execSync(`tar czf "${candidate}" -C "${NOMAD_CONFIG_DIR}" data 2>/dev/null`, { timeout: 120000 });
|
|
903
|
-
backupFile = candidate;
|
|
904
|
-
// Keep only the most recent snapshot
|
|
905
|
-
try {
|
|
906
|
-
const list = execSync(`ls -t "${backupDir}"/data-*.tar.gz 2>/dev/null | tail -n +2 || true`, { encoding: "utf-8" }).trim();
|
|
907
|
-
for (const old of list.split("\n").filter(Boolean)) {
|
|
908
|
-
try {
|
|
909
|
-
unlinkSync(old);
|
|
910
|
-
}
|
|
911
|
-
catch { }
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
catch { }
|
|
915
|
-
}
|
|
916
|
-
catch {
|
|
917
|
-
console.warn("[nomad] Backup tar failed — continuing (raft state will still be wiped)");
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
// ── Stage 4: wipe raft state + env files (schema incompatible) ─────
|
|
921
|
-
try {
|
|
922
|
-
execFileSync("sudo", ["-n", "rm", "-rf", NOMAD_DATA_DIR], { timeout: 15000, stdio: "pipe" });
|
|
923
|
-
}
|
|
924
|
-
catch {
|
|
925
|
-
try {
|
|
926
|
-
rmSync(NOMAD_DATA_DIR, { recursive: true, force: true });
|
|
927
|
-
}
|
|
928
|
-
catch { }
|
|
929
|
-
}
|
|
930
|
-
try {
|
|
931
|
-
unlinkSync(join(JISHUSHELL_HOME, "nomad.env"));
|
|
932
|
-
}
|
|
933
|
-
catch { }
|
|
934
|
-
try {
|
|
935
|
-
execFileSync("sudo", ["-n", "rm", "-f", "/etc/jishushell/nomad.env"], { timeout: 5000, stdio: "pipe" });
|
|
936
|
-
}
|
|
937
|
-
catch { }
|
|
938
|
-
// ── Stage 5: orphaned gateway containers ───────────────────────────
|
|
939
|
-
// Panel normally has docker group via jishushell.service SupplementaryGroups,
|
|
940
|
-
// but postinstall may run this helper from a shell where the invoking
|
|
941
|
-
// user is not in docker group. Probe first, fall back to sudo docker.
|
|
942
|
-
try {
|
|
943
|
-
let dockerCmd = "docker";
|
|
944
|
-
try {
|
|
945
|
-
execSync("docker ps >/dev/null 2>&1", { timeout: 5000 });
|
|
946
|
-
}
|
|
947
|
-
catch {
|
|
948
|
-
dockerCmd = "sudo -n docker";
|
|
949
|
-
}
|
|
950
|
-
const names = execSync(`${dockerCmd} ps -a --format '{{.Names}}' 2>/dev/null | grep '^gateway-' || true`, { encoding: "utf-8" }).trim();
|
|
951
|
-
if (names) {
|
|
952
|
-
const rows = names.split("\n").filter(Boolean);
|
|
953
|
-
for (const name of rows) {
|
|
954
|
-
try {
|
|
955
|
-
execSync(`${dockerCmd} rm -f "${name}" 2>/dev/null`, { timeout: 10000 });
|
|
956
|
-
}
|
|
957
|
-
catch { }
|
|
958
|
-
}
|
|
959
|
-
console.log(`[nomad] Removed ${rows.length} orphaned gateway container(s)`);
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
catch { }
|
|
963
|
-
// ── Stage 6: swap binary into place (atomic via temp name + rename)
|
|
964
|
-
ensureDirHost(BIN_DIR);
|
|
965
|
-
const destTmp = `${NOMAD_BIN}.tmp.${process.pid}`;
|
|
966
|
-
copyFileSync(stagedBin, destTmp);
|
|
967
|
-
chmodSync(destTmp, 0o755);
|
|
968
|
-
renameSync(destTmp, NOMAD_BIN);
|
|
969
|
-
console.log(`[nomad] Migrated to v${NOMAD_VERSION}`);
|
|
970
|
-
if (backupFile)
|
|
971
|
-
console.log(`[nomad] Backup (forensic, not self-recovery): ${backupFile}`);
|
|
972
|
-
console.log("[nomad] JishuShell will re-bootstrap ACL and resubmit jobs on next start.");
|
|
973
|
-
}
|
|
974
|
-
catch (err) {
|
|
975
|
-
if (backupFile) {
|
|
976
|
-
console.error(`[nomad] Migration failed — backup preserved at ${backupFile}`);
|
|
977
|
-
}
|
|
978
|
-
throw err;
|
|
979
|
-
}
|
|
980
|
-
finally {
|
|
981
|
-
try {
|
|
982
|
-
rmSync(stageDir, { recursive: true, force: true });
|
|
983
|
-
}
|
|
984
|
-
catch { }
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
export async function installNomad() {
|
|
988
|
-
try {
|
|
989
|
-
if (existsSync(NOMAD_BIN)) {
|
|
990
|
-
// Boundary check 1: is it a regular file?
|
|
991
|
-
try {
|
|
992
|
-
const stat = (await import("fs")).statSync(NOMAD_BIN);
|
|
993
|
-
if (!stat.isFile()) {
|
|
994
|
-
try {
|
|
995
|
-
unlinkSync(NOMAD_BIN);
|
|
996
|
-
}
|
|
997
|
-
catch { }
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
catch { }
|
|
1001
|
-
if (existsSync(NOMAD_BIN)) {
|
|
1002
|
-
// Boundary check 2: is it executable?
|
|
1003
|
-
try {
|
|
1004
|
-
chmodSync(NOMAD_BIN, 0o755);
|
|
1005
|
-
}
|
|
1006
|
-
catch { }
|
|
1007
|
-
// Boundary check 3: does it actually run?
|
|
1008
|
-
let versionLine = "";
|
|
1009
|
-
try {
|
|
1010
|
-
versionLine = execSync(`"${NOMAD_BIN}" version`, { encoding: "utf-8", timeout: 5000 }).trim().split("\n")[0];
|
|
1011
|
-
}
|
|
1012
|
-
catch {
|
|
1013
|
-
// Binary is corrupt or wrong arch — remove and reinstall
|
|
1014
|
-
try {
|
|
1015
|
-
unlinkSync(NOMAD_BIN);
|
|
1016
|
-
}
|
|
1017
|
-
catch { }
|
|
1018
|
-
}
|
|
1019
|
-
if (versionLine) {
|
|
1020
|
-
const match = versionLine.match(/v(\d+\.\d+\.\d+)/);
|
|
1021
|
-
const currentVersion = match ? match[1] : "";
|
|
1022
|
-
let migrated = false;
|
|
1023
|
-
if (currentVersion && isNomadVersionGreater(currentVersion, NOMAD_VERSION)) {
|
|
1024
|
-
// Current > target — auto-migrate (nomad 1.11.3 BSL → 1.6.5 MPL).
|
|
1025
|
-
// Migration failure is a hard stop: the old state has been
|
|
1026
|
-
// partially mutated (or about to be), returning falls through
|
|
1027
|
-
// to the reinstall path which would make a bad situation worse.
|
|
1028
|
-
try {
|
|
1029
|
-
await migrateNomadToTarget(currentVersion);
|
|
1030
|
-
}
|
|
1031
|
-
catch (migErr) {
|
|
1032
|
-
return {
|
|
1033
|
-
ok: false,
|
|
1034
|
-
message: "Nomad auto-migration failed",
|
|
1035
|
-
error: migErr?.message || String(migErr),
|
|
1036
|
-
};
|
|
1037
|
-
}
|
|
1038
|
-
migrated = true;
|
|
1039
|
-
versionLine = execSync(`"${NOMAD_BIN}" version`, { encoding: "utf-8", timeout: 5000 }).trim().split("\n")[0];
|
|
1040
|
-
}
|
|
1041
|
-
// Always (re)write config so the installed nomad.hcl stays up-to-date
|
|
1042
|
-
// with the current defaults (e.g. raw_exec plugin, acl, limits).
|
|
1043
|
-
writeNomadConfig();
|
|
1044
|
-
// Ensure Nomad is started even if already installed
|
|
1045
|
-
if (!isPortListening(4646)) {
|
|
1046
|
-
try {
|
|
1047
|
-
installNomadSystemd();
|
|
1048
|
-
}
|
|
1049
|
-
catch { }
|
|
1050
|
-
if (!isPortListening(4646)) {
|
|
1051
|
-
await startNomad();
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
return migrated
|
|
1055
|
-
? { ok: true, message: `Nomad migrated to ${versionLine}` }
|
|
1056
|
-
: { ok: true, message: `Nomad already installed: ${versionLine}` };
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
// Fallback: if NOMAD_BIN still doesn't exist, check for a system-installed Nomad
|
|
1061
|
-
// (e.g. installed via apt/dnf) and create a symlink so the systemd service path resolves.
|
|
1062
|
-
if (!existsSync(NOMAD_BIN)) {
|
|
1063
|
-
try {
|
|
1064
|
-
const systemNomad = execSync("which nomad 2>/dev/null", { encoding: "utf-8" }).trim();
|
|
1065
|
-
if (systemNomad && existsSync(systemNomad)) {
|
|
1066
|
-
ensureDirHost(BIN_DIR);
|
|
1067
|
-
symlinkSync(systemNomad, NOMAD_BIN);
|
|
1068
|
-
const version = execSync(`${NOMAD_BIN} version`, { encoding: "utf-8", timeout: 5000 }).trim();
|
|
1069
|
-
console.log(`[nomad] Linked system nomad ${systemNomad} → ${NOMAD_BIN}`);
|
|
1070
|
-
writeNomadConfig();
|
|
1071
|
-
return { ok: true, message: `Nomad linked from system: ${version.split("\n")[0]}` };
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
catch { /* system nomad not found — proceed to download */ }
|
|
1075
|
-
}
|
|
1076
|
-
const task = createTask("nomad");
|
|
1077
|
-
ensureDirHost(BIN_DIR);
|
|
1078
|
-
const url = getNomadDownloadUrl();
|
|
1079
|
-
const zipPath = join(BIN_DIR, "nomad.zip");
|
|
1080
|
-
emitTask(task, { type: "progress", message: "下载 Nomad...", progress: 0 });
|
|
1081
|
-
const result = await spawnWithTask(task, "curl", ["-fL", "--progress-bar", url, "-o", zipPath], {
|
|
1082
|
-
timeout: 300000,
|
|
1083
|
-
progressParser: curlProgressParser,
|
|
1084
|
-
});
|
|
1085
|
-
if (!result.ok) {
|
|
1086
|
-
emitTask(task, { type: "error", message: "Nomad 下载失败" });
|
|
1087
|
-
task.status = "error";
|
|
1088
|
-
return { ok: false, message: "Nomad download failed", error: result.output, taskId: task.id };
|
|
1089
|
-
}
|
|
1090
|
-
emitTask(task, { type: "progress", message: "解压 Nomad...", progress: 80 });
|
|
1091
|
-
try {
|
|
1092
|
-
execSync("which unzip", { stdio: "ignore" });
|
|
1093
|
-
}
|
|
1094
|
-
catch {
|
|
1095
|
-
emitTask(task, { type: "log", message: "未找到 unzip,尝试安装..." });
|
|
1096
|
-
try {
|
|
1097
|
-
if (process.platform === "linux") {
|
|
1098
|
-
execSync("sudo apt-get update -qq && sudo apt-get install -y -qq unzip", { timeout: 60000 });
|
|
1099
|
-
}
|
|
1100
|
-
else if (process.platform === "darwin") {
|
|
1101
|
-
execSync("brew install unzip", { timeout: 60000 });
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
catch (e) {
|
|
1105
|
-
emitTask(task, { type: "error", message: "安装 unzip 失败,请手动安装后重试" });
|
|
1106
|
-
throw e;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
execFileSync("unzip", ["-o", zipPath, "-d", BIN_DIR], { timeout: 30000 });
|
|
1110
|
-
chmodSync(NOMAD_BIN, 0o755);
|
|
1111
|
-
try {
|
|
1112
|
-
unlinkSync(zipPath);
|
|
1113
|
-
}
|
|
1114
|
-
catch { }
|
|
1115
|
-
const version = execFileSync(NOMAD_BIN, ["version"], { encoding: "utf-8", timeout: 5000 }).trim();
|
|
1116
|
-
emitTask(task, { type: "done", message: `Nomad 安装完成: ${version}`, progress: 100 });
|
|
1117
|
-
task.status = "done";
|
|
1118
|
-
return { ok: true, message: `Nomad installed: ${version}`, taskId: task.id };
|
|
1119
|
-
}
|
|
1120
|
-
catch (e) {
|
|
1121
|
-
return { ok: false, message: "Nomad installation failed", error: e.message };
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
// ── Configure & start Nomad ────────────────────────────────────────
|
|
1125
|
-
/** Fix ~/.jishushell dirs if they were accidentally created as root (e.g. from an old sudo install). */
|
|
1126
|
-
function fixNomadDirOwnership() {
|
|
1127
|
-
try {
|
|
1128
|
-
const { statSync } = require("fs");
|
|
1129
|
-
const stat = statSync(NOMAD_CONFIG_DIR);
|
|
1130
|
-
if (stat.uid === 0) {
|
|
1131
|
-
// Directory is owned by root — try to repair with sudo -n (non-interactive)
|
|
1132
|
-
const currentUser = process.env.USER || process.env.LOGNAME || "";
|
|
1133
|
-
if (currentUser) {
|
|
1134
|
-
try {
|
|
1135
|
-
execFileSync("sudo", ["-n", "chown", "-R", `${currentUser}:${currentUser}`, JISHUSHELL_HOME], { timeout: 10000, stdio: "pipe" });
|
|
1136
|
-
}
|
|
1137
|
-
catch { /* sudo not available or no NOPASSWD — ignore */ }
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
catch { /* stat failed — dir doesn't exist yet, no action needed */ }
|
|
1142
|
-
}
|
|
1143
|
-
function writeNomadConfig() {
|
|
1144
|
-
fixNomadDirOwnership();
|
|
1145
|
-
ensureDirHost(NOMAD_CONFIG_DIR);
|
|
1146
|
-
ensureDirContainer(NOMAD_DATA_DIR);
|
|
1147
|
-
ensureDirContainer(NOMAD_ALLOC_DIR);
|
|
1148
|
-
const platform = osPlatform();
|
|
1149
|
-
const loopbackIface = platform === "darwin" ? "lo0" : "lo";
|
|
1150
|
-
const externalIface = detectNomadExternalInterface(loopbackIface);
|
|
1151
|
-
const externalHostNetworkBlock = externalIface
|
|
1152
|
-
? `
|
|
1153
|
-
host_network "external" {
|
|
1154
|
-
interface = "${externalIface}"
|
|
1155
|
-
}
|
|
1156
|
-
`
|
|
1157
|
-
: "";
|
|
1158
|
-
// Detect docker0 bridge CIDR so multi-container apps (weknora etc.) can
|
|
1159
|
-
// declare `host_network: docker_bridge` on their ports and have Nomad
|
|
1160
|
-
// publish them on the docker0 IP — which is what `host.docker.internal`
|
|
1161
|
-
// resolves to inside peer containers. Hardcoding 172.17.0.0/16 would
|
|
1162
|
-
// break setups where docker daemon.json overrides `bip` /
|
|
1163
|
-
// `default-address-pools`. Fall back to the Docker default if detection
|
|
1164
|
-
// fails (e.g. docker not yet installed at panel install time; doctor
|
|
1165
|
-
// will regenerate later).
|
|
1166
|
-
const dockerBridgeCidr = detectDockerBridgeCidr() || "172.17.0.0/16";
|
|
1167
|
-
const dockerBridgeHostNetworkBlock = `
|
|
1168
|
-
host_network "docker_bridge" {
|
|
1169
|
-
cidr = "${dockerBridgeCidr}"
|
|
1170
|
-
}
|
|
1171
|
-
`;
|
|
1172
|
-
// Apple Silicon CPU fingerprint workaround. Nomad 1.6.x on darwin/arm64
|
|
1173
|
-
// reads `hw.tbfrequency` (timebase, e.g. 24 MHz on M-series) as the CPU
|
|
1174
|
-
// clock, so a 14-core M4 Max reports as 48 MHz total compute and every
|
|
1175
|
-
// job that asks for CPU>48 gets rejected with "Resources exhausted on
|
|
1176
|
-
// dimension cpu". Override with a conservative estimate (cores × 2500
|
|
1177
|
-
// MHz) — M-series base clock is at least 2.5 GHz, so this never
|
|
1178
|
-
// overcommits relative to actual silicon. Intel Macs fingerprint
|
|
1179
|
-
// correctly and don't need the override.
|
|
1180
|
-
const cpuTotalComputeBlock = platform === "darwin" && osArch() === "arm64"
|
|
1181
|
-
? ` cpu_total_compute = ${osCpus().length * 2500} # Apple Silicon workaround: Nomad mis-fingerprints CPU freq via tbfrequency\n`
|
|
1182
|
-
: "";
|
|
1183
|
-
// macOS docker driver endpoint. macOS users run Docker via Colima
|
|
1184
|
-
// (managed by this panel under `~/.jishushell/colima/jishushell/`) or
|
|
1185
|
-
// Docker Desktop (`~/.docker/run/docker.sock`); neither exposes
|
|
1186
|
-
// `/var/run/docker.sock` out of the box. Resolve the correct host once
|
|
1187
|
-
// and bake it into the HCL so Nomad doesn't fall back to the default
|
|
1188
|
-
// `unix:///var/run/docker.sock` and fail. Linux keeps the default
|
|
1189
|
-
// (empty endpoint = Docker's standard /var/run/docker.sock).
|
|
1190
|
-
const dockerHost = platform === "darwin"
|
|
1191
|
-
? resolveDockerHost({ jishuHome: JISHUSHELL_HOME, colimaProfile: COLIMA_PROFILE })
|
|
1192
|
-
: undefined;
|
|
1193
|
-
const dockerEndpointLine = dockerHost ? `\n endpoint = "${dockerHost}"` : "";
|
|
1194
|
-
const config = `
|
|
1195
|
-
data_dir = "${NOMAD_DATA_DIR}"
|
|
1196
|
-
|
|
1197
|
-
bind_addr = "127.0.0.1"
|
|
1198
|
-
|
|
1199
|
-
leave_on_terminate = false
|
|
1200
|
-
|
|
1201
|
-
advertise {
|
|
1202
|
-
http = "127.0.0.1"
|
|
1203
|
-
rpc = "127.0.0.1"
|
|
1204
|
-
serf = "127.0.0.1"
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
server {
|
|
1208
|
-
enabled = true
|
|
1209
|
-
bootstrap_expect = 1
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
client {
|
|
1213
|
-
${cpuTotalComputeBlock} enabled = true
|
|
1214
|
-
servers = ["127.0.0.1:4647"]
|
|
1215
|
-
network_interface = "${loopbackIface}"
|
|
1216
|
-
alloc_dir = "${NOMAD_ALLOC_DIR}"
|
|
1217
|
-
${externalHostNetworkBlock}${dockerBridgeHostNetworkBlock}
|
|
1218
|
-
|
|
1219
|
-
# drain_on_shutdown intentionally omitted: on single-node Pi there is
|
|
1220
|
-
# nowhere to drain workloads to, and draining on every systemctl restart
|
|
1221
|
-
# would kill every running OpenClaw instance. Without this block Nomad
|
|
1222
|
-
# leaves allocations running across client restarts — the docker driver
|
|
1223
|
-
# re-attaches to the existing containers on startup.
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
plugin "docker" {
|
|
1227
|
-
config {${dockerEndpointLine}
|
|
1228
|
-
gc {
|
|
1229
|
-
image = false
|
|
1230
|
-
}
|
|
1231
|
-
volumes {
|
|
1232
|
-
enabled = true
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
plugin "raw_exec" {
|
|
1238
|
-
config {
|
|
1239
|
-
enabled = true
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
acl {
|
|
1244
|
-
enabled = true
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
limits {
|
|
1248
|
-
http_max_conns_per_client = 0
|
|
1249
|
-
}
|
|
1250
|
-
`;
|
|
1251
|
-
writeConfigFile(join(NOMAD_CONFIG_DIR, "nomad.hcl"), config);
|
|
1252
|
-
}
|
|
1253
|
-
function detectDockerBridgeCidr() {
|
|
1254
|
-
// `docker network inspect bridge` returns the CIDR for docker0. The exact
|
|
1255
|
-
// value depends on /etc/docker/daemon.json `bip` / `default-address-pools`
|
|
1256
|
-
// — Docker's default is 172.17.0.0/16 but isn't guaranteed. We need the
|
|
1257
|
-
// real value because Nomad uses `host_network "docker_bridge" { cidr = …}`
|
|
1258
|
-
// to pick which interface to publish a port on for specs that declare
|
|
1259
|
-
// `host_network: docker_bridge`. Wrong CIDR → port silently published on
|
|
1260
|
-
// wrong interface → cross-task host.docker.internal calls get refused.
|
|
1261
|
-
try {
|
|
1262
|
-
const raw = execFileSync("docker", ["network", "inspect", "bridge", "--format", "{{(index .IPAM.Config 0).Subnet}}"], { encoding: "utf8", timeout: 3000, stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
1263
|
-
return /^\d{1,3}(\.\d{1,3}){3}\/\d{1,2}$/.test(raw) ? raw : "";
|
|
1264
|
-
}
|
|
1265
|
-
catch {
|
|
1266
|
-
return "";
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
function detectNomadExternalInterface(loopbackIface) {
|
|
1270
|
-
try {
|
|
1271
|
-
if (osPlatform() === "darwin") {
|
|
1272
|
-
const route = execFileSync("route", ["-n", "get", "default"], {
|
|
1273
|
-
encoding: "utf8",
|
|
1274
|
-
timeout: 3000,
|
|
1275
|
-
});
|
|
1276
|
-
const match = route.match(/interface:\s*(\S+)/);
|
|
1277
|
-
const iface = match?.[1]?.trim() ?? "";
|
|
1278
|
-
return iface && iface !== loopbackIface ? iface : "";
|
|
1279
|
-
}
|
|
1280
|
-
const route = execFileSync("ip", ["route", "show", "default"], {
|
|
1281
|
-
encoding: "utf8",
|
|
1282
|
-
timeout: 3000,
|
|
1283
|
-
});
|
|
1284
|
-
const match = route.match(/\bdev\s+(\S+)/);
|
|
1285
|
-
const iface = match?.[1]?.trim() ?? "";
|
|
1286
|
-
return iface && iface !== loopbackIface ? iface : "";
|
|
1287
|
-
}
|
|
1288
|
-
catch {
|
|
1289
|
-
return "";
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
export function loadNomadToken() {
|
|
1293
|
-
if (process.env.NOMAD_TOKEN)
|
|
1294
|
-
return;
|
|
1295
|
-
const candidates = [
|
|
1296
|
-
join(JISHUSHELL_HOME, "nomad.env"),
|
|
1297
|
-
"/etc/jishushell/nomad.env",
|
|
1298
|
-
];
|
|
1299
|
-
for (const envFile of candidates) {
|
|
1300
|
-
if (!existsSync(envFile))
|
|
1301
|
-
continue;
|
|
1302
|
-
try {
|
|
1303
|
-
const match = readFileSync(envFile, "utf-8").match(/^NOMAD_TOKEN=(.+)$/m);
|
|
1304
|
-
if (match) {
|
|
1305
|
-
process.env.NOMAD_TOKEN = match[1].trim();
|
|
1306
|
-
return;
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
catch {
|
|
1310
|
-
// no read permission, try next candidate
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
const legacy = getPanelConfig().nomad_token;
|
|
1314
|
-
if (legacy)
|
|
1315
|
-
process.env.NOMAD_TOKEN = legacy;
|
|
1316
|
-
}
|
|
1317
|
-
/** Verify the current NOMAD_TOKEN is accepted by the Nomad API. Returns false if it is missing or rejected (HTTP 403/401). */
|
|
1318
|
-
async function isNomadTokenValid() {
|
|
1319
|
-
const token = process.env.NOMAD_TOKEN || getPanelConfig().nomad_token;
|
|
1320
|
-
if (!token)
|
|
1321
|
-
return false;
|
|
1322
|
-
try {
|
|
1323
|
-
const resp = await fetch("http://127.0.0.1:4646/v1/acl/token/self", {
|
|
1324
|
-
headers: { "X-Nomad-Token": token },
|
|
1325
|
-
signal: AbortSignal.timeout(5000),
|
|
1326
|
-
});
|
|
1327
|
-
return resp.status === 200;
|
|
1328
|
-
}
|
|
1329
|
-
catch {
|
|
1330
|
-
return false;
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
function nomadApiHeaders(extra = {}) {
|
|
1334
|
-
const token = process.env.NOMAD_TOKEN || getPanelConfig().nomad_token;
|
|
1335
|
-
return token ? { "X-Nomad-Token": token, ...extra } : extra;
|
|
1336
|
-
}
|
|
1337
|
-
export async function ensureNomadMemoryOversubscriptionEnabled() {
|
|
1338
|
-
try {
|
|
1339
|
-
const resp = await fetch("http://127.0.0.1:4646/v1/operator/scheduler/configuration", {
|
|
1340
|
-
headers: nomadApiHeaders(),
|
|
1341
|
-
signal: AbortSignal.timeout(5000),
|
|
1342
|
-
});
|
|
1343
|
-
if (resp.status !== 200)
|
|
1344
|
-
return;
|
|
1345
|
-
const payload = await resp.json();
|
|
1346
|
-
const scheduler = payload?.SchedulerConfig;
|
|
1347
|
-
if (!scheduler || typeof scheduler !== "object")
|
|
1348
|
-
return;
|
|
1349
|
-
if (scheduler.MemoryOversubscriptionEnabled === true)
|
|
1350
|
-
return;
|
|
1351
|
-
const putResp = await fetch("http://127.0.0.1:4646/v1/operator/scheduler/configuration", {
|
|
1352
|
-
method: "PUT",
|
|
1353
|
-
headers: nomadApiHeaders({ "Content-Type": "application/json" }),
|
|
1354
|
-
body: JSON.stringify({ ...scheduler, MemoryOversubscriptionEnabled: true }),
|
|
1355
|
-
signal: AbortSignal.timeout(5000),
|
|
1356
|
-
});
|
|
1357
|
-
if (putResp.status === 200) {
|
|
1358
|
-
console.log("[nomad] Enabled memory oversubscription so MemoryMaxMB becomes an actual task limit.");
|
|
1359
|
-
}
|
|
1360
|
-
else {
|
|
1361
|
-
console.warn(`[nomad] Failed to enable memory oversubscription: HTTP ${putResp.status}`);
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
catch (e) {
|
|
1365
|
-
console.warn("[nomad] Failed to enable memory oversubscription:", e.message);
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
/** Shared post-start sequence: load token, bootstrap ACL, enable oversubscription, enable node. */
|
|
1369
|
-
async function finalizeNomadStartup() {
|
|
1370
|
-
loadNomadToken();
|
|
1371
|
-
await bootstrapNomadACL();
|
|
1372
|
-
await ensureNomadMemoryOversubscriptionEnabled();
|
|
1373
|
-
enableNomadNodeEligibility();
|
|
1374
|
-
}
|
|
1375
|
-
async function bootstrapNomadACL() {
|
|
1376
|
-
// If a token is already loaded, verify it's still valid before trusting it.
|
|
1377
|
-
if (process.env.NOMAD_TOKEN || getPanelConfig().nomad_token) {
|
|
1378
|
-
if (await isNomadTokenValid())
|
|
1379
|
-
return;
|
|
1380
|
-
console.log("[nomad] Stored ACL token is invalid — re-bootstrapping...");
|
|
1381
|
-
delete process.env.NOMAD_TOKEN;
|
|
1382
|
-
}
|
|
1383
|
-
const nomadPath = existsSync(NOMAD_BIN) ? NOMAD_BIN : "nomad";
|
|
1384
|
-
const doBootstrap = async () => {
|
|
1385
|
-
try {
|
|
1386
|
-
const raw = execFileSync(nomadPath, ["acl", "bootstrap", "-json"], {
|
|
1387
|
-
timeout: 10000,
|
|
1388
|
-
encoding: "utf-8",
|
|
1389
|
-
env: { ...process.env, NOMAD_ADDR: "http://127.0.0.1:4646" },
|
|
1390
|
-
});
|
|
1391
|
-
return JSON.parse(raw).SecretID ?? null;
|
|
1392
|
-
}
|
|
1393
|
-
catch (e) {
|
|
1394
|
-
// Return the raw stderr/stdout so caller can inspect it
|
|
1395
|
-
throw e;
|
|
1396
|
-
}
|
|
1397
|
-
};
|
|
1398
|
-
const saveToken = (token) => {
|
|
1399
|
-
const envFile = join(JISHUSHELL_HOME, "nomad.env");
|
|
1400
|
-
const envContent = `NOMAD_TOKEN=${token}\n`;
|
|
1401
|
-
writeSecretFile(envFile, envContent);
|
|
1402
|
-
try {
|
|
1403
|
-
execFileSync("sudo", ["-n", "mkdir", "-p", "/etc/jishushell"], { timeout: 5000, stdio: "pipe" });
|
|
1404
|
-
writeSystemTmpFile("/tmp/.nomad-env-tmp", envContent);
|
|
1405
|
-
execFileSync("sudo", ["-n", "cp", "/tmp/.nomad-env-tmp", "/etc/jishushell/nomad.env"], { timeout: 5000, stdio: "pipe" });
|
|
1406
|
-
execFileSync("sudo", ["-n", "chmod", "600", "/etc/jishushell/nomad.env"], { timeout: 5000, stdio: "pipe" });
|
|
1407
|
-
try {
|
|
1408
|
-
unlinkSync("/tmp/.nomad-env-tmp");
|
|
1409
|
-
}
|
|
1410
|
-
catch { }
|
|
1411
|
-
}
|
|
1412
|
-
catch (copyErr) {
|
|
1413
|
-
console.warn("[nomad] Could not sync token to /etc/jishushell/nomad.env:", copyErr.message);
|
|
1414
|
-
}
|
|
1415
|
-
process.env.NOMAD_TOKEN = token;
|
|
1416
|
-
console.log("[nomad] ACL token saved to", envFile);
|
|
1417
|
-
};
|
|
1418
|
-
try {
|
|
1419
|
-
const token = await doBootstrap();
|
|
1420
|
-
if (token)
|
|
1421
|
-
saveToken(token);
|
|
1422
|
-
return;
|
|
1423
|
-
}
|
|
1424
|
-
catch (e) {
|
|
1425
|
-
const msg = (e.stderr || e.stdout || e.message || "").toString();
|
|
1426
|
-
// "ACL bootstrap already done" — extract reset index and perform a reset
|
|
1427
|
-
const resetMatch = msg.match(/reset index[:\s]+(\d+)/i);
|
|
1428
|
-
if (!resetMatch) {
|
|
1429
|
-
if (!msg.includes("bootstrap"))
|
|
1430
|
-
console.warn("[nomad] ACL bootstrap warning:", msg);
|
|
1431
|
-
return;
|
|
1432
|
-
}
|
|
1433
|
-
const resetIndex = resetMatch[1];
|
|
1434
|
-
console.log(`[nomad] Bootstrap already done (reset index: ${resetIndex}). Performing ACL bootstrap reset...`);
|
|
1435
|
-
// Write the reset trigger file (Nomad reads this on startup to allow re-bootstrap).
|
|
1436
|
-
// NOMAD_DATA_DIR/server is owned by root because nomad.service runs as User=root
|
|
1437
|
-
// (docker driver on 1.6.5 requires euid==0). The panel runs as a non-root user, so
|
|
1438
|
-
// plain writeConfigFile would fail with EACCES — route through `sudo tee` instead.
|
|
1439
|
-
const resetFile = join(NOMAD_DATA_DIR, "server", "acl-bootstrap-reset");
|
|
1440
|
-
try {
|
|
1441
|
-
writeConfigFile(resetFile, resetIndex);
|
|
1442
|
-
}
|
|
1443
|
-
catch (writeErr) {
|
|
1444
|
-
try {
|
|
1445
|
-
execFileSync("sudo", ["-n", "mkdir", "-p", dirname(resetFile)], { timeout: 5000, stdio: "pipe" });
|
|
1446
|
-
execFileSync("sudo", ["-n", "tee", resetFile], {
|
|
1447
|
-
timeout: 5000,
|
|
1448
|
-
input: resetIndex,
|
|
1449
|
-
stdio: ["pipe", "ignore", "pipe"],
|
|
1450
|
-
});
|
|
1451
|
-
}
|
|
1452
|
-
catch (sudoErr) {
|
|
1453
|
-
console.warn("[nomad] Could not write acl-bootstrap-reset file:", sudoErr.message || writeErr.message);
|
|
1454
|
-
return;
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
// Restart Nomad so it picks up the reset file
|
|
1458
|
-
try {
|
|
1459
|
-
execFileSync("sudo", ["-n", "systemctl", "restart", "nomad"], { timeout: 15000, stdio: "pipe" });
|
|
1460
|
-
}
|
|
1461
|
-
catch {
|
|
1462
|
-
// No passwordless sudo — try pkill/re-spawn path (best effort)
|
|
1463
|
-
try {
|
|
1464
|
-
execFileSync("sudo", ["-n", "pkill", "-TERM", "-f", "nomad agent"], { stdio: "pipe" });
|
|
1465
|
-
}
|
|
1466
|
-
catch {
|
|
1467
|
-
try {
|
|
1468
|
-
execFileSync("pkill", ["-TERM", "-f", "nomad agent"], { stdio: "pipe" });
|
|
1469
|
-
}
|
|
1470
|
-
catch { }
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
// Wait for Nomad to come back
|
|
1474
|
-
for (let i = 0; i < 20; i++) {
|
|
1475
|
-
await new Promise(r => setTimeout(r, 1000));
|
|
1476
|
-
if (isPortListening(4646))
|
|
1477
|
-
break;
|
|
1478
|
-
}
|
|
1479
|
-
// Bootstrap again — reset file is consumed by Nomad on first start after restart
|
|
1480
|
-
try {
|
|
1481
|
-
const token = await doBootstrap();
|
|
1482
|
-
if (token)
|
|
1483
|
-
saveToken(token);
|
|
1484
|
-
}
|
|
1485
|
-
catch (e2) {
|
|
1486
|
-
console.warn("[nomad] ACL bootstrap after reset failed:", (e2.stderr || e2.message || "").toString().split("\n")[0]);
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
function enableNomadNodeEligibility() {
|
|
1491
|
-
const nomadPath = existsSync(NOMAD_BIN) ? NOMAD_BIN : "nomad";
|
|
1492
|
-
try {
|
|
1493
|
-
const raw = execSync(`${nomadPath} node status -self -json`, {
|
|
1494
|
-
timeout: 5000,
|
|
1495
|
-
encoding: "utf-8",
|
|
1496
|
-
env: { ...process.env, NOMAD_ADDR: "http://127.0.0.1:4646" },
|
|
1497
|
-
});
|
|
1498
|
-
const nodeId = JSON.parse(raw).ID;
|
|
1499
|
-
if (!nodeId)
|
|
1500
|
-
return;
|
|
1501
|
-
execSync(`${nomadPath} node eligibility -enable ${nodeId}`, {
|
|
1502
|
-
timeout: 5000,
|
|
1503
|
-
env: { ...process.env, NOMAD_ADDR: "http://127.0.0.1:4646" },
|
|
1504
|
-
});
|
|
1505
|
-
}
|
|
1506
|
-
catch {
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
export async function startNomad() {
|
|
1510
|
-
try {
|
|
1511
|
-
const configPath = join(NOMAD_CONFIG_DIR, "nomad.hcl");
|
|
1512
|
-
const readConfig = () => {
|
|
1513
|
-
try {
|
|
1514
|
-
return existsSync(configPath) ? readFileSync(configPath, "utf-8") : "";
|
|
1515
|
-
}
|
|
1516
|
-
catch {
|
|
1517
|
-
return "";
|
|
1518
|
-
}
|
|
1519
|
-
};
|
|
1520
|
-
const oldConfig = readConfig();
|
|
1521
|
-
writeNomadConfig();
|
|
1522
|
-
const newConfig = readConfig();
|
|
1523
|
-
const drifted = oldConfig.length > 0 && newConfig.length > 0 && oldConfig !== newConfig;
|
|
1524
|
-
if (isPortListening(4646)) {
|
|
1525
|
-
// Nomad already running, but if the rewritten config differs (typically
|
|
1526
|
-
// because detectNomadExternalInterface() now resolves to a different
|
|
1527
|
-
// interface — e.g. older install missing the host_network block, or
|
|
1528
|
-
// network interface renamed across reboots), reload nomad so allocations
|
|
1529
|
-
// bind to the right host network on next placement.
|
|
1530
|
-
if (drifted) {
|
|
1531
|
-
try {
|
|
1532
|
-
execFileSync("sudo", ["-n", "systemctl", "restart", "nomad"], { stdio: "pipe", timeout: 15000 });
|
|
1533
|
-
for (let i = 0; i < 15; i++) {
|
|
1534
|
-
await new Promise(r => setTimeout(r, 1000));
|
|
1535
|
-
if (isPortListening(4646)) {
|
|
1536
|
-
await finalizeNomadStartup();
|
|
1537
|
-
return { ok: true, message: "Nomad restarted (config reconciled)" };
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
return { ok: false, message: "Nomad restart timed out after config reconcile", error: "Port 4646 not listening after 15s" };
|
|
1541
|
-
}
|
|
1542
|
-
catch (e) {
|
|
1543
|
-
console.warn(`[nomad] config drift detected but restart failed (${e.message}); existing nomad continues with stale config`);
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
await finalizeNomadStartup();
|
|
1547
|
-
return { ok: true, message: "Nomad already running" };
|
|
1548
|
-
}
|
|
1549
|
-
// If systemd manages nomad, delegate to systemctl to avoid spawning a competing process
|
|
1550
|
-
const isSystemdManaged = (() => {
|
|
1551
|
-
try {
|
|
1552
|
-
const result = execFileSync("systemctl", ["is-enabled", "nomad"], { stdio: "pipe", timeout: 3000 });
|
|
1553
|
-
return result.toString().trim() === "enabled";
|
|
1554
|
-
}
|
|
1555
|
-
catch {
|
|
1556
|
-
return false;
|
|
1557
|
-
}
|
|
1558
|
-
})();
|
|
1559
|
-
if (isSystemdManaged) {
|
|
1560
|
-
try {
|
|
1561
|
-
execFileSync("sudo", ["-n", "systemctl", "start", "nomad"], { stdio: "pipe", timeout: 10000 });
|
|
1562
|
-
}
|
|
1563
|
-
catch {
|
|
1564
|
-
// sudo -n failed (no passwordless sudo); service may start on its own
|
|
1565
|
-
}
|
|
1566
|
-
for (let i = 0; i < 15; i++) {
|
|
1567
|
-
await new Promise(r => setTimeout(r, 1000));
|
|
1568
|
-
if (isPortListening(4646)) {
|
|
1569
|
-
await finalizeNomadStartup();
|
|
1570
|
-
return { ok: true, message: "Nomad started via systemd" };
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
return { ok: false, message: "Nomad start timed out", error: "Port 4646 not listening after 15s" };
|
|
1574
|
-
}
|
|
1575
|
-
if (process.platform === "darwin") {
|
|
1576
|
-
const launchdPlist = join(process.env.HOME || dirname(JISHUSHELL_HOME), "Library/LaunchAgents/com.jishushell.nomad.plist");
|
|
1577
|
-
if (existsSync(launchdPlist)) {
|
|
1578
|
-
for (let i = 0; i < 30; i++) {
|
|
1579
|
-
await new Promise(r => setTimeout(r, 1000));
|
|
1580
|
-
if (isPortListening(4646)) {
|
|
1581
|
-
await finalizeNomadStartup();
|
|
1582
|
-
return { ok: true, message: "Nomad started" };
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
return { ok: false, message: "Nomad start timed out", error: "Port 4646 not listening after 30s" };
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
const nomadPath = existsSync(NOMAD_BIN) ? NOMAD_BIN : "nomad";
|
|
1589
|
-
try {
|
|
1590
|
-
execFileSync(nomadPath, ["version"], { timeout: 5000, stdio: "pipe" });
|
|
1591
|
-
}
|
|
1592
|
-
catch {
|
|
1593
|
-
return { ok: false, message: "Nomad not installed", error: "Install Nomad first" };
|
|
1594
|
-
}
|
|
1595
|
-
const logPath = join(NOMAD_CONFIG_DIR, "nomad.log");
|
|
1596
|
-
// Use spawn with detached to avoid execSync shell injection and ensure proper daemonization
|
|
1597
|
-
try {
|
|
1598
|
-
const { openSync, closeSync } = await import("fs");
|
|
1599
|
-
const logFd = openSync(logPath, "a");
|
|
1600
|
-
// Run as current (non-root) user — Nomad only binds to 127.0.0.1:4646/4647/4648
|
|
1601
|
-
// (non-privileged ports) and all data dirs live under ~/.jishushell/, so sudo is not needed.
|
|
1602
|
-
const cmd = nomadPath;
|
|
1603
|
-
const args = ["agent", `-config=${configPath}`];
|
|
1604
|
-
const child = nodeSpawn(cmd, args, {
|
|
1605
|
-
detached: true,
|
|
1606
|
-
stdio: ["ignore", logFd, logFd],
|
|
1607
|
-
});
|
|
1608
|
-
child.unref();
|
|
1609
|
-
closeSync(logFd);
|
|
1610
|
-
}
|
|
1611
|
-
catch (e) {
|
|
1612
|
-
return { ok: false, message: "Failed to start Nomad", error: `launch failed: ${e.message}. Check sudo/permissions.` };
|
|
1613
|
-
}
|
|
1614
|
-
for (let i = 0; i < 15; i++) {
|
|
1615
|
-
await new Promise(r => setTimeout(r, 1000));
|
|
1616
|
-
if (isPortListening(4646)) {
|
|
1617
|
-
await finalizeNomadStartup();
|
|
1618
|
-
return { ok: true, message: "Nomad started" };
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
return { ok: false, message: "Nomad start timed out", error: "Port 4646 not listening after 15s" };
|
|
1622
|
-
}
|
|
1623
|
-
catch (e) {
|
|
1624
|
-
return { ok: false, message: "Failed to start Nomad", error: e.message };
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
export async function stopNomad() {
|
|
1628
|
-
try {
|
|
1629
|
-
if (!isPortListening(4646))
|
|
1630
|
-
return { ok: true, message: "Nomad not running" };
|
|
1631
|
-
// SIGTERM: graceful shutdown — Nomad flushes state and detaches from
|
|
1632
|
-
// running allocs without killing them (drain_on_shutdown is deliberately
|
|
1633
|
-
// not configured, so the docker containers keep running and will be
|
|
1634
|
-
// re-attached when Nomad comes back).
|
|
1635
|
-
// Use killNomadByProcName (pgrep -x) to avoid pkill -f self-matching.
|
|
1636
|
-
killNomadByProcName();
|
|
1637
|
-
// Wait up to 10s for the process to exit. No drain means shutdown is
|
|
1638
|
-
// near-instant — most of this budget is slack for slow disks on Pi.
|
|
1639
|
-
for (let i = 0; i < 10; i++) {
|
|
1640
|
-
await new Promise(r => setTimeout(r, 1000));
|
|
1641
|
-
if (!isPortListening(4646))
|
|
1642
|
-
return { ok: true, message: "Nomad stopped" };
|
|
1643
|
-
}
|
|
1644
|
-
return { ok: true, message: "Nomad stop requested" };
|
|
1645
|
-
}
|
|
1646
|
-
catch (e) {
|
|
1647
|
-
return { ok: false, message: "Failed to stop Nomad", error: e.message };
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
// ── Install Nomad as systemd service ───────────────────────────────
|
|
1651
|
-
export function installNomadSystemd() {
|
|
1652
|
-
try {
|
|
1653
|
-
let nomadPath = NOMAD_BIN;
|
|
1654
|
-
if (!existsSync(NOMAD_BIN)) {
|
|
1655
|
-
try {
|
|
1656
|
-
nomadPath = execFileSync("which", ["nomad"], { encoding: "utf-8", timeout: 5000 }).trim();
|
|
1657
|
-
}
|
|
1658
|
-
catch {
|
|
1659
|
-
nomadPath = "nomad";
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
const configPath = join(NOMAD_CONFIG_DIR, "nomad.hcl");
|
|
1663
|
-
writeNomadConfig();
|
|
1664
|
-
if (process.platform === "darwin") {
|
|
1665
|
-
// macOS is Apple Silicon only — fail fast (mirrors the bash uname guard).
|
|
1666
|
-
const guard = appleSiliconGuard();
|
|
1667
|
-
if (!guard.ok)
|
|
1668
|
-
return { ok: false, message: guard.message };
|
|
1669
|
-
const laDir = join(process.env.HOME || dirname(JISHUSHELL_HOME), "Library/LaunchAgents");
|
|
1670
|
-
// Always use JishuShell's private Colima socket — hardcoded, not
|
|
1671
|
-
// runtime-detected. Colima may not be running yet when the plist is
|
|
1672
|
-
// written; runtime fallback would pick the wrong socket (Docker
|
|
1673
|
-
// Desktop or /var/run/docker.sock). Mirrors the bash _COLIMA_SOCKET use.
|
|
1674
|
-
const colimaSocket = managedColimaSocketPath(JISHUSHELL_HOME, COLIMA_PROFILE);
|
|
1675
|
-
const colimaDockerHost = managedColimaDockerHost(JISHUSHELL_HOME, COLIMA_PROFILE);
|
|
1676
|
-
// ── 1. Colima self-retrying launchd agent ───────────────────────
|
|
1677
|
-
// colima binary: prefer PATH, fall back to both Homebrew prefixes
|
|
1678
|
-
// (mirrors the bash COLIMA_BIN resolution).
|
|
1679
|
-
let colimaBin = "";
|
|
1680
|
-
try {
|
|
1681
|
-
colimaBin = execFileSync("which", ["colima"], { encoding: "utf-8", timeout: 5000 }).trim().split("\n")[0];
|
|
1682
|
-
}
|
|
1683
|
-
catch {
|
|
1684
|
-
colimaBin = "";
|
|
1685
|
-
}
|
|
1686
|
-
if (!colimaBin && existsSync("/opt/homebrew/bin/colima"))
|
|
1687
|
-
colimaBin = "/opt/homebrew/bin/colima";
|
|
1688
|
-
if (!colimaBin && existsSync("/usr/local/bin/colima"))
|
|
1689
|
-
colimaBin = "/usr/local/bin/colima";
|
|
1690
|
-
if (!colimaBin)
|
|
1691
|
-
colimaBin = "colima";
|
|
1692
|
-
const colimaWrapperPath = join(BIN_DIR, "colima-launchd-wrapper.sh");
|
|
1693
|
-
writeExecutableFile(colimaWrapperPath, buildColimaWrapperScript({
|
|
1694
|
-
colimaHome: _COLIMA_DIR,
|
|
1695
|
-
profile: COLIMA_PROFILE,
|
|
1696
|
-
socket: colimaSocket,
|
|
1697
|
-
colimaBin,
|
|
1698
|
-
}));
|
|
1699
|
-
const colimaPlistPath = join(laDir, "com.jishushell.colima.plist");
|
|
1700
|
-
writeConfigFile(colimaPlistPath, buildColimaPlist({
|
|
1701
|
-
wrapperPath: colimaWrapperPath,
|
|
1702
|
-
colimaHome: _COLIMA_DIR,
|
|
1703
|
-
logPath: join(_COLIMA_DIR, "colima-launchd.log"),
|
|
1704
|
-
}));
|
|
1705
|
-
try {
|
|
1706
|
-
execSync(`launchctl unload "${colimaPlistPath}" 2>/dev/null`);
|
|
1707
|
-
}
|
|
1708
|
-
catch { }
|
|
1709
|
-
try {
|
|
1710
|
-
execSync(`launchctl load -w "${colimaPlistPath}"`, { timeout: 15000 });
|
|
1711
|
-
}
|
|
1712
|
-
catch { }
|
|
1713
|
-
// ── 2. Nomad gated behind a docker-readiness wrapper ────────────
|
|
1714
|
-
const logPath = join(NOMAD_CONFIG_DIR, "nomad.log");
|
|
1715
|
-
const nomadWrapperPath = join(BIN_DIR, "nomad-launchd-wrapper.sh");
|
|
1716
|
-
writeExecutableFile(nomadWrapperPath, buildNomadWaitWrapper({
|
|
1717
|
-
dockerHost: colimaDockerHost,
|
|
1718
|
-
nomadBin: nomadPath,
|
|
1719
|
-
configPath,
|
|
1720
|
-
}));
|
|
1721
|
-
const plistContent = buildNomadPlist({
|
|
1722
|
-
wrapperPath: nomadWrapperPath,
|
|
1723
|
-
dockerHost: colimaDockerHost,
|
|
1724
|
-
logPath,
|
|
1725
|
-
});
|
|
1726
|
-
const plistPath = join(laDir, "com.jishushell.nomad.plist");
|
|
1727
|
-
writeConfigFile(plistPath, plistContent);
|
|
1728
|
-
try {
|
|
1729
|
-
execSync(`launchctl unload "${plistPath}" 2>/dev/null`);
|
|
1730
|
-
}
|
|
1731
|
-
catch { }
|
|
1732
|
-
execSync(`launchctl load -w "${plistPath}"`, { timeout: 15000 });
|
|
1733
|
-
return { ok: true, message: "Nomad launchd agent installed and started (Colima gated)" };
|
|
1734
|
-
}
|
|
1735
|
-
// Nomad 1.6.5's docker driver fingerprint requires euid==0 — PR #18197 lifted
|
|
1736
|
-
// that restriction only in 1.7+, and we intentionally stay on the 1.6 MPL line.
|
|
1737
|
-
// The panel stays as the installing user via a separate jishushell.service unit;
|
|
1738
|
-
// it talks to this agent over HTTP, so no files under ~/.jishushell/nomad/data/
|
|
1739
|
-
// are read directly by the panel.
|
|
1740
|
-
const serviceContent = `[Unit]
|
|
1741
|
-
Description=Nomad Agent
|
|
1742
|
-
After=network-online.target docker.service
|
|
1743
|
-
Wants=network-online.target
|
|
1744
|
-
|
|
1745
|
-
[Service]
|
|
1746
|
-
User=root
|
|
1747
|
-
Type=simple
|
|
1748
|
-
EnvironmentFile=-/etc/jishushell/nomad.env
|
|
1749
|
-
ExecStart=${nomadPath} agent -config=${configPath}
|
|
1750
|
-
Restart=on-failure
|
|
1751
|
-
RestartSec=3
|
|
1752
|
-
Delegate=yes
|
|
1753
|
-
TasksMax=infinity
|
|
1754
|
-
|
|
1755
|
-
[Install]
|
|
1756
|
-
WantedBy=multi-user.target
|
|
1757
|
-
`;
|
|
1758
|
-
const servicePath = "/etc/systemd/system/nomad.service";
|
|
1759
|
-
execFileSync("sudo", ["mkdir", "-p", "/etc/jishushell"], { timeout: 5000 });
|
|
1760
|
-
writeSystemTmpFile("/tmp/nomad.service", serviceContent);
|
|
1761
|
-
execFileSync("sudo", ["cp", "/tmp/nomad.service", servicePath], { timeout: 5000 });
|
|
1762
|
-
execFileSync("sudo", ["systemctl", "daemon-reload"], { timeout: 5000 });
|
|
1763
|
-
execFileSync("sudo", ["systemctl", "enable", "--now", "nomad"], { timeout: 15000 });
|
|
1764
|
-
// Also restart if already running so it picks up the new User= directive
|
|
1765
|
-
try {
|
|
1766
|
-
execFileSync("sudo", ["systemctl", "restart", "nomad"], { timeout: 15000 });
|
|
1767
|
-
}
|
|
1768
|
-
catch { }
|
|
1769
|
-
return { ok: true, message: "Nomad systemd service installed and started" };
|
|
1770
|
-
}
|
|
1771
|
-
catch (e) {
|
|
1772
|
-
return { ok: false, message: "Failed to install Nomad systemd service", error: e.message };
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
// ── Install JishuShell as systemd service ─────────────────────────
|
|
1776
|
-
export function installJishushellSystemd(port) {
|
|
1777
|
-
try {
|
|
1778
|
-
const resolvedPort = port || _serverPort;
|
|
1779
|
-
// Use the node binary that is currently running this process — avoids
|
|
1780
|
-
// "which node" failing when PATH doesn't include nvm's bin dir.
|
|
1781
|
-
const nodeBin = process.execPath;
|
|
1782
|
-
// dist/cli.js lives next to this file (dist/services/setup-manager.js → dist/cli.js)
|
|
1783
|
-
const cliBin = join(__dirname, "..", "cli.js");
|
|
1784
|
-
// The real owner home: prefer JISHUSHELL_HOME's parent so we don't rely on $HOME.
|
|
1785
|
-
const realHome = dirname(JISHUSHELL_HOME);
|
|
1786
|
-
if (process.platform === "darwin") {
|
|
1787
|
-
// macOS is Apple Silicon only — fail fast (mirrors the bash uname guard).
|
|
1788
|
-
const guard = appleSiliconGuard();
|
|
1789
|
-
if (!guard.ok)
|
|
1790
|
-
return { ok: false, message: guard.message };
|
|
1791
|
-
const logPath = join(JISHUSHELL_HOME, "panel.log");
|
|
1792
|
-
const wrapperPath = join(JISHUSHELL_HOME, "bin", "jishushell-panel-start");
|
|
1793
|
-
const nomadEnvPath = join(JISHUSHELL_HOME, "nomad.env");
|
|
1794
|
-
const wrapperContent = `#!/bin/sh
|
|
1795
|
-
[ -f "${nomadEnvPath}" ] && . "${nomadEnvPath}"
|
|
1796
|
-
export JISHUSHELL_HOME="${JISHUSHELL_HOME}"
|
|
1797
|
-
export HOME="${realHome}"
|
|
1798
|
-
export NODE_ENV=production
|
|
1799
|
-
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:${dirname(nodeBin)}:\${PATH}"
|
|
1800
|
-
exec "${nodeBin}" "${cliBin}" serve --port ${resolvedPort}
|
|
1801
|
-
`;
|
|
1802
|
-
writeExecutableFile(wrapperPath, wrapperContent);
|
|
1803
|
-
// 60s docker-readiness gate so the first post-reboot page load
|
|
1804
|
-
// doesn't flash "image missing"; on timeout it starts anyway
|
|
1805
|
-
// (mirrors the bash panel-launchd-wrapper.sh gate).
|
|
1806
|
-
const gateWrapperPath = join(BIN_DIR, "panel-launchd-wrapper.sh");
|
|
1807
|
-
writeExecutableFile(gateWrapperPath, buildPanelGateWrapper({
|
|
1808
|
-
socket: managedColimaSocketPath(JISHUSHELL_HOME, COLIMA_PROFILE),
|
|
1809
|
-
panelStartWrapper: wrapperPath,
|
|
1810
|
-
}));
|
|
1811
|
-
const plistContent = buildPanelPlist({
|
|
1812
|
-
gateWrapperPath,
|
|
1813
|
-
logPath,
|
|
1814
|
-
});
|
|
1815
|
-
// Symmetric with installNomadSystemd()'s laDir (realHome === dirname(JISHUSHELL_HOME),
|
|
1816
|
-
// so process.env.HOME || dirname(JISHUSHELL_HOME) is provably the same path).
|
|
1817
|
-
const laDir = join(process.env.HOME || dirname(JISHUSHELL_HOME), "Library/LaunchAgents");
|
|
1818
|
-
const plistPath = join(laDir, "com.jishushell.panel.plist");
|
|
1819
|
-
writeConfigFile(plistPath, plistContent);
|
|
1820
|
-
const panelAlreadyRunning = isPortListening(resolvedPort);
|
|
1821
|
-
if (!panelAlreadyRunning) {
|
|
1822
|
-
try {
|
|
1823
|
-
execSync(`launchctl unload "${plistPath}" 2>/dev/null`);
|
|
1824
|
-
}
|
|
1825
|
-
catch { }
|
|
1826
|
-
execSync(`launchctl load -w "${plistPath}"`, { timeout: 15000 });
|
|
1827
|
-
}
|
|
1828
|
-
return { ok: true, message: "JishuShell launchd agent installed and enabled (port " + resolvedPort + ")" };
|
|
1829
|
-
}
|
|
1830
|
-
const currentUser = resolveServiceUser();
|
|
1831
|
-
const serviceContent = `[Unit]
|
|
1832
|
-
Description=JishuShell Panel
|
|
1833
|
-
After=network-online.target
|
|
1834
|
-
Wants=network-online.target
|
|
1835
|
-
|
|
1836
|
-
[Service]
|
|
1837
|
-
Type=simple
|
|
1838
|
-
User=${currentUser}
|
|
1839
|
-
SupplementaryGroups=docker
|
|
1840
|
-
Environment=HOME=${realHome}
|
|
1841
|
-
Environment=JISHUSHELL_HOME=${JISHUSHELL_HOME}
|
|
1842
|
-
EnvironmentFile=-/etc/jishushell/jishushell.env
|
|
1843
|
-
EnvironmentFile=-/etc/jishushell/nomad.env
|
|
1844
|
-
ExecStart=${nodeBin} ${cliBin} serve --port ${resolvedPort}
|
|
1845
|
-
Restart=on-failure
|
|
1846
|
-
RestartSec=5
|
|
1847
|
-
Environment=NODE_ENV=production
|
|
1848
|
-
|
|
1849
|
-
[Install]
|
|
1850
|
-
WantedBy=multi-user.target
|
|
1851
|
-
`;
|
|
1852
|
-
execFileSync("sudo", ["mkdir", "-p", "/etc/jishushell"], { timeout: 5000 });
|
|
1853
|
-
writeSystemTmpFile("/tmp/jishushell.service", serviceContent);
|
|
1854
|
-
execFileSync("sudo", ["cp", "/tmp/jishushell.service", "/etc/systemd/system/jishushell.service"], { timeout: 5000 });
|
|
1855
|
-
execFileSync("sudo", ["systemctl", "daemon-reload"], { timeout: 5000 });
|
|
1856
|
-
execFileSync("sudo", ["systemctl", "enable", "jishushell"], { timeout: 15000 });
|
|
1857
|
-
// Don't start now — the current process is already running on this port.
|
|
1858
|
-
// The service will auto-start on next reboot.
|
|
1859
|
-
return { ok: true, message: "JishuShell systemd service installed and enabled (port " + resolvedPort + ")" };
|
|
1860
|
-
}
|
|
1861
|
-
catch (e) {
|
|
1862
|
-
return { ok: false, message: "Failed to install JishuShell systemd service", error: e.message };
|
|
1863
|
-
}
|
|
1864
|
-
}
|
|
1865
|
-
// ── Install OpenClaw (async with progress) ─────────────────────────
|
|
1866
|
-
/**
|
|
1867
|
-
* Install OpenClaw runtime — thin dispatch wrapper.
|
|
1868
|
-
*
|
|
1869
|
-
* The heavy lifting lives in `OpenClawAdapter.installRuntime()` (§32.2.4).
|
|
1870
|
-
* This wrapper is kept only for back-compat with the existing
|
|
1871
|
-
* `routes/setup.ts` endpoint and the CLI installer.
|
|
1872
|
-
*/
|
|
1873
|
-
export async function installOpenclaw(version = "latest") {
|
|
1874
|
-
const adapter = getAdapter("openclaw");
|
|
1875
|
-
if (typeof adapter.installRuntime !== "function") {
|
|
1876
|
-
return { ok: false, message: "OpenClawAdapter.installRuntime is not implemented" };
|
|
1877
|
-
}
|
|
1878
|
-
return adapter.installRuntime({ version });
|
|
1879
|
-
}
|
|
1880
|
-
// ── Hermes install (§32.1 / §32.3) ─────────────────────────────────
|
|
1881
|
-
//
|
|
1882
|
-
// Hermes constants (HERMES_DEFAULT_IMAGE, HERMES_RUNTIME_DIR,
|
|
1883
|
-
// HERMES_SHIM_FILENAME) and the shim template resolver have moved to
|
|
1884
|
-
// `src/config.ts` (§32 Phase 8). setup-manager no longer defines them.
|
|
1885
|
-
// The HermesAdapter imports them directly from config.ts.
|
|
1886
|
-
/**
|
|
1887
|
-
* Capture the immutable digest of a locally-present image so HermesAdapter
|
|
1888
|
-
* can pin via digest rather than the mutable tag. Returns undefined if the
|
|
1889
|
-
* image has no RepoDigests (e.g. locally-built image) — caller may still
|
|
1890
|
-
* proceed using the tag alone.
|
|
1891
|
-
*/
|
|
1892
|
-
export function captureImageDigest(imageRef) {
|
|
1893
|
-
try {
|
|
1894
|
-
const raw = execFileSync("docker", [
|
|
1895
|
-
"image",
|
|
1896
|
-
"inspect",
|
|
1897
|
-
"--format",
|
|
1898
|
-
"{{range .RepoDigests}}{{.}}{{\"\\n\"}}{{end}}",
|
|
1899
|
-
imageRef,
|
|
1900
|
-
], { encoding: "utf-8", timeout: 10000, stdio: ["pipe", "pipe", "pipe"] });
|
|
1901
|
-
const first = raw.split("\n").map((l) => l.trim()).find(Boolean);
|
|
1902
|
-
return first || undefined;
|
|
1903
|
-
}
|
|
1904
|
-
catch {
|
|
1905
|
-
return undefined;
|
|
1906
|
-
}
|
|
1907
|
-
}
|
|
1908
|
-
/**
|
|
1909
|
-
* Install Hermes runtime — thin dispatch wrapper.
|
|
1910
|
-
*
|
|
1911
|
-
* Heavy lifting lives in `HermesAdapter.installRuntime()` (§32.2.4).
|
|
1912
|
-
*/
|
|
1913
|
-
export async function installHermes() {
|
|
1914
|
-
const adapter = getAdapter("hermes");
|
|
1915
|
-
if (typeof adapter.installRuntime !== "function") {
|
|
1916
|
-
return { ok: false, message: "HermesAdapter.installRuntime is not implemented" };
|
|
1917
|
-
}
|
|
1918
|
-
return adapter.installRuntime();
|
|
1919
|
-
}
|
|
1920
|
-
/**
|
|
1921
|
-
* Non-blocking variant — returns a task id immediately. Implementation
|
|
1922
|
-
* dispatches via `HermesAdapter.startInstallRuntime()`.
|
|
1923
|
-
*/
|
|
1924
|
-
export function startInstallHermes() {
|
|
1925
|
-
const adapter = getAdapter("hermes");
|
|
1926
|
-
if (typeof adapter.startInstallRuntime !== "function") {
|
|
1927
|
-
return { ok: false, message: "HermesAdapter.startInstallRuntime is not implemented" };
|
|
1928
|
-
}
|
|
1929
|
-
return adapter.startInstallRuntime();
|
|
1930
|
-
}
|
|
1931
|
-
/** Helper for setup status — true when runtime catalog has hermes entry. */
|
|
1932
|
-
export function isHermesInstalled() {
|
|
1933
|
-
const entry = getRuntimeCatalogEntry("hermes");
|
|
1934
|
-
return !!entry && !!entry.defaultImage;
|
|
1935
|
-
}
|
|
1936
|
-
export function resolveDockerInvocation() {
|
|
1937
|
-
try {
|
|
1938
|
-
execFileSync("docker", ["info"], { timeout: 5000, stdio: "ignore" });
|
|
1939
|
-
return { cmd: "docker", argsPrefix: [] };
|
|
1940
|
-
}
|
|
1941
|
-
catch { }
|
|
1942
|
-
try {
|
|
1943
|
-
execFileSync("sudo", ["-n", "docker", "info"], { timeout: 5000, stdio: "ignore" });
|
|
1944
|
-
return { cmd: "sudo", argsPrefix: ["-n", "docker"] };
|
|
1945
|
-
}
|
|
1946
|
-
catch { }
|
|
1947
|
-
return { cmd: "docker", argsPrefix: [] };
|
|
1948
|
-
}
|
|
1949
|
-
function checkDockerImageExists() {
|
|
1950
|
-
const tag = resolveDockerImageTag();
|
|
1951
|
-
try {
|
|
1952
|
-
const invocation = resolveDockerInvocation();
|
|
1953
|
-
execFileSync(invocation.cmd, [...invocation.argsPrefix, "image", "inspect", tag], { timeout: 5000, stdio: "ignore" });
|
|
1954
|
-
return true;
|
|
1955
|
-
}
|
|
1956
|
-
catch {
|
|
1957
|
-
// Fallback scan: list all local images and try to find any known runtime image.
|
|
1958
|
-
// This handles two scenarios:
|
|
1959
|
-
// 1. panel.json was wiped (e.g. after `jishushell reset`) and the pinned version
|
|
1960
|
-
// tag is no longer stored, causing getOpenclawDockerImage() to return the default
|
|
1961
|
-
// `:latest` tag which may have been removed locally during the first-run migration.
|
|
1962
|
-
// 2. The environment uses a locally built runtime image (e.g. jishushell-hermes:latest)
|
|
1963
|
-
// that differs from the registry default.
|
|
1964
|
-
// When a candidate is found we restore panel.json (self-heal) so the fast path works next time.
|
|
1965
|
-
try {
|
|
1966
|
-
const invocation = resolveDockerInvocation();
|
|
1967
|
-
const out = execFileSync(invocation.cmd, [...invocation.argsPrefix, "images", "--format", "{{.Repository}}:{{.Tag}}"], { encoding: "utf8", timeout: 5000 });
|
|
1968
|
-
const lines = out.split("\n").map((l) => l.trim()).filter(Boolean);
|
|
1969
|
-
// 1. Same repository as DEFAULT_OPENCLAW_DOCKER_IMAGE (e.g. after pinned-tag migration).
|
|
1970
|
-
const defaultImage = DEFAULT_OPENCLAW_DOCKER_IMAGE;
|
|
1971
|
-
const repoColonIdx = defaultImage.lastIndexOf(":");
|
|
1972
|
-
const repoSlashIdx = defaultImage.lastIndexOf("/");
|
|
1973
|
-
if (repoColonIdx > repoSlashIdx) {
|
|
1974
|
-
const repo = defaultImage.slice(0, repoColonIdx);
|
|
1975
|
-
const repoPrefix = repo + ":";
|
|
1976
|
-
const found = lines.find((l) => l.startsWith(repoPrefix) && !l.endsWith(":<none>") && !l.endsWith(":none"));
|
|
1977
|
-
if (found) {
|
|
1978
|
-
setOpenclawDockerImage(found);
|
|
1979
|
-
return true;
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
// 2. Backward compat: older locally-built jishushell-openclaw:* image names.
|
|
1983
|
-
// These use the same slim base architecture as ghcr.io/x-aijishu/openclaw-runtime:*
|
|
1984
|
-
// and are fully compatible. Self-heal panel.json so the tag stored there becomes
|
|
1985
|
-
// the concrete existing tag, preventing repeated DEFAULT-migration side effects.
|
|
1986
|
-
const legacyFound = lines.find((l) => /^jishushell-openclaw:[^\s]+/.test(l) && !l.endsWith(":<none>") && !l.endsWith(":none"));
|
|
1987
|
-
if (legacyFound) {
|
|
1988
|
-
setOpenclawDockerImage(legacyFound);
|
|
1989
|
-
return true;
|
|
1990
|
-
}
|
|
1991
|
-
}
|
|
1992
|
-
catch { }
|
|
1993
|
-
return false;
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
// The stable tag for the JishuShell base image. Reads panel.json — framework-level.
|
|
1997
|
-
function resolveDockerImageTag() {
|
|
1998
|
-
return getOpenclawDockerImage();
|
|
1999
|
-
}
|
|
2000
|
-
// ── Docker image build dispatch wrappers ───────────────────────────────
|
|
2001
|
-
//
|
|
2002
|
-
// All OpenClaw-specific image build logic now lives in
|
|
2003
|
-
// `OpenClawAdapter.buildRuntimeImage()` (§32.2.4 physical migration). These
|
|
2004
|
-
// exports remain as thin wrappers so `routes/setup.ts` and
|
|
2005
|
-
// `install.ts` callers don't need to learn adapter dispatch.
|
|
2006
|
-
/** Blocking: pull or build the OpenClaw docker image. */
|
|
2007
|
-
export async function buildSlimOpenclawImage(tag) {
|
|
2008
|
-
const adapter = getAdapter("openclaw");
|
|
2009
|
-
if (typeof adapter.buildRuntimeImage !== "function") {
|
|
2010
|
-
return { ok: false, message: "OpenClawAdapter.buildRuntimeImage is not implemented" };
|
|
2011
|
-
}
|
|
2012
|
-
return adapter.buildRuntimeImage({ tag });
|
|
2013
|
-
}
|
|
2014
|
-
/** Non-blocking: returns immediately with a task id for SSE polling. */
|
|
2015
|
-
export function startBuildSlimOpenclawImage(tag) {
|
|
2016
|
-
const adapter = getAdapter("openclaw");
|
|
2017
|
-
if (typeof adapter.startBuildRuntimeImage !== "function") {
|
|
2018
|
-
return { ok: false, message: "OpenClawAdapter.startBuildRuntimeImage is not implemented" };
|
|
2019
|
-
}
|
|
2020
|
-
return adapter.startBuildRuntimeImage({ tag });
|
|
2021
|
-
}
|
|
2022
|
-
/** @deprecated Use buildSlimOpenclawImage instead */
|
|
2023
|
-
export async function buildCustomOpenclawImage(tag) {
|
|
2024
|
-
return buildSlimOpenclawImage(tag);
|
|
2025
|
-
}
|
|
2026
|
-
/** @deprecated Use startBuildSlimOpenclawImage instead */
|
|
2027
|
-
export function startBuildCustomOpenclawImage(tag) {
|
|
2028
|
-
return startBuildSlimOpenclawImage(tag);
|
|
2029
|
-
}
|
|
2030
|
-
export async function runFullSetup(options = {}) {
|
|
2031
|
-
const steps = [];
|
|
2032
|
-
let allOk = true;
|
|
2033
|
-
const defaults = {
|
|
2034
|
-
installNomad: true,
|
|
2035
|
-
buildDockerImage: true,
|
|
2036
|
-
...options,
|
|
2037
|
-
};
|
|
2038
|
-
// Check Docker by daemon accessibility (docker info), not just binary existence
|
|
2039
|
-
const dockerReady = canAccessDockerDaemon(10000);
|
|
2040
|
-
if (!dockerReady) {
|
|
2041
|
-
steps.push({ step: "docker", status: "running", message: "Installing Docker..." });
|
|
2042
|
-
const result = await installDocker();
|
|
2043
|
-
steps[steps.length - 1].status = result.ok ? "done" : "error";
|
|
2044
|
-
steps[steps.length - 1].message = result.message;
|
|
2045
|
-
if (!result.ok)
|
|
2046
|
-
allOk = false;
|
|
2047
|
-
}
|
|
2048
|
-
if (defaults.installNomad) {
|
|
2049
|
-
steps.push({ step: "nomad", status: "running", message: "Installing Nomad..." });
|
|
2050
|
-
const result = await installNomad();
|
|
2051
|
-
steps[steps.length - 1].status = result.ok ? "done" : "error";
|
|
2052
|
-
steps[steps.length - 1].message = result.message;
|
|
2053
|
-
if (!result.ok)
|
|
2054
|
-
allOk = false;
|
|
2055
|
-
if (result.ok) {
|
|
2056
|
-
steps.push({ step: "nomad-systemd", status: "running", message: "Configuring Nomad auto-start..." });
|
|
2057
|
-
const sysResult = installNomadSystemd();
|
|
2058
|
-
steps[steps.length - 1].status = sysResult.ok ? "done" : "error";
|
|
2059
|
-
steps[steps.length - 1].message = sysResult.message;
|
|
2060
|
-
if (!sysResult.ok) {
|
|
2061
|
-
// Fallback to manual start if systemd fails
|
|
2062
|
-
steps.push({ step: "nomad-start", status: "running", message: "Starting Nomad..." });
|
|
2063
|
-
const startResult = await startNomad();
|
|
2064
|
-
steps[steps.length - 1].status = startResult.ok ? "done" : "error";
|
|
2065
|
-
steps[steps.length - 1].message = startResult.message;
|
|
2066
|
-
if (!startResult.ok)
|
|
2067
|
-
allOk = false;
|
|
2068
|
-
}
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
// Prepare each registered agent's runtime artefacts (docker image, shim,
|
|
2072
|
-
// etc.). This loops over every adapter so onboarding a new agent only
|
|
2073
|
-
// requires implementing `buildRuntimeImage` or `installRuntime` in its
|
|
2074
|
-
// adapter — runFullSetup picks it up automatically.
|
|
2075
|
-
if (defaults.buildDockerImage) {
|
|
2076
|
-
// Restart Nomad so it re-detects Docker driver after Docker was installed
|
|
2077
|
-
try {
|
|
2078
|
-
execSync("sudo systemctl restart nomad 2>/dev/null || true", { timeout: 15000 });
|
|
2079
|
-
for (let i = 0; i < 10; i++) {
|
|
2080
|
-
await new Promise(r => setTimeout(r, 2000));
|
|
2081
|
-
if (isPortListening(4646))
|
|
2082
|
-
break;
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
catch { }
|
|
2086
|
-
for (const adapter of listRegisteredAdapters()) {
|
|
2087
|
-
const stepName = `runtime-${adapter.agentType}`;
|
|
2088
|
-
// Prefer buildRuntimeImage (pure docker image prep) over
|
|
2089
|
-
// installRuntime (legacy host-mode npm install). Adapters that only
|
|
2090
|
-
// implement one will use whichever is present; adapters with neither
|
|
2091
|
-
// are skipped silently.
|
|
2092
|
-
const runner = adapter.buildRuntimeImage
|
|
2093
|
-
? adapter.buildRuntimeImage.bind(adapter)
|
|
2094
|
-
: adapter.installRuntime
|
|
2095
|
-
? adapter.installRuntime.bind(adapter)
|
|
2096
|
-
: null;
|
|
2097
|
-
if (!runner)
|
|
2098
|
-
continue;
|
|
2099
|
-
const isRequired = !!adapter.required;
|
|
2100
|
-
steps.push({
|
|
2101
|
-
step: stepName,
|
|
2102
|
-
status: "running",
|
|
2103
|
-
message: `Preparing ${adapter.agentType} runtime…`,
|
|
2104
|
-
});
|
|
2105
|
-
try {
|
|
2106
|
-
const imgResult = (await runner());
|
|
2107
|
-
const okStep = !!imgResult.ok;
|
|
2108
|
-
steps[steps.length - 1].status = okStep ? "done" : "error";
|
|
2109
|
-
steps[steps.length - 1].message = okStep
|
|
2110
|
-
? imgResult.message
|
|
2111
|
-
: isRequired
|
|
2112
|
-
? imgResult.message
|
|
2113
|
-
: `${imgResult.message} (optional — panel will continue)`;
|
|
2114
|
-
// Required adapter failures abort the overall setup; optional ones
|
|
2115
|
-
// are warnings so that upgrade paths don't break when a third-party
|
|
2116
|
-
// agent's registry is unreachable.
|
|
2117
|
-
if (!okStep && isRequired)
|
|
2118
|
-
allOk = false;
|
|
2119
|
-
}
|
|
2120
|
-
catch (e) {
|
|
2121
|
-
const msg = e?.message || "runtime prepare failed";
|
|
2122
|
-
steps[steps.length - 1].status = "error";
|
|
2123
|
-
steps[steps.length - 1].message = isRequired
|
|
2124
|
-
? msg
|
|
2125
|
-
: `${msg} (optional — panel will continue)`;
|
|
2126
|
-
if (isRequired)
|
|
2127
|
-
allOk = false;
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
if (isPortListening(4646)) {
|
|
2132
|
-
await finalizeNomadStartup();
|
|
2133
|
-
}
|
|
2134
|
-
// Only mark setup as complete if all critical steps succeeded
|
|
2135
|
-
if (!allOk) {
|
|
2136
|
-
return { ok: false, steps };
|
|
2137
|
-
}
|
|
2138
|
-
const config = getPanelConfig();
|
|
2139
|
-
config.service_manager = "nomad";
|
|
2140
|
-
config.nomad_driver = "docker";
|
|
2141
|
-
savePanelConfig(config);
|
|
2142
|
-
// Install jishushell systemd service (best-effort — does not block setup completion)
|
|
2143
|
-
steps.push({ step: "jishushell-systemd", status: "running", message: "Configuring JishuShell auto-start..." });
|
|
2144
|
-
const jsResult = installJishushellSystemd();
|
|
2145
|
-
steps[steps.length - 1].status = jsResult.ok ? "done" : "error";
|
|
2146
|
-
steps[steps.length - 1].message = jsResult.message;
|
|
2147
|
-
return { ok: allOk, steps };
|
|
2148
|
-
}
|
|
2149
|
-
//# sourceMappingURL=setup-manager.js.map
|