drizzle-kit 1.0.0-rc.2-63dd281 → 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.js +1 -1
- package/api-mysql.mjs +9 -3
- package/api-postgres.js +1 -1
- package/api-postgres.mjs +52 -46
- package/api-sqlite.js +1 -1
- package/api-sqlite.mjs +9 -3
- package/bin.cjs +8 -2
- package/{connections-Da2oylxy.js → connections-BUhsilZD.js} +9 -2
- package/package.json +1 -1
- package/{studio-DhINcSZ8.js → studio-CoS8Dl1j.js} +4 -4
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,13 +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
199975
|
params: params.params ?? []
|
|
199973
|
-
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute()
|
|
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
|
+
});
|
|
199974
199980
|
};
|
|
199975
199981
|
const transactionProxy = async (_queries) => {
|
|
199976
199982
|
throw new Error("Transaction not supported");
|
package/api-postgres.js
CHANGED
|
@@ -423,7 +423,7 @@ const startStudioServer = async (imports, credentials, options) => {
|
|
|
423
423
|
const { is } = require("drizzle-orm");
|
|
424
424
|
const { PgTable, getTableConfig } = require("drizzle-orm/pg-core");
|
|
425
425
|
const { Relations } = require("drizzle-orm/_relations");
|
|
426
|
-
const { drizzleForPostgres, prepareServer } = await Promise.resolve().then(() => require("./studio-
|
|
426
|
+
const { drizzleForPostgres, prepareServer } = await Promise.resolve().then(() => require("./studio-CoS8Dl1j.js"));
|
|
427
427
|
const pgSchema = {};
|
|
428
428
|
const relations = {};
|
|
429
429
|
Object.entries(imports).forEach(([k, t]) => {
|
package/api-postgres.mjs
CHANGED
|
@@ -3,14 +3,14 @@ import process$1 from "node:process";
|
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import tty from "node:tty";
|
|
5
5
|
import crypto$1, { createHash, randomUUID } from "crypto";
|
|
6
|
-
import { SQL, getTableName, is } from "drizzle-orm";
|
|
6
|
+
import { DrizzleQueryError, SQL, getTableName, is } from "drizzle-orm";
|
|
7
7
|
import { Many, One, Relations, createTableRelationsHelpers, extractTablesRelationalConfig, normalizeRelation } from "drizzle-orm/_relations";
|
|
8
8
|
import { IndexedColumn, PgDialect, PgEnumColumn, PgEnumObjectColumn, PgGeometry, PgGeometryObject, PgLineABC, PgLineTuple, PgPointObject, PgPointTuple, PgPolicy, PgRole, PgSchema, PgTable, PgView, getMaterializedViewConfig, getTableConfig, getViewConfig, isPgEnum, isPgMaterializedView, isPgSequence, isPgView, uniqueKeyName } from "drizzle-orm/pg-core";
|
|
9
9
|
import fs, { existsSync, lstatSync, mkdirSync, readdirSync, writeFileSync } from "fs";
|
|
10
10
|
import m from "node:path";
|
|
11
11
|
import re, { promises } from "node:fs";
|
|
12
12
|
import Be from "os";
|
|
13
|
-
import
|
|
13
|
+
import path, { dirname, join, resolve } from "path";
|
|
14
14
|
import { parse, pathToFileURL } from "url";
|
|
15
15
|
import { fileURLToPath, format } from "node:url";
|
|
16
16
|
import { deprecate, promisify, types } from "node:util";
|
|
@@ -1825,7 +1825,7 @@ function Et(e) {
|
|
|
1825
1825
|
throw new RangeError(`invalid RFC 9557 time-only string ${e}; may need a T prefix`);
|
|
1826
1826
|
}
|
|
1827
1827
|
function It(e) {
|
|
1828
|
-
const t = Ie
|
|
1828
|
+
const t = Ie.exec(e);
|
|
1829
1829
|
let n, r, o, i;
|
|
1830
1830
|
if (t) {
|
|
1831
1831
|
o = Tt(t[3]);
|
|
@@ -4252,7 +4252,7 @@ function zi(e, t) {
|
|
|
4252
4252
|
function Ai(e, t) {
|
|
4253
4253
|
return vt(e, wt), Hi(e).time[t];
|
|
4254
4254
|
}
|
|
4255
|
-
var import_jsbi_cjs, t$4, n$3, r$4, o$3, i$5, a$4, s$5, c$3, d$4, h$6, u$4, l$3, w$4, v$4, b$3, D$1, T$1, M, E$3, I$3, C$2, O$2, $, Y$1, R$1, S$1, j$3, k$3, N$1, x$4, L, P$2, U, B$1, Z$2, F$2, H$2, z$1, A$3, q$4, W, _$1, J$2, G$2, K$1, V, X$1, Q$1, ee$1, te$1, ie$1, TimeDuration, me$1, fe$1, ye$1, pe$1, ge$1, we$1, ve$1, be$1, De$1, Te$1, Me$1, Ee, Ie
|
|
4255
|
+
var import_jsbi_cjs, t$4, n$3, r$4, o$3, i$5, a$4, s$5, c$3, d$4, h$6, u$4, l$3, w$4, v$4, b$3, D$1, T$1, M, E$3, I$3, C$2, O$2, $, Y$1, R$1, S$1, j$3, k$3, N$1, x$4, L, P$2, U, B$1, Z$2, F$2, H$2, z$1, A$3, q$4, W, _$1, J$2, G$2, K$1, V, X$1, Q$1, ee$1, te$1, ie$1, TimeDuration, me$1, fe$1, ye$1, pe$1, ge$1, we$1, ve$1, be$1, De$1, Te$1, Me$1, Ee, Ie, Ce$1, Oe$1, $e$1, Ye$1, Re$1, Se$1, je$1, ke$1, Ne$1, xe, Le$1, Pe$1, Ue$1, Be$1, Ze$1, Fe$1, He$1, ze$1, Qe$1, et, tt, nt, rt, ot, it, at, st, ct, dt, Ot, $t, qt, cr, dr, Po, Wo, _o, Xo, OneObjectCache, HelperBase, HebrewHelper, IslamicBaseHelper, IslamicHelper, IslamicUmalquraHelper, IslamicTblaHelper, IslamicCivilHelper, IslamicRgsaHelper, IslamicCcHelper, PersianHelper, IndianHelper, GregorianBaseHelperFixedEpoch, GregorianBaseHelper, SameMonthDayAsGregorianBaseHelper, ii, OrthodoxBaseHelperFixedEpoch, OrthodoxBaseHelper, EthioaaHelper, CopticHelper, EthiopicHelper, RocHelper, BuddhistHelper, GregoryHelper, JapaneseHelper, ChineseBaseHelper, ChineseHelper, DangiHelper, NonIsoCalendar, ai, DateTimeFormatImpl, di, Ri, Si, Instant, PlainDate, PlainDateTime, Duration, PlainMonthDay, Bi, PlainTime, PlainYearMonth, Fi, ZonedDateTime, qi, _i;
|
|
4256
4256
|
var init_index_esm = __esmMin((() => {
|
|
4257
4257
|
import_jsbi_cjs = /* @__PURE__ */ __toESM(require_jsbi_cjs(), 1);
|
|
4258
4258
|
t$4 = import_jsbi_cjs.default.BigInt(0), n$3 = import_jsbi_cjs.default.BigInt(1), r$4 = import_jsbi_cjs.default.BigInt(2), o$3 = import_jsbi_cjs.default.BigInt(10), i$5 = import_jsbi_cjs.default.BigInt(24), a$4 = import_jsbi_cjs.default.BigInt(60), s$5 = import_jsbi_cjs.default.BigInt(1e3), c$3 = import_jsbi_cjs.default.BigInt(1e6), d$4 = import_jsbi_cjs.default.BigInt(1e9), h$6 = import_jsbi_cjs.default.multiply(import_jsbi_cjs.default.BigInt(3600), d$4), u$4 = import_jsbi_cjs.default.multiply(a$4, d$4), l$3 = import_jsbi_cjs.default.multiply(h$6, i$5);
|
|
@@ -4339,7 +4339,7 @@ var init_index_esm = __esmMin((() => {
|
|
|
4339
4339
|
`(?:${De$1.source})?`,
|
|
4340
4340
|
`(?:\\[!?${fe$1.source}\\])?`,
|
|
4341
4341
|
`((?:${Te$1.source})*)$`
|
|
4342
|
-
].join("")), Ie
|
|
4342
|
+
].join("")), Ie = new RegExp(`^(${ye$1.source})-?(${pe$1.source})(?:\\[!?${fe$1.source}\\])?((?:${Te$1.source})*)$`), Ce$1 = new RegExp(`^(?:--)?(${pe$1.source})-?(${ge$1.source})(?:\\[!?${fe$1.source}\\])?((?:${Te$1.source})*)$`), Oe$1 = /(\d+)(?:[.,](\d{1,9}))?/, $e$1 = new RegExp(`(?:${Oe$1.source}H)?(?:${Oe$1.source}M)?(?:${Oe$1.source}S)?`), Ye$1 = new RegExp(`^([+-])?P${/(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?/.source}(?:T(?!$)${$e$1.source})?$`, "i"), Re$1 = 864e5, Se$1 = 1e6 * Re$1, je$1 = 6e10, ke$1 = 1e8 * Re$1, Ne$1 = xo(ke$1), xe = import_jsbi_cjs.default.unaryMinus(Ne$1), Le$1 = import_jsbi_cjs.default.add(import_jsbi_cjs.default.subtract(xe, l$3), n$3), Pe$1 = import_jsbi_cjs.default.subtract(import_jsbi_cjs.default.add(Ne$1, l$3), n$3), Ue$1 = 146097 * Re$1, Be$1 = -271821, Ze$1 = 275760, Fe$1 = Date.UTC(1847, 0, 1), He$1 = [
|
|
4343
4343
|
"iso8601",
|
|
4344
4344
|
"hebrew",
|
|
4345
4345
|
"islamic",
|
|
@@ -17023,7 +17023,7 @@ var init_unescape = __esmMin((() => {
|
|
|
17023
17023
|
}));
|
|
17024
17024
|
//#endregion
|
|
17025
17025
|
//#region ../node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/index.js
|
|
17026
|
-
var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path$
|
|
17026
|
+
var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path$7, sep, GLOBSTAR, plTypes, qmark, star, twoStarDot, twoStarNoDot, charSet, reSpecials, addPatternStartSet, filter, ext, defaults$2, braceExpand, MAX_PATTERN_LENGTH, assertValidPattern, makeRe, match$1, globUnescape, globMagic, regExpEscape, Minimatch;
|
|
17027
17027
|
var init_mjs = __esmMin((() => {
|
|
17028
17028
|
import_brace_expansion = /* @__PURE__ */ __toESM(require_brace_expansion(), 1);
|
|
17029
17029
|
init_brace_expressions();
|
|
@@ -17083,11 +17083,11 @@ var init_mjs = __esmMin((() => {
|
|
|
17083
17083
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
17084
17084
|
};
|
|
17085
17085
|
defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
17086
|
-
path$
|
|
17086
|
+
path$7 = {
|
|
17087
17087
|
win32: { sep: "\\" },
|
|
17088
17088
|
posix: { sep: "/" }
|
|
17089
17089
|
};
|
|
17090
|
-
sep = defaultPlatform === "win32" ? path$
|
|
17090
|
+
sep = defaultPlatform === "win32" ? path$7.win32.sep : path$7.posix.sep;
|
|
17091
17091
|
minimatch.sep = sep;
|
|
17092
17092
|
GLOBSTAR = Symbol("globstar **");
|
|
17093
17093
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -25513,7 +25513,7 @@ var init_dist$3 = __esmMin((() => {
|
|
|
25513
25513
|
}
|
|
25514
25514
|
return t;
|
|
25515
25515
|
}, "invertCase"), le = /* @__PURE__ */ new Map(), _e$3 = X((e, t) => {
|
|
25516
|
-
const s =
|
|
25516
|
+
const s = path.join(e, `.is-fs-case-sensitive-test-${process.pid}`);
|
|
25517
25517
|
try {
|
|
25518
25518
|
return t.writeFileSync(s, ""), !t.existsSync(Ae(s));
|
|
25519
25519
|
} finally {
|
|
@@ -26358,7 +26358,7 @@ var require_common$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
26358
26358
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
26359
26359
|
}
|
|
26360
26360
|
var fs$5 = __require("fs");
|
|
26361
|
-
var path$
|
|
26361
|
+
var path$6 = __require("path");
|
|
26362
26362
|
var minimatch = require_minimatch();
|
|
26363
26363
|
var isAbsolute$2 = __require("path").isAbsolute;
|
|
26364
26364
|
var Minimatch = minimatch.Minimatch;
|
|
@@ -26412,13 +26412,13 @@ var require_common$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
26412
26412
|
setupIgnores(self, options);
|
|
26413
26413
|
self.changedCwd = false;
|
|
26414
26414
|
var cwd = process.cwd();
|
|
26415
|
-
if (!ownProp(options, "cwd")) self.cwd = path$
|
|
26415
|
+
if (!ownProp(options, "cwd")) self.cwd = path$6.resolve(cwd);
|
|
26416
26416
|
else {
|
|
26417
|
-
self.cwd = path$
|
|
26417
|
+
self.cwd = path$6.resolve(options.cwd);
|
|
26418
26418
|
self.changedCwd = self.cwd !== cwd;
|
|
26419
26419
|
}
|
|
26420
|
-
self.root = options.root || path$
|
|
26421
|
-
self.root = path$
|
|
26420
|
+
self.root = options.root || path$6.resolve(self.cwd, "/");
|
|
26421
|
+
self.root = path$6.resolve(self.root);
|
|
26422
26422
|
self.cwdAbs = isAbsolute$2(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
|
|
26423
26423
|
self.nomount = !!options.nomount;
|
|
26424
26424
|
if (process.platform === "win32") {
|
|
@@ -26485,10 +26485,10 @@ var require_common$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
26485
26485
|
}
|
|
26486
26486
|
function makeAbs(self, f) {
|
|
26487
26487
|
var abs = f;
|
|
26488
|
-
if (f.charAt(0) === "/") abs = path$
|
|
26488
|
+
if (f.charAt(0) === "/") abs = path$6.join(self.root, f);
|
|
26489
26489
|
else if (isAbsolute$2(f) || f === "") abs = f;
|
|
26490
|
-
else if (self.changedCwd) abs = path$
|
|
26491
|
-
else abs = path$
|
|
26490
|
+
else if (self.changedCwd) abs = path$6.resolve(self.cwd, f);
|
|
26491
|
+
else abs = path$6.resolve(f);
|
|
26492
26492
|
if (process.platform === "win32") abs = abs.replace(/\\/g, "/");
|
|
26493
26493
|
return abs;
|
|
26494
26494
|
}
|
|
@@ -26515,7 +26515,7 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26515
26515
|
minimatch.Minimatch;
|
|
26516
26516
|
require_glob().Glob;
|
|
26517
26517
|
__require("util");
|
|
26518
|
-
var path$
|
|
26518
|
+
var path$5 = __require("path");
|
|
26519
26519
|
var assert$1 = __require("assert");
|
|
26520
26520
|
var isAbsolute$1 = __require("path").isAbsolute;
|
|
26521
26521
|
var common = require_common$1();
|
|
@@ -26611,7 +26611,7 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26611
26611
|
var e = matchedEntries[i];
|
|
26612
26612
|
if (prefix) if (prefix.slice(-1) !== "/") e = prefix + "/" + e;
|
|
26613
26613
|
else e = prefix + e;
|
|
26614
|
-
if (e.charAt(0) === "/" && !this.nomount) e = path$
|
|
26614
|
+
if (e.charAt(0) === "/" && !this.nomount) e = path$5.join(this.root, e);
|
|
26615
26615
|
this._emitMatch(index, e);
|
|
26616
26616
|
}
|
|
26617
26617
|
return;
|
|
@@ -26726,9 +26726,9 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26726
26726
|
if (!exists) return;
|
|
26727
26727
|
if (prefix && isAbsolute$1(prefix) && !this.nomount) {
|
|
26728
26728
|
var trail = /[\/\\]$/.test(prefix);
|
|
26729
|
-
if (prefix.charAt(0) === "/") prefix = path$
|
|
26729
|
+
if (prefix.charAt(0) === "/") prefix = path$5.join(this.root, prefix);
|
|
26730
26730
|
else {
|
|
26731
|
-
prefix = path$
|
|
26731
|
+
prefix = path$5.resolve(this.root, prefix);
|
|
26732
26732
|
if (trail) prefix += "/";
|
|
26733
26733
|
}
|
|
26734
26734
|
}
|
|
@@ -26889,7 +26889,7 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26889
26889
|
minimatch.Minimatch;
|
|
26890
26890
|
var inherits = require_inherits();
|
|
26891
26891
|
var EE$3 = __require("events").EventEmitter;
|
|
26892
|
-
var path$
|
|
26892
|
+
var path$4 = __require("path");
|
|
26893
26893
|
var assert = __require("assert");
|
|
26894
26894
|
var isAbsolute = __require("path").isAbsolute;
|
|
26895
26895
|
var globSync = require_sync();
|
|
@@ -27120,7 +27120,7 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
27120
27120
|
var e = matchedEntries[i];
|
|
27121
27121
|
if (prefix) if (prefix !== "/") e = prefix + "/" + e;
|
|
27122
27122
|
else e = prefix + e;
|
|
27123
|
-
if (e.charAt(0) === "/" && !this.nomount) e = path$
|
|
27123
|
+
if (e.charAt(0) === "/" && !this.nomount) e = path$4.join(this.root, e);
|
|
27124
27124
|
this._emitMatch(index, e);
|
|
27125
27125
|
}
|
|
27126
27126
|
return cb();
|
|
@@ -27267,9 +27267,9 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
27267
27267
|
if (!exists) return cb();
|
|
27268
27268
|
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
|
27269
27269
|
var trail = /[\/\\]$/.test(prefix);
|
|
27270
|
-
if (prefix.charAt(0) === "/") prefix = path$
|
|
27270
|
+
if (prefix.charAt(0) === "/") prefix = path$4.join(this.root, prefix);
|
|
27271
27271
|
else {
|
|
27272
|
-
prefix = path$
|
|
27272
|
+
prefix = path$4.resolve(this.root, prefix);
|
|
27273
27273
|
if (trail) prefix += "/";
|
|
27274
27274
|
}
|
|
27275
27275
|
}
|
|
@@ -83643,7 +83643,7 @@ var require_constants$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
83643
83643
|
//#region ../node_modules/.pnpm/node-gyp-build@4.8.4/node_modules/node-gyp-build/node-gyp-build.js
|
|
83644
83644
|
var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
83645
83645
|
var fs$4 = __require("fs");
|
|
83646
|
-
var path$
|
|
83646
|
+
var path$3 = __require("path");
|
|
83647
83647
|
var os$3 = __require("os");
|
|
83648
83648
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
83649
83649
|
var vars = process.config && process.config.variables || {};
|
|
@@ -83660,20 +83660,20 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
83660
83660
|
return runtimeRequire(load.resolve(dir));
|
|
83661
83661
|
}
|
|
83662
83662
|
load.resolve = load.path = function(dir) {
|
|
83663
|
-
dir = path$
|
|
83663
|
+
dir = path$3.resolve(dir || ".");
|
|
83664
83664
|
try {
|
|
83665
|
-
var name = runtimeRequire(path$
|
|
83665
|
+
var name = runtimeRequire(path$3.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
|
|
83666
83666
|
if (process.env[name + "_PREBUILD"]) dir = process.env[name + "_PREBUILD"];
|
|
83667
83667
|
} catch (err) {}
|
|
83668
83668
|
if (!prebuildsOnly) {
|
|
83669
|
-
var release = getFirst(path$
|
|
83669
|
+
var release = getFirst(path$3.join(dir, "build/Release"), matchBuild);
|
|
83670
83670
|
if (release) return release;
|
|
83671
|
-
var debug = getFirst(path$
|
|
83671
|
+
var debug = getFirst(path$3.join(dir, "build/Debug"), matchBuild);
|
|
83672
83672
|
if (debug) return debug;
|
|
83673
83673
|
}
|
|
83674
83674
|
var prebuild = resolve(dir);
|
|
83675
83675
|
if (prebuild) return prebuild;
|
|
83676
|
-
var nearby = resolve(path$
|
|
83676
|
+
var nearby = resolve(path$3.dirname(process.execPath));
|
|
83677
83677
|
if (nearby) return nearby;
|
|
83678
83678
|
var target = [
|
|
83679
83679
|
"platform=" + platform,
|
|
@@ -83689,11 +83689,11 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
83689
83689
|
].filter(Boolean).join(" ");
|
|
83690
83690
|
throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
|
|
83691
83691
|
function resolve(dir) {
|
|
83692
|
-
var tuple = readdirSync(path$
|
|
83692
|
+
var tuple = readdirSync(path$3.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
83693
83693
|
if (!tuple) return;
|
|
83694
|
-
var prebuilds = path$
|
|
83694
|
+
var prebuilds = path$3.join(dir, "prebuilds", tuple.name);
|
|
83695
83695
|
var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
|
|
83696
|
-
if (winner) return path$
|
|
83696
|
+
if (winner) return path$3.join(prebuilds, winner.file);
|
|
83697
83697
|
}
|
|
83698
83698
|
};
|
|
83699
83699
|
function readdirSync(dir) {
|
|
@@ -83705,7 +83705,7 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
83705
83705
|
}
|
|
83706
83706
|
function getFirst(dir, filter) {
|
|
83707
83707
|
var files = readdirSync(dir).filter(filter);
|
|
83708
|
-
return files[0] && path$
|
|
83708
|
+
return files[0] && path$3.join(dir, files[0]);
|
|
83709
83709
|
}
|
|
83710
83710
|
function matchBuild(name) {
|
|
83711
83711
|
return /\.node$/.test(name);
|
|
@@ -100013,7 +100013,7 @@ var require_dist_cjs$22 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
100013
100013
|
var getHomeDir = require_getHomeDir();
|
|
100014
100014
|
var getSSOTokenFilepath = require_getSSOTokenFilepath();
|
|
100015
100015
|
var getSSOTokenFromFile = require_getSSOTokenFromFile();
|
|
100016
|
-
var path$
|
|
100016
|
+
var path$2 = __require("path");
|
|
100017
100017
|
var types = require_dist_cjs$53();
|
|
100018
100018
|
var readFile = require_readFile();
|
|
100019
100019
|
const ENV_PROFILE = "AWS_PROFILE";
|
|
@@ -100031,9 +100031,9 @@ var require_dist_cjs$22 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
100031
100031
|
return acc;
|
|
100032
100032
|
}, { ...data.default && { default: data.default } });
|
|
100033
100033
|
const ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
100034
|
-
const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path$
|
|
100034
|
+
const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path$2.join(getHomeDir.getHomeDir(), ".aws", "config");
|
|
100035
100035
|
const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
100036
|
-
const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path$
|
|
100036
|
+
const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path$2.join(getHomeDir.getHomeDir(), ".aws", "credentials");
|
|
100037
100037
|
const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
100038
100038
|
const profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
100039
100039
|
const parseIni = (iniData) => {
|
|
@@ -100074,9 +100074,9 @@ var require_dist_cjs$22 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
100074
100074
|
const homeDir = getHomeDir.getHomeDir();
|
|
100075
100075
|
const relativeHomeDirPrefix = "~/";
|
|
100076
100076
|
let resolvedFilepath = filepath;
|
|
100077
|
-
if (filepath.startsWith(relativeHomeDirPrefix)) resolvedFilepath = path$
|
|
100077
|
+
if (filepath.startsWith(relativeHomeDirPrefix)) resolvedFilepath = path$2.join(homeDir, filepath.slice(2));
|
|
100078
100078
|
let resolvedConfigFilepath = configFilepath;
|
|
100079
|
-
if (configFilepath.startsWith(relativeHomeDirPrefix)) resolvedConfigFilepath = path$
|
|
100079
|
+
if (configFilepath.startsWith(relativeHomeDirPrefix)) resolvedConfigFilepath = path$2.join(homeDir, configFilepath.slice(2));
|
|
100080
100080
|
const parsedFiles = await Promise.all([readFile.readFile(resolvedConfigFilepath, { ignoreCache: init.ignoreCache }).then(parseIni).then(getConfigData).catch(swallowError$1), readFile.readFile(resolvedFilepath, { ignoreCache: init.ignoreCache }).then(parseIni).catch(swallowError$1)]);
|
|
100081
100081
|
return {
|
|
100082
100082
|
configFile: parsedFiles[0],
|
|
@@ -149118,7 +149118,7 @@ var require_msal_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
149118
149118
|
var msalCommon = require_lib$1();
|
|
149119
149119
|
var jwt = require_jsonwebtoken();
|
|
149120
149120
|
var fs$2 = __require("fs");
|
|
149121
|
-
var path = __require("path");
|
|
149121
|
+
var path$1 = __require("path");
|
|
149122
149122
|
/**
|
|
149123
149123
|
* This class serializes cache entities to be saved into in-memory object types defined internally
|
|
149124
149124
|
* @internal
|
|
@@ -158501,7 +158501,7 @@ Content-Length: ${body.length}\r\n\r\n${body}`;
|
|
|
158501
158501
|
const secretFilePath = wwwAuthHeader.split("Basic realm=")[1];
|
|
158502
158502
|
if (!SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform)) throw createManagedIdentityError(platformNotSupported);
|
|
158503
158503
|
const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
|
|
158504
|
-
const fileName = path.basename(secretFilePath);
|
|
158504
|
+
const fileName = path$1.basename(secretFilePath);
|
|
158505
158505
|
if (!fileName.endsWith(".key")) throw createManagedIdentityError(invalidFileExtension);
|
|
158506
158506
|
if (expectedSecretFilePath + fileName !== secretFilePath) throw createManagedIdentityError(invalidFilePath);
|
|
158507
158507
|
let secretFileSize;
|
|
@@ -205941,13 +205941,19 @@ var init_connections = __esmMin((() => {
|
|
|
205941
205941
|
return session.prepareQuery({
|
|
205942
205942
|
sql,
|
|
205943
205943
|
params: params ?? []
|
|
205944
|
-
}, "objects", false, void 0).execute()
|
|
205944
|
+
}, "objects", false, void 0).execute().catch((e) => {
|
|
205945
|
+
if (e instanceof DrizzleQueryError && e.cause instanceof Error) throw new QueryError(e.cause, sql, params);
|
|
205946
|
+
throw new QueryError(e, sql, params);
|
|
205947
|
+
});
|
|
205945
205948
|
};
|
|
205946
205949
|
const proxy = async (params) => {
|
|
205947
205950
|
return session.prepareQuery({
|
|
205948
205951
|
sql: params.sql,
|
|
205949
205952
|
params: params.params ?? []
|
|
205950
|
-
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute()
|
|
205953
|
+
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute().catch((e) => {
|
|
205954
|
+
if (is(e, DrizzleQueryError) && e.cause instanceof Error) throw new QueryError(e.cause, params.sql, params.params || []);
|
|
205955
|
+
throw new QueryError(e, params.sql, params.params || []);
|
|
205956
|
+
});
|
|
205951
205957
|
};
|
|
205952
205958
|
const transactionProxy = async (_queries) => {
|
|
205953
205959
|
throw new Error("Transaction not supported");
|
|
@@ -209342,13 +209348,13 @@ var init_generate_common = __esmMin((() => {
|
|
|
209342
209348
|
const js = embeddedMigrations([...snapshots || [], join(outFolder, `${tag}/snapshot.json`)], driver);
|
|
209343
209349
|
fs.writeFileSync(`${outFolder}/migrations.js`, js);
|
|
209344
209350
|
}
|
|
209345
|
-
(0, import_hanji$2.render)(`[${chalk.green("✓")}] Your SQL migration ➜ ${chalk.bold.underline.blue(
|
|
209351
|
+
(0, import_hanji$2.render)(`[${chalk.green("✓")}] Your SQL migration ➜ ${chalk.bold.underline.blue(path.join(`${outFolder}/${tag}/migration.sql`))} 🚀`);
|
|
209346
209352
|
};
|
|
209347
209353
|
embeddedMigrations = (snapshots, driver) => {
|
|
209348
209354
|
let content = driver === "expo" ? "// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo\n\n" : "";
|
|
209349
209355
|
const migrations = {};
|
|
209350
209356
|
snapshots.forEach((entry, idx) => {
|
|
209351
|
-
const prefix = entry.split(
|
|
209357
|
+
const prefix = entry.split(path.sep)[entry.split(path.sep).length - 2];
|
|
209352
209358
|
const importName = idx.toString().padStart(4, "0");
|
|
209353
209359
|
content += `import m${importName} from './${prefix}/migration.sql';\n`;
|
|
209354
209360
|
migrations[prefix] = importName;
|
package/api-sqlite.js
CHANGED
|
@@ -6,7 +6,7 @@ const startStudioServer = async (imports, credentials, options) => {
|
|
|
6
6
|
const { is } = require("drizzle-orm");
|
|
7
7
|
const { SQLiteTable } = require("drizzle-orm/sqlite-core");
|
|
8
8
|
const { Relations } = require("drizzle-orm/_relations");
|
|
9
|
-
const { drizzleForSQLite, prepareServer } = await Promise.resolve().then(() => require("./studio-
|
|
9
|
+
const { drizzleForSQLite, prepareServer } = await Promise.resolve().then(() => require("./studio-CoS8Dl1j.js"));
|
|
10
10
|
const sqliteSchema = {};
|
|
11
11
|
const relations = {};
|
|
12
12
|
Object.entries(imports).forEach(([k, t]) => {
|
package/api-sqlite.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 { SQLiteTable, getTableConfig } from "drizzle-orm/sqlite-core";
|
|
4
4
|
import { Many, One, Relations, createTableRelationsHelpers, extractTablesRelationalConfig, normalizeRelation } from "drizzle-orm/_relations";
|
|
5
5
|
import { createServer } from "http";
|
|
@@ -199964,13 +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
199975
|
params: params.params ?? []
|
|
199973
|
-
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute()
|
|
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
|
+
});
|
|
199974
199980
|
};
|
|
199975
199981
|
const transactionProxy = async (_queries) => {
|
|
199976
199982
|
throw new Error("Transaction not supported");
|
package/bin.cjs
CHANGED
|
@@ -220992,13 +220992,19 @@ var init_connections = __esmMin((() => {
|
|
|
220992
220992
|
return session.prepareQuery({
|
|
220993
220993
|
sql,
|
|
220994
220994
|
params: params ?? []
|
|
220995
|
-
}, "objects", false, void 0).execute()
|
|
220995
|
+
}, "objects", false, void 0).execute().catch((e) => {
|
|
220996
|
+
if (e instanceof drizzle_orm.DrizzleQueryError && e.cause instanceof Error) throw new QueryError(e.cause, sql, params);
|
|
220997
|
+
throw new QueryError(e, sql, params);
|
|
220998
|
+
});
|
|
220996
220999
|
};
|
|
220997
221000
|
const proxy = async (params) => {
|
|
220998
221001
|
return session.prepareQuery({
|
|
220999
221002
|
sql: params.sql,
|
|
221000
221003
|
params: params.params ?? []
|
|
221001
|
-
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute()
|
|
221004
|
+
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute().catch((e) => {
|
|
221005
|
+
if ((0, drizzle_orm.is)(e, drizzle_orm.DrizzleQueryError) && e.cause instanceof Error) throw new QueryError(e.cause, params.sql, params.params || []);
|
|
221006
|
+
throw new QueryError(e, params.sql, params.params || []);
|
|
221007
|
+
});
|
|
221002
221008
|
};
|
|
221003
221009
|
const transactionProxy = async (_queries) => {
|
|
221004
221010
|
throw new Error("Transaction not supported");
|
|
@@ -7,6 +7,7 @@ require('./snapshot-CHMNRJxo.js');
|
|
|
7
7
|
require('./brace-expansion-CQ04dhdS.js');
|
|
8
8
|
const require_utils_node = require('./utils-node-DWTi1mTL.js');
|
|
9
9
|
const require_dist_cjs = require('./dist-cjs-DP1dfP1V.js');
|
|
10
|
+
let drizzle_orm = require("drizzle-orm");
|
|
10
11
|
let node_https = require("node:https");
|
|
11
12
|
node_https = require_chunk.__toESM(node_https);
|
|
12
13
|
let net = require("net");
|
|
@@ -6536,13 +6537,19 @@ const preparePostgresDB = async (credentials) => {
|
|
|
6536
6537
|
return session.prepareQuery({
|
|
6537
6538
|
sql,
|
|
6538
6539
|
params: params ?? []
|
|
6539
|
-
}, "objects", false, void 0).execute()
|
|
6540
|
+
}, "objects", false, void 0).execute().catch((e) => {
|
|
6541
|
+
if (e instanceof drizzle_orm.DrizzleQueryError && e.cause instanceof Error) throw new QueryError(e.cause, sql, params);
|
|
6542
|
+
throw new QueryError(e, sql, params);
|
|
6543
|
+
});
|
|
6540
6544
|
};
|
|
6541
6545
|
const proxy = async (params) => {
|
|
6542
6546
|
return session.prepareQuery({
|
|
6543
6547
|
sql: params.sql,
|
|
6544
6548
|
params: params.params ?? []
|
|
6545
|
-
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute()
|
|
6549
|
+
}, params.mode === "array" ? "arrays" : "objects", false, void 0).execute().catch((e) => {
|
|
6550
|
+
if ((0, drizzle_orm.is)(e, drizzle_orm.DrizzleQueryError) && e.cause instanceof Error) throw new QueryError(e.cause, params.sql, params.params || []);
|
|
6551
|
+
throw new QueryError(e, params.sql, params.params || []);
|
|
6552
|
+
});
|
|
6546
6553
|
};
|
|
6547
6554
|
const transactionProxy = async (_queries) => {
|
|
6548
6555
|
throw new Error("Transaction not supported");
|
package/package.json
CHANGED
|
@@ -1965,7 +1965,7 @@ const getCustomDefaults = (schema) => {
|
|
|
1965
1965
|
return customDefaults;
|
|
1966
1966
|
};
|
|
1967
1967
|
const drizzleForPostgres = async (credentials, pgSchema, relations, schemaFiles) => {
|
|
1968
|
-
const { preparePostgresDB } = await Promise.resolve().then(() => require("./connections-
|
|
1968
|
+
const { preparePostgresDB } = await Promise.resolve().then(() => require("./connections-BUhsilZD.js"));
|
|
1969
1969
|
const db = await preparePostgresDB(credentials);
|
|
1970
1970
|
const customDefaults = getCustomDefaults(pgSchema);
|
|
1971
1971
|
let dbUrl;
|
|
@@ -1991,7 +1991,7 @@ const drizzleForPostgres = async (credentials, pgSchema, relations, schemaFiles)
|
|
|
1991
1991
|
};
|
|
1992
1992
|
};
|
|
1993
1993
|
const drizzleForMySQL = async (credentials, mysqlSchema, relations, schemaFiles) => {
|
|
1994
|
-
const { connectToMySQL } = await Promise.resolve().then(() => require("./connections-
|
|
1994
|
+
const { connectToMySQL } = await Promise.resolve().then(() => require("./connections-BUhsilZD.js"));
|
|
1995
1995
|
const { proxy, transactionProxy, benchmarkProxy, database, packageName } = await connectToMySQL(credentials);
|
|
1996
1996
|
const customDefaults = getCustomDefaults(mysqlSchema);
|
|
1997
1997
|
let dbUrl;
|
|
@@ -2014,7 +2014,7 @@ const drizzleForMySQL = async (credentials, mysqlSchema, relations, schemaFiles)
|
|
|
2014
2014
|
const drizzleForSQLite = async (credentials, sqliteSchema, relations, schemaFiles) => {
|
|
2015
2015
|
const customDefaults = getCustomDefaults(sqliteSchema);
|
|
2016
2016
|
if ("driver" in credentials && credentials.driver === "d1") {
|
|
2017
|
-
const { connectToD1 } = await Promise.resolve().then(() => require("./connections-
|
|
2017
|
+
const { connectToD1 } = await Promise.resolve().then(() => require("./connections-BUhsilZD.js"));
|
|
2018
2018
|
const sqliteDB = await connectToD1(credentials.binding);
|
|
2019
2019
|
return {
|
|
2020
2020
|
dbHash: (0, crypto$1.createHash)("sha256").update("d1://binding").digest("hex"),
|
|
@@ -2029,7 +2029,7 @@ const drizzleForSQLite = async (credentials, sqliteSchema, relations, schemaFile
|
|
|
2029
2029
|
schemaFiles
|
|
2030
2030
|
};
|
|
2031
2031
|
}
|
|
2032
|
-
const { connectToSQLite } = await Promise.resolve().then(() => require("./connections-
|
|
2032
|
+
const { connectToSQLite } = await Promise.resolve().then(() => require("./connections-BUhsilZD.js"));
|
|
2033
2033
|
const sqliteDB = await connectToSQLite(credentials);
|
|
2034
2034
|
let dbUrl;
|
|
2035
2035
|
if ("driver" in credentials) {
|