@bleedingdev/modern-js-bff-effect 3.8.3-ultramodern.2
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/LICENSE +21 -0
- package/README.md +25 -0
- package/dist/cjs/data-platform/batch/protocol.js +130 -0
- package/dist/cjs/data-platform/batch/queue.js +623 -0
- package/dist/cjs/data-platform/batch/request.js +121 -0
- package/dist/cjs/data-platform/batch/response.js +65 -0
- package/dist/cjs/data-platform/batch/telemetry.js +71 -0
- package/dist/cjs/data-platform/batch/url.js +69 -0
- package/dist/cjs/data-platform/batch-transport.js +59 -0
- package/dist/cjs/data-platform/codec.js +155 -0
- package/dist/cjs/data-platform/index.js +124 -0
- package/dist/cjs/data-platform/invalidation.js +61 -0
- package/dist/cjs/data-platform/trace.js +73 -0
- package/dist/cjs/data-platform/types.js +48 -0
- package/dist/cjs/data-platform/validation.js +178 -0
- package/dist/cjs/effect/context.js +59 -0
- package/dist/cjs/effect/dispatch.js +101 -0
- package/dist/cjs/effect/edge-context.js +61 -0
- package/dist/cjs/effect/edge-dispatcher.js +354 -0
- package/dist/cjs/effect/edge.js +62 -0
- package/dist/cjs/effect/endpoint-contracts.js +121 -0
- package/dist/cjs/effect/entry-shape-registry.js +31 -0
- package/dist/cjs/effect/entry-shape.js +113 -0
- package/dist/cjs/effect/handler/batch-handler.js +270 -0
- package/dist/cjs/effect/handler/batch.js +170 -0
- package/dist/cjs/effect/handler/definition.js +99 -0
- package/dist/cjs/effect/handler/envelope.js +104 -0
- package/dist/cjs/effect/handler/http.js +107 -0
- package/dist/cjs/effect/handler/openapi.js +58 -0
- package/dist/cjs/effect/handler/routing.js +100 -0
- package/dist/cjs/effect/handler/rpc.js +63 -0
- package/dist/cjs/effect/handler/types.js +43 -0
- package/dist/cjs/effect/handler.js +173 -0
- package/dist/cjs/effect/index.js +137 -0
- package/dist/cjs/effect/module.js +118 -0
- package/dist/cjs/effect/operation-context.js +116 -0
- package/dist/cjs/effect/rpcSerialization.js +54 -0
- package/dist/cjs/effect-client/batch.js +73 -0
- package/dist/cjs/effect-client/envelope.js +145 -0
- package/dist/cjs/effect-client/guards.js +44 -0
- package/dist/cjs/effect-client/index.js +208 -0
- package/dist/cjs/effect-client/request-context.js +64 -0
- package/dist/cjs/effect-client/request.js +66 -0
- package/dist/cjs/effect-client/runtime.js +100 -0
- package/dist/cjs/effect-client/types.js +18 -0
- package/dist/cjs/headers.js +46 -0
- package/dist/cjs/index.js +83 -0
- package/dist/esm/data-platform/batch/protocol.mjs +71 -0
- package/dist/esm/data-platform/batch/queue.mjs +582 -0
- package/dist/esm/data-platform/batch/request.mjs +68 -0
- package/dist/esm/data-platform/batch/response.mjs +24 -0
- package/dist/esm/data-platform/batch/telemetry.mjs +27 -0
- package/dist/esm/data-platform/batch/url.mjs +25 -0
- package/dist/esm/data-platform/batch-transport.mjs +12 -0
- package/dist/esm/data-platform/codec.mjs +90 -0
- package/dist/esm/data-platform/index.mjs +7 -0
- package/dist/esm/data-platform/invalidation.mjs +20 -0
- package/dist/esm/data-platform/trace.mjs +29 -0
- package/dist/esm/data-platform/types.mjs +4 -0
- package/dist/esm/data-platform/validation.mjs +128 -0
- package/dist/esm/effect/context.mjs +12 -0
- package/dist/esm/effect/dispatch.mjs +63 -0
- package/dist/esm/effect/edge-context.mjs +14 -0
- package/dist/esm/effect/edge-dispatcher.mjs +115 -0
- package/dist/esm/effect/edge.mjs +1 -0
- package/dist/esm/effect/endpoint-contracts.mjs +68 -0
- package/dist/esm/effect/entry-shape-registry.mjs +17 -0
- package/dist/esm/effect/entry-shape.mjs +51 -0
- package/dist/esm/effect/handler/batch-handler.mjs +232 -0
- package/dist/esm/effect/handler/batch.mjs +105 -0
- package/dist/esm/effect/handler/definition.mjs +58 -0
- package/dist/esm/effect/handler/envelope.mjs +63 -0
- package/dist/esm/effect/handler/http.mjs +69 -0
- package/dist/esm/effect/handler/openapi.mjs +20 -0
- package/dist/esm/effect/handler/routing.mjs +50 -0
- package/dist/esm/effect/handler/rpc.mjs +22 -0
- package/dist/esm/effect/handler/types.mjs +5 -0
- package/dist/esm/effect/handler.mjs +13 -0
- package/dist/esm/effect/index.mjs +7 -0
- package/dist/esm/effect/module.mjs +80 -0
- package/dist/esm/effect/operation-context.mjs +75 -0
- package/dist/esm/effect/rpcSerialization.mjs +16 -0
- package/dist/esm/effect-client/batch.mjs +35 -0
- package/dist/esm/effect-client/envelope.mjs +104 -0
- package/dist/esm/effect-client/guards.mjs +3 -0
- package/dist/esm/effect-client/index.mjs +110 -0
- package/dist/esm/effect-client/request-context.mjs +23 -0
- package/dist/esm/effect-client/request.mjs +28 -0
- package/dist/esm/effect-client/runtime.mjs +62 -0
- package/dist/esm/effect-client/types.mjs +0 -0
- package/dist/esm/headers.mjs +8 -0
- package/dist/esm/index.mjs +4 -0
- package/dist/esm/rslib-runtime.mjs +18 -0
- package/dist/esm-node/data-platform/batch/protocol.mjs +72 -0
- package/dist/esm-node/data-platform/batch/queue.mjs +583 -0
- package/dist/esm-node/data-platform/batch/request.mjs +69 -0
- package/dist/esm-node/data-platform/batch/response.mjs +25 -0
- package/dist/esm-node/data-platform/batch/telemetry.mjs +28 -0
- package/dist/esm-node/data-platform/batch/url.mjs +26 -0
- package/dist/esm-node/data-platform/batch-transport.mjs +13 -0
- package/dist/esm-node/data-platform/codec.mjs +91 -0
- package/dist/esm-node/data-platform/index.mjs +8 -0
- package/dist/esm-node/data-platform/invalidation.mjs +21 -0
- package/dist/esm-node/data-platform/trace.mjs +30 -0
- package/dist/esm-node/data-platform/types.mjs +5 -0
- package/dist/esm-node/data-platform/validation.mjs +129 -0
- package/dist/esm-node/effect/context.mjs +13 -0
- package/dist/esm-node/effect/dispatch.mjs +64 -0
- package/dist/esm-node/effect/edge-context.mjs +15 -0
- package/dist/esm-node/effect/edge-dispatcher.mjs +116 -0
- package/dist/esm-node/effect/edge.mjs +2 -0
- package/dist/esm-node/effect/endpoint-contracts.mjs +69 -0
- package/dist/esm-node/effect/entry-shape-registry.mjs +18 -0
- package/dist/esm-node/effect/entry-shape.mjs +63 -0
- package/dist/esm-node/effect/handler/batch-handler.mjs +233 -0
- package/dist/esm-node/effect/handler/batch.mjs +106 -0
- package/dist/esm-node/effect/handler/definition.mjs +59 -0
- package/dist/esm-node/effect/handler/envelope.mjs +64 -0
- package/dist/esm-node/effect/handler/http.mjs +70 -0
- package/dist/esm-node/effect/handler/openapi.mjs +21 -0
- package/dist/esm-node/effect/handler/routing.mjs +51 -0
- package/dist/esm-node/effect/handler/rpc.mjs +23 -0
- package/dist/esm-node/effect/handler/types.mjs +6 -0
- package/dist/esm-node/effect/handler.mjs +14 -0
- package/dist/esm-node/effect/index.mjs +8 -0
- package/dist/esm-node/effect/module.mjs +81 -0
- package/dist/esm-node/effect/operation-context.mjs +76 -0
- package/dist/esm-node/effect/rpcSerialization.mjs +17 -0
- package/dist/esm-node/effect-client/batch.mjs +36 -0
- package/dist/esm-node/effect-client/envelope.mjs +105 -0
- package/dist/esm-node/effect-client/guards.mjs +4 -0
- package/dist/esm-node/effect-client/index.mjs +111 -0
- package/dist/esm-node/effect-client/request-context.mjs +24 -0
- package/dist/esm-node/effect-client/request.mjs +29 -0
- package/dist/esm-node/effect-client/runtime.mjs +63 -0
- package/dist/esm-node/effect-client/types.mjs +1 -0
- package/dist/esm-node/headers.mjs +9 -0
- package/dist/esm-node/index.mjs +5 -0
- package/dist/esm-node/rslib-runtime.mjs +19 -0
- package/dist/types/data-platform/batch/protocol.d.ts +9 -0
- package/dist/types/data-platform/batch/queue.d.ts +47 -0
- package/dist/types/data-platform/batch/request.d.ts +19 -0
- package/dist/types/data-platform/batch/response.d.ts +3 -0
- package/dist/types/data-platform/batch/telemetry.d.ts +4 -0
- package/dist/types/data-platform/batch/url.d.ts +4 -0
- package/dist/types/data-platform/batch-transport.d.ts +3 -0
- package/dist/types/data-platform/codec.d.ts +17 -0
- package/dist/types/data-platform/index.d.ts +8 -0
- package/dist/types/data-platform/invalidation.d.ts +8 -0
- package/dist/types/data-platform/trace.d.ts +4 -0
- package/dist/types/data-platform/types.d.ts +151 -0
- package/dist/types/data-platform/validation.d.ts +29 -0
- package/dist/types/effect/context.d.ts +5 -0
- package/dist/types/effect/dispatch.d.ts +13 -0
- package/dist/types/effect/edge-context.d.ts +5 -0
- package/dist/types/effect/edge-dispatcher.d.ts +37 -0
- package/dist/types/effect/edge.d.ts +1 -0
- package/dist/types/effect/endpoint-contracts.d.ts +67 -0
- package/dist/types/effect/entry-shape.d.ts +32 -0
- package/dist/types/effect/handler/batch-handler.d.ts +11 -0
- package/dist/types/effect/handler/batch.d.ts +15 -0
- package/dist/types/effect/handler/definition.d.ts +7 -0
- package/dist/types/effect/handler/envelope.d.ts +13 -0
- package/dist/types/effect/handler/http.d.ts +15 -0
- package/dist/types/effect/handler/openapi.d.ts +4 -0
- package/dist/types/effect/handler/routing.d.ts +5 -0
- package/dist/types/effect/handler/rpc.d.ts +7 -0
- package/dist/types/effect/handler/types.d.ts +153 -0
- package/dist/types/effect/handler.d.ts +13 -0
- package/dist/types/effect/index.d.ts +6 -0
- package/dist/types/effect/module.d.ts +36 -0
- package/dist/types/effect/operation-context.d.ts +15 -0
- package/dist/types/effect/rpcSerialization.d.ts +3 -0
- package/dist/types/effect-client/batch.d.ts +2 -0
- package/dist/types/effect-client/envelope.d.ts +15 -0
- package/dist/types/effect-client/guards.d.ts +2 -0
- package/dist/types/effect-client/index.d.ts +58 -0
- package/dist/types/effect-client/request-context.d.ts +3 -0
- package/dist/types/effect-client/request.d.ts +1 -0
- package/dist/types/effect-client/runtime.d.ts +5 -0
- package/dist/types/effect-client/types.d.ts +68 -0
- package/dist/types/headers.d.ts +1 -0
- package/dist/types/index.d.ts +3 -0
- package/package.json +164 -0
- package/src/data-platform/batch/protocol.ts +112 -0
- package/src/data-platform/batch/queue.ts +876 -0
- package/src/data-platform/batch/request.ts +130 -0
- package/src/data-platform/batch/response.ts +74 -0
- package/src/data-platform/batch/telemetry.ts +47 -0
- package/src/data-platform/batch/url.ts +54 -0
- package/src/data-platform/batch-transport.ts +22 -0
- package/src/data-platform/codec.ts +145 -0
- package/src/data-platform/index.ts +63 -0
- package/src/data-platform/invalidation.ts +57 -0
- package/src/data-platform/trace.ts +49 -0
- package/src/data-platform/types.ts +186 -0
- package/src/data-platform/validation.ts +303 -0
- package/src/effect/context.ts +37 -0
- package/src/effect/dispatch.ts +132 -0
- package/src/effect/edge-context.ts +51 -0
- package/src/effect/edge-dispatcher.ts +310 -0
- package/src/effect/edge.ts +1 -0
- package/src/effect/endpoint-contracts.ts +191 -0
- package/src/effect/entry-shape-registry.cjs +16 -0
- package/src/effect/entry-shape-registry.d.cts +6 -0
- package/src/effect/entry-shape.ts +155 -0
- package/src/effect/handler/batch-handler.ts +475 -0
- package/src/effect/handler/batch.ts +182 -0
- package/src/effect/handler/definition.ts +121 -0
- package/src/effect/handler/envelope.ts +133 -0
- package/src/effect/handler/http.ts +133 -0
- package/src/effect/handler/openapi.ts +45 -0
- package/src/effect/handler/routing.ts +91 -0
- package/src/effect/handler/rpc.ts +45 -0
- package/src/effect/handler/types.ts +255 -0
- package/src/effect/handler.ts +33 -0
- package/src/effect/index.ts +22 -0
- package/src/effect/module.ts +186 -0
- package/src/effect/operation-context.ts +144 -0
- package/src/effect/rpcSerialization.ts +20 -0
- package/src/effect-client/batch.ts +50 -0
- package/src/effect-client/envelope.ts +238 -0
- package/src/effect-client/guards.ts +6 -0
- package/src/effect-client/index.ts +325 -0
- package/src/effect-client/request-context.ts +54 -0
- package/src/effect-client/request.ts +51 -0
- package/src/effect-client/runtime.ts +122 -0
- package/src/effect-client/types.ts +84 -0
- package/src/headers.ts +7 -0
- package/src/index.ts +3 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
resolveEffectBffModuleHandler: ()=>resolveEffectBffModuleHandler
|
|
32
|
+
});
|
|
33
|
+
const httpapi_namespaceObject = require("effect/unstable/httpapi");
|
|
34
|
+
const external_entry_shape_js_namespaceObject = require("./entry-shape.js");
|
|
35
|
+
const external_handler_js_namespaceObject = require("./handler.js");
|
|
36
|
+
function isRequestHandler(value) {
|
|
37
|
+
return 'function' == typeof value;
|
|
38
|
+
}
|
|
39
|
+
function shareDispose(dispose) {
|
|
40
|
+
let disposePromise;
|
|
41
|
+
return ()=>{
|
|
42
|
+
disposePromise ??= Promise.resolve().then(dispose);
|
|
43
|
+
return disposePromise;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function rejectLegacyEffectModuleShape(options, shape) {
|
|
47
|
+
options.onWarning?.(`${external_entry_shape_js_namespaceObject.strictEffectApproachMessage} Rejected ${shape}.`);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
function callEffectBffRequestHandler(handler, request, context) {
|
|
51
|
+
return void 0 === context ? handler(request) : handler(request, context);
|
|
52
|
+
}
|
|
53
|
+
function createLoadedHandler(webHandler) {
|
|
54
|
+
return {
|
|
55
|
+
handler: (request, context)=>callEffectBffRequestHandler(webHandler.handler, request, context),
|
|
56
|
+
dispose: shareDispose(webHandler.dispose)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function createLoadedHttpApiHandler(webHandler) {
|
|
60
|
+
return createLoadedHandler({
|
|
61
|
+
handler: webHandler.handler,
|
|
62
|
+
dispose: webHandler.dispose
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function classifyEffectBffRuntimeEntryShape(module) {
|
|
66
|
+
return (0, external_entry_shape_js_namespaceObject.classifyEffectBffEntryModule)(module, {
|
|
67
|
+
isRequestHandler,
|
|
68
|
+
isValidatorAwareHandlerFactory: external_entry_shape_js_namespaceObject.isValidatorAwareHandlerFactory,
|
|
69
|
+
isHttpApi: httpapi_namespaceObject.HttpApi.isHttpApi
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function resolveClassifiedEffectBffModuleHandler(facts, options = {}) {
|
|
73
|
+
if (!facts) return null;
|
|
74
|
+
if (facts.legacyShape) {
|
|
75
|
+
if (rejectLegacyEffectModuleShape(options, facts.legacyShape)) return null;
|
|
76
|
+
}
|
|
77
|
+
if ('function' == typeof facts.createHandler) {
|
|
78
|
+
if (facts.createHandlerValidatorAware) {
|
|
79
|
+
const factory = facts.createHandler;
|
|
80
|
+
const webHandler = factory({
|
|
81
|
+
openapi: options.openapi,
|
|
82
|
+
dataPlatform: options.dataPlatform,
|
|
83
|
+
validateRequest: options.validateRequest
|
|
84
|
+
});
|
|
85
|
+
return createLoadedHandler(webHandler);
|
|
86
|
+
}
|
|
87
|
+
if (void 0 === facts.api || !facts.hasRuntimeLayer) {
|
|
88
|
+
rejectLegacyEffectModuleShape(options, 'unbranded `createHandler` export');
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
options.onWarning?.(`${external_entry_shape_js_namespaceObject.strictEffectApproachMessage} Ignored unbranded \`createHandler\` export and rebuilt the handler from its { api, layer } exports.`);
|
|
92
|
+
}
|
|
93
|
+
if (void 0 !== facts.api && facts.hasRuntimeLayer) {
|
|
94
|
+
if (void 0 === facts.createHandler) options.onWarning?.('[BFF][Effect] Detected { api, layer } export without createHandler. Prefer `defineEffectBff(...)` from @modern-js/bff-effect/effect to avoid module instance mismatch.');
|
|
95
|
+
const webHandler = (0, external_handler_js_namespaceObject.createHttpApiHandler)({
|
|
96
|
+
api: facts.api,
|
|
97
|
+
layer: facts.layer,
|
|
98
|
+
openapi: options.openapi,
|
|
99
|
+
dataPlatform: options.dataPlatform,
|
|
100
|
+
validateRequest: options.validateRequest
|
|
101
|
+
});
|
|
102
|
+
return createLoadedHttpApiHandler(webHandler);
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
function resolveNormalizedEffectBffModuleHandler(normalizedModule, options = {}) {
|
|
107
|
+
return resolveClassifiedEffectBffModuleHandler(classifyEffectBffRuntimeEntryShape(normalizedModule), options);
|
|
108
|
+
}
|
|
109
|
+
function resolveEffectBffModuleHandler(mod, options = {}) {
|
|
110
|
+
return Promise.resolve(resolveNormalizedEffectBffModuleHandler(mod, options));
|
|
111
|
+
}
|
|
112
|
+
exports.resolveEffectBffModuleHandler = __webpack_exports__.resolveEffectBffModuleHandler;
|
|
113
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
114
|
+
"resolveEffectBffModuleHandler"
|
|
115
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
116
|
+
Object.defineProperty(exports, '__esModule', {
|
|
117
|
+
value: true
|
|
118
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
createEffectOperationContext: ()=>createEffectOperationContext,
|
|
32
|
+
kEffectContextStorage: ()=>kEffectContextStorage
|
|
33
|
+
});
|
|
34
|
+
const create_request_namespaceObject = require("@modern-js/create-request");
|
|
35
|
+
const kEffectContextStorage = Symbol.for('modernjs.plugin-bff.effectContextStorage');
|
|
36
|
+
const readHeader = (headers, header)=>{
|
|
37
|
+
const value = headers.get(header);
|
|
38
|
+
return value && value.length > 0 ? value : void 0;
|
|
39
|
+
};
|
|
40
|
+
const copyStringField = (target, details, key)=>{
|
|
41
|
+
const value = details[key];
|
|
42
|
+
if ('string' == typeof value && value.length > 0) target[key] = value;
|
|
43
|
+
};
|
|
44
|
+
const readOperationContextDetails = (request)=>{
|
|
45
|
+
const rawDetails = readHeader(request.headers, create_request_namespaceObject.BFF_OPERATION_CONTEXT_DETAIL_HEADER);
|
|
46
|
+
if (!rawDetails) return {};
|
|
47
|
+
try {
|
|
48
|
+
const parsed = JSON.parse(rawDetails);
|
|
49
|
+
if (!parsed || 'object' != typeof parsed || Array.isArray(parsed)) return {};
|
|
50
|
+
const details = parsed;
|
|
51
|
+
const safeDetails = {};
|
|
52
|
+
copyStringField(safeDetails, details, 'requestId');
|
|
53
|
+
copyStringField(safeDetails, details, 'operationId');
|
|
54
|
+
copyStringField(safeDetails, details, 'schemaHash');
|
|
55
|
+
copyStringField(safeDetails, details, 'traceparent');
|
|
56
|
+
copyStringField(safeDetails, details, 'traceId');
|
|
57
|
+
copyStringField(safeDetails, details, 'spanId');
|
|
58
|
+
if ('number' == typeof details.operationVersion) safeDetails.operationVersion = details.operationVersion;
|
|
59
|
+
return safeDetails;
|
|
60
|
+
} catch {
|
|
61
|
+
return {};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const createEffectOperationContext = ({ request, path, method })=>{
|
|
65
|
+
const details = readOperationContextDetails(request);
|
|
66
|
+
const operationDetails = {
|
|
67
|
+
...details
|
|
68
|
+
};
|
|
69
|
+
delete operationDetails.traceparent;
|
|
70
|
+
delete operationDetails.traceId;
|
|
71
|
+
delete operationDetails.spanId;
|
|
72
|
+
const servicePath = new URL(request.url).pathname;
|
|
73
|
+
const headerTraceparent = readHeader(request.headers, create_request_namespaceObject.BFF_TRACEPARENT_HEADER);
|
|
74
|
+
const headerTraceContext = (0, create_request_namespaceObject.parseTraceparent)(headerTraceparent);
|
|
75
|
+
const detailTraceContext = (0, create_request_namespaceObject.parseTraceparent)(details.traceparent);
|
|
76
|
+
const traceparent = headerTraceContext ? headerTraceparent : detailTraceContext ? details.traceparent : void 0;
|
|
77
|
+
const parsedTraceparent = headerTraceContext || detailTraceContext || (details.traceId && details.spanId ? {
|
|
78
|
+
traceId: details.traceId,
|
|
79
|
+
spanId: details.spanId
|
|
80
|
+
} : void 0);
|
|
81
|
+
const locale = readHeader(request.headers, create_request_namespaceObject.BFF_LOCALE_HEADER);
|
|
82
|
+
const headerOperationId = readHeader(request.headers, create_request_namespaceObject.BFF_OPERATION_CONTEXT_HEADER);
|
|
83
|
+
return {
|
|
84
|
+
...operationDetails,
|
|
85
|
+
...headerOperationId || details.operationId ? {
|
|
86
|
+
operationId: headerOperationId || details.operationId
|
|
87
|
+
} : {},
|
|
88
|
+
routePath: servicePath,
|
|
89
|
+
method: (method || request.method || 'GET').toUpperCase(),
|
|
90
|
+
source: 'effect-adapter',
|
|
91
|
+
...path && path !== servicePath ? {
|
|
92
|
+
attributes: {
|
|
93
|
+
mountedPath: path
|
|
94
|
+
}
|
|
95
|
+
} : {},
|
|
96
|
+
...locale ? {
|
|
97
|
+
locale
|
|
98
|
+
} : {},
|
|
99
|
+
...traceparent ? {
|
|
100
|
+
traceparent
|
|
101
|
+
} : {},
|
|
102
|
+
...parsedTraceparent ? {
|
|
103
|
+
traceId: parsedTraceparent.traceId,
|
|
104
|
+
spanId: parsedTraceparent.spanId
|
|
105
|
+
} : {}
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
exports.createEffectOperationContext = __webpack_exports__.createEffectOperationContext;
|
|
109
|
+
exports.kEffectContextStorage = __webpack_exports__.kEffectContextStorage;
|
|
110
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
111
|
+
"createEffectOperationContext",
|
|
112
|
+
"kEffectContextStorage"
|
|
113
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
114
|
+
Object.defineProperty(exports, '__esModule', {
|
|
115
|
+
value: true
|
|
116
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
getRpcSerializationLayer: ()=>getRpcSerializationLayer
|
|
32
|
+
});
|
|
33
|
+
const rpc_namespaceObject = require("effect/unstable/rpc");
|
|
34
|
+
function getRpcSerializationLayer(serialization) {
|
|
35
|
+
switch(serialization){
|
|
36
|
+
case 'ndjson':
|
|
37
|
+
return rpc_namespaceObject.RpcSerialization.layerNdjson;
|
|
38
|
+
case 'jsonRpc':
|
|
39
|
+
return rpc_namespaceObject.RpcSerialization.layerJsonRpc();
|
|
40
|
+
case 'ndJsonRpc':
|
|
41
|
+
return rpc_namespaceObject.RpcSerialization.layerNdJsonRpc();
|
|
42
|
+
case 'msgPack':
|
|
43
|
+
return rpc_namespaceObject.RpcSerialization.layerMsgPack;
|
|
44
|
+
default:
|
|
45
|
+
return rpc_namespaceObject.RpcSerialization.layerJsonRpc();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.getRpcSerializationLayer = __webpack_exports__.getRpcSerializationLayer;
|
|
49
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
50
|
+
"getRpcSerializationLayer"
|
|
51
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
52
|
+
Object.defineProperty(exports, '__esModule', {
|
|
53
|
+
value: true
|
|
54
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
configureGeneratedEffectClientRuntime: ()=>configureGeneratedEffectClientRuntime
|
|
32
|
+
});
|
|
33
|
+
const index_js_namespaceObject = require("../data-platform/index.js");
|
|
34
|
+
const external_envelope_js_namespaceObject = require("./envelope.js");
|
|
35
|
+
const resolveRuntimeFetch = ()=>'function' == typeof fetch ? fetch.bind(globalThis) : void 0;
|
|
36
|
+
const configureGeneratedEffectClientRuntime = (config, configureRequest)=>{
|
|
37
|
+
const defaultOrigin = config.defaultOrigin;
|
|
38
|
+
if (config.requestId && configureRequest) {
|
|
39
|
+
const configurePayload = {
|
|
40
|
+
requestId: config.requestId,
|
|
41
|
+
requireEnvelope: true,
|
|
42
|
+
identityBinding: {
|
|
43
|
+
enabled: true,
|
|
44
|
+
strict: true
|
|
45
|
+
},
|
|
46
|
+
operationContract: {
|
|
47
|
+
enabled: true,
|
|
48
|
+
strict: true,
|
|
49
|
+
requireSchemaHash: true,
|
|
50
|
+
requireOperationVersion: true
|
|
51
|
+
},
|
|
52
|
+
setDomain: ()=>(0, external_envelope_js_namespaceObject.resolveOrigin)(defaultOrigin)
|
|
53
|
+
};
|
|
54
|
+
const runtimeFetch = resolveRuntimeFetch();
|
|
55
|
+
if (false !== config.batch.enabled && runtimeFetch) configurePayload.request = (0, index_js_namespaceObject.createDataBatchTransport)({
|
|
56
|
+
fetch: runtimeFetch,
|
|
57
|
+
endpoint: config.batch.endpoint,
|
|
58
|
+
flushIntervalMs: config.batch.flushIntervalMs,
|
|
59
|
+
maxBatchSize: config.batch.maxBatchSize,
|
|
60
|
+
maxBatchBytes: config.batch.maxBatchBytes,
|
|
61
|
+
requestTimeoutMs: config.batch.requestTimeoutMs,
|
|
62
|
+
allowedMethods: config.batch.allowedMethods
|
|
63
|
+
});
|
|
64
|
+
configureRequest(configurePayload);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.configureGeneratedEffectClientRuntime = __webpack_exports__.configureGeneratedEffectClientRuntime;
|
|
68
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
69
|
+
"configureGeneratedEffectClientRuntime"
|
|
70
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
71
|
+
Object.defineProperty(exports, '__esModule', {
|
|
72
|
+
value: true
|
|
73
|
+
});
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
prepareEffectRequest: ()=>prepareEffectRequest,
|
|
32
|
+
resolveOrigin: ()=>resolveOrigin
|
|
33
|
+
});
|
|
34
|
+
const index_js_namespaceObject = require("../data-platform/index.js");
|
|
35
|
+
const external_guards_js_namespaceObject = require("./guards.js");
|
|
36
|
+
const external_request_js_namespaceObject = require("./request.js");
|
|
37
|
+
const external_request_context_js_namespaceObject = require("./request-context.js");
|
|
38
|
+
const DATA_REQUEST_MODES = new Set([
|
|
39
|
+
'cache-first',
|
|
40
|
+
'stale-while-revalidate',
|
|
41
|
+
'network-only'
|
|
42
|
+
]);
|
|
43
|
+
const DATA_MUTATION_MODES = new Set([
|
|
44
|
+
'optimistic',
|
|
45
|
+
'pessimistic',
|
|
46
|
+
'fire-and-forget'
|
|
47
|
+
]);
|
|
48
|
+
const isDataRequestMode = (value)=>'string' == typeof value && DATA_REQUEST_MODES.has(value);
|
|
49
|
+
const isDataMutationMode = (value)=>'string' == typeof value && DATA_MUTATION_MODES.has(value);
|
|
50
|
+
const normalizeOrigin = (value)=>{
|
|
51
|
+
if ('string' != typeof value || 0 === value.length) return;
|
|
52
|
+
try {
|
|
53
|
+
return new URL(value).origin;
|
|
54
|
+
} catch {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
const resolveOrigin = (defaultOrigin)=>{
|
|
59
|
+
if ("u" > typeof window && window.location && 'string' == typeof window.location.origin && window.location.origin) return window.location.origin;
|
|
60
|
+
const globalLocation = globalThis?.location;
|
|
61
|
+
if (globalLocation && 'string' == typeof globalLocation.origin && globalLocation.origin) return globalLocation.origin;
|
|
62
|
+
return defaultOrigin;
|
|
63
|
+
};
|
|
64
|
+
const resolveTargetOrigin = (dataPlatform, defaultOrigin)=>{
|
|
65
|
+
const explicitTargetOrigin = (0, external_guards_js_namespaceObject.stringOrUndefined)(dataPlatform.targetOrigin) || (0, external_guards_js_namespaceObject.stringOrUndefined)(dataPlatform.endpointOrigin);
|
|
66
|
+
if (explicitTargetOrigin) return explicitTargetOrigin;
|
|
67
|
+
return defaultOrigin;
|
|
68
|
+
};
|
|
69
|
+
const shouldAttachEnvelopeHeader = (dataPlatform, defaultOrigin)=>{
|
|
70
|
+
if (true === dataPlatform.allowCrossOriginEnvelope) return true;
|
|
71
|
+
const currentOrigin = normalizeOrigin(resolveOrigin(defaultOrigin));
|
|
72
|
+
const targetOrigin = normalizeOrigin(resolveTargetOrigin(dataPlatform, defaultOrigin));
|
|
73
|
+
if (!currentOrigin || !targetOrigin) return true;
|
|
74
|
+
return currentOrigin === targetOrigin;
|
|
75
|
+
};
|
|
76
|
+
const toEnvelopeInput = (normalizedRequest)=>{
|
|
77
|
+
const payload = {};
|
|
78
|
+
if ((0, external_guards_js_namespaceObject.isRecord)(normalizedRequest.params)) payload.path = normalizedRequest.params;
|
|
79
|
+
if ((0, external_guards_js_namespaceObject.isRecord)(normalizedRequest.query)) payload.query = normalizedRequest.query;
|
|
80
|
+
if ('data' in normalizedRequest && void 0 !== normalizedRequest.data) payload.data = normalizedRequest.data;
|
|
81
|
+
if ('body' in normalizedRequest && void 0 !== normalizedRequest.body) payload.body = normalizedRequest.body;
|
|
82
|
+
if ("u" > typeof FormData && normalizedRequest.formData instanceof FormData) payload.formData = Array.from(normalizedRequest.formData.entries()).map(([key, value])=>[
|
|
83
|
+
key,
|
|
84
|
+
String(value)
|
|
85
|
+
]);
|
|
86
|
+
if ("u" > typeof URLSearchParams && normalizedRequest.formUrlencoded instanceof URLSearchParams) payload.formUrlencoded = normalizedRequest.formUrlencoded.toString();
|
|
87
|
+
return payload;
|
|
88
|
+
};
|
|
89
|
+
const prepareEffectRequest = (options)=>{
|
|
90
|
+
const { endpoint, operation, request, config, createEffectRequestContext } = options;
|
|
91
|
+
const defaultOrigin = config.defaultOrigin;
|
|
92
|
+
const normalizedRequest = (0, external_request_context_js_namespaceObject.applyRequestContext)((0, external_request_js_namespaceObject.normalizeRequest)(endpoint.method, request), request, createEffectRequestContext);
|
|
93
|
+
const dataPlatform = (0, external_guards_js_namespaceObject.isRecord)(request) && (0, external_guards_js_namespaceObject.isRecord)(request.dataPlatform) ? request.dataPlatform : {};
|
|
94
|
+
const strictEnvelope = true === dataPlatform.requireEnvelope || true === dataPlatform.strict;
|
|
95
|
+
if (!strictEnvelope && !shouldAttachEnvelopeHeader(dataPlatform, defaultOrigin)) return normalizedRequest;
|
|
96
|
+
try {
|
|
97
|
+
const namespace = (0, external_guards_js_namespaceObject.stringOrUndefined)(dataPlatform.appNamespace) || config.appNamespace;
|
|
98
|
+
const origin = (0, external_guards_js_namespaceObject.stringOrUndefined)(dataPlatform.origin) || resolveOrigin(defaultOrigin);
|
|
99
|
+
const envelope = (0, index_js_namespaceObject.createRequestEnvelope)({
|
|
100
|
+
operation: {
|
|
101
|
+
...operation,
|
|
102
|
+
appNamespace: namespace
|
|
103
|
+
},
|
|
104
|
+
scope: {
|
|
105
|
+
appNamespace: namespace,
|
|
106
|
+
origin,
|
|
107
|
+
tenantId: (0, external_guards_js_namespaceObject.stringOrUndefined)(dataPlatform.tenantId),
|
|
108
|
+
userId: (0, external_guards_js_namespaceObject.stringOrUndefined)(dataPlatform.userId),
|
|
109
|
+
sessionId: (0, external_guards_js_namespaceObject.stringOrUndefined)(dataPlatform.sessionId)
|
|
110
|
+
},
|
|
111
|
+
requestInput: {
|
|
112
|
+
method: endpoint.method,
|
|
113
|
+
routePath: endpoint.routePath,
|
|
114
|
+
payload: toEnvelopeInput(normalizedRequest)
|
|
115
|
+
},
|
|
116
|
+
requestMode: isDataRequestMode(dataPlatform.requestMode) ? dataPlatform.requestMode : void 0,
|
|
117
|
+
mutationMode: isDataMutationMode(dataPlatform.mutationMode) ? dataPlatform.mutationMode : void 0,
|
|
118
|
+
selectionPlan: (0, external_guards_js_namespaceObject.isRecord)(dataPlatform.selectionPlan) ? dataPlatform.selectionPlan : void 0,
|
|
119
|
+
traceContext: (0, external_guards_js_namespaceObject.isRecord)(dataPlatform.traceContext) ? dataPlatform.traceContext : void 0,
|
|
120
|
+
requireTraceContext: true === dataPlatform.requireTraceContext
|
|
121
|
+
});
|
|
122
|
+
const headerName = (0, external_guards_js_namespaceObject.stringOrUndefined)(dataPlatform.envelopeHeader) || index_js_namespaceObject.DEFAULT_DATA_ENVELOPE_HEADER;
|
|
123
|
+
const headers = (0, external_guards_js_namespaceObject.isRecord)(normalizedRequest.headers) ? {
|
|
124
|
+
...normalizedRequest.headers
|
|
125
|
+
} : {};
|
|
126
|
+
if (false === dataPlatform.batch) headers[index_js_namespaceObject.DEFAULT_DATA_BATCH_HEADER] = 'off';
|
|
127
|
+
headers[headerName] = (0, index_js_namespaceObject.encodeRequestEnvelopeHeader)(envelope);
|
|
128
|
+
return {
|
|
129
|
+
...normalizedRequest,
|
|
130
|
+
headers
|
|
131
|
+
};
|
|
132
|
+
} catch (error) {
|
|
133
|
+
if (strictEnvelope) throw error;
|
|
134
|
+
return normalizedRequest;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
exports.prepareEffectRequest = __webpack_exports__.prepareEffectRequest;
|
|
138
|
+
exports.resolveOrigin = __webpack_exports__.resolveOrigin;
|
|
139
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
140
|
+
"prepareEffectRequest",
|
|
141
|
+
"resolveOrigin"
|
|
142
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
143
|
+
Object.defineProperty(exports, '__esModule', {
|
|
144
|
+
value: true
|
|
145
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
const isRecord = (value)=>'object' == typeof value && null !== value;
|
|
31
|
+
const stringOrUndefined = (value)=>'string' == typeof value && value.length > 0 ? value : void 0;
|
|
32
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
33
|
+
isRecord: isRecord,
|
|
34
|
+
stringOrUndefined: stringOrUndefined
|
|
35
|
+
});
|
|
36
|
+
exports.isRecord = __webpack_exports__.isRecord;
|
|
37
|
+
exports.stringOrUndefined = __webpack_exports__.stringOrUndefined;
|
|
38
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
39
|
+
"isRecord",
|
|
40
|
+
"stringOrUndefined"
|
|
41
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
42
|
+
Object.defineProperty(exports, '__esModule', {
|
|
43
|
+
value: true
|
|
44
|
+
});
|