@rightkit/release 0.2.77 → 0.2.79
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/direct-bootstrap.mjs +13 -3
- package/package.json +1 -1
- package/registry-parity.mjs +5 -2
- package/rightkit-versions.json +1 -1
package/direct-bootstrap.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { mkdirSync, readFileSync, realpathSync, statSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
3
|
+
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
import { RIGHTRELEASE_MANIFEST_SIGNER, signReleaseManifestWithAzure } from "./sign-release-manifest.mjs";
|
|
6
6
|
import { validateCycloneDxSbom, validateInTotoSlsaProvenance } from "./supply-chain-evidence.mjs";
|
|
@@ -73,8 +73,18 @@ function assertGitHubAssetUrl(url) {
|
|
|
73
73
|
|
|
74
74
|
export function createPortableArchive({ sourceDir, outputPath, commandRunner = spawnSync }) {
|
|
75
75
|
const source = realpathSync(sourceDir);
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const outputDir = resolve(dirname(outputPath));
|
|
77
|
+
mkdirSync(outputDir, { recursive: true });
|
|
78
|
+
// On Windows, resolve the System32 bsdtar explicitly: PATH often finds GNU
|
|
79
|
+
// tar (Git Bash) first, which reads a colon in -f as a remote host spec and
|
|
80
|
+
// cannot write zip at all — its -a silently emits plain tar bytes for a
|
|
81
|
+
// .zip suffix. bsdtar writes a real zip. Run from the output directory with
|
|
82
|
+
// a bare filename so the invocation stays safe under either tar.
|
|
83
|
+
const tarProgram = process.platform === "win32"
|
|
84
|
+
? join(process.env.SystemRoot ?? "C:\\Windows", "System32", "tar.exe")
|
|
85
|
+
: "tar";
|
|
86
|
+
const result = commandRunner(tarProgram, ["-a", "-c", "-f", basename(outputPath), "-C", source, "."], {
|
|
87
|
+
cwd: outputDir,
|
|
78
88
|
encoding: "utf8",
|
|
79
89
|
windowsHide: true,
|
|
80
90
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rightkit/release",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.79",
|
|
4
4
|
"description": "Portable Right Suite release CLI/SDK: signed native archives, direct bootstrap transactions, immutable GitHub Release upload, R2 bootstrap publication, and add-on adoption.",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"type": "module",
|
package/registry-parity.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { createHash } from 'node:crypto';
|
|
|
3
3
|
import { execFileSync } from 'node:child_process';
|
|
4
4
|
import { mkdtemp, mkdir, readFile, readdir, rm, writeFile } from 'node:fs/promises';
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
|
-
import { basename, join } from 'node:path';
|
|
6
|
+
import { basename, join, relative } from 'node:path';
|
|
7
7
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
8
8
|
|
|
9
9
|
const packageRoot = fileURLToPath(new URL('.', import.meta.url));
|
|
@@ -58,7 +58,10 @@ function runPnpm(args, options = {}) {
|
|
|
58
58
|
|
|
59
59
|
async function extract(archive, destination) {
|
|
60
60
|
await mkdir(destination, { recursive: true });
|
|
61
|
-
|
|
61
|
+
// GNU tar reads the colon in an absolute Windows path (C:\...) as a remote
|
|
62
|
+
// host spec, and MSYS tar rejects absolute Windows -C targets; run from the
|
|
63
|
+
// destination with a relative archive path so no absolute path reaches tar.
|
|
64
|
+
execFileSync('tar', ['-xzf', relative(destination, archive)], { cwd: destination, stdio: 'pipe' });
|
|
62
65
|
return join(destination, 'package');
|
|
63
66
|
}
|
|
64
67
|
|
package/rightkit-versions.json
CHANGED