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,268 @@
|
|
|
1
|
+
import { MOUNT_REGISTRY, resolveMountSegment } from "./mount-registry.mjs";
|
|
2
|
+
import { digestOf } from "./descriptor.mjs";
|
|
3
|
+
import { compareNavItems } from "./nav.mjs";
|
|
4
|
+
import { ROUTE_OPTION_KEYS } from "./route-config.mjs";
|
|
5
|
+
import { Outlet, createRootRoute, createRoute, redirect } from "@tanstack/react-router";
|
|
6
|
+
|
|
7
|
+
//#region src/ui/manifest/construct.ts
|
|
8
|
+
/**
|
|
9
|
+
* Host-side route-graph construction (ADR 0008 §1): manifests + route
|
|
10
|
+
* configs in → host-built tree out. The host constructs ITS OWN Route
|
|
11
|
+
* objects from validated manifest data via public `createRoute` APIs; no
|
|
12
|
+
* foreign route object is ever mutated. Gates are attached HOST-side from
|
|
13
|
+
* the mount registry — plugins cannot ship a route that escapes its
|
|
14
|
+
* mount's gate because plugins never construct route objects.
|
|
15
|
+
*
|
|
16
|
+
* Mounts are the ONLY cross-source parenting points: a root-level
|
|
17
|
+
* pathless layout file (`_public.tsx`) declares the mount for the whole
|
|
18
|
+
* composition (exactly one declaring source per mount); every other
|
|
19
|
+
* source's routes live under the same `_mount/` directory prefix and
|
|
20
|
+
* parent onto the shared mount route. This module executes inside the
|
|
21
|
+
* core ui's module graph (production MF expose `./compose`, dev source
|
|
22
|
+
* import) so constructed routes are minted by the same react/router
|
|
23
|
+
* instance that renders them.
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* TanStack's Route generics are intentionally invariant — routes built from
|
|
27
|
+
* manifest data can't satisfy them structurally. One named boundary for
|
|
28
|
+
* handing a constructed route to the tree-building APIs.
|
|
29
|
+
*/
|
|
30
|
+
function toAnyRoute(route) {
|
|
31
|
+
return route;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Gate redirects are absolute: gates attach to root-level mount routes, and
|
|
35
|
+
* relatives would silently shift if a mount ever moved deeper in the tree.
|
|
36
|
+
* The login surface is plugin-owned, never core-known.
|
|
37
|
+
*/
|
|
38
|
+
const LOGIN_TO = "/login";
|
|
39
|
+
const HOME_TO = "/";
|
|
40
|
+
/**
|
|
41
|
+
* Gate implementations by mount gate kind. Only `session` and `admin` are
|
|
42
|
+
* implemented (ADR 0008 §3); unimplemented mounts are rejected during mount
|
|
43
|
+
* declaration before any gate lookup, and gates are optional by type — a
|
|
44
|
+
* mount without an entry (or `none`) renders ungated.
|
|
45
|
+
*/
|
|
46
|
+
const GATES = {
|
|
47
|
+
session: ({ context, location }) => {
|
|
48
|
+
if (!userOf(context)) throw redirect({
|
|
49
|
+
to: LOGIN_TO,
|
|
50
|
+
search: { redirect: location.pathname + location.searchStr }
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
admin: ({ context }) => {
|
|
54
|
+
const user = userOf(context);
|
|
55
|
+
if (!user) throw redirect({ to: LOGIN_TO });
|
|
56
|
+
if (user.role !== "admin") throw redirect({ to: HOME_TO });
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const userOf = (context) => context?.user ?? context?.session?.user;
|
|
60
|
+
function joinPath(a, b) {
|
|
61
|
+
const left = a && a !== "/" ? a.replace(/\/+$/, "") : "";
|
|
62
|
+
const right = b && b !== "/" ? b.replace(/^\/+/, "") : "";
|
|
63
|
+
if (!left) return right ? `/${right}` : "/";
|
|
64
|
+
if (!right) return left;
|
|
65
|
+
return `${left}/${right}`;
|
|
66
|
+
}
|
|
67
|
+
const navOf = (options) => {
|
|
68
|
+
const nav = options.staticData?.nav;
|
|
69
|
+
if (nav && typeof nav === "object" && typeof nav.label === "string") return nav;
|
|
70
|
+
};
|
|
71
|
+
/** Layout routes (mount or pathless) pass their authored options through,
|
|
72
|
+
* like every other route kind. On mount routes the registry gate composes
|
|
73
|
+
* BEFORE the declaration's own beforeLoad so a source can never escape its
|
|
74
|
+
* mount's gate (ADR 0008 §3), while the declaration's return value still
|
|
75
|
+
* flows to children as route context. */
|
|
76
|
+
function layoutBeforeLoad(gate, declared) {
|
|
77
|
+
if (!gate) return declared;
|
|
78
|
+
return (args) => {
|
|
79
|
+
gate(args);
|
|
80
|
+
return declared?.(args);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const AUTHORED_OPTION_KEYS = ROUTE_OPTION_KEYS.filter((key) => key !== "beforeLoad" && key !== "component");
|
|
84
|
+
function authoredOptions(options) {
|
|
85
|
+
const authored = {};
|
|
86
|
+
for (const key of AUTHORED_OPTION_KEYS) if (options[key] !== void 0) authored[key] = options[key];
|
|
87
|
+
return authored;
|
|
88
|
+
}
|
|
89
|
+
function rootAuthoredOptions(options) {
|
|
90
|
+
const { params: _params, ...authored } = authoredOptions(options);
|
|
91
|
+
return authored;
|
|
92
|
+
}
|
|
93
|
+
async function constructTree(input) {
|
|
94
|
+
const refs = [...input.plugins].sort((a, b) => a.key.localeCompare(b.key));
|
|
95
|
+
const resolved = [];
|
|
96
|
+
for (const ref of refs) resolved.push(await input.resolve(ref));
|
|
97
|
+
const optionsByPlugin = /* @__PURE__ */ new Map();
|
|
98
|
+
for (const plugin of resolved) {
|
|
99
|
+
const optionsById = /* @__PURE__ */ new Map();
|
|
100
|
+
await Promise.all(plugin.manifest.routes.map(async (record) => {
|
|
101
|
+
const loader = plugin.routeConfig.routeConfigLoaders[record.id];
|
|
102
|
+
if (!loader) throw new Error(`routeConfig for "${plugin.key}" has no loader for route "${record.id}"`);
|
|
103
|
+
optionsById.set(record.id, await loader());
|
|
104
|
+
}));
|
|
105
|
+
optionsByPlugin.set(plugin.key, optionsById);
|
|
106
|
+
}
|
|
107
|
+
const declarations = /* @__PURE__ */ new Map();
|
|
108
|
+
for (const plugin of resolved) for (const record of plugin.manifest.routes) {
|
|
109
|
+
if (!record.mount) continue;
|
|
110
|
+
const mountId = record.mount;
|
|
111
|
+
if (!MOUNT_REGISTRY[mountId].implemented) throw new Error(`mount "${record.mount}" is declared vocabulary but unimplemented (ADR 0008 §3) — declared by "${plugin.key}"`);
|
|
112
|
+
const existing = declarations.get(mountId);
|
|
113
|
+
if (existing) throw new Error(`mount "${mountId}" declared by multiple sources: "${existing.key}" (${existing.record.file}) and "${plugin.key}" (${record.file})`);
|
|
114
|
+
declarations.set(mountId, {
|
|
115
|
+
key: plugin.key,
|
|
116
|
+
record,
|
|
117
|
+
options: optionsByPlugin.get(plugin.key).get(record.id)
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
const rootRoute = toAnyRoute(createRootRoute({
|
|
121
|
+
...input.rootOptions ? rootAuthoredOptions(input.rootOptions) : {},
|
|
122
|
+
component: input.rootOptions?.component ?? Outlet,
|
|
123
|
+
...input.rootOptions?.beforeLoad ? { beforeLoad: input.rootOptions.beforeLoad } : {}
|
|
124
|
+
}));
|
|
125
|
+
const mountRoutes = /* @__PURE__ */ new Map();
|
|
126
|
+
for (const mountId of Object.keys(MOUNT_REGISTRY)) {
|
|
127
|
+
const declaration = declarations.get(mountId);
|
|
128
|
+
if (!declaration) continue;
|
|
129
|
+
const def = MOUNT_REGISTRY[mountId];
|
|
130
|
+
const gate = GATES[def.gate];
|
|
131
|
+
const options = declaration.options;
|
|
132
|
+
const route = createRoute({
|
|
133
|
+
id: `__mount_${mountId}`,
|
|
134
|
+
getParentRoute: () => rootRoute,
|
|
135
|
+
...gate || options.beforeLoad ? { beforeLoad: layoutBeforeLoad(gate, options.beforeLoad) } : {},
|
|
136
|
+
...authoredOptions(options),
|
|
137
|
+
component: options.component ?? Outlet
|
|
138
|
+
});
|
|
139
|
+
mountRoutes.set(mountId, toAnyRoute(route));
|
|
140
|
+
}
|
|
141
|
+
const mountByLayoutId = /* @__PURE__ */ new Map();
|
|
142
|
+
for (const [mountId, declaration] of declarations) mountByLayoutId.set(declaration.record.id, mountId);
|
|
143
|
+
const nav = [];
|
|
144
|
+
const mountCounts = {};
|
|
145
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
146
|
+
/** cross-plugin path-collision guard: claimed paths per parent route */
|
|
147
|
+
const claimedPathsByParent = /* @__PURE__ */ new Map();
|
|
148
|
+
const attach = (parent, child) => {
|
|
149
|
+
const list = childrenByParent.get(parent) ?? [];
|
|
150
|
+
list.push(child);
|
|
151
|
+
childrenByParent.set(parent, list);
|
|
152
|
+
};
|
|
153
|
+
for (const plugin of resolved) {
|
|
154
|
+
const optionsById = optionsByPlugin.get(plugin.key);
|
|
155
|
+
const fullPathById = /* @__PURE__ */ new Map();
|
|
156
|
+
const mountById = /* @__PURE__ */ new Map();
|
|
157
|
+
const byId = /* @__PURE__ */ new Map();
|
|
158
|
+
const parentFor = (record) => {
|
|
159
|
+
if (record.parentId) {
|
|
160
|
+
const local = byId.get(record.parentId);
|
|
161
|
+
if (local) return {
|
|
162
|
+
route: local.route,
|
|
163
|
+
fullPath: fullPathById.get(record.parentId),
|
|
164
|
+
mount: mountById.get(record.parentId)
|
|
165
|
+
};
|
|
166
|
+
const mount = mountByLayoutId.get(record.parentId);
|
|
167
|
+
if (mount) return {
|
|
168
|
+
route: mountRoutes.get(mount),
|
|
169
|
+
fullPath: "",
|
|
170
|
+
mount
|
|
171
|
+
};
|
|
172
|
+
throw new Error(`unresolvable parent "${record.parentId}" for "${record.id}" in "${plugin.key}" — mounts are the only cross-source parenting points`);
|
|
173
|
+
}
|
|
174
|
+
const firstSegment = record.id.split("/")[0] ?? "";
|
|
175
|
+
if (firstSegment.startsWith("_")) {
|
|
176
|
+
const mount = resolveMountSegment(firstSegment.slice(1));
|
|
177
|
+
if (mount && mountRoutes.has(mount)) return {
|
|
178
|
+
route: mountRoutes.get(mount),
|
|
179
|
+
fullPath: "",
|
|
180
|
+
mount
|
|
181
|
+
};
|
|
182
|
+
if (mount) throw new Error(`mount "${mount}" is not declared by any source (route "${record.id}" in "${plugin.key}")`);
|
|
183
|
+
throw new Error(`unknown mount "_${firstSegment.slice(1)}" (route "${record.id}" in "${plugin.key}")`);
|
|
184
|
+
}
|
|
185
|
+
throw new Error(`route "${record.id}" in "${plugin.key}" must live under a mount`);
|
|
186
|
+
};
|
|
187
|
+
const pending = plugin.manifest.routes.filter((record) => !record.mount);
|
|
188
|
+
let progressed = true;
|
|
189
|
+
while (pending.length > 0 && progressed) {
|
|
190
|
+
progressed = false;
|
|
191
|
+
for (let i = 0; i < pending.length; i += 1) {
|
|
192
|
+
const record = pending[i];
|
|
193
|
+
if (record.parentId && !byId.has(record.parentId) && !mountByLayoutId.has(record.parentId)) continue;
|
|
194
|
+
pending.splice(i, 1);
|
|
195
|
+
progressed = true;
|
|
196
|
+
const options = optionsById.get(record.id);
|
|
197
|
+
const parent = parentFor(record);
|
|
198
|
+
const routePath = record.path;
|
|
199
|
+
const isLayoutRoute = record.type === "layout" || routePath === void 0;
|
|
200
|
+
if (!isLayoutRoute) {
|
|
201
|
+
const siblings = claimedPathsByParent.get(parent.route) ?? /* @__PURE__ */ new Map();
|
|
202
|
+
const claimant = siblings.get(routePath);
|
|
203
|
+
if (claimant) throw new Error(`path collision: "${plugin.key}" route "${record.id}" declares "${routePath}" which is already claimed by "${claimant}" under the same parent`);
|
|
204
|
+
siblings.set(routePath, `${plugin.key}:${record.id}`);
|
|
205
|
+
claimedPathsByParent.set(parent.route, siblings);
|
|
206
|
+
}
|
|
207
|
+
const fullPath = joinPath(parent.fullPath, routePath);
|
|
208
|
+
let route;
|
|
209
|
+
if (isLayoutRoute) route = createRoute({
|
|
210
|
+
id: `${plugin.key}__${record.id}`,
|
|
211
|
+
getParentRoute: () => parent.route,
|
|
212
|
+
...authoredOptions(options),
|
|
213
|
+
...options.beforeLoad ? { beforeLoad: options.beforeLoad } : {},
|
|
214
|
+
component: options.component ?? Outlet
|
|
215
|
+
});
|
|
216
|
+
else route = createRoute({
|
|
217
|
+
path: routePath,
|
|
218
|
+
getParentRoute: () => parent.route,
|
|
219
|
+
...authoredOptions(options),
|
|
220
|
+
...options.beforeLoad ? { beforeLoad: options.beforeLoad } : {},
|
|
221
|
+
component: options.component ?? Outlet
|
|
222
|
+
});
|
|
223
|
+
byId.set(record.id, {
|
|
224
|
+
record,
|
|
225
|
+
route: toAnyRoute(route)
|
|
226
|
+
});
|
|
227
|
+
fullPathById.set(record.id, fullPath);
|
|
228
|
+
mountById.set(record.id, parent.mount);
|
|
229
|
+
attach(parent.route, toAnyRoute(route));
|
|
230
|
+
mountCounts[parent.mount] = (mountCounts[parent.mount] ?? 0) + 1;
|
|
231
|
+
const navDeclaration = navOf(options);
|
|
232
|
+
if (navDeclaration && navDeclaration.hidden !== true) nav.push({
|
|
233
|
+
id: `${plugin.key}:${record.id}`,
|
|
234
|
+
label: navDeclaration.label,
|
|
235
|
+
...typeof navDeclaration.icon === "string" ? { icon: navDeclaration.icon } : {},
|
|
236
|
+
...typeof navDeclaration.group === "string" ? { group: navDeclaration.group } : {},
|
|
237
|
+
...typeof navDeclaration.order === "number" ? { order: navDeclaration.order } : {},
|
|
238
|
+
to: navDeclaration.to ?? fullPath,
|
|
239
|
+
plugin: plugin.key,
|
|
240
|
+
mount: parent.mount
|
|
241
|
+
});
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (pending.length > 0) throw new Error(`unresolvable parentage in "${plugin.key}": ${pending.map((record) => record.id).join(", ")}`);
|
|
246
|
+
}
|
|
247
|
+
for (const [parent, children] of childrenByParent) parent.addChildren(children);
|
|
248
|
+
rootRoute.addChildren([...mountRoutes.values()]);
|
|
249
|
+
nav.sort(compareNavItems);
|
|
250
|
+
return {
|
|
251
|
+
rootRoute,
|
|
252
|
+
routeTree: rootRoute,
|
|
253
|
+
digest: await digestOf({
|
|
254
|
+
plugins: refs.map((ref) => ({
|
|
255
|
+
key: ref.key,
|
|
256
|
+
mfName: ref.mfName
|
|
257
|
+
})),
|
|
258
|
+
manifests: resolved.map((plugin) => plugin.manifest)
|
|
259
|
+
}),
|
|
260
|
+
manifests: resolved.map((plugin) => plugin.manifest),
|
|
261
|
+
nav: { items: nav },
|
|
262
|
+
mountCounts
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
//#endregion
|
|
267
|
+
export { constructTree };
|
|
268
|
+
//# sourceMappingURL=construct.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construct.mjs","names":[],"sources":["../../../src/ui/manifest/construct.ts"],"sourcesContent":["import type { AnyRoute } from \"@tanstack/react-router\";\nimport { createRootRoute, createRoute, Outlet, redirect } from \"@tanstack/react-router\";\nimport { digestOf } from \"./descriptor\";\nimport type { PluginManifest, RouteRecord } from \"./manifest-schema\";\nimport { MOUNT_REGISTRY, type MountDef, type MountId, resolveMountSegment } from \"./mount-registry\";\nimport { compareNavItems, type NavDeclaration, type NavItem, type NavManifest } from \"./nav\";\nimport { ROUTE_OPTION_KEYS, type RouteConfigModule, type RouteOptionsBundle } from \"./route-config\";\n\n/**\n * Host-side route-graph construction (ADR 0008 §1): manifests + route\n * configs in → host-built tree out. The host constructs ITS OWN Route\n * objects from validated manifest data via public `createRoute` APIs; no\n * foreign route object is ever mutated. Gates are attached HOST-side from\n * the mount registry — plugins cannot ship a route that escapes its\n * mount's gate because plugins never construct route objects.\n *\n * Mounts are the ONLY cross-source parenting points: a root-level\n * pathless layout file (`_public.tsx`) declares the mount for the whole\n * composition (exactly one declaring source per mount); every other\n * source's routes live under the same `_mount/` directory prefix and\n * parent onto the shared mount route. This module executes inside the\n * core ui's module graph (production MF expose `./compose`, dev source\n * import) so constructed routes are minted by the same react/router\n * instance that renders them.\n */\n\n/**\n * TanStack's Route generics are intentionally invariant — routes built from\n * manifest data can't satisfy them structurally. One named boundary for\n * handing a constructed route to the tree-building APIs.\n */\nfunction toAnyRoute(route: unknown): AnyRoute {\n return route as AnyRoute;\n}\n\nexport interface GateUser {\n id: string;\n name?: string;\n /** Better Auth user role — \"admin\" gates the admin mount. */\n role?: string;\n}\n\nexport interface HostContext {\n user?: GateUser;\n session?: { user?: GateUser };\n}\n\ntype GateFn = (args: {\n context: HostContext;\n location: { pathname: string; searchStr: string };\n}) => void;\n\n/**\n * Gate redirects are absolute: gates attach to root-level mount routes, and\n * relatives would silently shift if a mount ever moved deeper in the tree.\n * The login surface is plugin-owned, never core-known.\n */\nconst LOGIN_TO: string = \"/login\";\nconst HOME_TO: string = \"/\";\n\n/**\n * Gate implementations by mount gate kind. Only `session` and `admin` are\n * implemented (ADR 0008 §3); unimplemented mounts are rejected during mount\n * declaration before any gate lookup, and gates are optional by type — a\n * mount without an entry (or `none`) renders ungated.\n */\nconst GATES: Partial<Record<MountDef[\"gate\"], GateFn>> = {\n session: ({ context, location }) => {\n const user = userOf(context);\n if (!user) {\n throw redirect({\n to: LOGIN_TO,\n search: { redirect: location.pathname + location.searchStr } as never,\n });\n }\n },\n admin: ({ context }) => {\n const user = userOf(context);\n if (!user) throw redirect({ to: LOGIN_TO });\n if (user.role !== \"admin\") throw redirect({ to: HOME_TO });\n },\n};\n\nconst userOf = (context: HostContext | undefined): GateUser | undefined =>\n context?.user ?? context?.session?.user;\n\nexport interface ConstructPluginRef {\n /** composition identity — plugin key; participates in the digest */\n key: string;\n /** deployment identity — the MF container name loadRemote targets */\n mfName: string;\n}\n\nexport interface ResolvedPlugin {\n key: string;\n manifest: PluginManifest;\n routeConfig: RouteConfigModule;\n}\n\nexport interface ConstructInput {\n name: string;\n plugins: ReadonlyArray<ConstructPluginRef>;\n resolve: (ref: ConstructPluginRef) => Promise<ResolvedPlugin>;\n /** core ui `__root` options — component/error/notFound + head baseline */\n rootOptions?: RouteOptionsBundle;\n}\n\nexport interface ConstructedTree {\n rootRoute: AnyRoute;\n routeTree: AnyRoute;\n digest: string;\n manifests: PluginManifest[];\n nav: NavManifest;\n /** constructed route count per mount id */\n mountCounts: Record<string, number>;\n}\n\ninterface MountDeclaration {\n key: string;\n record: RouteRecord;\n options: RouteOptionsBundle;\n}\n\nfunction joinPath(a: string | undefined, b: string | undefined): string {\n const left = a && a !== \"/\" ? a.replace(/\\/+$/, \"\") : \"\";\n const right = b && b !== \"/\" ? b.replace(/^\\/+/, \"\") : \"\";\n if (!left) return right ? `/${right}` : \"/\";\n if (!right) return left;\n return `${left}/${right}`;\n}\n\nconst navOf = (options: RouteOptionsBundle): NavDeclaration | undefined => {\n const nav = options.staticData?.nav;\n if (nav && typeof nav === \"object\" && typeof (nav as NavDeclaration).label === \"string\") {\n return nav as NavDeclaration;\n }\n return undefined;\n};\n\n/** Layout routes (mount or pathless) pass their authored options through,\n * like every other route kind. On mount routes the registry gate composes\n * BEFORE the declaration's own beforeLoad so a source can never escape its\n * mount's gate (ADR 0008 §3), while the declaration's return value still\n * flows to children as route context. */\nfunction layoutBeforeLoad(\n gate: GateFn | undefined,\n declared: RouteOptionsBundle[\"beforeLoad\"],\n): RouteOptionsBundle[\"beforeLoad\"] {\n if (!gate) return declared;\n return (args) => {\n gate(args);\n return declared?.(args);\n };\n}\n\nconst AUTHORED_OPTION_KEYS = ROUTE_OPTION_KEYS.filter(\n (key) => key !== \"beforeLoad\" && key !== \"component\",\n);\n\nfunction authoredOptions(options: RouteOptionsBundle): Partial<RouteOptionsBundle> {\n const authored: Partial<Record<keyof RouteOptionsBundle, unknown>> = {};\n for (const key of AUTHORED_OPTION_KEYS) {\n if (options[key] !== undefined) authored[key] = options[key];\n }\n return authored as Partial<RouteOptionsBundle>;\n}\n\nfunction rootAuthoredOptions(options: RouteOptionsBundle): Partial<RouteOptionsBundle> {\n const { params: _params, ...authored } = authoredOptions(options);\n return authored;\n}\n\nexport async function constructTree(input: ConstructInput): Promise<ConstructedTree> {\n const refs = [...input.plugins].sort((a, b) => a.key.localeCompare(b.key));\n const resolved: ResolvedPlugin[] = [];\n for (const ref of refs) {\n resolved.push(await input.resolve(ref));\n }\n\n const optionsByPlugin = new Map<string, Map<string, RouteOptionsBundle>>();\n for (const plugin of resolved) {\n const optionsById = new Map<string, RouteOptionsBundle>();\n await Promise.all(\n plugin.manifest.routes.map(async (record) => {\n const loader = plugin.routeConfig.routeConfigLoaders[record.id];\n if (!loader) {\n throw new Error(`routeConfig for \"${plugin.key}\" has no loader for route \"${record.id}\"`);\n }\n optionsById.set(record.id, await loader());\n }),\n );\n optionsByPlugin.set(plugin.key, optionsById);\n }\n\n const declarations = new Map<MountId, MountDeclaration>();\n for (const plugin of resolved) {\n for (const record of plugin.manifest.routes) {\n if (!record.mount) continue;\n const mountId = record.mount as MountId;\n const def = MOUNT_REGISTRY[mountId];\n if (!def.implemented) {\n throw new Error(\n `mount \"${record.mount}\" is declared vocabulary but unimplemented (ADR 0008 §3) — declared by \"${plugin.key}\"`,\n );\n }\n const existing = declarations.get(mountId);\n if (existing) {\n throw new Error(\n `mount \"${mountId}\" declared by multiple sources: \"${existing.key}\" (${existing.record.file}) and \"${plugin.key}\" (${record.file})`,\n );\n }\n declarations.set(mountId, {\n key: plugin.key,\n record,\n options: optionsByPlugin.get(plugin.key)!.get(record.id)!,\n });\n }\n }\n\n const rootRoute = toAnyRoute(\n createRootRoute({\n ...(input.rootOptions ? rootAuthoredOptions(input.rootOptions) : {}),\n component: input.rootOptions?.component ?? Outlet,\n ...(input.rootOptions?.beforeLoad ? { beforeLoad: input.rootOptions.beforeLoad } : {}),\n }),\n );\n\n const mountRoutes = new Map<MountId, AnyRoute>();\n for (const mountId of Object.keys(MOUNT_REGISTRY) as MountId[]) {\n const declaration = declarations.get(mountId);\n if (!declaration) continue;\n const def = MOUNT_REGISTRY[mountId]!;\n const gate = GATES[def.gate];\n const options = declaration.options;\n const route = createRoute({\n id: `__mount_${mountId}`,\n getParentRoute: () => rootRoute,\n ...(gate || options.beforeLoad\n ? { beforeLoad: layoutBeforeLoad(gate, options.beforeLoad) }\n : {}),\n ...authoredOptions(options),\n component: options.component ?? Outlet,\n });\n mountRoutes.set(mountId, toAnyRoute(route));\n }\n\n const mountByLayoutId = new Map<string, MountId>();\n for (const [mountId, declaration] of declarations) {\n mountByLayoutId.set(declaration.record.id, mountId);\n }\n\n const nav: NavItem[] = [];\n const mountCounts: Record<string, number> = {};\n const childrenByParent = new Map<AnyRoute, AnyRoute[]>();\n /** cross-plugin path-collision guard: claimed paths per parent route */\n const claimedPathsByParent = new Map<AnyRoute, Map<string, string>>();\n const attach = (parent: AnyRoute, child: AnyRoute) => {\n const list = childrenByParent.get(parent) ?? [];\n list.push(child);\n childrenByParent.set(parent, list);\n };\n\n for (const plugin of resolved) {\n const optionsById = optionsByPlugin.get(plugin.key)!;\n const fullPathById = new Map<string, string>();\n const mountById = new Map<string, MountId>();\n const byId = new Map<string, { record: RouteRecord; route: AnyRoute }>();\n\n const parentFor = (\n record: RouteRecord,\n ): { route: AnyRoute; fullPath: string; mount: MountId } => {\n if (record.parentId) {\n const local = byId.get(record.parentId);\n if (local) {\n return {\n route: local.route,\n fullPath: fullPathById.get(record.parentId)!,\n mount: mountById.get(record.parentId)!,\n };\n }\n const mount = mountByLayoutId.get(record.parentId);\n if (mount) return { route: mountRoutes.get(mount)!, fullPath: \"\", mount };\n throw new Error(\n `unresolvable parent \"${record.parentId}\" for \"${record.id}\" in \"${plugin.key}\" — mounts are the only cross-source parenting points`,\n );\n }\n const firstSegment = record.id.split(\"/\")[0] ?? \"\";\n if (firstSegment.startsWith(\"_\")) {\n const mount = resolveMountSegment(firstSegment.slice(1));\n if (mount && mountRoutes.has(mount))\n return { route: mountRoutes.get(mount)!, fullPath: \"\", mount };\n if (mount) {\n throw new Error(\n `mount \"${mount}\" is not declared by any source (route \"${record.id}\" in \"${plugin.key}\")`,\n );\n }\n throw new Error(\n `unknown mount \"_${firstSegment.slice(1)}\" (route \"${record.id}\" in \"${plugin.key}\")`,\n );\n }\n throw new Error(`route \"${record.id}\" in \"${plugin.key}\" must live under a mount`);\n };\n\n const pending = plugin.manifest.routes.filter((record) => !record.mount);\n let progressed = true;\n while (pending.length > 0 && progressed) {\n progressed = false;\n for (let i = 0; i < pending.length; i += 1) {\n const record = pending[i]!;\n if (\n record.parentId &&\n !byId.has(record.parentId) &&\n !mountByLayoutId.has(record.parentId)\n ) {\n continue;\n }\n pending.splice(i, 1);\n progressed = true;\n\n const options = optionsById.get(record.id)!;\n const parent = parentFor(record);\n const routePath = record.path;\n const isLayoutRoute = record.type === \"layout\" || routePath === undefined;\n if (!isLayoutRoute) {\n const siblings = claimedPathsByParent.get(parent.route) ?? new Map<string, string>();\n const claimant = siblings.get(routePath);\n if (claimant) {\n throw new Error(\n `path collision: \"${plugin.key}\" route \"${record.id}\" declares \"${routePath}\" which is already claimed by \"${claimant}\" under the same parent`,\n );\n }\n siblings.set(routePath, `${plugin.key}:${record.id}`);\n claimedPathsByParent.set(parent.route, siblings);\n }\n const fullPath = joinPath(parent.fullPath, routePath);\n let route: AnyRoute;\n if (isLayoutRoute) {\n route = createRoute({\n id: `${plugin.key}__${record.id}`,\n getParentRoute: () => parent.route,\n ...authoredOptions(options),\n ...(options.beforeLoad ? { beforeLoad: options.beforeLoad } : {}),\n component: options.component ?? Outlet,\n });\n } else {\n route = createRoute({\n path: routePath,\n getParentRoute: () => parent.route,\n ...authoredOptions(options),\n ...(options.beforeLoad ? { beforeLoad: options.beforeLoad } : {}),\n component: options.component ?? Outlet,\n });\n }\n\n byId.set(record.id, { record, route: toAnyRoute(route) });\n fullPathById.set(record.id, fullPath);\n mountById.set(record.id, parent.mount);\n attach(parent.route, toAnyRoute(route));\n mountCounts[parent.mount] = (mountCounts[parent.mount] ?? 0) + 1;\n\n const navDeclaration = navOf(options);\n if (navDeclaration && navDeclaration.hidden !== true) {\n nav.push({\n id: `${plugin.key}:${record.id}`,\n label: navDeclaration.label,\n ...(typeof navDeclaration.icon === \"string\" ? { icon: navDeclaration.icon } : {}),\n ...(typeof navDeclaration.group === \"string\" ? { group: navDeclaration.group } : {}),\n ...(typeof navDeclaration.order === \"number\" ? { order: navDeclaration.order } : {}),\n to: navDeclaration.to ?? fullPath,\n plugin: plugin.key,\n mount: parent.mount,\n });\n }\n break;\n }\n }\n if (pending.length > 0) {\n throw new Error(\n `unresolvable parentage in \"${plugin.key}\": ${pending.map((record) => record.id).join(\", \")}`,\n );\n }\n }\n\n for (const [parent, children] of childrenByParent) {\n (parent as { addChildren: (children: AnyRoute[]) => void }).addChildren(children);\n }\n rootRoute.addChildren([...mountRoutes.values()] as AnyRoute[]);\n nav.sort(compareNavItems);\n\n const digest = await digestOf({\n plugins: refs.map((ref) => ({ key: ref.key, mfName: ref.mfName })),\n manifests: resolved.map((plugin) => plugin.manifest),\n });\n\n return {\n rootRoute,\n routeTree: rootRoute,\n digest,\n manifests: resolved.map((plugin) => plugin.manifest),\n nav: { items: nav },\n mountCounts,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAS,WAAW,OAA0B;CAC5C,OAAO;AACT;;;;;;AAwBA,MAAM,WAAmB;AACzB,MAAM,UAAkB;;;;;;;AAQxB,MAAM,QAAmD;CACvD,UAAU,EAAE,SAAS,eAAe;EAElC,IAAI,CADS,OAAO,OACZ,GACN,MAAM,SAAS;GACb,IAAI;GACJ,QAAQ,EAAE,UAAU,SAAS,WAAW,SAAS,UAAU;EAC7D,CAAC;CAEL;CACA,QAAQ,EAAE,cAAc;EACtB,MAAM,OAAO,OAAO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C5B,OAAO,eAAe;KACtB,GAAI,OAAO,eAAe,SAAS,WAAW,EAAE,MAAM,eAAe,KAAK,IAAI,CAAC;KAC/E,GAAI,OAAO,eAAe,UAAU,WAAW,EAAE,OAAO,eAAe,MAAM,IAAI,CAAC;KAClF,GAAI,OAAO,eAAe,UAAU,WAAW,EAAE,OAAO,eAAe,MAAM,IAAI,CAAC;KAClF,IAAI,eAAe,MAAM;KACzB,QAAQ,OAAO;KACf,OAAO,OAAO;IAChB,CAAC;IAEH;GACF;EACF;EACA,IAAI,QAAQ,SAAS,GACnB,MAAM,IAAI,MACR,8BAA8B,OAAO,IAAI,KAAK,QAAQ,KAAK,WAAW,OAAO,EAAE,CAAC,CAAC,KAAK,IAAI,GAC5F;CAEJ;CAEA,KAAK,MAAM,CAAC,QAAQ,aAAa,kBAC/B,AAAC,OAA2D,YAAY,QAAQ;CAElF,UAAU,YAAY,CAAC,GAAG,YAAY,OAAO,CAAC,CAAe;CAC7D,IAAI,KAAK,eAAe;CAOxB,OAAO;EACL;EACA,WAAW;EACX,cARmB,SAAS;GAC5B,SAAS,KAAK,KAAK,SAAS;IAAE,KAAK,IAAI;IAAK,QAAQ,IAAI;GAAO,EAAE;GACjE,WAAW,SAAS,KAAK,WAAW,OAAO,QAAQ;EACrD,CAAC;EAMC,WAAW,SAAS,KAAK,WAAW,OAAO,QAAQ;EACnD,KAAK,EAAE,OAAO,IAAI;EAClB;CACF;AACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_identity = require('../../identity.cjs');
|
|
3
|
+
|
|
4
|
+
//#region src/ui/manifest/contract.ts
|
|
5
|
+
/**
|
|
6
|
+
* Cross-workspace composition contract: file names, MF expose names, and the
|
|
7
|
+
* core's identity — the literals every consumer of the composed tree must
|
|
8
|
+
* agree on. Browser-safe, node-safe, zero imports.
|
|
9
|
+
*/
|
|
10
|
+
/** The core ui's composition key — `bos.config.json`'s `app.ui` identity. */
|
|
11
|
+
const CORE_UI_PLUGIN_KEY = "ui";
|
|
12
|
+
const UI_REMOTE_ENTRY_FILENAME = "remoteEntry.js";
|
|
13
|
+
const UI_REMOTE_SERVER_ENTRY_FILENAME = "remoteEntry.server.js";
|
|
14
|
+
const MANIFEST_FILENAME = "manifest.gen.json";
|
|
15
|
+
const ROUTE_CONFIG_FILENAME = "routeConfig.gen.ts";
|
|
16
|
+
/** Canonical MF exposes every manifest-composed ui source ships. */
|
|
17
|
+
const UI_EXPOSES = {
|
|
18
|
+
routeConfig: "./routeConfig",
|
|
19
|
+
compose: "./compose",
|
|
20
|
+
router: "./Router"
|
|
21
|
+
};
|
|
22
|
+
/** Exposes a PLUGIN ui source ships (the core additionally exposes compose/Router). */
|
|
23
|
+
const PLUGIN_UI_SHARED_EXPOSES = { routeConfig: UI_EXPOSES.routeConfig };
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.CORE_UI_PLUGIN_KEY = CORE_UI_PLUGIN_KEY;
|
|
27
|
+
exports.MANIFEST_FILENAME = MANIFEST_FILENAME;
|
|
28
|
+
exports.PLUGIN_UI_SHARED_EXPOSES = PLUGIN_UI_SHARED_EXPOSES;
|
|
29
|
+
exports.ROUTE_CONFIG_FILENAME = ROUTE_CONFIG_FILENAME;
|
|
30
|
+
exports.UI_EXPOSES = UI_EXPOSES;
|
|
31
|
+
exports.UI_REMOTE_ENTRY_FILENAME = UI_REMOTE_ENTRY_FILENAME;
|
|
32
|
+
exports.UI_REMOTE_SERVER_ENTRY_FILENAME = UI_REMOTE_SERVER_ENTRY_FILENAME;
|
|
33
|
+
exports.sanitizeContainerName = require_identity.containerName;
|
|
34
|
+
//# sourceMappingURL=contract.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.cjs","names":[],"sources":["../../../src/ui/manifest/contract.ts"],"sourcesContent":["/**\n * Cross-workspace composition contract: file names, MF expose names, and the\n * core's identity — the literals every consumer of the composed tree must\n * agree on. Browser-safe, node-safe, zero imports.\n */\n\n/** The core ui's composition key — `bos.config.json`'s `app.ui` identity. */\nexport const CORE_UI_PLUGIN_KEY = \"ui\";\n\nexport const UI_REMOTE_ENTRY_FILENAME = \"remoteEntry.js\";\nexport const UI_REMOTE_SERVER_ENTRY_FILENAME = \"remoteEntry.server.js\";\nexport const MANIFEST_FILENAME = \"manifest.gen.json\";\nexport const ROUTE_CONFIG_FILENAME = \"routeConfig.gen.ts\";\n\n/** Canonical MF exposes every manifest-composed ui source ships. */\nexport const UI_EXPOSES = {\n routeConfig: \"./routeConfig\",\n compose: \"./compose\",\n router: \"./Router\",\n} as const;\n\n/** Exposes a PLUGIN ui source ships (the core additionally exposes compose/Router). */\nexport const PLUGIN_UI_SHARED_EXPOSES = {\n routeConfig: UI_EXPOSES.routeConfig,\n} as const;\n\n/**\n * MF container naming rule shared by the build (rsbuild config) and runtime\n * config resolution — the host must register remotes under exactly the name\n * the built container declares. Delegates to the canonical identity module\n * (`every-plugin/identity`), which owns the derivation.\n */\nexport { containerName as sanitizeContainerName } from \"../../identity\";\n"],"mappings":";;;;;;;;;;AAOA,MAAa,qBAAqB;AAElC,MAAa,2BAA2B;AACxC,MAAa,kCAAkC;AAC/C,MAAa,oBAAoB;AACjC,MAAa,wBAAwB;;AAGrC,MAAa,aAAa;CACxB,aAAa;CACb,SAAS;CACT,QAAQ;AACV;;AAGA,MAAa,2BAA2B,EACtC,aAAa,WAAW,YAC1B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { containerName } from "../../identity.cjs";
|
|
2
|
+
//#region src/ui/manifest/contract.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Cross-workspace composition contract: file names, MF expose names, and the
|
|
5
|
+
* core's identity — the literals every consumer of the composed tree must
|
|
6
|
+
* agree on. Browser-safe, node-safe, zero imports.
|
|
7
|
+
*/
|
|
8
|
+
/** The core ui's composition key — `bos.config.json`'s `app.ui` identity. */
|
|
9
|
+
declare const CORE_UI_PLUGIN_KEY = "ui";
|
|
10
|
+
declare const UI_REMOTE_ENTRY_FILENAME = "remoteEntry.js";
|
|
11
|
+
declare const UI_REMOTE_SERVER_ENTRY_FILENAME = "remoteEntry.server.js";
|
|
12
|
+
declare const MANIFEST_FILENAME = "manifest.gen.json";
|
|
13
|
+
declare const ROUTE_CONFIG_FILENAME = "routeConfig.gen.ts";
|
|
14
|
+
/** Canonical MF exposes every manifest-composed ui source ships. */
|
|
15
|
+
declare const UI_EXPOSES: {
|
|
16
|
+
readonly routeConfig: "./routeConfig";
|
|
17
|
+
readonly compose: "./compose";
|
|
18
|
+
readonly router: "./Router";
|
|
19
|
+
};
|
|
20
|
+
/** Exposes a PLUGIN ui source ships (the core additionally exposes compose/Router). */
|
|
21
|
+
declare const PLUGIN_UI_SHARED_EXPOSES: {
|
|
22
|
+
readonly routeConfig: "./routeConfig";
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, containerName as sanitizeContainerName };
|
|
26
|
+
//# sourceMappingURL=contract.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.cts","names":[],"sources":["../../../src/ui/manifest/contract.ts"],"mappings":";;;;;;;;cAOa;cAEA;cACA;cACA;cACA;;cAGA;WACX;WACA;WACA;;;cAIW;WACX"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { containerName } from "../../identity.mjs";
|
|
2
|
+
//#region src/ui/manifest/contract.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Cross-workspace composition contract: file names, MF expose names, and the
|
|
5
|
+
* core's identity — the literals every consumer of the composed tree must
|
|
6
|
+
* agree on. Browser-safe, node-safe, zero imports.
|
|
7
|
+
*/
|
|
8
|
+
/** The core ui's composition key — `bos.config.json`'s `app.ui` identity. */
|
|
9
|
+
declare const CORE_UI_PLUGIN_KEY = "ui";
|
|
10
|
+
declare const UI_REMOTE_ENTRY_FILENAME = "remoteEntry.js";
|
|
11
|
+
declare const UI_REMOTE_SERVER_ENTRY_FILENAME = "remoteEntry.server.js";
|
|
12
|
+
declare const MANIFEST_FILENAME = "manifest.gen.json";
|
|
13
|
+
declare const ROUTE_CONFIG_FILENAME = "routeConfig.gen.ts";
|
|
14
|
+
/** Canonical MF exposes every manifest-composed ui source ships. */
|
|
15
|
+
declare const UI_EXPOSES: {
|
|
16
|
+
readonly routeConfig: "./routeConfig";
|
|
17
|
+
readonly compose: "./compose";
|
|
18
|
+
readonly router: "./Router";
|
|
19
|
+
};
|
|
20
|
+
/** Exposes a PLUGIN ui source ships (the core additionally exposes compose/Router). */
|
|
21
|
+
declare const PLUGIN_UI_SHARED_EXPOSES: {
|
|
22
|
+
readonly routeConfig: "./routeConfig";
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, containerName as sanitizeContainerName };
|
|
26
|
+
//# sourceMappingURL=contract.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.mts","names":[],"sources":["../../../src/ui/manifest/contract.ts"],"mappings":";;;;;;;;cAOa;cAEA;cACA;cACA;cACA;;cAGA;WACX;WACA;WACA;;;cAIW;WACX"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { containerName } from "../../identity.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/ui/manifest/contract.ts
|
|
4
|
+
/**
|
|
5
|
+
* Cross-workspace composition contract: file names, MF expose names, and the
|
|
6
|
+
* core's identity — the literals every consumer of the composed tree must
|
|
7
|
+
* agree on. Browser-safe, node-safe, zero imports.
|
|
8
|
+
*/
|
|
9
|
+
/** The core ui's composition key — `bos.config.json`'s `app.ui` identity. */
|
|
10
|
+
const CORE_UI_PLUGIN_KEY = "ui";
|
|
11
|
+
const UI_REMOTE_ENTRY_FILENAME = "remoteEntry.js";
|
|
12
|
+
const UI_REMOTE_SERVER_ENTRY_FILENAME = "remoteEntry.server.js";
|
|
13
|
+
const MANIFEST_FILENAME = "manifest.gen.json";
|
|
14
|
+
const ROUTE_CONFIG_FILENAME = "routeConfig.gen.ts";
|
|
15
|
+
/** Canonical MF exposes every manifest-composed ui source ships. */
|
|
16
|
+
const UI_EXPOSES = {
|
|
17
|
+
routeConfig: "./routeConfig",
|
|
18
|
+
compose: "./compose",
|
|
19
|
+
router: "./Router"
|
|
20
|
+
};
|
|
21
|
+
/** Exposes a PLUGIN ui source ships (the core additionally exposes compose/Router). */
|
|
22
|
+
const PLUGIN_UI_SHARED_EXPOSES = { routeConfig: UI_EXPOSES.routeConfig };
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, containerName as sanitizeContainerName };
|
|
26
|
+
//# sourceMappingURL=contract.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.mjs","names":[],"sources":["../../../src/ui/manifest/contract.ts"],"sourcesContent":["/**\n * Cross-workspace composition contract: file names, MF expose names, and the\n * core's identity — the literals every consumer of the composed tree must\n * agree on. Browser-safe, node-safe, zero imports.\n */\n\n/** The core ui's composition key — `bos.config.json`'s `app.ui` identity. */\nexport const CORE_UI_PLUGIN_KEY = \"ui\";\n\nexport const UI_REMOTE_ENTRY_FILENAME = \"remoteEntry.js\";\nexport const UI_REMOTE_SERVER_ENTRY_FILENAME = \"remoteEntry.server.js\";\nexport const MANIFEST_FILENAME = \"manifest.gen.json\";\nexport const ROUTE_CONFIG_FILENAME = \"routeConfig.gen.ts\";\n\n/** Canonical MF exposes every manifest-composed ui source ships. */\nexport const UI_EXPOSES = {\n routeConfig: \"./routeConfig\",\n compose: \"./compose\",\n router: \"./Router\",\n} as const;\n\n/** Exposes a PLUGIN ui source ships (the core additionally exposes compose/Router). */\nexport const PLUGIN_UI_SHARED_EXPOSES = {\n routeConfig: UI_EXPOSES.routeConfig,\n} as const;\n\n/**\n * MF container naming rule shared by the build (rsbuild config) and runtime\n * config resolution — the host must register remotes under exactly the name\n * the built container declares. Delegates to the canonical identity module\n * (`every-plugin/identity`), which owns the derivation.\n */\nexport { containerName as sanitizeContainerName } from \"../../identity\";\n"],"mappings":";;;;;;;;;AAOA,MAAa,qBAAqB;AAElC,MAAa,2BAA2B;AACxC,MAAa,kCAAkC;AAC/C,MAAa,oBAAoB;AACjC,MAAa,wBAAwB;;AAGrC,MAAa,aAAa;CACxB,aAAa;CACb,SAAS;CACT,QAAQ;AACV;;AAGA,MAAa,2BAA2B,EACtC,aAAa,WAAW,YAC1B"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const require_mount_registry = require('./mount-registry.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/ui/manifest/descriptor.ts
|
|
4
|
+
function App(input) {
|
|
5
|
+
return input;
|
|
6
|
+
}
|
|
7
|
+
function Plugin(name) {
|
|
8
|
+
return {
|
|
9
|
+
local: (path) => ({
|
|
10
|
+
name,
|
|
11
|
+
source: {
|
|
12
|
+
kind: "local",
|
|
13
|
+
path
|
|
14
|
+
}
|
|
15
|
+
}),
|
|
16
|
+
remote: (mfName, url) => ({
|
|
17
|
+
name,
|
|
18
|
+
source: {
|
|
19
|
+
kind: "remote",
|
|
20
|
+
mfName,
|
|
21
|
+
url
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** Flatten an app against the registry of apps: `extends` inherits the base's plugins, child wins. */
|
|
27
|
+
function resolveApp(input, apps) {
|
|
28
|
+
const base = input.extends ? apps[input.extends] : void 0;
|
|
29
|
+
if (input.extends && !base) throw new Error(`extends target "${input.extends}" not found`);
|
|
30
|
+
const plugins = {};
|
|
31
|
+
for (const [key, ref] of Object.entries(base?.plugins ?? {})) plugins[key] = {
|
|
32
|
+
key,
|
|
33
|
+
...ref
|
|
34
|
+
};
|
|
35
|
+
for (const [key, ref] of Object.entries(input.plugins)) plugins[key] = {
|
|
36
|
+
key,
|
|
37
|
+
...ref
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
name: input.name,
|
|
41
|
+
plugins
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Composition digest — sha256 (WebCrypto) over everything that determines
|
|
46
|
+
* the tree: app name, plugin keys, MF names, manifests, and the imported
|
|
47
|
+
* `MOUNT_REGISTRY_VERSION`. Deployment URLs are deliberately excluded so
|
|
48
|
+
* disk and prod paths digest identically (hydration parity).
|
|
49
|
+
*/
|
|
50
|
+
async function digestOf(input) {
|
|
51
|
+
const bytes = new TextEncoder().encode(JSON.stringify({
|
|
52
|
+
...input,
|
|
53
|
+
mountRegistryVersion: 5
|
|
54
|
+
}));
|
|
55
|
+
const hash = await crypto.subtle.digest("SHA-256", bytes);
|
|
56
|
+
return Array.from(new Uint8Array(hash)).map((b) => b.toString(16).padStart(2, "0")).join("").slice(0, 16);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
60
|
+
exports.App = App;
|
|
61
|
+
exports.Plugin = Plugin;
|
|
62
|
+
exports.digestOf = digestOf;
|
|
63
|
+
exports.resolveApp = resolveApp;
|
|
64
|
+
//# sourceMappingURL=descriptor.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor.cjs","names":[],"sources":["../../../src/ui/manifest/descriptor.ts"],"sourcesContent":["import { MOUNT_REGISTRY_VERSION } from \"./mount-registry\";\n\n/**\n * Shape-of-028 descriptor slice (ADR 0005 / plan 028) — composition-resolver\n * surface only. Pure data: `App({...})` returns a typed object. `extends`\n * resolves child-wins over the base app's plugins (publish-time flattening\n * model of wayfinder ticket 08). Plan 028 will declaration-merge\n * `KnownPlugins` from generated types; until then the interface is empty and\n * `Plugin(\"bogus\")` does not compile.\n */\n\nexport interface RemoteSource {\n kind: \"local\" | \"remote\";\n path?: string;\n mfName?: string;\n url?: string;\n}\n\nexport interface PluginRef {\n key: string;\n source: RemoteSource;\n}\n\nexport interface ResolvedApp {\n name: string;\n plugins: Record<string, PluginRef>;\n}\n\nexport interface PluginRefInput {\n name: string;\n source: RemoteSource;\n}\n\nexport interface AppInput {\n name: string;\n extends?: string;\n plugins: Record<string, PluginRefInput>;\n}\n\n/** Declaration-merged from generated types by plan 028 — must stay an interface (types cannot merge). */\n// biome-ignore lint/suspicious/noEmptyInterface: declaration-merge surface\nexport interface KnownPlugins {}\n\nexport function App(input: AppInput): AppInput {\n return input;\n}\n\nexport function Plugin<K extends Extract<keyof KnownPlugins, string>>(\n name: K,\n): {\n local: (path: string) => PluginRefInput;\n remote: (mfName: string, url: string) => PluginRefInput;\n} {\n return {\n local: (path) => ({ name, source: { kind: \"local\", path } }),\n remote: (mfName, url) => ({ name, source: { kind: \"remote\", mfName, url } }),\n };\n}\n\n/** Flatten an app against the registry of apps: `extends` inherits the base's plugins, child wins. */\nexport function resolveApp(input: AppInput, apps: Record<string, AppInput>): ResolvedApp {\n const base = input.extends ? apps[input.extends] : undefined;\n if (input.extends && !base) throw new Error(`extends target \"${input.extends}\" not found`);\n const plugins: Record<string, PluginRef> = {};\n for (const [key, ref] of Object.entries(base?.plugins ?? {})) {\n plugins[key] = { key, ...ref };\n }\n for (const [key, ref] of Object.entries(input.plugins)) {\n plugins[key] = { key, ...ref };\n }\n return { name: input.name, plugins };\n}\n\nexport interface CompositionDigestInput {\n /** optional app label — deliberately NOT a tree-identity input; omit for server/client parity */\n appName?: string;\n plugins: Array<{ key: string; mfName: string }>;\n manifests: Array<unknown>;\n}\n\n/**\n * Composition digest — sha256 (WebCrypto) over everything that determines\n * the tree: app name, plugin keys, MF names, manifests, and the imported\n * `MOUNT_REGISTRY_VERSION`. Deployment URLs are deliberately excluded so\n * disk and prod paths digest identically (hydration parity).\n */\nexport async function digestOf(input: CompositionDigestInput): Promise<string> {\n const bytes = new TextEncoder().encode(\n JSON.stringify({ ...input, mountRegistryVersion: MOUNT_REGISTRY_VERSION }),\n );\n const hash = await crypto.subtle.digest(\"SHA-256\", bytes);\n return Array.from(new Uint8Array(hash))\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\")\n .slice(0, 16);\n}\n"],"mappings":";;;AA2CA,SAAgB,IAAI,OAA2B;CAC7C,OAAO;AACT;AAEA,SAAgB,OACd,MAIA;CACA,OAAO;EACL,QAAQ,UAAU;GAAE;GAAM,QAAQ;IAAE,MAAM;IAAS;GAAK;EAAE;EAC1D,SAAS,QAAQ,SAAS;GAAE;GAAM,QAAQ;IAAE,MAAM;IAAU;IAAQ;GAAI;EAAE;CAC5E;AACF;;AAGA,SAAgB,WAAW,OAAiB,MAA6C;CACvF,MAAM,OAAO,MAAM,UAAU,KAAK,MAAM,WAAW;CACnD,IAAI,MAAM,WAAW,CAAC,MAAM,MAAM,IAAI,MAAM,mBAAmB,MAAM,QAAQ,YAAY;CACzF,MAAM,UAAqC,CAAC;CAC5C,KAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,QAAQ,MAAM,WAAW,CAAC,CAAC,GACzD,QAAQ,OAAO;EAAE;EAAK,GAAG;CAAI;CAE/B,KAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,QAAQ,MAAM,OAAO,GACnD,QAAQ,OAAO;EAAE;EAAK,GAAG;CAAI;CAE/B,OAAO;EAAE,MAAM,MAAM;EAAM;CAAQ;AACrC;;;;;;;AAeA,eAAsB,SAAS,OAAgD;CAC7E,MAAM,QAAQ,IAAI,YAAY,CAAC,CAAC,OAC9B,KAAK,UAAU;EAAE,GAAG;EAAO;CAA6C,CAAC,CAC3E;CACA,MAAM,OAAO,MAAM,OAAO,OAAO,OAAO,WAAW,KAAK;CACxD,OAAO,MAAM,KAAK,IAAI,WAAW,IAAI,CAAC,CAAC,CACpC,KAAK,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAC3C,KAAK,EAAE,CAAC,CACR,MAAM,GAAG,EAAE;AAChB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region src/ui/manifest/descriptor.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shape-of-028 descriptor slice (ADR 0005 / plan 028) — composition-resolver
|
|
4
|
+
* surface only. Pure data: `App({...})` returns a typed object. `extends`
|
|
5
|
+
* resolves child-wins over the base app's plugins (publish-time flattening
|
|
6
|
+
* model of wayfinder ticket 08). Plan 028 will declaration-merge
|
|
7
|
+
* `KnownPlugins` from generated types; until then the interface is empty and
|
|
8
|
+
* `Plugin("bogus")` does not compile.
|
|
9
|
+
*/
|
|
10
|
+
interface RemoteSource {
|
|
11
|
+
kind: "local" | "remote";
|
|
12
|
+
path?: string;
|
|
13
|
+
mfName?: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
}
|
|
16
|
+
interface PluginRef {
|
|
17
|
+
key: string;
|
|
18
|
+
source: RemoteSource;
|
|
19
|
+
}
|
|
20
|
+
interface ResolvedApp {
|
|
21
|
+
name: string;
|
|
22
|
+
plugins: Record<string, PluginRef>;
|
|
23
|
+
}
|
|
24
|
+
interface PluginRefInput {
|
|
25
|
+
name: string;
|
|
26
|
+
source: RemoteSource;
|
|
27
|
+
}
|
|
28
|
+
interface AppInput {
|
|
29
|
+
name: string;
|
|
30
|
+
extends?: string;
|
|
31
|
+
plugins: Record<string, PluginRefInput>;
|
|
32
|
+
}
|
|
33
|
+
/** Declaration-merged from generated types by plan 028 — must stay an interface (types cannot merge). */
|
|
34
|
+
interface KnownPlugins {}
|
|
35
|
+
declare function App(input: AppInput): AppInput;
|
|
36
|
+
declare function Plugin<K extends Extract<keyof KnownPlugins, string>>(name: K): {
|
|
37
|
+
local: (path: string) => PluginRefInput;
|
|
38
|
+
remote: (mfName: string, url: string) => PluginRefInput;
|
|
39
|
+
};
|
|
40
|
+
/** Flatten an app against the registry of apps: `extends` inherits the base's plugins, child wins. */
|
|
41
|
+
declare function resolveApp(input: AppInput, apps: Record<string, AppInput>): ResolvedApp;
|
|
42
|
+
interface CompositionDigestInput {
|
|
43
|
+
/** optional app label — deliberately NOT a tree-identity input; omit for server/client parity */
|
|
44
|
+
appName?: string;
|
|
45
|
+
plugins: Array<{
|
|
46
|
+
key: string;
|
|
47
|
+
mfName: string;
|
|
48
|
+
}>;
|
|
49
|
+
manifests: Array<unknown>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Composition digest — sha256 (WebCrypto) over everything that determines
|
|
53
|
+
* the tree: app name, plugin keys, MF names, manifests, and the imported
|
|
54
|
+
* `MOUNT_REGISTRY_VERSION`. Deployment URLs are deliberately excluded so
|
|
55
|
+
* disk and prod paths digest identically (hydration parity).
|
|
56
|
+
*/
|
|
57
|
+
declare function digestOf(input: CompositionDigestInput): Promise<string>;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { App, AppInput, CompositionDigestInput, KnownPlugins, Plugin, PluginRef, PluginRefInput, RemoteSource, ResolvedApp, digestOf, resolveApp };
|
|
60
|
+
//# sourceMappingURL=descriptor.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor.d.cts","names":[],"sources":["../../../src/ui/manifest/descriptor.ts"],"mappings":";;;;;;;;;UAWiB;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA,QAAQ;;UAGO;EACf;EACA,SAAS,eAAe;;UAGT;EACf;EACA,QAAQ;;UAGO;EACf;EACA;EACA,SAAS,eAAe;;;UAKT;iBAED,IAAI,OAAO,WAAW;iBAItB,OAAO,UAAU,cAAc,uBAC7C,MAAM;EAEN,QAAQ,iBAAiB;EACzB,SAAS,gBAAgB,gBAAgB;;;iBAS3B,WAAW,OAAO,UAAU,MAAM,eAAe,YAAY;UAa5D;;EAEf;EACA,SAAS;IAAQ;IAAa;;EAC9B,WAAW;;;;;;;;iBASS,SAAS,OAAO,yBAAyB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region src/ui/manifest/descriptor.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shape-of-028 descriptor slice (ADR 0005 / plan 028) — composition-resolver
|
|
4
|
+
* surface only. Pure data: `App({...})` returns a typed object. `extends`
|
|
5
|
+
* resolves child-wins over the base app's plugins (publish-time flattening
|
|
6
|
+
* model of wayfinder ticket 08). Plan 028 will declaration-merge
|
|
7
|
+
* `KnownPlugins` from generated types; until then the interface is empty and
|
|
8
|
+
* `Plugin("bogus")` does not compile.
|
|
9
|
+
*/
|
|
10
|
+
interface RemoteSource {
|
|
11
|
+
kind: "local" | "remote";
|
|
12
|
+
path?: string;
|
|
13
|
+
mfName?: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
}
|
|
16
|
+
interface PluginRef {
|
|
17
|
+
key: string;
|
|
18
|
+
source: RemoteSource;
|
|
19
|
+
}
|
|
20
|
+
interface ResolvedApp {
|
|
21
|
+
name: string;
|
|
22
|
+
plugins: Record<string, PluginRef>;
|
|
23
|
+
}
|
|
24
|
+
interface PluginRefInput {
|
|
25
|
+
name: string;
|
|
26
|
+
source: RemoteSource;
|
|
27
|
+
}
|
|
28
|
+
interface AppInput {
|
|
29
|
+
name: string;
|
|
30
|
+
extends?: string;
|
|
31
|
+
plugins: Record<string, PluginRefInput>;
|
|
32
|
+
}
|
|
33
|
+
/** Declaration-merged from generated types by plan 028 — must stay an interface (types cannot merge). */
|
|
34
|
+
interface KnownPlugins {}
|
|
35
|
+
declare function App(input: AppInput): AppInput;
|
|
36
|
+
declare function Plugin<K extends Extract<keyof KnownPlugins, string>>(name: K): {
|
|
37
|
+
local: (path: string) => PluginRefInput;
|
|
38
|
+
remote: (mfName: string, url: string) => PluginRefInput;
|
|
39
|
+
};
|
|
40
|
+
/** Flatten an app against the registry of apps: `extends` inherits the base's plugins, child wins. */
|
|
41
|
+
declare function resolveApp(input: AppInput, apps: Record<string, AppInput>): ResolvedApp;
|
|
42
|
+
interface CompositionDigestInput {
|
|
43
|
+
/** optional app label — deliberately NOT a tree-identity input; omit for server/client parity */
|
|
44
|
+
appName?: string;
|
|
45
|
+
plugins: Array<{
|
|
46
|
+
key: string;
|
|
47
|
+
mfName: string;
|
|
48
|
+
}>;
|
|
49
|
+
manifests: Array<unknown>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Composition digest — sha256 (WebCrypto) over everything that determines
|
|
53
|
+
* the tree: app name, plugin keys, MF names, manifests, and the imported
|
|
54
|
+
* `MOUNT_REGISTRY_VERSION`. Deployment URLs are deliberately excluded so
|
|
55
|
+
* disk and prod paths digest identically (hydration parity).
|
|
56
|
+
*/
|
|
57
|
+
declare function digestOf(input: CompositionDigestInput): Promise<string>;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { App, AppInput, CompositionDigestInput, KnownPlugins, Plugin, PluginRef, PluginRefInput, RemoteSource, ResolvedApp, digestOf, resolveApp };
|
|
60
|
+
//# sourceMappingURL=descriptor.d.mts.map
|