@odla-ai/cli 0.35.0 → 0.35.1
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 +15 -4
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-EG23MPUC.js → chunk-SRL2TN24.js} +16 -5
- package/dist/{chunk-EG23MPUC.js.map → chunk-SRL2TN24.js.map} +1 -1
- package/dist/{cli-Z5NSTS75.js → cli-HS35QLXR.js} +2 -2
- package/dist/index.cjs +15 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{cli-Z5NSTS75.js.map → cli-HS35QLXR.js.map} +0 -0
package/dist/bin.cjs
CHANGED
|
@@ -14452,9 +14452,20 @@ async function bySlug(ctx, slug) {
|
|
|
14452
14452
|
"GET",
|
|
14453
14453
|
`/runbook?app=${encodeURIComponent(ctx.appId)}&slug=${encodeURIComponent(slug)}&limit=1`
|
|
14454
14454
|
);
|
|
14455
|
-
const
|
|
14456
|
-
if (
|
|
14457
|
-
|
|
14455
|
+
const filtered = page2.records.find((record11) => record11.slug === slug);
|
|
14456
|
+
if (filtered) return filtered;
|
|
14457
|
+
const limit = 100;
|
|
14458
|
+
for (let offset = 0; ; offset += limit) {
|
|
14459
|
+
const fallback = await call(
|
|
14460
|
+
ctx,
|
|
14461
|
+
"GET",
|
|
14462
|
+
`/runbook?app=${encodeURIComponent(ctx.appId)}&limit=${limit}&offset=${offset}`
|
|
14463
|
+
);
|
|
14464
|
+
const found = fallback.records.find((record11) => record11.slug === slug);
|
|
14465
|
+
if (found) return found;
|
|
14466
|
+
if (!fallback.records.length || offset + fallback.records.length >= fallback.total) break;
|
|
14467
|
+
}
|
|
14468
|
+
throw new Error(`no runbook "${slug}" in ${ctx.appId}`);
|
|
14458
14469
|
}
|
|
14459
14470
|
function readBody(file, inline) {
|
|
14460
14471
|
if (inline !== void 0) return inline;
|
|
@@ -14538,7 +14549,7 @@ async function runbookRevert(ctx, slug, version) {
|
|
|
14538
14549
|
ctx,
|
|
14539
14550
|
"POST",
|
|
14540
14551
|
`/runbook/${encodeURIComponent(runbook.id)}/revert`,
|
|
14541
|
-
{ version }
|
|
14552
|
+
{ version, expectedVersion: runbook.version }
|
|
14542
14553
|
);
|
|
14543
14554
|
if (ctx.json) return ctx.out.log(JSON.stringify(result, null, 2));
|
|
14544
14555
|
ctx.out.log(`${slug} reverted to v${version}, now v${result.record?.version ?? runbook.version + 1}`);
|