fyn 2.0.1 → 2.0.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/fyn.js +74 -54
- package/package.json +1 -1
package/dist/fyn.js
CHANGED
|
@@ -3091,7 +3091,7 @@ const {
|
|
|
3091
3091
|
} = __webpack_require__("./lib/util/fyntil.js");
|
|
3092
3092
|
|
|
3093
3093
|
const {
|
|
3094
|
-
|
|
3094
|
+
cloneFile,
|
|
3095
3095
|
copyFile
|
|
3096
3096
|
} = __webpack_require__("./lib/util/hard-link-dir.js");
|
|
3097
3097
|
|
|
@@ -3399,7 +3399,7 @@ class FynCentral {
|
|
|
3399
3399
|
return copyFile(src, dest);
|
|
3400
3400
|
}
|
|
3401
3401
|
|
|
3402
|
-
return
|
|
3402
|
+
return cloneFile(src, dest);
|
|
3403
3403
|
}, {
|
|
3404
3404
|
concurrency: 5
|
|
3405
3405
|
});
|
|
@@ -3690,6 +3690,31 @@ class FynGlobal {
|
|
|
3690
3690
|
|
|
3691
3691
|
this.tag = options.tag || null; // Specific tag to operate on
|
|
3692
3692
|
}
|
|
3693
|
+
/**
|
|
3694
|
+
* Create a Fyn instance for global package installation
|
|
3695
|
+
* @param {string} cwd - Working directory for the install
|
|
3696
|
+
* @param {boolean} fynlocal - Whether this is a local package
|
|
3697
|
+
* @returns {Fyn} Configured Fyn instance
|
|
3698
|
+
*/
|
|
3699
|
+
|
|
3700
|
+
|
|
3701
|
+
_createFyn(cwd, fynlocal) {
|
|
3702
|
+
process.env.FYN_CENTRAL_DIR = Path.join(this.globalRoot, "_central-storage");
|
|
3703
|
+
return new Fyn({
|
|
3704
|
+
opts: {
|
|
3705
|
+
cwd,
|
|
3706
|
+
targetDir: "node_modules",
|
|
3707
|
+
centralStore: true,
|
|
3708
|
+
lockfile: true,
|
|
3709
|
+
fynlocal,
|
|
3710
|
+
sourceMaps: false,
|
|
3711
|
+
registry: this.options.registry || "https://registry.npmjs.org",
|
|
3712
|
+
layout: "normal",
|
|
3713
|
+
flattenTop: true
|
|
3714
|
+
},
|
|
3715
|
+
_fynpo: false
|
|
3716
|
+
});
|
|
3717
|
+
}
|
|
3693
3718
|
/**
|
|
3694
3719
|
* Read the installed.json registry
|
|
3695
3720
|
* @returns {Object} Registry object with packages info
|
|
@@ -4247,7 +4272,12 @@ class FynGlobal {
|
|
|
4247
4272
|
|
|
4248
4273
|
if (semver.valid(depVersion)) {
|
|
4249
4274
|
return v.version === depVersion;
|
|
4250
|
-
} //
|
|
4275
|
+
} // If semver range, check if installed version satisfies the range
|
|
4276
|
+
|
|
4277
|
+
|
|
4278
|
+
if (semver.validRange(depVersion)) {
|
|
4279
|
+
return semver.satisfies(v.version, depVersion);
|
|
4280
|
+
} // No specific version (e.g., "latest") - any existing installation counts
|
|
4251
4281
|
|
|
4252
4282
|
|
|
4253
4283
|
return true;
|
|
@@ -4288,22 +4318,10 @@ class FynGlobal {
|
|
|
4288
4318
|
};
|
|
4289
4319
|
await Fs.writeFile(Path.join(tempDir, "package.json"), JSON.stringify(pkgJson, null, 2) + "\n"); // Create Fyn instance for this package directory
|
|
4290
4320
|
|
|
4291
|
-
logger.info(`Installing ${packageName}${depVersion !== "latest" ? "@" + depVersion : ""} globally...`);
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
opts: {
|
|
4296
|
-
cwd: tempDir,
|
|
4297
|
-
targetDir: "node_modules",
|
|
4298
|
-
centralStore: true,
|
|
4299
|
-
lockfile: true,
|
|
4300
|
-
fynlocal: isLocal,
|
|
4301
|
-
registry: this.options.registry || "https://registry.npmjs.org",
|
|
4302
|
-
layout: "normal",
|
|
4303
|
-
flattenTop: true
|
|
4304
|
-
},
|
|
4305
|
-
_fynpo: false
|
|
4306
|
-
}); // Run installation
|
|
4321
|
+
logger.info(`Installing ${packageName}${depVersion !== "latest" ? "@" + depVersion : ""} globally...`);
|
|
4322
|
+
|
|
4323
|
+
const fyn = this._createFyn(tempDir, isLocal); // Run installation
|
|
4324
|
+
|
|
4307
4325
|
|
|
4308
4326
|
await fyn.resolveDependencies();
|
|
4309
4327
|
await fyn.fetchPackages();
|
|
@@ -4870,24 +4888,10 @@ class FynGlobal {
|
|
|
4870
4888
|
try {
|
|
4871
4889
|
await Fs.unlink(lockPath);
|
|
4872
4890
|
} catch (err) {// Lock file may not exist
|
|
4873
|
-
}
|
|
4874
|
-
|
|
4891
|
+
}
|
|
4875
4892
|
|
|
4876
|
-
|
|
4893
|
+
const fyn = this._createFyn(pkgDir, targetVersion.local);
|
|
4877
4894
|
|
|
4878
|
-
const fyn = new Fyn({
|
|
4879
|
-
opts: {
|
|
4880
|
-
cwd: pkgDir,
|
|
4881
|
-
targetDir: "node_modules",
|
|
4882
|
-
centralStore: true,
|
|
4883
|
-
lockfile: true,
|
|
4884
|
-
fynlocal: targetVersion.local,
|
|
4885
|
-
registry: this.options.registry || "https://registry.npmjs.org",
|
|
4886
|
-
layout: "normal",
|
|
4887
|
-
flattenTop: true
|
|
4888
|
-
},
|
|
4889
|
-
_fynpo: false
|
|
4890
|
-
});
|
|
4891
4895
|
await fyn.resolveDependencies();
|
|
4892
4896
|
await fyn.fetchPackages();
|
|
4893
4897
|
const installer = new PkgInstaller({
|
|
@@ -8016,7 +8020,7 @@ const {
|
|
|
8016
8020
|
const {
|
|
8017
8021
|
getDepSection,
|
|
8018
8022
|
makeDepStep
|
|
8019
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
8023
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/index.js");
|
|
8020
8024
|
|
|
8021
8025
|
const xaa = __webpack_require__("./lib/util/xaa.js");
|
|
8022
8026
|
|
|
@@ -11090,7 +11094,7 @@ const {
|
|
|
11090
11094
|
FETCH_PACKAGE
|
|
11091
11095
|
} = __webpack_require__("./lib/log-items.js");
|
|
11092
11096
|
|
|
11093
|
-
const PkgPreper = __webpack_require__("./node_modules/.f/_/pkg-preper/0.1.
|
|
11097
|
+
const PkgPreper = __webpack_require__("./node_modules/.f/_/pkg-preper/0.1.5-fynlocal_h/pkg-preper/lib/pkg-preper.js");
|
|
11094
11098
|
|
|
11095
11099
|
const VisualExec = __webpack_require__("./node_modules/.f/_/visual-exec/0.1.14/visual-exec/lib/visual-exec.js");
|
|
11096
11100
|
|
|
@@ -11115,7 +11119,7 @@ const {
|
|
|
11115
11119
|
|
|
11116
11120
|
const {
|
|
11117
11121
|
PackageRef
|
|
11118
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
11122
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/index.js");
|
|
11119
11123
|
|
|
11120
11124
|
const Arborist = __webpack_require__("./node_modules/.f/_/@npmcli/arborist/9.1.6/@npmcli/arborist/lib/index.js");
|
|
11121
11125
|
|
|
@@ -12439,7 +12443,7 @@ const {
|
|
|
12439
12443
|
const {
|
|
12440
12444
|
FynpoConfigManager,
|
|
12441
12445
|
FynpoDepGraph
|
|
12442
|
-
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
12446
|
+
} = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/index.js");
|
|
12443
12447
|
/* eslint-disable no-magic-numbers, max-statements, no-empty, complexity, no-eval */
|
|
12444
12448
|
|
|
12445
12449
|
|
|
@@ -12798,6 +12802,8 @@ const Path = __webpack_require__("path");
|
|
|
12798
12802
|
|
|
12799
12803
|
const Fs = __webpack_require__("./lib/util/file-ops.js");
|
|
12800
12804
|
|
|
12805
|
+
const fs = __webpack_require__("fs");
|
|
12806
|
+
|
|
12801
12807
|
const xaa = __webpack_require__("./lib/util/xaa.js");
|
|
12802
12808
|
|
|
12803
12809
|
const npmPacklist = __webpack_require__("./node_modules/.f/_/npm-packlist/10.0.3-fynlocal_h/npm-packlist/lib/index.js");
|
|
@@ -12863,6 +12869,19 @@ async function copyFile(srcFp, destFp) {
|
|
|
12863
12869
|
return Fs.writeFile(destFp, srcData);
|
|
12864
12870
|
}
|
|
12865
12871
|
}
|
|
12872
|
+
/**
|
|
12873
|
+
* Clone a file using copy-on-write if supported (macOS APFS, Linux btrfs/xfs).
|
|
12874
|
+
* Falls back to regular copy if CoW is not available.
|
|
12875
|
+
*
|
|
12876
|
+
* @param {*} srcFp - source file path
|
|
12877
|
+
* @param {*} destFp - destination file path
|
|
12878
|
+
* @returns
|
|
12879
|
+
*/
|
|
12880
|
+
|
|
12881
|
+
|
|
12882
|
+
async function cloneFile(srcFp, destFp) {
|
|
12883
|
+
return fs.promises.copyFile(srcFp, destFp, fs.constants.COPYFILE_FICLONE);
|
|
12884
|
+
}
|
|
12866
12885
|
|
|
12867
12886
|
async function prepDestDir(dest) {
|
|
12868
12887
|
const statDest = await xaa.try(() => Fs.lstat(dest));
|
|
@@ -13225,6 +13244,7 @@ async function linkSym1(src, dest) {
|
|
|
13225
13244
|
module.exports = {
|
|
13226
13245
|
link,
|
|
13227
13246
|
linkFile,
|
|
13247
|
+
cloneFile,
|
|
13228
13248
|
copyFile,
|
|
13229
13249
|
linkSym1,
|
|
13230
13250
|
generatePackTree,
|
|
@@ -14136,7 +14156,7 @@ module.exports = __webpack_require__("./node_modules/.f/_/xaa/1.8.0/xaa/dist/ind
|
|
|
14136
14156
|
|
|
14137
14157
|
/***/ }),
|
|
14138
14158
|
|
|
14139
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
14159
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/caching.js":
|
|
14140
14160
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
14141
14161
|
|
|
14142
14162
|
"use strict";
|
|
@@ -14164,7 +14184,7 @@ const path_1 = tslib_1.__importDefault(__webpack_require__("path"));
|
|
|
14164
14184
|
|
|
14165
14185
|
const crypto_1 = tslib_1.__importDefault(__webpack_require__("crypto"));
|
|
14166
14186
|
|
|
14167
|
-
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
14187
|
+
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
|
|
14168
14188
|
/**
|
|
14169
14189
|
* create a sha256 hash for some data
|
|
14170
14190
|
*
|
|
@@ -14432,7 +14452,7 @@ async function processOutput({
|
|
|
14432
14452
|
|
|
14433
14453
|
/***/ }),
|
|
14434
14454
|
|
|
14435
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
14455
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/fynpo-config.js":
|
|
14436
14456
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
14437
14457
|
|
|
14438
14458
|
"use strict";
|
|
@@ -14583,7 +14603,7 @@ exports.FynpoConfigManager = FynpoConfigManager;
|
|
|
14583
14603
|
|
|
14584
14604
|
/***/ }),
|
|
14585
14605
|
|
|
14586
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
14606
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js":
|
|
14587
14607
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
14588
14608
|
|
|
14589
14609
|
"use strict";
|
|
@@ -14620,9 +14640,9 @@ const lodash_1 = tslib_1.__importDefault(__webpack_require__("./node_modules/.f/
|
|
|
14620
14640
|
|
|
14621
14641
|
const semver_1 = tslib_1.__importDefault(__webpack_require__("./node_modules/.f/_/semver/7.7.3/semver/index.js"));
|
|
14622
14642
|
|
|
14623
|
-
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
14643
|
+
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
|
|
14624
14644
|
|
|
14625
|
-
const util_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
14645
|
+
const util_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/util.js");
|
|
14626
14646
|
|
|
14627
14647
|
const is_path_inside_1 = tslib_1.__importDefault(__webpack_require__("./node_modules/.f/_/is-path-inside/3.0.3/is-path-inside/index.js"));
|
|
14628
14648
|
|
|
@@ -15395,7 +15415,7 @@ exports.FynpoDepGraph = FynpoDepGraph;
|
|
|
15395
15415
|
|
|
15396
15416
|
/***/ }),
|
|
15397
15417
|
|
|
15398
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
15418
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/index.js":
|
|
15399
15419
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
15400
15420
|
|
|
15401
15421
|
"use strict";
|
|
@@ -15420,15 +15440,15 @@ const minimatch_1 = tslib_1.__importDefault(__webpack_require__("./node_modules/
|
|
|
15420
15440
|
|
|
15421
15441
|
const lodash_1 = tslib_1.__importDefault(__webpack_require__("./node_modules/.f/_/lodash/4.17.21/lodash/lodash.min.js"));
|
|
15422
15442
|
|
|
15423
|
-
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
15443
|
+
const minimatch_group_1 = __webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/minimatch-group.js");
|
|
15424
15444
|
|
|
15425
|
-
tslib_1.__exportStar(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
15445
|
+
tslib_1.__exportStar(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/fynpo-dep-graph.js"), exports);
|
|
15426
15446
|
|
|
15427
|
-
tslib_1.__exportStar(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
15447
|
+
tslib_1.__exportStar(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/fynpo-config.js"), exports);
|
|
15428
15448
|
|
|
15429
|
-
tslib_1.__exportStar(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
15449
|
+
tslib_1.__exportStar(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/util.js"), exports);
|
|
15430
15450
|
|
|
15431
|
-
exports.caching = tslib_1.__importStar(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.
|
|
15451
|
+
exports.caching = tslib_1.__importStar(__webpack_require__("./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/caching.js"));
|
|
15432
15452
|
/**
|
|
15433
15453
|
* Take an array of packages and figure out their dependencies on each other
|
|
15434
15454
|
*
|
|
@@ -15681,7 +15701,7 @@ function makePkgDeps(packages, opts) {
|
|
|
15681
15701
|
|
|
15682
15702
|
/***/ }),
|
|
15683
15703
|
|
|
15684
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
15704
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/minimatch-group.js":
|
|
15685
15705
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
15686
15706
|
|
|
15687
15707
|
"use strict";
|
|
@@ -15820,7 +15840,7 @@ function unrollMmMatch(path, mms) {
|
|
|
15820
15840
|
|
|
15821
15841
|
/***/ }),
|
|
15822
15842
|
|
|
15823
|
-
/***/ "./node_modules/.f/_/@fynpo/base/1.1.
|
|
15843
|
+
/***/ "./node_modules/.f/_/@fynpo/base/1.1.21-fynlocal_h/@fynpo/base/dist/util.js":
|
|
15824
15844
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
15825
15845
|
|
|
15826
15846
|
"use strict";
|
|
@@ -110562,7 +110582,7 @@ exports.basename = (path, {
|
|
|
110562
110582
|
|
|
110563
110583
|
/***/ }),
|
|
110564
110584
|
|
|
110565
|
-
/***/ "./node_modules/.f/_/pkg-preper/0.1.
|
|
110585
|
+
/***/ "./node_modules/.f/_/pkg-preper/0.1.5-fynlocal_h/pkg-preper/lib/pkg-preper.js":
|
|
110566
110586
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
110567
110587
|
|
|
110568
110588
|
"use strict";
|