@bleedingdev/modern-js-plugin-bff 3.5.0-ultramodern.4 → 3.5.0-ultramodern.41
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/dist/cjs/cli/compress.js +52 -0
- package/dist/cjs/cli/generator.js +149 -0
- package/dist/cjs/cli/prefix.js +50 -0
- package/dist/cjs/cli/watch.js +51 -0
- package/dist/cjs/cli.js +11 -130
- package/dist/cjs/runtime/data-platform/batch/queue.js +284 -0
- package/dist/cjs/runtime/data-platform/batch/request.js +98 -0
- package/dist/cjs/runtime/data-platform/batch/response.js +64 -0
- package/dist/cjs/runtime/data-platform/batch/telemetry.js +67 -0
- package/dist/cjs/runtime/data-platform/batch/url.js +69 -0
- package/dist/cjs/runtime/data-platform/batch-transport.js +59 -0
- package/dist/cjs/runtime/data-platform/codec.js +155 -0
- package/dist/cjs/runtime/data-platform/index.js +30 -633
- package/dist/cjs/runtime/data-platform/invalidation.js +61 -0
- package/dist/cjs/runtime/data-platform/trace.js +73 -0
- package/dist/cjs/runtime/data-platform/types.js +48 -0
- package/dist/cjs/runtime/data-platform/validation.js +178 -0
- package/dist/cjs/runtime/effect/adapter/constants.js +44 -0
- package/dist/cjs/runtime/effect/adapter/cross-project-policy.js +61 -0
- package/dist/cjs/runtime/effect/adapter/entry.js +77 -0
- package/dist/cjs/runtime/effect/adapter/error-response.js +79 -0
- package/dist/cjs/runtime/effect/adapter/handler.js +53 -0
- package/dist/cjs/runtime/effect/adapter.js +20 -154
- package/dist/cjs/runtime/effect/backend-federation/entry.js +99 -0
- package/dist/cjs/runtime/effect/backend-federation/load.js +57 -0
- package/dist/cjs/runtime/effect/backend-federation/plugin.js +53 -0
- package/dist/cjs/runtime/effect/backend-federation/remotes.js +50 -0
- package/dist/cjs/runtime/effect/backend-federation/runtime.js +64 -0
- package/dist/cjs/runtime/effect/backend-federation/types.js +18 -0
- package/dist/cjs/runtime/effect/backend-federation/utils.js +48 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest/errors.js +83 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest/index.js +55 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest/load.js +74 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest/metadata.js +101 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest/reference.js +117 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest/remote.js +68 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest/types.js +18 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest/validation.js +108 -0
- package/dist/cjs/runtime/effect/backend-federation-manifest.js +62 -0
- package/dist/cjs/runtime/effect/backend-federation.js +61 -0
- package/dist/cjs/runtime/effect/dispatch.js +101 -0
- package/dist/cjs/runtime/effect/edge.js +58 -69
- package/dist/cjs/runtime/effect/endpoint-contracts.js +7 -21
- package/dist/cjs/runtime/effect/entry-shape.js +84 -0
- package/dist/cjs/runtime/effect/handler/batch-handler.js +161 -0
- package/dist/cjs/runtime/effect/handler/batch.js +195 -0
- package/dist/cjs/runtime/effect/handler/definition.js +101 -0
- package/dist/cjs/runtime/effect/handler/envelope.js +104 -0
- package/dist/cjs/runtime/effect/handler/http.js +96 -0
- package/dist/cjs/runtime/effect/handler/openapi.js +57 -0
- package/dist/cjs/runtime/effect/handler/routing.js +100 -0
- package/dist/cjs/runtime/effect/handler/rpc.js +63 -0
- package/dist/cjs/runtime/effect/handler/types.js +43 -0
- package/dist/cjs/runtime/effect/handler.js +37 -529
- package/dist/cjs/runtime/effect/index.js +91 -15
- package/dist/cjs/runtime/effect/module.js +23 -80
- package/dist/cjs/runtime/effect/rpcSerialization.js +54 -0
- package/dist/cjs/runtime/effect-client/batch.js +73 -0
- package/dist/cjs/runtime/effect-client/envelope.js +145 -0
- package/dist/cjs/runtime/effect-client/guards.js +44 -0
- package/dist/cjs/runtime/effect-client/index.js +6 -16
- package/dist/cjs/runtime/effect-client/request-context.js +64 -0
- package/dist/cjs/runtime/effect-client/request.js +66 -0
- package/dist/cjs/runtime/effect-client/runtime.js +12 -178
- package/dist/cjs/runtime/effect-client/types.js +18 -0
- package/dist/cjs/runtime/safe-failure.js +2 -1
- package/dist/cjs/utils/client-generator/files.js +152 -0
- package/dist/cjs/utils/client-generator/generate.js +138 -0
- package/dist/cjs/utils/client-generator/index.js +83 -0
- package/dist/cjs/utils/client-generator/package-json.js +132 -0
- package/dist/cjs/utils/client-generator/write-package.js +125 -0
- package/dist/cjs/utils/clientGenerator.js +26 -303
- package/dist/cjs/utils/effect-client-generator/generator.js +64 -0
- package/dist/cjs/utils/effect-client-generator/index.js +51 -0
- package/dist/cjs/utils/effect-client-generator/paths.js +73 -0
- package/dist/cjs/utils/effect-client-generator/rendering.js +231 -0
- package/dist/cjs/utils/effect-client-generator/runtime.js +84 -0
- package/dist/cjs/utils/effect-client-generator/types.js +18 -0
- package/dist/cjs/utils/effectClientGenerator.js +5 -262
- package/dist/esm/cli/compress.mjs +14 -0
- package/dist/esm/cli/generator.mjs +98 -0
- package/dist/esm/cli/prefix.mjs +9 -0
- package/dist/esm/cli/watch.mjs +13 -0
- package/dist/esm/cli.mjs +7 -121
- package/dist/esm/runtime/data-platform/batch/queue.mjs +246 -0
- package/dist/esm/runtime/data-platform/batch/request.mjs +45 -0
- package/dist/esm/runtime/data-platform/batch/response.mjs +23 -0
- package/dist/esm/runtime/data-platform/batch/telemetry.mjs +23 -0
- package/dist/esm/runtime/data-platform/batch/url.mjs +25 -0
- package/dist/esm/runtime/data-platform/batch-transport.mjs +12 -0
- package/dist/esm/runtime/data-platform/codec.mjs +90 -0
- package/dist/esm/runtime/data-platform/index.mjs +6 -610
- package/dist/esm/runtime/data-platform/invalidation.mjs +20 -0
- package/dist/esm/runtime/data-platform/trace.mjs +29 -0
- package/dist/esm/runtime/data-platform/types.mjs +4 -0
- package/dist/esm/runtime/data-platform/validation.mjs +128 -0
- package/dist/esm/runtime/effect/adapter/constants.mjs +6 -0
- package/dist/esm/runtime/effect/adapter/cross-project-policy.mjs +23 -0
- package/dist/esm/runtime/effect/adapter/entry.mjs +29 -0
- package/dist/esm/runtime/effect/adapter/error-response.mjs +41 -0
- package/dist/esm/runtime/effect/adapter/handler.mjs +15 -0
- package/dist/esm/runtime/effect/adapter.mjs +21 -145
- package/dist/esm/runtime/effect/backend-federation/entry.mjs +61 -0
- package/dist/esm/runtime/effect/backend-federation/load.mjs +19 -0
- package/dist/esm/runtime/effect/backend-federation/plugin.mjs +15 -0
- package/dist/esm/runtime/effect/backend-federation/remotes.mjs +12 -0
- package/dist/esm/runtime/effect/backend-federation/runtime.mjs +26 -0
- package/dist/esm/runtime/effect/backend-federation/types.mjs +0 -0
- package/dist/esm/runtime/effect/backend-federation/utils.mjs +7 -0
- package/dist/esm/runtime/effect/backend-federation-manifest/errors.mjs +32 -0
- package/dist/esm/runtime/effect/backend-federation-manifest/index.mjs +4 -0
- package/dist/esm/runtime/effect/backend-federation-manifest/load.mjs +36 -0
- package/dist/esm/runtime/effect/backend-federation-manifest/metadata.mjs +42 -0
- package/dist/esm/runtime/effect/backend-federation-manifest/reference.mjs +76 -0
- package/dist/esm/runtime/effect/backend-federation-manifest/remote.mjs +30 -0
- package/dist/esm/runtime/effect/backend-federation-manifest/types.mjs +0 -0
- package/dist/esm/runtime/effect/backend-federation-manifest/validation.mjs +64 -0
- package/dist/esm/runtime/effect/backend-federation-manifest.mjs +1 -0
- package/dist/esm/runtime/effect/backend-federation.mjs +4 -0
- package/dist/esm/runtime/effect/dispatch.mjs +63 -0
- package/dist/esm/runtime/effect/edge.mjs +17 -63
- package/dist/esm/runtime/effect/endpoint-contracts.mjs +8 -13
- package/dist/esm/runtime/effect/entry-shape.mjs +36 -0
- package/dist/esm/runtime/effect/handler/batch-handler.mjs +123 -0
- package/dist/esm/runtime/effect/handler/batch.mjs +124 -0
- package/dist/esm/runtime/effect/handler/definition.mjs +60 -0
- package/dist/esm/runtime/effect/handler/envelope.mjs +63 -0
- package/dist/esm/runtime/effect/handler/http.mjs +58 -0
- package/dist/esm/runtime/effect/handler/openapi.mjs +19 -0
- package/dist/esm/runtime/effect/handler/routing.mjs +50 -0
- package/dist/esm/runtime/effect/handler/rpc.mjs +22 -0
- package/dist/esm/runtime/effect/handler/types.mjs +5 -0
- package/dist/esm/runtime/effect/handler.mjs +11 -506
- package/dist/esm/runtime/effect/index.mjs +5 -2
- package/dist/esm/runtime/effect/module.mjs +25 -82
- package/dist/esm/runtime/effect/rpcSerialization.mjs +16 -0
- package/dist/esm/runtime/effect-client/batch.mjs +35 -0
- package/dist/esm/runtime/effect-client/envelope.mjs +104 -0
- package/dist/esm/runtime/effect-client/guards.mjs +3 -0
- package/dist/esm/runtime/effect-client/index.mjs +27 -37
- package/dist/esm/runtime/effect-client/request-context.mjs +23 -0
- package/dist/esm/runtime/effect-client/request.mjs +28 -0
- package/dist/esm/runtime/effect-client/runtime.mjs +12 -178
- package/dist/esm/runtime/effect-client/types.mjs +0 -0
- package/dist/esm/runtime/safe-failure.mjs +2 -1
- package/dist/esm/utils/client-generator/files.mjs +68 -0
- package/dist/esm/utils/client-generator/generate.mjs +88 -0
- package/dist/esm/utils/client-generator/index.mjs +4 -0
- package/dist/esm/utils/client-generator/package-json.mjs +78 -0
- package/dist/esm/utils/client-generator/write-package.mjs +74 -0
- package/dist/esm/utils/clientGenerator.mjs +2 -293
- package/dist/esm/utils/effect-client-generator/generator.mjs +23 -0
- package/dist/esm/utils/effect-client-generator/index.mjs +3 -0
- package/dist/esm/utils/effect-client-generator/paths.mjs +25 -0
- package/dist/esm/utils/effect-client-generator/rendering.mjs +180 -0
- package/dist/esm/utils/effect-client-generator/runtime.mjs +33 -0
- package/dist/esm/utils/effect-client-generator/types.mjs +0 -0
- package/dist/esm/utils/effectClientGenerator.mjs +1 -249
- package/dist/esm-node/cli/compress.mjs +15 -0
- package/dist/esm-node/cli/generator.mjs +99 -0
- package/dist/esm-node/cli/prefix.mjs +10 -0
- package/dist/esm-node/cli/watch.mjs +14 -0
- package/dist/esm-node/cli.mjs +7 -121
- package/dist/esm-node/runtime/data-platform/batch/queue.mjs +247 -0
- package/dist/esm-node/runtime/data-platform/batch/request.mjs +46 -0
- package/dist/esm-node/runtime/data-platform/batch/response.mjs +24 -0
- package/dist/esm-node/runtime/data-platform/batch/telemetry.mjs +24 -0
- package/dist/esm-node/runtime/data-platform/batch/url.mjs +26 -0
- package/dist/esm-node/runtime/data-platform/batch-transport.mjs +13 -0
- package/dist/esm-node/runtime/data-platform/codec.mjs +91 -0
- package/dist/esm-node/runtime/data-platform/index.mjs +6 -610
- package/dist/esm-node/runtime/data-platform/invalidation.mjs +21 -0
- package/dist/esm-node/runtime/data-platform/trace.mjs +30 -0
- package/dist/esm-node/runtime/data-platform/types.mjs +5 -0
- package/dist/esm-node/runtime/data-platform/validation.mjs +129 -0
- package/dist/esm-node/runtime/effect/adapter/constants.mjs +7 -0
- package/dist/esm-node/runtime/effect/adapter/cross-project-policy.mjs +24 -0
- package/dist/esm-node/runtime/effect/adapter/entry.mjs +30 -0
- package/dist/esm-node/runtime/effect/adapter/error-response.mjs +42 -0
- package/dist/esm-node/runtime/effect/adapter/handler.mjs +16 -0
- package/dist/esm-node/runtime/effect/adapter.mjs +21 -145
- package/dist/esm-node/runtime/effect/backend-federation/entry.mjs +62 -0
- package/dist/esm-node/runtime/effect/backend-federation/load.mjs +20 -0
- package/dist/esm-node/runtime/effect/backend-federation/plugin.mjs +16 -0
- package/dist/esm-node/runtime/effect/backend-federation/remotes.mjs +13 -0
- package/dist/esm-node/runtime/effect/backend-federation/runtime.mjs +27 -0
- package/dist/esm-node/runtime/effect/backend-federation/types.mjs +1 -0
- package/dist/esm-node/runtime/effect/backend-federation/utils.mjs +8 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest/errors.mjs +33 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest/index.mjs +5 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest/load.mjs +37 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest/metadata.mjs +43 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest/reference.mjs +77 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest/remote.mjs +31 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest/types.mjs +1 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest/validation.mjs +65 -0
- package/dist/esm-node/runtime/effect/backend-federation-manifest.mjs +2 -0
- package/dist/esm-node/runtime/effect/backend-federation.mjs +5 -0
- package/dist/esm-node/runtime/effect/dispatch.mjs +64 -0
- package/dist/esm-node/runtime/effect/edge.mjs +17 -63
- package/dist/esm-node/runtime/effect/endpoint-contracts.mjs +8 -13
- package/dist/esm-node/runtime/effect/entry-shape.mjs +37 -0
- package/dist/esm-node/runtime/effect/handler/batch-handler.mjs +124 -0
- package/dist/esm-node/runtime/effect/handler/batch.mjs +125 -0
- package/dist/esm-node/runtime/effect/handler/definition.mjs +61 -0
- package/dist/esm-node/runtime/effect/handler/envelope.mjs +64 -0
- package/dist/esm-node/runtime/effect/handler/http.mjs +59 -0
- package/dist/esm-node/runtime/effect/handler/openapi.mjs +20 -0
- package/dist/esm-node/runtime/effect/handler/routing.mjs +51 -0
- package/dist/esm-node/runtime/effect/handler/rpc.mjs +23 -0
- package/dist/esm-node/runtime/effect/handler/types.mjs +6 -0
- package/dist/esm-node/runtime/effect/handler.mjs +11 -506
- package/dist/esm-node/runtime/effect/index.mjs +5 -2
- package/dist/esm-node/runtime/effect/module.mjs +25 -82
- package/dist/esm-node/runtime/effect/rpcSerialization.mjs +17 -0
- package/dist/esm-node/runtime/effect-client/batch.mjs +36 -0
- package/dist/esm-node/runtime/effect-client/envelope.mjs +105 -0
- package/dist/esm-node/runtime/effect-client/guards.mjs +4 -0
- package/dist/esm-node/runtime/effect-client/index.mjs +27 -37
- package/dist/esm-node/runtime/effect-client/request-context.mjs +24 -0
- package/dist/esm-node/runtime/effect-client/request.mjs +29 -0
- package/dist/esm-node/runtime/effect-client/runtime.mjs +12 -178
- package/dist/esm-node/runtime/effect-client/types.mjs +1 -0
- package/dist/esm-node/runtime/safe-failure.mjs +2 -1
- package/dist/esm-node/utils/client-generator/files.mjs +69 -0
- package/dist/esm-node/utils/client-generator/generate.mjs +89 -0
- package/dist/esm-node/utils/client-generator/index.mjs +5 -0
- package/dist/esm-node/utils/client-generator/package-json.mjs +79 -0
- package/dist/esm-node/utils/client-generator/write-package.mjs +75 -0
- package/dist/esm-node/utils/clientGenerator.mjs +2 -293
- package/dist/esm-node/utils/effect-client-generator/generator.mjs +24 -0
- package/dist/esm-node/utils/effect-client-generator/index.mjs +4 -0
- package/dist/esm-node/utils/effect-client-generator/paths.mjs +26 -0
- package/dist/esm-node/utils/effect-client-generator/rendering.mjs +181 -0
- package/dist/esm-node/utils/effect-client-generator/runtime.mjs +35 -0
- package/dist/esm-node/utils/effect-client-generator/types.mjs +1 -0
- package/dist/esm-node/utils/effectClientGenerator.mjs +2 -251
- package/dist/types/cli/compress.d.ts +2 -0
- package/dist/types/cli/generator.d.ts +7 -0
- package/dist/types/cli/prefix.d.ts +2 -0
- package/dist/types/cli/watch.d.ts +1 -0
- package/dist/types/cli.d.ts +0 -1
- package/dist/types/runtime/data-platform/batch/queue.d.ts +8 -0
- package/dist/types/runtime/data-platform/batch/request.d.ts +13 -0
- package/dist/types/runtime/data-platform/batch/response.d.ts +3 -0
- package/dist/types/runtime/data-platform/batch/telemetry.d.ts +4 -0
- package/dist/types/runtime/data-platform/batch/url.d.ts +4 -0
- package/dist/types/runtime/data-platform/batch-transport.d.ts +3 -0
- package/dist/types/runtime/data-platform/codec.d.ts +17 -0
- package/dist/types/runtime/data-platform/index.d.ts +7 -191
- package/dist/types/runtime/data-platform/invalidation.d.ts +8 -0
- package/dist/types/runtime/data-platform/trace.d.ts +4 -0
- package/dist/types/runtime/data-platform/types.d.ts +146 -0
- package/dist/types/runtime/data-platform/validation.d.ts +29 -0
- package/dist/types/runtime/effect/adapter/constants.d.ts +1 -0
- package/dist/types/runtime/effect/adapter/cross-project-policy.d.ts +4 -0
- package/dist/types/runtime/effect/adapter/entry.d.ts +2 -0
- package/dist/types/runtime/effect/adapter/error-response.d.ts +2 -0
- package/dist/types/runtime/effect/adapter/handler.d.ts +7 -0
- package/dist/types/runtime/effect/adapter.d.ts +4 -13
- package/dist/types/runtime/effect/backend-federation/entry.d.ts +2 -0
- package/dist/types/runtime/effect/backend-federation/load.d.ts +2 -0
- package/dist/types/runtime/effect/backend-federation/plugin.d.ts +3 -0
- package/dist/types/runtime/effect/backend-federation/remotes.d.ts +2 -0
- package/dist/types/runtime/effect/backend-federation/runtime.d.ts +3 -0
- package/dist/types/runtime/effect/backend-federation/types.d.ts +58 -0
- package/dist/types/runtime/effect/backend-federation/utils.d.ts +2 -0
- package/dist/types/runtime/effect/backend-federation-manifest/errors.d.ts +11 -0
- package/dist/types/runtime/effect/backend-federation-manifest/index.d.ts +6 -0
- package/dist/types/runtime/effect/backend-federation-manifest/load.d.ts +3 -0
- package/dist/types/runtime/effect/backend-federation-manifest/metadata.d.ts +18 -0
- package/dist/types/runtime/effect/backend-federation-manifest/reference.d.ts +3 -0
- package/dist/types/runtime/effect/backend-federation-manifest/remote.d.ts +3 -0
- package/dist/types/runtime/effect/backend-federation-manifest/types.d.ts +51 -0
- package/dist/types/runtime/effect/backend-federation-manifest/validation.d.ts +5 -0
- package/dist/types/runtime/effect/backend-federation-manifest.d.ts +1 -0
- package/dist/types/runtime/effect/backend-federation.d.ts +6 -0
- package/dist/types/runtime/effect/dispatch.d.ts +13 -0
- package/dist/types/runtime/effect/edge.d.ts +8 -8
- package/dist/types/runtime/effect/endpoint-contracts.d.ts +5 -7
- package/dist/types/runtime/effect/entry-shape.d.ts +31 -0
- package/dist/types/runtime/effect/handler/batch-handler.d.ts +11 -0
- package/dist/types/runtime/effect/handler/batch.d.ts +17 -0
- package/dist/types/runtime/effect/handler/definition.d.ts +17 -0
- package/dist/types/runtime/effect/handler/envelope.d.ts +13 -0
- package/dist/types/runtime/effect/handler/http.d.ts +14 -0
- package/dist/types/runtime/effect/handler/openapi.d.ts +4 -0
- package/dist/types/runtime/effect/handler/routing.d.ts +5 -0
- package/dist/types/runtime/effect/handler/rpc.d.ts +7 -0
- package/dist/types/runtime/effect/handler/types.d.ts +148 -0
- package/dist/types/runtime/effect/handler.d.ts +4 -190
- package/dist/types/runtime/effect/index.d.ts +3 -0
- package/dist/types/runtime/effect/module.d.ts +3 -2
- package/dist/types/runtime/effect/rpcSerialization.d.ts +3 -0
- package/dist/types/runtime/effect-client/batch.d.ts +2 -0
- package/dist/types/runtime/effect-client/envelope.d.ts +15 -0
- package/dist/types/runtime/effect-client/guards.d.ts +2 -0
- package/dist/types/runtime/effect-client/index.d.ts +1 -1
- package/dist/types/runtime/effect-client/request-context.d.ts +3 -0
- package/dist/types/runtime/effect-client/request.d.ts +1 -0
- package/dist/types/runtime/effect-client/runtime.d.ts +2 -68
- package/dist/types/runtime/effect-client/types.d.ts +68 -0
- package/dist/types/utils/client-generator/files.d.ts +28 -0
- package/dist/types/utils/client-generator/generate.d.ts +26 -0
- package/dist/types/utils/client-generator/index.d.ts +7 -0
- package/dist/types/utils/client-generator/package-json.d.ts +16 -0
- package/dist/types/utils/client-generator/write-package.d.ts +6 -0
- package/dist/types/utils/clientGenerator.d.ts +2 -37
- package/dist/types/utils/crossProjectServerPolicy.d.ts +3 -2
- package/dist/types/utils/effect-client-generator/generator.d.ts +10 -0
- package/dist/types/utils/effect-client-generator/index.d.ts +4 -0
- package/dist/types/utils/effect-client-generator/paths.d.ts +5 -0
- package/dist/types/utils/effect-client-generator/rendering.d.ts +4 -0
- package/dist/types/utils/effect-client-generator/runtime.d.ts +8 -0
- package/dist/types/utils/effect-client-generator/types.d.ts +26 -0
- package/dist/types/utils/effectClientGenerator.d.ts +2 -41
- package/package.json +35 -29
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { DEFAULT_DATA_BATCH_ENDPOINT } from "../../data-platform/index.mjs";
|
|
3
|
+
function normalizeBatchPath(pathname) {
|
|
4
|
+
if (!pathname || '/' === pathname) return DEFAULT_DATA_BATCH_ENDPOINT;
|
|
5
|
+
if (!pathname.startsWith('/')) return `/${pathname}`;
|
|
6
|
+
return pathname;
|
|
7
|
+
}
|
|
8
|
+
function isPlainObject(value) {
|
|
9
|
+
return 'object' == typeof value && null !== value && !Array.isArray(value);
|
|
10
|
+
}
|
|
11
|
+
function toTextLength(value) {
|
|
12
|
+
if ("u" > typeof TextEncoder) return new TextEncoder().encode(value).length;
|
|
13
|
+
if ("u" > typeof Buffer) return Buffer.byteLength(value);
|
|
14
|
+
return value.length;
|
|
15
|
+
}
|
|
16
|
+
function toHeaderRecord(headers) {
|
|
17
|
+
const record = {};
|
|
18
|
+
headers.forEach((value, key)=>{
|
|
19
|
+
record[key] = value;
|
|
20
|
+
});
|
|
21
|
+
return record;
|
|
22
|
+
}
|
|
23
|
+
function normalizeItemMethod(method) {
|
|
24
|
+
return (method || 'GET').toUpperCase();
|
|
25
|
+
}
|
|
26
|
+
function normalizeBatchAllowedMethods(allowedMethods) {
|
|
27
|
+
const source = Array.isArray(allowedMethods) && allowedMethods.length > 0 ? allowedMethods : [
|
|
28
|
+
'GET'
|
|
29
|
+
];
|
|
30
|
+
return new Set(source.map((method)=>method.toUpperCase()));
|
|
31
|
+
}
|
|
32
|
+
function isBatchRequestPayload(value) {
|
|
33
|
+
return isPlainObject(value) && 1 === value.protocolVersion && 'string' == typeof value.batchId && 'number' == typeof value.sentAt && Array.isArray(value.items);
|
|
34
|
+
}
|
|
35
|
+
function createBatchValidationResponse(message, status = 400) {
|
|
36
|
+
return new Response(JSON.stringify({
|
|
37
|
+
message
|
|
38
|
+
}), {
|
|
39
|
+
status,
|
|
40
|
+
headers: {
|
|
41
|
+
'content-type': 'application/json; charset=utf-8'
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function createJsonValidationResponse(message, status = 400) {
|
|
46
|
+
return new Response(JSON.stringify({
|
|
47
|
+
message
|
|
48
|
+
}), {
|
|
49
|
+
status,
|
|
50
|
+
headers: {
|
|
51
|
+
'content-type': 'application/json; charset=utf-8'
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function cloneWithoutJsonBodyHeaders(request) {
|
|
56
|
+
const headers = new Headers(request.headers);
|
|
57
|
+
headers.delete('content-type');
|
|
58
|
+
headers.delete('content-length');
|
|
59
|
+
return new Request(request.url, {
|
|
60
|
+
method: request.method,
|
|
61
|
+
headers,
|
|
62
|
+
signal: request.signal
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
async function prepareJsonRequestBody(request) {
|
|
66
|
+
const method = normalizeItemMethod(request.method);
|
|
67
|
+
if ('GET' === method || 'HEAD' === method) return request;
|
|
68
|
+
const contentType = (request.headers.get('content-type') || '').toLowerCase();
|
|
69
|
+
if (!contentType.includes('application/json')) return request;
|
|
70
|
+
if (null === request.body) return cloneWithoutJsonBodyHeaders(request);
|
|
71
|
+
try {
|
|
72
|
+
const bodyText = await request.clone().text();
|
|
73
|
+
if ('' === bodyText) return cloneWithoutJsonBodyHeaders(request);
|
|
74
|
+
JSON.parse(bodyText);
|
|
75
|
+
} catch {
|
|
76
|
+
return createJsonValidationResponse('Invalid JSON request body');
|
|
77
|
+
}
|
|
78
|
+
return request;
|
|
79
|
+
}
|
|
80
|
+
function toBatchItemError(id, status, message) {
|
|
81
|
+
return {
|
|
82
|
+
id,
|
|
83
|
+
status,
|
|
84
|
+
headers: {
|
|
85
|
+
'content-type': 'application/json; charset=utf-8'
|
|
86
|
+
},
|
|
87
|
+
body: JSON.stringify({
|
|
88
|
+
message
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function promiseWithTimeout(effect, timeoutMs) {
|
|
93
|
+
if (timeoutMs <= 0) return effect;
|
|
94
|
+
return new Promise((resolve, reject)=>{
|
|
95
|
+
const timer = setTimeout(()=>{
|
|
96
|
+
reject(new Error(`Batch item timeout after ${String(timeoutMs)}ms`));
|
|
97
|
+
}, timeoutMs);
|
|
98
|
+
effect.then((value)=>{
|
|
99
|
+
clearTimeout(timer);
|
|
100
|
+
resolve(value);
|
|
101
|
+
}, (error)=>{
|
|
102
|
+
clearTimeout(timer);
|
|
103
|
+
reject(error);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
async function mapWithConcurrency(items, concurrency, mapper) {
|
|
108
|
+
if (0 === items.length) return [];
|
|
109
|
+
const normalizedConcurrency = Math.max(1, concurrency);
|
|
110
|
+
const output = new Array(items.length);
|
|
111
|
+
let index = 0;
|
|
112
|
+
const workers = Array.from({
|
|
113
|
+
length: Math.min(normalizedConcurrency, items.length)
|
|
114
|
+
}, async ()=>{
|
|
115
|
+
while(true){
|
|
116
|
+
const currentIndex = index;
|
|
117
|
+
index += 1;
|
|
118
|
+
if (currentIndex >= items.length) return;
|
|
119
|
+
output[currentIndex] = await mapper(items[currentIndex], currentIndex);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
await Promise.all(workers);
|
|
123
|
+
return output;
|
|
124
|
+
}
|
|
125
|
+
export { createBatchValidationResponse, isBatchRequestPayload, isPlainObject, mapWithConcurrency, normalizeBatchAllowedMethods, normalizeBatchPath, normalizeItemMethod, prepareJsonRequestBody, promiseWithTimeout, toBatchItemError, toHeaderRecord, toTextLength };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { EFFECT_VALIDATOR_AWARE_FACTORY } from "../entry-shape.mjs";
|
|
3
|
+
import { mergeDataPlatformOptions } from "./envelope.mjs";
|
|
4
|
+
import { createHttpApiHandler } from "./http.mjs";
|
|
5
|
+
import { createRpcApiHandler } from "./rpc.mjs";
|
|
6
|
+
function defineEffectBff(definition) {
|
|
7
|
+
const createHandler = (options)=>{
|
|
8
|
+
const rpcDefinition = definition.rpc;
|
|
9
|
+
let mergedRpcOptions = rpcDefinition;
|
|
10
|
+
if (rpcDefinition && options?.rpc) mergedRpcOptions = {
|
|
11
|
+
...rpcDefinition,
|
|
12
|
+
...options.rpc
|
|
13
|
+
};
|
|
14
|
+
return createHttpApiHandler({
|
|
15
|
+
api: definition.api,
|
|
16
|
+
layer: definition.layer,
|
|
17
|
+
openapi: options?.openapi,
|
|
18
|
+
rpc: mergedRpcOptions,
|
|
19
|
+
dataPlatform: mergeDataPlatformOptions(definition.dataPlatform, options?.dataPlatform),
|
|
20
|
+
validateRequest: options?.validateRequest
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(createHandler, EFFECT_VALIDATOR_AWARE_FACTORY, {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
const client = createLoaderMaterializedClientPlaceholder();
|
|
27
|
+
return {
|
|
28
|
+
...definition,
|
|
29
|
+
createHandler,
|
|
30
|
+
client
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const LOADER_CLIENT_IGNORED_KEYS = new Set([
|
|
34
|
+
'then',
|
|
35
|
+
'catch',
|
|
36
|
+
'finally',
|
|
37
|
+
'toJSON',
|
|
38
|
+
'$$typeof'
|
|
39
|
+
]);
|
|
40
|
+
function createLoaderMaterializedClientPlaceholder() {
|
|
41
|
+
const explain = (property)=>{
|
|
42
|
+
throw new Error(`[BFF][Effect] client.${String(property)} is not available here: the typed client only exists when the API entry is imported through the "@api/index" transformed path (the BFF loader replaces it with generated client code). On the server, use HttpApiClient or call the Effect layer directly.`);
|
|
43
|
+
};
|
|
44
|
+
return new Proxy(Object.create(null), {
|
|
45
|
+
get (_target, property) {
|
|
46
|
+
if ('symbol' == typeof property || LOADER_CLIENT_IGNORED_KEYS.has(property)) return;
|
|
47
|
+
return explain(property);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function defineEffectRpcBff(definition) {
|
|
52
|
+
const createHandler = (options)=>createRpcApiHandler({
|
|
53
|
+
...definition,
|
|
54
|
+
...options
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
...definition,
|
|
58
|
+
createHandler
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export { defineEffectBff, defineEffectRpcBff };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { DEFAULT_DATA_ENVELOPE_HEADER, decodeRequestEnvelopeHeader, validateRequestEnvelope, validateSelectionPlan } from "../../data-platform/index.mjs";
|
|
3
|
+
import { getExpectedEnvelopeOrigin } from "./routing.mjs";
|
|
4
|
+
function createInvalidEnvelopeResponse(message, errors) {
|
|
5
|
+
return new Response(JSON.stringify({
|
|
6
|
+
message,
|
|
7
|
+
...errors && errors.length > 0 ? {
|
|
8
|
+
errors
|
|
9
|
+
} : {}
|
|
10
|
+
}), {
|
|
11
|
+
status: 400,
|
|
12
|
+
headers: {
|
|
13
|
+
'content-type': 'application/json; charset=utf-8'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function validateDataPlatformRequestEnvelope(request, options) {
|
|
18
|
+
const isEnabled = options?.enabled ?? true;
|
|
19
|
+
if (!isEnabled) return null;
|
|
20
|
+
const envelopeHeader = options?.envelopeHeader || DEFAULT_DATA_ENVELOPE_HEADER;
|
|
21
|
+
const encodedEnvelope = request.headers.get(envelopeHeader);
|
|
22
|
+
if (!encodedEnvelope) {
|
|
23
|
+
if (options?.requireEnvelope) return createInvalidEnvelopeResponse(`Missing required data envelope header: ${envelopeHeader}`);
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const envelope = decodeRequestEnvelopeHeader(encodedEnvelope);
|
|
27
|
+
if (!envelope) return createInvalidEnvelopeResponse(`Invalid data envelope header format: ${envelopeHeader}`);
|
|
28
|
+
const validation = validateRequestEnvelope(envelope, {
|
|
29
|
+
expectedProtocolVersion: 1,
|
|
30
|
+
expectedNamespace: options?.expectedNamespace,
|
|
31
|
+
expectedOrigin: options?.validateOrigin === false ? void 0 : getExpectedEnvelopeOrigin(request),
|
|
32
|
+
requireTraceContext: options?.requireTraceContext
|
|
33
|
+
});
|
|
34
|
+
if (!validation.ok) return createInvalidEnvelopeResponse('Invalid data envelope', validation.errors);
|
|
35
|
+
if (envelope.selectionPlan) {
|
|
36
|
+
const selectionValidation = validateSelectionPlan(envelope.selectionPlan, {
|
|
37
|
+
maxDepth: options?.selection?.maxDepth,
|
|
38
|
+
maxFields: options?.selection?.maxFields,
|
|
39
|
+
allowedLeafPaths: options?.selection?.allowedLeafPaths
|
|
40
|
+
});
|
|
41
|
+
if (!selectionValidation.ok) return createInvalidEnvelopeResponse('Invalid data envelope selection plan', selectionValidation.errors);
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
function mergeDataPlatformOptions(base, override) {
|
|
46
|
+
if (!base && !override) return;
|
|
47
|
+
const baseSelection = base?.selection;
|
|
48
|
+
const overrideSelection = override?.selection;
|
|
49
|
+
const baseBatch = base?.batch;
|
|
50
|
+
const overrideBatch = override?.batch;
|
|
51
|
+
return {
|
|
52
|
+
...base,
|
|
53
|
+
...override,
|
|
54
|
+
selection: baseSelection || overrideSelection ? {
|
|
55
|
+
...baseSelection,
|
|
56
|
+
...overrideSelection
|
|
57
|
+
} : void 0,
|
|
58
|
+
batch: baseBatch || overrideBatch ? {
|
|
59
|
+
...baseBatch,
|
|
60
|
+
...overrideBatch
|
|
61
|
+
} : void 0
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export { mergeDataPlatformOptions, validateDataPlatformRequestEnvelope };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { HttpRouter, HttpServer } from "effect/unstable/http";
|
|
3
|
+
import { prepareJsonRequestBody } from "./batch.mjs";
|
|
4
|
+
import { createDataPlatformBatchRequestHandler } from "./batch-handler.mjs";
|
|
5
|
+
import { validateDataPlatformRequestEnvelope } from "./envelope.mjs";
|
|
6
|
+
import { createOpenApiLayer } from "./openapi.mjs";
|
|
7
|
+
import { getRequestPathname, isRpcRequest } from "./routing.mjs";
|
|
8
|
+
import { createRpcApiHandler, normalizeRpcPath } from "./rpc.mjs";
|
|
9
|
+
import { toEffectServiceContext } from "./types.mjs";
|
|
10
|
+
import * as __rspack_external_effect_Layer_69c46453 from "effect/Layer";
|
|
11
|
+
function createHttpApiHandler(options) {
|
|
12
|
+
const apiLayer = options.layer.pipe(__rspack_external_effect_Layer_69c46453.provide(HttpServer.layerServices));
|
|
13
|
+
const openApiLayer = createOpenApiLayer(options.api, options.openapi);
|
|
14
|
+
const mergedLayer = openApiLayer ? __rspack_external_effect_Layer_69c46453.mergeAll(apiLayer, openApiLayer) : apiLayer;
|
|
15
|
+
const httpApiHandler = HttpRouter.toWebHandler(mergedLayer);
|
|
16
|
+
const withDataPlatformValidation = async (request, context)=>{
|
|
17
|
+
const policyDenial = options.validateRequest?.(request);
|
|
18
|
+
if (policyDenial) return policyDenial;
|
|
19
|
+
const preparedRequest = await prepareJsonRequestBody(request);
|
|
20
|
+
if (preparedRequest instanceof Response) return preparedRequest;
|
|
21
|
+
const validationError = validateDataPlatformRequestEnvelope(preparedRequest, options.dataPlatform);
|
|
22
|
+
if (validationError) return validationError;
|
|
23
|
+
return httpApiHandler.handler(preparedRequest, toEffectServiceContext(context));
|
|
24
|
+
};
|
|
25
|
+
const batchHandler = createDataPlatformBatchRequestHandler({
|
|
26
|
+
dataPlatform: options.dataPlatform,
|
|
27
|
+
handleItem: withDataPlatformValidation
|
|
28
|
+
});
|
|
29
|
+
const handleHttpApiRequest = async (request, context)=>{
|
|
30
|
+
const pathname = getRequestPathname(request);
|
|
31
|
+
if (batchHandler.enabled && pathname === batchHandler.path) return batchHandler.handle(request, context);
|
|
32
|
+
return withDataPlatformValidation(request, context);
|
|
33
|
+
};
|
|
34
|
+
if (!options.rpc) return {
|
|
35
|
+
handler: handleHttpApiRequest,
|
|
36
|
+
dispose: async ()=>{
|
|
37
|
+
await httpApiHandler.dispose();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const rpcPath = normalizeRpcPath(options.rpc.path);
|
|
41
|
+
const rpcHandler = createRpcApiHandler(options.rpc);
|
|
42
|
+
return {
|
|
43
|
+
handler: async (request, context)=>{
|
|
44
|
+
if (isRpcRequest(request, rpcPath)) {
|
|
45
|
+
const policyDenial = options.validateRequest?.(request);
|
|
46
|
+
if (policyDenial) return policyDenial;
|
|
47
|
+
return rpcHandler.handler(request, toEffectServiceContext(context));
|
|
48
|
+
}
|
|
49
|
+
return handleHttpApiRequest(request, context);
|
|
50
|
+
},
|
|
51
|
+
dispose: async ()=>{
|
|
52
|
+
await Promise.all([
|
|
53
|
+
httpApiHandler.dispose(),
|
|
54
|
+
rpcHandler.dispose()
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export { createHttpApiHandler };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { HttpRouter, HttpServerResponse } from "effect/unstable/http";
|
|
3
|
+
import { OpenApi } from "effect/unstable/httpapi";
|
|
4
|
+
function normalizeOpenApiPath(pathname) {
|
|
5
|
+
if (!pathname.startsWith('/')) return `/${pathname}`;
|
|
6
|
+
return pathname;
|
|
7
|
+
}
|
|
8
|
+
function getOpenApiOptions(openapi) {
|
|
9
|
+
if (!openapi || 'object' != typeof openapi) return;
|
|
10
|
+
if (!openapi.path) return;
|
|
11
|
+
return {
|
|
12
|
+
path: normalizeOpenApiPath(openapi.path)
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function createOpenApiLayer(api, openapi) {
|
|
16
|
+
const openApiOptions = getOpenApiOptions(openapi);
|
|
17
|
+
if (!openApiOptions) return null;
|
|
18
|
+
return HttpRouter.add('GET', openApiOptions.path, HttpServerResponse.jsonUnsafe(OpenApi.fromApi(api)));
|
|
19
|
+
}
|
|
20
|
+
export { createOpenApiLayer };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { isPlainObject } from "./batch.mjs";
|
|
3
|
+
function getRequestPathname(request) {
|
|
4
|
+
try {
|
|
5
|
+
return new URL(request.url).pathname;
|
|
6
|
+
} catch {
|
|
7
|
+
return new URL(request.url, 'http://localhost').pathname;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function normalizeMountPrefix(prefix) {
|
|
11
|
+
if (!prefix || '/' === prefix) return '';
|
|
12
|
+
return prefix.endsWith('/') ? prefix.slice(0, -1) : prefix;
|
|
13
|
+
}
|
|
14
|
+
function getMountedPrefixFromContext(request, context) {
|
|
15
|
+
if (!isPlainObject(context) || 'string' != typeof context.path) return '';
|
|
16
|
+
const contextPath = normalizeMountPrefix(context.path);
|
|
17
|
+
const requestPath = normalizeMountPrefix(getRequestPathname(request));
|
|
18
|
+
if (!contextPath || !requestPath || contextPath === requestPath || !contextPath.endsWith(requestPath)) return '';
|
|
19
|
+
return normalizeMountPrefix(contextPath.slice(0, contextPath.length - requestPath.length));
|
|
20
|
+
}
|
|
21
|
+
function removeMountedPrefixFromBatchPath(pathWithQuery, prefix) {
|
|
22
|
+
const normalizedPrefix = normalizeMountPrefix(prefix);
|
|
23
|
+
if (!normalizedPrefix) return pathWithQuery;
|
|
24
|
+
const [pathname, ...queryParts] = pathWithQuery.split('?');
|
|
25
|
+
if (!pathname) return pathWithQuery;
|
|
26
|
+
let nextPathname = pathname;
|
|
27
|
+
if (pathname === normalizedPrefix) nextPathname = '/';
|
|
28
|
+
else if (pathname.startsWith(`${normalizedPrefix}/`)) {
|
|
29
|
+
const sliced = pathname.slice(normalizedPrefix.length);
|
|
30
|
+
nextPathname = sliced.startsWith('/') ? sliced : `/${sliced}`;
|
|
31
|
+
}
|
|
32
|
+
if (0 === queryParts.length) return nextPathname;
|
|
33
|
+
return `${nextPathname}?${queryParts.join('?')}`;
|
|
34
|
+
}
|
|
35
|
+
function getRequestOrigin(request) {
|
|
36
|
+
try {
|
|
37
|
+
return new URL(request.url).origin;
|
|
38
|
+
} catch {
|
|
39
|
+
return new URL(request.url, 'http://localhost').origin;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function getExpectedEnvelopeOrigin(request) {
|
|
43
|
+
const origin = request.headers.get('origin');
|
|
44
|
+
if (origin && 'null' !== origin) return origin;
|
|
45
|
+
return getRequestOrigin(request);
|
|
46
|
+
}
|
|
47
|
+
function isRpcRequest(request, rpcPath) {
|
|
48
|
+
const pathname = getRequestPathname(request);
|
|
49
|
+
return pathname === rpcPath || pathname.startsWith(`${rpcPath}/`);
|
|
50
|
+
}
|
|
51
|
+
export { getExpectedEnvelopeOrigin, getMountedPrefixFromContext, getRequestPathname, isRpcRequest, removeMountedPrefixFromBatchPath };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { HttpRouter } from "effect/unstable/http";
|
|
3
|
+
import { RpcServer } from "effect/unstable/rpc";
|
|
4
|
+
import { getRpcSerializationLayer } from "../rpcSerialization.mjs";
|
|
5
|
+
import * as __rspack_external_effect_Layer_69c46453 from "effect/Layer";
|
|
6
|
+
function normalizeRpcPath(pathname) {
|
|
7
|
+
if (!pathname || '/' === pathname) return '/rpc';
|
|
8
|
+
if (!pathname.startsWith('/')) return `/${pathname}`;
|
|
9
|
+
return pathname;
|
|
10
|
+
}
|
|
11
|
+
function createRpcApiHandler(options) {
|
|
12
|
+
const rpcPath = normalizeRpcPath(options.path);
|
|
13
|
+
const rpcLayer = __rspack_external_effect_Layer_69c46453.provide(RpcServer.layerHttp({
|
|
14
|
+
group: options.group,
|
|
15
|
+
path: rpcPath,
|
|
16
|
+
protocol: 'http',
|
|
17
|
+
disableTracing: options.disableTracing,
|
|
18
|
+
spanPrefix: options.spanPrefix,
|
|
19
|
+
spanAttributes: options.spanAttributes
|
|
20
|
+
}), __rspack_external_effect_Layer_69c46453.mergeAll(options.layer, getRpcSerializationLayer(options.serialization)));
|
|
21
|
+
return HttpRouter.toWebHandler(rpcLayer);
|
|
22
|
+
}
|
|
23
|
+
export { createRpcApiHandler, normalizeRpcPath };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import * as __rspack_external_effect_Context_b3520bd3 from "effect/Context";
|
|
3
|
+
const emptyEffectServiceContext = __rspack_external_effect_Context_b3520bd3.empty();
|
|
4
|
+
const isEffectServiceContext = (context)=>'object' == typeof context && null !== context && 'mapUnsafe' in context;
|
|
5
|
+
const toEffectServiceContext = (context)=>isEffectServiceContext(context) ? context : emptyEffectServiceContext;
|
|
6
|
+
export { toEffectServiceContext };
|