@workerstack/clients 1.0.0-rc.25 → 1.0.0-rc.26

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.
@@ -38,6 +38,8 @@ export type Kind = {
38
38
  publish: string;
39
39
  /** A shell condition, true once the registry serves `$NAME` at `$VERSION`. */
40
40
  live: string;
41
+ /** Environment the live check needs (YAML `env:` lines, indented for a step). */
42
+ liveEnv?: string;
41
43
  oidc: boolean;
42
44
  /** How many 10 s waits the live check allows (60 unless the registry lags longer). */
43
45
  tries?: number;
@@ -220,17 +220,20 @@ function goProxy() {
220
220
  version: identity("go", "version"),
221
221
  };
222
222
  }
223
+ /* gh in Actions runs only with a token in GH_TOKEN */
224
+ const GH_TOKEN_ENV = ` env:
225
+ GH_TOKEN: \${{ github.token }}
226
+ `;
223
227
  function githubRelease(registry) {
224
228
  const assets = registry.assets.map((asset) => JSON.stringify(asset)).join(" ");
225
229
  return {
226
230
  file: ".release-state.json",
227
231
  live: `gh release view "$TAG" > /dev/null`,
232
+ liveEnv: GH_TOKEN_ENV,
228
233
  name: 'echo "$GITHUB_REPOSITORY"',
229
234
  oidc: false,
230
235
  publish: ` - name: GitHub release
231
- env:
232
- GH_TOKEN: \${{ github.token }}
233
- run: gh release create "$TAG" ${assets} --verify-tag --title "$TAG" --notes "Release $TAG."
236
+ ${GH_TOKEN_ENV} run: gh release create "$TAG" ${assets} --verify-tag --title "$TAG" --notes "Release $TAG."
234
237
  `,
235
238
  version: "jq -r .version .release-state.json",
236
239
  };
@@ -10,7 +10,7 @@ export const RELEASE_WORKFLOW = ".github/workflows/release.yml";
10
10
  * the step give up sooner. */
11
11
  const DEFAULT_LIVE_TRIES = 60;
12
12
  const liveStep = (registry, k) => ` - name: ${registry.kind} serves the version
13
- run: |
13
+ ${k.liveEnv ?? ""} run: |
14
14
  NAME="$(${k.name})"
15
15
  for _ in $(seq "\${LIVE_CHECK_TRIES:-${k.tries ?? DEFAULT_LIVE_TRIES}}"); do
16
16
  if ${k.live}; then echo "${registry.kind} serves $NAME $VERSION"; exit 0; fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workerstack/clients",
3
- "version": "1.0.0-rc.25",
3
+ "version": "1.0.0-rc.26",
4
4
  "description": "Generates SDKs (TypeScript, Go, Rust, Python, C#, Java), a CLI and an MCP server from any OpenAPI 3.x document.",
5
5
  "keywords": [
6
6
  "codegen",