@letterstory/cli 0.25.3 → 0.25.4
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/lib/cli.mjs +1 -1
- package/lib/commands/shredder.mjs +0 -16
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
} from "./commands.mjs";
|
|
45
45
|
|
|
46
46
|
// Keep in sync with cli/package.json.
|
|
47
|
-
export const VERSION = "0.25.
|
|
47
|
+
export const VERSION = "0.25.4";
|
|
48
48
|
|
|
49
49
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
50
50
|
// can't accidentally swallow the id as --json's value.
|
|
@@ -35,19 +35,6 @@ function readJsonFileFlag(flags, flag) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
/** `--<flag> <path>` → the file's text, or undefined when the flag is not set. */
|
|
39
|
-
function readTextFileFlag(flags, flag) {
|
|
40
|
-
const path = flagStr(flags[flag]);
|
|
41
|
-
if (path === undefined) return undefined;
|
|
42
|
-
try {
|
|
43
|
-
return readFileSync(path, "utf8");
|
|
44
|
-
} catch (error) {
|
|
45
|
-
throw new CliError(
|
|
46
|
-
`Could not read --${flag} ${path}: ${error instanceof Error ? error.message : String(error)}`
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
38
|
/**
|
|
52
39
|
* How every command in this file sources its tool's inputs — see `argsFromFlags` in
|
|
53
40
|
* shared.mjs and `scripts/parity-check.ts`, which diffs these keys against each tool's
|
|
@@ -63,12 +50,9 @@ export const ARGS = {
|
|
|
63
50
|
format: { flag: "format", enum: ["auto", "html", "markdown"] },
|
|
64
51
|
// How hard to rewrite. Validated service-side; sent only when the caller asked.
|
|
65
52
|
aggression: { flag: "aggression", enum: ["standard", "high", "max"] },
|
|
66
|
-
coverage: { flag: "coverage", type: "num" },
|
|
67
53
|
attempts_per_unit: { flag: "attempts", type: "num" },
|
|
68
54
|
// Hold every rewrite to the live writing rules. A trade, not a free win.
|
|
69
55
|
apply_rules: { flag: "apply-rules", type: "bool" },
|
|
70
|
-
// The facts each rewrite must conserve — a file, since it is a document's worth of text.
|
|
71
|
-
evidence: { value: (flags) => readTextFileFlag(flags, "evidence-file") },
|
|
72
56
|
// ASYNCHRONOUS BY DEFAULT — `--sync` is the opt-out (see shredderRun for why).
|
|
73
57
|
async: { value: (flags) => (flags.sync === true ? undefined : true) },
|
|
74
58
|
},
|