drizzle-kit 0.26.0 → 0.26.2-05e88e4
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 +131 -29
- package/api.d.ts +131 -29
- package/api.js +1514 -570
- package/api.mjs +1514 -570
- package/bin.cjs +1039 -150
- package/index.d.mts +7 -0
- package/index.d.ts +7 -0
- package/package.json +2 -2
- package/utils.js +26 -6
- package/utils.mjs +26 -6
package/index.d.mts
CHANGED
@@ -124,6 +124,13 @@ type Config = {
|
|
124
124
|
introspect?: {
|
125
125
|
casing: 'camel' | 'preserve';
|
126
126
|
};
|
127
|
+
entities?: {
|
128
|
+
roles?: boolean | {
|
129
|
+
provider?: 'supabase' | 'neon' | string & {};
|
130
|
+
exclude?: string[];
|
131
|
+
include?: string[];
|
132
|
+
};
|
133
|
+
};
|
127
134
|
} & ({
|
128
135
|
dialect: Verify<Dialect, 'turso'>;
|
129
136
|
dbCredentials: {
|
package/index.d.ts
CHANGED
@@ -124,6 +124,13 @@ type Config = {
|
|
124
124
|
introspect?: {
|
125
125
|
casing: 'camel' | 'preserve';
|
126
126
|
};
|
127
|
+
entities?: {
|
128
|
+
roles?: boolean | {
|
129
|
+
provider?: 'supabase' | 'neon' | string & {};
|
130
|
+
exclude?: string[];
|
131
|
+
include?: string[];
|
132
|
+
};
|
133
|
+
};
|
127
134
|
} & ({
|
128
135
|
dialect: Verify<Dialect, 'turso'>;
|
129
136
|
dbCredentials: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.26.
|
3
|
+
"version": "0.26.2-05e88e4",
|
4
4
|
"homepage": "https://orm.drizzle.team",
|
5
5
|
"keywords": [
|
6
6
|
"drizzle",
|
@@ -51,7 +51,7 @@
|
|
51
51
|
"@arethetypeswrong/cli": "^0.15.3",
|
52
52
|
"@aws-sdk/client-rds-data": "^3.556.0",
|
53
53
|
"@cloudflare/workers-types": "^4.20230518.0",
|
54
|
-
"@electric-sql/pglite": "^0.
|
54
|
+
"@electric-sql/pglite": "^0.2.12",
|
55
55
|
"@hono/node-server": "^1.9.0",
|
56
56
|
"@hono/zod-validator": "^0.2.1",
|
57
57
|
"@libsql/client": "^0.10.0",
|
package/utils.js
CHANGED
@@ -4986,7 +4986,7 @@ var schemaInternal = objectType({
|
|
4986
4986
|
version: literalType("5"),
|
4987
4987
|
dialect,
|
4988
4988
|
tables: recordType(stringType(), table),
|
4989
|
-
views: recordType(stringType(), view),
|
4989
|
+
views: recordType(stringType(), view).default({}),
|
4990
4990
|
_meta: objectType({
|
4991
4991
|
tables: recordType(stringType(), stringType()),
|
4992
4992
|
columns: recordType(stringType(), stringType())
|
@@ -5174,6 +5174,12 @@ var sequenceSchema = objectType({
|
|
5174
5174
|
cycle: booleanType().optional(),
|
5175
5175
|
schema: stringType()
|
5176
5176
|
}).strict();
|
5177
|
+
var roleSchema = objectType({
|
5178
|
+
name: stringType(),
|
5179
|
+
createDb: booleanType().optional(),
|
5180
|
+
createRole: booleanType().optional(),
|
5181
|
+
inherit: booleanType().optional()
|
5182
|
+
}).strict();
|
5177
5183
|
var sequenceSquashed = objectType({
|
5178
5184
|
name: stringType(),
|
5179
5185
|
schema: stringType(),
|
@@ -5241,6 +5247,14 @@ var uniqueConstraint2 = objectType({
|
|
5241
5247
|
columns: stringType().array(),
|
5242
5248
|
nullsNotDistinct: booleanType()
|
5243
5249
|
}).strict();
|
5250
|
+
var policy = objectType({
|
5251
|
+
name: stringType(),
|
5252
|
+
as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
|
5253
|
+
for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
|
5254
|
+
to: stringType().array().optional(),
|
5255
|
+
using: stringType().optional(),
|
5256
|
+
withCheck: stringType().optional()
|
5257
|
+
}).strict();
|
5244
5258
|
var viewWithOption = objectType({
|
5245
5259
|
checkOption: enumType(["local", "cascaded"]).optional(),
|
5246
5260
|
securityBarrier: booleanType().optional(),
|
@@ -5321,7 +5335,9 @@ var table2 = objectType({
|
|
5321
5335
|
foreignKeys: recordType(stringType(), fk2),
|
5322
5336
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5323
5337
|
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
|
5324
|
-
|
5338
|
+
policies: recordType(stringType(), policy).default({}),
|
5339
|
+
checkConstraints: recordType(stringType(), checkConstraint2).default({}),
|
5340
|
+
isRLSEnabled: booleanType().default(false)
|
5325
5341
|
}).strict();
|
5326
5342
|
var schemaHash2 = objectType({
|
5327
5343
|
id: stringType(),
|
@@ -5416,6 +5432,7 @@ var pgSchemaInternal = objectType({
|
|
5416
5432
|
schemas: recordType(stringType(), stringType()),
|
5417
5433
|
views: recordType(stringType(), view2).default({}),
|
5418
5434
|
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5435
|
+
roles: recordType(stringType(), roleSchema).default({}),
|
5419
5436
|
_meta: objectType({
|
5420
5437
|
schemas: recordType(stringType(), stringType()),
|
5421
5438
|
tables: recordType(stringType(), stringType()),
|
@@ -5431,7 +5448,9 @@ var tableSquashed2 = objectType({
|
|
5431
5448
|
foreignKeys: recordType(stringType(), stringType()),
|
5432
5449
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5433
5450
|
uniqueConstraints: recordType(stringType(), stringType()),
|
5434
|
-
|
5451
|
+
policies: recordType(stringType(), stringType()),
|
5452
|
+
checkConstraints: recordType(stringType(), stringType()),
|
5453
|
+
isRLSEnabled: booleanType().default(false)
|
5435
5454
|
}).strict();
|
5436
5455
|
var tableSquashedV42 = objectType({
|
5437
5456
|
name: stringType(),
|
@@ -5461,7 +5480,8 @@ var pgSchemaSquashed = objectType({
|
|
5461
5480
|
enums: recordType(stringType(), enumSchema),
|
5462
5481
|
schemas: recordType(stringType(), stringType()),
|
5463
5482
|
views: recordType(stringType(), view2),
|
5464
|
-
sequences: recordType(stringType(), sequenceSquashed)
|
5483
|
+
sequences: recordType(stringType(), sequenceSquashed),
|
5484
|
+
roles: recordType(stringType(), roleSchema).default({})
|
5465
5485
|
}).strict();
|
5466
5486
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5467
5487
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
@@ -5566,7 +5586,7 @@ var schemaInternalV42 = objectType({
|
|
5566
5586
|
version: literalType("4"),
|
5567
5587
|
dialect: dialect2,
|
5568
5588
|
tables: recordType(stringType(), table3),
|
5569
|
-
views: recordType(stringType(), view3),
|
5589
|
+
views: recordType(stringType(), view3).default({}),
|
5570
5590
|
enums: objectType({})
|
5571
5591
|
}).strict();
|
5572
5592
|
var schemaInternalV52 = objectType({
|
@@ -5595,7 +5615,7 @@ var schemaInternal2 = objectType({
|
|
5595
5615
|
version: latestVersion,
|
5596
5616
|
dialect: dialect2,
|
5597
5617
|
tables: recordType(stringType(), table3),
|
5598
|
-
views: recordType(stringType(), view3),
|
5618
|
+
views: recordType(stringType(), view3).default({}),
|
5599
5619
|
enums: objectType({}),
|
5600
5620
|
_meta: objectType({
|
5601
5621
|
tables: recordType(stringType(), stringType()),
|
package/utils.mjs
CHANGED
@@ -4964,7 +4964,7 @@ var schemaInternal = objectType({
|
|
4964
4964
|
version: literalType("5"),
|
4965
4965
|
dialect,
|
4966
4966
|
tables: recordType(stringType(), table),
|
4967
|
-
views: recordType(stringType(), view),
|
4967
|
+
views: recordType(stringType(), view).default({}),
|
4968
4968
|
_meta: objectType({
|
4969
4969
|
tables: recordType(stringType(), stringType()),
|
4970
4970
|
columns: recordType(stringType(), stringType())
|
@@ -5152,6 +5152,12 @@ var sequenceSchema = objectType({
|
|
5152
5152
|
cycle: booleanType().optional(),
|
5153
5153
|
schema: stringType()
|
5154
5154
|
}).strict();
|
5155
|
+
var roleSchema = objectType({
|
5156
|
+
name: stringType(),
|
5157
|
+
createDb: booleanType().optional(),
|
5158
|
+
createRole: booleanType().optional(),
|
5159
|
+
inherit: booleanType().optional()
|
5160
|
+
}).strict();
|
5155
5161
|
var sequenceSquashed = objectType({
|
5156
5162
|
name: stringType(),
|
5157
5163
|
schema: stringType(),
|
@@ -5219,6 +5225,14 @@ var uniqueConstraint2 = objectType({
|
|
5219
5225
|
columns: stringType().array(),
|
5220
5226
|
nullsNotDistinct: booleanType()
|
5221
5227
|
}).strict();
|
5228
|
+
var policy = objectType({
|
5229
|
+
name: stringType(),
|
5230
|
+
as: enumType(["PERMISSIVE", "RESTRICTIVE"]).optional(),
|
5231
|
+
for: enumType(["ALL", "SELECT", "INSERT", "UPDATE", "DELETE"]).optional(),
|
5232
|
+
to: stringType().array().optional(),
|
5233
|
+
using: stringType().optional(),
|
5234
|
+
withCheck: stringType().optional()
|
5235
|
+
}).strict();
|
5222
5236
|
var viewWithOption = objectType({
|
5223
5237
|
checkOption: enumType(["local", "cascaded"]).optional(),
|
5224
5238
|
securityBarrier: booleanType().optional(),
|
@@ -5299,7 +5313,9 @@ var table2 = objectType({
|
|
5299
5313
|
foreignKeys: recordType(stringType(), fk2),
|
5300
5314
|
compositePrimaryKeys: recordType(stringType(), compositePK2),
|
5301
5315
|
uniqueConstraints: recordType(stringType(), uniqueConstraint2).default({}),
|
5302
|
-
|
5316
|
+
policies: recordType(stringType(), policy).default({}),
|
5317
|
+
checkConstraints: recordType(stringType(), checkConstraint2).default({}),
|
5318
|
+
isRLSEnabled: booleanType().default(false)
|
5303
5319
|
}).strict();
|
5304
5320
|
var schemaHash2 = objectType({
|
5305
5321
|
id: stringType(),
|
@@ -5394,6 +5410,7 @@ var pgSchemaInternal = objectType({
|
|
5394
5410
|
schemas: recordType(stringType(), stringType()),
|
5395
5411
|
views: recordType(stringType(), view2).default({}),
|
5396
5412
|
sequences: recordType(stringType(), sequenceSchema).default({}),
|
5413
|
+
roles: recordType(stringType(), roleSchema).default({}),
|
5397
5414
|
_meta: objectType({
|
5398
5415
|
schemas: recordType(stringType(), stringType()),
|
5399
5416
|
tables: recordType(stringType(), stringType()),
|
@@ -5409,7 +5426,9 @@ var tableSquashed2 = objectType({
|
|
5409
5426
|
foreignKeys: recordType(stringType(), stringType()),
|
5410
5427
|
compositePrimaryKeys: recordType(stringType(), stringType()),
|
5411
5428
|
uniqueConstraints: recordType(stringType(), stringType()),
|
5412
|
-
|
5429
|
+
policies: recordType(stringType(), stringType()),
|
5430
|
+
checkConstraints: recordType(stringType(), stringType()),
|
5431
|
+
isRLSEnabled: booleanType().default(false)
|
5413
5432
|
}).strict();
|
5414
5433
|
var tableSquashedV42 = objectType({
|
5415
5434
|
name: stringType(),
|
@@ -5439,7 +5458,8 @@ var pgSchemaSquashed = objectType({
|
|
5439
5458
|
enums: recordType(stringType(), enumSchema),
|
5440
5459
|
schemas: recordType(stringType(), stringType()),
|
5441
5460
|
views: recordType(stringType(), view2),
|
5442
|
-
sequences: recordType(stringType(), sequenceSquashed)
|
5461
|
+
sequences: recordType(stringType(), sequenceSquashed),
|
5462
|
+
roles: recordType(stringType(), roleSchema).default({})
|
5443
5463
|
}).strict();
|
5444
5464
|
var pgSchemaV3 = pgSchemaInternalV3.merge(schemaHash2);
|
5445
5465
|
var pgSchemaV4 = pgSchemaInternalV4.merge(schemaHash2);
|
@@ -5544,7 +5564,7 @@ var schemaInternalV42 = objectType({
|
|
5544
5564
|
version: literalType("4"),
|
5545
5565
|
dialect: dialect2,
|
5546
5566
|
tables: recordType(stringType(), table3),
|
5547
|
-
views: recordType(stringType(), view3),
|
5567
|
+
views: recordType(stringType(), view3).default({}),
|
5548
5568
|
enums: objectType({})
|
5549
5569
|
}).strict();
|
5550
5570
|
var schemaInternalV52 = objectType({
|
@@ -5573,7 +5593,7 @@ var schemaInternal2 = objectType({
|
|
5573
5593
|
version: latestVersion,
|
5574
5594
|
dialect: dialect2,
|
5575
5595
|
tables: recordType(stringType(), table3),
|
5576
|
-
views: recordType(stringType(), view3),
|
5596
|
+
views: recordType(stringType(), view3).default({}),
|
5577
5597
|
enums: objectType({}),
|
5578
5598
|
_meta: objectType({
|
5579
5599
|
tables: recordType(stringType(), stringType()),
|