every-plugin 2.10.1 → 3.0.0-rc.10
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 +59 -0
- package/dist/build/rspack/chunk-completeness-plugin.cjs.map +1 -0
- package/dist/build/rspack/chunk-completeness-plugin.mjs +59 -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 +122 -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 +114 -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/client.cjs +69 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +15 -0
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.mts +15 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +68 -0
- package/dist/client.mjs.map +1 -0
- package/dist/dev/host.cjs +149 -0
- package/dist/dev/host.cjs.map +1 -0
- package/dist/dev/host.d.cts +32 -0
- package/dist/dev/host.d.cts.map +1 -0
- package/dist/dev/host.d.mts +32 -0
- package/dist/dev/host.d.mts.map +1 -0
- package/dist/dev/host.mjs +148 -0
- package/dist/dev/host.mjs.map +1 -0
- package/dist/dev/serve.cjs +295 -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 +289 -0
- package/dist/dev/serve.mjs.map +1 -0
- package/dist/dev/watch-kill.cjs +39 -0
- package/dist/dev/watch-kill.cjs.map +1 -0
- package/dist/dev/watch-kill.mjs +38 -0
- package/dist/dev/watch-kill.mjs.map +1 -0
- package/dist/effect-helpers.cjs +23 -0
- package/dist/effect-helpers.cjs.map +1 -0
- package/dist/effect-helpers.d.cts +20 -0
- package/dist/effect-helpers.d.cts.map +1 -0
- package/dist/effect-helpers.d.mts +20 -0
- package/dist/effect-helpers.d.mts.map +1 -0
- package/dist/effect-helpers.mjs +22 -0
- package/dist/effect-helpers.mjs.map +1 -0
- package/dist/errors.cjs +50 -69
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +13 -96
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.mts +13 -96
- package/dist/errors.d.mts.map +1 -1
- package/dist/errors.mjs +16 -34
- package/dist/errors.mjs.map +1 -1
- package/dist/identity.cjs +19 -0
- package/dist/identity.cjs.map +1 -0
- package/dist/identity.d.cts +33 -0
- package/dist/identity.d.cts.map +1 -0
- package/dist/identity.d.mts +33 -0
- package/dist/identity.d.mts.map +1 -0
- package/dist/identity.mjs +16 -0
- package/dist/identity.mjs.map +1 -0
- package/dist/index.cjs +11 -5
- package/dist/index.d.cts +9 -6
- package/dist/index.d.mts +9 -6
- package/dist/index.mjs +7 -4
- package/dist/plugin.cjs +13 -26
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +64 -25
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +64 -25
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +16 -29
- package/dist/plugin.mjs.map +1 -1
- package/dist/remote-entry.cjs +102 -0
- package/dist/remote-entry.cjs.map +1 -0
- package/dist/remote-entry.d.cts +52 -0
- package/dist/remote-entry.d.cts.map +1 -0
- package/dist/remote-entry.d.mts +52 -0
- package/dist/remote-entry.d.mts.map +1 -0
- package/dist/remote-entry.mjs +98 -0
- package/dist/remote-entry.mjs.map +1 -0
- package/dist/runtime/errors.cjs +159 -33
- package/dist/runtime/errors.cjs.map +1 -1
- package/dist/runtime/errors.d.cts +64 -7
- package/dist/runtime/errors.d.cts.map +1 -1
- package/dist/runtime/errors.d.mts +64 -7
- package/dist/runtime/errors.d.mts.map +1 -1
- package/dist/runtime/errors.mjs +154 -30
- package/dist/runtime/errors.mjs.map +1 -1
- package/dist/runtime/index.cjs +95 -23
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.d.cts +16 -0
- package/dist/runtime/index.d.cts.map +1 -1
- package/dist/runtime/index.d.mts +16 -0
- package/dist/runtime/index.d.mts.map +1 -1
- package/dist/runtime/index.mjs +98 -26
- package/dist/runtime/index.mjs.map +1 -1
- package/dist/runtime/mf-config.cjs +3 -78
- package/dist/runtime/mf-config.cjs.map +1 -1
- package/dist/runtime/mf-config.d.cts +3 -49
- package/dist/runtime/mf-config.d.cts.map +1 -1
- package/dist/runtime/mf-config.d.mts +3 -49
- package/dist/runtime/mf-config.d.mts.map +1 -1
- package/dist/runtime/mf-config.mjs +5 -78
- package/dist/runtime/mf-config.mjs.map +1 -1
- package/dist/runtime/services/module-federation.service.cjs +57 -12
- package/dist/runtime/services/module-federation.service.cjs.map +1 -1
- package/dist/runtime/services/module-federation.service.d.cts +4 -13
- package/dist/runtime/services/module-federation.service.d.mts +4 -13
- package/dist/runtime/services/module-federation.service.mjs +57 -14
- package/dist/runtime/services/module-federation.service.mjs.map +1 -1
- package/dist/runtime/services/normalize.cjs +2 -22
- package/dist/runtime/services/normalize.d.cts +2 -21
- package/dist/runtime/services/normalize.d.mts +2 -21
- package/dist/runtime/services/normalize.mjs +2 -21
- package/dist/runtime/services/plugin-lifecycle.service.cjs +9 -11
- package/dist/runtime/services/plugin-lifecycle.service.cjs.map +1 -1
- package/dist/runtime/services/plugin-lifecycle.service.d.cts +3 -16
- package/dist/runtime/services/plugin-lifecycle.service.d.mts +3 -16
- package/dist/runtime/services/plugin-lifecycle.service.mjs +10 -13
- package/dist/runtime/services/plugin-lifecycle.service.mjs.map +1 -1
- package/dist/runtime/services/plugin-loader.service.cjs +59 -30
- package/dist/runtime/services/plugin-loader.service.cjs.map +1 -1
- package/dist/runtime/services/plugin-loader.service.d.cts +6 -53
- package/dist/runtime/services/plugin-loader.service.d.mts +6 -53
- package/dist/runtime/services/plugin-loader.service.mjs +58 -31
- package/dist/runtime/services/plugin-loader.service.mjs.map +1 -1
- package/dist/runtime/services/plugin.service.cjs +10 -12
- package/dist/runtime/services/plugin.service.cjs.map +1 -1
- package/dist/runtime/services/plugin.service.d.cts +14 -36
- package/dist/runtime/services/plugin.service.d.cts.map +1 -1
- package/dist/runtime/services/plugin.service.d.mts +14 -36
- package/dist/runtime/services/plugin.service.d.mts.map +1 -1
- package/dist/runtime/services/plugin.service.mjs +14 -18
- package/dist/runtime/services/plugin.service.mjs.map +1 -1
- package/dist/runtime/services/secrets.service.cjs +12 -12
- package/dist/runtime/services/secrets.service.cjs.map +1 -1
- package/dist/runtime/services/secrets.service.d.cts +3 -15
- package/dist/runtime/services/secrets.service.d.mts +3 -15
- package/dist/runtime/services/secrets.service.mjs +12 -13
- package/dist/runtime/services/secrets.service.mjs.map +1 -1
- package/dist/runtime/services/shared-identity.cjs +40 -0
- package/dist/runtime/services/shared-identity.cjs.map +1 -0
- package/dist/runtime/services/shared-identity.mjs +38 -0
- package/dist/runtime/services/shared-identity.mjs.map +1 -0
- package/dist/runtime/validation.cjs +2 -2
- package/dist/runtime/validation.cjs.map +1 -1
- package/dist/runtime/validation.mjs +2 -2
- package/dist/runtime/validation.mjs.map +1 -1
- package/dist/shared-deps-spec.cjs +384 -0
- package/dist/shared-deps-spec.cjs.map +1 -0
- package/dist/shared-deps-spec.d.cts +182 -0
- package/dist/shared-deps-spec.d.cts.map +1 -0
- package/dist/shared-deps-spec.d.mts +182 -0
- package/dist/shared-deps-spec.d.mts.map +1 -0
- package/dist/shared-deps-spec.mjs +368 -0
- package/dist/shared-deps-spec.mjs.map +1 -0
- package/dist/types.d.cts +47 -41
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +47 -41
- package/dist/types.d.mts.map +1 -1
- package/dist/ui/manifest/construct.cjs +319 -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 +319 -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 +77 -0
- package/dist/version-manifest.cjs.map +1 -0
- package/dist/version-manifest.d.cts +62 -0
- package/dist/version-manifest.d.cts.map +1 -0
- package/dist/version-manifest.d.mts +62 -0
- package/dist/version-manifest.d.mts.map +1 -0
- package/dist/version-manifest.mjs +75 -0
- package/dist/version-manifest.mjs.map +1 -0
- package/package.json +182 -68
- package/skills/plugin-client/SKILL.md +34 -9
- package/skills/plugin-development/SKILL.md +79 -47
- package/skills/plugin-testing/SKILL.md +42 -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 +66 -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 +137 -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/client.ts +111 -0
- package/src/dev/host.ts +235 -0
- package/src/dev/serve.ts +359 -0
- package/src/dev/watch-kill.ts +58 -0
- package/src/effect-helpers.ts +25 -0
- package/src/errors.ts +17 -18
- package/src/identity.ts +36 -0
- package/src/index.ts +13 -0
- package/src/plugin.ts +94 -91
- package/src/remote-entry.ts +170 -0
- package/src/runtime/errors.ts +229 -26
- package/src/runtime/index.ts +132 -43
- package/src/runtime/mf-config.ts +12 -107
- package/src/runtime/services/module-federation.service.ts +218 -117
- package/src/runtime/services/normalize.ts +1 -18
- package/src/runtime/services/plugin-lifecycle.service.ts +66 -75
- package/src/runtime/services/plugin-loader.service.ts +280 -209
- 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 +62 -50
- package/src/ui/manifest/construct.ts +456 -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 +106 -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,75 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
|
|
4
|
+
//#region src/version-manifest.ts
|
|
5
|
+
/**
|
|
6
|
+
* WorkspaceVersionManifest — the immutable per-deploy document at
|
|
7
|
+
* `bundles/<account>/<gateway>/<workspace>/versions/<version>.json`
|
|
8
|
+
* (ADR 0020, as amended; atomic-deploys MAP decision 1). The published
|
|
9
|
+
* config's slot pins this document via its `pin` (`manifest` + the
|
|
10
|
+
* manifest's own SRI); every artifact coordinate lives here, so the config
|
|
11
|
+
* stops growing with artifact kinds and old versions stay fully servable.
|
|
12
|
+
*/
|
|
13
|
+
const SRI = z.string().regex(/^sha384-[A-Za-z0-9+/=]+$/);
|
|
14
|
+
const WorkspaceVersionManifestSchema = z.object({
|
|
15
|
+
version: z.string().regex(/^[0-9a-f]{16}$/),
|
|
16
|
+
builtAt: z.string().optional(),
|
|
17
|
+
gitSha: z.string().optional(),
|
|
18
|
+
entry: z.string().min(1),
|
|
19
|
+
entryIntegrity: SRI,
|
|
20
|
+
ssr: z.object({
|
|
21
|
+
entry: z.string().min(1),
|
|
22
|
+
integrity: SRI
|
|
23
|
+
}).optional(),
|
|
24
|
+
browserManifest: z.object({
|
|
25
|
+
file: z.string().min(1),
|
|
26
|
+
integrity: SRI
|
|
27
|
+
}).optional(),
|
|
28
|
+
/** extra assets (css, icons) — logical name → served-object SRI */
|
|
29
|
+
assets: z.record(z.string(), SRI).optional(),
|
|
30
|
+
/** shared-dependency versions this build was built against */
|
|
31
|
+
shared: z.record(z.string(), z.string()).optional(),
|
|
32
|
+
/**
|
|
33
|
+
* Full per-file digest map of the dist (object path → served-object SRI).
|
|
34
|
+
* Written by `every-plugin`-based deploys so the next deploy can diff against
|
|
35
|
+
* it and skip re-uploading unchanged files; readers that predate the field
|
|
36
|
+
* ignore it (zod strips unknown keys). Participates in the version hash.
|
|
37
|
+
*/
|
|
38
|
+
files: z.record(z.string(), SRI).optional(),
|
|
39
|
+
/**
|
|
40
|
+
* Source archive of the workspace subtree (object path → served-object SRI)
|
|
41
|
+
* published beside the dists when the runtime opts in via
|
|
42
|
+
* `publish.sourcePublish` — lets `bos import` dereference a published
|
|
43
|
+
* config slot to the exact source bytes that build came from, with no
|
|
44
|
+
* GitHub dependency. Readers that predate the field ignore it (zod strips
|
|
45
|
+
* unknown keys). Participates in the version hash.
|
|
46
|
+
*/
|
|
47
|
+
source: z.object({
|
|
48
|
+
file: z.string().min(1),
|
|
49
|
+
integrity: SRI
|
|
50
|
+
}).optional()
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Compose the manifest with its `version` derived from the canonical content
|
|
54
|
+
* of the artifact coordinates alone (key-sorted, `builtAt` excluded) —
|
|
55
|
+
* identical bytes → identical version id regardless of when they were built,
|
|
56
|
+
* so republishing unchanged content is a pointer no-op. Any changed
|
|
57
|
+
* coordinate → a new version (and a new file).
|
|
58
|
+
*/
|
|
59
|
+
function composeVersionManifest(input) {
|
|
60
|
+
const { builtAt: _builtAt, ...hashedInputs } = input;
|
|
61
|
+
const version = createHash("sha256").update(stableStringify(hashedInputs)).digest("hex").slice(0, 16);
|
|
62
|
+
return WorkspaceVersionManifestSchema.parse({
|
|
63
|
+
...input,
|
|
64
|
+
version
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function stableStringify(value) {
|
|
68
|
+
if (Array.isArray(value)) return `[${value.map(stableStringify).join(",")}]`;
|
|
69
|
+
if (value && typeof value === "object") return `{${Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => `${JSON.stringify(k)}:${stableStringify(v)}`).sort().join(",")}}`;
|
|
70
|
+
return JSON.stringify(value) ?? "null";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
export { WorkspaceVersionManifestSchema, composeVersionManifest };
|
|
75
|
+
//# sourceMappingURL=version-manifest.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-manifest.mjs","names":[],"sources":["../src/version-manifest.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { z } from \"zod\";\n\n/**\n * WorkspaceVersionManifest — the immutable per-deploy document at\n * `bundles/<account>/<gateway>/<workspace>/versions/<version>.json`\n * (ADR 0020, as amended; atomic-deploys MAP decision 1). The published\n * config's slot pins this document via its `pin` (`manifest` + the\n * manifest's own SRI); every artifact coordinate lives here, so the config\n * stops growing with artifact kinds and old versions stay fully servable.\n */\n\nconst SRI = z.string().regex(/^sha384-[A-Za-z0-9+/=]+$/);\n\nexport const WorkspaceVersionManifestSchema = z.object({\n version: z.string().regex(/^[0-9a-f]{16}$/),\n builtAt: z.string().optional(),\n gitSha: z.string().optional(),\n entry: z.string().min(1),\n entryIntegrity: SRI,\n ssr: z\n .object({\n entry: z.string().min(1),\n integrity: SRI,\n })\n .optional(),\n browserManifest: z\n .object({\n file: z.string().min(1),\n integrity: SRI,\n })\n .optional(),\n /** extra assets (css, icons) — logical name → served-object SRI */\n assets: z.record(z.string(), SRI).optional(),\n /** shared-dependency versions this build was built against */\n shared: z.record(z.string(), z.string()).optional(),\n /**\n * Full per-file digest map of the dist (object path → served-object SRI).\n * Written by `every-plugin`-based deploys so the next deploy can diff against\n * it and skip re-uploading unchanged files; readers that predate the field\n * ignore it (zod strips unknown keys). Participates in the version hash.\n */\n files: z.record(z.string(), SRI).optional(),\n /**\n * Source archive of the workspace subtree (object path → served-object SRI)\n * published beside the dists when the runtime opts in via\n * `publish.sourcePublish` — lets `bos import` dereference a published\n * config slot to the exact source bytes that build came from, with no\n * GitHub dependency. Readers that predate the field ignore it (zod strips\n * unknown keys). Participates in the version hash.\n */\n source: z\n .object({\n file: z.string().min(1),\n integrity: SRI,\n })\n .optional(),\n});\nexport type WorkspaceVersionManifest = z.infer<typeof WorkspaceVersionManifestSchema>;\n\n/** A published-artifact coordinate: object path within the bundle namespace + its served SRI. */\nexport type SourceRef = NonNullable<WorkspaceVersionManifest[\"source\"]>;\n\nexport interface VersionManifestInput {\n /** Omit: a per-build timestamp makes the same version id map to different\n * manifest bytes per machine, breaking the pin's SRI against the image's\n * staged copy and the CDN's immutability for republished versions. */\n builtAt?: string;\n gitSha?: string;\n entry: string;\n entryIntegrity: string;\n ssr?: { entry: string; integrity: string };\n browserManifest?: { file: string; integrity: string };\n assets?: Record<string, string>;\n shared?: Record<string, string>;\n files?: Record<string, string>;\n source?: { file: string; integrity: string };\n}\n\n/**\n * Compose the manifest with its `version` derived from the canonical content\n * of the artifact coordinates alone (key-sorted, `builtAt` excluded) —\n * identical bytes → identical version id regardless of when they were built,\n * so republishing unchanged content is a pointer no-op. Any changed\n * coordinate → a new version (and a new file).\n */\nexport function composeVersionManifest(input: VersionManifestInput): WorkspaceVersionManifest {\n const { builtAt: _builtAt, ...hashedInputs } = input;\n const version = createHash(\"sha256\")\n .update(stableStringify(hashedInputs))\n .digest(\"hex\")\n .slice(0, 16);\n return WorkspaceVersionManifestSchema.parse({ ...input, version });\n}\n\nfunction stableStringify(value: unknown): string {\n if (Array.isArray(value)) return `[${value.map(stableStringify).join(\",\")}]`;\n if (value && typeof value === \"object\") {\n return `{${Object.entries(value)\n .filter(([, v]) => v !== undefined)\n .map(([k, v]) => `${JSON.stringify(k)}:${stableStringify(v)}`)\n .sort()\n .join(\",\")}}`;\n }\n return JSON.stringify(value) ?? \"null\";\n}\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,0BAA0B;AAEvD,MAAa,iCAAiC,EAAE,OAAO;CACrD,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,gBAAgB;CAC1C,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS;CAC7B,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;CAC5B,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACvB,gBAAgB;CAChB,KAAK,EACF,OAAO;EACN,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EACvB,WAAW;CACb,CAAC,CAAC,CACD,SAAS;CACZ,iBAAiB,EACd,OAAO;EACN,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EACtB,WAAW;CACb,CAAC,CAAC,CACD,SAAS;;CAEZ,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,GAAG,CAAC,CAAC,SAAS;;CAE3C,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS;;;;;;;CAOlD,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,GAAG,CAAC,CAAC,SAAS;;;;;;;;;CAS1C,QAAQ,EACL,OAAO;EACN,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EACtB,WAAW;CACb,CAAC,CAAC,CACD,SAAS;AACd,CAAC;;;;;;;;AA6BD,SAAgB,uBAAuB,OAAuD;CAC5F,MAAM,EAAE,SAAS,UAAU,GAAG,iBAAiB;CAC/C,MAAM,UAAU,WAAW,QAAQ,CAAC,CACjC,OAAO,gBAAgB,YAAY,CAAC,CAAC,CACrC,OAAO,KAAK,CAAC,CACb,MAAM,GAAG,EAAE;CACd,OAAO,+BAA+B,MAAM;EAAE,GAAG;EAAO;CAAQ,CAAC;AACnE;AAEA,SAAS,gBAAgB,OAAwB;CAC/C,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,IAAI,MAAM,IAAI,eAAe,CAAC,CAAC,KAAK,GAAG,EAAE;CAC1E,IAAI,SAAS,OAAO,UAAU,UAC5B,OAAO,IAAI,OAAO,QAAQ,KAAK,CAAC,CAC7B,QAAQ,GAAG,OAAO,MAAM,MAAS,CAAC,CAClC,KAAK,CAAC,GAAG,OAAO,GAAG,KAAK,UAAU,CAAC,EAAE,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAC7D,KAAK,CAAC,CACN,KAAK,GAAG,EAAE;CAEf,OAAO,KAAK,UAAU,KAAK,KAAK;AAClC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "every-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-rc.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -10,122 +10,236 @@
|
|
|
10
10
|
"types": "./dist/index.d.mts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"bun": {
|
|
14
|
+
"types": "./src/index.ts",
|
|
15
|
+
"import": "./src/index.ts"
|
|
16
|
+
},
|
|
13
17
|
"types": "./dist/index.d.mts",
|
|
14
18
|
"import": "./dist/index.mjs",
|
|
15
19
|
"require": "./dist/index.cjs"
|
|
16
20
|
},
|
|
21
|
+
"./client": {
|
|
22
|
+
"bun": {
|
|
23
|
+
"types": "./src/client.ts",
|
|
24
|
+
"import": "./src/client.ts"
|
|
25
|
+
},
|
|
26
|
+
"types": "./dist/client.d.mts",
|
|
27
|
+
"import": "./dist/client.mjs"
|
|
28
|
+
},
|
|
29
|
+
"./identity": {
|
|
30
|
+
"bun": {
|
|
31
|
+
"types": "./src/identity.ts",
|
|
32
|
+
"import": "./src/identity.ts"
|
|
33
|
+
},
|
|
34
|
+
"types": "./dist/identity.d.mts",
|
|
35
|
+
"import": "./dist/identity.mjs",
|
|
36
|
+
"require": "./dist/identity.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./types": {
|
|
39
|
+
"bun": {
|
|
40
|
+
"types": "./src/types.ts",
|
|
41
|
+
"import": "./src/types.ts"
|
|
42
|
+
},
|
|
43
|
+
"types": "./dist/types.d.mts",
|
|
44
|
+
"import": "./dist/types.mjs",
|
|
45
|
+
"require": "./dist/types.cjs"
|
|
46
|
+
},
|
|
47
|
+
"./errors": {
|
|
48
|
+
"bun": {
|
|
49
|
+
"types": "./src/errors.ts",
|
|
50
|
+
"import": "./src/errors.ts"
|
|
51
|
+
},
|
|
52
|
+
"types": "./dist/errors.d.mts",
|
|
53
|
+
"import": "./dist/errors.mjs",
|
|
54
|
+
"require": "./dist/errors.cjs"
|
|
55
|
+
},
|
|
56
|
+
"./remote-entry": {
|
|
57
|
+
"bun": {
|
|
58
|
+
"types": "./src/remote-entry.ts",
|
|
59
|
+
"import": "./src/remote-entry.ts"
|
|
60
|
+
},
|
|
61
|
+
"types": "./dist/remote-entry.d.mts",
|
|
62
|
+
"import": "./dist/remote-entry.mjs",
|
|
63
|
+
"require": "./dist/remote-entry.cjs"
|
|
64
|
+
},
|
|
17
65
|
"./runtime": {
|
|
66
|
+
"bun": {
|
|
67
|
+
"types": "./src/runtime/index.ts",
|
|
68
|
+
"import": "./src/runtime/index.ts"
|
|
69
|
+
},
|
|
18
70
|
"types": "./dist/runtime/index.d.mts",
|
|
19
71
|
"import": "./dist/runtime/index.mjs",
|
|
20
72
|
"require": "./dist/runtime/index.cjs"
|
|
21
73
|
},
|
|
22
|
-
"./testing": {
|
|
23
|
-
"types": "./dist/testing/index.d.mts",
|
|
24
|
-
"import": "./dist/testing/index.mjs",
|
|
25
|
-
"require": "./dist/testing/index.cjs"
|
|
26
|
-
},
|
|
27
74
|
"./normalize": {
|
|
75
|
+
"bun": {
|
|
76
|
+
"types": "./src/runtime/services/normalize.ts",
|
|
77
|
+
"import": "./src/runtime/services/normalize.ts"
|
|
78
|
+
},
|
|
28
79
|
"types": "./dist/runtime/services/normalize.d.mts",
|
|
29
80
|
"import": "./dist/runtime/services/normalize.mjs",
|
|
30
81
|
"require": "./dist/runtime/services/normalize.cjs"
|
|
31
82
|
},
|
|
32
|
-
"./
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
83
|
+
"./shared-deps-spec": {
|
|
84
|
+
"bun": {
|
|
85
|
+
"types": "./src/shared-deps-spec.ts",
|
|
86
|
+
"import": "./src/shared-deps-spec.ts"
|
|
87
|
+
},
|
|
88
|
+
"types": "./dist/shared-deps-spec.d.mts",
|
|
89
|
+
"import": "./dist/shared-deps-spec.mjs",
|
|
90
|
+
"require": "./dist/shared-deps-spec.cjs"
|
|
91
|
+
},
|
|
92
|
+
"./build/rspack": {
|
|
93
|
+
"bun": {
|
|
94
|
+
"types": "./src/build/rspack/index.ts",
|
|
95
|
+
"import": "./src/build/rspack/index.ts"
|
|
96
|
+
},
|
|
97
|
+
"types": "./dist/build/rspack/index.d.mts",
|
|
98
|
+
"import": "./dist/build/rspack/index.mjs",
|
|
99
|
+
"require": "./dist/build/rspack/index.cjs"
|
|
36
100
|
},
|
|
37
|
-
"./
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
101
|
+
"./build/artifact-names": {
|
|
102
|
+
"bun": {
|
|
103
|
+
"types": "./src/build/artifact-names.ts",
|
|
104
|
+
"import": "./src/build/artifact-names.ts"
|
|
105
|
+
},
|
|
106
|
+
"types": "./dist/build/artifact-names.d.mts",
|
|
107
|
+
"import": "./dist/build/artifact-names.mjs",
|
|
108
|
+
"require": "./dist/build/artifact-names.cjs"
|
|
41
109
|
},
|
|
42
|
-
"./
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
110
|
+
"./version-manifest": {
|
|
111
|
+
"bun": {
|
|
112
|
+
"types": "./src/version-manifest.ts",
|
|
113
|
+
"import": "./src/version-manifest.ts"
|
|
114
|
+
},
|
|
115
|
+
"types": "./dist/version-manifest.d.mts",
|
|
116
|
+
"import": "./dist/version-manifest.mjs",
|
|
117
|
+
"require": "./dist/version-manifest.cjs"
|
|
46
118
|
},
|
|
47
|
-
"./
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
119
|
+
"./ui/manifest": {
|
|
120
|
+
"bun": {
|
|
121
|
+
"types": "./src/ui/manifest/index.ts",
|
|
122
|
+
"import": "./src/ui/manifest/index.ts"
|
|
123
|
+
},
|
|
124
|
+
"types": "./dist/ui/manifest/index.d.mts",
|
|
125
|
+
"import": "./dist/ui/manifest/index.mjs",
|
|
126
|
+
"require": "./dist/ui/manifest/index.cjs"
|
|
51
127
|
},
|
|
52
|
-
"./
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
128
|
+
"./ui/manifest-generator": {
|
|
129
|
+
"bun": {
|
|
130
|
+
"types": "./src/ui/manifest/generator.ts",
|
|
131
|
+
"import": "./src/ui/manifest/generator.ts"
|
|
132
|
+
},
|
|
133
|
+
"types": "./dist/ui/manifest/generator.d.mts",
|
|
134
|
+
"import": "./dist/ui/manifest/generator.mjs",
|
|
135
|
+
"require": "./dist/ui/manifest/generator.cjs"
|
|
56
136
|
},
|
|
57
|
-
"./
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
137
|
+
"./ui/manifest/contract": {
|
|
138
|
+
"bun": {
|
|
139
|
+
"types": "./src/ui/manifest/contract.ts",
|
|
140
|
+
"import": "./src/ui/manifest/contract.ts"
|
|
141
|
+
},
|
|
142
|
+
"types": "./dist/ui/manifest/contract.d.mts",
|
|
143
|
+
"import": "./dist/ui/manifest/contract.mjs",
|
|
144
|
+
"require": "./dist/ui/manifest/contract.cjs"
|
|
61
145
|
},
|
|
62
|
-
"./
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
146
|
+
"./build/ui": {
|
|
147
|
+
"bun": {
|
|
148
|
+
"types": "./src/build/ui/index.ts",
|
|
149
|
+
"import": "./src/build/ui/index.ts"
|
|
150
|
+
},
|
|
151
|
+
"types": "./dist/build/ui/index.d.mts",
|
|
152
|
+
"import": "./dist/build/ui/index.mjs",
|
|
153
|
+
"require": "./dist/build/ui/index.cjs"
|
|
66
154
|
},
|
|
67
|
-
"./
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
155
|
+
"./dev-host": {
|
|
156
|
+
"bun": {
|
|
157
|
+
"types": "./src/dev/host.ts",
|
|
158
|
+
"import": "./src/dev/host.ts"
|
|
71
159
|
},
|
|
72
|
-
"
|
|
73
|
-
"
|
|
160
|
+
"types": "./dist/dev/host.d.mts",
|
|
161
|
+
"import": "./dist/dev/host.mjs"
|
|
162
|
+
},
|
|
163
|
+
"./dev-serve": {
|
|
164
|
+
"bun": {
|
|
165
|
+
"types": "./src/dev/serve.ts",
|
|
166
|
+
"import": "./src/dev/serve.ts"
|
|
167
|
+
},
|
|
168
|
+
"types": "./dist/dev/serve.d.mts",
|
|
169
|
+
"import": "./dist/dev/serve.mjs"
|
|
74
170
|
},
|
|
75
171
|
"./package.json": "./package.json"
|
|
76
172
|
},
|
|
173
|
+
"bin": {
|
|
174
|
+
"every-plugin": "./bin/every-plugin.mjs",
|
|
175
|
+
"every-plugin-serve": "./bin/every-plugin-serve.mjs"
|
|
176
|
+
},
|
|
77
177
|
"files": [
|
|
78
178
|
"dist",
|
|
79
179
|
"src",
|
|
180
|
+
"bin",
|
|
80
181
|
"skills",
|
|
81
182
|
"!skills/_artifacts"
|
|
82
183
|
],
|
|
83
184
|
"scripts": {
|
|
84
185
|
"build": "tsdown",
|
|
85
|
-
"
|
|
186
|
+
"exports:sync": "node --import tsx scripts/sync-exports.ts",
|
|
187
|
+
"exports:check": "node --import tsx scripts/sync-exports.ts --check",
|
|
188
|
+
"build:test": "cd tests/fixtures/test-plugin && pnpm run build",
|
|
86
189
|
"test": "vitest run --config vitest.config.ts",
|
|
87
190
|
"test:unit": "vitest run --config vitest.config.ts",
|
|
88
|
-
"test:integration": "
|
|
89
|
-
"test:all": "
|
|
191
|
+
"test:integration": "pnpm run build:test && vitest run --config vitest.integration.config.ts",
|
|
192
|
+
"test:all": "pnpm run test:unit && pnpm run test:integration",
|
|
90
193
|
"test:watch": "vitest --config vitest.config.ts --watch",
|
|
91
194
|
"typecheck": "tsc --noEmit"
|
|
92
195
|
},
|
|
93
196
|
"peerDependencies": {
|
|
94
|
-
"@
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"zod": "
|
|
98
|
-
"@
|
|
99
|
-
"@
|
|
100
|
-
"@
|
|
101
|
-
"@
|
|
102
|
-
"
|
|
103
|
-
"
|
|
197
|
+
"@orpc/contract": "2.0.0-beta.35",
|
|
198
|
+
"@orpc/server": "2.0.0-beta.35",
|
|
199
|
+
"@orpc/tanstack-query": "2.0.0-beta.35",
|
|
200
|
+
"@orpc/zod": "2.0.0-beta.35",
|
|
201
|
+
"@proj-airi/unplugin-drizzle-orm-migrations": "*",
|
|
202
|
+
"@rspack/core": "2.2.8",
|
|
203
|
+
"@tanstack/react-router": "1.170.32",
|
|
204
|
+
"@tanstack/router-generator": "1.167.33",
|
|
205
|
+
"effect": "4.0.0-rc.117",
|
|
206
|
+
"react": "19.2.4",
|
|
207
|
+
"typescript": "^7.0.2",
|
|
208
|
+
"zod": "4.6.5"
|
|
104
209
|
},
|
|
105
210
|
"devDependencies": {
|
|
106
|
-
"@effect/
|
|
107
|
-
"@
|
|
108
|
-
"@orpc/
|
|
109
|
-
"@
|
|
110
|
-
"@rspack/cli": "1.7.11",
|
|
211
|
+
"@effect/vitest": "4.0.0-rc.117",
|
|
212
|
+
"@orpc/client": "2.0.0-beta.35",
|
|
213
|
+
"@orpc/openapi": "2.0.0-beta.35",
|
|
214
|
+
"@rspack/cli": "2.2.6",
|
|
111
215
|
"@tanstack/intent": "^0.3.5",
|
|
112
|
-
"@types/bun": "^1.3.7",
|
|
113
216
|
"@types/node": "^25.1.0",
|
|
217
|
+
"@types/react": "^19.2.7",
|
|
218
|
+
"@types/react-dom": "^19.2.3",
|
|
114
219
|
"@vitest/ui": "4.1.5",
|
|
115
|
-
"bun-types": "^1.3.7",
|
|
116
|
-
"sirv": "^3.0.2",
|
|
117
220
|
"tsdown": "^0.22.0",
|
|
118
221
|
"vite-tsconfig-paths": "^6.0.5",
|
|
119
222
|
"vitest": "^4.1.8"
|
|
120
223
|
},
|
|
121
224
|
"dependencies": {
|
|
122
|
-
"@module-federation/enhanced": "^2.
|
|
123
|
-
"@module-federation/node": "^2.7.
|
|
124
|
-
"@module-federation/
|
|
125
|
-
"@
|
|
126
|
-
"@
|
|
127
|
-
"@orpc/
|
|
128
|
-
"@orpc/
|
|
225
|
+
"@module-federation/enhanced": "^2.9.0",
|
|
226
|
+
"@module-federation/node": "^2.7.50",
|
|
227
|
+
"@module-federation/rsbuild-plugin": "^2.9.0",
|
|
228
|
+
"@module-federation/runtime-core": "^2.9.0",
|
|
229
|
+
"@module-federation/runtime-tools": "^2.9.0",
|
|
230
|
+
"@orpc/client": "2.0.0-beta.35",
|
|
231
|
+
"@orpc/contract": "2.0.0-beta.35",
|
|
232
|
+
"@orpc/experimental-effect": "2.0.0-beta.35",
|
|
233
|
+
"@orpc/openapi": "2.0.0-beta.35",
|
|
234
|
+
"@orpc/publisher": "2.0.0-beta.35",
|
|
235
|
+
"@orpc/server": "2.0.0-beta.35",
|
|
236
|
+
"@orpc/tanstack-query": "2.0.0-beta.35",
|
|
237
|
+
"@rsbuild/core": "2.2.8",
|
|
238
|
+
"@rsbuild/plugin-react": "2.1.0",
|
|
239
|
+
"@tanstack/router-generator": "1.167.33",
|
|
240
|
+
"@tanstack/router-plugin": "1.168.35",
|
|
241
|
+
"sirv": "3.0.2",
|
|
242
|
+
"sonner": ">=2.0.0"
|
|
129
243
|
},
|
|
130
244
|
"keywords": [
|
|
131
245
|
"plugin",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: plugin-client
|
|
3
3
|
description: Connect to and consume deployed everything.dev plugins from an external app, child project, or script. Use when creating API/auth clients, reading runtime config, authenticating with API keys or sessions, or calling plugin routes programmatically.
|
|
4
4
|
metadata:
|
|
5
|
-
sources: "ui/src/lib/api.ts,ui/src/lib/auth.ts,ui/src/app.ts,everything-dev/src/ui/runtime.ts,everything-dev/src/types.ts,host/src/program.ts,host/src/services/auth.ts,
|
|
5
|
+
sources: "ui/src/lib/api.ts,ui/src/lib/auth.ts,ui/src/app.ts,everything-dev/src/ui/runtime.ts,everything-dev/src/types.ts,host/src/program.ts,host/src/services/auth.ts,packages/everything-dev/src/api/auth-middleware.ts"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Plugin Client — Consuming everything.dev APIs
|
|
@@ -60,7 +60,8 @@ import { RPCLink } from "@orpc/client/fetch";
|
|
|
60
60
|
const HOST = "https://dev.everything.dev";
|
|
61
61
|
|
|
62
62
|
const link = new RPCLink({
|
|
63
|
-
|
|
63
|
+
origin: HOST,
|
|
64
|
+
url: "/api/rpc",
|
|
64
65
|
fetch: globalThis.fetch,
|
|
65
66
|
headers: {
|
|
66
67
|
"x-api-key": process.env.EVERYTHING_DEV_API_KEY!,
|
|
@@ -70,6 +71,8 @@ const link = new RPCLink({
|
|
|
70
71
|
const client = createORPCClient(link);
|
|
71
72
|
```
|
|
72
73
|
|
|
74
|
+
`RPCLink` takes `origin` plus a relative `url` — its `url` option is typed as `StandardUrl` (`/${string}`), so a concatenated absolute URL like `url: \`${HOST}/api/rpc\`` fails typechecking at the link boundary.
|
|
75
|
+
|
|
73
76
|
### URL Structure
|
|
74
77
|
|
|
75
78
|
oRPC's RPC protocol encodes the procedure path in the URL segment after the RPC base:
|
|
@@ -114,7 +117,8 @@ Two credential mechanisms:
|
|
|
114
117
|
|
|
115
118
|
```ts
|
|
116
119
|
const link = new RPCLink({
|
|
117
|
-
|
|
120
|
+
origin: HOST,
|
|
121
|
+
url: "/api/rpc",
|
|
118
122
|
fetch: globalThis.fetch,
|
|
119
123
|
headers: { "x-api-key": "edk_xxxxxxxxxxxxxxx" },
|
|
120
124
|
});
|
|
@@ -124,7 +128,8 @@ const link = new RPCLink({
|
|
|
124
128
|
|
|
125
129
|
```ts
|
|
126
130
|
const link = new RPCLink({
|
|
127
|
-
|
|
131
|
+
origin: HOST,
|
|
132
|
+
url: "/api/rpc",
|
|
128
133
|
fetch: (url, options) => fetch(url, { ...options, credentials: "include" }),
|
|
129
134
|
});
|
|
130
135
|
```
|
|
@@ -268,7 +273,8 @@ Pass the key in the `x-api-key` header:
|
|
|
268
273
|
|
|
269
274
|
```ts
|
|
270
275
|
const link = new RPCLink({
|
|
271
|
-
|
|
276
|
+
origin: HOST,
|
|
277
|
+
url: "/api/rpc",
|
|
272
278
|
fetch: globalThis.fetch,
|
|
273
279
|
headers: { "x-api-key": "edk_xxxxxxxxxxxxxxx" },
|
|
274
280
|
});
|
|
@@ -313,7 +319,7 @@ builder.createThing
|
|
|
313
319
|
});
|
|
314
320
|
```
|
|
315
321
|
|
|
316
|
-
See
|
|
322
|
+
See [api-keys](references/api-keys.md) for the full API key route table, permission schema, and management examples.
|
|
317
323
|
|
|
318
324
|
## OpenAPI / REST
|
|
319
325
|
|
|
@@ -392,7 +398,6 @@ export type ApiContract = BaseApiContract & {
|
|
|
392
398
|
### Regeneration Triggers
|
|
393
399
|
|
|
394
400
|
Generated files are gitignored and auto-regenerated on:
|
|
395
|
-
- `bun install` (via postinstall `bos types gen`)
|
|
396
401
|
- `bun typecheck`
|
|
397
402
|
- `bos dev` / `bos build`
|
|
398
403
|
- `bos plugin add` / `bos plugin remove`
|
|
@@ -433,11 +438,11 @@ bos init myapp.everything.dev \
|
|
|
433
438
|
--plugins apps,template
|
|
434
439
|
```
|
|
435
440
|
|
|
436
|
-
This writes `bos.config.json` with `extends`, scaffolds the project, and generates types.
|
|
441
|
+
This writes `bos.config.json` with `extends`, scaffolds the project, and generates types. Afterward, `bun typecheck`, `bos dev`, and `bos build` regenerate types on demand.
|
|
437
442
|
|
|
438
443
|
### What Can Be Overridden
|
|
439
444
|
|
|
440
|
-
Child configs can override `app.ui` (custom UI CDN) and `plugins.<key>` (custom plugin URLs).
|
|
445
|
+
Child configs can override `app.ui` (custom UI CDN) and `plugins.<key>` (custom plugin URLs). Which sections a tenant can customize is controlled per-tenant by the `allow_ui_overrides` and `allow_backend_overrides` flags on the tenant record, resolved by the host from the API's `GET /tenants/bindings` endpoint (cached for 30s).
|
|
441
446
|
|
|
442
447
|
See the `extends-config` skill for deep merge semantics, per-environment extends, and canonical field ordering.
|
|
443
448
|
|
|
@@ -448,3 +453,23 @@ See the `extends-config` skill for deep merge semantics, per-environment extends
|
|
|
448
453
|
- **Not saving the API key secret** — `authClient.apiKey.create()` returns the full key string (`edk_...`) only once. Subsequent calls to `list` or `update` return only the prefix and metadata.
|
|
449
454
|
- **Plugin key vs plugin name confusion** — the client namespace is the `bos.config.json` `plugins` key (e.g., `"apps"`), not the Module Federation `name` field. They often match but are not guaranteed to.
|
|
450
455
|
- **Forgetting to regenerate types** — after adding/removing plugins in `bos.config.json`, run `bos types gen` or restart `bos dev`. Stale `api-types.gen.ts` will have missing or wrong namespace keys.
|
|
456
|
+
|
|
457
|
+
## The tasks you will actually be given
|
|
458
|
+
|
|
459
|
+
**"Call a plugin route from a script"** — create a key in the UI under `/settings/api-keys` (the full `edk_...` secret is shown once — copy it), then use the external `RPCLink` + `x-api-key` snippet from the External / Standalone API Client section above. The procedure path is `POST {hostUrl}/api/rpc/{pluginKey}/{procedure}` — e.g. `client.registry.listRegistryApps({ limit: 24 })`.
|
|
460
|
+
|
|
461
|
+
**"Wire a typed API call into a UI route"** — import `useApiClient` from `@/app`, call `apiClient.<pluginKey>.<procedure>()`. If the namespace key is missing in the types, the plugin was added/removed without regenerating: run `bos types gen` (or restart `pnpm run dev`), never hand-edit `ui/src/lib/api-types.gen.ts`.
|
|
462
|
+
|
|
463
|
+
**"Set up a typed client for another language"** — pull the spec from `GET {hostUrl}/api/spec.json` and run the openapi codegen commands in the OpenAPI / REST section above.
|
|
464
|
+
|
|
465
|
+
## What comes back when it refuses
|
|
466
|
+
|
|
467
|
+
| Error word / shape you see | Meaning | Action |
|
|
468
|
+
|---|---|---|
|
|
469
|
+
| 401 `UNAUTHORIZED` "Authentication required" with `data: { hint: "Sign in or provide an API key" }` | no session cookie and no API key reached the middleware | sign in, or attach `x-api-key: edk_...` |
|
|
470
|
+
| 401 `UNAUTHORIZED` "API key required" with `data: { authType: "apiKey", hint: "Provide a valid API key via x-api-key header" }` | the route is `requireApiKey(...)`-protected and your key was absent — usually `Authorization: Bearer` was used instead | switch to the `x-api-key` header |
|
|
471
|
+
| 403 `FORBIDDEN` "API key lacks permission: <resource>:<action>" with `data: { requiredPermissions, keyPermissions }` | the key's `permissions` map does not cover every required resource/action — partial matches are rejected | re-create (server-side) or update the key with the needed permissions |
|
|
472
|
+
| 403 `FORBIDDEN` "Requires role: ..." / "Requires organization role: ..." | session role gate | sign in with an account holding the role; a key cannot satisfy these |
|
|
473
|
+
| 403 `FORBIDDEN` "Organization requires platform-admin approval" | the org's `status` is not `"active"` | stop — needs platform-admin approval, no client-side fix |
|
|
474
|
+
| `authClient.apiKey.list` / `update` return only `prefix` and metadata | expected — the full secret is returned once at `create` | create a new key; the old secret is unrecoverable |
|
|
475
|
+
| Browser request blocked by CORS despite a valid key | session cookies not sent (`credentials: "include"` missing) or origin not allowed by `CORS_ORIGIN` | add `credentials: "include"` to the fetch wrapper, or fix `CORS_ORIGIN` |
|