drizzle-kit 0.23.2-e30226e → 0.23.2-e9a7a6c
Sign up to get free protection for your applications and to get access to all the features.
- package/api.js +856 -506
- package/api.mjs +856 -506
- package/bin.cjs +132 -8
- package/package.json +2 -3
package/bin.cjs
CHANGED
@@ -8660,6 +8660,125 @@ 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
|
+
|
8663
8782
|
// ../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js
|
8664
8783
|
var require_old = __commonJS({
|
8665
8784
|
"../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) {
|
@@ -11275,6 +11394,7 @@ var init_mysql = __esm({
|
|
11275
11394
|
init_lib();
|
11276
11395
|
init_views();
|
11277
11396
|
init_common();
|
11397
|
+
init_outputs();
|
11278
11398
|
mysqlCredentials = unionType([
|
11279
11399
|
objectType({
|
11280
11400
|
host: stringType().min(1),
|
@@ -17143,7 +17263,7 @@ var require_node2 = __commonJS({
|
|
17143
17263
|
|
17144
17264
|
// src/cli/commands/utils.ts
|
17145
17265
|
var import_fs2, import_hanji2, import_path2, assertES5, safeRegister, prepareCheckParams, prepareDropParams, prepareGenerateConfig, flattenDatabaseCredentials, flattenPull, preparePushConfig, preparePullConfig, prepareStudioConfig, migrateConfig, prepareMigrateConfig, drizzleConfigFromFile;
|
17146
|
-
var
|
17266
|
+
var init_utils4 = __esm({
|
17147
17267
|
"src/cli/commands/utils.ts"() {
|
17148
17268
|
"use strict";
|
17149
17269
|
init_source();
|
@@ -17560,7 +17680,6 @@ var init_utils3 = __esm({
|
|
17560
17680
|
const defaultJsonConfigExists = (0, import_fs2.existsSync)(
|
17561
17681
|
(0, import_path2.join)((0, import_path2.resolve)("drizzle.config.json"))
|
17562
17682
|
);
|
17563
|
-
console.log("defaultTsConfigExists", (0, import_path2.join)((0, import_path2.resolve)("drizzle.config.ts")));
|
17564
17683
|
const defaultConfigPath = defaultTsConfigExists ? "drizzle.config.ts" : defaultJsConfigExists ? "drizzle.config.js" : "drizzle.config.json";
|
17565
17684
|
if (!configPath) {
|
17566
17685
|
console.log(
|
@@ -17603,7 +17722,7 @@ var init_mysqlImports = __esm({
|
|
17603
17722
|
"use strict";
|
17604
17723
|
import_drizzle_orm = require("drizzle-orm");
|
17605
17724
|
import_mysql_core = require("drizzle-orm/mysql-core");
|
17606
|
-
|
17725
|
+
init_utils4();
|
17607
17726
|
prepareFromExports = (exports2) => {
|
17608
17727
|
const tables = [];
|
17609
17728
|
const i0values = Object.values(exports2);
|
@@ -18205,7 +18324,7 @@ var init_pgImports = __esm({
|
|
18205
18324
|
"use strict";
|
18206
18325
|
import_drizzle_orm4 = require("drizzle-orm");
|
18207
18326
|
import_pg_core = require("drizzle-orm/pg-core");
|
18208
|
-
|
18327
|
+
init_utils4();
|
18209
18328
|
prepareFromExports2 = (exports2) => {
|
18210
18329
|
const tables = [];
|
18211
18330
|
const enums = [];
|
@@ -19185,7 +19304,7 @@ var init_sqliteImports = __esm({
|
|
19185
19304
|
"use strict";
|
19186
19305
|
import_drizzle_orm6 = require("drizzle-orm");
|
19187
19306
|
import_sqlite_core = require("drizzle-orm/sqlite-core");
|
19188
|
-
|
19307
|
+
init_utils4();
|
19189
19308
|
prepareFromExports3 = (exports2) => {
|
19190
19309
|
const tables = [];
|
19191
19310
|
const i0values = Object.values(exports2);
|
@@ -28405,6 +28524,7 @@ var init_migrate = __esm({
|
|
28405
28524
|
init_snapshotsDiffer();
|
28406
28525
|
init_utils();
|
28407
28526
|
init_words();
|
28527
|
+
init_outputs();
|
28408
28528
|
init_views();
|
28409
28529
|
schemasResolver = async (input) => {
|
28410
28530
|
try {
|
@@ -74006,6 +74126,7 @@ var sqliteImportsList, indexName3, objToStatement2, relations, withCasing, schem
|
|
74006
74126
|
var init_introspect_sqlite = __esm({
|
74007
74127
|
"src/introspect-sqlite.ts"() {
|
74008
74128
|
"use strict";
|
74129
|
+
init_utils3();
|
74009
74130
|
sqliteImportsList = /* @__PURE__ */ new Set([
|
74010
74131
|
"sqliteTable",
|
74011
74132
|
"integer",
|
@@ -75035,6 +75156,7 @@ var mysqlImportsList, objToStatement22, timeConfig, binaryConfig, importsPatch,
|
|
75035
75156
|
var init_introspect_mysql = __esm({
|
75036
75157
|
"src/introspect-mysql.ts"() {
|
75037
75158
|
"use strict";
|
75159
|
+
init_utils3();
|
75038
75160
|
init_mysqlSerializer();
|
75039
75161
|
mysqlImportsList = /* @__PURE__ */ new Set([
|
75040
75162
|
"mysqlTable",
|
@@ -75579,6 +75701,7 @@ var init_introspect_pg = __esm({
|
|
75579
75701
|
"use strict";
|
75580
75702
|
import_drizzle_orm8 = require("drizzle-orm");
|
75581
75703
|
import_relations = require("drizzle-orm/relations");
|
75704
|
+
init_utils3();
|
75582
75705
|
init_vector();
|
75583
75706
|
init_global();
|
75584
75707
|
init_pgSerializer();
|
@@ -79969,7 +80092,7 @@ var init_studio2 = __esm({
|
|
79969
80092
|
init_global();
|
79970
80093
|
init_dist6();
|
79971
80094
|
init_lib();
|
79972
|
-
|
80095
|
+
init_utils4();
|
79973
80096
|
init_serializer();
|
79974
80097
|
preparePgSchema = async (path5) => {
|
79975
80098
|
const imports = prepareFilenames(path5);
|
@@ -81487,6 +81610,7 @@ var checkHandler = (out, dialect7) => {
|
|
81487
81610
|
|
81488
81611
|
// src/cli/schema.ts
|
81489
81612
|
init_utils2();
|
81613
|
+
init_utils3();
|
81490
81614
|
init_utils();
|
81491
81615
|
|
81492
81616
|
// src/cli/commands/drop.ts
|
@@ -81669,7 +81793,7 @@ var updateUpToV62 = (json) => {
|
|
81669
81793
|
};
|
81670
81794
|
|
81671
81795
|
// src/cli/schema.ts
|
81672
|
-
|
81796
|
+
init_utils4();
|
81673
81797
|
init_common();
|
81674
81798
|
init_outputs();
|
81675
81799
|
|
@@ -83245,7 +83369,7 @@ init_utils2();
|
|
83245
83369
|
var version2 = async () => {
|
83246
83370
|
const { npmVersion } = await ormCoreVersions();
|
83247
83371
|
const ormVersion = npmVersion ? `drizzle-orm: v${npmVersion}` : "";
|
83248
|
-
const envVersion = "0.23.2-
|
83372
|
+
const envVersion = "0.23.2-e9a7a6c";
|
83249
83373
|
const kitVersion = envVersion ? `v${envVersion}` : "--";
|
83250
83374
|
const versions = `drizzle-kit: ${kitVersion}
|
83251
83375
|
${ormVersion}`;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.23.2-
|
3
|
+
"version": "0.23.2-e9a7a6c",
|
4
4
|
"homepage": "https://orm.drizzle.team",
|
5
5
|
"keywords": [
|
6
6
|
"drizzle",
|
@@ -18,7 +18,6 @@
|
|
18
18
|
"migrations",
|
19
19
|
"schema"
|
20
20
|
],
|
21
|
-
"sideEffects": false,
|
22
21
|
"publishConfig": {
|
23
22
|
"provenance": true
|
24
23
|
},
|
@@ -81,7 +80,7 @@
|
|
81
80
|
"dockerode": "^3.3.4",
|
82
81
|
"dotenv": "^16.0.3",
|
83
82
|
"drizzle-kit": "0.21.2",
|
84
|
-
"drizzle-orm": "
|
83
|
+
"drizzle-orm": "workspace:./drizzle-orm/dist",
|
85
84
|
"env-paths": "^3.0.0",
|
86
85
|
"esbuild-node-externals": "^1.9.0",
|
87
86
|
"eslint": "^8.57.0",
|