@gamecrate/cli 2.3.1 → 2.5.0
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 +2247 -2013
- package/dist/lib.js +2 -0
- package/dist/types/docker/icon.d.ts +7 -0
- package/dist/types/docker/spec.d.ts +2 -0
- package/dist/types/docker/window.d.ts +2 -0
- package/dist/types/image/refs.d.ts +8 -1
- package/dist/types/launch/prepare.d.ts +6 -1
- package/dist/types/types.d.ts +4 -0
- package/package.json +1 -1
package/dist/lib.js
CHANGED
|
@@ -184,6 +184,8 @@ var profile = obj({
|
|
|
184
184
|
description: str.optional(),
|
|
185
185
|
gameVersion: str.optional(),
|
|
186
186
|
image: str.optional(),
|
|
187
|
+
windowTitle: str.optional(),
|
|
188
|
+
windowIcon: str.optional(),
|
|
187
189
|
detach: bool.optional(),
|
|
188
190
|
replace: bool.optional(),
|
|
189
191
|
build: oneOf(["auto", "always", "never"]).optional()
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** width, height, then one ARGB cardinal per pixel, which is the shape the spec asks for. */
|
|
2
|
+
export declare function iconProperty(rgba: Buffer, size: number): Buffer;
|
|
3
|
+
/**
|
|
4
|
+
* The caption is wmctrl's job; an icon is nobody's. xprop truncates a property at 64 elements
|
|
5
|
+
* and one icon is thousands, so the property goes over the wire here instead.
|
|
6
|
+
*/
|
|
7
|
+
export declare function setWindowIcon(windowId: string, iconPath: string): Promise<void>;
|
|
@@ -17,6 +17,8 @@ export declare function buildRunSpec(plan: LaunchPlan, modMounts: Mount[], ident
|
|
|
17
17
|
/** Instances of one profile run side by side, so the name has to carry which one this is. */
|
|
18
18
|
export declare function containerName(plan: LaunchPlan): string;
|
|
19
19
|
/** What the window is renamed to, so a taskbar full of worktrees is readable. */
|
|
20
|
+
/** The icon a profile names, made absolute against the config that named it. */
|
|
21
|
+
export declare function windowIcon(plan: LaunchPlan, configDir: string): string | undefined;
|
|
20
22
|
export declare function windowTitle(plan: LaunchPlan): string;
|
|
21
23
|
export declare function toDockerArgs(spec: DockerRunSpec): string[];
|
|
22
24
|
/**
|
|
@@ -32,6 +32,8 @@ export declare function isPeerClaim(pid: number, self: number): boolean;
|
|
|
32
32
|
export interface AdoptOptions {
|
|
33
33
|
executable: string;
|
|
34
34
|
title: string;
|
|
35
|
+
/** An image the adopted window takes as its icon. Absolute, already resolved. */
|
|
36
|
+
icon?: string;
|
|
35
37
|
/** Set for an engine that claims WM_DELETE_WINDOW and ignores it, RimWorld being the one. */
|
|
36
38
|
stripDelete: boolean;
|
|
37
39
|
/** Called once the window a stripDelete run adopted is gone. */
|
|
@@ -8,9 +8,16 @@ export interface ManagedRefs {
|
|
|
8
8
|
digest: string;
|
|
9
9
|
/** Container path they were found at. */
|
|
10
10
|
source: string;
|
|
11
|
+
/** `1.6` from the game's own Version.txt, absent when the image does not ship one. */
|
|
12
|
+
version?: string;
|
|
11
13
|
count: number;
|
|
12
14
|
}
|
|
13
|
-
export declare function refsLink(game: string): string;
|
|
15
|
+
export declare function refsLink(game: string, version?: string): string;
|
|
16
|
+
/** `1.6.4633 rev1254` in the file, `1.6` as the folder a mod builds into. */
|
|
17
|
+
export declare function readVersion(dir: string): Promise<string | undefined>;
|
|
18
|
+
/** What `current` points at, for a failure message. A build that broke on the wrong game
|
|
19
|
+
* generation says nothing about refs on its own. */
|
|
20
|
+
export declare function currentRefs(game: string): string | undefined;
|
|
14
21
|
/**
|
|
15
22
|
* First declared directory holding a .dll wins. A bind mount carries the bytes because a cat
|
|
16
23
|
* through stdout corrupts one and busybox tar has no --transform; see landmines.md.
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { BuildPolicy, GameConfig, LaunchPlan, PullPolicy } from '../types';
|
|
2
2
|
/** Resolved image id, so `launches.jsonl` records what actually ran, not a floating tag. */
|
|
3
3
|
export declare function imageDigest(ref: string): Promise<string | null>;
|
|
4
|
+
/**
|
|
5
|
+
* The registry digest a local image was pulled at. `.Id` is the config digest and is a different
|
|
6
|
+
* number, so comparing it against a recorded manifest digest never matches.
|
|
7
|
+
*/
|
|
8
|
+
export declare function repoDigest(ref: string): Promise<string | null>;
|
|
4
9
|
/** One file out of an image, for a fact the host copy would answer wrongly. */
|
|
5
10
|
export declare function readFromImage(ref: string, path: string): Promise<string | null>;
|
|
6
11
|
/** One label off an image, or null when the image or the label is missing. */
|
|
@@ -15,7 +20,7 @@ export declare function acquireImage(game: string, config: GameConfig, pull: Pul
|
|
|
15
20
|
* ones resolution flagged stale; `never` skips. A build failure stops the launch, shipping
|
|
16
21
|
* the previous DLL after a failed compile is how you debug code that is not running.
|
|
17
22
|
*/
|
|
18
|
-
export declare function buildLocalMods(plan: LaunchPlan, policy: BuildPolicy): Promise<void>;
|
|
23
|
+
export declare function buildLocalMods(plan: LaunchPlan, policy: BuildPolicy, refsNote?: string): Promise<void>;
|
|
19
24
|
/**
|
|
20
25
|
* Per-instance launch lock. Two concurrent runs would both `rm -rf` the same stage tree, so
|
|
21
26
|
* the second is refused rather than allowed to race. Separate instances never meet here.
|
package/dist/types/types.d.ts
CHANGED
|
@@ -167,6 +167,10 @@ export interface ProfileConfig {
|
|
|
167
167
|
gameVersion?: string;
|
|
168
168
|
/** A whole image ref, used verbatim. Beaten only by --image. */
|
|
169
169
|
image?: string;
|
|
170
|
+
/** The caption the window takes, instead of "<game> <profile>". */
|
|
171
|
+
windowTitle?: string;
|
|
172
|
+
/** A path to an image the window takes as its icon. Relative to the config file. */
|
|
173
|
+
windowIcon?: string;
|
|
170
174
|
/** Launch defaults for this profile. The matching --no-* flag overrides each one. */
|
|
171
175
|
detach?: boolean;
|
|
172
176
|
replace?: boolean;
|