@doodle-engine/cli 0.0.13 → 0.0.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @doodle-engine/cli
2
2
 
3
+ ## 0.0.14
4
+
5
+ ### Patch Changes
6
+
7
+ - 85dd03e: update dice roll template
8
+ - Updated dependencies [85dd03e]
9
+ - @doodle-engine/core@0.0.14
10
+ - @doodle-engine/react@0.0.14
11
+
3
12
  ## 0.0.13
4
13
 
5
14
  ### Patch Changes
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import { createServer as $, build as H } from "vite";
5
5
  import j from "@vitejs/plugin-react";
6
6
  import { watch as M } from "chokidar";
7
7
  import { readdir as p, readFile as f, mkdir as D, writeFile as k } from "fs/promises";
8
- import { join as d, extname as g, relative as _, dirname as F } from "path";
8
+ import { join as d, extname as g, relative as b, dirname as F } from "path";
9
9
  import { parse as y } from "yaml";
10
10
  import { parseDialogue as E } from "@doodle-engine/core";
11
11
  import P from "prompts";
@@ -354,7 +354,7 @@ async function X(n) {
354
354
  for (const l of c)
355
355
  if (g(l) === ".yaml" || g(l) === ".yml") {
356
356
  const u = d(e, l), h = await f(u, "utf-8"), m = y(h);
357
- m && m.id && (o[s][m.id] = m, r.set(m.id, _(process.cwd(), u)));
357
+ m && m.id && (o[s][m.id] = m, r.set(m.id, b(process.cwd(), u)));
358
358
  }
359
359
  } catch {
360
360
  }
@@ -373,7 +373,7 @@ async function X(n) {
373
373
  for (const e of s)
374
374
  if (g(e) === ".dlg") {
375
375
  const c = d(t, e), l = await f(c, "utf-8"), u = e.replace(".dlg", ""), h = E(l, u);
376
- o.dialogues[h.id] = h, r.set(h.id, _(process.cwd(), c));
376
+ o.dialogues[h.id] = h, r.set(h.id, b(process.cwd(), c));
377
377
  }
378
378
  } catch {
379
379
  }
@@ -432,7 +432,7 @@ async function ee(n) {
432
432
  for (const u of l)
433
433
  if (g(u) === ".yaml" || g(u) === ".yml") {
434
434
  const h = d(c, u), m = await f(h, "utf-8"), w = y(m);
435
- w && w.id && (o[e][w.id] = w, r.set(w.id, _(process.cwd(), h)));
435
+ w && w.id && (o[e][w.id] = w, r.set(w.id, b(process.cwd(), h)));
436
436
  }
437
437
  } catch {
438
438
  }
@@ -451,7 +451,7 @@ async function ee(n) {
451
451
  for (const c of e)
452
452
  if (g(c) === ".dlg") {
453
453
  const l = d(s, c), u = await f(l, "utf-8"), h = c.replace(".dlg", ""), m = E(u, h);
454
- o.dialogues[m.id] = m, r.set(m.id, _(process.cwd(), l));
454
+ o.dialogues[m.id] = m, r.set(m.id, b(process.cwd(), l));
455
455
  }
456
456
  } catch {
457
457
  }
@@ -499,7 +499,7 @@ async function te(n) {
499
499
  for (const l of c)
500
500
  if (g(l) === ".yaml" || g(l) === ".yml") {
501
501
  const u = d(e, l), h = await f(u, "utf-8"), m = y(h);
502
- m && m.id && (o[s][m.id] = m, r.set(m.id, _(process.cwd(), u)));
502
+ m && m.id && (o[s][m.id] = m, r.set(m.id, b(process.cwd(), u)));
503
503
  }
504
504
  } catch {
505
505
  }
@@ -518,7 +518,7 @@ async function te(n) {
518
518
  for (const e of s)
519
519
  if (g(e) === ".dlg") {
520
520
  const c = d(t, e), l = await f(c, "utf-8"), u = e.replace(".dlg", ""), h = E(l, u);
521
- o.dialogues[h.id] = h, r.set(h.id, _(process.cwd(), c));
521
+ o.dialogues[h.id] = h, r.set(h.id, b(process.cwd(), c));
522
522
  }
523
523
  } catch {
524
524
  }
@@ -648,6 +648,11 @@ NODE order_drink
648
648
  GOTO after_drink
649
649
  END
650
650
 
651
+ # Try to bluff a free drink — launches the skill check dialogue (demonstrates: START dialogue)
652
+ CHOICE @bartender.choice.try_bluff
653
+ START dialogue bluff_check
654
+ END
655
+
651
656
  # Always available as an out
652
657
  CHOICE @bartender.choice.too_rich
653
658
  GOTO start
@@ -957,11 +962,11 @@ category: places
957
962
  title: "@journal.odd_jobs_accepted.title"
958
963
  text: "@journal.odd_jobs_accepted.text"
959
964
  category: quests
960
- `, _e = `id: tavern_discovery
965
+ `, be = `id: tavern_discovery
961
966
  title: "@journal.tavern_discovery.title"
962
967
  text: "@journal.tavern_discovery.text"
963
968
  category: places
964
- `, be = `# ===================
969
+ `, _e = `# ===================
965
970
  # Narrator Intros
966
971
  # ===================
967
972
  narrator.tavern_intro: "You push open the heavy oak door and step inside. The warmth hits you first, then the smell — stale ale, wood smoke, and something frying in the kitchen. A few patrons hunch over their mugs. Behind the bar, a broad-shouldered man wipes down glasses, watching you with quiet interest."
@@ -1030,6 +1035,7 @@ bartender.choice.nevermind: "Never mind, just passing through."
1030
1035
  bartender.choice.tell_me_more: "Tell me more about that."
1031
1036
  bartender.choice.interesting: "Interesting. I'll keep that in mind."
1032
1037
  bartender.choice.sure_pay: "Sure, here's five gold."
1038
+ bartender.choice.try_bluff: "Try to talk your way to a free drink."
1033
1039
  bartender.choice.too_rich: "On second thought, I'll pass."
1034
1040
  bartender.choice.back_to_chat: "So, what else?"
1035
1041
  bartender.choice.accept_work: "Sure, I could use the coin."
@@ -1288,8 +1294,8 @@ createRoot(document.getElementById('root')!).render(
1288
1294
  "./templates/content/items/old_coin.yaml": fe,
1289
1295
  "./templates/content/journal/market_square.yaml": pe,
1290
1296
  "./templates/content/journal/odd_jobs_accepted.yaml": ye,
1291
- "./templates/content/journal/tavern_discovery.yaml": _e,
1292
- "./templates/content/locales/en.yaml": be,
1297
+ "./templates/content/journal/tavern_discovery.yaml": be,
1298
+ "./templates/content/locales/en.yaml": _e,
1293
1299
  "./templates/content/locations/market.yaml": we,
1294
1300
  "./templates/content/locations/tavern.yaml": ke,
1295
1301
  "./templates/content/maps/town.yaml": Ee,
@@ -1378,18 +1384,18 @@ async function je(n, o, r) {
1378
1384
  const s = r ? "./templates/src/App.default.tsx" : "./templates/src/App.custom.tsx";
1379
1385
  await k(d(n, "src/App.tsx"), S[s]), console.log(i.green(` ${T} Source files created`)), console.log(""), console.log(` ${x} ${i.bold("Starter content written")}`), console.log(""), console.log(i.dim(" Content includes:")), console.log(i.dim(" 2 locations (tavern, market)")), console.log(i.dim(" 2 characters (bartender, merchant)")), console.log(i.dim(" 1 item (old coin)")), console.log(i.dim(" 1 map (town with 2 locations)")), console.log(i.dim(" 1 quest (odd jobs, 3 stages)")), console.log(i.dim(" 3 journal entries")), console.log(i.dim(" 1 interlude (chapter one, auto-triggers at tavern)")), console.log(i.dim(" 5 dialogues (2 narrator intros, 2 NPC conversations, 1 skill check)")), console.log(i.dim(" English locale with all strings"));
1380
1386
  }
1381
- const b = new G();
1382
- b.name("doodle").description(i.magenta("🐾 Doodle Engine") + i.dim(" — Narrative RPG development tools")).version("0.0.1");
1383
- b.command("create <project-name>").description("Scaffold a new Doodle Engine game project").action(async (n) => {
1387
+ const _ = new G();
1388
+ _.name("doodle").description(i.magenta("🐾 Doodle Engine") + i.dim(" — Narrative RPG development tools")).version("0.0.1");
1389
+ _.command("create <project-name>").description("Scaffold a new Doodle Engine game project").action(async (n) => {
1384
1390
  await Se(n);
1385
1391
  });
1386
- b.command("dev").description("Start development server with hot reload").action(async () => {
1392
+ _.command("dev").description("Start development server with hot reload").action(async () => {
1387
1393
  await K();
1388
1394
  });
1389
- b.command("build").description("Build game for production").action(async () => {
1395
+ _.command("build").description("Build game for production").action(async () => {
1390
1396
  await Z();
1391
1397
  });
1392
- b.command("validate").description("Validate game content").action(async () => {
1398
+ _.command("validate").description("Validate game content").action(async () => {
1393
1399
  await ne();
1394
1400
  });
1395
- b.parse();
1401
+ _.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doodle-engine/cli",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "type": "module",
5
5
  "description": "CLI tools for Doodle Engine game development",
6
6
  "bin": {
@@ -15,8 +15,8 @@
15
15
  "test": "echo no tests"
16
16
  },
17
17
  "dependencies": {
18
- "@doodle-engine/core": "0.0.13",
19
- "@doodle-engine/react": "0.0.13",
18
+ "@doodle-engine/core": "0.0.14",
19
+ "@doodle-engine/react": "0.0.14",
20
20
  "@vitejs/plugin-react": "^4.3.0",
21
21
  "chokidar": "^4.0.0",
22
22
  "commander": "^12.0.0",