fyn 1.1.29 → 1.1.30

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 +85 -7
  2. package/package.json +1 -1
package/dist/fyn.js CHANGED
@@ -11266,6 +11266,8 @@ const lodash_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_module
11266
11266
  const fs_1 = (0, tslib_1.__importDefault)(__webpack_require__("fs"));
11267
11267
  const path_1 = (0, tslib_1.__importDefault)(__webpack_require__("path"));
11268
11268
  const crypto_1 = (0, tslib_1.__importDefault)(__webpack_require__("crypto"));
11269
+
11270
+ const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
11269
11271
  /**
11270
11272
  * create a sha256 hash for some data
11271
11273
  *
@@ -11273,6 +11275,7 @@ const crypto_1 = (0, tslib_1.__importDefault)(__webpack_require__("crypto"));
11273
11275
  * @returns
11274
11276
  */
11275
11277
 
11278
+
11276
11279
  function hashData1(data, encoding = "base64url") {
11277
11280
  return crypto_1.default.createHash("sha256").update(data).digest(encoding);
11278
11281
  }
@@ -11375,14 +11378,39 @@ async function scanFiles(cwd, includes, excludes) {
11375
11378
  return true;
11376
11379
  };
11377
11380
 
11381
+ const dirIncludes = includes.map(mx => (0, minimatch_group_1.deconstructMM)(mx));
11382
+
11383
+ const filterDir = (_file, _path, extras) => {
11384
+ const inc = dirIncludes.find(di => checkMmMatch(extras.dirFile, di.mms));
11385
+
11386
+ if (!inc) {
11387
+ return false;
11388
+ }
11389
+
11390
+ const exc = checkMmMatch(extras.dirFile, excludes);
11391
+
11392
+ if (exc) {
11393
+ return false;
11394
+ }
11395
+
11396
+ return true;
11397
+ };
11398
+
11378
11399
  return (await (0, filter_scan_dir_1.filterScanDir)({
11379
11400
  cwd,
11380
11401
  filter,
11381
- filterDir: filter,
11402
+ filterDir,
11382
11403
  fullStat: false,
11383
11404
  concurrency: 500
11384
11405
  })).sort();
11385
11406
  }
11407
+ /**
11408
+ * process caching input rules and return result from it
11409
+ *
11410
+ * @param param0
11411
+ * @returns result from processing input rules
11412
+ */
11413
+
11386
11414
 
11387
11415
  async function processInput({
11388
11416
  cwd,
@@ -11392,7 +11420,7 @@ async function processInput({
11392
11420
  } = {
11393
11421
  input: {}
11394
11422
  }) {
11395
- const files = await scanFiles(cwd, makeMmPatterns(input.include), makeMmPatterns(input.exclude));
11423
+ const files = await scanFiles(cwd, makeMmPatterns(input.include, input.minimatchOptions), makeMmPatterns(input.exclude, input.minimatchOptions));
11396
11424
  const fileHashes = await hashFiles(cwd, files);
11397
11425
  const data = {
11398
11426
  env: lodash_1.default.pick(process.env, input.includeEnv),
@@ -11412,6 +11440,7 @@ async function processInput({
11412
11440
 
11413
11441
  exports.processInput = processInput;
11414
11442
  /**
11443
+ * process lifecycle caching input rules
11415
11444
  *
11416
11445
  * @param param0
11417
11446
  * @returns
@@ -11440,7 +11469,7 @@ async function processLifecycleInput({
11440
11469
 
11441
11470
  exports.processLifecycleInput = processLifecycleInput;
11442
11471
  /**
11443
- * Process build cache output file config.
11472
+ * Process build cache output rules.
11444
11473
  *
11445
11474
  * @param param0
11446
11475
  * @returns
@@ -11455,8 +11484,8 @@ async function processOutput({
11455
11484
  } = {
11456
11485
  output: {}
11457
11486
  }) {
11458
- const mmIncludes = makeMmPatterns(output.include);
11459
- const mmExcludes = makeMmPatterns(output.exclude);
11487
+ const mmIncludes = makeMmPatterns(output.include, output.minimatchOptions);
11488
+ const mmExcludes = makeMmPatterns(output.exclude, output.minimatchOptions);
11460
11489
  const files = await scanFiles(cwd, mmIncludes, mmExcludes);
11461
11490
  preFiles = [].concat(preFiles).filter(x => {
11462
11491
  if (!x || checkMmMatch(x, mmExcludes)) {
@@ -12683,7 +12712,7 @@ exports.makePkgDeps = makePkgDeps;
12683
12712
  /***/ }),
12684
12713
 
12685
12714
  /***/ "./node_modules/.f/_/@fynpo/base/1.1.12-fynlocal_h/@fynpo/base/dist/minimatch-group.js":
12686
- /***/ ((__unused_webpack_module, exports) => {
12715
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12687
12716
 
12688
12717
  "use strict";
12689
12718
 
@@ -12691,7 +12720,11 @@ exports.makePkgDeps = makePkgDeps;
12691
12720
  Object.defineProperty(exports, "__esModule", ({
12692
12721
  value: true
12693
12722
  }));
12694
- exports.groupMM = void 0;
12723
+ exports.deconstructMM = exports.groupMM = void 0;
12724
+
12725
+ const tslib_1 = __webpack_require__("./node_modules/.f/_/tslib/2.1.0/tslib/tslib.es6.js");
12726
+
12727
+ const minimatch_1 = (0, tslib_1.__importDefault)(__webpack_require__("./node_modules/.f/_/minimatch/3.0.4/minimatch/minimatch.js"));
12695
12728
  /**
12696
12729
  * process a list of minimatch objects and group them by the string prefix of their patterns
12697
12730
  *
@@ -12725,6 +12758,51 @@ function groupMM(mms, groups) {
12725
12758
  }
12726
12759
 
12727
12760
  exports.groupMM = groupMM;
12761
+ /**
12762
+ * process a minimatch pattern to group them for matching directories
12763
+ *
12764
+ * - needs to create a new pattern at every non-string part
12765
+ * @param pattern
12766
+ */
12767
+
12768
+ function deconstructMM(m0) {
12769
+ const mms = [];
12770
+ const patterns = {
12771
+ m0,
12772
+ mms
12773
+ };
12774
+ const set = m0.set[0];
12775
+ const globParts = m0.globParts[0];
12776
+ const iParts = [];
12777
+ const {
12778
+ GLOBSTAR
12779
+ } = minimatch_1.default;
12780
+
12781
+ for (let ix = 0; ix < set.length - 1; ix++) {
12782
+ const s = set[ix];
12783
+ const g = globParts[ix];
12784
+
12785
+ if (typeof s !== "string" && s !== GLOBSTAR && iParts.length > 0) {
12786
+ mms.push(new minimatch_1.default.Minimatch(iParts.join("/"), m0.options));
12787
+ }
12788
+
12789
+ iParts.push(g);
12790
+
12791
+ if (typeof s !== "string") {
12792
+ mms.push(new minimatch_1.default.Minimatch(iParts.join("/"), m0.options));
12793
+ } // a pattern ending in GLOBSTAR will match anything
12794
+
12795
+
12796
+ if (s === GLOBSTAR) {
12797
+ return patterns;
12798
+ }
12799
+ }
12800
+
12801
+ mms.push(m0);
12802
+ return patterns;
12803
+ }
12804
+
12805
+ exports.deconstructMM = deconstructMM;
12728
12806
 
12729
12807
  /***/ }),
12730
12808
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fyn",
3
- "version": "1.1.29",
3
+ "version": "1.1.30",
4
4
  "description": "The package manager for fynpo, a zero setup monorepo manager",
5
5
  "main": "./bin/fyn.js",
6
6
  "homepage": "https://jchip.github.io/fynpo/",