@task-handoff/node-agent 0.0.11 → 0.0.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/bin/task-handoff-node-update-worker +136 -32
- package/dist/cli.js +1 -1
- package/docker/runtime-installer.mjs +1 -17
- package/package.json +1 -1
- package/runtime-artifacts/{controlled-instance-runtime-0.0.11-linux-universal.manifest.json → controlled-instance-runtime-0.0.13-linux-universal.manifest.json} +2 -2
- package/runtime-artifacts/controlled-instance-runtime-0.0.13-linux-universal.tar.gz +0 -0
- package/runtime-artifacts/controlled-instance-runtime-0.0.13-linux-universal.tar.gz.sha256 +1 -0
- package/runtime-artifacts/controlled-instance-runtime-0.0.11-linux-universal.tar.gz +0 -0
- package/runtime-artifacts/controlled-instance-runtime-0.0.11-linux-universal.tar.gz.sha256 +0 -1
|
@@ -14,7 +14,7 @@ function fail(message) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
function parseArgs(argv) {
|
|
17
|
-
if (!["install", "
|
|
17
|
+
if (!["install", "verify-active"].includes(argv[0])) fail("Usage: task-handoff-runtime <install|verify-active> [...]");
|
|
18
18
|
const result = { command: argv[0] };
|
|
19
19
|
for (let index = 1; index < argv.length; index += 2) {
|
|
20
20
|
const key = argv[index];
|
|
@@ -97,17 +97,6 @@ if (args.command === "verify-active") {
|
|
|
97
97
|
process.stdout.write(`${JSON.stringify(manifest)}\n`);
|
|
98
98
|
process.exit(0);
|
|
99
99
|
}
|
|
100
|
-
if (args.command === "rollback") {
|
|
101
|
-
const previousRelease = fs.readFileSync(path.join(runtimeRoot, "previous-release"), "utf8").trim();
|
|
102
|
-
if (!validateVersion(previousRelease)) fail("No previous runtime release is available.");
|
|
103
|
-
const release = path.join(runtimeRoot, "releases", previousRelease);
|
|
104
|
-
const manifest = validateRelease(release);
|
|
105
|
-
const next = path.join(runtimeRoot, `.current-${process.pid}-${Date.now()}`);
|
|
106
|
-
fs.symlinkSync(path.relative(runtimeRoot, release), next);
|
|
107
|
-
fs.renameSync(next, path.join(runtimeRoot, "current"));
|
|
108
|
-
process.stdout.write(`${JSON.stringify({ version: manifest.version, sha256: manifest.sha256, release })}\n`);
|
|
109
|
-
process.exit(0);
|
|
110
|
-
}
|
|
111
100
|
const expected = {
|
|
112
101
|
version: args.version,
|
|
113
102
|
sha256: args.sha256,
|
|
@@ -176,14 +165,9 @@ try {
|
|
|
176
165
|
}
|
|
177
166
|
lockReleaseTree(release);
|
|
178
167
|
|
|
179
|
-
let previousRelease = "";
|
|
180
|
-
try {
|
|
181
|
-
previousRelease = path.basename(fs.realpathSync(path.join(runtimeRoot, "current")));
|
|
182
|
-
} catch {}
|
|
183
168
|
const next = path.join(runtimeRoot, `.current-${process.pid}-${Date.now()}`);
|
|
184
169
|
fs.symlinkSync(path.relative(runtimeRoot, release), next);
|
|
185
170
|
fs.renameSync(next, path.join(runtimeRoot, "current"));
|
|
186
|
-
if (previousRelease && previousRelease !== releaseKey) fs.writeFileSync(path.join(runtimeRoot, "previous-release"), `${previousRelease}\n`);
|
|
187
171
|
process.stdout.write(`${JSON.stringify({ version: expected.version, sha256: expected.sha256, release })}\n`);
|
|
188
172
|
} finally {
|
|
189
173
|
if (!preserveStaging) fs.rmSync(staging, { recursive: true, force: true });
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "@task-handoff/controlled-instance",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"platform": "linux",
|
|
5
5
|
"arch": "universal",
|
|
6
6
|
"formatVersion": 1,
|
|
7
7
|
"launcherAbi": 1,
|
|
8
8
|
"entrypoint": "dist/controlled-instance-cli.js",
|
|
9
|
-
"sha256": "
|
|
9
|
+
"sha256": "54f3a3edb78753a7cf55098595ac022fdf8deb162478494bf31f1573c1330c6e"
|
|
10
10
|
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a1718cb41e1c36e25f8eef09b9b1a78ec40c7890122ffebc8ce20e4088eadd1d controlled-instance-runtime-0.0.13-linux-universal.tar.gz
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
230bb65048ac975d3c4be44d2905df7106ca9f6d220657a9ef8ab566b49bd79e controlled-instance-runtime-0.0.11-linux-universal.tar.gz
|