@modern-js/entry-generator 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/node/main.js +2502 -433
- package/package.json +3 -4
package/dist/js/node/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/******/ (() => { // webpackBootstrap
|
|
2
2
|
/******/ var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 49547:
|
|
5
5
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
@@ -16,7 +16,7 @@ var _easyFormCli = __webpack_require__(62408);
|
|
|
16
16
|
|
|
17
17
|
var _inquirerTypes = __webpack_require__(78659);
|
|
18
18
|
|
|
19
|
-
var _constant = __webpack_require__(
|
|
19
|
+
var _constant = __webpack_require__(82409);
|
|
20
20
|
|
|
21
21
|
const registerListPrompt = inquirer => {
|
|
22
22
|
try {
|
|
@@ -100,7 +100,7 @@ exports.listNode = listNode;
|
|
|
100
100
|
|
|
101
101
|
/***/ }),
|
|
102
102
|
|
|
103
|
-
/***/
|
|
103
|
+
/***/ 82409:
|
|
104
104
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
105
105
|
|
|
106
106
|
"use strict";
|
|
@@ -125,7 +125,7 @@ exports.CLI_TYPE = CLI_TYPE;
|
|
|
125
125
|
|
|
126
126
|
/***/ }),
|
|
127
127
|
|
|
128
|
-
/***/
|
|
128
|
+
/***/ 96354:
|
|
129
129
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
130
130
|
|
|
131
131
|
"use strict";
|
|
@@ -135,7 +135,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
135
135
|
value: true
|
|
136
136
|
}));
|
|
137
137
|
|
|
138
|
-
var _ListNode = __webpack_require__(
|
|
138
|
+
var _ListNode = __webpack_require__(49547);
|
|
139
139
|
|
|
140
140
|
Object.keys(_ListNode).forEach(function (key) {
|
|
141
141
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -150,7 +150,7 @@ Object.keys(_ListNode).forEach(function (key) {
|
|
|
150
150
|
|
|
151
151
|
/***/ }),
|
|
152
152
|
|
|
153
|
-
/***/
|
|
153
|
+
/***/ 80355:
|
|
154
154
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
155
155
|
|
|
156
156
|
"use strict";
|
|
@@ -175,7 +175,7 @@ Object.defineProperty(exports, "transformSchema", ({
|
|
|
175
175
|
|
|
176
176
|
var _merge2 = _interopRequireDefault(__webpack_require__(13904));
|
|
177
177
|
|
|
178
|
-
var _fsExtra = _interopRequireDefault(__webpack_require__(
|
|
178
|
+
var _fsExtra = _interopRequireDefault(__webpack_require__(83950));
|
|
179
179
|
|
|
180
180
|
var _semver = _interopRequireDefault(__webpack_require__(20962));
|
|
181
181
|
|
|
@@ -191,11 +191,11 @@ var _codesmithApiHandlebars = __webpack_require__(12291);
|
|
|
191
191
|
|
|
192
192
|
var _easyFormCli = __webpack_require__(62408);
|
|
193
193
|
|
|
194
|
-
var _transformSchema = __webpack_require__(
|
|
194
|
+
var _transformSchema = __webpack_require__(90115);
|
|
195
195
|
|
|
196
|
-
var handlers = _interopRequireWildcard(__webpack_require__(
|
|
196
|
+
var handlers = _interopRequireWildcard(__webpack_require__(96354));
|
|
197
197
|
|
|
198
|
-
var _locale = __webpack_require__(
|
|
198
|
+
var _locale = __webpack_require__(88506);
|
|
199
199
|
|
|
200
200
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
201
201
|
|
|
@@ -232,9 +232,9 @@ class AppAPI {
|
|
|
232
232
|
return false;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
if (!(await (0, _codesmithApiNpm.canUseYarn)()) && !(await (0, _codesmithApiNpm.canUsePnpm)())) {
|
|
236
|
-
this.generatorCore.logger.debug("can't use yarn or pnpm");
|
|
237
|
-
this.generatorCore.logger.warn(_locale.i18n.t(_locale.localeKeys.environment.
|
|
235
|
+
if (!(await (0, _codesmithApiNpm.canUseYarn)()) && !(await (0, _codesmithApiNpm.canUsePnpm)()) && !(await (0, _codesmithApiNpm.canUseNpm)())) {
|
|
236
|
+
this.generatorCore.logger.debug("can't use yarn or pnpm or npm");
|
|
237
|
+
this.generatorCore.logger.warn(_locale.i18n.t(_locale.localeKeys.environment.yarn_pnpm_npm));
|
|
238
238
|
return false;
|
|
239
239
|
}
|
|
240
240
|
|
|
@@ -410,7 +410,7 @@ exports.AppAPI = AppAPI;
|
|
|
410
410
|
|
|
411
411
|
/***/ }),
|
|
412
412
|
|
|
413
|
-
/***/
|
|
413
|
+
/***/ 5664:
|
|
414
414
|
/***/ ((__unused_webpack_module, exports) => {
|
|
415
415
|
|
|
416
416
|
"use strict";
|
|
@@ -424,7 +424,7 @@ const EN_LOCALE = {
|
|
|
424
424
|
environment: {
|
|
425
425
|
node_version: 'please upgrade node to lts version',
|
|
426
426
|
nvm_install: 'please install nvm first',
|
|
427
|
-
|
|
427
|
+
yarn_pnpm_npm: 'please install yarn or pnpm or npm first'
|
|
428
428
|
},
|
|
429
429
|
install: {
|
|
430
430
|
failed: 'dependencies install failed, please execute `{command}` to install the dependencies ',
|
|
@@ -449,7 +449,7 @@ exports.EN_LOCALE = EN_LOCALE;
|
|
|
449
449
|
|
|
450
450
|
/***/ }),
|
|
451
451
|
|
|
452
|
-
/***/
|
|
452
|
+
/***/ 88506:
|
|
453
453
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
454
454
|
|
|
455
455
|
"use strict";
|
|
@@ -466,11 +466,11 @@ Object.defineProperty(exports, "I18n", ({
|
|
|
466
466
|
}));
|
|
467
467
|
exports.localeKeys = exports.i18n = void 0;
|
|
468
468
|
|
|
469
|
-
var _pluginI18n = __webpack_require__(
|
|
469
|
+
var _pluginI18n = __webpack_require__(54207);
|
|
470
470
|
|
|
471
|
-
var _zh = __webpack_require__(
|
|
471
|
+
var _zh = __webpack_require__(12214);
|
|
472
472
|
|
|
473
|
-
var _en = __webpack_require__(
|
|
473
|
+
var _en = __webpack_require__(5664);
|
|
474
474
|
|
|
475
475
|
const i18n = new _pluginI18n.I18n();
|
|
476
476
|
exports.i18n = i18n;
|
|
@@ -482,7 +482,7 @@ exports.localeKeys = localeKeys;
|
|
|
482
482
|
|
|
483
483
|
/***/ }),
|
|
484
484
|
|
|
485
|
-
/***/
|
|
485
|
+
/***/ 12214:
|
|
486
486
|
/***/ ((__unused_webpack_module, exports) => {
|
|
487
487
|
|
|
488
488
|
"use strict";
|
|
@@ -496,7 +496,7 @@ const ZH_LOCALE = {
|
|
|
496
496
|
environment: {
|
|
497
497
|
node_version: '请升级 Node 版本至 LIS',
|
|
498
498
|
nvm_install: '检测到环境中未安装 nvm,请先安装 nvm',
|
|
499
|
-
|
|
499
|
+
yarn_pnpm_npm: '检测到环境中未安装包管理工具,请先安装 yarn 或 pnpm 或 npm'
|
|
500
500
|
},
|
|
501
501
|
install: {
|
|
502
502
|
failed: '依赖自动安装失败,请手动执行 `{command}` 命令进行安装',
|
|
@@ -521,7 +521,7 @@ exports.ZH_LOCALE = ZH_LOCALE;
|
|
|
521
521
|
|
|
522
522
|
/***/ }),
|
|
523
523
|
|
|
524
|
-
/***/
|
|
524
|
+
/***/ 90115:
|
|
525
525
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
526
526
|
|
|
527
527
|
"use strict";
|
|
@@ -1352,7 +1352,7 @@ var _ora = _interopRequireDefault(__webpack_require__(60483));
|
|
|
1352
1352
|
|
|
1353
1353
|
var _chalk = _interopRequireDefault(__webpack_require__(9834));
|
|
1354
1354
|
|
|
1355
|
-
var _fsExtra = _interopRequireDefault(__webpack_require__(
|
|
1355
|
+
var _fsExtra = _interopRequireDefault(__webpack_require__(83950));
|
|
1356
1356
|
|
|
1357
1357
|
var _FsMaterial = __webpack_require__(77410);
|
|
1358
1358
|
|
|
@@ -1871,7 +1871,7 @@ exports.FsResource = exports.FS_RESOURCE = void 0;
|
|
|
1871
1871
|
|
|
1872
1872
|
var _path = _interopRequireDefault(__webpack_require__(71017));
|
|
1873
1873
|
|
|
1874
|
-
var _fsExtra = _interopRequireDefault(__webpack_require__(
|
|
1874
|
+
var _fsExtra = _interopRequireDefault(__webpack_require__(83950));
|
|
1875
1875
|
|
|
1876
1876
|
var _constants = __webpack_require__(97578);
|
|
1877
1877
|
|
|
@@ -1999,7 +1999,7 @@ exports.downloadPackage = downloadPackage;
|
|
|
1999
1999
|
|
|
2000
2000
|
var _os = _interopRequireDefault(__webpack_require__(22037));
|
|
2001
2001
|
|
|
2002
|
-
var _fsExtra = _interopRequireDefault(__webpack_require__(
|
|
2002
|
+
var _fsExtra = _interopRequireDefault(__webpack_require__(83950));
|
|
2003
2003
|
|
|
2004
2004
|
var _axios = _interopRequireDefault(__webpack_require__(45114));
|
|
2005
2005
|
|
|
@@ -2144,7 +2144,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2144
2144
|
}));
|
|
2145
2145
|
exports.fsExists = fsExists;
|
|
2146
2146
|
|
|
2147
|
-
var _fsExtra = _interopRequireDefault(__webpack_require__(
|
|
2147
|
+
var _fsExtra = _interopRequireDefault(__webpack_require__(83950));
|
|
2148
2148
|
|
|
2149
2149
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2150
2150
|
|
|
@@ -2177,7 +2177,7 @@ exports.getGeneratorDir = getGeneratorDir;
|
|
|
2177
2177
|
|
|
2178
2178
|
var _path = _interopRequireDefault(__webpack_require__(71017));
|
|
2179
2179
|
|
|
2180
|
-
var _fsExtra = _interopRequireDefault(__webpack_require__(
|
|
2180
|
+
var _fsExtra = _interopRequireDefault(__webpack_require__(83950));
|
|
2181
2181
|
|
|
2182
2182
|
var _fsExists = __webpack_require__(88129);
|
|
2183
2183
|
|
|
@@ -2489,7 +2489,7 @@ var _path = _interopRequireDefault(__webpack_require__(71017));
|
|
|
2489
2489
|
|
|
2490
2490
|
var _execa = _interopRequireDefault(__webpack_require__(16228));
|
|
2491
2491
|
|
|
2492
|
-
var _fsExtra = _interopRequireDefault(__webpack_require__(
|
|
2492
|
+
var _fsExtra = _interopRequireDefault(__webpack_require__(83950));
|
|
2493
2493
|
|
|
2494
2494
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2495
2495
|
|
|
@@ -5689,7 +5689,7 @@ exports.pointer = pointer;
|
|
|
5689
5689
|
|
|
5690
5690
|
/***/ }),
|
|
5691
5691
|
|
|
5692
|
-
/***/
|
|
5692
|
+
/***/ 54207:
|
|
5693
5693
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
5694
5694
|
|
|
5695
5695
|
"use strict";
|
|
@@ -5702,7 +5702,7 @@ exports.I18n = void 0;
|
|
|
5702
5702
|
|
|
5703
5703
|
var _get2 = _interopRequireDefault(__webpack_require__(71189));
|
|
5704
5704
|
|
|
5705
|
-
var _utils = __webpack_require__(
|
|
5705
|
+
var _utils = __webpack_require__(41083);
|
|
5706
5706
|
|
|
5707
5707
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5708
5708
|
|
|
@@ -5771,7 +5771,7 @@ exports.I18n = I18n;
|
|
|
5771
5771
|
|
|
5772
5772
|
/***/ }),
|
|
5773
5773
|
|
|
5774
|
-
/***/
|
|
5774
|
+
/***/ 41083:
|
|
5775
5775
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
5776
5776
|
|
|
5777
5777
|
"use strict";
|
|
@@ -40084,6 +40084,1980 @@ module.exports = {
|
|
|
40084
40084
|
}
|
|
40085
40085
|
|
|
40086
40086
|
|
|
40087
|
+
/***/ }),
|
|
40088
|
+
|
|
40089
|
+
/***/ 16345:
|
|
40090
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40091
|
+
|
|
40092
|
+
"use strict";
|
|
40093
|
+
|
|
40094
|
+
|
|
40095
|
+
const fs = __webpack_require__(62204)
|
|
40096
|
+
const path = __webpack_require__(71017)
|
|
40097
|
+
const mkdirsSync = (__webpack_require__(59915).mkdirsSync)
|
|
40098
|
+
const utimesMillisSync = (__webpack_require__(88962).utimesMillisSync)
|
|
40099
|
+
const stat = __webpack_require__(12021)
|
|
40100
|
+
|
|
40101
|
+
function copySync (src, dest, opts) {
|
|
40102
|
+
if (typeof opts === 'function') {
|
|
40103
|
+
opts = { filter: opts }
|
|
40104
|
+
}
|
|
40105
|
+
|
|
40106
|
+
opts = opts || {}
|
|
40107
|
+
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
|
|
40108
|
+
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
|
|
40109
|
+
|
|
40110
|
+
// Warn about using preserveTimestamps on 32-bit node
|
|
40111
|
+
if (opts.preserveTimestamps && process.arch === 'ia32') {
|
|
40112
|
+
console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
|
|
40113
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`)
|
|
40114
|
+
}
|
|
40115
|
+
|
|
40116
|
+
const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
|
|
40117
|
+
stat.checkParentPathsSync(src, srcStat, dest, 'copy')
|
|
40118
|
+
return handleFilterAndCopy(destStat, src, dest, opts)
|
|
40119
|
+
}
|
|
40120
|
+
|
|
40121
|
+
function handleFilterAndCopy (destStat, src, dest, opts) {
|
|
40122
|
+
if (opts.filter && !opts.filter(src, dest)) return
|
|
40123
|
+
const destParent = path.dirname(dest)
|
|
40124
|
+
if (!fs.existsSync(destParent)) mkdirsSync(destParent)
|
|
40125
|
+
return getStats(destStat, src, dest, opts)
|
|
40126
|
+
}
|
|
40127
|
+
|
|
40128
|
+
function startCopy (destStat, src, dest, opts) {
|
|
40129
|
+
if (opts.filter && !opts.filter(src, dest)) return
|
|
40130
|
+
return getStats(destStat, src, dest, opts)
|
|
40131
|
+
}
|
|
40132
|
+
|
|
40133
|
+
function getStats (destStat, src, dest, opts) {
|
|
40134
|
+
const statSync = opts.dereference ? fs.statSync : fs.lstatSync
|
|
40135
|
+
const srcStat = statSync(src)
|
|
40136
|
+
|
|
40137
|
+
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
|
|
40138
|
+
else if (srcStat.isFile() ||
|
|
40139
|
+
srcStat.isCharacterDevice() ||
|
|
40140
|
+
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
|
|
40141
|
+
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
|
|
40142
|
+
else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
|
|
40143
|
+
else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
|
|
40144
|
+
throw new Error(`Unknown file: ${src}`)
|
|
40145
|
+
}
|
|
40146
|
+
|
|
40147
|
+
function onFile (srcStat, destStat, src, dest, opts) {
|
|
40148
|
+
if (!destStat) return copyFile(srcStat, src, dest, opts)
|
|
40149
|
+
return mayCopyFile(srcStat, src, dest, opts)
|
|
40150
|
+
}
|
|
40151
|
+
|
|
40152
|
+
function mayCopyFile (srcStat, src, dest, opts) {
|
|
40153
|
+
if (opts.overwrite) {
|
|
40154
|
+
fs.unlinkSync(dest)
|
|
40155
|
+
return copyFile(srcStat, src, dest, opts)
|
|
40156
|
+
} else if (opts.errorOnExist) {
|
|
40157
|
+
throw new Error(`'${dest}' already exists`)
|
|
40158
|
+
}
|
|
40159
|
+
}
|
|
40160
|
+
|
|
40161
|
+
function copyFile (srcStat, src, dest, opts) {
|
|
40162
|
+
fs.copyFileSync(src, dest)
|
|
40163
|
+
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
|
|
40164
|
+
return setDestMode(dest, srcStat.mode)
|
|
40165
|
+
}
|
|
40166
|
+
|
|
40167
|
+
function handleTimestamps (srcMode, src, dest) {
|
|
40168
|
+
// Make sure the file is writable before setting the timestamp
|
|
40169
|
+
// otherwise open fails with EPERM when invoked with 'r+'
|
|
40170
|
+
// (through utimes call)
|
|
40171
|
+
if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
|
|
40172
|
+
return setDestTimestamps(src, dest)
|
|
40173
|
+
}
|
|
40174
|
+
|
|
40175
|
+
function fileIsNotWritable (srcMode) {
|
|
40176
|
+
return (srcMode & 0o200) === 0
|
|
40177
|
+
}
|
|
40178
|
+
|
|
40179
|
+
function makeFileWritable (dest, srcMode) {
|
|
40180
|
+
return setDestMode(dest, srcMode | 0o200)
|
|
40181
|
+
}
|
|
40182
|
+
|
|
40183
|
+
function setDestMode (dest, srcMode) {
|
|
40184
|
+
return fs.chmodSync(dest, srcMode)
|
|
40185
|
+
}
|
|
40186
|
+
|
|
40187
|
+
function setDestTimestamps (src, dest) {
|
|
40188
|
+
// The initial srcStat.atime cannot be trusted
|
|
40189
|
+
// because it is modified by the read(2) system call
|
|
40190
|
+
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
|
|
40191
|
+
const updatedSrcStat = fs.statSync(src)
|
|
40192
|
+
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
|
|
40193
|
+
}
|
|
40194
|
+
|
|
40195
|
+
function onDir (srcStat, destStat, src, dest, opts) {
|
|
40196
|
+
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
|
|
40197
|
+
return copyDir(src, dest, opts)
|
|
40198
|
+
}
|
|
40199
|
+
|
|
40200
|
+
function mkDirAndCopy (srcMode, src, dest, opts) {
|
|
40201
|
+
fs.mkdirSync(dest)
|
|
40202
|
+
copyDir(src, dest, opts)
|
|
40203
|
+
return setDestMode(dest, srcMode)
|
|
40204
|
+
}
|
|
40205
|
+
|
|
40206
|
+
function copyDir (src, dest, opts) {
|
|
40207
|
+
fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
|
|
40208
|
+
}
|
|
40209
|
+
|
|
40210
|
+
function copyDirItem (item, src, dest, opts) {
|
|
40211
|
+
const srcItem = path.join(src, item)
|
|
40212
|
+
const destItem = path.join(dest, item)
|
|
40213
|
+
const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
|
|
40214
|
+
return startCopy(destStat, srcItem, destItem, opts)
|
|
40215
|
+
}
|
|
40216
|
+
|
|
40217
|
+
function onLink (destStat, src, dest, opts) {
|
|
40218
|
+
let resolvedSrc = fs.readlinkSync(src)
|
|
40219
|
+
if (opts.dereference) {
|
|
40220
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
|
|
40221
|
+
}
|
|
40222
|
+
|
|
40223
|
+
if (!destStat) {
|
|
40224
|
+
return fs.symlinkSync(resolvedSrc, dest)
|
|
40225
|
+
} else {
|
|
40226
|
+
let resolvedDest
|
|
40227
|
+
try {
|
|
40228
|
+
resolvedDest = fs.readlinkSync(dest)
|
|
40229
|
+
} catch (err) {
|
|
40230
|
+
// dest exists and is a regular file or directory,
|
|
40231
|
+
// Windows may throw UNKNOWN error. If dest already exists,
|
|
40232
|
+
// fs throws error anyway, so no need to guard against it here.
|
|
40233
|
+
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
|
|
40234
|
+
throw err
|
|
40235
|
+
}
|
|
40236
|
+
if (opts.dereference) {
|
|
40237
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest)
|
|
40238
|
+
}
|
|
40239
|
+
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
40240
|
+
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
|
|
40241
|
+
}
|
|
40242
|
+
|
|
40243
|
+
// prevent copy if src is a subdir of dest since unlinking
|
|
40244
|
+
// dest in this case would result in removing src contents
|
|
40245
|
+
// and therefore a broken symlink would be created.
|
|
40246
|
+
if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
40247
|
+
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
|
|
40248
|
+
}
|
|
40249
|
+
return copyLink(resolvedSrc, dest)
|
|
40250
|
+
}
|
|
40251
|
+
}
|
|
40252
|
+
|
|
40253
|
+
function copyLink (resolvedSrc, dest) {
|
|
40254
|
+
fs.unlinkSync(dest)
|
|
40255
|
+
return fs.symlinkSync(resolvedSrc, dest)
|
|
40256
|
+
}
|
|
40257
|
+
|
|
40258
|
+
module.exports = copySync
|
|
40259
|
+
|
|
40260
|
+
|
|
40261
|
+
/***/ }),
|
|
40262
|
+
|
|
40263
|
+
/***/ 4266:
|
|
40264
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40265
|
+
|
|
40266
|
+
"use strict";
|
|
40267
|
+
|
|
40268
|
+
|
|
40269
|
+
const fs = __webpack_require__(62204)
|
|
40270
|
+
const path = __webpack_require__(71017)
|
|
40271
|
+
const mkdirs = (__webpack_require__(59915).mkdirs)
|
|
40272
|
+
const pathExists = (__webpack_require__(9672).pathExists)
|
|
40273
|
+
const utimesMillis = (__webpack_require__(88962).utimesMillis)
|
|
40274
|
+
const stat = __webpack_require__(12021)
|
|
40275
|
+
|
|
40276
|
+
function copy (src, dest, opts, cb) {
|
|
40277
|
+
if (typeof opts === 'function' && !cb) {
|
|
40278
|
+
cb = opts
|
|
40279
|
+
opts = {}
|
|
40280
|
+
} else if (typeof opts === 'function') {
|
|
40281
|
+
opts = { filter: opts }
|
|
40282
|
+
}
|
|
40283
|
+
|
|
40284
|
+
cb = cb || function () {}
|
|
40285
|
+
opts = opts || {}
|
|
40286
|
+
|
|
40287
|
+
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
|
|
40288
|
+
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
|
|
40289
|
+
|
|
40290
|
+
// Warn about using preserveTimestamps on 32-bit node
|
|
40291
|
+
if (opts.preserveTimestamps && process.arch === 'ia32') {
|
|
40292
|
+
console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n
|
|
40293
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`)
|
|
40294
|
+
}
|
|
40295
|
+
|
|
40296
|
+
stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
|
|
40297
|
+
if (err) return cb(err)
|
|
40298
|
+
const { srcStat, destStat } = stats
|
|
40299
|
+
stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
|
|
40300
|
+
if (err) return cb(err)
|
|
40301
|
+
if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb)
|
|
40302
|
+
return checkParentDir(destStat, src, dest, opts, cb)
|
|
40303
|
+
})
|
|
40304
|
+
})
|
|
40305
|
+
}
|
|
40306
|
+
|
|
40307
|
+
function checkParentDir (destStat, src, dest, opts, cb) {
|
|
40308
|
+
const destParent = path.dirname(dest)
|
|
40309
|
+
pathExists(destParent, (err, dirExists) => {
|
|
40310
|
+
if (err) return cb(err)
|
|
40311
|
+
if (dirExists) return getStats(destStat, src, dest, opts, cb)
|
|
40312
|
+
mkdirs(destParent, err => {
|
|
40313
|
+
if (err) return cb(err)
|
|
40314
|
+
return getStats(destStat, src, dest, opts, cb)
|
|
40315
|
+
})
|
|
40316
|
+
})
|
|
40317
|
+
}
|
|
40318
|
+
|
|
40319
|
+
function handleFilter (onInclude, destStat, src, dest, opts, cb) {
|
|
40320
|
+
Promise.resolve(opts.filter(src, dest)).then(include => {
|
|
40321
|
+
if (include) return onInclude(destStat, src, dest, opts, cb)
|
|
40322
|
+
return cb()
|
|
40323
|
+
}, error => cb(error))
|
|
40324
|
+
}
|
|
40325
|
+
|
|
40326
|
+
function startCopy (destStat, src, dest, opts, cb) {
|
|
40327
|
+
if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb)
|
|
40328
|
+
return getStats(destStat, src, dest, opts, cb)
|
|
40329
|
+
}
|
|
40330
|
+
|
|
40331
|
+
function getStats (destStat, src, dest, opts, cb) {
|
|
40332
|
+
const stat = opts.dereference ? fs.stat : fs.lstat
|
|
40333
|
+
stat(src, (err, srcStat) => {
|
|
40334
|
+
if (err) return cb(err)
|
|
40335
|
+
|
|
40336
|
+
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
|
|
40337
|
+
else if (srcStat.isFile() ||
|
|
40338
|
+
srcStat.isCharacterDevice() ||
|
|
40339
|
+
srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
|
|
40340
|
+
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
|
|
40341
|
+
else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
|
|
40342
|
+
else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
|
|
40343
|
+
return cb(new Error(`Unknown file: ${src}`))
|
|
40344
|
+
})
|
|
40345
|
+
}
|
|
40346
|
+
|
|
40347
|
+
function onFile (srcStat, destStat, src, dest, opts, cb) {
|
|
40348
|
+
if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
|
|
40349
|
+
return mayCopyFile(srcStat, src, dest, opts, cb)
|
|
40350
|
+
}
|
|
40351
|
+
|
|
40352
|
+
function mayCopyFile (srcStat, src, dest, opts, cb) {
|
|
40353
|
+
if (opts.overwrite) {
|
|
40354
|
+
fs.unlink(dest, err => {
|
|
40355
|
+
if (err) return cb(err)
|
|
40356
|
+
return copyFile(srcStat, src, dest, opts, cb)
|
|
40357
|
+
})
|
|
40358
|
+
} else if (opts.errorOnExist) {
|
|
40359
|
+
return cb(new Error(`'${dest}' already exists`))
|
|
40360
|
+
} else return cb()
|
|
40361
|
+
}
|
|
40362
|
+
|
|
40363
|
+
function copyFile (srcStat, src, dest, opts, cb) {
|
|
40364
|
+
fs.copyFile(src, dest, err => {
|
|
40365
|
+
if (err) return cb(err)
|
|
40366
|
+
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
|
|
40367
|
+
return setDestMode(dest, srcStat.mode, cb)
|
|
40368
|
+
})
|
|
40369
|
+
}
|
|
40370
|
+
|
|
40371
|
+
function handleTimestampsAndMode (srcMode, src, dest, cb) {
|
|
40372
|
+
// Make sure the file is writable before setting the timestamp
|
|
40373
|
+
// otherwise open fails with EPERM when invoked with 'r+'
|
|
40374
|
+
// (through utimes call)
|
|
40375
|
+
if (fileIsNotWritable(srcMode)) {
|
|
40376
|
+
return makeFileWritable(dest, srcMode, err => {
|
|
40377
|
+
if (err) return cb(err)
|
|
40378
|
+
return setDestTimestampsAndMode(srcMode, src, dest, cb)
|
|
40379
|
+
})
|
|
40380
|
+
}
|
|
40381
|
+
return setDestTimestampsAndMode(srcMode, src, dest, cb)
|
|
40382
|
+
}
|
|
40383
|
+
|
|
40384
|
+
function fileIsNotWritable (srcMode) {
|
|
40385
|
+
return (srcMode & 0o200) === 0
|
|
40386
|
+
}
|
|
40387
|
+
|
|
40388
|
+
function makeFileWritable (dest, srcMode, cb) {
|
|
40389
|
+
return setDestMode(dest, srcMode | 0o200, cb)
|
|
40390
|
+
}
|
|
40391
|
+
|
|
40392
|
+
function setDestTimestampsAndMode (srcMode, src, dest, cb) {
|
|
40393
|
+
setDestTimestamps(src, dest, err => {
|
|
40394
|
+
if (err) return cb(err)
|
|
40395
|
+
return setDestMode(dest, srcMode, cb)
|
|
40396
|
+
})
|
|
40397
|
+
}
|
|
40398
|
+
|
|
40399
|
+
function setDestMode (dest, srcMode, cb) {
|
|
40400
|
+
return fs.chmod(dest, srcMode, cb)
|
|
40401
|
+
}
|
|
40402
|
+
|
|
40403
|
+
function setDestTimestamps (src, dest, cb) {
|
|
40404
|
+
// The initial srcStat.atime cannot be trusted
|
|
40405
|
+
// because it is modified by the read(2) system call
|
|
40406
|
+
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
|
|
40407
|
+
fs.stat(src, (err, updatedSrcStat) => {
|
|
40408
|
+
if (err) return cb(err)
|
|
40409
|
+
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
|
|
40410
|
+
})
|
|
40411
|
+
}
|
|
40412
|
+
|
|
40413
|
+
function onDir (srcStat, destStat, src, dest, opts, cb) {
|
|
40414
|
+
if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
|
|
40415
|
+
return copyDir(src, dest, opts, cb)
|
|
40416
|
+
}
|
|
40417
|
+
|
|
40418
|
+
function mkDirAndCopy (srcMode, src, dest, opts, cb) {
|
|
40419
|
+
fs.mkdir(dest, err => {
|
|
40420
|
+
if (err) return cb(err)
|
|
40421
|
+
copyDir(src, dest, opts, err => {
|
|
40422
|
+
if (err) return cb(err)
|
|
40423
|
+
return setDestMode(dest, srcMode, cb)
|
|
40424
|
+
})
|
|
40425
|
+
})
|
|
40426
|
+
}
|
|
40427
|
+
|
|
40428
|
+
function copyDir (src, dest, opts, cb) {
|
|
40429
|
+
fs.readdir(src, (err, items) => {
|
|
40430
|
+
if (err) return cb(err)
|
|
40431
|
+
return copyDirItems(items, src, dest, opts, cb)
|
|
40432
|
+
})
|
|
40433
|
+
}
|
|
40434
|
+
|
|
40435
|
+
function copyDirItems (items, src, dest, opts, cb) {
|
|
40436
|
+
const item = items.pop()
|
|
40437
|
+
if (!item) return cb()
|
|
40438
|
+
return copyDirItem(items, item, src, dest, opts, cb)
|
|
40439
|
+
}
|
|
40440
|
+
|
|
40441
|
+
function copyDirItem (items, item, src, dest, opts, cb) {
|
|
40442
|
+
const srcItem = path.join(src, item)
|
|
40443
|
+
const destItem = path.join(dest, item)
|
|
40444
|
+
stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
|
|
40445
|
+
if (err) return cb(err)
|
|
40446
|
+
const { destStat } = stats
|
|
40447
|
+
startCopy(destStat, srcItem, destItem, opts, err => {
|
|
40448
|
+
if (err) return cb(err)
|
|
40449
|
+
return copyDirItems(items, src, dest, opts, cb)
|
|
40450
|
+
})
|
|
40451
|
+
})
|
|
40452
|
+
}
|
|
40453
|
+
|
|
40454
|
+
function onLink (destStat, src, dest, opts, cb) {
|
|
40455
|
+
fs.readlink(src, (err, resolvedSrc) => {
|
|
40456
|
+
if (err) return cb(err)
|
|
40457
|
+
if (opts.dereference) {
|
|
40458
|
+
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
|
|
40459
|
+
}
|
|
40460
|
+
|
|
40461
|
+
if (!destStat) {
|
|
40462
|
+
return fs.symlink(resolvedSrc, dest, cb)
|
|
40463
|
+
} else {
|
|
40464
|
+
fs.readlink(dest, (err, resolvedDest) => {
|
|
40465
|
+
if (err) {
|
|
40466
|
+
// dest exists and is a regular file or directory,
|
|
40467
|
+
// Windows may throw UNKNOWN error. If dest already exists,
|
|
40468
|
+
// fs throws error anyway, so no need to guard against it here.
|
|
40469
|
+
if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
|
|
40470
|
+
return cb(err)
|
|
40471
|
+
}
|
|
40472
|
+
if (opts.dereference) {
|
|
40473
|
+
resolvedDest = path.resolve(process.cwd(), resolvedDest)
|
|
40474
|
+
}
|
|
40475
|
+
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
40476
|
+
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
|
|
40477
|
+
}
|
|
40478
|
+
|
|
40479
|
+
// do not copy if src is a subdir of dest since unlinking
|
|
40480
|
+
// dest in this case would result in removing src contents
|
|
40481
|
+
// and therefore a broken symlink would be created.
|
|
40482
|
+
if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
40483
|
+
return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
|
|
40484
|
+
}
|
|
40485
|
+
return copyLink(resolvedSrc, dest, cb)
|
|
40486
|
+
})
|
|
40487
|
+
}
|
|
40488
|
+
})
|
|
40489
|
+
}
|
|
40490
|
+
|
|
40491
|
+
function copyLink (resolvedSrc, dest, cb) {
|
|
40492
|
+
fs.unlink(dest, err => {
|
|
40493
|
+
if (err) return cb(err)
|
|
40494
|
+
return fs.symlink(resolvedSrc, dest, cb)
|
|
40495
|
+
})
|
|
40496
|
+
}
|
|
40497
|
+
|
|
40498
|
+
module.exports = copy
|
|
40499
|
+
|
|
40500
|
+
|
|
40501
|
+
/***/ }),
|
|
40502
|
+
|
|
40503
|
+
/***/ 1105:
|
|
40504
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40505
|
+
|
|
40506
|
+
"use strict";
|
|
40507
|
+
|
|
40508
|
+
|
|
40509
|
+
const u = (__webpack_require__(84357).fromCallback)
|
|
40510
|
+
module.exports = {
|
|
40511
|
+
copy: u(__webpack_require__(4266)),
|
|
40512
|
+
copySync: __webpack_require__(16345)
|
|
40513
|
+
}
|
|
40514
|
+
|
|
40515
|
+
|
|
40516
|
+
/***/ }),
|
|
40517
|
+
|
|
40518
|
+
/***/ 19102:
|
|
40519
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40520
|
+
|
|
40521
|
+
"use strict";
|
|
40522
|
+
|
|
40523
|
+
|
|
40524
|
+
const u = (__webpack_require__(84357).fromPromise)
|
|
40525
|
+
const fs = __webpack_require__(73664)
|
|
40526
|
+
const path = __webpack_require__(71017)
|
|
40527
|
+
const mkdir = __webpack_require__(59915)
|
|
40528
|
+
const remove = __webpack_require__(21133)
|
|
40529
|
+
|
|
40530
|
+
const emptyDir = u(async function emptyDir (dir) {
|
|
40531
|
+
let items
|
|
40532
|
+
try {
|
|
40533
|
+
items = await fs.readdir(dir)
|
|
40534
|
+
} catch {
|
|
40535
|
+
return mkdir.mkdirs(dir)
|
|
40536
|
+
}
|
|
40537
|
+
|
|
40538
|
+
return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
|
|
40539
|
+
})
|
|
40540
|
+
|
|
40541
|
+
function emptyDirSync (dir) {
|
|
40542
|
+
let items
|
|
40543
|
+
try {
|
|
40544
|
+
items = fs.readdirSync(dir)
|
|
40545
|
+
} catch {
|
|
40546
|
+
return mkdir.mkdirsSync(dir)
|
|
40547
|
+
}
|
|
40548
|
+
|
|
40549
|
+
items.forEach(item => {
|
|
40550
|
+
item = path.join(dir, item)
|
|
40551
|
+
remove.removeSync(item)
|
|
40552
|
+
})
|
|
40553
|
+
}
|
|
40554
|
+
|
|
40555
|
+
module.exports = {
|
|
40556
|
+
emptyDirSync,
|
|
40557
|
+
emptydirSync: emptyDirSync,
|
|
40558
|
+
emptyDir,
|
|
40559
|
+
emptydir: emptyDir
|
|
40560
|
+
}
|
|
40561
|
+
|
|
40562
|
+
|
|
40563
|
+
/***/ }),
|
|
40564
|
+
|
|
40565
|
+
/***/ 19570:
|
|
40566
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40567
|
+
|
|
40568
|
+
"use strict";
|
|
40569
|
+
|
|
40570
|
+
|
|
40571
|
+
const u = (__webpack_require__(84357).fromCallback)
|
|
40572
|
+
const path = __webpack_require__(71017)
|
|
40573
|
+
const fs = __webpack_require__(62204)
|
|
40574
|
+
const mkdir = __webpack_require__(59915)
|
|
40575
|
+
|
|
40576
|
+
function createFile (file, callback) {
|
|
40577
|
+
function makeFile () {
|
|
40578
|
+
fs.writeFile(file, '', err => {
|
|
40579
|
+
if (err) return callback(err)
|
|
40580
|
+
callback()
|
|
40581
|
+
})
|
|
40582
|
+
}
|
|
40583
|
+
|
|
40584
|
+
fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
|
|
40585
|
+
if (!err && stats.isFile()) return callback()
|
|
40586
|
+
const dir = path.dirname(file)
|
|
40587
|
+
fs.stat(dir, (err, stats) => {
|
|
40588
|
+
if (err) {
|
|
40589
|
+
// if the directory doesn't exist, make it
|
|
40590
|
+
if (err.code === 'ENOENT') {
|
|
40591
|
+
return mkdir.mkdirs(dir, err => {
|
|
40592
|
+
if (err) return callback(err)
|
|
40593
|
+
makeFile()
|
|
40594
|
+
})
|
|
40595
|
+
}
|
|
40596
|
+
return callback(err)
|
|
40597
|
+
}
|
|
40598
|
+
|
|
40599
|
+
if (stats.isDirectory()) makeFile()
|
|
40600
|
+
else {
|
|
40601
|
+
// parent is not a directory
|
|
40602
|
+
// This is just to cause an internal ENOTDIR error to be thrown
|
|
40603
|
+
fs.readdir(dir, err => {
|
|
40604
|
+
if (err) return callback(err)
|
|
40605
|
+
})
|
|
40606
|
+
}
|
|
40607
|
+
})
|
|
40608
|
+
})
|
|
40609
|
+
}
|
|
40610
|
+
|
|
40611
|
+
function createFileSync (file) {
|
|
40612
|
+
let stats
|
|
40613
|
+
try {
|
|
40614
|
+
stats = fs.statSync(file)
|
|
40615
|
+
} catch {}
|
|
40616
|
+
if (stats && stats.isFile()) return
|
|
40617
|
+
|
|
40618
|
+
const dir = path.dirname(file)
|
|
40619
|
+
try {
|
|
40620
|
+
if (!fs.statSync(dir).isDirectory()) {
|
|
40621
|
+
// parent is not a directory
|
|
40622
|
+
// This is just to cause an internal ENOTDIR error to be thrown
|
|
40623
|
+
fs.readdirSync(dir)
|
|
40624
|
+
}
|
|
40625
|
+
} catch (err) {
|
|
40626
|
+
// If the stat call above failed because the directory doesn't exist, create it
|
|
40627
|
+
if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
|
|
40628
|
+
else throw err
|
|
40629
|
+
}
|
|
40630
|
+
|
|
40631
|
+
fs.writeFileSync(file, '')
|
|
40632
|
+
}
|
|
40633
|
+
|
|
40634
|
+
module.exports = {
|
|
40635
|
+
createFile: u(createFile),
|
|
40636
|
+
createFileSync
|
|
40637
|
+
}
|
|
40638
|
+
|
|
40639
|
+
|
|
40640
|
+
/***/ }),
|
|
40641
|
+
|
|
40642
|
+
/***/ 99793:
|
|
40643
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40644
|
+
|
|
40645
|
+
"use strict";
|
|
40646
|
+
|
|
40647
|
+
|
|
40648
|
+
const { createFile, createFileSync } = __webpack_require__(19570)
|
|
40649
|
+
const { createLink, createLinkSync } = __webpack_require__(19986)
|
|
40650
|
+
const { createSymlink, createSymlinkSync } = __webpack_require__(63762)
|
|
40651
|
+
|
|
40652
|
+
module.exports = {
|
|
40653
|
+
// file
|
|
40654
|
+
createFile,
|
|
40655
|
+
createFileSync,
|
|
40656
|
+
ensureFile: createFile,
|
|
40657
|
+
ensureFileSync: createFileSync,
|
|
40658
|
+
// link
|
|
40659
|
+
createLink,
|
|
40660
|
+
createLinkSync,
|
|
40661
|
+
ensureLink: createLink,
|
|
40662
|
+
ensureLinkSync: createLinkSync,
|
|
40663
|
+
// symlink
|
|
40664
|
+
createSymlink,
|
|
40665
|
+
createSymlinkSync,
|
|
40666
|
+
ensureSymlink: createSymlink,
|
|
40667
|
+
ensureSymlinkSync: createSymlinkSync
|
|
40668
|
+
}
|
|
40669
|
+
|
|
40670
|
+
|
|
40671
|
+
/***/ }),
|
|
40672
|
+
|
|
40673
|
+
/***/ 19986:
|
|
40674
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40675
|
+
|
|
40676
|
+
"use strict";
|
|
40677
|
+
|
|
40678
|
+
|
|
40679
|
+
const u = (__webpack_require__(84357).fromCallback)
|
|
40680
|
+
const path = __webpack_require__(71017)
|
|
40681
|
+
const fs = __webpack_require__(62204)
|
|
40682
|
+
const mkdir = __webpack_require__(59915)
|
|
40683
|
+
const pathExists = (__webpack_require__(9672).pathExists)
|
|
40684
|
+
const { areIdentical } = __webpack_require__(12021)
|
|
40685
|
+
|
|
40686
|
+
function createLink (srcpath, dstpath, callback) {
|
|
40687
|
+
function makeLink (srcpath, dstpath) {
|
|
40688
|
+
fs.link(srcpath, dstpath, err => {
|
|
40689
|
+
if (err) return callback(err)
|
|
40690
|
+
callback(null)
|
|
40691
|
+
})
|
|
40692
|
+
}
|
|
40693
|
+
|
|
40694
|
+
fs.lstat(dstpath, (_, dstStat) => {
|
|
40695
|
+
fs.lstat(srcpath, (err, srcStat) => {
|
|
40696
|
+
if (err) {
|
|
40697
|
+
err.message = err.message.replace('lstat', 'ensureLink')
|
|
40698
|
+
return callback(err)
|
|
40699
|
+
}
|
|
40700
|
+
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
|
|
40701
|
+
|
|
40702
|
+
const dir = path.dirname(dstpath)
|
|
40703
|
+
pathExists(dir, (err, dirExists) => {
|
|
40704
|
+
if (err) return callback(err)
|
|
40705
|
+
if (dirExists) return makeLink(srcpath, dstpath)
|
|
40706
|
+
mkdir.mkdirs(dir, err => {
|
|
40707
|
+
if (err) return callback(err)
|
|
40708
|
+
makeLink(srcpath, dstpath)
|
|
40709
|
+
})
|
|
40710
|
+
})
|
|
40711
|
+
})
|
|
40712
|
+
})
|
|
40713
|
+
}
|
|
40714
|
+
|
|
40715
|
+
function createLinkSync (srcpath, dstpath) {
|
|
40716
|
+
let dstStat
|
|
40717
|
+
try {
|
|
40718
|
+
dstStat = fs.lstatSync(dstpath)
|
|
40719
|
+
} catch {}
|
|
40720
|
+
|
|
40721
|
+
try {
|
|
40722
|
+
const srcStat = fs.lstatSync(srcpath)
|
|
40723
|
+
if (dstStat && areIdentical(srcStat, dstStat)) return
|
|
40724
|
+
} catch (err) {
|
|
40725
|
+
err.message = err.message.replace('lstat', 'ensureLink')
|
|
40726
|
+
throw err
|
|
40727
|
+
}
|
|
40728
|
+
|
|
40729
|
+
const dir = path.dirname(dstpath)
|
|
40730
|
+
const dirExists = fs.existsSync(dir)
|
|
40731
|
+
if (dirExists) return fs.linkSync(srcpath, dstpath)
|
|
40732
|
+
mkdir.mkdirsSync(dir)
|
|
40733
|
+
|
|
40734
|
+
return fs.linkSync(srcpath, dstpath)
|
|
40735
|
+
}
|
|
40736
|
+
|
|
40737
|
+
module.exports = {
|
|
40738
|
+
createLink: u(createLink),
|
|
40739
|
+
createLinkSync
|
|
40740
|
+
}
|
|
40741
|
+
|
|
40742
|
+
|
|
40743
|
+
/***/ }),
|
|
40744
|
+
|
|
40745
|
+
/***/ 5461:
|
|
40746
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40747
|
+
|
|
40748
|
+
"use strict";
|
|
40749
|
+
|
|
40750
|
+
|
|
40751
|
+
const path = __webpack_require__(71017)
|
|
40752
|
+
const fs = __webpack_require__(62204)
|
|
40753
|
+
const pathExists = (__webpack_require__(9672).pathExists)
|
|
40754
|
+
|
|
40755
|
+
/**
|
|
40756
|
+
* Function that returns two types of paths, one relative to symlink, and one
|
|
40757
|
+
* relative to the current working directory. Checks if path is absolute or
|
|
40758
|
+
* relative. If the path is relative, this function checks if the path is
|
|
40759
|
+
* relative to symlink or relative to current working directory. This is an
|
|
40760
|
+
* initiative to find a smarter `srcpath` to supply when building symlinks.
|
|
40761
|
+
* This allows you to determine which path to use out of one of three possible
|
|
40762
|
+
* types of source paths. The first is an absolute path. This is detected by
|
|
40763
|
+
* `path.isAbsolute()`. When an absolute path is provided, it is checked to
|
|
40764
|
+
* see if it exists. If it does it's used, if not an error is returned
|
|
40765
|
+
* (callback)/ thrown (sync). The other two options for `srcpath` are a
|
|
40766
|
+
* relative url. By default Node's `fs.symlink` works by creating a symlink
|
|
40767
|
+
* using `dstpath` and expects the `srcpath` to be relative to the newly
|
|
40768
|
+
* created symlink. If you provide a `srcpath` that does not exist on the file
|
|
40769
|
+
* system it results in a broken symlink. To minimize this, the function
|
|
40770
|
+
* checks to see if the 'relative to symlink' source file exists, and if it
|
|
40771
|
+
* does it will use it. If it does not, it checks if there's a file that
|
|
40772
|
+
* exists that is relative to the current working directory, if does its used.
|
|
40773
|
+
* This preserves the expectations of the original fs.symlink spec and adds
|
|
40774
|
+
* the ability to pass in `relative to current working direcotry` paths.
|
|
40775
|
+
*/
|
|
40776
|
+
|
|
40777
|
+
function symlinkPaths (srcpath, dstpath, callback) {
|
|
40778
|
+
if (path.isAbsolute(srcpath)) {
|
|
40779
|
+
return fs.lstat(srcpath, (err) => {
|
|
40780
|
+
if (err) {
|
|
40781
|
+
err.message = err.message.replace('lstat', 'ensureSymlink')
|
|
40782
|
+
return callback(err)
|
|
40783
|
+
}
|
|
40784
|
+
return callback(null, {
|
|
40785
|
+
toCwd: srcpath,
|
|
40786
|
+
toDst: srcpath
|
|
40787
|
+
})
|
|
40788
|
+
})
|
|
40789
|
+
} else {
|
|
40790
|
+
const dstdir = path.dirname(dstpath)
|
|
40791
|
+
const relativeToDst = path.join(dstdir, srcpath)
|
|
40792
|
+
return pathExists(relativeToDst, (err, exists) => {
|
|
40793
|
+
if (err) return callback(err)
|
|
40794
|
+
if (exists) {
|
|
40795
|
+
return callback(null, {
|
|
40796
|
+
toCwd: relativeToDst,
|
|
40797
|
+
toDst: srcpath
|
|
40798
|
+
})
|
|
40799
|
+
} else {
|
|
40800
|
+
return fs.lstat(srcpath, (err) => {
|
|
40801
|
+
if (err) {
|
|
40802
|
+
err.message = err.message.replace('lstat', 'ensureSymlink')
|
|
40803
|
+
return callback(err)
|
|
40804
|
+
}
|
|
40805
|
+
return callback(null, {
|
|
40806
|
+
toCwd: srcpath,
|
|
40807
|
+
toDst: path.relative(dstdir, srcpath)
|
|
40808
|
+
})
|
|
40809
|
+
})
|
|
40810
|
+
}
|
|
40811
|
+
})
|
|
40812
|
+
}
|
|
40813
|
+
}
|
|
40814
|
+
|
|
40815
|
+
function symlinkPathsSync (srcpath, dstpath) {
|
|
40816
|
+
let exists
|
|
40817
|
+
if (path.isAbsolute(srcpath)) {
|
|
40818
|
+
exists = fs.existsSync(srcpath)
|
|
40819
|
+
if (!exists) throw new Error('absolute srcpath does not exist')
|
|
40820
|
+
return {
|
|
40821
|
+
toCwd: srcpath,
|
|
40822
|
+
toDst: srcpath
|
|
40823
|
+
}
|
|
40824
|
+
} else {
|
|
40825
|
+
const dstdir = path.dirname(dstpath)
|
|
40826
|
+
const relativeToDst = path.join(dstdir, srcpath)
|
|
40827
|
+
exists = fs.existsSync(relativeToDst)
|
|
40828
|
+
if (exists) {
|
|
40829
|
+
return {
|
|
40830
|
+
toCwd: relativeToDst,
|
|
40831
|
+
toDst: srcpath
|
|
40832
|
+
}
|
|
40833
|
+
} else {
|
|
40834
|
+
exists = fs.existsSync(srcpath)
|
|
40835
|
+
if (!exists) throw new Error('relative srcpath does not exist')
|
|
40836
|
+
return {
|
|
40837
|
+
toCwd: srcpath,
|
|
40838
|
+
toDst: path.relative(dstdir, srcpath)
|
|
40839
|
+
}
|
|
40840
|
+
}
|
|
40841
|
+
}
|
|
40842
|
+
}
|
|
40843
|
+
|
|
40844
|
+
module.exports = {
|
|
40845
|
+
symlinkPaths,
|
|
40846
|
+
symlinkPathsSync
|
|
40847
|
+
}
|
|
40848
|
+
|
|
40849
|
+
|
|
40850
|
+
/***/ }),
|
|
40851
|
+
|
|
40852
|
+
/***/ 95375:
|
|
40853
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40854
|
+
|
|
40855
|
+
"use strict";
|
|
40856
|
+
|
|
40857
|
+
|
|
40858
|
+
const fs = __webpack_require__(62204)
|
|
40859
|
+
|
|
40860
|
+
function symlinkType (srcpath, type, callback) {
|
|
40861
|
+
callback = (typeof type === 'function') ? type : callback
|
|
40862
|
+
type = (typeof type === 'function') ? false : type
|
|
40863
|
+
if (type) return callback(null, type)
|
|
40864
|
+
fs.lstat(srcpath, (err, stats) => {
|
|
40865
|
+
if (err) return callback(null, 'file')
|
|
40866
|
+
type = (stats && stats.isDirectory()) ? 'dir' : 'file'
|
|
40867
|
+
callback(null, type)
|
|
40868
|
+
})
|
|
40869
|
+
}
|
|
40870
|
+
|
|
40871
|
+
function symlinkTypeSync (srcpath, type) {
|
|
40872
|
+
let stats
|
|
40873
|
+
|
|
40874
|
+
if (type) return type
|
|
40875
|
+
try {
|
|
40876
|
+
stats = fs.lstatSync(srcpath)
|
|
40877
|
+
} catch {
|
|
40878
|
+
return 'file'
|
|
40879
|
+
}
|
|
40880
|
+
return (stats && stats.isDirectory()) ? 'dir' : 'file'
|
|
40881
|
+
}
|
|
40882
|
+
|
|
40883
|
+
module.exports = {
|
|
40884
|
+
symlinkType,
|
|
40885
|
+
symlinkTypeSync
|
|
40886
|
+
}
|
|
40887
|
+
|
|
40888
|
+
|
|
40889
|
+
/***/ }),
|
|
40890
|
+
|
|
40891
|
+
/***/ 63762:
|
|
40892
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
40893
|
+
|
|
40894
|
+
"use strict";
|
|
40895
|
+
|
|
40896
|
+
|
|
40897
|
+
const u = (__webpack_require__(84357).fromCallback)
|
|
40898
|
+
const path = __webpack_require__(71017)
|
|
40899
|
+
const fs = __webpack_require__(73664)
|
|
40900
|
+
const _mkdirs = __webpack_require__(59915)
|
|
40901
|
+
const mkdirs = _mkdirs.mkdirs
|
|
40902
|
+
const mkdirsSync = _mkdirs.mkdirsSync
|
|
40903
|
+
|
|
40904
|
+
const _symlinkPaths = __webpack_require__(5461)
|
|
40905
|
+
const symlinkPaths = _symlinkPaths.symlinkPaths
|
|
40906
|
+
const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
|
|
40907
|
+
|
|
40908
|
+
const _symlinkType = __webpack_require__(95375)
|
|
40909
|
+
const symlinkType = _symlinkType.symlinkType
|
|
40910
|
+
const symlinkTypeSync = _symlinkType.symlinkTypeSync
|
|
40911
|
+
|
|
40912
|
+
const pathExists = (__webpack_require__(9672).pathExists)
|
|
40913
|
+
|
|
40914
|
+
const { areIdentical } = __webpack_require__(12021)
|
|
40915
|
+
|
|
40916
|
+
function createSymlink (srcpath, dstpath, type, callback) {
|
|
40917
|
+
callback = (typeof type === 'function') ? type : callback
|
|
40918
|
+
type = (typeof type === 'function') ? false : type
|
|
40919
|
+
|
|
40920
|
+
fs.lstat(dstpath, (err, stats) => {
|
|
40921
|
+
if (!err && stats.isSymbolicLink()) {
|
|
40922
|
+
Promise.all([
|
|
40923
|
+
fs.stat(srcpath),
|
|
40924
|
+
fs.stat(dstpath)
|
|
40925
|
+
]).then(([srcStat, dstStat]) => {
|
|
40926
|
+
if (areIdentical(srcStat, dstStat)) return callback(null)
|
|
40927
|
+
_createSymlink(srcpath, dstpath, type, callback)
|
|
40928
|
+
})
|
|
40929
|
+
} else _createSymlink(srcpath, dstpath, type, callback)
|
|
40930
|
+
})
|
|
40931
|
+
}
|
|
40932
|
+
|
|
40933
|
+
function _createSymlink (srcpath, dstpath, type, callback) {
|
|
40934
|
+
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
|
40935
|
+
if (err) return callback(err)
|
|
40936
|
+
srcpath = relative.toDst
|
|
40937
|
+
symlinkType(relative.toCwd, type, (err, type) => {
|
|
40938
|
+
if (err) return callback(err)
|
|
40939
|
+
const dir = path.dirname(dstpath)
|
|
40940
|
+
pathExists(dir, (err, dirExists) => {
|
|
40941
|
+
if (err) return callback(err)
|
|
40942
|
+
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
|
|
40943
|
+
mkdirs(dir, err => {
|
|
40944
|
+
if (err) return callback(err)
|
|
40945
|
+
fs.symlink(srcpath, dstpath, type, callback)
|
|
40946
|
+
})
|
|
40947
|
+
})
|
|
40948
|
+
})
|
|
40949
|
+
})
|
|
40950
|
+
}
|
|
40951
|
+
|
|
40952
|
+
function createSymlinkSync (srcpath, dstpath, type) {
|
|
40953
|
+
let stats
|
|
40954
|
+
try {
|
|
40955
|
+
stats = fs.lstatSync(dstpath)
|
|
40956
|
+
} catch {}
|
|
40957
|
+
if (stats && stats.isSymbolicLink()) {
|
|
40958
|
+
const srcStat = fs.statSync(srcpath)
|
|
40959
|
+
const dstStat = fs.statSync(dstpath)
|
|
40960
|
+
if (areIdentical(srcStat, dstStat)) return
|
|
40961
|
+
}
|
|
40962
|
+
|
|
40963
|
+
const relative = symlinkPathsSync(srcpath, dstpath)
|
|
40964
|
+
srcpath = relative.toDst
|
|
40965
|
+
type = symlinkTypeSync(relative.toCwd, type)
|
|
40966
|
+
const dir = path.dirname(dstpath)
|
|
40967
|
+
const exists = fs.existsSync(dir)
|
|
40968
|
+
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
|
|
40969
|
+
mkdirsSync(dir)
|
|
40970
|
+
return fs.symlinkSync(srcpath, dstpath, type)
|
|
40971
|
+
}
|
|
40972
|
+
|
|
40973
|
+
module.exports = {
|
|
40974
|
+
createSymlink: u(createSymlink),
|
|
40975
|
+
createSymlinkSync
|
|
40976
|
+
}
|
|
40977
|
+
|
|
40978
|
+
|
|
40979
|
+
/***/ }),
|
|
40980
|
+
|
|
40981
|
+
/***/ 73664:
|
|
40982
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
40983
|
+
|
|
40984
|
+
"use strict";
|
|
40985
|
+
|
|
40986
|
+
// This is adapted from https://github.com/normalize/mz
|
|
40987
|
+
// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
|
|
40988
|
+
const u = (__webpack_require__(84357).fromCallback)
|
|
40989
|
+
const fs = __webpack_require__(62204)
|
|
40990
|
+
|
|
40991
|
+
const api = [
|
|
40992
|
+
'access',
|
|
40993
|
+
'appendFile',
|
|
40994
|
+
'chmod',
|
|
40995
|
+
'chown',
|
|
40996
|
+
'close',
|
|
40997
|
+
'copyFile',
|
|
40998
|
+
'fchmod',
|
|
40999
|
+
'fchown',
|
|
41000
|
+
'fdatasync',
|
|
41001
|
+
'fstat',
|
|
41002
|
+
'fsync',
|
|
41003
|
+
'ftruncate',
|
|
41004
|
+
'futimes',
|
|
41005
|
+
'lchmod',
|
|
41006
|
+
'lchown',
|
|
41007
|
+
'link',
|
|
41008
|
+
'lstat',
|
|
41009
|
+
'mkdir',
|
|
41010
|
+
'mkdtemp',
|
|
41011
|
+
'open',
|
|
41012
|
+
'opendir',
|
|
41013
|
+
'readdir',
|
|
41014
|
+
'readFile',
|
|
41015
|
+
'readlink',
|
|
41016
|
+
'realpath',
|
|
41017
|
+
'rename',
|
|
41018
|
+
'rm',
|
|
41019
|
+
'rmdir',
|
|
41020
|
+
'stat',
|
|
41021
|
+
'symlink',
|
|
41022
|
+
'truncate',
|
|
41023
|
+
'unlink',
|
|
41024
|
+
'utimes',
|
|
41025
|
+
'writeFile'
|
|
41026
|
+
].filter(key => {
|
|
41027
|
+
// Some commands are not available on some systems. Ex:
|
|
41028
|
+
// fs.opendir was added in Node.js v12.12.0
|
|
41029
|
+
// fs.rm was added in Node.js v14.14.0
|
|
41030
|
+
// fs.lchown is not available on at least some Linux
|
|
41031
|
+
return typeof fs[key] === 'function'
|
|
41032
|
+
})
|
|
41033
|
+
|
|
41034
|
+
// Export cloned fs:
|
|
41035
|
+
Object.assign(exports, fs)
|
|
41036
|
+
|
|
41037
|
+
// Universalify async methods:
|
|
41038
|
+
api.forEach(method => {
|
|
41039
|
+
exports[method] = u(fs[method])
|
|
41040
|
+
})
|
|
41041
|
+
exports.realpath.native = u(fs.realpath.native)
|
|
41042
|
+
|
|
41043
|
+
// We differ from mz/fs in that we still ship the old, broken, fs.exists()
|
|
41044
|
+
// since we are a drop-in replacement for the native module
|
|
41045
|
+
exports.exists = function (filename, callback) {
|
|
41046
|
+
if (typeof callback === 'function') {
|
|
41047
|
+
return fs.exists(filename, callback)
|
|
41048
|
+
}
|
|
41049
|
+
return new Promise(resolve => {
|
|
41050
|
+
return fs.exists(filename, resolve)
|
|
41051
|
+
})
|
|
41052
|
+
}
|
|
41053
|
+
|
|
41054
|
+
// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args
|
|
41055
|
+
|
|
41056
|
+
exports.read = function (fd, buffer, offset, length, position, callback) {
|
|
41057
|
+
if (typeof callback === 'function') {
|
|
41058
|
+
return fs.read(fd, buffer, offset, length, position, callback)
|
|
41059
|
+
}
|
|
41060
|
+
return new Promise((resolve, reject) => {
|
|
41061
|
+
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
|
|
41062
|
+
if (err) return reject(err)
|
|
41063
|
+
resolve({ bytesRead, buffer })
|
|
41064
|
+
})
|
|
41065
|
+
})
|
|
41066
|
+
}
|
|
41067
|
+
|
|
41068
|
+
// Function signature can be
|
|
41069
|
+
// fs.write(fd, buffer[, offset[, length[, position]]], callback)
|
|
41070
|
+
// OR
|
|
41071
|
+
// fs.write(fd, string[, position[, encoding]], callback)
|
|
41072
|
+
// We need to handle both cases, so we use ...args
|
|
41073
|
+
exports.write = function (fd, buffer, ...args) {
|
|
41074
|
+
if (typeof args[args.length - 1] === 'function') {
|
|
41075
|
+
return fs.write(fd, buffer, ...args)
|
|
41076
|
+
}
|
|
41077
|
+
|
|
41078
|
+
return new Promise((resolve, reject) => {
|
|
41079
|
+
fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
|
|
41080
|
+
if (err) return reject(err)
|
|
41081
|
+
resolve({ bytesWritten, buffer })
|
|
41082
|
+
})
|
|
41083
|
+
})
|
|
41084
|
+
}
|
|
41085
|
+
|
|
41086
|
+
// fs.writev only available in Node v12.9.0+
|
|
41087
|
+
if (typeof fs.writev === 'function') {
|
|
41088
|
+
// Function signature is
|
|
41089
|
+
// s.writev(fd, buffers[, position], callback)
|
|
41090
|
+
// We need to handle the optional arg, so we use ...args
|
|
41091
|
+
exports.writev = function (fd, buffers, ...args) {
|
|
41092
|
+
if (typeof args[args.length - 1] === 'function') {
|
|
41093
|
+
return fs.writev(fd, buffers, ...args)
|
|
41094
|
+
}
|
|
41095
|
+
|
|
41096
|
+
return new Promise((resolve, reject) => {
|
|
41097
|
+
fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
|
|
41098
|
+
if (err) return reject(err)
|
|
41099
|
+
resolve({ bytesWritten, buffers })
|
|
41100
|
+
})
|
|
41101
|
+
})
|
|
41102
|
+
}
|
|
41103
|
+
}
|
|
41104
|
+
|
|
41105
|
+
|
|
41106
|
+
/***/ }),
|
|
41107
|
+
|
|
41108
|
+
/***/ 83950:
|
|
41109
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41110
|
+
|
|
41111
|
+
"use strict";
|
|
41112
|
+
|
|
41113
|
+
|
|
41114
|
+
module.exports = {
|
|
41115
|
+
// Export promiseified graceful-fs:
|
|
41116
|
+
...__webpack_require__(73664),
|
|
41117
|
+
// Export extra methods:
|
|
41118
|
+
...__webpack_require__(1105),
|
|
41119
|
+
...__webpack_require__(19102),
|
|
41120
|
+
...__webpack_require__(99793),
|
|
41121
|
+
...__webpack_require__(37557),
|
|
41122
|
+
...__webpack_require__(59915),
|
|
41123
|
+
...__webpack_require__(14449),
|
|
41124
|
+
...__webpack_require__(65889),
|
|
41125
|
+
...__webpack_require__(9672),
|
|
41126
|
+
...__webpack_require__(21133)
|
|
41127
|
+
}
|
|
41128
|
+
|
|
41129
|
+
|
|
41130
|
+
/***/ }),
|
|
41131
|
+
|
|
41132
|
+
/***/ 37557:
|
|
41133
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41134
|
+
|
|
41135
|
+
"use strict";
|
|
41136
|
+
|
|
41137
|
+
|
|
41138
|
+
const u = (__webpack_require__(84357).fromPromise)
|
|
41139
|
+
const jsonFile = __webpack_require__(42915)
|
|
41140
|
+
|
|
41141
|
+
jsonFile.outputJson = u(__webpack_require__(87482))
|
|
41142
|
+
jsonFile.outputJsonSync = __webpack_require__(48467)
|
|
41143
|
+
// aliases
|
|
41144
|
+
jsonFile.outputJSON = jsonFile.outputJson
|
|
41145
|
+
jsonFile.outputJSONSync = jsonFile.outputJsonSync
|
|
41146
|
+
jsonFile.writeJSON = jsonFile.writeJson
|
|
41147
|
+
jsonFile.writeJSONSync = jsonFile.writeJsonSync
|
|
41148
|
+
jsonFile.readJSON = jsonFile.readJson
|
|
41149
|
+
jsonFile.readJSONSync = jsonFile.readJsonSync
|
|
41150
|
+
|
|
41151
|
+
module.exports = jsonFile
|
|
41152
|
+
|
|
41153
|
+
|
|
41154
|
+
/***/ }),
|
|
41155
|
+
|
|
41156
|
+
/***/ 42915:
|
|
41157
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41158
|
+
|
|
41159
|
+
"use strict";
|
|
41160
|
+
|
|
41161
|
+
|
|
41162
|
+
const jsonFile = __webpack_require__(84719)
|
|
41163
|
+
|
|
41164
|
+
module.exports = {
|
|
41165
|
+
// jsonfile exports
|
|
41166
|
+
readJson: jsonFile.readFile,
|
|
41167
|
+
readJsonSync: jsonFile.readFileSync,
|
|
41168
|
+
writeJson: jsonFile.writeFile,
|
|
41169
|
+
writeJsonSync: jsonFile.writeFileSync
|
|
41170
|
+
}
|
|
41171
|
+
|
|
41172
|
+
|
|
41173
|
+
/***/ }),
|
|
41174
|
+
|
|
41175
|
+
/***/ 48467:
|
|
41176
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41177
|
+
|
|
41178
|
+
"use strict";
|
|
41179
|
+
|
|
41180
|
+
|
|
41181
|
+
const { stringify } = __webpack_require__(27546)
|
|
41182
|
+
const { outputFileSync } = __webpack_require__(65889)
|
|
41183
|
+
|
|
41184
|
+
function outputJsonSync (file, data, options) {
|
|
41185
|
+
const str = stringify(data, options)
|
|
41186
|
+
|
|
41187
|
+
outputFileSync(file, str, options)
|
|
41188
|
+
}
|
|
41189
|
+
|
|
41190
|
+
module.exports = outputJsonSync
|
|
41191
|
+
|
|
41192
|
+
|
|
41193
|
+
/***/ }),
|
|
41194
|
+
|
|
41195
|
+
/***/ 87482:
|
|
41196
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41197
|
+
|
|
41198
|
+
"use strict";
|
|
41199
|
+
|
|
41200
|
+
|
|
41201
|
+
const { stringify } = __webpack_require__(27546)
|
|
41202
|
+
const { outputFile } = __webpack_require__(65889)
|
|
41203
|
+
|
|
41204
|
+
async function outputJson (file, data, options = {}) {
|
|
41205
|
+
const str = stringify(data, options)
|
|
41206
|
+
|
|
41207
|
+
await outputFile(file, str, options)
|
|
41208
|
+
}
|
|
41209
|
+
|
|
41210
|
+
module.exports = outputJson
|
|
41211
|
+
|
|
41212
|
+
|
|
41213
|
+
/***/ }),
|
|
41214
|
+
|
|
41215
|
+
/***/ 59915:
|
|
41216
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41217
|
+
|
|
41218
|
+
"use strict";
|
|
41219
|
+
|
|
41220
|
+
const u = (__webpack_require__(84357).fromPromise)
|
|
41221
|
+
const { makeDir: _makeDir, makeDirSync } = __webpack_require__(15602)
|
|
41222
|
+
const makeDir = u(_makeDir)
|
|
41223
|
+
|
|
41224
|
+
module.exports = {
|
|
41225
|
+
mkdirs: makeDir,
|
|
41226
|
+
mkdirsSync: makeDirSync,
|
|
41227
|
+
// alias
|
|
41228
|
+
mkdirp: makeDir,
|
|
41229
|
+
mkdirpSync: makeDirSync,
|
|
41230
|
+
ensureDir: makeDir,
|
|
41231
|
+
ensureDirSync: makeDirSync
|
|
41232
|
+
}
|
|
41233
|
+
|
|
41234
|
+
|
|
41235
|
+
/***/ }),
|
|
41236
|
+
|
|
41237
|
+
/***/ 15602:
|
|
41238
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41239
|
+
|
|
41240
|
+
"use strict";
|
|
41241
|
+
|
|
41242
|
+
const fs = __webpack_require__(73664)
|
|
41243
|
+
const { checkPath } = __webpack_require__(60633)
|
|
41244
|
+
|
|
41245
|
+
const getMode = options => {
|
|
41246
|
+
const defaults = { mode: 0o777 }
|
|
41247
|
+
if (typeof options === 'number') return options
|
|
41248
|
+
return ({ ...defaults, ...options }).mode
|
|
41249
|
+
}
|
|
41250
|
+
|
|
41251
|
+
module.exports.makeDir = async (dir, options) => {
|
|
41252
|
+
checkPath(dir)
|
|
41253
|
+
|
|
41254
|
+
return fs.mkdir(dir, {
|
|
41255
|
+
mode: getMode(options),
|
|
41256
|
+
recursive: true
|
|
41257
|
+
})
|
|
41258
|
+
}
|
|
41259
|
+
|
|
41260
|
+
module.exports.makeDirSync = (dir, options) => {
|
|
41261
|
+
checkPath(dir)
|
|
41262
|
+
|
|
41263
|
+
return fs.mkdirSync(dir, {
|
|
41264
|
+
mode: getMode(options),
|
|
41265
|
+
recursive: true
|
|
41266
|
+
})
|
|
41267
|
+
}
|
|
41268
|
+
|
|
41269
|
+
|
|
41270
|
+
/***/ }),
|
|
41271
|
+
|
|
41272
|
+
/***/ 60633:
|
|
41273
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41274
|
+
|
|
41275
|
+
"use strict";
|
|
41276
|
+
// Adapted from https://github.com/sindresorhus/make-dir
|
|
41277
|
+
// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
41278
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
41279
|
+
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
41280
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
41281
|
+
|
|
41282
|
+
const path = __webpack_require__(71017)
|
|
41283
|
+
|
|
41284
|
+
// https://github.com/nodejs/node/issues/8987
|
|
41285
|
+
// https://github.com/libuv/libuv/pull/1088
|
|
41286
|
+
module.exports.checkPath = function checkPath (pth) {
|
|
41287
|
+
if (process.platform === 'win32') {
|
|
41288
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
|
|
41289
|
+
|
|
41290
|
+
if (pathHasInvalidWinCharacters) {
|
|
41291
|
+
const error = new Error(`Path contains invalid characters: ${pth}`)
|
|
41292
|
+
error.code = 'EINVAL'
|
|
41293
|
+
throw error
|
|
41294
|
+
}
|
|
41295
|
+
}
|
|
41296
|
+
}
|
|
41297
|
+
|
|
41298
|
+
|
|
41299
|
+
/***/ }),
|
|
41300
|
+
|
|
41301
|
+
/***/ 14449:
|
|
41302
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41303
|
+
|
|
41304
|
+
"use strict";
|
|
41305
|
+
|
|
41306
|
+
|
|
41307
|
+
const u = (__webpack_require__(84357).fromCallback)
|
|
41308
|
+
module.exports = {
|
|
41309
|
+
move: u(__webpack_require__(10000)),
|
|
41310
|
+
moveSync: __webpack_require__(40665)
|
|
41311
|
+
}
|
|
41312
|
+
|
|
41313
|
+
|
|
41314
|
+
/***/ }),
|
|
41315
|
+
|
|
41316
|
+
/***/ 40665:
|
|
41317
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41318
|
+
|
|
41319
|
+
"use strict";
|
|
41320
|
+
|
|
41321
|
+
|
|
41322
|
+
const fs = __webpack_require__(62204)
|
|
41323
|
+
const path = __webpack_require__(71017)
|
|
41324
|
+
const copySync = (__webpack_require__(1105).copySync)
|
|
41325
|
+
const removeSync = (__webpack_require__(21133).removeSync)
|
|
41326
|
+
const mkdirpSync = (__webpack_require__(59915).mkdirpSync)
|
|
41327
|
+
const stat = __webpack_require__(12021)
|
|
41328
|
+
|
|
41329
|
+
function moveSync (src, dest, opts) {
|
|
41330
|
+
opts = opts || {}
|
|
41331
|
+
const overwrite = opts.overwrite || opts.clobber || false
|
|
41332
|
+
|
|
41333
|
+
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)
|
|
41334
|
+
stat.checkParentPathsSync(src, srcStat, dest, 'move')
|
|
41335
|
+
if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))
|
|
41336
|
+
return doRename(src, dest, overwrite, isChangingCase)
|
|
41337
|
+
}
|
|
41338
|
+
|
|
41339
|
+
function isParentRoot (dest) {
|
|
41340
|
+
const parent = path.dirname(dest)
|
|
41341
|
+
const parsedPath = path.parse(parent)
|
|
41342
|
+
return parsedPath.root === parent
|
|
41343
|
+
}
|
|
41344
|
+
|
|
41345
|
+
function doRename (src, dest, overwrite, isChangingCase) {
|
|
41346
|
+
if (isChangingCase) return rename(src, dest, overwrite)
|
|
41347
|
+
if (overwrite) {
|
|
41348
|
+
removeSync(dest)
|
|
41349
|
+
return rename(src, dest, overwrite)
|
|
41350
|
+
}
|
|
41351
|
+
if (fs.existsSync(dest)) throw new Error('dest already exists.')
|
|
41352
|
+
return rename(src, dest, overwrite)
|
|
41353
|
+
}
|
|
41354
|
+
|
|
41355
|
+
function rename (src, dest, overwrite) {
|
|
41356
|
+
try {
|
|
41357
|
+
fs.renameSync(src, dest)
|
|
41358
|
+
} catch (err) {
|
|
41359
|
+
if (err.code !== 'EXDEV') throw err
|
|
41360
|
+
return moveAcrossDevice(src, dest, overwrite)
|
|
41361
|
+
}
|
|
41362
|
+
}
|
|
41363
|
+
|
|
41364
|
+
function moveAcrossDevice (src, dest, overwrite) {
|
|
41365
|
+
const opts = {
|
|
41366
|
+
overwrite,
|
|
41367
|
+
errorOnExist: true
|
|
41368
|
+
}
|
|
41369
|
+
copySync(src, dest, opts)
|
|
41370
|
+
return removeSync(src)
|
|
41371
|
+
}
|
|
41372
|
+
|
|
41373
|
+
module.exports = moveSync
|
|
41374
|
+
|
|
41375
|
+
|
|
41376
|
+
/***/ }),
|
|
41377
|
+
|
|
41378
|
+
/***/ 10000:
|
|
41379
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41380
|
+
|
|
41381
|
+
"use strict";
|
|
41382
|
+
|
|
41383
|
+
|
|
41384
|
+
const fs = __webpack_require__(62204)
|
|
41385
|
+
const path = __webpack_require__(71017)
|
|
41386
|
+
const copy = (__webpack_require__(1105).copy)
|
|
41387
|
+
const remove = (__webpack_require__(21133).remove)
|
|
41388
|
+
const mkdirp = (__webpack_require__(59915).mkdirp)
|
|
41389
|
+
const pathExists = (__webpack_require__(9672).pathExists)
|
|
41390
|
+
const stat = __webpack_require__(12021)
|
|
41391
|
+
|
|
41392
|
+
function move (src, dest, opts, cb) {
|
|
41393
|
+
if (typeof opts === 'function') {
|
|
41394
|
+
cb = opts
|
|
41395
|
+
opts = {}
|
|
41396
|
+
}
|
|
41397
|
+
|
|
41398
|
+
const overwrite = opts.overwrite || opts.clobber || false
|
|
41399
|
+
|
|
41400
|
+
stat.checkPaths(src, dest, 'move', opts, (err, stats) => {
|
|
41401
|
+
if (err) return cb(err)
|
|
41402
|
+
const { srcStat, isChangingCase = false } = stats
|
|
41403
|
+
stat.checkParentPaths(src, srcStat, dest, 'move', err => {
|
|
41404
|
+
if (err) return cb(err)
|
|
41405
|
+
if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb)
|
|
41406
|
+
mkdirp(path.dirname(dest), err => {
|
|
41407
|
+
if (err) return cb(err)
|
|
41408
|
+
return doRename(src, dest, overwrite, isChangingCase, cb)
|
|
41409
|
+
})
|
|
41410
|
+
})
|
|
41411
|
+
})
|
|
41412
|
+
}
|
|
41413
|
+
|
|
41414
|
+
function isParentRoot (dest) {
|
|
41415
|
+
const parent = path.dirname(dest)
|
|
41416
|
+
const parsedPath = path.parse(parent)
|
|
41417
|
+
return parsedPath.root === parent
|
|
41418
|
+
}
|
|
41419
|
+
|
|
41420
|
+
function doRename (src, dest, overwrite, isChangingCase, cb) {
|
|
41421
|
+
if (isChangingCase) return rename(src, dest, overwrite, cb)
|
|
41422
|
+
if (overwrite) {
|
|
41423
|
+
return remove(dest, err => {
|
|
41424
|
+
if (err) return cb(err)
|
|
41425
|
+
return rename(src, dest, overwrite, cb)
|
|
41426
|
+
})
|
|
41427
|
+
}
|
|
41428
|
+
pathExists(dest, (err, destExists) => {
|
|
41429
|
+
if (err) return cb(err)
|
|
41430
|
+
if (destExists) return cb(new Error('dest already exists.'))
|
|
41431
|
+
return rename(src, dest, overwrite, cb)
|
|
41432
|
+
})
|
|
41433
|
+
}
|
|
41434
|
+
|
|
41435
|
+
function rename (src, dest, overwrite, cb) {
|
|
41436
|
+
fs.rename(src, dest, err => {
|
|
41437
|
+
if (!err) return cb()
|
|
41438
|
+
if (err.code !== 'EXDEV') return cb(err)
|
|
41439
|
+
return moveAcrossDevice(src, dest, overwrite, cb)
|
|
41440
|
+
})
|
|
41441
|
+
}
|
|
41442
|
+
|
|
41443
|
+
function moveAcrossDevice (src, dest, overwrite, cb) {
|
|
41444
|
+
const opts = {
|
|
41445
|
+
overwrite,
|
|
41446
|
+
errorOnExist: true
|
|
41447
|
+
}
|
|
41448
|
+
copy(src, dest, opts, err => {
|
|
41449
|
+
if (err) return cb(err)
|
|
41450
|
+
return remove(src, cb)
|
|
41451
|
+
})
|
|
41452
|
+
}
|
|
41453
|
+
|
|
41454
|
+
module.exports = move
|
|
41455
|
+
|
|
41456
|
+
|
|
41457
|
+
/***/ }),
|
|
41458
|
+
|
|
41459
|
+
/***/ 65889:
|
|
41460
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41461
|
+
|
|
41462
|
+
"use strict";
|
|
41463
|
+
|
|
41464
|
+
|
|
41465
|
+
const u = (__webpack_require__(84357).fromCallback)
|
|
41466
|
+
const fs = __webpack_require__(62204)
|
|
41467
|
+
const path = __webpack_require__(71017)
|
|
41468
|
+
const mkdir = __webpack_require__(59915)
|
|
41469
|
+
const pathExists = (__webpack_require__(9672).pathExists)
|
|
41470
|
+
|
|
41471
|
+
function outputFile (file, data, encoding, callback) {
|
|
41472
|
+
if (typeof encoding === 'function') {
|
|
41473
|
+
callback = encoding
|
|
41474
|
+
encoding = 'utf8'
|
|
41475
|
+
}
|
|
41476
|
+
|
|
41477
|
+
const dir = path.dirname(file)
|
|
41478
|
+
pathExists(dir, (err, itDoes) => {
|
|
41479
|
+
if (err) return callback(err)
|
|
41480
|
+
if (itDoes) return fs.writeFile(file, data, encoding, callback)
|
|
41481
|
+
|
|
41482
|
+
mkdir.mkdirs(dir, err => {
|
|
41483
|
+
if (err) return callback(err)
|
|
41484
|
+
|
|
41485
|
+
fs.writeFile(file, data, encoding, callback)
|
|
41486
|
+
})
|
|
41487
|
+
})
|
|
41488
|
+
}
|
|
41489
|
+
|
|
41490
|
+
function outputFileSync (file, ...args) {
|
|
41491
|
+
const dir = path.dirname(file)
|
|
41492
|
+
if (fs.existsSync(dir)) {
|
|
41493
|
+
return fs.writeFileSync(file, ...args)
|
|
41494
|
+
}
|
|
41495
|
+
mkdir.mkdirsSync(dir)
|
|
41496
|
+
fs.writeFileSync(file, ...args)
|
|
41497
|
+
}
|
|
41498
|
+
|
|
41499
|
+
module.exports = {
|
|
41500
|
+
outputFile: u(outputFile),
|
|
41501
|
+
outputFileSync
|
|
41502
|
+
}
|
|
41503
|
+
|
|
41504
|
+
|
|
41505
|
+
/***/ }),
|
|
41506
|
+
|
|
41507
|
+
/***/ 9672:
|
|
41508
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41509
|
+
|
|
41510
|
+
"use strict";
|
|
41511
|
+
|
|
41512
|
+
const u = (__webpack_require__(84357).fromPromise)
|
|
41513
|
+
const fs = __webpack_require__(73664)
|
|
41514
|
+
|
|
41515
|
+
function pathExists (path) {
|
|
41516
|
+
return fs.access(path).then(() => true).catch(() => false)
|
|
41517
|
+
}
|
|
41518
|
+
|
|
41519
|
+
module.exports = {
|
|
41520
|
+
pathExists: u(pathExists),
|
|
41521
|
+
pathExistsSync: fs.existsSync
|
|
41522
|
+
}
|
|
41523
|
+
|
|
41524
|
+
|
|
41525
|
+
/***/ }),
|
|
41526
|
+
|
|
41527
|
+
/***/ 21133:
|
|
41528
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41529
|
+
|
|
41530
|
+
"use strict";
|
|
41531
|
+
|
|
41532
|
+
|
|
41533
|
+
const fs = __webpack_require__(62204)
|
|
41534
|
+
const u = (__webpack_require__(84357).fromCallback)
|
|
41535
|
+
const rimraf = __webpack_require__(58088)
|
|
41536
|
+
|
|
41537
|
+
function remove (path, callback) {
|
|
41538
|
+
// Node 14.14.0+
|
|
41539
|
+
if (fs.rm) return fs.rm(path, { recursive: true, force: true }, callback)
|
|
41540
|
+
rimraf(path, callback)
|
|
41541
|
+
}
|
|
41542
|
+
|
|
41543
|
+
function removeSync (path) {
|
|
41544
|
+
// Node 14.14.0+
|
|
41545
|
+
if (fs.rmSync) return fs.rmSync(path, { recursive: true, force: true })
|
|
41546
|
+
rimraf.sync(path)
|
|
41547
|
+
}
|
|
41548
|
+
|
|
41549
|
+
module.exports = {
|
|
41550
|
+
remove: u(remove),
|
|
41551
|
+
removeSync
|
|
41552
|
+
}
|
|
41553
|
+
|
|
41554
|
+
|
|
41555
|
+
/***/ }),
|
|
41556
|
+
|
|
41557
|
+
/***/ 58088:
|
|
41558
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41559
|
+
|
|
41560
|
+
"use strict";
|
|
41561
|
+
|
|
41562
|
+
|
|
41563
|
+
const fs = __webpack_require__(62204)
|
|
41564
|
+
const path = __webpack_require__(71017)
|
|
41565
|
+
const assert = __webpack_require__(39491)
|
|
41566
|
+
|
|
41567
|
+
const isWindows = (process.platform === 'win32')
|
|
41568
|
+
|
|
41569
|
+
function defaults (options) {
|
|
41570
|
+
const methods = [
|
|
41571
|
+
'unlink',
|
|
41572
|
+
'chmod',
|
|
41573
|
+
'stat',
|
|
41574
|
+
'lstat',
|
|
41575
|
+
'rmdir',
|
|
41576
|
+
'readdir'
|
|
41577
|
+
]
|
|
41578
|
+
methods.forEach(m => {
|
|
41579
|
+
options[m] = options[m] || fs[m]
|
|
41580
|
+
m = m + 'Sync'
|
|
41581
|
+
options[m] = options[m] || fs[m]
|
|
41582
|
+
})
|
|
41583
|
+
|
|
41584
|
+
options.maxBusyTries = options.maxBusyTries || 3
|
|
41585
|
+
}
|
|
41586
|
+
|
|
41587
|
+
function rimraf (p, options, cb) {
|
|
41588
|
+
let busyTries = 0
|
|
41589
|
+
|
|
41590
|
+
if (typeof options === 'function') {
|
|
41591
|
+
cb = options
|
|
41592
|
+
options = {}
|
|
41593
|
+
}
|
|
41594
|
+
|
|
41595
|
+
assert(p, 'rimraf: missing path')
|
|
41596
|
+
assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
|
|
41597
|
+
assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required')
|
|
41598
|
+
assert(options, 'rimraf: invalid options argument provided')
|
|
41599
|
+
assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
|
|
41600
|
+
|
|
41601
|
+
defaults(options)
|
|
41602
|
+
|
|
41603
|
+
rimraf_(p, options, function CB (er) {
|
|
41604
|
+
if (er) {
|
|
41605
|
+
if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') &&
|
|
41606
|
+
busyTries < options.maxBusyTries) {
|
|
41607
|
+
busyTries++
|
|
41608
|
+
const time = busyTries * 100
|
|
41609
|
+
// try again, with the same exact callback as this one.
|
|
41610
|
+
return setTimeout(() => rimraf_(p, options, CB), time)
|
|
41611
|
+
}
|
|
41612
|
+
|
|
41613
|
+
// already gone
|
|
41614
|
+
if (er.code === 'ENOENT') er = null
|
|
41615
|
+
}
|
|
41616
|
+
|
|
41617
|
+
cb(er)
|
|
41618
|
+
})
|
|
41619
|
+
}
|
|
41620
|
+
|
|
41621
|
+
// Two possible strategies.
|
|
41622
|
+
// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR
|
|
41623
|
+
// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR
|
|
41624
|
+
//
|
|
41625
|
+
// Both result in an extra syscall when you guess wrong. However, there
|
|
41626
|
+
// are likely far more normal files in the world than directories. This
|
|
41627
|
+
// is based on the assumption that a the average number of files per
|
|
41628
|
+
// directory is >= 1.
|
|
41629
|
+
//
|
|
41630
|
+
// If anyone ever complains about this, then I guess the strategy could
|
|
41631
|
+
// be made configurable somehow. But until then, YAGNI.
|
|
41632
|
+
function rimraf_ (p, options, cb) {
|
|
41633
|
+
assert(p)
|
|
41634
|
+
assert(options)
|
|
41635
|
+
assert(typeof cb === 'function')
|
|
41636
|
+
|
|
41637
|
+
// sunos lets the root user unlink directories, which is... weird.
|
|
41638
|
+
// so we have to lstat here and make sure it's not a dir.
|
|
41639
|
+
options.lstat(p, (er, st) => {
|
|
41640
|
+
if (er && er.code === 'ENOENT') {
|
|
41641
|
+
return cb(null)
|
|
41642
|
+
}
|
|
41643
|
+
|
|
41644
|
+
// Windows can EPERM on stat. Life is suffering.
|
|
41645
|
+
if (er && er.code === 'EPERM' && isWindows) {
|
|
41646
|
+
return fixWinEPERM(p, options, er, cb)
|
|
41647
|
+
}
|
|
41648
|
+
|
|
41649
|
+
if (st && st.isDirectory()) {
|
|
41650
|
+
return rmdir(p, options, er, cb)
|
|
41651
|
+
}
|
|
41652
|
+
|
|
41653
|
+
options.unlink(p, er => {
|
|
41654
|
+
if (er) {
|
|
41655
|
+
if (er.code === 'ENOENT') {
|
|
41656
|
+
return cb(null)
|
|
41657
|
+
}
|
|
41658
|
+
if (er.code === 'EPERM') {
|
|
41659
|
+
return (isWindows)
|
|
41660
|
+
? fixWinEPERM(p, options, er, cb)
|
|
41661
|
+
: rmdir(p, options, er, cb)
|
|
41662
|
+
}
|
|
41663
|
+
if (er.code === 'EISDIR') {
|
|
41664
|
+
return rmdir(p, options, er, cb)
|
|
41665
|
+
}
|
|
41666
|
+
}
|
|
41667
|
+
return cb(er)
|
|
41668
|
+
})
|
|
41669
|
+
})
|
|
41670
|
+
}
|
|
41671
|
+
|
|
41672
|
+
function fixWinEPERM (p, options, er, cb) {
|
|
41673
|
+
assert(p)
|
|
41674
|
+
assert(options)
|
|
41675
|
+
assert(typeof cb === 'function')
|
|
41676
|
+
|
|
41677
|
+
options.chmod(p, 0o666, er2 => {
|
|
41678
|
+
if (er2) {
|
|
41679
|
+
cb(er2.code === 'ENOENT' ? null : er)
|
|
41680
|
+
} else {
|
|
41681
|
+
options.stat(p, (er3, stats) => {
|
|
41682
|
+
if (er3) {
|
|
41683
|
+
cb(er3.code === 'ENOENT' ? null : er)
|
|
41684
|
+
} else if (stats.isDirectory()) {
|
|
41685
|
+
rmdir(p, options, er, cb)
|
|
41686
|
+
} else {
|
|
41687
|
+
options.unlink(p, cb)
|
|
41688
|
+
}
|
|
41689
|
+
})
|
|
41690
|
+
}
|
|
41691
|
+
})
|
|
41692
|
+
}
|
|
41693
|
+
|
|
41694
|
+
function fixWinEPERMSync (p, options, er) {
|
|
41695
|
+
let stats
|
|
41696
|
+
|
|
41697
|
+
assert(p)
|
|
41698
|
+
assert(options)
|
|
41699
|
+
|
|
41700
|
+
try {
|
|
41701
|
+
options.chmodSync(p, 0o666)
|
|
41702
|
+
} catch (er2) {
|
|
41703
|
+
if (er2.code === 'ENOENT') {
|
|
41704
|
+
return
|
|
41705
|
+
} else {
|
|
41706
|
+
throw er
|
|
41707
|
+
}
|
|
41708
|
+
}
|
|
41709
|
+
|
|
41710
|
+
try {
|
|
41711
|
+
stats = options.statSync(p)
|
|
41712
|
+
} catch (er3) {
|
|
41713
|
+
if (er3.code === 'ENOENT') {
|
|
41714
|
+
return
|
|
41715
|
+
} else {
|
|
41716
|
+
throw er
|
|
41717
|
+
}
|
|
41718
|
+
}
|
|
41719
|
+
|
|
41720
|
+
if (stats.isDirectory()) {
|
|
41721
|
+
rmdirSync(p, options, er)
|
|
41722
|
+
} else {
|
|
41723
|
+
options.unlinkSync(p)
|
|
41724
|
+
}
|
|
41725
|
+
}
|
|
41726
|
+
|
|
41727
|
+
function rmdir (p, options, originalEr, cb) {
|
|
41728
|
+
assert(p)
|
|
41729
|
+
assert(options)
|
|
41730
|
+
assert(typeof cb === 'function')
|
|
41731
|
+
|
|
41732
|
+
// try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
|
|
41733
|
+
// if we guessed wrong, and it's not a directory, then
|
|
41734
|
+
// raise the original error.
|
|
41735
|
+
options.rmdir(p, er => {
|
|
41736
|
+
if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) {
|
|
41737
|
+
rmkids(p, options, cb)
|
|
41738
|
+
} else if (er && er.code === 'ENOTDIR') {
|
|
41739
|
+
cb(originalEr)
|
|
41740
|
+
} else {
|
|
41741
|
+
cb(er)
|
|
41742
|
+
}
|
|
41743
|
+
})
|
|
41744
|
+
}
|
|
41745
|
+
|
|
41746
|
+
function rmkids (p, options, cb) {
|
|
41747
|
+
assert(p)
|
|
41748
|
+
assert(options)
|
|
41749
|
+
assert(typeof cb === 'function')
|
|
41750
|
+
|
|
41751
|
+
options.readdir(p, (er, files) => {
|
|
41752
|
+
if (er) return cb(er)
|
|
41753
|
+
|
|
41754
|
+
let n = files.length
|
|
41755
|
+
let errState
|
|
41756
|
+
|
|
41757
|
+
if (n === 0) return options.rmdir(p, cb)
|
|
41758
|
+
|
|
41759
|
+
files.forEach(f => {
|
|
41760
|
+
rimraf(path.join(p, f), options, er => {
|
|
41761
|
+
if (errState) {
|
|
41762
|
+
return
|
|
41763
|
+
}
|
|
41764
|
+
if (er) return cb(errState = er)
|
|
41765
|
+
if (--n === 0) {
|
|
41766
|
+
options.rmdir(p, cb)
|
|
41767
|
+
}
|
|
41768
|
+
})
|
|
41769
|
+
})
|
|
41770
|
+
})
|
|
41771
|
+
}
|
|
41772
|
+
|
|
41773
|
+
// this looks simpler, and is strictly *faster*, but will
|
|
41774
|
+
// tie up the JavaScript thread and fail on excessively
|
|
41775
|
+
// deep directory trees.
|
|
41776
|
+
function rimrafSync (p, options) {
|
|
41777
|
+
let st
|
|
41778
|
+
|
|
41779
|
+
options = options || {}
|
|
41780
|
+
defaults(options)
|
|
41781
|
+
|
|
41782
|
+
assert(p, 'rimraf: missing path')
|
|
41783
|
+
assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string')
|
|
41784
|
+
assert(options, 'rimraf: missing options')
|
|
41785
|
+
assert.strictEqual(typeof options, 'object', 'rimraf: options should be object')
|
|
41786
|
+
|
|
41787
|
+
try {
|
|
41788
|
+
st = options.lstatSync(p)
|
|
41789
|
+
} catch (er) {
|
|
41790
|
+
if (er.code === 'ENOENT') {
|
|
41791
|
+
return
|
|
41792
|
+
}
|
|
41793
|
+
|
|
41794
|
+
// Windows can EPERM on stat. Life is suffering.
|
|
41795
|
+
if (er.code === 'EPERM' && isWindows) {
|
|
41796
|
+
fixWinEPERMSync(p, options, er)
|
|
41797
|
+
}
|
|
41798
|
+
}
|
|
41799
|
+
|
|
41800
|
+
try {
|
|
41801
|
+
// sunos lets the root user unlink directories, which is... weird.
|
|
41802
|
+
if (st && st.isDirectory()) {
|
|
41803
|
+
rmdirSync(p, options, null)
|
|
41804
|
+
} else {
|
|
41805
|
+
options.unlinkSync(p)
|
|
41806
|
+
}
|
|
41807
|
+
} catch (er) {
|
|
41808
|
+
if (er.code === 'ENOENT') {
|
|
41809
|
+
return
|
|
41810
|
+
} else if (er.code === 'EPERM') {
|
|
41811
|
+
return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)
|
|
41812
|
+
} else if (er.code !== 'EISDIR') {
|
|
41813
|
+
throw er
|
|
41814
|
+
}
|
|
41815
|
+
rmdirSync(p, options, er)
|
|
41816
|
+
}
|
|
41817
|
+
}
|
|
41818
|
+
|
|
41819
|
+
function rmdirSync (p, options, originalEr) {
|
|
41820
|
+
assert(p)
|
|
41821
|
+
assert(options)
|
|
41822
|
+
|
|
41823
|
+
try {
|
|
41824
|
+
options.rmdirSync(p)
|
|
41825
|
+
} catch (er) {
|
|
41826
|
+
if (er.code === 'ENOTDIR') {
|
|
41827
|
+
throw originalEr
|
|
41828
|
+
} else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') {
|
|
41829
|
+
rmkidsSync(p, options)
|
|
41830
|
+
} else if (er.code !== 'ENOENT') {
|
|
41831
|
+
throw er
|
|
41832
|
+
}
|
|
41833
|
+
}
|
|
41834
|
+
}
|
|
41835
|
+
|
|
41836
|
+
function rmkidsSync (p, options) {
|
|
41837
|
+
assert(p)
|
|
41838
|
+
assert(options)
|
|
41839
|
+
options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))
|
|
41840
|
+
|
|
41841
|
+
if (isWindows) {
|
|
41842
|
+
// We only end up here once we got ENOTEMPTY at least once, and
|
|
41843
|
+
// at this point, we are guaranteed to have removed all the kids.
|
|
41844
|
+
// So, we know that it won't be ENOENT or ENOTDIR or anything else.
|
|
41845
|
+
// try really hard to delete stuff on windows, because it has a
|
|
41846
|
+
// PROFOUNDLY annoying habit of not closing handles promptly when
|
|
41847
|
+
// files are deleted, resulting in spurious ENOTEMPTY errors.
|
|
41848
|
+
const startTime = Date.now()
|
|
41849
|
+
do {
|
|
41850
|
+
try {
|
|
41851
|
+
const ret = options.rmdirSync(p, options)
|
|
41852
|
+
return ret
|
|
41853
|
+
} catch {}
|
|
41854
|
+
} while (Date.now() - startTime < 500) // give up after 500ms
|
|
41855
|
+
} else {
|
|
41856
|
+
const ret = options.rmdirSync(p, options)
|
|
41857
|
+
return ret
|
|
41858
|
+
}
|
|
41859
|
+
}
|
|
41860
|
+
|
|
41861
|
+
module.exports = rimraf
|
|
41862
|
+
rimraf.sync = rimrafSync
|
|
41863
|
+
|
|
41864
|
+
|
|
41865
|
+
/***/ }),
|
|
41866
|
+
|
|
41867
|
+
/***/ 12021:
|
|
41868
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41869
|
+
|
|
41870
|
+
"use strict";
|
|
41871
|
+
|
|
41872
|
+
|
|
41873
|
+
const fs = __webpack_require__(73664)
|
|
41874
|
+
const path = __webpack_require__(71017)
|
|
41875
|
+
const util = __webpack_require__(73837)
|
|
41876
|
+
|
|
41877
|
+
function getStats (src, dest, opts) {
|
|
41878
|
+
const statFunc = opts.dereference
|
|
41879
|
+
? (file) => fs.stat(file, { bigint: true })
|
|
41880
|
+
: (file) => fs.lstat(file, { bigint: true })
|
|
41881
|
+
return Promise.all([
|
|
41882
|
+
statFunc(src),
|
|
41883
|
+
statFunc(dest).catch(err => {
|
|
41884
|
+
if (err.code === 'ENOENT') return null
|
|
41885
|
+
throw err
|
|
41886
|
+
})
|
|
41887
|
+
]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
|
|
41888
|
+
}
|
|
41889
|
+
|
|
41890
|
+
function getStatsSync (src, dest, opts) {
|
|
41891
|
+
let destStat
|
|
41892
|
+
const statFunc = opts.dereference
|
|
41893
|
+
? (file) => fs.statSync(file, { bigint: true })
|
|
41894
|
+
: (file) => fs.lstatSync(file, { bigint: true })
|
|
41895
|
+
const srcStat = statFunc(src)
|
|
41896
|
+
try {
|
|
41897
|
+
destStat = statFunc(dest)
|
|
41898
|
+
} catch (err) {
|
|
41899
|
+
if (err.code === 'ENOENT') return { srcStat, destStat: null }
|
|
41900
|
+
throw err
|
|
41901
|
+
}
|
|
41902
|
+
return { srcStat, destStat }
|
|
41903
|
+
}
|
|
41904
|
+
|
|
41905
|
+
function checkPaths (src, dest, funcName, opts, cb) {
|
|
41906
|
+
util.callbackify(getStats)(src, dest, opts, (err, stats) => {
|
|
41907
|
+
if (err) return cb(err)
|
|
41908
|
+
const { srcStat, destStat } = stats
|
|
41909
|
+
|
|
41910
|
+
if (destStat) {
|
|
41911
|
+
if (areIdentical(srcStat, destStat)) {
|
|
41912
|
+
const srcBaseName = path.basename(src)
|
|
41913
|
+
const destBaseName = path.basename(dest)
|
|
41914
|
+
if (funcName === 'move' &&
|
|
41915
|
+
srcBaseName !== destBaseName &&
|
|
41916
|
+
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
41917
|
+
return cb(null, { srcStat, destStat, isChangingCase: true })
|
|
41918
|
+
}
|
|
41919
|
+
return cb(new Error('Source and destination must not be the same.'))
|
|
41920
|
+
}
|
|
41921
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
41922
|
+
return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
|
|
41923
|
+
}
|
|
41924
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
41925
|
+
return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))
|
|
41926
|
+
}
|
|
41927
|
+
}
|
|
41928
|
+
|
|
41929
|
+
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
41930
|
+
return cb(new Error(errMsg(src, dest, funcName)))
|
|
41931
|
+
}
|
|
41932
|
+
return cb(null, { srcStat, destStat })
|
|
41933
|
+
})
|
|
41934
|
+
}
|
|
41935
|
+
|
|
41936
|
+
function checkPathsSync (src, dest, funcName, opts) {
|
|
41937
|
+
const { srcStat, destStat } = getStatsSync(src, dest, opts)
|
|
41938
|
+
|
|
41939
|
+
if (destStat) {
|
|
41940
|
+
if (areIdentical(srcStat, destStat)) {
|
|
41941
|
+
const srcBaseName = path.basename(src)
|
|
41942
|
+
const destBaseName = path.basename(dest)
|
|
41943
|
+
if (funcName === 'move' &&
|
|
41944
|
+
srcBaseName !== destBaseName &&
|
|
41945
|
+
srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
41946
|
+
return { srcStat, destStat, isChangingCase: true }
|
|
41947
|
+
}
|
|
41948
|
+
throw new Error('Source and destination must not be the same.')
|
|
41949
|
+
}
|
|
41950
|
+
if (srcStat.isDirectory() && !destStat.isDirectory()) {
|
|
41951
|
+
throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
|
|
41952
|
+
}
|
|
41953
|
+
if (!srcStat.isDirectory() && destStat.isDirectory()) {
|
|
41954
|
+
throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
|
|
41955
|
+
}
|
|
41956
|
+
}
|
|
41957
|
+
|
|
41958
|
+
if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
|
|
41959
|
+
throw new Error(errMsg(src, dest, funcName))
|
|
41960
|
+
}
|
|
41961
|
+
return { srcStat, destStat }
|
|
41962
|
+
}
|
|
41963
|
+
|
|
41964
|
+
// recursively check if dest parent is a subdirectory of src.
|
|
41965
|
+
// It works for all file types including symlinks since it
|
|
41966
|
+
// checks the src and dest inodes. It starts from the deepest
|
|
41967
|
+
// parent and stops once it reaches the src parent or the root path.
|
|
41968
|
+
function checkParentPaths (src, srcStat, dest, funcName, cb) {
|
|
41969
|
+
const srcParent = path.resolve(path.dirname(src))
|
|
41970
|
+
const destParent = path.resolve(path.dirname(dest))
|
|
41971
|
+
if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
|
|
41972
|
+
fs.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
41973
|
+
if (err) {
|
|
41974
|
+
if (err.code === 'ENOENT') return cb()
|
|
41975
|
+
return cb(err)
|
|
41976
|
+
}
|
|
41977
|
+
if (areIdentical(srcStat, destStat)) {
|
|
41978
|
+
return cb(new Error(errMsg(src, dest, funcName)))
|
|
41979
|
+
}
|
|
41980
|
+
return checkParentPaths(src, srcStat, destParent, funcName, cb)
|
|
41981
|
+
})
|
|
41982
|
+
}
|
|
41983
|
+
|
|
41984
|
+
function checkParentPathsSync (src, srcStat, dest, funcName) {
|
|
41985
|
+
const srcParent = path.resolve(path.dirname(src))
|
|
41986
|
+
const destParent = path.resolve(path.dirname(dest))
|
|
41987
|
+
if (destParent === srcParent || destParent === path.parse(destParent).root) return
|
|
41988
|
+
let destStat
|
|
41989
|
+
try {
|
|
41990
|
+
destStat = fs.statSync(destParent, { bigint: true })
|
|
41991
|
+
} catch (err) {
|
|
41992
|
+
if (err.code === 'ENOENT') return
|
|
41993
|
+
throw err
|
|
41994
|
+
}
|
|
41995
|
+
if (areIdentical(srcStat, destStat)) {
|
|
41996
|
+
throw new Error(errMsg(src, dest, funcName))
|
|
41997
|
+
}
|
|
41998
|
+
return checkParentPathsSync(src, srcStat, destParent, funcName)
|
|
41999
|
+
}
|
|
42000
|
+
|
|
42001
|
+
function areIdentical (srcStat, destStat) {
|
|
42002
|
+
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
|
|
42003
|
+
}
|
|
42004
|
+
|
|
42005
|
+
// return true if dest is a subdir of src, otherwise false.
|
|
42006
|
+
// It only checks the path strings.
|
|
42007
|
+
function isSrcSubdir (src, dest) {
|
|
42008
|
+
const srcArr = path.resolve(src).split(path.sep).filter(i => i)
|
|
42009
|
+
const destArr = path.resolve(dest).split(path.sep).filter(i => i)
|
|
42010
|
+
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
|
|
42011
|
+
}
|
|
42012
|
+
|
|
42013
|
+
function errMsg (src, dest, funcName) {
|
|
42014
|
+
return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
|
|
42015
|
+
}
|
|
42016
|
+
|
|
42017
|
+
module.exports = {
|
|
42018
|
+
checkPaths,
|
|
42019
|
+
checkPathsSync,
|
|
42020
|
+
checkParentPaths,
|
|
42021
|
+
checkParentPathsSync,
|
|
42022
|
+
isSrcSubdir,
|
|
42023
|
+
areIdentical
|
|
42024
|
+
}
|
|
42025
|
+
|
|
42026
|
+
|
|
42027
|
+
/***/ }),
|
|
42028
|
+
|
|
42029
|
+
/***/ 88962:
|
|
42030
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
42031
|
+
|
|
42032
|
+
"use strict";
|
|
42033
|
+
|
|
42034
|
+
|
|
42035
|
+
const fs = __webpack_require__(62204)
|
|
42036
|
+
|
|
42037
|
+
function utimesMillis (path, atime, mtime, callback) {
|
|
42038
|
+
// if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
|
|
42039
|
+
fs.open(path, 'r+', (err, fd) => {
|
|
42040
|
+
if (err) return callback(err)
|
|
42041
|
+
fs.futimes(fd, atime, mtime, futimesErr => {
|
|
42042
|
+
fs.close(fd, closeErr => {
|
|
42043
|
+
if (callback) callback(futimesErr || closeErr)
|
|
42044
|
+
})
|
|
42045
|
+
})
|
|
42046
|
+
})
|
|
42047
|
+
}
|
|
42048
|
+
|
|
42049
|
+
function utimesMillisSync (path, atime, mtime) {
|
|
42050
|
+
const fd = fs.openSync(path, 'r+')
|
|
42051
|
+
fs.futimesSync(fd, atime, mtime)
|
|
42052
|
+
return fs.closeSync(fd)
|
|
42053
|
+
}
|
|
42054
|
+
|
|
42055
|
+
module.exports = {
|
|
42056
|
+
utimesMillis,
|
|
42057
|
+
utimesMillisSync
|
|
42058
|
+
}
|
|
42059
|
+
|
|
42060
|
+
|
|
40087
42061
|
/***/ }),
|
|
40088
42062
|
|
|
40089
42063
|
/***/ 58021:
|
|
@@ -83675,7 +85649,7 @@ exports.ConnectableObservable = void 0;
|
|
|
83675
85649
|
var Observable_1 = __webpack_require__(47082);
|
|
83676
85650
|
var Subscription_1 = __webpack_require__(69661);
|
|
83677
85651
|
var refCount_1 = __webpack_require__(75181);
|
|
83678
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
85652
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
83679
85653
|
var lift_1 = __webpack_require__(12370);
|
|
83680
85654
|
var ConnectableObservable = (function (_super) {
|
|
83681
85655
|
__extends(ConnectableObservable, _super);
|
|
@@ -83893,7 +85867,7 @@ var identity_1 = __webpack_require__(12418);
|
|
|
83893
85867
|
var mapOneOrManyArgs_1 = __webpack_require__(59377);
|
|
83894
85868
|
var args_1 = __webpack_require__(47844);
|
|
83895
85869
|
var createObject_1 = __webpack_require__(22573);
|
|
83896
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
85870
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
83897
85871
|
var executeSchedule_1 = __webpack_require__(28420);
|
|
83898
85872
|
function combineLatest() {
|
|
83899
85873
|
var args = [];
|
|
@@ -84111,7 +86085,7 @@ var Observable_1 = __webpack_require__(47082);
|
|
|
84111
86085
|
var argsArgArrayOrObject_1 = __webpack_require__(12671);
|
|
84112
86086
|
var innerFrom_1 = __webpack_require__(17438);
|
|
84113
86087
|
var args_1 = __webpack_require__(47844);
|
|
84114
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
86088
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
84115
86089
|
var mapOneOrManyArgs_1 = __webpack_require__(59377);
|
|
84116
86090
|
var createObject_1 = __webpack_require__(22573);
|
|
84117
86091
|
function forkJoin() {
|
|
@@ -84784,7 +86758,7 @@ exports.raceInit = exports.race = void 0;
|
|
|
84784
86758
|
var Observable_1 = __webpack_require__(47082);
|
|
84785
86759
|
var innerFrom_1 = __webpack_require__(17438);
|
|
84786
86760
|
var argsOrArgArray_1 = __webpack_require__(25796);
|
|
84787
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
86761
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
84788
86762
|
function race() {
|
|
84789
86763
|
var sources = [];
|
|
84790
86764
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -84990,7 +86964,7 @@ var Observable_1 = __webpack_require__(47082);
|
|
|
84990
86964
|
var innerFrom_1 = __webpack_require__(17438);
|
|
84991
86965
|
var argsOrArgArray_1 = __webpack_require__(25796);
|
|
84992
86966
|
var empty_1 = __webpack_require__(18939);
|
|
84993
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
86967
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
84994
86968
|
var args_1 = __webpack_require__(47844);
|
|
84995
86969
|
function zip() {
|
|
84996
86970
|
var args = [];
|
|
@@ -85035,7 +87009,7 @@ exports.zip = zip;
|
|
|
85035
87009
|
|
|
85036
87010
|
/***/ }),
|
|
85037
87011
|
|
|
85038
|
-
/***/
|
|
87012
|
+
/***/ 83028:
|
|
85039
87013
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
85040
87014
|
|
|
85041
87015
|
"use strict";
|
|
@@ -85123,7 +87097,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
85123
87097
|
exports.audit = void 0;
|
|
85124
87098
|
var lift_1 = __webpack_require__(12370);
|
|
85125
87099
|
var innerFrom_1 = __webpack_require__(17438);
|
|
85126
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87100
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85127
87101
|
function audit(durationSelector) {
|
|
85128
87102
|
return lift_1.operate(function (source, subscriber) {
|
|
85129
87103
|
var hasValue = false;
|
|
@@ -85190,7 +87164,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
85190
87164
|
exports.buffer = void 0;
|
|
85191
87165
|
var lift_1 = __webpack_require__(12370);
|
|
85192
87166
|
var noop_1 = __webpack_require__(3064);
|
|
85193
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87167
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85194
87168
|
function buffer(closingNotifier) {
|
|
85195
87169
|
return lift_1.operate(function (source, subscriber) {
|
|
85196
87170
|
var currentBuffer = [];
|
|
@@ -85232,7 +87206,7 @@ var __values = (this && this.__values) || function(o) {
|
|
|
85232
87206
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
85233
87207
|
exports.bufferCount = void 0;
|
|
85234
87208
|
var lift_1 = __webpack_require__(12370);
|
|
85235
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87209
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85236
87210
|
var arrRemove_1 = __webpack_require__(19503);
|
|
85237
87211
|
function bufferCount(bufferSize, startBufferEvery) {
|
|
85238
87212
|
if (startBufferEvery === void 0) { startBufferEvery = null; }
|
|
@@ -85325,7 +87299,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
85325
87299
|
exports.bufferTime = void 0;
|
|
85326
87300
|
var Subscription_1 = __webpack_require__(69661);
|
|
85327
87301
|
var lift_1 = __webpack_require__(12370);
|
|
85328
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87302
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85329
87303
|
var arrRemove_1 = __webpack_require__(19503);
|
|
85330
87304
|
var async_1 = __webpack_require__(11644);
|
|
85331
87305
|
var args_1 = __webpack_require__(47844);
|
|
@@ -85424,7 +87398,7 @@ exports.bufferToggle = void 0;
|
|
|
85424
87398
|
var Subscription_1 = __webpack_require__(69661);
|
|
85425
87399
|
var lift_1 = __webpack_require__(12370);
|
|
85426
87400
|
var innerFrom_1 = __webpack_require__(17438);
|
|
85427
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87401
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85428
87402
|
var noop_1 = __webpack_require__(3064);
|
|
85429
87403
|
var arrRemove_1 = __webpack_require__(19503);
|
|
85430
87404
|
function bufferToggle(openings, closingSelector) {
|
|
@@ -85478,7 +87452,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
85478
87452
|
exports.bufferWhen = void 0;
|
|
85479
87453
|
var lift_1 = __webpack_require__(12370);
|
|
85480
87454
|
var noop_1 = __webpack_require__(3064);
|
|
85481
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87455
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85482
87456
|
var innerFrom_1 = __webpack_require__(17438);
|
|
85483
87457
|
function bufferWhen(closingSelector) {
|
|
85484
87458
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -85511,7 +87485,7 @@ exports.bufferWhen = bufferWhen;
|
|
|
85511
87485
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
85512
87486
|
exports.catchError = void 0;
|
|
85513
87487
|
var innerFrom_1 = __webpack_require__(17438);
|
|
85514
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87488
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85515
87489
|
var lift_1 = __webpack_require__(12370);
|
|
85516
87490
|
function catchError(selector) {
|
|
85517
87491
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -85854,7 +87828,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
85854
87828
|
exports.debounce = void 0;
|
|
85855
87829
|
var lift_1 = __webpack_require__(12370);
|
|
85856
87830
|
var noop_1 = __webpack_require__(3064);
|
|
85857
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87831
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85858
87832
|
var innerFrom_1 = __webpack_require__(17438);
|
|
85859
87833
|
function debounce(durationSelector) {
|
|
85860
87834
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -85899,7 +87873,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
85899
87873
|
exports.debounceTime = void 0;
|
|
85900
87874
|
var async_1 = __webpack_require__(11644);
|
|
85901
87875
|
var lift_1 = __webpack_require__(12370);
|
|
85902
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87876
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85903
87877
|
function debounceTime(dueTime, scheduler) {
|
|
85904
87878
|
if (scheduler === void 0) { scheduler = async_1.asyncScheduler; }
|
|
85905
87879
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -85953,7 +87927,7 @@ exports.debounceTime = debounceTime;
|
|
|
85953
87927
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
85954
87928
|
exports.defaultIfEmpty = void 0;
|
|
85955
87929
|
var lift_1 = __webpack_require__(12370);
|
|
85956
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
87930
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
85957
87931
|
function defaultIfEmpty(defaultValue) {
|
|
85958
87932
|
return lift_1.operate(function (source, subscriber) {
|
|
85959
87933
|
var hasValue = false;
|
|
@@ -86027,7 +88001,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
86027
88001
|
exports.dematerialize = void 0;
|
|
86028
88002
|
var Notification_1 = __webpack_require__(89340);
|
|
86029
88003
|
var lift_1 = __webpack_require__(12370);
|
|
86030
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88004
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86031
88005
|
function dematerialize() {
|
|
86032
88006
|
return lift_1.operate(function (source, subscriber) {
|
|
86033
88007
|
source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (notification) { return Notification_1.observeNotification(notification, subscriber); }));
|
|
@@ -86046,7 +88020,7 @@ exports.dematerialize = dematerialize;
|
|
|
86046
88020
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
86047
88021
|
exports.distinct = void 0;
|
|
86048
88022
|
var lift_1 = __webpack_require__(12370);
|
|
86049
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88023
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86050
88024
|
var noop_1 = __webpack_require__(3064);
|
|
86051
88025
|
function distinct(keySelector, flushes) {
|
|
86052
88026
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -86075,7 +88049,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
86075
88049
|
exports.distinctUntilChanged = void 0;
|
|
86076
88050
|
var identity_1 = __webpack_require__(12418);
|
|
86077
88051
|
var lift_1 = __webpack_require__(12370);
|
|
86078
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88052
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86079
88053
|
function distinctUntilChanged(comparator, keySelector) {
|
|
86080
88054
|
if (keySelector === void 0) { keySelector = identity_1.identity; }
|
|
86081
88055
|
comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;
|
|
@@ -86192,7 +88166,7 @@ exports.endWith = endWith;
|
|
|
86192
88166
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
86193
88167
|
exports.every = void 0;
|
|
86194
88168
|
var lift_1 = __webpack_require__(12370);
|
|
86195
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88169
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86196
88170
|
function every(predicate, thisArg) {
|
|
86197
88171
|
return lift_1.operate(function (source, subscriber) {
|
|
86198
88172
|
var index = 0;
|
|
@@ -86234,7 +88208,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
86234
88208
|
exports.exhaustAll = void 0;
|
|
86235
88209
|
var lift_1 = __webpack_require__(12370);
|
|
86236
88210
|
var innerFrom_1 = __webpack_require__(17438);
|
|
86237
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88211
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86238
88212
|
function exhaustAll() {
|
|
86239
88213
|
return lift_1.operate(function (source, subscriber) {
|
|
86240
88214
|
var isComplete = false;
|
|
@@ -86267,7 +88241,7 @@ exports.exhaustMap = void 0;
|
|
|
86267
88241
|
var map_1 = __webpack_require__(39446);
|
|
86268
88242
|
var innerFrom_1 = __webpack_require__(17438);
|
|
86269
88243
|
var lift_1 = __webpack_require__(12370);
|
|
86270
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88244
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86271
88245
|
function exhaustMap(project, resultSelector) {
|
|
86272
88246
|
if (resultSelector) {
|
|
86273
88247
|
return function (source) {
|
|
@@ -86326,7 +88300,7 @@ exports.expand = expand;
|
|
|
86326
88300
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
86327
88301
|
exports.filter = void 0;
|
|
86328
88302
|
var lift_1 = __webpack_require__(12370);
|
|
86329
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88303
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86330
88304
|
function filter(predicate, thisArg) {
|
|
86331
88305
|
return lift_1.operate(function (source, subscriber) {
|
|
86332
88306
|
var index = 0;
|
|
@@ -86369,7 +88343,7 @@ exports.finalize = finalize;
|
|
|
86369
88343
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
86370
88344
|
exports.createFind = exports.find = void 0;
|
|
86371
88345
|
var lift_1 = __webpack_require__(12370);
|
|
86372
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88346
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86373
88347
|
function find(predicate, thisArg) {
|
|
86374
88348
|
return lift_1.operate(createFind(predicate, thisArg, 'value'));
|
|
86375
88349
|
}
|
|
@@ -86475,7 +88449,7 @@ var Observable_1 = __webpack_require__(47082);
|
|
|
86475
88449
|
var innerFrom_1 = __webpack_require__(17438);
|
|
86476
88450
|
var Subject_1 = __webpack_require__(15235);
|
|
86477
88451
|
var lift_1 = __webpack_require__(12370);
|
|
86478
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88452
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86479
88453
|
function groupBy(keySelector, elementOrOptions, duration, connector) {
|
|
86480
88454
|
return lift_1.operate(function (source, subscriber) {
|
|
86481
88455
|
var element;
|
|
@@ -86557,7 +88531,7 @@ var GroupBySubscriber = (function (_super) {
|
|
|
86557
88531
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
86558
88532
|
exports.ignoreElements = void 0;
|
|
86559
88533
|
var lift_1 = __webpack_require__(12370);
|
|
86560
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88534
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86561
88535
|
var noop_1 = __webpack_require__(3064);
|
|
86562
88536
|
function ignoreElements() {
|
|
86563
88537
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -86577,7 +88551,7 @@ exports.ignoreElements = ignoreElements;
|
|
|
86577
88551
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
86578
88552
|
exports.isEmpty = void 0;
|
|
86579
88553
|
var lift_1 = __webpack_require__(12370);
|
|
86580
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88554
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86581
88555
|
function isEmpty() {
|
|
86582
88556
|
return lift_1.operate(function (source, subscriber) {
|
|
86583
88557
|
source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function () {
|
|
@@ -86646,7 +88620,7 @@ exports.last = last;
|
|
|
86646
88620
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
86647
88621
|
exports.map = void 0;
|
|
86648
88622
|
var lift_1 = __webpack_require__(12370);
|
|
86649
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88623
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86650
88624
|
function map(project, thisArg) {
|
|
86651
88625
|
return lift_1.operate(function (source, subscriber) {
|
|
86652
88626
|
var index = 0;
|
|
@@ -86685,7 +88659,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
86685
88659
|
exports.materialize = void 0;
|
|
86686
88660
|
var Notification_1 = __webpack_require__(89340);
|
|
86687
88661
|
var lift_1 = __webpack_require__(12370);
|
|
86688
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88662
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86689
88663
|
function materialize() {
|
|
86690
88664
|
return lift_1.operate(function (source, subscriber) {
|
|
86691
88665
|
source.subscribe(new OperatorSubscriber_1.OperatorSubscriber(subscriber, function (value) {
|
|
@@ -86798,7 +88772,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
86798
88772
|
exports.mergeInternals = void 0;
|
|
86799
88773
|
var innerFrom_1 = __webpack_require__(17438);
|
|
86800
88774
|
var executeSchedule_1 = __webpack_require__(28420);
|
|
86801
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
88775
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
86802
88776
|
function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalTeardown) {
|
|
86803
88777
|
var buffer = [];
|
|
86804
88778
|
var active = 0;
|
|
@@ -87026,7 +89000,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
87026
89000
|
exports.observeOn = void 0;
|
|
87027
89001
|
var executeSchedule_1 = __webpack_require__(28420);
|
|
87028
89002
|
var lift_1 = __webpack_require__(12370);
|
|
87029
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89003
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87030
89004
|
function observeOn(scheduler, delay) {
|
|
87031
89005
|
if (delay === void 0) { delay = 0; }
|
|
87032
89006
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -87069,7 +89043,7 @@ exports.onErrorResumeNext = void 0;
|
|
|
87069
89043
|
var lift_1 = __webpack_require__(12370);
|
|
87070
89044
|
var innerFrom_1 = __webpack_require__(17438);
|
|
87071
89045
|
var argsOrArgArray_1 = __webpack_require__(25796);
|
|
87072
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89046
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87073
89047
|
var noop_1 = __webpack_require__(3064);
|
|
87074
89048
|
function onErrorResumeNext() {
|
|
87075
89049
|
var sources = [];
|
|
@@ -87115,7 +89089,7 @@ exports.onErrorResumeNext = onErrorResumeNext;
|
|
|
87115
89089
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
87116
89090
|
exports.pairwise = void 0;
|
|
87117
89091
|
var lift_1 = __webpack_require__(12370);
|
|
87118
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89092
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87119
89093
|
function pairwise() {
|
|
87120
89094
|
return lift_1.operate(function (source, subscriber) {
|
|
87121
89095
|
var prev;
|
|
@@ -87382,7 +89356,7 @@ exports.reduce = reduce;
|
|
|
87382
89356
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
87383
89357
|
exports.refCount = void 0;
|
|
87384
89358
|
var lift_1 = __webpack_require__(12370);
|
|
87385
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89359
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87386
89360
|
function refCount() {
|
|
87387
89361
|
return lift_1.operate(function (source, subscriber) {
|
|
87388
89362
|
var connection = null;
|
|
@@ -87420,7 +89394,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
87420
89394
|
exports.repeat = void 0;
|
|
87421
89395
|
var empty_1 = __webpack_require__(18939);
|
|
87422
89396
|
var lift_1 = __webpack_require__(12370);
|
|
87423
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89397
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87424
89398
|
var innerFrom_1 = __webpack_require__(17438);
|
|
87425
89399
|
var timer_1 = __webpack_require__(64820);
|
|
87426
89400
|
function repeat(countOrConfig) {
|
|
@@ -87491,7 +89465,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
87491
89465
|
exports.repeatWhen = void 0;
|
|
87492
89466
|
var Subject_1 = __webpack_require__(15235);
|
|
87493
89467
|
var lift_1 = __webpack_require__(12370);
|
|
87494
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89468
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87495
89469
|
function repeatWhen(notifier) {
|
|
87496
89470
|
return lift_1.operate(function (source, subscriber) {
|
|
87497
89471
|
var innerSub;
|
|
@@ -87546,7 +89520,7 @@ exports.repeatWhen = repeatWhen;
|
|
|
87546
89520
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
87547
89521
|
exports.retry = void 0;
|
|
87548
89522
|
var lift_1 = __webpack_require__(12370);
|
|
87549
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89523
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87550
89524
|
var identity_1 = __webpack_require__(12418);
|
|
87551
89525
|
var timer_1 = __webpack_require__(64820);
|
|
87552
89526
|
var innerFrom_1 = __webpack_require__(17438);
|
|
@@ -87627,7 +89601,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
87627
89601
|
exports.retryWhen = void 0;
|
|
87628
89602
|
var Subject_1 = __webpack_require__(15235);
|
|
87629
89603
|
var lift_1 = __webpack_require__(12370);
|
|
87630
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89604
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87631
89605
|
function retryWhen(notifier) {
|
|
87632
89606
|
return lift_1.operate(function (source, subscriber) {
|
|
87633
89607
|
var innerSub;
|
|
@@ -87669,7 +89643,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
87669
89643
|
exports.sample = void 0;
|
|
87670
89644
|
var lift_1 = __webpack_require__(12370);
|
|
87671
89645
|
var noop_1 = __webpack_require__(3064);
|
|
87672
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89646
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87673
89647
|
function sample(notifier) {
|
|
87674
89648
|
return lift_1.operate(function (source, subscriber) {
|
|
87675
89649
|
var hasValue = false;
|
|
@@ -87737,7 +89711,7 @@ exports.scan = scan;
|
|
|
87737
89711
|
|
|
87738
89712
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
87739
89713
|
exports.scanInternals = void 0;
|
|
87740
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89714
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87741
89715
|
function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {
|
|
87742
89716
|
return function (source, subscriber) {
|
|
87743
89717
|
var hasState = hasSeed;
|
|
@@ -87771,7 +89745,7 @@ exports.scanInternals = scanInternals;
|
|
|
87771
89745
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
87772
89746
|
exports.sequenceEqual = void 0;
|
|
87773
89747
|
var lift_1 = __webpack_require__(12370);
|
|
87774
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89748
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87775
89749
|
function sequenceEqual(compareTo, comparator) {
|
|
87776
89750
|
if (comparator === void 0) { comparator = function (a, b) { return a === b; }; }
|
|
87777
89751
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -87969,7 +89943,7 @@ var EmptyError_1 = __webpack_require__(77404);
|
|
|
87969
89943
|
var SequenceError_1 = __webpack_require__(28585);
|
|
87970
89944
|
var NotFoundError_1 = __webpack_require__(51403);
|
|
87971
89945
|
var lift_1 = __webpack_require__(12370);
|
|
87972
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
89946
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
87973
89947
|
function single(predicate) {
|
|
87974
89948
|
return lift_1.operate(function (source, subscriber) {
|
|
87975
89949
|
var hasValue = false;
|
|
@@ -88024,7 +89998,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88024
89998
|
exports.skipLast = void 0;
|
|
88025
89999
|
var identity_1 = __webpack_require__(12418);
|
|
88026
90000
|
var lift_1 = __webpack_require__(12370);
|
|
88027
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90001
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88028
90002
|
function skipLast(skipCount) {
|
|
88029
90003
|
return skipCount <= 0
|
|
88030
90004
|
?
|
|
@@ -88062,7 +90036,7 @@ exports.skipLast = skipLast;
|
|
|
88062
90036
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
88063
90037
|
exports.skipUntil = void 0;
|
|
88064
90038
|
var lift_1 = __webpack_require__(12370);
|
|
88065
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90039
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88066
90040
|
var innerFrom_1 = __webpack_require__(17438);
|
|
88067
90041
|
var noop_1 = __webpack_require__(3064);
|
|
88068
90042
|
function skipUntil(notifier) {
|
|
@@ -88089,7 +90063,7 @@ exports.skipUntil = skipUntil;
|
|
|
88089
90063
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
88090
90064
|
exports.skipWhile = void 0;
|
|
88091
90065
|
var lift_1 = __webpack_require__(12370);
|
|
88092
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90066
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88093
90067
|
function skipWhile(predicate) {
|
|
88094
90068
|
return lift_1.operate(function (source, subscriber) {
|
|
88095
90069
|
var taking = false;
|
|
@@ -88172,7 +90146,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88172
90146
|
exports.switchMap = void 0;
|
|
88173
90147
|
var innerFrom_1 = __webpack_require__(17438);
|
|
88174
90148
|
var lift_1 = __webpack_require__(12370);
|
|
88175
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90149
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88176
90150
|
function switchMap(project, resultSelector) {
|
|
88177
90151
|
return lift_1.operate(function (source, subscriber) {
|
|
88178
90152
|
var innerSubscriber = null;
|
|
@@ -88247,7 +90221,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88247
90221
|
exports.take = void 0;
|
|
88248
90222
|
var empty_1 = __webpack_require__(18939);
|
|
88249
90223
|
var lift_1 = __webpack_require__(12370);
|
|
88250
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90224
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88251
90225
|
function take(count) {
|
|
88252
90226
|
return count <= 0
|
|
88253
90227
|
?
|
|
@@ -88289,7 +90263,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88289
90263
|
exports.takeLast = void 0;
|
|
88290
90264
|
var empty_1 = __webpack_require__(18939);
|
|
88291
90265
|
var lift_1 = __webpack_require__(12370);
|
|
88292
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90266
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88293
90267
|
function takeLast(count) {
|
|
88294
90268
|
return count <= 0
|
|
88295
90269
|
? function () { return empty_1.EMPTY; }
|
|
@@ -88332,7 +90306,7 @@ exports.takeLast = takeLast;
|
|
|
88332
90306
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
88333
90307
|
exports.takeUntil = void 0;
|
|
88334
90308
|
var lift_1 = __webpack_require__(12370);
|
|
88335
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90309
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88336
90310
|
var innerFrom_1 = __webpack_require__(17438);
|
|
88337
90311
|
var noop_1 = __webpack_require__(3064);
|
|
88338
90312
|
function takeUntil(notifier) {
|
|
@@ -88354,7 +90328,7 @@ exports.takeUntil = takeUntil;
|
|
|
88354
90328
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
88355
90329
|
exports.takeWhile = void 0;
|
|
88356
90330
|
var lift_1 = __webpack_require__(12370);
|
|
88357
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90331
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88358
90332
|
function takeWhile(predicate, inclusive) {
|
|
88359
90333
|
if (inclusive === void 0) { inclusive = false; }
|
|
88360
90334
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -88380,7 +90354,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88380
90354
|
exports.tap = void 0;
|
|
88381
90355
|
var isFunction_1 = __webpack_require__(44366);
|
|
88382
90356
|
var lift_1 = __webpack_require__(12370);
|
|
88383
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90357
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88384
90358
|
var identity_1 = __webpack_require__(12418);
|
|
88385
90359
|
function tap(observerOrNext, error, complete) {
|
|
88386
90360
|
var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete
|
|
@@ -88430,7 +90404,7 @@ exports.tap = tap;
|
|
|
88430
90404
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
88431
90405
|
exports.throttle = exports.defaultThrottleConfig = void 0;
|
|
88432
90406
|
var lift_1 = __webpack_require__(12370);
|
|
88433
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90407
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88434
90408
|
var innerFrom_1 = __webpack_require__(17438);
|
|
88435
90409
|
exports.defaultThrottleConfig = {
|
|
88436
90410
|
leading: true,
|
|
@@ -88513,7 +90487,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88513
90487
|
exports.throwIfEmpty = void 0;
|
|
88514
90488
|
var EmptyError_1 = __webpack_require__(77404);
|
|
88515
90489
|
var lift_1 = __webpack_require__(12370);
|
|
88516
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90490
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88517
90491
|
function throwIfEmpty(errorFactory) {
|
|
88518
90492
|
if (errorFactory === void 0) { errorFactory = defaultErrorFactory; }
|
|
88519
90493
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -88586,7 +90560,7 @@ var isDate_1 = __webpack_require__(19327);
|
|
|
88586
90560
|
var lift_1 = __webpack_require__(12370);
|
|
88587
90561
|
var innerFrom_1 = __webpack_require__(17438);
|
|
88588
90562
|
var createErrorClass_1 = __webpack_require__(92589);
|
|
88589
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90563
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88590
90564
|
var executeSchedule_1 = __webpack_require__(28420);
|
|
88591
90565
|
exports.TimeoutError = createErrorClass_1.createErrorClass(function (_super) {
|
|
88592
90566
|
return function TimeoutErrorImpl(info) {
|
|
@@ -88737,7 +90711,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88737
90711
|
exports.window = void 0;
|
|
88738
90712
|
var Subject_1 = __webpack_require__(15235);
|
|
88739
90713
|
var lift_1 = __webpack_require__(12370);
|
|
88740
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90714
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88741
90715
|
var noop_1 = __webpack_require__(3064);
|
|
88742
90716
|
function window(windowBoundaries) {
|
|
88743
90717
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -88786,7 +90760,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
88786
90760
|
exports.windowCount = void 0;
|
|
88787
90761
|
var Subject_1 = __webpack_require__(15235);
|
|
88788
90762
|
var lift_1 = __webpack_require__(12370);
|
|
88789
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90763
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88790
90764
|
function windowCount(windowSize, startWindowEvery) {
|
|
88791
90765
|
if (startWindowEvery === void 0) { startWindowEvery = 0; }
|
|
88792
90766
|
var startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize;
|
|
@@ -88851,7 +90825,7 @@ var Subject_1 = __webpack_require__(15235);
|
|
|
88851
90825
|
var async_1 = __webpack_require__(11644);
|
|
88852
90826
|
var Subscription_1 = __webpack_require__(69661);
|
|
88853
90827
|
var lift_1 = __webpack_require__(12370);
|
|
88854
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90828
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88855
90829
|
var arrRemove_1 = __webpack_require__(19503);
|
|
88856
90830
|
var args_1 = __webpack_require__(47844);
|
|
88857
90831
|
var executeSchedule_1 = __webpack_require__(28420);
|
|
@@ -88943,7 +90917,7 @@ var Subject_1 = __webpack_require__(15235);
|
|
|
88943
90917
|
var Subscription_1 = __webpack_require__(69661);
|
|
88944
90918
|
var lift_1 = __webpack_require__(12370);
|
|
88945
90919
|
var innerFrom_1 = __webpack_require__(17438);
|
|
88946
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90920
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
88947
90921
|
var noop_1 = __webpack_require__(3064);
|
|
88948
90922
|
var arrRemove_1 = __webpack_require__(19503);
|
|
88949
90923
|
function windowToggle(openings, closingSelector) {
|
|
@@ -89017,7 +90991,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
89017
90991
|
exports.windowWhen = void 0;
|
|
89018
90992
|
var Subject_1 = __webpack_require__(15235);
|
|
89019
90993
|
var lift_1 = __webpack_require__(12370);
|
|
89020
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
90994
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
89021
90995
|
var innerFrom_1 = __webpack_require__(17438);
|
|
89022
90996
|
function windowWhen(closingSelector) {
|
|
89023
90997
|
return lift_1.operate(function (source, subscriber) {
|
|
@@ -89086,7 +91060,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
89086
91060
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
89087
91061
|
exports.withLatestFrom = void 0;
|
|
89088
91062
|
var lift_1 = __webpack_require__(12370);
|
|
89089
|
-
var OperatorSubscriber_1 = __webpack_require__(
|
|
91063
|
+
var OperatorSubscriber_1 = __webpack_require__(83028);
|
|
89090
91064
|
var innerFrom_1 = __webpack_require__(17438);
|
|
89091
91065
|
var identity_1 = __webpack_require__(12418);
|
|
89092
91066
|
var noop_1 = __webpack_require__(3064);
|
|
@@ -269210,11 +271184,13 @@ exports.PackageManager = PackageManager;
|
|
|
269210
271184
|
(function (PackageManager) {
|
|
269211
271185
|
PackageManager["Pnpm"] = "pnpm";
|
|
269212
271186
|
PackageManager["Yarn"] = "yarn";
|
|
271187
|
+
PackageManager["Npm"] = "npm";
|
|
269213
271188
|
})(PackageManager || (exports.PackageManager = PackageManager = {}));
|
|
269214
271189
|
|
|
269215
271190
|
const PackageManagerName = {
|
|
269216
271191
|
[PackageManager.Pnpm]: () => 'pnpm',
|
|
269217
|
-
[PackageManager.Yarn]: () => 'Yarn'
|
|
271192
|
+
[PackageManager.Yarn]: () => 'Yarn',
|
|
271193
|
+
[PackageManager.Npm]: () => 'npm'
|
|
269218
271194
|
};
|
|
269219
271195
|
exports.PackageManagerName = PackageManagerName;
|
|
269220
271196
|
const PackageManagerSchema = {
|
|
@@ -269223,7 +271199,7 @@ const PackageManagerSchema = {
|
|
|
269223
271199
|
label: () => _locale.i18n.t(_locale.localeKeys.packageManager.self),
|
|
269224
271200
|
mutualExclusion: true,
|
|
269225
271201
|
when: (_values, extra) => !(extra !== null && extra !== void 0 && extra.isMonorepoSubProject),
|
|
269226
|
-
items: Object.values(PackageManager).map(packageManager => ({
|
|
271202
|
+
items: (_values, extra) => Object.values(PackageManager).filter(packageManager => extra !== null && extra !== void 0 && extra.isMonorepo ? packageManager !== PackageManager.Npm : true).map(packageManager => ({
|
|
269227
271203
|
key: packageManager,
|
|
269228
271204
|
label: PackageManagerName[packageManager]
|
|
269229
271205
|
}))
|
|
@@ -269463,7 +271439,7 @@ const SubSolutionSchema = {
|
|
|
269463
271439
|
}));
|
|
269464
271440
|
|
|
269465
271441
|
if (data.solution && data.solution !== 'custom') {
|
|
269466
|
-
items.
|
|
271442
|
+
items.unshift({
|
|
269467
271443
|
key: data.solution,
|
|
269468
271444
|
label: `${SubSolutionText[data.solution]()}(${_locale.i18n.t(_locale.localeKeys.solution.default)})`
|
|
269469
271445
|
});
|
|
@@ -269747,7 +271723,8 @@ const EN_LOCALE = {
|
|
|
269747
271723
|
mwa_storybook: 'Enable "Visual Testing (Storybook)"',
|
|
269748
271724
|
ssg: 'Enable "SSG"',
|
|
269749
271725
|
polyfill: 'Enable "UA-based Polyfill feature"',
|
|
269750
|
-
deploy: 'Enable "Deploy"'
|
|
271726
|
+
deploy: 'Enable "Deploy"',
|
|
271727
|
+
proxy: 'Enable "Global Proxy"'
|
|
269751
271728
|
},
|
|
269752
271729
|
element: {
|
|
269753
271730
|
self: 'Create project element',
|
|
@@ -269912,8 +271889,9 @@ const ZH_LOCALE = {
|
|
|
269912
271889
|
runtime_api: '启用「Rumtime API」',
|
|
269913
271890
|
mwa_storybook: '启用「Visual Testing (Storybook)」模式',
|
|
269914
271891
|
ssg: '启用「SSG」功能',
|
|
269915
|
-
polyfill: '
|
|
269916
|
-
deploy: '启用「部署」功能'
|
|
271892
|
+
polyfill: '启用「基于 UA 的 Polyfill」功能',
|
|
271893
|
+
deploy: '启用「部署」功能',
|
|
271894
|
+
proxy: '启用「全局代理」'
|
|
269917
271895
|
},
|
|
269918
271896
|
element: {
|
|
269919
271897
|
self: '创建工程元素',
|
|
@@ -270692,6 +272670,7 @@ exports.ActionFunction = ActionFunction;
|
|
|
270692
272670
|
ActionFunction["SSG"] = "ssg";
|
|
270693
272671
|
ActionFunction["Polyfill"] = "polyfill";
|
|
270694
272672
|
ActionFunction["Deploy"] = "deploy";
|
|
272673
|
+
ActionFunction["Proxy"] = "proxy";
|
|
270695
272674
|
})(ActionFunction || (exports.ActionFunction = ActionFunction = {}));
|
|
270696
272675
|
|
|
270697
272676
|
let ActionRefactor;
|
|
@@ -270728,7 +272707,8 @@ const ActionFunctionText = {
|
|
|
270728
272707
|
[ActionFunction.RuntimeApi]: () => _locale.i18n.t(_locale.localeKeys.action.function.runtime_api),
|
|
270729
272708
|
[ActionFunction.SSG]: () => _locale.i18n.t(_locale.localeKeys.action.function.ssg),
|
|
270730
272709
|
[ActionFunction.Polyfill]: () => _locale.i18n.t(_locale.localeKeys.action.function.polyfill),
|
|
270731
|
-
[ActionFunction.Deploy]: () => _locale.i18n.t(_locale.localeKeys.action.function.deploy)
|
|
272710
|
+
[ActionFunction.Deploy]: () => _locale.i18n.t(_locale.localeKeys.action.function.deploy),
|
|
272711
|
+
[ActionFunction.Proxy]: () => _locale.i18n.t(_locale.localeKeys.action.function.proxy)
|
|
270732
272712
|
};
|
|
270733
272713
|
exports.ActionFunctionText = ActionFunctionText;
|
|
270734
272714
|
const ActionRefactorText = {
|
|
@@ -270953,7 +272933,7 @@ exports.MWAActionTypes = MWAActionTypes;
|
|
|
270953
272933
|
const MWAActionFunctions = [_common.ActionFunction.UnBundle, _common.ActionFunction.TailwindCSS, _common.ActionFunction.Less, _common.ActionFunction.Sass, _common.ActionFunction.BFF, _common.ActionFunction.SSG, _common.ActionFunction.MicroFrontend, _common.ActionFunction.Electron, // ActionFunction.I18n,
|
|
270954
272934
|
_common.ActionFunction.Test, _common.ActionFunction.Storybook, // ActionFunction.E2ETest,
|
|
270955
272935
|
// ActionFunction.Doc,
|
|
270956
|
-
_common.ActionFunction.Polyfill, _common.ActionFunction.Deploy];
|
|
272936
|
+
_common.ActionFunction.Polyfill, _common.ActionFunction.Deploy, _common.ActionFunction.Proxy];
|
|
270957
272937
|
exports.MWAActionFunctions = MWAActionFunctions;
|
|
270958
272938
|
const MWAActionElements = [_common.ActionElement.Entry, _common.ActionElement.Server];
|
|
270959
272939
|
exports.MWAActionElements = MWAActionElements;
|
|
@@ -271000,14 +272980,15 @@ const MWAActionFunctionsDevDependencies = {
|
|
|
271000
272980
|
[_common.ActionFunction.E2ETest]: '@modern-js/plugin-e2e',
|
|
271001
272981
|
[_common.ActionFunction.Doc]: '@modern-js/plugin-docsite',
|
|
271002
272982
|
[_common.ActionFunction.Electron]: '@modern-js/plugin-electron',
|
|
271003
|
-
[_common.ActionFunction.Storybook]: '@modern-js/plugin-storybook'
|
|
272983
|
+
[_common.ActionFunction.Storybook]: '@modern-js/plugin-storybook',
|
|
272984
|
+
[_common.ActionFunction.Proxy]: '@modern-js/plugin-proxy'
|
|
271004
272985
|
};
|
|
271005
272986
|
exports.MWAActionFunctionsDevDependencies = MWAActionFunctionsDevDependencies;
|
|
271006
272987
|
const MWAActionFunctionsDependencies = {
|
|
271007
272988
|
[_common.ActionFunction.Less]: '@modern-js/plugin-less',
|
|
271008
272989
|
[_common.ActionFunction.Sass]: '@modern-js/plugin-sass',
|
|
271009
272990
|
[_common.ActionFunction.BFF]: '@modern-js/plugin-bff',
|
|
271010
|
-
[_common.ActionFunction.MicroFrontend]: '@modern-js/plugin-
|
|
272991
|
+
[_common.ActionFunction.MicroFrontend]: '@modern-js/plugin-garfish',
|
|
271011
272992
|
[_common.ActionFunction.I18n]: '@modern-js/plugin-i18n',
|
|
271012
272993
|
[_common.ActionFunction.SSG]: '@modern-js/plugin-ssg',
|
|
271013
272994
|
[_common.ActionFunction.Polyfill]: '@modern-js/plugin-polyfill'
|
|
@@ -271015,7 +272996,7 @@ const MWAActionFunctionsDependencies = {
|
|
|
271015
272996
|
exports.MWAActionFunctionsDependencies = MWAActionFunctionsDependencies;
|
|
271016
272997
|
const MWAActionFunctionsAppendTypeContent = {
|
|
271017
272998
|
[_common.ActionFunction.Test]: `/// <reference types='@modern-js/plugin-testing/type' />`,
|
|
271018
|
-
[_common.ActionFunction.MicroFrontend]: `/// <reference types='@modern-js/plugin-
|
|
272999
|
+
[_common.ActionFunction.MicroFrontend]: `/// <reference types='@modern-js/plugin-garfish/type' />`
|
|
271019
273000
|
};
|
|
271020
273001
|
exports.MWAActionFunctionsAppendTypeContent = MWAActionFunctionsAppendTypeContent;
|
|
271021
273002
|
const MWANewActionGenerators = {
|
|
@@ -271038,7 +273019,8 @@ const MWANewActionGenerators = {
|
|
|
271038
273019
|
[_common.ActionFunction.Storybook]: '@modern-js/dependence-generator',
|
|
271039
273020
|
[_common.ActionFunction.SSG]: '@modern-js/ssg-generator',
|
|
271040
273021
|
[_common.ActionFunction.Polyfill]: '@modern-js/dependence-generator',
|
|
271041
|
-
[_common.ActionFunction.Deploy]: '@modern-js/cloud-deploy-generator'
|
|
273022
|
+
[_common.ActionFunction.Deploy]: '@modern-js/cloud-deploy-generator',
|
|
273023
|
+
[_common.ActionFunction.Proxy]: '@modern-js/dependence-generator'
|
|
271042
273024
|
},
|
|
271043
273025
|
[_common.ActionType.Refactor]: {
|
|
271044
273026
|
[_common.ActionRefactor.BFFToApp]: '@modern-js/bff-refactor-generator'
|
|
@@ -271413,6 +273395,296 @@ function stripAnsi(string) {
|
|
|
271413
273395
|
|
|
271414
273396
|
/***/ }),
|
|
271415
273397
|
|
|
273398
|
+
/***/ 34701:
|
|
273399
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
273400
|
+
|
|
273401
|
+
"use strict";
|
|
273402
|
+
|
|
273403
|
+
|
|
273404
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
273405
|
+
value: true
|
|
273406
|
+
}));
|
|
273407
|
+
exports.handleTemplateFile = exports["default"] = void 0;
|
|
273408
|
+
|
|
273409
|
+
var _merge2 = _interopRequireDefault(__webpack_require__(13904));
|
|
273410
|
+
|
|
273411
|
+
var _isEqual2 = _interopRequireDefault(__webpack_require__(10625));
|
|
273412
|
+
|
|
273413
|
+
var _path = _interopRequireDefault(__webpack_require__(71017));
|
|
273414
|
+
|
|
273415
|
+
var _generatorUtils = __webpack_require__(89489);
|
|
273416
|
+
|
|
273417
|
+
var _codesmithApiApp = __webpack_require__(80355);
|
|
273418
|
+
|
|
273419
|
+
var _codesmithApiJson = __webpack_require__(54517);
|
|
273420
|
+
|
|
273421
|
+
var _codesmithApiHandlebars = __webpack_require__(12291);
|
|
273422
|
+
|
|
273423
|
+
var _generatorCommon = __webpack_require__(50828);
|
|
273424
|
+
|
|
273425
|
+
var _utils = __webpack_require__(70302);
|
|
273426
|
+
|
|
273427
|
+
var _locale = __webpack_require__(62443);
|
|
273428
|
+
|
|
273429
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
273430
|
+
|
|
273431
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
273432
|
+
|
|
273433
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
273434
|
+
|
|
273435
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
273436
|
+
|
|
273437
|
+
const handleInput = async (context, generator, appApi) => {
|
|
273438
|
+
const appDir = context.materials.default.basePath;
|
|
273439
|
+
const {
|
|
273440
|
+
entriesDir
|
|
273441
|
+
} = context.config;
|
|
273442
|
+
await _generatorUtils.fs.ensureDir(_path.default.join(appDir, entriesDir));
|
|
273443
|
+
const analysisInfo = {
|
|
273444
|
+
isEmptySrc: (0, _utils.isEmptySource)(appDir, entriesDir),
|
|
273445
|
+
isSingleEntry: (0, _utils.isSingleEntry)(appDir, entriesDir),
|
|
273446
|
+
isTsProject: (0, _generatorUtils.isTsProject)(appDir)
|
|
273447
|
+
};
|
|
273448
|
+
generator.logger.debug('analysisInfo:', analysisInfo);
|
|
273449
|
+
const ans = await appApi.getInputBySchema(_generatorCommon.EntrySchema, _objectSpread(_objectSpread({}, context.config), analysisInfo));
|
|
273450
|
+
|
|
273451
|
+
if (ans.needModifyMWAConfig === 'no') {
|
|
273452
|
+
ans.disableStateManagement = _generatorCommon.BooleanConfig.NO;
|
|
273453
|
+
ans.clientRoute = _generatorCommon.ClientRoute.SelfControlRoute;
|
|
273454
|
+
}
|
|
273455
|
+
|
|
273456
|
+
return ans;
|
|
273457
|
+
};
|
|
273458
|
+
|
|
273459
|
+
const refactorSingleEntry = async (context, generator) => {
|
|
273460
|
+
const pkgObj = await (0, _generatorUtils.getPackageObj)(context);
|
|
273461
|
+
const pkgName = pkgObj.name;
|
|
273462
|
+
const {
|
|
273463
|
+
entriesDir
|
|
273464
|
+
} = context.config;
|
|
273465
|
+
|
|
273466
|
+
const oldFilePath = _path.default.join(context.materials.default.basePath, entriesDir);
|
|
273467
|
+
|
|
273468
|
+
const oldFiles = _generatorUtils.fs.readdirSync(oldFilePath).filter(filePath => {
|
|
273469
|
+
if (_generatorUtils.fs.statSync(_path.default.join(oldFilePath, filePath)).isDirectory()) {
|
|
273470
|
+
const files = _generatorUtils.fs.readdirSync(_path.default.join(oldFilePath, filePath));
|
|
273471
|
+
|
|
273472
|
+
return files.length;
|
|
273473
|
+
}
|
|
273474
|
+
|
|
273475
|
+
return filePath !== '.eslintrc.json' && filePath !== 'modern-app-env.d.ts';
|
|
273476
|
+
}).map(file => _path.default.join(context.materials.default.basePath, entriesDir, file)); // create new dir in entriesDir and move code to that dir
|
|
273477
|
+
|
|
273478
|
+
|
|
273479
|
+
_generatorUtils.fs.mkdirpSync(_path.default.join(context.materials.default.basePath, entriesDir, pkgName));
|
|
273480
|
+
|
|
273481
|
+
oldFiles.forEach(file => {
|
|
273482
|
+
generator.logger.debug(`rename ${file} to ${file.replace(entriesDir, _path.default.join(entriesDir, pkgName))}`);
|
|
273483
|
+
|
|
273484
|
+
_generatorUtils.fs.renameSync(file, file.replace(entriesDir, _path.default.join(entriesDir, pkgName)));
|
|
273485
|
+
});
|
|
273486
|
+
};
|
|
273487
|
+
|
|
273488
|
+
const getTplInfo = (clientRoute, isTs) => {
|
|
273489
|
+
const fileExtra = isTs ? 'tsx' : 'jsx';
|
|
273490
|
+
|
|
273491
|
+
if (clientRoute === _generatorCommon.ClientRoute.ConventionalRoute) {
|
|
273492
|
+
return {
|
|
273493
|
+
name: 'pages-router',
|
|
273494
|
+
space: ' ',
|
|
273495
|
+
fileExtra,
|
|
273496
|
+
entry: `Index.${fileExtra}`,
|
|
273497
|
+
css: 'index.css'
|
|
273498
|
+
};
|
|
273499
|
+
} else if (clientRoute === _generatorCommon.ClientRoute.SelfControlRoute) {
|
|
273500
|
+
return {
|
|
273501
|
+
name: 'router',
|
|
273502
|
+
space: ' ',
|
|
273503
|
+
fileExtra,
|
|
273504
|
+
entry: `App.${fileExtra}`,
|
|
273505
|
+
css: 'App.css'
|
|
273506
|
+
};
|
|
273507
|
+
}
|
|
273508
|
+
|
|
273509
|
+
return {
|
|
273510
|
+
name: 'base',
|
|
273511
|
+
space: ' ',
|
|
273512
|
+
fileExtra,
|
|
273513
|
+
entry: `App.${fileExtra}`,
|
|
273514
|
+
css: 'App.css'
|
|
273515
|
+
};
|
|
273516
|
+
};
|
|
273517
|
+
|
|
273518
|
+
const getTargetFolder = (clientRoute, entriesDir, entryName) => {
|
|
273519
|
+
let targetPath = _path.default.join(entriesDir, entryName);
|
|
273520
|
+
|
|
273521
|
+
if (clientRoute === _generatorCommon.ClientRoute.ConventionalRoute) {
|
|
273522
|
+
targetPath = _path.default.join(targetPath, 'pages');
|
|
273523
|
+
}
|
|
273524
|
+
|
|
273525
|
+
return targetPath;
|
|
273526
|
+
};
|
|
273527
|
+
|
|
273528
|
+
const getSpaUpdateInfo = (clientRoute, disableStateManagement) => {
|
|
273529
|
+
const updateInfo = {};
|
|
273530
|
+
|
|
273531
|
+
if (clientRoute === _generatorCommon.ClientRoute.No && disableStateManagement === _generatorCommon.BooleanConfig.YES) {
|
|
273532
|
+
updateInfo.modernConfig = {};
|
|
273533
|
+
}
|
|
273534
|
+
|
|
273535
|
+
if (clientRoute !== _generatorCommon.ClientRoute.No) {
|
|
273536
|
+
updateInfo['modernConfig.runtime.router'] = true;
|
|
273537
|
+
}
|
|
273538
|
+
|
|
273539
|
+
if (disableStateManagement === _generatorCommon.BooleanConfig.NO) {
|
|
273540
|
+
updateInfo['modernConfig.runtime.state'] = true;
|
|
273541
|
+
}
|
|
273542
|
+
|
|
273543
|
+
return updateInfo;
|
|
273544
|
+
};
|
|
273545
|
+
|
|
273546
|
+
const getMpaUpdateInfo = (name, clientRoute = _generatorCommon.ClientRoute.SelfControlRoute, disableStateManagement = _generatorCommon.BooleanConfig.NO, modernConfig) => {
|
|
273547
|
+
const newFeature = {
|
|
273548
|
+
state: disableStateManagement === _generatorCommon.BooleanConfig.NO,
|
|
273549
|
+
router: clientRoute !== _generatorCommon.ClientRoute.No
|
|
273550
|
+
};
|
|
273551
|
+
const updateInfo = {
|
|
273552
|
+
[`modernConfig.runtimeByEntries.${name}.state`]: newFeature.state,
|
|
273553
|
+
[`modernConfig.runtimeByEntries.${name}.router`]: newFeature.router
|
|
273554
|
+
};
|
|
273555
|
+
|
|
273556
|
+
if (!newFeature.state && !newFeature.router) {
|
|
273557
|
+
if (!modernConfig || !modernConfig.runtime || !modernConfig.runtime) {
|
|
273558
|
+
return {};
|
|
273559
|
+
}
|
|
273560
|
+
}
|
|
273561
|
+
|
|
273562
|
+
if (modernConfig !== null && modernConfig !== void 0 && modernConfig.runtime) {
|
|
273563
|
+
const preDefaultFeature = modernConfig.runtime;
|
|
273564
|
+
|
|
273565
|
+
if ((0, _isEqual2.default)(newFeature, preDefaultFeature)) {
|
|
273566
|
+
return {};
|
|
273567
|
+
}
|
|
273568
|
+
}
|
|
273569
|
+
|
|
273570
|
+
return updateInfo;
|
|
273571
|
+
};
|
|
273572
|
+
|
|
273573
|
+
const updatePackageJSON = async (context, generator) => {
|
|
273574
|
+
const appDir = context.materials.default.basePath;
|
|
273575
|
+
|
|
273576
|
+
const confPath = _path.default.join(appDir, 'package.json');
|
|
273577
|
+
|
|
273578
|
+
if (!_generatorUtils.fs.existsSync(confPath)) {
|
|
273579
|
+
generator.logger.warn(_locale.i18n.t(_locale.localeKeys.package_not_exist));
|
|
273580
|
+
}
|
|
273581
|
+
|
|
273582
|
+
let updateInfo = {};
|
|
273583
|
+
const {
|
|
273584
|
+
name,
|
|
273585
|
+
clientRoute,
|
|
273586
|
+
disableStateManagement
|
|
273587
|
+
} = context.config;
|
|
273588
|
+
|
|
273589
|
+
if (!name) {
|
|
273590
|
+
updateInfo = getSpaUpdateInfo(clientRoute, disableStateManagement);
|
|
273591
|
+
} else {
|
|
273592
|
+
const pkgObj = await (0, _generatorUtils.getPackageObj)(context);
|
|
273593
|
+
const {
|
|
273594
|
+
modernConfig
|
|
273595
|
+
} = pkgObj;
|
|
273596
|
+
updateInfo = getMpaUpdateInfo(name, clientRoute, disableStateManagement, modernConfig);
|
|
273597
|
+
}
|
|
273598
|
+
|
|
273599
|
+
const jsonAPI = new _codesmithApiJson.JsonAPI(generator);
|
|
273600
|
+
await jsonAPI.update(context.materials.default.get('package.json'), {
|
|
273601
|
+
query: {},
|
|
273602
|
+
update: {
|
|
273603
|
+
$set: updateInfo
|
|
273604
|
+
}
|
|
273605
|
+
});
|
|
273606
|
+
};
|
|
273607
|
+
|
|
273608
|
+
const handleTemplateFile = async (context, generator, appApi) => {
|
|
273609
|
+
var _context$current;
|
|
273610
|
+
|
|
273611
|
+
const ans = await handleInput(context, generator, appApi);
|
|
273612
|
+
|
|
273613
|
+
if (ans.isSingleEntry) {
|
|
273614
|
+
generator.logger.debug('current is single entry, refactoring to multi entry');
|
|
273615
|
+
await refactorSingleEntry(context, generator);
|
|
273616
|
+
}
|
|
273617
|
+
|
|
273618
|
+
const entryName = ans.name || '';
|
|
273619
|
+
const {
|
|
273620
|
+
name,
|
|
273621
|
+
space,
|
|
273622
|
+
fileExtra,
|
|
273623
|
+
entry,
|
|
273624
|
+
css
|
|
273625
|
+
} = getTplInfo(ans.clientRoute, ans.isTsProject);
|
|
273626
|
+
const targetFolder = getTargetFolder(ans.clientRoute, context.config.entriesDir, entryName);
|
|
273627
|
+
const sourceFolder = `templates/${name}`;
|
|
273628
|
+
const mainTpl = await ((_context$current = context.current) === null || _context$current === void 0 ? void 0 : _context$current.material.get('templates/main.handlebars').value());
|
|
273629
|
+
const main = (0, _codesmithApiHandlebars.renderString)((mainTpl === null || mainTpl === void 0 ? void 0 : mainTpl.content) || '', {
|
|
273630
|
+
space,
|
|
273631
|
+
entry
|
|
273632
|
+
});
|
|
273633
|
+
await appApi.forgeTemplate(`${sourceFolder}/*`, undefined, resourceKey => resourceKey.replace(sourceFolder, targetFolder).replace('.handlebars', `.${fileExtra}`), {
|
|
273634
|
+
main
|
|
273635
|
+
});
|
|
273636
|
+
await appApi.forgeTemplate(`templates/main.css`, undefined, resourceKey => resourceKey.replace('templates/main.css', `${targetFolder}/${css}`).replace('.handlebars', ''), {
|
|
273637
|
+
main
|
|
273638
|
+
});
|
|
273639
|
+
await updatePackageJSON(context, generator);
|
|
273640
|
+
};
|
|
273641
|
+
|
|
273642
|
+
exports.handleTemplateFile = handleTemplateFile;
|
|
273643
|
+
|
|
273644
|
+
var _default = async (context, generator) => {
|
|
273645
|
+
const appApi = new _codesmithApiApp.AppAPI(context, generator);
|
|
273646
|
+
const {
|
|
273647
|
+
locale
|
|
273648
|
+
} = context.config;
|
|
273649
|
+
|
|
273650
|
+
_generatorCommon.i18n.changeLanguage({
|
|
273651
|
+
locale
|
|
273652
|
+
});
|
|
273653
|
+
|
|
273654
|
+
appApi.i18n.changeLanguage({
|
|
273655
|
+
locale
|
|
273656
|
+
});
|
|
273657
|
+
|
|
273658
|
+
_locale.i18n.changeLanguage({
|
|
273659
|
+
locale
|
|
273660
|
+
});
|
|
273661
|
+
|
|
273662
|
+
if (!(await appApi.checkEnvironment())) {
|
|
273663
|
+
// eslint-disable-next-line no-process-exit
|
|
273664
|
+
process.exit(1);
|
|
273665
|
+
}
|
|
273666
|
+
|
|
273667
|
+
generator.logger.debug(`start run @modern-js/entry-generator`);
|
|
273668
|
+
generator.logger.debug(`context=${JSON.stringify(context)}`);
|
|
273669
|
+
generator.logger.debug(`context.data=${JSON.stringify(context.data)}`);
|
|
273670
|
+
(0, _merge2.default)(context.config, {
|
|
273671
|
+
entriesDir: context.config.entriesDir || 'src'
|
|
273672
|
+
});
|
|
273673
|
+
await handleTemplateFile(context, generator, appApi);
|
|
273674
|
+
|
|
273675
|
+
if (!context.config.isEmptySrc) {
|
|
273676
|
+
appApi.showSuccessInfo(_locale.i18n.t(_locale.localeKeys.success, {
|
|
273677
|
+
name: context.config.name
|
|
273678
|
+
}));
|
|
273679
|
+
}
|
|
273680
|
+
|
|
273681
|
+
generator.logger.debug(`forge @modern-js/entry-generator succeed `);
|
|
273682
|
+
};
|
|
273683
|
+
|
|
273684
|
+
exports["default"] = _default;
|
|
273685
|
+
|
|
273686
|
+
/***/ }),
|
|
273687
|
+
|
|
271416
273688
|
/***/ 9085:
|
|
271417
273689
|
/***/ ((__unused_webpack_module, exports) => {
|
|
271418
273690
|
|
|
@@ -271902,7 +274174,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
271902
274174
|
exports.clearConsole = void 0;
|
|
271903
274175
|
|
|
271904
274176
|
const clearConsole = () => {
|
|
271905
|
-
if (process.stdout.isTTY) {
|
|
274177
|
+
if (process.stdout.isTTY && !process.env.DEBUG) {
|
|
271906
274178
|
process.stdout.write('\x1B[H\x1B[2J');
|
|
271907
274179
|
}
|
|
271908
274180
|
};
|
|
@@ -271912,7 +274184,7 @@ exports.clearConsole = clearConsole;
|
|
|
271912
274184
|
/***/ }),
|
|
271913
274185
|
|
|
271914
274186
|
/***/ 4002:
|
|
271915
|
-
/***/ ((
|
|
274187
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
271916
274188
|
|
|
271917
274189
|
"use strict";
|
|
271918
274190
|
|
|
@@ -271920,7 +274192,7 @@ exports.clearConsole = clearConsole;
|
|
|
271920
274192
|
Object.defineProperty(exports, "__esModule", ({
|
|
271921
274193
|
value: true
|
|
271922
274194
|
}));
|
|
271923
|
-
exports.requireExistModule = exports.compatRequire = void 0;
|
|
274195
|
+
exports.requireExistModule = exports.compatRequire = exports.cleanRequireCache = void 0;
|
|
271924
274196
|
|
|
271925
274197
|
var _findExists = __webpack_require__(3664);
|
|
271926
274198
|
|
|
@@ -271949,6 +274221,14 @@ const requireExistModule = (filename, extensions = ['.ts', '.js']) => {
|
|
|
271949
274221
|
|
|
271950
274222
|
exports.requireExistModule = requireExistModule;
|
|
271951
274223
|
|
|
274224
|
+
const cleanRequireCache = filelist => {
|
|
274225
|
+
filelist.forEach(filepath => {
|
|
274226
|
+
delete __webpack_require__.c[filepath];
|
|
274227
|
+
});
|
|
274228
|
+
};
|
|
274229
|
+
|
|
274230
|
+
exports.cleanRequireCache = cleanRequireCache;
|
|
274231
|
+
|
|
271952
274232
|
/***/ }),
|
|
271953
274233
|
|
|
271954
274234
|
/***/ 36762:
|
|
@@ -271960,23 +274240,11 @@ exports.requireExistModule = requireExistModule;
|
|
|
271960
274240
|
Object.defineProperty(exports, "__esModule", ({
|
|
271961
274241
|
value: true
|
|
271962
274242
|
}));
|
|
271963
|
-
exports.SHARED_DIR = exports.SERVER_RENDER_FUNCTION_NAME = exports.SERVER_DIR = exports.SERVER_BUNDLE_DIRECTORY = exports.ROUTE_SPEC_FILE = exports.PLUGIN_SCHEMAS = exports.MAIN_ENTRY_NAME = exports.LOADABLE_STATS_FILE = exports.LAUNCH_EDITOR_ENDPOINT = exports.
|
|
274243
|
+
exports.SHARED_DIR = exports.SERVER_RENDER_FUNCTION_NAME = exports.SERVER_DIR = exports.SERVER_BUNDLE_DIRECTORY = exports.ROUTE_SPEC_FILE = exports.PLUGIN_SCHEMAS = exports.MAIN_ENTRY_NAME = exports.LOADABLE_STATS_FILE = exports.LAUNCH_EDITOR_ENDPOINT = exports.INTERNAL_PLUGINS = exports.HMR_SOCK_PATH = exports.ENTRY_NAME_PATTERN = exports.API_DIR = void 0;
|
|
271964
274244
|
|
|
271965
|
-
/**
|
|
271966
|
-
* alias to src directory
|
|
271967
|
-
*/
|
|
271968
|
-
const INTERNAL_SRC_ALIAS = '@_modern_js_src';
|
|
271969
|
-
/**
|
|
271970
|
-
* alias to node_modules/.modern-js
|
|
271971
|
-
*/
|
|
271972
|
-
|
|
271973
|
-
exports.INTERNAL_SRC_ALIAS = INTERNAL_SRC_ALIAS;
|
|
271974
|
-
const INTERNAL_DIR_ALAIS = '@_modern_js_internal';
|
|
271975
274245
|
/**
|
|
271976
274246
|
* hmr socket connect path
|
|
271977
274247
|
*/
|
|
271978
|
-
|
|
271979
|
-
exports.INTERNAL_DIR_ALAIS = INTERNAL_DIR_ALAIS;
|
|
271980
274248
|
const HMR_SOCK_PATH = '/_modern_js_hmr_ws';
|
|
271981
274249
|
/**
|
|
271982
274250
|
* route specification file
|
|
@@ -272020,17 +274288,11 @@ const SERVER_RENDER_FUNCTION_NAME = 'serverRender';
|
|
|
272020
274288
|
|
|
272021
274289
|
exports.SERVER_RENDER_FUNCTION_NAME = SERVER_RENDER_FUNCTION_NAME;
|
|
272022
274290
|
const LOADABLE_STATS_FILE = 'loadable-stats.json';
|
|
272023
|
-
/**
|
|
272024
|
-
* real entry generate by modern.js
|
|
272025
|
-
*/
|
|
272026
|
-
|
|
272027
|
-
exports.LOADABLE_STATS_FILE = LOADABLE_STATS_FILE;
|
|
272028
|
-
const HIDE_MODERN_JS_DIR = './node_modules/.modern-js';
|
|
272029
274291
|
/**
|
|
272030
274292
|
* internal specified folder
|
|
272031
274293
|
*/
|
|
272032
274294
|
|
|
272033
|
-
exports.
|
|
274295
|
+
exports.LOADABLE_STATS_FILE = LOADABLE_STATS_FILE;
|
|
272034
274296
|
const API_DIR = 'api';
|
|
272035
274297
|
exports.API_DIR = API_DIR;
|
|
272036
274298
|
const SERVER_DIR = 'server';
|
|
@@ -272111,8 +274373,8 @@ const INTERNAL_PLUGINS = {
|
|
|
272111
274373
|
cli: '@modern-js/plugin-server/cli',
|
|
272112
274374
|
server: '@modern-js/plugin-server/server'
|
|
272113
274375
|
},
|
|
272114
|
-
'@modern-js/plugin-
|
|
272115
|
-
cli: '@modern-js/plugin-
|
|
274376
|
+
'@modern-js/plugin-garfish': {
|
|
274377
|
+
cli: '@modern-js/plugin-garfish/cli'
|
|
272116
274378
|
},
|
|
272117
274379
|
'@modern-js/plugin-jarvis': {
|
|
272118
274380
|
cli: '@modern-js/plugin-jarvis/cli'
|
|
@@ -272144,6 +274406,9 @@ const INTERNAL_PLUGINS = {
|
|
|
272144
274406
|
},
|
|
272145
274407
|
'@modern-js/plugin-nocode': {
|
|
272146
274408
|
cli: '@modern-js/plugin-nocode/cli'
|
|
274409
|
+
},
|
|
274410
|
+
'@modern-js/plugin-design-token': {
|
|
274411
|
+
cli: '@modern-js/plugin-design-token/cli'
|
|
272147
274412
|
}
|
|
272148
274413
|
};
|
|
272149
274414
|
/**
|
|
@@ -272216,11 +274481,6 @@ const PLUGIN_SCHEMAS = {
|
|
|
272216
274481
|
schema: {
|
|
272217
274482
|
typeof: ['object', 'function']
|
|
272218
274483
|
}
|
|
272219
|
-
}, {
|
|
272220
|
-
target: 'source.designSystem',
|
|
272221
|
-
schema: {
|
|
272222
|
-
typeof: ['object']
|
|
272223
|
-
}
|
|
272224
274484
|
}],
|
|
272225
274485
|
'@modern-js/plugin-proxy': [{
|
|
272226
274486
|
target: 'dev.proxy',
|
|
@@ -272263,6 +274523,18 @@ const PLUGIN_SCHEMAS = {
|
|
|
272263
274523
|
type: ['boolean', 'object']
|
|
272264
274524
|
}
|
|
272265
274525
|
}],
|
|
274526
|
+
'@modern-js/plugin-design-token': [// Legacy Features
|
|
274527
|
+
{
|
|
274528
|
+
target: 'source.designSystem',
|
|
274529
|
+
schema: {
|
|
274530
|
+
typeof: ['object']
|
|
274531
|
+
}
|
|
274532
|
+
}, {
|
|
274533
|
+
target: 'source.designSystem.supportStyledComponents',
|
|
274534
|
+
schema: {
|
|
274535
|
+
type: ['boolean']
|
|
274536
|
+
}
|
|
274537
|
+
}],
|
|
272266
274538
|
'@modern-js/plugin-router': [{
|
|
272267
274539
|
target: 'runtime.router',
|
|
272268
274540
|
schema: {
|
|
@@ -272280,7 +274552,7 @@ const PLUGIN_SCHEMAS = {
|
|
|
272280
274552
|
typeof: ['object', 'function']
|
|
272281
274553
|
}
|
|
272282
274554
|
}],
|
|
272283
|
-
'@modern-js/plugin-
|
|
274555
|
+
'@modern-js/plugin-garfish': [{
|
|
272284
274556
|
target: 'runtime.masterApp',
|
|
272285
274557
|
schema: {
|
|
272286
274558
|
type: ['object']
|
|
@@ -272384,7 +274656,7 @@ exports.findExists = findExists;
|
|
|
272384
274656
|
|
|
272385
274657
|
/***/ }),
|
|
272386
274658
|
|
|
272387
|
-
/***/
|
|
274659
|
+
/***/ 3572:
|
|
272388
274660
|
/***/ ((__unused_webpack_module, exports) => {
|
|
272389
274661
|
|
|
272390
274662
|
"use strict";
|
|
@@ -272393,8 +274665,15 @@ exports.findExists = findExists;
|
|
|
272393
274665
|
Object.defineProperty(exports, "__esModule", ({
|
|
272394
274666
|
value: true
|
|
272395
274667
|
}));
|
|
274668
|
+
exports.formatProxyOptions = formatProxyOptions;
|
|
272396
274669
|
exports.formatWebpackMessages = formatWebpackMessages;
|
|
272397
274670
|
|
|
274671
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
274672
|
+
|
|
274673
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
274674
|
+
|
|
274675
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
274676
|
+
|
|
272398
274677
|
/* eslint-disable no-param-reassign */
|
|
272399
274678
|
|
|
272400
274679
|
/* eslint-disable max-statements */
|
|
@@ -272493,9 +274772,35 @@ function formatWebpackMessages(json) {
|
|
|
272493
274772
|
|
|
272494
274773
|
return result;
|
|
272495
274774
|
}
|
|
274775
|
+
|
|
272496
274776
|
/* eslint-enable max-statements */
|
|
272497
274777
|
|
|
272498
274778
|
/* eslint-enable no-param-reassign */
|
|
274779
|
+
function formatProxyOptions(proxyOptions) {
|
|
274780
|
+
const formatedProxy = [];
|
|
274781
|
+
|
|
274782
|
+
if (!Array.isArray(proxyOptions)) {
|
|
274783
|
+
if ('target' in proxyOptions) {
|
|
274784
|
+
formatedProxy.push(proxyOptions);
|
|
274785
|
+
} else {
|
|
274786
|
+
Array.prototype.push.apply(formatedProxy, Object.keys(proxyOptions).reduce((total, source) => {
|
|
274787
|
+
const option = proxyOptions[source];
|
|
274788
|
+
total.push(_objectSpread({
|
|
274789
|
+
context: source,
|
|
274790
|
+
changeOrigin: true,
|
|
274791
|
+
logLevel: 'warn'
|
|
274792
|
+
}, typeof option === 'string' ? {
|
|
274793
|
+
target: option
|
|
274794
|
+
} : option));
|
|
274795
|
+
return total;
|
|
274796
|
+
}, []));
|
|
274797
|
+
}
|
|
274798
|
+
} else {
|
|
274799
|
+
formatedProxy.push(...proxyOptions);
|
|
274800
|
+
}
|
|
274801
|
+
|
|
274802
|
+
return formatedProxy;
|
|
274803
|
+
}
|
|
272499
274804
|
|
|
272500
274805
|
/***/ }),
|
|
272501
274806
|
|
|
@@ -272854,16 +275159,16 @@ Object.keys(_chalk).forEach(function (key) {
|
|
|
272854
275159
|
});
|
|
272855
275160
|
});
|
|
272856
275161
|
|
|
272857
|
-
var
|
|
275162
|
+
var _format = __webpack_require__(3572);
|
|
272858
275163
|
|
|
272859
|
-
Object.keys(
|
|
275164
|
+
Object.keys(_format).forEach(function (key) {
|
|
272860
275165
|
if (key === "default" || key === "__esModule") return;
|
|
272861
275166
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
272862
|
-
if (key in exports && exports[key] ===
|
|
275167
|
+
if (key in exports && exports[key] === _format[key]) return;
|
|
272863
275168
|
Object.defineProperty(exports, key, {
|
|
272864
275169
|
enumerable: true,
|
|
272865
275170
|
get: function () {
|
|
272866
|
-
return
|
|
275171
|
+
return _format[key];
|
|
272867
275172
|
}
|
|
272868
275173
|
});
|
|
272869
275174
|
});
|
|
@@ -273260,6 +275565,20 @@ Object.keys(_nodeEnv).forEach(function (key) {
|
|
|
273260
275565
|
});
|
|
273261
275566
|
});
|
|
273262
275567
|
|
|
275568
|
+
var _wait = __webpack_require__(96649);
|
|
275569
|
+
|
|
275570
|
+
Object.keys(_wait).forEach(function (key) {
|
|
275571
|
+
if (key === "default" || key === "__esModule") return;
|
|
275572
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
275573
|
+
if (key in exports && exports[key] === _wait[key]) return;
|
|
275574
|
+
Object.defineProperty(exports, key, {
|
|
275575
|
+
enumerable: true,
|
|
275576
|
+
get: function () {
|
|
275577
|
+
return _wait[key];
|
|
275578
|
+
}
|
|
275579
|
+
});
|
|
275580
|
+
});
|
|
275581
|
+
|
|
273263
275582
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
273264
275583
|
|
|
273265
275584
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -274002,13 +276321,15 @@ const prettyInstructions = (appContext, config) => {
|
|
|
274002
276321
|
const {
|
|
274003
276322
|
entrypoints,
|
|
274004
276323
|
serverRoutes,
|
|
274005
|
-
port
|
|
276324
|
+
port,
|
|
276325
|
+
existSrc,
|
|
276326
|
+
checkedEntries
|
|
274006
276327
|
} = appContext;
|
|
274007
276328
|
const urls = getAddressUrls(config.dev.https && (0, _is.isDev)() ? 'https' : 'http', port);
|
|
274008
|
-
const routes = serverRoutes.filter(route => route.entryName);
|
|
276329
|
+
const routes = existSrc ? serverRoutes.filter(route => route.entryName) : serverRoutes;
|
|
274009
276330
|
let message = 'App running at:\n\n';
|
|
274010
276331
|
|
|
274011
|
-
if (isSingleEntry(entrypoints)) {
|
|
276332
|
+
if (isSingleEntry(entrypoints) || !existSrc) {
|
|
274012
276333
|
message += urls.map(({
|
|
274013
276334
|
type,
|
|
274014
276335
|
url
|
|
@@ -274022,11 +276343,19 @@ const prettyInstructions = (appContext, config) => {
|
|
|
274022
276343
|
message += ` ${_chalk.default.bold(`> ${type}`)}\n`;
|
|
274023
276344
|
routes.forEach(({
|
|
274024
276345
|
entryName,
|
|
274025
|
-
urlPath
|
|
276346
|
+
urlPath,
|
|
276347
|
+
isSSR
|
|
274026
276348
|
}) => {
|
|
274027
|
-
|
|
276349
|
+
if (!checkedEntries.includes(entryName)) {
|
|
276350
|
+
return;
|
|
276351
|
+
}
|
|
276352
|
+
|
|
276353
|
+
message += ` ${_chalk.default.yellowBright(isSSR ? 'λ' : '○')} ${_chalk.default.yellowBright(entryName.padEnd(maxNameLength + 8))}${_chalk.default.cyanBright(normalizeUrl(`${url}/${urlPath}`))}\n`;
|
|
274028
276354
|
});
|
|
274029
276355
|
});
|
|
276356
|
+
message += '\n';
|
|
276357
|
+
message += _chalk.default.cyanBright(' λ (Server) server-side renders at runtime\n');
|
|
276358
|
+
message += _chalk.default.cyanBright(' ○ (Static) client-side rendered as static HTML\n');
|
|
274030
276359
|
}
|
|
274031
276360
|
|
|
274032
276361
|
return message;
|
|
@@ -274232,6 +276561,25 @@ exports.createRuntimeExportsUtils = createRuntimeExportsUtils;
|
|
|
274232
276561
|
|
|
274233
276562
|
/***/ }),
|
|
274234
276563
|
|
|
276564
|
+
/***/ 96649:
|
|
276565
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
276566
|
+
|
|
276567
|
+
"use strict";
|
|
276568
|
+
|
|
276569
|
+
|
|
276570
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
276571
|
+
value: true
|
|
276572
|
+
}));
|
|
276573
|
+
exports.wait = void 0;
|
|
276574
|
+
|
|
276575
|
+
const wait = (time = 0) => new Promise(resolve => {
|
|
276576
|
+
setTimeout(resolve, time);
|
|
276577
|
+
});
|
|
276578
|
+
|
|
276579
|
+
exports.wait = wait;
|
|
276580
|
+
|
|
276581
|
+
/***/ }),
|
|
276582
|
+
|
|
274235
276583
|
/***/ 31116:
|
|
274236
276584
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
274237
276585
|
|
|
@@ -281263,6 +283611,9 @@ module.exports = JSON.parse('{"v0.8":{"start":"2012-06-25","end":"2014-07-31"},"
|
|
|
281263
283611
|
/******/ return module.exports;
|
|
281264
283612
|
/******/ }
|
|
281265
283613
|
/******/
|
|
283614
|
+
/******/ // expose the module cache
|
|
283615
|
+
/******/ __webpack_require__.c = __webpack_module_cache__;
|
|
283616
|
+
/******/
|
|
281266
283617
|
/************************************************************************/
|
|
281267
283618
|
/******/ /* webpack/runtime/define property getters */
|
|
281268
283619
|
/******/ (() => {
|
|
@@ -281302,294 +283653,12 @@ module.exports = JSON.parse('{"v0.8":{"start":"2012-06-25","end":"2014-07-31"},"
|
|
|
281302
283653
|
/******/ })();
|
|
281303
283654
|
/******/
|
|
281304
283655
|
/************************************************************************/
|
|
281305
|
-
|
|
281306
|
-
//
|
|
281307
|
-
|
|
281308
|
-
|
|
281309
|
-
var
|
|
281310
|
-
|
|
281311
|
-
|
|
281312
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
281313
|
-
value: true
|
|
281314
|
-
}));
|
|
281315
|
-
exports["default"] = void 0;
|
|
281316
|
-
|
|
281317
|
-
var _merge2 = _interopRequireDefault(__webpack_require__(13904));
|
|
281318
|
-
|
|
281319
|
-
var _isEqual2 = _interopRequireDefault(__webpack_require__(10625));
|
|
281320
|
-
|
|
281321
|
-
var _path = _interopRequireDefault(__webpack_require__(71017));
|
|
281322
|
-
|
|
281323
|
-
var _generatorUtils = __webpack_require__(89489);
|
|
281324
|
-
|
|
281325
|
-
var _codesmithApiApp = __webpack_require__(83028);
|
|
281326
|
-
|
|
281327
|
-
var _codesmithApiJson = __webpack_require__(54517);
|
|
281328
|
-
|
|
281329
|
-
var _codesmithApiHandlebars = __webpack_require__(12291);
|
|
281330
|
-
|
|
281331
|
-
var _generatorCommon = __webpack_require__(50828);
|
|
281332
|
-
|
|
281333
|
-
var _utils = __webpack_require__(70302);
|
|
281334
|
-
|
|
281335
|
-
var _locale = __webpack_require__(62443);
|
|
281336
|
-
|
|
281337
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
281338
|
-
|
|
281339
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
281340
|
-
|
|
281341
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
281342
|
-
|
|
281343
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
281344
|
-
|
|
281345
|
-
const handleInput = async (context, generator, appApi) => {
|
|
281346
|
-
const appDir = context.materials.default.basePath;
|
|
281347
|
-
const {
|
|
281348
|
-
entriesDir
|
|
281349
|
-
} = context.config;
|
|
281350
|
-
await _generatorUtils.fs.ensureDir(_path.default.join(appDir, entriesDir));
|
|
281351
|
-
const analysisInfo = {
|
|
281352
|
-
isEmptySrc: (0, _utils.isEmptySource)(appDir, entriesDir),
|
|
281353
|
-
isSingleEntry: (0, _utils.isSingleEntry)(appDir, entriesDir),
|
|
281354
|
-
isTsProject: (0, _generatorUtils.isTsProject)(appDir)
|
|
281355
|
-
};
|
|
281356
|
-
generator.logger.debug('analysisInfo:', analysisInfo);
|
|
281357
|
-
const ans = await appApi.getInputBySchema(_generatorCommon.EntrySchema, _objectSpread(_objectSpread({}, context.config), analysisInfo));
|
|
281358
|
-
|
|
281359
|
-
if (ans.needModifyMWAConfig === 'no') {
|
|
281360
|
-
ans.disableStateManagement = _generatorCommon.BooleanConfig.NO;
|
|
281361
|
-
ans.clientRoute = _generatorCommon.ClientRoute.SelfControlRoute;
|
|
281362
|
-
}
|
|
281363
|
-
|
|
281364
|
-
return ans;
|
|
281365
|
-
};
|
|
281366
|
-
|
|
281367
|
-
const refactorSingleEntry = async (context, generator) => {
|
|
281368
|
-
const pkgObj = await (0, _generatorUtils.getPackageObj)(context);
|
|
281369
|
-
const pkgName = pkgObj.name;
|
|
281370
|
-
const {
|
|
281371
|
-
entriesDir
|
|
281372
|
-
} = context.config;
|
|
281373
|
-
|
|
281374
|
-
const oldFilePath = _path.default.join(context.materials.default.basePath, entriesDir);
|
|
281375
|
-
|
|
281376
|
-
const oldFiles = _generatorUtils.fs.readdirSync(oldFilePath).filter(filePath => {
|
|
281377
|
-
if (_generatorUtils.fs.statSync(_path.default.join(oldFilePath, filePath)).isDirectory()) {
|
|
281378
|
-
const files = _generatorUtils.fs.readdirSync(_path.default.join(oldFilePath, filePath));
|
|
281379
|
-
|
|
281380
|
-
return files.length;
|
|
281381
|
-
}
|
|
281382
|
-
|
|
281383
|
-
return filePath !== '.eslintrc.json' && filePath !== 'modern-app-env.d.ts';
|
|
281384
|
-
}).map(file => _path.default.join(context.materials.default.basePath, entriesDir, file)); // create new dir in entriesDir and move code to that dir
|
|
281385
|
-
|
|
281386
|
-
|
|
281387
|
-
_generatorUtils.fs.mkdirpSync(_path.default.join(context.materials.default.basePath, entriesDir, pkgName));
|
|
281388
|
-
|
|
281389
|
-
oldFiles.forEach(file => {
|
|
281390
|
-
generator.logger.debug(`rename ${file} to ${file.replace(entriesDir, _path.default.join(entriesDir, pkgName))}`);
|
|
281391
|
-
|
|
281392
|
-
_generatorUtils.fs.renameSync(file, file.replace(entriesDir, _path.default.join(entriesDir, pkgName)));
|
|
281393
|
-
});
|
|
281394
|
-
};
|
|
281395
|
-
|
|
281396
|
-
const getTplInfo = (clientRoute, isTs) => {
|
|
281397
|
-
const fileExtra = isTs ? 'tsx' : 'jsx';
|
|
281398
|
-
|
|
281399
|
-
if (clientRoute === _generatorCommon.ClientRoute.ConventionalRoute) {
|
|
281400
|
-
return {
|
|
281401
|
-
name: 'pages-router',
|
|
281402
|
-
space: ' ',
|
|
281403
|
-
fileExtra,
|
|
281404
|
-
entry: `Index.${fileExtra}`,
|
|
281405
|
-
css: 'index.css'
|
|
281406
|
-
};
|
|
281407
|
-
} else if (clientRoute === _generatorCommon.ClientRoute.SelfControlRoute) {
|
|
281408
|
-
return {
|
|
281409
|
-
name: 'router',
|
|
281410
|
-
space: ' ',
|
|
281411
|
-
fileExtra,
|
|
281412
|
-
entry: `App.${fileExtra}`,
|
|
281413
|
-
css: 'App.css'
|
|
281414
|
-
};
|
|
281415
|
-
}
|
|
281416
|
-
|
|
281417
|
-
return {
|
|
281418
|
-
name: 'base',
|
|
281419
|
-
space: ' ',
|
|
281420
|
-
fileExtra,
|
|
281421
|
-
entry: `App.${fileExtra}`,
|
|
281422
|
-
css: 'App.css'
|
|
281423
|
-
};
|
|
281424
|
-
};
|
|
281425
|
-
|
|
281426
|
-
const getTargetFolder = (clientRoute, entriesDir, entryName) => {
|
|
281427
|
-
let targetPath = _path.default.join(entriesDir, entryName);
|
|
281428
|
-
|
|
281429
|
-
if (clientRoute === _generatorCommon.ClientRoute.ConventionalRoute) {
|
|
281430
|
-
targetPath = _path.default.join(targetPath, 'pages');
|
|
281431
|
-
}
|
|
281432
|
-
|
|
281433
|
-
return targetPath;
|
|
281434
|
-
};
|
|
281435
|
-
|
|
281436
|
-
const getSpaUpdateInfo = (clientRoute, disableStateManagement) => {
|
|
281437
|
-
const updateInfo = {};
|
|
281438
|
-
|
|
281439
|
-
if (clientRoute === _generatorCommon.ClientRoute.No && disableStateManagement === _generatorCommon.BooleanConfig.YES) {
|
|
281440
|
-
updateInfo.modernConfig = {};
|
|
281441
|
-
}
|
|
281442
|
-
|
|
281443
|
-
if (clientRoute !== _generatorCommon.ClientRoute.No) {
|
|
281444
|
-
updateInfo['modernConfig.runtime.router'] = true;
|
|
281445
|
-
}
|
|
281446
|
-
|
|
281447
|
-
if (disableStateManagement === _generatorCommon.BooleanConfig.NO) {
|
|
281448
|
-
updateInfo['modernConfig.runtime.state'] = true;
|
|
281449
|
-
}
|
|
281450
|
-
|
|
281451
|
-
return updateInfo;
|
|
281452
|
-
};
|
|
281453
|
-
|
|
281454
|
-
const getMpaUpdateInfo = (name, clientRoute = _generatorCommon.ClientRoute.SelfControlRoute, disableStateManagement = _generatorCommon.BooleanConfig.NO, modernConfig) => {
|
|
281455
|
-
const newFeature = {
|
|
281456
|
-
state: disableStateManagement === _generatorCommon.BooleanConfig.NO,
|
|
281457
|
-
router: clientRoute !== _generatorCommon.ClientRoute.No
|
|
281458
|
-
};
|
|
281459
|
-
const updateInfo = {
|
|
281460
|
-
[`modernConfig.runtimeByEntries.${name}.state`]: newFeature.state,
|
|
281461
|
-
[`modernConfig.runtimeByEntries.${name}.router`]: newFeature.router
|
|
281462
|
-
};
|
|
281463
|
-
|
|
281464
|
-
if (!newFeature.state && !newFeature.router) {
|
|
281465
|
-
if (!modernConfig || !modernConfig.runtime || !modernConfig.runtime) {
|
|
281466
|
-
return {};
|
|
281467
|
-
}
|
|
281468
|
-
}
|
|
281469
|
-
|
|
281470
|
-
if (modernConfig !== null && modernConfig !== void 0 && modernConfig.runtime) {
|
|
281471
|
-
const preDefaultFeature = modernConfig.runtime;
|
|
281472
|
-
|
|
281473
|
-
if ((0, _isEqual2.default)(newFeature, preDefaultFeature)) {
|
|
281474
|
-
return {};
|
|
281475
|
-
}
|
|
281476
|
-
}
|
|
281477
|
-
|
|
281478
|
-
return updateInfo;
|
|
281479
|
-
};
|
|
281480
|
-
|
|
281481
|
-
const updatePackageJSON = async (context, generator) => {
|
|
281482
|
-
const appDir = context.materials.default.basePath;
|
|
281483
|
-
|
|
281484
|
-
const confPath = _path.default.join(appDir, 'package.json');
|
|
281485
|
-
|
|
281486
|
-
if (!_generatorUtils.fs.existsSync(confPath)) {
|
|
281487
|
-
generator.logger.warn(_locale.i18n.t(_locale.localeKeys.package_not_exist));
|
|
281488
|
-
}
|
|
281489
|
-
|
|
281490
|
-
let updateInfo = {};
|
|
281491
|
-
const {
|
|
281492
|
-
name,
|
|
281493
|
-
clientRoute,
|
|
281494
|
-
disableStateManagement
|
|
281495
|
-
} = context.config;
|
|
281496
|
-
|
|
281497
|
-
if (!name) {
|
|
281498
|
-
updateInfo = getSpaUpdateInfo(clientRoute, disableStateManagement);
|
|
281499
|
-
} else {
|
|
281500
|
-
const pkgObj = await (0, _generatorUtils.getPackageObj)(context);
|
|
281501
|
-
const {
|
|
281502
|
-
modernConfig
|
|
281503
|
-
} = pkgObj;
|
|
281504
|
-
updateInfo = getMpaUpdateInfo(name, clientRoute, disableStateManagement, modernConfig);
|
|
281505
|
-
}
|
|
281506
|
-
|
|
281507
|
-
const jsonAPI = new _codesmithApiJson.JsonAPI(generator);
|
|
281508
|
-
await jsonAPI.update(context.materials.default.get('package.json'), {
|
|
281509
|
-
query: {},
|
|
281510
|
-
update: {
|
|
281511
|
-
$set: updateInfo
|
|
281512
|
-
}
|
|
281513
|
-
});
|
|
281514
|
-
};
|
|
281515
|
-
|
|
281516
|
-
const handleTemplateFile = async (context, generator, appApi) => {
|
|
281517
|
-
var _context$current;
|
|
281518
|
-
|
|
281519
|
-
const ans = await handleInput(context, generator, appApi);
|
|
281520
|
-
|
|
281521
|
-
if (ans.isSingleEntry) {
|
|
281522
|
-
generator.logger.debug('current is single entry, refactoring to multi entry');
|
|
281523
|
-
await refactorSingleEntry(context, generator);
|
|
281524
|
-
}
|
|
281525
|
-
|
|
281526
|
-
const entryName = ans.name || '';
|
|
281527
|
-
const {
|
|
281528
|
-
name,
|
|
281529
|
-
space,
|
|
281530
|
-
fileExtra,
|
|
281531
|
-
entry,
|
|
281532
|
-
css
|
|
281533
|
-
} = getTplInfo(ans.clientRoute, ans.isTsProject);
|
|
281534
|
-
const targetFolder = getTargetFolder(ans.clientRoute, context.config.entriesDir, entryName);
|
|
281535
|
-
const sourceFolder = `templates/${name}`;
|
|
281536
|
-
const mainTpl = await ((_context$current = context.current) === null || _context$current === void 0 ? void 0 : _context$current.material.get('templates/main.handlebars').value());
|
|
281537
|
-
const main = (0, _codesmithApiHandlebars.renderString)((mainTpl === null || mainTpl === void 0 ? void 0 : mainTpl.content) || '', {
|
|
281538
|
-
space,
|
|
281539
|
-
entry
|
|
281540
|
-
});
|
|
281541
|
-
await appApi.forgeTemplate(`${sourceFolder}/*`, undefined, resourceKey => resourceKey.replace(sourceFolder, targetFolder).replace('.handlebars', `.${fileExtra}`), {
|
|
281542
|
-
main
|
|
281543
|
-
});
|
|
281544
|
-
await appApi.forgeTemplate(`templates/main.css`, undefined, resourceKey => resourceKey.replace('templates/main.css', `${targetFolder}/${css}`).replace('.handlebars', ''), {
|
|
281545
|
-
main
|
|
281546
|
-
});
|
|
281547
|
-
await updatePackageJSON(context, generator);
|
|
281548
|
-
};
|
|
281549
|
-
|
|
281550
|
-
var _default = async (context, generator) => {
|
|
281551
|
-
const appApi = new _codesmithApiApp.AppAPI(context, generator);
|
|
281552
|
-
const {
|
|
281553
|
-
locale
|
|
281554
|
-
} = context.config;
|
|
281555
|
-
|
|
281556
|
-
_generatorCommon.i18n.changeLanguage({
|
|
281557
|
-
locale
|
|
281558
|
-
});
|
|
281559
|
-
|
|
281560
|
-
appApi.i18n.changeLanguage({
|
|
281561
|
-
locale
|
|
281562
|
-
});
|
|
281563
|
-
|
|
281564
|
-
_locale.i18n.changeLanguage({
|
|
281565
|
-
locale
|
|
281566
|
-
});
|
|
281567
|
-
|
|
281568
|
-
if (!(await appApi.checkEnvironment())) {
|
|
281569
|
-
// eslint-disable-next-line no-process-exit
|
|
281570
|
-
process.exit(1);
|
|
281571
|
-
}
|
|
281572
|
-
|
|
281573
|
-
generator.logger.debug(`start run @modern-js/entry-generator`);
|
|
281574
|
-
generator.logger.debug(`context=${JSON.stringify(context)}`);
|
|
281575
|
-
generator.logger.debug(`context.data=${JSON.stringify(context.data)}`);
|
|
281576
|
-
(0, _merge2.default)(context.config, {
|
|
281577
|
-
entriesDir: context.config.entriesDir || 'src'
|
|
281578
|
-
});
|
|
281579
|
-
await handleTemplateFile(context, generator, appApi);
|
|
281580
|
-
|
|
281581
|
-
if (!context.config.isEmptySrc) {
|
|
281582
|
-
appApi.showSuccessInfo(_locale.i18n.t(_locale.localeKeys.success, {
|
|
281583
|
-
name: context.config.name
|
|
281584
|
-
}));
|
|
281585
|
-
}
|
|
281586
|
-
|
|
281587
|
-
generator.logger.debug(`forge @modern-js/entry-generator succeed `);
|
|
281588
|
-
};
|
|
281589
|
-
|
|
281590
|
-
exports["default"] = _default;
|
|
281591
|
-
})();
|
|
281592
|
-
|
|
281593
|
-
module.exports = __webpack_exports__;
|
|
283656
|
+
/******/
|
|
283657
|
+
/******/ // module cache are used so entry inlining is disabled
|
|
283658
|
+
/******/ // startup
|
|
283659
|
+
/******/ // Load entry module and return exports
|
|
283660
|
+
/******/ var __webpack_exports__ = __webpack_require__(34701);
|
|
283661
|
+
/******/ module.exports = __webpack_exports__;
|
|
283662
|
+
/******/
|
|
281594
283663
|
/******/ })()
|
|
281595
283664
|
;
|