@gamecrate/cli 2.0.0 → 2.2.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 +4898 -4774
- package/dist/lib.js +1 -0
- package/dist/types/image/base.d.ts +2 -2
- package/dist/types/image/crane.d.ts +5 -0
- package/dist/types/image/refs.d.ts +23 -0
- package/dist/types/mods/modindex.d.ts +2 -0
- package/dist/types/types.d.ts +1 -0
- package/package.json +1 -1
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() }), {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type BaseKind = 'xvfb' | 'proton' | 'none';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* A major tag, so an apt fix in a base reaches a released cli without a new release. Each built
|
|
4
|
+
* image records the digest this resolved to, which is what makes that safe. See landmines.md.
|
|
5
5
|
*/
|
|
6
6
|
export declare const RUNTIME_BASE: Readonly<Record<'xvfb' | 'proton', string>>;
|
|
7
7
|
/**
|
|
@@ -23,5 +23,10 @@ export declare function cranePush(tar: string, ref: string): Promise<void>;
|
|
|
23
23
|
/** Runs after the push, never before. A moving tag only moves once the real tag is there. */
|
|
24
24
|
export declare function craneTag(ref: string, tag: string): Promise<void>;
|
|
25
25
|
export declare function craneMutateLabels(ref: string, labels: Record<string, string>): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* The platform manifest a tag resolves to, so an image records the base it was built on rather
|
|
28
|
+
* than the moving tag. Never the index digest: that is not what a runtime pulls.
|
|
29
|
+
*/
|
|
30
|
+
export declare function craneDigest(ref: string, platform: string): Promise<string | null>;
|
|
26
31
|
/** null when the image or its config cannot be read. An empty record means no labels. */
|
|
27
32
|
export declare function craneLabels(ref: string): Promise<Record<string, string> | null>;
|
|
@@ -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.
|
package/dist/types/types.d.ts
CHANGED