@rightkit/release 0.2.17 → 0.2.19

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.17",
3
+ "version": "0.2.19",
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": {
@@ -11,7 +11,7 @@ const pubkey = "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDI5Mzk1RjlG
11
11
  const apps = [
12
12
  { key: "viewright", root: "viewright", tauri: "src-tauri/tauri.conf.json", releaseFiles: ["scripts/build-mac-notarized.sh"] },
13
13
  { key: "scraperight", root: "scraperight", tauri: "src-tauri/tauri.conf.json", releaseFiles: ["package.sh"] },
14
- { key: "heardright", root: "heardright/tauri-app-next", tauri: "src-tauri/tauri.conf.json", releaseFiles: ["scripts/mac-dmg.mjs", "scripts/publish-release.mjs"] },
14
+ { key: "heardright", root: "heardright/tauri-app-next", repoRoot: "heardright", tauri: "src-tauri/tauri.conf.json", releaseFiles: ["scripts/mac-dmg.mjs", "scripts/publish-release.mjs"] },
15
15
  { key: "mailright", root: "mailright", tauri: "src-tauri/tauri.conf.json", releaseFiles: ["scripts/build-mac.sh"] },
16
16
  { key: "coderight", root: "coderight/apps/coderight-tauri", tauri: "src-tauri/tauri.conf.json", releaseFiles: ["scripts/mac-dmg.mjs"] },
17
17
  ];
@@ -19,10 +19,10 @@ 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.17");
22
+ assert.equal(versions.npm["@rightkit/release"], "0.2.19");
23
23
  assert.equal(versions.npm["@rightkit/license"], "0.1.5");
24
24
  assert.equal(versions.npm["@rightkit/logs"], "0.1.3");
25
- assert.equal(versions.npm["@rightkit/updates"], "0.2.2");
25
+ assert.equal(versions.npm["@rightkit/updates"], "0.2.3");
26
26
  assert.equal(versions.cargo["rightkit-license"], "0.1.1");
27
27
  assert.equal(versions.cargo["rightkit-logs"], "0.1.0");
28
28
  for (const [crate, version] of Object.entries(versions.cargo)) {
@@ -60,6 +60,11 @@ for (const app of apps) {
60
60
  }
61
61
  assert.equal(pkg.packageManager, versions.packageManager);
62
62
  assert.equal(pkg.devDependencies?.["@rightkit/release"], versions.npm["@rightkit/release"]);
63
+ assert.equal(
64
+ pkg.dependencies?.["@rightkit/updates"],
65
+ versions.npm["@rightkit/updates"],
66
+ `${app.key} must consume the exact published shared updater runtime`,
67
+ );
63
68
  assert(!JSON.stringify(pkg).includes("github:adrdsouza/claude#main&path:/tools/right-release"));
64
69
  assert(!JSON.stringify(pkg).includes("github:adrdsouza/claude#main&path:/tools/rightkit/packages/release"));
65
70
  assert(!JSON.stringify(pkg).includes("git+https://github.com/adrdsouza/rightkit.git"));
@@ -113,6 +118,49 @@ for (const app of apps) {
113
118
  `https://api.spoares.com/v1/apps/${app.key}/releases/latest.json?platform={{target}}`,
114
119
  ]);
115
120
  assert.equal(tauri.bundle.createUpdaterArtifacts, true);
121
+
122
+ for (const manifestPath of findCargoManifests(root)) {
123
+ const manifest = readFileSync(manifestPath, "utf8");
124
+ for (const [crate, version] of Object.entries(versions.cargo)) {
125
+ const dependency = manifest.match(new RegExp(`^${crate}\\s*=\\s*(.+)$`, "m"));
126
+ if (!dependency) continue;
127
+ assert.equal(
128
+ dependency[1].trim(),
129
+ `"=${version}"`,
130
+ `${path.relative(workspace, manifestPath)} ${crate} must use the exact crates.io version`,
131
+ );
132
+ }
133
+ }
134
+
135
+ for (const localCopy of [
136
+ "src-tauri/vendor/rightkit-license",
137
+ "src-tauri/vendor/rightkit-logs",
138
+ "crates/rightkit-license",
139
+ ]) {
140
+ assert.equal(
141
+ existsSync(path.join(root, localCopy)),
142
+ false,
143
+ `${app.key} must not carry an app-local ${localCopy} copy`,
144
+ );
145
+ }
146
+
147
+ const repoRoot = path.join(workspace, app.repoRoot ?? app.root);
148
+ for (const packagePath of findFiles(repoRoot, "package.json")) {
149
+ const candidate = JSON.parse(readFileSync(packagePath, "utf8"));
150
+ assert.equal(candidate.scripts?.["release:win"], undefined, `${path.relative(workspace, packagePath)} has a forbidden tierless Windows release script`);
151
+ assert.equal(candidate.scripts?.["release:mac"], undefined, `${path.relative(workspace, packagePath)} has a forbidden tierless macOS release script`);
152
+ for (const command of Object.values(candidate.scripts ?? {})) {
153
+ assert.doesNotMatch(command, /\brelease:(?:win|mac)\b/, `${path.relative(workspace, packagePath)} delegates to a forbidden tierless release command`);
154
+ }
155
+ }
156
+ for (const instructionName of ["AGENTS.md", "CLAUDE.md"]) {
157
+ const instructionPath = path.join(repoRoot, instructionName);
158
+ if (!existsSync(instructionPath)) continue;
159
+ const instruction = readFileSync(instructionPath, "utf8");
160
+ assert.doesNotMatch(instruction, /pnpm(?: run)? release:(?:win|mac)\b/, `${app.key} ${instructionName} documents a forbidden tierless release`);
161
+ assert.doesNotMatch(instruction, /shared tooling at [`']?\.\.\/tools\/right-release/i, `${app.key} ${instructionName} documents a sibling source dependency`);
162
+ assert.doesNotMatch(instruction, /\$env:RIGHTAPPS_ADMIN_TOKEN|pnpm publish:r2/, `${app.key} ${instructionName} documents obsolete release credentials or publishers`);
163
+ }
116
164
  for (const releaseFile of app.releaseFiles) {
117
165
  const source = readFileSync(path.join(root, releaseFile), "utf8");
118
166
  assert.doesNotMatch(source, /(?:\.\.\/)+tools\/right-release|tools\/right-release\//, `${app.key} ${releaseFile} must consume the installed package`);
@@ -121,6 +169,22 @@ for (const app of apps) {
121
169
  });
122
170
  }
123
171
 
172
+ function findFiles(root, filename) {
173
+ const found = [];
174
+ const visit = (dir) => {
175
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
176
+ if (entry.isDirectory() && [".git", ".claude", ".worktrees", "node_modules", "target", "vendor"].includes(entry.name)) continue;
177
+ const full = path.join(dir, entry.name);
178
+ if (entry.isDirectory()) visit(full);
179
+ else if (entry.isFile() && entry.name === filename) found.push(full);
180
+ }
181
+ };
182
+ visit(root);
183
+ return found;
184
+ }
185
+
186
+ const findCargoManifests = (root) => findFiles(root, "Cargo.toml");
187
+
124
188
  test("Right Suite has no hosted workflow files", () => {
125
189
  for (const root of ["viewright", "scraperight", "heardright", "mailright", "coderight", "genright", "voiceright", "tools/rightkit"]) {
126
190
  const workflowDir = path.join(workspace, root, ".github", "workflows");
@@ -4,8 +4,8 @@
4
4
  "npm": {
5
5
  "@rightkit/license": "0.1.5",
6
6
  "@rightkit/logs": "0.1.3",
7
- "@rightkit/release": "0.2.17",
8
- "@rightkit/updates": "0.2.2"
7
+ "@rightkit/release": "0.2.19",
8
+ "@rightkit/updates": "0.2.3"
9
9
  },
10
10
  "cargo": {
11
11
  "rightkit-license": "0.1.1",