miaoda-game-devkit 0.6.4 → 0.6.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/phaser-lint.js
CHANGED
|
@@ -222,12 +222,12 @@ function auditReactAuthoritativePlaythrough(projectRoot2) {
|
|
|
222
222
|
const hasObserve = declaresObserve(testSource);
|
|
223
223
|
if (!hasObserve) {
|
|
224
224
|
issues.push(
|
|
225
|
-
`${PRODUCTION_PLAYTHROUGH} must declare observe because production uses the devkit clock or Controller ownership hook.
|
|
225
|
+
`${PRODUCTION_PLAYTHROUGH} must declare observe because production uses the devkit clock or Controller ownership hook. Pass { observe: () => telemetry.read.session() } to playthroughTest, using Telemetry backed by the same production Controller rendered by <App />; DOM labels are not an authoritative gameplay boundary.`
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
if (clockFiles.length > 0 && !testingImports.has("ManualGameClock")) {
|
|
229
229
|
issues.push(
|
|
230
|
-
`${PRODUCTION_PLAYTHROUGH} must import ManualGameClock because production owns gameplay time in ${clockFiles.join(", ")}.
|
|
230
|
+
`${PRODUCTION_PLAYTHROUGH} must import ManualGameClock because production owns gameplay time in ${clockFiles.join(", ")}. Add this import to the test: import { ManualGameClock } from "miaoda-game-devkit/react/testing"; Then create one, inject it through the production <App /> factory, and advance it with step: () => clock.stepFrame().`
|
|
231
231
|
);
|
|
232
232
|
}
|
|
233
233
|
return {
|
package/dist/cli/react-lint.js
CHANGED
|
@@ -222,12 +222,12 @@ function auditReactAuthoritativePlaythrough(projectRoot2) {
|
|
|
222
222
|
const hasObserve = declaresObserve(testSource);
|
|
223
223
|
if (!hasObserve) {
|
|
224
224
|
issues.push(
|
|
225
|
-
`${PRODUCTION_PLAYTHROUGH} must declare observe because production uses the devkit clock or Controller ownership hook.
|
|
225
|
+
`${PRODUCTION_PLAYTHROUGH} must declare observe because production uses the devkit clock or Controller ownership hook. Pass { observe: () => telemetry.read.session() } to playthroughTest, using Telemetry backed by the same production Controller rendered by <App />; DOM labels are not an authoritative gameplay boundary.`
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
if (clockFiles.length > 0 && !testingImports.has("ManualGameClock")) {
|
|
229
229
|
issues.push(
|
|
230
|
-
`${PRODUCTION_PLAYTHROUGH} must import ManualGameClock because production owns gameplay time in ${clockFiles.join(", ")}.
|
|
230
|
+
`${PRODUCTION_PLAYTHROUGH} must import ManualGameClock because production owns gameplay time in ${clockFiles.join(", ")}. Add this import to the test: import { ManualGameClock } from "miaoda-game-devkit/react/testing"; Then create one, inject it through the production <App /> factory, and advance it with step: () => clock.stepFrame().`
|
|
231
231
|
);
|
|
232
232
|
}
|
|
233
233
|
return {
|
|
@@ -256,12 +256,12 @@ function auditReactAuthoritativePlaythrough(projectRoot) {
|
|
|
256
256
|
const hasObserve = declaresObserve(testSource);
|
|
257
257
|
if (!hasObserve) {
|
|
258
258
|
issues.push(
|
|
259
|
-
`${PRODUCTION_PLAYTHROUGH} must declare observe because production uses the devkit clock or Controller ownership hook.
|
|
259
|
+
`${PRODUCTION_PLAYTHROUGH} must declare observe because production uses the devkit clock or Controller ownership hook. Pass { observe: () => telemetry.read.session() } to playthroughTest, using Telemetry backed by the same production Controller rendered by <App />; DOM labels are not an authoritative gameplay boundary.`
|
|
260
260
|
);
|
|
261
261
|
}
|
|
262
262
|
if (clockFiles.length > 0 && !testingImports.has("ManualGameClock")) {
|
|
263
263
|
issues.push(
|
|
264
|
-
`${PRODUCTION_PLAYTHROUGH} must import ManualGameClock because production owns gameplay time in ${clockFiles.join(", ")}.
|
|
264
|
+
`${PRODUCTION_PLAYTHROUGH} must import ManualGameClock because production owns gameplay time in ${clockFiles.join(", ")}. Add this import to the test: import { ManualGameClock } from "miaoda-game-devkit/react/testing"; Then create one, inject it through the production <App /> factory, and advance it with step: () => clock.stepFrame().`
|
|
265
265
|
);
|
|
266
266
|
}
|
|
267
267
|
return {
|
|
@@ -222,12 +222,12 @@ function auditReactAuthoritativePlaythrough(projectRoot) {
|
|
|
222
222
|
const hasObserve = declaresObserve(testSource);
|
|
223
223
|
if (!hasObserve) {
|
|
224
224
|
issues.push(
|
|
225
|
-
`${PRODUCTION_PLAYTHROUGH} must declare observe because production uses the devkit clock or Controller ownership hook.
|
|
225
|
+
`${PRODUCTION_PLAYTHROUGH} must declare observe because production uses the devkit clock or Controller ownership hook. Pass { observe: () => telemetry.read.session() } to playthroughTest, using Telemetry backed by the same production Controller rendered by <App />; DOM labels are not an authoritative gameplay boundary.`
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
if (clockFiles.length > 0 && !testingImports.has("ManualGameClock")) {
|
|
229
229
|
issues.push(
|
|
230
|
-
`${PRODUCTION_PLAYTHROUGH} must import ManualGameClock because production owns gameplay time in ${clockFiles.join(", ")}.
|
|
230
|
+
`${PRODUCTION_PLAYTHROUGH} must import ManualGameClock because production owns gameplay time in ${clockFiles.join(", ")}. Add this import to the test: import { ManualGameClock } from "miaoda-game-devkit/react/testing"; Then create one, inject it through the production <App /> factory, and advance it with step: () => clock.stepFrame().`
|
|
231
231
|
);
|
|
232
232
|
}
|
|
233
233
|
return {
|
|
@@ -57,7 +57,7 @@ var rule = {
|
|
|
57
57
|
providedUser: "Use the user provided by playthroughTest; do not import or create another userEvent instance in the production playthrough.",
|
|
58
58
|
productionTestingImport: "Production source must not import miaoda-game-devkit/react/testing. Inject test clocks and observers through the production App factory boundary.",
|
|
59
59
|
productionEntry: "Render <App /> from the production playthrough. Import Controller and Telemetry helpers when needed, but do not render an internal game component directly.",
|
|
60
|
-
emptyStep:
|
|
60
|
+
emptyStep: 'A deterministic step must advance production-owned time, frames, or queued work. An empty step is not gameplay evidence. Add import { ManualGameClock } from "miaoda-game-devkit/react/testing"; inject it through the production <App /> factory, and use step: () => clock.stepFrame().'
|
|
61
61
|
},
|
|
62
62
|
schema: []
|
|
63
63
|
},
|