@opengroow/groowhub-cli 0.0.0-stage → 0.1.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 +34 -2
- package/dist/cli.js +9572 -0
- package/package.json +34 -4
package/README.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @opengroow/groowhub-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The tooling of the OpenGroow hub repository (groowhub). It checks and builds what the hub distributes with the code the product runs at installation, so the hub validates and releases its packages in CI without a checkout of the product.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# Templates
|
|
7
|
+
npx @opengroow/groowhub-cli@0.1.0 validate template packages/seo [--tag seo@1.0.0]
|
|
8
|
+
npx @opengroow/groowhub-cli@0.1.0 validate index index.json
|
|
9
|
+
|
|
10
|
+
# Publisher packages (ADR-072)
|
|
11
|
+
npx @opengroow/groowhub-cli@0.1.0 validate publisher packages/publisher/postiz
|
|
12
|
+
npx @opengroow/groowhub-cli@0.1.0 validate index publishers.json --kind publisher
|
|
13
|
+
npx @opengroow/groowhub-cli@0.1.0 pack publisher packages/publisher/postiz --out dist [--index publishers.json]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Exit code 0 when valid, 1 otherwise; every problem is printed. `pack publisher` bundles `src/index.ts` into `dist/plugin.mjs`, adds `manifest.json` and `data/`, and runs `npm pack`; with `--index` it also writes the package's entry in a `publishers.json` (local trials only: in a release a maintainer adds the entry in a reviewed PR).
|
|
17
|
+
|
|
18
|
+
From the OpenGroow checkout, `pnpm publisher:pack <folder> --out ../groowhub/dist --index ../groowhub/publishers.json` runs the same command from source (see `docs/PUBLISHER_PLUGINS.md`).
|
|
19
|
+
|
|
20
|
+
## Versions
|
|
21
|
+
|
|
22
|
+
The CLI is a bundle of `packages/agent-templates` (`validate-package.ts`, `hub-index.ts`, ...) and `packages/publisher-sdk` (manifest and capabilities readers) taken at publication time. A package that uses a field added after that version is rejected as an unknown key: publish a new version with each change to a manifest reader, and pin the version in the hub CI. `esbuild` is the only runtime dependency (used by `pack`).
|
|
23
|
+
|
|
24
|
+
It replaces `@opengroow/template-validator` (last version 0.2.2, deprecated): `package` became `validate template`.
|
|
25
|
+
|
|
26
|
+
## Publishing
|
|
27
|
+
|
|
28
|
+
The code is not copied anywhere: `dist/cli.js` is bundled from the repository at publication time, so the published CLI is exactly the readers of the commit it is built from. The **Publish groowhub CLI** workflow does it on a tag:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# bump "version" in this package.json, merge, then:
|
|
32
|
+
git tag groowhub-cli@0.1.1 && git push origin groowhub-cli@0.1.1
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
There is no npm token: the workflow uses npm trusted publishing (OIDC), configured on npmjs.com for this package (Settings, Trusted Publisher, GitHub Actions; repository and workflow file `publish-groowhub-cli.yml`). Update that setting if the repository or the workflow file is renamed; the `repository` field of this package.json must also match the repository once it is public. Tag only from `main`.
|