cyclops-infobook-html 5.0.0 → 5.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.
Files changed (56) hide show
  1. package/README.md +35 -14
  2. package/bin/compress-icons.d.ts +2 -0
  3. package/bin/compress-icons.js +82 -0
  4. package/bin/convert-pom-to-modpack.d.ts +2 -0
  5. package/bin/convert-pom-to-modpack.js +96 -0
  6. package/bin/generate-icons.d.ts +2 -0
  7. package/bin/generate-icons.js +103 -0
  8. package/bin/generate-infobook-html.js +60 -16
  9. package/bin/generate-mod-metadata.js +62 -16
  10. package/index.d.ts +25 -23
  11. package/index.js +39 -24
  12. package/lib/icon/IconsCompressor.d.ts +18 -0
  13. package/lib/icon/IconsCompressor.js +112 -0
  14. package/lib/icon/IconsGenerator.d.ts +150 -0
  15. package/lib/icon/IconsGenerator.js +683 -0
  16. package/lib/infobook/FileWriter.d.ts +3 -4
  17. package/lib/infobook/FileWriter.js +15 -7
  18. package/lib/infobook/IFileWriter.d.ts +2 -3
  19. package/lib/infobook/IInfoAppendix.d.ts +3 -3
  20. package/lib/infobook/IInfoBook.d.ts +2 -4
  21. package/lib/infobook/IInfoSection.d.ts +1 -1
  22. package/lib/infobook/IInfobookPlugin.d.ts +5 -5
  23. package/lib/infobook/InfoBookInitializer.d.ts +7 -9
  24. package/lib/infobook/InfoBookInitializer.js +11 -3
  25. package/lib/infobook/appendix/IInfoBookAppendixHandler.d.ts +2 -2
  26. package/lib/infobook/appendix/InfoBookAppendixAd.d.ts +3 -3
  27. package/lib/infobook/appendix/InfoBookAppendixAd.js +17 -4
  28. package/lib/infobook/appendix/InfoBookAppendixHandlerAbstractRecipe.d.ts +12 -14
  29. package/lib/infobook/appendix/InfoBookAppendixHandlerAbstractRecipe.js +51 -10
  30. package/lib/infobook/appendix/InfoBookAppendixHandlerAdvancementRewards.d.ts +3 -3
  31. package/lib/infobook/appendix/InfoBookAppendixHandlerAdvancementRewards.js +15 -6
  32. package/lib/infobook/appendix/InfoBookAppendixHandlerCraftingRecipe.d.ts +6 -5
  33. package/lib/infobook/appendix/InfoBookAppendixHandlerCraftingRecipe.js +14 -5
  34. package/lib/infobook/appendix/InfoBookAppendixHandlerImage.d.ts +3 -3
  35. package/lib/infobook/appendix/InfoBookAppendixHandlerImage.js +14 -6
  36. package/lib/infobook/appendix/InfoBookAppendixHandlerKeybinding.d.ts +3 -3
  37. package/lib/infobook/appendix/InfoBookAppendixHandlerKeybinding.js +13 -4
  38. package/lib/infobook/appendix/InfoBookAppendixHandlerSmeltingRecipe.d.ts +6 -5
  39. package/lib/infobook/appendix/InfoBookAppendixHandlerSmeltingRecipe.js +13 -4
  40. package/lib/infobook/appendix/InfoBookAppendixHandlerTextfield.d.ts +3 -3
  41. package/lib/infobook/appendix/InfoBookAppendixHandlerTextfield.js +13 -6
  42. package/lib/infobook/appendix/InfoBookAppendixTagIndex.d.ts +4 -4
  43. package/lib/infobook/appendix/InfoBookAppendixTagIndex.js +12 -3
  44. package/lib/modloader/ModLoader.d.ts +15 -5
  45. package/lib/modloader/ModLoader.js +189 -86
  46. package/lib/modloader/PomConverter.d.ts +19 -0
  47. package/lib/modloader/PomConverter.js +138 -0
  48. package/lib/parse/XmlInfoBookParser.d.ts +5 -7
  49. package/lib/parse/XmlInfoBookParser.js +42 -9
  50. package/lib/resource/ResourceHandler.d.ts +7 -13
  51. package/lib/resource/ResourceHandler.js +16 -11
  52. package/lib/resource/ResourceLoader.d.ts +4 -5
  53. package/lib/resource/ResourceLoader.js +54 -44
  54. package/lib/serialize/HtmlInfoBookSerializer.d.ts +10 -16
  55. package/lib/serialize/HtmlInfoBookSerializer.js +102 -91
  56. package/package.json +35 -25
package/index.d.ts CHANGED
@@ -1,23 +1,25 @@
1
- export * from "./lib/infobook/appendix/IInfoBookAppendixHandler";
2
- export * from "./lib/infobook/appendix/InfoBookAppendixAd";
3
- export * from "./lib/infobook/appendix/InfoBookAppendixHandlerAbstractRecipe";
4
- export * from "./lib/infobook/appendix/InfoBookAppendixHandlerAdvancementRewards";
5
- export * from "./lib/infobook/appendix/InfoBookAppendixHandlerCraftingRecipe";
6
- export * from "./lib/infobook/appendix/InfoBookAppendixHandlerSmeltingRecipe";
7
- export * from "./lib/infobook/appendix/InfoBookAppendixHandlerImage";
8
- export * from "./lib/infobook/appendix/InfoBookAppendixHandlerKeybinding";
9
- export * from "./lib/infobook/appendix/InfoBookAppendixTagIndex";
10
- export * from "./lib/infobook/FileWriter";
11
- export * from "./lib/infobook/IFileWriter";
12
- export * from "./lib/infobook/IFluid";
13
- export * from "./lib/infobook/IInfoAppendix";
14
- export * from "./lib/infobook/IInfoBook";
15
- export * from "./lib/infobook/IInfobookPlugin";
16
- export * from "./lib/infobook/IInfoSection";
17
- export * from "./lib/infobook/IItem";
18
- export * from "./lib/infobook/InfoBookInitializer";
19
- export * from "./lib/modloader/ModLoader";
20
- export * from "./lib/parse/XmlInfoBookParser";
21
- export * from "./lib/resource/ResourceHandler";
22
- export * from "./lib/resource/ResourceLoader";
23
- export * from "./lib/serialize/HtmlInfoBookSerializer";
1
+ export * from './lib/icon/IconsCompressor';
2
+ export * from './lib/icon/IconsGenerator';
3
+ export * from './lib/infobook/appendix/IInfoBookAppendixHandler';
4
+ export * from './lib/infobook/appendix/InfoBookAppendixAd';
5
+ export * from './lib/infobook/appendix/InfoBookAppendixHandlerAbstractRecipe';
6
+ export * from './lib/infobook/appendix/InfoBookAppendixHandlerAdvancementRewards';
7
+ export * from './lib/infobook/appendix/InfoBookAppendixHandlerCraftingRecipe';
8
+ export * from './lib/infobook/appendix/InfoBookAppendixHandlerSmeltingRecipe';
9
+ export * from './lib/infobook/appendix/InfoBookAppendixHandlerImage';
10
+ export * from './lib/infobook/appendix/InfoBookAppendixHandlerKeybinding';
11
+ export * from './lib/infobook/appendix/InfoBookAppendixTagIndex';
12
+ export * from './lib/infobook/FileWriter';
13
+ export * from './lib/infobook/IFileWriter';
14
+ export * from './lib/infobook/IFluid';
15
+ export * from './lib/infobook/IInfoAppendix';
16
+ export * from './lib/infobook/IInfoBook';
17
+ export * from './lib/infobook/IInfobookPlugin';
18
+ export * from './lib/infobook/IInfoSection';
19
+ export * from './lib/infobook/IItem';
20
+ export * from './lib/infobook/InfoBookInitializer';
21
+ export * from './lib/modloader/ModLoader';
22
+ export * from './lib/parse/XmlInfoBookParser';
23
+ export * from './lib/resource/ResourceHandler';
24
+ export * from './lib/resource/ResourceLoader';
25
+ export * from './lib/serialize/HtmlInfoBookSerializer';
package/index.js CHANGED
@@ -1,27 +1,42 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./lib/infobook/appendix/IInfoBookAppendixHandler"), exports);
5
- tslib_1.__exportStar(require("./lib/infobook/appendix/InfoBookAppendixAd"), exports);
6
- tslib_1.__exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerAbstractRecipe"), exports);
7
- tslib_1.__exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerAdvancementRewards"), exports);
8
- tslib_1.__exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerCraftingRecipe"), exports);
9
- tslib_1.__exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerSmeltingRecipe"), exports);
10
- tslib_1.__exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerImage"), exports);
11
- tslib_1.__exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerKeybinding"), exports);
12
- tslib_1.__exportStar(require("./lib/infobook/appendix/InfoBookAppendixTagIndex"), exports);
13
- tslib_1.__exportStar(require("./lib/infobook/FileWriter"), exports);
14
- tslib_1.__exportStar(require("./lib/infobook/IFileWriter"), exports);
15
- tslib_1.__exportStar(require("./lib/infobook/IFluid"), exports);
16
- tslib_1.__exportStar(require("./lib/infobook/IInfoAppendix"), exports);
17
- tslib_1.__exportStar(require("./lib/infobook/IInfoBook"), exports);
18
- tslib_1.__exportStar(require("./lib/infobook/IInfobookPlugin"), exports);
19
- tslib_1.__exportStar(require("./lib/infobook/IInfoSection"), exports);
20
- tslib_1.__exportStar(require("./lib/infobook/IItem"), exports);
21
- tslib_1.__exportStar(require("./lib/infobook/InfoBookInitializer"), exports);
22
- tslib_1.__exportStar(require("./lib/modloader/ModLoader"), exports);
23
- tslib_1.__exportStar(require("./lib/parse/XmlInfoBookParser"), exports);
24
- tslib_1.__exportStar(require("./lib/resource/ResourceHandler"), exports);
25
- tslib_1.__exportStar(require("./lib/resource/ResourceLoader"), exports);
26
- tslib_1.__exportStar(require("./lib/serialize/HtmlInfoBookSerializer"), exports);
17
+ __exportStar(require("./lib/icon/IconsCompressor"), exports);
18
+ __exportStar(require("./lib/icon/IconsGenerator"), exports);
19
+ __exportStar(require("./lib/infobook/appendix/IInfoBookAppendixHandler"), exports);
20
+ __exportStar(require("./lib/infobook/appendix/InfoBookAppendixAd"), exports);
21
+ __exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerAbstractRecipe"), exports);
22
+ __exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerAdvancementRewards"), exports);
23
+ __exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerCraftingRecipe"), exports);
24
+ __exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerSmeltingRecipe"), exports);
25
+ __exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerImage"), exports);
26
+ __exportStar(require("./lib/infobook/appendix/InfoBookAppendixHandlerKeybinding"), exports);
27
+ __exportStar(require("./lib/infobook/appendix/InfoBookAppendixTagIndex"), exports);
28
+ __exportStar(require("./lib/infobook/FileWriter"), exports);
29
+ __exportStar(require("./lib/infobook/IFileWriter"), exports);
30
+ __exportStar(require("./lib/infobook/IFluid"), exports);
31
+ __exportStar(require("./lib/infobook/IInfoAppendix"), exports);
32
+ __exportStar(require("./lib/infobook/IInfoBook"), exports);
33
+ __exportStar(require("./lib/infobook/IInfobookPlugin"), exports);
34
+ __exportStar(require("./lib/infobook/IInfoSection"), exports);
35
+ __exportStar(require("./lib/infobook/IItem"), exports);
36
+ __exportStar(require("./lib/infobook/InfoBookInitializer"), exports);
37
+ __exportStar(require("./lib/modloader/ModLoader"), exports);
38
+ __exportStar(require("./lib/parse/XmlInfoBookParser"), exports);
39
+ __exportStar(require("./lib/resource/ResourceHandler"), exports);
40
+ __exportStar(require("./lib/resource/ResourceLoader"), exports);
41
+ __exportStar(require("./lib/serialize/HtmlInfoBookSerializer"), exports);
27
42
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Losslessly compresses PNG icon files using OptiPNG.
3
+ * Mimics how ImgBot compresses images: lossless PNG compression at optimization level 7
4
+ * with metadata stripping.
5
+ */
6
+ export declare class IconsCompressor {
7
+ private readonly iconsDir;
8
+ constructor(iconsDir: string);
9
+ /**
10
+ * Compress all PNG files in the icon directory using OptiPNG.
11
+ */
12
+ compress(): Promise<void>;
13
+ /**
14
+ * Get the path to the optipng binary from optipng-bin package.
15
+ * Uses require.resolve to find the package root, then constructs the vendor binary path.
16
+ */
17
+ getOptipngPath(): string;
18
+ }
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.IconsCompressor = void 0;
46
+ const node_child_process_1 = require("node:child_process");
47
+ const fs = __importStar(require("node:fs"));
48
+ const node_path_1 = require("node:path");
49
+ const node_util_1 = require("node:util");
50
+ const execFileAsync = (0, node_util_1.promisify)(node_child_process_1.execFile);
51
+ /**
52
+ * Losslessly compresses PNG icon files using OptiPNG.
53
+ * Mimics how ImgBot compresses images: lossless PNG compression at optimization level 7
54
+ * with metadata stripping.
55
+ */
56
+ class IconsCompressor {
57
+ constructor(iconsDir) {
58
+ if (!iconsDir) {
59
+ throw new Error('Missing iconsDir argument');
60
+ }
61
+ this.iconsDir = iconsDir;
62
+ }
63
+ /**
64
+ * Compress all PNG files in the icon directory using OptiPNG.
65
+ */
66
+ compress() {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const optipngPath = this.getOptipngPath();
69
+ if (!fs.existsSync(optipngPath)) {
70
+ throw new Error(`OptiPNG binary not found at: ${optipngPath}. Ensure optipng-bin is installed.`);
71
+ }
72
+ const files = yield fs.promises.readdir(this.iconsDir);
73
+ const pngFiles = files.filter(f => f.endsWith('.png'));
74
+ if (pngFiles.length === 0) {
75
+ process.stdout.write(`No PNG files found in ${this.iconsDir}\n`);
76
+ return;
77
+ }
78
+ process.stdout.write(`Compressing ${pngFiles.length} icons in ${this.iconsDir}...\n`);
79
+ let compressed = 0;
80
+ let errors = 0;
81
+ let totalSavedBytes = 0;
82
+ for (const file of pngFiles) {
83
+ const filePath = (0, node_path_1.join)(this.iconsDir, file);
84
+ const sizeBefore = fs.statSync(filePath).size;
85
+ try {
86
+ yield execFileAsync(optipngPath, ['-o7', '-strip', 'all', '-quiet', filePath]);
87
+ const sizeAfter = fs.statSync(filePath).size;
88
+ totalSavedBytes += sizeBefore - sizeAfter;
89
+ compressed++;
90
+ }
91
+ catch (err) {
92
+ process.stderr.write(`Warning: failed to compress ${file}: ${err}\n`);
93
+ errors++;
94
+ }
95
+ }
96
+ const savedKb = (totalSavedBytes / 1024).toFixed(1);
97
+ process.stdout.write(`Compressed ${compressed} icons (saved ${savedKb} KB)${errors > 0 ? `, ${errors} errors` : ''}\n`);
98
+ });
99
+ }
100
+ /**
101
+ * Get the path to the optipng binary from optipng-bin package.
102
+ * Uses require.resolve to find the package root, then constructs the vendor binary path.
103
+ */
104
+ getOptipngPath() {
105
+ const indexPath = require.resolve('optipng-bin');
106
+ const pkgRoot = (0, node_path_1.dirname)(indexPath);
107
+ const binaryName = process.platform === 'win32' ? 'optipng.exe' : 'optipng';
108
+ return (0, node_path_1.join)(pkgRoot, 'vendor', binaryName);
109
+ }
110
+ }
111
+ exports.IconsCompressor = IconsCompressor;
112
+ //# sourceMappingURL=IconsCompressor.js.map
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Generates icons using the IconExporter mod and HeadlessMC.
3
+ * This class downloads HeadlessMC and the IconExporter mod, sets up a headless
4
+ * Minecraft client with NeoForge and all specified mods, launches the game,
5
+ * runs the iconexporter export command, and copies the resulting icons.
6
+ */
7
+ export declare class IconsGenerator {
8
+ private static readonly headlessMcJar;
9
+ private static readonly iconExporterJar;
10
+ private static readonly hmcGameSubdir;
11
+ private static readonly hmcConfigSubdir;
12
+ private static readonly iconExportSubdir;
13
+ private static readonly defaultIconSize;
14
+ private static readonly hmcSpecificsRepo;
15
+ private static readonly modrinthApiBase;
16
+ private static readonly iconExporterModrinthSlug;
17
+ private readonly modsDir;
18
+ private readonly iconsDir;
19
+ private readonly workDir;
20
+ private readonly minecraftVersion;
21
+ private readonly neoforgeVersion;
22
+ private readonly iconExporterVersion;
23
+ private readonly headlessMcVersion;
24
+ private readonly launchTimeoutMs;
25
+ constructor(args: IIconsGeneratorArgs);
26
+ /**
27
+ * Run the full icon generation pipeline.
28
+ */
29
+ generate(): Promise<void>;
30
+ /**
31
+ * Download the HeadlessMC launcher jar.
32
+ */
33
+ downloadHeadlessMc(): Promise<void>;
34
+ /**
35
+ * Download the IconExporter mod from Modrinth.
36
+ * If an explicit version is configured, fetches that specific version; otherwise fetches the
37
+ * latest version for the configured Minecraft version. No authentication is required.
38
+ */
39
+ downloadIconExporter(): Promise<void>;
40
+ /**
41
+ * Fetch an IconExporter release from Modrinth for the configured Minecraft version and the
42
+ * NeoForge loader. If a specific version number is provided, that version is matched;
43
+ * otherwise the latest (newest) version is returned.
44
+ * Returns the primary file's download URL and filename.
45
+ */
46
+ fetchIconExporterFromModrinth(version?: string): Promise<{
47
+ url: string;
48
+ filename: string;
49
+ }>;
50
+ /**
51
+ * Set up the game directory with mods and options.
52
+ */
53
+ setupGameDirectory(): Promise<void>;
54
+ /**
55
+ * Write the HeadlessMC configuration file.
56
+ */
57
+ writeHmcConfig(): void;
58
+ /**
59
+ * Run the Minecraft client using HeadlessMC and export icons.
60
+ */
61
+ runGameAndExportIcons(): Promise<void>;
62
+ /**
63
+ * Copy exported icons to the output icons directory.
64
+ */
65
+ copyIcons(): Promise<void>;
66
+ /**
67
+ * Parse the HeadlessMC `gui` command output and find the numeric button ID for a given
68
+ * button text label. HeadlessMC's `click` command requires a numeric id, not the text.
69
+ * The gui table format is:
70
+ * id text x y w h on type
71
+ * 0 Multiplayer 140 123 200 20 1 Button
72
+ * 1 Singleplayer 140 99 200 20 1 Button
73
+ * Columns are separated by two or more spaces.
74
+ */
75
+ findButtonIdByText(guiOutput: string, buttonText: string): number | null;
76
+ /**
77
+ * Determine if the Minecraft game has fully loaded based on log output.
78
+ */
79
+ isGameFullyLoaded(output: string): boolean;
80
+ /**
81
+ * Determine if the HeadlessMC launcher is ready to accept commands based on its startup output.
82
+ * In non-TTY mode HeadlessMC does not print a '>' prompt, so we detect readiness from the
83
+ * version-table header or the DefaultCommandLineProvider warning it prints on startup.
84
+ */
85
+ isHeadlessMcReady(output: string): boolean;
86
+ /**
87
+ * Download the hmc-specifics mod from GitHub Releases into the given mods directory.
88
+ * This avoids relying on HeadlessMC's built-in `-specifics` auto-download which checks
89
+ * the GitHub API without authentication and can hit rate limits.
90
+ */
91
+ downloadHmcSpecifics(modsDir: string): Promise<void>;
92
+ /**
93
+ * Download a file from a URL to a destination path.
94
+ */
95
+ downloadFile(url: string, destPath: string, headers?: Record<string, string>): Promise<void>;
96
+ }
97
+ export type IGameState = 'waiting_for_prompt' | 'game_launching' | 'checking_screen' | 'navigating_singleplayer' | 'creating_world' | 'exporting_icons' | 'quitting';
98
+ export interface IModrinthVersionFile {
99
+ url: string;
100
+ filename: string;
101
+ primary: boolean;
102
+ }
103
+ export interface IModrinthVersion {
104
+ version_number: string;
105
+ files: IModrinthVersionFile[];
106
+ }
107
+ export interface IGithubAsset {
108
+ name: string;
109
+ browser_download_url: string;
110
+ }
111
+ export interface IGithubRelease {
112
+ assets: IGithubAsset[];
113
+ tag_name: string;
114
+ }
115
+ export interface IIconsGeneratorArgs {
116
+ /**
117
+ * Directory containing mod JARs to include in the client (usually server/mods).
118
+ */
119
+ modsDir: string;
120
+ /**
121
+ * Directory where icons will be written.
122
+ */
123
+ iconsDir: string;
124
+ /**
125
+ * Working directory for HeadlessMC and game files.
126
+ */
127
+ workDir: string;
128
+ /**
129
+ * Minecraft version (e.g., "1.21.1").
130
+ */
131
+ minecraftVersion: string;
132
+ /**
133
+ * NeoForge version (e.g., "21.1.210").
134
+ */
135
+ neoforgeVersion: string;
136
+ /**
137
+ * Version of the IconExporter artifact to pin (e.g., "1.4.0-174").
138
+ * If not provided, the latest version for the configured Minecraft version is
139
+ * automatically fetched from Modrinth (no authentication required).
140
+ */
141
+ iconExporterVersion?: string;
142
+ /**
143
+ * Version of HeadlessMC to download (e.g., "2.8.0").
144
+ */
145
+ headlessMcVersion?: string;
146
+ /**
147
+ * Timeout in milliseconds for the full game launch and icon export (default: 30 minutes).
148
+ */
149
+ launchTimeoutMs?: number;
150
+ }