@maka/maka-cli 5.155.0 → 5.157.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maka/maka-cli",
3
- "version": "5.155.0",
3
+ "version": "5.157.0",
4
4
  "type": "module",
5
5
  "summary": "A command line tool for scaffolding Meteor 3.x applications using either React.",
6
6
  "description": "A command line tool for scaffolding Meteor 3.x applications using React.",
@@ -94,8 +94,16 @@ export class StanceCommand extends Command {
94
94
  if (onMatrix) {
95
95
  return `That's not a Matrix route. Choose: ${MATRIX_STANCE_CYCLE.join(', ')} (${MATRIX_STANCE_CYCLE.map(m => MATRIX_STANCE_ACTION[m]).join(' / ')}).`;
96
96
  }
97
+ // THE EXACT NAME ALWAYS WINS. "stance non-lethal" -- the very word the
98
+ // refusal below lists -- used to be refused: fuzzyPickName normalizes
99
+ // punctuation to whitespace, so "non-lethal" and the "non lethal"
100
+ // alias both became "non lethal", the exact tier saw two candidates,
101
+ // and an ambiguous guess deliberately misses. Caught by a bench that
102
+ // typed the name off the "Choose:" line (2jbprbSYqF7EPXrkR's dry run).
97
103
  // The old words (and their typos) still land: fuzzy over the cycle AND the aliases, then through the alias map.
98
- const pickedRaw = STANCE_ALIASES[raw] ?? fuzzyPickName(args.join(' '), [...STANCE_CYCLE, ...Object.keys(STANCE_ALIASES)]);
104
+ const pickedRaw = STANCE_CYCLE.includes(raw)
105
+ ? raw
106
+ : STANCE_ALIASES[raw] ?? fuzzyPickName(args.join(' '), [...STANCE_CYCLE, ...Object.keys(STANCE_ALIASES)]);
99
107
  const picked = pickedRaw ? (STANCE_ALIASES[pickedRaw] ?? pickedRaw) : undefined;
100
108
  if (!picked) {
101
109
  return `That's not a stance. Choose: ${STANCE_CYCLE.join(', ')}.`;
@@ -905,6 +905,10 @@ export class SharedRunSession {
905
905
  dead = false;
906
906
  over = false;
907
907
  quitArmed = false;
908
+ /** The taxi's warn-once on unclaimed pay (see command()): the first
909
+ * "call taxi" the server refuses as "unsettled" arms this; the next
910
+ * one confirms and leaves the pay on the table. */
911
+ forfeitArmed = false;
908
912
  subs = [];
909
913
  constructor(game, sessionID) {
910
914
  this.game = game;
@@ -1191,7 +1195,13 @@ export class SharedRunSession {
1191
1195
  // wrap-up share).
1192
1196
  if (/^call\s+(a\s+|the\s+)?(taxi|cab)\b/i.test(input.trim())) {
1193
1197
  try {
1194
- await HubLink.call('sideQuest.settle', { sessionID: this.sessionID });
1198
+ // UNCLAIMED PAY (AB6pJQpYD49qDaDJR): this shortcut skips the
1199
+ // engine's CallCommand, so its warn-once for a finished job
1200
+ // whose Johnson was never settled with never ran -- the runner
1201
+ // rode home with the whole lump sum still on the table. `guard`
1202
+ // asks the server to make that same check; a refusal arms the
1203
+ // confirm, and the next call sends it (call.ts's own shape).
1204
+ await HubLink.call('sideQuest.settle', { sessionID: this.sessionID, guard: true, confirm: this.forfeitArmed });
1195
1205
  await this.homecoming();
1196
1206
  return '';
1197
1207
  }
@@ -1200,6 +1210,20 @@ export class SharedRunSession {
1200
1210
  if (e.error === 'not-leader') {
1201
1211
  return this.leave();
1202
1212
  }
1213
+ if (e.error === 'unsettled') {
1214
+ this.forfeitArmed = true;
1215
+ let who = 'your Johnson';
1216
+ let owed = 0;
1217
+ try {
1218
+ const d = typeof e.details === 'string' ? JSON.parse(e.details) : e.details;
1219
+ if (d?.name)
1220
+ who = d.name;
1221
+ if (typeof d?.owed === 'number')
1222
+ owed = d.owed;
1223
+ }
1224
+ catch { /* the name is a courtesy; the warning stands without it */ }
1225
+ return `The dispatcher picks up -- and you hesitate. You never settled with ${who}: ${owed}¥ still on the table. ("call taxi" again to leave it and go.)`;
1226
+ }
1203
1227
  if (e.error === 'bad-status' || e.error === 'interrupted') {
1204
1228
  await this.homecoming();
1205
1229
  return '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maka/maka-cli",
3
- "version": "5.155.0",
3
+ "version": "5.157.0",
4
4
  "type": "module",
5
5
  "summary": "A command line tool for scaffolding Meteor 3.x applications using either React.",
6
6
  "description": "A command line tool for scaffolding Meteor 3.x applications using React.",