drizzle-kit 0.23.2-3d4e79a → 0.23.2-5be2712

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. package/README.md +79 -0
  2. package/api.js +131 -481
  3. package/api.mjs +131 -481
  4. package/bin.cjs +7 -132
  5. package/package.json +26 -2
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((x3) => x3.trim()).filter((x3) => x3.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, (_3, identifier) => toUpperCase(identifier)).replace(NUMBERS_AND_IDENTIFIER, (m4) => toUpperCase(m4));
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) {
@@ -11389,7 +11270,6 @@ var init_mysql = __esm({
11389
11270
  init_lib();
11390
11271
  init_views();
11391
11272
  init_common();
11392
- init_outputs();
11393
11273
  mysqlCredentials = unionType([
11394
11274
  objectType({
11395
11275
  host: stringType().min(1),
@@ -17258,7 +17138,7 @@ var require_node2 = __commonJS({
17258
17138
 
17259
17139
  // src/cli/commands/utils.ts
17260
17140
  var import_fs2, import_hanji2, import_path2, assertES5, safeRegister, prepareCheckParams, prepareDropParams, prepareGenerateConfig, flattenDatabaseCredentials, flattenPull, preparePushConfig, preparePullConfig, prepareStudioConfig, migrateConfig, prepareMigrateConfig, drizzleConfigFromFile;
17261
- var init_utils4 = __esm({
17141
+ var init_utils3 = __esm({
17262
17142
  "src/cli/commands/utils.ts"() {
17263
17143
  "use strict";
17264
17144
  init_source();
@@ -17718,7 +17598,7 @@ var init_mysqlImports = __esm({
17718
17598
  "use strict";
17719
17599
  import_drizzle_orm = require("drizzle-orm");
17720
17600
  import_mysql_core = require("drizzle-orm/mysql-core");
17721
- init_utils4();
17601
+ init_utils3();
17722
17602
  prepareFromExports = (exports2) => {
17723
17603
  const tables = [];
17724
17604
  const i0values = Object.values(exports2);
@@ -18320,7 +18200,7 @@ var init_pgImports = __esm({
18320
18200
  "use strict";
18321
18201
  import_drizzle_orm4 = require("drizzle-orm");
18322
18202
  import_pg_core = require("drizzle-orm/pg-core");
18323
- init_utils4();
18203
+ init_utils3();
18324
18204
  prepareFromExports2 = (exports2) => {
18325
18205
  const tables = [];
18326
18206
  const enums = [];
@@ -19300,7 +19180,7 @@ var init_sqliteImports = __esm({
19300
19180
  "use strict";
19301
19181
  import_drizzle_orm6 = require("drizzle-orm");
19302
19182
  import_sqlite_core = require("drizzle-orm/sqlite-core");
19303
- init_utils4();
19183
+ init_utils3();
19304
19184
  prepareFromExports3 = (exports2) => {
19305
19185
  const tables = [];
19306
19186
  const i0values = Object.values(exports2);
@@ -28520,7 +28400,6 @@ var init_migrate = __esm({
28520
28400
  init_snapshotsDiffer();
28521
28401
  init_utils();
28522
28402
  init_words();
28523
- init_outputs();
28524
28403
  init_views();
28525
28404
  schemasResolver = async (input) => {
28526
28405
  try {
@@ -119816,7 +119695,6 @@ var sqliteImportsList, indexName3, objToStatement2, relations, withCasing, schem
119816
119695
  var init_introspect_sqlite = __esm({
119817
119696
  "src/introspect-sqlite.ts"() {
119818
119697
  "use strict";
119819
- init_utils3();
119820
119698
  sqliteImportsList = /* @__PURE__ */ new Set([
119821
119699
  "sqliteTable",
119822
119700
  "integer",
@@ -120846,7 +120724,6 @@ var mysqlImportsList, objToStatement22, timeConfig, binaryConfig, importsPatch,
120846
120724
  var init_introspect_mysql = __esm({
120847
120725
  "src/introspect-mysql.ts"() {
120848
120726
  "use strict";
120849
- init_utils3();
120850
120727
  init_mysqlSerializer();
120851
120728
  mysqlImportsList = /* @__PURE__ */ new Set([
120852
120729
  "mysqlTable",
@@ -121391,7 +121268,6 @@ var init_introspect_pg = __esm({
121391
121268
  "use strict";
121392
121269
  import_drizzle_orm8 = require("drizzle-orm");
121393
121270
  import_relations = require("drizzle-orm/relations");
121394
- init_utils3();
121395
121271
  init_vector();
121396
121272
  init_global();
121397
121273
  init_pgSerializer();
@@ -125782,7 +125658,7 @@ var init_studio2 = __esm({
125782
125658
  init_global();
125783
125659
  init_dist7();
125784
125660
  init_lib();
125785
- init_utils4();
125661
+ init_utils3();
125786
125662
  init_serializer();
125787
125663
  preparePgSchema = async (path5) => {
125788
125664
  const imports = prepareFilenames(path5);
@@ -127300,7 +127176,6 @@ var checkHandler = (out, dialect7) => {
127300
127176
 
127301
127177
  // src/cli/schema.ts
127302
127178
  init_utils2();
127303
- init_utils3();
127304
127179
  init_utils();
127305
127180
 
127306
127181
  // src/cli/commands/drop.ts
@@ -127483,7 +127358,7 @@ var updateUpToV62 = (json) => {
127483
127358
  };
127484
127359
 
127485
127360
  // src/cli/schema.ts
127486
- init_utils4();
127361
+ init_utils3();
127487
127362
  init_common();
127488
127363
  init_outputs();
127489
127364
 
@@ -129059,7 +128934,7 @@ init_utils2();
129059
128934
  var version2 = async () => {
129060
128935
  const { npmVersion } = await ormCoreVersions();
129061
128936
  const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
129062
- const envVersion = "0.23.2-3d4e79a";
128937
+ const envVersion = "0.23.2-5be2712";
129063
128938
  const kitVersion = envVersion ? `v${envVersion}` : "--";
129064
128939
  const versions = `drizzle-kit: ${kitVersion}
129065
128940
  ${ormVersion}`;
package/package.json CHANGED
@@ -1,7 +1,31 @@
1
1
  {
2
2
  "name": "drizzle-kit",
3
- "version": "0.23.2-3d4e79a",
4
- "repository": "https://github.com/drizzle-team/drizzle-orm",
3
+ "version": "0.23.2-5be2712",
4
+ "homepage": "https://orm.drizzle.team",
5
+ "keywords": [
6
+ "drizzle",
7
+ "orm",
8
+ "pg",
9
+ "mysql",
10
+ "postgresql",
11
+ "postgres",
12
+ "sqlite",
13
+ "database",
14
+ "sql",
15
+ "typescript",
16
+ "ts",
17
+ "drizzle-kit",
18
+ "migrations",
19
+ "schema"
20
+ ],
21
+ "sideEffects": false,
22
+ "publishConfig": {
23
+ "provenance": true
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/drizzle-team/drizzle-orm.git"
28
+ },
5
29
  "author": "Drizzle Team",
6
30
  "license": "MIT",
7
31
  "bin": {