permanent-underclass 0.1.0-beta.1

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/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # permanent-underclass
2
+
3
+ Run the game with:
4
+
5
+ ```bash
6
+ npx --yes permanent-underclass
7
+ ```
8
+
9
+ Current beta support:
10
+ - macOS arm64 (`@echosight/permanent-underclass-darwin-arm64`)
11
+
12
+ If your platform is not supported yet, the launcher prints an explicit message.
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require("node:fs");
4
+ const path = require("node:path");
5
+ const { spawnSync } = require("node:child_process");
6
+
7
+ const PLATFORM_MAP = {
8
+ "darwin-arm64": "@echosight/permanent-underclass-darwin-arm64"
9
+ };
10
+
11
+ const key = `${process.platform}-${process.arch}`;
12
+ const platformPkg = PLATFORM_MAP[key];
13
+
14
+ if (!platformPkg) {
15
+ console.error(
16
+ [
17
+ "permanent-underclass: unsupported platform for this beta release.",
18
+ `Detected: ${key}`,
19
+ "Supported:",
20
+ " - darwin-arm64",
21
+ "Try again later when more platform packages are published."
22
+ ].join("\n")
23
+ );
24
+ process.exit(1);
25
+ }
26
+
27
+ let pkgJsonPath;
28
+ try {
29
+ pkgJsonPath = require.resolve(`${platformPkg}/package.json`);
30
+ } catch (_err) {
31
+ console.error(
32
+ [
33
+ `permanent-underclass: missing optional dependency ${platformPkg}.`,
34
+ "If you installed with --omit=optional, reinstall without that flag.",
35
+ "Try:",
36
+ " npm i -g permanent-underclass@beta",
37
+ "or",
38
+ " npx --yes permanent-underclass@beta"
39
+ ].join("\n")
40
+ );
41
+ process.exit(1);
42
+ }
43
+
44
+ const pkgRoot = path.dirname(pkgJsonPath);
45
+ const binPath = path.join(pkgRoot, "bin", "permanent-underclass");
46
+
47
+ if (!fs.existsSync(binPath)) {
48
+ console.error(`permanent-underclass: binary not found at ${binPath}`);
49
+ process.exit(1);
50
+ }
51
+
52
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: "inherit" });
53
+
54
+ if (result.error) {
55
+ console.error(`permanent-underclass: failed to launch binary: ${result.error.message}`);
56
+ process.exit(1);
57
+ }
58
+
59
+ process.exit(result.status == null ? 1 : result.status);
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "permanent-underclass",
3
+ "version": "0.1.0-beta.1",
4
+ "description": "Terminal game: Bloomberg-terminal vibes, Oregon-trail dread.",
5
+ "license": "UNLICENSED",
6
+ "bin": {
7
+ "permanent-underclass": "bin/permanent-underclass.cjs"
8
+ },
9
+ "files": [
10
+ "bin/permanent-underclass.cjs",
11
+ "README.md"
12
+ ],
13
+ "optionalDependencies": {
14
+ "@echosight/permanent-underclass-darwin-arm64": "0.1.0-beta.1"
15
+ },
16
+ "engines": {
17
+ "node": ">=18"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public",
21
+ "provenance": false
22
+ }
23
+ }