caveat-cli 0.16.3 → 0.17.1
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/{chunk-PD5E6TFL.js → chunk-TRIQ5WFY.js} +269 -156
- package/dist/chunk-TRIQ5WFY.js.map +1 -0
- package/dist/index.js +84 -73
- package/dist/index.js.map +1 -1
- package/dist/{server-ZMIRSFMH.js → server-FUWTRVRZ.js} +513 -232
- package/dist/server-FUWTRVRZ.js.map +1 -0
- package/package.json +7 -7
- package/dist/chunk-PD5E6TFL.js.map +0 -1
- package/dist/server-ZMIRSFMH.js.map +0 -1
|
@@ -4272,9 +4272,9 @@ var require_dist2 = __commonJS({
|
|
|
4272
4272
|
}
|
|
4273
4273
|
});
|
|
4274
4274
|
|
|
4275
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4275
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
|
|
4276
4276
|
var require_constants = __commonJS({
|
|
4277
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4277
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
4278
4278
|
"use strict";
|
|
4279
4279
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
4280
4280
|
var MAX_LENGTH = 256;
|
|
@@ -4304,9 +4304,9 @@ var require_constants = __commonJS({
|
|
|
4304
4304
|
}
|
|
4305
4305
|
});
|
|
4306
4306
|
|
|
4307
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4307
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js
|
|
4308
4308
|
var require_debug = __commonJS({
|
|
4309
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4309
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
4310
4310
|
"use strict";
|
|
4311
4311
|
var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
4312
4312
|
};
|
|
@@ -4314,9 +4314,9 @@ var require_debug = __commonJS({
|
|
|
4314
4314
|
}
|
|
4315
4315
|
});
|
|
4316
4316
|
|
|
4317
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4317
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js
|
|
4318
4318
|
var require_re = __commonJS({
|
|
4319
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4319
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports2, module2) {
|
|
4320
4320
|
"use strict";
|
|
4321
4321
|
var {
|
|
4322
4322
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
@@ -4402,9 +4402,9 @@ var require_re = __commonJS({
|
|
|
4402
4402
|
}
|
|
4403
4403
|
});
|
|
4404
4404
|
|
|
4405
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4405
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js
|
|
4406
4406
|
var require_parse_options = __commonJS({
|
|
4407
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4407
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
4408
4408
|
"use strict";
|
|
4409
4409
|
var looseOption = Object.freeze({ loose: true });
|
|
4410
4410
|
var emptyOpts = Object.freeze({});
|
|
@@ -4421,9 +4421,9 @@ var require_parse_options = __commonJS({
|
|
|
4421
4421
|
}
|
|
4422
4422
|
});
|
|
4423
4423
|
|
|
4424
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4424
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js
|
|
4425
4425
|
var require_identifiers = __commonJS({
|
|
4426
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4426
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
4427
4427
|
"use strict";
|
|
4428
4428
|
var numeric = /^[0-9]+$/;
|
|
4429
4429
|
var compareIdentifiers = (a, b2) => {
|
|
@@ -4446,15 +4446,27 @@ var require_identifiers = __commonJS({
|
|
|
4446
4446
|
}
|
|
4447
4447
|
});
|
|
4448
4448
|
|
|
4449
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4449
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js
|
|
4450
4450
|
var require_semver = __commonJS({
|
|
4451
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4451
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
4452
4452
|
"use strict";
|
|
4453
4453
|
var debug2 = require_debug();
|
|
4454
4454
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
4455
4455
|
var { safeRe: re, t: t2 } = require_re();
|
|
4456
4456
|
var parseOptions = require_parse_options();
|
|
4457
4457
|
var { compareIdentifiers } = require_identifiers();
|
|
4458
|
+
var isPrereleaseIdentifier = (prerelease, identifier) => {
|
|
4459
|
+
const identifiers = identifier.split(".");
|
|
4460
|
+
if (identifiers.length > prerelease.length) {
|
|
4461
|
+
return false;
|
|
4462
|
+
}
|
|
4463
|
+
for (let i2 = 0; i2 < identifiers.length; i2++) {
|
|
4464
|
+
if (compareIdentifiers(prerelease[i2], identifiers[i2]) !== 0) {
|
|
4465
|
+
return false;
|
|
4466
|
+
}
|
|
4467
|
+
}
|
|
4468
|
+
return true;
|
|
4469
|
+
};
|
|
4458
4470
|
var SemVer = class _SemVer {
|
|
4459
4471
|
constructor(version, options2) {
|
|
4460
4472
|
options2 = parseOptions(options2);
|
|
@@ -4701,8 +4713,9 @@ var require_semver = __commonJS({
|
|
|
4701
4713
|
if (identifierBase === false) {
|
|
4702
4714
|
prerelease = [identifier];
|
|
4703
4715
|
}
|
|
4704
|
-
if (
|
|
4705
|
-
|
|
4716
|
+
if (isPrereleaseIdentifier(this.prerelease, identifier)) {
|
|
4717
|
+
const prereleaseBase = this.prerelease[identifier.split(".").length];
|
|
4718
|
+
if (isNaN(prereleaseBase)) {
|
|
4706
4719
|
this.prerelease = prerelease;
|
|
4707
4720
|
}
|
|
4708
4721
|
} else {
|
|
@@ -4725,9 +4738,9 @@ var require_semver = __commonJS({
|
|
|
4725
4738
|
}
|
|
4726
4739
|
});
|
|
4727
4740
|
|
|
4728
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4741
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js
|
|
4729
4742
|
var require_parse2 = __commonJS({
|
|
4730
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4743
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
4731
4744
|
"use strict";
|
|
4732
4745
|
var SemVer = require_semver();
|
|
4733
4746
|
var parse2 = (version, options2, throwErrors = false) => {
|
|
@@ -4747,9 +4760,9 @@ var require_parse2 = __commonJS({
|
|
|
4747
4760
|
}
|
|
4748
4761
|
});
|
|
4749
4762
|
|
|
4750
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4763
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js
|
|
4751
4764
|
var require_valid = __commonJS({
|
|
4752
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4765
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
4753
4766
|
"use strict";
|
|
4754
4767
|
var parse2 = require_parse2();
|
|
4755
4768
|
var valid = (version, options2) => {
|
|
@@ -4760,9 +4773,9 @@ var require_valid = __commonJS({
|
|
|
4760
4773
|
}
|
|
4761
4774
|
});
|
|
4762
4775
|
|
|
4763
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4776
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js
|
|
4764
4777
|
var require_clean = __commonJS({
|
|
4765
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4778
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
4766
4779
|
"use strict";
|
|
4767
4780
|
var parse2 = require_parse2();
|
|
4768
4781
|
var clean = (version, options2) => {
|
|
@@ -4773,9 +4786,9 @@ var require_clean = __commonJS({
|
|
|
4773
4786
|
}
|
|
4774
4787
|
});
|
|
4775
4788
|
|
|
4776
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4789
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js
|
|
4777
4790
|
var require_inc = __commonJS({
|
|
4778
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4791
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
4779
4792
|
"use strict";
|
|
4780
4793
|
var SemVer = require_semver();
|
|
4781
4794
|
var inc = (version, release, options2, identifier, identifierBase) => {
|
|
@@ -4797,9 +4810,9 @@ var require_inc = __commonJS({
|
|
|
4797
4810
|
}
|
|
4798
4811
|
});
|
|
4799
4812
|
|
|
4800
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4813
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js
|
|
4801
4814
|
var require_diff = __commonJS({
|
|
4802
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4815
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
4803
4816
|
"use strict";
|
|
4804
4817
|
var parse2 = require_parse2();
|
|
4805
4818
|
var diff = (version1, version2) => {
|
|
@@ -4841,9 +4854,9 @@ var require_diff = __commonJS({
|
|
|
4841
4854
|
}
|
|
4842
4855
|
});
|
|
4843
4856
|
|
|
4844
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4857
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js
|
|
4845
4858
|
var require_major = __commonJS({
|
|
4846
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4859
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports2, module2) {
|
|
4847
4860
|
"use strict";
|
|
4848
4861
|
var SemVer = require_semver();
|
|
4849
4862
|
var major = (a, loose) => new SemVer(a, loose).major;
|
|
@@ -4851,9 +4864,9 @@ var require_major = __commonJS({
|
|
|
4851
4864
|
}
|
|
4852
4865
|
});
|
|
4853
4866
|
|
|
4854
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4867
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js
|
|
4855
4868
|
var require_minor = __commonJS({
|
|
4856
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4869
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports2, module2) {
|
|
4857
4870
|
"use strict";
|
|
4858
4871
|
var SemVer = require_semver();
|
|
4859
4872
|
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
@@ -4861,9 +4874,9 @@ var require_minor = __commonJS({
|
|
|
4861
4874
|
}
|
|
4862
4875
|
});
|
|
4863
4876
|
|
|
4864
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4877
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js
|
|
4865
4878
|
var require_patch = __commonJS({
|
|
4866
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4879
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports2, module2) {
|
|
4867
4880
|
"use strict";
|
|
4868
4881
|
var SemVer = require_semver();
|
|
4869
4882
|
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
@@ -4871,9 +4884,9 @@ var require_patch = __commonJS({
|
|
|
4871
4884
|
}
|
|
4872
4885
|
});
|
|
4873
4886
|
|
|
4874
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4887
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js
|
|
4875
4888
|
var require_prerelease = __commonJS({
|
|
4876
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4889
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
4877
4890
|
"use strict";
|
|
4878
4891
|
var parse2 = require_parse2();
|
|
4879
4892
|
var prerelease = (version, options2) => {
|
|
@@ -4884,9 +4897,9 @@ var require_prerelease = __commonJS({
|
|
|
4884
4897
|
}
|
|
4885
4898
|
});
|
|
4886
4899
|
|
|
4887
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4900
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js
|
|
4888
4901
|
var require_compare = __commonJS({
|
|
4889
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4902
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
4890
4903
|
"use strict";
|
|
4891
4904
|
var SemVer = require_semver();
|
|
4892
4905
|
var compare = (a, b2, loose) => new SemVer(a, loose).compare(new SemVer(b2, loose));
|
|
@@ -4894,9 +4907,9 @@ var require_compare = __commonJS({
|
|
|
4894
4907
|
}
|
|
4895
4908
|
});
|
|
4896
4909
|
|
|
4897
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4910
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js
|
|
4898
4911
|
var require_rcompare = __commonJS({
|
|
4899
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4912
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
4900
4913
|
"use strict";
|
|
4901
4914
|
var compare = require_compare();
|
|
4902
4915
|
var rcompare = (a, b2, loose) => compare(b2, a, loose);
|
|
@@ -4904,9 +4917,9 @@ var require_rcompare = __commonJS({
|
|
|
4904
4917
|
}
|
|
4905
4918
|
});
|
|
4906
4919
|
|
|
4907
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4920
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js
|
|
4908
4921
|
var require_compare_loose = __commonJS({
|
|
4909
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4922
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
4910
4923
|
"use strict";
|
|
4911
4924
|
var compare = require_compare();
|
|
4912
4925
|
var compareLoose = (a, b2) => compare(a, b2, true);
|
|
@@ -4914,9 +4927,9 @@ var require_compare_loose = __commonJS({
|
|
|
4914
4927
|
}
|
|
4915
4928
|
});
|
|
4916
4929
|
|
|
4917
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4930
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js
|
|
4918
4931
|
var require_compare_build = __commonJS({
|
|
4919
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4932
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports2, module2) {
|
|
4920
4933
|
"use strict";
|
|
4921
4934
|
var SemVer = require_semver();
|
|
4922
4935
|
var compareBuild = (a, b2, loose) => {
|
|
@@ -4928,9 +4941,9 @@ var require_compare_build = __commonJS({
|
|
|
4928
4941
|
}
|
|
4929
4942
|
});
|
|
4930
4943
|
|
|
4931
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4944
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js
|
|
4932
4945
|
var require_sort = __commonJS({
|
|
4933
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4946
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports2, module2) {
|
|
4934
4947
|
"use strict";
|
|
4935
4948
|
var compareBuild = require_compare_build();
|
|
4936
4949
|
var sort = (list, loose) => list.sort((a, b2) => compareBuild(a, b2, loose));
|
|
@@ -4938,9 +4951,9 @@ var require_sort = __commonJS({
|
|
|
4938
4951
|
}
|
|
4939
4952
|
});
|
|
4940
4953
|
|
|
4941
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4954
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js
|
|
4942
4955
|
var require_rsort = __commonJS({
|
|
4943
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4956
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports2, module2) {
|
|
4944
4957
|
"use strict";
|
|
4945
4958
|
var compareBuild = require_compare_build();
|
|
4946
4959
|
var rsort = (list, loose) => list.sort((a, b2) => compareBuild(b2, a, loose));
|
|
@@ -4948,9 +4961,9 @@ var require_rsort = __commonJS({
|
|
|
4948
4961
|
}
|
|
4949
4962
|
});
|
|
4950
4963
|
|
|
4951
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4964
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js
|
|
4952
4965
|
var require_gt = __commonJS({
|
|
4953
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4966
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
4954
4967
|
"use strict";
|
|
4955
4968
|
var compare = require_compare();
|
|
4956
4969
|
var gt = (a, b2, loose) => compare(a, b2, loose) > 0;
|
|
@@ -4958,9 +4971,9 @@ var require_gt = __commonJS({
|
|
|
4958
4971
|
}
|
|
4959
4972
|
});
|
|
4960
4973
|
|
|
4961
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4974
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js
|
|
4962
4975
|
var require_lt = __commonJS({
|
|
4963
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4976
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
4964
4977
|
"use strict";
|
|
4965
4978
|
var compare = require_compare();
|
|
4966
4979
|
var lt = (a, b2, loose) => compare(a, b2, loose) < 0;
|
|
@@ -4968,9 +4981,9 @@ var require_lt = __commonJS({
|
|
|
4968
4981
|
}
|
|
4969
4982
|
});
|
|
4970
4983
|
|
|
4971
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4984
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js
|
|
4972
4985
|
var require_eq = __commonJS({
|
|
4973
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4986
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
4974
4987
|
"use strict";
|
|
4975
4988
|
var compare = require_compare();
|
|
4976
4989
|
var eq = (a, b2, loose) => compare(a, b2, loose) === 0;
|
|
@@ -4978,9 +4991,9 @@ var require_eq = __commonJS({
|
|
|
4978
4991
|
}
|
|
4979
4992
|
});
|
|
4980
4993
|
|
|
4981
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
4994
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js
|
|
4982
4995
|
var require_neq = __commonJS({
|
|
4983
|
-
"../../node_modules/.pnpm/semver@7.
|
|
4996
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
4984
4997
|
"use strict";
|
|
4985
4998
|
var compare = require_compare();
|
|
4986
4999
|
var neq = (a, b2, loose) => compare(a, b2, loose) !== 0;
|
|
@@ -4988,9 +5001,9 @@ var require_neq = __commonJS({
|
|
|
4988
5001
|
}
|
|
4989
5002
|
});
|
|
4990
5003
|
|
|
4991
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5004
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js
|
|
4992
5005
|
var require_gte = __commonJS({
|
|
4993
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5006
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
4994
5007
|
"use strict";
|
|
4995
5008
|
var compare = require_compare();
|
|
4996
5009
|
var gte = (a, b2, loose) => compare(a, b2, loose) >= 0;
|
|
@@ -4998,9 +5011,9 @@ var require_gte = __commonJS({
|
|
|
4998
5011
|
}
|
|
4999
5012
|
});
|
|
5000
5013
|
|
|
5001
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5014
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js
|
|
5002
5015
|
var require_lte = __commonJS({
|
|
5003
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5016
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
5004
5017
|
"use strict";
|
|
5005
5018
|
var compare = require_compare();
|
|
5006
5019
|
var lte = (a, b2, loose) => compare(a, b2, loose) <= 0;
|
|
@@ -5008,9 +5021,9 @@ var require_lte = __commonJS({
|
|
|
5008
5021
|
}
|
|
5009
5022
|
});
|
|
5010
5023
|
|
|
5011
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5024
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js
|
|
5012
5025
|
var require_cmp = __commonJS({
|
|
5013
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5026
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
5014
5027
|
"use strict";
|
|
5015
5028
|
var eq = require_eq();
|
|
5016
5029
|
var neq = require_neq();
|
|
@@ -5058,9 +5071,9 @@ var require_cmp = __commonJS({
|
|
|
5058
5071
|
}
|
|
5059
5072
|
});
|
|
5060
5073
|
|
|
5061
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5074
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js
|
|
5062
5075
|
var require_coerce = __commonJS({
|
|
5063
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5076
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
5064
5077
|
"use strict";
|
|
5065
5078
|
var SemVer = require_semver();
|
|
5066
5079
|
var parse2 = require_parse2();
|
|
@@ -5104,9 +5117,50 @@ var require_coerce = __commonJS({
|
|
|
5104
5117
|
}
|
|
5105
5118
|
});
|
|
5106
5119
|
|
|
5107
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5120
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js
|
|
5121
|
+
var require_truncate = __commonJS({
|
|
5122
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports2, module2) {
|
|
5123
|
+
"use strict";
|
|
5124
|
+
var parse2 = require_parse2();
|
|
5125
|
+
var constants2 = require_constants();
|
|
5126
|
+
var SemVer = require_semver();
|
|
5127
|
+
var truncate2 = (version, truncation, options2) => {
|
|
5128
|
+
if (!constants2.RELEASE_TYPES.includes(truncation)) {
|
|
5129
|
+
return null;
|
|
5130
|
+
}
|
|
5131
|
+
const clonedVersion = cloneInputVersion(version, options2);
|
|
5132
|
+
return clonedVersion && doTruncation(clonedVersion, truncation);
|
|
5133
|
+
};
|
|
5134
|
+
var cloneInputVersion = (version, options2) => {
|
|
5135
|
+
const versionStringToParse = version instanceof SemVer ? version.version : version;
|
|
5136
|
+
return parse2(versionStringToParse, options2);
|
|
5137
|
+
};
|
|
5138
|
+
var doTruncation = (version, truncation) => {
|
|
5139
|
+
if (isPrerelease(truncation)) {
|
|
5140
|
+
return version.version;
|
|
5141
|
+
}
|
|
5142
|
+
version.prerelease = [];
|
|
5143
|
+
switch (truncation) {
|
|
5144
|
+
case "major":
|
|
5145
|
+
version.minor = 0;
|
|
5146
|
+
version.patch = 0;
|
|
5147
|
+
break;
|
|
5148
|
+
case "minor":
|
|
5149
|
+
version.patch = 0;
|
|
5150
|
+
break;
|
|
5151
|
+
}
|
|
5152
|
+
return version.format();
|
|
5153
|
+
};
|
|
5154
|
+
var isPrerelease = (type2) => {
|
|
5155
|
+
return type2.startsWith("pre");
|
|
5156
|
+
};
|
|
5157
|
+
module2.exports = truncate2;
|
|
5158
|
+
}
|
|
5159
|
+
});
|
|
5160
|
+
|
|
5161
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js
|
|
5108
5162
|
var require_lrucache = __commonJS({
|
|
5109
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5163
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports2, module2) {
|
|
5110
5164
|
"use strict";
|
|
5111
5165
|
var LRUCache = class {
|
|
5112
5166
|
constructor() {
|
|
@@ -5142,9 +5196,9 @@ var require_lrucache = __commonJS({
|
|
|
5142
5196
|
}
|
|
5143
5197
|
});
|
|
5144
5198
|
|
|
5145
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5199
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js
|
|
5146
5200
|
var require_range = __commonJS({
|
|
5147
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5201
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports2, module2) {
|
|
5148
5202
|
"use strict";
|
|
5149
5203
|
var SPACE_CHARACTERS = /\s+/g;
|
|
5150
5204
|
var Range = class _Range {
|
|
@@ -5212,6 +5266,7 @@ var require_range = __commonJS({
|
|
|
5212
5266
|
return this.range;
|
|
5213
5267
|
}
|
|
5214
5268
|
parseRange(range) {
|
|
5269
|
+
range = range.replace(BUILDSTRIPRE, "");
|
|
5215
5270
|
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
5216
5271
|
const memoKey = memoOpts + ":" + range;
|
|
5217
5272
|
const cached = cache.get(memoKey);
|
|
@@ -5294,12 +5349,14 @@ var require_range = __commonJS({
|
|
|
5294
5349
|
var SemVer = require_semver();
|
|
5295
5350
|
var {
|
|
5296
5351
|
safeRe: re,
|
|
5352
|
+
src,
|
|
5297
5353
|
t: t2,
|
|
5298
5354
|
comparatorTrimReplace,
|
|
5299
5355
|
tildeTrimReplace,
|
|
5300
5356
|
caretTrimReplace
|
|
5301
5357
|
} = require_re();
|
|
5302
5358
|
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
5359
|
+
var BUILDSTRIPRE = new RegExp(src[t2.BUILD], "g");
|
|
5303
5360
|
var isNullSet = (c3) => c3.value === "<0.0.0-0";
|
|
5304
5361
|
var isAny = (c3) => c3.value === "";
|
|
5305
5362
|
var isSatisfiable = (comparators, options2) => {
|
|
@@ -5328,20 +5385,22 @@ var require_range = __commonJS({
|
|
|
5328
5385
|
return comp;
|
|
5329
5386
|
};
|
|
5330
5387
|
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
5388
|
+
var invalidXRangeOrder = (M2, m, p2) => isX(M2) && !isX(m) || isX(m) && p2 && !isX(p2);
|
|
5331
5389
|
var replaceTildes = (comp, options2) => {
|
|
5332
5390
|
return comp.trim().split(/\s+/).map((c3) => replaceTilde(c3, options2)).join(" ");
|
|
5333
5391
|
};
|
|
5334
5392
|
var replaceTilde = (comp, options2) => {
|
|
5335
5393
|
const r2 = options2.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
|
|
5394
|
+
const z2 = options2.includePrerelease ? "-0" : "";
|
|
5336
5395
|
return comp.replace(r2, (_2, M2, m, p2, pr) => {
|
|
5337
5396
|
debug2("tilde", comp, _2, M2, m, p2, pr);
|
|
5338
5397
|
let ret;
|
|
5339
5398
|
if (isX(M2)) {
|
|
5340
5399
|
ret = "";
|
|
5341
5400
|
} else if (isX(m)) {
|
|
5342
|
-
ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;
|
|
5401
|
+
ret = `>=${M2}.0.0${z2} <${+M2 + 1}.0.0-0`;
|
|
5343
5402
|
} else if (isX(p2)) {
|
|
5344
|
-
ret = `>=${M2}.${m}.0 <${M2}.${+m + 1}.0-0`;
|
|
5403
|
+
ret = `>=${M2}.${m}.0${z2} <${M2}.${+m + 1}.0-0`;
|
|
5345
5404
|
} else if (pr) {
|
|
5346
5405
|
debug2("replaceTilde pr", pr);
|
|
5347
5406
|
ret = `>=${M2}.${m}.${p2}-${pr} <${M2}.${+m + 1}.0-0`;
|
|
@@ -5387,9 +5446,9 @@ var require_range = __commonJS({
|
|
|
5387
5446
|
debug2("no pr");
|
|
5388
5447
|
if (M2 === "0") {
|
|
5389
5448
|
if (m === "0") {
|
|
5390
|
-
ret = `>=${M2}.${m}.${p2}
|
|
5449
|
+
ret = `>=${M2}.${m}.${p2} <${M2}.${m}.${+p2 + 1}-0`;
|
|
5391
5450
|
} else {
|
|
5392
|
-
ret = `>=${M2}.${m}.${p2}
|
|
5451
|
+
ret = `>=${M2}.${m}.${p2} <${M2}.${+m + 1}.0-0`;
|
|
5393
5452
|
}
|
|
5394
5453
|
} else {
|
|
5395
5454
|
ret = `>=${M2}.${m}.${p2} <${+M2 + 1}.0.0-0`;
|
|
@@ -5408,6 +5467,9 @@ var require_range = __commonJS({
|
|
|
5408
5467
|
const r2 = options2.loose ? re[t2.XRANGELOOSE] : re[t2.XRANGE];
|
|
5409
5468
|
return comp.replace(r2, (ret, gtlt, M2, m, p2, pr) => {
|
|
5410
5469
|
debug2("xRange", comp, ret, gtlt, M2, m, p2, pr);
|
|
5470
|
+
if (invalidXRangeOrder(M2, m, p2)) {
|
|
5471
|
+
return comp;
|
|
5472
|
+
}
|
|
5411
5473
|
const xM = isX(M2);
|
|
5412
5474
|
const xm = xM || isX(m);
|
|
5413
5475
|
const xp = xm || isX(p2);
|
|
@@ -5519,9 +5581,9 @@ var require_range = __commonJS({
|
|
|
5519
5581
|
}
|
|
5520
5582
|
});
|
|
5521
5583
|
|
|
5522
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5584
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js
|
|
5523
5585
|
var require_comparator = __commonJS({
|
|
5524
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5586
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
5525
5587
|
"use strict";
|
|
5526
5588
|
var ANY = /* @__PURE__ */ Symbol("SemVer ANY");
|
|
5527
5589
|
var Comparator = class _Comparator {
|
|
@@ -5632,9 +5694,9 @@ var require_comparator = __commonJS({
|
|
|
5632
5694
|
}
|
|
5633
5695
|
});
|
|
5634
5696
|
|
|
5635
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5697
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js
|
|
5636
5698
|
var require_satisfies = __commonJS({
|
|
5637
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5699
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
5638
5700
|
"use strict";
|
|
5639
5701
|
var Range = require_range();
|
|
5640
5702
|
var satisfies = (version, range, options2) => {
|
|
@@ -5649,9 +5711,9 @@ var require_satisfies = __commonJS({
|
|
|
5649
5711
|
}
|
|
5650
5712
|
});
|
|
5651
5713
|
|
|
5652
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5714
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js
|
|
5653
5715
|
var require_to_comparators = __commonJS({
|
|
5654
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5716
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
|
|
5655
5717
|
"use strict";
|
|
5656
5718
|
var Range = require_range();
|
|
5657
5719
|
var toComparators = (range, options2) => new Range(range, options2).set.map((comp) => comp.map((c3) => c3.value).join(" ").trim().split(" "));
|
|
@@ -5659,9 +5721,9 @@ var require_to_comparators = __commonJS({
|
|
|
5659
5721
|
}
|
|
5660
5722
|
});
|
|
5661
5723
|
|
|
5662
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5724
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js
|
|
5663
5725
|
var require_max_satisfying = __commonJS({
|
|
5664
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5726
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
|
|
5665
5727
|
"use strict";
|
|
5666
5728
|
var SemVer = require_semver();
|
|
5667
5729
|
var Range = require_range();
|
|
@@ -5688,9 +5750,9 @@ var require_max_satisfying = __commonJS({
|
|
|
5688
5750
|
}
|
|
5689
5751
|
});
|
|
5690
5752
|
|
|
5691
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5753
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js
|
|
5692
5754
|
var require_min_satisfying = __commonJS({
|
|
5693
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5755
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
|
|
5694
5756
|
"use strict";
|
|
5695
5757
|
var SemVer = require_semver();
|
|
5696
5758
|
var Range = require_range();
|
|
@@ -5717,9 +5779,9 @@ var require_min_satisfying = __commonJS({
|
|
|
5717
5779
|
}
|
|
5718
5780
|
});
|
|
5719
5781
|
|
|
5720
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5782
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js
|
|
5721
5783
|
var require_min_version = __commonJS({
|
|
5722
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5784
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports2, module2) {
|
|
5723
5785
|
"use strict";
|
|
5724
5786
|
var SemVer = require_semver();
|
|
5725
5787
|
var Range = require_range();
|
|
@@ -5776,9 +5838,9 @@ var require_min_version = __commonJS({
|
|
|
5776
5838
|
}
|
|
5777
5839
|
});
|
|
5778
5840
|
|
|
5779
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5841
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js
|
|
5780
5842
|
var require_valid2 = __commonJS({
|
|
5781
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5843
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports2, module2) {
|
|
5782
5844
|
"use strict";
|
|
5783
5845
|
var Range = require_range();
|
|
5784
5846
|
var validRange = (range, options2) => {
|
|
@@ -5792,9 +5854,9 @@ var require_valid2 = __commonJS({
|
|
|
5792
5854
|
}
|
|
5793
5855
|
});
|
|
5794
5856
|
|
|
5795
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5857
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js
|
|
5796
5858
|
var require_outside = __commonJS({
|
|
5797
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5859
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports2, module2) {
|
|
5798
5860
|
"use strict";
|
|
5799
5861
|
var SemVer = require_semver();
|
|
5800
5862
|
var Comparator = require_comparator();
|
|
@@ -5861,9 +5923,9 @@ var require_outside = __commonJS({
|
|
|
5861
5923
|
}
|
|
5862
5924
|
});
|
|
5863
5925
|
|
|
5864
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5926
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js
|
|
5865
5927
|
var require_gtr = __commonJS({
|
|
5866
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5928
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
5867
5929
|
"use strict";
|
|
5868
5930
|
var outside = require_outside();
|
|
5869
5931
|
var gtr = (version, range, options2) => outside(version, range, ">", options2);
|
|
@@ -5871,9 +5933,9 @@ var require_gtr = __commonJS({
|
|
|
5871
5933
|
}
|
|
5872
5934
|
});
|
|
5873
5935
|
|
|
5874
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5936
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js
|
|
5875
5937
|
var require_ltr = __commonJS({
|
|
5876
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5938
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
5877
5939
|
"use strict";
|
|
5878
5940
|
var outside = require_outside();
|
|
5879
5941
|
var ltr = (version, range, options2) => outside(version, range, "<", options2);
|
|
@@ -5881,9 +5943,9 @@ var require_ltr = __commonJS({
|
|
|
5881
5943
|
}
|
|
5882
5944
|
});
|
|
5883
5945
|
|
|
5884
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5946
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js
|
|
5885
5947
|
var require_intersects = __commonJS({
|
|
5886
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5948
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports2, module2) {
|
|
5887
5949
|
"use strict";
|
|
5888
5950
|
var Range = require_range();
|
|
5889
5951
|
var intersects = (r1, r2, options2) => {
|
|
@@ -5895,9 +5957,9 @@ var require_intersects = __commonJS({
|
|
|
5895
5957
|
}
|
|
5896
5958
|
});
|
|
5897
5959
|
|
|
5898
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
5960
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js
|
|
5899
5961
|
var require_simplify = __commonJS({
|
|
5900
|
-
"../../node_modules/.pnpm/semver@7.
|
|
5962
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports2, module2) {
|
|
5901
5963
|
"use strict";
|
|
5902
5964
|
var satisfies = require_satisfies();
|
|
5903
5965
|
var compare = require_compare();
|
|
@@ -5945,9 +6007,9 @@ var require_simplify = __commonJS({
|
|
|
5945
6007
|
}
|
|
5946
6008
|
});
|
|
5947
6009
|
|
|
5948
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
6010
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js
|
|
5949
6011
|
var require_subset = __commonJS({
|
|
5950
|
-
"../../node_modules/.pnpm/semver@7.
|
|
6012
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports2, module2) {
|
|
5951
6013
|
"use strict";
|
|
5952
6014
|
var Range = require_range();
|
|
5953
6015
|
var Comparator = require_comparator();
|
|
@@ -6055,7 +6117,7 @@ var require_subset = __commonJS({
|
|
|
6055
6117
|
if (higher === c3 && higher !== gt) {
|
|
6056
6118
|
return false;
|
|
6057
6119
|
}
|
|
6058
|
-
} else if (gt.operator === ">=" && !
|
|
6120
|
+
} else if (gt.operator === ">=" && !c3.test(gt.semver)) {
|
|
6059
6121
|
return false;
|
|
6060
6122
|
}
|
|
6061
6123
|
}
|
|
@@ -6070,7 +6132,7 @@ var require_subset = __commonJS({
|
|
|
6070
6132
|
if (lower === c3 && lower !== lt) {
|
|
6071
6133
|
return false;
|
|
6072
6134
|
}
|
|
6073
|
-
} else if (lt.operator === "<=" && !
|
|
6135
|
+
} else if (lt.operator === "<=" && !c3.test(lt.semver)) {
|
|
6074
6136
|
return false;
|
|
6075
6137
|
}
|
|
6076
6138
|
}
|
|
@@ -6107,9 +6169,9 @@ var require_subset = __commonJS({
|
|
|
6107
6169
|
}
|
|
6108
6170
|
});
|
|
6109
6171
|
|
|
6110
|
-
// ../../node_modules/.pnpm/semver@7.
|
|
6172
|
+
// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js
|
|
6111
6173
|
var require_semver2 = __commonJS({
|
|
6112
|
-
"../../node_modules/.pnpm/semver@7.
|
|
6174
|
+
"../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports2, module2) {
|
|
6113
6175
|
"use strict";
|
|
6114
6176
|
var internalRe = require_re();
|
|
6115
6177
|
var constants2 = require_constants();
|
|
@@ -6138,6 +6200,7 @@ var require_semver2 = __commonJS({
|
|
|
6138
6200
|
var lte = require_lte();
|
|
6139
6201
|
var cmp = require_cmp();
|
|
6140
6202
|
var coerce = require_coerce();
|
|
6203
|
+
var truncate2 = require_truncate();
|
|
6141
6204
|
var Comparator = require_comparator();
|
|
6142
6205
|
var Range = require_range();
|
|
6143
6206
|
var satisfies = require_satisfies();
|
|
@@ -6176,6 +6239,7 @@ var require_semver2 = __commonJS({
|
|
|
6176
6239
|
lte,
|
|
6177
6240
|
cmp,
|
|
6178
6241
|
coerce,
|
|
6242
|
+
truncate: truncate2,
|
|
6179
6243
|
Comparator,
|
|
6180
6244
|
Range,
|
|
6181
6245
|
satisfies,
|
|
@@ -15434,11 +15498,17 @@ function errorMessage2(err) {
|
|
|
15434
15498
|
}
|
|
15435
15499
|
|
|
15436
15500
|
// ../../packages/core/dist/autoSync.js
|
|
15501
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
15437
15502
|
import { createHash as createHash4 } from "node:crypto";
|
|
15438
|
-
import { mkdirSync as mkdirSync6, readFileSync as readFileSync7, renameSync as renameSync3, writeFileSync as writeFileSync5 } from "node:fs";
|
|
15503
|
+
import { existsSync as existsSync9, mkdirSync as mkdirSync6, readFileSync as readFileSync7, renameSync as renameSync3, statSync as statSync6, writeFileSync as writeFileSync5 } from "node:fs";
|
|
15439
15504
|
import { dirname as dirname5, join as join9 } from "node:path";
|
|
15440
|
-
var AUTO_SYNC_DEBOUNCE_MS =
|
|
15505
|
+
var AUTO_SYNC_DEBOUNCE_MS = 15 * 60 * 1e3;
|
|
15506
|
+
var AUTO_SYNC_RECORD_DEBOUNCE_MS = 60 * 1e3;
|
|
15507
|
+
var AUTO_SYNC_SUSPEND_THRESHOLD = 3;
|
|
15508
|
+
var AUTO_SYNC_DEGRADED_RETRY_MS = 6 * 60 * 60 * 1e3;
|
|
15509
|
+
var AUTO_SYNC_NOTICE_REPEAT_MS = 24 * 60 * 60 * 1e3;
|
|
15441
15510
|
var CAVEAT_AUTO_SYNC_ENV = "CAVEAT_AUTO_SYNC";
|
|
15511
|
+
var CAVEAT_AUTO_SYNC_DEBOUNCE_ENV = "CAVEAT_AUTO_SYNC_DEBOUNCE_MS";
|
|
15442
15512
|
function syncDir(caveatHome) {
|
|
15443
15513
|
return join9(caveatHome, "sync");
|
|
15444
15514
|
}
|
|
@@ -15471,6 +15541,7 @@ function resetAutoSyncFailureState(caveatHome) {
|
|
|
15471
15541
|
writeAutoSyncState(caveatHome, {
|
|
15472
15542
|
finishedAt: current?.finishedAt ?? (/* @__PURE__ */ new Date(0)).toISOString(),
|
|
15473
15543
|
signature: current?.signature ?? "",
|
|
15544
|
+
lastNotifiedAt: current?.lastNotifiedAt,
|
|
15474
15545
|
ownSync: { consecutiveFailureSignature: null, consecutiveFailureCount: 0 }
|
|
15475
15546
|
});
|
|
15476
15547
|
} catch {
|
|
@@ -15479,7 +15550,15 @@ function resetAutoSyncFailureState(caveatHome) {
|
|
|
15479
15550
|
function isAutoSyncState(value) {
|
|
15480
15551
|
if (value === null || typeof value !== "object") return false;
|
|
15481
15552
|
const candidate = value;
|
|
15482
|
-
return typeof candidate.finishedAt === "string" && typeof candidate.signature === "string" && candidate.ownSync !== null && typeof candidate.ownSync === "object" && (candidate.ownSync.consecutiveFailureSignature === null || typeof candidate.ownSync.consecutiveFailureSignature === "string") && Number.isInteger(candidate.ownSync.consecutiveFailureCount) && candidate.ownSync.consecutiveFailureCount >= 0;
|
|
15553
|
+
return typeof candidate.finishedAt === "string" && typeof candidate.signature === "string" && isOptionalString(candidate.lastNotifiedAt) && candidate.ownSync !== null && typeof candidate.ownSync === "object" && (candidate.ownSync.consecutiveFailureSignature === null || typeof candidate.ownSync.consecutiveFailureSignature === "string") && Number.isInteger(candidate.ownSync.consecutiveFailureCount) && candidate.ownSync.consecutiveFailureCount >= 0 && isOptionalString(candidate.ownSync.lastAttemptAt);
|
|
15554
|
+
}
|
|
15555
|
+
function isOptionalString(value) {
|
|
15556
|
+
return value === void 0 || typeof value === "string";
|
|
15557
|
+
}
|
|
15558
|
+
function parseTimestamp(value) {
|
|
15559
|
+
if (value === void 0) return 0;
|
|
15560
|
+
const ms = Date.parse(value);
|
|
15561
|
+
return Number.isFinite(ms) ? ms : 0;
|
|
15483
15562
|
}
|
|
15484
15563
|
function classifyOwnSyncOutcome(err, lastProbe) {
|
|
15485
15564
|
if (!(err instanceof SyncError)) return "fail";
|
|
@@ -15507,8 +15586,9 @@ function autoSyncNotification(outcome) {
|
|
|
15507
15586
|
if (outcome.own.pulled === true) {
|
|
15508
15587
|
lines.push("autosync: pulled updates from your private remote");
|
|
15509
15588
|
}
|
|
15510
|
-
|
|
15511
|
-
|
|
15589
|
+
const backoffHours = Math.round(AUTO_SYNC_DEGRADED_RETRY_MS / (60 * 60 * 1e3));
|
|
15590
|
+
if (outcome.own.degraded === true) {
|
|
15591
|
+
lines.push(`autosync: own sync keeps failing; auto-retry is backed off to every ${backoffHours}h. run \`caveat sync\` to resolve now.`);
|
|
15512
15592
|
} else if (outcome.own.disposition === "fail") {
|
|
15513
15593
|
lines.push(`autosync: own sync failed (${outcome.own.code ?? "UNKNOWN"}). run \`caveat sync\` to resolve.`);
|
|
15514
15594
|
}
|
|
@@ -15517,17 +15597,7 @@ function autoSyncNotification(outcome) {
|
|
|
15517
15597
|
lines.push(`autosync: community pull failed: ${failedHandles.join(", ")}`);
|
|
15518
15598
|
}
|
|
15519
15599
|
const text = lines.length > 0 ? lines.join("\n") : null;
|
|
15520
|
-
const signature = sha256(JSON.stringify(
|
|
15521
|
-
lines,
|
|
15522
|
-
own: {
|
|
15523
|
-
disposition: outcome.own.disposition,
|
|
15524
|
-
code: outcome.own.code ?? null,
|
|
15525
|
-
pulled: outcome.own.pulled ?? null,
|
|
15526
|
-
suspended: outcome.own.suspended ?? false,
|
|
15527
|
-
escalated: outcome.own.escalated ?? false
|
|
15528
|
-
},
|
|
15529
|
-
communityFailed: failedHandles
|
|
15530
|
-
}));
|
|
15600
|
+
const signature = sha256(JSON.stringify(lines));
|
|
15531
15601
|
return { signature, text };
|
|
15532
15602
|
}
|
|
15533
15603
|
async function runAutoSync(opts) {
|
|
@@ -15538,6 +15608,9 @@ async function runAutoSync(opts) {
|
|
|
15538
15608
|
try {
|
|
15539
15609
|
reindexLock = acquireReindexLock(opts.caveatHome);
|
|
15540
15610
|
if (!reindexLock) return { ran: false };
|
|
15611
|
+
const nowDate = (opts.now ?? (() => /* @__PURE__ */ new Date()))();
|
|
15612
|
+
const nowMs = nowDate.getTime();
|
|
15613
|
+
const nowIso = nowDate.toISOString();
|
|
15541
15614
|
const previousState = readAutoSyncState(opts.caveatHome);
|
|
15542
15615
|
let ownSyncState = previousState?.ownSync ?? {
|
|
15543
15616
|
consecutiveFailureSignature: null,
|
|
@@ -15549,9 +15622,12 @@ async function runAutoSync(opts) {
|
|
|
15549
15622
|
gitTimeoutMs: opts.gitTimeoutMs ?? BACKGROUND_GIT_TIMEOUT_MS
|
|
15550
15623
|
});
|
|
15551
15624
|
let own;
|
|
15552
|
-
|
|
15625
|
+
const degraded = ownSyncState.consecutiveFailureCount >= AUTO_SYNC_SUSPEND_THRESHOLD;
|
|
15626
|
+
const retryDue = nowMs - parseTimestamp(ownSyncState.lastAttemptAt) >= AUTO_SYNC_DEGRADED_RETRY_MS;
|
|
15627
|
+
if (degraded && !retryDue) {
|
|
15553
15628
|
own = { disposition: "skip", suspended: true };
|
|
15554
15629
|
} else {
|
|
15630
|
+
ownSyncState = { ...ownSyncState, lastAttemptAt: nowIso };
|
|
15555
15631
|
let lastProbe;
|
|
15556
15632
|
try {
|
|
15557
15633
|
const result = await syncOwn({
|
|
@@ -15582,23 +15658,27 @@ async function runAutoSync(opts) {
|
|
|
15582
15658
|
const consecutiveFailureCount = ownSyncState.consecutiveFailureSignature === failureSignature ? ownSyncState.consecutiveFailureCount + 1 : 1;
|
|
15583
15659
|
ownSyncState = {
|
|
15584
15660
|
consecutiveFailureSignature: failureSignature,
|
|
15585
|
-
consecutiveFailureCount
|
|
15661
|
+
consecutiveFailureCount,
|
|
15662
|
+
lastAttemptAt: nowIso
|
|
15586
15663
|
};
|
|
15587
|
-
if (consecutiveFailureCount ===
|
|
15664
|
+
if (consecutiveFailureCount === AUTO_SYNC_SUSPEND_THRESHOLD) own.escalated = true;
|
|
15588
15665
|
}
|
|
15589
15666
|
}
|
|
15590
15667
|
}
|
|
15668
|
+
if (ownSyncState.consecutiveFailureCount >= AUTO_SYNC_SUSPEND_THRESHOLD) own.degraded = true;
|
|
15591
15669
|
await reindexAndMark2(opts);
|
|
15592
15670
|
const outcome = { community, own };
|
|
15593
15671
|
const { signature, text } = autoSyncNotification(outcome);
|
|
15672
|
+
const repeatDue = own.degraded === true && nowMs - parseTimestamp(previousState?.lastNotifiedAt) >= AUTO_SYNC_NOTICE_REPEAT_MS;
|
|
15594
15673
|
let notified = false;
|
|
15595
|
-
if (text !== null && previousState?.signature !== signature) {
|
|
15674
|
+
if (text !== null && (previousState?.signature !== signature || repeatDue)) {
|
|
15596
15675
|
appendGlobalPendingReminder(opts.caveatHome, text);
|
|
15597
15676
|
notified = true;
|
|
15598
15677
|
}
|
|
15599
15678
|
writeAutoSyncState(opts.caveatHome, {
|
|
15600
|
-
finishedAt:
|
|
15679
|
+
finishedAt: nowIso,
|
|
15601
15680
|
signature,
|
|
15681
|
+
lastNotifiedAt: notified ? nowIso : previousState?.lastNotifiedAt,
|
|
15602
15682
|
ownSync: ownSyncState
|
|
15603
15683
|
});
|
|
15604
15684
|
return { ran: true, outcome, notified };
|
|
@@ -15620,6 +15700,35 @@ async function runAutoSync(opts) {
|
|
|
15620
15700
|
}
|
|
15621
15701
|
}
|
|
15622
15702
|
}
|
|
15703
|
+
function triggerAutoSync(opts) {
|
|
15704
|
+
if (process.env[CAVEAT_AUTO_SYNC_ENV] === "off") return;
|
|
15705
|
+
const debounceMs = resolveTriggerDebounceMs(opts.debounceMs ?? AUTO_SYNC_DEBOUNCE_MS);
|
|
15706
|
+
const statePath = autoSyncStatePath(opts.caveatHome);
|
|
15707
|
+
try {
|
|
15708
|
+
if (existsSync9(statePath) && Date.now() - statSync6(statePath).mtimeMs < debounceMs) return;
|
|
15709
|
+
} catch {
|
|
15710
|
+
}
|
|
15711
|
+
if (!opts.cliScript) throw new Error("current Caveat CLI script path is unavailable");
|
|
15712
|
+
const child = spawn2(
|
|
15713
|
+
process.execPath,
|
|
15714
|
+
[...process.execArgv, "--disable-warning=ExperimentalWarning", opts.cliScript, "hook", "autosync"],
|
|
15715
|
+
{ detached: true, stdio: "ignore", windowsHide: true }
|
|
15716
|
+
);
|
|
15717
|
+
child.unref();
|
|
15718
|
+
}
|
|
15719
|
+
function resolveTriggerDebounceMs(fallback) {
|
|
15720
|
+
const raw = process.env[CAVEAT_AUTO_SYNC_DEBOUNCE_ENV];
|
|
15721
|
+
if (raw === void 0) return fallback;
|
|
15722
|
+
const parsed = Number(raw);
|
|
15723
|
+
if (!Number.isFinite(parsed) || parsed < 0) {
|
|
15724
|
+
process.stderr.write(
|
|
15725
|
+
`[caveat] ${CAVEAT_AUTO_SYNC_DEBOUNCE_ENV}=${raw} is not a non-negative number; using ${fallback}ms
|
|
15726
|
+
`
|
|
15727
|
+
);
|
|
15728
|
+
return fallback;
|
|
15729
|
+
}
|
|
15730
|
+
return parsed;
|
|
15731
|
+
}
|
|
15623
15732
|
async function reindexAndMark2(opts) {
|
|
15624
15733
|
const keyProvider = createKeyserverKeyProvider({ caveatHome: opts.caveatHome });
|
|
15625
15734
|
const failures = await prewarmSealedKeys({ paths: opts.paths, keyProvider });
|
|
@@ -15731,7 +15840,7 @@ function toSearchResult(row) {
|
|
|
15731
15840
|
}
|
|
15732
15841
|
|
|
15733
15842
|
// ../../packages/core/dist/paths.js
|
|
15734
|
-
import { existsSync as
|
|
15843
|
+
import { existsSync as existsSync10 } from "node:fs";
|
|
15735
15844
|
import { dirname as dirname6, isAbsolute, join as join10, resolve as resolve2 } from "node:path";
|
|
15736
15845
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
15737
15846
|
function expandHome(p2, userHome) {
|
|
@@ -15763,7 +15872,7 @@ function resolvePaths(caveatHome, knowledgeRepo, userHome) {
|
|
|
15763
15872
|
}
|
|
15764
15873
|
|
|
15765
15874
|
// ../../packages/core/dist/config.js
|
|
15766
|
-
import { existsSync as
|
|
15875
|
+
import { existsSync as existsSync11, readFileSync as readFileSync8, writeFileSync as writeFileSync6 } from "node:fs";
|
|
15767
15876
|
var DEFAULT_CONFIG = {
|
|
15768
15877
|
knowledgeRepo: "own",
|
|
15769
15878
|
semverKeys: ["driver", "cuda", "node"],
|
|
@@ -15772,16 +15881,16 @@ var DEFAULT_CONFIG = {
|
|
|
15772
15881
|
sealedKeyserverUrl: null
|
|
15773
15882
|
};
|
|
15774
15883
|
function loadConfig(userConfigPath) {
|
|
15775
|
-
const userCfg =
|
|
15884
|
+
const userCfg = existsSync11(userConfigPath) ? JSON.parse(readFileSync8(userConfigPath, "utf-8")) : {};
|
|
15776
15885
|
return deepMerge(DEFAULT_CONFIG, userCfg);
|
|
15777
15886
|
}
|
|
15778
15887
|
function ensureUserConfig(userConfigPath) {
|
|
15779
|
-
if (!
|
|
15888
|
+
if (!existsSync11(userConfigPath)) {
|
|
15780
15889
|
writeFileSync6(userConfigPath, "{}\n", "utf-8");
|
|
15781
15890
|
}
|
|
15782
15891
|
}
|
|
15783
15892
|
function writeUserConfigPatch(userConfigPath, patch) {
|
|
15784
|
-
const existing =
|
|
15893
|
+
const existing = existsSync11(userConfigPath) ? JSON.parse(readFileSync8(userConfigPath, "utf-8")) : {};
|
|
15785
15894
|
writeFileSync6(userConfigPath, `${JSON.stringify({ ...existing, ...patch }, null, 2)}
|
|
15786
15895
|
`, "utf-8");
|
|
15787
15896
|
}
|
|
@@ -16090,7 +16199,7 @@ function stopReminderText(signals, related) {
|
|
|
16090
16199
|
}
|
|
16091
16200
|
|
|
16092
16201
|
// ../../packages/core/dist/transcriptSignals.js
|
|
16093
|
-
import { existsSync as
|
|
16202
|
+
import { existsSync as existsSync12, readFileSync as readFileSync9 } from "node:fs";
|
|
16094
16203
|
var MAX_ERROR_SNIPPETS = 10;
|
|
16095
16204
|
var MAX_ERROR_SNIPPET_LENGTH = 300;
|
|
16096
16205
|
var MAX_SEARCH_QUERIES = 10;
|
|
@@ -16110,13 +16219,13 @@ function extractResultText(content) {
|
|
|
16110
16219
|
}
|
|
16111
16220
|
return "";
|
|
16112
16221
|
}
|
|
16113
|
-
function
|
|
16222
|
+
function parseTimestamp2(raw) {
|
|
16114
16223
|
if (typeof raw !== "string") return void 0;
|
|
16115
16224
|
const ms = Date.parse(raw);
|
|
16116
16225
|
return Number.isNaN(ms) ? void 0 : ms;
|
|
16117
16226
|
}
|
|
16118
16227
|
function readSessionSignals(transcriptPath) {
|
|
16119
|
-
if (!transcriptPath || !
|
|
16228
|
+
if (!transcriptPath || !existsSync12(transcriptPath)) return null;
|
|
16120
16229
|
let raw;
|
|
16121
16230
|
try {
|
|
16122
16231
|
raw = readFileSync9(transcriptPath, "utf-8");
|
|
@@ -16140,7 +16249,7 @@ function readSessionSignals(transcriptPath) {
|
|
|
16140
16249
|
} catch {
|
|
16141
16250
|
continue;
|
|
16142
16251
|
}
|
|
16143
|
-
const ts =
|
|
16252
|
+
const ts = parseTimestamp2(parsed.timestamp);
|
|
16144
16253
|
if (ts !== void 0) {
|
|
16145
16254
|
if (firstTs === void 0 || ts < firstTs) firstTs = ts;
|
|
16146
16255
|
if (lastTs === void 0 || ts > lastTs) lastTs = ts;
|
|
@@ -16200,7 +16309,7 @@ function struggleSearchText(s) {
|
|
|
16200
16309
|
}
|
|
16201
16310
|
|
|
16202
16311
|
// ../../packages/core/dist/codexTranscriptSignals.js
|
|
16203
|
-
import { existsSync as
|
|
16312
|
+
import { existsSync as existsSync13, readFileSync as readFileSync10 } from "node:fs";
|
|
16204
16313
|
var MAX_ERROR_SNIPPETS2 = 10;
|
|
16205
16314
|
var MAX_ERROR_SNIPPET_LENGTH2 = 300;
|
|
16206
16315
|
var MAX_SEARCH_QUERIES2 = 10;
|
|
@@ -16209,7 +16318,7 @@ var MAX_FILE_EDIT_ENTRIES2 = 20;
|
|
|
16209
16318
|
function isRecord2(v) {
|
|
16210
16319
|
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
16211
16320
|
}
|
|
16212
|
-
function
|
|
16321
|
+
function parseTimestamp3(raw) {
|
|
16213
16322
|
if (typeof raw !== "string") return void 0;
|
|
16214
16323
|
const ms = Date.parse(raw);
|
|
16215
16324
|
return Number.isNaN(ms) ? void 0 : ms;
|
|
@@ -16265,7 +16374,7 @@ function addQuery(searchQueries, query) {
|
|
|
16265
16374
|
searchQueries.push(query.slice(0, MAX_SEARCH_QUERY_LENGTH2));
|
|
16266
16375
|
}
|
|
16267
16376
|
function readCodexSessionSignals(transcriptPath) {
|
|
16268
|
-
if (!transcriptPath || !
|
|
16377
|
+
if (!transcriptPath || !existsSync13(transcriptPath)) return null;
|
|
16269
16378
|
let raw;
|
|
16270
16379
|
try {
|
|
16271
16380
|
raw = readFileSync10(transcriptPath, "utf-8");
|
|
@@ -16291,7 +16400,7 @@ function readCodexSessionSignals(transcriptPath) {
|
|
|
16291
16400
|
} catch {
|
|
16292
16401
|
continue;
|
|
16293
16402
|
}
|
|
16294
|
-
const ts =
|
|
16403
|
+
const ts = parseTimestamp3(parsed.timestamp);
|
|
16295
16404
|
if (ts !== void 0) {
|
|
16296
16405
|
if (firstTs === void 0 || ts < firstTs) firstTs = ts;
|
|
16297
16406
|
if (lastTs === void 0 || ts > lastTs) lastTs = ts;
|
|
@@ -16383,7 +16492,7 @@ function markHit(db, keys, now2 = () => (/* @__PURE__ */ new Date()).toISOString
|
|
|
16383
16492
|
}
|
|
16384
16493
|
|
|
16385
16494
|
// ../../packages/core/dist/hookQueryLog.js
|
|
16386
|
-
import { appendFileSync, chmodSync as chmodSync2, mkdirSync as mkdirSync7, renameSync as renameSync4, statSync as
|
|
16495
|
+
import { appendFileSync, chmodSync as chmodSync2, mkdirSync as mkdirSync7, renameSync as renameSync4, statSync as statSync7, unlinkSync as unlinkSync3 } from "node:fs";
|
|
16387
16496
|
import { join as join11, resolve as resolve3 } from "node:path";
|
|
16388
16497
|
var CAVEAT_HOOK_QUERY_LOG_ENV = "CAVEAT_HOOK_QUERY_LOG";
|
|
16389
16498
|
var HOOK_QUERY_LOG_MAX_BYTES = 1024 * 1024;
|
|
@@ -16393,7 +16502,7 @@ var fsDependencies = {
|
|
|
16393
16502
|
chmodSync: chmodSync2,
|
|
16394
16503
|
mkdirSync: mkdirSync7,
|
|
16395
16504
|
renameSync: renameSync4,
|
|
16396
|
-
statSync:
|
|
16505
|
+
statSync: statSync7,
|
|
16397
16506
|
unlinkSync: unlinkSync3
|
|
16398
16507
|
};
|
|
16399
16508
|
function isMissingPathError(err) {
|
|
@@ -16481,7 +16590,7 @@ function listStale(db, opts = {}) {
|
|
|
16481
16590
|
|
|
16482
16591
|
// ../../packages/core/dist/publishScan.js
|
|
16483
16592
|
import { createHash as createHash5 } from "node:crypto";
|
|
16484
|
-
import { existsSync as
|
|
16593
|
+
import { existsSync as existsSync14, readFileSync as readFileSync11, writeFileSync as writeFileSync7 } from "node:fs";
|
|
16485
16594
|
import { join as join12, basename as basename2 } from "node:path";
|
|
16486
16595
|
import { homedir as homedir2, userInfo as userInfo2 } from "node:os";
|
|
16487
16596
|
var ALLOW_FILE = ".caveat-publish-allow.json";
|
|
@@ -16712,7 +16821,7 @@ function publishSelfIdentityTokens() {
|
|
|
16712
16821
|
}
|
|
16713
16822
|
function loadPublishAllow(knowledgeRepo) {
|
|
16714
16823
|
const path = join12(knowledgeRepo, ALLOW_FILE);
|
|
16715
|
-
if (!
|
|
16824
|
+
if (!existsSync14(path)) return /* @__PURE__ */ new Set();
|
|
16716
16825
|
const parsed = JSON.parse(readFileSync11(path, "utf-8"));
|
|
16717
16826
|
if (!Array.isArray(parsed.allow)) throw new Error(`${ALLOW_FILE} must contain an "allow" array`);
|
|
16718
16827
|
return new Set(parsed.allow.filter((value) => typeof value === "string" && DIGEST_RE.test(value)));
|
|
@@ -16742,7 +16851,7 @@ var PublishScanError = class extends Error {
|
|
|
16742
16851
|
|
|
16743
16852
|
// ../../packages/core/dist/publish.js
|
|
16744
16853
|
import { createHash as createHash6 } from "node:crypto";
|
|
16745
|
-
import { existsSync as
|
|
16854
|
+
import { existsSync as existsSync15, mkdirSync as mkdirSync8, readFileSync as readFileSync12, readdirSync as readdirSync8, rmSync as rmSync5, writeFileSync as writeFileSync8 } from "node:fs";
|
|
16746
16855
|
import { dirname as dirname7, join as join13, relative as relative3 } from "node:path";
|
|
16747
16856
|
|
|
16748
16857
|
// ../../packages/core/dist/visibility.js
|
|
@@ -16758,7 +16867,7 @@ var TMP_BRANCH = "caveat-publish-tmp";
|
|
|
16758
16867
|
function collectPublishSet(entriesDir) {
|
|
16759
16868
|
const files = [];
|
|
16760
16869
|
const invalid = [];
|
|
16761
|
-
if (!
|
|
16870
|
+
if (!existsSync15(entriesDir)) return { files, invalid };
|
|
16762
16871
|
for (const path of walkMarkdown(entriesDir)) {
|
|
16763
16872
|
const relPath = relative3(entriesDir, path).replace(/\\/g, "/");
|
|
16764
16873
|
const content = readFileSync12(path);
|
|
@@ -16779,7 +16888,7 @@ function collectPublishSet(entriesDir) {
|
|
|
16779
16888
|
}
|
|
16780
16889
|
async function preparePublishMirror(opts) {
|
|
16781
16890
|
const git = opts.git ?? createGit();
|
|
16782
|
-
if (!
|
|
16891
|
+
if (!existsSync15(opts.mirrorDir)) {
|
|
16783
16892
|
mkdirSync8(dirname7(opts.mirrorDir), { recursive: true });
|
|
16784
16893
|
await git.clone(opts.target, opts.mirrorDir);
|
|
16785
16894
|
} else {
|
|
@@ -16952,8 +17061,8 @@ function readExistingMirror(mirrorDir) {
|
|
|
16952
17061
|
const readmePath = join13(mirrorDir, "README.md");
|
|
16953
17062
|
const bundlePath = join13(mirrorDir, BUNDLE_RELPATH);
|
|
16954
17063
|
return {
|
|
16955
|
-
readme:
|
|
16956
|
-
bundle:
|
|
17064
|
+
readme: existsSync15(readmePath) ? readFileSync12(readmePath, "utf-8") : null,
|
|
17065
|
+
bundle: existsSync15(bundlePath) ? readFileSync12(bundlePath) : null
|
|
16957
17066
|
};
|
|
16958
17067
|
}
|
|
16959
17068
|
async function publishOwn(opts) {
|
|
@@ -17244,7 +17353,7 @@ function boundedCount(value) {
|
|
|
17244
17353
|
// ../../packages/core/dist/runtimeErrors.js
|
|
17245
17354
|
import { spawnSync } from "node:child_process";
|
|
17246
17355
|
import { createHash as createHash7, randomBytes as randomBytes3 } from "node:crypto";
|
|
17247
|
-
import { closeSync as closeSync2, constants, existsSync as
|
|
17356
|
+
import { closeSync as closeSync2, constants, existsSync as existsSync16, fstatSync, lstatSync, mkdirSync as mkdirSync9, openSync as openSync2, readFileSync as readFileSync13, renameSync as renameSync5, rmSync as rmSync6, statSync as statSync8, writeFileSync as writeFileSync9 } from "node:fs";
|
|
17248
17357
|
import { arch as hostArch, homedir as homedir3, platform as hostPlatform } from "node:os";
|
|
17249
17358
|
import { dirname as dirname8, join as join14 } from "node:path";
|
|
17250
17359
|
import { DatabaseSync as DatabaseSync3 } from "node:sqlite";
|
|
@@ -17311,7 +17420,7 @@ function fingerprint(code) {
|
|
|
17311
17420
|
return createHash7("sha256").update(`caveat\0${d.component}\0${code}\0${d.template}`).digest("hex");
|
|
17312
17421
|
}
|
|
17313
17422
|
function ensureSafeDir(dir, isWin, options2 = {}) {
|
|
17314
|
-
const existed =
|
|
17423
|
+
const existed = existsSync16(dir);
|
|
17315
17424
|
mkdirSync9(dir, { recursive: true, mode: 448 });
|
|
17316
17425
|
const s = lstatSync(dir);
|
|
17317
17426
|
if (!s.isDirectory() || s.isSymbolicLink()) throw Error("store_unsafe");
|
|
@@ -17333,9 +17442,11 @@ function canonicalReporting(value) {
|
|
|
17333
17442
|
}
|
|
17334
17443
|
var WINDOWS_ACL_VERIFY = String.raw`$p=$env:CAVEAT_ACL_PATH;$isDir=$env:CAVEAT_ACL_DIRECTORY -eq '1';$sid=[System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value;$acl=if($isDir){[System.IO.Directory]::GetAccessControl($p)}else{[System.IO.File]::GetAccessControl($p)};$owner=$acl.GetOwner([System.Security.Principal.SecurityIdentifier]).Value;if($owner -ne $sid){exit 41};$rules=@($acl.GetAccessRules($true,$true,[System.Security.Principal.SecurityIdentifier]));if($rules.Count -ne 1){exit 42};$r=$rules[0];if($r.IdentityReference.Value -ne $sid -or $r.AccessControlType -ne 'Allow' -or $r.IsInherited -or ($r.FileSystemRights -band [System.Security.AccessControl.FileSystemRights]::FullControl) -ne [System.Security.AccessControl.FileSystemRights]::FullControl){exit 43}`;
|
|
17335
17444
|
var WINDOWS_ACL_APPLY = String.raw`$p=$env:CAVEAT_ACL_PATH;$isDir=$env:CAVEAT_ACL_DIRECTORY -eq '1';$sid=[System.Security.Principal.WindowsIdentity]::GetCurrent().User;$acl=if($isDir){New-Object System.Security.AccessControl.DirectorySecurity}else{New-Object System.Security.AccessControl.FileSecurity};$acl.SetAccessRuleProtection($true,$false);$flags=if($isDir){[System.Security.AccessControl.InheritanceFlags]'ContainerInherit, ObjectInherit'}else{[System.Security.AccessControl.InheritanceFlags]::None};$rule=New-Object System.Security.AccessControl.FileSystemAccessRule($sid,'FullControl',$flags,[System.Security.AccessControl.PropagationFlags]::None,[System.Security.AccessControl.AccessControlType]::Allow);$acl.SetOwner($sid);$acl.AddAccessRule($rule);if($isDir){[System.IO.Directory]::SetAccessControl($p,$acl)}else{[System.IO.File]::SetAccessControl($p,$acl)};` + WINDOWS_ACL_VERIFY;
|
|
17445
|
+
var WINDOWS_ACL_TIMEOUT_MS = 15e3;
|
|
17336
17446
|
function runWindowsAcl(path, directory, apply) {
|
|
17337
|
-
const result = spawnSync("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", apply ? WINDOWS_ACL_APPLY : WINDOWS_ACL_VERIFY], { env: { ...process.env, CAVEAT_ACL_PATH: path, CAVEAT_ACL_DIRECTORY: directory ? "1" : "0" },
|
|
17338
|
-
if (result.
|
|
17447
|
+
const result = spawnSync("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", apply ? WINDOWS_ACL_APPLY : WINDOWS_ACL_VERIFY], { env: { ...process.env, CAVEAT_ACL_PATH: path, CAVEAT_ACL_DIRECTORY: directory ? "1" : "0" }, encoding: "utf-8", timeout: WINDOWS_ACL_TIMEOUT_MS, windowsHide: true });
|
|
17448
|
+
if (result.error !== void 0) throw Error(`store_unsafe: powershell spawn ${result.error.code ?? result.error.message}`);
|
|
17449
|
+
if (result.status !== 0) throw Error(`store_unsafe: powershell exit=${result.status} signal=${result.signal ?? "none"} stderr=${(result.stderr ?? "").replace(/\s+/g, " ").trim().slice(0, 400) || "(empty)"}`);
|
|
17339
17450
|
}
|
|
17340
17451
|
function secureWindowsAcl(path, runner, directory = false, apply = false) {
|
|
17341
17452
|
try {
|
|
@@ -17351,7 +17462,7 @@ function ensureSafeFile(path, isWin, options2 = {}) {
|
|
|
17351
17462
|
const s = lstatSync(path);
|
|
17352
17463
|
if (!s.isFile() || s.isSymbolicLink()) throw Error("store_unsafe");
|
|
17353
17464
|
if (isWin) secureWindowsAcl(path, options2.aclRunner);
|
|
17354
|
-
else assertPosix(
|
|
17465
|
+
else assertPosix(statSync8(path), 384);
|
|
17355
17466
|
}
|
|
17356
17467
|
function validate(store) {
|
|
17357
17468
|
if (!plain(store) || !exact(store, ["schema", "next_sequence", "acknowledged_through", "records"])) throw Error("state_invalid");
|
|
@@ -17369,7 +17480,7 @@ function validate(store) {
|
|
|
17369
17480
|
}
|
|
17370
17481
|
}
|
|
17371
17482
|
function readStore(path, isWin, options2 = {}) {
|
|
17372
|
-
if (!
|
|
17483
|
+
if (!existsSync16(path)) return empty();
|
|
17373
17484
|
ensureSafeFile(path, isWin, options2);
|
|
17374
17485
|
const value = JSON.parse(readFileSync13(path, "utf8"));
|
|
17375
17486
|
validate(value);
|
|
@@ -17387,7 +17498,7 @@ function lock(path, isWin, fn, options2 = {}) {
|
|
|
17387
17498
|
}
|
|
17388
17499
|
if (created) {
|
|
17389
17500
|
if (isWin) secureWindowsAcl(lockPath2, options2.aclRunner, false, true);
|
|
17390
|
-
else assertPosix(
|
|
17501
|
+
else assertPosix(statSync8(lockPath2), 384);
|
|
17391
17502
|
} else ensureSafeFile(lockPath2, isWin, options2);
|
|
17392
17503
|
const db = new DatabaseSync3(lockPath2);
|
|
17393
17504
|
let begun = false;
|
|
@@ -17415,7 +17526,7 @@ function writeStore(path, store, isWin, options2 = {}) {
|
|
|
17415
17526
|
writeFileSync9(temporary, `${JSON.stringify(store)}
|
|
17416
17527
|
`, { mode: 384, flag: "wx" });
|
|
17417
17528
|
if (isWin) secureWindowsAcl(temporary, options2.aclRunner, false, true);
|
|
17418
|
-
else assertPosix(
|
|
17529
|
+
else assertPosix(statSync8(temporary), 384);
|
|
17419
17530
|
renameSync5(temporary, path);
|
|
17420
17531
|
ensureSafeFile(path, isWin, options2);
|
|
17421
17532
|
} finally {
|
|
@@ -17592,7 +17703,7 @@ function generateSourceSession(now2 = () => /* @__PURE__ */ new Date()) {
|
|
|
17592
17703
|
}
|
|
17593
17704
|
|
|
17594
17705
|
// ../../packages/core/dist/writer.js
|
|
17595
|
-
import { existsSync as
|
|
17706
|
+
import { existsSync as existsSync17, mkdirSync as mkdirSync10, writeFileSync as writeFileSync10 } from "node:fs";
|
|
17596
17707
|
import { dirname as dirname9 } from "node:path";
|
|
17597
17708
|
function buildEntry(frontmatter, sections) {
|
|
17598
17709
|
const bodyParts = [];
|
|
@@ -17612,12 +17723,12 @@ ${body}${body ? "\n" : ""}`;
|
|
|
17612
17723
|
}
|
|
17613
17724
|
function writeEntryFile(filePath, content) {
|
|
17614
17725
|
const dir = dirname9(filePath);
|
|
17615
|
-
if (!
|
|
17726
|
+
if (!existsSync17(dir)) mkdirSync10(dir, { recursive: true });
|
|
17616
17727
|
writeFileSync10(filePath, content, "utf-8");
|
|
17617
17728
|
}
|
|
17618
17729
|
|
|
17619
17730
|
// ../../packages/core/dist/record.js
|
|
17620
|
-
import { statSync as
|
|
17731
|
+
import { statSync as statSync9 } from "node:fs";
|
|
17621
17732
|
import { join as join15 } from "node:path";
|
|
17622
17733
|
var DEFAULT_CATEGORY = "misc";
|
|
17623
17734
|
function recordEntry(input, opts) {
|
|
@@ -17656,7 +17767,7 @@ function recordEntry(input, opts) {
|
|
|
17656
17767
|
const relPath = `${category}/${id}.md`;
|
|
17657
17768
|
const filePath = join15(opts.entriesRoot, relPath);
|
|
17658
17769
|
writeEntryFile(filePath, built.content);
|
|
17659
|
-
const stat =
|
|
17770
|
+
const stat = statSync9(filePath);
|
|
17660
17771
|
upsertEntry(opts.db, {
|
|
17661
17772
|
id,
|
|
17662
17773
|
source,
|
|
@@ -17684,7 +17795,7 @@ function formatYmd(d) {
|
|
|
17684
17795
|
}
|
|
17685
17796
|
|
|
17686
17797
|
// ../../packages/core/dist/update.js
|
|
17687
|
-
import { readFileSync as readFileSync14, statSync as
|
|
17798
|
+
import { readFileSync as readFileSync14, statSync as statSync10, writeFileSync as writeFileSync11 } from "node:fs";
|
|
17688
17799
|
import { join as join16 } from "node:path";
|
|
17689
17800
|
var IMMUTABLE_KEYS = /* @__PURE__ */ new Set([
|
|
17690
17801
|
"id",
|
|
@@ -17747,7 +17858,7 @@ function updateEntry(id, patch, opts) {
|
|
|
17747
17858
|
}
|
|
17748
17859
|
const built = buildEntry(mergedFrontmatter, mergedSections);
|
|
17749
17860
|
writeFileSync11(filePath, built.content, "utf-8");
|
|
17750
|
-
const stat =
|
|
17861
|
+
const stat = statSync10(filePath);
|
|
17751
17862
|
upsertEntry(opts.db, {
|
|
17752
17863
|
id,
|
|
17753
17864
|
source,
|
|
@@ -17810,9 +17921,11 @@ export {
|
|
|
17810
17921
|
KNOWLEDGE_GITIGNORE,
|
|
17811
17922
|
initOwnSync,
|
|
17812
17923
|
AUTO_SYNC_DEBOUNCE_MS,
|
|
17924
|
+
AUTO_SYNC_RECORD_DEBOUNCE_MS,
|
|
17813
17925
|
CAVEAT_AUTO_SYNC_ENV,
|
|
17814
17926
|
resetAutoSyncFailureState,
|
|
17815
17927
|
runAutoSync,
|
|
17928
|
+
triggerAutoSync,
|
|
17816
17929
|
search,
|
|
17817
17930
|
get,
|
|
17818
17931
|
listRecent,
|
|
@@ -17872,4 +17985,4 @@ strip-bom-string/index.js:
|
|
|
17872
17985
|
js-yaml/dist/js-yaml.mjs:
|
|
17873
17986
|
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
17874
17987
|
*/
|
|
17875
|
-
//# sourceMappingURL=chunk-
|
|
17988
|
+
//# sourceMappingURL=chunk-TRIQ5WFY.js.map
|