fyn 1.1.30 → 1.1.33
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/fyn.js +201 -75
- package/package.json +1 -1
package/dist/fyn.js
CHANGED
|
@@ -1073,13 +1073,21 @@ class FynCli {
|
|
|
1073
1073
|
}
|
|
1074
1074
|
}));
|
|
1075
1075
|
|
|
1076
|
-
const env = npmLifecycle.initEnv(process.env, this.fyn.production);
|
|
1076
|
+
const env = npmLifecycle.initEnv(process.env, this.fyn.production); // add fynpo top dir node_modules/.bin to PATH
|
|
1077
|
+
|
|
1078
|
+
if (this._config._fynpo.config) {
|
|
1079
|
+
xsh.envPath.addToFront(Path.join(this._config._fynpo.dir, "node_modules/.bin"), env);
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1077
1082
|
setupNodeGypEnv(env);
|
|
1078
1083
|
return Promise.each(_scripts, s => _.get(pkg, ["scripts", s]) && this.runScript(pkg, s, Object.assign({}, env)));
|
|
1079
1084
|
}
|
|
1080
1085
|
|
|
1081
1086
|
async run(argv, script = "") {
|
|
1082
|
-
this._config._fynpo
|
|
1087
|
+
if (!this._config._fynpo) {
|
|
1088
|
+
this._config._fynpo = {};
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1083
1091
|
script = script || argv.args.script;
|
|
1084
1092
|
|
|
1085
1093
|
if (argv.opts.list || !script) {
|
|
@@ -1138,7 +1146,31 @@ const defaultRc = __webpack_require__("./cli/default-rc.js");
|
|
|
1138
1146
|
|
|
1139
1147
|
const npmConfig = __webpack_require__("./cli/config/npm-config.js");
|
|
1140
1148
|
|
|
1141
|
-
const fynTil = __webpack_require__("./lib/util/fyntil.js");
|
|
1149
|
+
const fynTil = __webpack_require__("./lib/util/fyntil.js"); // replace any ${ENV} values with the appropriate environ.
|
|
1150
|
+
// copied from https://github.com/npm/config/blob/1f47a6c6ae7864b412d45c6a4a74930cf3365395/lib/env-replace.js
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
const envExpr = /(?<!\\)(\\*)\$\{([^${}]+)\}/g;
|
|
1154
|
+
|
|
1155
|
+
function replaceEnv(f, env) {
|
|
1156
|
+
return f.replace(envExpr, (orig, esc, name) => {
|
|
1157
|
+
const val = env[name] !== undefined ? env[name] : `$\{${name}}`; // consume the escape chars that are relevant.
|
|
1158
|
+
|
|
1159
|
+
if (esc.length % 2) {
|
|
1160
|
+
return orig.slice((esc.length + 1) / 2);
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
return esc.slice(esc.length / 2) + val;
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
function replaceRcEnv(rc, env) {
|
|
1168
|
+
for (const k in rc) {
|
|
1169
|
+
if (rc[k] && rc[k].replace) {
|
|
1170
|
+
rc[k] = replaceEnv(rc[k], env);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1142
1174
|
|
|
1143
1175
|
function readRc(fname) {
|
|
1144
1176
|
const rcFname = Path.basename(fname);
|
|
@@ -1192,6 +1224,8 @@ function loadRc(cwd, fynpoDir) {
|
|
|
1192
1224
|
|
|
1193
1225
|
const npmrc = _.merge.apply(_, [{}, npmConfig.defaults].concat(npmrcData));
|
|
1194
1226
|
|
|
1227
|
+
replaceRcEnv(all, process.env);
|
|
1228
|
+
replaceRcEnv(npmrc, process.env);
|
|
1195
1229
|
return {
|
|
1196
1230
|
all,
|
|
1197
1231
|
npmrc,
|
|
@@ -1313,7 +1347,8 @@ const pickOptions = async (argv, nixClap, checkFynpo = true) => {
|
|
|
1313
1347
|
return {
|
|
1314
1348
|
opts: argv.opts,
|
|
1315
1349
|
rcData,
|
|
1316
|
-
_cliSource: argv.source
|
|
1350
|
+
_cliSource: argv.source,
|
|
1351
|
+
_fynpo: fynpo
|
|
1317
1352
|
};
|
|
1318
1353
|
};
|
|
1319
1354
|
|
|
@@ -1600,7 +1635,8 @@ const commands = {
|
|
|
1600
1635
|
usage: "$0 $1 <command> [-- <args>...]",
|
|
1601
1636
|
exec: async (argv, parsed) => {
|
|
1602
1637
|
try {
|
|
1603
|
-
|
|
1638
|
+
const options = await pickOptions(argv, parsed.nixClap, !argv.opts.list);
|
|
1639
|
+
return await new FynCli(options).run(argv);
|
|
1604
1640
|
} catch (err) {
|
|
1605
1641
|
if (err.errno !== undefined) {
|
|
1606
1642
|
process.exit(err.errno);
|
|
@@ -4038,6 +4074,10 @@ const {
|
|
|
4038
4074
|
|
|
4039
4075
|
const npmConfigEnv = __webpack_require__("./lib/util/npm-config-env.js");
|
|
4040
4076
|
|
|
4077
|
+
const {
|
|
4078
|
+
AggregateError
|
|
4079
|
+
} = __webpack_require__("./node_modules/.f/_/@jchip/error/1.0.3/@jchip/error/dist/index.js");
|
|
4080
|
+
|
|
4041
4081
|
const readPkgJson = dir => {
|
|
4042
4082
|
return fyntil.readPkgJson(dir).catch(() => {
|
|
4043
4083
|
return {};
|
|
@@ -4076,7 +4116,11 @@ class LifecycleScripts {
|
|
|
4076
4116
|
// this._addNpmPackageConfig(this._appPkg.config, env);
|
|
4077
4117
|
// this._addNpmPackageConfig(this._pkg.config, env);
|
|
4078
4118
|
const env = Object.assign({}, npmConfigEnv(this._pkg, this._fyn.allrc || {}), override);
|
|
4079
|
-
setupNodeGypEnv(env);
|
|
4119
|
+
setupNodeGypEnv(env); // add fynpo node_modules/.bin to PATH
|
|
4120
|
+
|
|
4121
|
+
if (this._fyn.isFynpo) {
|
|
4122
|
+
xsh.envPath.addToFront(Path.join(this._fyn._fynpo.dir, "node_modules/.bin"), env);
|
|
4123
|
+
}
|
|
4080
4124
|
|
|
4081
4125
|
if (this._appDir) {
|
|
4082
4126
|
xsh.envPath.addToFront(Path.join(this._appDir, "node_modules/.bin"), env);
|
|
@@ -4155,7 +4199,12 @@ class LifecycleScripts {
|
|
|
4155
4199
|
logLabel: `${pkgName} npm script ${scriptName}`,
|
|
4156
4200
|
outputLabel: `${dimPkgName} npm script ${scriptName}`
|
|
4157
4201
|
});
|
|
4158
|
-
|
|
4202
|
+
|
|
4203
|
+
try {
|
|
4204
|
+
return await ve.show(child);
|
|
4205
|
+
} catch (err) {
|
|
4206
|
+
throw new AggregateError([err], `Failed running npm script '${name}' for package ${pkgName} at ${pkgDir}`);
|
|
4207
|
+
}
|
|
4159
4208
|
}
|
|
4160
4209
|
|
|
4161
4210
|
}
|
|
@@ -4197,11 +4246,16 @@ const {
|
|
|
4197
4246
|
runNpmScript
|
|
4198
4247
|
} = __webpack_require__("./lib/util/run-npm-script.js");
|
|
4199
4248
|
|
|
4249
|
+
const {
|
|
4250
|
+
AggregateError
|
|
4251
|
+
} = __webpack_require__("./node_modules/.f/_/@jchip/error/1.0.3/@jchip/error/dist/index.js");
|
|
4252
|
+
|
|
4200
4253
|
class LocalPkgBuilder {
|
|
4201
4254
|
constructor(options) {
|
|
4202
4255
|
this._options = options;
|
|
4203
4256
|
this._fyn = options.fyn;
|
|
4204
4257
|
this._waitItems = {};
|
|
4258
|
+
this._failedItems = {};
|
|
4205
4259
|
}
|
|
4206
4260
|
|
|
4207
4261
|
async start() {
|
|
@@ -4224,11 +4278,17 @@ class LocalPkgBuilder {
|
|
|
4224
4278
|
} = this._options;
|
|
4225
4279
|
|
|
4226
4280
|
this._promiseQ.on("doneItem", data => {
|
|
4227
|
-
this._waitItems[data.item.fullPath].resolve();
|
|
4281
|
+
this._waitItems[data.item.fullPath].resolve({});
|
|
4228
4282
|
});
|
|
4229
4283
|
|
|
4230
4284
|
this._promiseQ.on("failItem", data => {
|
|
4231
|
-
|
|
4285
|
+
const itemRes = {
|
|
4286
|
+
error: new AggregateError([data.error], `failed build local package at ${data.item.fullPath}`)
|
|
4287
|
+
};
|
|
4288
|
+
|
|
4289
|
+
this._waitItems[data.item.fullPath].resolve(itemRes);
|
|
4290
|
+
|
|
4291
|
+
this._failedItems[data.item.fullPath] = itemRes;
|
|
4232
4292
|
});
|
|
4233
4293
|
|
|
4234
4294
|
this._defer = xaa.makeDefer();
|
|
@@ -4240,7 +4300,7 @@ class LocalPkgBuilder {
|
|
|
4240
4300
|
});
|
|
4241
4301
|
|
|
4242
4302
|
this._promiseQ.on("fail", data => {
|
|
4243
|
-
this._defer.reject(data.error);
|
|
4303
|
+
this._defer.reject(new AggregateError([data.error], `failed to build local packages`));
|
|
4244
4304
|
}); //
|
|
4245
4305
|
// localsByDepth is array of array: level 1 depths, level 2 packages
|
|
4246
4306
|
//
|
|
@@ -4326,6 +4386,10 @@ class LocalPkgBuilder {
|
|
|
4326
4386
|
}
|
|
4327
4387
|
|
|
4328
4388
|
async processItem(item) {
|
|
4389
|
+
if (!_.isEmpty(this._failedItems)) {
|
|
4390
|
+
return;
|
|
4391
|
+
}
|
|
4392
|
+
|
|
4329
4393
|
const dispPath = Path.relative(this._options.fyn._cwd, item.fullPath);
|
|
4330
4394
|
const command = [process.argv[0], this._fynJs, this._fyn._options.registry && `--reg=${this._fyn._options.registry}`, "-q=d --pg=simple --no-build-local", !this._fyn._options.sourceMaps && "--no-source-maps"].filter(x => x).join(" ");
|
|
4331
4395
|
const displayTitle = `building local pkg at ${dispPath}`;
|
|
@@ -5762,7 +5826,7 @@ const {
|
|
|
5762
5826
|
const {
|
|
5763
5827
|
getDepSection,
|
|
5764
5828
|
makeDepStep
|
|
5765
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
5829
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/index.js");
|
|
5766
5830
|
|
|
5767
5831
|
const xaa = __webpack_require__("./lib/util/xaa.js");
|
|
5768
5832
|
|
|
@@ -6240,7 +6304,7 @@ class PkgDepResolver {
|
|
|
6240
6304
|
}
|
|
6241
6305
|
|
|
6242
6306
|
for (const name in deps) {
|
|
6243
|
-
if (this._fyn.checkNoFynLocal(name) || !fynpo.graph.getPackageByName(name)) {
|
|
6307
|
+
if (this._fyn.checkNoFynLocal(name) || !fynpo.graph.getPackageByName(name) || semverUtil.checkUrl(deps[name])) {
|
|
6244
6308
|
continue;
|
|
6245
6309
|
} //
|
|
6246
6310
|
// Check if there is a fynpo package that match 'name@semver'?
|
|
@@ -7578,6 +7642,10 @@ const {
|
|
|
7578
7642
|
|
|
7579
7643
|
const xaa = __webpack_require__("./lib/util/xaa.js");
|
|
7580
7644
|
|
|
7645
|
+
const {
|
|
7646
|
+
AggregateError
|
|
7647
|
+
} = __webpack_require__("./node_modules/.f/_/@jchip/error/1.0.3/@jchip/error/dist/index.js");
|
|
7648
|
+
|
|
7581
7649
|
const {
|
|
7582
7650
|
RESOLVE_ORDER,
|
|
7583
7651
|
RSEMVERS,
|
|
@@ -7953,10 +8021,12 @@ class PkgInstaller {
|
|
|
7953
8021
|
}
|
|
7954
8022
|
|
|
7955
8023
|
async _buildLocalPkg(depInfo) {
|
|
7956
|
-
if (this._fyn._localPkgBuilder) {
|
|
7957
|
-
await this._fyn._localPkgBuilder.waitForItem(depInfo.dir);
|
|
7958
|
-
|
|
7959
|
-
|
|
8024
|
+
if (this._fyn._options.buildLocal && this._fyn._localPkgBuilder) {
|
|
8025
|
+
const itemRes = await this._fyn._localPkgBuilder.waitForItem(depInfo.dir);
|
|
8026
|
+
|
|
8027
|
+
if (itemRes && itemRes.error) {
|
|
8028
|
+
throw new AggregateError([itemRes.error], `install fail because local package build failed`);
|
|
8029
|
+
}
|
|
7960
8030
|
}
|
|
7961
8031
|
}
|
|
7962
8032
|
|
|
@@ -8732,7 +8802,7 @@ const {
|
|
|
8732
8802
|
|
|
8733
8803
|
const {
|
|
8734
8804
|
PackageRef
|
|
8735
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
8805
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/index.js");
|
|
8736
8806
|
|
|
8737
8807
|
const WATCH_TIME = 5000; // consider meta cache stale after this much time (30 minutes)
|
|
8738
8808
|
|
|
@@ -9263,7 +9333,8 @@ class PkgSrcManager {
|
|
|
9263
9333
|
const packument = cached && cached.data && JSON.parse(cached.data);
|
|
9264
9334
|
foundCache = cached;
|
|
9265
9335
|
const stale = Date.now() - cached.refreshTime;
|
|
9266
|
-
|
|
9336
|
+
const since = (stale / 1000).toFixed(2);
|
|
9337
|
+
logger.debug(`found packument cache for '${pkgName}' - refreshed ${since}secs ago at ${cached.refreshTime}`);
|
|
9267
9338
|
|
|
9268
9339
|
if (this._fyn._options.refreshMeta !== true && cached && cached.refreshTime && stale < META_CACHE_STALE_TIME) {
|
|
9269
9340
|
cacheMemoized = true;
|
|
@@ -9273,7 +9344,7 @@ class PkgSrcManager {
|
|
|
9273
9344
|
const encKey = encodeURIComponent(cacheKey);
|
|
9274
9345
|
return nodeFetch(`${metaMemoizeUrl}?key=${encKey}`).then(res => {
|
|
9275
9346
|
if (res.status === 200) {
|
|
9276
|
-
logger.debug(
|
|
9347
|
+
logger.debug(`using memoized packument cache for '${pkgName}'`);
|
|
9277
9348
|
cacheMemoized = true;
|
|
9278
9349
|
this._metaStat.wait--;
|
|
9279
9350
|
return packument;
|
|
@@ -9286,7 +9357,8 @@ class PkgSrcManager {
|
|
|
9286
9357
|
}
|
|
9287
9358
|
}).catch(err => {
|
|
9288
9359
|
if (foundCache) {
|
|
9289
|
-
|
|
9360
|
+
const data = foundCache.data && foundCache.data.toString();
|
|
9361
|
+
logger.debug(`fail to process packument cache - ${err.message}; data ${data}`);
|
|
9290
9362
|
throw err;
|
|
9291
9363
|
}
|
|
9292
9364
|
|
|
@@ -9748,7 +9820,7 @@ const {
|
|
|
9748
9820
|
const {
|
|
9749
9821
|
FynpoConfigManager,
|
|
9750
9822
|
FynpoDepGraph
|
|
9751
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
9823
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/index.js");
|
|
9752
9824
|
/* eslint-disable no-magic-numbers, max-statements, no-empty, complexity, no-eval */
|
|
9753
9825
|
|
|
9754
9826
|
|
|
@@ -10841,7 +10913,7 @@ function localSplit(v) {
|
|
|
10841
10913
|
|
|
10842
10914
|
|
|
10843
10915
|
function getAsFilepath(semver) {
|
|
10844
|
-
if (semver.startsWith("file:")) {
|
|
10916
|
+
if (semver.startsWith("file:") || semver.startsWith("link:")) {
|
|
10845
10917
|
return semver.substr(5);
|
|
10846
10918
|
}
|
|
10847
10919
|
|
|
@@ -10961,7 +11033,7 @@ function analyze(semver) {
|
|
|
10961
11033
|
} else if (urlType === "sym1") {
|
|
10962
11034
|
sv.path = semver.substr(5);
|
|
10963
11035
|
sv.localType = "sym1";
|
|
10964
|
-
} else if (urlType === "file") {
|
|
11036
|
+
} else if (urlType === "file" || urlType === "link") {
|
|
10965
11037
|
setHardLocal(semver.substr(5));
|
|
10966
11038
|
} else {
|
|
10967
11039
|
sv.urlType = urlType;
|
|
@@ -11246,7 +11318,7 @@ module.exports = __webpack_require__("./node_modules/.f/_/xaa/1.7.0/xaa/dist/xaa
|
|
|
11246
11318
|
|
|
11247
11319
|
/***/ }),
|
|
11248
11320
|
|
|
11249
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
11321
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/caching.js":
|
|
11250
11322
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11251
11323
|
|
|
11252
11324
|
"use strict";
|
|
@@ -11255,7 +11327,7 @@ module.exports = __webpack_require__("./node_modules/.f/_/xaa/1.7.0/xaa/dist/xaa
|
|
|
11255
11327
|
Object.defineProperty(exports, "__esModule", ({
|
|
11256
11328
|
value: true
|
|
11257
11329
|
}));
|
|
11258
|
-
exports.processOutput = exports.processLifecycleInput = exports.processInput = void 0;
|
|
11330
|
+
exports.processOutput = exports.processLifecycleInput = exports.processInput = exports.readHashDigest = void 0;
|
|
11259
11331
|
|
|
11260
11332
|
const tslib_1 = __webpack_require__("./node_modules/.f/_/tslib/2.1.0/tslib/tslib.es6.js");
|
|
11261
11333
|
|
|
@@ -11267,7 +11339,7 @@ const fs_1 = (0, tslib_1.__importDefault)(__webpack_require__("fs"));
|
|
|
11267
11339
|
const path_1 = (0, tslib_1.__importDefault)(__webpack_require__("path"));
|
|
11268
11340
|
const crypto_1 = (0, tslib_1.__importDefault)(__webpack_require__("crypto"));
|
|
11269
11341
|
|
|
11270
|
-
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
11342
|
+
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
|
|
11271
11343
|
/**
|
|
11272
11344
|
* create a sha256 hash for some data
|
|
11273
11345
|
*
|
|
@@ -11280,15 +11352,35 @@ function hashData1(data, encoding = "base64url") {
|
|
|
11280
11352
|
return crypto_1.default.createHash("sha256").update(data).digest(encoding);
|
|
11281
11353
|
}
|
|
11282
11354
|
|
|
11355
|
+
function makeBase64Url(hash) {
|
|
11356
|
+
return hash.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
11357
|
+
}
|
|
11358
|
+
|
|
11283
11359
|
function hashData2(data, encoding = "base64url") {
|
|
11284
11360
|
if (encoding === "base64url") {
|
|
11285
|
-
return hashData1(data, "base64")
|
|
11361
|
+
return makeBase64Url(hashData1(data, "base64"));
|
|
11286
11362
|
}
|
|
11287
11363
|
|
|
11288
11364
|
return hashData1(data, encoding);
|
|
11289
11365
|
}
|
|
11290
11366
|
|
|
11291
|
-
const
|
|
11367
|
+
const hasBase64Url = typeof crypto_1.default.createHash("sha256").digest("base64url") === "string";
|
|
11368
|
+
const hashData = hasBase64Url ? hashData1 : hashData2;
|
|
11369
|
+
exports.readHashDigest = hasBase64Url ? (hash, encoding = "base64url") => {
|
|
11370
|
+
hash.setEncoding(encoding);
|
|
11371
|
+
hash.end();
|
|
11372
|
+
return hash.read();
|
|
11373
|
+
} : (hash, encoding = "base64url") => {
|
|
11374
|
+
if (encoding === "base64url") {
|
|
11375
|
+
hash.setEncoding("base64");
|
|
11376
|
+
hash.end();
|
|
11377
|
+
return makeBase64Url(hash.read());
|
|
11378
|
+
}
|
|
11379
|
+
|
|
11380
|
+
hash.setEncoding(encoding);
|
|
11381
|
+
hash.end();
|
|
11382
|
+
return hash.read();
|
|
11383
|
+
};
|
|
11292
11384
|
/**
|
|
11293
11385
|
* generate sha256 has of a file
|
|
11294
11386
|
*
|
|
@@ -11349,17 +11441,6 @@ function makeMmPatterns(patterns, options = {
|
|
|
11349
11441
|
}) {
|
|
11350
11442
|
return [].concat(patterns).map(x => x && new minimatch_1.default.Minimatch(x, options)).filter(x => x);
|
|
11351
11443
|
}
|
|
11352
|
-
/**
|
|
11353
|
-
*
|
|
11354
|
-
* @param fullPath
|
|
11355
|
-
* @param patterns
|
|
11356
|
-
* @returns
|
|
11357
|
-
*/
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
function checkMmMatch(fullPath, patterns) {
|
|
11361
|
-
return !lodash_1.default.isEmpty(patterns) && patterns.find(patternMm => patternMm.match(fullPath));
|
|
11362
|
-
}
|
|
11363
11444
|
/**
|
|
11364
11445
|
* Scan for files using include and exclude patterns
|
|
11365
11446
|
*
|
|
@@ -11371,7 +11452,7 @@ function checkMmMatch(fullPath, patterns) {
|
|
|
11371
11452
|
|
|
11372
11453
|
async function scanFiles(cwd, includes, excludes) {
|
|
11373
11454
|
const filter = (_file, _path, extras) => {
|
|
11374
|
-
if (!checkMmMatch(extras.dirFile, includes) || checkMmMatch(extras.dirFile, excludes)) {
|
|
11455
|
+
if (!(0, minimatch_group_1.checkMmMatch)(extras.dirFile, includes) || (0, minimatch_group_1.checkMmMatch)(extras.dirFile, excludes)) {
|
|
11375
11456
|
return false;
|
|
11376
11457
|
}
|
|
11377
11458
|
|
|
@@ -11381,19 +11462,19 @@ async function scanFiles(cwd, includes, excludes) {
|
|
|
11381
11462
|
const dirIncludes = includes.map(mx => (0, minimatch_group_1.deconstructMM)(mx));
|
|
11382
11463
|
|
|
11383
11464
|
const filterDir = (_file, _path, extras) => {
|
|
11384
|
-
const
|
|
11465
|
+
const dir = `${extras.dirFile}/`; // add extra / to force matching directory
|
|
11385
11466
|
|
|
11386
|
-
|
|
11387
|
-
return false;
|
|
11388
|
-
}
|
|
11467
|
+
const inc = dirIncludes.find(di => (0, minimatch_group_1.checkMmMatch)(dir, di.mms));
|
|
11389
11468
|
|
|
11390
|
-
|
|
11469
|
+
if (inc) {
|
|
11470
|
+
const exc = (0, minimatch_group_1.checkMmMatch)(dir, excludes);
|
|
11391
11471
|
|
|
11392
|
-
|
|
11393
|
-
|
|
11472
|
+
if (!exc) {
|
|
11473
|
+
return true;
|
|
11474
|
+
}
|
|
11394
11475
|
}
|
|
11395
11476
|
|
|
11396
|
-
return
|
|
11477
|
+
return false;
|
|
11397
11478
|
};
|
|
11398
11479
|
|
|
11399
11480
|
return (await (0, filter_scan_dir_1.filterScanDir)({
|
|
@@ -11488,7 +11569,7 @@ async function processOutput({
|
|
|
11488
11569
|
const mmExcludes = makeMmPatterns(output.exclude, output.minimatchOptions);
|
|
11489
11570
|
const files = await scanFiles(cwd, mmIncludes, mmExcludes);
|
|
11490
11571
|
preFiles = [].concat(preFiles).filter(x => {
|
|
11491
|
-
if (!x ||
|
|
11572
|
+
if (!x || (0, minimatch_group_1.unrollMmMatch)(x, mmExcludes)) {
|
|
11492
11573
|
return false;
|
|
11493
11574
|
}
|
|
11494
11575
|
|
|
@@ -11512,12 +11593,13 @@ async function processOutput({
|
|
|
11512
11593
|
} //
|
|
11513
11594
|
|
|
11514
11595
|
|
|
11596
|
+
const now = Date.now();
|
|
11515
11597
|
return {
|
|
11516
11598
|
files: allFiles,
|
|
11517
11599
|
data,
|
|
11518
11600
|
hash,
|
|
11519
|
-
access:
|
|
11520
|
-
create:
|
|
11601
|
+
access: now,
|
|
11602
|
+
create: now
|
|
11521
11603
|
};
|
|
11522
11604
|
}
|
|
11523
11605
|
|
|
@@ -11525,7 +11607,7 @@ exports.processOutput = processOutput;
|
|
|
11525
11607
|
|
|
11526
11608
|
/***/ }),
|
|
11527
11609
|
|
|
11528
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
11610
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/fynpo-config.js":
|
|
11529
11611
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11530
11612
|
|
|
11531
11613
|
"use strict";
|
|
@@ -11675,7 +11757,7 @@ exports.FynpoConfigManager = FynpoConfigManager;
|
|
|
11675
11757
|
|
|
11676
11758
|
/***/ }),
|
|
11677
11759
|
|
|
11678
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
11760
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js":
|
|
11679
11761
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11680
11762
|
|
|
11681
11763
|
"use strict";
|
|
@@ -11705,9 +11787,9 @@ const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_mod
|
|
|
11705
11787
|
const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
|
|
11706
11788
|
const semver_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/semver/7.3.5/semver/index.js"));
|
|
11707
11789
|
|
|
11708
|
-
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
11790
|
+
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
|
|
11709
11791
|
|
|
11710
|
-
const util_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
11792
|
+
const util_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/util.js");
|
|
11711
11793
|
|
|
11712
11794
|
const is_path_inside_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/is-path-inside/3.0.3/is-path-inside/index.js"));
|
|
11713
11795
|
const DepSectionMap = {
|
|
@@ -12428,7 +12510,7 @@ exports.FynpoDepGraph = FynpoDepGraph;
|
|
|
12428
12510
|
|
|
12429
12511
|
/***/ }),
|
|
12430
12512
|
|
|
12431
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
12513
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/index.js":
|
|
12432
12514
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12433
12515
|
|
|
12434
12516
|
"use strict";
|
|
@@ -12450,12 +12532,12 @@ const filter_scan_dir_1 = __webpack_require__("./node_modules/.f/_/filter-scan-d
|
|
|
12450
12532
|
const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/minimatch/3.0.4/minimatch/minimatch.js"));
|
|
12451
12533
|
const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
|
|
12452
12534
|
|
|
12453
|
-
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12535
|
+
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
|
|
12454
12536
|
|
|
12455
|
-
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12456
|
-
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12457
|
-
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12458
|
-
exports.caching = (0, tslib_1.__importStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12537
|
+
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js"), exports);
|
|
12538
|
+
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/fynpo-config.js"), exports);
|
|
12539
|
+
(0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/util.js"), exports);
|
|
12540
|
+
exports.caching = (0, tslib_1.__importStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/caching.js"));
|
|
12459
12541
|
/**
|
|
12460
12542
|
* Take an array of packages and figure out their dependencies on each other
|
|
12461
12543
|
*
|
|
@@ -12711,7 +12793,7 @@ exports.makePkgDeps = makePkgDeps;
|
|
|
12711
12793
|
|
|
12712
12794
|
/***/ }),
|
|
12713
12795
|
|
|
12714
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
12796
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/minimatch-group.js":
|
|
12715
12797
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12716
12798
|
|
|
12717
12799
|
"use strict";
|
|
@@ -12720,11 +12802,12 @@ exports.makePkgDeps = makePkgDeps;
|
|
|
12720
12802
|
Object.defineProperty(exports, "__esModule", ({
|
|
12721
12803
|
value: true
|
|
12722
12804
|
}));
|
|
12723
|
-
exports.deconstructMM = exports.groupMM = void 0;
|
|
12805
|
+
exports.unrollMmMatch = exports.checkMmMatch = exports.deconstructMM = exports.groupMM = void 0;
|
|
12724
12806
|
|
|
12725
12807
|
const tslib_1 = __webpack_require__("./node_modules/.f/_/tslib/2.1.0/tslib/tslib.es6.js");
|
|
12726
12808
|
|
|
12727
12809
|
const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/minimatch/3.0.4/minimatch/minimatch.js"));
|
|
12810
|
+
const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
|
|
12728
12811
|
/**
|
|
12729
12812
|
* process a list of minimatch objects and group them by the string prefix of their patterns
|
|
12730
12813
|
*
|
|
@@ -12762,7 +12845,7 @@ exports.groupMM = groupMM;
|
|
|
12762
12845
|
* process a minimatch pattern to group them for matching directories
|
|
12763
12846
|
*
|
|
12764
12847
|
* - needs to create a new pattern at every non-string part
|
|
12765
|
-
* @param pattern
|
|
12848
|
+
* @param m0 minimatch pattern
|
|
12766
12849
|
*/
|
|
12767
12850
|
|
|
12768
12851
|
function deconstructMM(m0) {
|
|
@@ -12778,35 +12861,78 @@ function deconstructMM(m0) {
|
|
|
12778
12861
|
GLOBSTAR
|
|
12779
12862
|
} = minimatch_1.default;
|
|
12780
12863
|
|
|
12781
|
-
for (let ix = 0; ix < set.length
|
|
12864
|
+
for (let ix = 0; ix < set.length; ix++) {
|
|
12782
12865
|
const s = set[ix];
|
|
12783
|
-
const g = globParts[ix];
|
|
12866
|
+
const g = globParts[ix]; // if we hit something that's not string, then we need a mm with just the strings
|
|
12867
|
+
// because a dir like "src" will not match "src/*"
|
|
12784
12868
|
|
|
12785
|
-
if (typeof s !== "string" &&
|
|
12869
|
+
if (typeof s !== "string" && iParts.length > 0) {
|
|
12786
12870
|
mms.push(new minimatch_1.default.Minimatch(iParts.join("/"), m0.options));
|
|
12787
12871
|
}
|
|
12788
12872
|
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12873
|
+
if (ix === set.length - 1) {
|
|
12874
|
+
mms.push(m0);
|
|
12875
|
+
break;
|
|
12876
|
+
} else {
|
|
12877
|
+
iParts.push(g);
|
|
12794
12878
|
|
|
12879
|
+
if (typeof s !== "string") {
|
|
12880
|
+
mms.push(new minimatch_1.default.Minimatch(iParts.join("/"), m0.options));
|
|
12881
|
+
}
|
|
12882
|
+
}
|
|
12795
12883
|
|
|
12796
12884
|
if (s === GLOBSTAR) {
|
|
12797
|
-
|
|
12885
|
+
// a pattern ending in GLOBSTAR will match anything
|
|
12886
|
+
break;
|
|
12798
12887
|
}
|
|
12799
12888
|
}
|
|
12800
12889
|
|
|
12801
|
-
mms.push(m0);
|
|
12802
12890
|
return patterns;
|
|
12803
12891
|
}
|
|
12804
12892
|
|
|
12805
12893
|
exports.deconstructMM = deconstructMM;
|
|
12894
|
+
/**
|
|
12895
|
+
* check that a path matches against a list of minimatch patterns
|
|
12896
|
+
*
|
|
12897
|
+
* @param fullPath
|
|
12898
|
+
* @param patterns
|
|
12899
|
+
* @returns the first pattern that match or false
|
|
12900
|
+
*/
|
|
12901
|
+
|
|
12902
|
+
function checkMmMatch(fullPath, patterns) {
|
|
12903
|
+
return !lodash_1.default.isEmpty(patterns) && patterns.find(patternMm => patternMm.match(fullPath));
|
|
12904
|
+
}
|
|
12905
|
+
|
|
12906
|
+
exports.checkMmMatch = checkMmMatch;
|
|
12907
|
+
/**
|
|
12908
|
+
* Take a full path and match each level of it to a list of minimatch patterns
|
|
12909
|
+
*
|
|
12910
|
+
* @param path
|
|
12911
|
+
* @param mms
|
|
12912
|
+
* @returns
|
|
12913
|
+
*/
|
|
12914
|
+
|
|
12915
|
+
function unrollMmMatch(path, mms) {
|
|
12916
|
+
const parts = path.split("/");
|
|
12917
|
+
let rp;
|
|
12918
|
+
|
|
12919
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
12920
|
+
rp = rp !== undefined ? rp + "/" + parts[i] : parts[i];
|
|
12921
|
+
const m1 = checkMmMatch(`${rp}/`, mms);
|
|
12922
|
+
|
|
12923
|
+
if (m1) {
|
|
12924
|
+
return m1;
|
|
12925
|
+
}
|
|
12926
|
+
}
|
|
12927
|
+
|
|
12928
|
+
return checkMmMatch(path, mms);
|
|
12929
|
+
}
|
|
12930
|
+
|
|
12931
|
+
exports.unrollMmMatch = unrollMmMatch;
|
|
12806
12932
|
|
|
12807
12933
|
/***/ }),
|
|
12808
12934
|
|
|
12809
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
12935
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.14-fynlocal_h/@fynpo/base/dist/util.js":
|
|
12810
12936
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12811
12937
|
|
|
12812
12938
|
"use strict";
|