every-plugin 2.10.1 → 3.0.0-rc.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/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 +49 -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 +8 -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 +12 -26
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +44 -25
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +45 -26
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +15 -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 +140 -34
- package/dist/runtime/errors.cjs.map +1 -1
- package/dist/runtime/errors.d.cts +42 -7
- package/dist/runtime/errors.d.cts.map +1 -1
- package/dist/runtime/errors.d.mts +42 -7
- package/dist/runtime/errors.d.mts.map +1 -1
- package/dist/runtime/errors.mjs +136 -31
- 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 +63 -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 +63 -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 +30 -29
- 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 +29 -30
- 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 +22 -41
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +22 -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 +16 -18
- package/src/identity.ts +36 -0
- package/src/index.ts +4 -0
- package/src/plugin.ts +70 -92
- package/src/remote-entry.ts +171 -0
- package/src/runtime/errors.ts +186 -27
- package/src/runtime/index.ts +132 -43
- package/src/runtime/mf-config.ts +12 -107
- package/src/runtime/services/module-federation.service.ts +221 -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 +239 -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 +22 -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,97 @@
|
|
|
1
|
+
const require_mount_registry = require('./mount-registry.cjs');
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
|
|
4
|
+
//#region src/ui/manifest/manifest-schema.ts
|
|
5
|
+
/**
|
|
6
|
+
* manifest.gen.json — pure data emitted by the generator from route files
|
|
7
|
+
* only (ADR 0008 §2). Nothing here is hand-maintained; this schema is the
|
|
8
|
+
* composition contract and the audit/marketplace surface. The host refuses
|
|
9
|
+
* unknown `manifestVersion` majors.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The manifest contract major this code speaks. Emitted by the generator and
|
|
13
|
+
* enforced at every load (the host parses through `parsePluginManifest`; the
|
|
14
|
+
* client parse of the compose payload checks it — a skewed major degrades to
|
|
15
|
+
* the core-only tree instead of silently mis-constructing).
|
|
16
|
+
*/
|
|
17
|
+
const MANIFEST_VERSION = 2;
|
|
18
|
+
const SUPPORTED_MANIFEST_VERSION = 2;
|
|
19
|
+
const RouteRecordSchema = zod.z.object({
|
|
20
|
+
/** Full route id, root-relative, no leading slash. e.g. "_public/login" */
|
|
21
|
+
id: zod.z.string(),
|
|
22
|
+
/** Node kind — the @tanstack/virtual-file-routes vocabulary. */
|
|
23
|
+
type: zod.z.enum([
|
|
24
|
+
"route",
|
|
25
|
+
"layout",
|
|
26
|
+
"index"
|
|
27
|
+
]),
|
|
28
|
+
/** URL path relative to the parent; absent for pathless layouts. */
|
|
29
|
+
path: zod.z.string().optional(),
|
|
30
|
+
/** id of the parent record within the same plugin; absent = mount-level. */
|
|
31
|
+
parentId: zod.z.string().optional(),
|
|
32
|
+
/** Set on ROOT-level pathless layouts: the mount this subtree declares. */
|
|
33
|
+
mount: zod.z.enum(require_mount_registry.MOUNTS).optional(),
|
|
34
|
+
/** Route file relative to the routes directory (options source). */
|
|
35
|
+
file: zod.z.string().optional()
|
|
36
|
+
});
|
|
37
|
+
const PluginManifestSchema = zod.z.object({
|
|
38
|
+
/** Plugin key — derived from the workspace/config key by the emitter. */
|
|
39
|
+
name: zod.z.string(),
|
|
40
|
+
/** Contract version — enforced by `parsePluginManifest` / the payload check. */
|
|
41
|
+
manifestVersion: zod.z.number().int(),
|
|
42
|
+
/** Lifted from the plugin's `__root` route options, if any. */
|
|
43
|
+
rootMeta: zod.z.object({
|
|
44
|
+
hasHead: zod.z.boolean().optional(),
|
|
45
|
+
hasStaticData: zod.z.boolean().optional()
|
|
46
|
+
}).optional(),
|
|
47
|
+
routes: zod.z.array(RouteRecordSchema)
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* The load-time contract check — one diagnostic for a manifest from a
|
|
51
|
+
* different framework major. Every manifest load goes through this.
|
|
52
|
+
*/
|
|
53
|
+
function parsePluginManifest(data) {
|
|
54
|
+
const parsed = PluginManifestSchema.parse(data);
|
|
55
|
+
if (parsed.manifestVersion !== 2) throw new Error(manifestVersionIssue(parsed.name, parsed.manifestVersion));
|
|
56
|
+
return parsed;
|
|
57
|
+
}
|
|
58
|
+
const manifestVersionIssue = (name, found) => `unsupported manifest version ${found} in "${name}" — this build speaks ${2}; regenerate manifest.gen.json with the installed framework`;
|
|
59
|
+
const ManifestSchema = zod.z.object({
|
|
60
|
+
manifestVersion: zod.z.number().int(),
|
|
61
|
+
plugins: zod.z.array(PluginManifestSchema)
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* The client compose payload — the runtime-config `ui.compose` block the
|
|
65
|
+
* server embeds and the client reconstructs the tree from. Single home:
|
|
66
|
+
* everything-dev's client-config schema, the hydrate client, and the host's
|
|
67
|
+
* ui-compose all derive from this schema.
|
|
68
|
+
*/
|
|
69
|
+
const ComposeRemoteSchema = zod.z.object({
|
|
70
|
+
key: zod.z.string(),
|
|
71
|
+
name: zod.z.string(),
|
|
72
|
+
entry: zod.z.string(),
|
|
73
|
+
/** the remote's (hashed) browser-manifest URL — preferred over deriving
|
|
74
|
+
* one from `entry` by stripping the legacy fixed entry name */
|
|
75
|
+
manifestUrl: zod.z.string().optional()
|
|
76
|
+
});
|
|
77
|
+
const ComposePayloadSchema = zod.z.object({
|
|
78
|
+
digest: zod.z.string(),
|
|
79
|
+
remotes: zod.z.array(ComposeRemoteSchema),
|
|
80
|
+
manifests: zod.z.array(PluginManifestSchema)
|
|
81
|
+
}).superRefine((payload, ctx) => {
|
|
82
|
+
for (const manifest of payload.manifests) if (manifest.manifestVersion !== 2) ctx.addIssue({
|
|
83
|
+
code: "custom",
|
|
84
|
+
message: manifestVersionIssue(manifest.name, manifest.manifestVersion)
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
exports.ComposePayloadSchema = ComposePayloadSchema;
|
|
90
|
+
exports.ComposeRemoteSchema = ComposeRemoteSchema;
|
|
91
|
+
exports.MANIFEST_VERSION = MANIFEST_VERSION;
|
|
92
|
+
exports.ManifestSchema = ManifestSchema;
|
|
93
|
+
exports.PluginManifestSchema = PluginManifestSchema;
|
|
94
|
+
exports.RouteRecordSchema = RouteRecordSchema;
|
|
95
|
+
exports.SUPPORTED_MANIFEST_VERSION = SUPPORTED_MANIFEST_VERSION;
|
|
96
|
+
exports.parsePluginManifest = parsePluginManifest;
|
|
97
|
+
//# sourceMappingURL=manifest-schema.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-schema.cjs","names":["z","MOUNTS"],"sources":["../../../src/ui/manifest/manifest-schema.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { MOUNTS } from \"./mount-registry\";\n\n/**\n * manifest.gen.json — pure data emitted by the generator from route files\n * only (ADR 0008 §2). Nothing here is hand-maintained; this schema is the\n * composition contract and the audit/marketplace surface. The host refuses\n * unknown `manifestVersion` majors.\n */\n\n/**\n * The manifest contract major this code speaks. Emitted by the generator and\n * enforced at every load (the host parses through `parsePluginManifest`; the\n * client parse of the compose payload checks it — a skewed major degrades to\n * the core-only tree instead of silently mis-constructing).\n */\nexport const MANIFEST_VERSION = 2;\nexport const SUPPORTED_MANIFEST_VERSION = MANIFEST_VERSION;\n\nexport const RouteRecordSchema = z.object({\n /** Full route id, root-relative, no leading slash. e.g. \"_public/login\" */\n id: z.string(),\n /** Node kind — the @tanstack/virtual-file-routes vocabulary. */\n type: z.enum([\"route\", \"layout\", \"index\"]),\n /** URL path relative to the parent; absent for pathless layouts. */\n path: z.string().optional(),\n /** id of the parent record within the same plugin; absent = mount-level. */\n parentId: z.string().optional(),\n /** Set on ROOT-level pathless layouts: the mount this subtree declares. */\n mount: z.enum(MOUNTS as [string, ...string[]]).optional(),\n /** Route file relative to the routes directory (options source). */\n file: z.string().optional(),\n});\n\nexport const PluginManifestSchema = z.object({\n /** Plugin key — derived from the workspace/config key by the emitter. */\n name: z.string(),\n /** Contract version — enforced by `parsePluginManifest` / the payload check. */\n manifestVersion: z.number().int(),\n /** Lifted from the plugin's `__root` route options, if any. */\n rootMeta: z\n .object({\n hasHead: z.boolean().optional(),\n hasStaticData: z.boolean().optional(),\n })\n .optional(),\n routes: z.array(RouteRecordSchema),\n});\n\n/**\n * The load-time contract check — one diagnostic for a manifest from a\n * different framework major. Every manifest load goes through this.\n */\nexport function parsePluginManifest(data: unknown): PluginManifest {\n const parsed = PluginManifestSchema.parse(data);\n if (parsed.manifestVersion !== SUPPORTED_MANIFEST_VERSION) {\n throw new Error(manifestVersionIssue(parsed.name, parsed.manifestVersion));\n }\n return parsed;\n}\n\nconst manifestVersionIssue = (name: string, found: number): string =>\n `unsupported manifest version ${found} in \"${name}\" — this build speaks ${SUPPORTED_MANIFEST_VERSION}; regenerate manifest.gen.json with the installed framework`;\n\nexport const ManifestSchema = z.object({\n manifestVersion: z.number().int(),\n plugins: z.array(PluginManifestSchema),\n});\n\nexport type RouteRecord = z.infer<typeof RouteRecordSchema>;\nexport type PluginManifest = z.infer<typeof PluginManifestSchema>;\nexport type Manifest = z.infer<typeof ManifestSchema>;\n\n/**\n * The client compose payload — the runtime-config `ui.compose` block the\n * server embeds and the client reconstructs the tree from. Single home:\n * everything-dev's client-config schema, the hydrate client, and the host's\n * ui-compose all derive from this schema.\n */\nexport const ComposeRemoteSchema = z.object({\n key: z.string(),\n name: z.string(),\n entry: z.string(),\n /** the remote's (hashed) browser-manifest URL — preferred over deriving\n * one from `entry` by stripping the legacy fixed entry name */\n manifestUrl: z.string().optional(),\n});\n\nexport const ComposePayloadSchema = z\n .object({\n digest: z.string(),\n remotes: z.array(ComposeRemoteSchema),\n manifests: z.array(PluginManifestSchema),\n })\n .superRefine((payload, ctx) => {\n for (const manifest of payload.manifests) {\n if (manifest.manifestVersion !== SUPPORTED_MANIFEST_VERSION) {\n ctx.addIssue({\n code: \"custom\",\n message: manifestVersionIssue(manifest.name, manifest.manifestVersion),\n });\n }\n }\n });\n\nexport type ComposeRemote = z.infer<typeof ComposeRemoteSchema>;\nexport type ComposePayload = z.infer<typeof ComposePayloadSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAa,mBAAmB;AAChC,MAAa;AAEb,MAAa,oBAAoBA,MAAE,OAAO;;CAExC,IAAIA,MAAE,OAAO;;CAEb,MAAMA,MAAE,KAAK;EAAC;EAAS;EAAU;CAAO,CAAC;;CAEzC,MAAMA,MAAE,OAAO,CAAC,CAAC,SAAS;;CAE1B,UAAUA,MAAE,OAAO,CAAC,CAAC,SAAS;;CAE9B,OAAOA,MAAE,KAAKC,6BAA+B,CAAC,CAAC,SAAS;;CAExD,MAAMD,MAAE,OAAO,CAAC,CAAC,SAAS;AAC5B,CAAC;AAED,MAAa,uBAAuBA,MAAE,OAAO;;CAE3C,MAAMA,MAAE,OAAO;;CAEf,iBAAiBA,MAAE,OAAO,CAAC,CAAC,IAAI;;CAEhC,UAAUA,MACP,OAAO;EACN,SAASA,MAAE,QAAQ,CAAC,CAAC,SAAS;EAC9B,eAAeA,MAAE,QAAQ,CAAC,CAAC,SAAS;CACtC,CAAC,CAAC,CACD,SAAS;CACZ,QAAQA,MAAE,MAAM,iBAAiB;AACnC,CAAC;;;;;AAMD,SAAgB,oBAAoB,MAA+B;CACjE,MAAM,SAAS,qBAAqB,MAAM,IAAI;CAC9C,IAAI,OAAO,uBACT,MAAM,IAAI,MAAM,qBAAqB,OAAO,MAAM,OAAO,eAAe,CAAC;CAE3E,OAAO;AACT;AAEA,MAAM,wBAAwB,MAAc,UAC1C,gCAAgC,MAAM,OAAO,KAAK,0BAAmD;AAEvG,MAAa,iBAAiBA,MAAE,OAAO;CACrC,iBAAiBA,MAAE,OAAO,CAAC,CAAC,IAAI;CAChC,SAASA,MAAE,MAAM,oBAAoB;AACvC,CAAC;;;;;;;AAYD,MAAa,sBAAsBA,MAAE,OAAO;CAC1C,KAAKA,MAAE,OAAO;CACd,MAAMA,MAAE,OAAO;CACf,OAAOA,MAAE,OAAO;;;CAGhB,aAAaA,MAAE,OAAO,CAAC,CAAC,SAAS;AACnC,CAAC;AAED,MAAa,uBAAuBA,MACjC,OAAO;CACN,QAAQA,MAAE,OAAO;CACjB,SAASA,MAAE,MAAM,mBAAmB;CACpC,WAAWA,MAAE,MAAM,oBAAoB;AACzC,CAAC,CAAC,CACD,aAAa,SAAS,QAAQ;CAC7B,KAAK,MAAM,YAAY,QAAQ,WAC7B,IAAI,SAAS,uBACX,IAAI,SAAS;EACX,MAAM;EACN,SAAS,qBAAqB,SAAS,MAAM,SAAS,eAAe;CACvE,CAAC;AAGP,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/ui/manifest/manifest-schema.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* manifest.gen.json — pure data emitted by the generator from route files
|
|
5
|
+
* only (ADR 0008 §2). Nothing here is hand-maintained; this schema is the
|
|
6
|
+
* composition contract and the audit/marketplace surface. The host refuses
|
|
7
|
+
* unknown `manifestVersion` majors.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The manifest contract major this code speaks. Emitted by the generator and
|
|
11
|
+
* enforced at every load (the host parses through `parsePluginManifest`; the
|
|
12
|
+
* client parse of the compose payload checks it — a skewed major degrades to
|
|
13
|
+
* the core-only tree instead of silently mis-constructing).
|
|
14
|
+
*/
|
|
15
|
+
declare const MANIFEST_VERSION = 2;
|
|
16
|
+
declare const SUPPORTED_MANIFEST_VERSION = 2;
|
|
17
|
+
declare const RouteRecordSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
type: z.ZodEnum<{
|
|
20
|
+
index: "index";
|
|
21
|
+
layout: "layout";
|
|
22
|
+
route: "route";
|
|
23
|
+
}>;
|
|
24
|
+
path: z.ZodOptional<z.ZodString>;
|
|
25
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
mount: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
[x: string]: string;
|
|
28
|
+
}>>;
|
|
29
|
+
file: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
declare const PluginManifestSchema: z.ZodObject<{
|
|
32
|
+
name: z.ZodString;
|
|
33
|
+
manifestVersion: z.ZodNumber;
|
|
34
|
+
rootMeta: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
hasHead: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
hasStaticData: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
type: z.ZodEnum<{
|
|
41
|
+
index: "index";
|
|
42
|
+
layout: "layout";
|
|
43
|
+
route: "route";
|
|
44
|
+
}>;
|
|
45
|
+
path: z.ZodOptional<z.ZodString>;
|
|
46
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
47
|
+
mount: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
[x: string]: string;
|
|
49
|
+
}>>;
|
|
50
|
+
file: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/**
|
|
54
|
+
* The load-time contract check — one diagnostic for a manifest from a
|
|
55
|
+
* different framework major. Every manifest load goes through this.
|
|
56
|
+
*/
|
|
57
|
+
declare function parsePluginManifest(data: unknown): PluginManifest;
|
|
58
|
+
declare const ManifestSchema: z.ZodObject<{
|
|
59
|
+
manifestVersion: z.ZodNumber;
|
|
60
|
+
plugins: z.ZodArray<z.ZodObject<{
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
manifestVersion: z.ZodNumber;
|
|
63
|
+
rootMeta: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
hasHead: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
hasStaticData: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
type: z.ZodEnum<{
|
|
70
|
+
index: "index";
|
|
71
|
+
layout: "layout";
|
|
72
|
+
route: "route";
|
|
73
|
+
}>;
|
|
74
|
+
path: z.ZodOptional<z.ZodString>;
|
|
75
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
76
|
+
mount: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
[x: string]: string;
|
|
78
|
+
}>>;
|
|
79
|
+
file: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
type RouteRecord = z.infer<typeof RouteRecordSchema>;
|
|
84
|
+
type PluginManifest = z.infer<typeof PluginManifestSchema>;
|
|
85
|
+
/**
|
|
86
|
+
* The client compose payload — the runtime-config `ui.compose` block the
|
|
87
|
+
* server embeds and the client reconstructs the tree from. Single home:
|
|
88
|
+
* everything-dev's client-config schema, the hydrate client, and the host's
|
|
89
|
+
* ui-compose all derive from this schema.
|
|
90
|
+
*/
|
|
91
|
+
declare const ComposeRemoteSchema: z.ZodObject<{
|
|
92
|
+
key: z.ZodString;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
entry: z.ZodString;
|
|
95
|
+
manifestUrl: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
declare const ComposePayloadSchema: z.ZodObject<{
|
|
98
|
+
digest: z.ZodString;
|
|
99
|
+
remotes: z.ZodArray<z.ZodObject<{
|
|
100
|
+
key: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
entry: z.ZodString;
|
|
103
|
+
manifestUrl: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
manifests: z.ZodArray<z.ZodObject<{
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
manifestVersion: z.ZodNumber;
|
|
108
|
+
rootMeta: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
hasHead: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
hasStaticData: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
type: z.ZodEnum<{
|
|
115
|
+
index: "index";
|
|
116
|
+
layout: "layout";
|
|
117
|
+
route: "route";
|
|
118
|
+
}>;
|
|
119
|
+
path: z.ZodOptional<z.ZodString>;
|
|
120
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
121
|
+
mount: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
[x: string]: string;
|
|
123
|
+
}>>;
|
|
124
|
+
file: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
type ComposeRemote = z.infer<typeof ComposeRemoteSchema>;
|
|
129
|
+
type ComposePayload = z.infer<typeof ComposePayloadSchema>;
|
|
130
|
+
//#endregion
|
|
131
|
+
export { ComposePayload, ComposePayloadSchema, ComposeRemote, ComposeRemoteSchema, MANIFEST_VERSION, ManifestSchema, PluginManifest, PluginManifestSchema, RouteRecord, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, parsePluginManifest };
|
|
132
|
+
//# sourceMappingURL=manifest-schema.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-schema.d.cts","names":[],"sources":["../../../src/ui/manifest/manifest-schema.ts"],"mappings":";;;;;;;;;;;;;;cAgBa;cACA;cAEA,mBAAiB,EAAA;;;;;;;;;;;;;GAa5B,EAAA,KAAA;cAEW,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;GAa/B,EAAA,KAAA;;;;;iBAMc,oBAAoB,gBAAgB;cAWvC,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;GAGzB,EAAA,KAAA;KAEU,cAAc,EAAE,aAAa;KAC7B,iBAAiB,EAAE,aAAa;;;;;;;cAS/B,qBAAmB,EAAA;;;;;GAO9B,EAAA,KAAA;cAEW,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAe7B,EAAA,KAAA;KAEQ,gBAAgB,EAAE,aAAa;KAC/B,iBAAiB,EAAE,aAAa"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/ui/manifest/manifest-schema.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* manifest.gen.json — pure data emitted by the generator from route files
|
|
5
|
+
* only (ADR 0008 §2). Nothing here is hand-maintained; this schema is the
|
|
6
|
+
* composition contract and the audit/marketplace surface. The host refuses
|
|
7
|
+
* unknown `manifestVersion` majors.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The manifest contract major this code speaks. Emitted by the generator and
|
|
11
|
+
* enforced at every load (the host parses through `parsePluginManifest`; the
|
|
12
|
+
* client parse of the compose payload checks it — a skewed major degrades to
|
|
13
|
+
* the core-only tree instead of silently mis-constructing).
|
|
14
|
+
*/
|
|
15
|
+
declare const MANIFEST_VERSION = 2;
|
|
16
|
+
declare const SUPPORTED_MANIFEST_VERSION = 2;
|
|
17
|
+
declare const RouteRecordSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
type: z.ZodEnum<{
|
|
20
|
+
index: "index";
|
|
21
|
+
layout: "layout";
|
|
22
|
+
route: "route";
|
|
23
|
+
}>;
|
|
24
|
+
path: z.ZodOptional<z.ZodString>;
|
|
25
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
mount: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
[x: string]: string;
|
|
28
|
+
}>>;
|
|
29
|
+
file: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
declare const PluginManifestSchema: z.ZodObject<{
|
|
32
|
+
name: z.ZodString;
|
|
33
|
+
manifestVersion: z.ZodNumber;
|
|
34
|
+
rootMeta: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
hasHead: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
hasStaticData: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
type: z.ZodEnum<{
|
|
41
|
+
index: "index";
|
|
42
|
+
layout: "layout";
|
|
43
|
+
route: "route";
|
|
44
|
+
}>;
|
|
45
|
+
path: z.ZodOptional<z.ZodString>;
|
|
46
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
47
|
+
mount: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
[x: string]: string;
|
|
49
|
+
}>>;
|
|
50
|
+
file: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/**
|
|
54
|
+
* The load-time contract check — one diagnostic for a manifest from a
|
|
55
|
+
* different framework major. Every manifest load goes through this.
|
|
56
|
+
*/
|
|
57
|
+
declare function parsePluginManifest(data: unknown): PluginManifest;
|
|
58
|
+
declare const ManifestSchema: z.ZodObject<{
|
|
59
|
+
manifestVersion: z.ZodNumber;
|
|
60
|
+
plugins: z.ZodArray<z.ZodObject<{
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
manifestVersion: z.ZodNumber;
|
|
63
|
+
rootMeta: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
hasHead: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
hasStaticData: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
type: z.ZodEnum<{
|
|
70
|
+
index: "index";
|
|
71
|
+
layout: "layout";
|
|
72
|
+
route: "route";
|
|
73
|
+
}>;
|
|
74
|
+
path: z.ZodOptional<z.ZodString>;
|
|
75
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
76
|
+
mount: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
[x: string]: string;
|
|
78
|
+
}>>;
|
|
79
|
+
file: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
type RouteRecord = z.infer<typeof RouteRecordSchema>;
|
|
84
|
+
type PluginManifest = z.infer<typeof PluginManifestSchema>;
|
|
85
|
+
/**
|
|
86
|
+
* The client compose payload — the runtime-config `ui.compose` block the
|
|
87
|
+
* server embeds and the client reconstructs the tree from. Single home:
|
|
88
|
+
* everything-dev's client-config schema, the hydrate client, and the host's
|
|
89
|
+
* ui-compose all derive from this schema.
|
|
90
|
+
*/
|
|
91
|
+
declare const ComposeRemoteSchema: z.ZodObject<{
|
|
92
|
+
key: z.ZodString;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
entry: z.ZodString;
|
|
95
|
+
manifestUrl: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
declare const ComposePayloadSchema: z.ZodObject<{
|
|
98
|
+
digest: z.ZodString;
|
|
99
|
+
remotes: z.ZodArray<z.ZodObject<{
|
|
100
|
+
key: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
entry: z.ZodString;
|
|
103
|
+
manifestUrl: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
manifests: z.ZodArray<z.ZodObject<{
|
|
106
|
+
name: z.ZodString;
|
|
107
|
+
manifestVersion: z.ZodNumber;
|
|
108
|
+
rootMeta: z.ZodOptional<z.ZodObject<{
|
|
109
|
+
hasHead: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
hasStaticData: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
routes: z.ZodArray<z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
type: z.ZodEnum<{
|
|
115
|
+
index: "index";
|
|
116
|
+
layout: "layout";
|
|
117
|
+
route: "route";
|
|
118
|
+
}>;
|
|
119
|
+
path: z.ZodOptional<z.ZodString>;
|
|
120
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
121
|
+
mount: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
[x: string]: string;
|
|
123
|
+
}>>;
|
|
124
|
+
file: z.ZodOptional<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
type ComposeRemote = z.infer<typeof ComposeRemoteSchema>;
|
|
129
|
+
type ComposePayload = z.infer<typeof ComposePayloadSchema>;
|
|
130
|
+
//#endregion
|
|
131
|
+
export { ComposePayload, ComposePayloadSchema, ComposeRemote, ComposeRemoteSchema, MANIFEST_VERSION, ManifestSchema, PluginManifest, PluginManifestSchema, RouteRecord, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, parsePluginManifest };
|
|
132
|
+
//# sourceMappingURL=manifest-schema.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-schema.d.mts","names":[],"sources":["../../../src/ui/manifest/manifest-schema.ts"],"mappings":";;;;;;;;;;;;;;cAgBa;cACA;cAEA,mBAAiB,EAAA;;;;;;;;;;;;;GAa5B,EAAA,KAAA;cAEW,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;GAa/B,EAAA,KAAA;;;;;iBAMc,oBAAoB,gBAAgB;cAWvC,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;GAGzB,EAAA,KAAA;KAEU,cAAc,EAAE,aAAa;KAC7B,iBAAiB,EAAE,aAAa;;;;;;;cAS/B,qBAAmB,EAAA;;;;;GAO9B,EAAA,KAAA;cAEW,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAe7B,EAAA,KAAA;KAEQ,gBAAgB,EAAE,aAAa;KAC/B,iBAAiB,EAAE,aAAa"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { MOUNTS } from "./mount-registry.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/ui/manifest/manifest-schema.ts
|
|
5
|
+
/**
|
|
6
|
+
* manifest.gen.json — pure data emitted by the generator from route files
|
|
7
|
+
* only (ADR 0008 §2). Nothing here is hand-maintained; this schema is the
|
|
8
|
+
* composition contract and the audit/marketplace surface. The host refuses
|
|
9
|
+
* unknown `manifestVersion` majors.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* The manifest contract major this code speaks. Emitted by the generator and
|
|
13
|
+
* enforced at every load (the host parses through `parsePluginManifest`; the
|
|
14
|
+
* client parse of the compose payload checks it — a skewed major degrades to
|
|
15
|
+
* the core-only tree instead of silently mis-constructing).
|
|
16
|
+
*/
|
|
17
|
+
const MANIFEST_VERSION = 2;
|
|
18
|
+
const SUPPORTED_MANIFEST_VERSION = 2;
|
|
19
|
+
const RouteRecordSchema = z.object({
|
|
20
|
+
/** Full route id, root-relative, no leading slash. e.g. "_public/login" */
|
|
21
|
+
id: z.string(),
|
|
22
|
+
/** Node kind — the @tanstack/virtual-file-routes vocabulary. */
|
|
23
|
+
type: z.enum([
|
|
24
|
+
"route",
|
|
25
|
+
"layout",
|
|
26
|
+
"index"
|
|
27
|
+
]),
|
|
28
|
+
/** URL path relative to the parent; absent for pathless layouts. */
|
|
29
|
+
path: z.string().optional(),
|
|
30
|
+
/** id of the parent record within the same plugin; absent = mount-level. */
|
|
31
|
+
parentId: z.string().optional(),
|
|
32
|
+
/** Set on ROOT-level pathless layouts: the mount this subtree declares. */
|
|
33
|
+
mount: z.enum(MOUNTS).optional(),
|
|
34
|
+
/** Route file relative to the routes directory (options source). */
|
|
35
|
+
file: z.string().optional()
|
|
36
|
+
});
|
|
37
|
+
const PluginManifestSchema = z.object({
|
|
38
|
+
/** Plugin key — derived from the workspace/config key by the emitter. */
|
|
39
|
+
name: z.string(),
|
|
40
|
+
/** Contract version — enforced by `parsePluginManifest` / the payload check. */
|
|
41
|
+
manifestVersion: z.number().int(),
|
|
42
|
+
/** Lifted from the plugin's `__root` route options, if any. */
|
|
43
|
+
rootMeta: z.object({
|
|
44
|
+
hasHead: z.boolean().optional(),
|
|
45
|
+
hasStaticData: z.boolean().optional()
|
|
46
|
+
}).optional(),
|
|
47
|
+
routes: z.array(RouteRecordSchema)
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* The load-time contract check — one diagnostic for a manifest from a
|
|
51
|
+
* different framework major. Every manifest load goes through this.
|
|
52
|
+
*/
|
|
53
|
+
function parsePluginManifest(data) {
|
|
54
|
+
const parsed = PluginManifestSchema.parse(data);
|
|
55
|
+
if (parsed.manifestVersion !== 2) throw new Error(manifestVersionIssue(parsed.name, parsed.manifestVersion));
|
|
56
|
+
return parsed;
|
|
57
|
+
}
|
|
58
|
+
const manifestVersionIssue = (name, found) => `unsupported manifest version ${found} in "${name}" — this build speaks ${2}; regenerate manifest.gen.json with the installed framework`;
|
|
59
|
+
const ManifestSchema = z.object({
|
|
60
|
+
manifestVersion: z.number().int(),
|
|
61
|
+
plugins: z.array(PluginManifestSchema)
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* The client compose payload — the runtime-config `ui.compose` block the
|
|
65
|
+
* server embeds and the client reconstructs the tree from. Single home:
|
|
66
|
+
* everything-dev's client-config schema, the hydrate client, and the host's
|
|
67
|
+
* ui-compose all derive from this schema.
|
|
68
|
+
*/
|
|
69
|
+
const ComposeRemoteSchema = z.object({
|
|
70
|
+
key: z.string(),
|
|
71
|
+
name: z.string(),
|
|
72
|
+
entry: z.string(),
|
|
73
|
+
/** the remote's (hashed) browser-manifest URL — preferred over deriving
|
|
74
|
+
* one from `entry` by stripping the legacy fixed entry name */
|
|
75
|
+
manifestUrl: z.string().optional()
|
|
76
|
+
});
|
|
77
|
+
const ComposePayloadSchema = z.object({
|
|
78
|
+
digest: z.string(),
|
|
79
|
+
remotes: z.array(ComposeRemoteSchema),
|
|
80
|
+
manifests: z.array(PluginManifestSchema)
|
|
81
|
+
}).superRefine((payload, ctx) => {
|
|
82
|
+
for (const manifest of payload.manifests) if (manifest.manifestVersion !== 2) ctx.addIssue({
|
|
83
|
+
code: "custom",
|
|
84
|
+
message: manifestVersionIssue(manifest.name, manifest.manifestVersion)
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
export { ComposePayloadSchema, ComposeRemoteSchema, MANIFEST_VERSION, ManifestSchema, PluginManifestSchema, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, parsePluginManifest };
|
|
90
|
+
//# sourceMappingURL=manifest-schema.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-schema.mjs","names":[],"sources":["../../../src/ui/manifest/manifest-schema.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { MOUNTS } from \"./mount-registry\";\n\n/**\n * manifest.gen.json — pure data emitted by the generator from route files\n * only (ADR 0008 §2). Nothing here is hand-maintained; this schema is the\n * composition contract and the audit/marketplace surface. The host refuses\n * unknown `manifestVersion` majors.\n */\n\n/**\n * The manifest contract major this code speaks. Emitted by the generator and\n * enforced at every load (the host parses through `parsePluginManifest`; the\n * client parse of the compose payload checks it — a skewed major degrades to\n * the core-only tree instead of silently mis-constructing).\n */\nexport const MANIFEST_VERSION = 2;\nexport const SUPPORTED_MANIFEST_VERSION = MANIFEST_VERSION;\n\nexport const RouteRecordSchema = z.object({\n /** Full route id, root-relative, no leading slash. e.g. \"_public/login\" */\n id: z.string(),\n /** Node kind — the @tanstack/virtual-file-routes vocabulary. */\n type: z.enum([\"route\", \"layout\", \"index\"]),\n /** URL path relative to the parent; absent for pathless layouts. */\n path: z.string().optional(),\n /** id of the parent record within the same plugin; absent = mount-level. */\n parentId: z.string().optional(),\n /** Set on ROOT-level pathless layouts: the mount this subtree declares. */\n mount: z.enum(MOUNTS as [string, ...string[]]).optional(),\n /** Route file relative to the routes directory (options source). */\n file: z.string().optional(),\n});\n\nexport const PluginManifestSchema = z.object({\n /** Plugin key — derived from the workspace/config key by the emitter. */\n name: z.string(),\n /** Contract version — enforced by `parsePluginManifest` / the payload check. */\n manifestVersion: z.number().int(),\n /** Lifted from the plugin's `__root` route options, if any. */\n rootMeta: z\n .object({\n hasHead: z.boolean().optional(),\n hasStaticData: z.boolean().optional(),\n })\n .optional(),\n routes: z.array(RouteRecordSchema),\n});\n\n/**\n * The load-time contract check — one diagnostic for a manifest from a\n * different framework major. Every manifest load goes through this.\n */\nexport function parsePluginManifest(data: unknown): PluginManifest {\n const parsed = PluginManifestSchema.parse(data);\n if (parsed.manifestVersion !== SUPPORTED_MANIFEST_VERSION) {\n throw new Error(manifestVersionIssue(parsed.name, parsed.manifestVersion));\n }\n return parsed;\n}\n\nconst manifestVersionIssue = (name: string, found: number): string =>\n `unsupported manifest version ${found} in \"${name}\" — this build speaks ${SUPPORTED_MANIFEST_VERSION}; regenerate manifest.gen.json with the installed framework`;\n\nexport const ManifestSchema = z.object({\n manifestVersion: z.number().int(),\n plugins: z.array(PluginManifestSchema),\n});\n\nexport type RouteRecord = z.infer<typeof RouteRecordSchema>;\nexport type PluginManifest = z.infer<typeof PluginManifestSchema>;\nexport type Manifest = z.infer<typeof ManifestSchema>;\n\n/**\n * The client compose payload — the runtime-config `ui.compose` block the\n * server embeds and the client reconstructs the tree from. Single home:\n * everything-dev's client-config schema, the hydrate client, and the host's\n * ui-compose all derive from this schema.\n */\nexport const ComposeRemoteSchema = z.object({\n key: z.string(),\n name: z.string(),\n entry: z.string(),\n /** the remote's (hashed) browser-manifest URL — preferred over deriving\n * one from `entry` by stripping the legacy fixed entry name */\n manifestUrl: z.string().optional(),\n});\n\nexport const ComposePayloadSchema = z\n .object({\n digest: z.string(),\n remotes: z.array(ComposeRemoteSchema),\n manifests: z.array(PluginManifestSchema),\n })\n .superRefine((payload, ctx) => {\n for (const manifest of payload.manifests) {\n if (manifest.manifestVersion !== SUPPORTED_MANIFEST_VERSION) {\n ctx.addIssue({\n code: \"custom\",\n message: manifestVersionIssue(manifest.name, manifest.manifestVersion),\n });\n }\n }\n });\n\nexport type ComposeRemote = z.infer<typeof ComposeRemoteSchema>;\nexport type ComposePayload = z.infer<typeof ComposePayloadSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAa,mBAAmB;AAChC,MAAa;AAEb,MAAa,oBAAoB,EAAE,OAAO;;CAExC,IAAI,EAAE,OAAO;;CAEb,MAAM,EAAE,KAAK;EAAC;EAAS;EAAU;CAAO,CAAC;;CAEzC,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;;CAE1B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;;CAE9B,OAAO,EAAE,KAAK,MAA+B,CAAC,CAAC,SAAS;;CAExD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS;AAC5B,CAAC;AAED,MAAa,uBAAuB,EAAE,OAAO;;CAE3C,MAAM,EAAE,OAAO;;CAEf,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI;;CAEhC,UAAU,EACP,OAAO;EACN,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS;EAC9B,eAAe,EAAE,QAAQ,CAAC,CAAC,SAAS;CACtC,CAAC,CAAC,CACD,SAAS;CACZ,QAAQ,EAAE,MAAM,iBAAiB;AACnC,CAAC;;;;;AAMD,SAAgB,oBAAoB,MAA+B;CACjE,MAAM,SAAS,qBAAqB,MAAM,IAAI;CAC9C,IAAI,OAAO,uBACT,MAAM,IAAI,MAAM,qBAAqB,OAAO,MAAM,OAAO,eAAe,CAAC;CAE3E,OAAO;AACT;AAEA,MAAM,wBAAwB,MAAc,UAC1C,gCAAgC,MAAM,OAAO,KAAK,0BAAmD;AAEvG,MAAa,iBAAiB,EAAE,OAAO;CACrC,iBAAiB,EAAE,OAAO,CAAC,CAAC,IAAI;CAChC,SAAS,EAAE,MAAM,oBAAoB;AACvC,CAAC;;;;;;;AAYD,MAAa,sBAAsB,EAAE,OAAO;CAC1C,KAAK,EAAE,OAAO;CACd,MAAM,EAAE,OAAO;CACf,OAAO,EAAE,OAAO;;;CAGhB,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS;AACnC,CAAC;AAED,MAAa,uBAAuB,EACjC,OAAO;CACN,QAAQ,EAAE,OAAO;CACjB,SAAS,EAAE,MAAM,mBAAmB;CACpC,WAAW,EAAE,MAAM,oBAAoB;AACzC,CAAC,CAAC,CACD,aAAa,SAAS,QAAQ;CAC7B,KAAK,MAAM,YAAY,QAAQ,WAC7B,IAAI,SAAS,uBACX,IAAI,SAAS;EACX,MAAM;EACN,SAAS,qBAAqB,SAAS,MAAM,SAAS,eAAe;CACvE,CAAC;AAGP,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
exports.MOUNTS = MOUNTS;
|
|
48
|
+
exports.MOUNT_ALIASES = MOUNT_ALIASES;
|
|
49
|
+
exports.MOUNT_REGISTRY = MOUNT_REGISTRY;
|
|
50
|
+
exports.MOUNT_REGISTRY_VERSION = MOUNT_REGISTRY_VERSION;
|
|
51
|
+
exports.resolveMountSegment = resolveMountSegment;
|
|
52
|
+
//# sourceMappingURL=mount-registry.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mount-registry.cjs","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,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.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mount-registry.d.cts","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"}
|