@bleedingdev/modern-js-app-tools 3.8.3-ultramodern.1 → 3.8.3-ultramodern.3
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/modern-bundle-docs.js +11 -0
- package/bin/modern.js +11 -0
- package/dist/cjs/builder/generator/getBuilderEnvironments.js +13 -241
- package/dist/cjs/builder/generator/index.js +0 -1
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +37 -9
- package/dist/cjs/builder/shared/builderPlugins/index.js +6 -13
- package/dist/cjs/builder/shared/bundlerPlugins/index.js +6 -13
- package/dist/cjs/builder/shared/lazyCompilation.js +9 -9
- package/dist/cjs/bundleDocs.js +1 -1
- package/dist/cjs/index.js +59 -60
- package/dist/cjs/plugins/analyze/getServerRoutes.js +1 -1
- package/dist/cjs/plugins/analyze/isDefaultExportFunction.js +1 -9
- package/dist/cjs/plugins/backend-federation/codegen.js +2 -1
- package/dist/cjs/plugins/backend-federation/config.js +2 -2
- package/dist/cjs/plugins/backend-federation/emit.js +6 -4
- package/dist/cjs/plugins/deploy/index.js +4 -4
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js +23 -149
- package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.cjs +41 -62
- package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.mjs +41 -63
- package/dist/cjs/plugins/deploy/platforms/templates/node-entry.cjs +35 -52
- package/dist/cjs/plugins/deploy/platforms/templates/node-entry.mjs +35 -53
- package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.cjs +41 -61
- package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.mjs +40 -61
- package/dist/cjs/plugins/ultramodernReleaseEnvelope.js +3 -59
- package/dist/cjs/presetUltramodern.js +9 -4
- package/dist/cjs/run/index.js +9 -9
- package/dist/cjs/utils/register.js +6 -3
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +12 -231
- package/dist/esm/builder/generator/index.mjs +1 -2
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +34 -9
- package/dist/esm/builder/shared/builderPlugins/index.mjs +0 -1
- package/dist/esm/builder/shared/bundlerPlugins/index.mjs +0 -1
- package/dist/esm/builder/shared/lazyCompilation.mjs +4 -4
- package/dist/esm/bundleDocs.mjs +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/plugins/analyze/getServerRoutes.mjs +1 -1
- package/dist/esm/plugins/analyze/isDefaultExportFunction.mjs +1 -9
- package/dist/esm/plugins/backend-federation/codegen.mjs +2 -1
- package/dist/esm/plugins/backend-federation/config.mjs +1 -1
- package/dist/esm/plugins/backend-federation/emit.mjs +5 -3
- package/dist/esm/plugins/deploy/index.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +1 -133
- package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.cjs +41 -62
- package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.mjs +41 -63
- package/dist/esm/plugins/deploy/platforms/templates/node-entry.cjs +35 -52
- package/dist/esm/plugins/deploy/platforms/templates/node-entry.mjs +35 -53
- package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.cjs +41 -61
- package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.mjs +40 -61
- package/dist/esm/plugins/ultramodernReleaseEnvelope.mjs +3 -49
- package/dist/esm/presetUltramodern.mjs +2 -1
- package/dist/esm/run/index.mjs +9 -9
- package/dist/esm/utils/register.mjs +6 -3
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +12 -234
- package/dist/esm-node/builder/generator/index.mjs +1 -2
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +34 -9
- package/dist/esm-node/builder/shared/builderPlugins/index.mjs +0 -1
- package/dist/esm-node/builder/shared/bundlerPlugins/index.mjs +0 -1
- package/dist/esm-node/builder/shared/lazyCompilation.mjs +4 -4
- package/dist/esm-node/bundleDocs.mjs +1 -1
- package/dist/esm-node/index.mjs +3 -3
- package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +1 -1
- package/dist/esm-node/plugins/analyze/isDefaultExportFunction.mjs +1 -9
- package/dist/esm-node/plugins/backend-federation/codegen.mjs +2 -1
- package/dist/esm-node/plugins/backend-federation/config.mjs +1 -1
- package/dist/esm-node/plugins/backend-federation/emit.mjs +5 -3
- package/dist/esm-node/plugins/deploy/index.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +1 -133
- package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.cjs +41 -62
- package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.mjs +41 -63
- package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.cjs +35 -52
- package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.mjs +35 -53
- package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.cjs +41 -61
- package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.mjs +40 -61
- package/dist/esm-node/plugins/ultramodernReleaseEnvelope.mjs +3 -49
- package/dist/esm-node/presetUltramodern.mjs +2 -1
- package/dist/esm-node/run/index.mjs +9 -9
- package/dist/esm-node/utils/register.mjs +6 -3
- package/dist/types/builder/generator/getBuilderEnvironments.d.ts +0 -29
- package/dist/types/builder/shared/builderPlugins/adapterSSR.d.ts +11 -0
- package/dist/types/builder/shared/builderPlugins/index.d.ts +0 -1
- package/dist/types/builder/shared/bundlerPlugins/index.d.ts +0 -1
- package/dist/types/builder/shared/lazyCompilation.d.ts +7 -7
- package/dist/types/plugins/analyze/getServerRoutes.d.ts +1 -1
- package/dist/types/plugins/backend-federation/codegen.d.ts +4 -1
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/index.d.ts +1 -18
- package/dist/types/presetUltramodern.d.ts +1 -0
- package/dist/types/types/config/deploy.d.ts +2 -2
- package/docs/community/showcase.md +3 -5
- package/docs/guides/advanced-features/bff/frameworks.md +1 -1
- package/docs/guides/basic-features/deploy.md +2 -2
- package/docs/guides/get-started/quick-start.md +9 -8
- package/docs/guides/get-started/tech-stack.md +1 -1
- package/docs/guides/get-started/ultramodern.md +18 -18
- package/docs/guides/troubleshooting/cli.md +1 -1
- package/docs/llms.txt +2 -2
- package/docs/tutorials/examples/csr-auth.md +1 -1
- package/package.json +15 -27
- package/rslib.config.mts +4 -7
- package/dist/cjs/builder/shared/builderPlugins/adapterLazyCompilation.js +0 -74
- package/dist/cjs/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.js +0 -72
- package/dist/cjs/plugins/deploy/platforms/cloudflare/artifacts.js +0 -127
- package/dist/cjs/plugins/deploy/platforms/cloudflare/constants.js +0 -141
- package/dist/cjs/plugins/deploy/platforms/cloudflare/delivery-unit.js +0 -139
- package/dist/cjs/plugins/deploy/platforms/cloudflare/i18n-worker.js +0 -135
- package/dist/cjs/plugins/deploy/platforms/cloudflare/index.js +0 -150
- package/dist/cjs/plugins/deploy/platforms/cloudflare/security-policies.js +0 -205
- package/dist/cjs/plugins/deploy/platforms/cloudflare/types.js +0 -18
- package/dist/cjs/plugins/deploy/platforms/cloudflare/utils.js +0 -66
- package/dist/cjs/plugins/deploy/platforms/cloudflare/worker-manifest.js +0 -208
- package/dist/cjs/plugins/deploy/platforms/cloudflare/wrangler-config.js +0 -204
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-contract.js +0 -108
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-plan.js +0 -93
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/identity.js +0 -83
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/issues.js +0 -54
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/manifest.js +0 -89
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.js +0 -151
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.js +0 -378
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +0 -251
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +0 -191
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +0 -514
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +0 -1012
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +0 -363
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +0 -93
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +0 -11
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +0 -281
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +0 -14
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +0 -98
- package/dist/cjs/types/config/cloudflareDeploy.js +0 -18
- package/dist/cjs/ultramodern-release-envelope/canonical.js +0 -68
- package/dist/cjs/ultramodern-release-envelope/framework-output.js +0 -649
- package/dist/cjs/ultramodern-release-envelope/index.js +0 -399
- package/dist/cjs/ultramodern-release-envelope/types.js +0 -51
- package/dist/cjs/ultramodern-release-identity.js +0 -110
- package/dist/esm/builder/shared/builderPlugins/adapterLazyCompilation.mjs +0 -36
- package/dist/esm/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.mjs +0 -30
- package/dist/esm/plugins/deploy/platforms/cloudflare/artifacts.mjs +0 -64
- package/dist/esm/plugins/deploy/platforms/cloudflare/constants.mjs +0 -34
- package/dist/esm/plugins/deploy/platforms/cloudflare/delivery-unit.mjs +0 -88
- package/dist/esm/plugins/deploy/platforms/cloudflare/i18n-worker.mjs +0 -97
- package/dist/esm/plugins/deploy/platforms/cloudflare/index.mjs +0 -102
- package/dist/esm/plugins/deploy/platforms/cloudflare/security-policies.mjs +0 -167
- package/dist/esm/plugins/deploy/platforms/cloudflare/types.mjs +0 -0
- package/dist/esm/plugins/deploy/platforms/cloudflare/utils.mjs +0 -12
- package/dist/esm/plugins/deploy/platforms/cloudflare/worker-manifest.mjs +0 -148
- package/dist/esm/plugins/deploy/platforms/cloudflare/wrangler-config.mjs +0 -150
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-contract.mjs +0 -31
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-plan.mjs +0 -45
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/identity.mjs +0 -45
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/issues.mjs +0 -10
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/manifest.mjs +0 -51
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +0 -99
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +0 -313
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +0 -251
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +0 -191
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +0 -514
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +0 -1012
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +0 -363
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +0 -93
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +0 -11
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +0 -281
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +0 -14
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +0 -98
- package/dist/esm/types/config/cloudflareDeploy.mjs +0 -0
- package/dist/esm/ultramodern-release-envelope/canonical.mjs +0 -21
- package/dist/esm/ultramodern-release-envelope/framework-output.mjs +0 -573
- package/dist/esm/ultramodern-release-envelope/index.mjs +0 -335
- package/dist/esm/ultramodern-release-envelope/types.mjs +0 -7
- package/dist/esm/ultramodern-release-identity.mjs +0 -66
- package/dist/esm-node/builder/shared/builderPlugins/adapterLazyCompilation.mjs +0 -37
- package/dist/esm-node/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.mjs +0 -31
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/artifacts.mjs +0 -65
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/constants.mjs +0 -35
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/delivery-unit.mjs +0 -89
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/i18n-worker.mjs +0 -98
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/index.mjs +0 -103
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/security-policies.mjs +0 -168
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/types.mjs +0 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/utils.mjs +0 -13
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/worker-manifest.mjs +0 -149
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/wrangler-config.mjs +0 -151
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-contract.mjs +0 -32
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-plan.mjs +0 -46
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/identity.mjs +0 -46
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/issues.mjs +0 -11
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/manifest.mjs +0 -52
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +0 -100
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +0 -314
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +0 -251
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +0 -191
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +0 -514
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +0 -1012
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +0 -363
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +0 -93
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +0 -11
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +0 -281
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.mjs +0 -14
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +0 -98
- package/dist/esm-node/types/config/cloudflareDeploy.mjs +0 -1
- package/dist/esm-node/ultramodern-release-envelope/canonical.mjs +0 -22
- package/dist/esm-node/ultramodern-release-envelope/framework-output.mjs +0 -574
- package/dist/esm-node/ultramodern-release-envelope/index.mjs +0 -336
- package/dist/esm-node/ultramodern-release-envelope/types.mjs +0 -8
- package/dist/esm-node/ultramodern-release-identity.mjs +0 -67
- package/dist/types/builder/shared/builderPlugins/adapterLazyCompilation.d.ts +0 -3
- package/dist/types/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.d.ts +0 -6
- package/dist/types/plugins/deploy/platforms/cloudflare/artifacts.d.ts +0 -15
- package/dist/types/plugins/deploy/platforms/cloudflare/constants.d.ts +0 -24
- package/dist/types/plugins/deploy/platforms/cloudflare/delivery-unit.d.ts +0 -23
- package/dist/types/plugins/deploy/platforms/cloudflare/i18n-worker.d.ts +0 -22
- package/dist/types/plugins/deploy/platforms/cloudflare/index.d.ts +0 -2
- package/dist/types/plugins/deploy/platforms/cloudflare/security-policies.d.ts +0 -51
- package/dist/types/plugins/deploy/platforms/cloudflare/types.d.ts +0 -5
- package/dist/types/plugins/deploy/platforms/cloudflare/utils.d.ts +0 -6
- package/dist/types/plugins/deploy/platforms/cloudflare/worker-manifest.d.ts +0 -122
- package/dist/types/plugins/deploy/platforms/cloudflare/wrangler-config.d.ts +0 -46
- package/dist/types/plugins/deploy/platforms/cloudflare-output-contract.d.ts +0 -14
- package/dist/types/plugins/deploy/platforms/cloudflare-output-plan.d.ts +0 -34
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/identity.d.ts +0 -4
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/issues.d.ts +0 -14
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/manifest.d.ts +0 -2
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.d.ts +0 -14
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.d.ts +0 -20
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.d.mts +0 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.d.mts +0 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.d.mts +0 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.d.mts +0 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.d.mts +0 -1
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.d.mts +0 -4
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.d.mts +0 -5
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.d.mts +0 -48
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-worker-mf-ssr-runtime-plugin.d.mts +0 -13
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-worker-path.d.mts +0 -21
- package/dist/types/types/config/cloudflareDeploy.d.ts +0 -161
- package/dist/types/ultramodern-release-envelope/canonical.d.ts +0 -5
- package/dist/types/ultramodern-release-envelope/framework-output.d.ts +0 -32
- package/dist/types/ultramodern-release-envelope/index.d.ts +0 -6
- package/dist/types/ultramodern-release-envelope/types.d.ts +0 -62
- package/dist/types/ultramodern-release-identity.d.ts +0 -16
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.n = (module)=>{
|
|
5
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
-
__webpack_require__.d(getter, {
|
|
7
|
-
a: getter
|
|
8
|
-
});
|
|
9
|
-
return getter;
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
-
var define = (defs, kind)=>{
|
|
15
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
[kind]: defs[key]
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
define(getters, "get");
|
|
21
|
-
define(values, "value");
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
(()=>{
|
|
25
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
26
|
-
})();
|
|
27
|
-
(()=>{
|
|
28
|
-
__webpack_require__.r = (exports1)=>{
|
|
29
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
30
|
-
value: 'Module'
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
33
|
-
value: true
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
})();
|
|
37
|
-
var __webpack_exports__ = {};
|
|
38
|
-
__webpack_require__.r(__webpack_exports__);
|
|
39
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
-
createWorkerManifestServiceBindings: ()=>createWorkerManifestServiceBindings,
|
|
41
|
-
createWorkerServiceBindings: ()=>createWorkerServiceBindings,
|
|
42
|
-
createWranglerConfig: ()=>createWranglerConfig
|
|
43
|
-
});
|
|
44
|
-
const external_node_path_namespaceObject = require("node:path");
|
|
45
|
-
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
46
|
-
const external_constants_js_namespaceObject = require("./constants.js");
|
|
47
|
-
const external_utils_js_namespaceObject = require("./utils.js");
|
|
48
|
-
const getCompatibilityDate = (modernConfig)=>{
|
|
49
|
-
const configuredDate = modernConfig.deploy?.worker?.compatibilityDate?.trim();
|
|
50
|
-
const compatibilityDate = configuredDate || external_constants_js_namespaceObject.DEFAULT_COMPATIBILITY_DATE;
|
|
51
|
-
if (!external_constants_js_namespaceObject.COMPATIBILITY_DATE_PATTERN.test(compatibilityDate)) throw new Error(`deploy.worker.compatibilityDate must use YYYY-MM-DD, received ${JSON.stringify(compatibilityDate)}.`);
|
|
52
|
-
return compatibilityDate;
|
|
53
|
-
};
|
|
54
|
-
const getWorkerName = (appDirectory)=>{
|
|
55
|
-
const basename = external_node_path_default().basename(appDirectory);
|
|
56
|
-
return basename.replace(/[^a-zA-Z0-9-_]/g, '-') || 'modern-cloudflare-worker';
|
|
57
|
-
};
|
|
58
|
-
const getConfiguredWorkerName = (appDirectory, modernConfig)=>{
|
|
59
|
-
const configuredName = modernConfig.deploy?.worker?.name?.trim();
|
|
60
|
-
return configuredName || getWorkerName(appDirectory);
|
|
61
|
-
};
|
|
62
|
-
const getConfiguredWrangler = (modernConfig)=>{
|
|
63
|
-
const wrangler = modernConfig.deploy?.worker?.wrangler;
|
|
64
|
-
if (void 0 === wrangler) return {};
|
|
65
|
-
if (!(0, external_utils_js_namespaceObject.isJsonRecord)(wrangler)) throw new Error('deploy.worker.wrangler must be a JSON object.');
|
|
66
|
-
return wrangler;
|
|
67
|
-
};
|
|
68
|
-
const createWranglerCompatibilityFlags = (configuredFlags)=>{
|
|
69
|
-
if (void 0 === configuredFlags) return [
|
|
70
|
-
...external_constants_js_namespaceObject.REQUIRED_COMPATIBILITY_FLAGS
|
|
71
|
-
];
|
|
72
|
-
if (!Array.isArray(configuredFlags) || configuredFlags.some((flag)=>'string' != typeof flag)) throw new Error('deploy.worker.wrangler.compatibility_flags must be an array of strings.');
|
|
73
|
-
return [
|
|
74
|
-
...new Set([
|
|
75
|
-
...configuredFlags,
|
|
76
|
-
...external_constants_js_namespaceObject.REQUIRED_COMPATIBILITY_FLAGS
|
|
77
|
-
])
|
|
78
|
-
];
|
|
79
|
-
};
|
|
80
|
-
const createWranglerAssetsConfig = (configuredAssets)=>{
|
|
81
|
-
if (void 0 !== configuredAssets && !(0, external_utils_js_namespaceObject.isJsonRecord)(configuredAssets)) throw new Error('deploy.worker.wrangler.assets must be an object.');
|
|
82
|
-
return {
|
|
83
|
-
...(0, external_utils_js_namespaceObject.isJsonRecord)(configuredAssets) ? configuredAssets : {},
|
|
84
|
-
directory: `./${external_constants_js_namespaceObject.PUBLIC_ASSETS_DIRECTORY}`,
|
|
85
|
-
binding: external_constants_js_namespaceObject.ASSETS_BINDING,
|
|
86
|
-
run_worker_first: true
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
const assertNonEmptyString = (value, label)=>{
|
|
90
|
-
if ('string' != typeof value || 0 === value.trim().length) throw new Error(`${label} must be a non-empty string.`);
|
|
91
|
-
return value.trim();
|
|
92
|
-
};
|
|
93
|
-
const normalizeD1Database = (database, index)=>{
|
|
94
|
-
const binding = assertNonEmptyString(database.binding, `deploy.worker.d1Databases[${index}].binding`);
|
|
95
|
-
const databaseName = assertNonEmptyString(database.databaseName, `deploy.worker.d1Databases[${index}].databaseName`);
|
|
96
|
-
const databaseId = assertNonEmptyString(database.databaseId, `deploy.worker.d1Databases[${index}].databaseId`);
|
|
97
|
-
const migrationsDir = void 0 === database.migrationsDir ? void 0 : (0, external_utils_js_namespaceObject.normalizeRelativePath)(database.migrationsDir, `deploy.worker.d1Databases[${index}].migrationsDir`, 'app root');
|
|
98
|
-
const previewDatabaseId = void 0 === database.previewDatabaseId ? void 0 : assertNonEmptyString(database.previewDatabaseId, `deploy.worker.d1Databases[${index}].previewDatabaseId`);
|
|
99
|
-
return {
|
|
100
|
-
binding,
|
|
101
|
-
database_name: databaseName,
|
|
102
|
-
database_id: databaseId,
|
|
103
|
-
...void 0 === migrationsDir ? {} : {
|
|
104
|
-
migrations_dir: migrationsDir
|
|
105
|
-
},
|
|
106
|
-
...void 0 === previewDatabaseId ? {} : {
|
|
107
|
-
preview_database_id: previewDatabaseId
|
|
108
|
-
},
|
|
109
|
-
...void 0 === database.remote ? {} : {
|
|
110
|
-
remote: database.remote
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
const createWranglerD1Databases = (modernConfig, configuredWranglerD1)=>{
|
|
115
|
-
const d1Databases = modernConfig.deploy?.worker?.d1Databases;
|
|
116
|
-
if (void 0 === d1Databases) return configuredWranglerD1;
|
|
117
|
-
if (void 0 !== configuredWranglerD1) throw new Error('Use deploy.worker.d1Databases or deploy.worker.wrangler.d1_databases, not both.');
|
|
118
|
-
if (!Array.isArray(d1Databases)) throw new Error('deploy.worker.d1Databases must be an array.');
|
|
119
|
-
return d1Databases.map(normalizeD1Database);
|
|
120
|
-
};
|
|
121
|
-
const normalizeServiceBinding = (service, index)=>{
|
|
122
|
-
const binding = assertNonEmptyString(service.binding, `deploy.worker.services[${index}].binding`);
|
|
123
|
-
const serviceName = assertNonEmptyString(service.service, `deploy.worker.services[${index}].service`);
|
|
124
|
-
const prefix = void 0 === service.prefix ? void 0 : assertNonEmptyString(service.prefix, `deploy.worker.services[${index}].prefix`);
|
|
125
|
-
if (void 0 !== service.fragments && !Array.isArray(service.fragments)) throw new Error(`deploy.worker.services[${index}].fragments must be an array.`);
|
|
126
|
-
const fragments = void 0 === service.fragments ? void 0 : service.fragments.map((fragment, fragmentIndex)=>({
|
|
127
|
-
remote: assertNonEmptyString(fragment.remote, `deploy.worker.services[${index}].fragments[${fragmentIndex}].remote`),
|
|
128
|
-
expose: assertNonEmptyString(fragment.expose, `deploy.worker.services[${index}].fragments[${fragmentIndex}].expose`),
|
|
129
|
-
boundaryId: assertNonEmptyString(fragment.boundaryId, `deploy.worker.services[${index}].fragments[${fragmentIndex}].boundaryId`),
|
|
130
|
-
path: assertNonEmptyString(fragment.path, `deploy.worker.services[${index}].fragments[${fragmentIndex}].path`)
|
|
131
|
-
}));
|
|
132
|
-
return {
|
|
133
|
-
binding,
|
|
134
|
-
service: serviceName,
|
|
135
|
-
...void 0 === prefix ? {} : {
|
|
136
|
-
prefix
|
|
137
|
-
},
|
|
138
|
-
...void 0 === fragments ? {} : {
|
|
139
|
-
fragments
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
};
|
|
143
|
-
const createWorkerServiceBindings = (modernConfig, configuredWranglerServices)=>{
|
|
144
|
-
const services = modernConfig.deploy?.worker?.services;
|
|
145
|
-
if (void 0 === services) return configuredWranglerServices;
|
|
146
|
-
if (void 0 !== configuredWranglerServices) throw new Error('Use deploy.worker.services or deploy.worker.wrangler.services, not both.');
|
|
147
|
-
if (!Array.isArray(services)) throw new Error('deploy.worker.services must be an array.');
|
|
148
|
-
return services.map(normalizeServiceBinding);
|
|
149
|
-
};
|
|
150
|
-
const createWranglerServices = (serviceBindings)=>{
|
|
151
|
-
if (!Array.isArray(serviceBindings)) return serviceBindings;
|
|
152
|
-
if (!serviceBindings.every(external_utils_js_namespaceObject.isJsonRecord)) return serviceBindings;
|
|
153
|
-
return serviceBindings.map((service)=>{
|
|
154
|
-
const { prefix, fragments, ...wranglerService } = service;
|
|
155
|
-
return wranglerService;
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
const createWorkerManifestServiceBindings = (serviceBindings)=>{
|
|
159
|
-
if (!Array.isArray(serviceBindings)) return;
|
|
160
|
-
const manifestBindings = serviceBindings.filter((service)=>(0, external_utils_js_namespaceObject.isJsonRecord)(service) && 'string' == typeof service.binding && 'string' == typeof service.service && ('string' == typeof service.prefix || Array.isArray(service.fragments) && service.fragments.length > 0)).map((service)=>({
|
|
161
|
-
binding: service.binding,
|
|
162
|
-
service: service.service,
|
|
163
|
-
interface: 'fetch',
|
|
164
|
-
...void 0 === service.prefix ? {} : {
|
|
165
|
-
prefix: service.prefix
|
|
166
|
-
},
|
|
167
|
-
...void 0 === service.fragments ? {} : {
|
|
168
|
-
fragments: service.fragments
|
|
169
|
-
}
|
|
170
|
-
}));
|
|
171
|
-
return manifestBindings.length > 0 ? manifestBindings : void 0;
|
|
172
|
-
};
|
|
173
|
-
const createWranglerConfig = (appDirectory, modernConfig)=>{
|
|
174
|
-
const wrangler = getConfiguredWrangler(modernConfig);
|
|
175
|
-
const d1Databases = createWranglerD1Databases(modernConfig, wrangler.d1_databases);
|
|
176
|
-
const serviceBindings = createWorkerServiceBindings(modernConfig, wrangler.services);
|
|
177
|
-
const wranglerServices = createWranglerServices(serviceBindings);
|
|
178
|
-
return {
|
|
179
|
-
$schema: 'node_modules/wrangler/config-schema.json',
|
|
180
|
-
name: getConfiguredWorkerName(appDirectory, modernConfig),
|
|
181
|
-
compatibility_date: getCompatibilityDate(modernConfig),
|
|
182
|
-
...wrangler,
|
|
183
|
-
main: external_constants_js_namespaceObject.WORKER_ENTRY,
|
|
184
|
-
compatibility_flags: createWranglerCompatibilityFlags(wrangler.compatibility_flags),
|
|
185
|
-
assets: createWranglerAssetsConfig(wrangler.assets),
|
|
186
|
-
...void 0 === d1Databases ? {} : {
|
|
187
|
-
d1_databases: d1Databases
|
|
188
|
-
},
|
|
189
|
-
...void 0 === wranglerServices ? {} : {
|
|
190
|
-
services: wranglerServices
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
exports.createWorkerManifestServiceBindings = __webpack_exports__.createWorkerManifestServiceBindings;
|
|
195
|
-
exports.createWorkerServiceBindings = __webpack_exports__.createWorkerServiceBindings;
|
|
196
|
-
exports.createWranglerConfig = __webpack_exports__.createWranglerConfig;
|
|
197
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
198
|
-
"createWorkerManifestServiceBindings",
|
|
199
|
-
"createWorkerServiceBindings",
|
|
200
|
-
"createWranglerConfig"
|
|
201
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
202
|
-
Object.defineProperty(exports, '__esModule', {
|
|
203
|
-
value: true
|
|
204
|
-
});
|
|
@@ -1,108 +0,0 @@
|
|
|
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 CLOUDFLARE_WORKER_ENTRY = 'server/index.mjs';
|
|
31
|
-
const CLOUDFLARE_WORKER_MANIFEST = 'server/modern-worker-manifest.json';
|
|
32
|
-
const CLOUDFLARE_WRANGLER_CONFIG_FILE = 'wrangler.json';
|
|
33
|
-
const CLOUDFLARE_OUTPUT_PACKAGE_FILE = 'package.json';
|
|
34
|
-
const CLOUDFLARE_WORKER_PACKAGE_FILE = 'worker/package.json';
|
|
35
|
-
const CLOUDFLARE_ASSETS_BINDING = 'ASSETS';
|
|
36
|
-
const CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY = 'public';
|
|
37
|
-
const CLOUDFLARE_WORKER_BUNDLE_DIRECTORY = 'worker';
|
|
38
|
-
const CLOUDFLARE_RUNTIME_TYPE = 'cloudflare-module-worker';
|
|
39
|
-
const CLOUDFLARE_OUTPUT_PACKAGE_TYPE = 'module';
|
|
40
|
-
const CLOUDFLARE_WORKER_PACKAGE_TYPE = 'commonjs';
|
|
41
|
-
const CLOUDFLARE_WORKER_BUNDLE_FORMAT = 'commonjs';
|
|
42
|
-
const CLOUDFLARE_WORKER_NODE_BUILTINS = [
|
|
43
|
-
'async_hooks',
|
|
44
|
-
'buffer',
|
|
45
|
-
'crypto',
|
|
46
|
-
'events',
|
|
47
|
-
'fs/promises',
|
|
48
|
-
'module',
|
|
49
|
-
'path',
|
|
50
|
-
'process',
|
|
51
|
-
'stream',
|
|
52
|
-
'string_decoder',
|
|
53
|
-
'url',
|
|
54
|
-
'util'
|
|
55
|
-
];
|
|
56
|
-
const CLOUDFLARE_REQUIRED_COMPATIBILITY_FLAGS = [
|
|
57
|
-
'nodejs_compat',
|
|
58
|
-
'global_fetch_strictly_public'
|
|
59
|
-
];
|
|
60
|
-
__webpack_require__.d(__webpack_exports__, {}, {
|
|
61
|
-
CLOUDFLARE_ASSETS_BINDING: CLOUDFLARE_ASSETS_BINDING,
|
|
62
|
-
CLOUDFLARE_OUTPUT_PACKAGE_FILE: CLOUDFLARE_OUTPUT_PACKAGE_FILE,
|
|
63
|
-
CLOUDFLARE_OUTPUT_PACKAGE_TYPE: CLOUDFLARE_OUTPUT_PACKAGE_TYPE,
|
|
64
|
-
CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY: CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY,
|
|
65
|
-
CLOUDFLARE_REQUIRED_COMPATIBILITY_FLAGS: CLOUDFLARE_REQUIRED_COMPATIBILITY_FLAGS,
|
|
66
|
-
CLOUDFLARE_RUNTIME_TYPE: CLOUDFLARE_RUNTIME_TYPE,
|
|
67
|
-
CLOUDFLARE_WORKER_BUNDLE_DIRECTORY: CLOUDFLARE_WORKER_BUNDLE_DIRECTORY,
|
|
68
|
-
CLOUDFLARE_WORKER_BUNDLE_FORMAT: CLOUDFLARE_WORKER_BUNDLE_FORMAT,
|
|
69
|
-
CLOUDFLARE_WORKER_ENTRY: CLOUDFLARE_WORKER_ENTRY,
|
|
70
|
-
CLOUDFLARE_WORKER_MANIFEST: CLOUDFLARE_WORKER_MANIFEST,
|
|
71
|
-
CLOUDFLARE_WORKER_NODE_BUILTINS: CLOUDFLARE_WORKER_NODE_BUILTINS,
|
|
72
|
-
CLOUDFLARE_WORKER_PACKAGE_FILE: CLOUDFLARE_WORKER_PACKAGE_FILE,
|
|
73
|
-
CLOUDFLARE_WORKER_PACKAGE_TYPE: CLOUDFLARE_WORKER_PACKAGE_TYPE,
|
|
74
|
-
CLOUDFLARE_WRANGLER_CONFIG_FILE: CLOUDFLARE_WRANGLER_CONFIG_FILE
|
|
75
|
-
});
|
|
76
|
-
exports.CLOUDFLARE_ASSETS_BINDING = __webpack_exports__.CLOUDFLARE_ASSETS_BINDING;
|
|
77
|
-
exports.CLOUDFLARE_OUTPUT_PACKAGE_FILE = __webpack_exports__.CLOUDFLARE_OUTPUT_PACKAGE_FILE;
|
|
78
|
-
exports.CLOUDFLARE_OUTPUT_PACKAGE_TYPE = __webpack_exports__.CLOUDFLARE_OUTPUT_PACKAGE_TYPE;
|
|
79
|
-
exports.CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY = __webpack_exports__.CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY;
|
|
80
|
-
exports.CLOUDFLARE_REQUIRED_COMPATIBILITY_FLAGS = __webpack_exports__.CLOUDFLARE_REQUIRED_COMPATIBILITY_FLAGS;
|
|
81
|
-
exports.CLOUDFLARE_RUNTIME_TYPE = __webpack_exports__.CLOUDFLARE_RUNTIME_TYPE;
|
|
82
|
-
exports.CLOUDFLARE_WORKER_BUNDLE_DIRECTORY = __webpack_exports__.CLOUDFLARE_WORKER_BUNDLE_DIRECTORY;
|
|
83
|
-
exports.CLOUDFLARE_WORKER_BUNDLE_FORMAT = __webpack_exports__.CLOUDFLARE_WORKER_BUNDLE_FORMAT;
|
|
84
|
-
exports.CLOUDFLARE_WORKER_ENTRY = __webpack_exports__.CLOUDFLARE_WORKER_ENTRY;
|
|
85
|
-
exports.CLOUDFLARE_WORKER_MANIFEST = __webpack_exports__.CLOUDFLARE_WORKER_MANIFEST;
|
|
86
|
-
exports.CLOUDFLARE_WORKER_NODE_BUILTINS = __webpack_exports__.CLOUDFLARE_WORKER_NODE_BUILTINS;
|
|
87
|
-
exports.CLOUDFLARE_WORKER_PACKAGE_FILE = __webpack_exports__.CLOUDFLARE_WORKER_PACKAGE_FILE;
|
|
88
|
-
exports.CLOUDFLARE_WORKER_PACKAGE_TYPE = __webpack_exports__.CLOUDFLARE_WORKER_PACKAGE_TYPE;
|
|
89
|
-
exports.CLOUDFLARE_WRANGLER_CONFIG_FILE = __webpack_exports__.CLOUDFLARE_WRANGLER_CONFIG_FILE;
|
|
90
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
91
|
-
"CLOUDFLARE_ASSETS_BINDING",
|
|
92
|
-
"CLOUDFLARE_OUTPUT_PACKAGE_FILE",
|
|
93
|
-
"CLOUDFLARE_OUTPUT_PACKAGE_TYPE",
|
|
94
|
-
"CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY",
|
|
95
|
-
"CLOUDFLARE_REQUIRED_COMPATIBILITY_FLAGS",
|
|
96
|
-
"CLOUDFLARE_RUNTIME_TYPE",
|
|
97
|
-
"CLOUDFLARE_WORKER_BUNDLE_DIRECTORY",
|
|
98
|
-
"CLOUDFLARE_WORKER_BUNDLE_FORMAT",
|
|
99
|
-
"CLOUDFLARE_WORKER_ENTRY",
|
|
100
|
-
"CLOUDFLARE_WORKER_MANIFEST",
|
|
101
|
-
"CLOUDFLARE_WORKER_NODE_BUILTINS",
|
|
102
|
-
"CLOUDFLARE_WORKER_PACKAGE_FILE",
|
|
103
|
-
"CLOUDFLARE_WORKER_PACKAGE_TYPE",
|
|
104
|
-
"CLOUDFLARE_WRANGLER_CONFIG_FILE"
|
|
105
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
106
|
-
Object.defineProperty(exports, '__esModule', {
|
|
107
|
-
value: true
|
|
108
|
-
});
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.n = (module)=>{
|
|
5
|
-
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
-
__webpack_require__.d(getter, {
|
|
7
|
-
a: getter
|
|
8
|
-
});
|
|
9
|
-
return getter;
|
|
10
|
-
};
|
|
11
|
-
})();
|
|
12
|
-
(()=>{
|
|
13
|
-
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
-
var define = (defs, kind)=>{
|
|
15
|
-
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
[kind]: defs[key]
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
define(getters, "get");
|
|
21
|
-
define(values, "value");
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
(()=>{
|
|
25
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
26
|
-
})();
|
|
27
|
-
(()=>{
|
|
28
|
-
__webpack_require__.r = (exports1)=>{
|
|
29
|
-
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
30
|
-
value: 'Module'
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
33
|
-
value: true
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
})();
|
|
37
|
-
var __webpack_exports__ = {};
|
|
38
|
-
__webpack_require__.r(__webpack_exports__);
|
|
39
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
-
createCloudflareOutputPlan: ()=>createCloudflareOutputPlan
|
|
41
|
-
});
|
|
42
|
-
const external_node_path_namespaceObject = require("node:path");
|
|
43
|
-
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
44
|
-
const external_cloudflare_output_contract_js_namespaceObject = require("./cloudflare-output-contract.js");
|
|
45
|
-
const resolveOutput = (outputDirectory, relativePath)=>external_node_path_default().join(outputDirectory, relativePath);
|
|
46
|
-
function createCloudflareOutputPlan(outputDirectory) {
|
|
47
|
-
return {
|
|
48
|
-
outputDirectory,
|
|
49
|
-
requiredFiles: [
|
|
50
|
-
external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_ENTRY,
|
|
51
|
-
external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_MANIFEST,
|
|
52
|
-
external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WRANGLER_CONFIG_FILE,
|
|
53
|
-
external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_OUTPUT_PACKAGE_FILE
|
|
54
|
-
],
|
|
55
|
-
publicLeakDirectories: [
|
|
56
|
-
'server',
|
|
57
|
-
external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_BUNDLE_DIRECTORY
|
|
58
|
-
],
|
|
59
|
-
paths: {
|
|
60
|
-
workerEntry: resolveOutput(outputDirectory, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_ENTRY),
|
|
61
|
-
workerManifest: resolveOutput(outputDirectory, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_MANIFEST),
|
|
62
|
-
wranglerConfig: resolveOutput(outputDirectory, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WRANGLER_CONFIG_FILE),
|
|
63
|
-
outputPackage: resolveOutput(outputDirectory, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_OUTPUT_PACKAGE_FILE),
|
|
64
|
-
workerPackage: resolveOutput(outputDirectory, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_PACKAGE_FILE),
|
|
65
|
-
publicAssets: resolveOutput(outputDirectory, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY),
|
|
66
|
-
workerBundle: resolveOutput(outputDirectory, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_BUNDLE_DIRECTORY)
|
|
67
|
-
},
|
|
68
|
-
packages: {
|
|
69
|
-
output: {
|
|
70
|
-
type: external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_OUTPUT_PACKAGE_TYPE
|
|
71
|
-
},
|
|
72
|
-
worker: {
|
|
73
|
-
type: external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_PACKAGE_TYPE
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
wrangler: {
|
|
77
|
-
main: external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_ENTRY,
|
|
78
|
-
assets: {
|
|
79
|
-
binding: external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_ASSETS_BINDING,
|
|
80
|
-
directory: `./${external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY}`,
|
|
81
|
-
run_worker_first: true
|
|
82
|
-
},
|
|
83
|
-
requiredCompatibilityFlags: external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_REQUIRED_COMPATIBILITY_FLAGS
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
exports.createCloudflareOutputPlan = __webpack_exports__.createCloudflareOutputPlan;
|
|
88
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
89
|
-
"createCloudflareOutputPlan"
|
|
90
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
91
|
-
Object.defineProperty(exports, '__esModule', {
|
|
92
|
-
value: true
|
|
93
|
-
});
|
|
@@ -1,83 +0,0 @@
|
|
|
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
|
-
verifyDeliveryUnitIdentity: ()=>verifyDeliveryUnitIdentity
|
|
32
|
-
});
|
|
33
|
-
const universal_namespaceObject = require("@modern-js/utils/universal");
|
|
34
|
-
const external_issues_js_namespaceObject = require("./issues.js");
|
|
35
|
-
const verifyDeliveryUnitIdentity = (issues, manifest, manifestPath, declared)=>{
|
|
36
|
-
const stamped = manifest?.deliveryUnit;
|
|
37
|
-
const hasStamp = Boolean(stamped) && 'object' == typeof stamped;
|
|
38
|
-
if (declared) {
|
|
39
|
-
if (!hasStamp) return void (0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
40
|
-
code: 'missing-delivery-unit',
|
|
41
|
-
message: `Cloudflare worker manifest is missing the delivery-unit identity declared by the workspace topology (expected unitId ${declared.unitId}, buildMarker ${declared.buildMarker}).`,
|
|
42
|
-
path: manifestPath
|
|
43
|
-
});
|
|
44
|
-
for (const field of universal_namespaceObject.DELIVERY_UNIT_IDENTITY_FIELDS){
|
|
45
|
-
const stampedValue = (0, universal_namespaceObject.deliveryUnitIdentityFieldValue)(stamped, field);
|
|
46
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, stampedValue, declared[field], {
|
|
47
|
-
code: 'delivery-unit-drift',
|
|
48
|
-
message: `Cloudflare worker manifest deliveryUnit.${field} must match the topology delivery-unit record (expected ${declared[field]}, received ${stampedValue ?? 'undefined'}).`,
|
|
49
|
-
path: manifestPath
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (hasStamp && stamped.surfaces && 'object' == typeof stamped.surfaces) for (const surface of [
|
|
54
|
-
'ui',
|
|
55
|
-
'api'
|
|
56
|
-
]){
|
|
57
|
-
const marker = stamped.surfaces[surface];
|
|
58
|
-
if (!marker || 'object' != typeof marker) {
|
|
59
|
-
(0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
60
|
-
code: 'missing-delivery-unit',
|
|
61
|
-
message: `Cloudflare worker manifest is missing the ${surface} delivery-unit surface marker.`,
|
|
62
|
-
path: manifestPath
|
|
63
|
-
});
|
|
64
|
-
continue;
|
|
65
|
-
}
|
|
66
|
-
for (const field of universal_namespaceObject.DELIVERY_UNIT_IDENTITY_FIELDS){
|
|
67
|
-
const markerValue = (0, universal_namespaceObject.deliveryUnitIdentityFieldValue)(marker, field);
|
|
68
|
-
const stampedValue = (0, universal_namespaceObject.deliveryUnitIdentityFieldValue)(stamped, field);
|
|
69
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, markerValue, stampedValue, {
|
|
70
|
-
code: 'delivery-unit-drift',
|
|
71
|
-
message: `Cloudflare worker manifest ${surface} surface deliveryUnit.${field} must derive from one delivery-unit record (expected ${stampedValue ?? 'undefined'}, received ${markerValue ?? 'undefined'}).`,
|
|
72
|
-
path: manifestPath
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
exports.verifyDeliveryUnitIdentity = __webpack_exports__.verifyDeliveryUnitIdentity;
|
|
78
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
79
|
-
"verifyDeliveryUnitIdentity"
|
|
80
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
81
|
-
Object.defineProperty(exports, '__esModule', {
|
|
82
|
-
value: true
|
|
83
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
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 addIssue = (issues, issue)=>{
|
|
31
|
-
issues.push(issue);
|
|
32
|
-
};
|
|
33
|
-
const assertEqual = (issues, actual, expected, issue)=>{
|
|
34
|
-
if (actual !== expected) addIssue(issues, issue);
|
|
35
|
-
};
|
|
36
|
-
const assertFlag = (issues, flags, flag, issue)=>{
|
|
37
|
-
if (!Array.isArray(flags) || !flags.includes(flag)) addIssue(issues, issue);
|
|
38
|
-
};
|
|
39
|
-
__webpack_require__.d(__webpack_exports__, {}, {
|
|
40
|
-
addIssue: addIssue,
|
|
41
|
-
assertEqual: assertEqual,
|
|
42
|
-
assertFlag: assertFlag
|
|
43
|
-
});
|
|
44
|
-
exports.addIssue = __webpack_exports__.addIssue;
|
|
45
|
-
exports.assertEqual = __webpack_exports__.assertEqual;
|
|
46
|
-
exports.assertFlag = __webpack_exports__.assertFlag;
|
|
47
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
48
|
-
"addIssue",
|
|
49
|
-
"assertEqual",
|
|
50
|
-
"assertFlag"
|
|
51
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
52
|
-
Object.defineProperty(exports, '__esModule', {
|
|
53
|
-
value: true
|
|
54
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
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
|
-
verifyManifestShape: ()=>verifyManifestShape
|
|
32
|
-
});
|
|
33
|
-
const constants_js_namespaceObject = require("../cloudflare/constants.js");
|
|
34
|
-
const external_cloudflare_output_contract_js_namespaceObject = require("../cloudflare-output-contract.js");
|
|
35
|
-
const external_issues_js_namespaceObject = require("./issues.js");
|
|
36
|
-
const verifyManifestShape = (issues, manifest, manifestPath)=>{
|
|
37
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, manifest.runtime?.type, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_RUNTIME_TYPE, {
|
|
38
|
-
code: 'invalid-manifest',
|
|
39
|
-
message: 'Cloudflare output manifest runtime.type must be cloudflare-module-worker.',
|
|
40
|
-
path: manifestPath
|
|
41
|
-
});
|
|
42
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, manifest.runtime?.entry, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_ENTRY, {
|
|
43
|
-
code: 'invalid-manifest',
|
|
44
|
-
message: `Cloudflare output manifest runtime.entry must be ${external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_WORKER_ENTRY}.`,
|
|
45
|
-
path: manifestPath
|
|
46
|
-
});
|
|
47
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, manifest.runtime?.fetchExport, true, {
|
|
48
|
-
code: 'invalid-manifest',
|
|
49
|
-
message: 'Cloudflare output manifest runtime.fetchExport must be true.',
|
|
50
|
-
path: manifestPath
|
|
51
|
-
});
|
|
52
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, manifest.runtime?.nodeListen, false, {
|
|
53
|
-
code: 'invalid-manifest',
|
|
54
|
-
message: 'Cloudflare output manifest runtime.nodeListen must be false.',
|
|
55
|
-
path: manifestPath
|
|
56
|
-
});
|
|
57
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, manifest.assets?.binding, external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_ASSETS_BINDING, {
|
|
58
|
-
code: 'invalid-manifest',
|
|
59
|
-
message: 'Cloudflare output manifest assets.binding must be ASSETS.',
|
|
60
|
-
path: manifestPath
|
|
61
|
-
});
|
|
62
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, manifest.assets?.directory, `./${external_cloudflare_output_contract_js_namespaceObject.CLOUDFLARE_PUBLIC_ASSETS_DIRECTORY}`, {
|
|
63
|
-
code: 'invalid-manifest',
|
|
64
|
-
message: 'Cloudflare output manifest assets.directory must be ./public.',
|
|
65
|
-
path: manifestPath
|
|
66
|
-
});
|
|
67
|
-
(0, external_issues_js_namespaceObject.assertEqual)(issues, manifest.assets?.runWorkerFirst, true, {
|
|
68
|
-
code: 'invalid-manifest',
|
|
69
|
-
message: 'Cloudflare output manifest assets.runWorkerFirst must be true.',
|
|
70
|
-
path: manifestPath
|
|
71
|
-
});
|
|
72
|
-
if (!Array.isArray(manifest.routeSpec?.routes)) (0, external_issues_js_namespaceObject.addIssue)(issues, {
|
|
73
|
-
code: 'invalid-manifest',
|
|
74
|
-
message: 'Cloudflare output manifest routeSpec.routes must be array.',
|
|
75
|
-
path: manifestPath
|
|
76
|
-
});
|
|
77
|
-
if (manifest.bff?.runtimeFramework === 'effect') (0, external_issues_js_namespaceObject.assertEqual)(issues, manifest.bff.dispatcherExport, constants_js_namespaceObject.BFF_EFFECT_WORKER_DISPATCHER_EXPORT, {
|
|
78
|
-
code: 'invalid-manifest',
|
|
79
|
-
message: `Cloudflare Effect BFF manifest dispatcherExport must be ${constants_js_namespaceObject.BFF_EFFECT_WORKER_DISPATCHER_EXPORT}.`,
|
|
80
|
-
path: manifestPath
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
exports.verifyManifestShape = __webpack_exports__.verifyManifestShape;
|
|
84
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
85
|
-
"verifyManifestShape"
|
|
86
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
87
|
-
Object.defineProperty(exports, '__esModule', {
|
|
88
|
-
value: true
|
|
89
|
-
});
|