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 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor.d.mts","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,61 @@
|
|
|
1
|
+
import { MOUNT_REGISTRY_VERSION } from "./mount-registry.mjs";
|
|
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
|
+
export { App, Plugin, digestOf, resolveApp };
|
|
61
|
+
//# sourceMappingURL=descriptor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor.mjs","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,128 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_mount_registry = require('./mount-registry.cjs');
|
|
4
|
+
const require_route_config = require('./route-config.cjs');
|
|
5
|
+
const require_ui_manifest_contract = require('./contract.cjs');
|
|
6
|
+
const require_manifest_schema = require('./manifest-schema.cjs');
|
|
7
|
+
require('./index.cjs');
|
|
8
|
+
let node_path = require("node:path");
|
|
9
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
10
|
+
let node_fs_promises = require("node:fs/promises");
|
|
11
|
+
let _tanstack_router_generator = require("@tanstack/router-generator");
|
|
12
|
+
|
|
13
|
+
//#region src/ui/manifest/generator.ts
|
|
14
|
+
const idOf = (node) => (node.routePath ?? "").replace(/^\//, "");
|
|
15
|
+
function importPathOf(file) {
|
|
16
|
+
return `./routes/${file.replace(/\.tsx$/, "").replace(/\.ts$/, "")}`;
|
|
17
|
+
}
|
|
18
|
+
async function generateUiManifest(options) {
|
|
19
|
+
const { workspaceRoot, pluginName, routesDirectory = "./src/routes", generatedRouteTree = "./src/routeTree.gen.ts", srcDir = "./src", typeImport = "everything-dev/ui/manifest", emitRouteTree = true } = options;
|
|
20
|
+
const generator = new _tanstack_router_generator.Generator({
|
|
21
|
+
config: (0, _tanstack_router_generator.getConfig)({
|
|
22
|
+
target: "react",
|
|
23
|
+
routesDirectory,
|
|
24
|
+
generatedRouteTree: emitRouteTree ? generatedRouteTree : "./node_modules/.cache/manifest-compose/routeTree.gen.ts",
|
|
25
|
+
routeFileIgnorePrefix: "-",
|
|
26
|
+
routeFileIgnorePattern: "\\.(test|spec)\\.(ts|tsx)$",
|
|
27
|
+
disableLogging: true
|
|
28
|
+
}, workspaceRoot),
|
|
29
|
+
root: workspaceRoot
|
|
30
|
+
});
|
|
31
|
+
await generator.run();
|
|
32
|
+
const crawling = await generator.getCrawlingResult();
|
|
33
|
+
if (!crawling) throw new Error(`scan produced no result for ${pluginName}`);
|
|
34
|
+
const { rootRouteNode, routeFileResult } = crawling;
|
|
35
|
+
if (!rootRouteNode) throw new Error(`no __root found for ${pluginName}`);
|
|
36
|
+
const routes = [];
|
|
37
|
+
const errors = [];
|
|
38
|
+
for (const node of routeFileResult) {
|
|
39
|
+
const isRootLevel = node.parent === void 0 || node.parent === rootRouteNode;
|
|
40
|
+
if (node._fsRouteType === "__root") continue;
|
|
41
|
+
if (isRootLevel && (node._fsRouteType === "pathless_layout" || node._fsRouteType === "layout")) {
|
|
42
|
+
const id = idOf(node);
|
|
43
|
+
const segment = id.split("/").at(-1) ?? "";
|
|
44
|
+
if (!segment.startsWith("_")) continue;
|
|
45
|
+
const mount = require_mount_registry.resolveMountSegment(segment.slice(1));
|
|
46
|
+
if (!mount) {
|
|
47
|
+
errors.push(`unknown mount "_${segment.slice(1)}" (${node.filePath}); known: ${Object.keys(require_mount_registry.MOUNT_REGISTRY).join(", ")}`);
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
routes.push({
|
|
51
|
+
id,
|
|
52
|
+
type: "layout",
|
|
53
|
+
mount,
|
|
54
|
+
file: node.filePath
|
|
55
|
+
});
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const isIndex = node._fsRouteType === "static" && node.cleanedPath === "/";
|
|
59
|
+
routes.push({
|
|
60
|
+
id: idOf(node),
|
|
61
|
+
type: isIndex ? "index" : node._fsRouteType === "pathless_layout" || node._fsRouteType === "layout" ? "layout" : "route",
|
|
62
|
+
path: isIndex ? "/" : node.cleanedPath === "/" || node.cleanedPath === "" ? void 0 : node.cleanedPath,
|
|
63
|
+
file: node.filePath,
|
|
64
|
+
parentId: node.parent && node.parent !== rootRouteNode ? idOf(node.parent) : void 0
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
for (const record of routes) {
|
|
68
|
+
if (record.type === "layout" && record.mount) continue;
|
|
69
|
+
if (record.parentId) continue;
|
|
70
|
+
const firstSegment = record.id.split("/")[0] ?? "";
|
|
71
|
+
if (firstSegment.startsWith("_")) {
|
|
72
|
+
if (!require_mount_registry.resolveMountSegment(firstSegment.slice(1))) errors.push(`unknown mount "_${firstSegment.slice(1)}" (${record.file}); known: ${Object.keys(require_mount_registry.MOUNT_REGISTRY).join(", ")}`);
|
|
73
|
+
} else errors.push(`route "${record.id}" (${record.file}) must live under a mount — root-level pathed routes have no gate`);
|
|
74
|
+
}
|
|
75
|
+
const siblingPathClaims = /* @__PURE__ */ new Map();
|
|
76
|
+
for (const record of routes) {
|
|
77
|
+
if (record.type === "layout" || record.path === void 0) continue;
|
|
78
|
+
const claimKey = `${record.parentId ?? ""}::${record.path}`;
|
|
79
|
+
const claimant = siblingPathClaims.get(claimKey);
|
|
80
|
+
if (claimant) {
|
|
81
|
+
errors.push(`duplicate path "${record.path}" under "${record.parentId ?? "mount root"}": "${claimant}" and "${record.id}" (${record.file})`);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
siblingPathClaims.set(claimKey, record.id);
|
|
85
|
+
}
|
|
86
|
+
if (errors.length > 0) throw new Error(`manifest generation failed for ${pluginName}:\n ${errors.join("\n ")}`);
|
|
87
|
+
const manifest = require_manifest_schema.PluginManifestSchema.parse({
|
|
88
|
+
name: pluginName,
|
|
89
|
+
manifestVersion: 2,
|
|
90
|
+
routes
|
|
91
|
+
});
|
|
92
|
+
const resolvedSrc = node_path.default.resolve(workspaceRoot, srcDir);
|
|
93
|
+
await (0, node_fs_promises.mkdir)(resolvedSrc, { recursive: true });
|
|
94
|
+
await writeIfChanged(node_path.default.join(resolvedSrc, require_ui_manifest_contract.MANIFEST_FILENAME), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
95
|
+
const loaderLines = routes.filter((r) => r.file).map((r) => ` ${JSON.stringify(r.id)}: () => import(${JSON.stringify(importPathOf(r.file))}).then((m) => pick(m.Route.options)),`);
|
|
96
|
+
const rootImport = `import { Route as __rootRoute } from ${JSON.stringify(importPathOf(rootRouteNode.filePath ?? "__root"))};`;
|
|
97
|
+
const routeConfigSource = `// Generated by manifest-gen. DO NOT EDIT.
|
|
98
|
+
// Inputs: src/routes/** only.
|
|
99
|
+
import type { RouteConfigModule, RouteOptionsBundle } from ${JSON.stringify(typeImport)};
|
|
100
|
+
|
|
101
|
+
const pick = (o: any): RouteOptionsBundle => ({
|
|
102
|
+
${require_route_config.ROUTE_OPTION_KEYS.map((key) => ` ${key}: o?.${key},`).join("\n")}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
${rootImport}
|
|
106
|
+
|
|
107
|
+
export const routeConfigLoaders: RouteConfigModule["routeConfigLoaders"] = {
|
|
108
|
+
${loaderLines.join("\n")}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const rootMeta = pick(__rootRoute.options);
|
|
112
|
+
`;
|
|
113
|
+
await writeIfChanged(node_path.default.join(resolvedSrc, require_ui_manifest_contract.ROUTE_CONFIG_FILENAME), routeConfigSource);
|
|
114
|
+
return manifest;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Identical content is never re-written: the dev watcher is timestamp-based,
|
|
118
|
+
* so an unconditional write re-triggers compilation — which runs this
|
|
119
|
+
* generator again — an infinite regen loop.
|
|
120
|
+
*/
|
|
121
|
+
async function writeIfChanged(file, contents) {
|
|
122
|
+
if (await (0, node_fs_promises.readFile)(file, "utf8").catch(() => void 0) === contents) return;
|
|
123
|
+
await (0, node_fs_promises.writeFile)(file, contents);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
exports.generateUiManifest = generateUiManifest;
|
|
128
|
+
//# sourceMappingURL=generator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.cjs","names":["Generator","getConfig","resolveMountSegment","MOUNT_REGISTRY","PluginManifestSchema","path","mkdir","MANIFEST_FILENAME","ROUTE_OPTION_KEYS","ROUTE_CONFIG_FILENAME","readFile","writeFile"],"sources":["../../../src/ui/manifest/generator.ts"],"sourcesContent":["import { mkdir, readFile, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { Generator, getConfig } from \"@tanstack/router-generator\";\nimport {\n MANIFEST_FILENAME,\n MANIFEST_VERSION,\n type PluginManifest,\n PluginManifestSchema,\n ROUTE_CONFIG_FILENAME,\n type RouteRecord,\n resolveMountSegment,\n} from \"./index\";\nimport { MOUNT_REGISTRY } from \"./mount-registry\";\nimport { ROUTE_OPTION_KEYS } from \"./route-config\";\n\n/**\n * The load-bearing generator step (ADR 0008 §2). Rides\n * `@tanstack/router-generator`'s scan (Generator.run + getCrawlingResult)\n * and emits, per ui source workspace:\n *\n * - src/routeTree.gen.ts via the stock generator run (plugin-local\n * standalone DX — never consumed by the host)\n * - src/manifest.gen.json pure data: ids, paths, nesting, mounts, files\n * - src/routeConfig.gen.ts generated import map of per-route option\n * bundles + lifted `__root` meta\n *\n * Nothing hand-maintained: the only inputs are the route files. Root-level\n * pathless layouts derive mounts via the registry; unknown mounts, routes\n * under a missing mount layout, and duplicate sibling paths are hard errors\n * here (cross-plugin path collisions are enforced at construction time —\n * see `constructTree`).\n */\n\nexport interface ManifestGeneratorOptions {\n /** ui source workspace root (ui/ or plugins/<id>/ui/) */\n workspaceRoot: string;\n /** composition-identity plugin key written into the manifest */\n pluginName: string;\n routesDirectory?: string;\n generatedRouteTree?: string;\n srcDir?: string;\n /** module specifier the generated routeConfig imports its types from */\n typeImport?: string;\n /**\n * When false, the stock routeTree write is redirected to a scratch path —\n * for builds where TanStackRouterRspack owns src/routeTree.gen.ts (its\n * autoCodeSplitting options differ); only manifest + routeConfig persist.\n */\n emitRouteTree?: boolean;\n}\n\ninterface ScanNode {\n routePath?: string;\n cleanedPath?: string;\n filePath?: string;\n parent?: ScanNode | undefined;\n _fsRouteType?: string;\n}\n\nconst idOf = (node: { routePath?: string }): string => (node.routePath ?? \"\").replace(/^\\//, \"\");\n\nfunction importPathOf(file: string): string {\n return `./routes/${file.replace(/\\.tsx$/, \"\").replace(/\\.ts$/, \"\")}`;\n}\n\nexport async function generateUiManifest(\n options: ManifestGeneratorOptions,\n): Promise<PluginManifest> {\n const {\n workspaceRoot,\n pluginName,\n routesDirectory = \"./src/routes\",\n generatedRouteTree = \"./src/routeTree.gen.ts\",\n srcDir = \"./src\",\n typeImport = \"everything-dev/ui/manifest\",\n emitRouteTree = true,\n } = options;\n\n const routeTreeTarget = emitRouteTree\n ? generatedRouteTree\n : \"./node_modules/.cache/manifest-compose/routeTree.gen.ts\";\n\n const generator = new Generator({\n config: getConfig(\n {\n target: \"react\",\n routesDirectory,\n generatedRouteTree: routeTreeTarget,\n routeFileIgnorePrefix: \"-\",\n routeFileIgnorePattern: \"\\\\.(test|spec)\\\\.(ts|tsx)$\",\n disableLogging: true,\n },\n workspaceRoot,\n ),\n root: workspaceRoot,\n });\n await generator.run();\n const crawling = await generator.getCrawlingResult();\n if (!crawling) throw new Error(`scan produced no result for ${pluginName}`);\n\n const { rootRouteNode, routeFileResult } = crawling;\n if (!rootRouteNode) throw new Error(`no __root found for ${pluginName}`);\n\n const routes: RouteRecord[] = [];\n const errors: string[] = [];\n\n for (const node of routeFileResult as ScanNode[]) {\n const isRootLevel = node.parent === undefined || node.parent === rootRouteNode;\n\n if (node._fsRouteType === \"__root\") {\n continue;\n }\n\n if (\n isRootLevel &&\n (node._fsRouteType === \"pathless_layout\" || node._fsRouteType === \"layout\")\n ) {\n const id = idOf(node);\n const segment = id.split(\"/\").at(-1) ?? \"\";\n if (!segment.startsWith(\"_\")) continue;\n const mount = resolveMountSegment(segment.slice(1));\n if (!mount) {\n errors.push(\n `unknown mount \"_${segment.slice(1)}\" (${node.filePath}); known: ${Object.keys(MOUNT_REGISTRY).join(\", \")}`,\n );\n continue;\n }\n routes.push({ id, type: \"layout\", mount, file: node.filePath });\n continue;\n }\n\n const isIndex = node._fsRouteType === \"static\" && node.cleanedPath === \"/\";\n routes.push({\n id: idOf(node),\n type: isIndex\n ? \"index\"\n : node._fsRouteType === \"pathless_layout\" || node._fsRouteType === \"layout\"\n ? \"layout\"\n : \"route\",\n path: isIndex\n ? \"/\"\n : node.cleanedPath === \"/\" || node.cleanedPath === \"\"\n ? undefined\n : node.cleanedPath,\n file: node.filePath,\n parentId: node.parent && node.parent !== rootRouteNode ? idOf(node.parent) : undefined,\n });\n }\n\n for (const record of routes) {\n if (record.type === \"layout\" && record.mount) continue;\n if (record.parentId) continue;\n const firstSegment = record.id.split(\"/\")[0] ?? \"\";\n if (firstSegment.startsWith(\"_\")) {\n const mount = resolveMountSegment(firstSegment.slice(1));\n if (!mount) {\n errors.push(\n `unknown mount \"_${firstSegment.slice(1)}\" (${record.file}); known: ${Object.keys(MOUNT_REGISTRY).join(\", \")}`,\n );\n }\n } else {\n errors.push(\n `route \"${record.id}\" (${record.file}) must live under a mount — root-level pathed routes have no gate`,\n );\n }\n }\n\n const siblingPathClaims = new Map<string, string>();\n for (const record of routes) {\n if (record.type === \"layout\" || record.path === undefined) continue;\n const claimKey = `${record.parentId ?? \"\"}::${record.path}`;\n const claimant = siblingPathClaims.get(claimKey);\n if (claimant) {\n errors.push(\n `duplicate path \"${record.path}\" under \"${record.parentId ?? \"mount root\"}\": \"${claimant}\" and \"${record.id}\" (${record.file})`,\n );\n continue;\n }\n siblingPathClaims.set(claimKey, record.id);\n }\n\n if (errors.length > 0) {\n throw new Error(`manifest generation failed for ${pluginName}:\\n ${errors.join(\"\\n \")}`);\n }\n\n const manifest: PluginManifest = PluginManifestSchema.parse({\n name: pluginName,\n manifestVersion: MANIFEST_VERSION,\n routes,\n });\n\n const resolvedSrc = path.resolve(workspaceRoot, srcDir);\n await mkdir(resolvedSrc, { recursive: true });\n await writeIfChanged(\n path.join(resolvedSrc, MANIFEST_FILENAME),\n `${JSON.stringify(manifest, null, 2)}\\n`,\n );\n\n const loaderLines = routes\n .filter((r) => r.file)\n .map(\n (r) =>\n ` ${JSON.stringify(r.id)}: () => import(${JSON.stringify(importPathOf(r.file!))}).then((m) => pick(m.Route.options)),`,\n );\n const rootImport = `import { Route as __rootRoute } from ${JSON.stringify(importPathOf(rootRouteNode.filePath ?? \"__root\"))};`;\n\n const routeConfigSource = `// Generated by manifest-gen. DO NOT EDIT.\n// Inputs: src/routes/** only.\nimport type { RouteConfigModule, RouteOptionsBundle } from ${JSON.stringify(typeImport)};\n\nconst pick = (o: any): RouteOptionsBundle => ({\n${ROUTE_OPTION_KEYS.map((key) => ` ${key}: o?.${key},`).join(\"\\n\")}\n});\n\n${rootImport}\n\nexport const routeConfigLoaders: RouteConfigModule[\"routeConfigLoaders\"] = {\n${loaderLines.join(\"\\n\")}\n};\n\nexport const rootMeta = pick(__rootRoute.options);\n`;\n\n await writeIfChanged(path.join(resolvedSrc, ROUTE_CONFIG_FILENAME), routeConfigSource);\n\n return manifest;\n}\n\n/**\n * Identical content is never re-written: the dev watcher is timestamp-based,\n * so an unconditional write re-triggers compilation — which runs this\n * generator again — an infinite regen loop.\n */\nasync function writeIfChanged(file: string, contents: string): Promise<void> {\n const existing = await readFile(file, \"utf8\").catch(() => undefined);\n if (existing === contents) return;\n await writeFile(file, contents);\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PluginManifest } from "./manifest-schema.cjs";
|
|
2
|
+
import "./index.cjs";
|
|
3
|
+
//#region src/ui/manifest/generator.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The load-bearing generator step (ADR 0008 §2). Rides
|
|
6
|
+
* `@tanstack/router-generator`'s scan (Generator.run + getCrawlingResult)
|
|
7
|
+
* and emits, per ui source workspace:
|
|
8
|
+
*
|
|
9
|
+
* - src/routeTree.gen.ts via the stock generator run (plugin-local
|
|
10
|
+
* standalone DX — never consumed by the host)
|
|
11
|
+
* - src/manifest.gen.json pure data: ids, paths, nesting, mounts, files
|
|
12
|
+
* - src/routeConfig.gen.ts generated import map of per-route option
|
|
13
|
+
* bundles + lifted `__root` meta
|
|
14
|
+
*
|
|
15
|
+
* Nothing hand-maintained: the only inputs are the route files. Root-level
|
|
16
|
+
* pathless layouts derive mounts via the registry; unknown mounts, routes
|
|
17
|
+
* under a missing mount layout, and duplicate sibling paths are hard errors
|
|
18
|
+
* here (cross-plugin path collisions are enforced at construction time —
|
|
19
|
+
* see `constructTree`).
|
|
20
|
+
*/
|
|
21
|
+
interface ManifestGeneratorOptions {
|
|
22
|
+
/** ui source workspace root (ui/ or plugins/<id>/ui/) */
|
|
23
|
+
workspaceRoot: string;
|
|
24
|
+
/** composition-identity plugin key written into the manifest */
|
|
25
|
+
pluginName: string;
|
|
26
|
+
routesDirectory?: string;
|
|
27
|
+
generatedRouteTree?: string;
|
|
28
|
+
srcDir?: string;
|
|
29
|
+
/** module specifier the generated routeConfig imports its types from */
|
|
30
|
+
typeImport?: string;
|
|
31
|
+
/**
|
|
32
|
+
* When false, the stock routeTree write is redirected to a scratch path —
|
|
33
|
+
* for builds where TanStackRouterRspack owns src/routeTree.gen.ts (its
|
|
34
|
+
* autoCodeSplitting options differ); only manifest + routeConfig persist.
|
|
35
|
+
*/
|
|
36
|
+
emitRouteTree?: boolean;
|
|
37
|
+
}
|
|
38
|
+
declare function generateUiManifest(options: ManifestGeneratorOptions): Promise<PluginManifest>;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { ManifestGeneratorOptions, generateUiManifest };
|
|
41
|
+
//# sourceMappingURL=generator.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.cts","names":[],"sources":["../../../src/ui/manifest/generator.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAiCiB;;EAEf;;EAEA;EACA;EACA;EACA;;EAEA;;;;;;EAMA;;iBAiBoB,mBACpB,SAAS,2BACR,QAAQ"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PluginManifest } from "./manifest-schema.mjs";
|
|
2
|
+
import "./index.mjs";
|
|
3
|
+
//#region src/ui/manifest/generator.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* The load-bearing generator step (ADR 0008 §2). Rides
|
|
6
|
+
* `@tanstack/router-generator`'s scan (Generator.run + getCrawlingResult)
|
|
7
|
+
* and emits, per ui source workspace:
|
|
8
|
+
*
|
|
9
|
+
* - src/routeTree.gen.ts via the stock generator run (plugin-local
|
|
10
|
+
* standalone DX — never consumed by the host)
|
|
11
|
+
* - src/manifest.gen.json pure data: ids, paths, nesting, mounts, files
|
|
12
|
+
* - src/routeConfig.gen.ts generated import map of per-route option
|
|
13
|
+
* bundles + lifted `__root` meta
|
|
14
|
+
*
|
|
15
|
+
* Nothing hand-maintained: the only inputs are the route files. Root-level
|
|
16
|
+
* pathless layouts derive mounts via the registry; unknown mounts, routes
|
|
17
|
+
* under a missing mount layout, and duplicate sibling paths are hard errors
|
|
18
|
+
* here (cross-plugin path collisions are enforced at construction time —
|
|
19
|
+
* see `constructTree`).
|
|
20
|
+
*/
|
|
21
|
+
interface ManifestGeneratorOptions {
|
|
22
|
+
/** ui source workspace root (ui/ or plugins/<id>/ui/) */
|
|
23
|
+
workspaceRoot: string;
|
|
24
|
+
/** composition-identity plugin key written into the manifest */
|
|
25
|
+
pluginName: string;
|
|
26
|
+
routesDirectory?: string;
|
|
27
|
+
generatedRouteTree?: string;
|
|
28
|
+
srcDir?: string;
|
|
29
|
+
/** module specifier the generated routeConfig imports its types from */
|
|
30
|
+
typeImport?: string;
|
|
31
|
+
/**
|
|
32
|
+
* When false, the stock routeTree write is redirected to a scratch path —
|
|
33
|
+
* for builds where TanStackRouterRspack owns src/routeTree.gen.ts (its
|
|
34
|
+
* autoCodeSplitting options differ); only manifest + routeConfig persist.
|
|
35
|
+
*/
|
|
36
|
+
emitRouteTree?: boolean;
|
|
37
|
+
}
|
|
38
|
+
declare function generateUiManifest(options: ManifestGeneratorOptions): Promise<PluginManifest>;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { ManifestGeneratorOptions, generateUiManifest };
|
|
41
|
+
//# sourceMappingURL=generator.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.mts","names":[],"sources":["../../../src/ui/manifest/generator.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAiCiB;;EAEf;;EAEA;EACA;EACA;EACA;;EAEA;;;;;;EAMA;;iBAiBoB,mBACpB,SAAS,2BACR,QAAQ"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { MOUNT_REGISTRY, resolveMountSegment } from "./mount-registry.mjs";
|
|
2
|
+
import { ROUTE_OPTION_KEYS } from "./route-config.mjs";
|
|
3
|
+
import { MANIFEST_FILENAME, ROUTE_CONFIG_FILENAME } from "./contract.mjs";
|
|
4
|
+
import { MANIFEST_VERSION, PluginManifestSchema } from "./manifest-schema.mjs";
|
|
5
|
+
import "./index.mjs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
8
|
+
import { Generator, getConfig } from "@tanstack/router-generator";
|
|
9
|
+
|
|
10
|
+
//#region src/ui/manifest/generator.ts
|
|
11
|
+
const idOf = (node) => (node.routePath ?? "").replace(/^\//, "");
|
|
12
|
+
function importPathOf(file) {
|
|
13
|
+
return `./routes/${file.replace(/\.tsx$/, "").replace(/\.ts$/, "")}`;
|
|
14
|
+
}
|
|
15
|
+
async function generateUiManifest(options) {
|
|
16
|
+
const { workspaceRoot, pluginName, routesDirectory = "./src/routes", generatedRouteTree = "./src/routeTree.gen.ts", srcDir = "./src", typeImport = "everything-dev/ui/manifest", emitRouteTree = true } = options;
|
|
17
|
+
const generator = new Generator({
|
|
18
|
+
config: getConfig({
|
|
19
|
+
target: "react",
|
|
20
|
+
routesDirectory,
|
|
21
|
+
generatedRouteTree: emitRouteTree ? generatedRouteTree : "./node_modules/.cache/manifest-compose/routeTree.gen.ts",
|
|
22
|
+
routeFileIgnorePrefix: "-",
|
|
23
|
+
routeFileIgnorePattern: "\\.(test|spec)\\.(ts|tsx)$",
|
|
24
|
+
disableLogging: true
|
|
25
|
+
}, workspaceRoot),
|
|
26
|
+
root: workspaceRoot
|
|
27
|
+
});
|
|
28
|
+
await generator.run();
|
|
29
|
+
const crawling = await generator.getCrawlingResult();
|
|
30
|
+
if (!crawling) throw new Error(`scan produced no result for ${pluginName}`);
|
|
31
|
+
const { rootRouteNode, routeFileResult } = crawling;
|
|
32
|
+
if (!rootRouteNode) throw new Error(`no __root found for ${pluginName}`);
|
|
33
|
+
const routes = [];
|
|
34
|
+
const errors = [];
|
|
35
|
+
for (const node of routeFileResult) {
|
|
36
|
+
const isRootLevel = node.parent === void 0 || node.parent === rootRouteNode;
|
|
37
|
+
if (node._fsRouteType === "__root") continue;
|
|
38
|
+
if (isRootLevel && (node._fsRouteType === "pathless_layout" || node._fsRouteType === "layout")) {
|
|
39
|
+
const id = idOf(node);
|
|
40
|
+
const segment = id.split("/").at(-1) ?? "";
|
|
41
|
+
if (!segment.startsWith("_")) continue;
|
|
42
|
+
const mount = resolveMountSegment(segment.slice(1));
|
|
43
|
+
if (!mount) {
|
|
44
|
+
errors.push(`unknown mount "_${segment.slice(1)}" (${node.filePath}); known: ${Object.keys(MOUNT_REGISTRY).join(", ")}`);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
routes.push({
|
|
48
|
+
id,
|
|
49
|
+
type: "layout",
|
|
50
|
+
mount,
|
|
51
|
+
file: node.filePath
|
|
52
|
+
});
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const isIndex = node._fsRouteType === "static" && node.cleanedPath === "/";
|
|
56
|
+
routes.push({
|
|
57
|
+
id: idOf(node),
|
|
58
|
+
type: isIndex ? "index" : node._fsRouteType === "pathless_layout" || node._fsRouteType === "layout" ? "layout" : "route",
|
|
59
|
+
path: isIndex ? "/" : node.cleanedPath === "/" || node.cleanedPath === "" ? void 0 : node.cleanedPath,
|
|
60
|
+
file: node.filePath,
|
|
61
|
+
parentId: node.parent && node.parent !== rootRouteNode ? idOf(node.parent) : void 0
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
for (const record of routes) {
|
|
65
|
+
if (record.type === "layout" && record.mount) continue;
|
|
66
|
+
if (record.parentId) continue;
|
|
67
|
+
const firstSegment = record.id.split("/")[0] ?? "";
|
|
68
|
+
if (firstSegment.startsWith("_")) {
|
|
69
|
+
if (!resolveMountSegment(firstSegment.slice(1))) errors.push(`unknown mount "_${firstSegment.slice(1)}" (${record.file}); known: ${Object.keys(MOUNT_REGISTRY).join(", ")}`);
|
|
70
|
+
} else errors.push(`route "${record.id}" (${record.file}) must live under a mount — root-level pathed routes have no gate`);
|
|
71
|
+
}
|
|
72
|
+
const siblingPathClaims = /* @__PURE__ */ new Map();
|
|
73
|
+
for (const record of routes) {
|
|
74
|
+
if (record.type === "layout" || record.path === void 0) continue;
|
|
75
|
+
const claimKey = `${record.parentId ?? ""}::${record.path}`;
|
|
76
|
+
const claimant = siblingPathClaims.get(claimKey);
|
|
77
|
+
if (claimant) {
|
|
78
|
+
errors.push(`duplicate path "${record.path}" under "${record.parentId ?? "mount root"}": "${claimant}" and "${record.id}" (${record.file})`);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
siblingPathClaims.set(claimKey, record.id);
|
|
82
|
+
}
|
|
83
|
+
if (errors.length > 0) throw new Error(`manifest generation failed for ${pluginName}:\n ${errors.join("\n ")}`);
|
|
84
|
+
const manifest = PluginManifestSchema.parse({
|
|
85
|
+
name: pluginName,
|
|
86
|
+
manifestVersion: 2,
|
|
87
|
+
routes
|
|
88
|
+
});
|
|
89
|
+
const resolvedSrc = path.resolve(workspaceRoot, srcDir);
|
|
90
|
+
await mkdir(resolvedSrc, { recursive: true });
|
|
91
|
+
await writeIfChanged(path.join(resolvedSrc, MANIFEST_FILENAME), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
92
|
+
const loaderLines = routes.filter((r) => r.file).map((r) => ` ${JSON.stringify(r.id)}: () => import(${JSON.stringify(importPathOf(r.file))}).then((m) => pick(m.Route.options)),`);
|
|
93
|
+
const rootImport = `import { Route as __rootRoute } from ${JSON.stringify(importPathOf(rootRouteNode.filePath ?? "__root"))};`;
|
|
94
|
+
const routeConfigSource = `// Generated by manifest-gen. DO NOT EDIT.
|
|
95
|
+
// Inputs: src/routes/** only.
|
|
96
|
+
import type { RouteConfigModule, RouteOptionsBundle } from ${JSON.stringify(typeImport)};
|
|
97
|
+
|
|
98
|
+
const pick = (o: any): RouteOptionsBundle => ({
|
|
99
|
+
${ROUTE_OPTION_KEYS.map((key) => ` ${key}: o?.${key},`).join("\n")}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
${rootImport}
|
|
103
|
+
|
|
104
|
+
export const routeConfigLoaders: RouteConfigModule["routeConfigLoaders"] = {
|
|
105
|
+
${loaderLines.join("\n")}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const rootMeta = pick(__rootRoute.options);
|
|
109
|
+
`;
|
|
110
|
+
await writeIfChanged(path.join(resolvedSrc, ROUTE_CONFIG_FILENAME), routeConfigSource);
|
|
111
|
+
return manifest;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Identical content is never re-written: the dev watcher is timestamp-based,
|
|
115
|
+
* so an unconditional write re-triggers compilation — which runs this
|
|
116
|
+
* generator again — an infinite regen loop.
|
|
117
|
+
*/
|
|
118
|
+
async function writeIfChanged(file, contents) {
|
|
119
|
+
if (await readFile(file, "utf8").catch(() => void 0) === contents) return;
|
|
120
|
+
await writeFile(file, contents);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
//#endregion
|
|
124
|
+
export { generateUiManifest };
|
|
125
|
+
//# sourceMappingURL=generator.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.mjs","names":[],"sources":["../../../src/ui/manifest/generator.ts"],"sourcesContent":["import { mkdir, readFile, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { Generator, getConfig } from \"@tanstack/router-generator\";\nimport {\n MANIFEST_FILENAME,\n MANIFEST_VERSION,\n type PluginManifest,\n PluginManifestSchema,\n ROUTE_CONFIG_FILENAME,\n type RouteRecord,\n resolveMountSegment,\n} from \"./index\";\nimport { MOUNT_REGISTRY } from \"./mount-registry\";\nimport { ROUTE_OPTION_KEYS } from \"./route-config\";\n\n/**\n * The load-bearing generator step (ADR 0008 §2). Rides\n * `@tanstack/router-generator`'s scan (Generator.run + getCrawlingResult)\n * and emits, per ui source workspace:\n *\n * - src/routeTree.gen.ts via the stock generator run (plugin-local\n * standalone DX — never consumed by the host)\n * - src/manifest.gen.json pure data: ids, paths, nesting, mounts, files\n * - src/routeConfig.gen.ts generated import map of per-route option\n * bundles + lifted `__root` meta\n *\n * Nothing hand-maintained: the only inputs are the route files. Root-level\n * pathless layouts derive mounts via the registry; unknown mounts, routes\n * under a missing mount layout, and duplicate sibling paths are hard errors\n * here (cross-plugin path collisions are enforced at construction time —\n * see `constructTree`).\n */\n\nexport interface ManifestGeneratorOptions {\n /** ui source workspace root (ui/ or plugins/<id>/ui/) */\n workspaceRoot: string;\n /** composition-identity plugin key written into the manifest */\n pluginName: string;\n routesDirectory?: string;\n generatedRouteTree?: string;\n srcDir?: string;\n /** module specifier the generated routeConfig imports its types from */\n typeImport?: string;\n /**\n * When false, the stock routeTree write is redirected to a scratch path —\n * for builds where TanStackRouterRspack owns src/routeTree.gen.ts (its\n * autoCodeSplitting options differ); only manifest + routeConfig persist.\n */\n emitRouteTree?: boolean;\n}\n\ninterface ScanNode {\n routePath?: string;\n cleanedPath?: string;\n filePath?: string;\n parent?: ScanNode | undefined;\n _fsRouteType?: string;\n}\n\nconst idOf = (node: { routePath?: string }): string => (node.routePath ?? \"\").replace(/^\\//, \"\");\n\nfunction importPathOf(file: string): string {\n return `./routes/${file.replace(/\\.tsx$/, \"\").replace(/\\.ts$/, \"\")}`;\n}\n\nexport async function generateUiManifest(\n options: ManifestGeneratorOptions,\n): Promise<PluginManifest> {\n const {\n workspaceRoot,\n pluginName,\n routesDirectory = \"./src/routes\",\n generatedRouteTree = \"./src/routeTree.gen.ts\",\n srcDir = \"./src\",\n typeImport = \"everything-dev/ui/manifest\",\n emitRouteTree = true,\n } = options;\n\n const routeTreeTarget = emitRouteTree\n ? generatedRouteTree\n : \"./node_modules/.cache/manifest-compose/routeTree.gen.ts\";\n\n const generator = new Generator({\n config: getConfig(\n {\n target: \"react\",\n routesDirectory,\n generatedRouteTree: routeTreeTarget,\n routeFileIgnorePrefix: \"-\",\n routeFileIgnorePattern: \"\\\\.(test|spec)\\\\.(ts|tsx)$\",\n disableLogging: true,\n },\n workspaceRoot,\n ),\n root: workspaceRoot,\n });\n await generator.run();\n const crawling = await generator.getCrawlingResult();\n if (!crawling) throw new Error(`scan produced no result for ${pluginName}`);\n\n const { rootRouteNode, routeFileResult } = crawling;\n if (!rootRouteNode) throw new Error(`no __root found for ${pluginName}`);\n\n const routes: RouteRecord[] = [];\n const errors: string[] = [];\n\n for (const node of routeFileResult as ScanNode[]) {\n const isRootLevel = node.parent === undefined || node.parent === rootRouteNode;\n\n if (node._fsRouteType === \"__root\") {\n continue;\n }\n\n if (\n isRootLevel &&\n (node._fsRouteType === \"pathless_layout\" || node._fsRouteType === \"layout\")\n ) {\n const id = idOf(node);\n const segment = id.split(\"/\").at(-1) ?? \"\";\n if (!segment.startsWith(\"_\")) continue;\n const mount = resolveMountSegment(segment.slice(1));\n if (!mount) {\n errors.push(\n `unknown mount \"_${segment.slice(1)}\" (${node.filePath}); known: ${Object.keys(MOUNT_REGISTRY).join(\", \")}`,\n );\n continue;\n }\n routes.push({ id, type: \"layout\", mount, file: node.filePath });\n continue;\n }\n\n const isIndex = node._fsRouteType === \"static\" && node.cleanedPath === \"/\";\n routes.push({\n id: idOf(node),\n type: isIndex\n ? \"index\"\n : node._fsRouteType === \"pathless_layout\" || node._fsRouteType === \"layout\"\n ? \"layout\"\n : \"route\",\n path: isIndex\n ? \"/\"\n : node.cleanedPath === \"/\" || node.cleanedPath === \"\"\n ? undefined\n : node.cleanedPath,\n file: node.filePath,\n parentId: node.parent && node.parent !== rootRouteNode ? idOf(node.parent) : undefined,\n });\n }\n\n for (const record of routes) {\n if (record.type === \"layout\" && record.mount) continue;\n if (record.parentId) continue;\n const firstSegment = record.id.split(\"/\")[0] ?? \"\";\n if (firstSegment.startsWith(\"_\")) {\n const mount = resolveMountSegment(firstSegment.slice(1));\n if (!mount) {\n errors.push(\n `unknown mount \"_${firstSegment.slice(1)}\" (${record.file}); known: ${Object.keys(MOUNT_REGISTRY).join(\", \")}`,\n );\n }\n } else {\n errors.push(\n `route \"${record.id}\" (${record.file}) must live under a mount — root-level pathed routes have no gate`,\n );\n }\n }\n\n const siblingPathClaims = new Map<string, string>();\n for (const record of routes) {\n if (record.type === \"layout\" || record.path === undefined) continue;\n const claimKey = `${record.parentId ?? \"\"}::${record.path}`;\n const claimant = siblingPathClaims.get(claimKey);\n if (claimant) {\n errors.push(\n `duplicate path \"${record.path}\" under \"${record.parentId ?? \"mount root\"}\": \"${claimant}\" and \"${record.id}\" (${record.file})`,\n );\n continue;\n }\n siblingPathClaims.set(claimKey, record.id);\n }\n\n if (errors.length > 0) {\n throw new Error(`manifest generation failed for ${pluginName}:\\n ${errors.join(\"\\n \")}`);\n }\n\n const manifest: PluginManifest = PluginManifestSchema.parse({\n name: pluginName,\n manifestVersion: MANIFEST_VERSION,\n routes,\n });\n\n const resolvedSrc = path.resolve(workspaceRoot, srcDir);\n await mkdir(resolvedSrc, { recursive: true });\n await writeIfChanged(\n path.join(resolvedSrc, MANIFEST_FILENAME),\n `${JSON.stringify(manifest, null, 2)}\\n`,\n );\n\n const loaderLines = routes\n .filter((r) => r.file)\n .map(\n (r) =>\n ` ${JSON.stringify(r.id)}: () => import(${JSON.stringify(importPathOf(r.file!))}).then((m) => pick(m.Route.options)),`,\n );\n const rootImport = `import { Route as __rootRoute } from ${JSON.stringify(importPathOf(rootRouteNode.filePath ?? \"__root\"))};`;\n\n const routeConfigSource = `// Generated by manifest-gen. DO NOT EDIT.\n// Inputs: src/routes/** only.\nimport type { RouteConfigModule, RouteOptionsBundle } from ${JSON.stringify(typeImport)};\n\nconst pick = (o: any): RouteOptionsBundle => ({\n${ROUTE_OPTION_KEYS.map((key) => ` ${key}: o?.${key},`).join(\"\\n\")}\n});\n\n${rootImport}\n\nexport const routeConfigLoaders: RouteConfigModule[\"routeConfigLoaders\"] = {\n${loaderLines.join(\"\\n\")}\n};\n\nexport const rootMeta = pick(__rootRoute.options);\n`;\n\n await writeIfChanged(path.join(resolvedSrc, ROUTE_CONFIG_FILENAME), routeConfigSource);\n\n return manifest;\n}\n\n/**\n * Identical content is never re-written: the dev watcher is timestamp-based,\n * so an unconditional write re-triggers compilation — which runs this\n * generator again — an infinite regen loop.\n */\nasync function writeIfChanged(file: string, contents: string): Promise<void> {\n const existing = await readFile(file, \"utf8\").catch(() => undefined);\n if (existing === contents) return;\n await writeFile(file, contents);\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_identity = require('../../identity.cjs');
|
|
3
|
+
const require_mount_registry = require('./mount-registry.cjs');
|
|
4
|
+
const require_descriptor = require('./descriptor.cjs');
|
|
5
|
+
const require_nav = require('./nav.cjs');
|
|
6
|
+
const require_construct = require('./construct.cjs');
|
|
7
|
+
const require_ui_manifest_contract = require('./contract.cjs');
|
|
8
|
+
const require_manifest_schema = require('./manifest-schema.cjs');
|
|
9
|
+
|
|
10
|
+
exports.App = require_descriptor.App;
|
|
11
|
+
exports.CORE_UI_PLUGIN_KEY = require_ui_manifest_contract.CORE_UI_PLUGIN_KEY;
|
|
12
|
+
exports.ComposePayloadSchema = require_manifest_schema.ComposePayloadSchema;
|
|
13
|
+
exports.MANIFEST_FILENAME = require_ui_manifest_contract.MANIFEST_FILENAME;
|
|
14
|
+
exports.MANIFEST_VERSION = require_manifest_schema.MANIFEST_VERSION;
|
|
15
|
+
exports.MOUNTS = require_mount_registry.MOUNTS;
|
|
16
|
+
exports.MOUNT_ALIASES = require_mount_registry.MOUNT_ALIASES;
|
|
17
|
+
exports.MOUNT_REGISTRY = require_mount_registry.MOUNT_REGISTRY;
|
|
18
|
+
exports.MOUNT_REGISTRY_VERSION = require_mount_registry.MOUNT_REGISTRY_VERSION;
|
|
19
|
+
exports.ManifestSchema = require_manifest_schema.ManifestSchema;
|
|
20
|
+
exports.PLUGIN_UI_SHARED_EXPOSES = require_ui_manifest_contract.PLUGIN_UI_SHARED_EXPOSES;
|
|
21
|
+
exports.Plugin = require_descriptor.Plugin;
|
|
22
|
+
exports.PluginManifestSchema = require_manifest_schema.PluginManifestSchema;
|
|
23
|
+
exports.ROUTE_CONFIG_FILENAME = require_ui_manifest_contract.ROUTE_CONFIG_FILENAME;
|
|
24
|
+
exports.RouteRecordSchema = require_manifest_schema.RouteRecordSchema;
|
|
25
|
+
exports.SUPPORTED_MANIFEST_VERSION = require_manifest_schema.SUPPORTED_MANIFEST_VERSION;
|
|
26
|
+
exports.UI_EXPOSES = require_ui_manifest_contract.UI_EXPOSES;
|
|
27
|
+
exports.UI_REMOTE_ENTRY_FILENAME = require_ui_manifest_contract.UI_REMOTE_ENTRY_FILENAME;
|
|
28
|
+
exports.UI_REMOTE_SERVER_ENTRY_FILENAME = require_ui_manifest_contract.UI_REMOTE_SERVER_ENTRY_FILENAME;
|
|
29
|
+
exports.compareNavItems = require_nav.compareNavItems;
|
|
30
|
+
exports.constructTree = require_construct.constructTree;
|
|
31
|
+
exports.digestOf = require_descriptor.digestOf;
|
|
32
|
+
exports.parsePluginManifest = require_manifest_schema.parsePluginManifest;
|
|
33
|
+
exports.resolveApp = require_descriptor.resolveApp;
|
|
34
|
+
exports.resolveMountSegment = require_mount_registry.resolveMountSegment;
|
|
35
|
+
exports.sanitizeContainerName = require_identity.containerName;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { containerName } from "../../identity.cjs";
|
|
2
|
+
import { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME } from "./contract.cjs";
|
|
3
|
+
import { ComposePayload, ComposePayloadSchema, ComposeRemote, MANIFEST_VERSION, ManifestSchema, PluginManifest, PluginManifestSchema, RouteRecord, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, parsePluginManifest } from "./manifest-schema.cjs";
|
|
4
|
+
import { NavDeclaration, NavItem, NavManifest, compareNavItems } from "./nav.cjs";
|
|
5
|
+
import { RouteConfigModule, RouteConfigRef, RouteOptionsBundle } from "./route-config.cjs";
|
|
6
|
+
import { ConstructInput, ConstructPluginRef, ConstructedTree, GateUser, HostContext, ResolvedPlugin, constructTree } from "./construct.cjs";
|
|
7
|
+
import { App, AppInput, CompositionDigestInput, KnownPlugins, Plugin, PluginRef, PluginRefInput, RemoteSource, ResolvedApp, digestOf, resolveApp } from "./descriptor.cjs";
|
|
8
|
+
import { MOUNTS, MOUNT_ALIASES, MOUNT_REGISTRY, MOUNT_REGISTRY_VERSION, MountDef, MountId, resolveMountSegment } from "./mount-registry.cjs";
|
|
9
|
+
export { App, type AppInput, CORE_UI_PLUGIN_KEY, type ComposePayload, ComposePayloadSchema, type ComposeRemote, type CompositionDigestInput, type ConstructInput, type ConstructPluginRef, type ConstructedTree, type GateUser, type HostContext, type KnownPlugins, MANIFEST_FILENAME, MANIFEST_VERSION, MOUNTS, MOUNT_ALIASES, MOUNT_REGISTRY, MOUNT_REGISTRY_VERSION, ManifestSchema, type MountDef, type MountId, type NavDeclaration, type NavItem, type NavManifest, PLUGIN_UI_SHARED_EXPOSES, Plugin, type PluginManifest, PluginManifestSchema, type PluginRef, type PluginRefInput, ROUTE_CONFIG_FILENAME, type RemoteSource, type ResolvedApp, type ResolvedPlugin, type RouteConfigModule, type RouteConfigRef, type RouteOptionsBundle, type RouteRecord, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, compareNavItems, constructTree, digestOf, parsePluginManifest, resolveApp, resolveMountSegment, containerName as sanitizeContainerName };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { containerName } from "../../identity.mjs";
|
|
2
|
+
import { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME } from "./contract.mjs";
|
|
3
|
+
import { ComposePayload, ComposePayloadSchema, ComposeRemote, MANIFEST_VERSION, ManifestSchema, PluginManifest, PluginManifestSchema, RouteRecord, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, parsePluginManifest } from "./manifest-schema.mjs";
|
|
4
|
+
import { NavDeclaration, NavItem, NavManifest, compareNavItems } from "./nav.mjs";
|
|
5
|
+
import { RouteConfigModule, RouteConfigRef, RouteOptionsBundle } from "./route-config.mjs";
|
|
6
|
+
import { ConstructInput, ConstructPluginRef, ConstructedTree, GateUser, HostContext, ResolvedPlugin, constructTree } from "./construct.mjs";
|
|
7
|
+
import { App, AppInput, CompositionDigestInput, KnownPlugins, Plugin, PluginRef, PluginRefInput, RemoteSource, ResolvedApp, digestOf, resolveApp } from "./descriptor.mjs";
|
|
8
|
+
import { MOUNTS, MOUNT_ALIASES, MOUNT_REGISTRY, MOUNT_REGISTRY_VERSION, MountDef, MountId, resolveMountSegment } from "./mount-registry.mjs";
|
|
9
|
+
export { App, type AppInput, CORE_UI_PLUGIN_KEY, type ComposePayload, ComposePayloadSchema, type ComposeRemote, type CompositionDigestInput, type ConstructInput, type ConstructPluginRef, type ConstructedTree, type GateUser, type HostContext, type KnownPlugins, MANIFEST_FILENAME, MANIFEST_VERSION, MOUNTS, MOUNT_ALIASES, MOUNT_REGISTRY, MOUNT_REGISTRY_VERSION, ManifestSchema, type MountDef, type MountId, type NavDeclaration, type NavItem, type NavManifest, PLUGIN_UI_SHARED_EXPOSES, Plugin, type PluginManifest, PluginManifestSchema, type PluginRef, type PluginRefInput, ROUTE_CONFIG_FILENAME, type RemoteSource, type ResolvedApp, type ResolvedPlugin, type RouteConfigModule, type RouteConfigRef, type RouteOptionsBundle, type RouteRecord, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, compareNavItems, constructTree, digestOf, parsePluginManifest, resolveApp, resolveMountSegment, containerName as sanitizeContainerName };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { containerName } from "../../identity.mjs";
|
|
2
|
+
import { MOUNTS, MOUNT_ALIASES, MOUNT_REGISTRY, MOUNT_REGISTRY_VERSION, resolveMountSegment } from "./mount-registry.mjs";
|
|
3
|
+
import { App, Plugin, digestOf, resolveApp } from "./descriptor.mjs";
|
|
4
|
+
import { compareNavItems } from "./nav.mjs";
|
|
5
|
+
import { constructTree } from "./construct.mjs";
|
|
6
|
+
import { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME } from "./contract.mjs";
|
|
7
|
+
import { ComposePayloadSchema, MANIFEST_VERSION, ManifestSchema, PluginManifestSchema, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, parsePluginManifest } from "./manifest-schema.mjs";
|
|
8
|
+
|
|
9
|
+
export { App, CORE_UI_PLUGIN_KEY, ComposePayloadSchema, MANIFEST_FILENAME, MANIFEST_VERSION, MOUNTS, MOUNT_ALIASES, MOUNT_REGISTRY, MOUNT_REGISTRY_VERSION, ManifestSchema, PLUGIN_UI_SHARED_EXPOSES, Plugin, PluginManifestSchema, ROUTE_CONFIG_FILENAME, RouteRecordSchema, SUPPORTED_MANIFEST_VERSION, UI_EXPOSES, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, compareNavItems, constructTree, digestOf, parsePluginManifest, resolveApp, resolveMountSegment, containerName as sanitizeContainerName };
|