@wildo-ai/wildo-cli 1.1.14 → 1.1.16
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/dist/src/commands/context/journey.command.d.ts.map +1 -1
- package/dist/src/commands/context/journey.command.js +12 -0
- package/dist/src/commands/context/journey.command.js.map +1 -1
- package/dist/src/commands/creation/drive.command.d.ts.map +1 -1
- package/dist/src/commands/creation/drive.command.js +2 -1
- package/dist/src/commands/creation/drive.command.js.map +1 -1
- package/dist/src/commands/generate/email-command.utils.d.ts +2 -0
- package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
- package/dist/src/commands/generate/email-command.utils.js +5 -0
- package/dist/src/commands/generate/email-command.utils.js.map +1 -1
- package/dist/src/commands/init.command.d.ts.map +1 -1
- package/dist/src/commands/init.command.js +7 -2
- package/dist/src/commands/init.command.js.map +1 -1
- package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
- package/dist/src/commands/local/deregister.command.js +4 -0
- package/dist/src/commands/local/deregister.command.js.map +1 -1
- package/dist/src/commands/local/dev.command.d.ts +50 -0
- package/dist/src/commands/local/dev.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev.command.js +144 -1
- package/dist/src/commands/local/dev.command.js.map +1 -1
- package/dist/src/commands/local/jobs-command.utils.d.ts +24 -0
- package/dist/src/commands/local/jobs-command.utils.d.ts.map +1 -0
- package/dist/src/commands/local/jobs-command.utils.js +44 -0
- package/dist/src/commands/local/jobs-command.utils.js.map +1 -0
- package/dist/src/commands/local/jobs-run.command.d.ts +7 -0
- package/dist/src/commands/local/jobs-run.command.d.ts.map +1 -0
- package/dist/src/commands/local/jobs-run.command.js +92 -0
- package/dist/src/commands/local/jobs-run.command.js.map +1 -0
- package/dist/src/commands/local/jobs.command.d.ts +7 -0
- package/dist/src/commands/local/jobs.command.d.ts.map +1 -0
- package/dist/src/commands/local/jobs.command.js +59 -0
- package/dist/src/commands/local/jobs.command.js.map +1 -0
- package/dist/src/commands/local/tunnel.command.d.ts +84 -0
- package/dist/src/commands/local/tunnel.command.d.ts.map +1 -0
- package/dist/src/commands/local/tunnel.command.js +274 -0
- package/dist/src/commands/local/tunnel.command.js.map +1 -0
- package/dist/src/commands/providers/grant-export.command.d.ts +16 -0
- package/dist/src/commands/providers/grant-export.command.d.ts.map +1 -0
- package/dist/src/commands/providers/grant-export.command.js +78 -0
- package/dist/src/commands/providers/grant-export.command.js.map +1 -0
- package/dist/src/commands/providers/grant-import.command.d.ts +15 -0
- package/dist/src/commands/providers/grant-import.command.d.ts.map +1 -0
- package/dist/src/commands/providers/grant-import.command.js +78 -0
- package/dist/src/commands/providers/grant-import.command.js.map +1 -0
- package/dist/src/kernel/command-runner.d.ts.map +1 -1
- package/dist/src/kernel/command-runner.js +4 -6
- package/dist/src/kernel/command-runner.js.map +1 -1
- package/dist/src/kernel/hooks.d.ts.map +1 -1
- package/dist/src/kernel/hooks.js +2 -1
- package/dist/src/kernel/hooks.js.map +1 -1
- package/dist/src/kernel/json-document-output.d.ts +7 -0
- package/dist/src/kernel/json-document-output.d.ts.map +1 -1
- package/dist/src/kernel/json-document-output.js +8 -0
- package/dist/src/kernel/json-document-output.js.map +1 -1
- package/dist/src/kernel/types.d.ts +8 -0
- package/dist/src/kernel/types.d.ts.map +1 -1
- package/dist/src/kernel/types.js.map +1 -1
- package/dist/src/services/application/app-bootstrap.service.d.ts +65 -7
- package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/app-bootstrap.service.js +94 -15
- package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
- package/dist/src/services/application/app-local-runtime-addresses.service.d.ts +1 -1
- package/dist/src/services/application/app-local-runtime-addresses.service.d.ts.map +1 -1
- package/dist/src/services/application/app-local-runtime-addresses.service.js.map +1 -1
- package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
- package/dist/src/services/application/app-runtime-targets.service.js +16 -2
- package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
- package/dist/src/services/application/application-dependency-alignment.service.d.ts +20 -0
- package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
- package/dist/src/services/application/application-dependency-alignment.service.js +32 -2
- package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
- package/dist/src/services/application/application-runtime-bootstrap.service.d.ts +13 -0
- package/dist/src/services/application/application-runtime-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/application-runtime-bootstrap.service.js +32 -0
- package/dist/src/services/application/application-runtime-bootstrap.service.js.map +1 -1
- package/dist/src/services/application/environment-provider-configurations.service.d.ts +7 -0
- package/dist/src/services/application/environment-provider-configurations.service.d.ts.map +1 -1
- package/dist/src/services/application/environment-provider-configurations.service.js +1 -1
- package/dist/src/services/application/environment-provider-configurations.service.js.map +1 -1
- package/dist/src/services/application/local-tunnel.service.d.ts +153 -0
- package/dist/src/services/application/local-tunnel.service.d.ts.map +1 -0
- package/dist/src/services/application/local-tunnel.service.js +295 -0
- package/dist/src/services/application/local-tunnel.service.js.map +1 -0
- package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
- package/dist/src/services/application/provider-runtime-sync.service.js +3 -0
- package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.d.ts +7 -0
- package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.js +2 -0
- package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
- package/dist/src/services/catalog/service-address-resolver.service.d.ts +7 -1
- package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
- package/dist/src/services/catalog/service-address-resolver.service.js +6 -3
- package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
- package/dist/src/services/companion/companion-client.service.d.ts +17 -0
- package/dist/src/services/companion/companion-client.service.d.ts.map +1 -1
- package/dist/src/services/companion/companion-client.service.js +21 -0
- package/dist/src/services/companion/companion-client.service.js.map +1 -1
- package/dist/src/services/companion/creation-drive.service.d.ts +18 -0
- package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
- package/dist/src/services/companion/creation-drive.service.js +70 -1
- package/dist/src/services/companion/creation-drive.service.js.map +1 -1
- package/dist/src/services/credentials/application-secrets.service.d.ts +6 -0
- package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
- package/dist/src/services/credentials/application-secrets.service.js +1 -1
- package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js +3 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
- package/dist/src/services/credentials/secrets-writer.service.d.ts +11 -2
- package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-writer.service.js +12 -3
- package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
- package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/ci-deploy-generator.service.js +3 -3
- package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +12 -3
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js +40 -22
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
- package/dist/src/services/deployment/framework-pod-network-membership.d.ts +6 -0
- package/dist/src/services/deployment/framework-pod-network-membership.d.ts.map +1 -1
- package/dist/src/services/deployment/framework-pod-network-membership.js +17 -3
- package/dist/src/services/deployment/framework-pod-network-membership.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +4 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +17 -7
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +7 -0
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +15 -9
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts +43 -0
- package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts.map +1 -0
- package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js +12 -0
- package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js.map +1 -0
- package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts +3 -1
- package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/off-cluster-backing-services.js.map +1 -1
- package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts +163 -0
- package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts.map +1 -0
- package/dist/src/services/deployment/local-dev-late-workspace-members.service.js +356 -0
- package/dist/src/services/deployment/local-dev-late-workspace-members.service.js.map +1 -0
- package/dist/src/services/environment/authored-infra-config.utils.d.ts +13 -3
- package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.js +24 -4
- package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
- package/dist/src/services/environment/container-host-gateway-listen-host.d.ts +6 -0
- package/dist/src/services/environment/container-host-gateway-listen-host.d.ts.map +1 -1
- package/dist/src/services/environment/container-host-gateway-listen-host.js +6 -0
- package/dist/src/services/environment/container-host-gateway-listen-host.js.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.d.ts +12 -0
- package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.js +37 -5
- package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts +2 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.js +47 -32
- package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.d.ts +7 -4
- package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.js +14 -18
- package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
- package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-setup.service.js +17 -6
- package/dist/src/services/environment/environment-setup.service.js.map +1 -1
- package/dist/src/services/environment/environment.service.d.ts +4 -3
- package/dist/src/services/environment/environment.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment.service.js +0 -1
- package/dist/src/services/environment/environment.service.js.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.d.ts +55 -15
- package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.js +115 -25
- package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
- package/dist/src/services/framework/package-install.service.d.ts +7 -0
- package/dist/src/services/framework/package-install.service.d.ts.map +1 -1
- package/dist/src/services/framework/package-install.service.js +8 -1
- package/dist/src/services/framework/package-install.service.js.map +1 -1
- package/dist/src/services/registry/application-provider-connection.service.d.ts +16 -1
- package/dist/src/services/registry/application-provider-connection.service.d.ts.map +1 -1
- package/dist/src/services/registry/application-provider-connection.service.js +23 -0
- package/dist/src/services/registry/application-provider-connection.service.js.map +1 -1
- package/dist/src/services/registry/provider-grant-transfer.service.d.ts +48 -0
- package/dist/src/services/registry/provider-grant-transfer.service.d.ts.map +1 -0
- package/dist/src/services/registry/provider-grant-transfer.service.js +144 -0
- package/dist/src/services/registry/provider-grant-transfer.service.js.map +1 -0
- package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
- package/dist/src/services/registry/provider-module-scaffold.service.js +10 -3
- package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
- package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
- package/dist/src/services/security/csp-sync.service.js +21 -2
- package/dist/src/services/security/csp-sync.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +19 -19
- package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +16 -7
- package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -0
- package/templates/saas/i18n/email/system/remote-agent-task-updated/labels.en.ts +11 -0
- package/templates/saas/i18n/email/system/remote-agent-task-updated/template.tsx +56 -0
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.ts +61 -0
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.ts +61 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/docusaurus.config.ts.hbs +5 -4
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/package.json.hbs +1 -1
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/scripts/substitute-api-origin.mjs +97 -32
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +7 -6
- package/templates/saas/skeleton/.wildo-saas/wildo-dev-companion/scripts/dev-supervised.sh +18 -4
- package/templates/saas/skeleton/frontend/nginx-config/default.conf.hbs +1 -1
- package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +4 -4
- package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +2 -0
- package/wildo-framework.info.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildo-ai/wildo-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.16",
|
|
4
4
|
"description": "Wildo.ai CLI — context-aware developer toolkit",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Wildo AI",
|
|
@@ -66,26 +66,25 @@
|
|
|
66
66
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
67
67
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
68
68
|
"@tanstack/react-table": "^8.21.3",
|
|
69
|
-
"@wildo-ai/application-creation-runtime": "1.1.
|
|
70
|
-
"@wildo-ai/assurance-cycle": "1.1.
|
|
71
|
-
"@wildo-ai/external-connectors-models": "^1.1.
|
|
72
|
-
"@wildo-ai/external-connectors-private": "1.1.
|
|
73
|
-
"@wildo-ai/framework-knowledge": "1.1.
|
|
74
|
-
"@wildo-ai/platform-config-lib": "1.1.
|
|
75
|
-
"@wildo-ai/platform-core-backend": "1.1.
|
|
76
|
-
"@wildo-ai/platform-core-shared": "1.1.
|
|
77
|
-
"@wildo-ai/platform-infra-providers": "1.1.
|
|
78
|
-
"@wildo-ai/platform-shared-lib": "1.1.
|
|
79
|
-
"@wildo-ai/presets-components-models": "1.1.
|
|
80
|
-
"@wildo-ai/saas-backend-lib": "1.1.
|
|
81
|
-
"@wildo-ai/saas-models": "1.1.
|
|
82
|
-
"@wildo-ai/saas-specifications": "1.1.
|
|
83
|
-
"@wildo-ai/saas-website": "^1.1.
|
|
84
|
-
"@wildo-ai/wildo-module-client": "1.1.
|
|
85
|
-
"@wildo-ai/zod-decorators": "1.1.
|
|
69
|
+
"@wildo-ai/application-creation-runtime": "1.1.16",
|
|
70
|
+
"@wildo-ai/assurance-cycle": "1.1.16",
|
|
71
|
+
"@wildo-ai/external-connectors-models": "^1.1.16",
|
|
72
|
+
"@wildo-ai/external-connectors-private": "1.1.16",
|
|
73
|
+
"@wildo-ai/framework-knowledge": "1.1.16",
|
|
74
|
+
"@wildo-ai/platform-config-lib": "1.1.16",
|
|
75
|
+
"@wildo-ai/platform-core-backend": "1.1.16",
|
|
76
|
+
"@wildo-ai/platform-core-shared": "1.1.16",
|
|
77
|
+
"@wildo-ai/platform-infra-providers": "1.1.16",
|
|
78
|
+
"@wildo-ai/platform-shared-lib": "1.1.16",
|
|
79
|
+
"@wildo-ai/presets-components-models": "1.1.16",
|
|
80
|
+
"@wildo-ai/saas-backend-lib": "1.1.16",
|
|
81
|
+
"@wildo-ai/saas-models": "1.1.16",
|
|
82
|
+
"@wildo-ai/saas-specifications": "1.1.16",
|
|
83
|
+
"@wildo-ai/saas-website": "^1.1.16",
|
|
84
|
+
"@wildo-ai/wildo-module-client": "1.1.16",
|
|
85
|
+
"@wildo-ai/zod-decorators": "1.1.16",
|
|
86
86
|
"@xyflow/react": "^12.9.3",
|
|
87
87
|
"ai": "7.0.142",
|
|
88
|
-
"amqplib": "^0.10.9",
|
|
89
88
|
"axios": "^1.20.0",
|
|
90
89
|
"bcrypt": "^6.0.0",
|
|
91
90
|
"big.js": "^6.2.2",
|
|
@@ -148,6 +147,7 @@
|
|
|
148
147
|
"@types/semver": "7.8.0",
|
|
149
148
|
"@types/yauzl": "^2.10.3",
|
|
150
149
|
"@types/yazl": "^3.3.1",
|
|
150
|
+
"@wildo-ai/external-connectors-public": "1.1.16",
|
|
151
151
|
"dotenv": "^17.3.1",
|
|
152
152
|
"rimraf": "^6.1.4",
|
|
153
153
|
"tsc-alias": "1.8.16",
|
|
@@ -843,11 +843,15 @@ services:
|
|
|
843
843
|
REDIS_DATABASE: ${REDIS_DATABASE:-}
|
|
844
844
|
REDIS_ADMIN_USER: ${REDIS_ADMIN_USER}
|
|
845
845
|
REDIS_ADMIN_PASSWORD: ${REDIS_ADMIN_PASSWORD}
|
|
846
|
+
# #2303 slice D: apps-manager reads the profile to know whether the platform runs a broker.
|
|
847
|
+
PLATFORM_ENVIRONMENT_SERVICE_PROFILE: ${PLATFORM_ENVIRONMENT_SERVICE_PROFILE:-}
|
|
848
|
+
{{#if runsMessageBroker}}
|
|
846
849
|
RABBITMQ_HOST: ${RABBITMQ_HOST}
|
|
847
850
|
RABBITMQ_PORT: ${RABBITMQ_PORT}
|
|
848
851
|
RABBITMQ_VHOST: ${RABBITMQ_VHOST:-}
|
|
849
852
|
RABBITMQ_ADMIN_USERNAME: ${RABBITMQ_ADMIN_USERNAME}
|
|
850
853
|
RABBITMQ_ADMIN_PASSWORD: ${RABBITMQ_ADMIN_PASSWORD}
|
|
854
|
+
{{/if}}
|
|
851
855
|
STORAGE_PROVIDER: ${STORAGE_PROVIDER}
|
|
852
856
|
STORAGE_ENDPOINT: ${STORAGE_ENDPOINT}
|
|
853
857
|
STORAGE_PORT: ${STORAGE_PORT}
|
|
@@ -1017,7 +1021,9 @@ services:
|
|
|
1017
1021
|
- wildo-platform-net
|
|
1018
1022
|
- wildo-data-mongo
|
|
1019
1023
|
- wildo-data-redis
|
|
1024
|
+
{{#if runsMessageBroker}}
|
|
1020
1025
|
- wildo-data-rabbit
|
|
1026
|
+
{{/if}}
|
|
1021
1027
|
- wildo-data-postgres
|
|
1022
1028
|
- wildo-data-objects
|
|
1023
1029
|
{{#if platformKeyVault}}
|
|
@@ -1047,12 +1053,15 @@ services:
|
|
|
1047
1053
|
REDIS_DATABASE: ${REDIS_DATABASE:-}
|
|
1048
1054
|
REDIS_ADMIN_USER: ${REDIS_ADMIN_USER}
|
|
1049
1055
|
REDIS_ADMIN_PASSWORD: ${REDIS_ADMIN_PASSWORD}
|
|
1056
|
+
PLATFORM_ENVIRONMENT_SERVICE_PROFILE: ${PLATFORM_ENVIRONMENT_SERVICE_PROFILE:-}
|
|
1057
|
+
{{#if runsMessageBroker}}
|
|
1050
1058
|
RABBITMQ_HOST: ${RABBITMQ_HOST}
|
|
1051
1059
|
RABBITMQ_PORT: ${RABBITMQ_PORT}
|
|
1052
1060
|
RABBITMQ_MANAGEMENT_PORT: ${RABBITMQ_MANAGEMENT_PORT}
|
|
1053
1061
|
RABBITMQ_VHOST: ${RABBITMQ_VHOST:-}
|
|
1054
1062
|
RABBITMQ_ADMIN_USERNAME: ${RABBITMQ_ADMIN_USERNAME}
|
|
1055
1063
|
RABBITMQ_ADMIN_PASSWORD: ${RABBITMQ_ADMIN_PASSWORD}
|
|
1064
|
+
{{/if}}
|
|
1056
1065
|
STORAGE_PROVIDER: ${STORAGE_PROVIDER}
|
|
1057
1066
|
STORAGE_ENDPOINT: ${STORAGE_ENDPOINT}
|
|
1058
1067
|
STORAGE_PORT: ${STORAGE_PORT}
|
|
@@ -1215,7 +1224,9 @@ services:
|
|
|
1215
1224
|
- platform-apps-manager-internal
|
|
1216
1225
|
wildo-data-mongo:
|
|
1217
1226
|
wildo-data-redis:
|
|
1227
|
+
{{#if runsMessageBroker}}
|
|
1218
1228
|
wildo-data-rabbit:
|
|
1229
|
+
{{/if}}
|
|
1219
1230
|
wildo-data-postgres:
|
|
1220
1231
|
wildo-data-objects:
|
|
1221
1232
|
wildo-data-telemetry:
|
|
@@ -1246,12 +1257,7 @@ services:
|
|
|
1246
1257
|
REDIS_HOST: ${REDIS_HOST}
|
|
1247
1258
|
REDIS_PORT: ${REDIS_PORT}
|
|
1248
1259
|
REDIS_DATABASE: ${REDIS_DATABASE:-}
|
|
1249
|
-
|
|
1250
|
-
RABBITMQ_PORT: ${RABBITMQ_PORT}
|
|
1251
|
-
RABBITMQ_MANAGEMENT_PORT: ${RABBITMQ_MANAGEMENT_PORT}
|
|
1252
|
-
RABBITMQ_VHOST: ${RABBITMQ_VHOST:-}
|
|
1253
|
-
RABBITMQ_ADMIN_USERNAME: ${RABBITMQ_ADMIN_USERNAME}
|
|
1254
|
-
RABBITMQ_ADMIN_PASSWORD: ${RABBITMQ_ADMIN_PASSWORD}
|
|
1260
|
+
# No broker settings (#2303 slice B): the scheduler delivers over HTTP and holds no broker connection, under any profile.
|
|
1255
1261
|
STORAGE_PROVIDER: ${STORAGE_PROVIDER}
|
|
1256
1262
|
STORAGE_ENDPOINT: ${STORAGE_ENDPOINT}
|
|
1257
1263
|
STORAGE_PORT: ${STORAGE_PORT}
|
|
@@ -1313,7 +1319,8 @@ services:
|
|
|
1313
1319
|
- platform-crontabs-batches-manager-internal
|
|
1314
1320
|
wildo-data-mongo:
|
|
1315
1321
|
wildo-data-redis:
|
|
1316
|
-
|
|
1322
|
+
# On a PostgreSQL platform the scheduler's repositories and delivery outbox live there (see the membership table).
|
|
1323
|
+
wildo-data-postgres:
|
|
1317
1324
|
wildo-data-objects:
|
|
1318
1325
|
wildo-data-telemetry:
|
|
1319
1326
|
wildo-host-access:
|
|
@@ -1660,10 +1667,12 @@ networks:
|
|
|
1660
1667
|
name: wildo-data-redis
|
|
1661
1668
|
driver: bridge
|
|
1662
1669
|
internal: true
|
|
1670
|
+
{{#if runsMessageBroker}}
|
|
1663
1671
|
wildo-data-rabbit:
|
|
1664
1672
|
name: wildo-data-rabbit
|
|
1665
1673
|
driver: bridge
|
|
1666
1674
|
internal: true
|
|
1675
|
+
{{/if}}
|
|
1667
1676
|
wildo-data-postgres:
|
|
1668
1677
|
name: wildo-data-postgres
|
|
1669
1678
|
driver: bridge
|
|
@@ -38,6 +38,13 @@ spec:
|
|
|
38
38
|
app.kubernetes.io/name: platform-crontabs-batches-manager
|
|
39
39
|
{{{podNetworkLabelsYaml}}}
|
|
40
40
|
spec:
|
|
41
|
+
{{#if hostGatewayAliasIp}}
|
|
42
|
+
# How this pod reaches the host on a LOCAL Kind environment whose cluster cannot resolve the name itself
|
|
43
|
+
# (Docker Engine for Linux, #3957): the bridge gateway the host-run backend also listens on (#3387).
|
|
44
|
+
hostAliases:
|
|
45
|
+
- ip: "{{hostGatewayAliasIp}}"
|
|
46
|
+
hostnames: ["{{hostGatewayHostname}}"]
|
|
47
|
+
{{/if}}
|
|
41
48
|
containers:
|
|
42
49
|
- name: crontabs-batches-manager
|
|
43
50
|
image: {{platformImageRef}}
|
|
@@ -60,6 +67,12 @@ spec:
|
|
|
60
67
|
# set only in dev mode, leaving production to V8's own sizing inside a limit it did not fit.
|
|
61
68
|
- name: NODE_OPTIONS
|
|
62
69
|
value: "--max-old-space-size={{heapCeilingMb}}"
|
|
70
|
+
{{#if hostGatewayHostname}}
|
|
71
|
+
# LOCAL Kind (#3957): the application backends run on the host and advertise a loopback delivery URL, which
|
|
72
|
+
# inside this pod names the pod. The dispatcher re-points it at this name (`toHostGatewayUrl`), as compose does.
|
|
73
|
+
- name: PLATFORM_HOST_GATEWAY_HOSTNAME
|
|
74
|
+
value: "{{hostGatewayHostname}}"
|
|
75
|
+
{{/if}}
|
|
63
76
|
envFrom:
|
|
64
77
|
- configMapRef:
|
|
65
78
|
name: platform-crontabs-batches-manager-config
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const labels = {
|
|
2
|
+
subject: '{agent} has news about a task — {appName}',
|
|
3
|
+
heading: 'News from {agent}',
|
|
4
|
+
body: '{agent}, an assistant run by another company, has news about a task one of your conversations handed to it. It may have finished, or it may need something from you. Open the conversation and your assistant will go through the update with you.',
|
|
5
|
+
previewText: '{heading}',
|
|
6
|
+
buttonOpenConversation: 'Open the conversation',
|
|
7
|
+
buttonOpen: 'Open {appName}',
|
|
8
|
+
footerMuted: 'This is an automated message from {appName}, sent because one of your conversations handed this task on.',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type TemplateLabels = typeof labels;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type EmailTemplateDefinition } from '@wildo-ai/saas-backend-lib';
|
|
3
|
+
import { interpolateEmailLabel } from '@wildo-ai/saas-backend-lib';
|
|
4
|
+
import type { TemplateLabels } from './labels.en';
|
|
5
|
+
import { EmailLayout, HeadingText, BodyText, PrimaryButton, Divider } from '~backend-api/engine/email/components'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Another company's agent reported news about a task one of the recipient's conversations handed to it (#4013). Sent
|
|
9
|
+
* with the in-app notice, so a person who is not connected hears of it too. Names the agent by the name the application
|
|
10
|
+
* declared for it, and links to the conversation. It never says what the news is and never carries the agent's own
|
|
11
|
+
* words: the conversation is where the person's assistant reads the update.
|
|
12
|
+
*/
|
|
13
|
+
const template: EmailTemplateDefinition<TemplateLabels> = {
|
|
14
|
+
subject: ({ context, labels }) => {
|
|
15
|
+
const appName = context.objectContext.primaryScopeContext.appName;
|
|
16
|
+
const { agentName } = context.additionalContext as { agentName: string };
|
|
17
|
+
return interpolateEmailLabel(labels.subject, { appName, agent: agentName });
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
body: ({ context, brand, labels }) => {
|
|
21
|
+
const appName = context.objectContext.primaryScopeContext.appName;
|
|
22
|
+
const { agentName, conversationUrl, appUrl } = context.additionalContext as { agentName: string; conversationUrl?: string; appUrl?: string };
|
|
23
|
+
const heading = interpolateEmailLabel(labels.heading, { agent: agentName });
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<EmailLayout
|
|
27
|
+
brand={brand}
|
|
28
|
+
appName={appName}
|
|
29
|
+
logoUrl={context.objectContext?.primaryScopeContext?.logoUrl}
|
|
30
|
+
previewText={interpolateEmailLabel(labels.previewText, { heading })}
|
|
31
|
+
>
|
|
32
|
+
<HeadingText brand={brand} level={2}>
|
|
33
|
+
{heading}
|
|
34
|
+
</HeadingText>
|
|
35
|
+
<BodyText brand={brand}>{interpolateEmailLabel(labels.body, { agent: agentName })}</BodyText>
|
|
36
|
+
{conversationUrl ? (
|
|
37
|
+
<PrimaryButton href={conversationUrl} brand={brand}>
|
|
38
|
+
{labels.buttonOpenConversation}
|
|
39
|
+
</PrimaryButton>
|
|
40
|
+
) : appUrl && (
|
|
41
|
+
<PrimaryButton href={appUrl} brand={brand}>
|
|
42
|
+
{interpolateEmailLabel(labels.buttonOpen, { appName })}
|
|
43
|
+
</PrimaryButton>
|
|
44
|
+
)}
|
|
45
|
+
<Divider brand={brand} />
|
|
46
|
+
<BodyText brand={brand} muted style={{ fontSize: '14px' }}>
|
|
47
|
+
{interpolateEmailLabel(labels.footerMuted, { appName })}
|
|
48
|
+
</BodyText>
|
|
49
|
+
</EmailLayout>
|
|
50
|
+
);
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
description: 'Tells a person that another company\'s agent has news about a task one of their conversations handed to it.',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default template;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* English (en) — application labels.
|
|
3
|
+
* Primary locale source-of-truth file generated from application context.
|
|
4
|
+
*/
|
|
5
|
+
export const labels = {
|
|
6
|
+
"components": {
|
|
7
|
+
"APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS": {
|
|
8
|
+
"agentToAgentDescription": "Tasks exchanged with other agents, newest first.",
|
|
9
|
+
"agentToAgentEmpty": "No tasks exchanged with other agents yet.",
|
|
10
|
+
"agentToAgentError": "Couldn't load agent-to-agent tasks. Please try again.",
|
|
11
|
+
"agentToAgentHeading": "Agent-to-Agent Tasks",
|
|
12
|
+
"applicationOwnClient": "Application client",
|
|
13
|
+
"applicationPageDescription": "Runs across all organizations, logged for audit.",
|
|
14
|
+
"applicationPageTitle": "Agent Activity Across Organizations",
|
|
15
|
+
"backToRuns": "Back to runs",
|
|
16
|
+
"columnActions": "Actions",
|
|
17
|
+
"columnCase": "Case",
|
|
18
|
+
"columnCounterpart": "Other party",
|
|
19
|
+
"columnDirection": "Direction",
|
|
20
|
+
"columnFinished": "Finished",
|
|
21
|
+
"columnKind": "Type",
|
|
22
|
+
"columnOrganization": "Organization",
|
|
23
|
+
"columnStarted": "Started",
|
|
24
|
+
"columnStatus": "Status",
|
|
25
|
+
"columnSystem": "Workflow or team",
|
|
26
|
+
"columnTaskEnded": "Ended",
|
|
27
|
+
"columnTaskStarted": "Started",
|
|
28
|
+
"columnTaskState": "Status",
|
|
29
|
+
"decisionEnded": "{outcome} on {at}",
|
|
30
|
+
"decisionsHeading": "Decisions",
|
|
31
|
+
"direction_delegated": "Sent",
|
|
32
|
+
"direction_received": "Received",
|
|
33
|
+
"empty": "No runs yet.",
|
|
34
|
+
"errorAccessGrantRequired": "Viewing runs across organizations needs an approved access grant. Request one under Access grants.",
|
|
35
|
+
"errorGeneric": "Couldn't load runs. Please try again.",
|
|
36
|
+
"errorRun": "Couldn't load this run. It may no longer exist.",
|
|
37
|
+
"flowFailureLabel": "Failure reason",
|
|
38
|
+
"flowStepsHeading": "Workflow Steps",
|
|
39
|
+
"flowStepsUntimed": "{count, plural, one {# earlier step has} other {# earlier steps have}} no recorded time.",
|
|
40
|
+
"kind_actor_system": "Agent team",
|
|
41
|
+
"kind_flow": "Workflow",
|
|
42
|
+
"kind_undeclared": "No longer available",
|
|
43
|
+
"loadMore": "Load more",
|
|
44
|
+
"loadMoreTasks": "Load more",
|
|
45
|
+
"loading": "Loading…",
|
|
46
|
+
"noOrganization": "Select an organization to see its runs.",
|
|
47
|
+
"noTasks": "No tasks yet.",
|
|
48
|
+
"notFinished": "Not finished",
|
|
49
|
+
"openRun": "Open",
|
|
50
|
+
"pageDescription": "Workflow and agent team runs, newest first.",
|
|
51
|
+
"pageTitle": "Agent Activity",
|
|
52
|
+
"receivedByAgent": "Received by {agent}",
|
|
53
|
+
"receivedByDefaultAgent": "Received by main agent",
|
|
54
|
+
"stateNotReported": "Not reported",
|
|
55
|
+
"stateReportedAt": "Reported {at}",
|
|
56
|
+
"taskNotEnded": "Not ended",
|
|
57
|
+
"tasksHeading": "Tasks",
|
|
58
|
+
"unknownClient": "Unknown client"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} as const;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* French (fr) — application labels.
|
|
3
|
+
* Translated from the primary locale; keep semantic keys and placeholders faithful to the source.
|
|
4
|
+
*/
|
|
5
|
+
export const labels = {
|
|
6
|
+
"components": {
|
|
7
|
+
"APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS": {
|
|
8
|
+
"agentToAgentDescription": "Tâches échangées avec d’autres agents, des plus récentes aux plus anciennes.",
|
|
9
|
+
"agentToAgentEmpty": "Aucune tâche échangée avec d’autres agents pour le moment.",
|
|
10
|
+
"agentToAgentError": "Impossible de charger les tâches entre agents. Veuillez réessayer.",
|
|
11
|
+
"agentToAgentHeading": "Tâches entre agents",
|
|
12
|
+
"applicationOwnClient": "Client de l’application",
|
|
13
|
+
"applicationPageDescription": "Exécutions de toutes les organisations, consignées pour l’audit.",
|
|
14
|
+
"applicationPageTitle": "Activité des agents dans toutes les organisations",
|
|
15
|
+
"backToRuns": "Retour aux exécutions",
|
|
16
|
+
"columnActions": "Actions",
|
|
17
|
+
"columnCase": "Dossier",
|
|
18
|
+
"columnCounterpart": "Interlocuteur",
|
|
19
|
+
"columnDirection": "Sens",
|
|
20
|
+
"columnFinished": "Fin",
|
|
21
|
+
"columnKind": "Type",
|
|
22
|
+
"columnOrganization": "Organisation",
|
|
23
|
+
"columnStarted": "Début",
|
|
24
|
+
"columnStatus": "Statut",
|
|
25
|
+
"columnSystem": "Workflow ou équipe",
|
|
26
|
+
"columnTaskEnded": "Fin",
|
|
27
|
+
"columnTaskStarted": "Début",
|
|
28
|
+
"columnTaskState": "Statut",
|
|
29
|
+
"decisionEnded": "{outcome} le {at}",
|
|
30
|
+
"decisionsHeading": "Décisions",
|
|
31
|
+
"direction_delegated": "Envoyée",
|
|
32
|
+
"direction_received": "Reçue",
|
|
33
|
+
"empty": "Aucune exécution pour le moment.",
|
|
34
|
+
"errorAccessGrantRequired": "La consultation des exécutions de toutes les organisations nécessite une autorisation d’accès approuvée. Demandez-en une dans Autorisations d’accès.",
|
|
35
|
+
"errorGeneric": "Impossible de charger les exécutions. Veuillez réessayer.",
|
|
36
|
+
"errorRun": "Impossible de charger cette exécution. Elle n’existe peut-être plus.",
|
|
37
|
+
"flowFailureLabel": "Motif de l’échec",
|
|
38
|
+
"flowStepsHeading": "Étapes du workflow",
|
|
39
|
+
"flowStepsUntimed": "{count, plural, one {# étape antérieure n’a} many {# étapes antérieures n’ont} other {# étapes antérieures n’ont}} aucune heure enregistrée.",
|
|
40
|
+
"kind_actor_system": "Équipe d’agents",
|
|
41
|
+
"kind_flow": "Workflow",
|
|
42
|
+
"kind_undeclared": "Plus disponible",
|
|
43
|
+
"loadMore": "Charger plus",
|
|
44
|
+
"loadMoreTasks": "Charger plus",
|
|
45
|
+
"loading": "Chargement…",
|
|
46
|
+
"noOrganization": "Sélectionnez une organisation pour voir ses exécutions.",
|
|
47
|
+
"noTasks": "Aucune tâche pour le moment.",
|
|
48
|
+
"notFinished": "Non terminée",
|
|
49
|
+
"openRun": "Ouvrir",
|
|
50
|
+
"pageDescription": "Exécutions des workflows et des équipes d’agents, des plus récentes aux plus anciennes.",
|
|
51
|
+
"pageTitle": "Activité des agents",
|
|
52
|
+
"receivedByAgent": "Reçue par {agent}",
|
|
53
|
+
"receivedByDefaultAgent": "Reçue par l’agent principal",
|
|
54
|
+
"stateNotReported": "Non communiqué",
|
|
55
|
+
"stateReportedAt": "Communiqué le {at}",
|
|
56
|
+
"taskNotEnded": "Non terminée",
|
|
57
|
+
"tasksHeading": "Tâches",
|
|
58
|
+
"unknownClient": "Client inconnu"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} as const;
|
package/templates/saas/scenarios/add-technical-doc/files/technical-doc/docusaurus.config.ts.hbs
CHANGED
|
@@ -268,10 +268,11 @@ const config: Config = {
|
|
|
268
268
|
// URL-shaped folder label or duplicating that overview as a child.
|
|
269
269
|
// API-reference routes remain page-owned seams outside this generated sidebar.
|
|
270
270
|
sidebarPath: documentationContent.consumerDocumentationSidebarPath,
|
|
271
|
-
// The generated pages carry the API-origin token,
|
|
272
|
-
//
|
|
273
|
-
//
|
|
274
|
-
//
|
|
271
|
+
// The generated pages carry the API-origin token, and this resolves it while Docusaurus compiles
|
|
272
|
+
// them, under `docusaurus start` and `docusaurus build` alike, so a page shows this site's API
|
|
273
|
+
// origin without the committed tree ever being rewritten (#1203). A build never rewrites the
|
|
274
|
+
// sources (#4017): what Docusaurus copies rather than compiles is resolved in `build/` by
|
|
275
|
+
// `substitute:api-origin`, which runs after it.
|
|
275
276
|
beforeDefaultRemarkPlugins: [createDocsApiOriginRemarkPlugin(process.env.WILDO_DOCS_API_BASE_URL)],
|
|
276
277
|
},
|
|
277
278
|
],
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "node scripts/wait-for-publication.mjs --port {{docsPort}} && pnpm run start",
|
|
8
8
|
"start": "pnpm exec docusaurus start --port {{docsPort}} --host 0.0.0.0",
|
|
9
|
-
"build": "pnpm run substitute:api-origin
|
|
9
|
+
"build": "pnpm exec docusaurus build && pnpm run substitute:api-origin",
|
|
10
10
|
"serve": "pnpm exec docusaurus serve --port {{docsPort}} --host 0.0.0.0",
|
|
11
11
|
"clean": "pnpm exec docusaurus clear",
|
|
12
12
|
"swizzle": "pnpm exec docusaurus swizzle",
|
|
@@ -1,64 +1,129 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Put THIS
|
|
3
|
+
* Put THIS build's API origin into the BUILT documentation site, after Docusaurus has written it (#1203, #4017).
|
|
4
4
|
*
|
|
5
5
|
* ## Why this step exists
|
|
6
6
|
*
|
|
7
7
|
* `technical-doc/src/generated/**` is a COMMITTED artifact, so whatever origin it was generated
|
|
8
8
|
* against travels into every later build. A staging image shipped 42 occurrences of
|
|
9
9
|
* `http://localhost:4241` — including the SCIM base URL an administrator pastes into their identity
|
|
10
|
-
* provider, and the `servers` of the published API description.
|
|
11
|
-
*
|
|
10
|
+
* provider, and the `servers` of the published API description. Generation now writes a TOKEN where
|
|
11
|
+
* the application's primary origin belongs, which keeps the committed artifact environment-independent,
|
|
12
|
+
* and a build resolves it from `WILDO_DOCS_API_BASE_URL`, the docker build argument CI supplies for
|
|
13
|
+
* `AppFrontendType.TECH_DOC`.
|
|
12
14
|
*
|
|
13
|
-
*
|
|
14
|
-
* committed artifact environment-independent. This resolves it from `WILDO_DOCS_API_BASE_URL`, the
|
|
15
|
-
* docker build argument CI already supplies for `AppFrontendType.TECH_DOC`.
|
|
15
|
+
* ## Why it rewrites the OUTPUT and never the sources (#4017)
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* This step used to run BEFORE `docusaurus build` and rewrite `src/generated/**` in place. That made
|
|
18
|
+
* every build a write to committed files: `check:technical-doc-build`, a VERIFICATION run at the end
|
|
19
|
+
* of an application build, left the API reference and 14 pages modified, and the creation run read
|
|
20
|
+
* the change as a hand edit. A verification must leave the tree as it found it, so the sources are
|
|
21
|
+
* now only ever READ:
|
|
20
22
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
+
* - the pages are resolved while Docusaurus compiles them — the consumer pages by the remark plugin
|
|
24
|
+
* in `docusaurus.config.ts`, the API-reference pages by `src/plugins/api-reference-pages.ts` — both
|
|
25
|
+
* from the same `WILDO_DOCS_API_BASE_URL`;
|
|
26
|
+
* - what Docusaurus COPIES rather than compiles — the published OpenAPI documents, served as static
|
|
27
|
+
* files with no runtime to read the origin from — reaches `build/` still carrying the token, and
|
|
28
|
+
* this step resolves it there.
|
|
29
|
+
*
|
|
30
|
+
* It then refuses to leave a single token anywhere in the output, so the published site carries the
|
|
31
|
+
* real origin (or, with none supplied, the visible substitute-your-own stand-in) and never the token.
|
|
32
|
+
*
|
|
33
|
+
* Usage: `node scripts/substitute-api-origin.mjs [<output directory>]` — the directory defaults to
|
|
34
|
+
* `build`, Docusaurus's own default. Inside the site only `build/` (gitignored) or a directory below it is
|
|
35
|
+
* accepted; anywhere else, any directory that does not contain the site — the same places
|
|
36
|
+
* `docusaurus build --out-dir` may write to without touching a committed file.
|
|
37
|
+
*
|
|
38
|
+
* Idempotent: an output with no token is left byte-identical, so running it twice changes nothing.
|
|
23
39
|
*/
|
|
24
|
-
import { readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
25
|
-
import { join,
|
|
40
|
+
import { existsSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
41
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
26
42
|
import { fileURLToPath } from 'node:url';
|
|
27
|
-
import {
|
|
43
|
+
import { DOCS_API_ORIGIN_TOKEN, normalizeDocsApiOrigin } from '@wildo-ai/saas-technical-doc/openapi-reference-model';
|
|
44
|
+
|
|
45
|
+
const SITE_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
46
|
+
|
|
47
|
+
// The same `.env` `docusaurus.config.ts` loads, for the same reason: `wildo config sync` writes the API
|
|
48
|
+
// origin there and Node does not read it unasked. Without it a local build would resolve its pages to the
|
|
49
|
+
// `.env` origin (the config loads it) and its OpenAPI documents to the stand-in. A variable already in the
|
|
50
|
+
// environment wins, so an image build's argument is never overridden. Non-fatal: an image build has no
|
|
51
|
+
// `.env`, and a portal built on its own may have none.
|
|
52
|
+
try {
|
|
53
|
+
process.loadEnvFile(join(SITE_ROOT, '.env'));
|
|
54
|
+
} catch {
|
|
55
|
+
// No `.env` beside this site: the environment alone decides.
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const DEFAULT_OUTPUT_ROOT = join(SITE_ROOT, 'build');
|
|
59
|
+
const OUTPUT_ROOT = resolve(SITE_ROOT, process.argv[2] ?? 'build');
|
|
60
|
+
|
|
61
|
+
/** Whether `path` is `root` itself or lies below it. */
|
|
62
|
+
function isWithin(path, root) {
|
|
63
|
+
const fromRoot = relative(root, path);
|
|
64
|
+
return fromRoot === '' || (fromRoot !== '..' && !fromRoot.startsWith(`..${sep}`) && !isAbsolute(fromRoot));
|
|
65
|
+
}
|
|
28
66
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
67
|
+
// The whole point of this step is that it never writes a committed file. Every directory of the site except
|
|
68
|
+
// `build/` holds committed files (`src/`, `static/`, `i18n/`, `scripts/`), so inside the site only `build/`
|
|
69
|
+
// is accepted, and a directory that contains the site is refused wherever it is.
|
|
70
|
+
if (isWithin(SITE_ROOT, OUTPUT_ROOT) || (isWithin(OUTPUT_ROOT, SITE_ROOT) && !isWithin(OUTPUT_ROOT, DEFAULT_OUTPUT_ROOT))) {
|
|
71
|
+
console.error(`[docs-api-origin] refusing to rewrite ${OUTPUT_ROOT}: inside the site only ${DEFAULT_OUTPUT_ROOT} is a build output, and the output directory must not contain the site.`);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
if (!existsSync(OUTPUT_ROOT) || !statSync(OUTPUT_ROOT).isDirectory()) {
|
|
75
|
+
console.error(`[docs-api-origin] ${OUTPUT_ROOT} does not exist: run \`docusaurus build\` first; this step resolves the origin in its output.`);
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
32
78
|
|
|
33
79
|
function* walk(directory) {
|
|
34
|
-
for (const entry of readdirSync(directory)) {
|
|
35
|
-
const path = join(directory, entry);
|
|
36
|
-
if (
|
|
37
|
-
else if (
|
|
80
|
+
for (const entry of readdirSync(directory, { withFileTypes: true })) {
|
|
81
|
+
const path = join(directory, entry.name);
|
|
82
|
+
if (entry.isDirectory()) yield* walk(path);
|
|
83
|
+
else if (entry.isFile()) yield path;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Replace every occurrence of `token` in `bytes`, at the BYTE level. Every file of the output is read,
|
|
89
|
+
* whatever its extension, so a token Docusaurus carried into a bundle or an asset is caught as well as
|
|
90
|
+
* one in a copied document; working on bytes leaves every other byte of a file exactly as it was.
|
|
91
|
+
*/
|
|
92
|
+
function replaceBytes(bytes, token, replacement) {
|
|
93
|
+
const parts = [];
|
|
94
|
+
let from = 0;
|
|
95
|
+
for (let at = bytes.indexOf(token, from); at !== -1; at = bytes.indexOf(token, from)) {
|
|
96
|
+
parts.push(bytes.subarray(from, at), replacement);
|
|
97
|
+
from = at + token.length;
|
|
38
98
|
}
|
|
99
|
+
parts.push(bytes.subarray(from));
|
|
100
|
+
return Buffer.concat(parts);
|
|
39
101
|
}
|
|
40
102
|
|
|
41
|
-
const
|
|
103
|
+
const apiBaseUrl = process.env.WILDO_DOCS_API_BASE_URL;
|
|
104
|
+
const origin = normalizeDocsApiOrigin(apiBaseUrl);
|
|
105
|
+
const token = Buffer.from(DOCS_API_ORIGIN_TOKEN, 'utf8');
|
|
106
|
+
const replacement = Buffer.from(origin, 'utf8');
|
|
42
107
|
let changed = 0;
|
|
43
|
-
|
|
108
|
+
const remaining = [];
|
|
44
109
|
|
|
45
|
-
for (const path of walk(
|
|
46
|
-
const before = readFileSync(path
|
|
47
|
-
if (
|
|
48
|
-
const after =
|
|
110
|
+
for (const path of walk(OUTPUT_ROOT)) {
|
|
111
|
+
const before = readFileSync(path);
|
|
112
|
+
if (before.indexOf(token) === -1) continue;
|
|
113
|
+
const after = replaceBytes(before, token, replacement);
|
|
49
114
|
writeFileSync(path, after);
|
|
50
115
|
changed += 1;
|
|
51
|
-
if (
|
|
116
|
+
if (after.indexOf(token) !== -1) remaining.push(relative(SITE_ROOT, path));
|
|
52
117
|
}
|
|
53
118
|
|
|
54
|
-
console.log(`[docs-api-origin] ${changed} file(s) → ${origin}`);
|
|
55
|
-
if (!
|
|
119
|
+
console.log(`[docs-api-origin] ${changed} file(s) in ${relative(SITE_ROOT, OUTPUT_ROOT) || '.'} → ${origin}`);
|
|
120
|
+
if (!apiBaseUrl || apiBaseUrl.trim().length === 0) {
|
|
56
121
|
// Not fatal: a local preview has no environment to name, and the stand-in is the same one an
|
|
57
122
|
// application publishing no base URL already gets. A DEPLOY lane that reaches here without the
|
|
58
123
|
// argument would publish that stand-in, which is visibly a placeholder rather than a wrong origin.
|
|
59
124
|
console.warn('[docs-api-origin] WILDO_DOCS_API_BASE_URL is unset — published pages will show the substitute-your-own stand-in.');
|
|
60
125
|
}
|
|
61
|
-
if (remaining > 0) {
|
|
62
|
-
console.error(`[docs-api-origin] ${remaining} file(s) still carry the token after substitution
|
|
126
|
+
if (remaining.length > 0) {
|
|
127
|
+
console.error(`[docs-api-origin] ${remaining.length} file(s) still carry the token after substitution: ${remaining.join(', ')}`);
|
|
63
128
|
process.exit(1);
|
|
64
129
|
}
|
|
@@ -30,12 +30,13 @@ import {
|
|
|
30
30
|
* they opened rather than the whole API. A document that fails the model's validation fails the build
|
|
31
31
|
* here, where it used to fail in the reader's browser.
|
|
32
32
|
*
|
|
33
|
-
* The published documents carry the API-origin token as their primary server (#1203).
|
|
34
|
-
* resolves it
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
33
|
+
* The published documents carry the API-origin token as their primary server (#1203). This plugin
|
|
34
|
+
* resolves it as it reads each document, under `docusaurus start` and `docusaurus build` alike, from
|
|
35
|
+
* `WILDO_DOCS_API_BASE_URL` — the image's build argument, or locally the origin the site's `.env` names.
|
|
36
|
+
* The reference pages and their "Try it" requests then address that API rather than a token. The files on
|
|
37
|
+
* disk are never rewritten, so the committed tree stays environment-independent and a build leaves it as
|
|
38
|
+
* it found it (#4017); the copies of the documents Docusaurus publishes as static files are resolved in
|
|
39
|
+
* `build/` by `substitute:api-origin`, after the build.
|
|
39
40
|
*/
|
|
40
41
|
|
|
41
42
|
interface ApiReferenceSectionSource {
|
|
@@ -76,10 +76,24 @@ handle_signal() {
|
|
|
76
76
|
trap cleanup EXIT
|
|
77
77
|
trap handle_signal INT TERM HUP
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
# On an application's FIRST start the drop holds no dist yet: the dev loop delivers it (`sync-engine.sh`
|
|
80
|
+
# `deliver_companion_drop`) only once the framework's initial compile is ready, while this launcher is started
|
|
81
|
+
# beside it. Exiting here left the companion down for the whole session, since nothing restarts a launcher that
|
|
82
|
+
# exited (finalization run 44032755854: Wonder Ledger's dist arrived about two minutes after this line had given
|
|
83
|
+
# up). So the launcher waits for the delivery, and gives up only past a ceiling no initial compile reaches.
|
|
84
|
+
ENTRY_WAIT_CEILING_SECONDS=1800
|
|
85
|
+
entry_waited_seconds=0
|
|
86
|
+
while [ ! -f "$ENTRY_FILE" ]; do
|
|
87
|
+
if [ "$entry_waited_seconds" -ge "$ENTRY_WAIT_CEILING_SECONDS" ]; then
|
|
88
|
+
echo "[dev-supervised] Companion dist entry still missing at $ENTRY_FILE after ${ENTRY_WAIT_CEILING_SECONDS}s — run the companion delivery (dev-companion-deliver.mjs) first." >&2
|
|
89
|
+
exit 1
|
|
90
|
+
fi
|
|
91
|
+
if [ $((entry_waited_seconds % 60)) -eq 0 ]; then
|
|
92
|
+
echo "[dev-supervised] Waiting for the companion delivery to write $ENTRY_FILE (${entry_waited_seconds}s so far)."
|
|
93
|
+
fi
|
|
94
|
+
sleep 5
|
|
95
|
+
entry_waited_seconds=$((entry_waited_seconds + 5))
|
|
96
|
+
done
|
|
83
97
|
|
|
84
98
|
# Reclaim any prior (possibly orphaned) generation for THIS package before
|
|
85
99
|
# starting a new one — keyed on this package's unique signal-file + entry
|
|
@@ -6,7 +6,7 @@ server {
|
|
|
6
6
|
index index.html;
|
|
7
7
|
|
|
8
8
|
# >>> wildo csp begin
|
|
9
|
-
add_header Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob:; connect-src 'self' http://localhost:{{backendPort}} ws://localhost:{{backendPort}}; font-src 'self' data: https://fonts.gstatic.com; frame-ancestors '
|
|
9
|
+
add_header Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob:; connect-src 'self' http://localhost:{{backendPort}} ws://localhost:{{backendPort}}; font-src 'self' data: https://fonts.gstatic.com; frame-ancestors 'self'; object-src 'none'; form-action 'self'; base-uri 'self'" always;
|
|
10
10
|
# <<< wildo csp end
|
|
11
11
|
|
|
12
12
|
location / {
|