perseid 0.7.2 → 0.8.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 +5 -5
- package/checksums.json +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,13 +24,13 @@ In the repository that holds your OpenAPI spec:
|
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
26
|
npx perseid init # pick the languages and where the SDKs live
|
|
27
|
-
gh secret set
|
|
27
|
+
gh secret set SDK_GITHUB_TOKEN # paste a fine-grained token, see below
|
|
28
28
|
git add -A && git commit -m "ci: generate SDKs with perseid" && git push
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
The push runs the `SDKs` workflow, which opens a pull request with every SDK.
|
|
32
32
|
|
|
33
|
-
`
|
|
33
|
+
`SDK_GITHUB_TOKEN` is a [fine-grained token](https://github.com/settings/personal-access-tokens/new)
|
|
34
34
|
with **Contents**, **Pull requests** and **Workflows** set to read and write, on this repository
|
|
35
35
|
and the SDK repositories. Fine-grained tokens expire, and perseid warns 30 days before.
|
|
36
36
|
`npx perseid app` sets up a GitHub App instead, which doesn't expire.
|
|
@@ -114,10 +114,10 @@ The Actions are pinned to the release line of the perseid that wrote them, such
|
|
|
114
114
|
| One SDKs repository | `repo = "acme/api-sdks"` | `acme/api-sdks`, a folder per language |
|
|
115
115
|
|
|
116
116
|
- perseid never creates repositories: `gh repo create acme/api-typescript`.
|
|
117
|
-
- Add `
|
|
117
|
+
- Add `SDK_GITHUB_TOKEN` to each SDK repository too: its release workflow uses it.
|
|
118
118
|
- Spec in another repository? Run `perseid init` in the SDKs repository, then
|
|
119
119
|
`npx perseid connect acme/api-sdks` in the API repository. It writes a workflow pushing the
|
|
120
|
-
spec,
|
|
120
|
+
spec, as the App of `perseid app` or with a token.
|
|
121
121
|
- A spec served at a URL needs no `connect`: `sdks.yml` fetches it daily.
|
|
122
122
|
|
|
123
123
|
See [repository layouts](docs/ci.md#repository-layouts).
|
|
@@ -129,7 +129,7 @@ See [repository layouts](docs/ci.md#repository-layouts).
|
|
|
129
129
|
| `init` | Write `perseid.toml` and the workflows. Local only: nothing is sent to GitHub. |
|
|
130
130
|
| `generate` | Write the SDKs. `--out <dir>` previews, `--check` fails on drift, `--pr` opens pull requests. |
|
|
131
131
|
| `connect <owner/repo>` | In the API repository: push the spec to the SDKs repository. |
|
|
132
|
-
| `app` | Set up a GitHub App to open the pull requests instead of `
|
|
132
|
+
| `app` | Set up a GitHub App to open the pull requests instead of `SDK_GITHUB_TOKEN`. |
|
|
133
133
|
| `status` | Check the setup: secrets, workflows, last spec pushed, open pull requests, last runs. |
|
|
134
134
|
| `inspect` | Print the model the templates receive, as JSON. |
|
|
135
135
|
| `eject <lang>` | Copy the built-in templates and runtime of a language to `.perseid/` to edit them. |
|
package/checksums.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"perseid-aarch64-apple-darwin.tar.gz": "
|
|
3
|
-
"perseid-aarch64-unknown-linux-musl.tar.gz": "
|
|
4
|
-
"perseid-x86_64-apple-darwin.tar.gz": "
|
|
5
|
-
"perseid-x86_64-unknown-linux-musl.tar.gz": "
|
|
2
|
+
"perseid-aarch64-apple-darwin.tar.gz": "fe9aafd26554d3d13acc2bce0c5c6888d704886da615aa0f4481195849b229aa",
|
|
3
|
+
"perseid-aarch64-unknown-linux-musl.tar.gz": "52d8da3778f3724575538d4097615176be8ae29d696c99aa8a1d6ae453939b81",
|
|
4
|
+
"perseid-x86_64-apple-darwin.tar.gz": "1f912dda16fd7a6a7f20bb1143c166e34f425bdcd50144f25a697d7b0ac9bb61",
|
|
5
|
+
"perseid-x86_64-unknown-linux-musl.tar.gz": "965235913d83116251993a424cb1791d09bdac84b6a2ba0b29f6568b0a330c01"
|
|
6
6
|
}
|