drizzle-kit 0.20.17-7f33638 → 0.20.17-8018c29

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