@odla-ai/cli 0.19.0 → 0.20.0
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/dist/bin.cjs +19 -9
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-QMA5OGKQ.js → chunk-I4XURPUK.js} +20 -10
- package/dist/{chunk-QMA5OGKQ.js.map → chunk-I4XURPUK.js.map} +1 -1
- package/dist/index.cjs +19 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -6439,8 +6439,8 @@ Usage:
|
|
|
6439
6439
|
odla-ai runbook list [--app <id>] [--all] [--q <text>] [--json]
|
|
6440
6440
|
odla-ai runbook comment <slug> --body "..." [--app <id>]
|
|
6441
6441
|
odla-ai runbook get <slug> [--app <id>]
|
|
6442
|
-
odla-ai runbook new <slug> --title <t> --file <path|-> [--summary <s>] [--app <id>]
|
|
6443
|
-
odla-ai runbook edit <slug> [--file <path|->|--body "..."] [--note <why>] [--app <id>]
|
|
6442
|
+
odla-ai runbook new <slug> --title <t> --file <path|-> [--summary <s>] [--requires <specs>] [--app <id>]
|
|
6443
|
+
odla-ai runbook edit <slug> [--file <path|->|--body "..."] [--note <why>] [--requires <specs>] [--app <id>]
|
|
6444
6444
|
odla-ai runbook import <dir> [--visibility operator|admin] [--dry-run] [--app <id>]
|
|
6445
6445
|
odla-ai runbook publish <slug> [--app <id>]
|
|
6446
6446
|
odla-ai runbook visibility <slug> <operator|admin> [--app <id>]
|
|
@@ -7913,17 +7913,19 @@ async function runbookGet(ctx, slug) {
|
|
|
7913
7913
|
if (unmet.length) ctx.out.error(describeUnmet(slug, unmet));
|
|
7914
7914
|
ctx.out.log(runbook.body);
|
|
7915
7915
|
}
|
|
7916
|
-
async function runbookNew(ctx, slug, title, body, summary) {
|
|
7916
|
+
async function runbookNew(ctx, slug, title, body, summary, requires) {
|
|
7917
7917
|
const created = await call(ctx, "POST", "/runbook", {
|
|
7918
7918
|
appId: ctx.appId,
|
|
7919
|
-
input: { slug, title, body, ...summary ? { summary } : {} }
|
|
7919
|
+
input: { slug, title, body, ...summary ? { summary } : {}, ...requires ? { requires } : {} }
|
|
7920
7920
|
});
|
|
7921
7921
|
ctx.out.log(ctx.json ? JSON.stringify(created, null, 2) : `created ${slug} (${created.id})`);
|
|
7922
7922
|
}
|
|
7923
|
-
async function runbookEdit(ctx, slug, body, note) {
|
|
7923
|
+
async function runbookEdit(ctx, slug, body, note, requires) {
|
|
7924
7924
|
const runbook = await bySlug(ctx, slug);
|
|
7925
7925
|
const result = await call(ctx, "PATCH", `/runbook/${encodeURIComponent(runbook.id)}`, {
|
|
7926
|
-
|
|
7926
|
+
// An empty --requires clears the declaration; omitting the flag leaves
|
|
7927
|
+
// whatever is there, so an ordinary body edit never drops it.
|
|
7928
|
+
patch: { body, ...note ? { note } : {}, ...requires === void 0 ? {} : { requires: requires || null } }
|
|
7927
7929
|
});
|
|
7928
7930
|
if (ctx.json) return ctx.out.log(JSON.stringify(result, null, 2));
|
|
7929
7931
|
ctx.out.log(`${slug} \u2192 v${result.record?.version ?? runbook.version + 1}`);
|
|
@@ -8686,7 +8688,8 @@ var ALLOWED2 = [
|
|
|
8686
8688
|
"visibility",
|
|
8687
8689
|
"dry-run",
|
|
8688
8690
|
"limit",
|
|
8689
|
-
"base"
|
|
8691
|
+
"base",
|
|
8692
|
+
"requires"
|
|
8690
8693
|
];
|
|
8691
8694
|
function requireSlug(slug, action) {
|
|
8692
8695
|
if (!slug) throw new Error(`"runbook ${action}" needs a slug, e.g. "odla-ai runbook ${action} release"`);
|
|
@@ -8807,7 +8810,8 @@ async function runbookCommand(parsed, deps = {}) {
|
|
|
8807
8810
|
name,
|
|
8808
8811
|
stringOpt(parsed.options.title) ?? name,
|
|
8809
8812
|
readBody(stringOpt(parsed.options.file), stringOpt(parsed.options.body)),
|
|
8810
|
-
stringOpt(parsed.options.summary)
|
|
8813
|
+
stringOpt(parsed.options.summary),
|
|
8814
|
+
stringOpt(parsed.options.requires)
|
|
8811
8815
|
);
|
|
8812
8816
|
}
|
|
8813
8817
|
case "edit": {
|
|
@@ -8816,7 +8820,13 @@ async function runbookCommand(parsed, deps = {}) {
|
|
|
8816
8820
|
const inline = stringOpt(parsed.options.body);
|
|
8817
8821
|
const body = file === void 0 && inline === void 0 ? await editRunbook(ctx, name) : readBody(file, inline);
|
|
8818
8822
|
if (body === null) return ctx.out.log(`${name} unchanged; nothing written`);
|
|
8819
|
-
return runbookEdit(
|
|
8823
|
+
return runbookEdit(
|
|
8824
|
+
ctx,
|
|
8825
|
+
name,
|
|
8826
|
+
body,
|
|
8827
|
+
stringOpt(parsed.options.note),
|
|
8828
|
+
parsed.options.requires === void 0 ? void 0 : stringOpt(parsed.options.requires) ?? ""
|
|
8829
|
+
);
|
|
8820
8830
|
}
|
|
8821
8831
|
case "import": {
|
|
8822
8832
|
const dir = parsed.positionals[2];
|