drizzle-kit 0.20.4-dea9219 → 0.20.4-e66fb2d
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/bin.cjs +37 -2
- package/package.json +2 -2
package/bin.cjs
CHANGED
|
@@ -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).raw().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
|
+
}).then((it) => it.rows.map((row) => Object.values(row)));
|
|
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-e66fb2d",
|
|
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",
|