drizzle-kit 0.20.14-fa7577a → 0.20.15-13e00d1
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +25786 -23014
- package/package.json +8 -5
- package/utils-studio.js +10 -11
- package/utils-studio.mjs +6 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "drizzle-kit",
|
3
|
-
"version": "0.20.
|
3
|
+
"version": "0.20.15-13e00d1",
|
4
4
|
"repository": "https://github.com/drizzle-team/drizzle-kit-mirror",
|
5
5
|
"author": "Drizzle Team",
|
6
6
|
"license": "MIT",
|
@@ -56,8 +56,9 @@
|
|
56
56
|
]
|
57
57
|
},
|
58
58
|
"dependencies": {
|
59
|
-
"@drizzle-team/studio": "^0.0.39",
|
60
59
|
"@esbuild-kit/esm-loader": "^2.5.5",
|
60
|
+
"@hono/node-server": "^1.9.0",
|
61
|
+
"@hono/zod-validator": "^0.2.0",
|
61
62
|
"camelcase": "^7.0.1",
|
62
63
|
"chalk": "^5.2.0",
|
63
64
|
"commander": "^9.4.1",
|
@@ -66,9 +67,11 @@
|
|
66
67
|
"esbuild-register": "^3.5.0",
|
67
68
|
"glob": "^8.1.0",
|
68
69
|
"hanji": "^0.0.5",
|
70
|
+
"hono": "^4.1.4",
|
69
71
|
"json-diff": "0.9.0",
|
70
72
|
"minimatch": "^7.4.3",
|
71
73
|
"semver": "^7.5.4",
|
74
|
+
"superjson": "^2.2.1",
|
72
75
|
"zod": "^3.20.2"
|
73
76
|
},
|
74
77
|
"devDependencies": {
|
@@ -84,11 +87,11 @@
|
|
84
87
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
85
88
|
"@typescript-eslint/parser": "^5.46.1",
|
86
89
|
"ava": "^5.1.0",
|
87
|
-
"better-sqlite3": "^
|
90
|
+
"better-sqlite3": "^9.4.3",
|
88
91
|
"dockerode": "^3.3.4",
|
89
92
|
"dotenv": "^16.0.3",
|
90
|
-
"drizzle-kit": "0.
|
91
|
-
"drizzle-orm": "0.
|
93
|
+
"drizzle-kit": "0.20.14",
|
94
|
+
"drizzle-orm": "0.30.5",
|
92
95
|
"esbuild-node-externals": "^1.9.0",
|
93
96
|
"eslint": "^8.29.0",
|
94
97
|
"eslint-config-prettier": "^8.5.0",
|
package/utils-studio.js
CHANGED
@@ -1134,10 +1134,10 @@ function mapSqlToSqliteType(sqlType) {
|
|
1134
1134
|
return "numeric";
|
1135
1135
|
}
|
1136
1136
|
}
|
1137
|
-
var
|
1137
|
+
var import_drizzle_orm, import_sqlite_core2, dialect, fromDatabase;
|
1138
1138
|
var init_sqliteSerializer = __esm({
|
1139
1139
|
"src/serializer/sqliteSerializer.ts"() {
|
1140
|
-
|
1140
|
+
import_drizzle_orm = require("drizzle-orm");
|
1141
1141
|
import_sqlite_core2 = require("drizzle-orm/sqlite-core");
|
1142
1142
|
init_serializer();
|
1143
1143
|
init_outputs();
|
@@ -1552,12 +1552,12 @@ var require_brace_expansion = __commonJS({
|
|
1552
1552
|
});
|
1553
1553
|
|
1554
1554
|
// src/serializer/pgSerializer.ts
|
1555
|
-
var import_pg_core2, import_pg_core3,
|
1555
|
+
var import_pg_core2, import_pg_core3, import_drizzle_orm2, dialect2, trimChar, fromDatabase2, columnToDefault, defaultForColumn;
|
1556
1556
|
var init_pgSerializer = __esm({
|
1557
1557
|
"src/serializer/pgSerializer.ts"() {
|
1558
1558
|
import_pg_core2 = require("drizzle-orm/pg-core");
|
1559
1559
|
import_pg_core3 = require("drizzle-orm/pg-core");
|
1560
|
-
|
1560
|
+
import_drizzle_orm2 = require("drizzle-orm");
|
1561
1561
|
init_serializer();
|
1562
1562
|
init_source();
|
1563
1563
|
init_outputs();
|
@@ -1971,10 +1971,10 @@ var init_pgSerializer = __esm({
|
|
1971
1971
|
});
|
1972
1972
|
|
1973
1973
|
// src/drivers/index.ts
|
1974
|
-
var
|
1974
|
+
var import_drizzle_orm4, DrizzleDbClient, DrizzleORMPgClient, TursoSqlite;
|
1975
1975
|
var init_drivers = __esm({
|
1976
1976
|
"src/drivers/index.ts"() {
|
1977
|
-
|
1977
|
+
import_drizzle_orm4 = require("drizzle-orm");
|
1978
1978
|
DrizzleDbClient = class {
|
1979
1979
|
constructor(db) {
|
1980
1980
|
this.db = db;
|
@@ -1982,11 +1982,11 @@ var init_drivers = __esm({
|
|
1982
1982
|
};
|
1983
1983
|
DrizzleORMPgClient = class extends DrizzleDbClient {
|
1984
1984
|
async query(query, values) {
|
1985
|
-
const res = await this.db.execute(
|
1985
|
+
const res = await this.db.execute(import_drizzle_orm4.sql.raw(query));
|
1986
1986
|
return res.rows;
|
1987
1987
|
}
|
1988
1988
|
async run(query) {
|
1989
|
-
const res = await this.db.execute(
|
1989
|
+
const res = await this.db.execute(import_drizzle_orm4.sql.raw(query));
|
1990
1990
|
return res.rows;
|
1991
1991
|
}
|
1992
1992
|
};
|
@@ -2015,7 +2015,6 @@ __export(utils_studio_exports, {
|
|
2015
2015
|
module.exports = __toCommonJS(utils_studio_exports);
|
2016
2016
|
|
2017
2017
|
// src/serializer/schemaToDrizzle.ts
|
2018
|
-
var import_drizzle_orm = require("drizzle-orm");
|
2019
2018
|
var import_pg_core = require("drizzle-orm/pg-core");
|
2020
2019
|
var import_sqlite_core = require("drizzle-orm/sqlite-core");
|
2021
2020
|
var pgSchemaToDrizzle = (schema, schemaName) => {
|
@@ -2143,7 +2142,7 @@ var sqliteSchemaToDrizzle = (schema) => {
|
|
2143
2142
|
columnBuilder = columnBuilder.notNull();
|
2144
2143
|
}
|
2145
2144
|
if (c.default) {
|
2146
|
-
columnBuilder = columnBuilder.default(
|
2145
|
+
columnBuilder = columnBuilder.default(c.default);
|
2147
2146
|
}
|
2148
2147
|
if (c.primaryKey) {
|
2149
2148
|
columnBuilder = columnBuilder.primaryKey();
|
@@ -3352,7 +3351,7 @@ init_views();
|
|
3352
3351
|
init_pgSerializer();
|
3353
3352
|
|
3354
3353
|
// src/introspect-pg.ts
|
3355
|
-
var
|
3354
|
+
var import_drizzle_orm3 = require("drizzle-orm");
|
3356
3355
|
var import_relations = require("drizzle-orm/relations");
|
3357
3356
|
init_pgSerializer();
|
3358
3357
|
|
package/utils-studio.mjs
CHANGED
@@ -1100,7 +1100,7 @@ var init_outputs = __esm({
|
|
1100
1100
|
});
|
1101
1101
|
|
1102
1102
|
// src/serializer/sqliteSerializer.ts
|
1103
|
-
import { getTableName, is, SQL
|
1103
|
+
import { getTableName, is, SQL } from "drizzle-orm";
|
1104
1104
|
import {
|
1105
1105
|
getTableConfig,
|
1106
1106
|
SQLiteBaseInteger,
|
@@ -1563,7 +1563,7 @@ import {
|
|
1563
1563
|
uniqueKeyName as uniqueKeyName2
|
1564
1564
|
} from "drizzle-orm/pg-core";
|
1565
1565
|
import { getTableConfig as getTableConfig2 } from "drizzle-orm/pg-core";
|
1566
|
-
import { is as is2, SQL as
|
1566
|
+
import { is as is2, SQL as SQL2, getTableName as getTableName2 } from "drizzle-orm";
|
1567
1567
|
var dialect2, trimChar, fromDatabase2, columnToDefault, defaultForColumn;
|
1568
1568
|
var init_pgSerializer = __esm({
|
1569
1569
|
"src/serializer/pgSerializer.ts"() {
|
@@ -1980,7 +1980,7 @@ var init_pgSerializer = __esm({
|
|
1980
1980
|
});
|
1981
1981
|
|
1982
1982
|
// src/drivers/index.ts
|
1983
|
-
import { sql
|
1983
|
+
import { sql } from "drizzle-orm";
|
1984
1984
|
var DrizzleDbClient, DrizzleORMPgClient, TursoSqlite;
|
1985
1985
|
var init_drivers = __esm({
|
1986
1986
|
"src/drivers/index.ts"() {
|
@@ -1991,11 +1991,11 @@ var init_drivers = __esm({
|
|
1991
1991
|
};
|
1992
1992
|
DrizzleORMPgClient = class extends DrizzleDbClient {
|
1993
1993
|
async query(query, values) {
|
1994
|
-
const res = await this.db.execute(
|
1994
|
+
const res = await this.db.execute(sql.raw(query));
|
1995
1995
|
return res.rows;
|
1996
1996
|
}
|
1997
1997
|
async run(query) {
|
1998
|
-
const res = await this.db.execute(
|
1998
|
+
const res = await this.db.execute(sql.raw(query));
|
1999
1999
|
return res.rows;
|
2000
2000
|
}
|
2001
2001
|
};
|
@@ -2012,7 +2012,6 @@ var init_drivers = __esm({
|
|
2012
2012
|
});
|
2013
2013
|
|
2014
2014
|
// src/serializer/schemaToDrizzle.ts
|
2015
|
-
import { sql } from "drizzle-orm";
|
2016
2015
|
import {
|
2017
2016
|
customType,
|
2018
2017
|
PgBigInt53Builder,
|
@@ -2177,7 +2176,7 @@ var sqliteSchemaToDrizzle = (schema) => {
|
|
2177
2176
|
columnBuilder = columnBuilder.notNull();
|
2178
2177
|
}
|
2179
2178
|
if (c.default) {
|
2180
|
-
columnBuilder = columnBuilder.default(
|
2179
|
+
columnBuilder = columnBuilder.default(c.default);
|
2181
2180
|
}
|
2182
2181
|
if (c.primaryKey) {
|
2183
2182
|
columnBuilder = columnBuilder.primaryKey();
|