testeranto 0.79.69 → 0.80.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 (236) hide show
  1. package/.eslintrc.js +5 -2
  2. package/README.md +7 -108
  3. package/build-tests.ts +16 -0
  4. package/dist/common/build-tests.js +38 -0
  5. package/dist/common/init-docs.js +8 -0
  6. package/dist/common/run-tests.js +34 -0
  7. package/dist/common/src/Aider.js +96 -0
  8. package/dist/common/src/Init.js +10 -0
  9. package/dist/common/{PM → src/PM}/main.js +9 -3
  10. package/dist/common/{Puppeteer.js → src/Puppeteer.js} +8 -4
  11. package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/web.js +37 -38
  12. package/dist/common/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +5 -2
  13. package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -3
  14. package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +1 -1
  15. package/dist/common/{lib → src/lib}/abstractBase.js +41 -13
  16. package/dist/common/{lib → src/lib}/basebuilder.js +8 -0
  17. package/dist/common/testeranto.js +15 -0
  18. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  19. package/dist/module/build-tests.js +10 -0
  20. package/dist/module/init-docs.js +3 -0
  21. package/dist/module/run-tests.js +6 -0
  22. package/dist/module/src/Aider.js +89 -0
  23. package/dist/module/src/Init.js +5 -0
  24. package/dist/module/{PM → src/PM}/main.js +9 -3
  25. package/dist/module/{Puppeteer.js → src/Puppeteer.js} +8 -4
  26. package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/web.js +37 -38
  27. package/dist/module/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +5 -2
  28. package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +4 -2
  29. package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +1 -1
  30. package/dist/module/{lib → src/lib}/abstractBase.js +41 -13
  31. package/dist/module/{lib → src/lib}/basebuilder.js +8 -0
  32. package/dist/module/testeranto.js +13 -0
  33. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  34. package/dist/types/build-tests.d.ts +3 -0
  35. package/dist/types/init-docs.d.ts +2 -0
  36. package/dist/types/run-tests.d.ts +2 -0
  37. package/dist/types/src/Aider.d.ts +1 -0
  38. package/dist/types/{PM → src/PM}/index.d.ts +1 -1
  39. package/dist/types/{Types.d.ts → src/Types.d.ts} +3 -2
  40. package/dist/types/testeranto.d.ts +16 -0
  41. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  42. package/init-docs.ts +5 -0
  43. package/package.json +49 -20
  44. package/run-tests.ts +9 -0
  45. package/src/Aider.ts +125 -0
  46. package/src/Init.ts +0 -31
  47. package/src/PM/index.ts +1 -1
  48. package/src/PM/main.ts +11 -5
  49. package/src/Puppeteer.ts +11 -4
  50. package/src/SubPackages/react-dom/jsx/web.ts +46 -49
  51. package/src/Types.ts +3 -1
  52. package/src/esbuildConfigs/inputFilesPlugin.ts +32 -30
  53. package/src/esbuildConfigs/node.ts +2 -2
  54. package/src/esbuildConfigs/web.ts +1 -1
  55. package/src/lib/abstractBase.ts +42 -15
  56. package/src/lib/basebuilder.ts +9 -0
  57. package/testeranto.ts +13 -0
  58. package/tsconfig.common.json +12 -4
  59. package/tsconfig.json +9 -2
  60. package/tsconfig.module.json +2 -2
  61. package/tsconfig.types.json +1 -1
  62. package/Report.Dockerfile +0 -44
  63. package/dist/common/Features.js +0 -51
  64. package/dist/common/Init.js +0 -30
  65. package/dist/common/Reporter.js +0 -112
  66. package/dist/common/Scheduler.js +0 -1
  67. package/dist/common/TaskManBackEnd.js +0 -167
  68. package/dist/common/mongooseSchemas.js +0 -56
  69. package/dist/common/preload.js +0 -15
  70. package/dist/common/report.html.js +0 -31
  71. package/dist/module/ExampleTab.js +0 -112
  72. package/dist/module/Features.js +0 -41
  73. package/dist/module/Init.js +0 -25
  74. package/dist/module/Reporter.js +0 -107
  75. package/dist/module/Scheduler.js +0 -1
  76. package/dist/module/TaskManBackEnd.js +0 -162
  77. package/dist/module/TaskManFrontEnd.js +0 -605
  78. package/dist/module/mongooseSchemas.js +0 -50
  79. package/dist/module/preload.js +0 -15
  80. package/dist/module/report.html.js +0 -29
  81. package/dist/prebuild/TaskManBackEnd.mjs +0 -170
  82. package/dist/prebuild/TaskManFrontEnd.css +0 -12301
  83. package/dist/prebuild/TaskManFrontEnd.js +0 -81262
  84. package/dist/types/Features.d.ts +0 -35
  85. package/dist/types/Reporter.d.ts +0 -1
  86. package/dist/types/Scheduler.d.ts +0 -0
  87. package/dist/types/TaskManBackEnd.d.ts +0 -3
  88. package/dist/types/mongooseSchemas.d.ts +0 -124
  89. package/dist/types/preload.d.ts +0 -0
  90. package/dist/types/report.html.d.ts +0 -2
  91. package/src/ExampleTab.tsx +0 -219
  92. package/src/Features.ts +0 -64
  93. package/src/Reporter.ts +0 -126
  94. package/src/Scheduler.ts +0 -0
  95. package/src/TaskManBackEnd.ts +0 -226
  96. package/src/TaskManFrontEnd.tsx +0 -1254
  97. package/src/mongooseSchemas.ts +0 -105
  98. package/src/preload.ts +0 -17
  99. package/src/report.html.ts +0 -29
  100. package/tests/Rectangle.test.ts +0 -189
  101. package/trash/TaskMan.Dockerfile +0 -23
  102. package/trash/TaskMan1.Dockerfile +0 -43
  103. package/trash/devBot.dockerfile +0 -12
  104. package/trash/docker-compose-dev.yml +0 -9
  105. package/trash/docker-compose-prod.yml +0 -18
  106. package/trash/electronBuild.ts +0 -32
  107. /package/dist/common/{Node.js → src/Node.js} +0 -0
  108. /package/dist/common/{PM → src/PM}/index.js +0 -0
  109. /package/dist/common/{PM → src/PM}/node.js +0 -0
  110. /package/dist/common/{PM → src/PM}/web.js +0 -0
  111. /package/dist/common/{Project.js → src/Project.js} +0 -0
  112. /package/dist/common/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
  113. /package/dist/common/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
  114. /package/dist/common/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
  115. /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
  116. /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
  117. /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
  118. /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
  119. /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/web.js +0 -0
  120. /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
  121. /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
  122. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
  123. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/index.js +0 -0
  124. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
  125. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
  126. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
  127. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
  128. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
  129. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
  130. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
  131. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
  132. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
  133. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
  134. /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  135. /package/dist/common/{Types.js → src/Types.js} +0 -0
  136. /package/dist/common/{Web.js → src/Web.js} +0 -0
  137. /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
  138. /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
  139. /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/report.js +0 -0
  140. /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
  141. /package/dist/common/{lib → src/lib}/classBuilder.js +0 -0
  142. /package/dist/common/{lib → src/lib}/core.js +0 -0
  143. /package/dist/common/{lib → src/lib}/index.js +0 -0
  144. /package/dist/common/{lib → src/lib}/types.js +0 -0
  145. /package/dist/common/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
  146. /package/dist/common/{utils.js → src/utils.js} +0 -0
  147. /package/dist/common/{web.html.js → src/web.html.js} +0 -0
  148. /package/dist/module/{Node.js → src/Node.js} +0 -0
  149. /package/dist/module/{PM → src/PM}/index.js +0 -0
  150. /package/dist/module/{PM → src/PM}/node.js +0 -0
  151. /package/dist/module/{PM → src/PM}/web.js +0 -0
  152. /package/dist/module/{Project.js → src/Project.js} +0 -0
  153. /package/dist/module/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
  154. /package/dist/module/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
  155. /package/dist/module/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
  156. /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
  157. /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
  158. /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
  159. /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
  160. /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/web.js +0 -0
  161. /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
  162. /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
  163. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
  164. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/index.js +0 -0
  165. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
  166. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
  167. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
  168. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
  169. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
  170. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
  171. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
  172. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
  173. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
  174. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
  175. /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
  176. /package/dist/module/{Types.js → src/Types.js} +0 -0
  177. /package/dist/module/{Web.js → src/Web.js} +0 -0
  178. /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
  179. /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
  180. /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/report.js +0 -0
  181. /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
  182. /package/dist/module/{lib → src/lib}/classBuilder.js +0 -0
  183. /package/dist/module/{lib → src/lib}/core.js +0 -0
  184. /package/dist/module/{lib → src/lib}/index.js +0 -0
  185. /package/dist/module/{lib → src/lib}/types.js +0 -0
  186. /package/dist/module/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
  187. /package/dist/module/{utils.js → src/utils.js} +0 -0
  188. /package/dist/module/{web.html.js → src/web.html.js} +0 -0
  189. /package/dist/types/{Init.d.ts → src/Init.d.ts} +0 -0
  190. /package/dist/types/{Node.d.ts → src/Node.d.ts} +0 -0
  191. /package/dist/types/{PM → src/PM}/main.d.ts +0 -0
  192. /package/dist/types/{PM → src/PM}/node.d.ts +0 -0
  193. /package/dist/types/{PM → src/PM}/web.d.ts +0 -0
  194. /package/dist/types/{Project.d.ts → src/Project.d.ts} +0 -0
  195. /package/dist/types/{Puppeteer.d.ts → src/Puppeteer.d.ts} +0 -0
  196. /package/dist/types/{SubPackages → src/SubPackages}/puppeteer.d.ts +0 -0
  197. /package/dist/types/{SubPackages → src/SubPackages}/react/component/node.d.ts +0 -0
  198. /package/dist/types/{SubPackages → src/SubPackages}/react/component/web.d.ts +0 -0
  199. /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/index.d.ts +0 -0
  200. /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/node.d.ts +0 -0
  201. /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/web.d.ts +0 -0
  202. /package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/node.d.ts +0 -0
  203. /package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/web.d.ts +0 -0
  204. /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
  205. /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/node.d.ts +0 -0
  206. /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/web.d.ts +0 -0
  207. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.d.ts +0 -0
  208. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/index.d.ts +0 -0
  209. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.d.ts +0 -0
  210. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/node.d.ts +0 -0
  211. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/web.d.ts +0 -0
  212. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +0 -0
  213. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +0 -0
  214. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.d.ts +0 -0
  215. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.d.ts +0 -0
  216. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.d.ts +0 -0
  217. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
  218. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.d.ts +0 -0
  219. /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.d.ts +0 -0
  220. /package/dist/types/{Web.d.ts → src/Web.d.ts} +0 -0
  221. /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/features.d.ts +0 -0
  222. /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/index.d.ts +0 -0
  223. /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.d.ts +0 -0
  224. /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/node.d.ts +0 -0
  225. /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/report.d.ts +0 -0
  226. /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/tests.d.ts +0 -0
  227. /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/web.d.ts +0 -0
  228. /package/dist/types/{lib → src/lib}/abstractBase.d.ts +0 -0
  229. /package/dist/types/{lib → src/lib}/basebuilder.d.ts +0 -0
  230. /package/dist/types/{lib → src/lib}/classBuilder.d.ts +0 -0
  231. /package/dist/types/{lib → src/lib}/core.d.ts +0 -0
  232. /package/dist/types/{lib → src/lib}/index.d.ts +0 -0
  233. /package/dist/types/{lib → src/lib}/types.d.ts +0 -0
  234. /package/dist/types/{puppeteerConfiger.d.ts → src/puppeteerConfiger.d.ts} +0 -0
  235. /package/dist/types/{utils.d.ts → src/utils.d.ts} +0 -0
  236. /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
package/init-docs.ts ADDED
@@ -0,0 +1,5 @@
1
+ import Init from "./src/Init.js";
2
+
3
+ import Project from "./testeranto.js";
4
+
5
+ export default Init(Project as any);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "testeranto",
3
3
  "description": "teeny tiny tightly-typed typescript tests",
4
- "version": "0.79.69",
4
+ "version": "0.80.0",
5
5
  "engines": {
6
6
  "node": "18.18.0"
7
7
  },
@@ -59,15 +59,15 @@
59
59
  },
60
60
  "./src/SubPackages/react-test-renderer/jsx/index.js": {
61
61
  "import": "./dist/module/src/SubPackages/react-test-renderer/jsx/index.js",
62
- "require": "./dist/common/SubPackages/react-test-renderer/jsx/index.js"
62
+ "require": "./dist/common/src/SubPackages/react-test-renderer/jsx/index.js"
63
63
  },
64
64
  "./src/SubPackages/react-test-renderer/jsx/web.js": {
65
- "import": "./dist/module/SubPackages/react-test-renderer/jsx/web.js",
66
- "require": "./dist/common/SubPackages/react-test-renderer/jsx/web.js"
65
+ "import": "./dist/module/src/SubPackages/react-test-renderer/jsx/web.js",
66
+ "require": "./dist/common/src/SubPackages/react-test-renderer/jsx/web.js"
67
67
  },
68
68
  "./src/SubPackages/react-test-renderer/jsx/node.js": {
69
- "import": "./dist/module/SubPackages/react-test-renderer/jsx/node.js",
70
- "require": "./dist/common/SubPackages/react-test-renderer/jsx/node.js"
69
+ "import": "./dist/module/src/SubPackages/react-test-renderer/jsx/node.js",
70
+ "require": "./dist/common/src/SubPackages/react-test-renderer/jsx/node.js"
71
71
  },
72
72
  "./src/SubPackages/react-test-renderer/jsx-promised/index": {
73
73
  "import": "./dist/module/SubPackages/react-test-renderer/jsx-promised/index.js",
@@ -121,9 +121,13 @@
121
121
  "import": "./dist/module/Features.js",
122
122
  "require": "./dist/common/Features.js"
123
123
  },
124
+ "./src/prompt": {
125
+ "import": "./dist/module/src/prompt.js",
126
+ "require": "./dist/module/src/prompt.js"
127
+ },
124
128
  "./src/Project": {
125
- "import": "./dist/module/Project.js",
126
- "require": "./dist/common/Project.js"
129
+ "import": "./dist/module/src/Project.js",
130
+ "require": "./dist/module/src/Project.js"
127
131
  },
128
132
  "./src/Web": {
129
133
  "import": "./src/Web.ts",
@@ -133,17 +137,21 @@
133
137
  "import": "./src/Node.ts",
134
138
  "require": "./src/Node.ts"
135
139
  },
140
+ "./src/Aider": {
141
+ "import": "./dist/module/src/Aider.js",
142
+ "require": "./dist/common/src/Aider.js"
143
+ },
136
144
  "./src/Puppeteer": {
137
- "import": "./dist/module/Puppeteer.js",
138
- "require": "./dist/common/Puppeteer.js"
145
+ "import": "./dist/module/src/Puppeteer.js",
146
+ "require": "./dist/common/src/Puppeteer.js"
139
147
  },
140
- "./src/TaskManBackEnd": {
141
- "import": "./dist/module/TaskManBackEnd.js",
142
- "require": "./dist/common/TaskManBackEnd.js"
148
+ "./src/TaskMan": {
149
+ "import": "./dist/module/TaskMan.js",
150
+ "require": "./dist/common/TaskMan.js"
143
151
  },
144
152
  "./src/Init": {
145
- "import": "./dist/module/Init.js",
146
- "require": "./dist/common/Init.js"
153
+ "import": "./dist/module/src/Init.js",
154
+ "require": "./dist/common/src/Init.js"
147
155
  },
148
156
  "./src/preload": {
149
157
  "import": "./dist/module/preload.js",
@@ -183,11 +191,14 @@
183
191
  "scripts": {
184
192
  "commit": "yarn build; git add --all && git commit -m 'stash'",
185
193
  "doit": "rm -rf node_modules && yarn install && yarn build",
186
- "build": "sh prebuild.sh; cp ./src/cjs-shim.js ./dist/cjs-shim.js; tsc -p tsconfig.module.json; tsc -p tsconfig.common.json; tsc -p tsconfig.types.json; yarn esbuild src/TaskManFrontEnd.tsx --outfile=dist/prebuild/TaskManFrontEnd.js --bundle; yarn esbuild src/TaskManBackEnd.ts --outfile=dist/prebuild/TaskManBackEnd.mjs --bundle --platform=node --format=esm --packages=external; sh postBuild.sh; ",
187
- "dev": "cp ./src/cjs-shim.js ./dist/cjs-shim.js && tsc -p tsconfig.module.json --watch & tsc -p tsconfig.common.json --watch & tsc -p tsconfig.types.json --watch & yarn esbuild src/TaskManFrontEnd.tsx --outfile=dist/prebuild/TaskManFrontEnd.js --bundle --watch & yarn esbuild src/TaskManBackEnd.ts --platform=node --outfile=dist/prebuild/TaskManBackEnd.mjs --bundle --watch --format=esm --packages=external",
194
+ "build": "sh prebuild.sh; cp ./src/cjs-shim.js ./dist/cjs-shim.js; tsc -p tsconfig.module.json; tsc -p tsconfig.common.json; tsc -p tsconfig.types.json; sh postBuild.sh",
195
+ "dev": "cp ./src/cjs-shim.js ./dist/cjs-shim.js && tsc -p tsconfig.module.json --watch & tsc -p tsconfig.common.json --watch & tsc -p tsconfig.types.json --watch ",
188
196
  "build-module": "tsc -p tsconfig.module.json",
189
197
  "build-common": "tsc -p tsconfig.common.json",
190
- "build-types": "tsc -p tsconfig.types.json"
198
+ "build-types": "tsc -p tsconfig.types.json",
199
+ "build-tests": "ts-node-esm ./project.ts",
200
+ "run-tests": "ts-node-esm ./run-tests.ts",
201
+ "init-docs": "ts-node-esm init-docs.ts"
191
202
  },
192
203
  "peerDependencies": {
193
204
  "@hello-pangea/dnd": ">=16",
@@ -217,17 +228,28 @@
217
228
  "dependencies": {
218
229
  "@asseinfo/react-kanban": "^2.2.0",
219
230
  "@caldwell619/react-kanban": "^0.0.12",
231
+ "@gitgraph/core": "^1.5.0",
232
+ "@gitgraph/js": "^1.4.0",
233
+ "@gitgraph/react": "^1.6.0",
220
234
  "@hello-pangea/dnd": "^18.0.1",
235
+ "@octokit/types": "^13.8.0",
236
+ "@types/express": "^5.0.0",
237
+ "@types/express-session": "^1.18.1",
238
+ "@types/uuid": "^10.0.0",
221
239
  "@xyflow/react": "^12.4.3",
240
+ "@zodform/core": "^0.2.0",
222
241
  "babel-loader": "^8.2.5",
223
242
  "bootstrap": "^5.2.3",
243
+ "chai": "^5.2.0",
224
244
  "dot-prop": "^9.0.0",
225
245
  "esbuild": "0.17.5",
226
246
  "esbuild-plugin-external-package": "^1.0.0",
227
247
  "esbuild-plugin-import-map": "^2.1.0",
228
248
  "eslint": "^8.29.0",
229
249
  "eslint-plugin-react": "^7.31.11",
250
+ "eslint-plugin-react-hooks": "^5.1.0",
230
251
  "express": "^4.21.2",
252
+ "express-session": "^1.18.1",
231
253
  "fs-extra": "^11.2.0",
232
254
  "fs.promises.exists": "^1.1.4",
233
255
  "gantt-task-react": "^0.3.9",
@@ -237,14 +259,20 @@
237
259
  "graphology-types": "^0.24.5",
238
260
  "html": "^1.0.0",
239
261
  "ipc": "^0.0.1",
262
+ "iterm-tab": "^0.4.0",
240
263
  "jsonc": "^2.0.0",
241
264
  "mongodb": "^6.13.0",
242
265
  "mongoose": "^8.10.0",
243
266
  "mongoose-auto-number": "2.0.0",
244
267
  "mongoose-rest-query": "^0.1.29",
245
268
  "npm-watch": "^0.11.0",
269
+ "octokit": "^4.1.2",
270
+ "passport": "^0.7.0",
271
+ "passport-github2": "^0.1.12",
246
272
  "puppeteer-core": "^23.6.0",
247
273
  "react-bootstrap": "2.10.6",
274
+ "react-github-login": "^1.0.3",
275
+ "react-login-github": "^1.0.8",
248
276
  "react-router-dom": "6.29.0",
249
277
  "react-sigma": "^1.2.35",
250
278
  "react-test-renderer": "18.2.0",
@@ -252,6 +280,7 @@
252
280
  "selenium-webdriver": "4.27.0",
253
281
  "url": "^0.11.4",
254
282
  "uuid": "^10.0.0",
255
- "ws": "^8.16.0"
283
+ "ws": "^8.16.0",
284
+ "zod": "^3.24.2"
256
285
  }
257
- }
286
+ }
package/run-tests.ts ADDED
@@ -0,0 +1,9 @@
1
+ import process from "process";
2
+ process.chdir(__dirname);
3
+
4
+ import Puppeteer from "./src/Puppeteer.js";
5
+
6
+ console.log(process.argv);
7
+ const Project = await import(process.argv[2]);
8
+
9
+ export default Puppeteer(Project as any);
package/src/Aider.ts ADDED
@@ -0,0 +1,125 @@
1
+ import fs from "fs";
2
+ import { exec, spawn } from "child_process";
3
+ import { features } from "process";
4
+ // import { octokit } from "./src/DELETEME";
5
+ // const itermTab = require("iterm-tab");
6
+ import itermTab from "iterm-tab";
7
+
8
+ import { Octokit } from "octokit";
9
+
10
+ export const execCommand = async (command) => {
11
+ return new Promise<void>((resolve, reject) => {
12
+ const [cmd, ...args] = command.split(" ");
13
+ const childProcess = spawn(cmd, args);
14
+ childProcess.stdout.on("data", (data) => {
15
+ process.stdout.write(data.toString());
16
+ });
17
+ childProcess.stderr.on("data", (data) => {
18
+ process.stderr.write(data.toString());
19
+ });
20
+ childProcess.on("error", (error) => {
21
+ reject(error);
22
+ });
23
+ childProcess.on("exit", (code) => {
24
+ if (code === 0) {
25
+ resolve();
26
+ } else {
27
+ reject(new Error(`Command exited with code ${code}.`));
28
+ }
29
+ });
30
+ });
31
+ };
32
+
33
+ const key = process.argv[2];
34
+ console.log(key);
35
+ const exitcode = fs.readFileSync(`${key}/exitcode`).toString();
36
+
37
+ console.log("exitcode", exitcode);
38
+
39
+ // if (exitcode != "0") {
40
+ if (exitcode != "0") {
41
+ const inputFiles = JSON.parse(
42
+ fs.readFileSync(`${key}/inputFiles.json`).toString()
43
+ );
44
+
45
+ inputFiles.push(`${key}/tests.json`);
46
+
47
+ const features = await (
48
+ await Promise.all(
49
+ Array.from(
50
+ new Set(
51
+ JSON.parse(fs.readFileSync(`${key}/tests.json`).toString())
52
+ .givens.reduce((mm: any[], lm: { features: any[] }) => {
53
+ mm.push(
54
+ lm.features.reduce((mm2: any[], lm2: any) => {
55
+ mm2.push(lm2);
56
+ return mm2;
57
+ }, [])
58
+ );
59
+ return mm;
60
+ }, [])
61
+ .flat()
62
+ .flat()
63
+ )
64
+ ) as string[]
65
+ )
66
+ )
67
+ .reduce(async (mm, feature) => {
68
+ const req = await octokit.request(
69
+ `GET /repos/adamwong246/kokomobay-taskman/contents/Task/${feature}.json`,
70
+ {
71
+ owner: "adamwong246",
72
+ repo: "kokomoBay-taskman",
73
+ path: `Task/${feature}.json`,
74
+ headers: {
75
+ "X-GitHub-Api-Version": "2022-11-28",
76
+ },
77
+ }
78
+ );
79
+
80
+ const j = JSON.parse(atob(req.data.content));
81
+ (await mm).push([
82
+ feature,
83
+ JSON.stringify({
84
+ name: j.name,
85
+ body: j.body,
86
+ }),
87
+ ]);
88
+
89
+ return mm;
90
+ }, Promise.resolve<[string, string][]>([]))
91
+ .then((z) => {
92
+ const final = z.reduce((mm, [k, v], ndx) => {
93
+ mm[k] = v;
94
+ return mm;
95
+ }, {});
96
+
97
+ const as = JSON.stringify(final);
98
+
99
+ fs.writeFile(`./${key}/features.json`, as, () => {
100
+ inputFiles.push(`./${key}/features.json`);
101
+
102
+ const scriptCommand = `aider --model deepseek --api-key deepseek=${
103
+ process.env.DEEPSEEK_KEY
104
+ } --message "Fix the failing tests" ${inputFiles.join(" ")}`;
105
+
106
+ console.log("scriptCommand", scriptCommand);
107
+
108
+ execCommand(scriptCommand);
109
+ // itermTab(scriptCommand).then(() => console.log("yay"));
110
+
111
+ // const child = spawn("xterm -e", scriptCommand.split(" "), {
112
+ // detached: true,
113
+ // stdio: "ignore",
114
+ // });
115
+ // runCommandInITerm(scriptCommand);
116
+ });
117
+ //
118
+ });
119
+
120
+ // features.then((x) => {
121
+ // console.log("done", x);
122
+ // });
123
+ } else {
124
+ console.log("that test is not failing");
125
+ }
package/src/Init.ts CHANGED
@@ -17,35 +17,4 @@ export default async (partialConfig) => {
17
17
  2
18
18
  )
19
19
  );
20
-
21
- fs.copyFileSync(
22
- "./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js",
23
- "./docs/TaskManFrontEnd.js"
24
- );
25
- fs.copyFileSync(
26
- "./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css",
27
- "./docs/TaskManFrontEnd.css"
28
- );
29
-
30
- fs.writeFileSync(
31
- `${config.outdir}/index.html`,
32
- `<!DOCTYPE html>
33
- <html lang="en">
34
-
35
- <head>
36
- <meta name="description" content="Webpage description goes here" />
37
- <meta charset="utf-8" />
38
- <meta name="viewport" content="width=device-width, initial-scale=1" />
39
- <meta name="author" content="" />
40
-
41
- <title>TaskMan</title>
42
-
43
- <link rel="stylesheet" href="/docs/TaskManFrontEnd.css" />
44
- <script type="module" src="/docs/TaskManFrontEnd.js"></script>
45
- </head>
46
-
47
- <body><div id="root">react is loading</div></body>
48
-
49
- </html>`
50
- );
51
20
  };
package/src/PM/index.ts CHANGED
@@ -17,7 +17,7 @@ export abstract class PM {
17
17
  abstract testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise) => void);
18
18
  abstract createWriteStream(filepath: string): any;
19
19
  abstract writeFileSync(fp: string, contents: string);
20
- abstract mkdirSync();
20
+ abstract mkdirSync(a: string);
21
21
  abstract existsSync(fp: string): boolean;
22
22
  abstract write(accessObject: { uid: number }, contents: string): boolean;
23
23
  abstract end(accessObject: { uid: number }): boolean;
package/src/PM/main.ts CHANGED
@@ -163,7 +163,7 @@ export class PM_Main extends PM {
163
163
  }
164
164
 
165
165
  async startPuppeteer(options: any, destfolder: string): Promise<any> {
166
- this.browser = await puppeteer.launch(options);
166
+ this.browser = (await puppeteer.launch(options)) as any;
167
167
  return this.browser;
168
168
  }
169
169
 
@@ -706,7 +706,7 @@ export class PM_Main extends PM {
706
706
 
707
707
  Promise.all(screenshots[testName] || []).then(() => {
708
708
  delete screenshots[testName];
709
- page.close();
709
+ // page.close();
710
710
  });
711
711
 
712
712
  // globalThis["writeFileSync"](
@@ -740,9 +740,15 @@ export class PM_Main extends PM {
740
740
  );
741
741
  await page.goto(`file://${`${dest}.html`}`, {});
742
742
 
743
- page.evaluate(evaluation).finally(() => {
744
- console.log("evaluation failed.", dest);
745
- });
743
+ page
744
+ .evaluate(evaluation)
745
+ .catch((e) => {
746
+ console.log("evaluation failed.", dest);
747
+ console.log(e);
748
+ })
749
+ .finally(() => {
750
+ console.log("evaluation complete.", dest);
751
+ });
746
752
 
747
753
  return page;
748
754
  });
package/src/Puppeteer.ts CHANGED
@@ -4,6 +4,7 @@ import watch from "recursive-watch";
4
4
 
5
5
  import { PM_Main } from "./PM/main.js";
6
6
  import { destinationOfRuntime } from "./utils.js";
7
+ import { timeout } from "puppeteer-core/lib/esm/puppeteer/index.js";
7
8
 
8
9
  var mode: "DEV" | "PROD" = process.argv[2] === "-dev" ? "DEV" : "PROD";
9
10
 
@@ -14,7 +15,7 @@ const childProcesses: Record<string, "loaded" | "running" | "done"> = {};
14
15
  readline.emitKeypressEvents(process.stdin);
15
16
  if (process.stdin.isTTY) process.stdin.setRawMode(true);
16
17
 
17
- console.log("hello Puppeteer", process.env);
18
+ // console.log("hello Puppeteer", process.env);
18
19
 
19
20
  console.log("\n Puppeteer is running. Press 'q' to quit\n");
20
21
  process.stdin.on("keypress", (str, key) => {
@@ -45,17 +46,23 @@ export default async (partialConfig) => {
45
46
 
46
47
  await pm.startPuppeteer(
47
48
  {
49
+ // timeout: 1,
48
50
  waitForInitialPage: false,
49
- executablePath: process.env.CHROMIUM_PATH || "/opt/homebrew/bin/chromium", //"/opt/homebrew/bin/chromium",
51
+ executablePath:
52
+ // process.env.CHROMIUM_PATH || "/opt/homebrew/bin/chromium",
53
+ "/opt/homebrew/bin/chromium",
50
54
  headless: true,
51
- // dumpio: true,
55
+ dumpio: true,
56
+ // timeout: 0,
52
57
  args: [
58
+ // "--auto-open-devtools-for-tabs",
59
+
53
60
  "--disable-features=IsolateOrigins,site-per-process",
54
61
  "--disable-site-isolation-trials",
55
62
  "--allow-insecure-localhost",
56
63
  "--allow-file-access-from-files",
57
64
  "--allow-running-insecure-content",
58
- // "--auto-open-devtools-for-tabs",
65
+
59
66
  "--disable-dev-shm-usage",
60
67
  "--disable-extensions",
61
68
  "--disable-gpu",
@@ -14,29 +14,27 @@ import type { IInput, ISelection, IStore } from "./index";
14
14
 
15
15
  export type ISubject = HTMLElement;
16
16
 
17
+ const TesterantoComponent = ({
18
+ done,
19
+ innerComp,
20
+ }: {
21
+ done: (ref: React.MutableRefObject<any>) => any;
22
+ innerComp: IInput;
23
+ }) => {
24
+ const myContainer = useRef<any>(null);
25
+ useEffect(() => {
26
+ console.log("useEffect called!", myContainer.current);
27
+ done(myContainer.current);
28
+ }, []);
29
+
30
+ return React.createElement("div", { ref: myContainer }, innerComp());
31
+ };
32
+
17
33
  export default <ITestShape extends IBaseTest>(
18
34
  testImplementations: ITestImplementation<ITestShape>,
19
35
  testSpecifications: ITestSpecification<ITestShape>,
20
36
  testInput: IInput
21
37
  ) => {
22
- console.log("testInput", testInput);
23
- const TesterantoComponent = function ({
24
- done,
25
- innerComp,
26
- }: {
27
- done: (ref: React.MutableRefObject<any>) => any;
28
- innerComp: IInput;
29
- }) {
30
- const myContainer = useRef<any>(null);
31
- useEffect(() => {
32
- console.log("useEffect called!", myContainer.current);
33
- done(myContainer.current);
34
- }, []);
35
-
36
- // debugger;
37
- return React.createElement("div", { ref: myContainer }, innerComp());
38
- };
39
-
40
38
  const t = Testeranto<ITestShape>(
41
39
  testInput,
42
40
  testSpecifications,
@@ -45,6 +43,7 @@ export default <ITestShape extends IBaseTest>(
45
43
  beforeAll: async (reactElement, itr): Promise<any> => {
46
44
  return await new Promise((resolve, rej) => {
47
45
  const htmlElement = document.getElementById("root");
46
+
48
47
  if (htmlElement) {
49
48
  const domRoot = ReactDom.createRoot(htmlElement);
50
49
 
@@ -79,51 +78,49 @@ export default <ITestShape extends IBaseTest>(
79
78
  pm
80
79
  ): Promise<IStore> => {
81
80
  return new Promise((resolve, rej) => {
82
- createPortal(
83
- TesterantoComponent({
84
- innerComp: () =>
85
- testInput({
86
- port: 3003,
87
- address: "some-address",
88
- secretKey: "someSecretKey",
89
- abi: "foo",
90
- }),
91
- done: (reactElement: any) => {
92
- process.nextTick(() => {
93
- resolve(reactElement);
94
- });
95
- },
96
- }),
97
- subject.domRoot
98
- );
81
+ resolve(subject);
82
+ // const tc = TesterantoComponent({
83
+ // innerComp: () =>
84
+ // testInput({
85
+ // port: 3003,
86
+ // address: "some-address",
87
+ // secretKey: "someSecretKey",
88
+ // abi: "foo",
89
+ // }),
90
+ // done: (reactElement: any) => {
91
+ // console.log("mark9");
92
+ // resolve(reactElement);
93
+ // // process.nextTick(() => {
94
+ // // resolve(reactElement);
95
+ // // });
96
+ // },
97
+ // });
98
+ // console.log("mark9", tc);
99
+ // createPortal(tc, subject.domRoot);
99
100
  });
100
101
  },
101
- andWhen: function (s: IStore, whenCB): Promise<ISelection> {
102
+ andWhen: function (s: IStore, whenCB, tr, utils): Promise<ISelection> {
102
103
  return new Promise((resolve, rej) => {
103
- process.nextTick(() => {
104
- resolve(whenCB()(s));
105
- });
104
+ console.log("mark9", s, whenCB);
105
+ resolve(whenCB(s, utils));
106
+ // process.nextTick(() => {
107
+ // resolve(whenCB()(s));
108
+ // });
106
109
  });
107
110
  },
108
- butThen: async function (s: IStore): Promise<ISelection> {
111
+ butThen: async function (s: IStore, thenCB): Promise<ISelection> {
109
112
  return new Promise((resolve, rej) => {
110
- process.nextTick(() => {
111
- resolve(s);
112
- });
113
+ resolve(thenCB(s));
113
114
  });
114
115
  },
115
116
  afterEach: async function (store: IStore, ndx, artificer) {
116
117
  return new Promise((resolve, rej) => {
117
- process.nextTick(() => {
118
- resolve({});
119
- });
118
+ resolve({});
120
119
  });
121
120
  },
122
121
  afterAll: (store: IStore, artificer) => {
123
122
  return new Promise((resolve, rej) => {
124
- process.nextTick(() => {
125
- resolve({});
126
- });
123
+ resolve({});
127
124
  });
128
125
  },
129
126
  }
package/src/Types.ts CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  ITestInterface,
14
14
  IWebTestInterface,
15
15
  } from "./lib/types.js";
16
+ import { PM } from "./PM/index.js";
16
17
 
17
18
  export type IPartialInterface<
18
19
  I extends IBaseTest<
@@ -112,6 +113,7 @@ export type ITestSpecification<
112
113
  },
113
114
  Given: {
114
115
  [K in keyof ITestShape["givens"]]: (
116
+ features: string[],
115
117
  whens: BaseWhen<ITestShape>[],
116
118
  thens: BaseThen<ITestShape>[],
117
119
  ...xtrasB: ITestShape["givens"][K]
@@ -159,7 +161,7 @@ export type ITestImplementation<
159
161
  whens: {
160
162
  [K in keyof ITestShape["whens"]]: (
161
163
  ...Iw: ITestShape["whens"][K]
162
- ) => (zel: ITestShape["iselection"]) => ITestShape["when"];
164
+ ) => (zel: ITestShape["iselection"], utils: PM) => ITestShape["when"];
163
165
  };
164
166
  thens: {
165
167
  [K in keyof ITestShape["thens"]]: (
@@ -5,12 +5,15 @@ export default (
5
5
  platform: "web" | "node",
6
6
  entryPoints: Set<string> | string[]
7
7
  ) => {
8
+ console.log("mark3", platform);
9
+
8
10
  return {
9
11
  name: "metafileWriter",
10
12
  setup(build) {
11
13
  build.onEnd((result) => {
12
14
  if (result.errors.length === 0) {
13
15
  entryPoints.forEach((entryPoint) => {
16
+ console.log("mark1", entryPoint);
14
17
  const filePath = path.join(
15
18
  "./docs/",
16
19
  platform,
@@ -24,39 +27,38 @@ export default (
24
27
  fs.mkdirSync(dirName, { recursive: true });
25
28
  }
26
29
 
27
- fs.writeFileSync(
28
- filePath,
29
- JSON.stringify(
30
- Object.keys(
31
- Object.keys(result.metafile.outputs)
32
- .filter((s: string) => {
33
- if (!result.metafile.outputs[s].entryPoint) {
34
- return false;
35
- }
36
- return (
37
- path.resolve(result.metafile.outputs[s].entryPoint) ===
38
- path.resolve(entryPoint)
39
- );
40
- })
41
- .reduce((mm: string[], el) => {
42
- mm.push(result.metafile.outputs[el].inputs);
43
- return mm;
44
- }, [])[0]
45
- )
46
- .filter((f: string) => {
47
- const regex = /^src\/.*/g;
48
- const matches = f.match(regex);
49
- const passes = matches?.length === 1;
50
- return passes;
51
- })
52
- .filter((f: string) => {
53
- const regex = /.*\.test\..*/g;
54
- const matches = f.match(regex);
55
- const passes = matches?.length === 1;
56
- return !passes;
30
+ const jsonContent = JSON.stringify(
31
+ Object.keys(
32
+ Object.keys(result.metafile.outputs)
33
+ .filter((s: string) => {
34
+ if (!result.metafile.outputs[s].entryPoint) {
35
+ return false;
36
+ }
37
+ return (
38
+ path.resolve(result.metafile.outputs[s].entryPoint) ===
39
+ path.resolve(entryPoint)
40
+ );
57
41
  })
42
+ .reduce((mm: string[], el) => {
43
+ mm.push(result.metafile.outputs[el].inputs);
44
+ return mm;
45
+ }, [])[0]
58
46
  )
47
+ .filter((f: string) => {
48
+ const regex = /^src\/.*/g;
49
+ const matches = f.match(regex);
50
+ const passes = matches?.length === 1;
51
+ return passes;
52
+ })
53
+ .filter((f: string) => {
54
+ const regex = /.*\.test\..*/g;
55
+ const matches = f.match(regex);
56
+ const passes = matches?.length === 1;
57
+ return !passes;
58
+ })
59
59
  );
60
+
61
+ fs.writeFileSync(filePath, jsonContent);
60
62
  });
61
63
  }
62
64
  });