@bensandee/tooling 0.81.1 → 0.83.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 CHANGED
@@ -28,12 +28,12 @@ The tool auto-detects project structure, CI platform, project type, and Docker p
28
28
 
29
29
  ### Project management
30
30
 
31
- | Command | Description |
32
- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
- | `tooling repo:sync [dir]` | Detect, generate, and sync project tooling (idempotent). First run prompts for release strategy, CI platform (if not detected), and formatter (if Prettier found). Subsequent runs are non-interactive. |
31
+ | Command | Description |
32
+ | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
33
+ | `tooling repo:sync [dir]` | Detect, generate, and sync project tooling (idempotent). First run prompts for release strategy, CI platform (if not detected), and formatter (if Prettier found). Subsequent runs are non-interactive. |
34
34
  | `tooling repo:sync --check [dir]` | Dry-run drift detection. Exits 1 if files would change, except drift confined to `.forgejo/workflows/`/`.github/workflows/`, which is reported on the `::bst-checks:: warn` marker at exit 0. CI-friendly. |
35
- | `tooling checks:run` | Run project checks -- `bst checks:run --help` lists the ordered steps. Flags: `--skip`, `--add`, `--fail-fast`, `--verbose`, `--with-coverage`, `--coverage`, `--no-coverage`. |
36
- | `tooling lint:types` | Type-aware linting (`oxlint --type-aware`, backed by `oxlint-tsgolint`). Flags: `--json`. See [Type-aware linting](#type-aware-linting) below. |
35
+ | `tooling checks:run` | Run project checks -- `bst checks:run --help` lists the ordered steps. Flags: `--skip`, `--add`, `--fail-fast`, `--verbose`, `--with-coverage`, `--coverage`, `--no-coverage`. |
36
+ | `tooling lint:types` | Type-aware linting (`oxlint --type-aware`, backed by `oxlint-tsgolint`). Flags: `--json`. See [Type-aware linting](#type-aware-linting) below. |
37
37
 
38
38
  **Flags:** `--yes` (accept all defaults), `--no-ci` (negates `--ci`), `--no-prompt` (negates `--prompt`), `--eslint-plugin`
39
39
 
@@ -163,24 +163,26 @@ Renovate moves the pinned `node` version, but only within its current major -- a
163
163
 
164
164
  ### Repository setup
165
165
 
166
- | Command | Description |
167
- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
168
- | `tooling setup:secrets` | Configure CI secrets (Forgejo or GitHub). Auto-detects platform from `package.json` repository URL. Flags: `--dry-run`, `--no-docker` (negates `--docker`). |
169
- | `tooling forgejo:secrets` | Manage Forgejo Actions secrets directly. Subcommands: `set`, `list`, `delete`. |
166
+ | Command | Description |
167
+ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
168
+ | `tooling setup:secrets` | Configure CI secrets (Forgejo or GitHub). Auto-detects platform from `package.json` repository URL. Flags: `--dry-run`, `--no-docker` (negates `--docker`). |
170
169
 
171
170
  `setup:secrets` detects the hosting platform from the `repository` field in `package.json`. For Forgejo repositories, it prompts for username and password, creates an access token with appropriate scopes, then sets `RELEASE_TOKEN` (and Docker secrets if Docker packages are detected). For GitHub repositories, it prompts for an existing Personal Access Token and uses `gh secret set` to configure secrets.
172
171
 
173
172
  ### Release management
174
173
 
175
- | Command | Description |
176
- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
177
- | `tooling release:changesets` | Changesets version/publish for Forgejo CI. A prerelease package moves only its own `<name>@<version>` tag; `<name>@latest`, `<name>@vX` and `<name>@vX.Y` move only for a release (see `release:simple`). Flags: `--dry-run`, `--verbose`. Env: `FORGEJO_SERVER_URL`, `FORGEJO_REPOSITORY`, `RELEASE_TOKEN`. |
178
- | `tooling release:simple` | Streamlined release using commit-and-tag-version. Flags: `--release-as`, `--first-release`, `--prerelease`, `--verbose`. Env: `RELEASE_TOKEN` (required on every platform). |
179
- | `tooling release:trigger` | Trigger a release workflow. |
180
- | `tooling workflow:dispatch` | Dispatch a `workflow_dispatch` event for any workflow in any repo on the same git host. Flags: `--repo`, `--workflow` (required), `--ref`, `--input key=value` (repeatable). |
181
- | `tooling forgejo:create-release` | Create a Forgejo release from a tag. |
182
- | `tooling changesets:merge` | Merge a changesets version PR. Gated on a live read of the PR; refuses an empty version PR. On Forgejo, a first `mergeable: false` re-reads once after a short delay before refusing, since the forge reports `false` both for a conflict and while still checking. |
183
- | `tooling webhook:send <url>` | POST a structured JSON release payload with HMAC-SHA256 auth. Best-effort by default: a delivery failure is logged, annotated `::error::` under CI, and the command exits 0; `--strict` restores a non-zero exit. Flags: `--tag`, `--repository`, `--server-url`, `--actor`, `--prerelease`, `--strict`. Secret from `WEBHOOK_SECRET` env var. |
174
+ | Command | Description |
175
+ | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
176
+ | `tooling release:changesets` | Changesets version/publish for Forgejo CI. A prerelease package moves only its own `<name>@<version>` tag; `<name>@latest`, `<name>@vX` and `<name>@vX.Y` move only for a release (see `release:simple`). Flags: `--dry-run`, `--verbose`. Env: `FORGEJO_SERVER_URL`, `FORGEJO_REPOSITORY`, `RELEASE_TOKEN`. |
177
+ | `tooling release:simple` | Streamlined release using commit-and-tag-version. Flags: `--release-as`, `--first-release`, `--prerelease`, `--verbose`. Env: `RELEASE_TOKEN` (required on every platform). |
178
+ | `tooling release:trigger` | Trigger a release workflow. |
179
+ | `tooling workflow:dispatch` | Dispatch a `workflow_dispatch` event for any workflow in any repo on the same git host. Flags: `--repo`, `--workflow` (required), `--ref`, `--input key=value` (repeatable). |
180
+ | `tooling changesets:merge` | Merge a changesets version PR. Gated on a live read of the PR; refuses an empty version PR. On Forgejo, a first `mergeable: false` re-reads once after a short delay before refusing, since the forge reports `false` both for a conflict and while still checking. |
181
+ | `tooling webhook:send <url>` | POST a structured JSON release payload with HMAC-SHA256 auth. Best-effort by default: a delivery failure is logged, annotated `::error::` under CI, and the command exits 0; `--strict` restores a non-zero exit. Flags: `--tag`, `--repository`, `--server-url`, `--actor`, `--prerelease`, `--strict`. Secret from `WEBHOOK_SECRET` env var. |
182
+
183
+ The Forgejo API commands -- secrets, webhooks, labels, `release:create`, `pr:checks`, `pr:list` and
184
+ `commit:status` -- are not on `bst`. They ship on the `bst-fj` bin of `@bensandee/forgejo-cli`
185
+ (see that package's README).
184
186
 
185
187
  #### `release:simple`
186
188
 
@@ -296,22 +298,22 @@ For a repo whose released artifact carries its version somewhere other than `pac
296
298
  }
297
299
  ```
298
300
 
299
- | Field | Description |
300
- | -------- | ------------------------------------------------------------------------------------- |
301
+ | Field | Description |
302
+ | -------- | ------------------------------------------------------------------------------------------ |
301
303
  | `file` | Path to the file whose version line gets stamped, relative to the project root (required). |
302
- | `prefix` | Literal string (never a pattern) the target line must start with (required). |
303
- | `suffix` | Literal string (never a pattern) the target line must end with (optional; default: none). |
304
+ | `prefix` | Literal string (never a pattern) the target line must start with (required). |
305
+ | `suffix` | Literal string (never a pattern) the target line must end with (optional; default: none). |
304
306
 
305
307
  `prefix` and `suffix` are literal strings, not regexes -- the target line is read straight off `prefix + version + suffix`:
306
308
 
307
309
  | Target | `prefix` | `suffix` |
308
- | ------------------------------------ | ---------------------------- | -------------- |
309
- | `Version: 1.2.3` (WordPress theme) | `"Version: "` | -- |
310
- | ` * Version: 1.2.3` (plugin header) | `" * Version: "` | -- |
311
- | `Version: v1.2.3` | `"Version: v"` | -- |
312
- | `__version__ = "1.2.3"` | `"__version__ = \""` | `"\""` |
313
- | `<version>1.2.3</version>` | `"<version>"` | `"</version>"` |
314
- | `define('FOO_VERSION', '1.2.3');` | `"define('FOO_VERSION', '"` | `"');"` |
310
+ | ----------------------------------- | --------------------------- | -------------- |
311
+ | `Version: 1.2.3` (WordPress theme) | `"Version: "` | -- |
312
+ | ` * Version: 1.2.3` (plugin header) | `" * Version: "` | -- |
313
+ | `Version: v1.2.3` | `"Version: v"` | -- |
314
+ | `__version__ = "1.2.3"` | `"__version__ = \""` | `"\""` |
315
+ | `<version>1.2.3</version>` | `"<version>"` | `"</version>"` |
316
+ | `define('FOO_VERSION', '1.2.3');` | `"define('FOO_VERSION', '"` | `"');"` |
315
317
 
316
318
  `release:assets` stamps every configured file before building assets, then verifies the stamp survived the build. Exactly one line in the file must match `prefix`/`suffix` or the release fails loudly -- zero matches means the config is broken, and more than one is an ambiguous config that needs a more specific `prefix` or a second entry. The stamp is never committed: the tracked copy of the file keeps its placeholder version on purpose, so there is only ever one source of truth (`package.json#version`) and nothing to drift. Run `bst release:assets --dry-run` to rehearse a `versionStamp` config locally, with no forge access and no release -- the rehearsal does still write the stamp, so it leaves the tracked file modified in your working tree. Discard it with `git checkout -- <file>`; committing it is exactly the drift this design exists to prevent.
317
319
 
@@ -502,7 +504,7 @@ When `package.json#repository` and `.tooling.json#registryHost` are both absent
502
504
 
503
505
  Registry-specific names keep one credential per registry, so a repo publishing to more than one never has to decide which registry the generic pair belongs to.
504
506
 
505
- **Names a forge will not accept.** A secret name must match `[A-Za-z_][A-Za-z0-9_]*` and must not start with `FORGEJO_`, `GITEA_`, `GITHUB_`, or a digit -- Forgejo answers `invalid secret name` and refuses to create it. The generator sanitizes every derived name against those rules, which is why `code.orangebikelabs.com` is `OBL_REGISTRY_*` rather than the `FORGEJO_*` the hostname would suggest, and why a host like `10.0.0.5:5000` or `forgejo.example.com` derives a `REGISTRY_`-prefixed name. `bst forgejo:secrets set` refuses an invalid name up front rather than passing it to the API.
507
+ **Names a forge will not accept.** A secret name must match `[A-Za-z_][A-Za-z0-9_]*` and must not start with `FORGEJO_`, `GITEA_`, `GITHUB_`, or a digit -- Forgejo answers `invalid secret name` and refuses to create it. The generator sanitizes every derived name against those rules, which is why `code.orangebikelabs.com` is `OBL_REGISTRY_*` rather than the `FORGEJO_*` the hostname would suggest, and why a host like `10.0.0.5:5000` or `forgejo.example.com` derives a `REGISTRY_`-prefixed name. `bst-fj secrets set` refuses an invalid name up front rather than passing it to the API.
506
508
 
507
509
  **Forgejo setup:** On Forgejo, the username secret is your Forgejo account username, and the password secret can reuse the same token as `RELEASE_TOKEN`. The token needs write permissions on the org, package, and repository scopes. These permissions should be set for the **user** if the package is under a user namespace (e.g. `bensandee`), or the **organization** if it's under an org namespace (e.g. `orangebikelabs`). After migrating, the old `DOCKER_USERNAME` / `DOCKER_PASSWORD` user/org-level secrets can be deleted once every consumer has been regenerated.
508
510
 
@@ -619,7 +621,7 @@ There is exactly one credential to be careful with, and its lifetime is the part
619
621
 
620
622
  | | Board token | Session cookie it mints |
621
623
  | --------- | ----------------------------------------------------------------- | ----------------------- |
622
- | Lifetime | the agent **process** -- a service, so weeks | 12 hours |
624
+ | Lifetime | the agent **process** -- a service, so weeks | 12 hours |
623
625
  | Scope | label transitions + comments + kill, every repo the bot can write | the board, nothing else |
624
626
  | Holders | one, shared | one browser |
625
627
  | Persisted | never | never |