@ship.zone/runner 0.2.2 → 0.2.4
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/changelog.md +17 -0
- package/deno.json +3 -3
- package/dist_npm/mod.d.ts +1 -1
- package/dist_npm/mod.js +6 -6
- package/dist_rust/runnerworkspace_linux_amd64_musl +0 -0
- package/dist_rust/runnerworkspace_linux_arm64_musl +0 -0
- package/mod.ts +1 -1
- package/package.json +2 -2
- package/readme.md +7 -3
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/cli.ts +1 -2
- package/ts/registration-state.ts +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-08-30 - 0.2.4
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- generate default registration request IDs safely (registration-state)
|
|
8
|
+
- Wrap crypto.randomUUID in a factory to avoid unbound default request ID generation.
|
|
9
|
+
- Add coverage for creating and persisting a generated UUID request ID.
|
|
10
|
+
|
|
11
|
+
## 2026-08-30 - 0.2.3
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- require allow-all for Deno runner invocations (permissions)
|
|
16
|
+
- Switch CLI, shebang, dev task, and README examples to use Deno --allow-all
|
|
17
|
+
- Add build-time verification that the generated npm entrypoint preserves the expected permission shebang
|
|
18
|
+
- Include scripts in deno check coverage
|
|
19
|
+
|
|
3
20
|
## 2026-08-29 - 0.2.2
|
|
4
21
|
|
|
5
22
|
### Fixes
|
package/deno.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ship.zone/runner",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"exports": "./mod.ts",
|
|
5
5
|
"nodeModulesDir": "none",
|
|
6
6
|
"tasks": {
|
|
7
|
-
"dev": "deno run --allow-
|
|
7
|
+
"dev": "deno run --allow-all mod.ts",
|
|
8
8
|
"bundle": "deno bundle --frozen --check --platform=deno --keep-names --external '@foss.global/ci-spec' --external '@foss.global/ci-spec/*' --external 'ajv/*' --declaration --outdir dist_npm mod.ts",
|
|
9
9
|
"test": "deno test --allow-env --allow-net --allow-read --allow-write --allow-run test/",
|
|
10
|
-
"check": "deno check mod.ts test/",
|
|
10
|
+
"check": "deno check mod.ts test/ scripts/",
|
|
11
11
|
"fmt": "deno fmt",
|
|
12
12
|
"lint": "deno lint"
|
|
13
13
|
},
|
package/dist_npm/mod.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env -S deno run --allow-
|
|
1
|
+
#!/usr/bin/env -S deno run --allow-all
|
|
2
2
|
export type TRunnerFetch = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
3
3
|
export interface IRunnerApiClientOptions { controlPlaneUrl: string;
|
|
4
4
|
allowInsecureLoopback: boolean;
|
package/dist_npm/mod.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env -S deno run --allow-
|
|
1
|
+
#!/usr/bin/env -S deno run --allow-all
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -4919,14 +4919,14 @@ var init_deno = __esm({
|
|
|
4919
4919
|
"deno.json"() {
|
|
4920
4920
|
deno_default = {
|
|
4921
4921
|
name: "@ship.zone/runner",
|
|
4922
|
-
version: "0.2.
|
|
4922
|
+
version: "0.2.4",
|
|
4923
4923
|
exports: "./mod.ts",
|
|
4924
4924
|
nodeModulesDir: "none",
|
|
4925
4925
|
tasks: {
|
|
4926
|
-
dev: "deno run --allow-
|
|
4926
|
+
dev: "deno run --allow-all mod.ts",
|
|
4927
4927
|
bundle: "deno bundle --frozen --check --platform=deno --keep-names --external '@foss.global/ci-spec' --external '@foss.global/ci-spec/*' --external 'ajv/*' --declaration --outdir dist_npm mod.ts",
|
|
4928
4928
|
test: "deno test --allow-env --allow-net --allow-read --allow-write --allow-run test/",
|
|
4929
|
-
check: "deno check mod.ts test/",
|
|
4929
|
+
check: "deno check mod.ts test/ scripts/",
|
|
4930
4930
|
fmt: "deno fmt",
|
|
4931
4931
|
lint: "deno lint"
|
|
4932
4932
|
},
|
|
@@ -9334,7 +9334,7 @@ var init_registration_state = __esm({
|
|
|
9334
9334
|
this.stateDirectory = stateDirectory;
|
|
9335
9335
|
this.path = join3(stateDirectory, journalName2);
|
|
9336
9336
|
}
|
|
9337
|
-
async loadOrCreate(template, createRequestId = crypto.randomUUID) {
|
|
9337
|
+
async loadOrCreate(template, createRequestId = () => crypto.randomUUID()) {
|
|
9338
9338
|
const candidate = validateRegistrationRequest({
|
|
9339
9339
|
registrationRequestId: "pending-validation",
|
|
9340
9340
|
...template
|
|
@@ -9511,7 +9511,7 @@ var init_cli = __esm({
|
|
|
9511
9511
|
init_registration_state();
|
|
9512
9512
|
init_runner();
|
|
9513
9513
|
init_source_workspace();
|
|
9514
|
-
cliInvocation = "deno run --allow-
|
|
9514
|
+
cliInvocation = "deno run --allow-all npm:@ship.zone/runner";
|
|
9515
9515
|
usage = `ship.zone runner ${runnerVersion}
|
|
9516
9516
|
|
|
9517
9517
|
Usage:
|
|
Binary file
|
|
Binary file
|
package/mod.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ship.zone/runner",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "The isolated OCI job runner for ship.zone CI/CD",
|
|
5
5
|
"homepage": "https://code.foss.global/ship.zone/runner",
|
|
6
6
|
"bugs": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"third-party-licenses.md"
|
|
56
56
|
],
|
|
57
57
|
"scripts": {
|
|
58
|
-
"build": "deno task check && deno task bundle && tsrust",
|
|
58
|
+
"build": "deno task check && deno task bundle && deno run --allow-read=dist_npm/mod.js scripts/verify-npm-entrypoint.ts && tsrust",
|
|
59
59
|
"test": "deno task test && cargo test --manifest-path rust/Cargo.toml"
|
|
60
60
|
}
|
|
61
61
|
}
|
package/readme.md
CHANGED
|
@@ -111,7 +111,7 @@ runner syncs both the helper-directory entry and a newly created owner marker be
|
|
|
111
111
|
Create a private runner configuration:
|
|
112
112
|
|
|
113
113
|
```sh
|
|
114
|
-
deno run --allow-
|
|
114
|
+
deno run --allow-all \
|
|
115
115
|
npm:@ship.zone/runner init \
|
|
116
116
|
--control-plane https://foss.global \
|
|
117
117
|
--runtime-path /usr/bin/docker
|
|
@@ -121,12 +121,16 @@ Register with a one-time bootstrap token, then start the daemon:
|
|
|
121
121
|
|
|
122
122
|
```sh
|
|
123
123
|
SHIP_RUNNER_BOOTSTRAP_TOKEN='<one-time token>' \
|
|
124
|
-
deno run --allow-
|
|
124
|
+
deno run --allow-all \
|
|
125
125
|
npm:@ship.zone/runner register
|
|
126
|
-
deno run --allow-
|
|
126
|
+
deno run --allow-all \
|
|
127
127
|
npm:@ship.zone/runner run
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
+
`--allow-all` is required because Deno reserves direct `/dev/shm` access for that mode. The runner
|
|
131
|
+
uses `/dev/shm` for fail-closed host tmpfs verification before registration and must already be
|
|
132
|
+
trusted with unrestricted subprocess execution for the configured OCI runtime.
|
|
133
|
+
|
|
130
134
|
Replace `run` with `once` to claim at most one job or `config` to print the effective configuration
|
|
131
135
|
with credentials masked. Within this repository, `deno task dev -- <command>` is the equivalent
|
|
132
136
|
development invocation. `SHIP_RUNNER_CONFIG` selects a config path; the default is
|
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/cli.ts
CHANGED
|
@@ -27,8 +27,7 @@ interface IParsedArguments {
|
|
|
27
27
|
options: Map<string, string | true>;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const cliInvocation =
|
|
31
|
-
'deno run --allow-env --allow-net --allow-read --allow-write --allow-run npm:@ship.zone/runner';
|
|
30
|
+
const cliInvocation = 'deno run --allow-all npm:@ship.zone/runner';
|
|
32
31
|
|
|
33
32
|
const usage = `ship.zone runner ${runnerVersion}
|
|
34
33
|
|
package/ts/registration-state.ts
CHANGED
|
@@ -88,7 +88,7 @@ export class RegistrationStateStore {
|
|
|
88
88
|
|
|
89
89
|
async loadOrCreate(
|
|
90
90
|
template: TRegistrationRequestTemplate,
|
|
91
|
-
createRequestId: () => string = crypto.randomUUID,
|
|
91
|
+
createRequestId: () => string = () => crypto.randomUUID(),
|
|
92
92
|
): Promise<IRegisterRunnerRequest> {
|
|
93
93
|
const candidate = validateRegistrationRequest({
|
|
94
94
|
registrationRequestId: 'pending-validation',
|