@ricsam/r5d-worker 0.0.16 → 0.0.18
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 +2 -0
- package/dist/cjs/main.cjs +9 -1
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/main.mjs +9 -1
- package/dist/mjs/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@ The worker uses the existing `r5dctl` config file and accepts `R5D_WORKER_TOKEN`
|
|
|
13
13
|
~/.r5d/projects/<namespace-repo>/<branch-name>
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
+
Web shells and agent shell commands receive a server-issued `r5dctl` credential automatically. The credential is scoped to the signed-in user and revoked when the shell or command finishes, so commands such as `r5dctl auth status` do not require a separate login on the worker host.
|
|
17
|
+
|
|
16
18
|
Visible branch checkouts are the user/agent workbench. The worker may clone the connected GitHub `origin` during first setup, but ongoing pull/push/fetch/reset behavior is manual Git work. r5d internal sync git metadata lives separately under `~/.r5d/sync`.
|
|
17
19
|
|
|
18
20
|
Worker labels are mandatory and unique per user. Choose labels that describe host capabilities, such as `macos`, `linux`, `ios`, or `ec2-build`.
|
package/dist/cjs/main.cjs
CHANGED
|
@@ -114,8 +114,16 @@ function readInstalledPackageVersion(packageJsonPath) {
|
|
|
114
114
|
}
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
+
function resolveEntrypointPath(entrypoint) {
|
|
118
|
+
const resolved = import_node_path.default.resolve(entrypoint);
|
|
119
|
+
try {
|
|
120
|
+
return import_node_fs.default.realpathSync.native(resolved);
|
|
121
|
+
} catch {
|
|
122
|
+
return resolved;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
117
125
|
function getWorkerVersion() {
|
|
118
|
-
const entrypoint = process.argv[1] ?
|
|
126
|
+
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
119
127
|
let current = entrypoint ? import_node_path.default.dirname(entrypoint) : process.cwd();
|
|
120
128
|
for (let index = 0; index < 12; index += 1) {
|
|
121
129
|
const packageVersion = readInstalledPackageVersion(import_node_path.default.join(current, "package.json"));
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/main.mjs
CHANGED
|
@@ -74,8 +74,16 @@ function readInstalledPackageVersion(packageJsonPath) {
|
|
|
74
74
|
}
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
|
+
function resolveEntrypointPath(entrypoint) {
|
|
78
|
+
const resolved = path.resolve(entrypoint);
|
|
79
|
+
try {
|
|
80
|
+
return fs.realpathSync.native(resolved);
|
|
81
|
+
} catch {
|
|
82
|
+
return resolved;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
77
85
|
function getWorkerVersion() {
|
|
78
|
-
const entrypoint = process.argv[1] ?
|
|
86
|
+
const entrypoint = process.argv[1] ? resolveEntrypointPath(process.argv[1]) : null;
|
|
79
87
|
let current = entrypoint ? path.dirname(entrypoint) : process.cwd();
|
|
80
88
|
for (let index = 0; index < 12; index += 1) {
|
|
81
89
|
const packageVersion = readInstalledPackageVersion(path.join(current, "package.json"));
|
package/dist/mjs/package.json
CHANGED