@gamecrate/cli 2.3.0 → 2.4.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 +2230 -2002
- package/dist/lib.js +7 -2
- 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 +3 -0
- package/dist/types/launch/image.d.ts +1 -2
- package/dist/types/launch/prepare.d.ts +6 -1
- package/dist/types/launch/updates.d.ts +1 -2
- 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()
|
|
@@ -242,7 +244,10 @@ function repeats(entries, key) {
|
|
|
242
244
|
});
|
|
243
245
|
return found;
|
|
244
246
|
}
|
|
245
|
-
|
|
247
|
+
function describe(value) {
|
|
248
|
+
return typeof value === "string" ? value : JSON.stringify(value);
|
|
249
|
+
}
|
|
250
|
+
var TAG_COMPONENT = /^\w[\w.-]*$/;
|
|
246
251
|
function steamBuildRules(ctx) {
|
|
247
252
|
const push = (message, path, suggestion) => {
|
|
248
253
|
ctx.issues.push({
|
|
@@ -297,7 +302,7 @@ function steamBuildRules(ctx) {
|
|
|
297
302
|
const wants = depot === "windows" ? "proton" : "xvfb";
|
|
298
303
|
if (base === wants)
|
|
299
304
|
return;
|
|
300
|
-
push(`a ${
|
|
305
|
+
push(`a ${describe(depot)} depot cannot run on the "${base}" base`, ["variants", index, "base"], depot === "windows" ? 'set base to "proton"; it is the only base with wine' : 'set base to "xvfb", or set depot to "windows" if the image should run under wine');
|
|
301
306
|
});
|
|
302
307
|
}
|
|
303
308
|
var steamBuildSchema = obj({
|
|
@@ -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. */
|
|
@@ -11,6 +11,9 @@ export interface ManagedRefs {
|
|
|
11
11
|
count: number;
|
|
12
12
|
}
|
|
13
13
|
export declare function refsLink(game: string): string;
|
|
14
|
+
/** What `current` points at, for a failure message. A build that broke on the wrong game
|
|
15
|
+
* generation says nothing about refs on its own. */
|
|
16
|
+
export declare function currentRefs(game: string): string | undefined;
|
|
14
17
|
/**
|
|
15
18
|
* First declared directory holding a .dll wins. A bind mount carries the bytes because a cat
|
|
16
19
|
* through stdout corrupts one and busybox tar has no --transform; see landmines.md.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ImageLaunch } from '../docker/spec';
|
|
2
|
-
import type { ModeName, Problem } from '../types';
|
|
3
|
-
import type { GameConfig } from '../types';
|
|
2
|
+
import type { GameConfig, ModeName, Problem } from '../types';
|
|
4
3
|
/** What an image says about itself. Every field is null for an image gamecrate did not build. */
|
|
5
4
|
export interface ImageFacts {
|
|
6
5
|
present: boolean;
|
|
@@ -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.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ImageFacts } from './image';
|
|
2
|
-
import type { ParsedArgs, RootConfig } from '../types';
|
|
3
|
-
import type { UpdateCheckSpec } from '../types';
|
|
2
|
+
import type { ParsedArgs, RootConfig, UpdateCheckSpec } from '../types';
|
|
4
3
|
export interface CheckInput {
|
|
5
4
|
facts: ImageFacts;
|
|
6
5
|
spec: UpdateCheckSpec | undefined;
|
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;
|