drizzle-kit 1.0.0-rc.3-0ce9d30 → 1.0.0-rc.3-e9dfa4b
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/README.md +4 -2
- package/bin.cjs +48 -12
- package/index.js +48 -12
- package/index.mjs +98 -62
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ For programmatic / agent consumption, see the [SDK documentation](./SDK.md) —
|
|
|
13
13
|
|
|
14
14
|
### AI agent skills
|
|
15
15
|
|
|
16
|
-
Drizzle Kit ships installable [Agent Skills](https://
|
|
16
|
+
Drizzle Kit ships installable [Agent Skills](https://skills.sh) for AI coding assistants — Claude Code, Cursor, GitHub Copilot, OpenAI Codex CLI, Gemini CLI, OpenCode, and any other tool that loads the open standard.
|
|
17
17
|
|
|
18
18
|
Install into your project's agent config:
|
|
19
19
|
|
|
@@ -21,7 +21,9 @@ Install into your project's agent config:
|
|
|
21
21
|
npx drizzle-kit skills
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Under the hood the command runs [
|
|
24
|
+
Under the hood the command runs the [skills](https://skills.sh) CLI against drizzle-kit's bundled skill catalog and installs `SKILL.md` files directly into your agent's native skills directory — `.claude/skills/<slug>/SKILL.md` for Claude Code, and `.agents/skills/<slug>/SKILL.md` for Codex, Cursor, Gemini CLI, Cline, GitHub Copilot, and any other agent that follows the universal `AGENTS.md` skills convention.
|
|
25
|
+
|
|
26
|
+
TanStack Intent users can still surface the same skills via `intent list` — `SKILL.md` files remain bundled in the npm tarball.
|
|
25
27
|
|
|
26
28
|
### How it works
|
|
27
29
|
|
package/bin.cjs
CHANGED
|
@@ -51,10 +51,10 @@ let node_async_hooks = require("node:async_hooks");
|
|
|
51
51
|
let drizzle_orm__relations = require("drizzle-orm/_relations");
|
|
52
52
|
let node_child_process = require("node:child_process");
|
|
53
53
|
node_child_process = __toESM$1(node_child_process);
|
|
54
|
-
let node_path = require("node:path");
|
|
55
|
-
node_path = __toESM$1(node_path);
|
|
56
54
|
let node_fs = require("node:fs");
|
|
57
55
|
node_fs = __toESM$1(node_fs);
|
|
56
|
+
let node_path = require("node:path");
|
|
57
|
+
node_path = __toESM$1(node_path);
|
|
58
58
|
let node_module = require("node:module");
|
|
59
59
|
node_module = __toESM$1(node_module);
|
|
60
60
|
let util = require("util");
|
|
@@ -234456,28 +234456,64 @@ const exportRaw = command({
|
|
|
234456
234456
|
} else assertUnreachable(dialect);
|
|
234457
234457
|
}
|
|
234458
234458
|
});
|
|
234459
|
+
const detectInstaller = () => {
|
|
234460
|
+
const [name, version] = ((process.env.npm_config_user_agent ?? "").split(" ")[0] ?? "").split("/");
|
|
234461
|
+
if (name === "pnpm") return {
|
|
234462
|
+
cmd: "pnpm",
|
|
234463
|
+
args: ["dlx"]
|
|
234464
|
+
};
|
|
234465
|
+
if (name === "bun") return {
|
|
234466
|
+
cmd: "bunx",
|
|
234467
|
+
args: []
|
|
234468
|
+
};
|
|
234469
|
+
if (name === "yarn") {
|
|
234470
|
+
const major = Number.parseInt(version ?? "", 10);
|
|
234471
|
+
if (Number.isFinite(major) && major >= 2) return {
|
|
234472
|
+
cmd: "yarn",
|
|
234473
|
+
args: ["dlx"]
|
|
234474
|
+
};
|
|
234475
|
+
return {
|
|
234476
|
+
cmd: "npx",
|
|
234477
|
+
args: ["-y"]
|
|
234478
|
+
};
|
|
234479
|
+
}
|
|
234480
|
+
return {
|
|
234481
|
+
cmd: "npx",
|
|
234482
|
+
args: ["-y"]
|
|
234483
|
+
};
|
|
234484
|
+
};
|
|
234459
234485
|
const skills = command({
|
|
234460
234486
|
name: "skills",
|
|
234461
234487
|
options: {},
|
|
234462
234488
|
handler: async () => {
|
|
234463
|
-
|
|
234464
|
-
|
|
234465
|
-
"
|
|
234466
|
-
|
|
234467
|
-
|
|
234489
|
+
const skillsDir = [(0, node_path.resolve)(__dirname, "skills"), (0, node_path.resolve)(__dirname, "../../skills")].find((p) => (0, node_fs.existsSync)(p));
|
|
234490
|
+
if (!skillsDir) {
|
|
234491
|
+
process.stderr.write("Could not locate bundled skills directory.\n");
|
|
234492
|
+
process.exit(1);
|
|
234493
|
+
}
|
|
234494
|
+
const { cmd, args } = detectInstaller();
|
|
234495
|
+
process.stderr.write(`Installing via ${cmd}…\n`);
|
|
234496
|
+
const onWindows = process.platform === "win32";
|
|
234497
|
+
const skillsArg = onWindows ? `"${skillsDir}"` : skillsDir;
|
|
234498
|
+
const child = (0, node_child_process.spawn)(cmd, [
|
|
234499
|
+
...args,
|
|
234500
|
+
"skills@latest",
|
|
234501
|
+
"add",
|
|
234502
|
+
skillsArg
|
|
234468
234503
|
], {
|
|
234469
234504
|
stdio: "inherit",
|
|
234470
|
-
shell:
|
|
234505
|
+
shell: onWindows
|
|
234471
234506
|
});
|
|
234472
|
-
await new Promise(() => {
|
|
234507
|
+
const exitCode = await new Promise((resolve) => {
|
|
234473
234508
|
child.on("error", () => {
|
|
234474
|
-
process.stderr.write(
|
|
234475
|
-
|
|
234509
|
+
process.stderr.write(`Failed to spawn ${cmd}. Make sure ${cmd} is installed and on PATH.\n`);
|
|
234510
|
+
resolve(1);
|
|
234476
234511
|
});
|
|
234477
234512
|
child.on("exit", (code, signal) => {
|
|
234478
|
-
|
|
234513
|
+
resolve(signal ? 1 : code ?? 0);
|
|
234479
234514
|
});
|
|
234480
234515
|
});
|
|
234516
|
+
process.exit(exitCode);
|
|
234481
234517
|
}
|
|
234482
234518
|
});
|
|
234483
234519
|
//#endregion
|
package/index.js
CHANGED
|
@@ -45,10 +45,10 @@ let fs = require("fs");
|
|
|
45
45
|
fs = __toESM$1(fs);
|
|
46
46
|
let node_child_process = require("node:child_process");
|
|
47
47
|
node_child_process = __toESM$1(node_child_process);
|
|
48
|
-
let node_path = require("node:path");
|
|
49
|
-
node_path = __toESM$1(node_path);
|
|
50
48
|
let node_fs = require("node:fs");
|
|
51
49
|
node_fs = __toESM$1(node_fs);
|
|
50
|
+
let node_path = require("node:path");
|
|
51
|
+
node_path = __toESM$1(node_path);
|
|
52
52
|
let node_module = require("node:module");
|
|
53
53
|
node_module = __toESM$1(node_module);
|
|
54
54
|
let os = require("os");
|
|
@@ -233345,28 +233345,64 @@ command({
|
|
|
233345
233345
|
} else assertUnreachable(dialect);
|
|
233346
233346
|
}
|
|
233347
233347
|
});
|
|
233348
|
+
const detectInstaller = () => {
|
|
233349
|
+
const [name, version] = ((process.env.npm_config_user_agent ?? "").split(" ")[0] ?? "").split("/");
|
|
233350
|
+
if (name === "pnpm") return {
|
|
233351
|
+
cmd: "pnpm",
|
|
233352
|
+
args: ["dlx"]
|
|
233353
|
+
};
|
|
233354
|
+
if (name === "bun") return {
|
|
233355
|
+
cmd: "bunx",
|
|
233356
|
+
args: []
|
|
233357
|
+
};
|
|
233358
|
+
if (name === "yarn") {
|
|
233359
|
+
const major = Number.parseInt(version ?? "", 10);
|
|
233360
|
+
if (Number.isFinite(major) && major >= 2) return {
|
|
233361
|
+
cmd: "yarn",
|
|
233362
|
+
args: ["dlx"]
|
|
233363
|
+
};
|
|
233364
|
+
return {
|
|
233365
|
+
cmd: "npx",
|
|
233366
|
+
args: ["-y"]
|
|
233367
|
+
};
|
|
233368
|
+
}
|
|
233369
|
+
return {
|
|
233370
|
+
cmd: "npx",
|
|
233371
|
+
args: ["-y"]
|
|
233372
|
+
};
|
|
233373
|
+
};
|
|
233348
233374
|
command({
|
|
233349
233375
|
name: "skills",
|
|
233350
233376
|
options: {},
|
|
233351
233377
|
handler: async () => {
|
|
233352
|
-
|
|
233353
|
-
|
|
233354
|
-
"
|
|
233355
|
-
|
|
233356
|
-
|
|
233378
|
+
const skillsDir = [(0, node_path.resolve)(__dirname, "skills"), (0, node_path.resolve)(__dirname, "../../skills")].find((p) => (0, node_fs.existsSync)(p));
|
|
233379
|
+
if (!skillsDir) {
|
|
233380
|
+
process.stderr.write("Could not locate bundled skills directory.\n");
|
|
233381
|
+
process.exit(1);
|
|
233382
|
+
}
|
|
233383
|
+
const { cmd, args } = detectInstaller();
|
|
233384
|
+
process.stderr.write(`Installing via ${cmd}…\n`);
|
|
233385
|
+
const onWindows = process.platform === "win32";
|
|
233386
|
+
const skillsArg = onWindows ? `"${skillsDir}"` : skillsDir;
|
|
233387
|
+
const child = (0, node_child_process.spawn)(cmd, [
|
|
233388
|
+
...args,
|
|
233389
|
+
"skills@latest",
|
|
233390
|
+
"add",
|
|
233391
|
+
skillsArg
|
|
233357
233392
|
], {
|
|
233358
233393
|
stdio: "inherit",
|
|
233359
|
-
shell:
|
|
233394
|
+
shell: onWindows
|
|
233360
233395
|
});
|
|
233361
|
-
await new Promise(() => {
|
|
233396
|
+
const exitCode = await new Promise((resolve) => {
|
|
233362
233397
|
child.on("error", () => {
|
|
233363
|
-
process.stderr.write(
|
|
233364
|
-
|
|
233398
|
+
process.stderr.write(`Failed to spawn ${cmd}. Make sure ${cmd} is installed and on PATH.\n`);
|
|
233399
|
+
resolve(1);
|
|
233365
233400
|
});
|
|
233366
233401
|
child.on("exit", (code, signal) => {
|
|
233367
|
-
|
|
233402
|
+
resolve(signal ? 1 : code ?? 0);
|
|
233368
233403
|
});
|
|
233369
233404
|
});
|
|
233405
|
+
process.exit(exitCode);
|
|
233370
233406
|
}
|
|
233371
233407
|
});
|
|
233372
233408
|
//#endregion
|
package/index.mjs
CHANGED
|
@@ -6,10 +6,10 @@ import tty from "node:tty";
|
|
|
6
6
|
import { Many, One, Relations, createTableRelationsHelpers, extractTablesRelationalConfig, normalizeRelation } from "drizzle-orm/_relations";
|
|
7
7
|
import fs, { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, rmSync, unlinkSync, writeFileSync } from "fs";
|
|
8
8
|
import childProcess, { exec, execFile, spawn } from "node:child_process";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import re, { existsSync as existsSync$1, promises } from "node:fs";
|
|
10
|
+
import path, { resolve } from "node:path";
|
|
11
11
|
import Be from "os";
|
|
12
|
-
import
|
|
12
|
+
import Ie, { dirname, join, resolve as resolve$1 } from "path";
|
|
13
13
|
import { inspect } from "util";
|
|
14
14
|
import crypto$1, { createHash, randomUUID } from "crypto";
|
|
15
15
|
import { parse, pathToFileURL } from "url";
|
|
@@ -2647,7 +2647,7 @@ function Et(e) {
|
|
|
2647
2647
|
throw new RangeError(`invalid RFC 9557 time-only string ${e}; may need a T prefix`);
|
|
2648
2648
|
}
|
|
2649
2649
|
function It(e) {
|
|
2650
|
-
const t = Ie.exec(e);
|
|
2650
|
+
const t = Ie$1.exec(e);
|
|
2651
2651
|
let n, r, o, i;
|
|
2652
2652
|
if (t) {
|
|
2653
2653
|
o = Tt(t[3]);
|
|
@@ -5074,7 +5074,7 @@ function zi(e, t) {
|
|
|
5074
5074
|
function Ai(e, t) {
|
|
5075
5075
|
return vt(e, wt), Hi(e).time[t];
|
|
5076
5076
|
}
|
|
5077
|
-
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;
|
|
5077
|
+
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$1, 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;
|
|
5078
5078
|
var init_index_esm = __esmMin((() => {
|
|
5079
5079
|
import_jsbi_cjs = /* @__PURE__ */ __toESM$1(require_jsbi_cjs(), 1);
|
|
5080
5080
|
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);
|
|
@@ -5161,7 +5161,7 @@ var init_index_esm = __esmMin((() => {
|
|
|
5161
5161
|
`(?:${De$1.source})?`,
|
|
5162
5162
|
`(?:\\[!?${fe$1.source}\\])?`,
|
|
5163
5163
|
`((?:${Te$1.source})*)$`
|
|
5164
|
-
].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 = [
|
|
5164
|
+
].join("")), Ie$1 = 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 = [
|
|
5165
5165
|
"iso8601",
|
|
5166
5166
|
"hebrew",
|
|
5167
5167
|
"islamic",
|
|
@@ -24866,7 +24866,7 @@ var init_dist$3 = __esmMin((() => {
|
|
|
24866
24866
|
}
|
|
24867
24867
|
return t;
|
|
24868
24868
|
}, "invertCase"), le = /* @__PURE__ */ new Map(), _e$3 = X((e, t) => {
|
|
24869
|
-
const s =
|
|
24869
|
+
const s = Ie.join(e, `.is-fs-case-sensitive-test-${process.pid}`);
|
|
24870
24870
|
try {
|
|
24871
24871
|
return t.writeFileSync(s, ""), !t.existsSync(Ae(s));
|
|
24872
24872
|
} finally {
|
|
@@ -25891,7 +25891,7 @@ var require_common$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
25891
25891
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
25892
25892
|
}
|
|
25893
25893
|
var fs$5 = __require("fs");
|
|
25894
|
-
var path$
|
|
25894
|
+
var path$7 = __require("path");
|
|
25895
25895
|
var minimatch = require_minimatch();
|
|
25896
25896
|
var isAbsolute$2 = __require("path").isAbsolute;
|
|
25897
25897
|
var Minimatch = minimatch.Minimatch;
|
|
@@ -25945,13 +25945,13 @@ var require_common$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
25945
25945
|
setupIgnores(self, options);
|
|
25946
25946
|
self.changedCwd = false;
|
|
25947
25947
|
var cwd = process.cwd();
|
|
25948
|
-
if (!ownProp(options, "cwd")) self.cwd = path$
|
|
25948
|
+
if (!ownProp(options, "cwd")) self.cwd = path$7.resolve(cwd);
|
|
25949
25949
|
else {
|
|
25950
|
-
self.cwd = path$
|
|
25950
|
+
self.cwd = path$7.resolve(options.cwd);
|
|
25951
25951
|
self.changedCwd = self.cwd !== cwd;
|
|
25952
25952
|
}
|
|
25953
|
-
self.root = options.root || path$
|
|
25954
|
-
self.root = path$
|
|
25953
|
+
self.root = options.root || path$7.resolve(self.cwd, "/");
|
|
25954
|
+
self.root = path$7.resolve(self.root);
|
|
25955
25955
|
self.cwdAbs = isAbsolute$2(self.cwd) ? self.cwd : makeAbs(self, self.cwd);
|
|
25956
25956
|
self.nomount = !!options.nomount;
|
|
25957
25957
|
if (process.platform === "win32") {
|
|
@@ -26018,10 +26018,10 @@ var require_common$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
26018
26018
|
}
|
|
26019
26019
|
function makeAbs(self, f) {
|
|
26020
26020
|
var abs = f;
|
|
26021
|
-
if (f.charAt(0) === "/") abs = path$
|
|
26021
|
+
if (f.charAt(0) === "/") abs = path$7.join(self.root, f);
|
|
26022
26022
|
else if (isAbsolute$2(f) || f === "") abs = f;
|
|
26023
|
-
else if (self.changedCwd) abs = path$
|
|
26024
|
-
else abs = path$
|
|
26023
|
+
else if (self.changedCwd) abs = path$7.resolve(self.cwd, f);
|
|
26024
|
+
else abs = path$7.resolve(f);
|
|
26025
26025
|
if (process.platform === "win32") abs = abs.replace(/\\/g, "/");
|
|
26026
26026
|
return abs;
|
|
26027
26027
|
}
|
|
@@ -26048,7 +26048,7 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26048
26048
|
minimatch.Minimatch;
|
|
26049
26049
|
require_glob().Glob;
|
|
26050
26050
|
__require("util");
|
|
26051
|
-
var path$
|
|
26051
|
+
var path$6 = __require("path");
|
|
26052
26052
|
var assert$1 = __require("assert");
|
|
26053
26053
|
var isAbsolute$1 = __require("path").isAbsolute;
|
|
26054
26054
|
var common = require_common$1();
|
|
@@ -26144,7 +26144,7 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26144
26144
|
var e = matchedEntries[i];
|
|
26145
26145
|
if (prefix) if (prefix.slice(-1) !== "/") e = prefix + "/" + e;
|
|
26146
26146
|
else e = prefix + e;
|
|
26147
|
-
if (e.charAt(0) === "/" && !this.nomount) e = path$
|
|
26147
|
+
if (e.charAt(0) === "/" && !this.nomount) e = path$6.join(this.root, e);
|
|
26148
26148
|
this._emitMatch(index, e);
|
|
26149
26149
|
}
|
|
26150
26150
|
return;
|
|
@@ -26259,9 +26259,9 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26259
26259
|
if (!exists) return;
|
|
26260
26260
|
if (prefix && isAbsolute$1(prefix) && !this.nomount) {
|
|
26261
26261
|
var trail = /[\/\\]$/.test(prefix);
|
|
26262
|
-
if (prefix.charAt(0) === "/") prefix = path$
|
|
26262
|
+
if (prefix.charAt(0) === "/") prefix = path$6.join(this.root, prefix);
|
|
26263
26263
|
else {
|
|
26264
|
-
prefix = path$
|
|
26264
|
+
prefix = path$6.resolve(this.root, prefix);
|
|
26265
26265
|
if (trail) prefix += "/";
|
|
26266
26266
|
}
|
|
26267
26267
|
}
|
|
@@ -26422,7 +26422,7 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26422
26422
|
minimatch.Minimatch;
|
|
26423
26423
|
var inherits = require_inherits();
|
|
26424
26424
|
var EE$3 = __require("events").EventEmitter;
|
|
26425
|
-
var path$
|
|
26425
|
+
var path$5 = __require("path");
|
|
26426
26426
|
var assert = __require("assert");
|
|
26427
26427
|
var isAbsolute = __require("path").isAbsolute;
|
|
26428
26428
|
var globSync = require_sync();
|
|
@@ -26653,7 +26653,7 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26653
26653
|
var e = matchedEntries[i];
|
|
26654
26654
|
if (prefix) if (prefix !== "/") e = prefix + "/" + e;
|
|
26655
26655
|
else e = prefix + e;
|
|
26656
|
-
if (e.charAt(0) === "/" && !this.nomount) e = path$
|
|
26656
|
+
if (e.charAt(0) === "/" && !this.nomount) e = path$5.join(this.root, e);
|
|
26657
26657
|
this._emitMatch(index, e);
|
|
26658
26658
|
}
|
|
26659
26659
|
return cb();
|
|
@@ -26800,9 +26800,9 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
26800
26800
|
if (!exists) return cb();
|
|
26801
26801
|
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
|
26802
26802
|
var trail = /[\/\\]$/.test(prefix);
|
|
26803
|
-
if (prefix.charAt(0) === "/") prefix = path$
|
|
26803
|
+
if (prefix.charAt(0) === "/") prefix = path$5.join(this.root, prefix);
|
|
26804
26804
|
else {
|
|
26805
|
-
prefix = path$
|
|
26805
|
+
prefix = path$5.resolve(this.root, prefix);
|
|
26806
26806
|
if (trail) prefix += "/";
|
|
26807
26807
|
}
|
|
26808
26808
|
}
|
|
@@ -80212,12 +80212,12 @@ var init_utils_node = __esmMin((() => {
|
|
|
80212
80212
|
const globbed = (0, import_glob.sync)(`${prefix}${cur}`);
|
|
80213
80213
|
for (const it of globbed) {
|
|
80214
80214
|
const stats = lstatSync(it);
|
|
80215
|
-
const fileName = stats.isDirectory() ? null : resolve(it);
|
|
80215
|
+
const fileName = stats.isDirectory() ? null : resolve$1(it);
|
|
80216
80216
|
const filenames = fileName ? [{
|
|
80217
80217
|
path: fileName,
|
|
80218
80218
|
stat: stats
|
|
80219
80219
|
}] : readdirSync(it).map((file) => {
|
|
80220
|
-
const fullPath = join(resolve(it), file);
|
|
80220
|
+
const fullPath = join(resolve$1(it), file);
|
|
80221
80221
|
return {
|
|
80222
80222
|
path: fullPath,
|
|
80223
80223
|
stat: lstatSync(fullPath)
|
|
@@ -80267,8 +80267,8 @@ var init_utils_node = __esmMin((() => {
|
|
|
80267
80267
|
}
|
|
80268
80268
|
const aliasKey = key.endsWith("/*") ? key.slice(0, -1) : key;
|
|
80269
80269
|
const resolvedTargets = targets.map((target) => {
|
|
80270
|
-
if (supportsTrailingWildcard) return resolve(tsconfigDir, tsconfigBaseUrl, target.slice(0, -1));
|
|
80271
|
-
return resolve(tsconfigDir, tsconfigBaseUrl, target);
|
|
80270
|
+
if (supportsTrailingWildcard) return resolve$1(tsconfigDir, tsconfigBaseUrl, target.slice(0, -1));
|
|
80271
|
+
return resolve$1(tsconfigDir, tsconfigBaseUrl, target);
|
|
80272
80272
|
});
|
|
80273
80273
|
return [[aliasKey, resolvedTargets.find((candidate) => existsSync(candidate)) ?? resolvedTargets[0]]];
|
|
80274
80274
|
}));
|
|
@@ -86990,7 +86990,7 @@ function writeResult(config) {
|
|
|
86990
86990
|
sql = "-- Custom SQL migration file, put your code below! --";
|
|
86991
86991
|
}
|
|
86992
86992
|
fs.writeFileSync(join(outFolder, `${tag}/migration.sql`), sql);
|
|
86993
|
-
const migrationPath =
|
|
86993
|
+
const migrationPath = Ie.join(`${outFolder}/${tag}/migration.sql`);
|
|
86994
86994
|
if (bundle) {
|
|
86995
86995
|
const js = embeddedMigrations([...snapshots || [], join(outFolder, `${tag}/snapshot.json`)], driver);
|
|
86996
86996
|
fs.writeFileSync(`${outFolder}/migrations.js`, js);
|
|
@@ -87015,7 +87015,7 @@ var init_generate_common = __esmMin((() => {
|
|
|
87015
87015
|
let content = driver === "expo" ? "// This file is required for Expo/React Native SQLite migrations - https://orm.drizzle.team/quick-sqlite/expo\n\n" : "";
|
|
87016
87016
|
const migrations = {};
|
|
87017
87017
|
snapshots.forEach((entry, idx) => {
|
|
87018
|
-
const prefix = entry.split(
|
|
87018
|
+
const prefix = entry.split(Ie.sep)[entry.split(Ie.sep).length - 2];
|
|
87019
87019
|
const importName = idx.toString().padStart(4, "0");
|
|
87020
87020
|
content += `import m${importName} from './${prefix}/migration.sql';\n`;
|
|
87021
87021
|
migrations[prefix] = importName;
|
|
@@ -87572,11 +87572,11 @@ const prepareMigrateConfig = async (configPath) => {
|
|
|
87572
87572
|
};
|
|
87573
87573
|
const drizzleConfigFromFile = async (configPath, isExport) => {
|
|
87574
87574
|
const prefix = process.env.TEST_CONFIG_PATH_PREFIX || "";
|
|
87575
|
-
const defaultTsConfigExists = existsSync(resolve(join(prefix, "drizzle.config.ts")));
|
|
87576
|
-
const defaultJsConfigExists = existsSync(resolve(join(prefix, "drizzle.config.js")));
|
|
87575
|
+
const defaultTsConfigExists = existsSync(resolve$1(join(prefix, "drizzle.config.ts")));
|
|
87576
|
+
const defaultJsConfigExists = existsSync(resolve$1(join(prefix, "drizzle.config.js")));
|
|
87577
87577
|
const defaultConfigPath = defaultTsConfigExists ? "drizzle.config.ts" : defaultJsConfigExists ? "drizzle.config.js" : "drizzle.config.json";
|
|
87578
87578
|
if (!configPath && !isExport) humanLog(chalk.gray(`No config path provided, using default '${defaultConfigPath}'`));
|
|
87579
|
-
const path = resolve(join(prefix, configPath ?? defaultConfigPath));
|
|
87579
|
+
const path = resolve$1(join(prefix, configPath ?? defaultConfigPath));
|
|
87580
87580
|
if (!existsSync(path)) throw new ConfigFileNotFoundCliError(path);
|
|
87581
87581
|
if (!isExport) humanLog(`Reading config file '${path}'`);
|
|
87582
87582
|
const content = await loadModule(path, { defaultExport: true });
|
|
@@ -94698,7 +94698,7 @@ var init_unescape = __esmMin((() => {
|
|
|
94698
94698
|
}));
|
|
94699
94699
|
//#endregion
|
|
94700
94700
|
//#region ../node_modules/.pnpm/minimatch@7.4.6/node_modules/minimatch/dist/mjs/index.js
|
|
94701
|
-
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$
|
|
94701
|
+
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$4, sep, GLOBSTAR, plTypes, qmark, star, twoStarDot, twoStarNoDot, charSet, reSpecials, addPatternStartSet, filter, ext, defaults, braceExpand, MAX_PATTERN_LENGTH, assertValidPattern, makeRe, match$1, globUnescape, globMagic, regExpEscape, Minimatch;
|
|
94702
94702
|
var init_mjs = __esmMin((() => {
|
|
94703
94703
|
import_brace_expansion = /* @__PURE__ */ __toESM$1(require_brace_expansion(), 1);
|
|
94704
94704
|
init_brace_expressions();
|
|
@@ -94758,11 +94758,11 @@ var init_mjs = __esmMin((() => {
|
|
|
94758
94758
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
94759
94759
|
};
|
|
94760
94760
|
defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
94761
|
-
path$
|
|
94761
|
+
path$4 = {
|
|
94762
94762
|
win32: { sep: "\\" },
|
|
94763
94763
|
posix: { sep: "/" }
|
|
94764
94764
|
};
|
|
94765
|
-
sep = defaultPlatform === "win32" ? path$
|
|
94765
|
+
sep = defaultPlatform === "win32" ? path$4.win32.sep : path$4.posix.sep;
|
|
94766
94766
|
minimatch.sep = sep;
|
|
94767
94767
|
GLOBSTAR = Symbol("globstar **");
|
|
94768
94768
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -100880,7 +100880,7 @@ var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
100880
100880
|
//#region ../node_modules/.pnpm/node-gyp-build@4.8.4/node_modules/node-gyp-build/node-gyp-build.js
|
|
100881
100881
|
var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
100882
100882
|
var fs$4 = __require("fs");
|
|
100883
|
-
var path$
|
|
100883
|
+
var path$3 = __require("path");
|
|
100884
100884
|
var os$3 = __require("os");
|
|
100885
100885
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
100886
100886
|
var vars = process.config && process.config.variables || {};
|
|
@@ -100897,20 +100897,20 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
100897
100897
|
return runtimeRequire(load.resolve(dir));
|
|
100898
100898
|
}
|
|
100899
100899
|
load.resolve = load.path = function(dir) {
|
|
100900
|
-
dir = path$
|
|
100900
|
+
dir = path$3.resolve(dir || ".");
|
|
100901
100901
|
try {
|
|
100902
|
-
var name = runtimeRequire(path$
|
|
100902
|
+
var name = runtimeRequire(path$3.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
|
|
100903
100903
|
if (process.env[name + "_PREBUILD"]) dir = process.env[name + "_PREBUILD"];
|
|
100904
100904
|
} catch (err) {}
|
|
100905
100905
|
if (!prebuildsOnly) {
|
|
100906
|
-
var release = getFirst(path$
|
|
100906
|
+
var release = getFirst(path$3.join(dir, "build/Release"), matchBuild);
|
|
100907
100907
|
if (release) return release;
|
|
100908
|
-
var debug = getFirst(path$
|
|
100908
|
+
var debug = getFirst(path$3.join(dir, "build/Debug"), matchBuild);
|
|
100909
100909
|
if (debug) return debug;
|
|
100910
100910
|
}
|
|
100911
100911
|
var prebuild = resolve(dir);
|
|
100912
100912
|
if (prebuild) return prebuild;
|
|
100913
|
-
var nearby = resolve(path$
|
|
100913
|
+
var nearby = resolve(path$3.dirname(process.execPath));
|
|
100914
100914
|
if (nearby) return nearby;
|
|
100915
100915
|
var target = [
|
|
100916
100916
|
"platform=" + platform,
|
|
@@ -100926,11 +100926,11 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
100926
100926
|
].filter(Boolean).join(" ");
|
|
100927
100927
|
throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
|
|
100928
100928
|
function resolve(dir) {
|
|
100929
|
-
var tuple = readdirSync(path$
|
|
100929
|
+
var tuple = readdirSync(path$3.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
|
|
100930
100930
|
if (!tuple) return;
|
|
100931
|
-
var prebuilds = path$
|
|
100931
|
+
var prebuilds = path$3.join(dir, "prebuilds", tuple.name);
|
|
100932
100932
|
var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
|
|
100933
|
-
if (winner) return path$
|
|
100933
|
+
if (winner) return path$3.join(prebuilds, winner.file);
|
|
100934
100934
|
}
|
|
100935
100935
|
};
|
|
100936
100936
|
function readdirSync(dir) {
|
|
@@ -100942,7 +100942,7 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
100942
100942
|
}
|
|
100943
100943
|
function getFirst(dir, filter) {
|
|
100944
100944
|
var files = readdirSync(dir).filter(filter);
|
|
100945
|
-
return files[0] && path$
|
|
100945
|
+
return files[0] && path$3.join(dir, files[0]);
|
|
100946
100946
|
}
|
|
100947
100947
|
function matchBuild(name) {
|
|
100948
100948
|
return /\.node$/.test(name);
|
|
@@ -115886,7 +115886,7 @@ var require_dist_cjs$22 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
115886
115886
|
var getHomeDir = require_getHomeDir();
|
|
115887
115887
|
var getSSOTokenFilepath = require_getSSOTokenFilepath();
|
|
115888
115888
|
var getSSOTokenFromFile = require_getSSOTokenFromFile();
|
|
115889
|
-
var path$
|
|
115889
|
+
var path$2 = __require("path");
|
|
115890
115890
|
var types = require_dist_cjs$53();
|
|
115891
115891
|
var readFile = require_readFile();
|
|
115892
115892
|
const ENV_PROFILE = "AWS_PROFILE";
|
|
@@ -115904,9 +115904,9 @@ var require_dist_cjs$22 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
115904
115904
|
return acc;
|
|
115905
115905
|
}, { ...data.default && { default: data.default } });
|
|
115906
115906
|
const ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
115907
|
-
const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path$
|
|
115907
|
+
const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path$2.join(getHomeDir.getHomeDir(), ".aws", "config");
|
|
115908
115908
|
const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
115909
|
-
const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path$
|
|
115909
|
+
const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path$2.join(getHomeDir.getHomeDir(), ".aws", "credentials");
|
|
115910
115910
|
const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
115911
115911
|
const profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
115912
115912
|
const parseIni = (iniData) => {
|
|
@@ -115947,9 +115947,9 @@ var require_dist_cjs$22 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
115947
115947
|
const homeDir = getHomeDir.getHomeDir();
|
|
115948
115948
|
const relativeHomeDirPrefix = "~/";
|
|
115949
115949
|
let resolvedFilepath = filepath;
|
|
115950
|
-
if (filepath.startsWith(relativeHomeDirPrefix)) resolvedFilepath = path$
|
|
115950
|
+
if (filepath.startsWith(relativeHomeDirPrefix)) resolvedFilepath = path$2.join(homeDir, filepath.slice(2));
|
|
115951
115951
|
let resolvedConfigFilepath = configFilepath;
|
|
115952
|
-
if (configFilepath.startsWith(relativeHomeDirPrefix)) resolvedConfigFilepath = path$
|
|
115952
|
+
if (configFilepath.startsWith(relativeHomeDirPrefix)) resolvedConfigFilepath = path$2.join(homeDir, configFilepath.slice(2));
|
|
115953
115953
|
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)]);
|
|
115954
115954
|
return {
|
|
115955
115955
|
configFile: parsedFiles[0],
|
|
@@ -164991,7 +164991,7 @@ var require_msal_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
164991
164991
|
var msalCommon = require_lib$1();
|
|
164992
164992
|
var jwt = require_jsonwebtoken();
|
|
164993
164993
|
var fs$2 = __require("fs");
|
|
164994
|
-
var path$
|
|
164994
|
+
var path$1 = __require("path");
|
|
164995
164995
|
/**
|
|
164996
164996
|
* This class serializes cache entities to be saved into in-memory object types defined internally
|
|
164997
164997
|
* @internal
|
|
@@ -174374,7 +174374,7 @@ Content-Length: ${body.length}\r\n\r\n${body}`;
|
|
|
174374
174374
|
const secretFilePath = wwwAuthHeader.split("Basic realm=")[1];
|
|
174375
174375
|
if (!SUPPORTED_AZURE_ARC_PLATFORMS.hasOwnProperty(process.platform)) throw createManagedIdentityError(platformNotSupported);
|
|
174376
174376
|
const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
|
|
174377
|
-
const fileName = path$
|
|
174377
|
+
const fileName = path$1.basename(secretFilePath);
|
|
174378
174378
|
if (!fileName.endsWith(".key")) throw createManagedIdentityError(invalidFileExtension);
|
|
174379
174379
|
if (expectedSecretFilePath + fileName !== secretFilePath) throw createManagedIdentityError(invalidFilePath);
|
|
174380
174380
|
let secretFileSize;
|
|
@@ -233328,28 +233328,64 @@ command({
|
|
|
233328
233328
|
} else assertUnreachable(dialect);
|
|
233329
233329
|
}
|
|
233330
233330
|
});
|
|
233331
|
+
const detectInstaller = () => {
|
|
233332
|
+
const [name, version] = ((process.env.npm_config_user_agent ?? "").split(" ")[0] ?? "").split("/");
|
|
233333
|
+
if (name === "pnpm") return {
|
|
233334
|
+
cmd: "pnpm",
|
|
233335
|
+
args: ["dlx"]
|
|
233336
|
+
};
|
|
233337
|
+
if (name === "bun") return {
|
|
233338
|
+
cmd: "bunx",
|
|
233339
|
+
args: []
|
|
233340
|
+
};
|
|
233341
|
+
if (name === "yarn") {
|
|
233342
|
+
const major = Number.parseInt(version ?? "", 10);
|
|
233343
|
+
if (Number.isFinite(major) && major >= 2) return {
|
|
233344
|
+
cmd: "yarn",
|
|
233345
|
+
args: ["dlx"]
|
|
233346
|
+
};
|
|
233347
|
+
return {
|
|
233348
|
+
cmd: "npx",
|
|
233349
|
+
args: ["-y"]
|
|
233350
|
+
};
|
|
233351
|
+
}
|
|
233352
|
+
return {
|
|
233353
|
+
cmd: "npx",
|
|
233354
|
+
args: ["-y"]
|
|
233355
|
+
};
|
|
233356
|
+
};
|
|
233331
233357
|
command({
|
|
233332
233358
|
name: "skills",
|
|
233333
233359
|
options: {},
|
|
233334
233360
|
handler: async () => {
|
|
233335
|
-
|
|
233336
|
-
|
|
233337
|
-
"
|
|
233338
|
-
|
|
233339
|
-
|
|
233361
|
+
const skillsDir = [resolve(__dirname, "skills"), resolve(__dirname, "../../skills")].find((p) => existsSync$1(p));
|
|
233362
|
+
if (!skillsDir) {
|
|
233363
|
+
process.stderr.write("Could not locate bundled skills directory.\n");
|
|
233364
|
+
process.exit(1);
|
|
233365
|
+
}
|
|
233366
|
+
const { cmd, args } = detectInstaller();
|
|
233367
|
+
process.stderr.write(`Installing via ${cmd}…\n`);
|
|
233368
|
+
const onWindows = process.platform === "win32";
|
|
233369
|
+
const skillsArg = onWindows ? `"${skillsDir}"` : skillsDir;
|
|
233370
|
+
const child = spawn(cmd, [
|
|
233371
|
+
...args,
|
|
233372
|
+
"skills@latest",
|
|
233373
|
+
"add",
|
|
233374
|
+
skillsArg
|
|
233340
233375
|
], {
|
|
233341
233376
|
stdio: "inherit",
|
|
233342
|
-
shell:
|
|
233377
|
+
shell: onWindows
|
|
233343
233378
|
});
|
|
233344
|
-
await new Promise(() => {
|
|
233379
|
+
const exitCode = await new Promise((resolve) => {
|
|
233345
233380
|
child.on("error", () => {
|
|
233346
|
-
process.stderr.write(
|
|
233347
|
-
|
|
233381
|
+
process.stderr.write(`Failed to spawn ${cmd}. Make sure ${cmd} is installed and on PATH.\n`);
|
|
233382
|
+
resolve(1);
|
|
233348
233383
|
});
|
|
233349
233384
|
child.on("exit", (code, signal) => {
|
|
233350
|
-
|
|
233385
|
+
resolve(signal ? 1 : code ?? 0);
|
|
233351
233386
|
});
|
|
233352
233387
|
});
|
|
233388
|
+
process.exit(exitCode);
|
|
233353
233389
|
}
|
|
233354
233390
|
});
|
|
233355
233391
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drizzle-kit",
|
|
3
|
-
"version": "1.0.0-rc.3-
|
|
3
|
+
"version": "1.0.0-rc.3-e9dfa4b",
|
|
4
4
|
"homepage": "https://orm.drizzle.team",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"drizzle",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"drizzle-kit",
|
|
19
19
|
"migrations",
|
|
20
20
|
"schema",
|
|
21
|
-
"tanstack-intent"
|
|
21
|
+
"tanstack-intent",
|
|
22
|
+
"skills",
|
|
23
|
+
"agent-skills"
|
|
22
24
|
],
|
|
23
25
|
"publishConfig": {
|
|
24
26
|
"provenance": true
|