fyn 1.1.23 → 1.1.26

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.
Files changed (2) hide show
  1. package/dist/fyn.js +398 -91
  2. package/package.json +4 -4
package/dist/fyn.js CHANGED
@@ -2471,7 +2471,7 @@ const {
2471
2471
  AggregateError
2472
2472
  } = __webpack_require__("./node_modules/.f/_/@jchip/error/1.0.3/@jchip/error/dist/index.js");
2473
2473
 
2474
- const filterScanDir = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.0/filter-scan-dir/lib/index.js");
2474
+ const filterScanDir = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/lib/index.js");
2475
2475
 
2476
2476
  const Crypto = __webpack_require__("crypto");
2477
2477
  /**
@@ -5753,7 +5753,7 @@ const {
5753
5753
  const {
5754
5754
  getDepSection,
5755
5755
  makeDepStep
5756
- } = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/index.js");
5756
+ } = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/index.js");
5757
5757
 
5758
5758
  const xaa = __webpack_require__("./lib/util/xaa.js");
5759
5759
 
@@ -8723,7 +8723,7 @@ const {
8723
8723
 
8724
8724
  const {
8725
8725
  PackageRef
8726
- } = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/index.js");
8726
+ } = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/index.js");
8727
8727
 
8728
8728
  const WATCH_TIME = 5000; // consider meta cache stale after this much time (30 minutes)
8729
8729
 
@@ -9739,7 +9739,7 @@ const {
9739
9739
  const {
9740
9740
  FynpoConfigManager,
9741
9741
  FynpoDepGraph
9742
- } = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/index.js");
9742
+ } = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/index.js");
9743
9743
  /* eslint-disable no-magic-numbers, max-statements, no-empty, complexity, no-eval */
9744
9744
 
9745
9745
 
@@ -11170,7 +11170,7 @@ const Path = __webpack_require__("path");
11170
11170
 
11171
11171
  const mm = __webpack_require__("./node_modules/.f/_/minimatch/3.0.4/minimatch/minimatch.js");
11172
11172
 
11173
- const filterScanDir = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.0/filter-scan-dir/lib/index.js");
11173
+ const filterScanDir = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/lib/index.js");
11174
11174
 
11175
11175
  async function _scanFileStats(dir, ignores, baseDir = "") {
11176
11176
  const ignore = fullPath => ignores.find(pattern => mm(fullPath, pattern, {
@@ -11237,7 +11237,257 @@ module.exports = __webpack_require__("./node_modules/.f/_/xaa/1.7.0/xaa/dist/xaa
11237
11237
 
11238
11238
  /***/ }),
11239
11239
 
11240
- /***/ "./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/fynpo-config.js":
11240
+ /***/ "./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/caching.js":
11241
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11242
+
11243
+ "use strict";
11244
+
11245
+
11246
+ Object.defineProperty(exports, "__esModule", ({
11247
+ value: true
11248
+ }));
11249
+ exports.processOutput = exports.processLifecycleInput = exports.processInput = void 0;
11250
+
11251
+ const tslib_1 = __webpack_require__("./node_modules/.f/_/tslib/2.1.0/tslib/tslib.es6.js");
11252
+
11253
+ const filter_scan_dir_1 = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/lib/index.js");
11254
+
11255
+ const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/minimatch/3.0.4/minimatch/minimatch.js"));
11256
+ const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
11257
+ const fs_1 = (0, tslib_1.__importDefault)(__webpack_require__("fs"));
11258
+ const path_1 = (0, tslib_1.__importDefault)(__webpack_require__("path"));
11259
+ const crypto_1 = (0, tslib_1.__importDefault)(__webpack_require__("crypto"));
11260
+ /**
11261
+ * create a sha256 hash for some data
11262
+ *
11263
+ * @param data
11264
+ * @returns
11265
+ */
11266
+
11267
+ function hashData1(data, encoding = "base64url") {
11268
+ return crypto_1.default.createHash("sha256").update(data).digest(encoding);
11269
+ }
11270
+
11271
+ function hashData2(data, encoding = "base64url") {
11272
+ if (encoding === "base64url") {
11273
+ return hashData1(data, "base64").replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
11274
+ }
11275
+
11276
+ return crypto_1.default.createHash("sha256").update(data).digest(encoding);
11277
+ }
11278
+
11279
+ const hashData = typeof crypto_1.default.createHash("sha256").digest("base64url") === "string" ? hashData1 : hashData2;
11280
+ /**
11281
+ * generate sha256 has of a file
11282
+ *
11283
+ * @param filename
11284
+ * @returns
11285
+ */
11286
+
11287
+ async function hashFile(filename, encoding = "base64url") {
11288
+ const data = await fs_1.default.promises.readFile(filename);
11289
+ const hash = hashData(data, encoding);
11290
+ return hash;
11291
+ }
11292
+ /**
11293
+ * generate hash for an array of files
11294
+ *
11295
+ * @param files
11296
+ * @returns object with each file point to its hash
11297
+ */
11298
+
11299
+
11300
+ async function hashFiles(cwd, files, encoding = "base64url") {
11301
+ const hashes = {};
11302
+ const promises = [];
11303
+
11304
+ for (const file of files) {
11305
+ promises.push(hashFile(path_1.default.join(cwd, file), encoding).then(h => hashes[file] = h));
11306
+ }
11307
+
11308
+ await Promise.all(promises);
11309
+ const result = {};
11310
+
11311
+ for (const file of files) {
11312
+ result[file] = hashes[file];
11313
+ }
11314
+
11315
+ return result;
11316
+ }
11317
+ /**
11318
+ *
11319
+ * @param cwd
11320
+ * @returns
11321
+ */
11322
+
11323
+
11324
+ async function readPackageJson(cwd) {
11325
+ return JSON.parse(await fs_1.default.promises.readFile(path_1.default.join(cwd, "package.json"), "utf-8"));
11326
+ }
11327
+ /**
11328
+ * Convert minimatch string patterns to Minimatch instances
11329
+ *
11330
+ * @param patterns
11331
+ * @returns
11332
+ */
11333
+
11334
+
11335
+ function makeMmPatterns(patterns, options = {
11336
+ dot: true
11337
+ }) {
11338
+ return [].concat(patterns).map(x => x && new minimatch_1.default.Minimatch(x, options)).filter(x => x);
11339
+ }
11340
+ /**
11341
+ *
11342
+ * @param fullPath
11343
+ * @param patterns
11344
+ * @returns
11345
+ */
11346
+
11347
+
11348
+ function checkMmMatch(fullPath, patterns) {
11349
+ return !lodash_1.default.isEmpty(patterns) && patterns.find(patternMm => patternMm.match(fullPath));
11350
+ }
11351
+ /**
11352
+ * Scan for files using include and exclude patterns
11353
+ *
11354
+ * @param cwd
11355
+ * @param input
11356
+ * @returns
11357
+ */
11358
+
11359
+
11360
+ async function scanFiles(cwd, includes, excludes) {
11361
+ const filter = (_file, _path, extras) => {
11362
+ if (!checkMmMatch(extras.dirFile, includes) || checkMmMatch(extras.dirFile, excludes)) {
11363
+ return false;
11364
+ }
11365
+
11366
+ return true;
11367
+ };
11368
+
11369
+ return (await (0, filter_scan_dir_1.filterScanDir)({
11370
+ cwd,
11371
+ filter,
11372
+ filterDir: filter,
11373
+ fullStat: false,
11374
+ concurrency: 500
11375
+ })).sort();
11376
+ }
11377
+
11378
+ async function processInput({
11379
+ cwd,
11380
+ input,
11381
+ packageJson,
11382
+ extra
11383
+ } = {
11384
+ input: {}
11385
+ }) {
11386
+ const files = await scanFiles(cwd, makeMmPatterns(input.include), makeMmPatterns(input.exclude));
11387
+ const fileHashes = await hashFiles(cwd, files);
11388
+ const data = {
11389
+ env: lodash_1.default.pick(process.env, input.includeEnv),
11390
+ versions: lodash_1.default.pick(process.versions, input.includeVersions),
11391
+ npmScripts: lodash_1.default.pick(lodash_1.default.get(packageJson || (await readPackageJson(cwd)), "scripts"), input.npmScripts),
11392
+ fileHashes,
11393
+ extra: extra || "" // additional data
11394
+
11395
+ };
11396
+ const hash = hashData(JSON.stringify(data));
11397
+ return {
11398
+ files,
11399
+ data,
11400
+ hash
11401
+ };
11402
+ }
11403
+
11404
+ exports.processInput = processInput;
11405
+ /**
11406
+ *
11407
+ * @param param0
11408
+ * @returns
11409
+ */
11410
+
11411
+ async function processLifecycleInput({
11412
+ cwd,
11413
+ input,
11414
+ packageJson
11415
+ } = {
11416
+ input: {}
11417
+ }) {
11418
+ packageJson = packageJson || (await readPackageJson(cwd));
11419
+ const npmScripts = lodash_1.default.pick(lodash_1.default.get(packageJson, "scripts"), input.npmScripts);
11420
+
11421
+ if (lodash_1.default.isEmpty(npmScripts)) {
11422
+ return {};
11423
+ }
11424
+
11425
+ return await processInput({
11426
+ cwd,
11427
+ input,
11428
+ packageJson
11429
+ });
11430
+ }
11431
+
11432
+ exports.processLifecycleInput = processLifecycleInput;
11433
+ /**
11434
+ * Process build cache output file config.
11435
+ *
11436
+ * @param param0
11437
+ * @returns
11438
+ */
11439
+
11440
+ async function processOutput({
11441
+ cwd,
11442
+ inputHash,
11443
+ calcHash,
11444
+ output,
11445
+ preFiles
11446
+ } = {
11447
+ output: {}
11448
+ }) {
11449
+ const mmIncludes = makeMmPatterns(output.include);
11450
+ const mmExcludes = makeMmPatterns(output.exclude);
11451
+ const files = await scanFiles(cwd, mmIncludes, mmExcludes);
11452
+ preFiles = [].concat(preFiles).filter(x => {
11453
+ if (!x || checkMmMatch(x, mmExcludes)) {
11454
+ return false;
11455
+ }
11456
+
11457
+ return true;
11458
+ }).map(x => x.replace(`${cwd}${path_1.default.sep}`, ""));
11459
+ let hash = "";
11460
+ let fileHashes = {};
11461
+ const allFiles = lodash_1.default.uniq(files.concat(preFiles)).sort();
11462
+ let data = {
11463
+ inputHash,
11464
+ fileHashes
11465
+ }; //
11466
+
11467
+ if (calcHash) {
11468
+ fileHashes = await hashFiles(cwd, allFiles);
11469
+ data = {
11470
+ inputHash,
11471
+ fileHashes
11472
+ };
11473
+ hash = hashData(JSON.stringify(data));
11474
+ } //
11475
+
11476
+
11477
+ return {
11478
+ files: allFiles,
11479
+ data,
11480
+ hash,
11481
+ access: Date.now(),
11482
+ create: Date.now()
11483
+ };
11484
+ }
11485
+
11486
+ exports.processOutput = processOutput;
11487
+
11488
+ /***/ }),
11489
+
11490
+ /***/ "./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/fynpo-config.js":
11241
11491
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11242
11492
 
11243
11493
  "use strict";
@@ -11387,7 +11637,7 @@ exports.FynpoConfigManager = FynpoConfigManager;
11387
11637
 
11388
11638
  /***/ }),
11389
11639
 
11390
- /***/ "./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js":
11640
+ /***/ "./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js":
11391
11641
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11392
11642
 
11393
11643
  "use strict";
@@ -11411,14 +11661,15 @@ const path_1 = (0, tslib_1.__importDefault)(__webpack_require__("path"));
11411
11661
 
11412
11662
  const fs_1 = __webpack_require__("fs");
11413
11663
 
11414
- const filter_scan_dir_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.0/filter-scan-dir/lib/index.js"));
11664
+ const filter_scan_dir_1 = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/lib/index.js");
11665
+
11415
11666
  const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/minimatch/3.0.4/minimatch/minimatch.js"));
11416
11667
  const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
11417
11668
  const semver_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/semver/7.3.5/semver/index.js"));
11418
11669
 
11419
- const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
11670
+ const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
11420
11671
 
11421
- const util_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/util.js");
11672
+ const util_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/util.js");
11422
11673
 
11423
11674
  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"));
11424
11675
  const DepSectionMap = {
@@ -11733,9 +11984,10 @@ class FynpoDepGraph {
11733
11984
  const files = [];
11734
11985
 
11735
11986
  for (const prefix in groups) {
11736
- const scanned = await (0, filter_scan_dir_1.default)({
11987
+ const scanned = await (0, filter_scan_dir_1.filterScanDir)({
11737
11988
  cwd,
11738
11989
  prefix,
11990
+ concurrency: 500,
11739
11991
  filter: (file, path) => {
11740
11992
  if (path && path !== "." && file === "package.json") {
11741
11993
  if (foundInAutoSearch(path)) {
@@ -11767,7 +12019,7 @@ class FynpoDepGraph {
11767
12019
  files.push(scanned);
11768
12020
  }
11769
12021
 
11770
- const allFiles = [].concat(...files); // Read each package.json and generate PackageInfo for it
12022
+ const allFiles = [].concat(...files).sort(); // Read each package.json and generate PackageInfo for it
11771
12023
 
11772
12024
  for (const pkgFile of allFiles) {
11773
12025
  await this.addPackageByFile(pkgFile);
@@ -12138,7 +12390,7 @@ exports.FynpoDepGraph = FynpoDepGraph;
12138
12390
 
12139
12391
  /***/ }),
12140
12392
 
12141
- /***/ "./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/index.js":
12393
+ /***/ "./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/index.js":
12142
12394
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12143
12395
 
12144
12396
  "use strict";
@@ -12147,7 +12399,7 @@ exports.FynpoDepGraph = FynpoDepGraph;
12147
12399
  Object.defineProperty(exports, "__esModule", ({
12148
12400
  value: true
12149
12401
  }));
12150
- exports.makePkgDeps = exports.readFynpoPackages = void 0;
12402
+ exports.makePkgDeps = exports.readFynpoPackages = exports.caching = void 0;
12151
12403
 
12152
12404
  const tslib_1 = __webpack_require__("./node_modules/.f/_/tslib/2.1.0/tslib/tslib.es6.js");
12153
12405
 
@@ -12155,15 +12407,17 @@ const path_1 = (0, tslib_1.__importDefault)(__webpack_require__("path"));
12155
12407
 
12156
12408
  const fs_1 = __webpack_require__("fs");
12157
12409
 
12158
- const filter_scan_dir_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.0/filter-scan-dir/lib/index.js"));
12410
+ const filter_scan_dir_1 = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/lib/index.js");
12411
+
12159
12412
  const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/minimatch/3.0.4/minimatch/minimatch.js"));
12160
12413
  const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
12161
12414
 
12162
- const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
12415
+ const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
12163
12416
 
12164
- (0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js"), exports);
12165
- (0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/fynpo-config.js"), exports);
12166
- (0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/util.js"), exports);
12417
+ (0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js"), exports);
12418
+ (0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/fynpo-config.js"), exports);
12419
+ (0, tslib_1.__exportStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/util.js"), exports);
12420
+ exports.caching = (0, tslib_1.__importStar)(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/caching.js"));
12167
12421
  /**
12168
12422
  * Take an array of packages and figure out their dependencies on each other
12169
12423
  *
@@ -12279,9 +12533,10 @@ async function readFynpoPackages({
12279
12533
  const files = [];
12280
12534
 
12281
12535
  for (const prefix in groups) {
12282
- files.push(await (0, filter_scan_dir_1.default)({
12536
+ files.push(await (0, filter_scan_dir_1.filterScanDir)({
12283
12537
  cwd,
12284
12538
  prefix,
12539
+ concurrency: 500,
12285
12540
  filter: f => f === "package.json",
12286
12541
  filterDir: (dir, _p, extras) => {
12287
12542
  if (dir !== "node_modules") {
@@ -12293,7 +12548,7 @@ async function readFynpoPackages({
12293
12548
  }));
12294
12549
  }
12295
12550
 
12296
- const allFiles = [].concat(...files);
12551
+ const allFiles = [].concat(...files).sort();
12297
12552
  const allPkgs = {};
12298
12553
 
12299
12554
  for (const pkgFile of allFiles) {
@@ -12418,7 +12673,7 @@ exports.makePkgDeps = makePkgDeps;
12418
12673
 
12419
12674
  /***/ }),
12420
12675
 
12421
- /***/ "./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/minimatch-group.js":
12676
+ /***/ "./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/minimatch-group.js":
12422
12677
  /***/ ((__unused_webpack_module, exports) => {
12423
12678
 
12424
12679
  "use strict";
@@ -12464,7 +12719,7 @@ exports.groupMM = groupMM;
12464
12719
 
12465
12720
  /***/ }),
12466
12721
 
12467
- /***/ "./node_modules/.f/_/@fynpo/base/1.1.7-fynlocal_h/@fynpo/base/dist/util.js":
12722
+ /***/ "./node_modules/.f/_/@fynpo/base/1.1.10-fynlocal_h/@fynpo/base/dist/util.js":
12468
12723
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12469
12724
 
12470
12725
  "use strict";
@@ -41701,7 +41956,7 @@ function entries(obj) {
41701
41956
 
41702
41957
  /***/ }),
41703
41958
 
41704
- /***/ "./node_modules/.f/_/filter-scan-dir/1.5.0/filter-scan-dir/dist/filter-scan-dir.js":
41959
+ /***/ "./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/dist/index.js":
41705
41960
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
41706
41961
 
41707
41962
  "use strict";
@@ -41725,6 +41980,19 @@ const path_1 = __importDefault(__webpack_require__("path"));
41725
41980
 
41726
41981
  const util_1 = __importDefault(__webpack_require__("util"));
41727
41982
 
41983
+ const util_2 = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/dist/util.js");
41984
+ /**
41985
+ * create a new ExtrasData object
41986
+ *
41987
+ * @param file
41988
+ * @param fullFile
41989
+ * @param path
41990
+ * @param stat
41991
+ * @param options
41992
+ * @returns
41993
+ */
41994
+
41995
+
41728
41996
  function makeExtrasData(file, fullFile, path, stat, options) {
41729
41997
  const dirFile = options._join2(path, file);
41730
41998
 
@@ -41845,29 +42113,6 @@ function getResult(options) {
41845
42113
  files: []
41846
42114
  }, options.result) : options.result.files || [];
41847
42115
  }
41848
- /**
41849
- * compare Dirent for sorting
41850
- *
41851
- * @param a
41852
- * @param b
41853
- * @returns
41854
- */
41855
-
41856
-
41857
- const direntCmp = (a, b) => {
41858
- /* istanbul ignore next */
41859
- if (a.name === b.name) {
41860
- /* istanbul ignore next */
41861
- return 0;
41862
- /* istanbul ignore next */
41863
- } else if (a.name > b.name) {
41864
- /* istanbul ignore next */
41865
- return 1;
41866
- } else {
41867
- /* istanbul ignore next */
41868
- return -1;
41869
- }
41870
- };
41871
42116
  /**
41872
42117
  * sync version of directory walk
41873
42118
  *
@@ -41888,7 +42133,7 @@ function walkSync(path, options, level = 0) {
41888
42133
  if (options.fullStat) {
41889
42134
  files = files.sort();
41890
42135
  } else {
41891
- files = files.sort(direntCmp);
42136
+ files = files.sort(util_2.direntCmp);
41892
42137
  }
41893
42138
  }
41894
42139
 
@@ -41962,7 +42207,7 @@ async function walk(path, options, level = 0) {
41962
42207
  if (options.fullStat) {
41963
42208
  files = files.sort();
41964
42209
  } else {
41965
- files = files.sort(direntCmp);
42210
+ files = files.sort(util_2.direntCmp);
41966
42211
  }
41967
42212
  }
41968
42213
 
@@ -42074,20 +42319,16 @@ function makeOptions(opts) {
42074
42319
  }; // `includeRoot` was renamed to `prependCwd`, this avoid breaking code still using that
42075
42320
 
42076
42321
 
42077
- const prependCwd = (options.hasOwnProperty("includeRoot") ? options.includeRoot : options.prependCwd) || false; // a simple and faster version of path.join that handles just 2
42078
- // arguments using posix separator
42079
-
42080
- const _join2 = (a, b) => a && b ? a + sep + b : a ? a : b; // eslint-disable-line
42081
-
42082
-
42322
+ const prependCwd = (options.hasOwnProperty("includeRoot") ? options.includeRoot : options.prependCwd) || false;
42083
42323
  const opts2 = Object.assign({
42084
- _join2,
42324
+ _join2: undefined,
42085
42325
  maxLevel: Infinity,
42086
42326
  prefix: "",
42087
42327
  prependCwd,
42088
42328
  fullStat: true,
42089
42329
  concurrency: 50,
42090
- readdirOpts: undefined
42330
+ readdirOpts: undefined,
42331
+ grouping: undefined
42091
42332
  }, options, {
42092
42333
  dir: cwd,
42093
42334
  result: {},
@@ -42095,6 +42336,7 @@ function makeOptions(opts) {
42095
42336
  filterExt: [].concat(options.filterExt).map(cleanExt).filter(x => x),
42096
42337
  _concurrentCount: 0
42097
42338
  });
42339
+ opts2._join2 = (0, util_2.makePathJoin2)(sep, opts2.dir, opts2.prefix);
42098
42340
 
42099
42341
  if (!opts2.fullStat) {
42100
42342
  opts2.readdirOpts = {
@@ -42104,12 +42346,6 @@ function makeOptions(opts) {
42104
42346
 
42105
42347
  return opts2;
42106
42348
  }
42107
- /**
42108
- * async version of filter scan dir
42109
- * @param options
42110
- * @returns
42111
- */
42112
-
42113
42349
 
42114
42350
  function filterScanDir(options = {}) {
42115
42351
  const options2 = makeOptions(options);
@@ -42117,7 +42353,6 @@ function filterScanDir(options = {}) {
42117
42353
  }
42118
42354
 
42119
42355
  exports.filterScanDir = filterScanDir;
42120
- /** sync version of filter scan dir */
42121
42356
 
42122
42357
  function filterScanDirSync(options = {}) {
42123
42358
  const options2 = makeOptions(options);
@@ -42128,10 +42363,82 @@ exports.filterScanDirSync = filterScanDirSync;
42128
42363
 
42129
42364
  /***/ }),
42130
42365
 
42131
- /***/ "./node_modules/.f/_/filter-scan-dir/1.5.0/filter-scan-dir/lib/index.js":
42366
+ /***/ "./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/dist/util.js":
42367
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
42368
+
42369
+ "use strict";
42370
+
42371
+
42372
+ var __importDefault = this && this.__importDefault || function (mod) {
42373
+ return mod && mod.__esModule ? mod : {
42374
+ "default": mod
42375
+ };
42376
+ };
42377
+
42378
+ Object.defineProperty(exports, "__esModule", ({
42379
+ value: true
42380
+ }));
42381
+ exports.makePathJoin2 = exports.direntCmp = void 0;
42382
+
42383
+ const path_1 = __importDefault(__webpack_require__("path"));
42384
+ /* @ignore */
42385
+
42386
+ /**
42387
+ * compare Dirent for sorting
42388
+ *
42389
+ * @param a
42390
+ * @param b
42391
+ * @returns
42392
+ * @ignore
42393
+ */
42394
+
42395
+
42396
+ const direntCmp = (a, b) => {
42397
+ if (a.name === b.name) {
42398
+ return 0;
42399
+ } else if (a.name > b.name) {
42400
+ return 1;
42401
+ } else {
42402
+ return -1;
42403
+ }
42404
+ };
42405
+
42406
+ exports.direntCmp = direntCmp;
42407
+ /**
42408
+ * Make a specialized and simple but faster version of path.join that handles just 2 args
42409
+ */
42410
+
42411
+ const makePathJoin2 = (sep, cwd, prefix) => {
42412
+ // user passed cwd or prefix that contains ../ or ..\\, which only path.join
42413
+ // can handle
42414
+ if (["../", "..\\"].find(s => cwd.includes(s) || prefix.includes(s)) || cwd.startsWith(".") && cwd.length > 1 || prefix.startsWith(".") && prefix.length > 1) {
42415
+ return path_1.default.join;
42416
+ }
42417
+
42418
+ return (a, b) => {
42419
+ if (a === ".") {
42420
+ return b || a;
42421
+ } else if (b === ".") {
42422
+ return a || b;
42423
+ } else if (a && b) {
42424
+ return a + sep + b;
42425
+ } else {
42426
+ return a || b || ".";
42427
+ }
42428
+ };
42429
+ };
42430
+
42431
+ exports.makePathJoin2 = makePathJoin2;
42432
+
42433
+ /***/ }),
42434
+
42435
+ /***/ "./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/lib/index.js":
42132
42436
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
42133
42437
 
42134
- const fsd = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.0/filter-scan-dir/dist/filter-scan-dir.js");
42438
+ "use strict";
42439
+
42440
+
42441
+ const fsd = __webpack_require__("./node_modules/.f/_/filter-scan-dir/1.5.5/filter-scan-dir/dist/index.js");
42135
42442
 
42136
42443
  const asyncApi = options => fsd.filterScanDir(options);
42137
42444
 
@@ -101619,7 +101926,7 @@ exports.chain = __webpack_require__("./node_modules/.f/_/slide/1.1.6/slide/lib/c
101619
101926
 
101620
101927
  /***/ }),
101621
101928
 
101622
- /***/ "./node_modules/.f/_/smart-buffer/4.1.0/smart-buffer/build/smartbuffer.js":
101929
+ /***/ "./node_modules/.f/_/smart-buffer/4.2.0/smart-buffer/build/smartbuffer.js":
101623
101930
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
101624
101931
 
101625
101932
  "use strict";
@@ -101629,7 +101936,7 @@ Object.defineProperty(exports, "__esModule", ({
101629
101936
  value: true
101630
101937
  }));
101631
101938
 
101632
- const utils_1 = __webpack_require__("./node_modules/.f/_/smart-buffer/4.1.0/smart-buffer/build/utils.js"); // The default Buffer size if one is not provided.
101939
+ const utils_1 = __webpack_require__("./node_modules/.f/_/smart-buffer/4.2.0/smart-buffer/build/utils.js"); // The default Buffer size if one is not provided.
101633
101940
 
101634
101941
 
101635
101942
  const DEFAULT_SMARTBUFFER_SIZE = 4096; // The default string encoding to use for reading/writing strings.
@@ -101664,7 +101971,7 @@ class SmartBuffer {
101664
101971
  } // Check for initial Buffer
101665
101972
 
101666
101973
  } else if (options.buff) {
101667
- if (options.buff instanceof Buffer) {
101974
+ if (Buffer.isBuffer(options.buff)) {
101668
101975
  this._buff = options.buff;
101669
101976
  this.length = options.buff.length;
101670
101977
  } else {
@@ -103065,7 +103372,7 @@ exports.SmartBuffer = SmartBuffer;
103065
103372
 
103066
103373
  /***/ }),
103067
103374
 
103068
- /***/ "./node_modules/.f/_/smart-buffer/4.1.0/smart-buffer/build/utils.js":
103375
+ /***/ "./node_modules/.f/_/smart-buffer/4.2.0/smart-buffer/build/utils.js":
103069
103376
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
103070
103377
 
103071
103378
  "use strict";
@@ -103413,7 +103720,7 @@ const debug_1 = __importDefault(__webpack_require__("./stubs/debug.js"));
103413
103720
 
103414
103721
  const agent_base_1 = __webpack_require__("./node_modules/.f/_/agent-base/6.0.2/agent-base/dist/src/index.js");
103415
103722
 
103416
- const socks_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.1/socks/build/index.js");
103723
+ const socks_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.2/socks/build/index.js");
103417
103724
 
103418
103725
  const debug = debug_1.default('socks-proxy-agent');
103419
103726
 
@@ -103700,7 +104007,7 @@ const net = __webpack_require__("net");
103700
104007
 
103701
104008
  const ip = __webpack_require__("./node_modules/.f/_/ip/1.1.5/ip/lib/ip.js");
103702
104009
 
103703
- const smart_buffer_1 = __webpack_require__("./node_modules/.f/_/smart-buffer/4.1.0/smart-buffer/build/smartbuffer.js");
104010
+ const smart_buffer_1 = __webpack_require__("./node_modules/.f/_/smart-buffer/4.2.0/smart-buffer/build/smartbuffer.js");
103704
104011
 
103705
104012
  const constants_1 = __webpack_require__("./node_modules/.f/_/socks/2.3.3/socks/build/common/constants.js");
103706
104013
 
@@ -104868,7 +105175,7 @@ __export(__webpack_require__("./node_modules/.f/_/socks/2.3.3/socks/build/client
104868
105175
 
104869
105176
  /***/ }),
104870
105177
 
104871
- /***/ "./node_modules/.f/_/socks/2.6.1/socks/build/client/socksclient.js":
105178
+ /***/ "./node_modules/.f/_/socks/2.6.2/socks/build/client/socksclient.js":
104872
105179
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
104873
105180
 
104874
105181
  "use strict";
@@ -104917,15 +105224,15 @@ const net = __webpack_require__("net");
104917
105224
 
104918
105225
  const ip = __webpack_require__("./node_modules/.f/_/ip/1.1.5/ip/lib/ip.js");
104919
105226
 
104920
- const smart_buffer_1 = __webpack_require__("./node_modules/.f/_/smart-buffer/4.1.0/smart-buffer/build/smartbuffer.js");
105227
+ const smart_buffer_1 = __webpack_require__("./node_modules/.f/_/smart-buffer/4.2.0/smart-buffer/build/smartbuffer.js");
104921
105228
 
104922
- const constants_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.1/socks/build/common/constants.js");
105229
+ const constants_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.2/socks/build/common/constants.js");
104923
105230
 
104924
- const helpers_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.1/socks/build/common/helpers.js");
105231
+ const helpers_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.2/socks/build/common/helpers.js");
104925
105232
 
104926
- const receivebuffer_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.1/socks/build/common/receivebuffer.js");
105233
+ const receivebuffer_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.2/socks/build/common/receivebuffer.js");
104927
105234
 
104928
- const util_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.1/socks/build/common/util.js");
105235
+ const util_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.2/socks/build/common/util.js");
104929
105236
 
104930
105237
  Object.defineProperty(exports, "SocksClientError", ({
104931
105238
  enumerable: true,
@@ -104939,7 +105246,7 @@ class SocksClient extends events_1.EventEmitter {
104939
105246
  super();
104940
105247
  this.options = Object.assign({}, options); // Validate SocksClientOptions
104941
105248
 
104942
- helpers_1.validateSocksClientOptions(options); // Default state
105249
+ (0, helpers_1.validateSocksClientOptions)(options); // Default state
104943
105250
 
104944
105251
  this.setState(constants_1.SocksClientState.Created);
104945
105252
  }
@@ -104957,7 +105264,7 @@ class SocksClient extends events_1.EventEmitter {
104957
105264
  return new Promise((resolve, reject) => {
104958
105265
  // Validate SocksClientOptions
104959
105266
  try {
104960
- helpers_1.validateSocksClientOptions(options, ['connect']);
105267
+ (0, helpers_1.validateSocksClientOptions)(options, ['connect']);
104961
105268
  } catch (err) {
104962
105269
  if (typeof callback === 'function') {
104963
105270
  callback(err);
@@ -105007,7 +105314,7 @@ class SocksClient extends events_1.EventEmitter {
105007
105314
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
105008
105315
  // Validate SocksClientChainOptions
105009
105316
  try {
105010
- helpers_1.validateSocksClientChainOptions(options);
105317
+ (0, helpers_1.validateSocksClientChainOptions)(options);
105011
105318
  } catch (err) {
105012
105319
  if (typeof callback === 'function') {
105013
105320
  callback(err);
@@ -105020,7 +105327,7 @@ class SocksClient extends events_1.EventEmitter {
105020
105327
  let sock; // Shuffle proxies
105021
105328
 
105022
105329
  if (options.randomizeChain) {
105023
- util_1.shuffleArray(options.proxies);
105330
+ (0, util_1.shuffleArray)(options.proxies);
105024
105331
  }
105025
105332
 
105026
105333
  try {
@@ -105029,7 +105336,7 @@ class SocksClient extends events_1.EventEmitter {
105029
105336
  const nextProxy = options.proxies[i]; // If we've reached the last proxy in the chain, the destination is the actual destination, otherwise it's the next proxy.
105030
105337
 
105031
105338
  const nextDestination = i === options.proxies.length - 1 ? options.destination : {
105032
- host: options.proxies[i + 1].ipaddress,
105339
+ host: options.proxies[i + 1].host || options.proxies[i + 1].ipaddress,
105033
105340
  port: options.proxies[i + 1].port
105034
105341
  }; // Creates the next connection in the chain.
105035
105342
 
@@ -105770,7 +106077,7 @@ exports.SocksClient = SocksClient;
105770
106077
 
105771
106078
  /***/ }),
105772
106079
 
105773
- /***/ "./node_modules/.f/_/socks/2.6.1/socks/build/common/constants.js":
106080
+ /***/ "./node_modules/.f/_/socks/2.6.2/socks/build/common/constants.js":
105774
106081
  /***/ ((__unused_webpack_module, exports) => {
105775
106082
 
105776
106083
  "use strict";
@@ -105906,7 +106213,7 @@ exports.SocksClientState = SocksClientState;
105906
106213
 
105907
106214
  /***/ }),
105908
106215
 
105909
- /***/ "./node_modules/.f/_/socks/2.6.1/socks/build/common/helpers.js":
106216
+ /***/ "./node_modules/.f/_/socks/2.6.2/socks/build/common/helpers.js":
105910
106217
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
105911
106218
 
105912
106219
  "use strict";
@@ -105917,9 +106224,9 @@ Object.defineProperty(exports, "__esModule", ({
105917
106224
  }));
105918
106225
  exports.validateSocksClientChainOptions = exports.validateSocksClientOptions = void 0;
105919
106226
 
105920
- const util_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.1/socks/build/common/util.js");
106227
+ const util_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.2/socks/build/common/util.js");
105921
106228
 
105922
- const constants_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.1/socks/build/common/constants.js");
106229
+ const constants_1 = __webpack_require__("./node_modules/.f/_/socks/2.6.2/socks/build/common/constants.js");
105923
106230
 
105924
106231
  const stream = __webpack_require__("stream");
105925
106232
  /**
@@ -106055,7 +106362,7 @@ function isValidTimeoutValue(value) {
106055
106362
 
106056
106363
  /***/ }),
106057
106364
 
106058
- /***/ "./node_modules/.f/_/socks/2.6.1/socks/build/common/receivebuffer.js":
106365
+ /***/ "./node_modules/.f/_/socks/2.6.2/socks/build/common/receivebuffer.js":
106059
106366
  /***/ ((__unused_webpack_module, exports) => {
106060
106367
 
106061
106368
  "use strict";
@@ -106118,7 +106425,7 @@ exports.ReceiveBuffer = ReceiveBuffer;
106118
106425
 
106119
106426
  /***/ }),
106120
106427
 
106121
- /***/ "./node_modules/.f/_/socks/2.6.1/socks/build/common/util.js":
106428
+ /***/ "./node_modules/.f/_/socks/2.6.2/socks/build/common/util.js":
106122
106429
  /***/ ((__unused_webpack_module, exports) => {
106123
106430
 
106124
106431
  "use strict";
@@ -106158,7 +106465,7 @@ exports.shuffleArray = shuffleArray;
106158
106465
 
106159
106466
  /***/ }),
106160
106467
 
106161
- /***/ "./node_modules/.f/_/socks/2.6.1/socks/build/index.js":
106468
+ /***/ "./node_modules/.f/_/socks/2.6.2/socks/build/index.js":
106162
106469
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
106163
106470
 
106164
106471
  "use strict";
@@ -106185,7 +106492,7 @@ Object.defineProperty(exports, "__esModule", ({
106185
106492
  value: true
106186
106493
  }));
106187
106494
 
106188
- __exportStar(__webpack_require__("./node_modules/.f/_/socks/2.6.1/socks/build/client/socksclient.js"), exports);
106495
+ __exportStar(__webpack_require__("./node_modules/.f/_/socks/2.6.2/socks/build/client/socksclient.js"), exports);
106189
106496
 
106190
106497
  /***/ }),
106191
106498
 
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "fyn",
3
- "version": "1.1.23",
4
- "description": "A node package manager, fast, workspace, and better productivity and efficiency",
3
+ "version": "1.1.26",
4
+ "description": "The package manager for fynpo, a zero setup monorepo manager",
5
5
  "main": "./bin/fyn.js",
6
- "homepage": "https://www.electrode.io/fynpo/",
6
+ "homepage": "https://jchip.github.io/fynpo/",
7
7
  "license": "Apache-2.0",
8
8
  "scripts": {
9
9
  "test": "xrun xarc/test-only",
@@ -62,7 +62,7 @@
62
62
  ],
63
63
  "repository": {
64
64
  "type": "git",
65
- "url": "https://github.com/electrode-io/fynpo.git",
65
+ "url": "https://github.com/jchip/fynpo.git",
66
66
  "directory": "packages/fyn"
67
67
  },
68
68
  "contributors": [