drizzle-kit 0.26.2-31c8041 → 0.26.2-4b200a2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.d.mts +67 -7
- package/api.d.ts +67 -7
- package/api.js +998 -667
- package/api.mjs +998 -667
- package/bin.cjs +782 -332
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/package.json +5 -5
- package/utils.js +11 -10
- package/utils.mjs +11 -9
package/index.d.mts
CHANGED
@@ -126,10 +126,10 @@ type Config = {
|
|
126
126
|
};
|
127
127
|
entities?: {
|
128
128
|
roles?: boolean | {
|
129
|
-
provider?: string;
|
129
|
+
provider?: 'supabase' | 'neon' | string & {};
|
130
130
|
exclude?: string[];
|
131
131
|
include?: string[];
|
132
|
-
}
|
132
|
+
};
|
133
133
|
};
|
134
134
|
} & ({
|
135
135
|
dialect: Verify<Dialect, 'turso'>;
|
package/index.d.ts
CHANGED
@@ -126,10 +126,10 @@ type Config = {
|
|
126
126
|
};
|
127
127
|
entities?: {
|
128
128
|
roles?: boolean | {
|
129
|
-
provider?: string;
|
129
|
+
provider?: 'supabase' | 'neon' | string & {};
|
130
130
|
exclude?: string[];
|
131
131
|
include?: string[];
|
132
|
-
}
|
132
|
+
};
|
133
133
|
};
|
134
134
|
} & ({
|
135
135
|
dialect: Verify<Dialect, 'turso'>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.26.2-
|
3
|
+
"version": "0.26.2-4b200a2",
|
4
4
|
"homepage": "https://orm.drizzle.team",
|
5
5
|
"keywords": [
|
6
6
|
"drizzle",
|
@@ -34,15 +34,15 @@
|
|
34
34
|
"api": "tsx ./dev/api.ts",
|
35
35
|
"migrate:old": "drizzle-kit generate:mysql",
|
36
36
|
"cli": "tsx ./src/cli/index.ts",
|
37
|
-
"test": "TEST_CONFIG_PATH_PREFIX=./tests/cli/ vitest",
|
37
|
+
"test": "pnpm tsc && TEST_CONFIG_PATH_PREFIX=./tests/cli/ vitest",
|
38
38
|
"build": "rm -rf ./dist && tsx build.ts && cp package.json dist/ && attw --pack dist",
|
39
39
|
"build:dev": "rm -rf ./dist && tsx build.dev.ts && tsc -p tsconfig.cli-types.json && chmod +x ./dist/index.cjs",
|
40
40
|
"pack": "cp package.json README.md dist/ && (cd dist && npm pack --pack-destination ..) && rm -f package.tgz && mv *.tgz package.tgz",
|
41
|
-
"tsc": "tsc -p tsconfig.build.json",
|
41
|
+
"tsc": "tsc -p tsconfig.build.json --noEmit",
|
42
42
|
"publish": "npm publish package.tgz"
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@drizzle-team/brocli": "^0.10.
|
45
|
+
"@drizzle-team/brocli": "^0.10.2",
|
46
46
|
"@esbuild-kit/esm-loader": "^2.5.5",
|
47
47
|
"esbuild": "^0.19.7",
|
48
48
|
"esbuild-register": "^3.5.0"
|
@@ -103,7 +103,7 @@
|
|
103
103
|
"superjson": "^2.2.1",
|
104
104
|
"tsup": "^8.0.2",
|
105
105
|
"tsx": "^3.12.1",
|
106
|
-
"typescript": "^5.
|
106
|
+
"typescript": "^5.6.3",
|
107
107
|
"uuid": "^9.0.1",
|
108
108
|
"vite-tsconfig-paths": "^4.3.2",
|
109
109
|
"vitest": "^1.4.0",
|
package/utils.js
CHANGED
@@ -569,7 +569,6 @@ __export(utils_exports, {
|
|
569
569
|
copy: () => copy,
|
570
570
|
dryJournal: () => dryJournal,
|
571
571
|
findAddedAndRemoved: () => findAddedAndRemoved,
|
572
|
-
getColumnCasing: () => getColumnCasing,
|
573
572
|
isPgArrayType: () => isPgArrayType,
|
574
573
|
kloudMeta: () => kloudMeta,
|
575
574
|
normalisePGliteUrl: () => normalisePGliteUrl,
|
@@ -1074,7 +1073,6 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
1074
1073
|
var source_default = chalk;
|
1075
1074
|
|
1076
1075
|
// src/utils.ts
|
1077
|
-
var import_casing = require("drizzle-orm/casing");
|
1078
1076
|
var import_fs = require("fs");
|
1079
1077
|
var import_path = require("path");
|
1080
1078
|
var import_url = require("url");
|
@@ -5253,7 +5251,12 @@ var policy = objectType({
|
|
5253
5251
|
for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
|
5254
5252
|
to: stringType().array().optional(),
|
5255
5253
|
using: stringType().optional(),
|
5256
|
-
withCheck: stringType().optional()
|
5254
|
+
withCheck: stringType().optional(),
|
5255
|
+
on: stringType().optional()
|
5256
|
+
}).strict();
|
5257
|
+
var policySquashed = objectType({
|
5258
|
+
name: stringType(),
|
5259
|
+
values: stringType()
|
5257
5260
|
}).strict();
|
5258
5261
|
var viewWithOption = objectType({
|
5259
5262
|
checkOption: enumType(["local", "cascaded"]).optional(),
|
@@ -5433,6 +5436,7 @@ var pgSchemaInternal = objectType({
|
|
5433
5436
|
views: recordType(stringType(), view2).default({}),
|
5434
5437
|
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5435
5438
|
roles: recordType(stringType(), roleSchema).default({}),
|
5439
|
+
policies: recordType(stringType(), policy).default({}),
|
5436
5440
|
_meta: objectType({
|
5437
5441
|
schemas: recordType(stringType(), stringType()),
|
5438
5442
|
tables: recordType(stringType(), stringType()),
|
@@ -5481,7 +5485,8 @@ var pgSchemaSquashed = objectType({
|
|
5481
5485
|
schemas: recordType(stringType(), stringType()),
|
5482
5486
|
views: recordType(stringType(), view2),
|
5483
5487
|
sequences: recordType(stringType(), sequenceSquashed),
|
5484
|
-
roles: recordType(stringType(), roleSchema).default({})
|
5488
|
+
roles: recordType(stringType(), roleSchema).default({}),
|
5489
|
+
policies: recordType(stringType(), policySquashed).default({})
|
5485
5490
|
}).strict();
|
5486
5491
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5487
5492
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
@@ -5502,6 +5507,8 @@ var dryPg = pgSchema.parse({
|
|
5502
5507
|
tables: {},
|
5503
5508
|
enums: {},
|
5504
5509
|
schemas: {},
|
5510
|
+
policies: {},
|
5511
|
+
roles: {},
|
5505
5512
|
sequences: {},
|
5506
5513
|
_meta: {
|
5507
5514
|
schemas: {},
|
@@ -5869,11 +5876,6 @@ function findAddedAndRemoved(columnNames1, columnNames2) {
|
|
5869
5876
|
const removedColumns = columnNames1.filter((it) => !set2.has(it));
|
5870
5877
|
return { addedColumns, removedColumns };
|
5871
5878
|
}
|
5872
|
-
function getColumnCasing(column4, casing) {
|
5873
|
-
if (!column4.name)
|
5874
|
-
return "";
|
5875
|
-
return !column4.keyAsName || casing === void 0 ? column4.name : casing === "camelCase" ? (0, import_casing.toCamelCase)(column4.name) : (0, import_casing.toSnakeCase)(column4.name);
|
5876
|
-
}
|
5877
5879
|
// Annotate the CommonJS export names for ESM import in node:
|
5878
5880
|
0 && (module.exports = {
|
5879
5881
|
assertV1OutFolder,
|
@@ -5881,7 +5883,6 @@ function getColumnCasing(column4, casing) {
|
|
5881
5883
|
copy,
|
5882
5884
|
dryJournal,
|
5883
5885
|
findAddedAndRemoved,
|
5884
|
-
getColumnCasing,
|
5885
5886
|
isPgArrayType,
|
5886
5887
|
kloudMeta,
|
5887
5888
|
normalisePGliteUrl,
|
package/utils.mjs
CHANGED
@@ -1052,7 +1052,6 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
1052
1052
|
var source_default = chalk;
|
1053
1053
|
|
1054
1054
|
// src/utils.ts
|
1055
|
-
import { toCamelCase, toSnakeCase } from "drizzle-orm/casing";
|
1056
1055
|
import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "fs";
|
1057
1056
|
import { join } from "path";
|
1058
1057
|
import { parse } from "url";
|
@@ -5231,7 +5230,12 @@ var policy = objectType({
|
|
5231
5230
|
for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
|
5232
5231
|
to: stringType().array().optional(),
|
5233
5232
|
using: stringType().optional(),
|
5234
|
-
withCheck: stringType().optional()
|
5233
|
+
withCheck: stringType().optional(),
|
5234
|
+
on: stringType().optional()
|
5235
|
+
}).strict();
|
5236
|
+
var policySquashed = objectType({
|
5237
|
+
name: stringType(),
|
5238
|
+
values: stringType()
|
5235
5239
|
}).strict();
|
5236
5240
|
var viewWithOption = objectType({
|
5237
5241
|
checkOption: enumType(["local", "cascaded"]).optional(),
|
@@ -5411,6 +5415,7 @@ var pgSchemaInternal = objectType({
|
|
5411
5415
|
views: recordType(stringType(), view2).default({}),
|
5412
5416
|
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5413
5417
|
roles: recordType(stringType(), roleSchema).default({}),
|
5418
|
+
policies: recordType(stringType(), policy).default({}),
|
5414
5419
|
_meta: objectType({
|
5415
5420
|
schemas: recordType(stringType(), stringType()),
|
5416
5421
|
tables: recordType(stringType(), stringType()),
|
@@ -5459,7 +5464,8 @@ var pgSchemaSquashed = objectType({
|
|
5459
5464
|
schemas: recordType(stringType(), stringType()),
|
5460
5465
|
views: recordType(stringType(), view2),
|
5461
5466
|
sequences: recordType(stringType(), sequenceSquashed),
|
5462
|
-
roles: recordType(stringType(), roleSchema).default({})
|
5467
|
+
roles: recordType(stringType(), roleSchema).default({}),
|
5468
|
+
policies: recordType(stringType(), policySquashed).default({})
|
5463
5469
|
}).strict();
|
5464
5470
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5465
5471
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
@@ -5480,6 +5486,8 @@ var dryPg = pgSchema.parse({
|
|
5480
5486
|
tables: {},
|
5481
5487
|
enums: {},
|
5482
5488
|
schemas: {},
|
5489
|
+
policies: {},
|
5490
|
+
roles: {},
|
5483
5491
|
sequences: {},
|
5484
5492
|
_meta: {
|
5485
5493
|
schemas: {},
|
@@ -5847,18 +5855,12 @@ function findAddedAndRemoved(columnNames1, columnNames2) {
|
|
5847
5855
|
const removedColumns = columnNames1.filter((it) => !set2.has(it));
|
5848
5856
|
return { addedColumns, removedColumns };
|
5849
5857
|
}
|
5850
|
-
function getColumnCasing(column4, casing) {
|
5851
|
-
if (!column4.name)
|
5852
|
-
return "";
|
5853
|
-
return !column4.keyAsName || casing === void 0 ? column4.name : casing === "camelCase" ? toCamelCase(column4.name) : toSnakeCase(column4.name);
|
5854
|
-
}
|
5855
5858
|
export {
|
5856
5859
|
assertV1OutFolder,
|
5857
5860
|
columnRenameKey,
|
5858
5861
|
copy,
|
5859
5862
|
dryJournal,
|
5860
5863
|
findAddedAndRemoved,
|
5861
|
-
getColumnCasing,
|
5862
5864
|
isPgArrayType,
|
5863
5865
|
kloudMeta,
|
5864
5866
|
normalisePGliteUrl,
|