@modern-js/app-tools 2.58.1-alpha.2 → 2.58.1-alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/plugins/deploy/dependencies/index.js +2 -2
- package/dist/cjs/plugins/deploy/dependencies/utils.js +3 -3
- package/dist/esm/plugins/deploy/dependencies/index.js +2 -2
- package/dist/esm/plugins/deploy/dependencies/utils.js +4 -21
- package/dist/esm-node/plugins/deploy/dependencies/index.js +2 -2
- package/dist/esm-node/plugins/deploy/dependencies/utils.js +3 -3
- package/package.json +5 -5
@@ -40,9 +40,9 @@ var import_utils2 = require("./utils");
|
|
40
40
|
var import_nft = require("@vercel/nft");
|
41
41
|
const handleDependencies = async ({ appDir, serverRootDir, includeEntries, traceFiles = import_utils2.traceFiles, entryFilter, modifyPackageJson, copyWholePackage, cacheOptions = {
|
42
42
|
cacheDir: ".modern-js/deploy",
|
43
|
-
fileCache: true,
|
44
43
|
analysisCache: true,
|
45
|
-
|
44
|
+
fileCache: false,
|
45
|
+
symlinkCache: false
|
46
46
|
}, traceOptions }) => {
|
47
47
|
const base = "/";
|
48
48
|
const startTime = Date.now();
|
@@ -201,7 +201,7 @@ const traceFiles = async ({ entryFiles, serverRootDir, base = "/", cacheOptions,
|
|
201
201
|
const { analysisCache, fileCache, symlinkCache } = cache;
|
202
202
|
if (analysisCache || fileCache || symlinkCache) {
|
203
203
|
await import_utils.fs.ensureDir(cacheDir);
|
204
|
-
if (analysisCache) {
|
204
|
+
if (analysisCache && enableAnalysisCache) {
|
205
205
|
const newAnalysisCache = new Map(analysisCache);
|
206
206
|
for (const key of newAnalysisCache.keys()) {
|
207
207
|
if (!key.includes("node_modules/")) {
|
@@ -213,7 +213,7 @@ const traceFiles = async ({ entryFiles, serverRootDir, base = "/", cacheOptions,
|
|
213
213
|
console.log("write analysis cache finish");
|
214
214
|
})();
|
215
215
|
}
|
216
|
-
if (fileCache) {
|
216
|
+
if (fileCache && enableFileCache) {
|
217
217
|
const newFileCache = new Map(fileCache);
|
218
218
|
for (const key of newFileCache.keys()) {
|
219
219
|
if (!key.includes("node_modules/")) {
|
@@ -225,7 +225,7 @@ const traceFiles = async ({ entryFiles, serverRootDir, base = "/", cacheOptions,
|
|
225
225
|
console.log("write file cache finish");
|
226
226
|
})();
|
227
227
|
}
|
228
|
-
if (symlinkCache) {
|
228
|
+
if (symlinkCache && enableSymlinkCache) {
|
229
229
|
const newSymlinkCache = new Map(symlinkCache);
|
230
230
|
for (const key of newSymlinkCache.keys()) {
|
231
231
|
if (!key.includes("node_modules/")) {
|
@@ -19,9 +19,9 @@ var handleDependencies = function() {
|
|
19
19
|
case 0:
|
20
20
|
appDir = param.appDir, serverRootDir = param.serverRootDir, includeEntries = param.includeEntries, _param_traceFiles = param.traceFiles, traceFiles = _param_traceFiles === void 0 ? defaultTraceFiles : _param_traceFiles, entryFilter = param.entryFilter, modifyPackageJson = param.modifyPackageJson, copyWholePackage = param.copyWholePackage, _param_cacheOptions = param.cacheOptions, cacheOptions = _param_cacheOptions === void 0 ? {
|
21
21
|
cacheDir: ".modern-js/deploy",
|
22
|
-
fileCache: true,
|
23
22
|
analysisCache: true,
|
24
|
-
|
23
|
+
fileCache: false,
|
24
|
+
symlinkCache: false
|
25
25
|
} : _param_cacheOptions, traceOptions = param.traceOptions;
|
26
26
|
base = "/";
|
27
27
|
startTime = Date.now();
|
@@ -341,24 +341,7 @@ function serializeMap(map) {
|
|
341
341
|
return _serializeMap.apply(this, arguments);
|
342
342
|
}
|
343
343
|
function _serializeMap() {
|
344
|
-
_serializeMap =
|
345
|
-
// return JSON.stringify(map, (key, value) => {
|
346
|
-
// if (value instanceof Map) {
|
347
|
-
// return {
|
348
|
-
// dataType: 'Map',
|
349
|
-
// value: [...value.entries()],
|
350
|
-
// };
|
351
|
-
// }
|
352
|
-
// if (value instanceof Set) {
|
353
|
-
// return {
|
354
|
-
// dataType: 'Set',
|
355
|
-
// value: [...value],
|
356
|
-
// };
|
357
|
-
// }
|
358
|
-
// return value;
|
359
|
-
// });
|
360
|
-
// }
|
361
|
-
_async_to_generator(function(map) {
|
344
|
+
_serializeMap = _async_to_generator(function(map) {
|
362
345
|
var resolvedMap;
|
363
346
|
return _ts_generator(this, function(_state) {
|
364
347
|
switch (_state.label) {
|
@@ -567,7 +550,7 @@ var traceFiles = function() {
|
|
567
550
|
];
|
568
551
|
case 14:
|
569
552
|
_state.sent();
|
570
|
-
if (analysisCache1) {
|
553
|
+
if (analysisCache1 && enableAnalysisCache) {
|
571
554
|
newAnalysisCache = new Map(analysisCache1);
|
572
555
|
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
573
556
|
try {
|
@@ -621,7 +604,7 @@ var traceFiles = function() {
|
|
621
604
|
});
|
622
605
|
})();
|
623
606
|
}
|
624
|
-
if (fileCache1) {
|
607
|
+
if (fileCache1 && enableFileCache) {
|
625
608
|
newFileCache = new Map(fileCache1);
|
626
609
|
_iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
627
610
|
try {
|
@@ -675,7 +658,7 @@ var traceFiles = function() {
|
|
675
658
|
});
|
676
659
|
})();
|
677
660
|
}
|
678
|
-
if (symlinkCache1) {
|
661
|
+
if (symlinkCache1 && enableSymlinkCache) {
|
679
662
|
newSymlinkCache = new Map(symlinkCache1);
|
680
663
|
_iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
681
664
|
try {
|
@@ -6,9 +6,9 @@ import { linkPackage, writePackage, isFile, findEntryFiles, traceFiles as defaul
|
|
6
6
|
import { nodeFileTrace } from "@vercel/nft";
|
7
7
|
const handleDependencies = async ({ appDir, serverRootDir, includeEntries, traceFiles = defaultTraceFiles, entryFilter, modifyPackageJson, copyWholePackage, cacheOptions = {
|
8
8
|
cacheDir: ".modern-js/deploy",
|
9
|
-
fileCache: true,
|
10
9
|
analysisCache: true,
|
11
|
-
|
10
|
+
fileCache: false,
|
11
|
+
symlinkCache: false
|
12
12
|
}, traceOptions }) => {
|
13
13
|
const base = "/";
|
14
14
|
const startTime = Date.now();
|
@@ -160,7 +160,7 @@ const traceFiles = async ({ entryFiles, serverRootDir, base = "/", cacheOptions,
|
|
160
160
|
const { analysisCache, fileCache, symlinkCache } = cache;
|
161
161
|
if (analysisCache || fileCache || symlinkCache) {
|
162
162
|
await fse.ensureDir(cacheDir);
|
163
|
-
if (analysisCache) {
|
163
|
+
if (analysisCache && enableAnalysisCache) {
|
164
164
|
const newAnalysisCache = new Map(analysisCache);
|
165
165
|
for (const key of newAnalysisCache.keys()) {
|
166
166
|
if (!key.includes("node_modules/")) {
|
@@ -172,7 +172,7 @@ const traceFiles = async ({ entryFiles, serverRootDir, base = "/", cacheOptions,
|
|
172
172
|
console.log("write analysis cache finish");
|
173
173
|
})();
|
174
174
|
}
|
175
|
-
if (fileCache) {
|
175
|
+
if (fileCache && enableFileCache) {
|
176
176
|
const newFileCache = new Map(fileCache);
|
177
177
|
for (const key of newFileCache.keys()) {
|
178
178
|
if (!key.includes("node_modules/")) {
|
@@ -184,7 +184,7 @@ const traceFiles = async ({ entryFiles, serverRootDir, base = "/", cacheOptions,
|
|
184
184
|
console.log("write file cache finish");
|
185
185
|
})();
|
186
186
|
}
|
187
|
-
if (symlinkCache) {
|
187
|
+
if (symlinkCache && enableSymlinkCache) {
|
188
188
|
const newSymlinkCache = new Map(symlinkCache);
|
189
189
|
for (const key of newSymlinkCache.keys()) {
|
190
190
|
if (!key.includes("node_modules/")) {
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.58.1-alpha.
|
18
|
+
"version": "2.58.1-alpha.3",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -89,18 +89,18 @@
|
|
89
89
|
"mlly": "^1.6.1",
|
90
90
|
"pkg-types": "^1.1.0",
|
91
91
|
"std-env": "^3.7.0",
|
92
|
-
"@modern-js/core": "2.58.0",
|
93
92
|
"@modern-js/node-bundle-require": "2.58.0",
|
93
|
+
"@modern-js/core": "2.58.0",
|
94
94
|
"@modern-js/plugin": "2.58.0",
|
95
|
-
"@modern-js/prod-server": "2.58.0",
|
96
95
|
"@modern-js/plugin-i18n": "2.58.0",
|
97
96
|
"@modern-js/plugin-lint": "2.58.0",
|
98
97
|
"@modern-js/server-core": "2.58.0",
|
99
|
-
"@modern-js/server": "2.58.0",
|
100
98
|
"@modern-js/server-utils": "2.58.0",
|
101
|
-
"@modern-js/
|
99
|
+
"@modern-js/server": "2.58.0",
|
102
100
|
"@modern-js/types": "2.58.0",
|
103
101
|
"@modern-js/utils": "2.58.0",
|
102
|
+
"@modern-js/prod-server": "2.58.0",
|
103
|
+
"@modern-js/uni-builder": "2.58.0",
|
104
104
|
"@modern-js/rsbuild-plugin-esbuild": "2.58.0",
|
105
105
|
"@modern-js/plugin-data-loader": "2.58.0"
|
106
106
|
},
|