drizzle-kit 0.31.9 → 0.31.10
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.js +237 -182
- package/api.mjs +238 -187
- package/bin.cjs +3989 -5706
- package/package.json +3 -4
- package/utils.js +71 -39
- package/utils.mjs +71 -39
package/api.js
CHANGED
|
@@ -2884,28 +2884,26 @@ var require_glob = __commonJS({
|
|
|
2884
2884
|
}
|
|
2885
2885
|
});
|
|
2886
2886
|
|
|
2887
|
-
// ../node_modules/.pnpm/hanji@0.0.
|
|
2887
|
+
// ../node_modules/.pnpm/hanji@0.0.8/node_modules/hanji/readline.js
|
|
2888
2888
|
var require_readline = __commonJS({
|
|
2889
|
-
"../node_modules/.pnpm/hanji@0.0.
|
|
2889
|
+
"../node_modules/.pnpm/hanji@0.0.8/node_modules/hanji/readline.js"(exports2) {
|
|
2890
2890
|
"use strict";
|
|
2891
|
+
var __importDefault = exports2 && exports2.__importDefault || function(mod) {
|
|
2892
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
2893
|
+
};
|
|
2891
2894
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2892
|
-
exports2.
|
|
2893
|
-
var
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2895
|
+
exports2.createClosable = exports2.stdout = exports2.stdin = void 0;
|
|
2896
|
+
var readline_1 = __importDefault(require("readline"));
|
|
2897
|
+
exports2.stdin = process.stdin;
|
|
2898
|
+
exports2.stdout = process.stdout;
|
|
2899
|
+
readline_1.default.emitKeypressEvents(exports2.stdin);
|
|
2900
|
+
var createClosable = () => {
|
|
2901
|
+
return readline_1.default.createInterface({
|
|
2902
|
+
input: exports2.stdin,
|
|
2899
2903
|
escapeCodeTimeout: 50
|
|
2900
2904
|
});
|
|
2901
|
-
readline.emitKeypressEvents(stdin, rl);
|
|
2902
|
-
return {
|
|
2903
|
-
stdin,
|
|
2904
|
-
stdout,
|
|
2905
|
-
closable: rl
|
|
2906
|
-
};
|
|
2907
2905
|
};
|
|
2908
|
-
exports2.
|
|
2906
|
+
exports2.createClosable = createClosable;
|
|
2909
2907
|
}
|
|
2910
2908
|
});
|
|
2911
2909
|
|
|
@@ -2965,12 +2963,12 @@ var require_src = __commonJS({
|
|
|
2965
2963
|
}
|
|
2966
2964
|
});
|
|
2967
2965
|
|
|
2968
|
-
// ../node_modules/.pnpm/hanji@0.0.
|
|
2966
|
+
// ../node_modules/.pnpm/hanji@0.0.8/node_modules/hanji/utils.js
|
|
2969
2967
|
var require_utils = __commonJS({
|
|
2970
|
-
"../node_modules/.pnpm/hanji@0.0.
|
|
2968
|
+
"../node_modules/.pnpm/hanji@0.0.8/node_modules/hanji/utils.js"(exports2) {
|
|
2971
2969
|
"use strict";
|
|
2972
2970
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2973
|
-
exports2.clear = void 0;
|
|
2971
|
+
exports2.clear = exports2.stringWidth = exports2.fallbackStringWidth = exports2.stripAnsi = exports2.strip = void 0;
|
|
2974
2972
|
var sisteransi_1 = require_src();
|
|
2975
2973
|
var strip = (str) => {
|
|
2976
2974
|
const pattern = [
|
|
@@ -2980,14 +2978,35 @@ var require_utils = __commonJS({
|
|
|
2980
2978
|
const RGX = new RegExp(pattern, "g");
|
|
2981
2979
|
return typeof str === "string" ? str.replace(RGX, "") : str;
|
|
2982
2980
|
};
|
|
2983
|
-
|
|
2981
|
+
exports2.strip = strip;
|
|
2982
|
+
var stripAnsi = (str) => {
|
|
2983
|
+
if (typeof Bun !== "undefined" && Bun.stripANSI) {
|
|
2984
|
+
return Bun.stripANSI(str);
|
|
2985
|
+
}
|
|
2986
|
+
return (0, exports2.strip)(str);
|
|
2987
|
+
};
|
|
2988
|
+
exports2.stripAnsi = stripAnsi;
|
|
2989
|
+
var fallbackStringWidth = (str) => {
|
|
2990
|
+
let len = 0;
|
|
2991
|
+
const stripped = (0, exports2.stripAnsi)(str);
|
|
2992
|
+
for (const _3 of stripped)
|
|
2993
|
+
len++;
|
|
2994
|
+
return len;
|
|
2995
|
+
};
|
|
2996
|
+
exports2.fallbackStringWidth = fallbackStringWidth;
|
|
2997
|
+
var stringWidth = (str) => {
|
|
2998
|
+
if (typeof Bun !== "undefined" && Bun.stringWidth)
|
|
2999
|
+
return Bun.stringWidth(str);
|
|
3000
|
+
return (0, exports2.fallbackStringWidth)(str);
|
|
3001
|
+
};
|
|
3002
|
+
exports2.stringWidth = stringWidth;
|
|
2984
3003
|
var clear = function(prompt, perLine) {
|
|
2985
3004
|
if (!perLine)
|
|
2986
3005
|
return sisteransi_1.erase.line + sisteransi_1.cursor.to(0);
|
|
2987
3006
|
let rows = 0;
|
|
2988
3007
|
const lines = prompt.split(/\r?\n/);
|
|
2989
3008
|
for (let line of lines) {
|
|
2990
|
-
rows += 1 + Math.floor(Math.max(stringWidth(line) - 1, 0) / perLine);
|
|
3009
|
+
rows += 1 + Math.floor(Math.max((0, exports2.stringWidth)(line) - 1, 0) / perLine);
|
|
2991
3010
|
}
|
|
2992
3011
|
return sisteransi_1.erase.lines(rows);
|
|
2993
3012
|
};
|
|
@@ -3144,9 +3163,9 @@ var require_lodash = __commonJS({
|
|
|
3144
3163
|
}
|
|
3145
3164
|
});
|
|
3146
3165
|
|
|
3147
|
-
// ../node_modules/.pnpm/hanji@0.0.
|
|
3166
|
+
// ../node_modules/.pnpm/hanji@0.0.8/node_modules/hanji/index.js
|
|
3148
3167
|
var require_hanji = __commonJS({
|
|
3149
|
-
"../node_modules/.pnpm/hanji@0.0.
|
|
3168
|
+
"../node_modules/.pnpm/hanji@0.0.8/node_modules/hanji/index.js"(exports2) {
|
|
3150
3169
|
"use strict";
|
|
3151
3170
|
var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
3152
3171
|
function adopt(value) {
|
|
@@ -3179,7 +3198,10 @@ var require_hanji = __commonJS({
|
|
|
3179
3198
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
3180
3199
|
};
|
|
3181
3200
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3182
|
-
exports2.
|
|
3201
|
+
exports2.TaskTerminal = exports2.TaskView = exports2.Terminal = exports2.deferred = exports2.SelectState = exports2.Prompt = void 0;
|
|
3202
|
+
exports2.render = render7;
|
|
3203
|
+
exports2.renderWithTask = renderWithTask5;
|
|
3204
|
+
exports2.onTerminate = onTerminate;
|
|
3183
3205
|
var readline_1 = require_readline();
|
|
3184
3206
|
var sisteransi_1 = require_src();
|
|
3185
3207
|
var utils_1 = require_utils();
|
|
@@ -3377,36 +3399,46 @@ var require_hanji = __commonJS({
|
|
|
3377
3399
|
const clearPrefix = this.text ? (0, utils_1.clear)(this.text, this.stdout.columns) : "";
|
|
3378
3400
|
this.stdout.write(`${clearPrefix}${string}`);
|
|
3379
3401
|
}
|
|
3402
|
+
reject(err2) {
|
|
3403
|
+
const string = this.view.render("rejected", err2);
|
|
3404
|
+
this.view.detach(this);
|
|
3405
|
+
const clearPrefix = this.text ? (0, utils_1.clear)(this.text, this.stdout.columns) : "";
|
|
3406
|
+
this.stdout.write(`${clearPrefix}${string}`);
|
|
3407
|
+
}
|
|
3380
3408
|
};
|
|
3381
3409
|
exports2.TaskTerminal = TaskTerminal;
|
|
3382
3410
|
function render7(view5) {
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
const terminal = new Terminal(view5, stdin, stdout, closable);
|
|
3386
|
-
terminal.requestLayout();
|
|
3387
|
-
return terminal.result();
|
|
3388
|
-
}
|
|
3389
|
-
stdout.write(`${view5}
|
|
3411
|
+
if (typeof view5 === "string") {
|
|
3412
|
+
process.stdout.write(`${view5}
|
|
3390
3413
|
`);
|
|
3391
|
-
|
|
3392
|
-
|
|
3414
|
+
return;
|
|
3415
|
+
}
|
|
3416
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
3417
|
+
return Promise.reject(new Error("Interactive prompts require a TTY terminal (process.stdin.isTTY or process.stdout.isTTY is false). This can happen when running in CI, piped input, or non-interactive shells."));
|
|
3418
|
+
}
|
|
3419
|
+
const closable = (0, readline_1.createClosable)();
|
|
3420
|
+
const terminal = new Terminal(view5, readline_1.stdin, readline_1.stdout, closable);
|
|
3421
|
+
terminal.requestLayout();
|
|
3422
|
+
return terminal.result();
|
|
3393
3423
|
}
|
|
3394
|
-
exports2.render = render7;
|
|
3395
3424
|
function renderWithTask5(view5, task) {
|
|
3396
3425
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3397
3426
|
const terminal = new TaskTerminal(view5, process.stdout);
|
|
3398
3427
|
terminal.requestLayout();
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3428
|
+
try {
|
|
3429
|
+
const result = yield task;
|
|
3430
|
+
terminal.clear();
|
|
3431
|
+
return result;
|
|
3432
|
+
} catch (err2) {
|
|
3433
|
+
terminal.reject(err2);
|
|
3434
|
+
process.exit(1);
|
|
3435
|
+
}
|
|
3402
3436
|
});
|
|
3403
3437
|
}
|
|
3404
|
-
exports2.renderWithTask = renderWithTask5;
|
|
3405
3438
|
var terminateHandler;
|
|
3406
3439
|
function onTerminate(callback) {
|
|
3407
3440
|
terminateHandler = callback;
|
|
3408
3441
|
}
|
|
3409
|
-
exports2.onTerminate = onTerminate;
|
|
3410
3442
|
}
|
|
3411
3443
|
});
|
|
3412
3444
|
|
|
@@ -9568,7 +9600,7 @@ Is ${source_default.bold.blue(
|
|
|
9568
9600
|
const title = isRenamed ? `${it.from.name} \u203A ${it.to.name}`.padEnd(labelLength, " ") : it.name.padEnd(labelLength, " ");
|
|
9569
9601
|
const label = isRenamed ? `${source_default.yellow("~")} ${title} ${source_default.gray("rename column")}` : `${source_default.green("+")} ${title} ${source_default.gray("create column")}`;
|
|
9570
9602
|
text += isSelected ? `${selectedPrefix}${label}` : ` ${label}`;
|
|
9571
|
-
text += idx
|
|
9603
|
+
text += idx !== this.data.items.length - 1 ? "\n" : "";
|
|
9572
9604
|
});
|
|
9573
9605
|
return text;
|
|
9574
9606
|
}
|
|
@@ -9587,7 +9619,6 @@ Is ${source_default.bold.blue(
|
|
|
9587
9619
|
this.on("attach", (terminal) => terminal.toggleCursor("hide"));
|
|
9588
9620
|
this.state = new import_hanji.SelectState(data);
|
|
9589
9621
|
this.state.bind(this);
|
|
9590
|
-
this.base = base;
|
|
9591
9622
|
}
|
|
9592
9623
|
render(status) {
|
|
9593
9624
|
if (status === "submitted" || status === "aborted") {
|
|
@@ -9618,7 +9649,7 @@ Is ${source_default.bold.blue(key)} ${this.entityType} created or renamed from a
|
|
|
9618
9649
|
const title = isRenamed ? `${it.from.name} \u203A ${it.to.name}`.padEnd(labelLength, " ") : it.name.padEnd(labelLength, " ");
|
|
9619
9650
|
const label = isRenamed ? `${source_default.yellow("~")} ${title} ${source_default.gray(`rename ${entityType}`)}` : `${source_default.green("+")} ${title} ${source_default.gray(`create ${entityType}`)}`;
|
|
9620
9651
|
text += isSelected ? `${selectedPrefix}${label}` : ` ${label}`;
|
|
9621
|
-
text += idx
|
|
9652
|
+
text += idx !== this.state.items.length - 1 ? "\n" : "";
|
|
9622
9653
|
});
|
|
9623
9654
|
return text;
|
|
9624
9655
|
}
|
|
@@ -9665,7 +9696,7 @@ Is ${source_default.bold.blue(key)} ${this.entityType} created or renamed from a
|
|
|
9665
9696
|
const title = isRenamed ? `${tableKey(it.from)} \u203A ${tableKey(it.to)}`.padEnd(labelLength, " ") : tableKey(it).padEnd(labelLength, " ");
|
|
9666
9697
|
const label = isRenamed ? `${source_default.yellow("~")} ${title} ${source_default.gray(`rename ${entityType}`)}` : `${source_default.green("+")} ${title} ${source_default.gray(`create ${entityType}`)}`;
|
|
9667
9698
|
text += isSelected ? `${selectedPrefix}${label}` : ` ${label}`;
|
|
9668
|
-
text += idx
|
|
9699
|
+
text += idx !== this.state.items.length - 1 ? "\n" : "";
|
|
9669
9700
|
});
|
|
9670
9701
|
return text;
|
|
9671
9702
|
}
|
|
@@ -9709,7 +9740,7 @@ Is ${source_default.bold.blue(
|
|
|
9709
9740
|
const title = isRenamed ? `${it.from.name} \u203A ${it.to.name}`.padEnd(labelLength, " ") : it.name.padEnd(labelLength, " ");
|
|
9710
9741
|
const label = isRenamed ? `${source_default.yellow("~")} ${title} ${source_default.gray("rename schema")}` : `${source_default.green("+")} ${title} ${source_default.gray("create schema")}`;
|
|
9711
9742
|
text += isSelected ? `${selectedPrefix}${label}` : ` ${label}`;
|
|
9712
|
-
text += idx
|
|
9743
|
+
text += idx !== this.state.items.length - 1 ? "\n" : "";
|
|
9713
9744
|
});
|
|
9714
9745
|
return text;
|
|
9715
9746
|
}
|
|
@@ -9746,7 +9777,7 @@ Is ${source_default.bold.blue(
|
|
|
9746
9777
|
this.on("detach", () => clearInterval(this.timeout));
|
|
9747
9778
|
}
|
|
9748
9779
|
render(status) {
|
|
9749
|
-
if (status === "pending") {
|
|
9780
|
+
if (status === "pending" || status === "rejected") {
|
|
9750
9781
|
const spin = this.spinner.value();
|
|
9751
9782
|
return `[${spin}] ${this.progressText}
|
|
9752
9783
|
`;
|
|
@@ -25671,7 +25702,7 @@ var init_es5 = __esm({
|
|
|
25671
25702
|
});
|
|
25672
25703
|
|
|
25673
25704
|
// src/cli/commands/utils.ts
|
|
25674
|
-
var import_hanji7, assertES5, safeRegister, migrateConfig;
|
|
25705
|
+
var import_hanji7, assertES5, InMemoryMutex, registerMutex, tsxRegistered, ensureTsxRegistered, safeRegister, migrateConfig;
|
|
25675
25706
|
var init_utils3 = __esm({
|
|
25676
25707
|
"src/cli/commands/utils.ts"() {
|
|
25677
25708
|
"use strict";
|
|
@@ -25692,9 +25723,9 @@ var init_utils3 = __esm({
|
|
|
25692
25723
|
init_sqlite();
|
|
25693
25724
|
init_studio();
|
|
25694
25725
|
init_views();
|
|
25695
|
-
assertES5 = async (
|
|
25726
|
+
assertES5 = async () => {
|
|
25696
25727
|
try {
|
|
25697
|
-
init_es5();
|
|
25728
|
+
await Promise.resolve().then(() => (init_es5(), es5_exports));
|
|
25698
25729
|
} catch (e6) {
|
|
25699
25730
|
if ("errors" in e6 && Array.isArray(e6.errors) && e6.errors.length > 0) {
|
|
25700
25731
|
const es5Error = e6.errors.filter((it) => it.text?.includes(`("es5") is not supported yet`)).length > 0;
|
|
@@ -25711,22 +25742,46 @@ var init_utils3 = __esm({
|
|
|
25711
25742
|
process.exit(1);
|
|
25712
25743
|
}
|
|
25713
25744
|
};
|
|
25714
|
-
|
|
25715
|
-
|
|
25716
|
-
|
|
25717
|
-
|
|
25718
|
-
|
|
25719
|
-
|
|
25720
|
-
|
|
25745
|
+
InMemoryMutex = class {
|
|
25746
|
+
constructor() {
|
|
25747
|
+
this.lockPromise = null;
|
|
25748
|
+
}
|
|
25749
|
+
async withLock(fn) {
|
|
25750
|
+
while (this.lockPromise) {
|
|
25751
|
+
await this.lockPromise;
|
|
25752
|
+
}
|
|
25753
|
+
let resolveLock;
|
|
25754
|
+
this.lockPromise = new Promise((resolve) => {
|
|
25755
|
+
resolveLock = resolve;
|
|
25721
25756
|
});
|
|
25722
|
-
|
|
25723
|
-
|
|
25724
|
-
|
|
25725
|
-
|
|
25726
|
-
|
|
25757
|
+
try {
|
|
25758
|
+
return await fn();
|
|
25759
|
+
} finally {
|
|
25760
|
+
this.lockPromise = null;
|
|
25761
|
+
resolveLock();
|
|
25762
|
+
}
|
|
25727
25763
|
}
|
|
25728
|
-
|
|
25729
|
-
|
|
25764
|
+
};
|
|
25765
|
+
registerMutex = new InMemoryMutex();
|
|
25766
|
+
tsxRegistered = false;
|
|
25767
|
+
ensureTsxRegistered = () => {
|
|
25768
|
+
if (tsxRegistered) return;
|
|
25769
|
+
const isBun = typeof globalThis.Bun !== "undefined";
|
|
25770
|
+
const isDeno = typeof globalThis.Deno !== "undefined";
|
|
25771
|
+
if (isBun || isDeno) {
|
|
25772
|
+
tsxRegistered = true;
|
|
25773
|
+
return;
|
|
25774
|
+
}
|
|
25775
|
+
const tsx = require("tsx/cjs/api");
|
|
25776
|
+
tsx.register();
|
|
25777
|
+
tsxRegistered = true;
|
|
25778
|
+
};
|
|
25779
|
+
safeRegister = async (fn) => {
|
|
25780
|
+
return registerMutex.withLock(async () => {
|
|
25781
|
+
ensureTsxRegistered();
|
|
25782
|
+
await assertES5();
|
|
25783
|
+
return fn();
|
|
25784
|
+
});
|
|
25730
25785
|
};
|
|
25731
25786
|
migrateConfig = objectType({
|
|
25732
25787
|
dialect: dialect4,
|
|
@@ -35203,9 +35258,9 @@ var init_src = __esm({
|
|
|
35203
35258
|
}
|
|
35204
35259
|
});
|
|
35205
35260
|
|
|
35206
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
35261
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/constants.js
|
|
35207
35262
|
var require_constants = __commonJS({
|
|
35208
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
35263
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/constants.js"(exports2, module2) {
|
|
35209
35264
|
"use strict";
|
|
35210
35265
|
var BINARY_TYPES = ["nodebuffer", "arraybuffer", "fragments"];
|
|
35211
35266
|
var hasBlob = typeof Blob !== "undefined";
|
|
@@ -35439,9 +35494,9 @@ var require_bufferutil = __commonJS({
|
|
|
35439
35494
|
}
|
|
35440
35495
|
});
|
|
35441
35496
|
|
|
35442
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
35497
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/buffer-util.js
|
|
35443
35498
|
var require_buffer_util = __commonJS({
|
|
35444
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
35499
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/buffer-util.js"(exports2, module2) {
|
|
35445
35500
|
"use strict";
|
|
35446
35501
|
var { EMPTY_BUFFER } = require_constants();
|
|
35447
35502
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -35514,9 +35569,9 @@ var require_buffer_util = __commonJS({
|
|
|
35514
35569
|
}
|
|
35515
35570
|
});
|
|
35516
35571
|
|
|
35517
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
35572
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/limiter.js
|
|
35518
35573
|
var require_limiter = __commonJS({
|
|
35519
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
35574
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/limiter.js"(exports2, module2) {
|
|
35520
35575
|
"use strict";
|
|
35521
35576
|
var kDone = Symbol("kDone");
|
|
35522
35577
|
var kRun = Symbol("kRun");
|
|
@@ -35564,9 +35619,9 @@ var require_limiter = __commonJS({
|
|
|
35564
35619
|
}
|
|
35565
35620
|
});
|
|
35566
35621
|
|
|
35567
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
35622
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/permessage-deflate.js
|
|
35568
35623
|
var require_permessage_deflate = __commonJS({
|
|
35569
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
35624
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/permessage-deflate.js"(exports2, module2) {
|
|
35570
35625
|
"use strict";
|
|
35571
35626
|
var zlib2 = require("zlib");
|
|
35572
35627
|
var bufferUtil = require_buffer_util();
|
|
@@ -35996,9 +36051,9 @@ var require_utf_8_validate = __commonJS({
|
|
|
35996
36051
|
}
|
|
35997
36052
|
});
|
|
35998
36053
|
|
|
35999
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
36054
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/validation.js
|
|
36000
36055
|
var require_validation = __commonJS({
|
|
36001
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
36056
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/validation.js"(exports2, module2) {
|
|
36002
36057
|
"use strict";
|
|
36003
36058
|
var { isUtf8 } = require("buffer");
|
|
36004
36059
|
var { hasBlob } = require_constants();
|
|
@@ -36197,9 +36252,9 @@ var require_validation = __commonJS({
|
|
|
36197
36252
|
}
|
|
36198
36253
|
});
|
|
36199
36254
|
|
|
36200
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
36255
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/receiver.js
|
|
36201
36256
|
var require_receiver = __commonJS({
|
|
36202
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
36257
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/receiver.js"(exports2, module2) {
|
|
36203
36258
|
"use strict";
|
|
36204
36259
|
var { Writable: Writable2 } = require("stream");
|
|
36205
36260
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -36789,9 +36844,9 @@ var require_receiver = __commonJS({
|
|
|
36789
36844
|
}
|
|
36790
36845
|
});
|
|
36791
36846
|
|
|
36792
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
36847
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/sender.js
|
|
36793
36848
|
var require_sender = __commonJS({
|
|
36794
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
36849
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/sender.js"(exports2, module2) {
|
|
36795
36850
|
"use strict";
|
|
36796
36851
|
var { Duplex } = require("stream");
|
|
36797
36852
|
var { randomFillSync } = require("crypto");
|
|
@@ -37277,9 +37332,9 @@ var require_sender = __commonJS({
|
|
|
37277
37332
|
}
|
|
37278
37333
|
});
|
|
37279
37334
|
|
|
37280
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
37335
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/event-target.js
|
|
37281
37336
|
var require_event_target = __commonJS({
|
|
37282
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
37337
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/event-target.js"(exports2, module2) {
|
|
37283
37338
|
"use strict";
|
|
37284
37339
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
37285
37340
|
var kCode = Symbol("kCode");
|
|
@@ -37506,9 +37561,9 @@ var require_event_target = __commonJS({
|
|
|
37506
37561
|
}
|
|
37507
37562
|
});
|
|
37508
37563
|
|
|
37509
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
37564
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/extension.js
|
|
37510
37565
|
var require_extension = __commonJS({
|
|
37511
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
37566
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/extension.js"(exports2, module2) {
|
|
37512
37567
|
"use strict";
|
|
37513
37568
|
var { tokenChars } = require_validation();
|
|
37514
37569
|
function push(dest, name, elem) {
|
|
@@ -37659,9 +37714,9 @@ var require_extension = __commonJS({
|
|
|
37659
37714
|
}
|
|
37660
37715
|
});
|
|
37661
37716
|
|
|
37662
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
37717
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/websocket.js
|
|
37663
37718
|
var require_websocket = __commonJS({
|
|
37664
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
37719
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/websocket.js"(exports2, module2) {
|
|
37665
37720
|
"use strict";
|
|
37666
37721
|
var EventEmitter = require("events");
|
|
37667
37722
|
var https2 = require("https");
|
|
@@ -38542,9 +38597,9 @@ var require_websocket = __commonJS({
|
|
|
38542
38597
|
}
|
|
38543
38598
|
});
|
|
38544
38599
|
|
|
38545
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
38600
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/stream.js
|
|
38546
38601
|
var require_stream = __commonJS({
|
|
38547
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
38602
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/stream.js"(exports2, module2) {
|
|
38548
38603
|
"use strict";
|
|
38549
38604
|
var WebSocket2 = require_websocket();
|
|
38550
38605
|
var { Duplex } = require("stream");
|
|
@@ -38640,9 +38695,9 @@ var require_stream = __commonJS({
|
|
|
38640
38695
|
}
|
|
38641
38696
|
});
|
|
38642
38697
|
|
|
38643
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
38698
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/subprotocol.js
|
|
38644
38699
|
var require_subprotocol = __commonJS({
|
|
38645
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
38700
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/subprotocol.js"(exports2, module2) {
|
|
38646
38701
|
"use strict";
|
|
38647
38702
|
var { tokenChars } = require_validation();
|
|
38648
38703
|
function parse4(header) {
|
|
@@ -38685,9 +38740,9 @@ var require_subprotocol = __commonJS({
|
|
|
38685
38740
|
}
|
|
38686
38741
|
});
|
|
38687
38742
|
|
|
38688
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
38743
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/websocket-server.js
|
|
38689
38744
|
var require_websocket_server = __commonJS({
|
|
38690
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
38745
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/lib/websocket-server.js"(exports2, module2) {
|
|
38691
38746
|
"use strict";
|
|
38692
38747
|
var EventEmitter = require("events");
|
|
38693
38748
|
var http3 = require("http");
|
|
@@ -39072,10 +39127,10 @@ var require_websocket_server = __commonJS({
|
|
|
39072
39127
|
}
|
|
39073
39128
|
});
|
|
39074
39129
|
|
|
39075
|
-
// ../node_modules/.pnpm/ws@8.18.
|
|
39130
|
+
// ../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/wrapper.mjs
|
|
39076
39131
|
var import_stream2, import_receiver, import_sender, import_websocket, import_websocket_server, wrapper_default;
|
|
39077
39132
|
var init_wrapper = __esm({
|
|
39078
|
-
"../node_modules/.pnpm/ws@8.18.
|
|
39133
|
+
"../node_modules/.pnpm/ws@8.18.2_bufferutil@4.0.8_utf-8-validate@6.0.3/node_modules/ws/wrapper.mjs"() {
|
|
39079
39134
|
"use strict";
|
|
39080
39135
|
import_stream2 = __toESM(require_stream(), 1);
|
|
39081
39136
|
import_receiver = __toESM(require_receiver(), 1);
|
|
@@ -73230,23 +73285,23 @@ var init_studio2 = __esm({
|
|
|
73230
73285
|
name: it.split("/").pop() || `schema${index6}.ts`,
|
|
73231
73286
|
content: import_fs8.default.readFileSync(it, "utf-8")
|
|
73232
73287
|
}));
|
|
73233
|
-
|
|
73234
|
-
|
|
73235
|
-
|
|
73236
|
-
|
|
73237
|
-
|
|
73238
|
-
|
|
73239
|
-
|
|
73240
|
-
|
|
73241
|
-
|
|
73242
|
-
|
|
73243
|
-
|
|
73244
|
-
|
|
73245
|
-
|
|
73246
|
-
|
|
73247
|
-
|
|
73248
|
-
|
|
73249
|
-
|
|
73288
|
+
await safeRegister(async () => {
|
|
73289
|
+
for (let i6 = 0; i6 < imports.length; i6++) {
|
|
73290
|
+
const it = imports[i6];
|
|
73291
|
+
const i0 = require(`${it}`);
|
|
73292
|
+
const i0values = Object.entries(i0);
|
|
73293
|
+
i0values.forEach(([k5, t6]) => {
|
|
73294
|
+
if ((0, import_drizzle_orm6.is)(t6, import_pg_core3.PgTable)) {
|
|
73295
|
+
const schema6 = (0, import_pg_core3.getTableConfig)(t6).schema || "public";
|
|
73296
|
+
pgSchema2[schema6] = pgSchema2[schema6] || {};
|
|
73297
|
+
pgSchema2[schema6][k5] = t6;
|
|
73298
|
+
}
|
|
73299
|
+
if ((0, import_drizzle_orm6.is)(t6, import_relations2.Relations)) {
|
|
73300
|
+
relations[k5] = t6;
|
|
73301
|
+
}
|
|
73302
|
+
});
|
|
73303
|
+
}
|
|
73304
|
+
});
|
|
73250
73305
|
return { schema: pgSchema2, relations, files };
|
|
73251
73306
|
};
|
|
73252
73307
|
prepareMySqlSchema = async (path3) => {
|
|
@@ -73260,22 +73315,22 @@ var init_studio2 = __esm({
|
|
|
73260
73315
|
name: it.split("/").pop() || `schema${index6}.ts`,
|
|
73261
73316
|
content: import_fs8.default.readFileSync(it, "utf-8")
|
|
73262
73317
|
}));
|
|
73263
|
-
|
|
73264
|
-
|
|
73265
|
-
|
|
73266
|
-
|
|
73267
|
-
|
|
73268
|
-
|
|
73269
|
-
|
|
73270
|
-
|
|
73271
|
-
|
|
73272
|
-
|
|
73273
|
-
|
|
73274
|
-
|
|
73275
|
-
|
|
73276
|
-
|
|
73277
|
-
|
|
73278
|
-
|
|
73318
|
+
await safeRegister(async () => {
|
|
73319
|
+
for (let i6 = 0; i6 < imports.length; i6++) {
|
|
73320
|
+
const it = imports[i6];
|
|
73321
|
+
const i0 = require(`${it}`);
|
|
73322
|
+
const i0values = Object.entries(i0);
|
|
73323
|
+
i0values.forEach(([k5, t6]) => {
|
|
73324
|
+
if ((0, import_drizzle_orm6.is)(t6, import_mysql_core2.MySqlTable)) {
|
|
73325
|
+
const schema6 = (0, import_mysql_core2.getTableConfig)(t6).schema || "public";
|
|
73326
|
+
mysqlSchema3[schema6][k5] = t6;
|
|
73327
|
+
}
|
|
73328
|
+
if ((0, import_drizzle_orm6.is)(t6, import_relations2.Relations)) {
|
|
73329
|
+
relations[k5] = t6;
|
|
73330
|
+
}
|
|
73331
|
+
});
|
|
73332
|
+
}
|
|
73333
|
+
});
|
|
73279
73334
|
return { schema: mysqlSchema3, relations, files };
|
|
73280
73335
|
};
|
|
73281
73336
|
prepareSQLiteSchema = async (path3) => {
|
|
@@ -73289,22 +73344,22 @@ var init_studio2 = __esm({
|
|
|
73289
73344
|
name: it.split("/").pop() || `schema${index6}.ts`,
|
|
73290
73345
|
content: import_fs8.default.readFileSync(it, "utf-8")
|
|
73291
73346
|
}));
|
|
73292
|
-
|
|
73293
|
-
|
|
73294
|
-
|
|
73295
|
-
|
|
73296
|
-
|
|
73297
|
-
|
|
73298
|
-
|
|
73299
|
-
|
|
73300
|
-
|
|
73301
|
-
|
|
73302
|
-
|
|
73303
|
-
|
|
73304
|
-
|
|
73305
|
-
|
|
73306
|
-
|
|
73307
|
-
|
|
73347
|
+
await safeRegister(async () => {
|
|
73348
|
+
for (let i6 = 0; i6 < imports.length; i6++) {
|
|
73349
|
+
const it = imports[i6];
|
|
73350
|
+
const i0 = require(`${it}`);
|
|
73351
|
+
const i0values = Object.entries(i0);
|
|
73352
|
+
i0values.forEach(([k5, t6]) => {
|
|
73353
|
+
if ((0, import_drizzle_orm6.is)(t6, import_sqlite_core2.SQLiteTable)) {
|
|
73354
|
+
const schema6 = "public";
|
|
73355
|
+
sqliteSchema2[schema6][k5] = t6;
|
|
73356
|
+
}
|
|
73357
|
+
if ((0, import_drizzle_orm6.is)(t6, import_relations2.Relations)) {
|
|
73358
|
+
relations[k5] = t6;
|
|
73359
|
+
}
|
|
73360
|
+
});
|
|
73361
|
+
}
|
|
73362
|
+
});
|
|
73308
73363
|
return { schema: sqliteSchema2, relations, files };
|
|
73309
73364
|
};
|
|
73310
73365
|
prepareSingleStoreSchema = async (path3) => {
|
|
@@ -73318,22 +73373,22 @@ var init_studio2 = __esm({
|
|
|
73318
73373
|
name: it.split("/").pop() || `schema${index6}.ts`,
|
|
73319
73374
|
content: import_fs8.default.readFileSync(it, "utf-8")
|
|
73320
73375
|
}));
|
|
73321
|
-
|
|
73322
|
-
|
|
73323
|
-
|
|
73324
|
-
|
|
73325
|
-
|
|
73326
|
-
|
|
73327
|
-
|
|
73328
|
-
|
|
73329
|
-
|
|
73330
|
-
|
|
73331
|
-
|
|
73332
|
-
|
|
73333
|
-
|
|
73334
|
-
|
|
73335
|
-
|
|
73336
|
-
|
|
73376
|
+
await safeRegister(async () => {
|
|
73377
|
+
for (let i6 = 0; i6 < imports.length; i6++) {
|
|
73378
|
+
const it = imports[i6];
|
|
73379
|
+
const i0 = require(`${it}`);
|
|
73380
|
+
const i0values = Object.entries(i0);
|
|
73381
|
+
i0values.forEach(([k5, t6]) => {
|
|
73382
|
+
if ((0, import_drizzle_orm6.is)(t6, import_singlestore_core2.SingleStoreTable)) {
|
|
73383
|
+
const schema6 = (0, import_singlestore_core2.getTableConfig)(t6).schema || "public";
|
|
73384
|
+
singlestoreSchema2[schema6][k5] = t6;
|
|
73385
|
+
}
|
|
73386
|
+
if ((0, import_drizzle_orm6.is)(t6, import_relations2.Relations)) {
|
|
73387
|
+
relations[k5] = t6;
|
|
73388
|
+
}
|
|
73389
|
+
});
|
|
73390
|
+
}
|
|
73391
|
+
});
|
|
73337
73392
|
return { schema: singlestoreSchema2, relations, files };
|
|
73338
73393
|
};
|
|
73339
73394
|
getCustomDefaults = (schema6, casing2) => {
|
|
@@ -73561,7 +73616,7 @@ var init_studio2 = __esm({
|
|
|
73561
73616
|
refSchema: refSchema || "public",
|
|
73562
73617
|
refColumns
|
|
73563
73618
|
};
|
|
73564
|
-
} catch
|
|
73619
|
+
} catch {
|
|
73565
73620
|
throw new Error(
|
|
73566
73621
|
`Invalid relation "${relation.fieldName}" for table "${it.schema ? `${it.schema}.${it.dbName}` : it.dbName}"`
|
|
73567
73622
|
);
|
|
@@ -73798,15 +73853,15 @@ var init_sqliteImports = __esm({
|
|
|
73798
73853
|
prepareFromSqliteImports = async (imports) => {
|
|
73799
73854
|
const tables = [];
|
|
73800
73855
|
const views = [];
|
|
73801
|
-
|
|
73802
|
-
|
|
73803
|
-
|
|
73804
|
-
|
|
73805
|
-
|
|
73806
|
-
|
|
73807
|
-
|
|
73808
|
-
|
|
73809
|
-
|
|
73856
|
+
await safeRegister(async () => {
|
|
73857
|
+
for (let i6 = 0; i6 < imports.length; i6++) {
|
|
73858
|
+
const it = imports[i6];
|
|
73859
|
+
const i0 = require(`${it}`);
|
|
73860
|
+
const prepared = prepareFromExports2(i0);
|
|
73861
|
+
tables.push(...prepared.tables);
|
|
73862
|
+
views.push(...prepared.views);
|
|
73863
|
+
}
|
|
73864
|
+
});
|
|
73810
73865
|
return { tables: Array.from(new Set(tables)), views };
|
|
73811
73866
|
};
|
|
73812
73867
|
}
|
|
@@ -73842,15 +73897,15 @@ var init_mysqlImports = __esm({
|
|
|
73842
73897
|
prepareFromMySqlImports = async (imports) => {
|
|
73843
73898
|
const tables = [];
|
|
73844
73899
|
const views = [];
|
|
73845
|
-
|
|
73846
|
-
|
|
73847
|
-
|
|
73848
|
-
|
|
73849
|
-
|
|
73850
|
-
|
|
73851
|
-
|
|
73852
|
-
|
|
73853
|
-
|
|
73900
|
+
await safeRegister(async () => {
|
|
73901
|
+
for (let i6 = 0; i6 < imports.length; i6++) {
|
|
73902
|
+
const it = imports[i6];
|
|
73903
|
+
const i0 = require(`${it}`);
|
|
73904
|
+
const prepared = prepareFromExports3(i0);
|
|
73905
|
+
tables.push(...prepared.tables);
|
|
73906
|
+
views.push(...prepared.views);
|
|
73907
|
+
}
|
|
73908
|
+
});
|
|
73854
73909
|
return { tables: Array.from(new Set(tables)), views };
|
|
73855
73910
|
};
|
|
73856
73911
|
}
|
|
@@ -74187,14 +74242,14 @@ var init_singlestoreImports = __esm({
|
|
|
74187
74242
|
};
|
|
74188
74243
|
prepareFromSingleStoreImports = async (imports) => {
|
|
74189
74244
|
const tables = [];
|
|
74190
|
-
|
|
74191
|
-
|
|
74192
|
-
|
|
74193
|
-
|
|
74194
|
-
|
|
74195
|
-
|
|
74196
|
-
|
|
74197
|
-
|
|
74245
|
+
await safeRegister(async () => {
|
|
74246
|
+
for (let i6 = 0; i6 < imports.length; i6++) {
|
|
74247
|
+
const it = imports[i6];
|
|
74248
|
+
const i0 = require(`${it}`);
|
|
74249
|
+
const prepared = prepareFromExports4(i0);
|
|
74250
|
+
tables.push(...prepared.tables);
|
|
74251
|
+
}
|
|
74252
|
+
});
|
|
74198
74253
|
return {
|
|
74199
74254
|
tables: Array.from(new Set(tables))
|
|
74200
74255
|
/* , views */
|