@cloud-cli/on 1.2.14 → 1.2.16
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 +3 -3
- package/dist/on.js +5 -4
- package/dist/secrets.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Designed with a strict **security-first boundary**, native **JavaScript AST eval
|
|
|
23
23
|
|
|
24
24
|
```text
|
|
25
25
|
my-project/
|
|
26
|
-
├──
|
|
26
|
+
├── on/ # Workflow definitions directory
|
|
27
27
|
│ ├── release.yml
|
|
28
28
|
│ └── test.yml
|
|
29
29
|
├── .env # Local secrets (git-ignored)
|
|
@@ -58,7 +58,7 @@ SECRET_GITHUB_WEBHOOK_SECRET="my-webhook-secret"
|
|
|
58
58
|
|
|
59
59
|
`SECRET_GITHUB_WEBHOOK_SECRET` is required to validate incoming webhooks from GitHub
|
|
60
60
|
|
|
61
|
-
### 3. Define a Workflow (
|
|
61
|
+
### 3. Define a Workflow (`on/release.yml`)
|
|
62
62
|
|
|
63
63
|
```yaml
|
|
64
64
|
name: Build and Publish Release
|
|
@@ -121,7 +121,7 @@ npx @cloud-cli/on [command] [options]
|
|
|
121
121
|
| `-h` | `--help` | — | - | Prints CLI help message and exits. |
|
|
122
122
|
| `-c` | `--config` | `./runner.config.mjs` | `RUNNER_CONFIG_FILE` | Path to JavaScript configuration file. |
|
|
123
123
|
| `-d` | `--database` | - | `RUNNER_DATABASE_URL` | SQLite database file path or HTTP URL. |
|
|
124
|
-
| `-w` | `--workflows` |
|
|
124
|
+
| `-w` | `--workflows` | `on/` | `RUNNER_WORKFLOWS` | Directory where workflow YAML files live. |
|
|
125
125
|
| `-p` | `--port` | `11235` | `PORT` | Port for the Ingress HTTP server. |
|
|
126
126
|
| `-k` | `--workers` | `5` | `RUNNER_WORKERS` | Number of worker loop threads to spawn. |
|
|
127
127
|
| | | | `RUNNER_ADMIN_SECRET` | Admin token to refresh secrets via API |
|
package/dist/on.js
CHANGED
|
@@ -8470,11 +8470,12 @@ var Po = class {
|
|
|
8470
8470
|
envFilePath;
|
|
8471
8471
|
secrets = /* @__PURE__ */ new Map();
|
|
8472
8472
|
constructor(e) {
|
|
8473
|
-
this.envFilePath = e;
|
|
8473
|
+
this.envFilePath = e, this.reload();
|
|
8474
8474
|
}
|
|
8475
8475
|
reload() {
|
|
8476
8476
|
for (let [e, t] of Object.entries(process.env)) e.startsWith("SECRET_") && t && this.secrets.set(e.replace("SECRET_", ""), t);
|
|
8477
8477
|
if (this.envFilePath && t(this.envFilePath)) {
|
|
8478
|
+
console.log("Found .env at " + this.envFilePath);
|
|
8478
8479
|
let e = u(n(this.envFilePath, "utf8"));
|
|
8479
8480
|
for (let [t, n] of Object.entries(e)) this.secrets.set(t, n || "");
|
|
8480
8481
|
}
|
|
@@ -8994,7 +8995,7 @@ var Xo = class {
|
|
|
8994
8995
|
}
|
|
8995
8996
|
});
|
|
8996
8997
|
function ns() {
|
|
8997
|
-
console.log("\n🏃 Runner CLI 🏃\n\nUsage:\n npx -y @cloud-cli/on <command> [options]\n pnpm dlx -y @cloud-cli/on <command> [options]\n\nCommands:\n start Runs both Webhook Ingress Server and Workers (Default)\n start-server Runs Webhook Ingress Server only (API Gateway mode)\n start-workers Runs Worker Polling loops only (Scalable Worker mode)\n validate Parses and validates workflow YAML files without running\n\nOptions:\n -c, --config Path to runner.config.mjs (default: ./runner.config.mjs, env: RUNNER_CONFIG_PATH)\n -d, --database SQLite Database URL (env: RUNNER_DATABASE_URL)\n -w, --workflows Path to where your workflows are defined (default:
|
|
8998
|
+
console.log("\n🏃 Runner CLI 🏃\n\nUsage:\n npx -y @cloud-cli/on <command> [options]\n pnpm dlx -y @cloud-cli/on <command> [options]\n\nCommands:\n start Runs both Webhook Ingress Server and Workers (Default)\n start-server Runs Webhook Ingress Server only (API Gateway mode)\n start-workers Runs Worker Polling loops only (Scalable Worker mode)\n validate Parses and validates workflow YAML files without running\n\nOptions:\n -c, --config Path to runner.config.mjs (default: ./runner.config.mjs, env: RUNNER_CONFIG_PATH)\n -d, --database SQLite Database URL (env: RUNNER_DATABASE_URL)\n -w, --workflows Path to where your workflows are defined (default: on/, env: RUNNER_WORKFLOWS_PATH)\n -p, --port Port for Webhook Ingress Server (default: 11235, env: PORT)\n -k, --workers Number of worker thread loops to spawn (default: 5, env: RUNNER_WORKERS)\n -h, --help Show this help message\n ");
|
|
8998
8999
|
}
|
|
8999
9000
|
es.help && (ns(), process.exit(0));
|
|
9000
9001
|
async function rs() {
|
|
@@ -9017,7 +9018,7 @@ function is(e) {
|
|
|
9017
9018
|
}
|
|
9018
9019
|
}
|
|
9019
9020
|
async function as() {
|
|
9020
|
-
let e = new Fo("./.env"), t = new Po("cli
|
|
9021
|
+
let e = new Fo("./.env"), t = new Po(process.env.WORKER_NAME || "cli");
|
|
9021
9022
|
return await t.init(), {
|
|
9022
9023
|
secrets: e,
|
|
9023
9024
|
queue: t
|
|
@@ -9029,7 +9030,7 @@ function os(e, t) {
|
|
|
9029
9030
|
port: Number(e.port || t.port || n.PORT || 11235),
|
|
9030
9031
|
adminToken: e.adminToken ?? n.RUNNER_ADMIN_SECRET ?? "",
|
|
9031
9032
|
database: e.database ?? t.database ?? n.RUNNER_DATABASE_URL ?? "",
|
|
9032
|
-
workflows: e.workflows ?? t.workflows ?? n.RUNNER_WORKFLOWS ?? "
|
|
9033
|
+
workflows: e.workflows ?? t.workflows ?? n.RUNNER_WORKFLOWS ?? "on/",
|
|
9033
9034
|
workers: Number(e.workers ?? t.workers ?? n.RUNNER_WORKERS ?? 5),
|
|
9034
9035
|
storagePath: e.storagePath ?? n.RUNNER_TMP ?? "/tmp/workspaces",
|
|
9035
9036
|
env: e.env ?? {},
|
package/dist/secrets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAGA,qBAAa,WAAW;IAMV,OAAO,CAAC,WAAW,CAAC;IALhC,OAAO,CAAC,OAAO,CAA6B;IAE5C;;OAEG;gBACiB,WAAW,CAAC,EAAE,MAAM,YAAA;
|
|
1
|
+
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAGA,qBAAa,WAAW;IAMV,OAAO,CAAC,WAAW,CAAC;IALhC,OAAO,CAAC,OAAO,CAA6B;IAE5C;;OAEG;gBACiB,WAAW,CAAC,EAAE,MAAM,YAAA;IAIxC,MAAM;IAoBN,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIpC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIhC;;OAEG;IACH,2BAA2B,IAAI,MAAM,EAAE;CAGxC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-cli/on",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.16",
|
|
4
4
|
"description": "CLI entry point for the on plugin ecosystem.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@10.30.3",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@changesets/cli": "^2.31.1",
|
|
35
35
|
"@eslint/js": "^10.0.1",
|
|
36
|
-
"@types/node": "^26.
|
|
36
|
+
"@types/node": "^26.2.0",
|
|
37
37
|
"@typescript-eslint/eslint-plugin": "^8.66.0",
|
|
38
38
|
"@typescript-eslint/parser": "^8.66.0",
|
|
39
39
|
"eslint": "10.8.0",
|