perseid 0.9.0 → 0.11.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 +14 -8
- package/checksums.json +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,15 +21,19 @@ GitHub App only lends the workflows short-lived tokens, so no secret is stored.
|
|
|
21
21
|
|
|
22
22
|
## Quick start
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
perseid runs from the repository that holds your OpenAPI spec, so every change to the spec
|
|
25
|
+
regenerates the SDKs. The SDKs can live there or in their own repositories.
|
|
25
26
|
|
|
26
27
|
```sh
|
|
27
|
-
npx perseid init # pick the languages and where the SDKs live
|
|
28
|
+
npx perseid init # pick the languages and where the SDKs live (this repo or others)
|
|
28
29
|
npx perseid sync # install the perseid App on this repository and the SDK repositories
|
|
29
|
-
git add -A && git commit -m "ci: generate SDKs with perseid" && git push
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Commit and push what perseid wrote: the `SDKs` workflow then opens a pull request with every SDK.
|
|
33
|
+
|
|
34
|
+
Rather keep perseid out of your API repository? Run it from a
|
|
35
|
+
[separate SDKs repository](docs/ci.md#a-separate-sdks-repository) that your API repo pushes the
|
|
36
|
+
spec to.
|
|
33
37
|
|
|
34
38
|
The [perseid App](https://github.com/apps/perseid-sdks) has Contents and Pull requests access to
|
|
35
39
|
the repositories you select. Each run
|
|
@@ -94,17 +98,19 @@ var pets = await petstore.Pets.ListAsync(new() { Limit = 10, Status = PetStatus.
|
|
|
94
98
|
sdk-release.yml ─ release-please PR ← you merge ─ tag ─ publish to npm, PyPI, crates.io…
|
|
95
99
|
```
|
|
96
100
|
|
|
97
|
-
`perseid init` and `perseid sync` write
|
|
101
|
+
`perseid init` and `perseid sync` write three workflows, with your own credentials:
|
|
98
102
|
|
|
99
103
|
- `sdks.yml` runs the `meteroid-oss/perseid` Action when the spec changes. It installs perseid
|
|
100
104
|
and the pinned formatters, then runs `perseid generate --pr`, which commits the SDKs to the
|
|
101
105
|
`perseid/update` branch and opens or updates one pull request per repository.
|
|
106
|
+
- `sdk-ci.yml`, in each repository holding SDKs, builds each SDK and runs its tests on pull
|
|
107
|
+
requests and pushes.
|
|
102
108
|
- `sdk-release.yml`, in each repository holding SDKs, runs release-please on merge and publishes
|
|
103
109
|
each released SDK from the `release` environment.
|
|
104
110
|
|
|
105
111
|
`sdks.yml` is pinned to the release line of the perseid that wrote it, such as
|
|
106
|
-
`meteroid-oss/perseid@v0.6`: run `perseid init` again to refresh it. `sdk-
|
|
107
|
-
`@v0`, so
|
|
112
|
+
`meteroid-oss/perseid@v0.6`: run `perseid init` again to refresh it. `sdk-ci.yml` and
|
|
113
|
+
`sdk-release.yml` follow `@v0`, so they rarely change.
|
|
108
114
|
|
|
109
115
|
## Where the SDKs live
|
|
110
116
|
|
|
@@ -117,7 +123,7 @@ var pets = await petstore.Pets.ListAsync(new() { Limit = 10, Status = PetStatus.
|
|
|
117
123
|
| One SDKs repository | `repo = "acme/api-sdks"` | `acme/api-sdks`, a folder per language |
|
|
118
124
|
|
|
119
125
|
- perseid never creates repositories: `gh repo create acme/api-typescript`, then `perseid sync`
|
|
120
|
-
installs the App there and commits its release
|
|
126
|
+
installs the App there and commits its CI and release workflows.
|
|
121
127
|
- Spec in another repository? Run `perseid init` and `perseid sync` in the SDKs repository, then
|
|
122
128
|
`npx perseid connect acme/api-sdks` in the API repository. It writes a workflow pushing the
|
|
123
129
|
spec, and opens a pull request naming the API repository as the `source` of `perseid.toml`:
|
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": "f9f44884ddc26b2717f00e2b033e35cd5f8b1a38ad8d982f1b24f5a3c708991e",
|
|
3
|
+
"perseid-aarch64-unknown-linux-musl.tar.gz": "c8249564a4cba90964c0d9891efef2714f27aec65bd1e1b40851c359df63825f",
|
|
4
|
+
"perseid-x86_64-apple-darwin.tar.gz": "8e411440c871b19bdce7e2305a46213e0eacc724a10937345eae5e566de42f11",
|
|
5
|
+
"perseid-x86_64-unknown-linux-musl.tar.gz": "f32fc8cae27ca38404899b2b151ec741105591a97c7a5378454a5d5e77c532d4"
|
|
6
6
|
}
|