@intentius/sql-yodeler 0.12.1 → 0.13.2
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 +2 -0
- package/dist/bin.js +3 -0
- package/dist/bin.js.map +1 -1
- package/dist/chant/apply.js +3 -1
- package/dist/chant/apply.js.map +1 -1
- package/dist/chant/build.d.ts +4 -2
- package/dist/chant/build.js +8 -4
- package/dist/chant/build.js.map +1 -1
- package/dist/chant/confirm.d.ts +20 -20
- package/dist/chant/confirm.js +14 -27
- package/dist/chant/confirm.js.map +1 -1
- package/dist/chant/drift.d.ts +0 -17
- package/dist/chant/drift.js +6 -63
- package/dist/chant/drift.js.map +1 -1
- package/dist/chant/gated-request.d.ts +4 -8
- package/dist/chant/gated-request.js +5 -20
- package/dist/chant/gated-request.js.map +1 -1
- package/dist/chant/ledger-fetch.d.ts +46 -0
- package/dist/chant/ledger-fetch.js +42 -0
- package/dist/chant/ledger-fetch.js.map +1 -0
- package/dist/chant/sql-types.d.ts +4 -5
- package/dist/chant/sql-types.js +9 -9
- package/dist/chant/sql-types.js.map +1 -1
- package/dist/chant-floor-version.d.ts +4 -11
- package/dist/chant-floor-version.js +4 -11
- package/dist/chant-floor-version.js.map +1 -1
- package/dist/chant-floor.d.ts +5 -36
- package/dist/chant-floor.js +5 -65
- package/dist/chant-floor.js.map +1 -1
- package/dist/check/run.js +1 -1
- package/dist/check/run.js.map +1 -1
- package/dist/ci/check-hooks.d.ts +2 -2
- package/dist/ci/check-hooks.js +4 -17
- package/dist/ci/check-hooks.js.map +1 -1
- package/dist/ci/commit.d.ts +106 -0
- package/dist/ci/commit.js +115 -0
- package/dist/ci/commit.js.map +1 -0
- package/dist/ci/login.d.ts +17 -12
- package/dist/ci/login.js +32 -41
- package/dist/ci/login.js.map +1 -1
- package/dist/ci/render.d.ts +81 -47
- package/dist/ci/render.js +215 -285
- package/dist/ci/render.js.map +1 -1
- package/dist/ci-words.d.ts +18 -19
- package/dist/ci-words.js +16 -30
- package/dist/ci-words.js.map +1 -1
- package/dist/cli.js +1 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/approve.d.ts +1 -1
- package/dist/commands/approve.js +6 -7
- package/dist/commands/approve.js.map +1 -1
- package/dist/commands/chant.d.ts +7 -1
- package/dist/commands/chant.js +16 -3
- package/dist/commands/chant.js.map +1 -1
- package/dist/commands/ci.js +55 -9
- package/dist/commands/ci.js.map +1 -1
- package/dist/commands/create.d.ts +2 -2
- package/dist/commands/create.js +2 -2
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/drift.js +8 -18
- package/dist/commands/drift.js.map +1 -1
- package/dist/commands/emulator.d.ts +2 -2
- package/dist/commands/emulator.js +2 -2
- package/dist/commands/emulator.js.map +1 -1
- package/dist/commands/init.js +3 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/lint.js +29 -3
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/new.d.ts +7 -0
- package/dist/commands/new.js +156 -22
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/override.js +2 -2
- package/dist/commands/override.js.map +1 -1
- package/dist/commands/plan.js +7 -4
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/upgrade.d.ts +2 -2
- package/dist/commands/upgrade.js +12 -36
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/config/define.d.ts +37 -0
- package/dist/config/define.js +4 -0
- package/dist/config/define.js.map +1 -1
- package/dist/config/load.js +22 -4
- package/dist/config/load.js.map +1 -1
- package/dist/declarative/plan.d.ts +1 -0
- package/dist/declarative/plan.js +5 -3
- package/dist/declarative/plan.js.map +1 -1
- package/dist/exit.d.ts +15 -37
- package/dist/exit.js +23 -79
- package/dist/exit.js.map +1 -1
- package/dist/init/adopt.d.ts +1 -1
- package/dist/init/adopt.js +3 -2
- package/dist/init/adopt.js.map +1 -1
- package/dist/lint/rules.d.ts +3 -1
- package/dist/lint/rules.js +3 -1
- package/dist/lint/rules.js.map +1 -1
- package/dist/lint/unmigrated.d.ts +18 -0
- package/dist/lint/unmigrated.js +62 -0
- package/dist/lint/unmigrated.js.map +1 -0
- package/dist/mcp/chant-hook.d.ts +1 -2
- package/dist/mcp/chant-hook.js +4 -12
- package/dist/mcp/chant-hook.js.map +1 -1
- package/dist/notify/index.d.ts +11 -4
- package/dist/notify/index.js +18 -16
- package/dist/notify/index.js.map +1 -1
- package/dist/pr/forge.d.ts +7 -6
- package/dist/pr/forge.js +19 -56
- package/dist/pr/forge.js.map +1 -1
- package/dist/pr/issue.d.ts +30 -19
- package/dist/pr/issue.js +66 -11
- package/dist/pr/issue.js.map +1 -1
- package/dist/pr/note.d.ts +4 -2
- package/dist/pr/note.js +21 -16
- package/dist/pr/note.js.map +1 -1
- package/dist/pr/overdue.d.ts +5 -12
- package/dist/pr/overdue.js +7 -49
- package/dist/pr/overdue.js.map +1 -1
- package/dist/pr/render.d.ts +0 -2
- package/dist/pr/render.js +0 -2
- package/dist/pr/render.js.map +1 -1
- package/dist/pr/tenants.d.ts +1 -0
- package/dist/pr/tenants.js +6 -4
- package/dist/pr/tenants.js.map +1 -1
- package/dist/project.d.ts +1 -1
- package/dist/project.js +3 -2
- package/dist/project.js.map +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/sources/index.js +2 -1
- package/dist/sources/index.js.map +1 -1
- package/dist/versioned/op.js +8 -3
- package/dist/versioned/op.js.map +1 -1
- package/package.json +9 -8
- package/schemas/event.schema.json +17 -2
- package/dist/chant/process.d.ts +0 -46
- package/dist/chant/process.js +0 -92
- package/dist/chant/process.js.map +0 -1
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"items": {
|
|
77
77
|
"type": "string"
|
|
78
78
|
},
|
|
79
|
-
"description": "The migrations concerned: the pending ones for apply and plan;
|
|
79
|
+
"description": "The migrations concerned: the pending ones for apply and plan; for drift, the environment that drifted."
|
|
80
80
|
},
|
|
81
81
|
"digest": {
|
|
82
82
|
"type": "string",
|
|
@@ -136,7 +136,8 @@
|
|
|
136
136
|
"type": "array",
|
|
137
137
|
"items": {
|
|
138
138
|
"type": "string"
|
|
139
|
-
}
|
|
139
|
+
},
|
|
140
|
+
"description": "The environments that drifted."
|
|
140
141
|
},
|
|
141
142
|
"missing": {
|
|
142
143
|
"type": "array",
|
|
@@ -198,6 +199,20 @@
|
|
|
198
199
|
"drift"
|
|
199
200
|
],
|
|
200
201
|
"description": "The yodel command that sent it."
|
|
202
|
+
},
|
|
203
|
+
"changed": {
|
|
204
|
+
"type": "array",
|
|
205
|
+
"items": {
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"description": "drift: the declared objects that changed out of band."
|
|
209
|
+
},
|
|
210
|
+
"missing": {
|
|
211
|
+
"type": "array",
|
|
212
|
+
"items": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
"description": "drift: the declared objects that are gone."
|
|
201
216
|
}
|
|
202
217
|
}
|
|
203
218
|
}
|
package/dist/chant/process.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Running the `chant` CLI that yodel depends on, for the commands that have
|
|
3
|
-
* no library surface (`build`, `run`, `lifecycle diff`).
|
|
4
|
-
*
|
|
5
|
-
* Published chant ships TypeScript source, and its own bin runs
|
|
6
|
-
* `node --import <tsx loader> src/cli/main.ts`. yodel does the same with its
|
|
7
|
-
* own copy of tsx, so the chant it runs is the one in its own dependencies,
|
|
8
|
-
* not whatever `chant` is first on PATH. That chant's `bin/` goes first on the
|
|
9
|
-
* child's PATH, because chant's Op activities shell out to `chant` themselves
|
|
10
|
-
* (`lifecycleDiff` runs `chant lifecycle diff`).
|
|
11
|
-
*
|
|
12
|
-
* A child runs in chant's own words, not yodel's (#287): ../chant/apply.ts
|
|
13
|
-
* reads chant's `approve: chant approve ...` line from its output for the
|
|
14
|
-
* `chantApprove` field scripts use. `yodel chant <args>` is the line that
|
|
15
|
-
* runs chant in yodel's words (../commands/chant.ts).
|
|
16
|
-
*/
|
|
17
|
-
export interface ChantInstall {
|
|
18
|
-
/** The `@intentius/chant` package directory. */
|
|
19
|
-
root: string;
|
|
20
|
-
/** Its CLI entry, `src/cli/main.ts`. */
|
|
21
|
-
main: string;
|
|
22
|
-
/** Its `bin/`, which holds the `chant` script. */
|
|
23
|
-
bin: string;
|
|
24
|
-
/** The tsx loader to run it under, as a file URL. */
|
|
25
|
-
loader: string;
|
|
26
|
-
}
|
|
27
|
-
/** Where yodel's chant and tsx are installed. */
|
|
28
|
-
export declare function chantInstall(): ChantInstall;
|
|
29
|
-
export interface ChantResult {
|
|
30
|
-
code: number;
|
|
31
|
-
stdout: string;
|
|
32
|
-
stderr: string;
|
|
33
|
-
}
|
|
34
|
-
export interface RunChantOptions {
|
|
35
|
-
cwd: string;
|
|
36
|
-
env?: NodeJS.ProcessEnv;
|
|
37
|
-
/** Called with each chunk as it arrives, for output a person watches (an Op run). */
|
|
38
|
-
onStdout?: (text: string) => void;
|
|
39
|
-
onStderr?: (text: string) => void;
|
|
40
|
-
}
|
|
41
|
-
/** The environment a chant child runs with: the caller's, with chant's bin first on PATH. */
|
|
42
|
-
export declare function chantEnv(base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
43
|
-
/** Runs `chant <args>` in `cwd` and resolves with its exit code and output. Never rejects on a non-zero exit. */
|
|
44
|
-
export declare function runChant(args: readonly string[], options: RunChantOptions): Promise<ChantResult>;
|
|
45
|
-
/** The last line of `stdout` that parses as a JSON object: chant prints its `--json` document as one line, after any log lines. */
|
|
46
|
-
export declare function lastJsonLine(stdout: string): unknown;
|
package/dist/chant/process.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Running the `chant` CLI that yodel depends on, for the commands that have
|
|
3
|
-
* no library surface (`build`, `run`, `lifecycle diff`).
|
|
4
|
-
*
|
|
5
|
-
* Published chant ships TypeScript source, and its own bin runs
|
|
6
|
-
* `node --import <tsx loader> src/cli/main.ts`. yodel does the same with its
|
|
7
|
-
* own copy of tsx, so the chant it runs is the one in its own dependencies,
|
|
8
|
-
* not whatever `chant` is first on PATH. That chant's `bin/` goes first on the
|
|
9
|
-
* child's PATH, because chant's Op activities shell out to `chant` themselves
|
|
10
|
-
* (`lifecycleDiff` runs `chant lifecycle diff`).
|
|
11
|
-
*
|
|
12
|
-
* A child runs in chant's own words, not yodel's (#287): ../chant/apply.ts
|
|
13
|
-
* reads chant's `approve: chant approve ...` line from its output for the
|
|
14
|
-
* `chantApprove` field scripts use. `yodel chant <args>` is the line that
|
|
15
|
-
* runs chant in yodel's words (../commands/chant.ts).
|
|
16
|
-
*/
|
|
17
|
-
import { spawn } from "node:child_process";
|
|
18
|
-
import { createRequire } from "node:module";
|
|
19
|
-
import { dirname, delimiter, join } from "node:path";
|
|
20
|
-
import { pathToFileURL } from "node:url";
|
|
21
|
-
let install;
|
|
22
|
-
/** Where yodel's chant and tsx are installed. */
|
|
23
|
-
export function chantInstall() {
|
|
24
|
-
if (install)
|
|
25
|
-
return install;
|
|
26
|
-
const require = createRequire(import.meta.url);
|
|
27
|
-
// "." resolves to <root>/src/index.ts; package.json is not an export.
|
|
28
|
-
const root = dirname(dirname(require.resolve("@intentius/chant")));
|
|
29
|
-
install = {
|
|
30
|
-
root,
|
|
31
|
-
main: join(root, "src", "cli", "main.ts"),
|
|
32
|
-
bin: join(root, "bin"),
|
|
33
|
-
loader: pathToFileURL(require.resolve("tsx")).href,
|
|
34
|
-
};
|
|
35
|
-
return install;
|
|
36
|
-
}
|
|
37
|
-
/** The environment a chant child runs with: the caller's, with chant's bin first on PATH. */
|
|
38
|
-
export function chantEnv(base = process.env) {
|
|
39
|
-
const { bin } = chantInstall();
|
|
40
|
-
return { ...base, PATH: [bin, base.PATH ?? ""].filter(Boolean).join(delimiter), FORCE_COLOR: "0", NO_COLOR: "1" };
|
|
41
|
-
}
|
|
42
|
-
/** Runs `chant <args>` in `cwd` and resolves with its exit code and output. Never rejects on a non-zero exit. */
|
|
43
|
-
export function runChant(args, options) {
|
|
44
|
-
const { main, loader } = chantInstall();
|
|
45
|
-
return new Promise((resolvePromise, reject) => {
|
|
46
|
-
const child = spawn(process.execPath, ["--import", loader, main, ...args], {
|
|
47
|
-
cwd: options.cwd,
|
|
48
|
-
env: chantEnv(options.env),
|
|
49
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
50
|
-
});
|
|
51
|
-
let stdout = "";
|
|
52
|
-
let stderr = "";
|
|
53
|
-
child.stdout.setEncoding("utf8");
|
|
54
|
-
child.stderr.setEncoding("utf8");
|
|
55
|
-
child.stdout.on("data", (chunk) => {
|
|
56
|
-
stdout += chunk;
|
|
57
|
-
options.onStdout?.(chunk);
|
|
58
|
-
});
|
|
59
|
-
child.stderr.on("data", (chunk) => {
|
|
60
|
-
stderr += chunk;
|
|
61
|
-
options.onStderr?.(chunk);
|
|
62
|
-
});
|
|
63
|
-
child.on("error", reject);
|
|
64
|
-
child.on("close", (code, signal) => {
|
|
65
|
-
resolvePromise({ code: code ?? (signal ? 128 : 1), stdout, stderr });
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
/** The last line of `stdout` that parses as a JSON object: chant prints its `--json` document as one line, after any log lines. */
|
|
70
|
-
export function lastJsonLine(stdout) {
|
|
71
|
-
const lines = stdout.split("\n").map((l) => l.trim()).filter((l) => l.startsWith("{"));
|
|
72
|
-
for (const line of lines.reverse()) {
|
|
73
|
-
try {
|
|
74
|
-
return JSON.parse(line);
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
// A log line that happens to start with "{"; keep looking.
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
// A pretty-printed document spans lines; try the whole of stdout from its first "{".
|
|
81
|
-
const at = stdout.indexOf("{");
|
|
82
|
-
if (at >= 0) {
|
|
83
|
-
try {
|
|
84
|
-
return JSON.parse(stdout.slice(at));
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
// Not JSON.
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return undefined;
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=process.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../src/chant/process.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAazC,IAAI,OAAiC,CAAC;AAEtC,iDAAiD;AACjD,MAAM,UAAU,YAAY;IAC1B,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAC5B,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,sEAAsE;IACtE,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACnE,OAAO,GAAG;QACR,IAAI;QACJ,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC;QACzC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;QACtB,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;KACnD,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAgBD,6FAA6F;AAC7F,MAAM,UAAU,QAAQ,CAAC,OAA0B,OAAO,CAAC,GAAG;IAC5D,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;IAC/B,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,I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