@erdoai/cli 0.99.0 → 0.100.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/index.js +16 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4132,7 +4132,7 @@ function renderDecision(detail) {
|
|
|
4132
4132
|
["class", d.decision_class],
|
|
4133
4133
|
["source", d.source],
|
|
4134
4134
|
["applies", d.applicability === "standing" ? "standing (until superseded)" : "one-off authorization"],
|
|
4135
|
-
["decided by", d.decider_kind]
|
|
4135
|
+
["decided by", d.decided_by_name ? `${d.decided_by_name} (${d.decider_kind})` : d.decider_kind]
|
|
4136
4136
|
];
|
|
4137
4137
|
if (d.subject_label) facts.push(["subject", d.subject_label]);
|
|
4138
4138
|
if (d.execution_status) facts.push(["execution", d.execution_status]);
|
|
@@ -4545,7 +4545,7 @@ function renderAttentionItemReport(item, report) {
|
|
|
4545
4545
|
console.log(` ${d.slug} \u2014 ${d.what}`);
|
|
4546
4546
|
if (d.why) console.log(` why: ${d.why}`);
|
|
4547
4547
|
if (d.alternatives_considered) console.log(` alternatives considered: ${d.alternatives_considered}`);
|
|
4548
|
-
console.log(` decided by: ${d.decider_kind}`);
|
|
4548
|
+
console.log(` decided by: ${d.decided_by_name ? `${d.decided_by_name} (${d.decider_kind})` : d.decider_kind}`);
|
|
4549
4549
|
console.log(` status: ${d.status}`);
|
|
4550
4550
|
if (d.outcome_label) console.log(` outcome: ${d.outcome_label}`);
|
|
4551
4551
|
} else {
|
|
@@ -7432,7 +7432,7 @@ pipelinesCmd.command("get <slug>").description("Show one event pipeline \u2014 s
|
|
|
7432
7432
|
});
|
|
7433
7433
|
pipelinesCmd.command("update <slug>").description(
|
|
7434
7434
|
"Update an event pipeline's editable fields \u2014 omitted fields keep their current values (merge). Use get first for the current transform/actions; --transform-js/--pipeline accept @file"
|
|
7435
|
-
).option("--name <name>", "new name").option("--description <description>", "new description").option("--state <state>", "new state: active, disabled, or proposed").option("--transform-js <jsOr@file>", "new transform \u2014 function transform(event) { \u2026 } (or @path to a file)").option(
|
|
7435
|
+
).option("--name <name>", "new name").option("--description <description>", "new description").option("--state <state>", "new state: active, disabled, or proposed").option("--transform-js <jsOr@file>", "new transform \u2014 function transform(event) { \u2026 } (or @path to a file)").option("--turnstile <jsonOr@file>", `optional managed form protection settings; use @file for widget credentials, or '{"enabled":false}' to disable`).option(
|
|
7436
7436
|
"--pipeline <jsonOr@file>",
|
|
7437
7437
|
`replacement ordered actions array as JSON (or @path to a file), e.g. '[{"type":"dataset.write","key_column":"email","dataset_slug":"acme-leads"}]'`
|
|
7438
7438
|
).action(
|
|
@@ -7441,6 +7441,18 @@ pipelinesCmd.command("update <slug>").description(
|
|
|
7441
7441
|
if (opts.name !== void 0) body.name = opts.name;
|
|
7442
7442
|
if (opts.description !== void 0) body.description = opts.description;
|
|
7443
7443
|
if (opts.state !== void 0) body.state = opts.state;
|
|
7444
|
+
const turnstileRaw = readMaybeFile(opts.turnstile);
|
|
7445
|
+
if (turnstileRaw !== void 0) {
|
|
7446
|
+
try {
|
|
7447
|
+
const protection = JSON.parse(turnstileRaw);
|
|
7448
|
+
if (!protection || Array.isArray(protection) || typeof protection !== "object" || typeof protection.enabled !== "boolean") {
|
|
7449
|
+
throw new Error("invalid settings");
|
|
7450
|
+
}
|
|
7451
|
+
body.turnstile = protection;
|
|
7452
|
+
} catch {
|
|
7453
|
+
fail(new Error("--turnstile must be a JSON object with an enabled boolean"));
|
|
7454
|
+
}
|
|
7455
|
+
}
|
|
7444
7456
|
const transformJs = readMaybeFile(opts.transformJs);
|
|
7445
7457
|
if (transformJs !== void 0) body.transform_js = transformJs;
|
|
7446
7458
|
const pipelineRaw = readMaybeFile(opts.pipeline);
|
|
@@ -7456,7 +7468,7 @@ pipelinesCmd.command("update <slug>").description(
|
|
|
7456
7468
|
if (Object.keys(body).length === 0) {
|
|
7457
7469
|
fail(
|
|
7458
7470
|
new Error(
|
|
7459
|
-
"nothing to update \u2014 pass at least one of --name, --description, --state, --transform-js, --pipeline"
|
|
7471
|
+
"nothing to update \u2014 pass at least one of --name, --description, --state, --transform-js, --pipeline, --turnstile"
|
|
7460
7472
|
)
|
|
7461
7473
|
);
|
|
7462
7474
|
}
|