drizzle-kit 1.0.0-rc.2-33e80cd → 1.0.0-rc.2-e38a2ba
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-mysql.d.mts +2 -2
- package/api-mysql.d.ts +2 -2
- package/api-mysql.js +1 -1
- package/api-mysql.mjs +10 -6
- package/api-postgres.d.mts +92 -92
- package/api-postgres.d.ts +92 -92
- package/api-postgres.js +1 -1
- package/api-postgres.mjs +10 -6
- package/api-sqlite.js +1 -1
- package/api-sqlite.mjs +10 -6
- package/bin.cjs +9 -5
- package/{connections-D35oU9jb.js → connections-BUhsilZD.js} +10 -4
- package/index.js +4 -2
- package/package.json +1 -1
- package/{studio-CFpuBxWx.js → studio-CoS8Dl1j.js} +4 -5
package/api-mysql.d.mts
CHANGED
|
@@ -38,9 +38,9 @@ declare const mysqlCredentials: ZodUnion<[ZodObject<{
|
|
|
38
38
|
}, "strip", ZodTypeAny, {
|
|
39
39
|
host: string;
|
|
40
40
|
database: string;
|
|
41
|
-
password?: string | undefined;
|
|
42
41
|
port?: number | undefined;
|
|
43
42
|
user?: string | undefined;
|
|
43
|
+
password?: string | undefined;
|
|
44
44
|
ssl?: string | {
|
|
45
45
|
pfx?: string | undefined;
|
|
46
46
|
key?: string | undefined;
|
|
@@ -54,9 +54,9 @@ declare const mysqlCredentials: ZodUnion<[ZodObject<{
|
|
|
54
54
|
}, {
|
|
55
55
|
host: string;
|
|
56
56
|
database: string;
|
|
57
|
-
password?: string | undefined;
|
|
58
57
|
port?: number | undefined;
|
|
59
58
|
user?: string | undefined;
|
|
59
|
+
password?: string | undefined;
|
|
60
60
|
ssl?: string | {
|
|
61
61
|
pfx?: string | undefined;
|
|
62
62
|
key?: string | undefined;
|
package/api-mysql.d.ts
CHANGED
|
@@ -38,9 +38,9 @@ declare const mysqlCredentials: ZodUnion<[ZodObject<{
|
|
|
38
38
|
}, "strip", ZodTypeAny, {
|
|
39
39
|
host: string;
|
|
40
40
|
database: string;
|
|
41
|
-
password?: string | undefined;
|
|
42
41
|
port?: number | undefined;
|
|
43
42
|
user?: string | undefined;
|
|
43
|
+
password?: string | undefined;
|
|
44
44
|
ssl?: string | {
|
|
45
45
|
pfx?: string | undefined;
|
|
46
46
|
key?: string | undefined;
|
|
@@ -54,9 +54,9 @@ declare const mysqlCredentials: ZodUnion<[ZodObject<{
|
|
|
54
54
|
}, {
|
|
55
55
|
host: string;
|
|
56
56
|
database: string;
|
|
57
|
-
password?: string | undefined;
|
|
58
57
|
port?: number | undefined;
|
|
59
58
|
user?: string | undefined;
|
|
59
|
+
password?: string | undefined;
|
|
60
60
|
ssl?: string | {
|
|
61
61
|
pfx?: string | undefined;
|
|
62
62
|
key?: string | undefined;
|
package/api-mysql.js
CHANGED
|
@@ -6,7 +6,7 @@ const startStudioServer = async (imports, credentials, options) => {
|
|
|
6
6
|
const { is } = require("drizzle-orm");
|
|
7
7
|
const { MySqlTable, getTableConfig } = require("drizzle-orm/mysql-core");
|
|
8
8
|
const { Relations } = require("drizzle-orm/_relations");
|
|
9
|
-
const { drizzleForMySQL, prepareServer } = await Promise.resolve().then(() => require("./studio-
|
|
9
|
+
const { drizzleForMySQL, prepareServer } = await Promise.resolve().then(() => require("./studio-CoS8Dl1j.js"));
|
|
10
10
|
const mysqlSchema = {};
|
|
11
11
|
const relations = {};
|
|
12
12
|
Object.entries(imports).forEach(([k, t]) => {
|
package/api-mysql.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import he, { createRequire } from "node:module";
|
|
2
|
-
import { is } from "drizzle-orm";
|
|
2
|
+
import { DrizzleQueryError, is } from "drizzle-orm";
|
|
3
3
|
import { MySqlTable, getTableConfig } from "drizzle-orm/mysql-core";
|
|
4
4
|
import { Many, One, Relations, createTableRelationsHelpers, extractTablesRelationalConfig, normalizeRelation } from "drizzle-orm/_relations";
|
|
5
5
|
import { createServer } from "http";
|
|
@@ -199964,14 +199964,19 @@ var init_connections = __esmMin((() => {
|
|
|
199964
199964
|
return session.prepareQuery({
|
|
199965
199965
|
sql,
|
|
199966
199966
|
params: params ?? []
|
|
199967
|
-
}, "objects", false, void 0).execute()
|
|
199967
|
+
}, "objects", false, void 0).execute().catch((e) => {
|
|
199968
|
+
if (e instanceof DrizzleQueryError && e.cause instanceof Error) throw new QueryError(e.cause, sql, params);
|
|
199969
|
+
throw new QueryError(e, sql, params);
|
|
199970
|
+
});
|
|
199968
199971
|
};
|
|
199969
199972
|
const proxy = async (params) => {
|
|
199970
199973
|
return session.prepareQuery({
|
|
199971
199974
|
sql: params.sql,
|
|
199972
|
-
params: params.params ?? []
|
|
199973
|
-
|
|
199974
|
-
|
|
199975
|
+
params: params.params ?? []
|
|
199976
|
+
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute().catch((e) => {
|
|
199977
|
+
if (is(e, DrizzleQueryError) && e.cause instanceof Error) throw new QueryError(e.cause, params.sql, params.params || []);
|
|
199978
|
+
throw new QueryError(e, params.sql, params.params || []);
|
|
199979
|
+
});
|
|
199975
199980
|
};
|
|
199976
199981
|
const transactionProxy = async (_queries) => {
|
|
199977
199982
|
throw new Error("Transaction not supported");
|
|
@@ -201917,7 +201922,6 @@ var init_studio = __esmMin((() => {
|
|
|
201917
201922
|
data: objectType({
|
|
201918
201923
|
sql: stringType(),
|
|
201919
201924
|
params: arrayType(anyType()).optional(),
|
|
201920
|
-
typings: stringType().array().optional(),
|
|
201921
201925
|
mode: enumType(["array", "object"]).default("object"),
|
|
201922
201926
|
method: unionType([
|
|
201923
201927
|
literalType("values"),
|