@couch-kit/cli 0.3.4 → 0.3.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.
Files changed (2) hide show
  1. package/dist/index.js +11 -7
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1887,11 +1887,14 @@ var init_esm = __esm(() => {
1887
1887
  } = import__.default);
1888
1888
  });
1889
1889
 
1890
+ // ../core/src/types.ts
1891
+ var init_types = () => {};
1892
+
1890
1893
  // ../core/src/middleware.ts
1891
1894
  var init_middleware = () => {};
1892
1895
 
1893
- // ../core/src/types.ts
1894
- var init_types = () => {};
1896
+ // ../core/src/reducer.ts
1897
+ var init_reducer = () => {};
1895
1898
 
1896
1899
  // ../core/src/protocol.ts
1897
1900
  var MessageTypes;
@@ -1960,6 +1963,7 @@ function replayActions(recording, reducer) {
1960
1963
  // ../core/src/index.ts
1961
1964
  var init_src = __esm(() => {
1962
1965
  init_types();
1966
+ init_reducer();
1963
1967
  init_protocol();
1964
1968
  init_constants();
1965
1969
  init_middleware();
@@ -2350,12 +2354,12 @@ var init_replay = __esm(() => {
2350
2354
  }
2351
2355
  const resolvedReducerPath = resolve(reducerPath);
2352
2356
  const reducerModule = await import(resolvedReducerPath);
2353
- const reducer = reducerModule.default ?? reducerModule.reducer;
2354
- if (typeof reducer !== "function") {
2357
+ const reducer2 = reducerModule.default ?? reducerModule.reducer;
2358
+ if (typeof reducer2 !== "function") {
2355
2359
  console.error("Error: Reducer module must export a default function or named 'reducer' export");
2356
2360
  process.exit(1);
2357
2361
  }
2358
- const result = replayActions(recording, reducer);
2362
+ const result = replayActions(recording, reducer2);
2359
2363
  if (options.json) {
2360
2364
  const output = options.snapshots ? result : {
2361
2365
  finalState: result.finalState,
@@ -2472,9 +2476,9 @@ program2.command("init").description("Scaffolds a new web controller project").a
2472
2476
  const { initCommand: initCommand2 } = await Promise.resolve().then(() => (init_init(), exports_init));
2473
2477
  await initCommand2.parseAsync(["init", name], { from: "user" });
2474
2478
  });
2475
- program2.command("replay").description("Replay a recorded game session against a reducer").argument("<recording>", "Path to recording JSON file").argument("<reducer>", "Path to reducer module").option("--snapshots", "Output intermediate state snapshots").option("--json", "Output as formatted JSON").action(async (recording, reducer, options) => {
2479
+ program2.command("replay").description("Replay a recorded game session against a reducer").argument("<recording>", "Path to recording JSON file").argument("<reducer>", "Path to reducer module").option("--snapshots", "Output intermediate state snapshots").option("--json", "Output as formatted JSON").action(async (recording, reducer2, options) => {
2476
2480
  const { replay: replay3 } = await Promise.resolve().then(() => (init_replay(), exports_replay));
2477
- await replay3.parseAsync(["replay", recording, reducer, ...reconstructArgs(options)], { from: "user" });
2481
+ await replay3.parseAsync(["replay", recording, reducer2, ...reconstructArgs(options)], { from: "user" });
2478
2482
  });
2479
2483
  program2.command("dev").description("Start development server with LAN access").option("-p, --port <port>", "Port number", "5173").option("--host", "Expose to LAN").option("--open", "Open browser automatically").action(async (options) => {
2480
2484
  const { dev: dev2 } = await Promise.resolve().then(() => (init_dev(), exports_dev));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@couch-kit/cli",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -39,7 +39,7 @@
39
39
  "clean": "rm -rf dist"
40
40
  },
41
41
  "dependencies": {
42
- "@couch-kit/core": "0.9.0",
42
+ "@couch-kit/core": "0.9.1",
43
43
  "commander": "^12.0.0"
44
44
  },
45
45
  "devDependencies": {