drizzle-kit 0.21.1-4fb14f5 → 0.21.1-5071de4
Sign up to get free protection for your applications and to get access to all the features.
- package/bin.cjs +7 -5
- package/package.json +1 -1
package/bin.cjs
CHANGED
@@ -111520,12 +111520,14 @@ var init_connections = __esm({
|
|
111520
111520
|
);
|
111521
111521
|
process.exit(1);
|
111522
111522
|
};
|
111523
|
-
prepareSqliteParams = (params) => {
|
111523
|
+
prepareSqliteParams = (params, driver2) => {
|
111524
111524
|
return params.map((param) => {
|
111525
111525
|
if (param && typeof param === "object" && "type" in param && "value" in param && param.type === "binary") {
|
111526
|
-
|
111527
|
-
|
111528
|
-
|
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);
|
111529
111531
|
}
|
111530
111532
|
return param;
|
111531
111533
|
});
|
@@ -111613,7 +111615,7 @@ var init_connections = __esm({
|
|
111613
111615
|
};
|
111614
111616
|
const proxy = {
|
111615
111617
|
proxy: async (params) => {
|
111616
|
-
const preparedParams = prepareSqliteParams(params.params);
|
111618
|
+
const preparedParams = prepareSqliteParams(params.params, "d1-http");
|
111617
111619
|
const result = await remoteCallback(params.sql, preparedParams, params.mode === "array" ? "values" : "all");
|
111618
111620
|
return result.rows;
|
111619
111621
|
}
|