@task-handoff/node-agent 0.0.11 → 0.0.12
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/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.12-linux-universal.manifest.json} +2 -2
- package/runtime-artifacts/controlled-instance-runtime-0.0.12-linux-universal.tar.gz +0 -0
- package/runtime-artifacts/controlled-instance-runtime-0.0.12-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.12",
|
|
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": "ee0ed8aa3a3fc773af680688f877d03424263f63e5a30b7c5fd6467520620cab"
|
|
10
10
|
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
152e88690d23b5f7ed8d1077f379c407f52e7fe27c698c64c9115574b165cc26 controlled-instance-runtime-0.0.12-linux-universal.tar.gz
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
230bb65048ac975d3c4be44d2905df7106ca9f6d220657a9ef8ab566b49bd79e controlled-instance-runtime-0.0.11-linux-universal.tar.gz
|