@rightkit/release 0.2.13 → 0.2.14
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rightkit/release",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Portable Right Suite release CLI/SDK: signed installers, updater artifacts, patch/update routing, hardening, R2 publish, and RightApps registration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/publish-update.mjs
CHANGED
|
@@ -49,7 +49,6 @@ if (tier === "patch") {
|
|
|
49
49
|
const updaterManifestArtifacts = new Map();
|
|
50
50
|
const installerManifestArtifacts = new Map();
|
|
51
51
|
const uploadedKeys = new Set();
|
|
52
|
-
const uploadedSignatures = new Set();
|
|
53
52
|
for (const artifact of artifacts) {
|
|
54
53
|
assertCurrentKey(artifact.key, "updater");
|
|
55
54
|
const installerKey = patchInstallerKey(artifact);
|
|
@@ -65,11 +64,6 @@ if (tier === "patch") {
|
|
|
65
64
|
if (!dryRun) await run(process.execPath, [UPLOAD, file, installerKey, "public"], root);
|
|
66
65
|
uploadedKeys.add(installerKey);
|
|
67
66
|
}
|
|
68
|
-
if (!uploadedSignatures.has(`${installerKey}.sig`)) {
|
|
69
|
-
console.log(`${dryRun ? "[dry-run] " : ""}UPLOAD public/${installerKey}.sig`);
|
|
70
|
-
if (!dryRun) await run(process.execPath, [UPLOAD, signatureFile, `${installerKey}.sig`, "public"], root);
|
|
71
|
-
uploadedSignatures.add(`${installerKey}.sig`);
|
|
72
|
-
}
|
|
73
67
|
const signature = dryRun ? `<signature:${artifact.signature}>` : (await readFile(signatureFile, "utf8")).trim();
|
|
74
68
|
const artifactKey = artifact.artifactKey || installerKey.replaceAll("/", "__");
|
|
75
69
|
const metadata = dryRun ? { sha256: null, sizeBytes: null } : await fileMetadata(file);
|
|
@@ -108,7 +102,7 @@ if (tier === "patch") {
|
|
|
108
102
|
dryRun,
|
|
109
103
|
keep: {
|
|
110
104
|
public: installers.map((artifact) => artifact.key),
|
|
111
|
-
private: target.updater.artifacts.
|
|
105
|
+
private: target.updater.artifacts.map((artifact) => artifact.key),
|
|
112
106
|
},
|
|
113
107
|
});
|
|
114
108
|
process.exit(0);
|
|
@@ -144,7 +138,7 @@ if (tier === "patch") {
|
|
|
144
138
|
platform: platform === "mac" ? "mac" : "windows",
|
|
145
139
|
dryRun,
|
|
146
140
|
keep: {
|
|
147
|
-
public: [...installers.map((artifact) => artifact.key), ...registrations.keys()
|
|
141
|
+
public: [...installers.map((artifact) => artifact.key), ...registrations.keys()],
|
|
148
142
|
private: [],
|
|
149
143
|
},
|
|
150
144
|
});
|
|
@@ -157,7 +151,6 @@ const platforms = {};
|
|
|
157
151
|
const registrations = new Map();
|
|
158
152
|
const updaterManifestArtifacts = new Map();
|
|
159
153
|
const uploadedKeys = new Set();
|
|
160
|
-
const uploadedSignatures = new Set();
|
|
161
154
|
for (const artifact of artifacts) {
|
|
162
155
|
assertCurrentKey(artifact.key, "updater");
|
|
163
156
|
const file = path.resolve(root, artifact.file);
|
|
@@ -171,12 +164,6 @@ for (const artifact of artifacts) {
|
|
|
171
164
|
if (!dryRun) await run(process.execPath, [UPLOAD, file, artifact.key, "private"], root);
|
|
172
165
|
uploadedKeys.add(artifact.key);
|
|
173
166
|
}
|
|
174
|
-
if (!uploadedSignatures.has(`${artifact.key}.sig`)) {
|
|
175
|
-
console.log(`${dryRun ? "[dry-run] " : ""}UPLOAD private/${artifact.key}.sig`);
|
|
176
|
-
if (!dryRun) await run(process.execPath, [UPLOAD, signatureFile, `${artifact.key}.sig`, "private"], root);
|
|
177
|
-
uploadedSignatures.add(`${artifact.key}.sig`);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
167
|
const signature = dryRun ? `<signature:${artifact.signature}>` : (await readFile(signatureFile, "utf8")).trim();
|
|
181
168
|
const artifactKey = artifact.artifactKey || artifact.key.replaceAll("/", "__");
|
|
182
169
|
const metadata = dryRun ? { sha256: null, sizeBytes: null } : await fileMetadata(file);
|
|
@@ -227,7 +214,7 @@ await pruneReleaseObjects({
|
|
|
227
214
|
dryRun,
|
|
228
215
|
keep: {
|
|
229
216
|
public: installers.map((artifact) => artifact.key),
|
|
230
|
-
private: [...registrations.keys()
|
|
217
|
+
private: [...registrations.keys()],
|
|
231
218
|
},
|
|
232
219
|
});
|
|
233
220
|
|
package/publish-update.test.mjs
CHANGED
|
@@ -100,7 +100,8 @@ test("patch registers a free updater manifest backed by public installer-path ob
|
|
|
100
100
|
assert.match(result.stdout, /POST .*\/v1\/admin\/apps\/patches/);
|
|
101
101
|
assert.match(result.stdout, /"tier":"patch"/);
|
|
102
102
|
assert.match(result.stdout, /"platform":"windows"/);
|
|
103
|
-
assert.
|
|
103
|
+
assert.doesNotMatch(result.stdout, /UPLOAD .*\.sig/);
|
|
104
|
+
assert.equal((result.stdout.match(/UPLOAD /g) ?? []).length, 2, "patch may upload only one installer and one updater object per OS");
|
|
104
105
|
assert.match(result.stdout, /PRUNE rightapps-downloads\/fixture\/windows/);
|
|
105
106
|
assert.match(result.stdout, /PRUNE rightapps-updates\/fixture\/windows keep=<none>/);
|
|
106
107
|
const body = registrationBody(result);
|
|
@@ -129,7 +130,8 @@ test("routes feature updates to the Pro-gated release endpoint", () => {
|
|
|
129
130
|
assert.match(result.stdout, /"tier":"update"/);
|
|
130
131
|
assert.match(result.stdout, /"platform":"windows"/);
|
|
131
132
|
assert.match(result.stdout, /UPLOAD private\/fixture\/updates\/windows\/current\/Fixture\.exe/);
|
|
132
|
-
assert.
|
|
133
|
+
assert.doesNotMatch(result.stdout, /UPLOAD .*\.sig/);
|
|
134
|
+
assert.equal((result.stdout.match(/UPLOAD /g) ?? []).length, 1, "feature update may upload only one updater object per OS");
|
|
133
135
|
assert.match(result.stdout, /PRUNE rightapps-downloads\/fixture\/windows/);
|
|
134
136
|
assert.match(result.stdout, /PRUNE rightapps-updates\/fixture\/windows/);
|
|
135
137
|
assert.doesNotMatch(result.stdout, /UPLOAD .*Fixture-Setup\.exe/);
|
|
@@ -19,7 +19,7 @@ const apps = [
|
|
|
19
19
|
test("RightKit exposes one current version manifest", () => {
|
|
20
20
|
assert.equal(existsSync(versionsPath), true, "rightkit-versions.json must be the single current-version source");
|
|
21
21
|
assert.match(versions.packageManager, /^pnpm@\d+\.\d+\.\d+$/);
|
|
22
|
-
assert.equal(versions.npm["@rightkit/release"], "0.2.
|
|
22
|
+
assert.equal(versions.npm["@rightkit/release"], "0.2.14");
|
|
23
23
|
assert.equal(versions.npm["@rightkit/license"], "0.1.5");
|
|
24
24
|
assert.equal(versions.npm["@rightkit/logs"], "0.1.3");
|
|
25
25
|
assert.equal(versions.npm["@rightkit/updates"], "0.1.1");
|