@jpwesselink/release-playground 0.1.0-beta.4ca092e

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.
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execFileSync } = require("child_process");
4
+ const path = require("path");
5
+
6
+ const PLATFORMS = {
7
+ "linux-x64": "@jpwesselink/release-playground-linux-x64-gnu",
8
+ "linux-arm64": "@jpwesselink/release-playground-linux-arm64-gnu",
9
+ "darwin-x64": "@jpwesselink/release-playground-darwin-x64",
10
+ "darwin-arm64": "@jpwesselink/release-playground-darwin-arm64",
11
+ "win32-x64": "@jpwesselink/release-playground-win32-x64-msvc",
12
+ "win32-arm64": "@jpwesselink/release-playground-win32-arm64-msvc",
13
+ };
14
+
15
+ const key = `${process.platform}-${process.arch}`;
16
+ const pkg = PLATFORMS[key];
17
+
18
+ if (!pkg) {
19
+ console.error(
20
+ `release-playground: unsupported platform ${process.platform} ${process.arch}\n` +
21
+ `Supported: ${Object.keys(PLATFORMS).join(", ")}`
22
+ );
23
+ process.exit(1);
24
+ }
25
+
26
+ let binPath;
27
+ try {
28
+ const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
29
+ const ext = process.platform === "win32" ? ".exe" : "";
30
+ binPath = path.join(pkgDir, `release-playground${ext}`);
31
+ } catch {
32
+ console.error(
33
+ `release-playground: could not find package "${pkg}"\n\n` +
34
+ `This usually means the optional dependency was not installed.\n` +
35
+ `Try reinstalling with: npm install @jpwesselink/release-playground`
36
+ );
37
+ process.exit(1);
38
+ }
39
+
40
+ try {
41
+ execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
42
+ } catch (e) {
43
+ if (e.status !== null) process.exit(e.status);
44
+ throw e;
45
+ }
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@jpwesselink/release-playground",
3
+ "version": "0.1.0-beta.4ca092e",
4
+ "description": "Test release workflow",
5
+ "bin": {
6
+ "release-playground": "bin/release-playground.js"
7
+ },
8
+ "files": [
9
+ "bin/release-playground.js"
10
+ ],
11
+ "optionalDependencies": {
12
+ "@jpwesselink/release-playground-linux-x64-gnu": "0.1.0-beta.4ca092e",
13
+ "@jpwesselink/release-playground-linux-arm64-gnu": "0.1.0-beta.4ca092e",
14
+ "@jpwesselink/release-playground-darwin-x64": "0.1.0-beta.4ca092e",
15
+ "@jpwesselink/release-playground-darwin-arm64": "0.1.0-beta.4ca092e",
16
+ "@jpwesselink/release-playground-win32-x64-msvc": "0.1.0-beta.4ca092e",
17
+ "@jpwesselink/release-playground-win32-arm64-msvc": "0.1.0-beta.4ca092e"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
+ "license": "MIT"
23
+ }