drizzle-kit 0.20.17-5938f5d → 0.20.17-7446198
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/@types/utils.d.ts +1 -0
- package/bin.cjs +62690 -34323
- package/cli/commands/migrate.d.ts +4 -4
- package/cli/commands/mysqlIntrospect.d.ts +1 -6
- package/cli/commands/pgIntrospect.d.ts +1 -1
- package/cli/commands/sqliteIntrospect.d.ts +0 -1
- package/cli/commands/sqlitePushUtils.d.ts +2 -2
- package/cli/commands/utils.d.ts +125 -3
- package/cli/connections.d.ts +18 -0
- package/cli/validations/cli.d.ts +65 -65
- package/cli/validations/common.d.ts +13 -13
- package/cli/validations/mysql.d.ts +3 -9
- package/cli/validations/outputs.d.ts +2 -2
- package/cli/validations/pg.d.ts +18 -3
- package/cli/validations/sqlite.d.ts +0 -12
- package/cli/validations/studio.d.ts +92 -0
- package/cli/views.d.ts +7 -0
- package/index.d.mts +12 -56
- package/index.d.ts +12 -56
- package/package.json +5 -2
- package/payload.js +1337 -19691
- package/payload.mjs +1334 -19688
- package/schemaValidator.d.ts +13 -13
- package/serializer/mysqlSchema.d.ts +19 -333
- package/serializer/pgSchema.d.ts +14 -14
- package/serializer/studio.d.ts +53 -0
- package/snapshotsDiffer.d.ts +1 -2
- package/utils-studio.js +191 -2641
- package/utils-studio.mjs +191 -2641
- package/utils.d.ts +6 -0
- package/utils.js +8 -18
- package/utils.mjs +8 -18
package/utils-studio.js
CHANGED
|
@@ -4335,7 +4335,7 @@ var init_lib = __esm({
|
|
|
4335
4335
|
});
|
|
4336
4336
|
|
|
4337
4337
|
// src/serializer/mysqlSchema.ts
|
|
4338
|
-
var index, fk, column, tableV3, compositePK, uniqueConstraint, tableV4, table, kitInternals, dialect, schemaHash, schemaInternalV3, schemaInternalV4, schemaInternalV5,
|
|
4338
|
+
var index, fk, column, tableV3, compositePK, uniqueConstraint, tableV4, table, kitInternals, dialect, schemaHash, schemaInternalV3, schemaInternalV4, schemaInternalV5, schemaInternal, schemaV3, schemaV4, schemaV5, schema, tableSquashedV4, tableSquashed, schemaSquashed, schemaSquashedV4, mysqlSchema, mysqlSchemaV5, backwardCompatibleMysqlSchema, dryMySql;
|
|
4339
4339
|
var init_mysqlSchema = __esm({
|
|
4340
4340
|
"src/serializer/mysqlSchema.ts"() {
|
|
4341
4341
|
"use strict";
|
|
@@ -4435,18 +4435,8 @@ var init_mysqlSchema = __esm({
|
|
|
4435
4435
|
}),
|
|
4436
4436
|
internal: kitInternals
|
|
4437
4437
|
}).strict();
|
|
4438
|
-
schemaInternalV6 = objectType({
|
|
4439
|
-
version: literalType("6"),
|
|
4440
|
-
dialect,
|
|
4441
|
-
tables: recordType(stringType(), table),
|
|
4442
|
-
_meta: objectType({
|
|
4443
|
-
tables: recordType(stringType(), stringType()),
|
|
4444
|
-
columns: recordType(stringType(), stringType())
|
|
4445
|
-
}),
|
|
4446
|
-
internal: kitInternals
|
|
4447
|
-
}).strict();
|
|
4448
4438
|
schemaInternal = objectType({
|
|
4449
|
-
version: literalType("
|
|
4439
|
+
version: literalType("5"),
|
|
4450
4440
|
dialect,
|
|
4451
4441
|
tables: recordType(stringType(), table),
|
|
4452
4442
|
_meta: objectType({
|
|
@@ -4475,7 +4465,7 @@ var init_mysqlSchema = __esm({
|
|
|
4475
4465
|
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
|
4476
4466
|
}).strict();
|
|
4477
4467
|
schemaSquashed = objectType({
|
|
4478
|
-
version: literalType("
|
|
4468
|
+
version: literalType("5"),
|
|
4479
4469
|
dialect,
|
|
4480
4470
|
tables: recordType(stringType(), tableSquashed)
|
|
4481
4471
|
}).strict();
|
|
@@ -4489,7 +4479,7 @@ var init_mysqlSchema = __esm({
|
|
|
4489
4479
|
mysqlSchemaV5 = schemaV5;
|
|
4490
4480
|
backwardCompatibleMysqlSchema = unionType([mysqlSchemaV5, schema]);
|
|
4491
4481
|
dryMySql = mysqlSchema.parse({
|
|
4492
|
-
version:
|
|
4482
|
+
version: "5",
|
|
4493
4483
|
dialect: "mysql",
|
|
4494
4484
|
id: originUUID,
|
|
4495
4485
|
prevId: "",
|
|
@@ -4689,7 +4679,7 @@ var init_pgSchema = __esm({
|
|
|
4689
4679
|
}).strict();
|
|
4690
4680
|
pgSchemaInternal = objectType({
|
|
4691
4681
|
version: literalType("6"),
|
|
4692
|
-
dialect: literalType("
|
|
4682
|
+
dialect: literalType("postgresql"),
|
|
4693
4683
|
tables: recordType(stringType(), table2),
|
|
4694
4684
|
enums: recordType(stringType(), enumSchema),
|
|
4695
4685
|
schemas: recordType(stringType(), stringType()),
|
|
@@ -4697,2633 +4687,192 @@ var init_pgSchema = __esm({
|
|
|
4697
4687
|
schemas: recordType(stringType(), stringType()),
|
|
4698
4688
|
tables: recordType(stringType(), stringType()),
|
|
4699
4689
|
columns: recordType(stringType(), stringType())
|
|
4700
|
-
}),
|
|
4701
|
-
internal: kitInternals2
|
|
4702
|
-
}).strict();
|
|
4703
|
-
tableSquashed2 = objectType({
|
|
4704
|
-
name: stringType(),
|
|
4705
|
-
schema: stringType(),
|
|
4706
|
-
columns: recordType(stringType(), column2),
|
|
4707
|
-
indexes: recordType(stringType(), stringType()),
|
|
4708
|
-
foreignKeys: recordType(stringType(), stringType()),
|
|
4709
|
-
compositePrimaryKeys: recordType(stringType(), stringType()),
|
|
4710
|
-
uniqueConstraints: recordType(stringType(), stringType())
|
|
4711
|
-
}).strict();
|
|
4712
|
-
tableSquashedV42 = objectType({
|
|
4713
|
-
name: stringType(),
|
|
4714
|
-
schema: stringType(),
|
|
4715
|
-
columns: recordType(stringType(), column2),
|
|
4716
|
-
indexes: recordType(stringType(), stringType()),
|
|
4717
|
-
foreignKeys: recordType(stringType(), stringType())
|
|
4718
|
-
}).strict();
|
|
4719
|
-
pgSchemaSquashedV4 = objectType({
|
|
4720
|
-
version: literalType("4"),
|
|
4721
|
-
dialect:
|
|
4722
|
-
tables: recordType(stringType(), tableSquashedV42),
|
|
4723
|
-
enums: recordType(stringType(), enumSchemaV1),
|
|
4724
|
-
schemas: recordType(stringType(), stringType())
|
|
4725
|
-
}).strict();
|
|
4726
|
-
pgSchemaSquashed = objectType({
|
|
4727
|
-
version: literalType("6"),
|
|
4728
|
-
dialect:
|
|
4729
|
-
tables: recordType(stringType(), tableSquashed2),
|
|
4730
|
-
enums: recordType(stringType(), enumSchema),
|
|
4731
|
-
schemas: recordType(stringType(), stringType())
|
|
4732
|
-
}).strict();
|
|
4733
|
-
pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
|
4734
|
-
pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
|
4735
|
-
pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
|
4736
|
-
pgSchema2 = pgSchemaInternal.merge(schemaHash2);
|
|
4737
|
-
backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema2]);
|
|
4738
|
-
dryPg = pgSchema2.parse({
|
|
4739
|
-
version: snapshotVersion,
|
|
4740
|
-
dialect: "
|
|
4741
|
-
id: originUUID,
|
|
4742
|
-
prevId: "",
|
|
4743
|
-
tables: {},
|
|
4744
|
-
enums: {},
|
|
4745
|
-
schemas: {},
|
|
4746
|
-
_meta: {
|
|
4747
|
-
schemas: {},
|
|
4748
|
-
tables: {},
|
|
4749
|
-
columns: {}
|
|
4750
|
-
}
|
|
4751
|
-
});
|
|
4752
|
-
}
|
|
4753
|
-
});
|
|
4754
|
-
|
|
4755
|
-
// src/serializer/sqliteSchema.ts
|
|
4756
|
-
var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, latestVersion, schemaInternal2, schemaV32, schemaV42, schema2, tableSquashed3, schemaSquashed2, drySQLite;
|
|
4757
|
-
var init_sqliteSchema = __esm({
|
|
4758
|
-
"src/serializer/sqliteSchema.ts"() {
|
|
4759
|
-
"use strict";
|
|
4760
|
-
init_global();
|
|
4761
|
-
init_lib();
|
|
4762
|
-
index3 = objectType({
|
|
4763
|
-
name: stringType(),
|
|
4764
|
-
columns: stringType().array(),
|
|
4765
|
-
where: stringType().optional(),
|
|
4766
|
-
isUnique: booleanType()
|
|
4767
|
-
}).strict();
|
|
4768
|
-
fk3 = objectType({
|
|
4769
|
-
name: stringType(),
|
|
4770
|
-
tableFrom: stringType(),
|
|
4771
|
-
columnsFrom: stringType().array(),
|
|
4772
|
-
tableTo: stringType(),
|
|
4773
|
-
columnsTo: stringType().array(),
|
|
4774
|
-
onUpdate: stringType().optional(),
|
|
4775
|
-
onDelete: stringType().optional()
|
|
4776
|
-
}).strict();
|
|
4777
|
-
compositePK3 = objectType({
|
|
4778
|
-
columns: stringType().array(),
|
|
4779
|
-
name: stringType().optional()
|
|
4780
|
-
}).strict();
|
|
4781
|
-
column3 = objectType({
|
|
4782
|
-
name: stringType(),
|
|
4783
|
-
type: stringType(),
|
|
4784
|
-
primaryKey: booleanType(),
|
|
4785
|
-
notNull: booleanType(),
|
|
4786
|
-
autoincrement: booleanType().optional(),
|
|
4787
|
-
default: anyType().optional()
|
|
4788
|
-
}).strict();
|
|
4789
|
-
tableV33 = objectType({
|
|
4790
|
-
name: stringType(),
|
|
4791
|
-
columns: recordType(stringType(), column3),
|
|
4792
|
-
indexes: recordType(stringType(), index3),
|
|
4793
|
-
foreignKeys: recordType(stringType(), fk3)
|
|
4794
|
-
}).strict();
|
|
4795
|
-
uniqueConstraint3 = objectType({
|
|
4796
|
-
name: stringType(),
|
|
4797
|
-
columns: stringType().array()
|
|
4798
|
-
}).strict();
|
|
4799
|
-
table3 = objectType({
|
|
4800
|
-
name: stringType(),
|
|
4801
|
-
columns: recordType(stringType(), column3),
|
|
4802
|
-
indexes: recordType(stringType(), index3),
|
|
4803
|
-
foreignKeys: recordType(stringType(), fk3),
|
|
4804
|
-
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
|
4805
|
-
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
|
4806
|
-
}).strict();
|
|
4807
|
-
dialect2 = enumType(["sqlite"]);
|
|
4808
|
-
schemaHash3 = objectType({
|
|
4809
|
-
id: stringType(),
|
|
4810
|
-
prevId: stringType()
|
|
4811
|
-
}).strict();
|
|
4812
|
-
schemaInternalV32 = objectType({
|
|
4813
|
-
version: literalType("3"),
|
|
4814
|
-
dialect: dialect2,
|
|
4815
|
-
tables: recordType(stringType(), tableV33),
|
|
4816
|
-
enums: objectType({})
|
|
4817
|
-
}).strict();
|
|
4818
|
-
schemaInternalV42 = objectType({
|
|
4819
|
-
version: literalType("4"),
|
|
4820
|
-
dialect: dialect2,
|
|
4821
|
-
tables: recordType(stringType(), table3),
|
|
4822
|
-
enums: objectType({})
|
|
4823
|
-
}).strict();
|
|
4824
|
-
latestVersion = literalType("5");
|
|
4825
|
-
schemaInternal2 = objectType({
|
|
4826
|
-
version: latestVersion,
|
|
4827
|
-
dialect: dialect2,
|
|
4828
|
-
tables: recordType(stringType(), table3),
|
|
4829
|
-
enums: objectType({}),
|
|
4830
|
-
_meta: objectType({
|
|
4831
|
-
tables: recordType(stringType(), stringType()),
|
|
4832
|
-
columns: recordType(stringType(), stringType())
|
|
4833
|
-
})
|
|
4834
|
-
}).strict();
|
|
4835
|
-
schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
|
|
4836
|
-
schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
|
|
4837
|
-
schema2 = schemaInternal2.merge(schemaHash3).strict();
|
|
4838
|
-
tableSquashed3 = objectType({
|
|
4839
|
-
name: stringType(),
|
|
4840
|
-
columns: recordType(stringType(), column3),
|
|
4841
|
-
indexes: recordType(stringType(), stringType()),
|
|
4842
|
-
foreignKeys: recordType(stringType(), stringType()),
|
|
4843
|
-
compositePrimaryKeys: recordType(stringType(), stringType()),
|
|
4844
|
-
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
|
4845
|
-
}).strict();
|
|
4846
|
-
schemaSquashed2 = objectType({
|
|
4847
|
-
version: latestVersion,
|
|
4848
|
-
dialect: dialect2,
|
|
4849
|
-
tables: recordType(stringType(), tableSquashed3),
|
|
4850
|
-
enums: anyType()
|
|
4851
|
-
}).strict();
|
|
4852
|
-
drySQLite = schema2.parse({
|
|
4853
|
-
version: "5",
|
|
4854
|
-
dialect: "sqlite",
|
|
4855
|
-
id: originUUID,
|
|
4856
|
-
prevId: "",
|
|
4857
|
-
tables: {},
|
|
4858
|
-
enums: {},
|
|
4859
|
-
_meta: {
|
|
4860
|
-
tables: {},
|
|
4861
|
-
columns: {}
|
|
4862
|
-
}
|
|
4863
|
-
});
|
|
4864
|
-
}
|
|
4865
|
-
});
|
|
4866
|
-
|
|
4867
|
-
// src/utils.ts
|
|
4868
|
-
var init_utils = __esm({
|
|
4869
|
-
"src/utils.ts"() {
|
|
4870
|
-
"use strict";
|
|
4871
|
-
init_views();
|
|
4872
|
-
init_mysqlSchema();
|
|
4873
|
-
init_pgSchema();
|
|
4874
|
-
init_sqliteSchema();
|
|
4875
|
-
init_global();
|
|
4876
|
-
}
|
|
4877
|
-
});
|
|
4878
|
-
|
|
4879
|
-
// src/cli/views.ts
|
|
4880
|
-
var import_hanji;
|
|
4881
|
-
var init_views = __esm({
|
|
4882
|
-
"src/cli/views.ts"() {
|
|
4883
|
-
"use strict";
|
|
4884
|
-
import_hanji = __toESM(require_hanji());
|
|
4885
|
-
init_utils();
|
|
4886
|
-
}
|
|
4887
|
-
});
|
|
4888
|
-
|
|
4889
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/constants.js
|
|
4890
|
-
var require_constants = __commonJS({
|
|
4891
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
4892
|
-
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
4893
|
-
var MAX_LENGTH = 256;
|
|
4894
|
-
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
4895
|
-
9007199254740991;
|
|
4896
|
-
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
4897
|
-
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
4898
|
-
var RELEASE_TYPES = [
|
|
4899
|
-
"major",
|
|
4900
|
-
"premajor",
|
|
4901
|
-
"minor",
|
|
4902
|
-
"preminor",
|
|
4903
|
-
"patch",
|
|
4904
|
-
"prepatch",
|
|
4905
|
-
"prerelease"
|
|
4906
|
-
];
|
|
4907
|
-
module2.exports = {
|
|
4908
|
-
MAX_LENGTH,
|
|
4909
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
4910
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
4911
|
-
MAX_SAFE_INTEGER,
|
|
4912
|
-
RELEASE_TYPES,
|
|
4913
|
-
SEMVER_SPEC_VERSION,
|
|
4914
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
4915
|
-
FLAG_LOOSE: 2
|
|
4916
|
-
};
|
|
4917
|
-
}
|
|
4918
|
-
});
|
|
4919
|
-
|
|
4920
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/debug.js
|
|
4921
|
-
var require_debug = __commonJS({
|
|
4922
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
4923
|
-
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
4924
|
-
};
|
|
4925
|
-
module2.exports = debug;
|
|
4926
|
-
}
|
|
4927
|
-
});
|
|
4928
|
-
|
|
4929
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/re.js
|
|
4930
|
-
var require_re = __commonJS({
|
|
4931
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/re.js"(exports2, module2) {
|
|
4932
|
-
var {
|
|
4933
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
4934
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
4935
|
-
MAX_LENGTH
|
|
4936
|
-
} = require_constants();
|
|
4937
|
-
var debug = require_debug();
|
|
4938
|
-
exports2 = module2.exports = {};
|
|
4939
|
-
var re = exports2.re = [];
|
|
4940
|
-
var safeRe = exports2.safeRe = [];
|
|
4941
|
-
var src = exports2.src = [];
|
|
4942
|
-
var t = exports2.t = {};
|
|
4943
|
-
var R = 0;
|
|
4944
|
-
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
4945
|
-
var safeRegexReplacements = [
|
|
4946
|
-
["\\s", 1],
|
|
4947
|
-
["\\d", MAX_LENGTH],
|
|
4948
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
4949
|
-
];
|
|
4950
|
-
var makeSafeRegex = (value) => {
|
|
4951
|
-
for (const [token, max] of safeRegexReplacements) {
|
|
4952
|
-
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
4953
|
-
}
|
|
4954
|
-
return value;
|
|
4955
|
-
};
|
|
4956
|
-
var createToken = (name, value, isGlobal) => {
|
|
4957
|
-
const safe = makeSafeRegex(value);
|
|
4958
|
-
const index4 = R++;
|
|
4959
|
-
debug(name, index4, value);
|
|
4960
|
-
t[name] = index4;
|
|
4961
|
-
src[index4] = value;
|
|
4962
|
-
re[index4] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
4963
|
-
safeRe[index4] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
4964
|
-
};
|
|
4965
|
-
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
4966
|
-
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
4967
|
-
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
4968
|
-
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
4969
|
-
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
4970
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
4971
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
4972
|
-
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
4973
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
4974
|
-
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
4975
|
-
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
4976
|
-
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
4977
|
-
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
4978
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
4979
|
-
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
4980
|
-
createToken("GTLT", "((?:<|>)?=?)");
|
|
4981
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
4982
|
-
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
4983
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
4984
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
4985
|
-
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
4986
|
-
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
4987
|
-
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
4988
|
-
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
4989
|
-
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
4990
|
-
createToken("COERCERTL", src[t.COERCE], true);
|
|
4991
|
-
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
4992
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
4993
|
-
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
4994
|
-
exports2.tildeTrimReplace = "$1~";
|
|
4995
|
-
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
4996
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
4997
|
-
createToken("LONECARET", "(?:\\^)");
|
|
4998
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
4999
|
-
exports2.caretTrimReplace = "$1^";
|
|
5000
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
5001
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
5002
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
5003
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
5004
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
5005
|
-
exports2.comparatorTrimReplace = "$1$2$3";
|
|
5006
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
5007
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
5008
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
5009
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
5010
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
5011
|
-
}
|
|
5012
|
-
});
|
|
5013
|
-
|
|
5014
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/parse-options.js
|
|
5015
|
-
var require_parse_options = __commonJS({
|
|
5016
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
5017
|
-
var looseOption = Object.freeze({ loose: true });
|
|
5018
|
-
var emptyOpts = Object.freeze({});
|
|
5019
|
-
var parseOptions = (options) => {
|
|
5020
|
-
if (!options) {
|
|
5021
|
-
return emptyOpts;
|
|
5022
|
-
}
|
|
5023
|
-
if (typeof options !== "object") {
|
|
5024
|
-
return looseOption;
|
|
5025
|
-
}
|
|
5026
|
-
return options;
|
|
5027
|
-
};
|
|
5028
|
-
module2.exports = parseOptions;
|
|
5029
|
-
}
|
|
5030
|
-
});
|
|
5031
|
-
|
|
5032
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/identifiers.js
|
|
5033
|
-
var require_identifiers = __commonJS({
|
|
5034
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
5035
|
-
var numeric = /^[0-9]+$/;
|
|
5036
|
-
var compareIdentifiers = (a, b) => {
|
|
5037
|
-
const anum = numeric.test(a);
|
|
5038
|
-
const bnum = numeric.test(b);
|
|
5039
|
-
if (anum && bnum) {
|
|
5040
|
-
a = +a;
|
|
5041
|
-
b = +b;
|
|
5042
|
-
}
|
|
5043
|
-
return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
|
|
5044
|
-
};
|
|
5045
|
-
var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a);
|
|
5046
|
-
module2.exports = {
|
|
5047
|
-
compareIdentifiers,
|
|
5048
|
-
rcompareIdentifiers
|
|
5049
|
-
};
|
|
5050
|
-
}
|
|
5051
|
-
});
|
|
5052
|
-
|
|
5053
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/semver.js
|
|
5054
|
-
var require_semver = __commonJS({
|
|
5055
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
5056
|
-
var debug = require_debug();
|
|
5057
|
-
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
5058
|
-
var { safeRe: re, t } = require_re();
|
|
5059
|
-
var parseOptions = require_parse_options();
|
|
5060
|
-
var { compareIdentifiers } = require_identifiers();
|
|
5061
|
-
var SemVer = class _SemVer {
|
|
5062
|
-
constructor(version, options) {
|
|
5063
|
-
options = parseOptions(options);
|
|
5064
|
-
if (version instanceof _SemVer) {
|
|
5065
|
-
if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
|
|
5066
|
-
return version;
|
|
5067
|
-
} else {
|
|
5068
|
-
version = version.version;
|
|
5069
|
-
}
|
|
5070
|
-
} else if (typeof version !== "string") {
|
|
5071
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
|
|
5072
|
-
}
|
|
5073
|
-
if (version.length > MAX_LENGTH) {
|
|
5074
|
-
throw new TypeError(
|
|
5075
|
-
`version is longer than ${MAX_LENGTH} characters`
|
|
5076
|
-
);
|
|
5077
|
-
}
|
|
5078
|
-
debug("SemVer", version, options);
|
|
5079
|
-
this.options = options;
|
|
5080
|
-
this.loose = !!options.loose;
|
|
5081
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
5082
|
-
const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
5083
|
-
if (!m) {
|
|
5084
|
-
throw new TypeError(`Invalid Version: ${version}`);
|
|
5085
|
-
}
|
|
5086
|
-
this.raw = version;
|
|
5087
|
-
this.major = +m[1];
|
|
5088
|
-
this.minor = +m[2];
|
|
5089
|
-
this.patch = +m[3];
|
|
5090
|
-
if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
|
|
5091
|
-
throw new TypeError("Invalid major version");
|
|
5092
|
-
}
|
|
5093
|
-
if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
|
|
5094
|
-
throw new TypeError("Invalid minor version");
|
|
5095
|
-
}
|
|
5096
|
-
if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
|
|
5097
|
-
throw new TypeError("Invalid patch version");
|
|
5098
|
-
}
|
|
5099
|
-
if (!m[4]) {
|
|
5100
|
-
this.prerelease = [];
|
|
5101
|
-
} else {
|
|
5102
|
-
this.prerelease = m[4].split(".").map((id) => {
|
|
5103
|
-
if (/^[0-9]+$/.test(id)) {
|
|
5104
|
-
const num = +id;
|
|
5105
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER) {
|
|
5106
|
-
return num;
|
|
5107
|
-
}
|
|
5108
|
-
}
|
|
5109
|
-
return id;
|
|
5110
|
-
});
|
|
5111
|
-
}
|
|
5112
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
5113
|
-
this.format();
|
|
5114
|
-
}
|
|
5115
|
-
format() {
|
|
5116
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
5117
|
-
if (this.prerelease.length) {
|
|
5118
|
-
this.version += `-${this.prerelease.join(".")}`;
|
|
5119
|
-
}
|
|
5120
|
-
return this.version;
|
|
5121
|
-
}
|
|
5122
|
-
toString() {
|
|
5123
|
-
return this.version;
|
|
5124
|
-
}
|
|
5125
|
-
compare(other) {
|
|
5126
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
5127
|
-
if (!(other instanceof _SemVer)) {
|
|
5128
|
-
if (typeof other === "string" && other === this.version) {
|
|
5129
|
-
return 0;
|
|
5130
|
-
}
|
|
5131
|
-
other = new _SemVer(other, this.options);
|
|
5132
|
-
}
|
|
5133
|
-
if (other.version === this.version) {
|
|
5134
|
-
return 0;
|
|
5135
|
-
}
|
|
5136
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
5137
|
-
}
|
|
5138
|
-
compareMain(other) {
|
|
5139
|
-
if (!(other instanceof _SemVer)) {
|
|
5140
|
-
other = new _SemVer(other, this.options);
|
|
5141
|
-
}
|
|
5142
|
-
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
5143
|
-
}
|
|
5144
|
-
comparePre(other) {
|
|
5145
|
-
if (!(other instanceof _SemVer)) {
|
|
5146
|
-
other = new _SemVer(other, this.options);
|
|
5147
|
-
}
|
|
5148
|
-
if (this.prerelease.length && !other.prerelease.length) {
|
|
5149
|
-
return -1;
|
|
5150
|
-
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
5151
|
-
return 1;
|
|
5152
|
-
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
5153
|
-
return 0;
|
|
5154
|
-
}
|
|
5155
|
-
let i = 0;
|
|
5156
|
-
do {
|
|
5157
|
-
const a = this.prerelease[i];
|
|
5158
|
-
const b = other.prerelease[i];
|
|
5159
|
-
debug("prerelease compare", i, a, b);
|
|
5160
|
-
if (a === void 0 && b === void 0) {
|
|
5161
|
-
return 0;
|
|
5162
|
-
} else if (b === void 0) {
|
|
5163
|
-
return 1;
|
|
5164
|
-
} else if (a === void 0) {
|
|
5165
|
-
return -1;
|
|
5166
|
-
} else if (a === b) {
|
|
5167
|
-
continue;
|
|
5168
|
-
} else {
|
|
5169
|
-
return compareIdentifiers(a, b);
|
|
5170
|
-
}
|
|
5171
|
-
} while (++i);
|
|
5172
|
-
}
|
|
5173
|
-
compareBuild(other) {
|
|
5174
|
-
if (!(other instanceof _SemVer)) {
|
|
5175
|
-
other = new _SemVer(other, this.options);
|
|
5176
|
-
}
|
|
5177
|
-
let i = 0;
|
|
5178
|
-
do {
|
|
5179
|
-
const a = this.build[i];
|
|
5180
|
-
const b = other.build[i];
|
|
5181
|
-
debug("prerelease compare", i, a, b);
|
|
5182
|
-
if (a === void 0 && b === void 0) {
|
|
5183
|
-
return 0;
|
|
5184
|
-
} else if (b === void 0) {
|
|
5185
|
-
return 1;
|
|
5186
|
-
} else if (a === void 0) {
|
|
5187
|
-
return -1;
|
|
5188
|
-
} else if (a === b) {
|
|
5189
|
-
continue;
|
|
5190
|
-
} else {
|
|
5191
|
-
return compareIdentifiers(a, b);
|
|
5192
|
-
}
|
|
5193
|
-
} while (++i);
|
|
5194
|
-
}
|
|
5195
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
5196
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
5197
|
-
inc(release, identifier, identifierBase) {
|
|
5198
|
-
switch (release) {
|
|
5199
|
-
case "premajor":
|
|
5200
|
-
this.prerelease.length = 0;
|
|
5201
|
-
this.patch = 0;
|
|
5202
|
-
this.minor = 0;
|
|
5203
|
-
this.major++;
|
|
5204
|
-
this.inc("pre", identifier, identifierBase);
|
|
5205
|
-
break;
|
|
5206
|
-
case "preminor":
|
|
5207
|
-
this.prerelease.length = 0;
|
|
5208
|
-
this.patch = 0;
|
|
5209
|
-
this.minor++;
|
|
5210
|
-
this.inc("pre", identifier, identifierBase);
|
|
5211
|
-
break;
|
|
5212
|
-
case "prepatch":
|
|
5213
|
-
this.prerelease.length = 0;
|
|
5214
|
-
this.inc("patch", identifier, identifierBase);
|
|
5215
|
-
this.inc("pre", identifier, identifierBase);
|
|
5216
|
-
break;
|
|
5217
|
-
case "prerelease":
|
|
5218
|
-
if (this.prerelease.length === 0) {
|
|
5219
|
-
this.inc("patch", identifier, identifierBase);
|
|
5220
|
-
}
|
|
5221
|
-
this.inc("pre", identifier, identifierBase);
|
|
5222
|
-
break;
|
|
5223
|
-
case "major":
|
|
5224
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
5225
|
-
this.major++;
|
|
5226
|
-
}
|
|
5227
|
-
this.minor = 0;
|
|
5228
|
-
this.patch = 0;
|
|
5229
|
-
this.prerelease = [];
|
|
5230
|
-
break;
|
|
5231
|
-
case "minor":
|
|
5232
|
-
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
5233
|
-
this.minor++;
|
|
5234
|
-
}
|
|
5235
|
-
this.patch = 0;
|
|
5236
|
-
this.prerelease = [];
|
|
5237
|
-
break;
|
|
5238
|
-
case "patch":
|
|
5239
|
-
if (this.prerelease.length === 0) {
|
|
5240
|
-
this.patch++;
|
|
5241
|
-
}
|
|
5242
|
-
this.prerelease = [];
|
|
5243
|
-
break;
|
|
5244
|
-
case "pre": {
|
|
5245
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
5246
|
-
if (!identifier && identifierBase === false) {
|
|
5247
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
5248
|
-
}
|
|
5249
|
-
if (this.prerelease.length === 0) {
|
|
5250
|
-
this.prerelease = [base];
|
|
5251
|
-
} else {
|
|
5252
|
-
let i = this.prerelease.length;
|
|
5253
|
-
while (--i >= 0) {
|
|
5254
|
-
if (typeof this.prerelease[i] === "number") {
|
|
5255
|
-
this.prerelease[i]++;
|
|
5256
|
-
i = -2;
|
|
5257
|
-
}
|
|
5258
|
-
}
|
|
5259
|
-
if (i === -1) {
|
|
5260
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
5261
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
5262
|
-
}
|
|
5263
|
-
this.prerelease.push(base);
|
|
5264
|
-
}
|
|
5265
|
-
}
|
|
5266
|
-
if (identifier) {
|
|
5267
|
-
let prerelease = [identifier, base];
|
|
5268
|
-
if (identifierBase === false) {
|
|
5269
|
-
prerelease = [identifier];
|
|
5270
|
-
}
|
|
5271
|
-
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
5272
|
-
if (isNaN(this.prerelease[1])) {
|
|
5273
|
-
this.prerelease = prerelease;
|
|
5274
|
-
}
|
|
5275
|
-
} else {
|
|
5276
|
-
this.prerelease = prerelease;
|
|
5277
|
-
}
|
|
5278
|
-
}
|
|
5279
|
-
break;
|
|
5280
|
-
}
|
|
5281
|
-
default:
|
|
5282
|
-
throw new Error(`invalid increment argument: ${release}`);
|
|
5283
|
-
}
|
|
5284
|
-
this.raw = this.format();
|
|
5285
|
-
if (this.build.length) {
|
|
5286
|
-
this.raw += `+${this.build.join(".")}`;
|
|
5287
|
-
}
|
|
5288
|
-
return this;
|
|
5289
|
-
}
|
|
5290
|
-
};
|
|
5291
|
-
module2.exports = SemVer;
|
|
5292
|
-
}
|
|
5293
|
-
});
|
|
5294
|
-
|
|
5295
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/parse.js
|
|
5296
|
-
var require_parse = __commonJS({
|
|
5297
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
5298
|
-
var SemVer = require_semver();
|
|
5299
|
-
var parse = (version, options, throwErrors = false) => {
|
|
5300
|
-
if (version instanceof SemVer) {
|
|
5301
|
-
return version;
|
|
5302
|
-
}
|
|
5303
|
-
try {
|
|
5304
|
-
return new SemVer(version, options);
|
|
5305
|
-
} catch (er) {
|
|
5306
|
-
if (!throwErrors) {
|
|
5307
|
-
return null;
|
|
5308
|
-
}
|
|
5309
|
-
throw er;
|
|
5310
|
-
}
|
|
5311
|
-
};
|
|
5312
|
-
module2.exports = parse;
|
|
5313
|
-
}
|
|
5314
|
-
});
|
|
5315
|
-
|
|
5316
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/valid.js
|
|
5317
|
-
var require_valid = __commonJS({
|
|
5318
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
5319
|
-
var parse = require_parse();
|
|
5320
|
-
var valid = (version, options) => {
|
|
5321
|
-
const v = parse(version, options);
|
|
5322
|
-
return v ? v.version : null;
|
|
5323
|
-
};
|
|
5324
|
-
module2.exports = valid;
|
|
5325
|
-
}
|
|
5326
|
-
});
|
|
5327
|
-
|
|
5328
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/clean.js
|
|
5329
|
-
var require_clean = __commonJS({
|
|
5330
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
5331
|
-
var parse = require_parse();
|
|
5332
|
-
var clean = (version, options) => {
|
|
5333
|
-
const s = parse(version.trim().replace(/^[=v]+/, ""), options);
|
|
5334
|
-
return s ? s.version : null;
|
|
5335
|
-
};
|
|
5336
|
-
module2.exports = clean;
|
|
5337
|
-
}
|
|
5338
|
-
});
|
|
5339
|
-
|
|
5340
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/inc.js
|
|
5341
|
-
var require_inc = __commonJS({
|
|
5342
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
5343
|
-
var SemVer = require_semver();
|
|
5344
|
-
var inc = (version, release, options, identifier, identifierBase) => {
|
|
5345
|
-
if (typeof options === "string") {
|
|
5346
|
-
identifierBase = identifier;
|
|
5347
|
-
identifier = options;
|
|
5348
|
-
options = void 0;
|
|
5349
|
-
}
|
|
5350
|
-
try {
|
|
5351
|
-
return new SemVer(
|
|
5352
|
-
version instanceof SemVer ? version.version : version,
|
|
5353
|
-
options
|
|
5354
|
-
).inc(release, identifier, identifierBase).version;
|
|
5355
|
-
} catch (er) {
|
|
5356
|
-
return null;
|
|
5357
|
-
}
|
|
5358
|
-
};
|
|
5359
|
-
module2.exports = inc;
|
|
5360
|
-
}
|
|
5361
|
-
});
|
|
5362
|
-
|
|
5363
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/diff.js
|
|
5364
|
-
var require_diff = __commonJS({
|
|
5365
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
5366
|
-
var parse = require_parse();
|
|
5367
|
-
var diff = (version1, version2) => {
|
|
5368
|
-
const v1 = parse(version1, null, true);
|
|
5369
|
-
const v2 = parse(version2, null, true);
|
|
5370
|
-
const comparison = v1.compare(v2);
|
|
5371
|
-
if (comparison === 0) {
|
|
5372
|
-
return null;
|
|
5373
|
-
}
|
|
5374
|
-
const v1Higher = comparison > 0;
|
|
5375
|
-
const highVersion = v1Higher ? v1 : v2;
|
|
5376
|
-
const lowVersion = v1Higher ? v2 : v1;
|
|
5377
|
-
const highHasPre = !!highVersion.prerelease.length;
|
|
5378
|
-
const lowHasPre = !!lowVersion.prerelease.length;
|
|
5379
|
-
if (lowHasPre && !highHasPre) {
|
|
5380
|
-
if (!lowVersion.patch && !lowVersion.minor) {
|
|
5381
|
-
return "major";
|
|
5382
|
-
}
|
|
5383
|
-
if (highVersion.patch) {
|
|
5384
|
-
return "patch";
|
|
5385
|
-
}
|
|
5386
|
-
if (highVersion.minor) {
|
|
5387
|
-
return "minor";
|
|
5388
|
-
}
|
|
5389
|
-
return "major";
|
|
5390
|
-
}
|
|
5391
|
-
const prefix = highHasPre ? "pre" : "";
|
|
5392
|
-
if (v1.major !== v2.major) {
|
|
5393
|
-
return prefix + "major";
|
|
5394
|
-
}
|
|
5395
|
-
if (v1.minor !== v2.minor) {
|
|
5396
|
-
return prefix + "minor";
|
|
5397
|
-
}
|
|
5398
|
-
if (v1.patch !== v2.patch) {
|
|
5399
|
-
return prefix + "patch";
|
|
5400
|
-
}
|
|
5401
|
-
return "prerelease";
|
|
5402
|
-
};
|
|
5403
|
-
module2.exports = diff;
|
|
5404
|
-
}
|
|
5405
|
-
});
|
|
5406
|
-
|
|
5407
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/major.js
|
|
5408
|
-
var require_major = __commonJS({
|
|
5409
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/major.js"(exports2, module2) {
|
|
5410
|
-
var SemVer = require_semver();
|
|
5411
|
-
var major = (a, loose) => new SemVer(a, loose).major;
|
|
5412
|
-
module2.exports = major;
|
|
5413
|
-
}
|
|
5414
|
-
});
|
|
5415
|
-
|
|
5416
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/minor.js
|
|
5417
|
-
var require_minor = __commonJS({
|
|
5418
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/minor.js"(exports2, module2) {
|
|
5419
|
-
var SemVer = require_semver();
|
|
5420
|
-
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
5421
|
-
module2.exports = minor;
|
|
5422
|
-
}
|
|
5423
|
-
});
|
|
5424
|
-
|
|
5425
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/patch.js
|
|
5426
|
-
var require_patch = __commonJS({
|
|
5427
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/patch.js"(exports2, module2) {
|
|
5428
|
-
var SemVer = require_semver();
|
|
5429
|
-
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
5430
|
-
module2.exports = patch;
|
|
5431
|
-
}
|
|
5432
|
-
});
|
|
5433
|
-
|
|
5434
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/prerelease.js
|
|
5435
|
-
var require_prerelease = __commonJS({
|
|
5436
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
5437
|
-
var parse = require_parse();
|
|
5438
|
-
var prerelease = (version, options) => {
|
|
5439
|
-
const parsed = parse(version, options);
|
|
5440
|
-
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
5441
|
-
};
|
|
5442
|
-
module2.exports = prerelease;
|
|
5443
|
-
}
|
|
5444
|
-
});
|
|
5445
|
-
|
|
5446
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare.js
|
|
5447
|
-
var require_compare = __commonJS({
|
|
5448
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
5449
|
-
var SemVer = require_semver();
|
|
5450
|
-
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
5451
|
-
module2.exports = compare;
|
|
5452
|
-
}
|
|
5453
|
-
});
|
|
5454
|
-
|
|
5455
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rcompare.js
|
|
5456
|
-
var require_rcompare = __commonJS({
|
|
5457
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
5458
|
-
var compare = require_compare();
|
|
5459
|
-
var rcompare = (a, b, loose) => compare(b, a, loose);
|
|
5460
|
-
module2.exports = rcompare;
|
|
5461
|
-
}
|
|
5462
|
-
});
|
|
5463
|
-
|
|
5464
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-loose.js
|
|
5465
|
-
var require_compare_loose = __commonJS({
|
|
5466
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
5467
|
-
var compare = require_compare();
|
|
5468
|
-
var compareLoose = (a, b) => compare(a, b, true);
|
|
5469
|
-
module2.exports = compareLoose;
|
|
5470
|
-
}
|
|
5471
|
-
});
|
|
5472
|
-
|
|
5473
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-build.js
|
|
5474
|
-
var require_compare_build = __commonJS({
|
|
5475
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/compare-build.js"(exports2, module2) {
|
|
5476
|
-
var SemVer = require_semver();
|
|
5477
|
-
var compareBuild = (a, b, loose) => {
|
|
5478
|
-
const versionA = new SemVer(a, loose);
|
|
5479
|
-
const versionB = new SemVer(b, loose);
|
|
5480
|
-
return versionA.compare(versionB) || versionA.compareBuild(versionB);
|
|
5481
|
-
};
|
|
5482
|
-
module2.exports = compareBuild;
|
|
5483
|
-
}
|
|
5484
|
-
});
|
|
5485
|
-
|
|
5486
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/sort.js
|
|
5487
|
-
var require_sort = __commonJS({
|
|
5488
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/sort.js"(exports2, module2) {
|
|
5489
|
-
var compareBuild = require_compare_build();
|
|
5490
|
-
var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
|
|
5491
|
-
module2.exports = sort;
|
|
5492
|
-
}
|
|
5493
|
-
});
|
|
5494
|
-
|
|
5495
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rsort.js
|
|
5496
|
-
var require_rsort = __commonJS({
|
|
5497
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/rsort.js"(exports2, module2) {
|
|
5498
|
-
var compareBuild = require_compare_build();
|
|
5499
|
-
var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
|
|
5500
|
-
module2.exports = rsort;
|
|
5501
|
-
}
|
|
5502
|
-
});
|
|
5503
|
-
|
|
5504
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gt.js
|
|
5505
|
-
var require_gt = __commonJS({
|
|
5506
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
5507
|
-
var compare = require_compare();
|
|
5508
|
-
var gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
5509
|
-
module2.exports = gt;
|
|
5510
|
-
}
|
|
5511
|
-
});
|
|
5512
|
-
|
|
5513
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lt.js
|
|
5514
|
-
var require_lt = __commonJS({
|
|
5515
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
5516
|
-
var compare = require_compare();
|
|
5517
|
-
var lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
5518
|
-
module2.exports = lt;
|
|
5519
|
-
}
|
|
5520
|
-
});
|
|
5521
|
-
|
|
5522
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/eq.js
|
|
5523
|
-
var require_eq = __commonJS({
|
|
5524
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
5525
|
-
var compare = require_compare();
|
|
5526
|
-
var eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
5527
|
-
module2.exports = eq;
|
|
5528
|
-
}
|
|
5529
|
-
});
|
|
5530
|
-
|
|
5531
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/neq.js
|
|
5532
|
-
var require_neq = __commonJS({
|
|
5533
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
5534
|
-
var compare = require_compare();
|
|
5535
|
-
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
5536
|
-
module2.exports = neq;
|
|
5537
|
-
}
|
|
5538
|
-
});
|
|
5539
|
-
|
|
5540
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gte.js
|
|
5541
|
-
var require_gte = __commonJS({
|
|
5542
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
5543
|
-
var compare = require_compare();
|
|
5544
|
-
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
5545
|
-
module2.exports = gte;
|
|
5546
|
-
}
|
|
5547
|
-
});
|
|
5548
|
-
|
|
5549
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lte.js
|
|
5550
|
-
var require_lte = __commonJS({
|
|
5551
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
5552
|
-
var compare = require_compare();
|
|
5553
|
-
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
5554
|
-
module2.exports = lte;
|
|
5555
|
-
}
|
|
5556
|
-
});
|
|
5557
|
-
|
|
5558
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/cmp.js
|
|
5559
|
-
var require_cmp = __commonJS({
|
|
5560
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
5561
|
-
var eq = require_eq();
|
|
5562
|
-
var neq = require_neq();
|
|
5563
|
-
var gt = require_gt();
|
|
5564
|
-
var gte = require_gte();
|
|
5565
|
-
var lt = require_lt();
|
|
5566
|
-
var lte = require_lte();
|
|
5567
|
-
var cmp = (a, op, b, loose) => {
|
|
5568
|
-
switch (op) {
|
|
5569
|
-
case "===":
|
|
5570
|
-
if (typeof a === "object") {
|
|
5571
|
-
a = a.version;
|
|
5572
|
-
}
|
|
5573
|
-
if (typeof b === "object") {
|
|
5574
|
-
b = b.version;
|
|
5575
|
-
}
|
|
5576
|
-
return a === b;
|
|
5577
|
-
case "!==":
|
|
5578
|
-
if (typeof a === "object") {
|
|
5579
|
-
a = a.version;
|
|
5580
|
-
}
|
|
5581
|
-
if (typeof b === "object") {
|
|
5582
|
-
b = b.version;
|
|
5583
|
-
}
|
|
5584
|
-
return a !== b;
|
|
5585
|
-
case "":
|
|
5586
|
-
case "=":
|
|
5587
|
-
case "==":
|
|
5588
|
-
return eq(a, b, loose);
|
|
5589
|
-
case "!=":
|
|
5590
|
-
return neq(a, b, loose);
|
|
5591
|
-
case ">":
|
|
5592
|
-
return gt(a, b, loose);
|
|
5593
|
-
case ">=":
|
|
5594
|
-
return gte(a, b, loose);
|
|
5595
|
-
case "<":
|
|
5596
|
-
return lt(a, b, loose);
|
|
5597
|
-
case "<=":
|
|
5598
|
-
return lte(a, b, loose);
|
|
5599
|
-
default:
|
|
5600
|
-
throw new TypeError(`Invalid operator: ${op}`);
|
|
5601
|
-
}
|
|
5602
|
-
};
|
|
5603
|
-
module2.exports = cmp;
|
|
5604
|
-
}
|
|
5605
|
-
});
|
|
5606
|
-
|
|
5607
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/coerce.js
|
|
5608
|
-
var require_coerce = __commonJS({
|
|
5609
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
5610
|
-
var SemVer = require_semver();
|
|
5611
|
-
var parse = require_parse();
|
|
5612
|
-
var { safeRe: re, t } = require_re();
|
|
5613
|
-
var coerce = (version, options) => {
|
|
5614
|
-
if (version instanceof SemVer) {
|
|
5615
|
-
return version;
|
|
5616
|
-
}
|
|
5617
|
-
if (typeof version === "number") {
|
|
5618
|
-
version = String(version);
|
|
5619
|
-
}
|
|
5620
|
-
if (typeof version !== "string") {
|
|
5621
|
-
return null;
|
|
5622
|
-
}
|
|
5623
|
-
options = options || {};
|
|
5624
|
-
let match2 = null;
|
|
5625
|
-
if (!options.rtl) {
|
|
5626
|
-
match2 = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
5627
|
-
} else {
|
|
5628
|
-
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
5629
|
-
let next;
|
|
5630
|
-
while ((next = coerceRtlRegex.exec(version)) && (!match2 || match2.index + match2[0].length !== version.length)) {
|
|
5631
|
-
if (!match2 || next.index + next[0].length !== match2.index + match2[0].length) {
|
|
5632
|
-
match2 = next;
|
|
5633
|
-
}
|
|
5634
|
-
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
5635
|
-
}
|
|
5636
|
-
coerceRtlRegex.lastIndex = -1;
|
|
5637
|
-
}
|
|
5638
|
-
if (match2 === null) {
|
|
5639
|
-
return null;
|
|
5640
|
-
}
|
|
5641
|
-
const major = match2[2];
|
|
5642
|
-
const minor = match2[3] || "0";
|
|
5643
|
-
const patch = match2[4] || "0";
|
|
5644
|
-
const prerelease = options.includePrerelease && match2[5] ? `-${match2[5]}` : "";
|
|
5645
|
-
const build = options.includePrerelease && match2[6] ? `+${match2[6]}` : "";
|
|
5646
|
-
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
5647
|
-
};
|
|
5648
|
-
module2.exports = coerce;
|
|
5649
|
-
}
|
|
5650
|
-
});
|
|
5651
|
-
|
|
5652
|
-
// node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js
|
|
5653
|
-
var require_iterator = __commonJS({
|
|
5654
|
-
"node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/iterator.js"(exports2, module2) {
|
|
5655
|
-
"use strict";
|
|
5656
|
-
module2.exports = function(Yallist) {
|
|
5657
|
-
Yallist.prototype[Symbol.iterator] = function* () {
|
|
5658
|
-
for (let walker = this.head; walker; walker = walker.next) {
|
|
5659
|
-
yield walker.value;
|
|
5660
|
-
}
|
|
5661
|
-
};
|
|
5662
|
-
};
|
|
5663
|
-
}
|
|
5664
|
-
});
|
|
5665
|
-
|
|
5666
|
-
// node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js
|
|
5667
|
-
var require_yallist = __commonJS({
|
|
5668
|
-
"node_modules/.pnpm/yallist@4.0.0/node_modules/yallist/yallist.js"(exports2, module2) {
|
|
5669
|
-
"use strict";
|
|
5670
|
-
module2.exports = Yallist;
|
|
5671
|
-
Yallist.Node = Node;
|
|
5672
|
-
Yallist.create = Yallist;
|
|
5673
|
-
function Yallist(list) {
|
|
5674
|
-
var self2 = this;
|
|
5675
|
-
if (!(self2 instanceof Yallist)) {
|
|
5676
|
-
self2 = new Yallist();
|
|
5677
|
-
}
|
|
5678
|
-
self2.tail = null;
|
|
5679
|
-
self2.head = null;
|
|
5680
|
-
self2.length = 0;
|
|
5681
|
-
if (list && typeof list.forEach === "function") {
|
|
5682
|
-
list.forEach(function(item) {
|
|
5683
|
-
self2.push(item);
|
|
5684
|
-
});
|
|
5685
|
-
} else if (arguments.length > 0) {
|
|
5686
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
5687
|
-
self2.push(arguments[i]);
|
|
5688
|
-
}
|
|
5689
|
-
}
|
|
5690
|
-
return self2;
|
|
5691
|
-
}
|
|
5692
|
-
Yallist.prototype.removeNode = function(node) {
|
|
5693
|
-
if (node.list !== this) {
|
|
5694
|
-
throw new Error("removing node which does not belong to this list");
|
|
5695
|
-
}
|
|
5696
|
-
var next = node.next;
|
|
5697
|
-
var prev = node.prev;
|
|
5698
|
-
if (next) {
|
|
5699
|
-
next.prev = prev;
|
|
5700
|
-
}
|
|
5701
|
-
if (prev) {
|
|
5702
|
-
prev.next = next;
|
|
5703
|
-
}
|
|
5704
|
-
if (node === this.head) {
|
|
5705
|
-
this.head = next;
|
|
5706
|
-
}
|
|
5707
|
-
if (node === this.tail) {
|
|
5708
|
-
this.tail = prev;
|
|
5709
|
-
}
|
|
5710
|
-
node.list.length--;
|
|
5711
|
-
node.next = null;
|
|
5712
|
-
node.prev = null;
|
|
5713
|
-
node.list = null;
|
|
5714
|
-
return next;
|
|
5715
|
-
};
|
|
5716
|
-
Yallist.prototype.unshiftNode = function(node) {
|
|
5717
|
-
if (node === this.head) {
|
|
5718
|
-
return;
|
|
5719
|
-
}
|
|
5720
|
-
if (node.list) {
|
|
5721
|
-
node.list.removeNode(node);
|
|
5722
|
-
}
|
|
5723
|
-
var head = this.head;
|
|
5724
|
-
node.list = this;
|
|
5725
|
-
node.next = head;
|
|
5726
|
-
if (head) {
|
|
5727
|
-
head.prev = node;
|
|
5728
|
-
}
|
|
5729
|
-
this.head = node;
|
|
5730
|
-
if (!this.tail) {
|
|
5731
|
-
this.tail = node;
|
|
5732
|
-
}
|
|
5733
|
-
this.length++;
|
|
5734
|
-
};
|
|
5735
|
-
Yallist.prototype.pushNode = function(node) {
|
|
5736
|
-
if (node === this.tail) {
|
|
5737
|
-
return;
|
|
5738
|
-
}
|
|
5739
|
-
if (node.list) {
|
|
5740
|
-
node.list.removeNode(node);
|
|
5741
|
-
}
|
|
5742
|
-
var tail = this.tail;
|
|
5743
|
-
node.list = this;
|
|
5744
|
-
node.prev = tail;
|
|
5745
|
-
if (tail) {
|
|
5746
|
-
tail.next = node;
|
|
5747
|
-
}
|
|
5748
|
-
this.tail = node;
|
|
5749
|
-
if (!this.head) {
|
|
5750
|
-
this.head = node;
|
|
5751
|
-
}
|
|
5752
|
-
this.length++;
|
|
5753
|
-
};
|
|
5754
|
-
Yallist.prototype.push = function() {
|
|
5755
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
5756
|
-
push(this, arguments[i]);
|
|
5757
|
-
}
|
|
5758
|
-
return this.length;
|
|
5759
|
-
};
|
|
5760
|
-
Yallist.prototype.unshift = function() {
|
|
5761
|
-
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
5762
|
-
unshift(this, arguments[i]);
|
|
5763
|
-
}
|
|
5764
|
-
return this.length;
|
|
5765
|
-
};
|
|
5766
|
-
Yallist.prototype.pop = function() {
|
|
5767
|
-
if (!this.tail) {
|
|
5768
|
-
return void 0;
|
|
5769
|
-
}
|
|
5770
|
-
var res = this.tail.value;
|
|
5771
|
-
this.tail = this.tail.prev;
|
|
5772
|
-
if (this.tail) {
|
|
5773
|
-
this.tail.next = null;
|
|
5774
|
-
} else {
|
|
5775
|
-
this.head = null;
|
|
5776
|
-
}
|
|
5777
|
-
this.length--;
|
|
5778
|
-
return res;
|
|
5779
|
-
};
|
|
5780
|
-
Yallist.prototype.shift = function() {
|
|
5781
|
-
if (!this.head) {
|
|
5782
|
-
return void 0;
|
|
5783
|
-
}
|
|
5784
|
-
var res = this.head.value;
|
|
5785
|
-
this.head = this.head.next;
|
|
5786
|
-
if (this.head) {
|
|
5787
|
-
this.head.prev = null;
|
|
5788
|
-
} else {
|
|
5789
|
-
this.tail = null;
|
|
5790
|
-
}
|
|
5791
|
-
this.length--;
|
|
5792
|
-
return res;
|
|
5793
|
-
};
|
|
5794
|
-
Yallist.prototype.forEach = function(fn, thisp) {
|
|
5795
|
-
thisp = thisp || this;
|
|
5796
|
-
for (var walker = this.head, i = 0; walker !== null; i++) {
|
|
5797
|
-
fn.call(thisp, walker.value, i, this);
|
|
5798
|
-
walker = walker.next;
|
|
5799
|
-
}
|
|
5800
|
-
};
|
|
5801
|
-
Yallist.prototype.forEachReverse = function(fn, thisp) {
|
|
5802
|
-
thisp = thisp || this;
|
|
5803
|
-
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
|
|
5804
|
-
fn.call(thisp, walker.value, i, this);
|
|
5805
|
-
walker = walker.prev;
|
|
5806
|
-
}
|
|
5807
|
-
};
|
|
5808
|
-
Yallist.prototype.get = function(n) {
|
|
5809
|
-
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
|
|
5810
|
-
walker = walker.next;
|
|
5811
|
-
}
|
|
5812
|
-
if (i === n && walker !== null) {
|
|
5813
|
-
return walker.value;
|
|
5814
|
-
}
|
|
5815
|
-
};
|
|
5816
|
-
Yallist.prototype.getReverse = function(n) {
|
|
5817
|
-
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
|
|
5818
|
-
walker = walker.prev;
|
|
5819
|
-
}
|
|
5820
|
-
if (i === n && walker !== null) {
|
|
5821
|
-
return walker.value;
|
|
5822
|
-
}
|
|
5823
|
-
};
|
|
5824
|
-
Yallist.prototype.map = function(fn, thisp) {
|
|
5825
|
-
thisp = thisp || this;
|
|
5826
|
-
var res = new Yallist();
|
|
5827
|
-
for (var walker = this.head; walker !== null; ) {
|
|
5828
|
-
res.push(fn.call(thisp, walker.value, this));
|
|
5829
|
-
walker = walker.next;
|
|
5830
|
-
}
|
|
5831
|
-
return res;
|
|
5832
|
-
};
|
|
5833
|
-
Yallist.prototype.mapReverse = function(fn, thisp) {
|
|
5834
|
-
thisp = thisp || this;
|
|
5835
|
-
var res = new Yallist();
|
|
5836
|
-
for (var walker = this.tail; walker !== null; ) {
|
|
5837
|
-
res.push(fn.call(thisp, walker.value, this));
|
|
5838
|
-
walker = walker.prev;
|
|
5839
|
-
}
|
|
5840
|
-
return res;
|
|
5841
|
-
};
|
|
5842
|
-
Yallist.prototype.reduce = function(fn, initial) {
|
|
5843
|
-
var acc;
|
|
5844
|
-
var walker = this.head;
|
|
5845
|
-
if (arguments.length > 1) {
|
|
5846
|
-
acc = initial;
|
|
5847
|
-
} else if (this.head) {
|
|
5848
|
-
walker = this.head.next;
|
|
5849
|
-
acc = this.head.value;
|
|
5850
|
-
} else {
|
|
5851
|
-
throw new TypeError("Reduce of empty list with no initial value");
|
|
5852
|
-
}
|
|
5853
|
-
for (var i = 0; walker !== null; i++) {
|
|
5854
|
-
acc = fn(acc, walker.value, i);
|
|
5855
|
-
walker = walker.next;
|
|
5856
|
-
}
|
|
5857
|
-
return acc;
|
|
5858
|
-
};
|
|
5859
|
-
Yallist.prototype.reduceReverse = function(fn, initial) {
|
|
5860
|
-
var acc;
|
|
5861
|
-
var walker = this.tail;
|
|
5862
|
-
if (arguments.length > 1) {
|
|
5863
|
-
acc = initial;
|
|
5864
|
-
} else if (this.tail) {
|
|
5865
|
-
walker = this.tail.prev;
|
|
5866
|
-
acc = this.tail.value;
|
|
5867
|
-
} else {
|
|
5868
|
-
throw new TypeError("Reduce of empty list with no initial value");
|
|
5869
|
-
}
|
|
5870
|
-
for (var i = this.length - 1; walker !== null; i--) {
|
|
5871
|
-
acc = fn(acc, walker.value, i);
|
|
5872
|
-
walker = walker.prev;
|
|
5873
|
-
}
|
|
5874
|
-
return acc;
|
|
5875
|
-
};
|
|
5876
|
-
Yallist.prototype.toArray = function() {
|
|
5877
|
-
var arr = new Array(this.length);
|
|
5878
|
-
for (var i = 0, walker = this.head; walker !== null; i++) {
|
|
5879
|
-
arr[i] = walker.value;
|
|
5880
|
-
walker = walker.next;
|
|
5881
|
-
}
|
|
5882
|
-
return arr;
|
|
5883
|
-
};
|
|
5884
|
-
Yallist.prototype.toArrayReverse = function() {
|
|
5885
|
-
var arr = new Array(this.length);
|
|
5886
|
-
for (var i = 0, walker = this.tail; walker !== null; i++) {
|
|
5887
|
-
arr[i] = walker.value;
|
|
5888
|
-
walker = walker.prev;
|
|
5889
|
-
}
|
|
5890
|
-
return arr;
|
|
5891
|
-
};
|
|
5892
|
-
Yallist.prototype.slice = function(from, to) {
|
|
5893
|
-
to = to || this.length;
|
|
5894
|
-
if (to < 0) {
|
|
5895
|
-
to += this.length;
|
|
5896
|
-
}
|
|
5897
|
-
from = from || 0;
|
|
5898
|
-
if (from < 0) {
|
|
5899
|
-
from += this.length;
|
|
5900
|
-
}
|
|
5901
|
-
var ret = new Yallist();
|
|
5902
|
-
if (to < from || to < 0) {
|
|
5903
|
-
return ret;
|
|
5904
|
-
}
|
|
5905
|
-
if (from < 0) {
|
|
5906
|
-
from = 0;
|
|
5907
|
-
}
|
|
5908
|
-
if (to > this.length) {
|
|
5909
|
-
to = this.length;
|
|
5910
|
-
}
|
|
5911
|
-
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
|
|
5912
|
-
walker = walker.next;
|
|
5913
|
-
}
|
|
5914
|
-
for (; walker !== null && i < to; i++, walker = walker.next) {
|
|
5915
|
-
ret.push(walker.value);
|
|
5916
|
-
}
|
|
5917
|
-
return ret;
|
|
5918
|
-
};
|
|
5919
|
-
Yallist.prototype.sliceReverse = function(from, to) {
|
|
5920
|
-
to = to || this.length;
|
|
5921
|
-
if (to < 0) {
|
|
5922
|
-
to += this.length;
|
|
5923
|
-
}
|
|
5924
|
-
from = from || 0;
|
|
5925
|
-
if (from < 0) {
|
|
5926
|
-
from += this.length;
|
|
5927
|
-
}
|
|
5928
|
-
var ret = new Yallist();
|
|
5929
|
-
if (to < from || to < 0) {
|
|
5930
|
-
return ret;
|
|
5931
|
-
}
|
|
5932
|
-
if (from < 0) {
|
|
5933
|
-
from = 0;
|
|
5934
|
-
}
|
|
5935
|
-
if (to > this.length) {
|
|
5936
|
-
to = this.length;
|
|
5937
|
-
}
|
|
5938
|
-
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
|
|
5939
|
-
walker = walker.prev;
|
|
5940
|
-
}
|
|
5941
|
-
for (; walker !== null && i > from; i--, walker = walker.prev) {
|
|
5942
|
-
ret.push(walker.value);
|
|
5943
|
-
}
|
|
5944
|
-
return ret;
|
|
5945
|
-
};
|
|
5946
|
-
Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
|
|
5947
|
-
if (start > this.length) {
|
|
5948
|
-
start = this.length - 1;
|
|
5949
|
-
}
|
|
5950
|
-
if (start < 0) {
|
|
5951
|
-
start = this.length + start;
|
|
5952
|
-
}
|
|
5953
|
-
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
|
|
5954
|
-
walker = walker.next;
|
|
5955
|
-
}
|
|
5956
|
-
var ret = [];
|
|
5957
|
-
for (var i = 0; walker && i < deleteCount; i++) {
|
|
5958
|
-
ret.push(walker.value);
|
|
5959
|
-
walker = this.removeNode(walker);
|
|
5960
|
-
}
|
|
5961
|
-
if (walker === null) {
|
|
5962
|
-
walker = this.tail;
|
|
5963
|
-
}
|
|
5964
|
-
if (walker !== this.head && walker !== this.tail) {
|
|
5965
|
-
walker = walker.prev;
|
|
5966
|
-
}
|
|
5967
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
5968
|
-
walker = insert(this, walker, nodes[i]);
|
|
5969
|
-
}
|
|
5970
|
-
return ret;
|
|
5971
|
-
};
|
|
5972
|
-
Yallist.prototype.reverse = function() {
|
|
5973
|
-
var head = this.head;
|
|
5974
|
-
var tail = this.tail;
|
|
5975
|
-
for (var walker = head; walker !== null; walker = walker.prev) {
|
|
5976
|
-
var p = walker.prev;
|
|
5977
|
-
walker.prev = walker.next;
|
|
5978
|
-
walker.next = p;
|
|
5979
|
-
}
|
|
5980
|
-
this.head = tail;
|
|
5981
|
-
this.tail = head;
|
|
5982
|
-
return this;
|
|
5983
|
-
};
|
|
5984
|
-
function insert(self2, node, value) {
|
|
5985
|
-
var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2);
|
|
5986
|
-
if (inserted.next === null) {
|
|
5987
|
-
self2.tail = inserted;
|
|
5988
|
-
}
|
|
5989
|
-
if (inserted.prev === null) {
|
|
5990
|
-
self2.head = inserted;
|
|
5991
|
-
}
|
|
5992
|
-
self2.length++;
|
|
5993
|
-
return inserted;
|
|
5994
|
-
}
|
|
5995
|
-
function push(self2, item) {
|
|
5996
|
-
self2.tail = new Node(item, self2.tail, null, self2);
|
|
5997
|
-
if (!self2.head) {
|
|
5998
|
-
self2.head = self2.tail;
|
|
5999
|
-
}
|
|
6000
|
-
self2.length++;
|
|
6001
|
-
}
|
|
6002
|
-
function unshift(self2, item) {
|
|
6003
|
-
self2.head = new Node(item, null, self2.head, self2);
|
|
6004
|
-
if (!self2.tail) {
|
|
6005
|
-
self2.tail = self2.head;
|
|
6006
|
-
}
|
|
6007
|
-
self2.length++;
|
|
6008
|
-
}
|
|
6009
|
-
function Node(value, prev, next, list) {
|
|
6010
|
-
if (!(this instanceof Node)) {
|
|
6011
|
-
return new Node(value, prev, next, list);
|
|
6012
|
-
}
|
|
6013
|
-
this.list = list;
|
|
6014
|
-
this.value = value;
|
|
6015
|
-
if (prev) {
|
|
6016
|
-
prev.next = this;
|
|
6017
|
-
this.prev = prev;
|
|
6018
|
-
} else {
|
|
6019
|
-
this.prev = null;
|
|
6020
|
-
}
|
|
6021
|
-
if (next) {
|
|
6022
|
-
next.prev = this;
|
|
6023
|
-
this.next = next;
|
|
6024
|
-
} else {
|
|
6025
|
-
this.next = null;
|
|
6026
|
-
}
|
|
6027
|
-
}
|
|
6028
|
-
try {
|
|
6029
|
-
require_iterator()(Yallist);
|
|
6030
|
-
} catch (er) {
|
|
6031
|
-
}
|
|
6032
|
-
}
|
|
6033
|
-
});
|
|
6034
|
-
|
|
6035
|
-
// node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js
|
|
6036
|
-
var require_lru_cache = __commonJS({
|
|
6037
|
-
"node_modules/.pnpm/lru-cache@6.0.0/node_modules/lru-cache/index.js"(exports2, module2) {
|
|
6038
|
-
"use strict";
|
|
6039
|
-
var Yallist = require_yallist();
|
|
6040
|
-
var MAX = Symbol("max");
|
|
6041
|
-
var LENGTH = Symbol("length");
|
|
6042
|
-
var LENGTH_CALCULATOR = Symbol("lengthCalculator");
|
|
6043
|
-
var ALLOW_STALE = Symbol("allowStale");
|
|
6044
|
-
var MAX_AGE = Symbol("maxAge");
|
|
6045
|
-
var DISPOSE = Symbol("dispose");
|
|
6046
|
-
var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
|
|
6047
|
-
var LRU_LIST = Symbol("lruList");
|
|
6048
|
-
var CACHE = Symbol("cache");
|
|
6049
|
-
var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
|
|
6050
|
-
var naiveLength = () => 1;
|
|
6051
|
-
var LRUCache = class {
|
|
6052
|
-
constructor(options) {
|
|
6053
|
-
if (typeof options === "number")
|
|
6054
|
-
options = { max: options };
|
|
6055
|
-
if (!options)
|
|
6056
|
-
options = {};
|
|
6057
|
-
if (options.max && (typeof options.max !== "number" || options.max < 0))
|
|
6058
|
-
throw new TypeError("max must be a non-negative number");
|
|
6059
|
-
const max = this[MAX] = options.max || Infinity;
|
|
6060
|
-
const lc = options.length || naiveLength;
|
|
6061
|
-
this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
|
|
6062
|
-
this[ALLOW_STALE] = options.stale || false;
|
|
6063
|
-
if (options.maxAge && typeof options.maxAge !== "number")
|
|
6064
|
-
throw new TypeError("maxAge must be a number");
|
|
6065
|
-
this[MAX_AGE] = options.maxAge || 0;
|
|
6066
|
-
this[DISPOSE] = options.dispose;
|
|
6067
|
-
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
|
|
6068
|
-
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
|
|
6069
|
-
this.reset();
|
|
6070
|
-
}
|
|
6071
|
-
// resize the cache when the max changes.
|
|
6072
|
-
set max(mL) {
|
|
6073
|
-
if (typeof mL !== "number" || mL < 0)
|
|
6074
|
-
throw new TypeError("max must be a non-negative number");
|
|
6075
|
-
this[MAX] = mL || Infinity;
|
|
6076
|
-
trim(this);
|
|
6077
|
-
}
|
|
6078
|
-
get max() {
|
|
6079
|
-
return this[MAX];
|
|
6080
|
-
}
|
|
6081
|
-
set allowStale(allowStale) {
|
|
6082
|
-
this[ALLOW_STALE] = !!allowStale;
|
|
6083
|
-
}
|
|
6084
|
-
get allowStale() {
|
|
6085
|
-
return this[ALLOW_STALE];
|
|
6086
|
-
}
|
|
6087
|
-
set maxAge(mA) {
|
|
6088
|
-
if (typeof mA !== "number")
|
|
6089
|
-
throw new TypeError("maxAge must be a non-negative number");
|
|
6090
|
-
this[MAX_AGE] = mA;
|
|
6091
|
-
trim(this);
|
|
6092
|
-
}
|
|
6093
|
-
get maxAge() {
|
|
6094
|
-
return this[MAX_AGE];
|
|
6095
|
-
}
|
|
6096
|
-
// resize the cache when the lengthCalculator changes.
|
|
6097
|
-
set lengthCalculator(lC) {
|
|
6098
|
-
if (typeof lC !== "function")
|
|
6099
|
-
lC = naiveLength;
|
|
6100
|
-
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
6101
|
-
this[LENGTH_CALCULATOR] = lC;
|
|
6102
|
-
this[LENGTH] = 0;
|
|
6103
|
-
this[LRU_LIST].forEach((hit) => {
|
|
6104
|
-
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
|
|
6105
|
-
this[LENGTH] += hit.length;
|
|
6106
|
-
});
|
|
6107
|
-
}
|
|
6108
|
-
trim(this);
|
|
6109
|
-
}
|
|
6110
|
-
get lengthCalculator() {
|
|
6111
|
-
return this[LENGTH_CALCULATOR];
|
|
6112
|
-
}
|
|
6113
|
-
get length() {
|
|
6114
|
-
return this[LENGTH];
|
|
6115
|
-
}
|
|
6116
|
-
get itemCount() {
|
|
6117
|
-
return this[LRU_LIST].length;
|
|
6118
|
-
}
|
|
6119
|
-
rforEach(fn, thisp) {
|
|
6120
|
-
thisp = thisp || this;
|
|
6121
|
-
for (let walker = this[LRU_LIST].tail; walker !== null; ) {
|
|
6122
|
-
const prev = walker.prev;
|
|
6123
|
-
forEachStep(this, fn, walker, thisp);
|
|
6124
|
-
walker = prev;
|
|
6125
|
-
}
|
|
6126
|
-
}
|
|
6127
|
-
forEach(fn, thisp) {
|
|
6128
|
-
thisp = thisp || this;
|
|
6129
|
-
for (let walker = this[LRU_LIST].head; walker !== null; ) {
|
|
6130
|
-
const next = walker.next;
|
|
6131
|
-
forEachStep(this, fn, walker, thisp);
|
|
6132
|
-
walker = next;
|
|
6133
|
-
}
|
|
6134
|
-
}
|
|
6135
|
-
keys() {
|
|
6136
|
-
return this[LRU_LIST].toArray().map((k) => k.key);
|
|
6137
|
-
}
|
|
6138
|
-
values() {
|
|
6139
|
-
return this[LRU_LIST].toArray().map((k) => k.value);
|
|
6140
|
-
}
|
|
6141
|
-
reset() {
|
|
6142
|
-
if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
|
|
6143
|
-
this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
|
|
6144
|
-
}
|
|
6145
|
-
this[CACHE] = /* @__PURE__ */ new Map();
|
|
6146
|
-
this[LRU_LIST] = new Yallist();
|
|
6147
|
-
this[LENGTH] = 0;
|
|
6148
|
-
}
|
|
6149
|
-
dump() {
|
|
6150
|
-
return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
|
|
6151
|
-
k: hit.key,
|
|
6152
|
-
v: hit.value,
|
|
6153
|
-
e: hit.now + (hit.maxAge || 0)
|
|
6154
|
-
}).toArray().filter((h) => h);
|
|
6155
|
-
}
|
|
6156
|
-
dumpLru() {
|
|
6157
|
-
return this[LRU_LIST];
|
|
6158
|
-
}
|
|
6159
|
-
set(key, value, maxAge) {
|
|
6160
|
-
maxAge = maxAge || this[MAX_AGE];
|
|
6161
|
-
if (maxAge && typeof maxAge !== "number")
|
|
6162
|
-
throw new TypeError("maxAge must be a number");
|
|
6163
|
-
const now = maxAge ? Date.now() : 0;
|
|
6164
|
-
const len = this[LENGTH_CALCULATOR](value, key);
|
|
6165
|
-
if (this[CACHE].has(key)) {
|
|
6166
|
-
if (len > this[MAX]) {
|
|
6167
|
-
del(this, this[CACHE].get(key));
|
|
6168
|
-
return false;
|
|
6169
|
-
}
|
|
6170
|
-
const node = this[CACHE].get(key);
|
|
6171
|
-
const item = node.value;
|
|
6172
|
-
if (this[DISPOSE]) {
|
|
6173
|
-
if (!this[NO_DISPOSE_ON_SET])
|
|
6174
|
-
this[DISPOSE](key, item.value);
|
|
6175
|
-
}
|
|
6176
|
-
item.now = now;
|
|
6177
|
-
item.maxAge = maxAge;
|
|
6178
|
-
item.value = value;
|
|
6179
|
-
this[LENGTH] += len - item.length;
|
|
6180
|
-
item.length = len;
|
|
6181
|
-
this.get(key);
|
|
6182
|
-
trim(this);
|
|
6183
|
-
return true;
|
|
6184
|
-
}
|
|
6185
|
-
const hit = new Entry(key, value, len, now, maxAge);
|
|
6186
|
-
if (hit.length > this[MAX]) {
|
|
6187
|
-
if (this[DISPOSE])
|
|
6188
|
-
this[DISPOSE](key, value);
|
|
6189
|
-
return false;
|
|
6190
|
-
}
|
|
6191
|
-
this[LENGTH] += hit.length;
|
|
6192
|
-
this[LRU_LIST].unshift(hit);
|
|
6193
|
-
this[CACHE].set(key, this[LRU_LIST].head);
|
|
6194
|
-
trim(this);
|
|
6195
|
-
return true;
|
|
6196
|
-
}
|
|
6197
|
-
has(key) {
|
|
6198
|
-
if (!this[CACHE].has(key))
|
|
6199
|
-
return false;
|
|
6200
|
-
const hit = this[CACHE].get(key).value;
|
|
6201
|
-
return !isStale(this, hit);
|
|
6202
|
-
}
|
|
6203
|
-
get(key) {
|
|
6204
|
-
return get(this, key, true);
|
|
6205
|
-
}
|
|
6206
|
-
peek(key) {
|
|
6207
|
-
return get(this, key, false);
|
|
6208
|
-
}
|
|
6209
|
-
pop() {
|
|
6210
|
-
const node = this[LRU_LIST].tail;
|
|
6211
|
-
if (!node)
|
|
6212
|
-
return null;
|
|
6213
|
-
del(this, node);
|
|
6214
|
-
return node.value;
|
|
6215
|
-
}
|
|
6216
|
-
del(key) {
|
|
6217
|
-
del(this, this[CACHE].get(key));
|
|
6218
|
-
}
|
|
6219
|
-
load(arr) {
|
|
6220
|
-
this.reset();
|
|
6221
|
-
const now = Date.now();
|
|
6222
|
-
for (let l = arr.length - 1; l >= 0; l--) {
|
|
6223
|
-
const hit = arr[l];
|
|
6224
|
-
const expiresAt = hit.e || 0;
|
|
6225
|
-
if (expiresAt === 0)
|
|
6226
|
-
this.set(hit.k, hit.v);
|
|
6227
|
-
else {
|
|
6228
|
-
const maxAge = expiresAt - now;
|
|
6229
|
-
if (maxAge > 0) {
|
|
6230
|
-
this.set(hit.k, hit.v, maxAge);
|
|
6231
|
-
}
|
|
6232
|
-
}
|
|
6233
|
-
}
|
|
6234
|
-
}
|
|
6235
|
-
prune() {
|
|
6236
|
-
this[CACHE].forEach((value, key) => get(this, key, false));
|
|
6237
|
-
}
|
|
6238
|
-
};
|
|
6239
|
-
var get = (self2, key, doUse) => {
|
|
6240
|
-
const node = self2[CACHE].get(key);
|
|
6241
|
-
if (node) {
|
|
6242
|
-
const hit = node.value;
|
|
6243
|
-
if (isStale(self2, hit)) {
|
|
6244
|
-
del(self2, node);
|
|
6245
|
-
if (!self2[ALLOW_STALE])
|
|
6246
|
-
return void 0;
|
|
6247
|
-
} else {
|
|
6248
|
-
if (doUse) {
|
|
6249
|
-
if (self2[UPDATE_AGE_ON_GET])
|
|
6250
|
-
node.value.now = Date.now();
|
|
6251
|
-
self2[LRU_LIST].unshiftNode(node);
|
|
6252
|
-
}
|
|
6253
|
-
}
|
|
6254
|
-
return hit.value;
|
|
6255
|
-
}
|
|
6256
|
-
};
|
|
6257
|
-
var isStale = (self2, hit) => {
|
|
6258
|
-
if (!hit || !hit.maxAge && !self2[MAX_AGE])
|
|
6259
|
-
return false;
|
|
6260
|
-
const diff = Date.now() - hit.now;
|
|
6261
|
-
return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
|
|
6262
|
-
};
|
|
6263
|
-
var trim = (self2) => {
|
|
6264
|
-
if (self2[LENGTH] > self2[MAX]) {
|
|
6265
|
-
for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
|
|
6266
|
-
const prev = walker.prev;
|
|
6267
|
-
del(self2, walker);
|
|
6268
|
-
walker = prev;
|
|
6269
|
-
}
|
|
6270
|
-
}
|
|
6271
|
-
};
|
|
6272
|
-
var del = (self2, node) => {
|
|
6273
|
-
if (node) {
|
|
6274
|
-
const hit = node.value;
|
|
6275
|
-
if (self2[DISPOSE])
|
|
6276
|
-
self2[DISPOSE](hit.key, hit.value);
|
|
6277
|
-
self2[LENGTH] -= hit.length;
|
|
6278
|
-
self2[CACHE].delete(hit.key);
|
|
6279
|
-
self2[LRU_LIST].removeNode(node);
|
|
6280
|
-
}
|
|
6281
|
-
};
|
|
6282
|
-
var Entry = class {
|
|
6283
|
-
constructor(key, value, length, now, maxAge) {
|
|
6284
|
-
this.key = key;
|
|
6285
|
-
this.value = value;
|
|
6286
|
-
this.length = length;
|
|
6287
|
-
this.now = now;
|
|
6288
|
-
this.maxAge = maxAge || 0;
|
|
6289
|
-
}
|
|
6290
|
-
};
|
|
6291
|
-
var forEachStep = (self2, fn, node, thisp) => {
|
|
6292
|
-
let hit = node.value;
|
|
6293
|
-
if (isStale(self2, hit)) {
|
|
6294
|
-
del(self2, node);
|
|
6295
|
-
if (!self2[ALLOW_STALE])
|
|
6296
|
-
hit = void 0;
|
|
6297
|
-
}
|
|
6298
|
-
if (hit)
|
|
6299
|
-
fn.call(thisp, hit.value, hit.key, self2);
|
|
6300
|
-
};
|
|
6301
|
-
module2.exports = LRUCache;
|
|
6302
|
-
}
|
|
6303
|
-
});
|
|
6304
|
-
|
|
6305
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/range.js
|
|
6306
|
-
var require_range = __commonJS({
|
|
6307
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/range.js"(exports2, module2) {
|
|
6308
|
-
var Range = class _Range {
|
|
6309
|
-
constructor(range, options) {
|
|
6310
|
-
options = parseOptions(options);
|
|
6311
|
-
if (range instanceof _Range) {
|
|
6312
|
-
if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
|
|
6313
|
-
return range;
|
|
6314
|
-
} else {
|
|
6315
|
-
return new _Range(range.raw, options);
|
|
6316
|
-
}
|
|
6317
|
-
}
|
|
6318
|
-
if (range instanceof Comparator) {
|
|
6319
|
-
this.raw = range.value;
|
|
6320
|
-
this.set = [[range]];
|
|
6321
|
-
this.format();
|
|
6322
|
-
return this;
|
|
6323
|
-
}
|
|
6324
|
-
this.options = options;
|
|
6325
|
-
this.loose = !!options.loose;
|
|
6326
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
6327
|
-
this.raw = range.trim().split(/\s+/).join(" ");
|
|
6328
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
6329
|
-
if (!this.set.length) {
|
|
6330
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
6331
|
-
}
|
|
6332
|
-
if (this.set.length > 1) {
|
|
6333
|
-
const first = this.set[0];
|
|
6334
|
-
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
6335
|
-
if (this.set.length === 0) {
|
|
6336
|
-
this.set = [first];
|
|
6337
|
-
} else if (this.set.length > 1) {
|
|
6338
|
-
for (const c of this.set) {
|
|
6339
|
-
if (c.length === 1 && isAny(c[0])) {
|
|
6340
|
-
this.set = [c];
|
|
6341
|
-
break;
|
|
6342
|
-
}
|
|
6343
|
-
}
|
|
6344
|
-
}
|
|
6345
|
-
}
|
|
6346
|
-
this.format();
|
|
6347
|
-
}
|
|
6348
|
-
format() {
|
|
6349
|
-
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
|
|
6350
|
-
return this.range;
|
|
6351
|
-
}
|
|
6352
|
-
toString() {
|
|
6353
|
-
return this.range;
|
|
6354
|
-
}
|
|
6355
|
-
parseRange(range) {
|
|
6356
|
-
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
6357
|
-
const memoKey = memoOpts + ":" + range;
|
|
6358
|
-
const cached = cache.get(memoKey);
|
|
6359
|
-
if (cached) {
|
|
6360
|
-
return cached;
|
|
6361
|
-
}
|
|
6362
|
-
const loose = this.options.loose;
|
|
6363
|
-
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
6364
|
-
range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
6365
|
-
debug("hyphen replace", range);
|
|
6366
|
-
range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
6367
|
-
debug("comparator trim", range);
|
|
6368
|
-
range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
6369
|
-
debug("tilde trim", range);
|
|
6370
|
-
range = range.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
6371
|
-
debug("caret trim", range);
|
|
6372
|
-
let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
6373
|
-
if (loose) {
|
|
6374
|
-
rangeList = rangeList.filter((comp) => {
|
|
6375
|
-
debug("loose invalid filter", comp, this.options);
|
|
6376
|
-
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
6377
|
-
});
|
|
6378
|
-
}
|
|
6379
|
-
debug("range list", rangeList);
|
|
6380
|
-
const rangeMap = /* @__PURE__ */ new Map();
|
|
6381
|
-
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
6382
|
-
for (const comp of comparators) {
|
|
6383
|
-
if (isNullSet(comp)) {
|
|
6384
|
-
return [comp];
|
|
6385
|
-
}
|
|
6386
|
-
rangeMap.set(comp.value, comp);
|
|
6387
|
-
}
|
|
6388
|
-
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
6389
|
-
rangeMap.delete("");
|
|
6390
|
-
}
|
|
6391
|
-
const result = [...rangeMap.values()];
|
|
6392
|
-
cache.set(memoKey, result);
|
|
6393
|
-
return result;
|
|
6394
|
-
}
|
|
6395
|
-
intersects(range, options) {
|
|
6396
|
-
if (!(range instanceof _Range)) {
|
|
6397
|
-
throw new TypeError("a Range is required");
|
|
6398
|
-
}
|
|
6399
|
-
return this.set.some((thisComparators) => {
|
|
6400
|
-
return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
|
|
6401
|
-
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
6402
|
-
return rangeComparators.every((rangeComparator) => {
|
|
6403
|
-
return thisComparator.intersects(rangeComparator, options);
|
|
6404
|
-
});
|
|
6405
|
-
});
|
|
6406
|
-
});
|
|
6407
|
-
});
|
|
6408
|
-
}
|
|
6409
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
6410
|
-
test(version) {
|
|
6411
|
-
if (!version) {
|
|
6412
|
-
return false;
|
|
6413
|
-
}
|
|
6414
|
-
if (typeof version === "string") {
|
|
6415
|
-
try {
|
|
6416
|
-
version = new SemVer(version, this.options);
|
|
6417
|
-
} catch (er) {
|
|
6418
|
-
return false;
|
|
6419
|
-
}
|
|
6420
|
-
}
|
|
6421
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
6422
|
-
if (testSet(this.set[i], version, this.options)) {
|
|
6423
|
-
return true;
|
|
6424
|
-
}
|
|
6425
|
-
}
|
|
6426
|
-
return false;
|
|
6427
|
-
}
|
|
6428
|
-
};
|
|
6429
|
-
module2.exports = Range;
|
|
6430
|
-
var LRU = require_lru_cache();
|
|
6431
|
-
var cache = new LRU({ max: 1e3 });
|
|
6432
|
-
var parseOptions = require_parse_options();
|
|
6433
|
-
var Comparator = require_comparator();
|
|
6434
|
-
var debug = require_debug();
|
|
6435
|
-
var SemVer = require_semver();
|
|
6436
|
-
var {
|
|
6437
|
-
safeRe: re,
|
|
6438
|
-
t,
|
|
6439
|
-
comparatorTrimReplace,
|
|
6440
|
-
tildeTrimReplace,
|
|
6441
|
-
caretTrimReplace
|
|
6442
|
-
} = require_re();
|
|
6443
|
-
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
|
|
6444
|
-
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
6445
|
-
var isAny = (c) => c.value === "";
|
|
6446
|
-
var isSatisfiable = (comparators, options) => {
|
|
6447
|
-
let result = true;
|
|
6448
|
-
const remainingComparators = comparators.slice();
|
|
6449
|
-
let testComparator = remainingComparators.pop();
|
|
6450
|
-
while (result && remainingComparators.length) {
|
|
6451
|
-
result = remainingComparators.every((otherComparator) => {
|
|
6452
|
-
return testComparator.intersects(otherComparator, options);
|
|
6453
|
-
});
|
|
6454
|
-
testComparator = remainingComparators.pop();
|
|
6455
|
-
}
|
|
6456
|
-
return result;
|
|
6457
|
-
};
|
|
6458
|
-
var parseComparator = (comp, options) => {
|
|
6459
|
-
debug("comp", comp, options);
|
|
6460
|
-
comp = replaceCarets(comp, options);
|
|
6461
|
-
debug("caret", comp);
|
|
6462
|
-
comp = replaceTildes(comp, options);
|
|
6463
|
-
debug("tildes", comp);
|
|
6464
|
-
comp = replaceXRanges(comp, options);
|
|
6465
|
-
debug("xrange", comp);
|
|
6466
|
-
comp = replaceStars(comp, options);
|
|
6467
|
-
debug("stars", comp);
|
|
6468
|
-
return comp;
|
|
6469
|
-
};
|
|
6470
|
-
var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
|
|
6471
|
-
var replaceTildes = (comp, options) => {
|
|
6472
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
6473
|
-
};
|
|
6474
|
-
var replaceTilde = (comp, options) => {
|
|
6475
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
6476
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
6477
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
6478
|
-
let ret;
|
|
6479
|
-
if (isX(M)) {
|
|
6480
|
-
ret = "";
|
|
6481
|
-
} else if (isX(m)) {
|
|
6482
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
6483
|
-
} else if (isX(p)) {
|
|
6484
|
-
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
6485
|
-
} else if (pr) {
|
|
6486
|
-
debug("replaceTilde pr", pr);
|
|
6487
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
6488
|
-
} else {
|
|
6489
|
-
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
6490
|
-
}
|
|
6491
|
-
debug("tilde return", ret);
|
|
6492
|
-
return ret;
|
|
6493
|
-
});
|
|
6494
|
-
};
|
|
6495
|
-
var replaceCarets = (comp, options) => {
|
|
6496
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
6497
|
-
};
|
|
6498
|
-
var replaceCaret = (comp, options) => {
|
|
6499
|
-
debug("caret", comp, options);
|
|
6500
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
6501
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
6502
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
6503
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
6504
|
-
let ret;
|
|
6505
|
-
if (isX(M)) {
|
|
6506
|
-
ret = "";
|
|
6507
|
-
} else if (isX(m)) {
|
|
6508
|
-
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
6509
|
-
} else if (isX(p)) {
|
|
6510
|
-
if (M === "0") {
|
|
6511
|
-
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
6512
|
-
} else {
|
|
6513
|
-
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
6514
|
-
}
|
|
6515
|
-
} else if (pr) {
|
|
6516
|
-
debug("replaceCaret pr", pr);
|
|
6517
|
-
if (M === "0") {
|
|
6518
|
-
if (m === "0") {
|
|
6519
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
6520
|
-
} else {
|
|
6521
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
6522
|
-
}
|
|
6523
|
-
} else {
|
|
6524
|
-
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
6525
|
-
}
|
|
6526
|
-
} else {
|
|
6527
|
-
debug("no pr");
|
|
6528
|
-
if (M === "0") {
|
|
6529
|
-
if (m === "0") {
|
|
6530
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
6531
|
-
} else {
|
|
6532
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
6533
|
-
}
|
|
6534
|
-
} else {
|
|
6535
|
-
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
6536
|
-
}
|
|
6537
|
-
}
|
|
6538
|
-
debug("caret return", ret);
|
|
6539
|
-
return ret;
|
|
6540
|
-
});
|
|
6541
|
-
};
|
|
6542
|
-
var replaceXRanges = (comp, options) => {
|
|
6543
|
-
debug("replaceXRanges", comp, options);
|
|
6544
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
6545
|
-
};
|
|
6546
|
-
var replaceXRange = (comp, options) => {
|
|
6547
|
-
comp = comp.trim();
|
|
6548
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
6549
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
6550
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
6551
|
-
const xM = isX(M);
|
|
6552
|
-
const xm = xM || isX(m);
|
|
6553
|
-
const xp = xm || isX(p);
|
|
6554
|
-
const anyX = xp;
|
|
6555
|
-
if (gtlt === "=" && anyX) {
|
|
6556
|
-
gtlt = "";
|
|
6557
|
-
}
|
|
6558
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
6559
|
-
if (xM) {
|
|
6560
|
-
if (gtlt === ">" || gtlt === "<") {
|
|
6561
|
-
ret = "<0.0.0-0";
|
|
6562
|
-
} else {
|
|
6563
|
-
ret = "*";
|
|
6564
|
-
}
|
|
6565
|
-
} else if (gtlt && anyX) {
|
|
6566
|
-
if (xm) {
|
|
6567
|
-
m = 0;
|
|
6568
|
-
}
|
|
6569
|
-
p = 0;
|
|
6570
|
-
if (gtlt === ">") {
|
|
6571
|
-
gtlt = ">=";
|
|
6572
|
-
if (xm) {
|
|
6573
|
-
M = +M + 1;
|
|
6574
|
-
m = 0;
|
|
6575
|
-
p = 0;
|
|
6576
|
-
} else {
|
|
6577
|
-
m = +m + 1;
|
|
6578
|
-
p = 0;
|
|
6579
|
-
}
|
|
6580
|
-
} else if (gtlt === "<=") {
|
|
6581
|
-
gtlt = "<";
|
|
6582
|
-
if (xm) {
|
|
6583
|
-
M = +M + 1;
|
|
6584
|
-
} else {
|
|
6585
|
-
m = +m + 1;
|
|
6586
|
-
}
|
|
6587
|
-
}
|
|
6588
|
-
if (gtlt === "<") {
|
|
6589
|
-
pr = "-0";
|
|
6590
|
-
}
|
|
6591
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
6592
|
-
} else if (xm) {
|
|
6593
|
-
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
6594
|
-
} else if (xp) {
|
|
6595
|
-
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
6596
|
-
}
|
|
6597
|
-
debug("xRange return", ret);
|
|
6598
|
-
return ret;
|
|
6599
|
-
});
|
|
6600
|
-
};
|
|
6601
|
-
var replaceStars = (comp, options) => {
|
|
6602
|
-
debug("replaceStars", comp, options);
|
|
6603
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
6604
|
-
};
|
|
6605
|
-
var replaceGTE0 = (comp, options) => {
|
|
6606
|
-
debug("replaceGTE0", comp, options);
|
|
6607
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
6608
|
-
};
|
|
6609
|
-
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
|
|
6610
|
-
if (isX(fM)) {
|
|
6611
|
-
from = "";
|
|
6612
|
-
} else if (isX(fm)) {
|
|
6613
|
-
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
6614
|
-
} else if (isX(fp)) {
|
|
6615
|
-
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
6616
|
-
} else if (fpr) {
|
|
6617
|
-
from = `>=${from}`;
|
|
6618
|
-
} else {
|
|
6619
|
-
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
6620
|
-
}
|
|
6621
|
-
if (isX(tM)) {
|
|
6622
|
-
to = "";
|
|
6623
|
-
} else if (isX(tm)) {
|
|
6624
|
-
to = `<${+tM + 1}.0.0-0`;
|
|
6625
|
-
} else if (isX(tp)) {
|
|
6626
|
-
to = `<${tM}.${+tm + 1}.0-0`;
|
|
6627
|
-
} else if (tpr) {
|
|
6628
|
-
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
6629
|
-
} else if (incPr) {
|
|
6630
|
-
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
6631
|
-
} else {
|
|
6632
|
-
to = `<=${to}`;
|
|
6633
|
-
}
|
|
6634
|
-
return `${from} ${to}`.trim();
|
|
6635
|
-
};
|
|
6636
|
-
var testSet = (set, version, options) => {
|
|
6637
|
-
for (let i = 0; i < set.length; i++) {
|
|
6638
|
-
if (!set[i].test(version)) {
|
|
6639
|
-
return false;
|
|
6640
|
-
}
|
|
6641
|
-
}
|
|
6642
|
-
if (version.prerelease.length && !options.includePrerelease) {
|
|
6643
|
-
for (let i = 0; i < set.length; i++) {
|
|
6644
|
-
debug(set[i].semver);
|
|
6645
|
-
if (set[i].semver === Comparator.ANY) {
|
|
6646
|
-
continue;
|
|
6647
|
-
}
|
|
6648
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
6649
|
-
const allowed = set[i].semver;
|
|
6650
|
-
if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
|
|
6651
|
-
return true;
|
|
6652
|
-
}
|
|
6653
|
-
}
|
|
6654
|
-
}
|
|
6655
|
-
return false;
|
|
6656
|
-
}
|
|
6657
|
-
return true;
|
|
6658
|
-
};
|
|
6659
|
-
}
|
|
6660
|
-
});
|
|
6661
|
-
|
|
6662
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/comparator.js
|
|
6663
|
-
var require_comparator = __commonJS({
|
|
6664
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
6665
|
-
var ANY = Symbol("SemVer ANY");
|
|
6666
|
-
var Comparator = class _Comparator {
|
|
6667
|
-
static get ANY() {
|
|
6668
|
-
return ANY;
|
|
6669
|
-
}
|
|
6670
|
-
constructor(comp, options) {
|
|
6671
|
-
options = parseOptions(options);
|
|
6672
|
-
if (comp instanceof _Comparator) {
|
|
6673
|
-
if (comp.loose === !!options.loose) {
|
|
6674
|
-
return comp;
|
|
6675
|
-
} else {
|
|
6676
|
-
comp = comp.value;
|
|
6677
|
-
}
|
|
6678
|
-
}
|
|
6679
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
6680
|
-
debug("comparator", comp, options);
|
|
6681
|
-
this.options = options;
|
|
6682
|
-
this.loose = !!options.loose;
|
|
6683
|
-
this.parse(comp);
|
|
6684
|
-
if (this.semver === ANY) {
|
|
6685
|
-
this.value = "";
|
|
6686
|
-
} else {
|
|
6687
|
-
this.value = this.operator + this.semver.version;
|
|
6688
|
-
}
|
|
6689
|
-
debug("comp", this);
|
|
6690
|
-
}
|
|
6691
|
-
parse(comp) {
|
|
6692
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
6693
|
-
const m = comp.match(r);
|
|
6694
|
-
if (!m) {
|
|
6695
|
-
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
6696
|
-
}
|
|
6697
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
6698
|
-
if (this.operator === "=") {
|
|
6699
|
-
this.operator = "";
|
|
6700
|
-
}
|
|
6701
|
-
if (!m[2]) {
|
|
6702
|
-
this.semver = ANY;
|
|
6703
|
-
} else {
|
|
6704
|
-
this.semver = new SemVer(m[2], this.options.loose);
|
|
6705
|
-
}
|
|
6706
|
-
}
|
|
6707
|
-
toString() {
|
|
6708
|
-
return this.value;
|
|
6709
|
-
}
|
|
6710
|
-
test(version) {
|
|
6711
|
-
debug("Comparator.test", version, this.options.loose);
|
|
6712
|
-
if (this.semver === ANY || version === ANY) {
|
|
6713
|
-
return true;
|
|
6714
|
-
}
|
|
6715
|
-
if (typeof version === "string") {
|
|
6716
|
-
try {
|
|
6717
|
-
version = new SemVer(version, this.options);
|
|
6718
|
-
} catch (er) {
|
|
6719
|
-
return false;
|
|
6720
|
-
}
|
|
6721
|
-
}
|
|
6722
|
-
return cmp(version, this.operator, this.semver, this.options);
|
|
6723
|
-
}
|
|
6724
|
-
intersects(comp, options) {
|
|
6725
|
-
if (!(comp instanceof _Comparator)) {
|
|
6726
|
-
throw new TypeError("a Comparator is required");
|
|
6727
|
-
}
|
|
6728
|
-
if (this.operator === "") {
|
|
6729
|
-
if (this.value === "") {
|
|
6730
|
-
return true;
|
|
6731
|
-
}
|
|
6732
|
-
return new Range(comp.value, options).test(this.value);
|
|
6733
|
-
} else if (comp.operator === "") {
|
|
6734
|
-
if (comp.value === "") {
|
|
6735
|
-
return true;
|
|
6736
|
-
}
|
|
6737
|
-
return new Range(this.value, options).test(comp.semver);
|
|
6738
|
-
}
|
|
6739
|
-
options = parseOptions(options);
|
|
6740
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
6741
|
-
return false;
|
|
6742
|
-
}
|
|
6743
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
6744
|
-
return false;
|
|
6745
|
-
}
|
|
6746
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
6747
|
-
return true;
|
|
6748
|
-
}
|
|
6749
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
6750
|
-
return true;
|
|
6751
|
-
}
|
|
6752
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
6753
|
-
return true;
|
|
6754
|
-
}
|
|
6755
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
6756
|
-
return true;
|
|
6757
|
-
}
|
|
6758
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
6759
|
-
return true;
|
|
6760
|
-
}
|
|
6761
|
-
return false;
|
|
6762
|
-
}
|
|
6763
|
-
};
|
|
6764
|
-
module2.exports = Comparator;
|
|
6765
|
-
var parseOptions = require_parse_options();
|
|
6766
|
-
var { safeRe: re, t } = require_re();
|
|
6767
|
-
var cmp = require_cmp();
|
|
6768
|
-
var debug = require_debug();
|
|
6769
|
-
var SemVer = require_semver();
|
|
6770
|
-
var Range = require_range();
|
|
6771
|
-
}
|
|
6772
|
-
});
|
|
6773
|
-
|
|
6774
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/satisfies.js
|
|
6775
|
-
var require_satisfies = __commonJS({
|
|
6776
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
6777
|
-
var Range = require_range();
|
|
6778
|
-
var satisfies = (version, range, options) => {
|
|
6779
|
-
try {
|
|
6780
|
-
range = new Range(range, options);
|
|
6781
|
-
} catch (er) {
|
|
6782
|
-
return false;
|
|
6783
|
-
}
|
|
6784
|
-
return range.test(version);
|
|
6785
|
-
};
|
|
6786
|
-
module2.exports = satisfies;
|
|
6787
|
-
}
|
|
6788
|
-
});
|
|
6789
|
-
|
|
6790
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/to-comparators.js
|
|
6791
|
-
var require_to_comparators = __commonJS({
|
|
6792
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
|
|
6793
|
-
var Range = require_range();
|
|
6794
|
-
var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
6795
|
-
module2.exports = toComparators;
|
|
6796
|
-
}
|
|
6797
|
-
});
|
|
6798
|
-
|
|
6799
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/max-satisfying.js
|
|
6800
|
-
var require_max_satisfying = __commonJS({
|
|
6801
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
|
|
6802
|
-
var SemVer = require_semver();
|
|
6803
|
-
var Range = require_range();
|
|
6804
|
-
var maxSatisfying = (versions, range, options) => {
|
|
6805
|
-
let max = null;
|
|
6806
|
-
let maxSV = null;
|
|
6807
|
-
let rangeObj = null;
|
|
6808
|
-
try {
|
|
6809
|
-
rangeObj = new Range(range, options);
|
|
6810
|
-
} catch (er) {
|
|
6811
|
-
return null;
|
|
6812
|
-
}
|
|
6813
|
-
versions.forEach((v) => {
|
|
6814
|
-
if (rangeObj.test(v)) {
|
|
6815
|
-
if (!max || maxSV.compare(v) === -1) {
|
|
6816
|
-
max = v;
|
|
6817
|
-
maxSV = new SemVer(max, options);
|
|
6818
|
-
}
|
|
6819
|
-
}
|
|
6820
|
-
});
|
|
6821
|
-
return max;
|
|
6822
|
-
};
|
|
6823
|
-
module2.exports = maxSatisfying;
|
|
6824
|
-
}
|
|
6825
|
-
});
|
|
6826
|
-
|
|
6827
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-satisfying.js
|
|
6828
|
-
var require_min_satisfying = __commonJS({
|
|
6829
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
|
|
6830
|
-
var SemVer = require_semver();
|
|
6831
|
-
var Range = require_range();
|
|
6832
|
-
var minSatisfying = (versions, range, options) => {
|
|
6833
|
-
let min = null;
|
|
6834
|
-
let minSV = null;
|
|
6835
|
-
let rangeObj = null;
|
|
6836
|
-
try {
|
|
6837
|
-
rangeObj = new Range(range, options);
|
|
6838
|
-
} catch (er) {
|
|
6839
|
-
return null;
|
|
6840
|
-
}
|
|
6841
|
-
versions.forEach((v) => {
|
|
6842
|
-
if (rangeObj.test(v)) {
|
|
6843
|
-
if (!min || minSV.compare(v) === 1) {
|
|
6844
|
-
min = v;
|
|
6845
|
-
minSV = new SemVer(min, options);
|
|
6846
|
-
}
|
|
6847
|
-
}
|
|
6848
|
-
});
|
|
6849
|
-
return min;
|
|
6850
|
-
};
|
|
6851
|
-
module2.exports = minSatisfying;
|
|
6852
|
-
}
|
|
6853
|
-
});
|
|
6854
|
-
|
|
6855
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-version.js
|
|
6856
|
-
var require_min_version = __commonJS({
|
|
6857
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/min-version.js"(exports2, module2) {
|
|
6858
|
-
var SemVer = require_semver();
|
|
6859
|
-
var Range = require_range();
|
|
6860
|
-
var gt = require_gt();
|
|
6861
|
-
var minVersion = (range, loose) => {
|
|
6862
|
-
range = new Range(range, loose);
|
|
6863
|
-
let minver = new SemVer("0.0.0");
|
|
6864
|
-
if (range.test(minver)) {
|
|
6865
|
-
return minver;
|
|
6866
|
-
}
|
|
6867
|
-
minver = new SemVer("0.0.0-0");
|
|
6868
|
-
if (range.test(minver)) {
|
|
6869
|
-
return minver;
|
|
6870
|
-
}
|
|
6871
|
-
minver = null;
|
|
6872
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
6873
|
-
const comparators = range.set[i];
|
|
6874
|
-
let setMin = null;
|
|
6875
|
-
comparators.forEach((comparator) => {
|
|
6876
|
-
const compver = new SemVer(comparator.semver.version);
|
|
6877
|
-
switch (comparator.operator) {
|
|
6878
|
-
case ">":
|
|
6879
|
-
if (compver.prerelease.length === 0) {
|
|
6880
|
-
compver.patch++;
|
|
6881
|
-
} else {
|
|
6882
|
-
compver.prerelease.push(0);
|
|
6883
|
-
}
|
|
6884
|
-
compver.raw = compver.format();
|
|
6885
|
-
case "":
|
|
6886
|
-
case ">=":
|
|
6887
|
-
if (!setMin || gt(compver, setMin)) {
|
|
6888
|
-
setMin = compver;
|
|
6889
|
-
}
|
|
6890
|
-
break;
|
|
6891
|
-
case "<":
|
|
6892
|
-
case "<=":
|
|
6893
|
-
break;
|
|
6894
|
-
default:
|
|
6895
|
-
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
6896
|
-
}
|
|
6897
|
-
});
|
|
6898
|
-
if (setMin && (!minver || gt(minver, setMin))) {
|
|
6899
|
-
minver = setMin;
|
|
6900
|
-
}
|
|
6901
|
-
}
|
|
6902
|
-
if (minver && range.test(minver)) {
|
|
6903
|
-
return minver;
|
|
6904
|
-
}
|
|
6905
|
-
return null;
|
|
6906
|
-
};
|
|
6907
|
-
module2.exports = minVersion;
|
|
6908
|
-
}
|
|
6909
|
-
});
|
|
6910
|
-
|
|
6911
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/valid.js
|
|
6912
|
-
var require_valid2 = __commonJS({
|
|
6913
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/valid.js"(exports2, module2) {
|
|
6914
|
-
var Range = require_range();
|
|
6915
|
-
var validRange = (range, options) => {
|
|
6916
|
-
try {
|
|
6917
|
-
return new Range(range, options).range || "*";
|
|
6918
|
-
} catch (er) {
|
|
6919
|
-
return null;
|
|
6920
|
-
}
|
|
6921
|
-
};
|
|
6922
|
-
module2.exports = validRange;
|
|
6923
|
-
}
|
|
6924
|
-
});
|
|
6925
|
-
|
|
6926
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/outside.js
|
|
6927
|
-
var require_outside = __commonJS({
|
|
6928
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/outside.js"(exports2, module2) {
|
|
6929
|
-
var SemVer = require_semver();
|
|
6930
|
-
var Comparator = require_comparator();
|
|
6931
|
-
var { ANY } = Comparator;
|
|
6932
|
-
var Range = require_range();
|
|
6933
|
-
var satisfies = require_satisfies();
|
|
6934
|
-
var gt = require_gt();
|
|
6935
|
-
var lt = require_lt();
|
|
6936
|
-
var lte = require_lte();
|
|
6937
|
-
var gte = require_gte();
|
|
6938
|
-
var outside = (version, range, hilo, options) => {
|
|
6939
|
-
version = new SemVer(version, options);
|
|
6940
|
-
range = new Range(range, options);
|
|
6941
|
-
let gtfn, ltefn, ltfn, comp, ecomp;
|
|
6942
|
-
switch (hilo) {
|
|
6943
|
-
case ">":
|
|
6944
|
-
gtfn = gt;
|
|
6945
|
-
ltefn = lte;
|
|
6946
|
-
ltfn = lt;
|
|
6947
|
-
comp = ">";
|
|
6948
|
-
ecomp = ">=";
|
|
6949
|
-
break;
|
|
6950
|
-
case "<":
|
|
6951
|
-
gtfn = lt;
|
|
6952
|
-
ltefn = gte;
|
|
6953
|
-
ltfn = gt;
|
|
6954
|
-
comp = "<";
|
|
6955
|
-
ecomp = "<=";
|
|
6956
|
-
break;
|
|
6957
|
-
default:
|
|
6958
|
-
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
|
6959
|
-
}
|
|
6960
|
-
if (satisfies(version, range, options)) {
|
|
6961
|
-
return false;
|
|
6962
|
-
}
|
|
6963
|
-
for (let i = 0; i < range.set.length; ++i) {
|
|
6964
|
-
const comparators = range.set[i];
|
|
6965
|
-
let high = null;
|
|
6966
|
-
let low = null;
|
|
6967
|
-
comparators.forEach((comparator) => {
|
|
6968
|
-
if (comparator.semver === ANY) {
|
|
6969
|
-
comparator = new Comparator(">=0.0.0");
|
|
6970
|
-
}
|
|
6971
|
-
high = high || comparator;
|
|
6972
|
-
low = low || comparator;
|
|
6973
|
-
if (gtfn(comparator.semver, high.semver, options)) {
|
|
6974
|
-
high = comparator;
|
|
6975
|
-
} else if (ltfn(comparator.semver, low.semver, options)) {
|
|
6976
|
-
low = comparator;
|
|
6977
|
-
}
|
|
6978
|
-
});
|
|
6979
|
-
if (high.operator === comp || high.operator === ecomp) {
|
|
6980
|
-
return false;
|
|
6981
|
-
}
|
|
6982
|
-
if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
|
|
6983
|
-
return false;
|
|
6984
|
-
} else if (low.operator === ecomp && ltfn(version, low.semver)) {
|
|
6985
|
-
return false;
|
|
6986
|
-
}
|
|
4690
|
+
}),
|
|
4691
|
+
internal: kitInternals2
|
|
4692
|
+
}).strict();
|
|
4693
|
+
tableSquashed2 = objectType({
|
|
4694
|
+
name: stringType(),
|
|
4695
|
+
schema: stringType(),
|
|
4696
|
+
columns: recordType(stringType(), column2),
|
|
4697
|
+
indexes: recordType(stringType(), stringType()),
|
|
4698
|
+
foreignKeys: recordType(stringType(), stringType()),
|
|
4699
|
+
compositePrimaryKeys: recordType(stringType(), stringType()),
|
|
4700
|
+
uniqueConstraints: recordType(stringType(), stringType())
|
|
4701
|
+
}).strict();
|
|
4702
|
+
tableSquashedV42 = objectType({
|
|
4703
|
+
name: stringType(),
|
|
4704
|
+
schema: stringType(),
|
|
4705
|
+
columns: recordType(stringType(), column2),
|
|
4706
|
+
indexes: recordType(stringType(), stringType()),
|
|
4707
|
+
foreignKeys: recordType(stringType(), stringType())
|
|
4708
|
+
}).strict();
|
|
4709
|
+
pgSchemaSquashedV4 = objectType({
|
|
4710
|
+
version: literalType("4"),
|
|
4711
|
+
dialect: literalType("pg"),
|
|
4712
|
+
tables: recordType(stringType(), tableSquashedV42),
|
|
4713
|
+
enums: recordType(stringType(), enumSchemaV1),
|
|
4714
|
+
schemas: recordType(stringType(), stringType())
|
|
4715
|
+
}).strict();
|
|
4716
|
+
pgSchemaSquashed = objectType({
|
|
4717
|
+
version: literalType("6"),
|
|
4718
|
+
dialect: literalType("postgresql"),
|
|
4719
|
+
tables: recordType(stringType(), tableSquashed2),
|
|
4720
|
+
enums: recordType(stringType(), enumSchema),
|
|
4721
|
+
schemas: recordType(stringType(), stringType())
|
|
4722
|
+
}).strict();
|
|
4723
|
+
pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
|
4724
|
+
pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
|
4725
|
+
pgSchemaV5 = pgSchemaInternalV5.merge(schemaHash2);
|
|
4726
|
+
pgSchema2 = pgSchemaInternal.merge(schemaHash2);
|
|
4727
|
+
backwardCompatiblePgSchema = unionType([pgSchemaV5, pgSchema2]);
|
|
4728
|
+
dryPg = pgSchema2.parse({
|
|
4729
|
+
version: snapshotVersion,
|
|
4730
|
+
dialect: "postgresql",
|
|
4731
|
+
id: originUUID,
|
|
4732
|
+
prevId: "",
|
|
4733
|
+
tables: {},
|
|
4734
|
+
enums: {},
|
|
4735
|
+
schemas: {},
|
|
4736
|
+
_meta: {
|
|
4737
|
+
schemas: {},
|
|
4738
|
+
tables: {},
|
|
4739
|
+
columns: {}
|
|
6987
4740
|
}
|
|
6988
|
-
|
|
6989
|
-
};
|
|
6990
|
-
module2.exports = outside;
|
|
6991
|
-
}
|
|
6992
|
-
});
|
|
6993
|
-
|
|
6994
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/gtr.js
|
|
6995
|
-
var require_gtr = __commonJS({
|
|
6996
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
6997
|
-
var outside = require_outside();
|
|
6998
|
-
var gtr = (version, range, options) => outside(version, range, ">", options);
|
|
6999
|
-
module2.exports = gtr;
|
|
7000
|
-
}
|
|
7001
|
-
});
|
|
7002
|
-
|
|
7003
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/ltr.js
|
|
7004
|
-
var require_ltr = __commonJS({
|
|
7005
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
7006
|
-
var outside = require_outside();
|
|
7007
|
-
var ltr = (version, range, options) => outside(version, range, "<", options);
|
|
7008
|
-
module2.exports = ltr;
|
|
7009
|
-
}
|
|
7010
|
-
});
|
|
7011
|
-
|
|
7012
|
-
// node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/intersects.js
|
|
7013
|
-
var require_intersects = __commonJS({
|
|
7014
|
-
"node_modules/.pnpm/semver@7.6.0/node_modules/semver/ranges/intersects.js"(exports2, module2) {
|
|
7015
|
-
var Range = require_range();
|
|
7016
|
-
var intersects = (r1, r2, options) => {
|
|
7017
|
-
r1 = new Range(r1, options);
|
|
7018
|
-
r2 = new Range(r2, options);
|
|
7019
|
-
return r1.intersects(r2, options);
|
|
7020
|
-
};
|
|
7021
|
-
module2.exports = intersects;
|
|
4741
|
+
});
|
|
7022
4742
|
}
|
|
7023
4743
|
});
|
|
7024
4744
|
|
|
7025
|
-
//
|
|
7026
|
-
var
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
4745
|
+
// src/serializer/sqliteSchema.ts
|
|
4746
|
+
var index3, fk3, compositePK3, column3, tableV33, uniqueConstraint3, table3, dialect2, schemaHash3, schemaInternalV32, schemaInternalV42, latestVersion, schemaInternal2, schemaV32, schemaV42, schema2, tableSquashed3, schemaSquashed2, drySQLite;
|
|
4747
|
+
var init_sqliteSchema = __esm({
|
|
4748
|
+
"src/serializer/sqliteSchema.ts"() {
|
|
4749
|
+
"use strict";
|
|
4750
|
+
init_global();
|
|
4751
|
+
init_lib();
|
|
4752
|
+
index3 = objectType({
|
|
4753
|
+
name: stringType(),
|
|
4754
|
+
columns: stringType().array(),
|
|
4755
|
+
where: stringType().optional(),
|
|
4756
|
+
isUnique: booleanType()
|
|
4757
|
+
}).strict();
|
|
4758
|
+
fk3 = objectType({
|
|
4759
|
+
name: stringType(),
|
|
4760
|
+
tableFrom: stringType(),
|
|
4761
|
+
columnsFrom: stringType().array(),
|
|
4762
|
+
tableTo: stringType(),
|
|
4763
|
+
columnsTo: stringType().array(),
|
|
4764
|
+
onUpdate: stringType().optional(),
|
|
4765
|
+
onDelete: stringType().optional()
|
|
4766
|
+
}).strict();
|
|
4767
|
+
compositePK3 = objectType({
|
|
4768
|
+
columns: stringType().array(),
|
|
4769
|
+
name: stringType().optional()
|
|
4770
|
+
}).strict();
|
|
4771
|
+
column3 = objectType({
|
|
4772
|
+
name: stringType(),
|
|
4773
|
+
type: stringType(),
|
|
4774
|
+
primaryKey: booleanType(),
|
|
4775
|
+
notNull: booleanType(),
|
|
4776
|
+
autoincrement: booleanType().optional(),
|
|
4777
|
+
default: anyType().optional()
|
|
4778
|
+
}).strict();
|
|
4779
|
+
tableV33 = objectType({
|
|
4780
|
+
name: stringType(),
|
|
4781
|
+
columns: recordType(stringType(), column3),
|
|
4782
|
+
indexes: recordType(stringType(), index3),
|
|
4783
|
+
foreignKeys: recordType(stringType(), fk3)
|
|
4784
|
+
}).strict();
|
|
4785
|
+
uniqueConstraint3 = objectType({
|
|
4786
|
+
name: stringType(),
|
|
4787
|
+
columns: stringType().array()
|
|
4788
|
+
}).strict();
|
|
4789
|
+
table3 = objectType({
|
|
4790
|
+
name: stringType(),
|
|
4791
|
+
columns: recordType(stringType(), column3),
|
|
4792
|
+
indexes: recordType(stringType(), index3),
|
|
4793
|
+
foreignKeys: recordType(stringType(), fk3),
|
|
4794
|
+
compositePrimaryKeys: recordType(stringType(), compositePK3),
|
|
4795
|
+
uniqueConstraints: recordType(stringType(), uniqueConstraint3).default({})
|
|
4796
|
+
}).strict();
|
|
4797
|
+
dialect2 = enumType(["sqlite"]);
|
|
4798
|
+
schemaHash3 = objectType({
|
|
4799
|
+
id: stringType(),
|
|
4800
|
+
prevId: stringType()
|
|
4801
|
+
}).strict();
|
|
4802
|
+
schemaInternalV32 = objectType({
|
|
4803
|
+
version: literalType("3"),
|
|
4804
|
+
dialect: dialect2,
|
|
4805
|
+
tables: recordType(stringType(), tableV33),
|
|
4806
|
+
enums: objectType({})
|
|
4807
|
+
}).strict();
|
|
4808
|
+
schemaInternalV42 = objectType({
|
|
4809
|
+
version: literalType("4"),
|
|
4810
|
+
dialect: dialect2,
|
|
4811
|
+
tables: recordType(stringType(), table3),
|
|
4812
|
+
enums: objectType({})
|
|
4813
|
+
}).strict();
|
|
4814
|
+
latestVersion = literalType("5");
|
|
4815
|
+
schemaInternal2 = objectType({
|
|
4816
|
+
version: latestVersion,
|
|
4817
|
+
dialect: dialect2,
|
|
4818
|
+
tables: recordType(stringType(), table3),
|
|
4819
|
+
enums: objectType({}),
|
|
4820
|
+
_meta: objectType({
|
|
4821
|
+
tables: recordType(stringType(), stringType()),
|
|
4822
|
+
columns: recordType(stringType(), stringType())
|
|
4823
|
+
})
|
|
4824
|
+
}).strict();
|
|
4825
|
+
schemaV32 = schemaInternalV32.merge(schemaHash3).strict();
|
|
4826
|
+
schemaV42 = schemaInternalV42.merge(schemaHash3).strict();
|
|
4827
|
+
schema2 = schemaInternal2.merge(schemaHash3).strict();
|
|
4828
|
+
tableSquashed3 = objectType({
|
|
4829
|
+
name: stringType(),
|
|
4830
|
+
columns: recordType(stringType(), column3),
|
|
4831
|
+
indexes: recordType(stringType(), stringType()),
|
|
4832
|
+
foreignKeys: recordType(stringType(), stringType()),
|
|
4833
|
+
compositePrimaryKeys: recordType(stringType(), stringType()),
|
|
4834
|
+
uniqueConstraints: recordType(stringType(), stringType()).default({})
|
|
4835
|
+
}).strict();
|
|
4836
|
+
schemaSquashed2 = objectType({
|
|
4837
|
+
version: latestVersion,
|
|
4838
|
+
dialect: dialect2,
|
|
4839
|
+
tables: recordType(stringType(), tableSquashed3),
|
|
4840
|
+
enums: anyType()
|
|
4841
|
+
}).strict();
|
|
4842
|
+
drySQLite = schema2.parse({
|
|
4843
|
+
version: "5",
|
|
4844
|
+
dialect: "sqlite",
|
|
4845
|
+
id: originUUID,
|
|
4846
|
+
prevId: "",
|
|
4847
|
+
tables: {},
|
|
4848
|
+
enums: {},
|
|
4849
|
+
_meta: {
|
|
4850
|
+
tables: {},
|
|
4851
|
+
columns: {}
|
|
7066
4852
|
}
|
|
7067
|
-
|
|
7068
|
-
const original = typeof range.raw === "string" ? range.raw : String(range);
|
|
7069
|
-
return simplified.length < original.length ? simplified : range;
|
|
7070
|
-
};
|
|
4853
|
+
});
|
|
7071
4854
|
}
|
|
7072
4855
|
});
|
|
7073
4856
|
|
|
7074
|
-
//
|
|
7075
|
-
var
|
|
7076
|
-
"
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
if (sub === dom) {
|
|
7084
|
-
return true;
|
|
7085
|
-
}
|
|
7086
|
-
sub = new Range(sub, options);
|
|
7087
|
-
dom = new Range(dom, options);
|
|
7088
|
-
let sawNonNull = false;
|
|
7089
|
-
OUTER:
|
|
7090
|
-
for (const simpleSub of sub.set) {
|
|
7091
|
-
for (const simpleDom of dom.set) {
|
|
7092
|
-
const isSub = simpleSubset(simpleSub, simpleDom, options);
|
|
7093
|
-
sawNonNull = sawNonNull || isSub !== null;
|
|
7094
|
-
if (isSub) {
|
|
7095
|
-
continue OUTER;
|
|
7096
|
-
}
|
|
7097
|
-
}
|
|
7098
|
-
if (sawNonNull) {
|
|
7099
|
-
return false;
|
|
7100
|
-
}
|
|
7101
|
-
}
|
|
7102
|
-
return true;
|
|
7103
|
-
};
|
|
7104
|
-
var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
|
|
7105
|
-
var minimumVersion = [new Comparator(">=0.0.0")];
|
|
7106
|
-
var simpleSubset = (sub, dom, options) => {
|
|
7107
|
-
if (sub === dom) {
|
|
7108
|
-
return true;
|
|
7109
|
-
}
|
|
7110
|
-
if (sub.length === 1 && sub[0].semver === ANY) {
|
|
7111
|
-
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
7112
|
-
return true;
|
|
7113
|
-
} else if (options.includePrerelease) {
|
|
7114
|
-
sub = minimumVersionWithPreRelease;
|
|
7115
|
-
} else {
|
|
7116
|
-
sub = minimumVersion;
|
|
7117
|
-
}
|
|
7118
|
-
}
|
|
7119
|
-
if (dom.length === 1 && dom[0].semver === ANY) {
|
|
7120
|
-
if (options.includePrerelease) {
|
|
7121
|
-
return true;
|
|
7122
|
-
} else {
|
|
7123
|
-
dom = minimumVersion;
|
|
7124
|
-
}
|
|
7125
|
-
}
|
|
7126
|
-
const eqSet = /* @__PURE__ */ new Set();
|
|
7127
|
-
let gt, lt;
|
|
7128
|
-
for (const c of sub) {
|
|
7129
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
7130
|
-
gt = higherGT(gt, c, options);
|
|
7131
|
-
} else if (c.operator === "<" || c.operator === "<=") {
|
|
7132
|
-
lt = lowerLT(lt, c, options);
|
|
7133
|
-
} else {
|
|
7134
|
-
eqSet.add(c.semver);
|
|
7135
|
-
}
|
|
7136
|
-
}
|
|
7137
|
-
if (eqSet.size > 1) {
|
|
7138
|
-
return null;
|
|
7139
|
-
}
|
|
7140
|
-
let gtltComp;
|
|
7141
|
-
if (gt && lt) {
|
|
7142
|
-
gtltComp = compare(gt.semver, lt.semver, options);
|
|
7143
|
-
if (gtltComp > 0) {
|
|
7144
|
-
return null;
|
|
7145
|
-
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
7146
|
-
return null;
|
|
7147
|
-
}
|
|
7148
|
-
}
|
|
7149
|
-
for (const eq of eqSet) {
|
|
7150
|
-
if (gt && !satisfies(eq, String(gt), options)) {
|
|
7151
|
-
return null;
|
|
7152
|
-
}
|
|
7153
|
-
if (lt && !satisfies(eq, String(lt), options)) {
|
|
7154
|
-
return null;
|
|
7155
|
-
}
|
|
7156
|
-
for (const c of dom) {
|
|
7157
|
-
if (!satisfies(eq, String(c), options)) {
|
|
7158
|
-
return false;
|
|
7159
|
-
}
|
|
7160
|
-
}
|
|
7161
|
-
return true;
|
|
7162
|
-
}
|
|
7163
|
-
let higher, lower;
|
|
7164
|
-
let hasDomLT, hasDomGT;
|
|
7165
|
-
let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
|
|
7166
|
-
let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
|
|
7167
|
-
if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
|
|
7168
|
-
needDomLTPre = false;
|
|
7169
|
-
}
|
|
7170
|
-
for (const c of dom) {
|
|
7171
|
-
hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">=";
|
|
7172
|
-
hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<=";
|
|
7173
|
-
if (gt) {
|
|
7174
|
-
if (needDomGTPre) {
|
|
7175
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
|
|
7176
|
-
needDomGTPre = false;
|
|
7177
|
-
}
|
|
7178
|
-
}
|
|
7179
|
-
if (c.operator === ">" || c.operator === ">=") {
|
|
7180
|
-
higher = higherGT(gt, c, options);
|
|
7181
|
-
if (higher === c && higher !== gt) {
|
|
7182
|
-
return false;
|
|
7183
|
-
}
|
|
7184
|
-
} else if (gt.operator === ">=" && !satisfies(gt.semver, String(c), options)) {
|
|
7185
|
-
return false;
|
|
7186
|
-
}
|
|
7187
|
-
}
|
|
7188
|
-
if (lt) {
|
|
7189
|
-
if (needDomLTPre) {
|
|
7190
|
-
if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
|
|
7191
|
-
needDomLTPre = false;
|
|
7192
|
-
}
|
|
7193
|
-
}
|
|
7194
|
-
if (c.operator === "<" || c.operator === "<=") {
|
|
7195
|
-
lower = lowerLT(lt, c, options);
|
|
7196
|
-
if (lower === c && lower !== lt) {
|
|
7197
|
-
return false;
|
|
7198
|
-
}
|
|
7199
|
-
} else if (lt.operator === "<=" && !satisfies(lt.semver, String(c), options)) {
|
|
7200
|
-
return false;
|
|
7201
|
-
}
|
|
7202
|
-
}
|
|
7203
|
-
if (!c.operator && (lt || gt) && gtltComp !== 0) {
|
|
7204
|
-
return false;
|
|
7205
|
-
}
|
|
7206
|
-
}
|
|
7207
|
-
if (gt && hasDomLT && !lt && gtltComp !== 0) {
|
|
7208
|
-
return false;
|
|
7209
|
-
}
|
|
7210
|
-
if (lt && hasDomGT && !gt && gtltComp !== 0) {
|
|
7211
|
-
return false;
|
|
7212
|
-
}
|
|
7213
|
-
if (needDomGTPre || needDomLTPre) {
|
|
7214
|
-
return false;
|
|
7215
|
-
}
|
|
7216
|
-
return true;
|
|
7217
|
-
};
|
|
7218
|
-
var higherGT = (a, b, options) => {
|
|
7219
|
-
if (!a) {
|
|
7220
|
-
return b;
|
|
7221
|
-
}
|
|
7222
|
-
const comp = compare(a.semver, b.semver, options);
|
|
7223
|
-
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
7224
|
-
};
|
|
7225
|
-
var lowerLT = (a, b, options) => {
|
|
7226
|
-
if (!a) {
|
|
7227
|
-
return b;
|
|
7228
|
-
}
|
|
7229
|
-
const comp = compare(a.semver, b.semver, options);
|
|
7230
|
-
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
7231
|
-
};
|
|
7232
|
-
module2.exports = subset;
|
|
4857
|
+
// src/utils.ts
|
|
4858
|
+
var init_utils = __esm({
|
|
4859
|
+
"src/utils.ts"() {
|
|
4860
|
+
"use strict";
|
|
4861
|
+
init_views();
|
|
4862
|
+
init_mysqlSchema();
|
|
4863
|
+
init_pgSchema();
|
|
4864
|
+
init_sqliteSchema();
|
|
4865
|
+
init_global();
|
|
7233
4866
|
}
|
|
7234
4867
|
});
|
|
7235
4868
|
|
|
7236
|
-
//
|
|
7237
|
-
var
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
var parse = require_parse();
|
|
7244
|
-
var valid = require_valid();
|
|
7245
|
-
var clean = require_clean();
|
|
7246
|
-
var inc = require_inc();
|
|
7247
|
-
var diff = require_diff();
|
|
7248
|
-
var major = require_major();
|
|
7249
|
-
var minor = require_minor();
|
|
7250
|
-
var patch = require_patch();
|
|
7251
|
-
var prerelease = require_prerelease();
|
|
7252
|
-
var compare = require_compare();
|
|
7253
|
-
var rcompare = require_rcompare();
|
|
7254
|
-
var compareLoose = require_compare_loose();
|
|
7255
|
-
var compareBuild = require_compare_build();
|
|
7256
|
-
var sort = require_sort();
|
|
7257
|
-
var rsort = require_rsort();
|
|
7258
|
-
var gt = require_gt();
|
|
7259
|
-
var lt = require_lt();
|
|
7260
|
-
var eq = require_eq();
|
|
7261
|
-
var neq = require_neq();
|
|
7262
|
-
var gte = require_gte();
|
|
7263
|
-
var lte = require_lte();
|
|
7264
|
-
var cmp = require_cmp();
|
|
7265
|
-
var coerce = require_coerce();
|
|
7266
|
-
var Comparator = require_comparator();
|
|
7267
|
-
var Range = require_range();
|
|
7268
|
-
var satisfies = require_satisfies();
|
|
7269
|
-
var toComparators = require_to_comparators();
|
|
7270
|
-
var maxSatisfying = require_max_satisfying();
|
|
7271
|
-
var minSatisfying = require_min_satisfying();
|
|
7272
|
-
var minVersion = require_min_version();
|
|
7273
|
-
var validRange = require_valid2();
|
|
7274
|
-
var outside = require_outside();
|
|
7275
|
-
var gtr = require_gtr();
|
|
7276
|
-
var ltr = require_ltr();
|
|
7277
|
-
var intersects = require_intersects();
|
|
7278
|
-
var simplifyRange = require_simplify();
|
|
7279
|
-
var subset = require_subset();
|
|
7280
|
-
module2.exports = {
|
|
7281
|
-
parse,
|
|
7282
|
-
valid,
|
|
7283
|
-
clean,
|
|
7284
|
-
inc,
|
|
7285
|
-
diff,
|
|
7286
|
-
major,
|
|
7287
|
-
minor,
|
|
7288
|
-
patch,
|
|
7289
|
-
prerelease,
|
|
7290
|
-
compare,
|
|
7291
|
-
rcompare,
|
|
7292
|
-
compareLoose,
|
|
7293
|
-
compareBuild,
|
|
7294
|
-
sort,
|
|
7295
|
-
rsort,
|
|
7296
|
-
gt,
|
|
7297
|
-
lt,
|
|
7298
|
-
eq,
|
|
7299
|
-
neq,
|
|
7300
|
-
gte,
|
|
7301
|
-
lte,
|
|
7302
|
-
cmp,
|
|
7303
|
-
coerce,
|
|
7304
|
-
Comparator,
|
|
7305
|
-
Range,
|
|
7306
|
-
satisfies,
|
|
7307
|
-
toComparators,
|
|
7308
|
-
maxSatisfying,
|
|
7309
|
-
minSatisfying,
|
|
7310
|
-
minVersion,
|
|
7311
|
-
validRange,
|
|
7312
|
-
outside,
|
|
7313
|
-
gtr,
|
|
7314
|
-
ltr,
|
|
7315
|
-
intersects,
|
|
7316
|
-
simplifyRange,
|
|
7317
|
-
subset,
|
|
7318
|
-
SemVer,
|
|
7319
|
-
re: internalRe.re,
|
|
7320
|
-
src: internalRe.src,
|
|
7321
|
-
tokens: internalRe.t,
|
|
7322
|
-
SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
|
|
7323
|
-
RELEASE_TYPES: constants.RELEASE_TYPES,
|
|
7324
|
-
compareIdentifiers: identifiers.compareIdentifiers,
|
|
7325
|
-
rcompareIdentifiers: identifiers.rcompareIdentifiers
|
|
7326
|
-
};
|
|
4869
|
+
// src/cli/views.ts
|
|
4870
|
+
var import_hanji;
|
|
4871
|
+
var init_views = __esm({
|
|
4872
|
+
"src/cli/views.ts"() {
|
|
4873
|
+
"use strict";
|
|
4874
|
+
import_hanji = __toESM(require_hanji());
|
|
4875
|
+
init_utils();
|
|
7327
4876
|
}
|
|
7328
4877
|
});
|
|
7329
4878
|
|
|
@@ -7378,7 +4927,9 @@ function mapSqlToSqliteType(sqlType) {
|
|
|
7378
4927
|
return "text";
|
|
7379
4928
|
} else if (lowered.startsWith("blob")) {
|
|
7380
4929
|
return "blob";
|
|
7381
|
-
} else if (["real", "double", "double precision", "float"].some(
|
|
4930
|
+
} else if (["real", "double", "double precision", "float"].some(
|
|
4931
|
+
(it) => lowered.startsWith(it)
|
|
4932
|
+
)) {
|
|
7382
4933
|
return "real";
|
|
7383
4934
|
} else {
|
|
7384
4935
|
return "numeric";
|
|
@@ -7399,7 +4950,7 @@ var init_sqliteSerializer = __esm({
|
|
|
7399
4950
|
`SELECT
|
|
7400
4951
|
m.name as "tableName", p.name as "columnName", p.type as "columnType", p."notnull" as "notNull", p.dflt_value as "defaultValue", p.pk as pk
|
|
7401
4952
|
FROM sqlite_master AS m JOIN pragma_table_info(m.name) AS p
|
|
7402
|
-
WHERE m.type = 'table' and m.tbl_name != 'sqlite_sequence' and m.tbl_name != 'sqlite_stat1' and m.tbl_name != '_litestream_seq' and m.tbl_name != '_litestream_lock' and m.tbl_name != 'libsql_wasm_func_table';
|
|
4953
|
+
WHERE m.type = 'table' and m.tbl_name != 'sqlite_sequence' and m.tbl_name != 'sqlite_stat1' and m.tbl_name != '_litestream_seq' and m.tbl_name != '_litestream_lock' and m.tbl_name != 'libsql_wasm_func_table' and m.tbl_name != '__drizzle_migrations';
|
|
7403
4954
|
`
|
|
7404
4955
|
);
|
|
7405
4956
|
const tablesWithSeq = [];
|
|
@@ -8008,7 +5559,7 @@ var init_pgSerializer = __esm({
|
|
|
8008
5559
|
const columnName = columnResponse.attname;
|
|
8009
5560
|
const columnAdditionalDT = columnResponse.additional_dt;
|
|
8010
5561
|
const columnDimensions = columnResponse.array_dimensions;
|
|
8011
|
-
const
|
|
5562
|
+
const enumType3 = columnResponse.enum_name;
|
|
8012
5563
|
let columnType = columnResponse.data_type;
|
|
8013
5564
|
const primaryKey = tableConstraints.filter(
|
|
8014
5565
|
(mapRow) => columnName === mapRow.column_name && mapRow.constraint_type === "PRIMARY KEY"
|
|
@@ -8072,8 +5623,8 @@ var init_pgSerializer = __esm({
|
|
|
8072
5623
|
columnTypeMapped = trimChar(columnTypeMapped, '"');
|
|
8073
5624
|
columnToReturn[columnName] = {
|
|
8074
5625
|
name: columnName,
|
|
8075
|
-
type: columnAdditionalDT === "USER-DEFINED" ?
|
|
8076
|
-
typeSchema: enumsToReturn[`${tableSchema}.${
|
|
5626
|
+
type: columnAdditionalDT === "USER-DEFINED" ? enumType3 : columnTypeMapped,
|
|
5627
|
+
typeSchema: enumsToReturn[`${tableSchema}.${enumType3}`] !== void 0 ? enumsToReturn[`${tableSchema}.${enumType3}`].schema : void 0,
|
|
8077
5628
|
primaryKey: primaryKey.length === 1 && cprimaryKey.length < 2,
|
|
8078
5629
|
// default: isSerial ? undefined : defaultValue,
|
|
8079
5630
|
notNull: columnResponse.is_nullable === "NO"
|
|
@@ -8156,7 +5707,7 @@ var init_pgSerializer = __esm({
|
|
|
8156
5707
|
const schemasObject = Object.fromEntries([...schemas].map((it) => [it, it]));
|
|
8157
5708
|
return {
|
|
8158
5709
|
version: "6",
|
|
8159
|
-
dialect: "
|
|
5710
|
+
dialect: "postgresql",
|
|
8160
5711
|
tables: result,
|
|
8161
5712
|
enums: enumsToReturn,
|
|
8162
5713
|
schemas: schemasObject,
|
|
@@ -8387,10 +5938,6 @@ var sqliteSchemaToDrizzle = (schema3) => {
|
|
|
8387
5938
|
return tables;
|
|
8388
5939
|
};
|
|
8389
5940
|
|
|
8390
|
-
// src/cli/utils.ts
|
|
8391
|
-
init_views();
|
|
8392
|
-
var import_semver = __toESM(require_semver2());
|
|
8393
|
-
|
|
8394
5941
|
// src/cli/commands/sqliteIntrospect.ts
|
|
8395
5942
|
init_views();
|
|
8396
5943
|
init_global();
|
|
@@ -8494,6 +6041,9 @@ String.prototype.squashSpaces = function() {
|
|
|
8494
6041
|
String.prototype.camelCase = function() {
|
|
8495
6042
|
return camelCase(String(this));
|
|
8496
6043
|
};
|
|
6044
|
+
String.prototype.capitalise = function() {
|
|
6045
|
+
return this && this.length > 0 ? `${this[0].toUpperCase()}${this.slice(1)}` : String(this);
|
|
6046
|
+
};
|
|
8497
6047
|
String.prototype.concatIf = function(it, condition) {
|
|
8498
6048
|
return condition ? `${this}${it}` : String(this);
|
|
8499
6049
|
};
|