@rightkit/release 0.2.148 → 0.2.150
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 +1 -1
- package/publish-swift.mjs +8 -2
- package/release.mjs +29 -6
- package/rightkit-versions.json +37 -24
package/package.json
CHANGED
package/publish-swift.mjs
CHANGED
|
@@ -16,7 +16,10 @@ import { scanCrateForSecrets } from "./publish-cargo.mjs";
|
|
|
16
16
|
import { enforcePublicationGate, defaultEvidencePath } from "./publication-gate.mjs";
|
|
17
17
|
|
|
18
18
|
export const DEFAULT_SWIFT_GIT_URL = "https://github.com/bogusyogi/rightkit-swift.git";
|
|
19
|
-
|
|
19
|
+
// The mirror must reproduce the verified git subtree exactly (its tree id is
|
|
20
|
+
// compared), so only untracked build state is excluded. Tracked Xcode scheme
|
|
21
|
+
// metadata under .swiftpm ships with the package; SwiftPM consumers ignore it.
|
|
22
|
+
const MIRROR_EXCLUDES = new Set([".build", ".git", "Package.resolved", ".DS_Store"]);
|
|
20
23
|
|
|
21
24
|
export function parseSwiftPublishArgs(argv, env = process.env) {
|
|
22
25
|
const allowed = new Set(["--repo", "--dry-run", "--allow-dirty", "--evidence", "--workspace"]);
|
|
@@ -138,7 +141,10 @@ export function runSwiftPublish(options, execute = spawnSync) {
|
|
|
138
141
|
const prefix = git(["rev-parse", "--show-prefix"], packageDir, execute).replace(/\/$/, "");
|
|
139
142
|
const sourceCommit = gate.evidence?.commit ?? "HEAD";
|
|
140
143
|
const tree = git(["rev-parse", prefix ? `${sourceCommit}:${prefix}` : `${sourceCommit}^{tree}`], packageDir, execute);
|
|
141
|
-
|
|
144
|
+
// `git archive` filters by the current subdirectory, so archiving the package
|
|
145
|
+
// subtree from inside the package yields an empty tar; run it at the toplevel.
|
|
146
|
+
const toplevel = git(["rev-parse", "--show-toplevel"], packageDir, execute) || packageDir;
|
|
147
|
+
const archive = execute("git", ["archive", "--format=tar", "--mtime=1970-01-01T00:00:00Z", tree], { cwd: toplevel, windowsHide: true, maxBuffer: 128 * 1024 * 1024 });
|
|
142
148
|
if (archive.error || archive.status !== 0 || !archive.stdout?.length) throw new Error("Swift source archive creation failed");
|
|
143
149
|
const bytes = Buffer.from(archive.stdout);
|
|
144
150
|
if (gate.ok || !options.dryRun) verifySwiftSourceArchive(bytes, gate.evidence);
|
package/release.mjs
CHANGED
|
@@ -743,7 +743,7 @@ async function validateHostedWorkflows(root, appName, workflows, policy) {
|
|
|
743
743
|
}
|
|
744
744
|
const lanes = manifest?.lanes;
|
|
745
745
|
// Mirrors the `lanes` enum in @rightkit/git manifest.schema.json.
|
|
746
|
-
const safeLanes = new Set(["ci", "qualification", "package-smoke", "release-candidate", "publish-npm", "publish-package-managers"]);
|
|
746
|
+
const safeLanes = new Set(["ci", "qualification", "package-smoke", "release-candidate", "publish-npm", "publish-package-managers", "regenerate"]);
|
|
747
747
|
if (manifest?.schemaVersion !== 1
|
|
748
748
|
|| manifest?.compile !== "github-actions-only"
|
|
749
749
|
|| !Array.isArray(lanes)
|
|
@@ -802,11 +802,31 @@ async function validateHostedWorkflows(root, appName, workflows, policy) {
|
|
|
802
802
|
// @rightkit/git `devArtifact.mac: "sign"` renders a `dev-mac-sign` job into
|
|
803
803
|
// the managed ci.yml: push to the default branch only, release environment,
|
|
804
804
|
// Developer ID certificate secrets only (no notarization keys).
|
|
805
|
+
// @rightkit/git `regenerate` lane: manual-only, opens a pull request from a
|
|
806
|
+
// right-git/regenerate-<run> branch and never writes to the default branch.
|
|
807
|
+
// `contents: write` and `pull-requests: write` are accepted only inside that
|
|
808
|
+
// job, only when the manifest declares `regenerate`, and only when the
|
|
809
|
+
// workflow has no trigger other than workflow_dispatch and pushes solely to
|
|
810
|
+
// the right-git/regenerate-* branch namespace.
|
|
811
|
+
const regenerateSpan = workflow === "regenerate.yml" ? jobSpan("regenerate") : null;
|
|
812
|
+
const regenerateSource = regenerateSpan ? source.slice(regenerateSpan.start, regenerateSpan.end) : "";
|
|
813
|
+
const protectedRegenerate = workflow === "regenerate.yml"
|
|
814
|
+
&& manifest?.regenerate && typeof manifest.regenerate.script === "string"
|
|
815
|
+
&& /^on:\n workflow_dispatch:\n(?! )/m.test(source)
|
|
816
|
+
&& /regenerate:\n needs: \[private-repo-guard\]\n if: \$\{\{ github\.event_name == 'workflow_dispatch' \}\}\n/.test(regenerateSource)
|
|
817
|
+
&& /branch="right-git\/regenerate-\$\{\{ github\.run_id \}\}-\$\{\{ github\.run_attempt \}\}"\n/.test(regenerateSource)
|
|
818
|
+
&& /git push origin "HEAD:refs\/heads\/\$branch"\n/.test(regenerateSource)
|
|
819
|
+
&& !/git push(?![^\n]*"HEAD:refs\/heads\/\$branch")/.test(regenerateSource);
|
|
820
|
+
const allowedRegeneratePermissions = new Set(["contents", "pull-requests"]);
|
|
805
821
|
const devMacSpan = workflow === "ci.yml" ? jobSpan("dev-mac-sign") : null;
|
|
806
822
|
const devMacSource = devMacSpan ? source.slice(devMacSpan.start, devMacSpan.end) : "";
|
|
807
|
-
|
|
823
|
+
// `mac: "notarize"` additionally allows the notary API key secrets; the
|
|
824
|
+
// job gate (push to the default branch, release environment) is the same.
|
|
825
|
+
const allowedDevMacSecrets = manifest?.devArtifact?.mac === "notarize"
|
|
826
|
+
? allowedMacosSecrets
|
|
827
|
+
: new Set(["APPLE_CERTIFICATE_BASE64", "APPLE_CERTIFICATE_PASSWORD", "APPLE_KEYCHAIN_PASSWORD"]);
|
|
808
828
|
const protectedDevMacSigning = workflow === "ci.yml"
|
|
809
|
-
&& manifest?.devArtifact?.mac === "sign"
|
|
829
|
+
&& (manifest?.devArtifact?.mac === "sign" || manifest?.devArtifact?.mac === "notarize")
|
|
810
830
|
&& /dev-mac-sign:\n(?: #[^\n]*\n)* needs: \[ci\]\n if: \$\{\{ github\.event_name == 'push' && github\.ref_name == github\.event\.repository\.default_branch \}\}\n environment: /.test(devMacSource);
|
|
811
831
|
const releaseChain = workflow === "release-candidate.yml" ? manifest?.candidate?.releaseChain : undefined;
|
|
812
832
|
const allowedReleaseSecrets = new Set(releaseChain?.publishSecrets ?? []);
|
|
@@ -825,9 +845,12 @@ async function validateHostedWorkflows(root, appName, workflows, policy) {
|
|
|
825
845
|
&& (legacyReleasePublishGate || admittedReleasePublishGate)
|
|
826
846
|
&& /\n permissions:\n contents: write\n/.test(publishSource);
|
|
827
847
|
if (/^\s*permissions:\s*write-all\s*$/mi.test(source)
|
|
828
|
-
|| writePermissions.some(({ name, index }) =>
|
|
829
|
-
|
|
830
|
-
|
|
848
|
+
|| writePermissions.some(({ name, index }) => {
|
|
849
|
+
if (protectedRegenerate && inside(index, regenerateSpan) && allowedRegeneratePermissions.has(name)) return false;
|
|
850
|
+
return name === "id-token"
|
|
851
|
+
? !(protectedWindowsSigning && inside(index, windowsSpan))
|
|
852
|
+
: name !== "contents" || !protectedReleasePublish || !inside(index, publishSpan);
|
|
853
|
+
})
|
|
831
854
|
|| /pull_request_target\s*:/i.test(source)
|
|
832
855
|
|| /\bsecrets\s*\[/i.test(source)
|
|
833
856
|
|| requestedSecrets.some(({ name, index }) => !(protectedMacosSigning && inside(index, macosSpan) && allowedMacosSecrets.has(name))
|
package/rightkit-versions.json
CHANGED
|
@@ -13,27 +13,27 @@
|
|
|
13
13
|
"@rightkit/updates": "0.2.3"
|
|
14
14
|
},
|
|
15
15
|
"stagedNpm": {
|
|
16
|
-
"@rightkit/app-shell": "0.
|
|
16
|
+
"@rightkit/app-shell": "0.4.0",
|
|
17
17
|
"@rightkit/ax": "0.2.4",
|
|
18
|
-
"@rightkit/doc-render": "0.1.
|
|
19
|
-
"@rightkit/git": "0.2.
|
|
18
|
+
"@rightkit/doc-render": "0.1.5",
|
|
19
|
+
"@rightkit/git": "0.2.37",
|
|
20
20
|
"@rightkit/hooks": "0.1.2",
|
|
21
21
|
"@rightkit/i18n": "0.1.0",
|
|
22
22
|
"@rightkit/legal": "0.3.1",
|
|
23
23
|
"@rightkit/legal-ui": "0.2.0",
|
|
24
24
|
"@rightkit/license": "0.1.8",
|
|
25
25
|
"@rightkit/logs": "0.1.4",
|
|
26
|
-
"@rightkit/media-ui": "0.3.
|
|
27
|
-
"@rightkit/onboarding": "0.3.
|
|
28
|
-
"@rightkit/pdf-ui": "0.1.
|
|
26
|
+
"@rightkit/media-ui": "0.3.1",
|
|
27
|
+
"@rightkit/onboarding": "0.3.1",
|
|
28
|
+
"@rightkit/pdf-ui": "0.1.3",
|
|
29
29
|
"@rightkit/platform-ui": "0.2.0",
|
|
30
|
-
"@rightkit/qa": "0.4.
|
|
30
|
+
"@rightkit/qa": "0.4.1",
|
|
31
31
|
"@rightkit/qa-chrome": "0.1.3",
|
|
32
|
-
"@rightkit/release": "0.2.
|
|
33
|
-
"@rightkit/settings-ui": "0.3.
|
|
32
|
+
"@rightkit/release": "0.2.150",
|
|
33
|
+
"@rightkit/settings-ui": "0.3.1",
|
|
34
34
|
"@rightkit/shell": "0.1.0",
|
|
35
35
|
"@rightkit/tauri": "0.2.0",
|
|
36
|
-
"@rightkit/theme": "0.2.
|
|
36
|
+
"@rightkit/theme": "0.2.2",
|
|
37
37
|
"@rightkit/updates": "0.2.5"
|
|
38
38
|
},
|
|
39
39
|
"legacyNpm": {
|
|
@@ -75,7 +75,10 @@
|
|
|
75
75
|
"0.2.30",
|
|
76
76
|
"0.2.31",
|
|
77
77
|
"0.2.32",
|
|
78
|
-
"0.2.33"
|
|
78
|
+
"0.2.33",
|
|
79
|
+
"0.2.34",
|
|
80
|
+
"0.2.35",
|
|
81
|
+
"0.2.36"
|
|
79
82
|
],
|
|
80
83
|
"@rightkit/legal-ui": [
|
|
81
84
|
"0.1.0",
|
|
@@ -181,7 +184,9 @@
|
|
|
181
184
|
"0.2.144",
|
|
182
185
|
"0.2.145",
|
|
183
186
|
"0.2.146",
|
|
184
|
-
"0.2.147"
|
|
187
|
+
"0.2.147",
|
|
188
|
+
"0.2.148",
|
|
189
|
+
"0.2.149"
|
|
185
190
|
],
|
|
186
191
|
"@rightkit/qa": [
|
|
187
192
|
"0.1.0",
|
|
@@ -192,12 +197,14 @@
|
|
|
192
197
|
"0.2.4",
|
|
193
198
|
"0.3.0",
|
|
194
199
|
"0.3.1",
|
|
195
|
-
"0.3.2"
|
|
200
|
+
"0.3.2",
|
|
201
|
+
"0.4.0"
|
|
196
202
|
],
|
|
197
203
|
"@rightkit/app-shell": [
|
|
198
204
|
"0.1.0",
|
|
199
205
|
"0.2.0",
|
|
200
|
-
"0.2.1"
|
|
206
|
+
"0.2.1",
|
|
207
|
+
"0.3.0"
|
|
201
208
|
],
|
|
202
209
|
"@rightkit/media-ui": [
|
|
203
210
|
"0.1.0",
|
|
@@ -207,11 +214,13 @@
|
|
|
207
214
|
"0.2.3",
|
|
208
215
|
"0.2.4",
|
|
209
216
|
"0.2.5",
|
|
210
|
-
"0.2.6"
|
|
217
|
+
"0.2.6",
|
|
218
|
+
"0.3.0"
|
|
211
219
|
],
|
|
212
220
|
"@rightkit/theme": [
|
|
213
221
|
"0.1.0",
|
|
214
|
-
"0.2.0"
|
|
222
|
+
"0.2.0",
|
|
223
|
+
"0.2.1"
|
|
215
224
|
],
|
|
216
225
|
"@rightkit/settings-ui": [
|
|
217
226
|
"0.1.0",
|
|
@@ -221,20 +230,23 @@
|
|
|
221
230
|
"0.2.4",
|
|
222
231
|
"0.2.5",
|
|
223
232
|
"0.2.6",
|
|
224
|
-
"0.2.7"
|
|
233
|
+
"0.2.7",
|
|
234
|
+
"0.3.0"
|
|
225
235
|
],
|
|
226
236
|
"@rightkit/onboarding": [
|
|
227
237
|
"0.1.0",
|
|
228
238
|
"0.2.0",
|
|
229
239
|
"0.2.1",
|
|
230
240
|
"0.2.2",
|
|
231
|
-
"0.2.3"
|
|
241
|
+
"0.2.3",
|
|
242
|
+
"0.3.0"
|
|
232
243
|
],
|
|
233
244
|
"@rightkit/doc-render": [
|
|
234
245
|
"0.1.0",
|
|
235
246
|
"0.1.1",
|
|
236
247
|
"0.1.2",
|
|
237
|
-
"0.1.3"
|
|
248
|
+
"0.1.3",
|
|
249
|
+
"0.1.4"
|
|
238
250
|
],
|
|
239
251
|
"@rightkit/platform-ui": [
|
|
240
252
|
"0.1.1",
|
|
@@ -242,7 +254,8 @@
|
|
|
242
254
|
],
|
|
243
255
|
"@rightkit/pdf-ui": [
|
|
244
256
|
"0.1.0",
|
|
245
|
-
"0.1.1"
|
|
257
|
+
"0.1.1",
|
|
258
|
+
"0.1.2"
|
|
246
259
|
],
|
|
247
260
|
"@rightkit/qa-chrome": [
|
|
248
261
|
"0.1.0",
|
|
@@ -323,13 +336,13 @@
|
|
|
323
336
|
"swift": {
|
|
324
337
|
"rightkit-swift": {
|
|
325
338
|
"url": "https://github.com/bogusyogi/rightkit-swift.git",
|
|
326
|
-
"version": "0.
|
|
339
|
+
"version": "0.4.0"
|
|
327
340
|
}
|
|
328
341
|
},
|
|
329
342
|
"stagedSwift": {
|
|
330
343
|
"rightkit-swift": {
|
|
331
344
|
"url": "https://github.com/bogusyogi/rightkit-swift.git",
|
|
332
|
-
"version": "0.
|
|
345
|
+
"version": "0.4.0"
|
|
333
346
|
}
|
|
334
347
|
},
|
|
335
348
|
"registry": {
|
|
@@ -380,7 +393,7 @@
|
|
|
380
393
|
"@rightkit/app-shell": "0.3.0",
|
|
381
394
|
"@rightkit/ax": "0.2.4",
|
|
382
395
|
"@rightkit/doc-render": "0.1.4",
|
|
383
|
-
"@rightkit/git": "0.2.
|
|
396
|
+
"@rightkit/git": "0.2.37",
|
|
384
397
|
"@rightkit/hooks": "0.1.2",
|
|
385
398
|
"@rightkit/i18n": "0.1.0",
|
|
386
399
|
"@rightkit/legal": "0.3.1",
|
|
@@ -393,7 +406,7 @@
|
|
|
393
406
|
"@rightkit/platform-ui": "0.2.0",
|
|
394
407
|
"@rightkit/qa": "0.4.0",
|
|
395
408
|
"@rightkit/qa-chrome": "0.1.3",
|
|
396
|
-
"@rightkit/release": "0.2.
|
|
409
|
+
"@rightkit/release": "0.2.149",
|
|
397
410
|
"@rightkit/settings-ui": "0.3.0",
|
|
398
411
|
"@rightkit/shell": "0.1.0",
|
|
399
412
|
"@rightkit/tauri": "0.2.0",
|