burnrate 0.1.3 → 0.1.5
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/cli/index.js +14 -12
- package/package.json +3 -2
package/dist/cli/index.js
CHANGED
|
@@ -4,22 +4,23 @@
|
|
|
4
4
|
* A logistics war MMO for Claude Code
|
|
5
5
|
* The front doesn't feed itself.
|
|
6
6
|
*/
|
|
7
|
-
// Route 'setup' command
|
|
7
|
+
// Route 'setup' command BEFORE any heavy imports.
|
|
8
|
+
// ESM resolves all static imports before executing code, so we must
|
|
9
|
+
// dynamic-import setup and exit before static imports would load better-sqlite3.
|
|
8
10
|
if (process.argv[2] === 'setup') {
|
|
9
|
-
// setup.ts uses top-level await, so this import won't resolve
|
|
10
|
-
// until the entire setup wizard completes
|
|
11
11
|
await import('./setup.js');
|
|
12
12
|
process.exit(0);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
// Heavy imports — only reached when NOT running setup
|
|
15
|
+
const { Command } = await import('commander');
|
|
16
|
+
const { GameDatabase } = await import('../db/database.js');
|
|
17
|
+
const { GameEngine } = await import('../core/engine.js');
|
|
18
|
+
const { generateWorld, seedMarkets } = await import('../core/worldgen.js');
|
|
19
|
+
const { formatView, formatZone, formatRoutes, formatMarket, formatShipments, formatEvents, formatHelp } = await import('./format.js');
|
|
20
|
+
const { getSupplyState, TIER_LIMITS, SHIPMENT_SPECS } = await import('../core/types.js');
|
|
21
|
+
const path = await import('path');
|
|
22
|
+
const os = await import('os');
|
|
23
|
+
const fs = await import('fs');
|
|
23
24
|
// Database path
|
|
24
25
|
const DB_DIR = path.join(os.homedir(), '.burnrate');
|
|
25
26
|
const DB_PATH = path.join(DB_DIR, 'game.db');
|
|
@@ -1121,3 +1122,4 @@ program
|
|
|
1121
1122
|
});
|
|
1122
1123
|
// Parse and execute
|
|
1123
1124
|
program.parse();
|
|
1125
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "burnrate",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "A logistics war MMO for Claude Code. The front doesn't feed itself.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cli/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"burnrate": "./dist/cli/index.js"
|
|
8
|
+
"burnrate": "./dist/cli/index.js",
|
|
9
|
+
"burnrate-setup": "./dist/cli/setup.js"
|
|
9
10
|
},
|
|
10
11
|
"files": [
|
|
11
12
|
"dist/",
|