every-plugin 2.10.1 → 3.0.0-rc.3
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/bin/every-plugin-serve.mjs +12 -0
- package/bin/every-plugin.mjs +59 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/build/artifact-names.cjs +119 -0
- package/dist/build/artifact-names.cjs.map +1 -0
- package/dist/build/artifact-names.d.cts +68 -0
- package/dist/build/artifact-names.d.cts.map +1 -0
- package/dist/build/artifact-names.d.mts +68 -0
- package/dist/build/artifact-names.d.mts.map +1 -0
- package/dist/build/artifact-names.mjs +102 -0
- package/dist/build/artifact-names.mjs.map +1 -0
- package/dist/build/contract-types.cjs +89 -0
- package/dist/build/contract-types.cjs.map +1 -0
- package/dist/build/contract-types.mjs +81 -0
- package/dist/build/contract-types.mjs.map +1 -0
- package/dist/build/rspack/build-report-plugin.cjs +37 -0
- package/dist/build/rspack/build-report-plugin.cjs.map +1 -0
- package/dist/build/rspack/build-report-plugin.d.cts +18 -0
- package/dist/build/rspack/build-report-plugin.d.cts.map +1 -0
- package/dist/build/rspack/build-report-plugin.d.mts +18 -0
- package/dist/build/rspack/build-report-plugin.d.mts.map +1 -0
- package/dist/build/rspack/build-report-plugin.mjs +37 -0
- package/dist/build/rspack/build-report-plugin.mjs.map +1 -0
- package/dist/build/rspack/chunk-completeness-plugin.cjs +47 -0
- package/dist/build/rspack/chunk-completeness-plugin.cjs.map +1 -0
- package/dist/build/rspack/chunk-completeness-plugin.mjs +47 -0
- package/dist/build/rspack/chunk-completeness-plugin.mjs.map +1 -0
- package/dist/build/rspack/compose.cjs +69 -0
- package/dist/build/rspack/compose.cjs.map +1 -0
- package/dist/build/rspack/compose.d.cts +20 -0
- package/dist/build/rspack/compose.d.cts.map +1 -0
- package/dist/build/rspack/compose.d.mts +20 -0
- package/dist/build/rspack/compose.d.mts.map +1 -0
- package/dist/build/rspack/compose.mjs +65 -0
- package/dist/build/rspack/compose.mjs.map +1 -0
- package/dist/build/rspack/fix-mf-data-uri-plugin.cjs +11 -11
- package/dist/build/rspack/fix-mf-data-uri-plugin.cjs.map +1 -1
- package/dist/build/rspack/fix-mf-data-uri-plugin.d.cts +2 -0
- package/dist/build/rspack/fix-mf-data-uri-plugin.d.cts.map +1 -1
- package/dist/build/rspack/fix-mf-data-uri-plugin.d.mts +2 -0
- package/dist/build/rspack/fix-mf-data-uri-plugin.d.mts.map +1 -1
- package/dist/build/rspack/fix-mf-data-uri-plugin.mjs +11 -10
- package/dist/build/rspack/fix-mf-data-uri-plugin.mjs.map +1 -1
- package/dist/build/rspack/generated-config.cjs +35 -0
- package/dist/build/rspack/generated-config.cjs.map +1 -0
- package/dist/build/rspack/generated-config.mjs +32 -0
- package/dist/build/rspack/generated-config.mjs.map +1 -0
- package/dist/build/rspack/index.cjs +8 -5
- package/dist/build/rspack/index.d.cts +5 -3
- package/dist/build/rspack/index.d.mts +5 -3
- package/dist/build/rspack/index.mjs +5 -3
- package/dist/build/rspack/module-federation.cjs +2 -2
- package/dist/build/rspack/module-federation.cjs.map +1 -1
- package/dist/build/rspack/module-federation.mjs +1 -1
- package/dist/build/rspack/module-federation.mjs.map +1 -1
- package/dist/build/rspack/plugin.cjs +44 -69
- package/dist/build/rspack/plugin.cjs.map +1 -1
- package/dist/build/rspack/plugin.d.cts +4 -13
- package/dist/build/rspack/plugin.d.cts.map +1 -1
- package/dist/build/rspack/plugin.d.mts +4 -13
- package/dist/build/rspack/plugin.d.mts.map +1 -1
- package/dist/build/rspack/plugin.mjs +44 -69
- package/dist/build/rspack/plugin.mjs.map +1 -1
- package/dist/build/rspack/utils.cjs +7 -5
- package/dist/build/rspack/utils.cjs.map +1 -1
- package/dist/build/rspack/utils.mjs +7 -6
- package/dist/build/rspack/utils.mjs.map +1 -1
- package/dist/build/ui/factory.cjs +88 -0
- package/dist/build/ui/factory.cjs.map +1 -0
- package/dist/build/ui/factory.d.cts +11 -0
- package/dist/build/ui/factory.d.cts.map +1 -0
- package/dist/build/ui/factory.d.mts +11 -0
- package/dist/build/ui/factory.d.mts.map +1 -0
- package/dist/build/ui/factory.mjs +80 -0
- package/dist/build/ui/factory.mjs.map +1 -0
- package/dist/build/ui/generated-config.cjs +118 -0
- package/dist/build/ui/generated-config.cjs.map +1 -0
- package/dist/build/ui/generated-config.d.cts +33 -0
- package/dist/build/ui/generated-config.d.cts.map +1 -0
- package/dist/build/ui/generated-config.d.mts +33 -0
- package/dist/build/ui/generated-config.d.mts.map +1 -0
- package/dist/build/ui/generated-config.mjs +111 -0
- package/dist/build/ui/generated-config.mjs.map +1 -0
- package/dist/build/ui/hash-artifacts-plugin.cjs +61 -0
- package/dist/build/ui/hash-artifacts-plugin.cjs.map +1 -0
- package/dist/build/ui/hash-artifacts-plugin.d.cts +20 -0
- package/dist/build/ui/hash-artifacts-plugin.d.cts.map +1 -0
- package/dist/build/ui/hash-artifacts-plugin.d.mts +20 -0
- package/dist/build/ui/hash-artifacts-plugin.d.mts.map +1 -0
- package/dist/build/ui/hash-artifacts-plugin.mjs +58 -0
- package/dist/build/ui/hash-artifacts-plugin.mjs.map +1 -0
- package/dist/build/ui/index.cjs +90 -0
- package/dist/build/ui/index.cjs.map +1 -0
- package/dist/build/ui/index.d.cts +29 -0
- package/dist/build/ui/index.d.cts.map +1 -0
- package/dist/build/ui/index.d.mts +29 -0
- package/dist/build/ui/index.d.mts.map +1 -0
- package/dist/build/ui/index.mjs +68 -0
- package/dist/build/ui/index.mjs.map +1 -0
- package/dist/build/ui/manifest-plugin.cjs +37 -0
- package/dist/build/ui/manifest-plugin.cjs.map +1 -0
- package/dist/build/ui/manifest-plugin.d.cts +19 -0
- package/dist/build/ui/manifest-plugin.d.cts.map +1 -0
- package/dist/build/ui/manifest-plugin.d.mts +19 -0
- package/dist/build/ui/manifest-plugin.d.mts.map +1 -0
- package/dist/build/ui/manifest-plugin.mjs +37 -0
- package/dist/build/ui/manifest-plugin.mjs.map +1 -0
- package/dist/build/ui/rsbuild-config.cjs +203 -0
- package/dist/build/ui/rsbuild-config.cjs.map +1 -0
- package/dist/build/ui/rsbuild-config.d.cts +45 -0
- package/dist/build/ui/rsbuild-config.d.cts.map +1 -0
- package/dist/build/ui/rsbuild-config.d.mts +45 -0
- package/dist/build/ui/rsbuild-config.d.mts.map +1 -0
- package/dist/build/ui/rsbuild-config.mjs +200 -0
- package/dist/build/ui/rsbuild-config.mjs.map +1 -0
- package/dist/build/ui/stubs.cjs +107 -0
- package/dist/build/ui/stubs.cjs.map +1 -0
- package/dist/build/ui/stubs.d.cts +25 -0
- package/dist/build/ui/stubs.d.cts.map +1 -0
- package/dist/build/ui/stubs.d.mts +25 -0
- package/dist/build/ui/stubs.d.mts.map +1 -0
- package/dist/build/ui/stubs.mjs +106 -0
- package/dist/build/ui/stubs.mjs.map +1 -0
- package/dist/cli.cjs +83 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +6 -0
- package/dist/cli.d.cts.map +1 -0
- package/dist/cli.d.mts +6 -0
- package/dist/cli.d.mts.map +1 -0
- package/dist/cli.mjs +82 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/dev/serve.cjs +390 -0
- package/dist/dev/serve.cjs.map +1 -0
- package/dist/dev/serve.d.cts +23 -0
- package/dist/dev/serve.d.cts.map +1 -0
- package/dist/dev/serve.d.mts +23 -0
- package/dist/dev/serve.d.mts.map +1 -0
- package/dist/dev/serve.mjs +384 -0
- package/dist/dev/serve.mjs.map +1 -0
- package/dist/dev/watch-kill.cjs +39 -0
- package/dist/dev/watch-kill.cjs.map +1 -0
- package/dist/dev/watch-kill.mjs +38 -0
- package/dist/dev/watch-kill.mjs.map +1 -0
- package/dist/effect-helpers.cjs +23 -0
- package/dist/effect-helpers.cjs.map +1 -0
- package/dist/effect-helpers.d.cts +20 -0
- package/dist/effect-helpers.d.cts.map +1 -0
- package/dist/effect-helpers.d.mts +20 -0
- package/dist/effect-helpers.d.mts.map +1 -0
- package/dist/effect-helpers.mjs +22 -0
- package/dist/effect-helpers.mjs.map +1 -0
- package/dist/errors.cjs +50 -69
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +13 -96
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.mts +13 -96
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +16 -34
- package/dist/errors.mjs.map +1 -1
- package/dist/identity.cjs +19 -0
- package/dist/identity.cjs.map +1 -0
- package/dist/identity.d.cts +33 -0
- package/dist/identity.d.cts.map +1 -0
- package/dist/identity.d.mts +33 -0
- package/dist/identity.d.mts.map +1 -0
- package/dist/identity.mjs +16 -0
- package/dist/identity.mjs.map +1 -0
- package/dist/index.cjs +9 -5
- package/dist/index.d.cts +8 -6
- package/dist/index.d.mts +8 -6
- package/dist/index.mjs +6 -4
- package/dist/plugin.cjs +13 -26
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +57 -24
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +58 -25
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +16 -29
- package/dist/plugin.mjs.map +1 -1
- package/dist/remote-entry.cjs +103 -0
- package/dist/remote-entry.cjs.map +1 -0
- package/dist/remote-entry.d.cts +53 -0
- package/dist/remote-entry.d.cts.map +1 -0
- package/dist/remote-entry.d.mts +53 -0
- package/dist/remote-entry.d.mts.map +1 -0
- package/dist/remote-entry.mjs +98 -0
- package/dist/remote-entry.mjs.map +1 -0
- package/dist/runtime/errors.cjs +159 -33
- package/dist/runtime/errors.cjs.map +1 -1
- package/dist/runtime/errors.d.cts +64 -7
- package/dist/runtime/errors.d.cts.map +1 -1
- package/dist/runtime/errors.d.mts +64 -7
- package/dist/runtime/errors.d.mts.map +1 -1
- package/dist/runtime/errors.mjs +154 -30
- package/dist/runtime/errors.mjs.map +1 -1
- package/dist/runtime/index.cjs +95 -23
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.d.cts +16 -0
- package/dist/runtime/index.d.cts.map +1 -1
- package/dist/runtime/index.d.mts +16 -0
- package/dist/runtime/index.d.mts.map +1 -1
- package/dist/runtime/index.mjs +98 -26
- package/dist/runtime/index.mjs.map +1 -1
- package/dist/runtime/mf-config.cjs +3 -78
- package/dist/runtime/mf-config.cjs.map +1 -1
- package/dist/runtime/mf-config.d.cts +3 -49
- package/dist/runtime/mf-config.d.cts.map +1 -1
- package/dist/runtime/mf-config.d.mts +3 -49
- package/dist/runtime/mf-config.d.mts.map +1 -1
- package/dist/runtime/mf-config.mjs +5 -78
- package/dist/runtime/mf-config.mjs.map +1 -1
- package/dist/runtime/services/module-federation.service.cjs +57 -12
- package/dist/runtime/services/module-federation.service.cjs.map +1 -1
- package/dist/runtime/services/module-federation.service.d.cts +4 -13
- package/dist/runtime/services/module-federation.service.d.mts +4 -13
- package/dist/runtime/services/module-federation.service.mjs +57 -14
- package/dist/runtime/services/module-federation.service.mjs.map +1 -1
- package/dist/runtime/services/normalize.cjs +2 -22
- package/dist/runtime/services/normalize.d.cts +2 -21
- package/dist/runtime/services/normalize.d.mts +2 -21
- package/dist/runtime/services/normalize.mjs +2 -21
- package/dist/runtime/services/plugin-lifecycle.service.cjs +9 -11
- package/dist/runtime/services/plugin-lifecycle.service.cjs.map +1 -1
- package/dist/runtime/services/plugin-lifecycle.service.d.cts +3 -16
- package/dist/runtime/services/plugin-lifecycle.service.d.mts +3 -16
- package/dist/runtime/services/plugin-lifecycle.service.mjs +10 -13
- package/dist/runtime/services/plugin-lifecycle.service.mjs.map +1 -1
- package/dist/runtime/services/plugin-loader.service.cjs +56 -30
- package/dist/runtime/services/plugin-loader.service.cjs.map +1 -1
- package/dist/runtime/services/plugin-loader.service.d.cts +6 -53
- package/dist/runtime/services/plugin-loader.service.d.mts +6 -53
- package/dist/runtime/services/plugin-loader.service.mjs +55 -31
- package/dist/runtime/services/plugin-loader.service.mjs.map +1 -1
- package/dist/runtime/services/plugin.service.cjs +10 -12
- package/dist/runtime/services/plugin.service.cjs.map +1 -1
- package/dist/runtime/services/plugin.service.d.cts +14 -36
- package/dist/runtime/services/plugin.service.d.cts.map +1 -1
- package/dist/runtime/services/plugin.service.d.mts +14 -36
- package/dist/runtime/services/plugin.service.d.mts.map +1 -1
- package/dist/runtime/services/plugin.service.mjs +14 -18
- package/dist/runtime/services/plugin.service.mjs.map +1 -1
- package/dist/runtime/services/secrets.service.cjs +12 -12
- package/dist/runtime/services/secrets.service.cjs.map +1 -1
- package/dist/runtime/services/secrets.service.d.cts +3 -15
- package/dist/runtime/services/secrets.service.d.mts +3 -15
- package/dist/runtime/services/secrets.service.mjs +12 -13
- package/dist/runtime/services/secrets.service.mjs.map +1 -1
- package/dist/runtime/services/shared-identity.cjs +40 -0
- package/dist/runtime/services/shared-identity.cjs.map +1 -0
- package/dist/runtime/services/shared-identity.mjs +38 -0
- package/dist/runtime/services/shared-identity.mjs.map +1 -0
- package/dist/runtime/validation.cjs +2 -2
- package/dist/runtime/validation.cjs.map +1 -1
- package/dist/runtime/validation.mjs +2 -2
- package/dist/runtime/validation.mjs.map +1 -1
- package/dist/shared-deps-spec.cjs +384 -0
- package/dist/shared-deps-spec.cjs.map +1 -0
- package/dist/shared-deps-spec.d.cts +182 -0
- package/dist/shared-deps-spec.d.cts.map +1 -0
- package/dist/shared-deps-spec.d.mts +182 -0
- package/dist/shared-deps-spec.d.mts.map +1 -0
- package/dist/shared-deps-spec.mjs +368 -0
- package/dist/shared-deps-spec.mjs.map +1 -0
- package/dist/types.d.cts +25 -41
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +25 -41
- package/dist/types.d.mts.map +1 -1
- package/dist/ui/manifest/construct.cjs +268 -0
- package/dist/ui/manifest/construct.cjs.map +1 -0
- package/dist/ui/manifest/construct.d.cts +48 -0
- package/dist/ui/manifest/construct.d.cts.map +1 -0
- package/dist/ui/manifest/construct.d.mts +48 -0
- package/dist/ui/manifest/construct.d.mts.map +1 -0
- package/dist/ui/manifest/construct.mjs +268 -0
- package/dist/ui/manifest/construct.mjs.map +1 -0
- package/dist/ui/manifest/contract.cjs +34 -0
- package/dist/ui/manifest/contract.cjs.map +1 -0
- package/dist/ui/manifest/contract.d.cts +26 -0
- package/dist/ui/manifest/contract.d.cts.map +1 -0
- package/dist/ui/manifest/contract.d.mts +26 -0
- package/dist/ui/manifest/contract.d.mts.map +1 -0
- package/dist/ui/manifest/contract.mjs +26 -0
- package/dist/ui/manifest/contract.mjs.map +1 -0
- package/dist/ui/manifest/descriptor.cjs +64 -0
- package/dist/ui/manifest/descriptor.cjs.map +1 -0
- package/dist/ui/manifest/descriptor.d.cts +60 -0
- package/dist/ui/manifest/descriptor.d.cts.map +1 -0
- package/dist/ui/manifest/descriptor.d.mts +60 -0
- package/dist/ui/manifest/descriptor.d.mts.map +1 -0
- package/dist/ui/manifest/descriptor.mjs +61 -0
- package/dist/ui/manifest/descriptor.mjs.map +1 -0
- package/dist/ui/manifest/generator.cjs +128 -0
- package/dist/ui/manifest/generator.cjs.map +1 -0
- package/dist/ui/manifest/generator.d.cts +41 -0
- package/dist/ui/manifest/generator.d.cts.map +1 -0
- package/dist/ui/manifest/generator.d.mts +41 -0
- package/dist/ui/manifest/generator.d.mts.map +1 -0
- package/dist/ui/manifest/generator.mjs +125 -0
- package/dist/ui/manifest/generator.mjs.map +1 -0
- package/dist/ui/manifest/index.cjs +35 -0
- package/dist/ui/manifest/index.d.cts +9 -0
- package/dist/ui/manifest/index.d.mts +9 -0
- package/dist/ui/manifest/index.mjs +9 -0
- package/dist/ui/manifest/manifest-schema.cjs +97 -0
- package/dist/ui/manifest/manifest-schema.cjs.map +1 -0
- package/dist/ui/manifest/manifest-schema.d.cts +132 -0
- package/dist/ui/manifest/manifest-schema.d.cts.map +1 -0
- package/dist/ui/manifest/manifest-schema.d.mts +132 -0
- package/dist/ui/manifest/manifest-schema.d.mts.map +1 -0
- package/dist/ui/manifest/manifest-schema.mjs +90 -0
- package/dist/ui/manifest/manifest-schema.mjs.map +1 -0
- package/dist/ui/manifest/mount-registry.cjs +52 -0
- package/dist/ui/manifest/mount-registry.cjs.map +1 -0
- package/dist/ui/manifest/mount-registry.d.cts +61 -0
- package/dist/ui/manifest/mount-registry.d.cts.map +1 -0
- package/dist/ui/manifest/mount-registry.d.mts +61 -0
- package/dist/ui/manifest/mount-registry.d.mts.map +1 -0
- package/dist/ui/manifest/mount-registry.mjs +48 -0
- package/dist/ui/manifest/mount-registry.mjs.map +1 -0
- package/dist/ui/manifest/nav.cjs +13 -0
- package/dist/ui/manifest/nav.cjs.map +1 -0
- package/dist/ui/manifest/nav.d.cts +34 -0
- package/dist/ui/manifest/nav.d.cts.map +1 -0
- package/dist/ui/manifest/nav.d.mts +34 -0
- package/dist/ui/manifest/nav.d.mts.map +1 -0
- package/dist/ui/manifest/nav.mjs +13 -0
- package/dist/ui/manifest/nav.mjs.map +1 -0
- package/dist/ui/manifest/route-config.cjs +33 -0
- package/dist/ui/manifest/route-config.cjs.map +1 -0
- package/dist/ui/manifest/route-config.d.cts +40 -0
- package/dist/ui/manifest/route-config.d.cts.map +1 -0
- package/dist/ui/manifest/route-config.d.mts +40 -0
- package/dist/ui/manifest/route-config.d.mts.map +1 -0
- package/dist/ui/manifest/route-config.mjs +33 -0
- package/dist/ui/manifest/route-config.mjs.map +1 -0
- package/dist/version-manifest.cjs +65 -0
- package/dist/version-manifest.cjs.map +1 -0
- package/dist/version-manifest.d.cts +52 -0
- package/dist/version-manifest.d.cts.map +1 -0
- package/dist/version-manifest.d.mts +52 -0
- package/dist/version-manifest.d.mts.map +1 -0
- package/dist/version-manifest.mjs +63 -0
- package/dist/version-manifest.mjs.map +1 -0
- package/package.json +165 -68
- package/skills/plugin-client/SKILL.md +24 -5
- package/skills/plugin-development/SKILL.md +79 -47
- package/skills/plugin-testing/SKILL.md +41 -12
- package/src/build/artifact-names.ts +117 -0
- package/src/build/contract-types.ts +101 -0
- package/src/build/rspack/build-report-plugin.ts +34 -0
- package/src/build/rspack/chunk-completeness-plugin.ts +57 -0
- package/src/build/rspack/compose.ts +87 -0
- package/src/build/rspack/fix-mf-data-uri-plugin.ts +23 -12
- package/src/build/rspack/generated-config.ts +35 -0
- package/src/build/rspack/index.ts +10 -5
- package/src/build/rspack/module-federation.ts +1 -1
- package/src/build/rspack/plugin.ts +103 -105
- package/src/build/rspack/utils.ts +8 -2
- package/src/build/ui/factory.ts +96 -0
- package/src/build/ui/generated-config.ts +133 -0
- package/src/build/ui/hash-artifacts-plugin.ts +79 -0
- package/src/build/ui/index.ts +98 -0
- package/src/build/ui/manifest-plugin.ts +54 -0
- package/src/build/ui/rsbuild-config.ts +256 -0
- package/src/build/ui/stubs.ts +103 -0
- package/src/cli.ts +100 -0
- package/src/dev/serve.ts +477 -0
- package/src/dev/watch-kill.ts +58 -0
- package/src/effect-helpers.ts +25 -0
- package/src/errors.ts +17 -18
- package/src/identity.ts +36 -0
- package/src/index.ts +4 -0
- package/src/plugin.ts +88 -91
- package/src/remote-entry.ts +171 -0
- package/src/runtime/errors.ts +229 -26
- package/src/runtime/index.ts +132 -43
- package/src/runtime/mf-config.ts +12 -107
- package/src/runtime/services/module-federation.service.ts +218 -117
- package/src/runtime/services/normalize.ts +1 -18
- package/src/runtime/services/plugin-lifecycle.service.ts +66 -75
- package/src/runtime/services/plugin-loader.service.ts +271 -212
- package/src/runtime/services/plugin.service.ts +61 -43
- package/src/runtime/services/secrets.service.ts +20 -15
- package/src/runtime/services/shared-identity.ts +68 -0
- package/src/runtime/validation.ts +5 -7
- package/src/shared-deps-spec.ts +478 -0
- package/src/types.ts +25 -48
- package/src/ui/manifest/construct.ts +403 -0
- package/src/ui/manifest/contract.ts +33 -0
- package/src/ui/manifest/descriptor.ts +96 -0
- package/src/ui/manifest/generator.ts +238 -0
- package/src/ui/manifest/index.ts +55 -0
- package/src/ui/manifest/manifest-schema.ts +107 -0
- package/src/ui/manifest/mount-registry.ts +50 -0
- package/src/ui/manifest/nav.ts +43 -0
- package/src/ui/manifest/route-config.ts +82 -0
- package/src/version-manifest.ts +88 -0
- package/dist/build/rspack/dev-server-middleware.cjs +0 -248
- package/dist/build/rspack/dev-server-middleware.cjs.map +0 -1
- package/dist/build/rspack/dev-server-middleware.mjs +0 -247
- package/dist/build/rspack/dev-server-middleware.mjs.map +0 -1
- package/dist/build/shared-deps.cjs +0 -83
- package/dist/build/shared-deps.cjs.map +0 -1
- package/dist/build/shared-deps.d.cts +0 -67
- package/dist/build/shared-deps.d.cts.map +0 -1
- package/dist/build/shared-deps.d.mts +0 -67
- package/dist/build/shared-deps.d.mts.map +0 -1
- package/dist/build/shared-deps.mjs +0 -79
- package/dist/build/shared-deps.mjs.map +0 -1
- package/dist/effect.cjs +0 -9
- package/dist/effect.d.cts +0 -1
- package/dist/effect.d.mts +0 -1
- package/dist/effect.mjs +0 -3
- package/dist/orpc-openapi.cjs +0 -17
- package/dist/orpc-openapi.d.cts +0 -2
- package/dist/orpc-openapi.d.mts +0 -2
- package/dist/orpc-openapi.mjs +0 -5
- package/dist/orpc.cjs +0 -46
- package/dist/orpc.d.cts +0 -7
- package/dist/orpc.d.mts +0 -7
- package/dist/orpc.mjs +0 -11
- package/dist/package.cjs +0 -23
- package/dist/package.cjs.map +0 -1
- package/dist/package.mjs +0 -17
- package/dist/package.mjs.map +0 -1
- package/dist/runtime/services/module-federation.service.d.cts.map +0 -1
- package/dist/runtime/services/module-federation.service.d.mts.map +0 -1
- package/dist/runtime/services/normalize.cjs.map +0 -1
- package/dist/runtime/services/normalize.d.cts.map +0 -1
- package/dist/runtime/services/normalize.d.mts.map +0 -1
- package/dist/runtime/services/normalize.mjs.map +0 -1
- package/dist/runtime/services/plugin-lifecycle.service.d.cts.map +0 -1
- package/dist/runtime/services/plugin-lifecycle.service.d.mts.map +0 -1
- package/dist/runtime/services/plugin-loader.service.d.cts.map +0 -1
- package/dist/runtime/services/plugin-loader.service.d.mts.map +0 -1
- package/dist/runtime/services/secrets.service.d.cts.map +0 -1
- package/dist/runtime/services/secrets.service.d.mts.map +0 -1
- package/dist/testing/index.cjs +0 -57
- package/dist/testing/index.cjs.map +0 -1
- package/dist/testing/index.d.cts +0 -54
- package/dist/testing/index.d.cts.map +0 -1
- package/dist/testing/index.d.mts +0 -54
- package/dist/testing/index.d.mts.map +0 -1
- package/dist/testing/index.mjs +0 -55
- package/dist/testing/index.mjs.map +0 -1
- package/dist/zod-core.cjs +0 -9
- package/dist/zod-core.d.cts +0 -1
- package/dist/zod-core.d.mts +0 -1
- package/dist/zod-core.mjs +0 -3
- package/dist/zod.cjs +0 -11
- package/dist/zod.d.cts +0 -2
- package/dist/zod.d.mts +0 -2
- package/dist/zod.mjs +0 -3
- package/src/build/rspack/dev-server-middleware.ts +0 -324
- package/src/build/shared-deps.ts +0 -102
- package/src/effect.ts +0 -1
- package/src/orpc-openapi.ts +0 -2
- package/src/orpc.ts +0 -9
- package/src/testing/index.ts +0 -87
- package/src/testing/mocks/module-federation.service.ts +0 -41
- package/src/zod-core.ts +0 -1
- package/src/zod.ts +0 -3
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//#region src/ui/manifest/mount-registry.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Mount registry v2 — gates only, shape-free (ADR 0008 §3).
|
|
4
|
+
*
|
|
5
|
+
* A mount is a gate + a host-owned pathless layout position. It carries no
|
|
6
|
+
* product semantics (no "dashboard", no shell, no chrome) — plugins bring
|
|
7
|
+
* their own layouts and route freely inside their subtree. A mount is
|
|
8
|
+
* declared by a ROOT-level pathless layout file whose `_`-prefixed segment
|
|
9
|
+
* names the mount (`_public.tsx` → `public`); the generator derives it and
|
|
10
|
+
* validates it against this registry; gates are attached HOST-side at
|
|
11
|
+
* construction, so a plugin cannot ship a route that escapes its mount's
|
|
12
|
+
* gate (plugins never construct route objects).
|
|
13
|
+
*
|
|
14
|
+
* `org`/`team` are declared vocabulary (parameterized membership gates) but
|
|
15
|
+
* unimplemented — construction rejects them until they land.
|
|
16
|
+
*/
|
|
17
|
+
interface MountDef {
|
|
18
|
+
label: string;
|
|
19
|
+
gate: "none" | "session" | "admin" | "organization" | "team";
|
|
20
|
+
parameterized?: boolean;
|
|
21
|
+
implemented: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const MOUNT_REGISTRY: {
|
|
24
|
+
public: {
|
|
25
|
+
label: string;
|
|
26
|
+
gate: "none";
|
|
27
|
+
implemented: true;
|
|
28
|
+
};
|
|
29
|
+
authenticated: {
|
|
30
|
+
label: string;
|
|
31
|
+
gate: "session";
|
|
32
|
+
implemented: true;
|
|
33
|
+
};
|
|
34
|
+
admin: {
|
|
35
|
+
label: string;
|
|
36
|
+
gate: "admin";
|
|
37
|
+
implemented: true;
|
|
38
|
+
};
|
|
39
|
+
org: {
|
|
40
|
+
label: string;
|
|
41
|
+
gate: "organization";
|
|
42
|
+
parameterized: true;
|
|
43
|
+
implemented: false;
|
|
44
|
+
};
|
|
45
|
+
team: {
|
|
46
|
+
label: string;
|
|
47
|
+
gate: "team";
|
|
48
|
+
parameterized: true;
|
|
49
|
+
implemented: false;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
type MountId = Extract<keyof typeof MOUNT_REGISTRY, string>;
|
|
53
|
+
declare const MOUNTS: MountId[];
|
|
54
|
+
/** Bump when the registry shape changes — invalidates all compose digests. */
|
|
55
|
+
declare const MOUNT_REGISTRY_VERSION = 5;
|
|
56
|
+
/** Migration aliases: legacy `_`-segment names → canonical mounts. */
|
|
57
|
+
declare const MOUNT_ALIASES: Record<string, MountId>;
|
|
58
|
+
declare function resolveMountSegment(segment: string): MountId | undefined;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { MOUNTS, MOUNT_ALIASES, MOUNT_REGISTRY, MOUNT_REGISTRY_VERSION, MountDef, MountId, resolveMountSegment };
|
|
61
|
+
//# sourceMappingURL=mount-registry.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mount-registry.d.mts","names":[],"sources":["../../../src/ui/manifest/mount-registry.ts"],"mappings":";;;;;;;;;;;;;;;;UAgBiB;EACf;EACA;EACA;EACA;;cAGW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQD,UAAU,qBAAqB;cAE9B,QAAwC;;cAGxC;;cAGA,eAAe,eAAe;iBAO3B,oBAAoB,kBAAkB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//#region src/ui/manifest/mount-registry.ts
|
|
2
|
+
const MOUNT_REGISTRY = {
|
|
3
|
+
public: {
|
|
4
|
+
label: "public",
|
|
5
|
+
gate: "none",
|
|
6
|
+
implemented: true
|
|
7
|
+
},
|
|
8
|
+
authenticated: {
|
|
9
|
+
label: "authenticated",
|
|
10
|
+
gate: "session",
|
|
11
|
+
implemented: true
|
|
12
|
+
},
|
|
13
|
+
admin: {
|
|
14
|
+
label: "admin",
|
|
15
|
+
gate: "admin",
|
|
16
|
+
implemented: true
|
|
17
|
+
},
|
|
18
|
+
org: {
|
|
19
|
+
label: "org",
|
|
20
|
+
gate: "organization",
|
|
21
|
+
parameterized: true,
|
|
22
|
+
implemented: false
|
|
23
|
+
},
|
|
24
|
+
team: {
|
|
25
|
+
label: "team",
|
|
26
|
+
gate: "team",
|
|
27
|
+
parameterized: true,
|
|
28
|
+
implemented: false
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const MOUNTS = Object.keys(MOUNT_REGISTRY);
|
|
32
|
+
/** Bump when the registry shape changes — invalidates all compose digests. */
|
|
33
|
+
const MOUNT_REGISTRY_VERSION = 5;
|
|
34
|
+
/** Migration aliases: legacy `_`-segment names → canonical mounts. */
|
|
35
|
+
const MOUNT_ALIASES = {
|
|
36
|
+
auth: "authenticated",
|
|
37
|
+
authed: "authenticated",
|
|
38
|
+
dashboard: "authenticated",
|
|
39
|
+
organization: "org"
|
|
40
|
+
};
|
|
41
|
+
function resolveMountSegment(segment) {
|
|
42
|
+
if (segment in MOUNT_REGISTRY) return segment;
|
|
43
|
+
return MOUNT_ALIASES[segment];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//#endregion
|
|
47
|
+
export { MOUNTS, MOUNT_ALIASES, MOUNT_REGISTRY, MOUNT_REGISTRY_VERSION, resolveMountSegment };
|
|
48
|
+
//# sourceMappingURL=mount-registry.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mount-registry.mjs","names":[],"sources":["../../../src/ui/manifest/mount-registry.ts"],"sourcesContent":["/**\n * Mount registry v2 — gates only, shape-free (ADR 0008 §3).\n *\n * A mount is a gate + a host-owned pathless layout position. It carries no\n * product semantics (no \"dashboard\", no shell, no chrome) — plugins bring\n * their own layouts and route freely inside their subtree. A mount is\n * declared by a ROOT-level pathless layout file whose `_`-prefixed segment\n * names the mount (`_public.tsx` → `public`); the generator derives it and\n * validates it against this registry; gates are attached HOST-side at\n * construction, so a plugin cannot ship a route that escapes its mount's\n * gate (plugins never construct route objects).\n *\n * `org`/`team` are declared vocabulary (parameterized membership gates) but\n * unimplemented — construction rejects them until they land.\n */\n\nexport interface MountDef {\n label: string;\n gate: \"none\" | \"session\" | \"admin\" | \"organization\" | \"team\";\n parameterized?: boolean;\n implemented: boolean;\n}\n\nexport const MOUNT_REGISTRY = {\n public: { label: \"public\", gate: \"none\", implemented: true },\n authenticated: { label: \"authenticated\", gate: \"session\", implemented: true },\n admin: { label: \"admin\", gate: \"admin\", implemented: true },\n org: { label: \"org\", gate: \"organization\", parameterized: true, implemented: false },\n team: { label: \"team\", gate: \"team\", parameterized: true, implemented: false },\n} satisfies Record<string, MountDef>;\n\nexport type MountId = Extract<keyof typeof MOUNT_REGISTRY, string>;\n\nexport const MOUNTS = Object.keys(MOUNT_REGISTRY) as MountId[];\n\n/** Bump when the registry shape changes — invalidates all compose digests. */\nexport const MOUNT_REGISTRY_VERSION = 5;\n\n/** Migration aliases: legacy `_`-segment names → canonical mounts. */\nexport const MOUNT_ALIASES: Record<string, MountId> = {\n auth: \"authenticated\",\n authed: \"authenticated\",\n dashboard: \"authenticated\",\n organization: \"org\",\n};\n\nexport function resolveMountSegment(segment: string): MountId | undefined {\n if (segment in MOUNT_REGISTRY) return segment as MountId;\n return MOUNT_ALIASES[segment];\n}\n"],"mappings":";AAuBA,MAAa,iBAAiB;CAC5B,QAAQ;EAAE,OAAO;EAAU,MAAM;EAAQ,aAAa;CAAK;CAC3D,eAAe;EAAE,OAAO;EAAiB,MAAM;EAAW,aAAa;CAAK;CAC5E,OAAO;EAAE,OAAO;EAAS,MAAM;EAAS,aAAa;CAAK;CAC1D,KAAK;EAAE,OAAO;EAAO,MAAM;EAAgB,eAAe;EAAM,aAAa;CAAM;CACnF,MAAM;EAAE,OAAO;EAAQ,MAAM;EAAQ,eAAe;EAAM,aAAa;CAAM;AAC/E;AAIA,MAAa,SAAS,OAAO,KAAK,cAAc;;AAGhD,MAAa,yBAAyB;;AAGtC,MAAa,gBAAyC;CACpD,MAAM;CACN,QAAQ;CACR,WAAW;CACX,cAAc;AAChB;AAEA,SAAgB,oBAAoB,SAAsC;CACxE,IAAI,WAAW,gBAAgB,OAAO;CACtC,OAAO,cAAc;AACvB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/ui/manifest/nav.ts
|
|
2
|
+
function compareNavItems(a, b) {
|
|
3
|
+
const groupOrder = (a.group ?? "").localeCompare(b.group ?? "");
|
|
4
|
+
if (groupOrder !== 0) return groupOrder;
|
|
5
|
+
if (a.order !== void 0 || b.order !== void 0) return (a.order ?? Number.MAX_SAFE_INTEGER) - (b.order ?? Number.MAX_SAFE_INTEGER);
|
|
6
|
+
const labelOrder = a.label.localeCompare(b.label);
|
|
7
|
+
if (labelOrder !== 0) return labelOrder;
|
|
8
|
+
return a.id.localeCompare(b.id);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.compareNavItems = compareNavItems;
|
|
13
|
+
//# sourceMappingURL=nav.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.cjs","names":[],"sources":["../../../src/ui/manifest/nav.ts"],"sourcesContent":["/**\n * Nav manifest derived at construction from composed routes' `staticData.nav`\n * declarations (ADR 0008). Shape-compatible with the sidebar consumption\n * surface (`ui/src/components/layout/nav-items.ts`).\n */\n\nexport interface NavItem {\n /** unique item id: `${pluginKey}:${routeId}` */\n id: string;\n label: string;\n icon?: string;\n group?: string;\n order?: number;\n /** absolute URL path — literal `$param` segments preserved */\n to: string;\n plugin: string;\n mount: string;\n}\n\nexport interface NavManifest {\n items: NavItem[];\n}\n\nexport interface NavDeclaration {\n label: string;\n icon?: string;\n group?: string;\n order?: number;\n to?: string;\n /** set true to expose the route as a page but omit it from the sidebar */\n hidden?: boolean;\n}\n\nexport function compareNavItems(a: NavItem, b: NavItem): number {\n const groupOrder = (a.group ?? \"\").localeCompare(b.group ?? \"\");\n if (groupOrder !== 0) return groupOrder;\n if (a.order !== undefined || b.order !== undefined) {\n return (a.order ?? Number.MAX_SAFE_INTEGER) - (b.order ?? Number.MAX_SAFE_INTEGER);\n }\n const labelOrder = a.label.localeCompare(b.label);\n if (labelOrder !== 0) return labelOrder;\n return a.id.localeCompare(b.id);\n}\n"],"mappings":";AAiCA,SAAgB,gBAAgB,GAAY,GAAoB;CAC9D,MAAM,cAAc,EAAE,SAAS,GAAE,CAAE,cAAc,EAAE,SAAS,EAAE;CAC9D,IAAI,eAAe,GAAG,OAAO;CAC7B,IAAI,EAAE,UAAU,UAAa,EAAE,UAAU,QACvC,QAAQ,EAAE,SAAS,OAAO,qBAAqB,EAAE,SAAS,OAAO;CAEnE,MAAM,aAAa,EAAE,MAAM,cAAc,EAAE,KAAK;CAChD,IAAI,eAAe,GAAG,OAAO;CAC7B,OAAO,EAAE,GAAG,cAAc,EAAE,EAAE;AAChC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/ui/manifest/nav.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Nav manifest derived at construction from composed routes' `staticData.nav`
|
|
4
|
+
* declarations (ADR 0008). Shape-compatible with the sidebar consumption
|
|
5
|
+
* surface (`ui/src/components/layout/nav-items.ts`).
|
|
6
|
+
*/
|
|
7
|
+
interface NavItem {
|
|
8
|
+
/** unique item id: `${pluginKey}:${routeId}` */
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
group?: string;
|
|
13
|
+
order?: number;
|
|
14
|
+
/** absolute URL path — literal `$param` segments preserved */
|
|
15
|
+
to: string;
|
|
16
|
+
plugin: string;
|
|
17
|
+
mount: string;
|
|
18
|
+
}
|
|
19
|
+
interface NavManifest {
|
|
20
|
+
items: NavItem[];
|
|
21
|
+
}
|
|
22
|
+
interface NavDeclaration {
|
|
23
|
+
label: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
group?: string;
|
|
26
|
+
order?: number;
|
|
27
|
+
to?: string;
|
|
28
|
+
/** set true to expose the route as a page but omit it from the sidebar */
|
|
29
|
+
hidden?: boolean;
|
|
30
|
+
}
|
|
31
|
+
declare function compareNavItems(a: NavItem, b: NavItem): number;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { NavDeclaration, NavItem, NavManifest, compareNavItems };
|
|
34
|
+
//# sourceMappingURL=nav.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.d.cts","names":[],"sources":["../../../src/ui/manifest/nav.ts"],"mappings":";;;;;;UAMiB;;EAEf;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;UAGe;EACf,OAAO;;UAGQ;EACf;EACA;EACA;EACA;EACA;;EAEA;;iBAGc,gBAAgB,GAAG,SAAS,GAAG"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/ui/manifest/nav.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Nav manifest derived at construction from composed routes' `staticData.nav`
|
|
4
|
+
* declarations (ADR 0008). Shape-compatible with the sidebar consumption
|
|
5
|
+
* surface (`ui/src/components/layout/nav-items.ts`).
|
|
6
|
+
*/
|
|
7
|
+
interface NavItem {
|
|
8
|
+
/** unique item id: `${pluginKey}:${routeId}` */
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
group?: string;
|
|
13
|
+
order?: number;
|
|
14
|
+
/** absolute URL path — literal `$param` segments preserved */
|
|
15
|
+
to: string;
|
|
16
|
+
plugin: string;
|
|
17
|
+
mount: string;
|
|
18
|
+
}
|
|
19
|
+
interface NavManifest {
|
|
20
|
+
items: NavItem[];
|
|
21
|
+
}
|
|
22
|
+
interface NavDeclaration {
|
|
23
|
+
label: string;
|
|
24
|
+
icon?: string;
|
|
25
|
+
group?: string;
|
|
26
|
+
order?: number;
|
|
27
|
+
to?: string;
|
|
28
|
+
/** set true to expose the route as a page but omit it from the sidebar */
|
|
29
|
+
hidden?: boolean;
|
|
30
|
+
}
|
|
31
|
+
declare function compareNavItems(a: NavItem, b: NavItem): number;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { NavDeclaration, NavItem, NavManifest, compareNavItems };
|
|
34
|
+
//# sourceMappingURL=nav.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.d.mts","names":[],"sources":["../../../src/ui/manifest/nav.ts"],"mappings":";;;;;;UAMiB;;EAEf;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;UAGe;EACf,OAAO;;UAGQ;EACf;EACA;EACA;EACA;EACA;;EAEA;;iBAGc,gBAAgB,GAAG,SAAS,GAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/ui/manifest/nav.ts
|
|
2
|
+
function compareNavItems(a, b) {
|
|
3
|
+
const groupOrder = (a.group ?? "").localeCompare(b.group ?? "");
|
|
4
|
+
if (groupOrder !== 0) return groupOrder;
|
|
5
|
+
if (a.order !== void 0 || b.order !== void 0) return (a.order ?? Number.MAX_SAFE_INTEGER) - (b.order ?? Number.MAX_SAFE_INTEGER);
|
|
6
|
+
const labelOrder = a.label.localeCompare(b.label);
|
|
7
|
+
if (labelOrder !== 0) return labelOrder;
|
|
8
|
+
return a.id.localeCompare(b.id);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { compareNavItems };
|
|
13
|
+
//# sourceMappingURL=nav.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.mjs","names":[],"sources":["../../../src/ui/manifest/nav.ts"],"sourcesContent":["/**\n * Nav manifest derived at construction from composed routes' `staticData.nav`\n * declarations (ADR 0008). Shape-compatible with the sidebar consumption\n * surface (`ui/src/components/layout/nav-items.ts`).\n */\n\nexport interface NavItem {\n /** unique item id: `${pluginKey}:${routeId}` */\n id: string;\n label: string;\n icon?: string;\n group?: string;\n order?: number;\n /** absolute URL path — literal `$param` segments preserved */\n to: string;\n plugin: string;\n mount: string;\n}\n\nexport interface NavManifest {\n items: NavItem[];\n}\n\nexport interface NavDeclaration {\n label: string;\n icon?: string;\n group?: string;\n order?: number;\n to?: string;\n /** set true to expose the route as a page but omit it from the sidebar */\n hidden?: boolean;\n}\n\nexport function compareNavItems(a: NavItem, b: NavItem): number {\n const groupOrder = (a.group ?? \"\").localeCompare(b.group ?? \"\");\n if (groupOrder !== 0) return groupOrder;\n if (a.order !== undefined || b.order !== undefined) {\n return (a.order ?? Number.MAX_SAFE_INTEGER) - (b.order ?? Number.MAX_SAFE_INTEGER);\n }\n const labelOrder = a.label.localeCompare(b.label);\n if (labelOrder !== 0) return labelOrder;\n return a.id.localeCompare(b.id);\n}\n"],"mappings":";AAiCA,SAAgB,gBAAgB,GAAY,GAAoB;CAC9D,MAAM,cAAc,EAAE,SAAS,GAAE,CAAE,cAAc,EAAE,SAAS,EAAE;CAC9D,IAAI,eAAe,GAAG,OAAO;CAC7B,IAAI,EAAE,UAAU,UAAa,EAAE,UAAU,QACvC,QAAQ,EAAE,SAAS,OAAO,qBAAqB,EAAE,SAAS,OAAO;CAEnE,MAAM,aAAa,EAAE,MAAM,cAAc,EAAE,KAAK;CAChD,IAAI,eAAe,GAAG,OAAO;CAC7B,OAAO,EAAE,GAAG,cAAc,EAAE,EAAE;AAChC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/ui/manifest/route-config.ts
|
|
2
|
+
/**
|
|
3
|
+
* Every authored route option carried from a route file onto its constructed
|
|
4
|
+
* route. The generated `pick` and `constructTree` both read this list, and
|
|
5
|
+
* the type check below fails when `RouteOptionsBundle` gains a key that is
|
|
6
|
+
* not listed here.
|
|
7
|
+
*/
|
|
8
|
+
const ROUTE_OPTION_KEYS = [
|
|
9
|
+
"validateSearch",
|
|
10
|
+
"search",
|
|
11
|
+
"params",
|
|
12
|
+
"loaderDeps",
|
|
13
|
+
"context",
|
|
14
|
+
"ssr",
|
|
15
|
+
"staleTime",
|
|
16
|
+
"gcTime",
|
|
17
|
+
"preloadStaleTime",
|
|
18
|
+
"pendingMs",
|
|
19
|
+
"pendingMinMs",
|
|
20
|
+
"shouldReload",
|
|
21
|
+
"loader",
|
|
22
|
+
"beforeLoad",
|
|
23
|
+
"head",
|
|
24
|
+
"staticData",
|
|
25
|
+
"component",
|
|
26
|
+
"errorComponent",
|
|
27
|
+
"pendingComponent",
|
|
28
|
+
"notFoundComponent"
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.ROUTE_OPTION_KEYS = ROUTE_OPTION_KEYS;
|
|
33
|
+
//# sourceMappingURL=route-config.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-config.cjs","names":[],"sources":["../../../src/ui/manifest/route-config.ts"],"sourcesContent":["/**\n * routeConfig.gen.ts contract — the generated import map (ADR 0008 §2).\n *\n * The generator emits one module per ui source exposing a loader per route\n * record: a dynamic import of that route's file, destructured to the option\n * bundle construction needs. Options and component live in the same route\n * file (standard authoring), so both arrive via the same per-route chunk.\n * The host consumes this module — source-resolved from disk in dev,\n * MF-exposed (`./routeConfig`) in production.\n */\n\nimport type { ReactNode } from \"react\";\n\nexport interface RouteHeadData {\n meta?: Array<Record<string, unknown>>;\n links?: Array<Record<string, unknown>>;\n scripts?: Array<Record<string, unknown>>;\n}\n\nexport interface RouteOptionsBundle {\n validateSearch?: any;\n search?: { middlewares?: Array<(...args: Array<any>) => any> };\n params?: any;\n loaderDeps?: (...args: Array<any>) => any;\n context?: (...args: Array<any>) => any;\n ssr?: any;\n staleTime?: number;\n gcTime?: number;\n preloadStaleTime?: number;\n pendingMs?: number;\n pendingMinMs?: number;\n shouldReload?: boolean | ((...args: Array<any>) => any);\n loader?: (...args: Array<any>) => any;\n beforeLoad?: (...args: Array<any>) => any;\n head?: (...args: Array<any>) => RouteHeadData;\n staticData?: Record<string, unknown>;\n component?: (props: any) => ReactNode;\n errorComponent?: (props: any) => ReactNode;\n pendingComponent?: (props: any) => ReactNode;\n notFoundComponent?: (props: any) => ReactNode;\n}\n\nexport type RouteConfigRef = () => Promise<RouteOptionsBundle>;\n\nexport type RouteConfigModule = {\n routeConfigLoaders: Record<string, RouteConfigRef>;\n /** Lifted `__root` meta, when the source declares it. */\n rootMeta?: RouteOptionsBundle;\n};\n\n/**\n * Every authored route option carried from a route file onto its constructed\n * route. The generated `pick` and `constructTree` both read this list, and\n * the type check below fails when `RouteOptionsBundle` gains a key that is\n * not listed here.\n */\nexport const ROUTE_OPTION_KEYS = [\n \"validateSearch\",\n \"search\",\n \"params\",\n \"loaderDeps\",\n \"context\",\n \"ssr\",\n \"staleTime\",\n \"gcTime\",\n \"preloadStaleTime\",\n \"pendingMs\",\n \"pendingMinMs\",\n \"shouldReload\",\n \"loader\",\n \"beforeLoad\",\n \"head\",\n \"staticData\",\n \"component\",\n \"errorComponent\",\n \"pendingComponent\",\n \"notFoundComponent\",\n] as const satisfies ReadonlyArray<keyof RouteOptionsBundle>;\n\ntype UnlistedRouteOptionKey = Exclude<keyof RouteOptionsBundle, (typeof ROUTE_OPTION_KEYS)[number]>;\nconst everyRouteOptionKeyListed: [UnlistedRouteOptionKey] extends [never] ? true : never = true;\nvoid everyRouteOptionKeyListed;\n"],"mappings":";;;;;;;AAwDA,MAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/ui/manifest/route-config.d.ts
|
|
3
|
+
interface RouteHeadData {
|
|
4
|
+
meta?: Array<Record<string, unknown>>;
|
|
5
|
+
links?: Array<Record<string, unknown>>;
|
|
6
|
+
scripts?: Array<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
interface RouteOptionsBundle {
|
|
9
|
+
validateSearch?: any;
|
|
10
|
+
search?: {
|
|
11
|
+
middlewares?: Array<(...args: Array<any>) => any>;
|
|
12
|
+
};
|
|
13
|
+
params?: any;
|
|
14
|
+
loaderDeps?: (...args: Array<any>) => any;
|
|
15
|
+
context?: (...args: Array<any>) => any;
|
|
16
|
+
ssr?: any;
|
|
17
|
+
staleTime?: number;
|
|
18
|
+
gcTime?: number;
|
|
19
|
+
preloadStaleTime?: number;
|
|
20
|
+
pendingMs?: number;
|
|
21
|
+
pendingMinMs?: number;
|
|
22
|
+
shouldReload?: boolean | ((...args: Array<any>) => any);
|
|
23
|
+
loader?: (...args: Array<any>) => any;
|
|
24
|
+
beforeLoad?: (...args: Array<any>) => any;
|
|
25
|
+
head?: (...args: Array<any>) => RouteHeadData;
|
|
26
|
+
staticData?: Record<string, unknown>;
|
|
27
|
+
component?: (props: any) => ReactNode;
|
|
28
|
+
errorComponent?: (props: any) => ReactNode;
|
|
29
|
+
pendingComponent?: (props: any) => ReactNode;
|
|
30
|
+
notFoundComponent?: (props: any) => ReactNode;
|
|
31
|
+
}
|
|
32
|
+
type RouteConfigRef = () => Promise<RouteOptionsBundle>;
|
|
33
|
+
type RouteConfigModule = {
|
|
34
|
+
routeConfigLoaders: Record<string, RouteConfigRef>;
|
|
35
|
+
/** Lifted `__root` meta, when the source declares it. */
|
|
36
|
+
rootMeta?: RouteOptionsBundle;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { RouteConfigModule, RouteConfigRef, RouteHeadData, RouteOptionsBundle };
|
|
40
|
+
//# sourceMappingURL=route-config.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-config.d.cts","names":[],"sources":["../../../src/ui/manifest/route-config.ts"],"mappings":";;UAaiB;EACf,OAAO,MAAM;EACb,QAAQ,MAAM;EACd,UAAU,MAAM;;UAGD;EACf;EACA;IAAW,cAAc,UAAU,MAAM;;EACzC;EACA,iBAAiB,MAAM;EACvB,cAAc,MAAM;EACpB;EACA;EACA;EACA;EACA;EACA;EACA,8BAA8B,MAAM;EACpC,aAAa,MAAM;EACnB,iBAAiB,MAAM;EACvB,WAAW,MAAM,eAAe;EAChC,aAAa;EACb,aAAa,eAAe;EAC5B,kBAAkB,eAAe;EACjC,oBAAoB,eAAe;EACnC,qBAAqB,eAAe;;KAG1B,uBAAuB,QAAQ;KAE/B;EACV,oBAAoB,eAAe;;EAEnC,WAAW"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/ui/manifest/route-config.d.ts
|
|
3
|
+
interface RouteHeadData {
|
|
4
|
+
meta?: Array<Record<string, unknown>>;
|
|
5
|
+
links?: Array<Record<string, unknown>>;
|
|
6
|
+
scripts?: Array<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
interface RouteOptionsBundle {
|
|
9
|
+
validateSearch?: any;
|
|
10
|
+
search?: {
|
|
11
|
+
middlewares?: Array<(...args: Array<any>) => any>;
|
|
12
|
+
};
|
|
13
|
+
params?: any;
|
|
14
|
+
loaderDeps?: (...args: Array<any>) => any;
|
|
15
|
+
context?: (...args: Array<any>) => any;
|
|
16
|
+
ssr?: any;
|
|
17
|
+
staleTime?: number;
|
|
18
|
+
gcTime?: number;
|
|
19
|
+
preloadStaleTime?: number;
|
|
20
|
+
pendingMs?: number;
|
|
21
|
+
pendingMinMs?: number;
|
|
22
|
+
shouldReload?: boolean | ((...args: Array<any>) => any);
|
|
23
|
+
loader?: (...args: Array<any>) => any;
|
|
24
|
+
beforeLoad?: (...args: Array<any>) => any;
|
|
25
|
+
head?: (...args: Array<any>) => RouteHeadData;
|
|
26
|
+
staticData?: Record<string, unknown>;
|
|
27
|
+
component?: (props: any) => ReactNode;
|
|
28
|
+
errorComponent?: (props: any) => ReactNode;
|
|
29
|
+
pendingComponent?: (props: any) => ReactNode;
|
|
30
|
+
notFoundComponent?: (props: any) => ReactNode;
|
|
31
|
+
}
|
|
32
|
+
type RouteConfigRef = () => Promise<RouteOptionsBundle>;
|
|
33
|
+
type RouteConfigModule = {
|
|
34
|
+
routeConfigLoaders: Record<string, RouteConfigRef>;
|
|
35
|
+
/** Lifted `__root` meta, when the source declares it. */
|
|
36
|
+
rootMeta?: RouteOptionsBundle;
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { RouteConfigModule, RouteConfigRef, RouteHeadData, RouteOptionsBundle };
|
|
40
|
+
//# sourceMappingURL=route-config.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-config.d.mts","names":[],"sources":["../../../src/ui/manifest/route-config.ts"],"mappings":";;UAaiB;EACf,OAAO,MAAM;EACb,QAAQ,MAAM;EACd,UAAU,MAAM;;UAGD;EACf;EACA;IAAW,cAAc,UAAU,MAAM;;EACzC;EACA,iBAAiB,MAAM;EACvB,cAAc,MAAM;EACpB;EACA;EACA;EACA;EACA;EACA;EACA,8BAA8B,MAAM;EACpC,aAAa,MAAM;EACnB,iBAAiB,MAAM;EACvB,WAAW,MAAM,eAAe;EAChC,aAAa;EACb,aAAa,eAAe;EAC5B,kBAAkB,eAAe;EACjC,oBAAoB,eAAe;EACnC,qBAAqB,eAAe;;KAG1B,uBAAuB,QAAQ;KAE/B;EACV,oBAAoB,eAAe;;EAEnC,WAAW"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/ui/manifest/route-config.ts
|
|
2
|
+
/**
|
|
3
|
+
* Every authored route option carried from a route file onto its constructed
|
|
4
|
+
* route. The generated `pick` and `constructTree` both read this list, and
|
|
5
|
+
* the type check below fails when `RouteOptionsBundle` gains a key that is
|
|
6
|
+
* not listed here.
|
|
7
|
+
*/
|
|
8
|
+
const ROUTE_OPTION_KEYS = [
|
|
9
|
+
"validateSearch",
|
|
10
|
+
"search",
|
|
11
|
+
"params",
|
|
12
|
+
"loaderDeps",
|
|
13
|
+
"context",
|
|
14
|
+
"ssr",
|
|
15
|
+
"staleTime",
|
|
16
|
+
"gcTime",
|
|
17
|
+
"preloadStaleTime",
|
|
18
|
+
"pendingMs",
|
|
19
|
+
"pendingMinMs",
|
|
20
|
+
"shouldReload",
|
|
21
|
+
"loader",
|
|
22
|
+
"beforeLoad",
|
|
23
|
+
"head",
|
|
24
|
+
"staticData",
|
|
25
|
+
"component",
|
|
26
|
+
"errorComponent",
|
|
27
|
+
"pendingComponent",
|
|
28
|
+
"notFoundComponent"
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { ROUTE_OPTION_KEYS };
|
|
33
|
+
//# sourceMappingURL=route-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-config.mjs","names":[],"sources":["../../../src/ui/manifest/route-config.ts"],"sourcesContent":["/**\n * routeConfig.gen.ts contract — the generated import map (ADR 0008 §2).\n *\n * The generator emits one module per ui source exposing a loader per route\n * record: a dynamic import of that route's file, destructured to the option\n * bundle construction needs. Options and component live in the same route\n * file (standard authoring), so both arrive via the same per-route chunk.\n * The host consumes this module — source-resolved from disk in dev,\n * MF-exposed (`./routeConfig`) in production.\n */\n\nimport type { ReactNode } from \"react\";\n\nexport interface RouteHeadData {\n meta?: Array<Record<string, unknown>>;\n links?: Array<Record<string, unknown>>;\n scripts?: Array<Record<string, unknown>>;\n}\n\nexport interface RouteOptionsBundle {\n validateSearch?: any;\n search?: { middlewares?: Array<(...args: Array<any>) => any> };\n params?: any;\n loaderDeps?: (...args: Array<any>) => any;\n context?: (...args: Array<any>) => any;\n ssr?: any;\n staleTime?: number;\n gcTime?: number;\n preloadStaleTime?: number;\n pendingMs?: number;\n pendingMinMs?: number;\n shouldReload?: boolean | ((...args: Array<any>) => any);\n loader?: (...args: Array<any>) => any;\n beforeLoad?: (...args: Array<any>) => any;\n head?: (...args: Array<any>) => RouteHeadData;\n staticData?: Record<string, unknown>;\n component?: (props: any) => ReactNode;\n errorComponent?: (props: any) => ReactNode;\n pendingComponent?: (props: any) => ReactNode;\n notFoundComponent?: (props: any) => ReactNode;\n}\n\nexport type RouteConfigRef = () => Promise<RouteOptionsBundle>;\n\nexport type RouteConfigModule = {\n routeConfigLoaders: Record<string, RouteConfigRef>;\n /** Lifted `__root` meta, when the source declares it. */\n rootMeta?: RouteOptionsBundle;\n};\n\n/**\n * Every authored route option carried from a route file onto its constructed\n * route. The generated `pick` and `constructTree` both read this list, and\n * the type check below fails when `RouteOptionsBundle` gains a key that is\n * not listed here.\n */\nexport const ROUTE_OPTION_KEYS = [\n \"validateSearch\",\n \"search\",\n \"params\",\n \"loaderDeps\",\n \"context\",\n \"ssr\",\n \"staleTime\",\n \"gcTime\",\n \"preloadStaleTime\",\n \"pendingMs\",\n \"pendingMinMs\",\n \"shouldReload\",\n \"loader\",\n \"beforeLoad\",\n \"head\",\n \"staticData\",\n \"component\",\n \"errorComponent\",\n \"pendingComponent\",\n \"notFoundComponent\",\n] as const satisfies ReadonlyArray<keyof RouteOptionsBundle>;\n\ntype UnlistedRouteOptionKey = Exclude<keyof RouteOptionsBundle, (typeof ROUTE_OPTION_KEYS)[number]>;\nconst everyRouteOptionKeyListed: [UnlistedRouteOptionKey] extends [never] ? true : never = true;\nvoid everyRouteOptionKeyListed;\n"],"mappings":";;;;;;;AAwDA,MAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
let node_crypto = require("node:crypto");
|
|
4
|
+
|
|
5
|
+
//#region src/version-manifest.ts
|
|
6
|
+
/**
|
|
7
|
+
* WorkspaceVersionManifest — the immutable per-deploy document at
|
|
8
|
+
* `bundles/<account>/<gateway>/<workspace>/versions/<version>.json`
|
|
9
|
+
* (ADR 0020, as amended; atomic-deploys MAP decision 1). The published
|
|
10
|
+
* config's slot pins this document via its `pin` (`manifest` + the
|
|
11
|
+
* manifest's own SRI); every artifact coordinate lives here, so the config
|
|
12
|
+
* stops growing with artifact kinds and old versions stay fully servable.
|
|
13
|
+
*/
|
|
14
|
+
const SRI = zod.z.string().regex(/^sha384-[A-Za-z0-9+/=]+$/);
|
|
15
|
+
const WorkspaceVersionManifestSchema = zod.z.object({
|
|
16
|
+
version: zod.z.string().regex(/^[0-9a-f]{16}$/),
|
|
17
|
+
builtAt: zod.z.string().optional(),
|
|
18
|
+
gitSha: zod.z.string().optional(),
|
|
19
|
+
entry: zod.z.string().min(1),
|
|
20
|
+
entryIntegrity: SRI,
|
|
21
|
+
ssr: zod.z.object({
|
|
22
|
+
entry: zod.z.string().min(1),
|
|
23
|
+
integrity: SRI
|
|
24
|
+
}).optional(),
|
|
25
|
+
browserManifest: zod.z.object({
|
|
26
|
+
file: zod.z.string().min(1),
|
|
27
|
+
integrity: SRI
|
|
28
|
+
}).optional(),
|
|
29
|
+
/** extra assets (css, icons) — logical name → served-object SRI */
|
|
30
|
+
assets: zod.z.record(zod.z.string(), SRI).optional(),
|
|
31
|
+
/** shared-dependency versions this build was built against */
|
|
32
|
+
shared: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
33
|
+
/**
|
|
34
|
+
* Full per-file digest map of the dist (object path → served-object SRI).
|
|
35
|
+
* Written by `every-plugin`-based deploys so the next deploy can diff against
|
|
36
|
+
* it and skip re-uploading unchanged files; readers that predate the field
|
|
37
|
+
* ignore it (zod strips unknown keys). Participates in the version hash.
|
|
38
|
+
*/
|
|
39
|
+
files: zod.z.record(zod.z.string(), SRI).optional()
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Compose the manifest with its `version` derived from the canonical content
|
|
43
|
+
* of the artifact coordinates alone (key-sorted, `builtAt` excluded) —
|
|
44
|
+
* identical bytes → identical version id regardless of when they were built,
|
|
45
|
+
* so republishing unchanged content is a pointer no-op. Any changed
|
|
46
|
+
* coordinate → a new version (and a new file).
|
|
47
|
+
*/
|
|
48
|
+
function composeVersionManifest(input) {
|
|
49
|
+
const { builtAt: _builtAt, ...hashedInputs } = input;
|
|
50
|
+
const version = (0, node_crypto.createHash)("sha256").update(stableStringify(hashedInputs)).digest("hex").slice(0, 16);
|
|
51
|
+
return WorkspaceVersionManifestSchema.parse({
|
|
52
|
+
...input,
|
|
53
|
+
version
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function stableStringify(value) {
|
|
57
|
+
if (Array.isArray(value)) return `[${value.map(stableStringify).join(",")}]`;
|
|
58
|
+
if (value && typeof value === "object") return `{${Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => `${JSON.stringify(k)}:${stableStringify(v)}`).sort().join(",")}}`;
|
|
59
|
+
return JSON.stringify(value) ?? "null";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
exports.WorkspaceVersionManifestSchema = WorkspaceVersionManifestSchema;
|
|
64
|
+
exports.composeVersionManifest = composeVersionManifest;
|
|
65
|
+
//# sourceMappingURL=version-manifest.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-manifest.cjs","names":["z","createHash"],"sources":["../src/version-manifest.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { z } from \"zod\";\n\n/**\n * WorkspaceVersionManifest — the immutable per-deploy document at\n * `bundles/<account>/<gateway>/<workspace>/versions/<version>.json`\n * (ADR 0020, as amended; atomic-deploys MAP decision 1). The published\n * config's slot pins this document via its `pin` (`manifest` + the\n * manifest's own SRI); every artifact coordinate lives here, so the config\n * stops growing with artifact kinds and old versions stay fully servable.\n */\n\nconst SRI = z.string().regex(/^sha384-[A-Za-z0-9+/=]+$/);\n\nexport const WorkspaceVersionManifestSchema = z.object({\n version: z.string().regex(/^[0-9a-f]{16}$/),\n builtAt: z.string().optional(),\n gitSha: z.string().optional(),\n entry: z.string().min(1),\n entryIntegrity: SRI,\n ssr: z\n .object({\n entry: z.string().min(1),\n integrity: SRI,\n })\n .optional(),\n browserManifest: z\n .object({\n file: z.string().min(1),\n integrity: SRI,\n })\n .optional(),\n /** extra assets (css, icons) — logical name → served-object SRI */\n assets: z.record(z.string(), SRI).optional(),\n /** shared-dependency versions this build was built against */\n shared: z.record(z.string(), z.string()).optional(),\n /**\n * Full per-file digest map of the dist (object path → served-object SRI).\n * Written by `every-plugin`-based deploys so the next deploy can diff against\n * it and skip re-uploading unchanged files; readers that predate the field\n * ignore it (zod strips unknown keys). Participates in the version hash.\n */\n files: z.record(z.string(), SRI).optional(),\n});\nexport type WorkspaceVersionManifest = z.infer<typeof WorkspaceVersionManifestSchema>;\n\nexport interface VersionManifestInput {\n /** Omit: a per-build timestamp makes the same version id map to different\n * manifest bytes per machine, breaking the pin's SRI against the image's\n * staged copy and the CDN's immutability for republished versions. */\n builtAt?: string;\n gitSha?: string;\n entry: string;\n entryIntegrity: string;\n ssr?: { entry: string; integrity: string };\n browserManifest?: { file: string; integrity: string };\n assets?: Record<string, string>;\n shared?: Record<string, string>;\n files?: Record<string, string>;\n}\n\n/**\n * Compose the manifest with its `version` derived from the canonical content\n * of the artifact coordinates alone (key-sorted, `builtAt` excluded) —\n * identical bytes → identical version id regardless of when they were built,\n * so republishing unchanged content is a pointer no-op. Any changed\n * coordinate → a new version (and a new file).\n */\nexport function composeVersionManifest(input: VersionManifestInput): WorkspaceVersionManifest {\n const { builtAt: _builtAt, ...hashedInputs } = input;\n const version = createHash(\"sha256\")\n .update(stableStringify(hashedInputs))\n .digest(\"hex\")\n .slice(0, 16);\n return WorkspaceVersionManifestSchema.parse({ ...input, version });\n}\n\nfunction stableStringify(value: unknown): string {\n if (Array.isArray(value)) return `[${value.map(stableStringify).join(\",\")}]`;\n if (value && typeof value === \"object\") {\n return `{${Object.entries(value)\n .filter(([, v]) => v !== undefined)\n .map(([k, v]) => `${JSON.stringify(k)}:${stableStringify(v)}`)\n .sort()\n .join(\",\")}}`;\n }\n return JSON.stringify(value) ?? \"null\";\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAM,MAAMA,MAAE,OAAO,CAAC,CAAC,MAAM,0BAA0B;AAEvD,MAAa,iCAAiCA,MAAE,OAAO;CACrD,SAASA,MAAE,OAAO,CAAC,CAAC,MAAM,gBAAgB;CAC1C,SAASA,MAAE,OAAO,CAAC,CAAC,SAAS;CAC7B,QAAQA,MAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,OAAOA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACvB,gBAAgB;CAChB,KAAKA,MACF,OAAO;EACN,OAAOA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EACvB,WAAW;CACb,CAAC,CAAC,CACD,SAAS;CACZ,iBAAiBA,MACd,OAAO;EACN,MAAMA,MAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EACtB,WAAW;CACb,CAAC,CAAC,CACD,SAAS;;CAEZ,QAAQA,MAAE,OAAOA,MAAE,OAAO,GAAG,GAAG,CAAC,CAAC,SAAS;;CAE3C,QAAQA,MAAE,OAAOA,MAAE,OAAO,GAAGA,MAAE,OAAO,CAAC,CAAC,CAAC,SAAS;;;;;;;CAOlD,OAAOA,MAAE,OAAOA,MAAE,OAAO,GAAG,GAAG,CAAC,CAAC,SAAS;AAC5C,CAAC;;;;;;;;AAyBD,SAAgB,uBAAuB,OAAuD;CAC5F,MAAM,EAAE,SAAS,UAAU,GAAG,iBAAiB;CAC/C,MAAM,cAAUC,wBAAW,QAAQ,CAAC,CACjC,OAAO,gBAAgB,YAAY,CAAC,CAAC,CACrC,OAAO,KAAK,CAAC,CACb,MAAM,GAAG,EAAE;CACd,OAAO,+BAA+B,MAAM;EAAE,GAAG;EAAO;CAAQ,CAAC;AACnE;AAEA,SAAS,gBAAgB,OAAwB;CAC/C,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,IAAI,MAAM,IAAI,eAAe,CAAC,CAAC,KAAK,GAAG,EAAE;CAC1E,IAAI,SAAS,OAAO,UAAU,UAC5B,OAAO,IAAI,OAAO,QAAQ,KAAK,CAAC,CAC7B,QAAQ,GAAG,OAAO,MAAM,MAAS,CAAC,CAClC,KAAK,CAAC,GAAG,OAAO,GAAG,KAAK,UAAU,CAAC,EAAE,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAC7D,KAAK,CAAC,CACN,KAAK,GAAG,EAAE;CAEf,OAAO,KAAK,UAAU,KAAK,KAAK;AAClC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/version-manifest.d.ts
|
|
3
|
+
declare const WorkspaceVersionManifestSchema: z.ZodObject<{
|
|
4
|
+
version: z.ZodString;
|
|
5
|
+
builtAt: z.ZodOptional<z.ZodString>;
|
|
6
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
7
|
+
entry: z.ZodString;
|
|
8
|
+
entryIntegrity: z.ZodString;
|
|
9
|
+
ssr: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
entry: z.ZodString;
|
|
11
|
+
integrity: z.ZodString;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
browserManifest: z.ZodOptional<z.ZodObject<{
|
|
14
|
+
file: z.ZodString;
|
|
15
|
+
integrity: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
18
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19
|
+
files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
type WorkspaceVersionManifest = z.infer<typeof WorkspaceVersionManifestSchema>;
|
|
22
|
+
interface VersionManifestInput {
|
|
23
|
+
/** Omit: a per-build timestamp makes the same version id map to different
|
|
24
|
+
* manifest bytes per machine, breaking the pin's SRI against the image's
|
|
25
|
+
* staged copy and the CDN's immutability for republished versions. */
|
|
26
|
+
builtAt?: string;
|
|
27
|
+
gitSha?: string;
|
|
28
|
+
entry: string;
|
|
29
|
+
entryIntegrity: string;
|
|
30
|
+
ssr?: {
|
|
31
|
+
entry: string;
|
|
32
|
+
integrity: string;
|
|
33
|
+
};
|
|
34
|
+
browserManifest?: {
|
|
35
|
+
file: string;
|
|
36
|
+
integrity: string;
|
|
37
|
+
};
|
|
38
|
+
assets?: Record<string, string>;
|
|
39
|
+
shared?: Record<string, string>;
|
|
40
|
+
files?: Record<string, string>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Compose the manifest with its `version` derived from the canonical content
|
|
44
|
+
* of the artifact coordinates alone (key-sorted, `builtAt` excluded) —
|
|
45
|
+
* identical bytes → identical version id regardless of when they were built,
|
|
46
|
+
* so republishing unchanged content is a pointer no-op. Any changed
|
|
47
|
+
* coordinate → a new version (and a new file).
|
|
48
|
+
*/
|
|
49
|
+
declare function composeVersionManifest(input: VersionManifestInput): WorkspaceVersionManifest;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { VersionManifestInput, WorkspaceVersionManifest, WorkspaceVersionManifestSchema, composeVersionManifest };
|
|
52
|
+
//# sourceMappingURL=version-manifest.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-manifest.d.cts","names":[],"sources":["../src/version-manifest.ts"],"mappings":";;cAca,gCAA8B,EAAA;;;;;;;;;;;;;;;;;GA6BzC,EAAA,KAAA;KACU,2BAA2B,EAAE,aAAa;UAErC;;;;EAIf;EACA;EACA;EACA;EACA;IAAQ;IAAe;;EACvB;IAAoB;IAAc;;EAClC,SAAS;EACT,SAAS;EACT,QAAQ;;;;;;;;;iBAUM,uBAAuB,OAAO,uBAAuB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/version-manifest.d.ts
|
|
3
|
+
declare const WorkspaceVersionManifestSchema: z.ZodObject<{
|
|
4
|
+
version: z.ZodString;
|
|
5
|
+
builtAt: z.ZodOptional<z.ZodString>;
|
|
6
|
+
gitSha: z.ZodOptional<z.ZodString>;
|
|
7
|
+
entry: z.ZodString;
|
|
8
|
+
entryIntegrity: z.ZodString;
|
|
9
|
+
ssr: z.ZodOptional<z.ZodObject<{
|
|
10
|
+
entry: z.ZodString;
|
|
11
|
+
integrity: z.ZodString;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
browserManifest: z.ZodOptional<z.ZodObject<{
|
|
14
|
+
file: z.ZodString;
|
|
15
|
+
integrity: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
assets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
18
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
19
|
+
files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
type WorkspaceVersionManifest = z.infer<typeof WorkspaceVersionManifestSchema>;
|
|
22
|
+
interface VersionManifestInput {
|
|
23
|
+
/** Omit: a per-build timestamp makes the same version id map to different
|
|
24
|
+
* manifest bytes per machine, breaking the pin's SRI against the image's
|
|
25
|
+
* staged copy and the CDN's immutability for republished versions. */
|
|
26
|
+
builtAt?: string;
|
|
27
|
+
gitSha?: string;
|
|
28
|
+
entry: string;
|
|
29
|
+
entryIntegrity: string;
|
|
30
|
+
ssr?: {
|
|
31
|
+
entry: string;
|
|
32
|
+
integrity: string;
|
|
33
|
+
};
|
|
34
|
+
browserManifest?: {
|
|
35
|
+
file: string;
|
|
36
|
+
integrity: string;
|
|
37
|
+
};
|
|
38
|
+
assets?: Record<string, string>;
|
|
39
|
+
shared?: Record<string, string>;
|
|
40
|
+
files?: Record<string, string>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Compose the manifest with its `version` derived from the canonical content
|
|
44
|
+
* of the artifact coordinates alone (key-sorted, `builtAt` excluded) —
|
|
45
|
+
* identical bytes → identical version id regardless of when they were built,
|
|
46
|
+
* so republishing unchanged content is a pointer no-op. Any changed
|
|
47
|
+
* coordinate → a new version (and a new file).
|
|
48
|
+
*/
|
|
49
|
+
declare function composeVersionManifest(input: VersionManifestInput): WorkspaceVersionManifest;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { VersionManifestInput, WorkspaceVersionManifest, WorkspaceVersionManifestSchema, composeVersionManifest };
|
|
52
|
+
//# sourceMappingURL=version-manifest.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-manifest.d.mts","names":[],"sources":["../src/version-manifest.ts"],"mappings":";;cAca,gCAA8B,EAAA;;;;;;;;;;;;;;;;;GA6BzC,EAAA,KAAA;KACU,2BAA2B,EAAE,aAAa;UAErC;;;;EAIf;EACA;EACA;EACA;EACA;IAAQ;IAAe;;EACvB;IAAoB;IAAc;;EAClC,SAAS;EACT,SAAS;EACT,QAAQ;;;;;;;;;iBAUM,uBAAuB,OAAO,uBAAuB"}
|