@cloud-cli/on 1.15.2 → 1.16.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 +38 -37
- package/dist/on.js +1132 -1105
- package/dist/preprocessors/github.d.ts +3 -2
- package/dist/preprocessors/github.d.ts.map +1 -1
- package/dist/pwa.d.ts +4 -0
- package/dist/pwa.d.ts.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -114,7 +114,7 @@ Time triggers are defined beside a webhook trigger:
|
|
|
114
114
|
on:
|
|
115
115
|
schedule:
|
|
116
116
|
- id: nightly
|
|
117
|
-
cron:
|
|
117
|
+
cron: '0 2 * * *'
|
|
118
118
|
timezone: Europe/Berlin
|
|
119
119
|
solar:
|
|
120
120
|
- id: morning
|
|
@@ -126,14 +126,15 @@ on:
|
|
|
126
126
|
|
|
127
127
|
GitHub triggers support these preprocessor filters:
|
|
128
128
|
|
|
129
|
-
| Field
|
|
130
|
-
|
|
|
131
|
-
| `events`
|
|
132
|
-
| `owner`, `repo` | One
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
129
|
+
| Field | Match behavior |
|
|
130
|
+
| --------------- | ---------------------------------------------------------------------------- |
|
|
131
|
+
| `events` | Exact webhook event names |
|
|
132
|
+
| `owner`, `repo` | One or many exact acceptable names |
|
|
133
|
+
| `name` | One or many exact acceptable names, with org/repo combined |
|
|
134
|
+
| `branches` | Branch/ref glob patterns such as `main` or `v1.*`, matches branches and tags |
|
|
135
|
+
| `refs` | Alias for `branches` |
|
|
136
|
+
| `tag` | `true` requires a tag push; `false` requires a non-tag event |
|
|
137
|
+
| `paths` | Changed-file glob patterns across added, modified, and removed files |
|
|
137
138
|
|
|
138
139
|
Configured fields are combined with AND. Values within one list are combined with OR. `tags` also requires a tag value to match, while `branches` requires a branch value to match. The generic `if` expression is evaluated separately after all preprocessor filters pass.
|
|
139
140
|
|
|
@@ -161,25 +162,25 @@ npx @cloud-cli/on [command] [options]
|
|
|
161
162
|
|
|
162
163
|
### Commands
|
|
163
164
|
|
|
164
|
-
| Command
|
|
165
|
-
|
|
|
166
|
-
| **`start-server`**
|
|
167
|
-
| **`start-scheduler`** | Dispatches published cron and solar workflow triggers.
|
|
168
|
-
| **`start-workers`**
|
|
165
|
+
| Command | Description |
|
|
166
|
+
| --------------------- | ------------------------------------------------------------------ |
|
|
167
|
+
| **`start-server`** | Runs Webhook Ingress Gateway (the HTTP server receiving webhooks). |
|
|
168
|
+
| **`start-scheduler`** | Dispatches published cron and solar workflow triggers. |
|
|
169
|
+
| **`start-workers`** | Runs the event-driven worker scheduler (Scalable Workers). |
|
|
169
170
|
|
|
170
171
|
### CLI and Environment Options
|
|
171
172
|
|
|
172
|
-
| Flag | Option
|
|
173
|
-
| ---- |
|
|
174
|
-
| `-h` | `--help`
|
|
175
|
-
| `-c` | `--config`
|
|
176
|
-
| `-d` | `--database`
|
|
177
|
-
| `-p` | `--port`
|
|
178
|
-
| `-k` | `--workers`
|
|
179
|
-
| |
|
|
180
|
-
| |
|
|
181
|
-
| |
|
|
182
|
-
| |
|
|
173
|
+
| Flag | Option | Default | Env | Description |
|
|
174
|
+
| ---- | ------------ | --------------------- | ---------------------- | ------------------------------------------------ |
|
|
175
|
+
| `-h` | `--help` | — | - | Prints CLI help message and exits. |
|
|
176
|
+
| `-c` | `--config` | `./runner.config.mjs` | `RUNNER_CONFIG_FILE` | Path to JavaScript configuration file. |
|
|
177
|
+
| `-d` | `--database` | - | `RUNNER_DATABASE_URL` | SQLite database file path or HTTP URL. |
|
|
178
|
+
| `-p` | `--port` | `11235` | `PORT` | Port for the Ingress HTTP server. |
|
|
179
|
+
| `-k` | `--workers` | `5` | `RUNNER_WORKERS` | Maximum concurrent jobs on this node. |
|
|
180
|
+
| | | | `RUNNER_ADMIN_SECRET` | Admin token to refresh secrets via API |
|
|
181
|
+
| | | | `RUNNER_WORKER_SECRET` | Worker token for job events and secret retrieval |
|
|
182
|
+
| | | | `RUNNER_SERVER_URL` | Webhook server URL used by workers. |
|
|
183
|
+
| | | | `RUNNER_TAGS` | Comma-separated worker capability tags. |
|
|
183
184
|
|
|
184
185
|
Set `RUNNER_ADMIN_SECRET` only on the HTTP server for dashboard and management APIs. Set the same non-empty `RUNNER_WORKER_SECRET` on the server and every worker to publish job-status refresh events and retrieve job-scoped secrets. The dashboard workflow APIs accept either Bearer authentication or HTTP Basic authentication with username `admin` and the admin secret.
|
|
185
186
|
|
|
@@ -274,18 +275,18 @@ The Ingress Gateway listens for incoming HTTP requests and serves the live web U
|
|
|
274
275
|
|
|
275
276
|
### Endpoint Matrix
|
|
276
277
|
|
|
277
|
-
| Method
|
|
278
|
-
|
|
|
279
|
-
| **`POST`**
|
|
280
|
-
| **`GET`**
|
|
281
|
-
| **`GET`**
|
|
282
|
-
| **`GET`**
|
|
283
|
-
| **`GET`**
|
|
284
|
-
| **`GET`**
|
|
285
|
-
| **`POST`**
|
|
286
|
-
| **`GET`, `PUT`, `DELETE`** | `/api/workflows/:id`
|
|
287
|
-
| **`POST`**
|
|
288
|
-
| **`GET`, `PUT`, `DELETE`** | `/api/secrets`, `/api/secrets/:name`
|
|
278
|
+
| Method | Endpoint | Description |
|
|
279
|
+
| -------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
|
|
280
|
+
| **`POST`** | `/webhooks/github` | Webhook endpoint for GitHub events. Applies GitHub filters and evaluates `on.github.if`. |
|
|
281
|
+
| **`GET`** | `/runs` | **Dashboard:** Public live dark-mode monitoring page listing recent jobs. |
|
|
282
|
+
| **`GET`** | `/api/jobs?afterId=<id>&beforeId=<id>&limit=<n>` | Dashboard jobs with exclusive lower and upper ID cursors and a limit from 1 to 500 (default 50). |
|
|
283
|
+
| **`GET`** | `/runs/:jobId` | **Job Report:** Authenticated interactive trace with step timings and terminal log output. |
|
|
284
|
+
| **`GET`** | `/workflows` | Authenticated workflow list and encrypted secret management UI. |
|
|
285
|
+
| **`GET`** | `/workflows/new`, `/workflows/:id` | Authenticated YAML workflow editor. |
|
|
286
|
+
| **`POST`** | `/api/workflows/validate` | Authenticated YAML validation without persistence. |
|
|
287
|
+
| **`GET`, `PUT`, `DELETE`** | `/api/workflows/:id` | Authenticated revisioned workflow read, draft save, and deletion. |
|
|
288
|
+
| **`POST`** | `/api/workflows/:id/publish` | Authenticated publication of the latest draft revision. |
|
|
289
|
+
| **`GET`, `PUT`, `DELETE`** | `/api/secrets`, `/api/secrets/:name` | Authenticated encrypted secret-name and write-only value management. |
|
|
289
290
|
|
|
290
291
|
### Dashboard Features
|
|
291
292
|
|