drizzle-kit 0.23.2-ab12f1d → 0.23.2-e30226e

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. package/api.js +131 -481
  2. package/api.mjs +131 -481
  3. package/bin.cjs +7 -132
  4. package/package.json +2 -1
package/bin.cjs CHANGED
@@ -8660,125 +8660,6 @@ var init_utils2 = __esm({
8660
8660
  }
8661
8661
  });
8662
8662
 
8663
- // ../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js
8664
- function camelCase(input, options) {
8665
- if (!(typeof input === "string" || Array.isArray(input))) {
8666
- throw new TypeError("Expected the input to be `string | string[]`");
8667
- }
8668
- options = {
8669
- pascalCase: false,
8670
- preserveConsecutiveUppercase: false,
8671
- ...options
8672
- };
8673
- if (Array.isArray(input)) {
8674
- input = input.map((x2) => x2.trim()).filter((x2) => x2.length).join("-");
8675
- } else {
8676
- input = input.trim();
8677
- }
8678
- if (input.length === 0) {
8679
- return "";
8680
- }
8681
- const toLowerCase = options.locale === false ? (string2) => string2.toLowerCase() : (string2) => string2.toLocaleLowerCase(options.locale);
8682
- const toUpperCase = options.locale === false ? (string2) => string2.toUpperCase() : (string2) => string2.toLocaleUpperCase(options.locale);
8683
- if (input.length === 1) {
8684
- if (SEPARATORS.test(input)) {
8685
- return "";
8686
- }
8687
- return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
8688
- }
8689
- const hasUpperCase = input !== toLowerCase(input);
8690
- if (hasUpperCase) {
8691
- input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);
8692
- }
8693
- input = input.replace(LEADING_SEPARATORS, "");
8694
- input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
8695
- if (options.pascalCase) {
8696
- input = toUpperCase(input.charAt(0)) + input.slice(1);
8697
- }
8698
- return postProcess(input, toUpperCase);
8699
- }
8700
- var UPPERCASE, LOWERCASE, LEADING_CAPITAL, IDENTIFIER, SEPARATORS, LEADING_SEPARATORS, SEPARATORS_AND_IDENTIFIER, NUMBERS_AND_IDENTIFIER, preserveCamelCase, preserveConsecutiveUppercase, postProcess;
8701
- var init_camelcase = __esm({
8702
- "../node_modules/.pnpm/camelcase@7.0.1/node_modules/camelcase/index.js"() {
8703
- UPPERCASE = /[\p{Lu}]/u;
8704
- LOWERCASE = /[\p{Ll}]/u;
8705
- LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
8706
- IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u;
8707
- SEPARATORS = /[_.\- ]+/;
8708
- LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source);
8709
- SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
8710
- NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu");
8711
- preserveCamelCase = (string2, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
8712
- let isLastCharLower = false;
8713
- let isLastCharUpper = false;
8714
- let isLastLastCharUpper = false;
8715
- let isLastLastCharPreserved = false;
8716
- for (let index4 = 0; index4 < string2.length; index4++) {
8717
- const character = string2[index4];
8718
- isLastLastCharPreserved = index4 > 2 ? string2[index4 - 3] === "-" : true;
8719
- if (isLastCharLower && UPPERCASE.test(character)) {
8720
- string2 = string2.slice(0, index4) + "-" + string2.slice(index4);
8721
- isLastCharLower = false;
8722
- isLastLastCharUpper = isLastCharUpper;
8723
- isLastCharUpper = true;
8724
- index4++;
8725
- } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) {
8726
- string2 = string2.slice(0, index4 - 1) + "-" + string2.slice(index4 - 1);
8727
- isLastLastCharUpper = isLastCharUpper;
8728
- isLastCharUpper = false;
8729
- isLastCharLower = true;
8730
- } else {
8731
- isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
8732
- isLastLastCharUpper = isLastCharUpper;
8733
- isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
8734
- }
8735
- }
8736
- return string2;
8737
- };
8738
- preserveConsecutiveUppercase = (input, toLowerCase) => {
8739
- LEADING_CAPITAL.lastIndex = 0;
8740
- return input.replace(LEADING_CAPITAL, (m1) => toLowerCase(m1));
8741
- };
8742
- postProcess = (input, toUpperCase) => {
8743
- SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
8744
- NUMBERS_AND_IDENTIFIER.lastIndex = 0;
8745
- return input.replace(SEPARATORS_AND_IDENTIFIER, (_2, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m2) => toUpperCase(m2));
8746
- };
8747
- }
8748
- });
8749
-
8750
- // src/@types/utils.ts
8751
- var init_utils3 = __esm({
8752
- "src/@types/utils.ts"() {
8753
- "use strict";
8754
- init_camelcase();
8755
- String.prototype.trimChar = function(char) {
8756
- let start = 0;
8757
- let end = this.length;
8758
- while (start < end && this[start] === char)
8759
- ++start;
8760
- while (end > start && this[end - 1] === char)
8761
- --end;
8762
- return start > 0 || end < this.length ? this.substring(start, end) : this.toString();
8763
- };
8764
- String.prototype.squashSpaces = function() {
8765
- return this.replace(/ +/g, " ").trim();
8766
- };
8767
- String.prototype.camelCase = function() {
8768
- return camelCase(String(this));
8769
- };
8770
- String.prototype.capitalise = function() {
8771
- return this && this.length > 0 ? `${this[0].toUpperCase()}${this.slice(1)}` : String(this);
8772
- };
8773
- String.prototype.concatIf = function(it, condition) {
8774
- return condition ? `${this}${it}` : String(this);
8775
- };
8776
- Array.prototype.random = function() {
8777
- return this[~~(Math.random() * this.length)];
8778
- };
8779
- }
8780
- });
8781
-
8782
8663
  // ../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js
8783
8664
  var require_old = __commonJS({
8784
8665
  "../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) {
@@ -11394,7 +11275,6 @@ var init_mysql = __esm({
11394
11275
  init_lib();
11395
11276
  init_views();
11396
11277
  init_common();
11397
- init_outputs();
11398
11278
  mysqlCredentials = unionType([
11399
11279
  objectType({
11400
11280
  host: stringType().min(1),
@@ -17263,7 +17143,7 @@ var require_node2 = __commonJS({
17263
17143
 
17264
17144
  // src/cli/commands/utils.ts
17265
17145
  var import_fs2, import_hanji2, import_path2, assertES5, safeRegister, prepareCheckParams, prepareDropParams, prepareGenerateConfig, flattenDatabaseCredentials, flattenPull, preparePushConfig, preparePullConfig, prepareStudioConfig, migrateConfig, prepareMigrateConfig, drizzleConfigFromFile;
17266
- var init_utils4 = __esm({
17146
+ var init_utils3 = __esm({
17267
17147
  "src/cli/commands/utils.ts"() {
17268
17148
  "use strict";
17269
17149
  init_source();
@@ -17723,7 +17603,7 @@ var init_mysqlImports = __esm({
17723
17603
  "use strict";
17724
17604
  import_drizzle_orm = require("drizzle-orm");
17725
17605
  import_mysql_core = require("drizzle-orm/mysql-core");
17726
- init_utils4();
17606
+ init_utils3();
17727
17607
  prepareFromExports = (exports2) => {
17728
17608
  const tables = [];
17729
17609
  const i0values = Object.values(exports2);
@@ -18325,7 +18205,7 @@ var init_pgImports = __esm({
18325
18205
  "use strict";
18326
18206
  import_drizzle_orm4 = require("drizzle-orm");
18327
18207
  import_pg_core = require("drizzle-orm/pg-core");
18328
- init_utils4();
18208
+ init_utils3();
18329
18209
  prepareFromExports2 = (exports2) => {
18330
18210
  const tables = [];
18331
18211
  const enums = [];
@@ -19305,7 +19185,7 @@ var init_sqliteImports = __esm({
19305
19185
  "use strict";
19306
19186
  import_drizzle_orm6 = require("drizzle-orm");
19307
19187
  import_sqlite_core = require("drizzle-orm/sqlite-core");
19308
- init_utils4();
19188
+ init_utils3();
19309
19189
  prepareFromExports3 = (exports2) => {
19310
19190
  const tables = [];
19311
19191
  const i0values = Object.values(exports2);
@@ -28525,7 +28405,6 @@ var init_migrate = __esm({
28525
28405
  init_snapshotsDiffer();
28526
28406
  init_utils();
28527
28407
  init_words();
28528
- init_outputs();
28529
28408
  init_views();
28530
28409
  schemasResolver = async (input) => {
28531
28410
  try {
@@ -74127,7 +74006,6 @@ var sqliteImportsList, indexName3, objToStatement2, relations, withCasing, schem
74127
74006
  var init_introspect_sqlite = __esm({
74128
74007
  "src/introspect-sqlite.ts"() {
74129
74008
  "use strict";
74130
- init_utils3();
74131
74009
  sqliteImportsList = /* @__PURE__ */ new Set([
74132
74010
  "sqliteTable",
74133
74011
  "integer",
@@ -75157,7 +75035,6 @@ var mysqlImportsList, objToStatement22, timeConfig, binaryConfig, importsPatch,
75157
75035
  var init_introspect_mysql = __esm({
75158
75036
  "src/introspect-mysql.ts"() {
75159
75037
  "use strict";
75160
- init_utils3();
75161
75038
  init_mysqlSerializer();
75162
75039
  mysqlImportsList = /* @__PURE__ */ new Set([
75163
75040
  "mysqlTable",
@@ -75702,7 +75579,6 @@ var init_introspect_pg = __esm({
75702
75579
  "use strict";
75703
75580
  import_drizzle_orm8 = require("drizzle-orm");
75704
75581
  import_relations = require("drizzle-orm/relations");
75705
- init_utils3();
75706
75582
  init_vector();
75707
75583
  init_global();
75708
75584
  init_pgSerializer();
@@ -80093,7 +79969,7 @@ var init_studio2 = __esm({
80093
79969
  init_global();
80094
79970
  init_dist6();
80095
79971
  init_lib();
80096
- init_utils4();
79972
+ init_utils3();
80097
79973
  init_serializer();
80098
79974
  preparePgSchema = async (path5) => {
80099
79975
  const imports = prepareFilenames(path5);
@@ -81611,7 +81487,6 @@ var checkHandler = (out, dialect7) => {
81611
81487
 
81612
81488
  // src/cli/schema.ts
81613
81489
  init_utils2();
81614
- init_utils3();
81615
81490
  init_utils();
81616
81491
 
81617
81492
  // src/cli/commands/drop.ts
@@ -81794,7 +81669,7 @@ var updateUpToV62 = (json) => {
81794
81669
  };
81795
81670
 
81796
81671
  // src/cli/schema.ts
81797
- init_utils4();
81672
+ init_utils3();
81798
81673
  init_common();
81799
81674
  init_outputs();
81800
81675
 
@@ -83370,7 +83245,7 @@ init_utils2();
83370
83245
  var version2 = async () => {
83371
83246
  const { npmVersion } = await ormCoreVersions();
83372
83247
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
83373
- const envVersion = "0.23.2-ab12f1d";
83248
+ const envVersion = "0.23.2-e30226e";
83374
83249
  const kitVersion = envVersion ? `v${envVersion}` : "--";
83375
83250
  const versions = `drizzle-kit: ${kitVersion}
83376
83251
  ${ormVersion}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.23.2-ab12f1d",
3
+ "version": "0.23.2-e30226e",
4
4
  "homepage": "https://orm.drizzle.team",
5
5
  "keywords": [
6
6
  "drizzle",
@@ -18,6 +18,7 @@
18
18
  "migrations",
19
19
  "schema"
20
20
  ],
21
+ "sideEffects": false,
21
22
  "publishConfig": {
22
23
  "provenance": true
23
24
  },