@wirecat/cli-base 0.44.4 → 0.45.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/README.md +2 -1
- package/config/wirecat/biome.base.json +39 -2
- package/config/wirecat/manifest.json +6 -9
- package/config/wirecat/no-deep-wirecat-import.grit +15 -0
- package/dist/commands/document.d.ts +1 -1
- package/dist/commands/document.d.ts.map +1 -1
- package/dist/commands/document.js +1 -1
- package/dist/commands/document.js.map +1 -1
- package/dist/commands/index.d.ts +2 -121
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +1 -105
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/page.d.ts +1 -1
- package/dist/commands/page.d.ts.map +1 -1
- package/dist/commands/registry.d.ts +122 -0
- package/dist/commands/registry.d.ts.map +1 -0
- package/dist/commands/registry.js +106 -0
- package/dist/commands/registry.js.map +1 -0
- package/dist/standards/fields.d.ts +10 -0
- package/dist/standards/fields.d.ts.map +1 -0
- package/dist/standards/fields.js +17 -0
- package/dist/standards/fields.js.map +1 -0
- package/dist/standards/index.d.ts +1 -5
- package/dist/standards/index.d.ts.map +1 -1
- package/dist/standards/index.js +1 -5
- package/dist/standards/index.js.map +1 -1
- package/dist/standards/output.d.ts +0 -8
- package/dist/standards/output.d.ts.map +1 -1
- package/dist/standards/output.js +1 -15
- package/dist/standards/output.js.map +1 -1
- package/dist/standards/tables.d.ts +6 -0
- package/dist/standards/tables.d.ts.map +1 -0
- package/dist/standards/tables.js +6 -0
- package/dist/standards/tables.js.map +1 -0
- package/docs/standards/architecture.md +3 -4
- package/docs/standards/ci.md +48 -19
- package/docs/standards/docs.md +4 -7
- package/docs/standards/new-cli.md +3 -0
- package/docs/standards/releases.md +5 -6
- package/docs/standards/security.md +1 -1
- package/docs/standards/testing.md +9 -12
- package/docs/standards/toolchain.md +13 -12
- package/package.json +5 -1
|
@@ -79,13 +79,15 @@ cli-testing, cli-docs, plus community itself.
|
|
|
79
79
|
|
|
80
80
|
- **Why:** users install the CLIs with either runtime, and a static import of one runtime's module fails to load on
|
|
81
81
|
the other.
|
|
82
|
-
- **Enforced by:** `pnpm smoke:bun` · `node-ci.yml:bun
|
|
82
|
+
- **Enforced by:** `pnpm smoke:bun` · `node-ci.yml:bun` · `node-ci.yml:platforms` (the unit suite on Windows and
|
|
83
|
+
macOS).
|
|
83
84
|
- **Example:** `"engines": { "node": ">=22" }` in `package.json`. Full validation runs on Node 24. `bun test` cannot
|
|
84
85
|
run the vitest suite, so `scripts/smoke.ts` runs the built exports with plain assertions, and the Bun job runs it
|
|
85
86
|
(`pnpm build && pnpm smoke:bun`). A new entry point gets a line there. Node 22 runs in the Windows install matrix of
|
|
86
87
|
tg, max and wa, in zoom's full validation and in cli-core's old-Node job.
|
|
87
88
|
- **Exceptions:** cli-docs and community publish no runtime package. memo, drive and cli-base do not run Node 22 in
|
|
88
|
-
any workflow yet.
|
|
89
|
+
any workflow yet. The unit suite runs on Windows and macOS for tg, max and drive (`platforms: true`); zoom and
|
|
90
|
+
memo still fail tests there, so theirs is off.
|
|
89
91
|
- **Applies to:** the CLIs, cli-core and cli-base. **Since:** cli-base 0.41.0. **Rulings:** NEED-11.
|
|
90
92
|
|
|
91
93
|
### WC-TOOL-7 · Let Biome format the code, and do not format by hand
|
|
@@ -152,22 +154,22 @@ cli-testing, cli-docs, plus community itself.
|
|
|
152
154
|
### WC-TOOL-13 · Cap every file at 1,000 lines with Biome
|
|
153
155
|
|
|
154
156
|
- **Why:** a file past 1,000 lines always holds more than one job; the cap stops it before review has to.
|
|
155
|
-
- **Enforced by:**
|
|
156
|
-
- **Example:** `biome.json` sets the style rule
|
|
157
|
-
off for
|
|
157
|
+
- **Enforced by:** `pnpm lint` · `standards.yml:standards` (the shared Biome base, like WC-TOOL-8).
|
|
158
|
+
- **Example:** the shared Biome base (community `standards/configs/biome.base.json`) sets the style rule
|
|
159
|
+
noExcessiveLinesPerFile to error with `"maxLines": 1000`, and turns it off for tests, `fixtures/` and `generated/`. Below the cap, the review signals at 300 and 500 lines are
|
|
158
160
|
in [WC-LAY-7](layout.md#wc-lay-7--treat-300-and-500-lines-as-review-signals).
|
|
159
161
|
- **Exceptions:** a file that is one cohesive unit may get its own override, listed by path in `biome.json` (tg
|
|
160
|
-
`src/telegram/adapter.ts`; four files in cli-core). A smaller cap is allowed: zoom uses 500. cli-
|
|
161
|
-
|
|
162
|
+
`src/telegram/adapter.ts`; four files in cli-core). A smaller cap is allowed: zoom uses 500. cli-docs turns it off for
|
|
163
|
+
stylesheets. Biome reads only JavaScript and TypeScript, so the cap does not cover
|
|
162
164
|
code in another language, such as wa's Go engine; the review signals of WC-LAY-7 still apply to it.
|
|
163
165
|
- **Applies to:** the ten repositories. **Since:** cli-base 0.41.0. **Rulings:** none.
|
|
164
166
|
|
|
165
167
|
### WC-TOOL-14 · Turn on the import cycle rule
|
|
166
168
|
|
|
167
169
|
- **Why:** a cycle makes load order decide which value a module sees, and the failure shows only at run time.
|
|
168
|
-
- **Enforced by:**
|
|
169
|
-
- **Example:**
|
|
170
|
-
- **Exceptions:**
|
|
170
|
+
- **Enforced by:** `pnpm lint` · `standards.yml:standards` (the shared Biome base, like WC-TOOL-8).
|
|
171
|
+
- **Example:** the shared Biome base sets the suspicious rule noImportCycles to error.
|
|
172
|
+
- **Exceptions:** none.
|
|
171
173
|
- **Applies to:** the ten repositories. **Since:** cli-base 0.41.0. **Rulings:** none.
|
|
172
174
|
|
|
173
175
|
### WC-TOOL-15 · Declare layer boundaries as restricted imports in `biome.json`
|
|
@@ -178,8 +180,7 @@ cli-testing, cli-docs, plus community itself.
|
|
|
178
180
|
folders that layer may not import, and a `message` that says why, such as "commands speak the domain model; only
|
|
179
181
|
`src/client.ts` may reach the protocol". Which layers exist and which way they depend is on the
|
|
180
182
|
[Architecture page](architecture.md).
|
|
181
|
-
- **Exceptions:** cli-base and cli-docs have no layer overrides.
|
|
182
|
-
the earlier ones today, so they catch nothing until it is fixed.
|
|
183
|
+
- **Exceptions:** cli-base and cli-docs have no layer overrides.
|
|
183
184
|
- **Applies to:** the CLIs, cli-core and cli-testing. **Since:** cli-base 0.41.0. **Rulings:** none.
|
|
184
185
|
|
|
185
186
|
### WC-TOOL-16 · Run the command lint on the built CLI, and let its baseline only shrink
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "The parts every command line tool needs: output modes, terminal rendering, error model, exit codes, credentials, clocks",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
"types": "./dist/standards/index.d.ts",
|
|
82
82
|
"default": "./dist/standards/index.js"
|
|
83
83
|
},
|
|
84
|
+
"./standards/tables": {
|
|
85
|
+
"types": "./dist/standards/tables.d.ts",
|
|
86
|
+
"default": "./dist/standards/tables.js"
|
|
87
|
+
},
|
|
84
88
|
"./biome": "./config/biome.base.json",
|
|
85
89
|
"./tsconfig.base.json": "./config/tsconfig.base.json",
|
|
86
90
|
"./tsconfig.test.json": "./config/tsconfig.test.json",
|