@gamecrate/cli 2.1.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/lib.js CHANGED
@@ -334,6 +334,7 @@ var game = obj({
334
334
  updates: obj({ check: bool.optional(), everyHours: num.optional() }).optional()
335
335
  }).check(requiredWhen("context", (v) => v["acquire"] === "build")),
336
336
  executable: str,
337
+ managed: strArray.optional(),
337
338
  steamAppId: num,
338
339
  workshopRoot: z.union([z.string(), z.null()], { error: "expected a string or null" }),
339
340
  scanRoots: z.array(obj({ path: str, maxDepth: num, exclude: strArray.optional() }), {
@@ -0,0 +1,23 @@
1
+ import type { GameConfig } from '../types';
2
+ export interface ManagedRefs {
3
+ /** Holds the .dll files. Reproducible for one image id. */
4
+ dir: string;
5
+ /** Stays pointed at the newest extraction for this game, so a csproj can hardcode it. */
6
+ link: string;
7
+ /** The image id the assemblies came out of. */
8
+ digest: string;
9
+ /** Container path they were found at. */
10
+ source: string;
11
+ count: number;
12
+ }
13
+ export declare function refsLink(game: string): string;
14
+ /**
15
+ * First declared directory holding a .dll wins. A bind mount carries the bytes because a cat
16
+ * through stdout corrupts one and busybox tar has no --transform; see landmines.md.
17
+ */
18
+ export declare function extractScript(candidates: string[], container: string): string;
19
+ /**
20
+ * The managed assemblies for a game's image, extracted once per image id. Handing back a
21
+ * directory keeps <Private>False</Private> the consumer's choice.
22
+ */
23
+ export declare function extractRefs(game: string, config: GameConfig): Promise<ManagedRefs>;
@@ -1,5 +1,7 @@
1
1
  import type { GamePlugin } from '../plugin';
2
2
  import type { GameConfig, ModIndex, ModRecord, Problem, WorktreeRequest } from '../types';
3
+ /** Cache lives outside the profile tree so `clean --all` can never invalidate it. */
4
+ export declare function cacheDir(): string;
3
5
  /**
4
6
  * `**` spans separators, `*` and `?` do not; everything else is literal. Mod folders are
5
7
  * routinely named `[KV] Mod Manager`, so brackets and braces must not be glob syntax.
@@ -201,6 +201,7 @@ export interface GameConfig {
201
201
  logFile: LogFileSpec;
202
202
  image: ImageSpec;
203
203
  executable: string;
204
+ managed?: string[];
204
205
  steamAppId: number;
205
206
  workshopRoot: string | null;
206
207
  scanRoots: ScanRoot[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamecrate/cli",
3
- "version": "2.1.0",
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": "vitest run",
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"