@rightkit/release 0.2.105 → 0.2.106
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/addon-command.mjs +1 -1
- package/background-process.mjs +33 -0
- package/build-release.mjs +47 -6
- package/cache-command.mjs +2 -2
- package/cache-policy.mjs +1 -1
- package/cargo-contract.mjs +230 -230
- package/cargo-guard.mjs +4 -4
- package/cargo-target.mjs +53 -48
- package/cli/right-release.mjs +3 -2
- package/create-mac-updater.mjs +1 -1
- package/deps.mjs +1 -1
- package/direct-bootstrap.mjs +84 -12
- package/github-release.mjs +1 -1
- package/heavy-command.mjs +1 -1
- package/macos-signing-identity.mjs +13 -0
- package/managed-cargo.mjs +29 -0
- package/mirror-root-artifact.mjs +1 -1
- package/model-promote.mjs +1 -1
- package/notarize-macos.mjs +1 -1
- package/nsis-payload.mjs +1 -1
- package/package.json +2 -2
- package/preflight.mjs +1 -1
- package/process-liveness.mjs +1 -1
- package/progress-control.mjs +1 -1
- package/pub-upload.mjs +1 -1
- package/publish-cargo.mjs +1 -1
- package/publish-swift.mjs +1 -1
- package/publish-update.mjs +1 -1
- package/registry-parity.mjs +1 -1
- package/release-invocation.mjs +1 -1
- package/release-state.mjs +2 -1
- package/release-token.mjs +1 -1
- package/release.mjs +18 -11
- package/rightkit-versions.json +141 -140
- package/sign-macos.mjs +4 -3
- package/sign-release-manifest.mjs +7 -5
- package/sign-updater.mjs +1 -1
- package/sign-windows.mjs +3 -15
- package/signing-env.mjs +29 -0
- package/standalone-clone-verify.mjs +1 -1
- package/upload-large.mjs +1 -1
- package/upload-release.mjs +1 -1
package/rightkit-versions.json
CHANGED
|
@@ -1,140 +1,141 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schema": 2,
|
|
3
|
-
"packageManager": "pnpm@11.24.0",
|
|
4
|
-
"npm": {
|
|
5
|
-
"@rightkit/git": "0.2.0",
|
|
6
|
-
"@rightkit/legal": "0.2.0",
|
|
7
|
-
"@rightkit/license": "0.1.5",
|
|
8
|
-
"@rightkit/logs": "0.1.3",
|
|
9
|
-
"@rightkit/platform-ui": "0.1.0",
|
|
10
|
-
"@rightkit/qa": "0.1.0",
|
|
11
|
-
"@rightkit/release": "0.2.47",
|
|
12
|
-
"@rightkit/tauri": "0.1.0",
|
|
13
|
-
"@rightkit/updates": "0.2.3"
|
|
14
|
-
},
|
|
15
|
-
"stagedNpm": {
|
|
16
|
-
"@rightkit/ax": "0.2.4",
|
|
17
|
-
"@rightkit/git": "0.2.25",
|
|
18
|
-
"@rightkit/hooks": "0.1.1",
|
|
19
|
-
"@rightkit/legal": "0.3.1",
|
|
20
|
-
"@rightkit/legal-ui": "0.1.1",
|
|
21
|
-
"@rightkit/license": "0.1.7",
|
|
22
|
-
"@rightkit/logs": "0.1.4",
|
|
23
|
-
"@rightkit/platform-ui": "0.1.1",
|
|
24
|
-
"@rightkit/qa": "0.2.1",
|
|
25
|
-
"@rightkit/release": "0.2.
|
|
26
|
-
"@rightkit/tauri": "0.1.1",
|
|
27
|
-
"@rightkit/updates": "0.2.4"
|
|
28
|
-
},
|
|
29
|
-
"legacyNpm": {
|
|
30
|
-
"@rightkit/ax": [
|
|
31
|
-
"0.2.0",
|
|
32
|
-
"0.2.1",
|
|
33
|
-
"0.2.2",
|
|
34
|
-
"0.2.3"
|
|
35
|
-
],
|
|
36
|
-
"@rightkit/git": [
|
|
37
|
-
"0.2.1",
|
|
38
|
-
"0.2.2",
|
|
39
|
-
"0.2.3",
|
|
40
|
-
"0.2.4",
|
|
41
|
-
"0.2.5",
|
|
42
|
-
"0.2.6",
|
|
43
|
-
"0.2.7",
|
|
44
|
-
"0.2.8",
|
|
45
|
-
"0.2.9",
|
|
46
|
-
"0.2.10",
|
|
47
|
-
"0.2.11",
|
|
48
|
-
"0.2.12",
|
|
49
|
-
"0.2.13",
|
|
50
|
-
"0.2.14",
|
|
51
|
-
"0.2.15",
|
|
52
|
-
"0.2.16",
|
|
53
|
-
"0.2.18",
|
|
54
|
-
"0.2.19",
|
|
55
|
-
"0.2.20",
|
|
56
|
-
"0.2.21",
|
|
57
|
-
"0.2.22",
|
|
58
|
-
"0.2.23",
|
|
59
|
-
"0.2.24"
|
|
60
|
-
],
|
|
61
|
-
"@rightkit/legal-ui": [
|
|
62
|
-
"0.1.0"
|
|
63
|
-
],
|
|
64
|
-
"@rightkit/hooks": [
|
|
65
|
-
"0.1.0"
|
|
66
|
-
],
|
|
67
|
-
"@rightkit/legal": [
|
|
68
|
-
"0.3.0"
|
|
69
|
-
],
|
|
70
|
-
"@rightkit/license": [
|
|
71
|
-
"0.1.6"
|
|
72
|
-
],
|
|
73
|
-
"@rightkit/release": [
|
|
74
|
-
"0.2.22",
|
|
75
|
-
"0.2.29",
|
|
76
|
-
"0.2.30",
|
|
77
|
-
"0.2.31",
|
|
78
|
-
"0.2.41",
|
|
79
|
-
"0.2.42",
|
|
80
|
-
"0.2.43",
|
|
81
|
-
"0.2.44",
|
|
82
|
-
"0.2.45",
|
|
83
|
-
"0.2.46",
|
|
84
|
-
"0.2.49",
|
|
85
|
-
"0.2.50",
|
|
86
|
-
"0.2.51",
|
|
87
|
-
"0.2.53",
|
|
88
|
-
"0.2.54",
|
|
89
|
-
"0.2.55",
|
|
90
|
-
"0.2.56",
|
|
91
|
-
"0.2.61",
|
|
92
|
-
"0.2.62",
|
|
93
|
-
"0.2.63",
|
|
94
|
-
"0.2.64",
|
|
95
|
-
"0.2.65",
|
|
96
|
-
"0.2.66",
|
|
97
|
-
"0.2.67",
|
|
98
|
-
"0.2.68",
|
|
99
|
-
"0.2.69",
|
|
100
|
-
"0.2.70",
|
|
101
|
-
"0.2.71",
|
|
102
|
-
"0.2.72",
|
|
103
|
-
"0.2.73",
|
|
104
|
-
"0.2.74",
|
|
105
|
-
"0.2.75",
|
|
106
|
-
"0.2.76",
|
|
107
|
-
"0.2.82",
|
|
108
|
-
"0.2.83",
|
|
109
|
-
"0.2.91",
|
|
110
|
-
"0.2.92",
|
|
111
|
-
"0.2.94",
|
|
112
|
-
"0.2.95",
|
|
113
|
-
"0.2.96",
|
|
114
|
-
"0.2.97",
|
|
115
|
-
"0.2.98",
|
|
116
|
-
"0.2.99",
|
|
117
|
-
"0.2.104"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
"0.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"rightkit-
|
|
127
|
-
"rightkit-
|
|
128
|
-
"rightkit-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"rightkit-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"schema": 2,
|
|
3
|
+
"packageManager": "pnpm@11.24.0",
|
|
4
|
+
"npm": {
|
|
5
|
+
"@rightkit/git": "0.2.0",
|
|
6
|
+
"@rightkit/legal": "0.2.0",
|
|
7
|
+
"@rightkit/license": "0.1.5",
|
|
8
|
+
"@rightkit/logs": "0.1.3",
|
|
9
|
+
"@rightkit/platform-ui": "0.1.0",
|
|
10
|
+
"@rightkit/qa": "0.1.0",
|
|
11
|
+
"@rightkit/release": "0.2.47",
|
|
12
|
+
"@rightkit/tauri": "0.1.0",
|
|
13
|
+
"@rightkit/updates": "0.2.3"
|
|
14
|
+
},
|
|
15
|
+
"stagedNpm": {
|
|
16
|
+
"@rightkit/ax": "0.2.4",
|
|
17
|
+
"@rightkit/git": "0.2.25",
|
|
18
|
+
"@rightkit/hooks": "0.1.1",
|
|
19
|
+
"@rightkit/legal": "0.3.1",
|
|
20
|
+
"@rightkit/legal-ui": "0.1.1",
|
|
21
|
+
"@rightkit/license": "0.1.7",
|
|
22
|
+
"@rightkit/logs": "0.1.4",
|
|
23
|
+
"@rightkit/platform-ui": "0.1.1",
|
|
24
|
+
"@rightkit/qa": "0.2.1",
|
|
25
|
+
"@rightkit/release": "0.2.106",
|
|
26
|
+
"@rightkit/tauri": "0.1.1",
|
|
27
|
+
"@rightkit/updates": "0.2.4"
|
|
28
|
+
},
|
|
29
|
+
"legacyNpm": {
|
|
30
|
+
"@rightkit/ax": [
|
|
31
|
+
"0.2.0",
|
|
32
|
+
"0.2.1",
|
|
33
|
+
"0.2.2",
|
|
34
|
+
"0.2.3"
|
|
35
|
+
],
|
|
36
|
+
"@rightkit/git": [
|
|
37
|
+
"0.2.1",
|
|
38
|
+
"0.2.2",
|
|
39
|
+
"0.2.3",
|
|
40
|
+
"0.2.4",
|
|
41
|
+
"0.2.5",
|
|
42
|
+
"0.2.6",
|
|
43
|
+
"0.2.7",
|
|
44
|
+
"0.2.8",
|
|
45
|
+
"0.2.9",
|
|
46
|
+
"0.2.10",
|
|
47
|
+
"0.2.11",
|
|
48
|
+
"0.2.12",
|
|
49
|
+
"0.2.13",
|
|
50
|
+
"0.2.14",
|
|
51
|
+
"0.2.15",
|
|
52
|
+
"0.2.16",
|
|
53
|
+
"0.2.18",
|
|
54
|
+
"0.2.19",
|
|
55
|
+
"0.2.20",
|
|
56
|
+
"0.2.21",
|
|
57
|
+
"0.2.22",
|
|
58
|
+
"0.2.23",
|
|
59
|
+
"0.2.24"
|
|
60
|
+
],
|
|
61
|
+
"@rightkit/legal-ui": [
|
|
62
|
+
"0.1.0"
|
|
63
|
+
],
|
|
64
|
+
"@rightkit/hooks": [
|
|
65
|
+
"0.1.0"
|
|
66
|
+
],
|
|
67
|
+
"@rightkit/legal": [
|
|
68
|
+
"0.3.0"
|
|
69
|
+
],
|
|
70
|
+
"@rightkit/license": [
|
|
71
|
+
"0.1.6"
|
|
72
|
+
],
|
|
73
|
+
"@rightkit/release": [
|
|
74
|
+
"0.2.22",
|
|
75
|
+
"0.2.29",
|
|
76
|
+
"0.2.30",
|
|
77
|
+
"0.2.31",
|
|
78
|
+
"0.2.41",
|
|
79
|
+
"0.2.42",
|
|
80
|
+
"0.2.43",
|
|
81
|
+
"0.2.44",
|
|
82
|
+
"0.2.45",
|
|
83
|
+
"0.2.46",
|
|
84
|
+
"0.2.49",
|
|
85
|
+
"0.2.50",
|
|
86
|
+
"0.2.51",
|
|
87
|
+
"0.2.53",
|
|
88
|
+
"0.2.54",
|
|
89
|
+
"0.2.55",
|
|
90
|
+
"0.2.56",
|
|
91
|
+
"0.2.61",
|
|
92
|
+
"0.2.62",
|
|
93
|
+
"0.2.63",
|
|
94
|
+
"0.2.64",
|
|
95
|
+
"0.2.65",
|
|
96
|
+
"0.2.66",
|
|
97
|
+
"0.2.67",
|
|
98
|
+
"0.2.68",
|
|
99
|
+
"0.2.69",
|
|
100
|
+
"0.2.70",
|
|
101
|
+
"0.2.71",
|
|
102
|
+
"0.2.72",
|
|
103
|
+
"0.2.73",
|
|
104
|
+
"0.2.74",
|
|
105
|
+
"0.2.75",
|
|
106
|
+
"0.2.76",
|
|
107
|
+
"0.2.82",
|
|
108
|
+
"0.2.83",
|
|
109
|
+
"0.2.91",
|
|
110
|
+
"0.2.92",
|
|
111
|
+
"0.2.94",
|
|
112
|
+
"0.2.95",
|
|
113
|
+
"0.2.96",
|
|
114
|
+
"0.2.97",
|
|
115
|
+
"0.2.98",
|
|
116
|
+
"0.2.99",
|
|
117
|
+
"0.2.104",
|
|
118
|
+
"0.2.105"
|
|
119
|
+
],
|
|
120
|
+
"@rightkit/qa": [
|
|
121
|
+
"0.1.0",
|
|
122
|
+
"0.2.0"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"cargo": {
|
|
126
|
+
"rightkit-license": "0.1.2",
|
|
127
|
+
"rightkit-logs": "0.1.0",
|
|
128
|
+
"rightkit-process": "0.1.0",
|
|
129
|
+
"rightkit-tauri": "0.1.0"
|
|
130
|
+
},
|
|
131
|
+
"stagedCargo": {
|
|
132
|
+
"rightkit-license": "0.1.3",
|
|
133
|
+
"rightkit-tauri": "0.1.1"
|
|
134
|
+
},
|
|
135
|
+
"swift": {
|
|
136
|
+
"rightkit-swift": {
|
|
137
|
+
"url": "https://github.com/bogusyogi/rightkit-swift.git",
|
|
138
|
+
"version": "0.1.1"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
package/sign-macos.mjs
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { spawnSync } from "
|
|
5
|
+
import { spawnSync } from "./background-process.mjs";
|
|
6
6
|
import { MACOS_PORTABLE_SIGNING_CONTRACT } from "./macos-signing-contract.mjs";
|
|
7
|
+
import { resolveMacosDeveloperIdIdentity } from "./macos-signing-identity.mjs";
|
|
7
8
|
|
|
8
9
|
const args = process.argv.slice(2);
|
|
9
10
|
const dryRun = args.includes("--dry-run");
|
|
@@ -20,8 +21,8 @@ if (dryRun) {
|
|
|
20
21
|
process.exit(0);
|
|
21
22
|
}
|
|
22
23
|
if (process.platform !== "darwin") fail("macOS signing must run on macOS");
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
let identity;
|
|
25
|
+
try { identity = resolveMacosDeveloperIdIdentity(); } catch (error) { fail(error.message); }
|
|
25
26
|
for (const file of files) if (!existsSync(file)) fail(`missing file: ${file}`);
|
|
26
27
|
|
|
27
28
|
const evidence = [];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { copyFileSync, existsSync, mkdirSync, mkdtempSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join, resolve } from "node:path";
|
|
4
|
-
import { spawnSync } from "
|
|
4
|
+
import { spawnSync } from "./background-process.mjs";
|
|
5
|
+
import { signingEnv } from "./signing-env.mjs";
|
|
5
6
|
|
|
6
7
|
export const RIGHTRELEASE_MANIFEST_SIGNER = Object.freeze({
|
|
7
8
|
id: "azure-artifact-signing-damned-ventures-v1",
|
|
@@ -73,6 +74,7 @@ export function signReleaseManifestWithAzure({
|
|
|
73
74
|
|
|
74
75
|
const temp = mkdtempSync(join(tmpdir(), "rightrelease-manifest-sign-"));
|
|
75
76
|
const metadata = metadataPath || materializeMetadata(temp, env);
|
|
77
|
+
const signingEnvironment = signingEnv(environment, env);
|
|
76
78
|
const catalogDir = join(temp, "catalog");
|
|
77
79
|
mkdirSync(catalogDir, { recursive: true });
|
|
78
80
|
const catalog = join(catalogDir, "catalog.cat");
|
|
@@ -84,15 +86,15 @@ export function signReleaseManifestWithAzure({
|
|
|
84
86
|
"New-FileCatalog -Path $ManifestPath -CatalogFilePath $CatalogDirectory -CatalogVersion 2.0 | Out-Null",
|
|
85
87
|
].join("\r\n") + "\r\n");
|
|
86
88
|
try {
|
|
87
|
-
const generation = commandRunner(powershellPath, ["-NoProfile", "-File", generator, resolve(manifestPath), catalogDir], { encoding: "utf8", windowsHide: true, env:
|
|
89
|
+
const generation = commandRunner(powershellPath, ["-NoProfile", "-File", generator, resolve(manifestPath), catalogDir], { encoding: "utf8", windowsHide: true, env: signingEnvironment });
|
|
88
90
|
if (generation?.status !== 0) throw new Error(`RightRelease manifest catalog generation failed: ${String(generation?.stderr ?? "").trim()}`);
|
|
89
91
|
if (!existsSync(catalog) || !statSync(catalog).isFile()) throw new Error("RightRelease manifest catalog was not produced");
|
|
90
92
|
const result = commandRunner(signtool, [
|
|
91
93
|
"sign", "/v", "/fd", "SHA256", "/tr", "http://timestamp.acs.microsoft.com", "/td", "SHA256",
|
|
92
94
|
"/dlib", dlib, "/dmdf", metadata, catalog,
|
|
93
|
-
], { encoding: "utf8", windowsHide: true, env:
|
|
94
|
-
if (result?.status !== 0) throw new Error(`RightRelease manifest signing failed: ${String(result?.stderr ?? "").trim()}`);
|
|
95
|
-
const inspection = inspectCatalog({ manifestPath: resolve(manifestPath), signaturePath: catalog, commandRunner, powershellPath, environment });
|
|
95
|
+
], { encoding: "utf8", windowsHide: true, env: signingEnvironment });
|
|
96
|
+
if (result?.status !== 0) throw new Error(`RightRelease manifest signing failed: ${String(result?.stderr ?? "").trim()}\n${String(result?.stdout ?? "").slice(-1200)}`);
|
|
97
|
+
const inspection = inspectCatalog({ manifestPath: resolve(manifestPath), signaturePath: catalog, commandRunner, powershellPath, environment: signingEnvironment });
|
|
96
98
|
if (inspection.verified !== true || inspection.catalogStatus !== "Valid" || inspection.signatureStatus !== "Valid") throw new Error("RightRelease manifest catalog verification failed");
|
|
97
99
|
if (normalizeSubject(inspection.subject) !== normalizeSubject(RIGHTRELEASE_MANIFEST_SIGNER.subject) || !CERTIFICATE_SHA256.test(inspection.certificateSha256 ?? "")) throw new Error("RightRelease manifest signer identity does not match protected Azure profile");
|
|
98
100
|
mkdirSync(dirname(signaturePath), { recursive: true });
|
package/sign-updater.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { execFileSync, spawnSync } from "
|
|
2
|
+
import { execFileSync, spawnSync } from "./background-process.mjs";
|
|
3
3
|
import { existsSync, readFileSync, rmSync } from "node:fs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
package/sign-windows.mjs
CHANGED
|
@@ -3,7 +3,8 @@ import { createHash } from "node:crypto";
|
|
|
3
3
|
import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
|
-
import { spawnSync } from "
|
|
6
|
+
import { spawnSync } from "./background-process.mjs";
|
|
7
|
+
import { azureCliCandidates, signingEnv } from "./signing-env.mjs";
|
|
7
8
|
|
|
8
9
|
const EXCLUDE_CREDENTIALS = [
|
|
9
10
|
"ManagedIdentityCredential",
|
|
@@ -34,7 +35,7 @@ if (dryRun) {
|
|
|
34
35
|
if (process.platform !== "win32") fail("Windows signing must run on Windows");
|
|
35
36
|
for (const file of files) if (!existsSync(file)) fail(`missing file: ${file}`);
|
|
36
37
|
|
|
37
|
-
const childEnv = signingEnv();
|
|
38
|
+
const childEnv = signingEnv(process.env, env);
|
|
38
39
|
const signtool = findFirst([env("AZURE_SIGNTOOL_PATH"), env("SIGNTOOL_PATH"), ...signtoolCandidates()]);
|
|
39
40
|
if (!signtool) fail("signtool.exe not found; set AZURE_SIGNTOOL_PATH or install Windows SDK Build Tools");
|
|
40
41
|
if (verifyOnly) {
|
|
@@ -86,19 +87,6 @@ function metadataPath(dir) {
|
|
|
86
87
|
return file;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
function signingEnv() {
|
|
90
|
-
const paths = [path.dirname(findFirst(azureCliCandidates()) ?? ""), env("PATH")].filter(Boolean);
|
|
91
|
-
return { ...process.env, PATH: paths.join(path.delimiter) };
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function azureCliCandidates() {
|
|
95
|
-
return [
|
|
96
|
-
path.join(env("LOCALAPPDATA") || "", "AzureCLI", "bin", "az.cmd"),
|
|
97
|
-
path.join(env("ProgramFiles(x86)") || "C:\\Program Files (x86)", "Microsoft SDKs", "Azure", "CLI2", "wbin", "az.cmd"),
|
|
98
|
-
path.join(env("ProgramFiles") || "C:\\Program Files", "Microsoft SDKs", "Azure", "CLI2", "wbin", "az.cmd"),
|
|
99
|
-
];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
90
|
function signtoolCandidates() {
|
|
103
91
|
return [
|
|
104
92
|
...sdkBuildToolsCandidates(),
|
package/signing-env.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { delimiter, dirname, join } from "node:path";
|
|
3
|
+
|
|
4
|
+
// DefaultAzureCredential's AzureCliCredential resolves `az` through the child
|
|
5
|
+
// PATH. Signing children must inherit an augmented PATH or signing fails with
|
|
6
|
+
// a bare "unexpected internal error" whenever `az` is installed outside the
|
|
7
|
+
// ambient PATH.
|
|
8
|
+
export function signingEnv(environment, env) {
|
|
9
|
+
const azDir = dirnameOfFirstExisting(azureCliCandidates(env));
|
|
10
|
+
// Windows env blocks are case-insensitive; preserve the ambient key casing
|
|
11
|
+
// (usually "Path") so the augmented value replaces it instead of producing
|
|
12
|
+
// a shadowed duplicate the resolver never reads.
|
|
13
|
+
const pathKey = Object.keys(environment).find((key) => key.toLowerCase() === "path") ?? "PATH";
|
|
14
|
+
const basePath = env("PATH") || environment[pathKey] || "";
|
|
15
|
+
return { ...environment, [pathKey]: [azDir, basePath].filter(Boolean).join(delimiter) };
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function azureCliCandidates(env) {
|
|
19
|
+
return [
|
|
20
|
+
join(env("LOCALAPPDATA") || "", "AzureCLI", "bin", "az.cmd"),
|
|
21
|
+
join(env("ProgramFiles(x86)") || "C:\\Program Files (x86)", "Microsoft SDKs", "Azure", "CLI2", "wbin", "az.cmd"),
|
|
22
|
+
join(env("ProgramFiles") || "C:\\Program Files", "Microsoft SDKs", "Azure", "CLI2", "wbin", "az.cmd"),
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function dirnameOfFirstExisting(candidates) {
|
|
27
|
+
const found = candidates.find((candidate) => candidate && existsSync(candidate));
|
|
28
|
+
return found ? dirname(found) : null;
|
|
29
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { spawnSync } from "
|
|
4
|
+
import { spawnSync } from "./background-process.mjs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
|
|
7
7
|
export const DEFAULT_APPS = Object.freeze([
|
package/upload-large.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { accessSync, statSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { spawnSync } from "
|
|
4
|
+
import { spawnSync } from "./background-process.mjs";
|
|
5
5
|
|
|
6
6
|
const ACCOUNT_ID = "03ae77ccd7a07bcbb2dcfde47fa7ba3a";
|
|
7
7
|
const BUCKETS = new Map([
|
package/upload-release.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { spawnSync } from "
|
|
4
|
+
import { spawnSync } from "./background-process.mjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
import { prepareGitHubRelease, publishGitHubRelease } from "./github-release.mjs";
|
|
7
7
|
import { assertPrimaryReleaseCheckout } from "./release-invocation.mjs";
|