drizzle-kit 0.21.1-c7223b2 → 0.21.1-ce37d6c
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +7 -4
- package/index.d.mts +10 -2
- package/index.d.ts +10 -2
- package/package.json +1 -1
- package/payload.js +1 -0
- package/payload.mjs +1 -0
package/bin.cjs
CHANGED
@@ -8652,6 +8652,7 @@ var init_common = __esm({
|
|
8652
8652
|
literalType("better-sqlite"),
|
8653
8653
|
literalType("turso"),
|
8654
8654
|
literalType("libsql"),
|
8655
|
+
literalType("d1"),
|
8655
8656
|
literalType("d1-http"),
|
8656
8657
|
literalType("expo")
|
8657
8658
|
]);
|
@@ -111519,12 +111520,14 @@ var init_connections = __esm({
|
|
111519
111520
|
);
|
111520
111521
|
process.exit(1);
|
111521
111522
|
};
|
111522
|
-
prepareSqliteParams = (params) => {
|
111523
|
+
prepareSqliteParams = (params, driver2) => {
|
111523
111524
|
return params.map((param) => {
|
111524
111525
|
if (param && typeof param === "object" && "type" in param && "value" in param && param.type === "binary") {
|
111525
|
-
|
111526
|
-
|
111527
|
-
|
111526
|
+
const value = typeof param.value === "object" ? JSON.stringify(param.value) : param.value;
|
111527
|
+
if (driver2 === "d1-http") {
|
111528
|
+
return value;
|
111529
|
+
}
|
111530
|
+
return Buffer.from(value);
|
111528
111531
|
}
|
111529
111532
|
return param;
|
111530
111533
|
});
|
package/index.d.mts
CHANGED
@@ -2,7 +2,7 @@ import { SslOptions } from 'mysql2';
|
|
2
2
|
import * as zod from 'zod';
|
3
3
|
import { TypeOf } from 'zod';
|
4
4
|
|
5
|
-
declare const driver: zod.ZodUnion<[zod.ZodUnion<[zod.ZodLiteral<"better-sqlite">, zod.ZodLiteral<"turso">, zod.ZodLiteral<"libsql">, zod.ZodLiteral<"d1-http">, zod.ZodLiteral<"expo">]>, zod.ZodLiteral<"aws-data-api">, zod.ZodLiteral<"mysql2">]>;
|
5
|
+
declare const driver: zod.ZodUnion<[zod.ZodUnion<[zod.ZodLiteral<"better-sqlite">, zod.ZodLiteral<"turso">, zod.ZodLiteral<"libsql">, zod.ZodLiteral<"d1">, zod.ZodLiteral<"d1-http">, zod.ZodLiteral<"expo">]>, zod.ZodLiteral<"aws-data-api">, zod.ZodLiteral<"mysql2">]>;
|
6
6
|
type Driver = TypeOf<typeof driver>;
|
7
7
|
|
8
8
|
declare const dialect: zod.ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
@@ -164,11 +164,19 @@ type Config = {
|
|
164
164
|
};
|
165
165
|
} | {
|
166
166
|
dialect: Verify<Dialect, "sqlite">;
|
167
|
-
driver: Verify<Driver, "d1
|
167
|
+
driver: Verify<Driver, "d1">;
|
168
168
|
dbCredentials: {
|
169
169
|
wranglerConfigPath: string;
|
170
170
|
dbName: string;
|
171
171
|
};
|
172
|
+
} | {
|
173
|
+
dialect: Verify<Dialect, "sqlite">;
|
174
|
+
driver: Verify<Driver, "d1-http">;
|
175
|
+
dbCredentials: {
|
176
|
+
accountId: string;
|
177
|
+
databaseId: string;
|
178
|
+
token: string;
|
179
|
+
};
|
172
180
|
} | {
|
173
181
|
dialect: Verify<Dialect, "sqlite">;
|
174
182
|
driver: Verify<Driver, "expo">;
|
package/index.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { SslOptions } from 'mysql2';
|
|
2
2
|
import * as zod from 'zod';
|
3
3
|
import { TypeOf } from 'zod';
|
4
4
|
|
5
|
-
declare const driver: zod.ZodUnion<[zod.ZodUnion<[zod.ZodLiteral<"better-sqlite">, zod.ZodLiteral<"turso">, zod.ZodLiteral<"libsql">, zod.ZodLiteral<"d1-http">, zod.ZodLiteral<"expo">]>, zod.ZodLiteral<"aws-data-api">, zod.ZodLiteral<"mysql2">]>;
|
5
|
+
declare const driver: zod.ZodUnion<[zod.ZodUnion<[zod.ZodLiteral<"better-sqlite">, zod.ZodLiteral<"turso">, zod.ZodLiteral<"libsql">, zod.ZodLiteral<"d1">, zod.ZodLiteral<"d1-http">, zod.ZodLiteral<"expo">]>, zod.ZodLiteral<"aws-data-api">, zod.ZodLiteral<"mysql2">]>;
|
6
6
|
type Driver = TypeOf<typeof driver>;
|
7
7
|
|
8
8
|
declare const dialect: zod.ZodEnum<["postgresql", "mysql", "sqlite"]>;
|
@@ -164,11 +164,19 @@ type Config = {
|
|
164
164
|
};
|
165
165
|
} | {
|
166
166
|
dialect: Verify<Dialect, "sqlite">;
|
167
|
-
driver: Verify<Driver, "d1
|
167
|
+
driver: Verify<Driver, "d1">;
|
168
168
|
dbCredentials: {
|
169
169
|
wranglerConfigPath: string;
|
170
170
|
dbName: string;
|
171
171
|
};
|
172
|
+
} | {
|
173
|
+
dialect: Verify<Dialect, "sqlite">;
|
174
|
+
driver: Verify<Driver, "d1-http">;
|
175
|
+
dbCredentials: {
|
176
|
+
accountId: string;
|
177
|
+
databaseId: string;
|
178
|
+
token: string;
|
179
|
+
};
|
172
180
|
} | {
|
173
181
|
dialect: Verify<Dialect, "sqlite">;
|
174
182
|
driver: Verify<Driver, "expo">;
|
package/package.json
CHANGED
package/payload.js
CHANGED
@@ -8496,6 +8496,7 @@ var init_common2 = __esm({
|
|
8496
8496
|
(0, import_zod8.literal)("better-sqlite"),
|
8497
8497
|
(0, import_zod8.literal)("turso"),
|
8498
8498
|
(0, import_zod8.literal)("libsql"),
|
8499
|
+
(0, import_zod8.literal)("d1"),
|
8499
8500
|
(0, import_zod8.literal)("d1-http"),
|
8500
8501
|
(0, import_zod8.literal)("expo")
|
8501
8502
|
]);
|