@maka/maka-cli 5.165.0 → 5.166.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.
|
|
3
|
+
"version": "5.166.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.",
|
|
@@ -156,6 +156,70 @@ export function readReproFile(candidate) {
|
|
|
156
156
|
* accepts a sink array, so per step we take the meta events emitted
|
|
157
157
|
* since the last step and print them under the output they explain.
|
|
158
158
|
*/
|
|
159
|
+
/** The bench's actor. One name, used for the seat and for the
|
|
160
|
+
* visibility filter below. */
|
|
161
|
+
export const REPRO_ACTOR = 'Tester';
|
|
162
|
+
const stripTags = (s) => s.replace(/\{\/?[a-z-]+\}/g, '');
|
|
163
|
+
/**
|
|
164
|
+
* ONE STEP OF TRANSCRIPT, pure: the command's return string, then what
|
|
165
|
+
* the actor HEARD, then the dice, then the panels.
|
|
166
|
+
*
|
|
167
|
+
* THE LOG CHANNEL IS PART OF THE TRANSCRIPT, and it was missing
|
|
168
|
+
* (aCjJiDDJM9jGZJeER, 2026-09-11). A command's return string is what the
|
|
169
|
+
* engine says to the one who typed it; everything a room is told -- an
|
|
170
|
+
* NPC drawing, closing, taking cover, a companion's line, the exchange
|
|
171
|
+
* narration itself -- goes out as `log` events scoped to the room and
|
|
172
|
+
* resolved to the players standing in it. The dry run printed the reply
|
|
173
|
+
* and the dice and dropped every one of those, so a bench whose whole
|
|
174
|
+
* point is "the room now sees Joe's Action Phase" showed Joe's roll in
|
|
175
|
+
* the mechanics block and NOT the line the fix added -- the same "a
|
|
176
|
+
* bench that cannot display its own point" shape this renderer has been
|
|
177
|
+
* extended for twice already (mechanics, then panels).
|
|
178
|
+
*
|
|
179
|
+
* Only what THE ACTOR can see: an event resolved to other players is
|
|
180
|
+
* not on this transcript, because the bench sits one runner at one
|
|
181
|
+
* table and a line they never saw is not evidence of anything.
|
|
182
|
+
*/
|
|
183
|
+
export function renderStepLines(step, text, fresh, actor = REPRO_ACTOR) {
|
|
184
|
+
const lines = [];
|
|
185
|
+
lines.push(`> ${step}`);
|
|
186
|
+
lines.push(stripTags(text ?? '(no output)'));
|
|
187
|
+
const heard = fresh.filter(e => e.channel === 'log'
|
|
188
|
+
&& (e.visibleTo === 'all' || e.visibleTo.includes(actor)));
|
|
189
|
+
for (const h of heard) {
|
|
190
|
+
const body = stripTags(h.text).replace(/\s+$/gm, '');
|
|
191
|
+
if (body.trim().length === 0)
|
|
192
|
+
continue;
|
|
193
|
+
for (const row of body.split('\n'))
|
|
194
|
+
lines.push(` [heard] ${row}`);
|
|
195
|
+
}
|
|
196
|
+
for (const m of fresh.filter(e => e.channel === 'meta')) {
|
|
197
|
+
lines.push(` [mechanics] ${stripTags(m.text)}`);
|
|
198
|
+
}
|
|
199
|
+
// THE DOCKED PANELS ARE PART OF THE TRANSCRIPT TOO, for exactly
|
|
200
|
+
// the reason the mechanics ticker above is.
|
|
201
|
+
//
|
|
202
|
+
// The map and room boxes are a THIRD channel: not the command's
|
|
203
|
+
// return string, not the meta ticker, but per-player `system`
|
|
204
|
+
// events. A bench whose subject is a panel -- "the NPC I can see
|
|
205
|
+
// is not on the room map", an elevation bar, a district caption --
|
|
206
|
+
// dry-ran green while showing none of what it exists to show,
|
|
207
|
+
// which is the same "a bench that cannot display its own point"
|
|
208
|
+
// failure this function was already extended once to fix.
|
|
209
|
+
//
|
|
210
|
+
// Printed only when the panel has something to say: an empty
|
|
211
|
+
// event is the jacked-into-the-matrix contract, and blank
|
|
212
|
+
// [room]/[map] blocks on every step would bury the steps.
|
|
213
|
+
for (const p of fresh.filter(e => e.channel === 'system' && (e.kind === 'map' || e.kind === 'room'))) {
|
|
214
|
+
const body = stripTags(p.text ?? '').replace(/\s+$/gm, '');
|
|
215
|
+
if (body.trim().length === 0)
|
|
216
|
+
continue;
|
|
217
|
+
for (const row of body.split('\n'))
|
|
218
|
+
lines.push(` [${p.kind}] ${row}`);
|
|
219
|
+
}
|
|
220
|
+
lines.push('');
|
|
221
|
+
return lines;
|
|
222
|
+
}
|
|
159
223
|
export async function dryRunRepro(repro) {
|
|
160
224
|
const [{ buildReproScene, reproArchetypeName }, { bootSession, saveForArchetype }] = await Promise.all([
|
|
161
225
|
import('../factories/repro-scene.js'),
|
|
@@ -170,10 +234,9 @@ export async function dryRunRepro(repro) {
|
|
|
170
234
|
const events = [];
|
|
171
235
|
const session = await bootSession({
|
|
172
236
|
seed: built.seed,
|
|
173
|
-
players: [saveForArchetype(
|
|
237
|
+
players: [saveForArchetype(REPRO_ACTOR, reproArchetypeName(fixture))],
|
|
174
238
|
events,
|
|
175
239
|
});
|
|
176
|
-
const strip = (s) => s.replace(/\{\/?[a-z-]+\}/g, '');
|
|
177
240
|
const lines = [];
|
|
178
241
|
// THE FIRST PAINT IS NOT PART OF STEP ONE. bootSession pushes every
|
|
179
242
|
// player's panels the moment the session comes up (B7NNNesy5gvRSbZpp),
|
|
@@ -183,40 +246,13 @@ export async function dryRunRepro(repro) {
|
|
|
183
246
|
let drained = events.length;
|
|
184
247
|
try {
|
|
185
248
|
for (const step of repro.steps) {
|
|
186
|
-
const { text } = await session.command(
|
|
187
|
-
lines.push(`> ${step}`);
|
|
188
|
-
lines.push(strip(text ?? '(no output)'));
|
|
249
|
+
const { text } = await session.command(REPRO_ACTOR, step);
|
|
189
250
|
// Only what THIS step produced: the cursor advances past
|
|
190
|
-
// everything seen,
|
|
191
|
-
//
|
|
192
|
-
// one that did.
|
|
251
|
+
// everything seen, so a step that emits no dice prints no
|
|
252
|
+
// Mechanics block rather than repeating the last one that did.
|
|
193
253
|
const fresh = events.slice(drained);
|
|
194
254
|
drained = events.length;
|
|
195
|
-
|
|
196
|
-
lines.push(` [mechanics] ${strip(m.text)}`);
|
|
197
|
-
}
|
|
198
|
-
// THE DOCKED PANELS ARE PART OF THE TRANSCRIPT TOO, for exactly
|
|
199
|
-
// the reason the mechanics ticker above is.
|
|
200
|
-
//
|
|
201
|
-
// The map and room boxes are a THIRD channel: not the command's
|
|
202
|
-
// return string, not the meta ticker, but per-player `system`
|
|
203
|
-
// events. A bench whose subject is a panel -- "the NPC I can see
|
|
204
|
-
// is not on the room map", an elevation bar, a district caption --
|
|
205
|
-
// dry-ran green while showing none of what it exists to show,
|
|
206
|
-
// which is the same "a bench that cannot display its own point"
|
|
207
|
-
// failure this function was already extended once to fix.
|
|
208
|
-
//
|
|
209
|
-
// Printed only when the panel has something to say: an empty
|
|
210
|
-
// event is the jacked-into-the-matrix contract, and blank
|
|
211
|
-
// [room]/[map] blocks on every step would bury the steps.
|
|
212
|
-
for (const p of fresh.filter(e => e.channel === 'system' && (e.kind === 'map' || e.kind === 'room'))) {
|
|
213
|
-
const body = strip(p.text ?? '').replace(/\s+$/gm, '');
|
|
214
|
-
if (body.trim().length === 0)
|
|
215
|
-
continue;
|
|
216
|
-
for (const row of body.split('\n'))
|
|
217
|
-
lines.push(` [${p.kind}] ${row}`);
|
|
218
|
-
}
|
|
219
|
-
lines.push('');
|
|
255
|
+
lines.push(...renderStepLines(step, text, fresh));
|
|
220
256
|
}
|
|
221
257
|
}
|
|
222
258
|
finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka/maka-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.166.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.",
|