every-plugin 2.10.0 → 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 -194
- package/dist/build/rspack/dev-server-middleware.cjs.map +0 -1
- package/dist/build/rspack/dev-server-middleware.mjs +0 -193
- 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 -250
- 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,90 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
|
+
const require_identity = require('../../identity.cjs');
|
|
4
|
+
const require_ui_manifest_contract = require('../../ui/manifest/contract.cjs');
|
|
5
|
+
const require_manifest_plugin = require('./manifest-plugin.cjs');
|
|
6
|
+
const require_hash_artifacts_plugin = require('./hash-artifacts-plugin.cjs');
|
|
7
|
+
const require_rsbuild_config = require('./rsbuild-config.cjs');
|
|
8
|
+
const require_factory = require('./factory.cjs');
|
|
9
|
+
const require_generated_config = require('./generated-config.cjs');
|
|
10
|
+
const require_stubs = require('./stubs.cjs');
|
|
11
|
+
let node_fs = require("node:fs");
|
|
12
|
+
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
13
|
+
let node_path = require("node:path");
|
|
14
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
15
|
+
|
|
16
|
+
//#region src/build/ui/index.ts
|
|
17
|
+
/**
|
|
18
|
+
* Shared build surface for ui plugins (dual MF targets).
|
|
19
|
+
*
|
|
20
|
+
* Shared dependencies (react, react-dom, the orpc client/contract pair, the
|
|
21
|
+
* TanStack query/router pair, lingui, and the everything-dev session/i18n
|
|
22
|
+
* subpath modules) come from the SharedDependencySpec — the canonical list in
|
|
23
|
+
* `every-plugin/shared-deps-spec` — resolved from the building workspace's
|
|
24
|
+
* installed versions so a mismatch fails the build instead of loading a
|
|
25
|
+
* second React. Consumers (plugin remotes) set `import: false` — no bundled
|
|
26
|
+
* fallback copy, the provider (core ui) provides through the share scope
|
|
27
|
+
* only.
|
|
28
|
+
*
|
|
29
|
+
* `CORE_UI_DEPLOY_FIELDS` names the bos.config.json fields the publish
|
|
30
|
+
* writes deploy URLs back to.
|
|
31
|
+
*
|
|
32
|
+
* A ui source's rsbuild.config.ts mirrors ui/rsbuild.config.ts with these
|
|
33
|
+
* helpers: the web target is an MF remote exposing `./routeConfig` (the
|
|
34
|
+
* generated import map); the node target is a commonjs container exposing
|
|
35
|
+
* `./routeConfig` with the `@module-federation/node` runtime plugin and
|
|
36
|
+
* `autoCodeSplitting` off.
|
|
37
|
+
*/
|
|
38
|
+
/** Core shell field paths — unchanged from the v1 remote. */
|
|
39
|
+
const CORE_UI_DEPLOY_FIELDS = {
|
|
40
|
+
urlField: "app.ui.production",
|
|
41
|
+
integrityField: "app.ui.integrity",
|
|
42
|
+
ssrUrlField: "app.ui.ssr",
|
|
43
|
+
ssrIntegrityField: "app.ui.ssrIntegrity"
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Part of the plugin build contract, not per-plugin config: container chunks
|
|
47
|
+
* must resolve against the origin that served the remote entry. rsbuild's MF
|
|
48
|
+
* manifest stamps an absolute dev-server publicPath into metaData — rewrite
|
|
49
|
+
* it to `auto` after the node environment compiles so runtime resolution
|
|
50
|
+
* stays origin-relative.
|
|
51
|
+
*/
|
|
52
|
+
function restoreManifestPublicPath(distRoot) {
|
|
53
|
+
return {
|
|
54
|
+
name: "restore-manifest-public-path",
|
|
55
|
+
setup(api) {
|
|
56
|
+
api.onAfterEnvironmentCompile(({ environment, stats }) => {
|
|
57
|
+
if (!stats || stats.hasErrors() || environment.name !== "node") return;
|
|
58
|
+
const manifestPath = node_path.default.resolve(distRoot, "mf-manifest.json");
|
|
59
|
+
if (!node_fs.default.existsSync(manifestPath)) return;
|
|
60
|
+
const manifest = JSON.parse(node_fs.default.readFileSync(manifestPath, "utf8"));
|
|
61
|
+
if (manifest.metaData?.publicPath && manifest.metaData.publicPath !== "auto") {
|
|
62
|
+
manifest.metaData.publicPath = "auto";
|
|
63
|
+
node_fs.default.writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
exports.CORE_UI_DEPLOY_FIELDS = CORE_UI_DEPLOY_FIELDS;
|
|
72
|
+
exports.CORE_UI_PLUGIN_KEY = require_ui_manifest_contract.CORE_UI_PLUGIN_KEY;
|
|
73
|
+
exports.CORE_UI_STUBS = require_stubs.CORE_UI_STUBS;
|
|
74
|
+
exports.MANIFEST_FILENAME = require_ui_manifest_contract.MANIFEST_FILENAME;
|
|
75
|
+
exports.PLUGIN_UI_SHARED_EXPOSES = require_ui_manifest_contract.PLUGIN_UI_SHARED_EXPOSES;
|
|
76
|
+
exports.ROUTE_CONFIG_FILENAME = require_ui_manifest_contract.ROUTE_CONFIG_FILENAME;
|
|
77
|
+
exports.UI_REMOTE_ENTRY_FILENAME = require_ui_manifest_contract.UI_REMOTE_ENTRY_FILENAME;
|
|
78
|
+
exports.UI_REMOTE_SERVER_ENTRY_FILENAME = require_ui_manifest_contract.UI_REMOTE_SERVER_ENTRY_FILENAME;
|
|
79
|
+
exports.createCoreUiRsbuildConfig = require_factory.createCoreUiRsbuildConfig;
|
|
80
|
+
exports.createUiRsbuildConfig = require_rsbuild_config.createUiRsbuildConfig;
|
|
81
|
+
exports.emitCoreUiStubs = require_stubs.emitCoreUiStubs;
|
|
82
|
+
exports.ensureGeneratedCoreUiRsbuildConfig = require_generated_config.ensureGeneratedCoreUiRsbuildConfig;
|
|
83
|
+
exports.ensureGeneratedUiRsbuildConfig = require_generated_config.ensureGeneratedUiRsbuildConfig;
|
|
84
|
+
exports.hasCoreUiWorkspace = require_generated_config.hasCoreUiWorkspace;
|
|
85
|
+
exports.hasFolderFormUi = require_generated_config.hasFolderFormUi;
|
|
86
|
+
exports.hashArtifactsPlugin = require_hash_artifacts_plugin.hashArtifactsPlugin;
|
|
87
|
+
exports.restoreManifestPublicPath = restoreManifestPublicPath;
|
|
88
|
+
exports.sanitizeContainerName = require_identity.containerName;
|
|
89
|
+
exports.uiManifestGenPlugin = require_manifest_plugin.uiManifestGenPlugin;
|
|
90
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["path","fs"],"sources":["../../../src/build/ui/index.ts"],"sourcesContent":["/**\n * Shared build surface for ui plugins (dual MF targets).\n *\n * Shared dependencies (react, react-dom, the orpc client/contract pair, the\n * TanStack query/router pair, lingui, and the everything-dev session/i18n\n * subpath modules) come from the SharedDependencySpec — the canonical list in\n * `every-plugin/shared-deps-spec` — resolved from the building workspace's\n * installed versions so a mismatch fails the build instead of loading a\n * second React. Consumers (plugin remotes) set `import: false` — no bundled\n * fallback copy, the provider (core ui) provides through the share scope\n * only.\n *\n * `CORE_UI_DEPLOY_FIELDS` names the bos.config.json fields the publish\n * writes deploy URLs back to.\n *\n * A ui source's rsbuild.config.ts mirrors ui/rsbuild.config.ts with these\n * helpers: the web target is an MF remote exposing `./routeConfig` (the\n * generated import map); the node target is a commonjs container exposing\n * `./routeConfig` with the `@module-federation/node` runtime plugin and\n * `autoCodeSplitting` off.\n */\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { RsbuildPlugin } from \"@rsbuild/core\";\nimport { PLUGIN_UI_SHARED_EXPOSES } from \"../../ui/manifest/contract\";\nimport { type UiManifestGenPluginOptions, uiManifestGenPlugin } from \"./manifest-plugin\";\n\nexport { type CoreUiRsbuildConfigInput, createCoreUiRsbuildConfig } from \"./factory\";\nexport {\n ensureGeneratedCoreUiRsbuildConfig,\n ensureGeneratedUiRsbuildConfig,\n hasCoreUiWorkspace,\n hasFolderFormUi,\n} from \"./generated-config\";\nexport {\n type HashArtifactsPluginOptions,\n hashArtifactsPlugin,\n} from \"./hash-artifacts-plugin\";\nexport {\n createUiRsbuildConfig,\n sanitizeContainerName,\n type UiRsbuildConfigOptions,\n} from \"./rsbuild-config\";\nexport { CORE_UI_STUBS, emitCoreUiStubs } from \"./stubs\";\nexport type { UiManifestGenPluginOptions };\nexport { uiManifestGenPlugin };\n\nexport interface UiDeployFields {\n urlField: string;\n integrityField: string;\n ssrUrlField?: string;\n ssrIntegrityField?: string;\n}\n\n/** Core shell field paths — unchanged from the v1 remote. */\nexport const CORE_UI_DEPLOY_FIELDS: UiDeployFields = {\n urlField: \"app.ui.production\",\n integrityField: \"app.ui.integrity\",\n ssrUrlField: \"app.ui.ssr\",\n ssrIntegrityField: \"app.ui.ssrIntegrity\",\n};\n\n/** Canonical exposes every manifest-composed ui source ships. */\nexport { PLUGIN_UI_SHARED_EXPOSES };\n\n/**\n * Part of the plugin build contract, not per-plugin config: container chunks\n * must resolve against the origin that served the remote entry. rsbuild's MF\n * manifest stamps an absolute dev-server publicPath into metaData — rewrite\n * it to `auto` after the node environment compiles so runtime resolution\n * stays origin-relative.\n */\nexport function restoreManifestPublicPath(distRoot: string): RsbuildPlugin {\n return {\n name: \"restore-manifest-public-path\",\n setup(api) {\n api.onAfterEnvironmentCompile(({ environment, stats }) => {\n if (!stats || stats.hasErrors() || environment.name !== \"node\") return;\n const manifestPath = path.resolve(distRoot, \"mf-manifest.json\");\n if (!fs.existsSync(manifestPath)) return;\n const manifest = JSON.parse(fs.readFileSync(manifestPath, \"utf8\"));\n if (manifest.metaData?.publicPath && manifest.metaData.publicPath !== \"auto\") {\n manifest.metaData.publicPath = \"auto\";\n fs.writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\\n`);\n }\n });\n },\n };\n}\n\nexport {\n CORE_UI_PLUGIN_KEY,\n MANIFEST_FILENAME,\n ROUTE_CONFIG_FILENAME,\n UI_REMOTE_ENTRY_FILENAME,\n UI_REMOTE_SERVER_ENTRY_FILENAME,\n} from \"../../ui/manifest/contract\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,MAAa,wBAAwC;CACnD,UAAU;CACV,gBAAgB;CAChB,aAAa;CACb,mBAAmB;AACrB;;;;;;;;AAYA,SAAgB,0BAA0B,UAAiC;CACzE,OAAO;EACL,MAAM;EACN,MAAM,KAAK;GACT,IAAI,2BAA2B,EAAE,aAAa,YAAY;IACxD,IAAI,CAAC,SAAS,MAAM,UAAU,KAAK,YAAY,SAAS,QAAQ;IAChE,MAAM,eAAeA,kBAAK,QAAQ,UAAU,kBAAkB;IAC9D,IAAI,CAACC,gBAAG,WAAW,YAAY,GAAG;IAClC,MAAM,WAAW,KAAK,MAAMA,gBAAG,aAAa,cAAc,MAAM,CAAC;IACjE,IAAI,SAAS,UAAU,cAAc,SAAS,SAAS,eAAe,QAAQ;KAC5E,SAAS,SAAS,aAAa;KAC/B,gBAAG,cAAc,cAAc,GAAG,KAAK,UAAU,UAAU,MAAM,CAAC,EAAE,GAAG;IACzE;GACF,CAAC;EACH;CACF;AACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { containerName } from "../../identity.cjs";
|
|
2
|
+
import { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME } from "../../ui/manifest/contract.cjs";
|
|
3
|
+
import { UiManifestGenPluginOptions, uiManifestGenPlugin } from "./manifest-plugin.cjs";
|
|
4
|
+
import { CoreUiRsbuildConfigInput, createCoreUiRsbuildConfig } from "./factory.cjs";
|
|
5
|
+
import { ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi } from "./generated-config.cjs";
|
|
6
|
+
import { HashArtifactsPluginOptions, hashArtifactsPlugin } from "./hash-artifacts-plugin.cjs";
|
|
7
|
+
import { UiRsbuildConfigOptions, createUiRsbuildConfig } from "./rsbuild-config.cjs";
|
|
8
|
+
import { CORE_UI_STUBS, emitCoreUiStubs } from "./stubs.cjs";
|
|
9
|
+
import { RsbuildPlugin } from "@rsbuild/core";
|
|
10
|
+
//#region src/build/ui/index.d.ts
|
|
11
|
+
interface UiDeployFields {
|
|
12
|
+
urlField: string;
|
|
13
|
+
integrityField: string;
|
|
14
|
+
ssrUrlField?: string;
|
|
15
|
+
ssrIntegrityField?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Core shell field paths — unchanged from the v1 remote. */
|
|
18
|
+
declare const CORE_UI_DEPLOY_FIELDS: UiDeployFields;
|
|
19
|
+
/**
|
|
20
|
+
* Part of the plugin build contract, not per-plugin config: container chunks
|
|
21
|
+
* must resolve against the origin that served the remote entry. rsbuild's MF
|
|
22
|
+
* manifest stamps an absolute dev-server publicPath into metaData — rewrite
|
|
23
|
+
* it to `auto` after the node environment compiles so runtime resolution
|
|
24
|
+
* stays origin-relative.
|
|
25
|
+
*/
|
|
26
|
+
declare function restoreManifestPublicPath(distRoot: string): RsbuildPlugin;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CORE_UI_DEPLOY_FIELDS, CORE_UI_PLUGIN_KEY, CORE_UI_STUBS, type CoreUiRsbuildConfigInput, type HashArtifactsPluginOptions, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, UiDeployFields, type UiManifestGenPluginOptions, type UiRsbuildConfigOptions, createCoreUiRsbuildConfig, createUiRsbuildConfig, emitCoreUiStubs, ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi, hashArtifactsPlugin, restoreManifestPublicPath, containerName as sanitizeContainerName, uiManifestGenPlugin };
|
|
29
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../../src/build/ui/index.ts"],"mappings":";;;;;;;;;;UAgDiB;EACf;EACA;EACA;EACA;;;cAIW,uBAAuB;;;;;;;;iBAiBpB,0BAA0B,mBAAmB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { containerName } from "../../identity.mjs";
|
|
2
|
+
import { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME } from "../../ui/manifest/contract.mjs";
|
|
3
|
+
import { UiManifestGenPluginOptions, uiManifestGenPlugin } from "./manifest-plugin.mjs";
|
|
4
|
+
import { CoreUiRsbuildConfigInput, createCoreUiRsbuildConfig } from "./factory.mjs";
|
|
5
|
+
import { ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi } from "./generated-config.mjs";
|
|
6
|
+
import { HashArtifactsPluginOptions, hashArtifactsPlugin } from "./hash-artifacts-plugin.mjs";
|
|
7
|
+
import { UiRsbuildConfigOptions, createUiRsbuildConfig } from "./rsbuild-config.mjs";
|
|
8
|
+
import { CORE_UI_STUBS, emitCoreUiStubs } from "./stubs.mjs";
|
|
9
|
+
import { RsbuildPlugin } from "@rsbuild/core";
|
|
10
|
+
//#region src/build/ui/index.d.ts
|
|
11
|
+
interface UiDeployFields {
|
|
12
|
+
urlField: string;
|
|
13
|
+
integrityField: string;
|
|
14
|
+
ssrUrlField?: string;
|
|
15
|
+
ssrIntegrityField?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Core shell field paths — unchanged from the v1 remote. */
|
|
18
|
+
declare const CORE_UI_DEPLOY_FIELDS: UiDeployFields;
|
|
19
|
+
/**
|
|
20
|
+
* Part of the plugin build contract, not per-plugin config: container chunks
|
|
21
|
+
* must resolve against the origin that served the remote entry. rsbuild's MF
|
|
22
|
+
* manifest stamps an absolute dev-server publicPath into metaData — rewrite
|
|
23
|
+
* it to `auto` after the node environment compiles so runtime resolution
|
|
24
|
+
* stays origin-relative.
|
|
25
|
+
*/
|
|
26
|
+
declare function restoreManifestPublicPath(distRoot: string): RsbuildPlugin;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { CORE_UI_DEPLOY_FIELDS, CORE_UI_PLUGIN_KEY, CORE_UI_STUBS, type CoreUiRsbuildConfigInput, type HashArtifactsPluginOptions, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, UiDeployFields, type UiManifestGenPluginOptions, type UiRsbuildConfigOptions, createCoreUiRsbuildConfig, createUiRsbuildConfig, emitCoreUiStubs, ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi, hashArtifactsPlugin, restoreManifestPublicPath, containerName as sanitizeContainerName, uiManifestGenPlugin };
|
|
29
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/build/ui/index.ts"],"mappings":";;;;;;;;;;UAgDiB;EACf;EACA;EACA;EACA;;;cAIW,uBAAuB;;;;;;;;iBAiBpB,0BAA0B,mBAAmB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { containerName } from "../../identity.mjs";
|
|
2
|
+
import { CORE_UI_PLUGIN_KEY, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME } from "../../ui/manifest/contract.mjs";
|
|
3
|
+
import { uiManifestGenPlugin } from "./manifest-plugin.mjs";
|
|
4
|
+
import { hashArtifactsPlugin } from "./hash-artifacts-plugin.mjs";
|
|
5
|
+
import { createUiRsbuildConfig } from "./rsbuild-config.mjs";
|
|
6
|
+
import { createCoreUiRsbuildConfig } from "./factory.mjs";
|
|
7
|
+
import { ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi } from "./generated-config.mjs";
|
|
8
|
+
import { CORE_UI_STUBS, emitCoreUiStubs } from "./stubs.mjs";
|
|
9
|
+
import fs from "node:fs";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
|
|
12
|
+
//#region src/build/ui/index.ts
|
|
13
|
+
/**
|
|
14
|
+
* Shared build surface for ui plugins (dual MF targets).
|
|
15
|
+
*
|
|
16
|
+
* Shared dependencies (react, react-dom, the orpc client/contract pair, the
|
|
17
|
+
* TanStack query/router pair, lingui, and the everything-dev session/i18n
|
|
18
|
+
* subpath modules) come from the SharedDependencySpec — the canonical list in
|
|
19
|
+
* `every-plugin/shared-deps-spec` — resolved from the building workspace's
|
|
20
|
+
* installed versions so a mismatch fails the build instead of loading a
|
|
21
|
+
* second React. Consumers (plugin remotes) set `import: false` — no bundled
|
|
22
|
+
* fallback copy, the provider (core ui) provides through the share scope
|
|
23
|
+
* only.
|
|
24
|
+
*
|
|
25
|
+
* `CORE_UI_DEPLOY_FIELDS` names the bos.config.json fields the publish
|
|
26
|
+
* writes deploy URLs back to.
|
|
27
|
+
*
|
|
28
|
+
* A ui source's rsbuild.config.ts mirrors ui/rsbuild.config.ts with these
|
|
29
|
+
* helpers: the web target is an MF remote exposing `./routeConfig` (the
|
|
30
|
+
* generated import map); the node target is a commonjs container exposing
|
|
31
|
+
* `./routeConfig` with the `@module-federation/node` runtime plugin and
|
|
32
|
+
* `autoCodeSplitting` off.
|
|
33
|
+
*/
|
|
34
|
+
/** Core shell field paths — unchanged from the v1 remote. */
|
|
35
|
+
const CORE_UI_DEPLOY_FIELDS = {
|
|
36
|
+
urlField: "app.ui.production",
|
|
37
|
+
integrityField: "app.ui.integrity",
|
|
38
|
+
ssrUrlField: "app.ui.ssr",
|
|
39
|
+
ssrIntegrityField: "app.ui.ssrIntegrity"
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Part of the plugin build contract, not per-plugin config: container chunks
|
|
43
|
+
* must resolve against the origin that served the remote entry. rsbuild's MF
|
|
44
|
+
* manifest stamps an absolute dev-server publicPath into metaData — rewrite
|
|
45
|
+
* it to `auto` after the node environment compiles so runtime resolution
|
|
46
|
+
* stays origin-relative.
|
|
47
|
+
*/
|
|
48
|
+
function restoreManifestPublicPath(distRoot) {
|
|
49
|
+
return {
|
|
50
|
+
name: "restore-manifest-public-path",
|
|
51
|
+
setup(api) {
|
|
52
|
+
api.onAfterEnvironmentCompile(({ environment, stats }) => {
|
|
53
|
+
if (!stats || stats.hasErrors() || environment.name !== "node") return;
|
|
54
|
+
const manifestPath = path.resolve(distRoot, "mf-manifest.json");
|
|
55
|
+
if (!fs.existsSync(manifestPath)) return;
|
|
56
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf8"));
|
|
57
|
+
if (manifest.metaData?.publicPath && manifest.metaData.publicPath !== "auto") {
|
|
58
|
+
manifest.metaData.publicPath = "auto";
|
|
59
|
+
fs.writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
export { CORE_UI_DEPLOY_FIELDS, CORE_UI_PLUGIN_KEY, CORE_UI_STUBS, MANIFEST_FILENAME, PLUGIN_UI_SHARED_EXPOSES, ROUTE_CONFIG_FILENAME, UI_REMOTE_ENTRY_FILENAME, UI_REMOTE_SERVER_ENTRY_FILENAME, createCoreUiRsbuildConfig, createUiRsbuildConfig, emitCoreUiStubs, ensureGeneratedCoreUiRsbuildConfig, ensureGeneratedUiRsbuildConfig, hasCoreUiWorkspace, hasFolderFormUi, hashArtifactsPlugin, restoreManifestPublicPath, containerName as sanitizeContainerName, uiManifestGenPlugin };
|
|
68
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/build/ui/index.ts"],"sourcesContent":["/**\n * Shared build surface for ui plugins (dual MF targets).\n *\n * Shared dependencies (react, react-dom, the orpc client/contract pair, the\n * TanStack query/router pair, lingui, and the everything-dev session/i18n\n * subpath modules) come from the SharedDependencySpec — the canonical list in\n * `every-plugin/shared-deps-spec` — resolved from the building workspace's\n * installed versions so a mismatch fails the build instead of loading a\n * second React. Consumers (plugin remotes) set `import: false` — no bundled\n * fallback copy, the provider (core ui) provides through the share scope\n * only.\n *\n * `CORE_UI_DEPLOY_FIELDS` names the bos.config.json fields the publish\n * writes deploy URLs back to.\n *\n * A ui source's rsbuild.config.ts mirrors ui/rsbuild.config.ts with these\n * helpers: the web target is an MF remote exposing `./routeConfig` (the\n * generated import map); the node target is a commonjs container exposing\n * `./routeConfig` with the `@module-federation/node` runtime plugin and\n * `autoCodeSplitting` off.\n */\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { RsbuildPlugin } from \"@rsbuild/core\";\nimport { PLUGIN_UI_SHARED_EXPOSES } from \"../../ui/manifest/contract\";\nimport { type UiManifestGenPluginOptions, uiManifestGenPlugin } from \"./manifest-plugin\";\n\nexport { type CoreUiRsbuildConfigInput, createCoreUiRsbuildConfig } from \"./factory\";\nexport {\n ensureGeneratedCoreUiRsbuildConfig,\n ensureGeneratedUiRsbuildConfig,\n hasCoreUiWorkspace,\n hasFolderFormUi,\n} from \"./generated-config\";\nexport {\n type HashArtifactsPluginOptions,\n hashArtifactsPlugin,\n} from \"./hash-artifacts-plugin\";\nexport {\n createUiRsbuildConfig,\n sanitizeContainerName,\n type UiRsbuildConfigOptions,\n} from \"./rsbuild-config\";\nexport { CORE_UI_STUBS, emitCoreUiStubs } from \"./stubs\";\nexport type { UiManifestGenPluginOptions };\nexport { uiManifestGenPlugin };\n\nexport interface UiDeployFields {\n urlField: string;\n integrityField: string;\n ssrUrlField?: string;\n ssrIntegrityField?: string;\n}\n\n/** Core shell field paths — unchanged from the v1 remote. */\nexport const CORE_UI_DEPLOY_FIELDS: UiDeployFields = {\n urlField: \"app.ui.production\",\n integrityField: \"app.ui.integrity\",\n ssrUrlField: \"app.ui.ssr\",\n ssrIntegrityField: \"app.ui.ssrIntegrity\",\n};\n\n/** Canonical exposes every manifest-composed ui source ships. */\nexport { PLUGIN_UI_SHARED_EXPOSES };\n\n/**\n * Part of the plugin build contract, not per-plugin config: container chunks\n * must resolve against the origin that served the remote entry. rsbuild's MF\n * manifest stamps an absolute dev-server publicPath into metaData — rewrite\n * it to `auto` after the node environment compiles so runtime resolution\n * stays origin-relative.\n */\nexport function restoreManifestPublicPath(distRoot: string): RsbuildPlugin {\n return {\n name: \"restore-manifest-public-path\",\n setup(api) {\n api.onAfterEnvironmentCompile(({ environment, stats }) => {\n if (!stats || stats.hasErrors() || environment.name !== \"node\") return;\n const manifestPath = path.resolve(distRoot, \"mf-manifest.json\");\n if (!fs.existsSync(manifestPath)) return;\n const manifest = JSON.parse(fs.readFileSync(manifestPath, \"utf8\"));\n if (manifest.metaData?.publicPath && manifest.metaData.publicPath !== \"auto\") {\n manifest.metaData.publicPath = \"auto\";\n fs.writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\\n`);\n }\n });\n },\n };\n}\n\nexport {\n CORE_UI_PLUGIN_KEY,\n MANIFEST_FILENAME,\n ROUTE_CONFIG_FILENAME,\n UI_REMOTE_ENTRY_FILENAME,\n UI_REMOTE_SERVER_ENTRY_FILENAME,\n} from \"../../ui/manifest/contract\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,MAAa,wBAAwC;CACnD,UAAU;CACV,gBAAgB;CAChB,aAAa;CACb,mBAAmB;AACrB;;;;;;;;AAYA,SAAgB,0BAA0B,UAAiC;CACzE,OAAO;EACL,MAAM;EACN,MAAM,KAAK;GACT,IAAI,2BAA2B,EAAE,aAAa,YAAY;IACxD,IAAI,CAAC,SAAS,MAAM,UAAU,KAAK,YAAY,SAAS,QAAQ;IAChE,MAAM,eAAe,KAAK,QAAQ,UAAU,kBAAkB;IAC9D,IAAI,CAAC,GAAG,WAAW,YAAY,GAAG;IAClC,MAAM,WAAW,KAAK,MAAM,GAAG,aAAa,cAAc,MAAM,CAAC;IACjE,IAAI,SAAS,UAAU,cAAc,SAAS,SAAS,eAAe,QAAQ;KAC5E,SAAS,SAAS,aAAa;KAC/B,GAAG,cAAc,cAAc,GAAG,KAAK,UAAU,UAAU,MAAM,CAAC,EAAE,GAAG;IACzE;GACF,CAAC;EACH;CACF;AACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const require_ui_manifest_generator = require('../../ui/manifest/generator.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/build/ui/manifest-plugin.ts
|
|
4
|
+
const inFlight = /* @__PURE__ */ new Map();
|
|
5
|
+
/** rsbuild builds environments in parallel and each setup runs the generator — concurrent runs share one pass. */
|
|
6
|
+
function runOnce(key, run) {
|
|
7
|
+
const existing = inFlight.get(key);
|
|
8
|
+
if (existing) return existing;
|
|
9
|
+
const promise = run().finally(() => {
|
|
10
|
+
inFlight.delete(key);
|
|
11
|
+
});
|
|
12
|
+
inFlight.set(key, promise);
|
|
13
|
+
return promise;
|
|
14
|
+
}
|
|
15
|
+
function uiManifestGenPlugin(options) {
|
|
16
|
+
const run = () => runOnce(`${options.workspaceRoot}::${options.pluginName}`, () => require_ui_manifest_generator.generateUiManifest({
|
|
17
|
+
workspaceRoot: options.workspaceRoot,
|
|
18
|
+
pluginName: options.pluginName,
|
|
19
|
+
emitRouteTree: false
|
|
20
|
+
}));
|
|
21
|
+
return {
|
|
22
|
+
name: "ui-manifest-gen",
|
|
23
|
+
async setup(api) {
|
|
24
|
+
await run();
|
|
25
|
+
api.onBeforeBuild(async () => {
|
|
26
|
+
await run();
|
|
27
|
+
});
|
|
28
|
+
api.onBeforeDevCompile(async () => {
|
|
29
|
+
await run();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.uiManifestGenPlugin = uiManifestGenPlugin;
|
|
37
|
+
//# sourceMappingURL=manifest-plugin.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-plugin.cjs","names":["generateUiManifest"],"sources":["../../../src/build/ui/manifest-plugin.ts"],"sourcesContent":["import type { RsbuildPlugin } from \"@rsbuild/core\";\nimport { generateUiManifest } from \"../../ui/manifest/generator\";\n\n/**\n * Rsbuild plugin that keeps a ui source's generated artifacts fresh during\n * builds and dev watch: manifest.gen.json + routeConfig.gen.ts are\n * regenerated in plugin setup (before any environment compiles, so the\n * `./routeConfig` MF expose resolves), and again on every build/dev-compile\n * start. The stock routeTree write is redirected to a scratch path —\n * TanStackRouterRspack owns src/routeTree.gen.ts (its autoCodeSplitting\n * options differ from the manifest pass).\n */\n\nexport interface UiManifestGenPluginOptions {\n workspaceRoot: string;\n pluginName: string;\n}\n\nconst inFlight = new Map<string, Promise<unknown>>();\n\n/** rsbuild builds environments in parallel and each setup runs the generator — concurrent runs share one pass. */\nfunction runOnce(key: string, run: () => Promise<unknown>): Promise<unknown> {\n const existing = inFlight.get(key);\n if (existing) return existing;\n const promise = run().finally(() => {\n inFlight.delete(key);\n });\n inFlight.set(key, promise);\n return promise;\n}\n\nexport function uiManifestGenPlugin(options: UiManifestGenPluginOptions): RsbuildPlugin {\n const run = () =>\n runOnce(`${options.workspaceRoot}::${options.pluginName}`, () =>\n generateUiManifest({\n workspaceRoot: options.workspaceRoot,\n pluginName: options.pluginName,\n emitRouteTree: false,\n }),\n );\n\n return {\n name: \"ui-manifest-gen\",\n async setup(api) {\n await run();\n api.onBeforeBuild(async () => {\n await run();\n });\n api.onBeforeDevCompile(async () => {\n await run();\n });\n },\n };\n}\n"],"mappings":";;;AAkBA,MAAM,2BAAW,IAAI,IAA8B;;AAGnD,SAAS,QAAQ,KAAa,KAA+C;CAC3E,MAAM,WAAW,SAAS,IAAI,GAAG;CACjC,IAAI,UAAU,OAAO;CACrB,MAAM,UAAU,IAAI,CAAC,CAAC,cAAc;EAClC,SAAS,OAAO,GAAG;CACrB,CAAC;CACD,SAAS,IAAI,KAAK,OAAO;CACzB,OAAO;AACT;AAEA,SAAgB,oBAAoB,SAAoD;CACtF,MAAM,YACJ,QAAQ,GAAG,QAAQ,cAAc,IAAI,QAAQ,oBAC3CA,iDAAmB;EACjB,eAAe,QAAQ;EACvB,YAAY,QAAQ;EACpB,eAAe;CACjB,CAAC,CACH;CAEF,OAAO;EACL,MAAM;EACN,MAAM,MAAM,KAAK;GACf,MAAM,IAAI;GACV,IAAI,cAAc,YAAY;IAC5B,MAAM,IAAI;GACZ,CAAC;GACD,IAAI,mBAAmB,YAAY;IACjC,MAAM,IAAI;GACZ,CAAC;EACH;CACF;AACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RsbuildPlugin } from "@rsbuild/core";
|
|
2
|
+
//#region src/build/ui/manifest-plugin.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Rsbuild plugin that keeps a ui source's generated artifacts fresh during
|
|
5
|
+
* builds and dev watch: manifest.gen.json + routeConfig.gen.ts are
|
|
6
|
+
* regenerated in plugin setup (before any environment compiles, so the
|
|
7
|
+
* `./routeConfig` MF expose resolves), and again on every build/dev-compile
|
|
8
|
+
* start. The stock routeTree write is redirected to a scratch path —
|
|
9
|
+
* TanStackRouterRspack owns src/routeTree.gen.ts (its autoCodeSplitting
|
|
10
|
+
* options differ from the manifest pass).
|
|
11
|
+
*/
|
|
12
|
+
interface UiManifestGenPluginOptions {
|
|
13
|
+
workspaceRoot: string;
|
|
14
|
+
pluginName: string;
|
|
15
|
+
}
|
|
16
|
+
declare function uiManifestGenPlugin(options: UiManifestGenPluginOptions): RsbuildPlugin;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { UiManifestGenPluginOptions, uiManifestGenPlugin };
|
|
19
|
+
//# sourceMappingURL=manifest-plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-plugin.d.cts","names":[],"sources":["../../../src/build/ui/manifest-plugin.ts"],"mappings":";;;;;;;;;;;UAaiB;EACf;EACA;;iBAgBc,oBAAoB,SAAS,6BAA6B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RsbuildPlugin } from "@rsbuild/core";
|
|
2
|
+
//#region src/build/ui/manifest-plugin.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Rsbuild plugin that keeps a ui source's generated artifacts fresh during
|
|
5
|
+
* builds and dev watch: manifest.gen.json + routeConfig.gen.ts are
|
|
6
|
+
* regenerated in plugin setup (before any environment compiles, so the
|
|
7
|
+
* `./routeConfig` MF expose resolves), and again on every build/dev-compile
|
|
8
|
+
* start. The stock routeTree write is redirected to a scratch path —
|
|
9
|
+
* TanStackRouterRspack owns src/routeTree.gen.ts (its autoCodeSplitting
|
|
10
|
+
* options differ from the manifest pass).
|
|
11
|
+
*/
|
|
12
|
+
interface UiManifestGenPluginOptions {
|
|
13
|
+
workspaceRoot: string;
|
|
14
|
+
pluginName: string;
|
|
15
|
+
}
|
|
16
|
+
declare function uiManifestGenPlugin(options: UiManifestGenPluginOptions): RsbuildPlugin;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { UiManifestGenPluginOptions, uiManifestGenPlugin };
|
|
19
|
+
//# sourceMappingURL=manifest-plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-plugin.d.mts","names":[],"sources":["../../../src/build/ui/manifest-plugin.ts"],"mappings":";;;;;;;;;;;UAaiB;EACf;EACA;;iBAgBc,oBAAoB,SAAS,6BAA6B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { generateUiManifest } from "../../ui/manifest/generator.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/build/ui/manifest-plugin.ts
|
|
4
|
+
const inFlight = /* @__PURE__ */ new Map();
|
|
5
|
+
/** rsbuild builds environments in parallel and each setup runs the generator — concurrent runs share one pass. */
|
|
6
|
+
function runOnce(key, run) {
|
|
7
|
+
const existing = inFlight.get(key);
|
|
8
|
+
if (existing) return existing;
|
|
9
|
+
const promise = run().finally(() => {
|
|
10
|
+
inFlight.delete(key);
|
|
11
|
+
});
|
|
12
|
+
inFlight.set(key, promise);
|
|
13
|
+
return promise;
|
|
14
|
+
}
|
|
15
|
+
function uiManifestGenPlugin(options) {
|
|
16
|
+
const run = () => runOnce(`${options.workspaceRoot}::${options.pluginName}`, () => generateUiManifest({
|
|
17
|
+
workspaceRoot: options.workspaceRoot,
|
|
18
|
+
pluginName: options.pluginName,
|
|
19
|
+
emitRouteTree: false
|
|
20
|
+
}));
|
|
21
|
+
return {
|
|
22
|
+
name: "ui-manifest-gen",
|
|
23
|
+
async setup(api) {
|
|
24
|
+
await run();
|
|
25
|
+
api.onBeforeBuild(async () => {
|
|
26
|
+
await run();
|
|
27
|
+
});
|
|
28
|
+
api.onBeforeDevCompile(async () => {
|
|
29
|
+
await run();
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { uiManifestGenPlugin };
|
|
37
|
+
//# sourceMappingURL=manifest-plugin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest-plugin.mjs","names":[],"sources":["../../../src/build/ui/manifest-plugin.ts"],"sourcesContent":["import type { RsbuildPlugin } from \"@rsbuild/core\";\nimport { generateUiManifest } from \"../../ui/manifest/generator\";\n\n/**\n * Rsbuild plugin that keeps a ui source's generated artifacts fresh during\n * builds and dev watch: manifest.gen.json + routeConfig.gen.ts are\n * regenerated in plugin setup (before any environment compiles, so the\n * `./routeConfig` MF expose resolves), and again on every build/dev-compile\n * start. The stock routeTree write is redirected to a scratch path —\n * TanStackRouterRspack owns src/routeTree.gen.ts (its autoCodeSplitting\n * options differ from the manifest pass).\n */\n\nexport interface UiManifestGenPluginOptions {\n workspaceRoot: string;\n pluginName: string;\n}\n\nconst inFlight = new Map<string, Promise<unknown>>();\n\n/** rsbuild builds environments in parallel and each setup runs the generator — concurrent runs share one pass. */\nfunction runOnce(key: string, run: () => Promise<unknown>): Promise<unknown> {\n const existing = inFlight.get(key);\n if (existing) return existing;\n const promise = run().finally(() => {\n inFlight.delete(key);\n });\n inFlight.set(key, promise);\n return promise;\n}\n\nexport function uiManifestGenPlugin(options: UiManifestGenPluginOptions): RsbuildPlugin {\n const run = () =>\n runOnce(`${options.workspaceRoot}::${options.pluginName}`, () =>\n generateUiManifest({\n workspaceRoot: options.workspaceRoot,\n pluginName: options.pluginName,\n emitRouteTree: false,\n }),\n );\n\n return {\n name: \"ui-manifest-gen\",\n async setup(api) {\n await run();\n api.onBeforeBuild(async () => {\n await run();\n });\n api.onBeforeDevCompile(async () => {\n await run();\n });\n },\n };\n}\n"],"mappings":";;;AAkBA,MAAM,2BAAW,IAAI,IAA8B;;AAGnD,SAAS,QAAQ,KAAa,KAA+C;CAC3E,MAAM,WAAW,SAAS,IAAI,GAAG;CACjC,IAAI,UAAU,OAAO;CACrB,MAAM,UAAU,IAAI,CAAC,CAAC,cAAc;EAClC,SAAS,OAAO,GAAG;CACrB,CAAC;CACD,SAAS,IAAI,KAAK,OAAO;CACzB,OAAO;AACT;AAEA,SAAgB,oBAAoB,SAAoD;CACtF,MAAM,YACJ,QAAQ,GAAG,QAAQ,cAAc,IAAI,QAAQ,oBAC3C,mBAAmB;EACjB,eAAe,QAAQ;EACvB,YAAY,QAAQ;EACpB,eAAe;CACjB,CAAC,CACH;CAEF,OAAO;EACL,MAAM;EACN,MAAM,MAAM,KAAK;GACf,MAAM,IAAI;GACV,IAAI,cAAc,YAAY;IAC5B,MAAM,IAAI;GACZ,CAAC;GACD,IAAI,mBAAmB,YAAY;IACjC,MAAM,IAAI;GACZ,CAAC;EACH;CACF;AACF"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
const require_build_artifact_names = require('../artifact-names.cjs');
|
|
3
|
+
const require_shared_deps_spec = require('../../shared-deps-spec.cjs');
|
|
4
|
+
const require_identity = require('../../identity.cjs');
|
|
5
|
+
const require_fix_mf_data_uri_plugin = require('../rspack/fix-mf-data-uri-plugin.cjs');
|
|
6
|
+
require('../rspack/index.cjs');
|
|
7
|
+
const require_ui_manifest_contract = require('../../ui/manifest/contract.cjs');
|
|
8
|
+
const require_manifest_plugin = require('./manifest-plugin.cjs');
|
|
9
|
+
const require_hash_artifacts_plugin = require('./hash-artifacts-plugin.cjs');
|
|
10
|
+
const require_build_ui_index = require('./index.cjs');
|
|
11
|
+
let node_path = require("node:path");
|
|
12
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
13
|
+
let _module_federation_rsbuild_plugin = require("@module-federation/rsbuild-plugin");
|
|
14
|
+
let _rsbuild_core = require("@rsbuild/core");
|
|
15
|
+
let _rsbuild_plugin_react = require("@rsbuild/plugin-react");
|
|
16
|
+
let _tanstack_router_plugin_rspack = require("@tanstack/router-plugin/rspack");
|
|
17
|
+
|
|
18
|
+
//#region src/build/ui/rsbuild-config.ts
|
|
19
|
+
/**
|
|
20
|
+
* The node environment never owns the routeTree write: the web env's
|
|
21
|
+
* generator produces identical content, and both environments resolve the
|
|
22
|
+
* same on-disk tree. Redirecting the node write to scratch removes the
|
|
23
|
+
* concurrent-writers race on src/routeTree.gen.ts (the generator's
|
|
24
|
+
* "Cannot overwrite" retry noise).
|
|
25
|
+
*/
|
|
26
|
+
const NODE_ROUTE_TREE_SCRATCH = "./node_modules/.cache/manifest-compose/routeTree.node.gen.ts";
|
|
27
|
+
function createUiRsbuildConfig(options) {
|
|
28
|
+
const { workspaceRoot, pkg, role, manifestName, devPort, webEntry, webExposes, nodeEntry, nodeExposes, copy = [], define, routesDirectory } = options;
|
|
29
|
+
const workspaceRootAbsolute = node_path.default.resolve(workspaceRoot);
|
|
30
|
+
const normalizedName = require_identity.containerName(pkg.name);
|
|
31
|
+
const manifestGen = () => require_manifest_plugin.uiManifestGenPlugin({
|
|
32
|
+
workspaceRoot: workspaceRootAbsolute,
|
|
33
|
+
pluginName: manifestName
|
|
34
|
+
});
|
|
35
|
+
const uiSharedDeps = require_shared_deps_spec.createUiSharedDeps({
|
|
36
|
+
role,
|
|
37
|
+
workspaceRoot: workspaceRootAbsolute
|
|
38
|
+
});
|
|
39
|
+
const isBuild = require_build_artifact_names.isBuildInvocation();
|
|
40
|
+
const webEnvironment = {
|
|
41
|
+
plugins: [
|
|
42
|
+
(0, _rsbuild_plugin_react.pluginReact)(),
|
|
43
|
+
manifestGen(),
|
|
44
|
+
(0, _module_federation_rsbuild_plugin.pluginModuleFederation)({
|
|
45
|
+
name: normalizedName,
|
|
46
|
+
filename: require_build_artifact_names.uiEntryFilename({ isBuild }),
|
|
47
|
+
dts: false,
|
|
48
|
+
exposes: webExposes,
|
|
49
|
+
shared: uiSharedDeps
|
|
50
|
+
}, { environment: "web" }),
|
|
51
|
+
...isBuild ? [require_hash_artifacts_plugin.hashArtifactsPlugin({
|
|
52
|
+
entryBase: "remoteEntry",
|
|
53
|
+
distRoot: node_path.default.join(workspaceRootAbsolute, "dist")
|
|
54
|
+
})] : []
|
|
55
|
+
],
|
|
56
|
+
source: {
|
|
57
|
+
entry: { index: webEntry },
|
|
58
|
+
...define ? { define } : {}
|
|
59
|
+
},
|
|
60
|
+
resolve: { alias: { "@": node_path.default.join(workspaceRootAbsolute, "src") } },
|
|
61
|
+
tools: { rspack: (config) => {
|
|
62
|
+
const cssPlugin = config.plugins?.find((p) => p instanceof _rsbuild_core.rspack.CssExtractRspackPlugin);
|
|
63
|
+
if (cssPlugin) {
|
|
64
|
+
cssPlugin.options ??= {};
|
|
65
|
+
cssPlugin.options.chunkFilename = "static/css/async/[name].[contenthash].css";
|
|
66
|
+
}
|
|
67
|
+
Object.assign(config, {
|
|
68
|
+
target: "web",
|
|
69
|
+
output: {
|
|
70
|
+
...config.output,
|
|
71
|
+
publicPath: "auto",
|
|
72
|
+
uniqueName: normalizedName,
|
|
73
|
+
chunkFilename: "static/js/async/[name].[contenthash].js",
|
|
74
|
+
crossOriginLoading: "anonymous"
|
|
75
|
+
},
|
|
76
|
+
resolve: {
|
|
77
|
+
...config.resolve,
|
|
78
|
+
fallback: {
|
|
79
|
+
bufferutil: false,
|
|
80
|
+
"utf-8-validate": false
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
infrastructureLogging: { level: "error" },
|
|
84
|
+
stats: "errors-warnings",
|
|
85
|
+
plugins: [
|
|
86
|
+
...config.plugins ?? [],
|
|
87
|
+
(0, _tanstack_router_plugin_rspack.TanStackRouterRspack)({
|
|
88
|
+
target: "react",
|
|
89
|
+
autoCodeSplitting: true,
|
|
90
|
+
routeFileIgnorePattern: "\\.(test|spec)\\.(ts|tsx)$",
|
|
91
|
+
...routesDirectory ? { routesDirectory } : {}
|
|
92
|
+
}),
|
|
93
|
+
new require_fix_mf_data_uri_plugin.FixMfDataUriPlugin()
|
|
94
|
+
]
|
|
95
|
+
});
|
|
96
|
+
return config;
|
|
97
|
+
} },
|
|
98
|
+
output: {
|
|
99
|
+
distPath: {
|
|
100
|
+
root: node_path.default.join(workspaceRootAbsolute, "dist"),
|
|
101
|
+
css: "static/css",
|
|
102
|
+
js: "static/js"
|
|
103
|
+
},
|
|
104
|
+
assetPrefix: "auto",
|
|
105
|
+
filename: {
|
|
106
|
+
js: "[name].js",
|
|
107
|
+
css: "style.css"
|
|
108
|
+
},
|
|
109
|
+
copy: [...copy, {
|
|
110
|
+
from: node_path.default.join(workspaceRootAbsolute, "src", require_ui_manifest_contract.MANIFEST_FILENAME),
|
|
111
|
+
to: "./"
|
|
112
|
+
}]
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const includeNodeEnv = process.env.BOS_SSR === "1" || process.env.DEPLOY === "true" || process.env.NODE_ENV !== "development";
|
|
116
|
+
const nodeEnvironment = {
|
|
117
|
+
plugins: [
|
|
118
|
+
(0, _rsbuild_plugin_react.pluginReact)(),
|
|
119
|
+
manifestGen(),
|
|
120
|
+
(0, _module_federation_rsbuild_plugin.pluginModuleFederation)({
|
|
121
|
+
name: normalizedName,
|
|
122
|
+
filename: require_build_artifact_names.uiEntryFilename({
|
|
123
|
+
isBuild,
|
|
124
|
+
server: true
|
|
125
|
+
}),
|
|
126
|
+
dts: false,
|
|
127
|
+
exposes: nodeExposes,
|
|
128
|
+
shared: uiSharedDeps
|
|
129
|
+
}, {
|
|
130
|
+
target: "node",
|
|
131
|
+
environment: "node"
|
|
132
|
+
}),
|
|
133
|
+
require_build_ui_index.restoreManifestPublicPath(node_path.default.resolve(workspaceRootAbsolute, "dist", "ssr")),
|
|
134
|
+
...isBuild ? [require_hash_artifacts_plugin.hashArtifactsPlugin({
|
|
135
|
+
entryBase: "remoteEntry.server",
|
|
136
|
+
distRoot: node_path.default.resolve(workspaceRootAbsolute, "dist", "ssr")
|
|
137
|
+
})] : []
|
|
138
|
+
],
|
|
139
|
+
source: { entry: { index: nodeEntry } },
|
|
140
|
+
resolve: { alias: {
|
|
141
|
+
"@": node_path.default.join(workspaceRootAbsolute, "src"),
|
|
142
|
+
"@tanstack/react-devtools": false,
|
|
143
|
+
"@tanstack/react-router-devtools": false
|
|
144
|
+
} },
|
|
145
|
+
tools: { rspack: (config) => {
|
|
146
|
+
Object.assign(config, {
|
|
147
|
+
output: {
|
|
148
|
+
...config.output,
|
|
149
|
+
uniqueName: `${normalizedName}_server`
|
|
150
|
+
},
|
|
151
|
+
resolve: {
|
|
152
|
+
...config.resolve,
|
|
153
|
+
fallback: {
|
|
154
|
+
bufferutil: false,
|
|
155
|
+
"utf-8-validate": false
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
externals: [/^node:/],
|
|
159
|
+
infrastructureLogging: { level: "error" },
|
|
160
|
+
stats: "errors-warnings",
|
|
161
|
+
plugins: [
|
|
162
|
+
...config.plugins ?? [],
|
|
163
|
+
(0, _tanstack_router_plugin_rspack.TanStackRouterRspack)({
|
|
164
|
+
target: "react",
|
|
165
|
+
autoCodeSplitting: false,
|
|
166
|
+
routeFileIgnorePattern: "\\.(test|spec)\\.(ts|tsx)$",
|
|
167
|
+
generatedRouteTree: NODE_ROUTE_TREE_SCRATCH,
|
|
168
|
+
...routesDirectory ? { routesDirectory } : {}
|
|
169
|
+
}),
|
|
170
|
+
new require_fix_mf_data_uri_plugin.FixMfDataUriPlugin()
|
|
171
|
+
]
|
|
172
|
+
});
|
|
173
|
+
return config;
|
|
174
|
+
} },
|
|
175
|
+
output: { distPath: { root: node_path.default.join(workspaceRootAbsolute, "dist", "ssr") } }
|
|
176
|
+
};
|
|
177
|
+
return (0, _rsbuild_core.defineConfig)({
|
|
178
|
+
environments: {
|
|
179
|
+
web: webEnvironment,
|
|
180
|
+
...includeNodeEnv ? { node: nodeEnvironment } : {}
|
|
181
|
+
},
|
|
182
|
+
dev: {
|
|
183
|
+
lazyCompilation: false,
|
|
184
|
+
progressBar: false,
|
|
185
|
+
writeToDisk: true,
|
|
186
|
+
client: { overlay: false }
|
|
187
|
+
},
|
|
188
|
+
server: {
|
|
189
|
+
port: Number(process.env.PORT) || devPort,
|
|
190
|
+
printUrls: ({ urls }) => urls.filter((url) => url.includes("localhost")),
|
|
191
|
+
headers: {
|
|
192
|
+
"Access-Control-Allow-Origin": "*",
|
|
193
|
+
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
|
|
194
|
+
"Access-Control-Allow-Headers": "Content-Type"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
//#endregion
|
|
201
|
+
exports.createUiRsbuildConfig = createUiRsbuildConfig;
|
|
202
|
+
exports.sanitizeContainerName = require_identity.containerName;
|
|
203
|
+
//# sourceMappingURL=rsbuild-config.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsbuild-config.cjs","names":["path","sanitizeContainerName","uiManifestGenPlugin","createUiSharedDeps","isBuildInvocation","pluginReact","pluginModuleFederation","uiEntryFilename","hashArtifactsPlugin","rspack","TanStackRouterRspack","FixMfDataUriPlugin","MANIFEST_FILENAME","restoreManifestPublicPath","defineConfig"],"sources":["../../../src/build/ui/rsbuild-config.ts"],"sourcesContent":["import path from \"node:path\";\nimport { pluginModuleFederation } from \"@module-federation/rsbuild-plugin\";\nimport { defineConfig, type EnvironmentConfig, type RsbuildConfig, rspack } from \"@rsbuild/core\";\nimport { pluginReact } from \"@rsbuild/plugin-react\";\nimport { TanStackRouterRspack } from \"@tanstack/router-plugin/rspack\";\nimport { FixMfDataUriPlugin } from \"../../build/rspack\";\nimport { createUiSharedDeps } from \"../../shared-deps-spec\";\nimport { sanitizeContainerName } from \"../../ui/manifest/contract\";\nimport { isBuildInvocation, uiEntryFilename } from \"../artifact-names\";\nimport { hashArtifactsPlugin } from \"./hash-artifacts-plugin\";\nimport { MANIFEST_FILENAME, restoreManifestPublicPath } from \"./index\";\nimport { uiManifestGenPlugin } from \"./manifest-plugin\";\n\n/**\n * The full dual-environment rsbuild config for a manifest-composed ui source\n * (ADR 0008 §7 — the plugin build contract, not per-plugin config). The core\n * ui and every plugin ui source build from this one factory: `web` emits the\n * browser remote, `node` the commonjs SSR container; shared deps are strict\n * singletons in the given role.\n */\nexport interface UiRsbuildConfigOptions {\n /** the ui source root — contains package.json, src/, and the routes dir */\n workspaceRoot: string;\n /** the ui workspace's package.json (shared-dep version resolution) */\n pkg: {\n name: string;\n version?: string;\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n };\n /** core provides the shared singletons; plugin remotes consume (`import: false`) */\n role: \"provider\" | \"consumer\";\n /** the composition key written into manifest.gen.json (the config-side key) */\n manifestName: string;\n devPort: number;\n webEntry: string;\n webExposes: Record<string, string>;\n nodeEntry: string;\n nodeExposes: Record<string, string>;\n copy?: Array<{\n from: string;\n to: string;\n globOptions?: { ignore?: string[] };\n }>;\n define?: Record<string, string>;\n /** routes dir relative to the rsbuild cwd — folder-form ui sources live at\n * `ui/src/routes` while the build runs from the plugin root */\n routesDirectory?: string;\n}\n\nexport { sanitizeContainerName };\n\n/**\n * The node environment never owns the routeTree write: the web env's\n * generator produces identical content, and both environments resolve the\n * same on-disk tree. Redirecting the node write to scratch removes the\n * concurrent-writers race on src/routeTree.gen.ts (the generator's\n * \"Cannot overwrite\" retry noise).\n */\nconst NODE_ROUTE_TREE_SCRATCH = \"./node_modules/.cache/manifest-compose/routeTree.node.gen.ts\";\n\nexport function createUiRsbuildConfig(options: UiRsbuildConfigOptions): RsbuildConfig {\n const {\n workspaceRoot,\n pkg,\n role,\n manifestName,\n devPort,\n webEntry,\n webExposes,\n nodeEntry,\n nodeExposes,\n copy = [],\n define,\n routesDirectory,\n } = options;\n const workspaceRootAbsolute = path.resolve(workspaceRoot);\n const normalizedName = sanitizeContainerName(pkg.name);\n const manifestGen = () =>\n uiManifestGenPlugin({ workspaceRoot: workspaceRootAbsolute, pluginName: manifestName });\n const uiSharedDeps = createUiSharedDeps({ role, workspaceRoot: workspaceRootAbsolute });\n\n const isBuild = isBuildInvocation();\n\n const webEnvironment: EnvironmentConfig = {\n plugins: [\n pluginReact(),\n manifestGen(),\n pluginModuleFederation(\n {\n name: normalizedName,\n filename: uiEntryFilename({ isBuild }),\n dts: false,\n exposes: webExposes,\n shared: uiSharedDeps,\n },\n { environment: \"web\" },\n ),\n ...(isBuild\n ? [\n hashArtifactsPlugin({\n entryBase: \"remoteEntry\",\n distRoot: path.join(workspaceRootAbsolute, \"dist\"),\n }),\n ]\n : []),\n ],\n source: { entry: { index: webEntry }, ...(define ? { define } : {}) },\n resolve: { alias: { \"@\": path.join(workspaceRootAbsolute, \"src\") } },\n tools: {\n rspack: (config) => {\n const cssPlugin = config.plugins?.find((p) => p instanceof rspack.CssExtractRspackPlugin) as\n | { options?: Record<string, string> }\n | undefined;\n if (cssPlugin) {\n cssPlugin.options ??= {};\n cssPlugin.options.chunkFilename = \"static/css/async/[name].[contenthash].css\";\n }\n Object.assign(config, {\n target: \"web\",\n output: {\n ...config.output,\n publicPath: \"auto\",\n uniqueName: normalizedName,\n chunkFilename: \"static/js/async/[name].[contenthash].js\",\n crossOriginLoading: \"anonymous\",\n },\n resolve: {\n ...config.resolve,\n fallback: { bufferutil: false, \"utf-8-validate\": false },\n },\n infrastructureLogging: { level: \"error\" },\n stats: \"errors-warnings\",\n plugins: [\n ...(config.plugins ?? []),\n TanStackRouterRspack({\n target: \"react\",\n autoCodeSplitting: true,\n routeFileIgnorePattern: \"\\\\.(test|spec)\\\\.(ts|tsx)$\",\n ...(routesDirectory ? { routesDirectory } : {}),\n }),\n new FixMfDataUriPlugin(),\n ],\n });\n return config;\n },\n },\n output: {\n // Absolute: the ui source root owns dist even when the build cwd is the\n // parent plugin workspace (folder-form ui sources).\n distPath: {\n root: path.join(workspaceRootAbsolute, \"dist\"),\n css: \"static/css\",\n js: \"static/js\",\n },\n assetPrefix: \"auto\",\n filename: { js: \"[name].js\", css: \"style.css\" },\n copy: [\n ...copy,\n { from: path.join(workspaceRootAbsolute, \"src\", MANIFEST_FILENAME), to: \"./\" },\n ],\n },\n };\n\n // Dev without SSR skips the node environment: it exists for the host's dev\n // SSR container and nothing else. Builds always emit both.\n const includeNodeEnv =\n process.env.BOS_SSR === \"1\" ||\n process.env.DEPLOY === \"true\" ||\n process.env.NODE_ENV !== \"development\";\n\n const nodeEnvironment: EnvironmentConfig = {\n plugins: [\n pluginReact(),\n manifestGen(),\n pluginModuleFederation(\n {\n name: normalizedName,\n filename: uiEntryFilename({ isBuild, server: true }),\n dts: false,\n exposes: nodeExposes,\n shared: uiSharedDeps,\n },\n { target: \"node\", environment: \"node\" },\n ),\n restoreManifestPublicPath(path.resolve(workspaceRootAbsolute, \"dist\", \"ssr\")),\n ...(isBuild\n ? [\n hashArtifactsPlugin({\n entryBase: \"remoteEntry.server\",\n distRoot: path.resolve(workspaceRootAbsolute, \"dist\", \"ssr\"),\n }),\n ]\n : []),\n ],\n source: { entry: { index: nodeEntry } },\n resolve: {\n alias: {\n \"@\": path.join(workspaceRootAbsolute, \"src\"),\n \"@tanstack/react-devtools\": false,\n \"@tanstack/react-router-devtools\": false,\n },\n },\n tools: {\n rspack: (config) => {\n Object.assign(config, {\n output: { ...config.output, uniqueName: `${normalizedName}_server` },\n resolve: {\n ...config.resolve,\n fallback: { bufferutil: false, \"utf-8-validate\": false },\n },\n externals: [/^node:/],\n infrastructureLogging: { level: \"error\" },\n stats: \"errors-warnings\",\n plugins: [\n ...(config.plugins ?? []),\n TanStackRouterRspack({\n target: \"react\",\n autoCodeSplitting: false,\n routeFileIgnorePattern: \"\\\\.(test|spec)\\\\.(ts|tsx)$\",\n generatedRouteTree: NODE_ROUTE_TREE_SCRATCH,\n ...(routesDirectory ? { routesDirectory } : {}),\n }),\n new FixMfDataUriPlugin(),\n ],\n });\n return config;\n },\n },\n // Absolute, like the web dist above — the node container must land in the\n // ui source root's dist/ssr where the host's local container server looks.\n output: { distPath: { root: path.join(workspaceRootAbsolute, \"dist\", \"ssr\") } },\n };\n\n return defineConfig({\n environments: {\n web: webEnvironment,\n ...(includeNodeEnv ? { node: nodeEnvironment } : {}),\n },\n dev: {\n lazyCompilation: false,\n progressBar: false,\n writeToDisk: true,\n client: { overlay: false },\n },\n server: {\n port: Number(process.env.PORT) || devPort,\n printUrls: ({ urls }) => urls.filter((url) => url.includes(\"localhost\")),\n headers: {\n \"Access-Control-Allow-Origin\": \"*\",\n \"Access-Control-Allow-Methods\": \"GET, POST, OPTIONS\",\n \"Access-Control-Allow-Headers\": \"Content-Type\",\n },\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAM,0BAA0B;AAEhC,SAAgB,sBAAsB,SAAgD;CACpF,MAAM,EACJ,eACA,KACA,MACA,cACA,SACA,UACA,YACA,WACA,aACA,OAAO,CAAC,GACR,QACA,oBACE;CACJ,MAAM,wBAAwBA,kBAAK,QAAQ,aAAa;CACxD,MAAM,iBAAiBC,+BAAsB,IAAI,IAAI;CACrD,MAAM,oBACJC,4CAAoB;EAAE,eAAe;EAAuB,YAAY;CAAa,CAAC;CACxF,MAAM,eAAeC,4CAAmB;EAAE;EAAM,eAAe;CAAsB,CAAC;CAEtF,MAAM,UAAUC,+CAAkB;CAElC,MAAM,iBAAoC;EACxC,SAAS;OACPC,mCAAY;GACZ,YAAY;OACZC,0DACE;IACE,MAAM;IACN,UAAUC,6CAAgB,EAAE,QAAQ,CAAC;IACrC,KAAK;IACL,SAAS;IACT,QAAQ;GACV,GACA,EAAE,aAAa,MAAM,CACvB;GACA,GAAI,UACA,CACEC,kDAAoB;IAClB,WAAW;IACX,UAAUR,kBAAK,KAAK,uBAAuB,MAAM;GACnD,CAAC,CACH,IACA,CAAC;EACP;EACA,QAAQ;GAAE,OAAO,EAAE,OAAO,SAAS;GAAG,GAAI,SAAS,EAAE,OAAO,IAAI,CAAC;EAAG;EACpE,SAAS,EAAE,OAAO,EAAE,KAAKA,kBAAK,KAAK,uBAAuB,KAAK,EAAE,EAAE;EACnE,OAAO,EACL,SAAS,WAAW;GAClB,MAAM,YAAY,OAAO,SAAS,MAAM,MAAM,aAAaS,qBAAO,sBAAsB;GAGxF,IAAI,WAAW;IACb,UAAU,YAAY,CAAC;IACvB,UAAU,QAAQ,gBAAgB;GACpC;GACA,OAAO,OAAO,QAAQ;IACpB,QAAQ;IACR,QAAQ;KACN,GAAG,OAAO;KACV,YAAY;KACZ,YAAY;KACZ,eAAe;KACf,oBAAoB;IACtB;IACA,SAAS;KACP,GAAG,OAAO;KACV,UAAU;MAAE,YAAY;MAAO,kBAAkB;KAAM;IACzD;IACA,uBAAuB,EAAE,OAAO,QAAQ;IACxC,OAAO;IACP,SAAS;KACP,GAAI,OAAO,WAAW,CAAC;SACvBC,qDAAqB;MACnB,QAAQ;MACR,mBAAmB;MACnB,wBAAwB;MACxB,GAAI,kBAAkB,EAAE,gBAAgB,IAAI,CAAC;KAC/C,CAAC;KACD,IAAIC,kDAAmB;IACzB;GACF,CAAC;GACD,OAAO;EACT,EACF;EACA,QAAQ;GAGN,UAAU;IACR,MAAMX,kBAAK,KAAK,uBAAuB,MAAM;IAC7C,KAAK;IACL,IAAI;GACN;GACA,aAAa;GACb,UAAU;IAAE,IAAI;IAAa,KAAK;GAAY;GAC9C,MAAM,CACJ,GAAG,MACH;IAAE,MAAMA,kBAAK,KAAK,uBAAuB,OAAOY,8CAAiB;IAAG,IAAI;GAAK,CAC/E;EACF;CACF;CAIA,MAAM,iBACJ,QAAQ,IAAI,YAAY,OACxB,QAAQ,IAAI,WAAW,UACvB,QAAQ,IAAI,aAAa;CAE3B,MAAM,kBAAqC;EACzC,SAAS;OACPP,mCAAY;GACZ,YAAY;OACZC,0DACE;IACE,MAAM;IACN,UAAUC,6CAAgB;KAAE;KAAS,QAAQ;IAAK,CAAC;IACnD,KAAK;IACL,SAAS;IACT,QAAQ;GACV,GACA;IAAE,QAAQ;IAAQ,aAAa;GAAO,CACxC;GACAM,iDAA0Bb,kBAAK,QAAQ,uBAAuB,QAAQ,KAAK,CAAC;GAC5E,GAAI,UACA,CACEQ,kDAAoB;IAClB,WAAW;IACX,UAAUR,kBAAK,QAAQ,uBAAuB,QAAQ,KAAK;GAC7D,CAAC,CACH,IACA,CAAC;EACP;EACA,QAAQ,EAAE,OAAO,EAAE,OAAO,UAAU,EAAE;EACtC,SAAS,EACP,OAAO;GACL,KAAKA,kBAAK,KAAK,uBAAuB,KAAK;GAC3C,4BAA4B;GAC5B,mCAAmC;EACrC,EACF;EACA,OAAO,EACL,SAAS,WAAW;GAClB,OAAO,OAAO,QAAQ;IACpB,QAAQ;KAAE,GAAG,OAAO;KAAQ,YAAY,GAAG,eAAe;IAAS;IACnE,SAAS;KACP,GAAG,OAAO;KACV,UAAU;MAAE,YAAY;MAAO,kBAAkB;KAAM;IACzD;IACA,WAAW,CAAC,QAAQ;IACpB,uBAAuB,EAAE,OAAO,QAAQ;IACxC,OAAO;IACP,SAAS;KACP,GAAI,OAAO,WAAW,CAAC;SACvBU,qDAAqB;MACnB,QAAQ;MACR,mBAAmB;MACnB,wBAAwB;MACxB,oBAAoB;MACpB,GAAI,kBAAkB,EAAE,gBAAgB,IAAI,CAAC;KAC/C,CAAC;KACD,IAAIC,kDAAmB;IACzB;GACF,CAAC;GACD,OAAO;EACT,EACF;EAGA,QAAQ,EAAE,UAAU,EAAE,MAAMX,kBAAK,KAAK,uBAAuB,QAAQ,KAAK,EAAE,EAAE;CAChF;CAEA,WAAOc,4BAAa;EAClB,cAAc;GACZ,KAAK;GACL,GAAI,iBAAiB,EAAE,MAAM,gBAAgB,IAAI,CAAC;EACpD;EACA,KAAK;GACH,iBAAiB;GACjB,aAAa;GACb,aAAa;GACb,QAAQ,EAAE,SAAS,MAAM;EAC3B;EACA,QAAQ;GACN,MAAM,OAAO,QAAQ,IAAI,IAAI,KAAK;GAClC,YAAY,EAAE,WAAW,KAAK,QAAQ,QAAQ,IAAI,SAAS,WAAW,CAAC;GACvE,SAAS;IACP,+BAA+B;IAC/B,gCAAgC;IAChC,gCAAgC;GAClC;EACF;CACF,CAAC;AACH"}
|