@endora-commerce/cli 0.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +37 -0
- package/dist/bin/endora.d.ts +28 -0
- package/dist/bin/endora.d.ts.map +1 -0
- package/dist/bin/endora.js +926 -0
- package/dist/bin/endora.js.map +1 -0
- package/dist/check/estate.d.ts +189 -0
- package/dist/check/estate.d.ts.map +1 -0
- package/dist/check/estate.js +1037 -0
- package/dist/check/estate.js.map +1 -0
- package/dist/check/hosts.d.ts +25 -0
- package/dist/check/hosts.d.ts.map +1 -0
- package/dist/check/hosts.js +1347 -0
- package/dist/check/hosts.js.map +1 -0
- package/dist/check/index.d.ts +60 -0
- package/dist/check/index.d.ts.map +1 -0
- package/dist/check/index.js +111 -0
- package/dist/check/index.js.map +1 -0
- package/dist/check/layout.d.ts +136 -0
- package/dist/check/layout.d.ts.map +1 -0
- package/dist/check/layout.js +262 -0
- package/dist/check/layout.js.map +1 -0
- package/dist/check/ledger.d.ts +98 -0
- package/dist/check/ledger.d.ts.map +1 -0
- package/dist/check/ledger.js +173 -0
- package/dist/check/ledger.js.map +1 -0
- package/dist/check/peer-owners.d.ts +116 -0
- package/dist/check/peer-owners.d.ts.map +1 -0
- package/dist/check/peer-owners.js +225 -0
- package/dist/check/peer-owners.js.map +1 -0
- package/dist/check/report.d.ts +33 -0
- package/dist/check/report.d.ts.map +1 -0
- package/dist/check/report.js +107 -0
- package/dist/check/report.js.map +1 -0
- package/dist/check/run.d.ts +147 -0
- package/dist/check/run.d.ts.map +1 -0
- package/dist/check/run.js +111 -0
- package/dist/check/run.js.map +1 -0
- package/dist/checks.d.ts +17 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +17 -0
- package/dist/checks.js.map +1 -0
- package/dist/dev/index.d.ts +83 -0
- package/dist/dev/index.d.ts.map +1 -0
- package/dist/dev/index.js +298 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/generate/divergence.d.ts +38 -0
- package/dist/generate/divergence.d.ts.map +1 -0
- package/dist/generate/divergence.js +237 -0
- package/dist/generate/divergence.js.map +1 -0
- package/dist/generate/index.d.ts +90 -0
- package/dist/generate/index.d.ts.map +1 -0
- package/dist/generate/index.js +369 -0
- package/dist/generate/index.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/inputs/declaration.d.ts +18 -0
- package/dist/inputs/declaration.d.ts.map +1 -0
- package/dist/inputs/declaration.js +64 -0
- package/dist/inputs/declaration.js.map +1 -0
- package/dist/inputs/env-file.d.ts +73 -0
- package/dist/inputs/env-file.d.ts.map +1 -0
- package/dist/inputs/env-file.js +134 -0
- package/dist/inputs/env-file.js.map +1 -0
- package/dist/inputs/prompt.d.ts +21 -0
- package/dist/inputs/prompt.d.ts.map +1 -0
- package/dist/inputs/prompt.js +59 -0
- package/dist/inputs/prompt.js.map +1 -0
- package/dist/inputs/resolve.d.ts +163 -0
- package/dist/inputs/resolve.d.ts.map +1 -0
- package/dist/inputs/resolve.js +290 -0
- package/dist/inputs/resolve.js.map +1 -0
- package/dist/install/host.d.ts +27 -0
- package/dist/install/host.d.ts.map +1 -0
- package/dist/install/host.js +90 -0
- package/dist/install/host.js.map +1 -0
- package/dist/install/index.d.ts +173 -0
- package/dist/install/index.d.ts.map +1 -0
- package/dist/install/index.js +793 -0
- package/dist/install/index.js.map +1 -0
- package/dist/install/wizard.d.ts +144 -0
- package/dist/install/wizard.d.ts.map +1 -0
- package/dist/install/wizard.js +362 -0
- package/dist/install/wizard.js.map +1 -0
- package/dist/lib/admin-artefacts.d.ts +70 -0
- package/dist/lib/admin-artefacts.d.ts.map +1 -0
- package/dist/lib/admin-artefacts.js +354 -0
- package/dist/lib/admin-artefacts.js.map +1 -0
- package/dist/lib/admin-surfaces.d.ts +298 -0
- package/dist/lib/admin-surfaces.d.ts.map +1 -0
- package/dist/lib/admin-surfaces.js +669 -0
- package/dist/lib/admin-surfaces.js.map +1 -0
- package/dist/lib/delegated-composer.d.ts +85 -0
- package/dist/lib/delegated-composer.d.ts.map +1 -0
- package/dist/lib/delegated-composer.js +241 -0
- package/dist/lib/delegated-composer.js.map +1 -0
- package/dist/lib/divergence-artefacts.d.ts +305 -0
- package/dist/lib/divergence-artefacts.d.ts.map +1 -0
- package/dist/lib/divergence-artefacts.js +828 -0
- package/dist/lib/divergence-artefacts.js.map +1 -0
- package/dist/lib/divergence.d.ts +337 -0
- package/dist/lib/divergence.d.ts.map +1 -0
- package/dist/lib/divergence.js +1005 -0
- package/dist/lib/divergence.js.map +1 -0
- package/dist/lib/docs-artefacts.d.ts +395 -0
- package/dist/lib/docs-artefacts.d.ts.map +1 -0
- package/dist/lib/docs-artefacts.js +781 -0
- package/dist/lib/docs-artefacts.js.map +1 -0
- package/dist/lib/emitted-exports.d.ts +21 -0
- package/dist/lib/emitted-exports.d.ts.map +1 -0
- package/dist/lib/emitted-exports.js +96 -0
- package/dist/lib/emitted-exports.js.map +1 -0
- package/dist/lib/emitted-freshness.d.ts +112 -0
- package/dist/lib/emitted-freshness.d.ts.map +1 -0
- package/dist/lib/emitted-freshness.js +288 -0
- package/dist/lib/emitted-freshness.js.map +1 -0
- package/dist/lib/entity-index-artefact.d.ts +95 -0
- package/dist/lib/entity-index-artefact.d.ts.map +1 -0
- package/dist/lib/entity-index-artefact.js +210 -0
- package/dist/lib/entity-index-artefact.js.map +1 -0
- package/dist/lib/instance-build-inputs.d.ts +108 -0
- package/dist/lib/instance-build-inputs.d.ts.map +1 -0
- package/dist/lib/instance-build-inputs.js +165 -0
- package/dist/lib/instance-build-inputs.js.map +1 -0
- package/dist/lib/module-docs.d.ts +473 -0
- package/dist/lib/module-docs.d.ts.map +1 -0
- package/dist/lib/module-docs.js +711 -0
- package/dist/lib/module-docs.js.map +1 -0
- package/dist/lib/module-package-subpaths.d.ts +56 -0
- package/dist/lib/module-package-subpaths.d.ts.map +1 -0
- package/dist/lib/module-package-subpaths.js +223 -0
- package/dist/lib/module-package-subpaths.js.map +1 -0
- package/dist/lib/module-packages.d.ts +200 -0
- package/dist/lib/module-packages.d.ts.map +1 -0
- package/dist/lib/module-packages.js +580 -0
- package/dist/lib/module-packages.js.map +1 -0
- package/dist/lib/module-population.d.ts +129 -0
- package/dist/lib/module-population.d.ts.map +1 -0
- package/dist/lib/module-population.js +172 -0
- package/dist/lib/module-population.js.map +1 -0
- package/dist/lib/module-roots.d.ts +337 -0
- package/dist/lib/module-roots.d.ts.map +1 -0
- package/dist/lib/module-roots.js +586 -0
- package/dist/lib/module-roots.js.map +1 -0
- package/dist/lib/nested-checkouts.d.ts +33 -0
- package/dist/lib/nested-checkouts.d.ts.map +1 -0
- package/dist/lib/nested-checkouts.js +160 -0
- package/dist/lib/nested-checkouts.js.map +1 -0
- package/dist/lib/platform-root.d.ts +43 -0
- package/dist/lib/platform-root.d.ts.map +1 -0
- package/dist/lib/platform-root.js +134 -0
- package/dist/lib/platform-root.js.map +1 -0
- package/dist/lib/platform-surface.d.ts +235 -0
- package/dist/lib/platform-surface.d.ts.map +1 -0
- package/dist/lib/platform-surface.js +393 -0
- package/dist/lib/platform-surface.js.map +1 -0
- package/dist/lib/port-registrations.d.ts +223 -0
- package/dist/lib/port-registrations.d.ts.map +1 -0
- package/dist/lib/port-registrations.js +532 -0
- package/dist/lib/port-registrations.js.map +1 -0
- package/dist/lib/read-size.d.ts +154 -0
- package/dist/lib/read-size.d.ts.map +1 -0
- package/dist/lib/read-size.js +182 -0
- package/dist/lib/read-size.js.map +1 -0
- package/dist/lib/registration-owners.d.ts +79 -0
- package/dist/lib/registration-owners.d.ts.map +1 -0
- package/dist/lib/registration-owners.js +77 -0
- package/dist/lib/registration-owners.js.map +1 -0
- package/dist/lib/release-index.d.ts +53 -0
- package/dist/lib/release-index.d.ts.map +1 -0
- package/dist/lib/release-index.js +162 -0
- package/dist/lib/release-index.js.map +1 -0
- package/dist/lib/repeating-timers.d.ts +79 -0
- package/dist/lib/repeating-timers.d.ts.map +1 -0
- package/dist/lib/repeating-timers.js +189 -0
- package/dist/lib/repeating-timers.js.map +1 -0
- package/dist/lib/source-text.d.ts +34 -0
- package/dist/lib/source-text.d.ts.map +1 -0
- package/dist/lib/source-text.js +80 -0
- package/dist/lib/source-text.js.map +1 -0
- package/dist/lib/specifiers.d.ts +20 -0
- package/dist/lib/specifiers.d.ts.map +1 -0
- package/dist/lib/specifiers.js +130 -0
- package/dist/lib/specifiers.js.map +1 -0
- package/dist/lib/sql-tables.d.ts +166 -0
- package/dist/lib/sql-tables.d.ts.map +1 -0
- package/dist/lib/sql-tables.js +464 -0
- package/dist/lib/sql-tables.js.map +1 -0
- package/dist/lib/switchable-modules.d.ts +54 -0
- package/dist/lib/switchable-modules.d.ts.map +1 -0
- package/dist/lib/switchable-modules.js +104 -0
- package/dist/lib/switchable-modules.js.map +1 -0
- package/dist/lib/tailwind-sources.d.ts +136 -0
- package/dist/lib/tailwind-sources.d.ts.map +1 -0
- package/dist/lib/tailwind-sources.js +307 -0
- package/dist/lib/tailwind-sources.js.map +1 -0
- package/dist/lib/ui-layer.d.ts +54 -0
- package/dist/lib/ui-layer.d.ts.map +1 -0
- package/dist/lib/ui-layer.js +57 -0
- package/dist/lib/ui-layer.js.map +1 -0
- package/dist/lib/workspace-packages.d.ts +186 -0
- package/dist/lib/workspace-packages.d.ts.map +1 -0
- package/dist/lib/workspace-packages.js +351 -0
- package/dist/lib/workspace-packages.js.map +1 -0
- package/dist/new-instance/deploy.d.ts +211 -0
- package/dist/new-instance/deploy.d.ts.map +1 -0
- package/dist/new-instance/deploy.js +1381 -0
- package/dist/new-instance/deploy.js.map +1 -0
- package/dist/new-instance/docs-toolchain.d.ts +66 -0
- package/dist/new-instance/docs-toolchain.d.ts.map +1 -0
- package/dist/new-instance/docs-toolchain.js +69 -0
- package/dist/new-instance/docs-toolchain.js.map +1 -0
- package/dist/new-instance/host.d.ts +124 -0
- package/dist/new-instance/host.d.ts.map +1 -0
- package/dist/new-instance/host.js +276 -0
- package/dist/new-instance/host.js.map +1 -0
- package/dist/new-instance/index.d.ts +118 -0
- package/dist/new-instance/index.d.ts.map +1 -0
- package/dist/new-instance/index.js +567 -0
- package/dist/new-instance/index.js.map +1 -0
- package/dist/new-instance/modules.d.ts +188 -0
- package/dist/new-instance/modules.d.ts.map +1 -0
- package/dist/new-instance/modules.js +392 -0
- package/dist/new-instance/modules.js.map +1 -0
- package/dist/new-instance/template.d.ts +505 -0
- package/dist/new-instance/template.d.ts.map +1 -0
- package/dist/new-instance/template.js +1886 -0
- package/dist/new-instance/template.js.map +1 -0
- package/dist/new-module/emit.d.ts +67 -0
- package/dist/new-module/emit.d.ts.map +1 -0
- package/dist/new-module/emit.js +1393 -0
- package/dist/new-module/emit.js.map +1 -0
- package/dist/new-module/host.d.ts +67 -0
- package/dist/new-module/host.d.ts.map +1 -0
- package/dist/new-module/host.js +224 -0
- package/dist/new-module/host.js.map +1 -0
- package/dist/new-module/index.d.ts +32 -0
- package/dist/new-module/index.d.ts.map +1 -0
- package/dist/new-module/index.js +193 -0
- package/dist/new-module/index.js.map +1 -0
- package/dist/new-module/spec.d.ts +188 -0
- package/dist/new-module/spec.d.ts.map +1 -0
- package/dist/new-module/spec.js +404 -0
- package/dist/new-module/spec.js.map +1 -0
- package/dist/new-module/text.d.ts +15 -0
- package/dist/new-module/text.d.ts.map +1 -0
- package/dist/new-module/text.js +22 -0
- package/dist/new-module/text.js.map +1 -0
- package/dist/new-storefront/dockerfile.d.ts +20 -0
- package/dist/new-storefront/dockerfile.d.ts.map +1 -0
- package/dist/new-storefront/dockerfile.js +131 -0
- package/dist/new-storefront/dockerfile.js.map +1 -0
- package/dist/new-storefront/gitignore.d.ts +23 -0
- package/dist/new-storefront/gitignore.d.ts.map +1 -0
- package/dist/new-storefront/gitignore.js +39 -0
- package/dist/new-storefront/gitignore.js.map +1 -0
- package/dist/new-storefront/index.d.ts +93 -0
- package/dist/new-storefront/index.d.ts.map +1 -0
- package/dist/new-storefront/index.js +329 -0
- package/dist/new-storefront/index.js.map +1 -0
- package/dist/new-storefront/npmrc.d.ts +98 -0
- package/dist/new-storefront/npmrc.d.ts.map +1 -0
- package/dist/new-storefront/npmrc.js +217 -0
- package/dist/new-storefront/npmrc.js.map +1 -0
- package/dist/new-storefront/reference.d.ts +189 -0
- package/dist/new-storefront/reference.d.ts.map +1 -0
- package/dist/new-storefront/reference.js +430 -0
- package/dist/new-storefront/reference.js.map +1 -0
- package/dist/new-storefront/rewrite.d.ts +171 -0
- package/dist/new-storefront/rewrite.d.ts.map +1 -0
- package/dist/new-storefront/rewrite.js +701 -0
- package/dist/new-storefront/rewrite.js.map +1 -0
- package/dist/release-index.json +284 -0
- package/dist/rules/action-route-permissions.d.ts +141 -0
- package/dist/rules/action-route-permissions.d.ts.map +1 -0
- package/dist/rules/action-route-permissions.js +556 -0
- package/dist/rules/action-route-permissions.js.map +1 -0
- package/dist/rules/bundle-pairing.d.ts +74 -0
- package/dist/rules/bundle-pairing.d.ts.map +1 -0
- package/dist/rules/bundle-pairing.js +281 -0
- package/dist/rules/bundle-pairing.js.map +1 -0
- package/dist/rules/channel-resolution.d.ts +17 -0
- package/dist/rules/channel-resolution.d.ts.map +1 -0
- package/dist/rules/channel-resolution.js +382 -0
- package/dist/rules/channel-resolution.js.map +1 -0
- package/dist/rules/command-coverage.d.ts +210 -0
- package/dist/rules/command-coverage.d.ts.map +1 -0
- package/dist/rules/command-coverage.js +714 -0
- package/dist/rules/command-coverage.js.map +1 -0
- package/dist/rules/container-imports.d.ts +60 -0
- package/dist/rules/container-imports.d.ts.map +1 -0
- package/dist/rules/container-imports.js +158 -0
- package/dist/rules/container-imports.js.map +1 -0
- package/dist/rules/default-language-prose.d.ts +212 -0
- package/dist/rules/default-language-prose.d.ts.map +1 -0
- package/dist/rules/default-language-prose.js +710 -0
- package/dist/rules/default-language-prose.js.map +1 -0
- package/dist/rules/diacritic-folds.d.ts +238 -0
- package/dist/rules/diacritic-folds.d.ts.map +1 -0
- package/dist/rules/diacritic-folds.js +681 -0
- package/dist/rules/diacritic-folds.js.map +1 -0
- package/dist/rules/entity-tenant-classification.d.ts +171 -0
- package/dist/rules/entity-tenant-classification.d.ts.map +1 -0
- package/dist/rules/entity-tenant-classification.js +323 -0
- package/dist/rules/entity-tenant-classification.js.map +1 -0
- package/dist/rules/entry-presence.d.ts +142 -0
- package/dist/rules/entry-presence.d.ts.map +1 -0
- package/dist/rules/entry-presence.js +339 -0
- package/dist/rules/entry-presence.js.map +1 -0
- package/dist/rules/entry-scope.d.ts +91 -0
- package/dist/rules/entry-scope.d.ts.map +1 -0
- package/dist/rules/entry-scope.js +404 -0
- package/dist/rules/entry-scope.js.map +1 -0
- package/dist/rules/env-inputs.d.ts +222 -0
- package/dist/rules/env-inputs.d.ts.map +1 -0
- package/dist/rules/env-inputs.js +951 -0
- package/dist/rules/env-inputs.js.map +1 -0
- package/dist/rules/kernel-boundary.d.ts +37 -0
- package/dist/rules/kernel-boundary.d.ts.map +1 -0
- package/dist/rules/kernel-boundary.js +195 -0
- package/dist/rules/kernel-boundary.js.map +1 -0
- package/dist/rules/nul-bytes.d.ts +233 -0
- package/dist/rules/nul-bytes.d.ts.map +1 -0
- package/dist/rules/nul-bytes.js +332 -0
- package/dist/rules/nul-bytes.js.map +1 -0
- package/dist/rules/platform-surface.d.ts +479 -0
- package/dist/rules/platform-surface.d.ts.map +1 -0
- package/dist/rules/platform-surface.js +749 -0
- package/dist/rules/platform-surface.js.map +1 -0
- package/dist/rules/port-catches.d.ts +225 -0
- package/dist/rules/port-catches.d.ts.map +1 -0
- package/dist/rules/port-catches.js +1374 -0
- package/dist/rules/port-catches.js.map +1 -0
- package/dist/rules/port-shape.d.ts +213 -0
- package/dist/rules/port-shape.d.ts.map +1 -0
- package/dist/rules/port-shape.js +670 -0
- package/dist/rules/port-shape.js.map +1 -0
- package/dist/rules/queue-names.d.ts +108 -0
- package/dist/rules/queue-names.d.ts.map +1 -0
- package/dist/rules/queue-names.js +395 -0
- package/dist/rules/queue-names.js.map +1 -0
- package/dist/rules/singleton-identity.d.ts +205 -0
- package/dist/rules/singleton-identity.d.ts.map +1 -0
- package/dist/rules/singleton-identity.js +830 -0
- package/dist/rules/singleton-identity.js.map +1 -0
- package/dist/rules/subscribe-seam.d.ts +121 -0
- package/dist/rules/subscribe-seam.d.ts.map +1 -0
- package/dist/rules/subscribe-seam.js +594 -0
- package/dist/rules/subscribe-seam.js.map +1 -0
- package/dist/rules/transaction-context.d.ts +40 -0
- package/dist/rules/transaction-context.d.ts.map +1 -0
- package/dist/rules/transaction-context.js +294 -0
- package/dist/rules/transaction-context.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The example deployment files an instance is scaffolded with
|
|
3
|
+
* (`specs/122-layer-deployment-independence/contracts/layer-independence.md` §3,
|
|
4
|
+
* under owner ruling **D-230**).
|
|
5
|
+
*
|
|
6
|
+
* ## Why this file exists
|
|
7
|
+
*
|
|
8
|
+
* `instance-repository.md` R2.1 lists a compose file, an nginx configuration
|
|
9
|
+
* and an `.env` as *"always in the instance"*. Measured on 2026-09-13, an
|
|
10
|
+
* instance was handed **none of them**, and no Dockerfile either — so a client
|
|
11
|
+
* asked for the owner's three-host topology wrote three deployment files from
|
|
12
|
+
* scratch, against a compose example that lives in *our* repository and assumes
|
|
13
|
+
* one host.
|
|
14
|
+
*
|
|
15
|
+
* ## They are examples, and they are derived from two axes and nothing else
|
|
16
|
+
*
|
|
17
|
+
* D-215: an instance holds *examples*, never a client's concrete files. So no
|
|
18
|
+
* real registry, no real domain, no real secret and none of this repository's
|
|
19
|
+
* container names appear below. What decides their content is the **member
|
|
20
|
+
* set** — an admin-less instance has no admin service, no admin image and no
|
|
21
|
+
* admin origin in its nginx example — and the **topology**, which selects which
|
|
22
|
+
* files are written and records nothing (R3.2). A topology written into the
|
|
23
|
+
* root manifest would be a third home for what an instance is, beside the
|
|
24
|
+
* `dependencies` that are the module set.
|
|
25
|
+
*
|
|
26
|
+
* ## The three-host split is derived, not written
|
|
27
|
+
*
|
|
28
|
+
* Every service carries the host it belongs to, and {@link composeDocument}
|
|
29
|
+
* drops an edge whose target is not in the same file. That is what makes R3.6
|
|
30
|
+
* checkable rather than asserted: the single-host graph partitions with exactly
|
|
31
|
+
* one edge crossing — `storefront -> backend`, `service_healthy`, a readiness
|
|
32
|
+
* convenience — and every `service_completed_successfully` edge in the file,
|
|
33
|
+
* `backend-install -> backend-migrate` and `backend -> backend-install`, lives
|
|
34
|
+
* entirely inside the backend host. The lost edge is replaced by **nothing**: each layer starts, answers its own
|
|
35
|
+
* health check and tolerates an absent peer, and a wait-for-it script is the
|
|
36
|
+
* temptation this rule exists to refuse. An edge added across a boundary
|
|
37
|
+
* changes what the renderer drops and reds `test/new-instance/deploy-examples.test.ts`.
|
|
38
|
+
*
|
|
39
|
+
* ## Nothing here spells a build input twice
|
|
40
|
+
*
|
|
41
|
+
* Every `--build-arg` the Dockerfile examples pass, and every `ARG` they
|
|
42
|
+
* declare, is emitted from `../lib/instance-build-inputs.js` (§2 R2.3). A
|
|
43
|
+
* fourth spelling of a build input cannot arrive here, because there is no
|
|
44
|
+
* place to write one.
|
|
45
|
+
*
|
|
46
|
+
* ## The development compose is the same catalogue in a second mode
|
|
47
|
+
*
|
|
48
|
+
* `specs/125-first-mile-install/spec.md` §4.1 (FR-100…FR-112). A scaffolded
|
|
49
|
+
* instance also carries `compose.dev.yml`, at its **root** and not under
|
|
50
|
+
* `deploy/`, and that file is **runnable as written** where every file under
|
|
51
|
+
* `deploy/` is an example the client has to build and push images for first. It
|
|
52
|
+
* is rendered by {@link developmentComposeFile} from the **same**
|
|
53
|
+
* {@link services} records, in `development` mode, and FR-103 is what that mode
|
|
54
|
+
* exists for: *"no second statement of what Endora needs to run may enter the
|
|
55
|
+
* tree"*. Two things differ between the modes and both are derived — where a
|
|
56
|
+
* value comes from (an operator-filled `${NAME}` against an inline-defaulted
|
|
57
|
+
* `${NAME:-…}`) and whether the service publishes a host port. The image, the
|
|
58
|
+
* healthcheck and the volume are one record's.
|
|
59
|
+
*
|
|
60
|
+
* Defect F-2 is what that requirement is measured against: this repository's own
|
|
61
|
+
* `docker-compose.yml` and the catalogue below name the same three stateful
|
|
62
|
+
* images, and they agreed by coincidence until
|
|
63
|
+
* `test/new-instance/dev-compose.test.ts` made them agree by instrument — that
|
|
64
|
+
* case reads both files and names both paths, and it is also why no image tag
|
|
65
|
+
* is written twice in this file, not even in this sentence. Writing a **third**
|
|
66
|
+
* statement of them into every client's tree is what
|
|
67
|
+
* this file would have done if the development compose had been authored rather
|
|
68
|
+
* than derived.
|
|
69
|
+
*/
|
|
70
|
+
import { type EnvironmentInput } from '@endora-commerce/contracts';
|
|
71
|
+
import { type BuildTarget } from '../lib/instance-build-inputs.js';
|
|
72
|
+
import type { FileKind, MemberName } from './template.js';
|
|
73
|
+
/** Which machine layout the examples describe. `--topology`'s vocabulary. */
|
|
74
|
+
export type Topology = 'single-host' | 'three-host';
|
|
75
|
+
/**
|
|
76
|
+
* The vocabulary, in the order the flag's refusal prints it.
|
|
77
|
+
*
|
|
78
|
+
* `single-host` is first because it is the default, on the owner's own *"the
|
|
79
|
+
* most common scenario is probably all three layers on one machine"* (D-215).
|
|
80
|
+
*/
|
|
81
|
+
export declare const TOPOLOGIES: readonly ["single-host", "three-host"];
|
|
82
|
+
/** What a run that named no topology gets (D-230). */
|
|
83
|
+
export declare const DEFAULT_TOPOLOGY: Topology;
|
|
84
|
+
/**
|
|
85
|
+
* `--topology`'s value, or an operator-fixable refusal naming the vocabulary.
|
|
86
|
+
*
|
|
87
|
+
* F3's class: a flag the operator wrote and can rewrite, which
|
|
88
|
+
* `instance-tree.md` §4 puts at exit `1`. It is refused rather than defaulted —
|
|
89
|
+
* a run that silently ignored `--topology three-hosts` would write a
|
|
90
|
+
* single-host example to a client who asked for three, and the first they would
|
|
91
|
+
* hear of it is a compose file with a database in it.
|
|
92
|
+
*/
|
|
93
|
+
export declare function assertTopology(value: string): Topology;
|
|
94
|
+
/** Everything the examples are derived from. */
|
|
95
|
+
export interface DeployInput {
|
|
96
|
+
readonly topology: Topology;
|
|
97
|
+
/** The admin member was written (§2.4), so there is an admin artefact. */
|
|
98
|
+
readonly admin: boolean;
|
|
99
|
+
/** An `.npmrc` was written, so an image build has to carry it (R5.7). */
|
|
100
|
+
readonly npmrc: boolean;
|
|
101
|
+
/** The documentation member was written — it changes the image's install. */
|
|
102
|
+
readonly docs: boolean;
|
|
103
|
+
/** The root manifest's `engines.node`, which the image's tag is read from. */
|
|
104
|
+
readonly enginesNode: string;
|
|
105
|
+
/** The root manifest's `packageManager`, or `undefined`. */
|
|
106
|
+
readonly packageManager: string | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* What this instance reads from its environment — the platform's declaration
|
|
109
|
+
* unioned with the manifests of the modules it installs.
|
|
110
|
+
*
|
|
111
|
+
* The **same** value the root `.env.example` is derived from, threaded here
|
|
112
|
+
* rather than re-derived, so a variable an operator has to fill in has one
|
|
113
|
+
* sentence in this repository and not two
|
|
114
|
+
* (`specs/123-oss-install-experience/` G3). See {@link envExampleFor} for
|
|
115
|
+
* which of the three sources answers a given name.
|
|
116
|
+
*/
|
|
117
|
+
readonly declared: readonly EnvironmentInput[];
|
|
118
|
+
}
|
|
119
|
+
/** One planned file, in `template.ts`' own shape. */
|
|
120
|
+
export interface DeployFile {
|
|
121
|
+
readonly path: string;
|
|
122
|
+
readonly kind: FileKind;
|
|
123
|
+
readonly member: MemberName;
|
|
124
|
+
readonly content: string;
|
|
125
|
+
}
|
|
126
|
+
/** Where the development compose is written, relative to the instance root. */
|
|
127
|
+
export declare const DEV_COMPOSE_PATH = "compose.dev.yml";
|
|
128
|
+
/**
|
|
129
|
+
* The names a document expands **without** an inline default (FR-111).
|
|
130
|
+
*
|
|
131
|
+
* The guard `envExampleFor` does not give you, and the reason it is a second
|
|
132
|
+
* pattern rather than that function's constant is one character:
|
|
133
|
+
* `/\$\{([A-Z0-9_]+)(?::-[^}]*)?\}/g`'s default clause is **non-capturing**, so
|
|
134
|
+
* a match there says nothing about which of the two forms it was. Reusing it
|
|
135
|
+
* here would report every expansion as defaulted — a guard that is green on
|
|
136
|
+
* precisely the document it was written to refuse (spec §5.3.3).
|
|
137
|
+
*
|
|
138
|
+
* Sorted and de-duplicated, because the sentence this feeds is read by whoever
|
|
139
|
+
* added the record, and three occurrences of one name is one repair.
|
|
140
|
+
*/
|
|
141
|
+
export declare function undefaultedExpansions(document: string): readonly string[];
|
|
142
|
+
/**
|
|
143
|
+
* `compose.dev.yml`, rendered from the catalogue in `development` mode.
|
|
144
|
+
*
|
|
145
|
+
* **Which services reach it is derived rather than listed** (FR-104): every
|
|
146
|
+
* service whose image is this repository's own build — `${REGISTRY_IMAGE}/…` —
|
|
147
|
+
* is an application service and is dropped, and everything else is a backing
|
|
148
|
+
* service and is kept. So a backing service the catalogue gains appears here in
|
|
149
|
+
* the same merge request with nothing edited, and an application service it
|
|
150
|
+
* gains stays out, which is the direction both rules want. A list would have
|
|
151
|
+
* been a second statement of the partition.
|
|
152
|
+
*
|
|
153
|
+
* `extra` exists for the guard's own proof and for nothing else: it is the only
|
|
154
|
+
* way to put an expansion into this document that the catalogue cannot produce,
|
|
155
|
+
* and a test that could not do that would be asserting the throw over a
|
|
156
|
+
* document that never reaches it.
|
|
157
|
+
*/
|
|
158
|
+
export declare function developmentComposeFile(input: DeployInput, extra?: readonly string[]): DeployFile;
|
|
159
|
+
/**
|
|
160
|
+
* How a **natively running** process reaches the development stack (FR-105).
|
|
161
|
+
*
|
|
162
|
+
* One entry per input the rendered document actually answers, composed from the
|
|
163
|
+
* defaults that document carries — so a changed port or a changed credential
|
|
164
|
+
* moves the address in the same run, with no second list to edit. An entry
|
|
165
|
+
* whose composition names something the document does not carry is **not
|
|
166
|
+
* produced**: a document with no mail catcher yields no `SMTP_URL`, and nothing
|
|
167
|
+
* here has to know that `SMTP_URL` is the `email` module's input.
|
|
168
|
+
*
|
|
169
|
+
* That is the compose half of FR-105's intersection. The other half is the
|
|
170
|
+
* instance's own declaration and belongs to the caller: *"an input is derived
|
|
171
|
+
* only when the development compose provides a service for it **and** this
|
|
172
|
+
* instance declares it"*, and a caller that skipped the second test would write
|
|
173
|
+
* a value for a module nobody installed.
|
|
174
|
+
*
|
|
175
|
+
* `localhost` and not a container name, for the reason FR-104 gives: nothing in
|
|
176
|
+
* this document is an application, so every reader of these values is a process
|
|
177
|
+
* on the host reaching a published port.
|
|
178
|
+
*/
|
|
179
|
+
export declare function developmentAddresses(document: string): ReadonlyMap<string, string>;
|
|
180
|
+
/**
|
|
181
|
+
* Where the mail catcher's own interface is, if this document runs one.
|
|
182
|
+
*
|
|
183
|
+
* Not an environment input — nothing reads it — and therefore not in
|
|
184
|
+
* {@link developmentAddresses}. It is printed, because a client whose instance
|
|
185
|
+
* sends mail to a port has no way to learn where that mail went.
|
|
186
|
+
*/
|
|
187
|
+
export declare function developmentMailUrl(document: string): string | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* The base image tag, derived from the `engines.node` the instance declares.
|
|
190
|
+
*
|
|
191
|
+
* R2.5a: a version this command chose would be a value nobody reviewed. The
|
|
192
|
+
* major is what the range actually constrains, and a range with no digit in it
|
|
193
|
+
* is not something a resolved manifest produces — the running interpreter's own
|
|
194
|
+
* major is the fallback rather than a literal written here.
|
|
195
|
+
*/
|
|
196
|
+
export declare function nodeImage(enginesNode: string): string;
|
|
197
|
+
/** `corepack`, activating the package manager the root manifest pins. */
|
|
198
|
+
export declare function corepack(packageManager: string | undefined): readonly string[];
|
|
199
|
+
/** The `docker build` line, with every `--build-arg` the declaration emits. */
|
|
200
|
+
export declare function buildInvocation(target: BuildTarget, path: string): readonly string[];
|
|
201
|
+
/** The `ARG`/`ENV` pair per input this target's build reads. */
|
|
202
|
+
export declare function argDeclarations(target: BuildTarget): readonly string[];
|
|
203
|
+
/**
|
|
204
|
+
* Every `deploy/` file this run writes.
|
|
205
|
+
*
|
|
206
|
+
* They are the **client's** kind: rendered once, edited by them, and read back
|
|
207
|
+
* by nothing here. A file this command would read again would be a second home
|
|
208
|
+
* for a fact the manifest already holds.
|
|
209
|
+
*/
|
|
210
|
+
export declare function deployFiles(input: DeployInput): readonly DeployFile[];
|
|
211
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/new-instance/deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE1D,6EAA6E;AAC7E,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,YAAY,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,wCAAuE,CAAC;AAE/F,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,EAAE,QAAwB,CAAC;AAExD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAStD;AAED,gDAAgD;AAChD,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,4DAA4D;IAC5D,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C;;;;;;;;;OASG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAChD;AAED,qDAAqD;AACrD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAgfD,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAMzE;AAkCD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,WAAW,EAClB,KAAK,GAAE,SAAS,MAAM,EAAO,GAC5B,UAAU,CAgBZ;AAmBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBlF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGvE;AA6YD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAGrD;AAED,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,MAAM,EAAE,CAQ9E;AAgBD,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAOpF;AAED,gEAAgE;AAChE,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,MAAM,EAAE,CAMtE;AAiQD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,UAAU,EAAE,CAgErE"}
|