@gamecrate/cli 1.4.1 → 2.1.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.
@@ -78,6 +78,14 @@ export interface ImageSpec {
78
78
  acquire: 'pull' | 'build';
79
79
  /** Required when acquire is "build". */
80
80
  context?: string;
81
+ updates?: UpdateCheckSpec;
82
+ }
83
+ /** Whether a launch looks for a newer game build, and how often it bothers. */
84
+ export interface UpdateCheckSpec {
85
+ /** Default true. */
86
+ check?: boolean;
87
+ /** Hours between checks for one image. Default 6. 0 checks every launch. */
88
+ everyHours?: number;
81
89
  }
82
90
  /** How the engine is told where its data directory is. Verified per game. */
83
91
  export type DataDirSpec = {
@@ -155,11 +163,37 @@ export interface ProfileConfig {
155
163
  aliases?: string[];
156
164
  /** A one-line note for `gamecrate list`. Never read by the launcher. */
157
165
  description?: string;
166
+ /** A tag on the game's own image repository, e.g. "2.0". `image` and --image beat it. */
167
+ gameVersion?: string;
168
+ /** A whole image ref, used verbatim. Beaten only by --image. */
169
+ image?: string;
158
170
  /** Launch defaults for this profile. The matching --no-* flag overrides each one. */
159
171
  detach?: boolean;
160
172
  replace?: boolean;
161
173
  build?: BuildPolicy;
162
174
  }
175
+ /** One image built from a steam depot. The first entry of `variants` is the default. */
176
+ export interface SteamVariant {
177
+ name: string;
178
+ depot?: 'linux' | 'windows' | 'macos';
179
+ base: 'xvfb' | 'proton' | 'none';
180
+ include: string[];
181
+ executable?: string;
182
+ }
183
+ /** A steam branch to download from. The first entry of `branches` is the default. */
184
+ export interface SteamBranch {
185
+ name: string;
186
+ password?: boolean;
187
+ /** Extra moving tags for this branch, beside the version and `latest` forms. */
188
+ tags?: string[];
189
+ /** Executable per variant name, when this branch ships a different one. */
190
+ executable?: Record<string, string>;
191
+ }
192
+ /** How a plugin's game image gets built from steam. */
193
+ export interface SteamBuildSpec {
194
+ branches: SteamBranch[];
195
+ variants: SteamVariant[];
196
+ }
163
197
  export interface GameConfig {
164
198
  gameFiles: GameFilesSpec;
165
199
  dataDir: DataDirSpec;
@@ -179,6 +213,11 @@ export interface GameConfig {
179
213
  prefs: {
180
214
  file: string;
181
215
  };
216
+ /** Where the engine writes its version string. */
217
+ version: {
218
+ file: string;
219
+ };
220
+ steamBuild: SteamBuildSpec;
182
221
  /** Filename suffixes that mean "a save". `clean --all` counts them before it deletes. */
183
222
  saveExtensions: string[];
184
223
  core: string;
@@ -420,8 +459,20 @@ export interface ParsedArgs {
420
459
  supervised: boolean;
421
460
  /** `-f`: keep printing as the run writes, instead of dumping what is there. */
422
461
  follow: boolean;
423
- /** The write verb under `mods`. Unset means the read verb. */
424
- subverb?: 'add' | 'rm' | 'sync';
462
+ /** The write verb under `mods`, or the verb under `steam`. Unset means the read verb. */
463
+ subverb?: 'add' | 'rm' | 'sync' | 'build' | 'login';
464
+ /** `steam build`: repeatable filters on the two axes. */
465
+ variant?: string[];
466
+ branches?: string[];
467
+ /** Repeatable plugin package specifiers. */
468
+ plugin?: string[];
469
+ image?: string;
470
+ load?: boolean;
471
+ push?: boolean;
472
+ base?: string;
473
+ platform?: string;
474
+ print?: boolean;
475
+ username?: string;
425
476
  /** Where `mods add` pulls the mod from. */
426
477
  source?: {
427
478
  kind: 'path';
@@ -444,7 +495,7 @@ export interface ParsedArgs {
444
495
  force?: boolean;
445
496
  rest: string[];
446
497
  }
447
- export type ProjectDefaults = Partial<Omit<ParsedArgs, 'subcommand' | 'cleanTier' | 'yes' | 'help' | 'rest' | 'profile' | 'supervised' | 'noDetach' | 'noReplace' | 'follow' | 'subverb' | 'source' | 'target' | 'force'>> & {
498
+ export type ProjectDefaults = Partial<Omit<ParsedArgs, 'subcommand' | 'cleanTier' | 'yes' | 'help' | 'rest' | 'profile' | 'supervised' | 'noDetach' | 'noReplace' | 'follow' | 'subverb' | 'source' | 'target' | 'force' | 'variant' | 'branches' | 'plugin' | 'image' | 'load' | 'push' | 'base' | 'platform' | 'print' | 'username'>> & {
448
499
  /** Replaces the old `profile:` key. Falls back to the first entry in `profiles`. */
449
500
  defaultProfile?: string;
450
501
  /** Validated by validateConfig after the splice, not here. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamecrate/cli",
3
- "version": "1.4.1",
3
+ "version": "2.1.0",
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",