testeranto 0.134.0 → 0.135.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.
Files changed (71) hide show
  1. package/.aider.chat.history.md +601 -0
  2. package/.aider.input.history +36 -0
  3. package/.aider.tags.cache.v3/{18/8b/7dfca822129dad10b5cacadf7728.val → 8e/ec/2d4659a1589a0187a757ab1cbefa.val} +0 -0
  4. package/.aider.tags.cache.v3/cache.db +0 -0
  5. package/.aider.tags.cache.v3/{8d/fa/12860238755bcfab9af8a93c52ab.val → d8/b0/a8966fcd65890fd9f70d7afe8141.val} +0 -0
  6. package/README.md +60 -347
  7. package/dist/common/src/CoreTypes.js +2 -0
  8. package/dist/common/src/PM/PM_WithEslintAndTsc.js +10 -8
  9. package/dist/common/src/PM/main.js +12 -7
  10. package/dist/common/src/PM/node.js +10 -3
  11. package/dist/common/src/build.js +3 -2
  12. package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
  13. package/dist/common/src/esbuildConfigs/node.js +2 -16
  14. package/dist/common/src/esbuildConfigs/pure.js +2 -16
  15. package/dist/common/src/esbuildConfigs/rebuildPlugin.js +22 -0
  16. package/dist/common/src/esbuildConfigs/web.js +2 -16
  17. package/dist/common/src/lib/abstractBase.js +6 -1
  18. package/dist/common/src/lib/classBuilder.js +2 -3
  19. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  20. package/dist/module/src/CoreTypes.js +1 -0
  21. package/dist/module/src/PM/PM_WithEslintAndTsc.js +10 -8
  22. package/dist/module/src/PM/main.js +12 -7
  23. package/dist/module/src/PM/node.js +10 -3
  24. package/dist/module/src/build.js +3 -2
  25. package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
  26. package/dist/module/src/esbuildConfigs/node.js +2 -16
  27. package/dist/module/src/esbuildConfigs/pure.js +2 -16
  28. package/dist/module/src/esbuildConfigs/rebuildPlugin.js +17 -0
  29. package/dist/module/src/esbuildConfigs/web.js +2 -16
  30. package/dist/module/src/lib/abstractBase.js +6 -1
  31. package/dist/module/src/lib/classBuilder.js +2 -3
  32. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  33. package/dist/prebuild/Project.js +15 -16
  34. package/dist/prebuild/TestReport.js +12 -14
  35. package/dist/prebuild/build.mjs +39 -61
  36. package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +14 -1
  37. package/dist/prebuild/run.mjs +50 -31
  38. package/dist/types/src/CoreTypes.d.ts +51 -0
  39. package/dist/types/src/Node.d.ts +2 -2
  40. package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +1 -19
  41. package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +1 -19
  42. package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +1 -19
  43. package/dist/types/src/PM/index.d.ts +1 -1
  44. package/dist/types/src/Types.d.ts +13 -57
  45. package/dist/types/src/Web.d.ts +1 -1
  46. package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +6 -0
  47. package/dist/types/src/lib/abstractBase.d.ts +2 -8
  48. package/dist/types/src/lib/core.d.ts +1 -1
  49. package/dist/types/src/mothership/test.d.ts +1 -20
  50. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  51. package/docs/index.md +277 -0
  52. package/package.json +6 -1
  53. package/src/CoreTypes.ts +171 -0
  54. package/src/Node.ts +25 -11
  55. package/src/PM/PM_WithEslintAndTsc.ts +46 -15
  56. package/src/PM/index.ts +1 -1
  57. package/src/PM/main.ts +17 -16
  58. package/src/PM/node.ts +10 -10
  59. package/src/Types.ts +166 -150
  60. package/src/Web.ts +0 -3
  61. package/src/build.ts +3 -2
  62. package/src/esbuildConfigs/eslint-formatter-testeranto.ts +17 -1
  63. package/src/esbuildConfigs/node.ts +2 -18
  64. package/src/esbuildConfigs/pure.ts +2 -18
  65. package/src/esbuildConfigs/rebuildPlugin.ts +23 -0
  66. package/src/esbuildConfigs/web.ts +2 -18
  67. package/src/lib/abstractBase.ts +6 -1
  68. package/src/lib/classBuilder.ts +5 -4
  69. package/src/lib/core.ts +5 -9
  70. package/.aider.tags.cache.v3/cache.db-shm +0 -0
  71. package/.aider.tags.cache.v3/cache.db-wal +0 -0
@@ -2383,9 +2383,9 @@
2383
2383
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
2384
2384
  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2385
2385
  }
2386
- var React30 = require_react();
2386
+ var React29 = require_react();
2387
2387
  var Scheduler = require_scheduler();
2388
- var ReactSharedInternals = React30.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2388
+ var ReactSharedInternals = React29.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2389
2389
  var suppressWarning = false;
2390
2390
  function setSuppressWarning(newSuppressWarning) {
2391
2391
  {
@@ -3990,7 +3990,7 @@
3990
3990
  {
3991
3991
  if (props.value == null) {
3992
3992
  if (typeof props.children === "object" && props.children !== null) {
3993
- React30.Children.forEach(props.children, function(child) {
3993
+ React29.Children.forEach(props.children, function(child) {
3994
3994
  if (child == null) {
3995
3995
  return;
3996
3996
  }
@@ -12437,7 +12437,7 @@
12437
12437
  }
12438
12438
  }
12439
12439
  var fakeInternalInstance = {};
12440
- var emptyRefsObject = new React30.Component().refs;
12440
+ var emptyRefsObject = new React29.Component().refs;
12441
12441
  var didWarnAboutStateAssignmentForComponent;
12442
12442
  var didWarnAboutUninitializedState;
12443
12443
  var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
@@ -23609,7 +23609,7 @@
23609
23609
  if (true) {
23610
23610
  (function() {
23611
23611
  "use strict";
23612
- var React30 = require_react();
23612
+ var React29 = require_react();
23613
23613
  var REACT_ELEMENT_TYPE = Symbol.for("react.element");
23614
23614
  var REACT_PORTAL_TYPE = Symbol.for("react.portal");
23615
23615
  var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
@@ -23635,7 +23635,7 @@
23635
23635
  }
23636
23636
  return null;
23637
23637
  }
23638
- var ReactSharedInternals = React30.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
23638
+ var ReactSharedInternals = React29.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
23639
23639
  function error(format) {
23640
23640
  {
23641
23641
  {
@@ -26186,6 +26186,7 @@
26186
26186
  })
26187
26187
  });
26188
26188
  });
26189
+ TransitionWrapper.displayName = "TransitionWrapper";
26189
26190
  var TransitionWrapper_default = TransitionWrapper;
26190
26191
 
26191
26192
  // node_modules/@restart/ui/esm/Anchor.js
@@ -26577,7 +26578,7 @@
26577
26578
  }
26578
26579
  function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
26579
26580
  let ctx = (0, import_react24.useContext)($b5e257d569688ac6$var$SSRContext);
26580
- if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
26581
+ if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && true)
26581
26582
  console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
26582
26583
  let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
26583
26584
  let prefix = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
@@ -27064,9 +27065,6 @@
27064
27065
  // node_modules/react-bootstrap/esm/Tab.js
27065
27066
  var import_prop_types3 = __toESM(require_prop_types());
27066
27067
 
27067
- // node_modules/react-bootstrap/esm/TabContainer.js
27068
- var React24 = __toESM(require_react());
27069
-
27070
27068
  // node_modules/@restart/ui/esm/Tabs.js
27071
27069
  var React23 = __toESM(require_react());
27072
27070
  var import_react31 = __toESM(require_react());
@@ -27249,11 +27247,11 @@
27249
27247
  var TabContainer_default = TabContainer;
27250
27248
 
27251
27249
  // node_modules/react-bootstrap/esm/TabContent.js
27252
- var React25 = __toESM(require_react());
27250
+ var React24 = __toESM(require_react());
27253
27251
  var import_classnames7 = __toESM(require_classnames());
27254
27252
  var import_jsx_runtime16 = __toESM(require_jsx_runtime());
27255
27253
  "use client";
27256
- var TabContent = /* @__PURE__ */ React25.forwardRef(({
27254
+ var TabContent = /* @__PURE__ */ React24.forwardRef(({
27257
27255
  className,
27258
27256
  bsPrefix,
27259
27257
  as: Component = "div",
@@ -27271,10 +27269,10 @@
27271
27269
 
27272
27270
  // node_modules/react-bootstrap/esm/TabPane.js
27273
27271
  var import_classnames8 = __toESM(require_classnames());
27274
- var React26 = __toESM(require_react());
27272
+ var React25 = __toESM(require_react());
27275
27273
  var import_jsx_runtime17 = __toESM(require_jsx_runtime());
27276
27274
  "use client";
27277
- var TabPane = /* @__PURE__ */ React26.forwardRef(({
27275
+ var TabPane = /* @__PURE__ */ React25.forwardRef(({
27278
27276
  bsPrefix,
27279
27277
  transition,
27280
27278
  ...props
@@ -27358,10 +27356,10 @@
27358
27356
 
27359
27357
  // node_modules/react-bootstrap/esm/Table.js
27360
27358
  var import_classnames9 = __toESM(require_classnames());
27361
- var React27 = __toESM(require_react());
27359
+ var React26 = __toESM(require_react());
27362
27360
  var import_jsx_runtime18 = __toESM(require_jsx_runtime());
27363
27361
  "use client";
27364
- var Table = /* @__PURE__ */ React27.forwardRef(({
27362
+ var Table = /* @__PURE__ */ React26.forwardRef(({
27365
27363
  bsPrefix,
27366
27364
  className,
27367
27365
  striped,
@@ -27392,6 +27390,7 @@
27392
27390
  }
27393
27391
  return table;
27394
27392
  });
27393
+ Table.displayName = "Table";
27395
27394
  var Table_default = Table;
27396
27395
 
27397
27396
  // src/Footer.tsx
@@ -2383,9 +2383,9 @@
2383
2383
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
2384
2384
  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2385
2385
  }
2386
- var React29 = require_react();
2386
+ var React28 = require_react();
2387
2387
  var Scheduler = require_scheduler();
2388
- var ReactSharedInternals = React29.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2388
+ var ReactSharedInternals = React28.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2389
2389
  var suppressWarning = false;
2390
2390
  function setSuppressWarning(newSuppressWarning) {
2391
2391
  {
@@ -3990,7 +3990,7 @@
3990
3990
  {
3991
3991
  if (props.value == null) {
3992
3992
  if (typeof props.children === "object" && props.children !== null) {
3993
- React29.Children.forEach(props.children, function(child) {
3993
+ React28.Children.forEach(props.children, function(child) {
3994
3994
  if (child == null) {
3995
3995
  return;
3996
3996
  }
@@ -12437,7 +12437,7 @@
12437
12437
  }
12438
12438
  }
12439
12439
  var fakeInternalInstance = {};
12440
- var emptyRefsObject = new React29.Component().refs;
12440
+ var emptyRefsObject = new React28.Component().refs;
12441
12441
  var didWarnAboutStateAssignmentForComponent;
12442
12442
  var didWarnAboutUninitializedState;
12443
12443
  var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
@@ -23609,7 +23609,7 @@
23609
23609
  if (true) {
23610
23610
  (function() {
23611
23611
  "use strict";
23612
- var React29 = require_react();
23612
+ var React28 = require_react();
23613
23613
  var REACT_ELEMENT_TYPE = Symbol.for("react.element");
23614
23614
  var REACT_PORTAL_TYPE = Symbol.for("react.portal");
23615
23615
  var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
@@ -23635,7 +23635,7 @@
23635
23635
  }
23636
23636
  return null;
23637
23637
  }
23638
- var ReactSharedInternals = React29.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
23638
+ var ReactSharedInternals = React28.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
23639
23639
  function error(format) {
23640
23640
  {
23641
23641
  {
@@ -26186,6 +26186,7 @@
26186
26186
  })
26187
26187
  });
26188
26188
  });
26189
+ TransitionWrapper.displayName = "TransitionWrapper";
26189
26190
  var TransitionWrapper_default = TransitionWrapper;
26190
26191
 
26191
26192
  // node_modules/@restart/ui/esm/Anchor.js
@@ -26577,7 +26578,7 @@
26577
26578
  }
26578
26579
  function $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {
26579
26580
  let ctx = (0, import_react24.useContext)($b5e257d569688ac6$var$SSRContext);
26580
- if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM)
26581
+ if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM && true)
26581
26582
  console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
26582
26583
  let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);
26583
26584
  let prefix = ctx === $b5e257d569688ac6$var$defaultContext && false ? "react-aria" : `react-aria${ctx.prefix}`;
@@ -27064,9 +27065,6 @@
27064
27065
  // node_modules/react-bootstrap/esm/Tab.js
27065
27066
  var import_prop_types3 = __toESM(require_prop_types());
27066
27067
 
27067
- // node_modules/react-bootstrap/esm/TabContainer.js
27068
- var React24 = __toESM(require_react());
27069
-
27070
27068
  // node_modules/@restart/ui/esm/Tabs.js
27071
27069
  var React23 = __toESM(require_react());
27072
27070
  var import_react31 = __toESM(require_react());
@@ -27249,11 +27247,11 @@
27249
27247
  var TabContainer_default = TabContainer;
27250
27248
 
27251
27249
  // node_modules/react-bootstrap/esm/TabContent.js
27252
- var React25 = __toESM(require_react());
27250
+ var React24 = __toESM(require_react());
27253
27251
  var import_classnames7 = __toESM(require_classnames());
27254
27252
  var import_jsx_runtime16 = __toESM(require_jsx_runtime());
27255
27253
  "use client";
27256
- var TabContent = /* @__PURE__ */ React25.forwardRef(({
27254
+ var TabContent = /* @__PURE__ */ React24.forwardRef(({
27257
27255
  className,
27258
27256
  bsPrefix,
27259
27257
  as: Component = "div",
@@ -27271,10 +27269,10 @@
27271
27269
 
27272
27270
  // node_modules/react-bootstrap/esm/TabPane.js
27273
27271
  var import_classnames8 = __toESM(require_classnames());
27274
- var React26 = __toESM(require_react());
27272
+ var React25 = __toESM(require_react());
27275
27273
  var import_jsx_runtime17 = __toESM(require_jsx_runtime());
27276
27274
  "use client";
27277
- var TabPane = /* @__PURE__ */ React26.forwardRef(({
27275
+ var TabPane = /* @__PURE__ */ React25.forwardRef(({
27278
27276
  bsPrefix,
27279
27277
  transition,
27280
27278
  ...props
@@ -9,7 +9,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
9
9
 
10
10
  // src/build.ts
11
11
  import ansiC from "ansi-colors";
12
- import fs2 from "fs";
12
+ import fs3 from "fs";
13
13
  import path4 from "path";
14
14
  import readline from "readline";
15
15
  import esbuild from "esbuild";
@@ -96,6 +96,28 @@ var featuresPlugin_default = {
96
96
  }
97
97
  };
98
98
 
99
+ // src/esbuildConfigs/rebuildPlugin.ts
100
+ import fs2 from "fs";
101
+ var rebuildPlugin_default = (r) => {
102
+ return {
103
+ name: "rebuild-notify",
104
+ setup: (build) => {
105
+ build.onStart(() => {
106
+ console.log(`> web build starting...`);
107
+ });
108
+ build.onEnd((result) => {
109
+ console.log(`> web build ended with ${result.errors.length} errors`);
110
+ if (result.errors.length > 0) {
111
+ fs2.writeFileSync(
112
+ `./testeranto/reports${r}_build_errors`,
113
+ JSON.stringify(result, null, 2)
114
+ );
115
+ }
116
+ });
117
+ }
118
+ };
119
+ };
120
+
99
121
  // src/esbuildConfigs/node.ts
100
122
  var node_default = (config, entryPoints, testName2) => {
101
123
  const { inputFilesPluginFactory, register: register2 } = inputFilesPlugin_default(
@@ -124,22 +146,7 @@ var node_default = (config, entryPoints, testName2) => {
124
146
  plugins: [
125
147
  featuresPlugin_default,
126
148
  inputFilesPluginFactory,
127
- {
128
- name: "rebuild-notify",
129
- setup: (build) => {
130
- build.onStart(() => {
131
- console.log(`> node build starting...`);
132
- });
133
- build.onEnd((result) => {
134
- console.log(
135
- `> node build ended with ${result.errors.length} errors`
136
- );
137
- if (result.errors.length > 0) {
138
- console.log(result);
139
- }
140
- });
141
- }
142
- },
149
+ rebuildPlugin_default("node"),
143
150
  ...config.nodePlugins.map((p) => p(register2, entryPoints)) || []
144
151
  ]
145
152
  };
@@ -193,22 +200,7 @@ var web_default = (config, entryPoints, testName2) => {
193
200
  // 'fs': false,
194
201
  // }
195
202
  }),
196
- {
197
- name: "rebuild-notify",
198
- setup: (build) => {
199
- build.onStart(() => {
200
- console.log(`> web build starting...`);
201
- });
202
- build.onEnd((result) => {
203
- console.log(
204
- `> web build ended with ${result.errors.length} errors`
205
- );
206
- if (result.errors.length > 0) {
207
- console.log(result);
208
- }
209
- });
210
- }
211
- },
203
+ rebuildPlugin_default("web"),
212
204
  ...(config.webPlugins || []).map((p) => p(register2, entryPoints)) || []
213
205
  ]
214
206
  };
@@ -286,22 +278,7 @@ var pure_default = (config, entryPoints, testName2) => {
286
278
  });
287
279
  }
288
280
  },
289
- {
290
- name: "rebuild-notify",
291
- setup: (build) => {
292
- build.onStart(() => {
293
- console.log(`> pure build starting...`);
294
- });
295
- build.onEnd((result) => {
296
- console.log(
297
- `> pure build ended with ${result.errors.length} errors`
298
- );
299
- if (result.errors.length > 0) {
300
- console.log(result);
301
- }
302
- });
303
- }
304
- },
281
+ rebuildPlugin_default("pure"),
305
282
  ...(config.nodePlugins || []).map((p) => p(register2, entryPoints)) || []
306
283
  ]
307
284
  };
@@ -475,10 +452,10 @@ import(process.cwd() + "/testeranto.config.ts").then(async (module) => {
475
452
  }
476
453
  };
477
454
  console.log(`testeranto/reports/${testName}`);
478
- if (!fs2.existsSync(`testeranto/reports/${testName}`)) {
479
- fs2.mkdirSync(`testeranto/reports/${testName}`);
455
+ if (!fs3.existsSync(`testeranto/reports/${testName}`)) {
456
+ fs3.mkdirSync(`testeranto/reports/${testName}`);
480
457
  }
481
- fs2.writeFileSync(
458
+ fs3.writeFileSync(
482
459
  `${process.cwd()}/testeranto/reports/${testName}/index.html`,
483
460
  `
484
461
  <!DOCTYPE html>
@@ -505,11 +482,11 @@ import(process.cwd() + "/testeranto.config.ts").then(async (module) => {
505
482
  </html>
506
483
  `
507
484
  );
508
- fs2.writeFileSync(
485
+ fs3.writeFileSync(
509
486
  `testeranto/reports/${testName}/config.json`,
510
487
  JSON.stringify(config, null, 2)
511
488
  );
512
- fs2.writeFileSync(
489
+ fs3.writeFileSync(
513
490
  `${process.cwd()}/testeranto/index.html`,
514
491
  `
515
492
  <!DOCTYPE html>
@@ -521,13 +498,14 @@ import(process.cwd() + "/testeranto.config.ts").then(async (module) => {
521
498
  <title>${pckge.name} - testeranto</title>
522
499
  <meta name="viewport" content="width=device-width, initial-scale=1" />
523
500
  <meta name="author" content="" />
501
+ <base href="https://adamwong246.github.io/spacetrash_v8" target="_blank">
524
502
 
525
503
  <script type="application/json" id="bigConfig">
526
504
  ${JSON.stringify(Object.keys(bigConfig.projects))}
527
505
  </script>
528
506
 
529
- <link rel="stylesheet" href="Project.css" />
530
- <script type="module" src="Project.js"></script>
507
+ <link rel="stylesheet" href="/reports/Project.css" />
508
+ <script type="module" src="/reports/Project.js"></script>
531
509
 
532
510
  </head>
533
511
 
@@ -553,8 +531,8 @@ import(process.cwd() + "/testeranto.config.ts").then(async (module) => {
553
531
  )}/${sourceFileNameMinusJs}.html`
554
532
  );
555
533
  const jsfilePath = `./${sourceFileNameMinusJs}.mjs`;
556
- return fs2.promises.mkdir(path4.dirname(htmlFilePath), { recursive: true }).then(
557
- (x2) => fs2.writeFileSync(
534
+ return fs3.promises.mkdir(path4.dirname(htmlFilePath), { recursive: true }).then(
535
+ (x2) => fs3.writeFileSync(
558
536
  htmlFilePath,
559
537
  web_html_default(jsfilePath, htmlFilePath)
560
538
  )
@@ -583,8 +561,8 @@ import(process.cwd() + "/testeranto.config.ts").then(async (module) => {
583
561
  console.log(runtime, keys);
584
562
  keys.forEach(async (k) => {
585
563
  const folder = `testeranto/reports/${testName}/${k.split(".").slice(0, -1).join(".")}/${runtime}`;
586
- await fs2.mkdirSync(folder, { recursive: true });
587
- fs2.writeFileSync(
564
+ await fs3.mkdirSync(folder, { recursive: true });
565
+ fs3.writeFileSync(
588
566
  `${folder}/index.html`,
589
567
  `
590
568
  <!DOCTYPE html>
@@ -623,7 +601,7 @@ import(process.cwd() + "/testeranto.config.ts").then(async (module) => {
623
601
  ep.split(".").slice(0, -1).join("."),
624
602
  runtime
625
603
  );
626
- fs2.mkdirSync(fp, { recursive: true });
604
+ fs3.mkdirSync(fp, { recursive: true });
627
605
  });
628
606
  }
629
607
  );
@@ -2,7 +2,20 @@ import { createRequire } from 'module';const require = createRequire(import.meta
2
2
 
3
3
  // src/esbuildConfigs/eslint-formatter-testeranto.ts
4
4
  function eslint_formatter_testeranto_default(results) {
5
- return JSON.stringify(results, null, 2);
5
+ return results.filter((r) => r.messages.length).map((r) => {
6
+ const path = r.filePath.replace(process.cwd() + "/", "");
7
+ return [
8
+ path,
9
+ ...r.messages.map(
10
+ (m) => [
11
+ `${m.line}:${m.column} ${m.message} (${m.ruleId || ""})`,
12
+ ...m.suggestions?.map(
13
+ (s) => `- ${s.message}${s.fix ? " (fix)" : ""}`
14
+ ) || []
15
+ ].join("\n")
16
+ )
17
+ ].join("\n");
18
+ }).join("\n\n");
6
19
  }
7
20
  export {
8
21
  eslint_formatter_testeranto_default as default
@@ -464,8 +464,8 @@ var PM_WithEslintAndTsc = class extends PM_Base {
464
464
  "testeranto",
465
465
  "reports",
466
466
  this.name,
467
- platform,
468
467
  entryPoint.split(".").slice(0, -1).join("."),
468
+ platform,
469
469
  `tests.json`
470
470
  );
471
471
  const featuresPath = path3.join(
@@ -476,6 +476,38 @@ var PM_WithEslintAndTsc = class extends PM_Base {
476
476
  entryPoint.split(".").slice(0, -1).join("."),
477
477
  `featurePrompt.txt`
478
478
  );
479
+ const logPath = path3.join(
480
+ "testeranto",
481
+ "reports",
482
+ this.name,
483
+ entryPoint.split(".").slice(0, -1).join("."),
484
+ platform,
485
+ `console_log.txt`
486
+ );
487
+ const lintPath = path3.join(
488
+ "testeranto",
489
+ "reports",
490
+ this.name,
491
+ entryPoint.split(".").slice(0, -1).join("."),
492
+ platform,
493
+ `lint_errors.json`
494
+ );
495
+ const typePath = path3.join(
496
+ "testeranto",
497
+ "reports",
498
+ this.name,
499
+ entryPoint.split(".").slice(0, -1).join("."),
500
+ platform,
501
+ `type_errors.txt`
502
+ );
503
+ const messagePath = path3.join(
504
+ "testeranto",
505
+ "reports",
506
+ this.name,
507
+ entryPoint.split(".").slice(0, -1).join("."),
508
+ platform,
509
+ `message`
510
+ );
479
511
  fs2.writeFileSync(
480
512
  promptPath,
481
513
  `
@@ -483,22 +515,15 @@ ${addableFiles.map((x) => {
483
515
  return `/add ${x}`;
484
516
  }).join("\n")}
485
517
 
486
- /read ${lintPather(entryPoint, platform, this.name)}
487
- /read ${tscPather(entryPoint, platform, this.name)}
488
518
  /read ${testPaths}
489
-
490
- /load ${featuresPath}
491
-
492
- /code Fix the failing tests described in ${testPaths}. Correct any type signature errors described in the files ${tscPather(
493
- entryPoint,
494
- platform,
495
- this.name
496
- )}. Implement any method which throws "Function not implemented. Resolve the lint errors described in ${lintPather(
497
- entryPoint,
498
- platform,
499
- this.name
500
- )}"
501
- `
519
+ /read ${logPath}
520
+ /read ${typePath}
521
+ /read ${lintPath}
522
+ `
523
+ );
524
+ fs2.writeFileSync(
525
+ messagePath,
526
+ `Fix the failing tests described in ${testPaths} and ${logPath}. DO NOT refactor beyond what is necessary. Always prefer minimal changes, focusing mostly on keeping the BDD tests passing`
502
527
  );
503
528
  this.summary[entryPoint].prompt = `aider --model deepseek/deepseek-chat --load testeranto/${this.name}/reports/${platform}/${entryPoint.split(".").slice(0, -1).join(".")}/prompt.txt`;
504
529
  this.checkForShutdown();
@@ -829,9 +854,14 @@ var PM_Main = class extends PM_WithEslintAndTsc {
829
854
  const builtfile = dest;
830
855
  let haltReturns = false;
831
856
  const ipcfile = "/tmp/tpipe_" + Math.random();
832
- const child = spawn("node", [builtfile, testResources, ipcfile], {
833
- stdio: ["pipe", "pipe", "pipe", "ipc"]
834
- });
857
+ const child = spawn(
858
+ "node",
859
+ // "node --inspect-brk ",
860
+ [builtfile, testResources, ipcfile],
861
+ {
862
+ stdio: ["pipe", "pipe", "pipe", "ipc"]
863
+ }
864
+ );
835
865
  let buffer = new Buffer("");
836
866
  const server = net.createServer((socket) => {
837
867
  const queue = new Queue();
@@ -882,7 +912,6 @@ var PM_Main = class extends PM_WithEslintAndTsc {
882
912
  oStream.write(`stdout > ${data}`);
883
913
  });
884
914
  child.on("close", (code) => {
885
- console.log("close");
886
915
  oStream.close();
887
916
  server.close();
888
917
  if (code === null) {
@@ -898,14 +927,12 @@ var PM_Main = class extends PM_WithEslintAndTsc {
898
927
  haltReturns = true;
899
928
  });
900
929
  child.on("exit", (code) => {
901
- console.log("exit");
902
930
  haltReturns = true;
903
931
  for (let i = 0; i <= portsToUse.length; i++) {
904
932
  if (portsToUse[i]) {
905
933
  this.ports[portsToUse[i]] = true;
906
934
  }
907
935
  }
908
- console.log("exitthis.ports", this.ports);
909
936
  });
910
937
  child.on("error", (e) => {
911
938
  console.log("error");
@@ -940,10 +967,6 @@ var PM_Main = class extends PM_WithEslintAndTsc {
940
967
  if (!files2[src]) {
941
968
  files2[src] = /* @__PURE__ */ new Set();
942
969
  }
943
- fs3.writeFileSync(
944
- destFolder + "/manifest.json",
945
- JSON.stringify(Array.from(files2[src]))
946
- );
947
970
  delete files2[src];
948
971
  Promise.all(screenshots2[src] || []).then(() => {
949
972
  delete screenshots2[src];
@@ -1234,10 +1257,6 @@ var PM_Main = class extends PM_WithEslintAndTsc {
1234
1257
  if (!files2[src]) {
1235
1258
  files2[src] = /* @__PURE__ */ new Set();
1236
1259
  }
1237
- fs3.writeFileSync(
1238
- destFolder + "/manifest.json",
1239
- JSON.stringify(Array.from(files2[src]))
1240
- );
1241
1260
  delete files2[src];
1242
1261
  Promise.all(screenshots2[src] || []).then(() => {
1243
1262
  delete screenshots2[src];
@@ -1433,7 +1452,7 @@ var PM_Main = class extends PM_WithEslintAndTsc {
1433
1452
  slowMo: 1,
1434
1453
  waitForInitialPage: false,
1435
1454
  executablePath,
1436
- headless: false,
1455
+ headless: true,
1437
1456
  dumpio: false,
1438
1457
  devtools: false,
1439
1458
  args: [
@@ -0,0 +1,51 @@
1
+ import { ITTestResourceConfiguration } from "./lib";
2
+ import { IPM, ITestCheckCallback } from "./lib/types";
3
+ import { GivenSpecification, WhenSpecification, ThenSpecification, TestWhenImplementation, Modify, TestSuiteImplementation, TestGivenImplementation, TestThenImplementation, TestCheckImplementation, TestSuiteShape, TestGivenShape, TestWhenShape, TestThenShape, TestCheckShape, SuiteSpecification } from "./Types";
4
+ export type ITestInterface<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>> = {
5
+ assertThis: (x: I["then"]) => any;
6
+ andWhen: (store: I["istore"], whenCB: I["when"], testResource: ITTestResourceConfiguration, pm: IPM) => Promise<I["istore"]>;
7
+ butThen: (store: I["istore"], thenCB: I["then"], testResource: ITTestResourceConfiguration, pm: IPM) => Promise<I["iselection"]>;
8
+ afterAll: (store: I["istore"], pm: IPM) => any;
9
+ afterEach: (store: I["istore"], key: string, pm: IPM) => Promise<unknown>;
10
+ beforeAll: (input: I["iinput"], testResource: ITTestResourceConfiguration, pm: IPM) => Promise<I["isubject"]>;
11
+ beforeEach: (subject: I["isubject"], initializer: (c?: any) => I["given"], testResource: ITTestResourceConfiguration, initialValues: any, pm: IPM) => Promise<I["istore"]>;
12
+ };
13
+ export type ITestSpecification<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<TestSuiteShape, TestGivenShape, TestWhenShape, TestThenShape, TestCheckShape>> = (Suite: SuiteSpecification<I, O>, Given: GivenSpecification<I, O>, When: WhenSpecification<I, O>, Then: ThenSpecification<I, O>, Check: ITestCheckCallback<I, O>) => any[];
14
+ export type ITestImplementation<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out<TestSuiteShape, TestGivenShape, TestWhenShape, TestThenShape, TestCheckShape>, modifier = {
15
+ whens: TestWhenImplementation<I, O>;
16
+ }> = Modify<{
17
+ suites: TestSuiteImplementation<O>;
18
+ givens: TestGivenImplementation<I, O>;
19
+ whens: TestWhenImplementation<I, O>;
20
+ thens: TestThenImplementation<I, O>;
21
+ checks: TestCheckImplementation<I, O>;
22
+ }, modifier>;
23
+ export type Ibdd_out<ISuites extends TestSuiteShape = TestSuiteShape, IGivens extends TestGivenShape = TestGivenShape, IWhens extends TestWhenShape = TestWhenShape, IThens extends TestThenShape = TestThenShape, IChecks extends TestCheckShape = TestCheckShape> = {
24
+ suites: ISuites;
25
+ givens: IGivens;
26
+ whens: IWhens;
27
+ thens: IThens;
28
+ checks: IChecks;
29
+ };
30
+ export type Ibdd_in<IInput, // Type of initial test input
31
+ ISubject, // Type of object being tested
32
+ IStore, // Type for storing test state between steps
33
+ ISelection, // Type for selecting state for assertions
34
+ IGiven, // Type for Given step functions
35
+ IWhen, // Type for When step functions
36
+ IThen> = {
37
+ /** Initial input required to start tests */
38
+ iinput: IInput;
39
+ /** The subject being tested (class, function, etc) */
40
+ isubject: ISubject;
41
+ /** Complete test state storage */
42
+ istore: IStore;
43
+ /** Selected portion of state for assertions */
44
+ iselection: ISelection;
45
+ /** Function type for Given steps */
46
+ given: IGiven;
47
+ /** Function type for When steps */
48
+ when: IWhen;
49
+ /** Function type for Then steps */
50
+ then: IThen;
51
+ };
@@ -1,7 +1,7 @@
1
1
  import Testeranto from "./lib/core.js";
2
2
  import { ITTestResourceRequest } from "./lib/index.js";
3
- import type { INodeTestInterface, IT, ITestImplementation, ITestInterface, ITestSpecification, OT } from "./Types.js";
4
- export declare class NodeTesteranto<I extends IT, O extends OT, M> extends Testeranto<I, O, M> {
3
+ import { ITestSpecification, ITestImplementation, ITestInterface, Ibdd_in, Ibdd_out } from "./CoreTypes.js";
4
+ export declare class NodeTesteranto<I extends Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>, O extends Ibdd_out, M> extends Testeranto<I, O, M> {
5
5
  constructor(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M>, testResourceRequirement: ITTestResourceRequest, testInterface: Partial<ITestInterface<I>>);
6
6
  receiveTestResourceConfig(partialTestResource: string): Promise<import("./lib/index.js").IFinalResults>;
7
7
  }
@@ -1,20 +1,2 @@
1
- import { PM_Node_Sidecar } from "../nodeSidecar";
2
- import { Ibdd_out, Ibdd_in } from "../../Types";
3
- type I = Ibdd_in<PM_Node_Sidecar, PM_Node_Sidecar, unknown, unknown, unknown, unknown, unknown>;
4
- type O = Ibdd_out<{
5
- SidecarInitialized: [null];
6
- }, {
7
- SidecarReady: [];
8
- }, {
9
- SendTestMessage: [string];
10
- VerifyCleanup: [];
11
- }, {
12
- MessageReceived: [string];
13
- ListenersCleaned: [];
14
- }, {
15
- SidecarState: unknown;
16
- }>;
17
- declare const _default: Promise<import("../../lib/core").default<IT, O, {
18
- whens: import("../../Types").TestWhenImplementation<I, O>;
19
- }>>;
1
+ declare const _default: Promise<import("../../lib/core").default<IT, OT, any>>;
20
2
  export default _default;