drizzle-kit 0.20.4-5bb2ccb → 0.20.4-ab73d4a
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +39 -4
- package/package.json +2 -2
- package/utils.js +1 -1
package/bin.cjs
CHANGED
@@ -19040,7 +19040,7 @@ var init_introspect_pg = __esm({
|
|
19040
19040
|
const file = importsTs + decalrations;
|
19041
19041
|
const schemaEntry = `
|
19042
19042
|
{
|
19043
|
-
${Object.values(schema4.tables).map((it) => withCasing(it.name)).join("
|
19043
|
+
${Object.values(schema4.tables).map((it) => withCasing(it.name, casing)).join(",\n")}
|
19044
19044
|
}
|
19045
19045
|
`;
|
19046
19046
|
return { file, imports: importsTs, decalrations, schemaEntry };
|
@@ -25861,7 +25861,7 @@ var init_introspect_sqlite = __esm({
|
|
25861
25861
|
const file = importsTs + decalrations;
|
25862
25862
|
const schemaEntry = `
|
25863
25863
|
{
|
25864
|
-
${Object.values(schema4.tables).map((it) => withCasing2(it.name)).join(",")}
|
25864
|
+
${Object.values(schema4.tables).map((it) => withCasing2(it.name, casing)).join(",")}
|
25865
25865
|
}
|
25866
25866
|
`;
|
25867
25867
|
return { file, imports: importsTs, decalrations, schemaEntry };
|
@@ -58340,12 +58340,22 @@ var init_studioUtils = __esm({
|
|
58340
58340
|
assertPackages("pg");
|
58341
58341
|
const { drizzle: drizzle2 } = await import("drizzle-orm/node-postgres");
|
58342
58342
|
const pg = await Promise.resolve().then(() => __toESM(require_lib2()));
|
58343
|
-
const
|
58343
|
+
const client = new pg.default.Pool(connectionConfig.dbCredentials);
|
58344
|
+
const db = drizzle2(client, {
|
58344
58345
|
logger: verbose
|
58345
58346
|
});
|
58347
|
+
const proxy = async (params) => {
|
58348
|
+
const result = await client.query({
|
58349
|
+
text: params.sql,
|
58350
|
+
values: params.params,
|
58351
|
+
rowMode: "array"
|
58352
|
+
});
|
58353
|
+
return result.rows;
|
58354
|
+
};
|
58346
58355
|
return {
|
58347
58356
|
dialect: "pg",
|
58348
58357
|
db,
|
58358
|
+
proxy,
|
58349
58359
|
schema: pgSchema4,
|
58350
58360
|
relations: relations4,
|
58351
58361
|
ts
|
@@ -58357,9 +58367,18 @@ var init_studioUtils = __esm({
|
|
58357
58367
|
const { createPool } = await Promise.resolve().then(() => __toESM(require_promise()));
|
58358
58368
|
const client = createPool({ ...config.dbCredentials, connectionLimit: 1 });
|
58359
58369
|
const db = drizzle2(client, { logger: verbose });
|
58370
|
+
const proxy = async (params) => {
|
58371
|
+
const result = await client.query({
|
58372
|
+
sql: params.sql,
|
58373
|
+
values: params.params,
|
58374
|
+
rowsAsArray: true
|
58375
|
+
});
|
58376
|
+
return result[0];
|
58377
|
+
};
|
58360
58378
|
return {
|
58361
58379
|
dialect: "mysql",
|
58362
58380
|
db,
|
58381
|
+
proxy,
|
58363
58382
|
schema: mysqlSchema4,
|
58364
58383
|
relations: relations4,
|
58365
58384
|
ts
|
@@ -58373,9 +58392,13 @@ var init_studioUtils = __esm({
|
|
58373
58392
|
const db = drizzle2(execute2, creds.wranglerConfigPath, creds.dbName, {
|
58374
58393
|
logger: verbose
|
58375
58394
|
});
|
58395
|
+
const proxy = async (params) => {
|
58396
|
+
throw new Error("Proxy is not implemented for D1");
|
58397
|
+
};
|
58376
58398
|
return {
|
58377
58399
|
dialect: "sqlite",
|
58378
58400
|
db,
|
58401
|
+
proxy,
|
58379
58402
|
schema: sqliteSchema2,
|
58380
58403
|
relations: relations4,
|
58381
58404
|
ts
|
@@ -58387,9 +58410,14 @@ var init_studioUtils = __esm({
|
|
58387
58410
|
const Database = await import("better-sqlite3");
|
58388
58411
|
const client = new Database.default(creds.url);
|
58389
58412
|
const db = drizzle2(client, { logger: verbose });
|
58413
|
+
const proxy = async (params) => {
|
58414
|
+
const sql2 = params.sql;
|
58415
|
+
return client.prepare(sql2).all(params.params);
|
58416
|
+
};
|
58390
58417
|
return {
|
58391
58418
|
dialect: "sqlite",
|
58392
58419
|
db,
|
58420
|
+
proxy,
|
58393
58421
|
schema: sqliteSchema2,
|
58394
58422
|
relations: relations4,
|
58395
58423
|
ts
|
@@ -58404,9 +58432,16 @@ var init_studioUtils = __esm({
|
|
58404
58432
|
client,
|
58405
58433
|
{ logger: verbose }
|
58406
58434
|
);
|
58435
|
+
const proxy = async (params) => {
|
58436
|
+
return client.execute({
|
58437
|
+
sql: params.sql,
|
58438
|
+
args: params.params
|
58439
|
+
});
|
58440
|
+
};
|
58407
58441
|
return {
|
58408
58442
|
dialect: "sqlite",
|
58409
58443
|
db,
|
58444
|
+
proxy,
|
58410
58445
|
schema: sqliteSchema2,
|
58411
58446
|
relations: relations4,
|
58412
58447
|
ts
|
@@ -60243,7 +60278,7 @@ var package_default = {
|
|
60243
60278
|
]
|
60244
60279
|
},
|
60245
60280
|
dependencies: {
|
60246
|
-
"@drizzle-team/studio": "^0.0.
|
60281
|
+
"@drizzle-team/studio": "^0.0.32",
|
60247
60282
|
"@esbuild-kit/esm-loader": "^2.5.5",
|
60248
60283
|
camelcase: "^7.0.1",
|
60249
60284
|
chalk: "^5.2.0",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.4-
|
3
|
+
"version": "0.20.4-ab73d4a",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -56,7 +56,7 @@
|
|
56
56
|
]
|
57
57
|
},
|
58
58
|
"dependencies": {
|
59
|
-
"@drizzle-team/studio": "^0.0.
|
59
|
+
"@drizzle-team/studio": "^0.0.32",
|
60
60
|
"@esbuild-kit/esm-loader": "^2.5.5",
|
61
61
|
"camelcase": "^7.0.1",
|
62
62
|
"chalk": "^5.2.0",
|
package/utils.js
CHANGED
@@ -18014,7 +18014,7 @@ var init_introspect_pg = __esm({
|
|
18014
18014
|
const file = importsTs + decalrations;
|
18015
18015
|
const schemaEntry = `
|
18016
18016
|
{
|
18017
|
-
${Object.values(schema4.tables).map((it) => withCasing(it.name)).join("
|
18017
|
+
${Object.values(schema4.tables).map((it) => withCasing(it.name, casing)).join(",\n")}
|
18018
18018
|
}
|
18019
18019
|
`;
|
18020
18020
|
return { file, imports: importsTs, decalrations, schemaEntry };
|