@gamecrate/cli 2.2.0 → 2.2.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/dist/gamecrate.js +9 -6
- package/package.json +3 -2
package/dist/gamecrate.js
CHANGED
|
@@ -5318,6 +5318,11 @@ async function runOnce(argv, what) {
|
|
|
5318
5318
|
${stderr}`.trim());
|
|
5319
5319
|
}
|
|
5320
5320
|
var HEARTBEAT_MS = 1000;
|
|
5321
|
+
function spawnFailure(error) {
|
|
5322
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
5323
|
+
const code = error?.code;
|
|
5324
|
+
return code === undefined || message.includes(code) ? message : `${message} (${code})`;
|
|
5325
|
+
}
|
|
5321
5326
|
async function live(argv, what) {
|
|
5322
5327
|
const since = Date.now();
|
|
5323
5328
|
let lastNotice = 0;
|
|
@@ -5330,10 +5335,7 @@ async function live(argv, what) {
|
|
|
5330
5335
|
status(`${what} (${notice})`);
|
|
5331
5336
|
}, HEARTBEAT_MS);
|
|
5332
5337
|
try {
|
|
5333
|
-
return await captureLive(argv).catch((error) => ({
|
|
5334
|
-
code: 127,
|
|
5335
|
-
text: error instanceof Error ? error.message : String(error)
|
|
5336
|
-
}));
|
|
5338
|
+
return await captureLive(argv).catch((error) => ({ code: 127, text: spawnFailure(error) }));
|
|
5337
5339
|
} finally {
|
|
5338
5340
|
clearInterval(timer);
|
|
5339
5341
|
}
|
|
@@ -7583,7 +7585,7 @@ function published2(value) {
|
|
|
7583
7585
|
}
|
|
7584
7586
|
|
|
7585
7587
|
// src/index.ts
|
|
7586
|
-
var VERSION = "2.2.
|
|
7588
|
+
var VERSION = "2.2.1";
|
|
7587
7589
|
async function main(argv) {
|
|
7588
7590
|
const supervised = supervisedDir(argv);
|
|
7589
7591
|
try {
|
|
@@ -8048,7 +8050,8 @@ function steamcmdSource(runner, config) {
|
|
|
8048
8050
|
}
|
|
8049
8051
|
function gameForImage(args, config, defaults, game) {
|
|
8050
8052
|
const base = config.games[game];
|
|
8051
|
-
|
|
8053
|
+
const ref = args.image ?? imageFor(base, launchProfile(args, defaults, base));
|
|
8054
|
+
return withImageOverride(base, ref);
|
|
8052
8055
|
}
|
|
8053
8056
|
async function refs(args, config, defaults) {
|
|
8054
8057
|
const game = requireGame(args, config);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamecrate/cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Run a modded game in a container, with mods resolved from your local checkouts.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"scripts": {
|
|
36
36
|
"typecheck": "tsc --noEmit",
|
|
37
|
-
"test": "
|
|
37
|
+
"test": "bun test --parallel",
|
|
38
38
|
"build": "npm run build:node && npm run build:types && npm run build:binary",
|
|
39
39
|
"build:node": "bun build ./src/index.ts --target=node --packages=external --define __VERSION__='\"'${npm_package_version:-0.0.0-dev}'\"' --outfile dist/gamecrate.js && bun build ./src/lib.ts --target=node --packages=external --outfile dist/lib.js",
|
|
40
40
|
"build:types": "tsc -p tsconfig.build.json",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"prepack": "npm run build:node && npm run build:types"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
+
"@types/bun": "^1.3.0",
|
|
46
47
|
"@types/node": "^22.10.0",
|
|
47
48
|
"@types/picomatch": "^4.0.0",
|
|
48
49
|
"typescript": "^5.7.0"
|