@bleedingdev/modern-js-app-tools 3.5.0-ultramodern.36 → 3.5.0-ultramodern.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/builder/shared/lazyCompilation.js +2 -10
- package/dist/cjs/commands/index.js +0 -4
- package/dist/cjs/index.js +18 -53
- package/dist/cjs/plugins/deploy/index.js +4 -4
- package/dist/cjs/plugins/deploy/platforms/cloudflare/index.js +2 -2
- package/dist/cjs/plugins/deploy/platforms/cloudflare/security-policies.js +2 -20
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.js +0 -9
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.js +0 -6
- package/dist/esm/builder/shared/lazyCompilation.mjs +1 -3
- package/dist/esm/commands/index.mjs +0 -1
- package/dist/esm/index.mjs +1 -4
- package/dist/esm/plugins/analyze/getHtmlTemplate.mjs +2 -2
- package/dist/esm/plugins/analyze/isDefaultExportFunction.mjs +2 -2
- package/dist/esm/plugins/deploy/index.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare/index.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare/security-policies.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +1 -1
- package/dist/esm-node/builder/shared/lazyCompilation.mjs +1 -3
- package/dist/esm-node/commands/index.mjs +0 -1
- package/dist/esm-node/index.mjs +1 -4
- package/dist/esm-node/plugins/analyze/getHtmlTemplate.mjs +2 -2
- package/dist/esm-node/plugins/analyze/isDefaultExportFunction.mjs +2 -2
- package/dist/esm-node/plugins/deploy/index.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/index.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare/security-policies.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +1 -1
- package/dist/types/builder/generator/createCopyPattern.d.ts +7 -5
- package/dist/types/builder/shared/lazyCompilation.d.ts +2 -4
- package/dist/types/commands/index.d.ts +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/plugins/deploy/platforms/cloudflare/i18n-worker.d.ts +3 -2
- package/dist/types/plugins/deploy/platforms/cloudflare/security-policies.d.ts +0 -37
- package/dist/types/plugins/deploy/platforms/cloudflare/worker-manifest.d.ts +14 -1
- package/dist/types/plugins/deploy/platforms/cloudflare-output-plan.d.ts +2 -1
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.d.ts +1 -8
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.d.ts +3 -4
- package/package.json +22 -22
- package/dist/cjs/baseline.js +0 -45
- package/dist/cjs/commands/runtime.js +0 -196
- package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier.js +0 -62
- package/dist/cjs/plugins/deploy/platforms/cloudflare.js +0 -40
- package/dist/cjs/ultramodern/designSystem.js +0 -123
- package/dist/esm/baseline.mjs +0 -4
- package/dist/esm/commands/runtime.mjs +0 -146
- package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier.mjs +0 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare.mjs +0 -1
- package/dist/esm/ultramodern/designSystem.mjs +0 -73
- package/dist/esm-node/baseline.mjs +0 -5
- package/dist/esm-node/commands/runtime.mjs +0 -147
- package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier.mjs +0 -2
- package/dist/esm-node/plugins/deploy/platforms/cloudflare.mjs +0 -2
- package/dist/esm-node/ultramodern/designSystem.mjs +0 -74
- package/dist/types/baseline.d.ts +0 -16
- package/dist/types/commands/runtime.d.ts +0 -12
- package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier.d.ts +0 -1
- package/dist/types/plugins/deploy/platforms/cloudflare.d.ts +0 -1
- package/dist/types/ultramodern/designSystem.d.ts +0 -54
|
@@ -30,11 +30,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
31
|
aggregateEagerRouteComponentFiles: ()=>aggregateEagerRouteComponentFiles,
|
|
32
32
|
buildRouteEagerLazyCompilationTest: ()=>buildRouteEagerLazyCompilationTest,
|
|
33
|
-
buildSSRLazyCompilationTest: ()=>buildSSRLazyCompilationTest,
|
|
34
33
|
collectRouteComponentFiles: ()=>utils_namespaceObject.collectRouteComponentFiles,
|
|
35
34
|
normalizeModulePath: ()=>utils_namespaceObject.normalizeModulePath,
|
|
36
|
-
planRouteEagerLazyCompilation: ()=>planRouteEagerLazyCompilation
|
|
37
|
-
planSSRLazyCompilation: ()=>planSSRLazyCompilation
|
|
35
|
+
planRouteEagerLazyCompilation: ()=>planRouteEagerLazyCompilation
|
|
38
36
|
});
|
|
39
37
|
const utils_namespaceObject = require("@modern-js/utils");
|
|
40
38
|
function aggregateEagerRouteComponentFiles(byEntry) {
|
|
@@ -58,7 +56,6 @@ function buildRouteEagerLazyCompilationTest(eagerRouteFiles, userTest) {
|
|
|
58
56
|
return userTestFn(m);
|
|
59
57
|
};
|
|
60
58
|
}
|
|
61
|
-
const buildSSRLazyCompilationTest = buildRouteEagerLazyCompilationTest;
|
|
62
59
|
function planRouteEagerLazyCompilation(current, info) {
|
|
63
60
|
if (!current) return {
|
|
64
61
|
apply: false
|
|
@@ -80,22 +77,17 @@ function planRouteEagerLazyCompilation(current, info) {
|
|
|
80
77
|
}
|
|
81
78
|
};
|
|
82
79
|
}
|
|
83
|
-
const planSSRLazyCompilation = planRouteEagerLazyCompilation;
|
|
84
80
|
exports.aggregateEagerRouteComponentFiles = __webpack_exports__.aggregateEagerRouteComponentFiles;
|
|
85
81
|
exports.buildRouteEagerLazyCompilationTest = __webpack_exports__.buildRouteEagerLazyCompilationTest;
|
|
86
|
-
exports.buildSSRLazyCompilationTest = __webpack_exports__.buildSSRLazyCompilationTest;
|
|
87
82
|
exports.collectRouteComponentFiles = __webpack_exports__.collectRouteComponentFiles;
|
|
88
83
|
exports.normalizeModulePath = __webpack_exports__.normalizeModulePath;
|
|
89
84
|
exports.planRouteEagerLazyCompilation = __webpack_exports__.planRouteEagerLazyCompilation;
|
|
90
|
-
exports.planSSRLazyCompilation = __webpack_exports__.planSSRLazyCompilation;
|
|
91
85
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
92
86
|
"aggregateEagerRouteComponentFiles",
|
|
93
87
|
"buildRouteEagerLazyCompilationTest",
|
|
94
|
-
"buildSSRLazyCompilationTest",
|
|
95
88
|
"collectRouteComponentFiles",
|
|
96
89
|
"normalizeModulePath",
|
|
97
|
-
"planRouteEagerLazyCompilation"
|
|
98
|
-
"planSSRLazyCompilation"
|
|
90
|
+
"planRouteEagerLazyCompilation"
|
|
99
91
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
100
92
|
Object.defineProperty(exports, '__esModule', {
|
|
101
93
|
value: true
|
|
@@ -33,11 +33,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
33
33
|
devCommand: ()=>devCommand,
|
|
34
34
|
infoCommand: ()=>infoCommand,
|
|
35
35
|
inspectCommand: ()=>inspectCommand,
|
|
36
|
-
runtimeCommand: ()=>external_runtime_js_namespaceObject.runtimeCommand,
|
|
37
36
|
serverCommand: ()=>serverCommand
|
|
38
37
|
});
|
|
39
38
|
const index_js_namespaceObject = require("../locale/index.js");
|
|
40
|
-
const external_runtime_js_namespaceObject = require("./runtime.js");
|
|
41
39
|
const devCommand = async (program, api)=>{
|
|
42
40
|
program.command('dev').alias('start').usage('[options]').description(index_js_namespaceObject.i18n.t(index_js_namespaceObject.localeKeys.command.dev.describe)).option('-c --config <config>', index_js_namespaceObject.i18n.t(index_js_namespaceObject.localeKeys.command.shared.config)).option('-e --entry [entry...]', index_js_namespaceObject.i18n.t(index_js_namespaceObject.localeKeys.command.dev.entry)).option('--analyze', index_js_namespaceObject.i18n.t(index_js_namespaceObject.localeKeys.command.shared.analyze)).option('--api-only', index_js_namespaceObject.i18n.t(index_js_namespaceObject.localeKeys.command.dev.apiOnly)).option('--web-only', index_js_namespaceObject.i18n.t(index_js_namespaceObject.localeKeys.command.dev.webOnly)).action(async (options)=>{
|
|
43
41
|
const { dev } = await import("./dev.js");
|
|
@@ -84,7 +82,6 @@ exports.deployCommand = __webpack_exports__.deployCommand;
|
|
|
84
82
|
exports.devCommand = __webpack_exports__.devCommand;
|
|
85
83
|
exports.infoCommand = __webpack_exports__.infoCommand;
|
|
86
84
|
exports.inspectCommand = __webpack_exports__.inspectCommand;
|
|
87
|
-
exports.runtimeCommand = __webpack_exports__.runtimeCommand;
|
|
88
85
|
exports.serverCommand = __webpack_exports__.serverCommand;
|
|
89
86
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
90
87
|
"buildCommand",
|
|
@@ -92,7 +89,6 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
92
89
|
"devCommand",
|
|
93
90
|
"infoCommand",
|
|
94
91
|
"inspectCommand",
|
|
95
|
-
"runtimeCommand",
|
|
96
92
|
"serverCommand"
|
|
97
93
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
98
94
|
Object.defineProperty(exports, '__esModule', {
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"./baseline" (module) {
|
|
4
|
-
module.exports = require("./baseline.js");
|
|
5
|
-
},
|
|
6
3
|
"./commands/dev" (module) {
|
|
7
4
|
module.exports = require("./commands/dev.js");
|
|
8
5
|
},
|
|
@@ -51,9 +48,6 @@ var __webpack_modules__ = {
|
|
|
51
48
|
"./types?6efa" (module) {
|
|
52
49
|
module.exports = require("./types/index.js");
|
|
53
50
|
},
|
|
54
|
-
"./ultramodern/designSystem" (module) {
|
|
55
|
-
module.exports = require("./ultramodern/designSystem.js");
|
|
56
|
-
},
|
|
57
51
|
"./utils/generateWatchFiles" (module) {
|
|
58
52
|
module.exports = require("./utils/generateWatchFiles.js");
|
|
59
53
|
},
|
|
@@ -154,37 +148,9 @@ var __webpack_exports__ = {};
|
|
|
154
148
|
var _utils_generateWatchFiles__rspack_import_15 = __webpack_require__("./utils/generateWatchFiles");
|
|
155
149
|
var _utils_initAppContext__rspack_import_16 = __webpack_require__("./utils/initAppContext");
|
|
156
150
|
var _utils_restart__rspack_import_17 = __webpack_require__("./utils/restart");
|
|
157
|
-
var
|
|
158
|
-
var __rspack_reexport = {};
|
|
159
|
-
for(const __rspack_import_key in _baseline__rspack_import_18)if ([
|
|
160
|
-
"dev",
|
|
161
|
-
"resolveModernRsbuildConfig",
|
|
162
|
-
"mergeConfig",
|
|
163
|
-
"appTools",
|
|
164
|
-
"default",
|
|
165
|
-
"serve",
|
|
166
|
-
"generateWatchFiles",
|
|
167
|
-
"initAppContext",
|
|
168
|
-
"defineConfig"
|
|
169
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_baseline__rspack_import_18[__rspack_import_key];
|
|
170
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
171
|
-
var _defineConfig__rspack_import_19 = __webpack_require__("./defineConfig");
|
|
172
|
-
var __rspack_reexport = {};
|
|
173
|
-
for(const __rspack_import_key in _defineConfig__rspack_import_19)if ([
|
|
174
|
-
"dev",
|
|
175
|
-
"resolveModernRsbuildConfig",
|
|
176
|
-
"mergeConfig",
|
|
177
|
-
"appTools",
|
|
178
|
-
"default",
|
|
179
|
-
"serve",
|
|
180
|
-
"generateWatchFiles",
|
|
181
|
-
"initAppContext",
|
|
182
|
-
"defineConfig"
|
|
183
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_defineConfig__rspack_import_19[__rspack_import_key];
|
|
184
|
-
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
185
|
-
var _presetUltramodern__rspack_import_20 = __webpack_require__("./presetUltramodern");
|
|
151
|
+
var _defineConfig__rspack_import_18 = __webpack_require__("./defineConfig");
|
|
186
152
|
var __rspack_reexport = {};
|
|
187
|
-
for(const __rspack_import_key in
|
|
153
|
+
for(const __rspack_import_key in _defineConfig__rspack_import_18)if ([
|
|
188
154
|
"dev",
|
|
189
155
|
"resolveModernRsbuildConfig",
|
|
190
156
|
"mergeConfig",
|
|
@@ -194,11 +160,11 @@ var __webpack_exports__ = {};
|
|
|
194
160
|
"generateWatchFiles",
|
|
195
161
|
"initAppContext",
|
|
196
162
|
"defineConfig"
|
|
197
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
163
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_defineConfig__rspack_import_18[__rspack_import_key];
|
|
198
164
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
199
|
-
var
|
|
165
|
+
var _presetUltramodern__rspack_import_19 = __webpack_require__("./presetUltramodern");
|
|
200
166
|
var __rspack_reexport = {};
|
|
201
|
-
for(const __rspack_import_key in
|
|
167
|
+
for(const __rspack_import_key in _presetUltramodern__rspack_import_19)if ([
|
|
202
168
|
"dev",
|
|
203
169
|
"resolveModernRsbuildConfig",
|
|
204
170
|
"mergeConfig",
|
|
@@ -208,14 +174,14 @@ var __webpack_exports__ = {};
|
|
|
208
174
|
"generateWatchFiles",
|
|
209
175
|
"initAppContext",
|
|
210
176
|
"defineConfig"
|
|
211
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
177
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_presetUltramodern__rspack_import_19[__rspack_import_key];
|
|
212
178
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
213
|
-
var
|
|
214
|
-
var
|
|
215
|
-
var
|
|
216
|
-
var
|
|
179
|
+
var _commands_dev__rspack_import_20 = __webpack_require__("./commands/dev");
|
|
180
|
+
var _commands_serve__rspack_import_21 = __webpack_require__("./commands/serve");
|
|
181
|
+
var _rsbuild__rspack_import_22 = __webpack_require__("./rsbuild");
|
|
182
|
+
var _types__rspack_import_23 = __webpack_require__("./types?6efa");
|
|
217
183
|
var __rspack_reexport = {};
|
|
218
|
-
for(const __rspack_import_key in
|
|
184
|
+
for(const __rspack_import_key in _types__rspack_import_23)if ([
|
|
219
185
|
"dev",
|
|
220
186
|
"resolveModernRsbuildConfig",
|
|
221
187
|
"mergeConfig",
|
|
@@ -225,9 +191,9 @@ var __webpack_exports__ = {};
|
|
|
225
191
|
"generateWatchFiles",
|
|
226
192
|
"initAppContext",
|
|
227
193
|
"defineConfig"
|
|
228
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
194
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_types__rspack_import_23[__rspack_import_key];
|
|
229
195
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
230
|
-
var
|
|
196
|
+
var _modern_js_plugin_cli__rspack_import_24 = __webpack_require__("@modern-js/plugin/cli");
|
|
231
197
|
const appTools = ()=>({
|
|
232
198
|
name: '@modern-js/app-tools',
|
|
233
199
|
usePlugins: [
|
|
@@ -281,7 +247,6 @@ var __webpack_exports__ = {};
|
|
|
281
247
|
(0, _commands__rspack_import_5.deployCommand)(program, api);
|
|
282
248
|
(0, _commands__rspack_import_5.inspectCommand)(program, api);
|
|
283
249
|
(0, _commands__rspack_import_5.infoCommand)(program, api);
|
|
284
|
-
await (0, _commands__rspack_import_5.runtimeCommand)(program, api);
|
|
285
250
|
(0, _modern_js_utils__rspack_import_3.deprecatedCommands)(program);
|
|
286
251
|
});
|
|
287
252
|
api.onPrepare(async ()=>{
|
|
@@ -333,13 +298,13 @@ var __webpack_exports__ = {};
|
|
|
333
298
|
});
|
|
334
299
|
const __rspack_default_export = appTools;
|
|
335
300
|
__webpack_require__.d(__webpack_exports__, {
|
|
336
|
-
defineConfig: ()=>
|
|
337
|
-
dev: ()=>
|
|
301
|
+
defineConfig: ()=>_defineConfig__rspack_import_18.defineConfig,
|
|
302
|
+
dev: ()=>_commands_dev__rspack_import_20.dev,
|
|
338
303
|
generateWatchFiles: ()=>_utils_generateWatchFiles__rspack_import_15.generateWatchFiles,
|
|
339
304
|
initAppContext: ()=>_utils_initAppContext__rspack_import_16.initAppContext,
|
|
340
|
-
mergeConfig: ()=>
|
|
341
|
-
resolveModernRsbuildConfig: ()=>
|
|
342
|
-
serve: ()=>
|
|
305
|
+
mergeConfig: ()=>_modern_js_plugin_cli__rspack_import_24.mergeConfig,
|
|
306
|
+
resolveModernRsbuildConfig: ()=>_rsbuild__rspack_import_22.resolveModernRsbuildConfig,
|
|
307
|
+
serve: ()=>_commands_serve__rspack_import_21.serve
|
|
343
308
|
}, {
|
|
344
309
|
appTools: appTools,
|
|
345
310
|
default: __rspack_default_export
|
|
@@ -33,18 +33,18 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
33
33
|
resolveDeployTarget: ()=>resolveDeployTarget
|
|
34
34
|
});
|
|
35
35
|
const external_std_env_namespaceObject = require("std-env");
|
|
36
|
-
const
|
|
36
|
+
const index_js_namespaceObject = require("./platforms/cloudflare/index.js");
|
|
37
37
|
const gh_pages_js_namespaceObject = require("./platforms/gh-pages.js");
|
|
38
38
|
const netlify_js_namespaceObject = require("./platforms/netlify.js");
|
|
39
39
|
const node_js_namespaceObject = require("./platforms/node.js");
|
|
40
40
|
const vercel_js_namespaceObject = require("./platforms/vercel.js");
|
|
41
|
-
const
|
|
41
|
+
const external_utils_index_js_namespaceObject = require("./utils/index.js");
|
|
42
42
|
const deployPresets = {
|
|
43
43
|
node: node_js_namespaceObject.createNodePreset,
|
|
44
44
|
vercel: vercel_js_namespaceObject.createVercelPreset,
|
|
45
45
|
netlify: netlify_js_namespaceObject.createNetlifyPreset,
|
|
46
46
|
ghPages: gh_pages_js_namespaceObject.createGhPagesPreset,
|
|
47
|
-
cloudflare:
|
|
47
|
+
cloudflare: index_js_namespaceObject.createCloudflarePreset
|
|
48
48
|
};
|
|
49
49
|
const getSupportedDeployTargets = ()=>Object.keys(deployPresets);
|
|
50
50
|
const isDeployTarget = (target)=>Object.prototype.hasOwnProperty.call(deployPresets, target);
|
|
@@ -59,7 +59,7 @@ const normalizeDetectedProvider = (value)=>value ? providerDeployTargets[value]
|
|
|
59
59
|
const resolveDeployTarget = (modernConfig, envDeployTarget = process.env.MODERNJS_DEPLOY, detectedProvider = external_std_env_namespaceObject.provider)=>modernConfig.deploy?.target || envDeployTarget || normalizeDetectedProvider(detectedProvider) || 'node';
|
|
60
60
|
async function getDeployPreset(appContext, modernConfig, deployTarget, api) {
|
|
61
61
|
const { appDirectory, distDirectory, metaName } = appContext;
|
|
62
|
-
const { useSSR, useAPI, useWebServer } = (0,
|
|
62
|
+
const { useSSR, useAPI, useWebServer } = (0, external_utils_index_js_namespaceObject.getProjectUsage)(appDirectory, distDirectory, metaName);
|
|
63
63
|
const needModernServer = useSSR || useAPI || useWebServer;
|
|
64
64
|
if (!isDeployTarget(deployTarget)) throw new Error(`Unknown deploy target: '${deployTarget}'. deploy.target or MODERNJS_DEPLOY should be one of: ${getSupportedDeployTargets().join(', ')}.`);
|
|
65
65
|
const createPreset = deployPresets[deployTarget];
|
|
@@ -44,7 +44,7 @@ var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_no
|
|
|
44
44
|
const utils_namespaceObject = require("@modern-js/utils");
|
|
45
45
|
const index_js_namespaceObject = require("../../utils/index.js");
|
|
46
46
|
const external_cloudflare_output_plan_js_namespaceObject = require("../cloudflare-output-plan.js");
|
|
47
|
-
const
|
|
47
|
+
const external_cloudflare_output_verifier_index_js_namespaceObject = require("../cloudflare-output-verifier/index.js");
|
|
48
48
|
const external_artifacts_js_namespaceObject = require("./artifacts.js");
|
|
49
49
|
const external_constants_js_namespaceObject = require("./constants.js");
|
|
50
50
|
const external_delivery_unit_js_namespaceObject = require("./delivery-unit.js");
|
|
@@ -107,7 +107,7 @@ const createCloudflarePreset = ({ appContext, modernConfig })=>{
|
|
|
107
107
|
const manifest = await utils_namespaceObject.fs.readJSON(workerManifestPath);
|
|
108
108
|
await utils_namespaceObject.fs.writeFile(workerEntryPath, template.replace('p_workerManifest', JSON.stringify(manifest, null, 2)).replace('p_workerModuleLoaders', (0, external_worker_manifest_js_namespaceObject.createWorkerModuleLoaders)(manifest)));
|
|
109
109
|
const topologyDeliveryUnit = await (0, external_delivery_unit_js_namespaceObject.resolveTopologyDeliveryUnit)(appDirectory);
|
|
110
|
-
await (0,
|
|
110
|
+
await (0, external_cloudflare_output_verifier_index_js_namespaceObject.assertCloudflareOutput)({
|
|
111
111
|
outputDirectory,
|
|
112
112
|
importWorker: false,
|
|
113
113
|
...topologyDeliveryUnit ? {
|
|
@@ -194,29 +194,11 @@ const createCloudflareWorkerSecurityPolicy = (modernConfig)=>{
|
|
|
194
194
|
};
|
|
195
195
|
};
|
|
196
196
|
__webpack_require__.d(__webpack_exports__, {}, {
|
|
197
|
-
|
|
198
|
-
DEFAULT_CSP_DIRECTIVES: DEFAULT_CSP_DIRECTIVES,
|
|
199
|
-
DEFAULT_SECURITY_HEADERS: DEFAULT_SECURITY_HEADERS,
|
|
200
|
-
createCloudflareWorkerCorsPolicy: createCloudflareWorkerCorsPolicy,
|
|
201
|
-
createCloudflareWorkerSecurityPolicy: createCloudflareWorkerSecurityPolicy,
|
|
202
|
-
createContentSecurityPolicy: createContentSecurityPolicy,
|
|
203
|
-
createNoindexPolicy: createNoindexPolicy
|
|
197
|
+
createCloudflareWorkerSecurityPolicy: createCloudflareWorkerSecurityPolicy
|
|
204
198
|
});
|
|
205
|
-
exports.DEFAULT_CORS_ALLOWED_METHODS = __webpack_exports__.DEFAULT_CORS_ALLOWED_METHODS;
|
|
206
|
-
exports.DEFAULT_CSP_DIRECTIVES = __webpack_exports__.DEFAULT_CSP_DIRECTIVES;
|
|
207
|
-
exports.DEFAULT_SECURITY_HEADERS = __webpack_exports__.DEFAULT_SECURITY_HEADERS;
|
|
208
|
-
exports.createCloudflareWorkerCorsPolicy = __webpack_exports__.createCloudflareWorkerCorsPolicy;
|
|
209
199
|
exports.createCloudflareWorkerSecurityPolicy = __webpack_exports__.createCloudflareWorkerSecurityPolicy;
|
|
210
|
-
exports.createContentSecurityPolicy = __webpack_exports__.createContentSecurityPolicy;
|
|
211
|
-
exports.createNoindexPolicy = __webpack_exports__.createNoindexPolicy;
|
|
212
200
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
213
|
-
"
|
|
214
|
-
"DEFAULT_CSP_DIRECTIVES",
|
|
215
|
-
"DEFAULT_SECURITY_HEADERS",
|
|
216
|
-
"createCloudflareWorkerCorsPolicy",
|
|
217
|
-
"createCloudflareWorkerSecurityPolicy",
|
|
218
|
-
"createContentSecurityPolicy",
|
|
219
|
-
"createNoindexPolicy"
|
|
201
|
+
"createCloudflareWorkerSecurityPolicy"
|
|
220
202
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
221
203
|
Object.defineProperty(exports, '__esModule', {
|
|
222
204
|
value: true
|
|
@@ -37,9 +37,6 @@ var __webpack_require__ = {};
|
|
|
37
37
|
var __webpack_exports__ = {};
|
|
38
38
|
__webpack_require__.r(__webpack_exports__);
|
|
39
39
|
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
-
FORBIDDEN_MUTATION_PATTERNS: ()=>FORBIDDEN_MUTATION_PATTERNS,
|
|
41
|
-
SOURCE_SCAN_FILE_PATTERN: ()=>SOURCE_SCAN_FILE_PATTERN,
|
|
42
|
-
SOURCE_SCAN_IGNORED_DIRECTORY_NAMES: ()=>SOURCE_SCAN_IGNORED_DIRECTORY_NAMES,
|
|
43
40
|
verifyCloudflareOutputMutationPolicy: ()=>verifyCloudflareOutputMutationPolicy,
|
|
44
41
|
walkFiles: ()=>walkFiles
|
|
45
42
|
});
|
|
@@ -141,15 +138,9 @@ const verifyCloudflareOutputMutationPolicy = async (options)=>{
|
|
|
141
138
|
issues
|
|
142
139
|
};
|
|
143
140
|
};
|
|
144
|
-
exports.FORBIDDEN_MUTATION_PATTERNS = __webpack_exports__.FORBIDDEN_MUTATION_PATTERNS;
|
|
145
|
-
exports.SOURCE_SCAN_FILE_PATTERN = __webpack_exports__.SOURCE_SCAN_FILE_PATTERN;
|
|
146
|
-
exports.SOURCE_SCAN_IGNORED_DIRECTORY_NAMES = __webpack_exports__.SOURCE_SCAN_IGNORED_DIRECTORY_NAMES;
|
|
147
141
|
exports.verifyCloudflareOutputMutationPolicy = __webpack_exports__.verifyCloudflareOutputMutationPolicy;
|
|
148
142
|
exports.walkFiles = __webpack_exports__.walkFiles;
|
|
149
143
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
150
|
-
"FORBIDDEN_MUTATION_PATTERNS",
|
|
151
|
-
"SOURCE_SCAN_FILE_PATTERN",
|
|
152
|
-
"SOURCE_SCAN_IGNORED_DIRECTORY_NAMES",
|
|
153
144
|
"verifyCloudflareOutputMutationPolicy",
|
|
154
145
|
"walkFiles"
|
|
155
146
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
@@ -37,9 +37,7 @@ var __webpack_require__ = {};
|
|
|
37
37
|
var __webpack_exports__ = {};
|
|
38
38
|
__webpack_require__.r(__webpack_exports__);
|
|
39
39
|
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
-
FORBIDDEN_WORKER_BUNDLE_REFERENCE_PATTERNS: ()=>FORBIDDEN_WORKER_BUNDLE_REFERENCE_PATTERNS,
|
|
41
40
|
getEffectBffWorker: ()=>getEffectBffWorker,
|
|
42
|
-
getReferencedRouteWorkers: ()=>getReferencedRouteWorkers,
|
|
43
41
|
getWorkerBundleReferences: ()=>getWorkerBundleReferences,
|
|
44
42
|
missingWorkerBundleMessage: ()=>missingWorkerBundleMessage,
|
|
45
43
|
resolveWorkerBundleReference: ()=>resolveWorkerBundleReference,
|
|
@@ -114,18 +112,14 @@ const verifyWorkerImport = async (issues, entryPath)=>{
|
|
|
114
112
|
});
|
|
115
113
|
}
|
|
116
114
|
};
|
|
117
|
-
exports.FORBIDDEN_WORKER_BUNDLE_REFERENCE_PATTERNS = __webpack_exports__.FORBIDDEN_WORKER_BUNDLE_REFERENCE_PATTERNS;
|
|
118
115
|
exports.getEffectBffWorker = __webpack_exports__.getEffectBffWorker;
|
|
119
|
-
exports.getReferencedRouteWorkers = __webpack_exports__.getReferencedRouteWorkers;
|
|
120
116
|
exports.getWorkerBundleReferences = __webpack_exports__.getWorkerBundleReferences;
|
|
121
117
|
exports.missingWorkerBundleMessage = __webpack_exports__.missingWorkerBundleMessage;
|
|
122
118
|
exports.resolveWorkerBundleReference = __webpack_exports__.resolveWorkerBundleReference;
|
|
123
119
|
exports.verifyWorkerBundleReferences = __webpack_exports__.verifyWorkerBundleReferences;
|
|
124
120
|
exports.verifyWorkerImport = __webpack_exports__.verifyWorkerImport;
|
|
125
121
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
126
|
-
"FORBIDDEN_WORKER_BUNDLE_REFERENCE_PATTERNS",
|
|
127
122
|
"getEffectBffWorker",
|
|
128
|
-
"getReferencedRouteWorkers",
|
|
129
123
|
"getWorkerBundleReferences",
|
|
130
124
|
"missingWorkerBundleMessage",
|
|
131
125
|
"resolveWorkerBundleReference",
|
|
@@ -20,7 +20,6 @@ function buildRouteEagerLazyCompilationTest(eagerRouteFiles, userTest) {
|
|
|
20
20
|
return userTestFn(m);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const buildSSRLazyCompilationTest = buildRouteEagerLazyCompilationTest;
|
|
24
23
|
function planRouteEagerLazyCompilation(current, info) {
|
|
25
24
|
if (!current) return {
|
|
26
25
|
apply: false
|
|
@@ -42,5 +41,4 @@ function planRouteEagerLazyCompilation(current, info) {
|
|
|
42
41
|
}
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
export { aggregateEagerRouteComponentFiles, buildRouteEagerLazyCompilationTest, buildSSRLazyCompilationTest, collectRouteComponentFiles, normalizeModulePath, planRouteEagerLazyCompilation, planSSRLazyCompilation };
|
|
44
|
+
export { aggregateEagerRouteComponentFiles, buildRouteEagerLazyCompilationTest, collectRouteComponentFiles, normalizeModulePath, planRouteEagerLazyCompilation };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { getLocaleLanguage } from "@modern-js/i18n-utils/language-detector";
|
|
|
3
3
|
import { createAsyncHook } from "@modern-js/plugin";
|
|
4
4
|
import { cleanRequireCache, deprecatedCommands, emptyDir, getArgv, getCommand } from "@modern-js/utils";
|
|
5
5
|
import path from "path";
|
|
6
|
-
import { buildCommand, deployCommand, devCommand, infoCommand, inspectCommand,
|
|
6
|
+
import { buildCommand, deployCommand, devCommand, infoCommand, inspectCommand, serverCommand } from "./commands/index.mjs";
|
|
7
7
|
import { compatPlugin } from "./compat/index.mjs";
|
|
8
8
|
import { DEFAULT_RUNTIME_CONFIG_FILE } from "./constants.mjs";
|
|
9
9
|
import { i18n } from "./locale/index.mjs";
|
|
@@ -16,10 +16,8 @@ import serverRuntime from "./plugins/serverRuntime.mjs";
|
|
|
16
16
|
import { generateWatchFiles } from "./utils/generateWatchFiles.mjs";
|
|
17
17
|
import { initAppContext } from "./utils/initAppContext.mjs";
|
|
18
18
|
import { restart } from "./utils/restart.mjs";
|
|
19
|
-
export * from "./baseline.mjs";
|
|
20
19
|
export * from "./defineConfig.mjs";
|
|
21
20
|
export * from "./presetUltramodern.mjs";
|
|
22
|
-
export * from "./ultramodern/designSystem.mjs";
|
|
23
21
|
export * from "./types/index.mjs";
|
|
24
22
|
const appTools = ()=>({
|
|
25
23
|
name: '@modern-js/app-tools',
|
|
@@ -74,7 +72,6 @@ const appTools = ()=>({
|
|
|
74
72
|
deployCommand(program, api);
|
|
75
73
|
inspectCommand(program, api);
|
|
76
74
|
infoCommand(program, api);
|
|
77
|
-
await runtimeCommand(program, api);
|
|
78
75
|
deprecatedCommands(program);
|
|
79
76
|
});
|
|
80
77
|
api.onPrepare(async ()=>{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { findExists, fs } from "@modern-js/utils";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { HTML_PARTIALS_EXTENSIONS, HTML_PARTIALS_FOLDER } from "./constants.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as __rspack_external__templates_mjs_ab577925 from "./templates.mjs";
|
|
5
5
|
const findPartials = (dir, entryName, position)=>{
|
|
6
6
|
if (fs.existsSync(dir)) {
|
|
7
7
|
const base = findExists(HTML_PARTIALS_EXTENSIONS.map((ext)=>path.resolve(dir, `${position}${ext}`)));
|
|
@@ -82,7 +82,7 @@ const getHtmlTemplate = async (entrypoints, hooks, { appContext, config })=>{
|
|
|
82
82
|
partials: getModifyHtmlPartials(partials)
|
|
83
83
|
});
|
|
84
84
|
const templatePath = path.resolve(internalDirectory, entryName, 'index.html');
|
|
85
|
-
fs.outputFileSync(templatePath,
|
|
85
|
+
fs.outputFileSync(templatePath, __rspack_external__templates_mjs_ab577925.html(partials), 'utf8');
|
|
86
86
|
htmlTemplates[entryName] = templatePath.replace(/\\/g, '/');
|
|
87
87
|
partialsByEntrypoint[entryName] = partials;
|
|
88
88
|
const bottomTemplate = findPartials(htmlDir, name, "bottom");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { parse } from "@babel/parser";
|
|
2
2
|
import traverse from "@babel/traverse";
|
|
3
3
|
import fs from "fs";
|
|
4
|
-
import * as
|
|
5
|
-
const isFunction = (node)=>
|
|
4
|
+
import * as __rspack_external__babel_types_6e8337dd from "@babel/types";
|
|
5
|
+
const isFunction = (node)=>__rspack_external__babel_types_6e8337dd.isFunctionDeclaration(node) || __rspack_external__babel_types_6e8337dd.isFunctionExpression(node) || __rspack_external__babel_types_6e8337dd.isArrowFunctionExpression(node);
|
|
6
6
|
const isDefaultExportFunction = (file)=>{
|
|
7
7
|
if (!file || !fs.existsSync(file)) return false;
|
|
8
8
|
const ast = parse(fs.readFileSync(file, 'utf8'), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { provider } from "std-env";
|
|
2
|
-
import { createCloudflarePreset } from "./platforms/cloudflare.mjs";
|
|
2
|
+
import { createCloudflarePreset } from "./platforms/cloudflare/index.mjs";
|
|
3
3
|
import { createGhPagesPreset } from "./platforms/gh-pages.mjs";
|
|
4
4
|
import { createNetlifyPreset } from "./platforms/netlify.mjs";
|
|
5
5
|
import { createNodePreset } from "./platforms/node.mjs";
|
|
@@ -2,7 +2,7 @@ import node_path from "node:path";
|
|
|
2
2
|
import { fs } from "@modern-js/utils";
|
|
3
3
|
import { readTemplate } from "../../utils/index.mjs";
|
|
4
4
|
import { createCloudflareOutputPlan } from "../cloudflare-output-plan.mjs";
|
|
5
|
-
import { assertCloudflareOutput } from "../cloudflare-output-verifier.mjs";
|
|
5
|
+
import { assertCloudflareOutput } from "../cloudflare-output-verifier/index.mjs";
|
|
6
6
|
import { copyCloudflareArtifacts, copyCloudflareD1Migrations, copyCloudflarePublicAssets, getCloudflareArtifacts, getCloudflarePublicAssets } from "./artifacts.mjs";
|
|
7
7
|
import { ROUTE_SPEC_FILE, ROUTE_SPEC_OUTPUT, WORKER_BUNDLE_DIRECTORY } from "./constants.mjs";
|
|
8
8
|
import { resolveTopologyDeliveryUnit, resolveWorkerDeliveryUnitStamp } from "./delivery-unit.mjs";
|
|
@@ -164,4 +164,4 @@ const createCloudflareWorkerSecurityPolicy = (modernConfig)=>{
|
|
|
164
164
|
reason: security?.reason
|
|
165
165
|
};
|
|
166
166
|
};
|
|
167
|
-
export {
|
|
167
|
+
export { createCloudflareWorkerSecurityPolicy };
|
|
@@ -94,4 +94,4 @@ const verifyCloudflareOutputMutationPolicy = async (options)=>{
|
|
|
94
94
|
issues
|
|
95
95
|
};
|
|
96
96
|
};
|
|
97
|
-
export {
|
|
97
|
+
export { verifyCloudflareOutputMutationPolicy, walkFiles };
|
|
@@ -65,4 +65,4 @@ const verifyWorkerImport = async (issues, entryPath)=>{
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
export {
|
|
68
|
+
export { getEffectBffWorker, getWorkerBundleReferences, missingWorkerBundleMessage, resolveWorkerBundleReference, verifyWorkerBundleReferences, verifyWorkerImport };
|
|
@@ -21,7 +21,6 @@ function buildRouteEagerLazyCompilationTest(eagerRouteFiles, userTest) {
|
|
|
21
21
|
return userTestFn(m);
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
const buildSSRLazyCompilationTest = buildRouteEagerLazyCompilationTest;
|
|
25
24
|
function planRouteEagerLazyCompilation(current, info) {
|
|
26
25
|
if (!current) return {
|
|
27
26
|
apply: false
|
|
@@ -43,5 +42,4 @@ function planRouteEagerLazyCompilation(current, info) {
|
|
|
43
42
|
}
|
|
44
43
|
};
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
export { aggregateEagerRouteComponentFiles, buildRouteEagerLazyCompilationTest, buildSSRLazyCompilationTest, collectRouteComponentFiles, normalizeModulePath, planRouteEagerLazyCompilation, planSSRLazyCompilation };
|
|
45
|
+
export { aggregateEagerRouteComponentFiles, buildRouteEagerLazyCompilationTest, collectRouteComponentFiles, normalizeModulePath, planRouteEagerLazyCompilation };
|
package/dist/esm-node/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { getLocaleLanguage } from "@modern-js/i18n-utils/language-detector";
|
|
|
5
5
|
import { createAsyncHook } from "@modern-js/plugin";
|
|
6
6
|
import { cleanRequireCache, deprecatedCommands, emptyDir, getArgv, getCommand } from "@modern-js/utils";
|
|
7
7
|
import path from "path";
|
|
8
|
-
import { buildCommand, deployCommand, devCommand, infoCommand, inspectCommand,
|
|
8
|
+
import { buildCommand, deployCommand, devCommand, infoCommand, inspectCommand, serverCommand } from "./commands/index.mjs";
|
|
9
9
|
import { compatPlugin } from "./compat/index.mjs";
|
|
10
10
|
import { DEFAULT_RUNTIME_CONFIG_FILE } from "./constants.mjs";
|
|
11
11
|
import { i18n } from "./locale/index.mjs";
|
|
@@ -18,10 +18,8 @@ import serverRuntime from "./plugins/serverRuntime.mjs";
|
|
|
18
18
|
import { generateWatchFiles } from "./utils/generateWatchFiles.mjs";
|
|
19
19
|
import { initAppContext } from "./utils/initAppContext.mjs";
|
|
20
20
|
import { restart } from "./utils/restart.mjs";
|
|
21
|
-
export * from "./baseline.mjs";
|
|
22
21
|
export * from "./defineConfig.mjs";
|
|
23
22
|
export * from "./presetUltramodern.mjs";
|
|
24
|
-
export * from "./ultramodern/designSystem.mjs";
|
|
25
23
|
export * from "./types/index.mjs";
|
|
26
24
|
const appTools = ()=>({
|
|
27
25
|
name: '@modern-js/app-tools',
|
|
@@ -76,7 +74,6 @@ const appTools = ()=>({
|
|
|
76
74
|
deployCommand(program, api);
|
|
77
75
|
inspectCommand(program, api);
|
|
78
76
|
infoCommand(program, api);
|
|
79
|
-
await runtimeCommand(program, api);
|
|
80
77
|
deprecatedCommands(program);
|
|
81
78
|
});
|
|
82
79
|
api.onPrepare(async ()=>{
|
|
@@ -2,7 +2,7 @@ import "node:module";
|
|
|
2
2
|
import { findExists, fs } from "@modern-js/utils";
|
|
3
3
|
import path from "path";
|
|
4
4
|
import { HTML_PARTIALS_EXTENSIONS, HTML_PARTIALS_FOLDER } from "./constants.mjs";
|
|
5
|
-
import * as
|
|
5
|
+
import * as __rspack_external__templates_mjs_ab577925 from "./templates.mjs";
|
|
6
6
|
const findPartials = (dir, entryName, position)=>{
|
|
7
7
|
if (fs.existsSync(dir)) {
|
|
8
8
|
const base = findExists(HTML_PARTIALS_EXTENSIONS.map((ext)=>path.resolve(dir, `${position}${ext}`)));
|
|
@@ -83,7 +83,7 @@ const getHtmlTemplate = async (entrypoints, hooks, { appContext, config })=>{
|
|
|
83
83
|
partials: getModifyHtmlPartials(partials)
|
|
84
84
|
});
|
|
85
85
|
const templatePath = path.resolve(internalDirectory, entryName, 'index.html');
|
|
86
|
-
fs.outputFileSync(templatePath,
|
|
86
|
+
fs.outputFileSync(templatePath, __rspack_external__templates_mjs_ab577925.html(partials), 'utf8');
|
|
87
87
|
htmlTemplates[entryName] = templatePath.replace(/\\/g, '/');
|
|
88
88
|
partialsByEntrypoint[entryName] = partials;
|
|
89
89
|
const bottomTemplate = findPartials(htmlDir, name, "bottom");
|
|
@@ -2,8 +2,8 @@ import "node:module";
|
|
|
2
2
|
import { parse } from "@babel/parser";
|
|
3
3
|
import traverse from "@babel/traverse";
|
|
4
4
|
import fs from "fs";
|
|
5
|
-
import * as
|
|
6
|
-
const isFunction = (node)=>
|
|
5
|
+
import * as __rspack_external__babel_types_6e8337dd from "@babel/types";
|
|
6
|
+
const isFunction = (node)=>__rspack_external__babel_types_6e8337dd.isFunctionDeclaration(node) || __rspack_external__babel_types_6e8337dd.isFunctionExpression(node) || __rspack_external__babel_types_6e8337dd.isArrowFunctionExpression(node);
|
|
7
7
|
const isDefaultExportFunction = (file)=>{
|
|
8
8
|
if (!file || !fs.existsSync(file)) return false;
|
|
9
9
|
const ast = parse(fs.readFileSync(file, 'utf8'), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import { provider } from "std-env";
|
|
3
|
-
import { createCloudflarePreset } from "./platforms/cloudflare.mjs";
|
|
3
|
+
import { createCloudflarePreset } from "./platforms/cloudflare/index.mjs";
|
|
4
4
|
import { createGhPagesPreset } from "./platforms/gh-pages.mjs";
|
|
5
5
|
import { createNetlifyPreset } from "./platforms/netlify.mjs";
|
|
6
6
|
import { createNodePreset } from "./platforms/node.mjs";
|
|
@@ -3,7 +3,7 @@ import node_path from "node:path";
|
|
|
3
3
|
import { fs } from "@modern-js/utils";
|
|
4
4
|
import { readTemplate } from "../../utils/index.mjs";
|
|
5
5
|
import { createCloudflareOutputPlan } from "../cloudflare-output-plan.mjs";
|
|
6
|
-
import { assertCloudflareOutput } from "../cloudflare-output-verifier.mjs";
|
|
6
|
+
import { assertCloudflareOutput } from "../cloudflare-output-verifier/index.mjs";
|
|
7
7
|
import { copyCloudflareArtifacts, copyCloudflareD1Migrations, copyCloudflarePublicAssets, getCloudflareArtifacts, getCloudflarePublicAssets } from "./artifacts.mjs";
|
|
8
8
|
import { ROUTE_SPEC_FILE, ROUTE_SPEC_OUTPUT, WORKER_BUNDLE_DIRECTORY } from "./constants.mjs";
|
|
9
9
|
import { resolveTopologyDeliveryUnit, resolveWorkerDeliveryUnitStamp } from "./delivery-unit.mjs";
|
|
@@ -165,4 +165,4 @@ const createCloudflareWorkerSecurityPolicy = (modernConfig)=>{
|
|
|
165
165
|
reason: security?.reason
|
|
166
166
|
};
|
|
167
167
|
};
|
|
168
|
-
export {
|
|
168
|
+
export { createCloudflareWorkerSecurityPolicy };
|
package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs
CHANGED
|
@@ -95,4 +95,4 @@ const verifyCloudflareOutputMutationPolicy = async (options)=>{
|
|
|
95
95
|
issues
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
|
-
export {
|
|
98
|
+
export { verifyCloudflareOutputMutationPolicy, walkFiles };
|
package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs
CHANGED
|
@@ -66,4 +66,4 @@ const verifyWorkerImport = async (issues, entryPath)=>{
|
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
export {
|
|
69
|
+
export { getEffectBffWorker, getWorkerBundleReferences, missingWorkerBundleMessage, resolveWorkerBundleReference, verifyWorkerBundleReferences, verifyWorkerImport };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Rspack, RspackChain } from '@rsbuild/core';
|
|
2
2
|
import type { AppNormalizedConfig } from '../../types';
|
|
3
3
|
import type { AppToolsContext } from '../../types/plugin';
|
|
4
|
+
declare const info: (file: {
|
|
5
|
+
sourceFilename: string;
|
|
6
|
+
}) => {
|
|
7
|
+
minimized: boolean;
|
|
8
|
+
};
|
|
4
9
|
export declare function createPublicPattern(appContext: AppToolsContext, config: AppNormalizedConfig, chain: RspackChain): {
|
|
5
|
-
info:
|
|
6
|
-
sourceFilename: string;
|
|
7
|
-
}) => {
|
|
8
|
-
minimized: boolean;
|
|
9
|
-
};
|
|
10
|
+
info: typeof info;
|
|
10
11
|
from: string;
|
|
11
12
|
to: string;
|
|
12
13
|
context: string;
|
|
@@ -14,3 +15,4 @@ export declare function createPublicPattern(appContext: AppToolsContext, config:
|
|
|
14
15
|
transform: (content: Buffer, absoluteFrom: string) => string | Buffer<ArrayBufferLike>;
|
|
15
16
|
};
|
|
16
17
|
export declare function createUploadPattern(appContext: AppToolsContext, config: AppNormalizedConfig): Rspack.CopyRspackPluginOptions['patterns']['0'];
|
|
18
|
+
export {};
|