@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,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two filesystem questions this derivation asks.
|
|
3
|
+
*
|
|
4
|
+
* Injected so a red proof can hand in a whole synthetic checkout at the top of
|
|
5
|
+
* the analysis rather than a half-classified record at the bottom of it
|
|
6
|
+
* (issue #130). `scripts/workspace-resolution.ts` already owns an injected
|
|
7
|
+
* filesystem for exactly that reason and adapts it onto this one.
|
|
8
|
+
*/
|
|
9
|
+
export interface WorkspaceFs {
|
|
10
|
+
/** File contents, or `null` when the file is absent or unreadable. */
|
|
11
|
+
readonly readText: (path: string) => string | null;
|
|
12
|
+
/** Immediate subdirectory names, or `[]` when the directory is absent. */
|
|
13
|
+
readonly listDirectories: (path: string) => readonly string[];
|
|
14
|
+
}
|
|
15
|
+
/** One package this repository owns, as `pnpm-workspace.yaml` globs it. */
|
|
16
|
+
export interface WorkspaceMember {
|
|
17
|
+
/** Absolute directory. */
|
|
18
|
+
readonly dir: string;
|
|
19
|
+
/** The `name` its `package.json` declares. */
|
|
20
|
+
readonly name: string;
|
|
21
|
+
/** The parsed manifest, so a caller can read its own fields off it. */
|
|
22
|
+
readonly manifest: Readonly<Record<string, unknown>>;
|
|
23
|
+
}
|
|
24
|
+
/** The real filesystem behind {@link WorkspaceFs}. Absence is `null`/`[]`, never a throw. */
|
|
25
|
+
export declare function nodeWorkspaceFs(): WorkspaceFs;
|
|
26
|
+
/** The `packages:` list of `pnpm-workspace.yaml`, as written. */
|
|
27
|
+
export declare function workspaceGlobs(repoRoot: string, fs: WorkspaceFs): readonly string[];
|
|
28
|
+
/** Directories a workspace glob matches, `*` per segment and `**` any depth. */
|
|
29
|
+
export declare function expandWorkspaceGlob(repoRoot: string, glob: string, fs: WorkspaceFs): readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* Every directory the workspace globs match and that carries a `package.json`.
|
|
32
|
+
*
|
|
33
|
+
* Sorted, deduplicated, absolute. A glob that matches a directory without a
|
|
34
|
+
* manifest is not an error — `packages/modules` will match `packages/*` while
|
|
35
|
+
* being nothing but the parent of the members — it simply is not a member.
|
|
36
|
+
*/
|
|
37
|
+
export declare function workspaceMemberDirectories(repoRoot: string, fs: WorkspaceFs): readonly string[];
|
|
38
|
+
/** Every workspace member whose manifest declares a `name`, sorted by directory. */
|
|
39
|
+
export declare function workspaceMembers(repoRoot: string, fs: WorkspaceFs): readonly WorkspaceMember[];
|
|
40
|
+
/**
|
|
41
|
+
* A workspace member, plus which workspace entries produced it.
|
|
42
|
+
*
|
|
43
|
+
* The classification is one sentence and it is the workspace file's own: **an
|
|
44
|
+
* entry containing a glob character enumerates a library *family* — a set whose
|
|
45
|
+
* membership is decided by what is on disk — and a literal entry names one
|
|
46
|
+
* deployable.** Today that reads `packages/*` and `packages/modules/*` as the
|
|
47
|
+
* family and `backend`, `storefront`, `admin`, `docs` as applications, which is
|
|
48
|
+
* the split `AGENTS.md` states in prose, and it costs nothing when the family
|
|
49
|
+
* grows: module packages a directory deeper arrive through a glob and are
|
|
50
|
+
* family by construction.
|
|
51
|
+
*
|
|
52
|
+
* A member matched by both a literal and a glob counts as **family**, which is
|
|
53
|
+
* the failing-safe direction for both readers: a family member is versionable
|
|
54
|
+
* (it must carry a changeset) and it ships a `dist` (it must pass the
|
|
55
|
+
* distribution gate). Being wrong that way asks for more, never less.
|
|
56
|
+
*/
|
|
57
|
+
export interface ClassifiedWorkspaceMember extends WorkspaceMember {
|
|
58
|
+
/**
|
|
59
|
+
* True when a *glob* workspace entry produced it — a library family. False
|
|
60
|
+
* when every entry that produced it is a literal directory — an application.
|
|
61
|
+
*/
|
|
62
|
+
readonly family: boolean;
|
|
63
|
+
/** The workspace entries that matched it, for a message that can name one. */
|
|
64
|
+
readonly globs: readonly string[];
|
|
65
|
+
}
|
|
66
|
+
/** Every member, classified, with what each workspace entry produced. */
|
|
67
|
+
export interface WorkspaceClassification {
|
|
68
|
+
readonly members: readonly ClassifiedWorkspaceMember[];
|
|
69
|
+
/** Non-negated workspace entries, and how many members each produced. */
|
|
70
|
+
readonly globCoverage: ReadonlyMap<string, number>;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* {@link workspaceMembers}, with the family/application split its callers used
|
|
74
|
+
* to derive for themselves.
|
|
75
|
+
*
|
|
76
|
+
* Two readers need it and they are asking the same question at two distances:
|
|
77
|
+
* `check-release-intent.ts` asks *"must a change here carry a changeset?"* and
|
|
78
|
+
* `test/unit/packages/package-dist-build.test.ts` asks *"must this package ship
|
|
79
|
+
* a compiled `dist` a stranger can consume?"* Both are *"is this a library we
|
|
80
|
+
* publish or an application we deploy?"*, and a second answer to it is two
|
|
81
|
+
* answers waiting to disagree.
|
|
82
|
+
*/
|
|
83
|
+
export declare function classifyWorkspaceMembers(repoRoot: string, fs: WorkspaceFs): WorkspaceClassification;
|
|
84
|
+
/**
|
|
85
|
+
* The npm scopes those members are published under, sorted, each with its
|
|
86
|
+
* trailing slash — `['@endora-commerce/']` today.
|
|
87
|
+
*
|
|
88
|
+
* Derived rather than declared, because a second scope is exactly what feature
|
|
89
|
+
* 080 introduces and the one thing that must not happen is a guard that keeps
|
|
90
|
+
* answering about the first one. An unscoped member (`backend`, `admin`,
|
|
91
|
+
* `docs`) contributes no scope: nothing resolves it by specifier, so there is
|
|
92
|
+
* no link for a guard to classify.
|
|
93
|
+
*/
|
|
94
|
+
export declare function workspaceScopes(members: readonly WorkspaceMember[]): readonly string[];
|
|
95
|
+
/** A workspace member that declares itself a backend module. */
|
|
96
|
+
export interface ModulePackage {
|
|
97
|
+
/** Absolute directory of the member. */
|
|
98
|
+
readonly dir: string;
|
|
99
|
+
/** The npm name it publishes under. */
|
|
100
|
+
readonly name: string;
|
|
101
|
+
/** The manifest id it declares — identity of record everywhere (D-142). */
|
|
102
|
+
readonly moduleId: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The module id a member declares about itself, or `null`.
|
|
106
|
+
*
|
|
107
|
+
* The `endora` block is the package's own statement, the same one
|
|
108
|
+
* `src/packages/installed-packages.ts` reads at boot, so a module package is
|
|
109
|
+
* recognised wherever the workspace globs put it and whatever its directory is
|
|
110
|
+
* called. Nothing here reads the npm name's spelling — a `mod-` prefix rule
|
|
111
|
+
* would be a derived fact written down (D-100).
|
|
112
|
+
*/
|
|
113
|
+
export declare function declaredModuleId(member: WorkspaceMember): string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Every workspace member that declares itself a module, sorted by directory.
|
|
116
|
+
*
|
|
117
|
+
* Unfiltered by the manifest index on purpose, which is the one difference from
|
|
118
|
+
* `lib/module-roots.ts`'s package half: that derivation is answering "which
|
|
119
|
+
* *registered* modules live in a package", and a consumer outside the backend —
|
|
120
|
+
* the Tailwind source guard in `scripts/tailwind-source-scan.ts` — is answering
|
|
121
|
+
* "which packages can ship UI". A package that ships a screen before its
|
|
122
|
+
* manifest reaches the generated index still ships the screen.
|
|
123
|
+
*/
|
|
124
|
+
export declare function modulePackages(members: readonly WorkspaceMember[]): readonly ModulePackage[];
|
|
125
|
+
/** A workspace member that declares itself a package of admin UI. */
|
|
126
|
+
export interface AdminUiPackage {
|
|
127
|
+
/** Absolute directory of the member. */
|
|
128
|
+
readonly dir: string;
|
|
129
|
+
/** The npm name it publishes under. */
|
|
130
|
+
readonly name: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Does a member declare itself a package whose sources are **admin UI**?
|
|
134
|
+
*
|
|
135
|
+
* The third value of the `endora.type` block, beside `'platform'` (the host)
|
|
136
|
+
* and `'module'` (a module package), and read the same way: the package's own
|
|
137
|
+
* statement about itself, over the members `pnpm-workspace.yaml` globs. Nothing
|
|
138
|
+
* here reads a directory or a name — `packages/admin-kit` and
|
|
139
|
+
* `@endora-commerce/admin-kit` appear in no predicate, which is what lets a
|
|
140
|
+
* second admin-ui package arrive under any name and be judged from its first
|
|
141
|
+
* commit (feature 091, P5c).
|
|
142
|
+
*
|
|
143
|
+
* ## Why this is not D-171's refused self-certification
|
|
144
|
+
*
|
|
145
|
+
* D-171 refused an `endora`-block field that would have **exempted** a package
|
|
146
|
+
* from `check:module-boundary`'s ledger: an exemption from a rule, issued by
|
|
147
|
+
* the party the rule measures. This declaration is the opposite direction. It
|
|
148
|
+
* puts the package *into* two populations — `i18n:hardcoded`'s walk and
|
|
149
|
+
* `check:admin-zones`' third `foreign-module-id` population — so declaring it
|
|
150
|
+
* buys obligations and nothing else, and the only thing an author gains by
|
|
151
|
+
* omitting it is that their hard-coded strings and their foreign module ids go
|
|
152
|
+
* unread.
|
|
153
|
+
*
|
|
154
|
+
* Forgetting it therefore has to fail loudly, and it does: `i18n:hardcoded`'s
|
|
155
|
+
* baseline is keyed by path and two-way, so a file that arrives in an
|
|
156
|
+
* undeclared package is a ledger entry naming a path the walk never opened —
|
|
157
|
+
* `drained`, exit 1 — in the same run. That is the property that makes a
|
|
158
|
+
* declaration safe here and an exemption unsafe there.
|
|
159
|
+
*/
|
|
160
|
+
export declare function declaresAdminUi(member: WorkspaceMember): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Every workspace member that declares itself admin UI, sorted by directory.
|
|
163
|
+
*
|
|
164
|
+
* The shape {@link modulePackages} has, for the same reason: one derivation of
|
|
165
|
+
* "which packages ship admin code", so the two instruments that walk them
|
|
166
|
+
* cannot come to disagree about the population.
|
|
167
|
+
*/
|
|
168
|
+
export declare function adminUiPackages(members: readonly WorkspaceMember[]): readonly AdminUiPackage[];
|
|
169
|
+
/**
|
|
170
|
+
* Is this manifest a Next application — the shape the reference storefront has?
|
|
171
|
+
*
|
|
172
|
+
* A member qualifies by declaring `next` as a dependency **and** a `build`
|
|
173
|
+
* script that runs it. Both halves are needed: a package that merely depends on
|
|
174
|
+
* `next` may be a component library that peers on it, and a `build` script
|
|
175
|
+
* naming `next build` in a manifest that does not depend on `next` is a
|
|
176
|
+
* misconfiguration rather than an application.
|
|
177
|
+
*
|
|
178
|
+
* It lives here, beside the derivation of *which directories are members*,
|
|
179
|
+
* because two consumers ask the same question of the same population and a
|
|
180
|
+
* second copy of the predicate is two answers waiting to disagree about which
|
|
181
|
+
* application they are talking about: `new-storefront/reference.ts` resolves the
|
|
182
|
+
* storefront it copies, and `check-release-intent.ts` resolves the one whose
|
|
183
|
+
* dependency closure is the publication set (feature 104, FR-001).
|
|
184
|
+
*/
|
|
185
|
+
export declare function isNextApplication(manifest: Readonly<Record<string, unknown>>): boolean;
|
|
186
|
+
//# sourceMappingURL=workspace-packages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-packages.d.ts","sourceRoot":"","sources":["../../src/lib/workspace-packages.ts"],"names":[],"mappings":"AAoDA;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACnD,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,MAAM,EAAE,CAAC;CAC/D;AAED,2EAA2E;AAC3E,MAAM,WAAW,eAAe;IAC9B,0BAA0B;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAA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AAS,eAAe,EAAE,GAAG,SAAS,MAAM,EAAE,CAOtF;AAED,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAOvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,SAAS,aAAa,EAAE,CAQ5F;AAED,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAIhE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,eAAe,EAAE,GAClC,SAAS,cAAc,EAAE,CAK3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,OAAO,CAUtF"}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Which directories does this repository declare as its own packages?" — one
|
|
3
|
+
* derivation, for every consumer of the answer (feature 080, T040a).
|
|
4
|
+
*
|
|
5
|
+
* It lives under `backend/scripts/lib/` rather than at the repository root, and
|
|
6
|
+
* that is a runtime constraint rather than a taste: the root `package.json`
|
|
7
|
+
* declares no `"type": "module"`, so `tsx` loads a root `scripts/*.ts` as
|
|
8
|
+
* CommonJS and a named import of it from `backend/` — which *is* ESM — fails at
|
|
9
|
+
* instantiation. `scripts/workspace-resolution.ts` reaches it from above
|
|
10
|
+
* instead, where vite transforms it and the direction costs nothing.
|
|
11
|
+
*
|
|
12
|
+
* Three places need it and, before this file, two of them had their own copy
|
|
13
|
+
* and the third had a guess:
|
|
14
|
+
*
|
|
15
|
+
* * `backend/scripts/check-overlay-determinism.ts` expands the
|
|
16
|
+
* `pnpm-workspace.yaml` globs to decide whether a rendered entry lands in a
|
|
17
|
+
* workspace member or under an installed package (T030a). That is where the
|
|
18
|
+
* expansion below comes from, verbatim.
|
|
19
|
+
* * `scripts/workspace-resolution.ts` — the issue #255 guard — asked
|
|
20
|
+
* `readdir('packages')` instead, which is the same question answered one
|
|
21
|
+
* level deep. A package under `packages/<group>/<name>` is invisible to it,
|
|
22
|
+
* and invisible means **unguarded**: its `node_modules` link can point at
|
|
23
|
+
* another checkout and the run compiles somebody else's branch while
|
|
24
|
+
* reporting nothing.
|
|
25
|
+
* * `backend/scripts/lib/module-roots.ts` needs the same list to find the
|
|
26
|
+
* module roots that are packages rather than directories of the
|
|
27
|
+
* application.
|
|
28
|
+
*
|
|
29
|
+
* The workspace file is the authority, deliberately, and `node_modules` is not:
|
|
30
|
+
* a member that is declared and not installed is still a member — the tree is
|
|
31
|
+
* committed, and what it contains is a fact about the tree rather than about
|
|
32
|
+
* whether somebody has run `pnpm install`. It is also the only authority that
|
|
33
|
+
* *moves with the layout*: writing `packages/modules` into a check would be a
|
|
34
|
+
* derived fact written down, which is what D-100 forbids and what feature 080
|
|
35
|
+
* has had to repair three times.
|
|
36
|
+
*
|
|
37
|
+
* ## What it cannot see, stated rather than discovered later
|
|
38
|
+
*
|
|
39
|
+
* * **A flow-style `pnpm-workspace.yaml`** (`packages: [a, b]`). The reader
|
|
40
|
+
* below is a block-sequence reader; a flow list produces **no** globs, and
|
|
41
|
+
* every caller treats "no glob" as a refusal rather than as an empty
|
|
42
|
+
* workspace. That is the same call `check-overlay-determinism` makes, for
|
|
43
|
+
* the same reason: a silently empty member list turns a containment test
|
|
44
|
+
* into a vacuous pass.
|
|
45
|
+
* * **A package vendored by hand into a workspace directory.** It reads as a
|
|
46
|
+
* member, because the globs are the authority.
|
|
47
|
+
* * **`pnpm-workspace.yaml` fields other than `packages:`.** pnpm has grown
|
|
48
|
+
* several; none of them changes which directories are members.
|
|
49
|
+
*/
|
|
50
|
+
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
|
51
|
+
import { join } from 'node:path';
|
|
52
|
+
/** The real filesystem behind {@link WorkspaceFs}. Absence is `null`/`[]`, never a throw. */
|
|
53
|
+
export function nodeWorkspaceFs() {
|
|
54
|
+
return {
|
|
55
|
+
readText(path) {
|
|
56
|
+
try {
|
|
57
|
+
return readFileSync(path, 'utf8');
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
listDirectories(path) {
|
|
64
|
+
try {
|
|
65
|
+
return readdirSync(path).filter((name) => {
|
|
66
|
+
try {
|
|
67
|
+
return statSync(join(path, name)).isDirectory();
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** The `packages:` list of `pnpm-workspace.yaml`, as written. */
|
|
81
|
+
export function workspaceGlobs(repoRoot, fs) {
|
|
82
|
+
const source = fs.readText(join(repoRoot, 'pnpm-workspace.yaml'));
|
|
83
|
+
if (source === null)
|
|
84
|
+
return [];
|
|
85
|
+
const globs = [];
|
|
86
|
+
let inList = false;
|
|
87
|
+
for (const raw of source.split('\n')) {
|
|
88
|
+
const line = raw.replace(/#.*$/, '').trimEnd();
|
|
89
|
+
if (/^packages:\s*$/.test(line)) {
|
|
90
|
+
inList = true;
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
if (!inList)
|
|
94
|
+
continue;
|
|
95
|
+
const item = /^\s+-\s*(.+)$/.exec(line);
|
|
96
|
+
if (item === null) {
|
|
97
|
+
if (line.trim() === '')
|
|
98
|
+
continue;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
globs.push(item[1].trim().replace(/^['"]|['"]$/g, ''));
|
|
102
|
+
}
|
|
103
|
+
return globs;
|
|
104
|
+
}
|
|
105
|
+
function childDirectories(dir, fs) {
|
|
106
|
+
return fs.listDirectories(dir).filter((name) => name !== 'node_modules' && !name.startsWith('.'));
|
|
107
|
+
}
|
|
108
|
+
function directoriesUnder(dir, fs, out = []) {
|
|
109
|
+
for (const name of childDirectories(dir, fs)) {
|
|
110
|
+
const full = join(dir, name);
|
|
111
|
+
out.push(full);
|
|
112
|
+
directoriesUnder(full, fs, out);
|
|
113
|
+
}
|
|
114
|
+
return out;
|
|
115
|
+
}
|
|
116
|
+
/** Directories a workspace glob matches, `*` per segment and `**` any depth. */
|
|
117
|
+
export function expandWorkspaceGlob(repoRoot, glob, fs) {
|
|
118
|
+
const segments = glob.split('/').filter((segment) => segment.length > 0);
|
|
119
|
+
let cursor = [repoRoot];
|
|
120
|
+
for (const segment of segments) {
|
|
121
|
+
const next = [];
|
|
122
|
+
for (const dir of cursor) {
|
|
123
|
+
if (segment === '**') {
|
|
124
|
+
next.push(dir, ...directoriesUnder(dir, fs));
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
for (const name of childDirectories(dir, fs)) {
|
|
128
|
+
if (segment === '*' || segment === name)
|
|
129
|
+
next.push(join(dir, name));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
cursor = next;
|
|
133
|
+
}
|
|
134
|
+
return cursor;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Every directory the workspace globs match and that carries a `package.json`.
|
|
138
|
+
*
|
|
139
|
+
* Sorted, deduplicated, absolute. A glob that matches a directory without a
|
|
140
|
+
* manifest is not an error — `packages/modules` will match `packages/*` while
|
|
141
|
+
* being nothing but the parent of the members — it simply is not a member.
|
|
142
|
+
*/
|
|
143
|
+
export function workspaceMemberDirectories(repoRoot, fs) {
|
|
144
|
+
const globs = workspaceGlobs(repoRoot, fs);
|
|
145
|
+
const excluded = new Set(globs
|
|
146
|
+
.filter((glob) => glob.startsWith('!'))
|
|
147
|
+
.flatMap((glob) => expandWorkspaceGlob(repoRoot, glob.slice(1), fs)));
|
|
148
|
+
const found = new Set();
|
|
149
|
+
for (const glob of globs.filter((candidate) => !candidate.startsWith('!'))) {
|
|
150
|
+
for (const dir of expandWorkspaceGlob(repoRoot, glob, fs)) {
|
|
151
|
+
if (excluded.has(dir))
|
|
152
|
+
continue;
|
|
153
|
+
if (fs.readText(join(dir, 'package.json')) === null)
|
|
154
|
+
continue;
|
|
155
|
+
found.add(dir);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return [...found].sort();
|
|
159
|
+
}
|
|
160
|
+
/** Every workspace member whose manifest declares a `name`, sorted by directory. */
|
|
161
|
+
export function workspaceMembers(repoRoot, fs) {
|
|
162
|
+
const members = [];
|
|
163
|
+
for (const dir of workspaceMemberDirectories(repoRoot, fs)) {
|
|
164
|
+
const text = fs.readText(join(dir, 'package.json'));
|
|
165
|
+
if (text === null)
|
|
166
|
+
continue;
|
|
167
|
+
let parsed;
|
|
168
|
+
try {
|
|
169
|
+
parsed = JSON.parse(text);
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed))
|
|
175
|
+
continue;
|
|
176
|
+
const manifest = parsed;
|
|
177
|
+
const name = manifest['name'];
|
|
178
|
+
if (typeof name !== 'string' || name.length === 0)
|
|
179
|
+
continue;
|
|
180
|
+
members.push({ dir, name, manifest });
|
|
181
|
+
}
|
|
182
|
+
return members;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* {@link workspaceMembers}, with the family/application split its callers used
|
|
186
|
+
* to derive for themselves.
|
|
187
|
+
*
|
|
188
|
+
* Two readers need it and they are asking the same question at two distances:
|
|
189
|
+
* `check-release-intent.ts` asks *"must a change here carry a changeset?"* and
|
|
190
|
+
* `test/unit/packages/package-dist-build.test.ts` asks *"must this package ship
|
|
191
|
+
* a compiled `dist` a stranger can consume?"* Both are *"is this a library we
|
|
192
|
+
* publish or an application we deploy?"*, and a second answer to it is two
|
|
193
|
+
* answers waiting to disagree.
|
|
194
|
+
*/
|
|
195
|
+
export function classifyWorkspaceMembers(repoRoot, fs) {
|
|
196
|
+
const globs = workspaceGlobs(repoRoot, fs).filter((glob) => !glob.startsWith('!'));
|
|
197
|
+
const members = workspaceMembers(repoRoot, fs);
|
|
198
|
+
const globCoverage = new Map();
|
|
199
|
+
const matchedGlobs = new Map();
|
|
200
|
+
for (const glob of globs) {
|
|
201
|
+
const dirs = new Set(expandWorkspaceGlob(repoRoot, glob, fs));
|
|
202
|
+
let covered = 0;
|
|
203
|
+
for (const member of members) {
|
|
204
|
+
if (!dirs.has(member.dir))
|
|
205
|
+
continue;
|
|
206
|
+
covered += 1;
|
|
207
|
+
const list = matchedGlobs.get(member.dir) ?? [];
|
|
208
|
+
list.push(glob);
|
|
209
|
+
matchedGlobs.set(member.dir, list);
|
|
210
|
+
}
|
|
211
|
+
globCoverage.set(glob, covered);
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
members: members.map((member) => {
|
|
215
|
+
const own = matchedGlobs.get(member.dir) ?? [];
|
|
216
|
+
return { ...member, family: own.some((glob) => glob.includes('*')), globs: own };
|
|
217
|
+
}),
|
|
218
|
+
globCoverage,
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The npm scopes those members are published under, sorted, each with its
|
|
223
|
+
* trailing slash — `['@endora-commerce/']` today.
|
|
224
|
+
*
|
|
225
|
+
* Derived rather than declared, because a second scope is exactly what feature
|
|
226
|
+
* 080 introduces and the one thing that must not happen is a guard that keeps
|
|
227
|
+
* answering about the first one. An unscoped member (`backend`, `admin`,
|
|
228
|
+
* `docs`) contributes no scope: nothing resolves it by specifier, so there is
|
|
229
|
+
* no link for a guard to classify.
|
|
230
|
+
*/
|
|
231
|
+
export function workspaceScopes(members) {
|
|
232
|
+
const scopes = new Set();
|
|
233
|
+
for (const member of members) {
|
|
234
|
+
const cut = member.name.indexOf('/');
|
|
235
|
+
if (member.name.startsWith('@') && cut > 0)
|
|
236
|
+
scopes.add(`${member.name.slice(0, cut)}/`);
|
|
237
|
+
}
|
|
238
|
+
return [...scopes].sort();
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* The module id a member declares about itself, or `null`.
|
|
242
|
+
*
|
|
243
|
+
* The `endora` block is the package's own statement, the same one
|
|
244
|
+
* `src/packages/installed-packages.ts` reads at boot, so a module package is
|
|
245
|
+
* recognised wherever the workspace globs put it and whatever its directory is
|
|
246
|
+
* called. Nothing here reads the npm name's spelling — a `mod-` prefix rule
|
|
247
|
+
* would be a derived fact written down (D-100).
|
|
248
|
+
*/
|
|
249
|
+
export function declaredModuleId(member) {
|
|
250
|
+
const endora = member.manifest['endora'];
|
|
251
|
+
if (typeof endora !== 'object' || endora === null || Array.isArray(endora))
|
|
252
|
+
return null;
|
|
253
|
+
const block = endora;
|
|
254
|
+
if (block['type'] !== 'module')
|
|
255
|
+
return null;
|
|
256
|
+
const id = block['id'];
|
|
257
|
+
return typeof id === 'string' && id.length > 0 ? id : null;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Every workspace member that declares itself a module, sorted by directory.
|
|
261
|
+
*
|
|
262
|
+
* Unfiltered by the manifest index on purpose, which is the one difference from
|
|
263
|
+
* `lib/module-roots.ts`'s package half: that derivation is answering "which
|
|
264
|
+
* *registered* modules live in a package", and a consumer outside the backend —
|
|
265
|
+
* the Tailwind source guard in `scripts/tailwind-source-scan.ts` — is answering
|
|
266
|
+
* "which packages can ship UI". A package that ships a screen before its
|
|
267
|
+
* manifest reaches the generated index still ships the screen.
|
|
268
|
+
*/
|
|
269
|
+
export function modulePackages(members) {
|
|
270
|
+
const packages = [];
|
|
271
|
+
for (const member of members) {
|
|
272
|
+
const moduleId = declaredModuleId(member);
|
|
273
|
+
if (moduleId === null)
|
|
274
|
+
continue;
|
|
275
|
+
packages.push({ dir: member.dir, name: member.name, moduleId });
|
|
276
|
+
}
|
|
277
|
+
return packages.sort((left, right) => left.dir.localeCompare(right.dir));
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Does a member declare itself a package whose sources are **admin UI**?
|
|
281
|
+
*
|
|
282
|
+
* The third value of the `endora.type` block, beside `'platform'` (the host)
|
|
283
|
+
* and `'module'` (a module package), and read the same way: the package's own
|
|
284
|
+
* statement about itself, over the members `pnpm-workspace.yaml` globs. Nothing
|
|
285
|
+
* here reads a directory or a name — `packages/admin-kit` and
|
|
286
|
+
* `@endora-commerce/admin-kit` appear in no predicate, which is what lets a
|
|
287
|
+
* second admin-ui package arrive under any name and be judged from its first
|
|
288
|
+
* commit (feature 091, P5c).
|
|
289
|
+
*
|
|
290
|
+
* ## Why this is not D-171's refused self-certification
|
|
291
|
+
*
|
|
292
|
+
* D-171 refused an `endora`-block field that would have **exempted** a package
|
|
293
|
+
* from `check:module-boundary`'s ledger: an exemption from a rule, issued by
|
|
294
|
+
* the party the rule measures. This declaration is the opposite direction. It
|
|
295
|
+
* puts the package *into* two populations — `i18n:hardcoded`'s walk and
|
|
296
|
+
* `check:admin-zones`' third `foreign-module-id` population — so declaring it
|
|
297
|
+
* buys obligations and nothing else, and the only thing an author gains by
|
|
298
|
+
* omitting it is that their hard-coded strings and their foreign module ids go
|
|
299
|
+
* unread.
|
|
300
|
+
*
|
|
301
|
+
* Forgetting it therefore has to fail loudly, and it does: `i18n:hardcoded`'s
|
|
302
|
+
* baseline is keyed by path and two-way, so a file that arrives in an
|
|
303
|
+
* undeclared package is a ledger entry naming a path the walk never opened —
|
|
304
|
+
* `drained`, exit 1 — in the same run. That is the property that makes a
|
|
305
|
+
* declaration safe here and an exemption unsafe there.
|
|
306
|
+
*/
|
|
307
|
+
export function declaresAdminUi(member) {
|
|
308
|
+
const endora = member.manifest['endora'];
|
|
309
|
+
if (typeof endora !== 'object' || endora === null || Array.isArray(endora))
|
|
310
|
+
return false;
|
|
311
|
+
return endora['type'] === 'admin-ui';
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Every workspace member that declares itself admin UI, sorted by directory.
|
|
315
|
+
*
|
|
316
|
+
* The shape {@link modulePackages} has, for the same reason: one derivation of
|
|
317
|
+
* "which packages ship admin code", so the two instruments that walk them
|
|
318
|
+
* cannot come to disagree about the population.
|
|
319
|
+
*/
|
|
320
|
+
export function adminUiPackages(members) {
|
|
321
|
+
return members
|
|
322
|
+
.filter((member) => declaresAdminUi(member))
|
|
323
|
+
.map((member) => ({ dir: member.dir, name: member.name }))
|
|
324
|
+
.sort((left, right) => left.dir.localeCompare(right.dir));
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Is this manifest a Next application — the shape the reference storefront has?
|
|
328
|
+
*
|
|
329
|
+
* A member qualifies by declaring `next` as a dependency **and** a `build`
|
|
330
|
+
* script that runs it. Both halves are needed: a package that merely depends on
|
|
331
|
+
* `next` may be a component library that peers on it, and a `build` script
|
|
332
|
+
* naming `next build` in a manifest that does not depend on `next` is a
|
|
333
|
+
* misconfiguration rather than an application.
|
|
334
|
+
*
|
|
335
|
+
* It lives here, beside the derivation of *which directories are members*,
|
|
336
|
+
* because two consumers ask the same question of the same population and a
|
|
337
|
+
* second copy of the predicate is two answers waiting to disagree about which
|
|
338
|
+
* application they are talking about: `new-storefront/reference.ts` resolves the
|
|
339
|
+
* storefront it copies, and `check-release-intent.ts` resolves the one whose
|
|
340
|
+
* dependency closure is the publication set (feature 104, FR-001).
|
|
341
|
+
*/
|
|
342
|
+
export function isNextApplication(manifest) {
|
|
343
|
+
const dependencies = manifest['dependencies'];
|
|
344
|
+
const scripts = manifest['scripts'];
|
|
345
|
+
const declaresNext = typeof dependencies === 'object' && dependencies !== null && 'next' in dependencies;
|
|
346
|
+
const build = typeof scripts === 'object' && scripts !== null
|
|
347
|
+
? scripts['build']
|
|
348
|
+
: undefined;
|
|
349
|
+
return declaresNext && typeof build === 'string' && /\bnext build\b/.test(build);
|
|
350
|
+
}
|
|
351
|
+
//# sourceMappingURL=workspace-packages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-packages.js","sourceRoot":"","sources":["../../src/lib/workspace-packages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA2BjC,6FAA6F;AAC7F,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL,QAAQ,CAAC,IAAY;YACnB,IAAI,CAAC;gBACH,OAAO,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YACpC,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,eAAe,CAAC,IAAY;YAC1B,IAAI,CAAC;gBACH,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;oBACvC,IAAI,CAAC;wBACH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;oBAClD,CAAC;oBAAC,MAAM,CAAC;wBACP,OAAO,KAAK,CAAC;oBACf,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;YAAC,MAAM,CAAC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