@olivervea/pipelines 2.0.0-beta.12 → 2.0.0-beta.13

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
@@ -169,7 +169,7 @@ Library steps carry their own implementation and image; they take typed settings
169
169
 
170
170
  | Helper | What it does |
171
171
  |---|---|
172
- | `httpHealthCheck(ctx, url, { attempts?, delaySeconds?, headers? })` | GETs `url` until it returns 2xx (redirects followed), retrying network errors and non-2xx statuses; defaults 5 attempts, 5 s apart (v1's deploy-beta loop). Throws the last error when the attempts run out. Runs in the harness, so the image needs no curl. `helmDeployOverSsh`'s `healthUrl` uses it. |
172
+ | `httpHealthCheck(ctx, url, { attempts?, delaySeconds?, headers? })` | GETs `url` until it returns 2xx (redirects followed), retrying network errors and non-2xx statuses; defaults 5 attempts, 5 s apart. Throws the last error when the attempts run out. Runs in the harness, so the image needs no curl. `helmDeployOverSsh`'s `healthUrl` uses it. |
173
173
  | `serviceUrl(release)` | `http://<release>.<namespace>.svc.cluster.local` for a `HelmRelease` (charts that name the Service after the release). |
174
174
  | `checkSpa(ctx, url)` | `GET <url>/` must reference an `/assets/*.js` bundle (Vite's layout) and the bundle must be served as JavaScript; returns `{ html, bundle }` for app-specific checks. |
175
175
  | `sshSession(ctx, { host, key })` | Installs openssh-client when the image has no ssh (apk or apt-get), writes the key to `<tmpDir>/ssh/id` (trailing newline, mode 600; host key not verified) and returns `{ run(remote), text(remote), copy(local, remote), shell(remote) }`; `shell` is the quoted ssh command for pipes (`ctx.sh(`printf '%s' "$V" \| ${s.shell("kubectl apply -f -")}`)`). `helmDeployOverSsh` uses it. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olivervea/pipelines",
3
- "version": "2.0.0-beta.12",
3
+ "version": "2.0.0-beta.13",
4
4
  "description": "Olve.Pipelines v2 SDK: typed pipeline authoring, the step harness, and the build tool.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,11 +36,13 @@ export function isModel(v: unknown): v is AnyModel {
36
36
  const SEGMENT = String.raw`(?!\.\.?(?:/|$))[^/\\\x00]+`;
37
37
  export const FILE_PATH_PATTERN = `^(?:${SEGMENT}/)*${SEGMENT}/?$`;
38
38
  export const FILE_PATH = new RegExp(FILE_PATH_PATTERN);
39
+ /** Step names: lower-case kebab, ≤ 63 chars (usable as K8s label values, URL segments and storage paths). */
40
+ export const STEP_NAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
39
41
 
40
42
  const FileRefSchema = z
41
43
  .object({
42
44
  run: z.number().int().nonnegative(),
43
- step: z.string().min(1),
45
+ step: z.string().regex(STEP_NAME),
44
46
  attempt: z.number().int().positive(),
45
47
  path: z.string().regex(FILE_PATH),
46
48
  sha256: z.string().regex(/^[0-9a-f]{64}$/),
package/src/core/steps.ts CHANGED
@@ -62,8 +62,7 @@ export type OutputValue<S extends AnyStep> = S["output"] extends AnyModel ? Infe
62
62
  /** Step names must be literals (identity, duplicate detection and mapper keys depend on it). */
63
63
  export type LiteralName<N extends string> = N & (string extends N ? "❌ step name must be a string literal" : unknown);
64
64
 
65
- /** Step names: lower-case kebab, ≤ 63 chars (usable as K8s label values and URL segments). */
66
- export const STEP_NAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
65
+ export { STEP_NAME } from "./models.ts";
67
66
  /** Names that cannot be steps: `input` is the pipeline input's root in mappings. */
68
67
  export const RESERVED_STEP_NAMES: readonly string[] = ["input"];
69
68