testeranto 0.114.1 → 0.125.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.
- package/.aider.chat.history.md +97001 -0
- package/.aider.conf.yml +5 -0
- package/.aider.input.history +9 -0
- package/.aider.tags.cache.v3/b7/e6/5be87b62aeaf2bc244ff41c1b61a.val +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/e3/e6/3501625caf5d5eb171f0d248462e.val +0 -0
- package/.aider.tags.cache.v3/ec/c0/161c249c35be853cc40cf11f9267.val +0 -0
- package/README.md +15 -1
- package/bundle.js +1 -1
- package/dist/common/src/Init.js +31 -0
- package/dist/common/src/Node.js +49 -0
- package/dist/common/src/PM/base.js +230 -0
- package/dist/common/src/PM/main.js +1026 -0
- package/dist/common/src/PM/node.js +161 -0
- package/dist/common/{PM/node.js → src/PM/pure.js} +27 -18
- package/dist/common/{PM → src/PM}/web.js +14 -47
- package/dist/common/{Node.js → src/Pure.js} +11 -9
- package/dist/common/{SubPackages/react/component/web.js → src/SubPackages/react/component/index.js} +5 -4
- package/dist/common/src/SubPackages/react/component/node.js +10 -0
- package/dist/common/src/SubPackages/react/component/pure.js +10 -0
- package/dist/common/{SubPackages/react/jsx → src/SubPackages/react/component}/web.js +2 -2
- package/dist/common/src/SubPackages/react/jsx/index.js +64 -0
- package/dist/common/src/SubPackages/react/jsx/pure.js +10 -0
- package/dist/common/src/SubPackages/react/jsx/web.js +10 -0
- package/dist/common/{SubPackages/react-dom/component/web.js → src/SubPackages/react-dom/component/dynamic.js} +8 -14
- package/dist/common/src/SubPackages/react-dom/component/node.js +10 -0
- package/dist/common/src/SubPackages/react-dom/component/pure.js +10 -0
- package/dist/common/src/SubPackages/react-dom/component/static.js +26 -0
- package/dist/common/src/SubPackages/react-dom/component/web.js +16 -0
- package/dist/common/src/SubPackages/react-dom/jsx/dynamic.js +31 -0
- package/dist/common/src/SubPackages/react-dom/jsx/node.js +10 -0
- package/dist/common/src/SubPackages/react-dom/jsx/pure.js +10 -0
- package/dist/common/src/SubPackages/react-dom/jsx/static.js +59 -0
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +16 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/index.js +15 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/pure.js +8 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/implementation.js +57 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/node.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/pure.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/component/test/web.js +10 -0
- package/dist/common/src/SubPackages/react-test-renderer/jsx/pure.js +10 -0
- package/dist/common/{Web.js → src/Web.js} +1 -4
- package/dist/common/src/build.js +223 -0
- package/dist/common/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -1
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +7 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +7 -4
- package/dist/common/src/esbuildConfigs/pure.js +41 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +8 -5
- package/dist/common/src/examples/react/component/index.js +33 -0
- package/dist/common/src/examples/react/component/test.js +36 -0
- package/dist/common/src/init-docs.js +9 -0
- package/dist/common/{lib → src/lib}/abstractBase.js +99 -95
- package/dist/common/{lib → src/lib}/basebuilder.js +24 -20
- package/dist/common/{lib → src/lib}/classBuilder.js +8 -5
- package/dist/common/{lib → src/lib}/core.js +10 -60
- package/dist/common/{lib → src/lib}/index.js +7 -2
- package/dist/common/{run.js → src/run.js} +12 -4
- package/dist/common/src/utils.js +65 -0
- package/dist/common/testeranto.config.js +41 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +26 -0
- package/dist/module/src/Node.js +42 -0
- package/dist/module/src/PM/base.js +223 -0
- package/dist/module/src/PM/main.js +986 -0
- package/dist/module/src/PM/node.js +154 -0
- package/dist/module/{PM/node.js → src/PM/pure.js} +25 -16
- package/dist/module/{PM → src/PM}/web.js +14 -47
- package/dist/module/src/Project.js +120 -0
- package/dist/module/{Node.js → src/Pure.js} +9 -7
- package/dist/module/{ReportClient.js → src/ReportClient.js} +1 -1
- package/dist/module/{SubPackages/react/component/web.js → src/SubPackages/react/component/index.js} +3 -4
- package/dist/module/src/SubPackages/react/component/node.js +5 -0
- package/dist/module/src/SubPackages/react/component/pure.js +5 -0
- package/dist/module/{SubPackages/react/jsx → src/SubPackages/react/component}/web.js +3 -3
- package/dist/module/src/SubPackages/react/jsx/index.js +58 -0
- package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +1 -1
- package/dist/module/src/SubPackages/react/jsx/pure.js +5 -0
- package/dist/module/src/SubPackages/react/jsx/web.js +5 -0
- package/dist/module/{SubPackages/react-dom/component/web.js → src/SubPackages/react-dom/component/dynamic.js} +5 -13
- package/dist/module/src/SubPackages/react-dom/component/node.js +5 -0
- package/dist/module/src/SubPackages/react-dom/component/pure.js +5 -0
- package/dist/module/src/SubPackages/react-dom/component/static.js +22 -0
- package/dist/module/src/SubPackages/react-dom/component/web.js +11 -0
- package/dist/module/{SubPackages/react-dom/jsx/node.js → src/SubPackages/react-dom/jsx/dynamic.js} +3 -7
- package/dist/module/src/SubPackages/react-dom/jsx/node.js +5 -0
- package/dist/module/src/SubPackages/react-dom/jsx/pure.js +5 -0
- package/dist/module/src/SubPackages/react-dom/jsx/static.js +53 -0
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +11 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/index.js +14 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/pure.js +3 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/implementation.js +54 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/node.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/pure.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/component/test/web.js +5 -0
- package/dist/module/src/SubPackages/react-test-renderer/jsx/pure.js +5 -0
- package/dist/module/{TestReport.js → src/TestReport.js} +26 -14
- package/dist/module/{Web.js → src/Web.js} +1 -4
- package/dist/module/src/build.js +185 -0
- package/dist/module/{defaultConfig.js → src/defaultConfig.js} +1 -3
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -1
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +7 -3
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +7 -4
- package/dist/module/src/esbuildConfigs/pure.js +36 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +8 -5
- package/dist/module/src/examples/react/component/index.js +26 -0
- package/dist/module/src/examples/react/component/test.js +32 -0
- package/dist/module/src/init-docs.js +4 -0
- package/dist/module/{lib → src/lib}/abstractBase.js +99 -95
- package/dist/module/{lib → src/lib}/basebuilder.js +24 -20
- package/dist/module/{lib → src/lib}/classBuilder.js +8 -5
- package/dist/module/{lib → src/lib}/core.js +10 -60
- package/dist/module/{lib → src/lib}/index.js +7 -2
- package/dist/module/{run.js → src/run.js} +12 -4
- package/dist/module/src/utils.js +53 -0
- package/dist/module/testeranto.config.js +39 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.css +11367 -0
- package/dist/prebuild/Project.js +24643 -0
- package/dist/prebuild/ReportClient.js +1 -1
- package/dist/prebuild/TestReport.js +13 -12
- package/dist/prebuild/build.mjs +217 -106
- package/dist/prebuild/init-docs.mjs +29 -83
- package/dist/prebuild/run.mjs +803 -686
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Init.d.ts +2 -0
- package/dist/types/src/Node.d.ts +9 -0
- package/dist/types/src/PM/base.d.ts +34 -0
- package/dist/types/{PM → src/PM}/index.d.ts +21 -22
- package/dist/types/src/PM/main.d.ts +47 -0
- package/dist/types/src/PM/node.d.ts +38 -0
- package/dist/types/{PM/node.d.ts → src/PM/pure.d.ts} +16 -17
- package/dist/types/{PM → src/PM}/web.d.ts +10 -15
- package/dist/types/src/Pure.d.ts +9 -0
- package/dist/types/src/SubPackages/react/component/index.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react/component/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +5 -0
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/dynamic.d.ts +20 -0
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/component/static.d.ts +9 -0
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/dynamic.d.ts +5 -0
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-dom/jsx/static.d.ts +5 -0
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +5 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/implementation.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/node.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/test/web.d.ts +3 -0
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +11 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/pure.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.d.ts +1 -1
- package/dist/types/src/Types.d.ts +88 -0
- package/dist/types/src/Web.d.ts +9 -0
- package/dist/types/src/defaultConfig.d.ts +3 -0
- package/dist/types/src/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.d.ts +2 -1
- package/dist/types/src/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/src/esbuildConfigs/pure.d.ts +4 -0
- package/dist/types/src/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/src/examples/react/component/index.d.ts +13 -0
- package/dist/types/src/examples/react/component/test.d.ts +17 -0
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +47 -34
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +7 -9
- package/dist/types/src/lib/classBuilder.d.ts +9 -0
- package/dist/types/src/lib/core.d.ts +7 -0
- package/dist/types/{lib → src/lib}/index.d.ts +14 -36
- package/dist/types/src/lib/types.d.ts +15 -0
- package/dist/types/src/utils.d.ts +18 -0
- package/dist/types/testeranto.config.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/eslint.config.mjs +111 -0
- package/package.json +33 -12
- package/src/Init.ts +29 -75
- package/src/Node.ts +42 -46
- package/src/PM/base.ts +299 -0
- package/src/PM/index.ts +28 -21
- package/src/PM/main.ts +569 -819
- package/src/PM/node.ts +88 -44
- package/src/PM/pure.ts +209 -0
- package/src/PM/web.ts +19 -121
- package/src/Project.tsx +200 -0
- package/src/Pure.ts +69 -0
- package/src/ReportClient.tsx +8 -3
- package/src/SubPackages/react/component/index.ts +28 -0
- package/src/SubPackages/react/component/node.ts +12 -82
- package/src/SubPackages/react/component/pure.ts +17 -0
- package/src/SubPackages/react/component/web.ts +12 -81
- package/src/SubPackages/react/jsx/index.ts +56 -52
- package/src/SubPackages/react/jsx/node.ts +12 -29
- package/src/SubPackages/react/jsx/pure.ts +23 -0
- package/src/SubPackages/react/jsx/web.ts +17 -36
- package/src/SubPackages/react-dom/component/dynamic.ts +107 -0
- package/src/SubPackages/react-dom/component/node.ts +11 -116
- package/src/SubPackages/react-dom/component/pure.ts +17 -0
- package/src/SubPackages/react-dom/component/static.ts +41 -0
- package/src/SubPackages/react-dom/component/web.ts +7 -113
- package/src/SubPackages/react-dom/jsx/dynamic.ts +46 -0
- package/src/SubPackages/react-dom/jsx/node.ts +10 -58
- package/src/SubPackages/react-dom/jsx/pure.ts +18 -0
- package/src/SubPackages/react-dom/jsx/static.ts +87 -0
- package/src/SubPackages/react-dom/jsx/web.ts +7 -135
- package/src/SubPackages/react-test-renderer/component/index.ts +27 -51
- package/src/SubPackages/react-test-renderer/component/interface.ts +7 -5
- package/src/SubPackages/react-test-renderer/component/node.ts +7 -25
- package/src/SubPackages/react-test-renderer/component/pure.ts +18 -0
- package/src/SubPackages/react-test-renderer/component/test/implementation.ts +63 -0
- package/src/SubPackages/react-test-renderer/component/test/node.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/test/pure.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/test/web.ts +14 -0
- package/src/SubPackages/react-test-renderer/component/web.ts +7 -23
- package/src/SubPackages/react-test-renderer/jsx/index.ts +13 -46
- package/src/SubPackages/react-test-renderer/jsx/node.ts +9 -15
- package/src/SubPackages/react-test-renderer/jsx/pure.ts +31 -0
- package/src/SubPackages/react-test-renderer/jsx/web.ts +9 -14
- package/src/TestReport.tsx +37 -19
- package/src/Types.ts +114 -140
- package/src/Web.ts +13 -48
- package/src/build.ts +153 -143
- package/src/defaultConfig.ts +3 -5
- package/src/esbuildConfigs/index.ts +3 -3
- package/src/esbuildConfigs/inputFilesPlugin.ts +9 -7
- package/src/esbuildConfigs/node.ts +10 -6
- package/src/esbuildConfigs/pure.ts +72 -0
- package/src/esbuildConfigs/web.ts +11 -7
- package/src/examples/react/component/index.tsx +35 -0
- package/src/examples/react/component/test.ts +83 -0
- package/src/init-docs.ts +2 -15
- package/src/lib/abstractBase.ts +188 -260
- package/src/lib/basebuilder.ts +47 -48
- package/src/lib/classBuilder.ts +28 -35
- package/src/lib/core.ts +35 -102
- package/src/lib/index.ts +37 -65
- package/src/lib/types.ts +23 -98
- package/src/run.ts +18 -5
- package/src/utils.ts +73 -40
- package/testeranto/Project.css +11367 -0
- package/testeranto/Project.js +24643 -0
- package/testeranto/ReportClient.css +11367 -0
- package/testeranto/ReportClient.js +24641 -0
- package/testeranto/TestReport.css +11367 -0
- package/testeranto/TestReport.js +27485 -0
- package/testeranto/bundles/node/react/metafile.json +627 -0
- package/testeranto/bundles/node/react/src/SubPackages/react-test-renderer/component/test/node.mjs +24687 -0
- package/testeranto/bundles/pure/react/metafile.json +8 -0
- package/testeranto/bundles/pure/react/src/SubPackages/react-test-renderer/component/test/pure.mjs +24625 -0
- package/testeranto/bundles/web/react/metafile.json +8 -0
- package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.html +19 -0
- package/testeranto/bundles/web/react/src/SubPackages/react-test-renderer/component/test/web.mjs +21290 -0
- package/testeranto/index.html +28 -0
- package/testeranto/reports/react/config.json +22 -0
- package/testeranto/reports/react/index.html +24 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/node/node/console_log.txt +0 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/bdd_errors.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/featurePrompt.txt +0 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/lint_errors.json +3381 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/littleBoard.html +20 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/log.txt +40 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/prompt.txt +24 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/tests.json +132 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/pure/pure/type_errors.txt +17 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/bdd_errors.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/console_log.txt +1 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/lint_errors.json +2947 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/littleBoard.html +20 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/log.txt +40 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/prompt.txt +23 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/tests.json +132 -0
- package/testeranto/reports/react/src/SubPackages/react-test-renderer/component/test/web/web/type_errors.txt +18 -0
- package/testeranto/reports/react/summary.json +8 -0
- package/testeranto.config.ts +45 -0
- package/tsc.log +53 -76
- package/type-fix.txt +2 -0
- package/dist/common/Init.js +0 -68
- package/dist/common/PM/main.js +0 -1176
- package/dist/common/SubPackages/react/component/node.js +0 -19
- package/dist/common/SubPackages/react/jsx/index.js +0 -21
- package/dist/common/SubPackages/react-dom/component/node.js +0 -88
- package/dist/common/SubPackages/react-dom/jsx/node.js +0 -39
- package/dist/common/SubPackages/react-dom/jsx/web.js +0 -128
- package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -2
- package/dist/common/build.js +0 -222
- package/dist/common/init-docs.js +0 -53
- package/dist/common/puppeteerConfiger.js +0 -24
- package/dist/common/utils.js +0 -43
- package/dist/module/Init.js +0 -63
- package/dist/module/PM/main.js +0 -1136
- package/dist/module/SubPackages/react/component/node.js +0 -14
- package/dist/module/SubPackages/react/jsx/index.js +0 -15
- package/dist/module/SubPackages/react-dom/component/node.js +0 -80
- package/dist/module/SubPackages/react-dom/jsx/web.js +0 -90
- package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
- package/dist/module/build.js +0 -184
- package/dist/module/init-docs.js +0 -15
- package/dist/module/puppeteerConfiger.js +0 -19
- package/dist/module/utils.js +0 -29
- package/dist/types/Init.d.ts +0 -2
- package/dist/types/Node.d.ts +0 -12
- package/dist/types/PM/main.d.ts +0 -66
- package/dist/types/SubPackages/react/component/node.d.ts +0 -7
- package/dist/types/SubPackages/react/component/web.d.ts +0 -7
- package/dist/types/SubPackages/react/jsx/index.d.ts +0 -12
- package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/SubPackages/react-dom/component/node.d.ts +0 -11
- package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -20
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -7
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -13
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +0 -16
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +0 -9
- package/dist/types/Types.d.ts +0 -61
- package/dist/types/Web.d.ts +0 -9
- package/dist/types/defaultConfig.d.ts +0 -3
- package/dist/types/esbuildConfigs/index.d.ts +0 -4
- package/dist/types/esbuildConfigs/node.d.ts +0 -4
- package/dist/types/esbuildConfigs/web.d.ts +0 -4
- package/dist/types/lib/classBuilder.d.ts +0 -7
- package/dist/types/lib/core.d.ts +0 -7
- package/dist/types/lib/types.d.ts +0 -14
- package/dist/types/puppeteerConfiger.d.ts +0 -4
- package/dist/types/utils.d.ts +0 -15
- package/src/puppeteerConfiger.ts +0 -26
- /package/dist/common/{PM → src/PM}/index.js +0 -0
- /package/dist/common/{ReportServer.js → src/ReportServer.js} +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/common/{Types.js → src/Types.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/common/{lib → src/lib}/types.js +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{Footer.js → src/Footer.js} +0 -0
- /package/dist/module/{PM → src/PM}/index.js +0 -0
- /package/dist/module/{ReportServer.js → src/ReportServer.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{Types.js → src/Types.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/module/{lib → src/lib}/types.js +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{ReportServer.d.ts → src/ReportServer.d.ts} +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
- /package/dist/types/{build.d.ts → src/build.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/eslint-formatter-testeranto.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/featuresPlugin.d.ts +0 -0
- /package/dist/types/{init-docs.d.ts → src/init-docs.d.ts} +0 -0
- /package/dist/types/{run.d.ts → src/run.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Web_js_1 = __importDefault(require("../../../Web.js"));
|
|
7
|
+
exports.default = (testInput, testSpecifications, testImplementations, testInterface) => {
|
|
8
|
+
const t = (0, Web_js_1.default)(testInput, testSpecifications, testImplementations, testInterface);
|
|
9
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
10
|
+
const elem = document.getElementById("root");
|
|
11
|
+
if (elem) {
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.testInterfacer = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const testInterfacer = (testInput) => {
|
|
6
|
+
return {
|
|
7
|
+
beforeAll: async (prototype, artificer) => {
|
|
8
|
+
return await new Promise((resolve, rej) => {
|
|
9
|
+
resolve(null);
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
beforeEach: async () => {
|
|
13
|
+
return new Promise((resolve, rej) => {
|
|
14
|
+
resolve((0, react_1.createElement)(testInput));
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
andWhen: async function (s, whenCB) {
|
|
18
|
+
return s;
|
|
19
|
+
},
|
|
20
|
+
butThen: async function (s) {
|
|
21
|
+
return s;
|
|
22
|
+
},
|
|
23
|
+
afterEach: async function (store, ndx, artificer) {
|
|
24
|
+
return {};
|
|
25
|
+
},
|
|
26
|
+
afterAll: (store, artificer) => {
|
|
27
|
+
return;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
exports.testInterfacer = testInterfacer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Node_js_1 = __importDefault(require("../../../Node.js"));
|
|
7
|
+
const static_js_1 = require("./static.js");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput) => {
|
|
9
|
+
return (0, Node_js_1.default)(testInput, testSpecifications, testImplementations, static_js_1.testInterface);
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Pure_js_1 = __importDefault(require("../../../Pure.js"));
|
|
7
|
+
const static_js_1 = require("./static.js");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput) => {
|
|
9
|
+
return (0, Pure_js_1.default)(testInput, testSpecifications, testImplementations, static_js_1.testInterface);
|
|
10
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.testInterface = void 0;
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const react_2 = __importDefault(require("react"));
|
|
9
|
+
const client_1 = __importDefault(require("react-dom/client"));
|
|
10
|
+
const TesterantoComponent = ({ done, innerComp, }) => {
|
|
11
|
+
const myContainer = (0, react_1.useRef)(null);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
done(myContainer.current);
|
|
14
|
+
}, []);
|
|
15
|
+
return react_2.default.createElement("div", { ref: myContainer }, innerComp());
|
|
16
|
+
};
|
|
17
|
+
exports.testInterface = {
|
|
18
|
+
beforeAll: async (reactElement, itr) => {
|
|
19
|
+
return await new Promise((resolve, rej) => {
|
|
20
|
+
const htmlElement = document.getElementById("root");
|
|
21
|
+
if (htmlElement) {
|
|
22
|
+
const domRoot = client_1.default.createRoot(htmlElement);
|
|
23
|
+
domRoot.render((0, react_1.createElement)(TesterantoComponent, {
|
|
24
|
+
// ...initialProps,
|
|
25
|
+
innerComp: reactElement,
|
|
26
|
+
done: (reactElement) => {
|
|
27
|
+
resolve({
|
|
28
|
+
htmlElement,
|
|
29
|
+
reactElement,
|
|
30
|
+
domRoot,
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
}, []));
|
|
34
|
+
// resolve({ htmlElement });
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
beforeEach: async (subject) => {
|
|
39
|
+
return subject;
|
|
40
|
+
},
|
|
41
|
+
andWhen: async function (s, whenCB, tr, utils) {
|
|
42
|
+
return whenCB(s, utils);
|
|
43
|
+
},
|
|
44
|
+
butThen: async function (s, thenCB, tr, utils) {
|
|
45
|
+
return new Promise((resolve, rej) => {
|
|
46
|
+
resolve(thenCB(s, utils));
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
afterEach: async function (store, ndx, artificer) {
|
|
50
|
+
return new Promise((resolve, rej) => {
|
|
51
|
+
resolve({});
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
afterAll: (store, artificer) => {
|
|
55
|
+
return new Promise((resolve, rej) => {
|
|
56
|
+
resolve({});
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Web_js_1 = __importDefault(require("../../../Web.js"));
|
|
7
|
+
const dynamic_js_1 = require("./dynamic.js");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput) => {
|
|
9
|
+
const t = (0, Web_js_1.default)(testInput, testSpecifications, testImplementations, (0, dynamic_js_1.testInterfacer)(testInput));
|
|
10
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
11
|
+
const rootElement = document.getElementById("root");
|
|
12
|
+
if (rootElement) {
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return t;
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// export type ISuper<T> = T extends infer U ? U : object;
|
|
4
|
+
// export type InitialState = unknown;
|
|
5
|
+
// export type IWhenShape = any;
|
|
6
|
+
// export type IThenShape = any;
|
|
7
|
+
// export type ISelection = renderer.ReactTestRenderer;
|
|
8
|
+
// export type IStore = renderer.ReactTestRenderer;
|
|
9
|
+
// export type ISubject = renderer.ReactTestRenderer;
|
|
10
|
+
// export type IImpl<I extends IT, O extends OT, M> = ITestImplementation<I, O>;
|
|
11
|
+
// export type ITestSpecification<
|
|
12
|
+
// I extends IT,
|
|
13
|
+
// O extends OT,
|
|
14
|
+
// M
|
|
15
|
+
// > = ITestSpecification<I, O>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Pure_js_1 = __importDefault(require("../../../Pure.js"));
|
|
7
|
+
const interface_1 = require("./interface");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput) => (0, Pure_js_1.default)(testInput, testSpecifications, testImplementations, interface_1.testInterface);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { ITestImplementation } from "testeranto/src/Types";
|
|
3
|
+
// import { I } from "testeranto/src/SubPackages/react-test-renderer/component";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.testImplementation = void 0;
|
|
6
|
+
const chai_1 = require("chai");
|
|
7
|
+
exports.testImplementation = {
|
|
8
|
+
suites: {
|
|
9
|
+
Default: "default",
|
|
10
|
+
},
|
|
11
|
+
givens: {
|
|
12
|
+
AnEmptyState: () => {
|
|
13
|
+
return { foo: "bar" };
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
whens: {
|
|
17
|
+
IClickTheButton: () => async (component) => {
|
|
18
|
+
const button = component.root.findByType("button");
|
|
19
|
+
button.props.onClick();
|
|
20
|
+
return component;
|
|
21
|
+
},
|
|
22
|
+
IClickTheHeader: () => async (component) => {
|
|
23
|
+
try {
|
|
24
|
+
const header = component.root.findByType("h1");
|
|
25
|
+
header.props.onClick();
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
// Expected error - header click fails
|
|
30
|
+
}
|
|
31
|
+
return component;
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
thens: {
|
|
35
|
+
ThePropsIs: (expectation) => (component) => {
|
|
36
|
+
const propsElement = component.root.findByProps({ id: "theProps" });
|
|
37
|
+
return chai_1.assert.deepEqual(JSON.parse(propsElement.props.children), expectation);
|
|
38
|
+
},
|
|
39
|
+
TheStatusIs: (expectation) => (component) => {
|
|
40
|
+
try {
|
|
41
|
+
const statElement = component.root.findByProps({ id: "theStat" });
|
|
42
|
+
const actual = JSON.parse(statElement.props.children);
|
|
43
|
+
chai_1.assert.deepEqual(actual, expectation, "the status was not as expected");
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
chai_1.assert.fail(`Element with id "theStat" not found`);
|
|
48
|
+
}
|
|
49
|
+
return component;
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
checks: {
|
|
53
|
+
AnEmptyState: () => {
|
|
54
|
+
return { foo: "bar" };
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const node_1 = __importDefault(require("../node"));
|
|
7
|
+
const index_1 = __importDefault(require("../../../../examples/react/component/index"));
|
|
8
|
+
const test_1 = require("../../../../examples/react/component/test");
|
|
9
|
+
const implementation_1 = require("./implementation");
|
|
10
|
+
exports.default = (0, node_1.default)(implementation_1.testImplementation, test_1.specification, index_1.default);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const pure_1 = __importDefault(require("../pure"));
|
|
7
|
+
const index_1 = __importDefault(require("../../../../examples/react/component/index"));
|
|
8
|
+
const test_1 = require("../../../../examples/react/component/test");
|
|
9
|
+
const implementation_1 = require("./implementation");
|
|
10
|
+
exports.default = (0, pure_1.default)(implementation_1.testImplementation, test_1.specification, index_1.default);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const web_1 = __importDefault(require("../web"));
|
|
7
|
+
const index_1 = __importDefault(require("../../../../examples/react/component/index"));
|
|
8
|
+
const test_1 = require("../../../../examples/react/component/test");
|
|
9
|
+
const implementation_1 = require("./implementation");
|
|
10
|
+
exports.default = (0, web_1.default)(implementation_1.testImplementation, test_1.specification, index_1.default);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Pure_js_1 = __importDefault(require("../../../Pure.js"));
|
|
7
|
+
const index_js_1 = require("./index.js");
|
|
8
|
+
exports.default = (testImplementations, testSpecifications, testInput, testInterface2 = index_js_1.testInterface) => {
|
|
9
|
+
return (0, Pure_js_1.default)(testInput, testSpecifications, testImplementations, testInterface2);
|
|
10
|
+
};
|
|
@@ -37,10 +37,7 @@ class WebTesteranto extends core_js_1.default {
|
|
|
37
37
|
async receiveTestResourceConfig(partialTestResource) {
|
|
38
38
|
const t = partialTestResource; //JSON.parse(partialTestResource);
|
|
39
39
|
const pm = new web_1.PM_Web(t);
|
|
40
|
-
|
|
41
|
-
return new Promise((res, rej) => {
|
|
42
|
-
res({ features, failed });
|
|
43
|
-
});
|
|
40
|
+
return await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
43
|
exports.WebTesteranto = WebTesteranto;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const ansi_colors_1 = __importDefault(require("ansi-colors"));
|
|
40
|
+
const fs_1 = __importDefault(require("fs"));
|
|
41
|
+
const path_1 = __importDefault(require("path"));
|
|
42
|
+
const readline_1 = __importDefault(require("readline"));
|
|
43
|
+
const esbuild_1 = __importDefault(require("esbuild"));
|
|
44
|
+
const node_js_1 = __importDefault(require("./esbuildConfigs/node.js"));
|
|
45
|
+
const web_js_1 = __importDefault(require("./esbuildConfigs/web.js"));
|
|
46
|
+
const pure_js_1 = __importDefault(require("./esbuildConfigs/pure.js"));
|
|
47
|
+
const web_html_js_1 = __importDefault(require("./web.html.js"));
|
|
48
|
+
const utils_js_1 = require("./utils.js");
|
|
49
|
+
readline_1.default.emitKeypressEvents(process.stdin);
|
|
50
|
+
if (process.stdin.isTTY)
|
|
51
|
+
process.stdin.setRawMode(true);
|
|
52
|
+
let testName = process.argv[2];
|
|
53
|
+
let mode = process.argv[3];
|
|
54
|
+
if (mode !== "once" && mode !== "dev") {
|
|
55
|
+
console.error(`The 4th argument should be 'dev' or 'once', not '${mode}'.`);
|
|
56
|
+
process.exit(-1);
|
|
57
|
+
}
|
|
58
|
+
console.log("testeranto is building", testName, mode);
|
|
59
|
+
Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __importStar(require(s))).then(async (module) => {
|
|
60
|
+
const bigConfig = module.default;
|
|
61
|
+
const project = bigConfig.projects[testName];
|
|
62
|
+
if (!project) {
|
|
63
|
+
console.error("no project found for", testName, "in testeranto.config.ts");
|
|
64
|
+
process.exit(-1);
|
|
65
|
+
}
|
|
66
|
+
const rawConfig = bigConfig.projects[testName];
|
|
67
|
+
const getSecondaryEndpointsPoints = (runtime) => {
|
|
68
|
+
const meta = (ts, st) => {
|
|
69
|
+
ts.forEach((t) => {
|
|
70
|
+
if (t[1] === runtime) {
|
|
71
|
+
st.add(t[0]);
|
|
72
|
+
}
|
|
73
|
+
if (Array.isArray(t[3])) {
|
|
74
|
+
meta(t[3], st);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
return st;
|
|
78
|
+
};
|
|
79
|
+
return Array.from(meta(config.tests, new Set()));
|
|
80
|
+
};
|
|
81
|
+
const config = Object.assign(Object.assign({}, rawConfig), { buildDir: process.cwd() + "/testeranto/bundles/" + testName });
|
|
82
|
+
console.log(`Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`);
|
|
83
|
+
process.stdin.on("keypress", (str, key) => {
|
|
84
|
+
if (key.name === "q") {
|
|
85
|
+
console.log("Testeranto-Build is shutting down...");
|
|
86
|
+
mode = "once";
|
|
87
|
+
onDone();
|
|
88
|
+
}
|
|
89
|
+
else if (key.name === "x") {
|
|
90
|
+
console.log("Testeranto-Build is shutting down forcefully...");
|
|
91
|
+
process.exit(-1);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
console.log(`Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
let nodeDone = false;
|
|
98
|
+
let webDone = false;
|
|
99
|
+
let importDone = false;
|
|
100
|
+
let status = "build";
|
|
101
|
+
const { nodeEntryPoints, webEntryPoints, importEntryPoints } = (0, utils_js_1.getRunnables)(config.tests, testName);
|
|
102
|
+
const onNodeDone = () => {
|
|
103
|
+
nodeDone = true;
|
|
104
|
+
onDone();
|
|
105
|
+
};
|
|
106
|
+
const onWebDone = () => {
|
|
107
|
+
webDone = true;
|
|
108
|
+
onDone();
|
|
109
|
+
};
|
|
110
|
+
const onImportDone = () => {
|
|
111
|
+
importDone = true;
|
|
112
|
+
onDone();
|
|
113
|
+
};
|
|
114
|
+
const onDone = async () => {
|
|
115
|
+
if (nodeDone && webDone && importDone) {
|
|
116
|
+
status = "built";
|
|
117
|
+
}
|
|
118
|
+
if (nodeDone && webDone && importDone && mode === "once") {
|
|
119
|
+
console.log(ansi_colors_1.default.inverse(`${testName} has been built. Goodbye.`));
|
|
120
|
+
process.exit();
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
if (!fs_1.default.existsSync(`testeranto/reports/${testName}`)) {
|
|
124
|
+
fs_1.default.mkdirSync(`testeranto/reports/${testName}`);
|
|
125
|
+
}
|
|
126
|
+
fs_1.default.writeFileSync(`${process.cwd()}/testeranto/reports/${testName}/index.html`, `
|
|
127
|
+
<!DOCTYPE html>
|
|
128
|
+
<html lang="en">
|
|
129
|
+
|
|
130
|
+
<head>
|
|
131
|
+
<meta name="description" content="Webpage description goes here" />
|
|
132
|
+
<meta charset="utf-8" />
|
|
133
|
+
<title>kokomoBay - testeranto</title>
|
|
134
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
135
|
+
<meta name="author" content="" />
|
|
136
|
+
|
|
137
|
+
<link rel="stylesheet" href="/kokomoBay/testeranto/ReportClient.css" />
|
|
138
|
+
<script type="module" src="/kokomoBay/testeranto/ReportClient.js"></script>
|
|
139
|
+
|
|
140
|
+
</head>
|
|
141
|
+
|
|
142
|
+
<body>
|
|
143
|
+
<div id="root">
|
|
144
|
+
react is loading
|
|
145
|
+
</div>
|
|
146
|
+
</body>
|
|
147
|
+
|
|
148
|
+
</html>
|
|
149
|
+
`);
|
|
150
|
+
fs_1.default.writeFileSync(`testeranto/reports/${testName}/config.json`, JSON.stringify(config, null, 2));
|
|
151
|
+
fs_1.default.writeFileSync(`${process.cwd()}/testeranto/index.html`, `
|
|
152
|
+
<!DOCTYPE html>
|
|
153
|
+
<html lang="en">
|
|
154
|
+
|
|
155
|
+
<head>
|
|
156
|
+
<meta name="description" content="Webpage description goes here" />
|
|
157
|
+
<meta charset="utf-8" />
|
|
158
|
+
<title>kokomoBay - testeranto</title>
|
|
159
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
160
|
+
<meta name="author" content="" />
|
|
161
|
+
|
|
162
|
+
<script type="application/json" id="bigConfig">
|
|
163
|
+
${JSON.stringify(Object.keys(bigConfig.projects))}
|
|
164
|
+
</script>
|
|
165
|
+
|
|
166
|
+
<link rel="stylesheet" href="/kokomoBay/testeranto/Project.css" />
|
|
167
|
+
<script type="module" src="/kokomoBay/testeranto/Project.js"></script>
|
|
168
|
+
|
|
169
|
+
</head>
|
|
170
|
+
|
|
171
|
+
<body>
|
|
172
|
+
<div id="root">
|
|
173
|
+
react is loading
|
|
174
|
+
</div>
|
|
175
|
+
</body>
|
|
176
|
+
|
|
177
|
+
</html>
|
|
178
|
+
`);
|
|
179
|
+
Promise.resolve(Promise.all([...getSecondaryEndpointsPoints("web")].map(async (sourceFilePath) => {
|
|
180
|
+
const sourceFileSplit = sourceFilePath.split("/");
|
|
181
|
+
const sourceDir = sourceFileSplit.slice(0, -1);
|
|
182
|
+
const sourceFileName = sourceFileSplit[sourceFileSplit.length - 1];
|
|
183
|
+
const sourceFileNameMinusJs = sourceFileName
|
|
184
|
+
.split(".")
|
|
185
|
+
.slice(0, -1)
|
|
186
|
+
.join(".");
|
|
187
|
+
const htmlFilePath = path_1.default.normalize(`${process.cwd()}/testeranto/bundles/web/${testName}/${sourceDir.join("/")}/${sourceFileNameMinusJs}.html`);
|
|
188
|
+
const jsfilePath = `./${sourceFileNameMinusJs}.mjs`;
|
|
189
|
+
return fs_1.default.promises
|
|
190
|
+
.mkdir(path_1.default.dirname(htmlFilePath), { recursive: true })
|
|
191
|
+
.then((x) => fs_1.default.writeFileSync(htmlFilePath, (0, web_html_js_1.default)(jsfilePath, htmlFilePath)));
|
|
192
|
+
})));
|
|
193
|
+
// glob(`${process.cwd()}/testeranto/bundles/${testName}/chunk-*.mjs`, {
|
|
194
|
+
// ignore: "node_modules/**",
|
|
195
|
+
// }).then((chunks) => {
|
|
196
|
+
// chunks.forEach((chunk) => {
|
|
197
|
+
// fs.unlinkSync(chunk);
|
|
198
|
+
// });
|
|
199
|
+
// });
|
|
200
|
+
await Promise.all([
|
|
201
|
+
...[
|
|
202
|
+
[pure_js_1.default, importEntryPoints, onImportDone],
|
|
203
|
+
[node_js_1.default, nodeEntryPoints, onNodeDone],
|
|
204
|
+
[web_js_1.default, webEntryPoints, onWebDone],
|
|
205
|
+
].map(([configer, entryPoints, done]) => {
|
|
206
|
+
esbuild_1.default
|
|
207
|
+
.context(configer(config, Object.keys(entryPoints), testName))
|
|
208
|
+
.then(async (ctx) => {
|
|
209
|
+
if (mode === "dev") {
|
|
210
|
+
await ctx.watch().then((v) => {
|
|
211
|
+
done();
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
ctx.rebuild().then((v) => {
|
|
216
|
+
done();
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
return ctx;
|
|
220
|
+
});
|
|
221
|
+
}),
|
|
222
|
+
]);
|
|
223
|
+
});
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const config = {
|
|
4
4
|
src: "src",
|
|
5
|
-
outdir: "docs",
|
|
6
5
|
tests: [],
|
|
7
6
|
debugger: true,
|
|
8
7
|
clearScreen: false,
|
|
9
|
-
devMode: true,
|
|
10
8
|
minify: false,
|
|
11
|
-
outbase: ".",
|
|
12
9
|
ports: ["3001"],
|
|
13
10
|
externals: [],
|
|
14
11
|
nodePlugins: [],
|
|
15
12
|
webPlugins: [],
|
|
13
|
+
importPlugins: [],
|
|
16
14
|
featureIngestor: function (s) {
|
|
17
15
|
throw new Error("Function not implemented.");
|
|
18
16
|
},
|
|
@@ -11,15 +11,19 @@ const register = (entrypoint, sources) => {
|
|
|
11
11
|
}
|
|
12
12
|
sources.forEach((s) => otherInputs[entrypoint].add(s));
|
|
13
13
|
};
|
|
14
|
-
exports.default = (platform,
|
|
14
|
+
exports.default = (platform, testName) => {
|
|
15
|
+
const d = `testeranto/bundles/${platform}/${testName}/`;
|
|
16
|
+
const f = `testeranto/bundles/${platform}/${testName}/metafile.json`;
|
|
17
|
+
if (!fs_1.default.existsSync(d)) {
|
|
18
|
+
fs_1.default.mkdirSync(d);
|
|
19
|
+
}
|
|
15
20
|
return {
|
|
16
21
|
register,
|
|
17
22
|
inputFilesPluginFactory: {
|
|
18
23
|
name: "metafileWriter",
|
|
19
24
|
setup(build) {
|
|
20
25
|
build.onEnd((result) => {
|
|
21
|
-
|
|
22
|
-
fs_1.default.writeFileSync(`docs/${platform}/metafile.json`, JSON.stringify(result, null, 2));
|
|
26
|
+
fs_1.default.writeFileSync(f, JSON.stringify(result, null, 2));
|
|
23
27
|
});
|
|
24
28
|
},
|
|
25
29
|
},
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const index_js_1 = __importDefault(require("./index.js"));
|
|
7
7
|
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
8
|
const featuresPlugin_1 = __importDefault(require("./featuresPlugin"));
|
|
9
|
-
exports.default = (config, entryPoints) => {
|
|
10
|
-
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node",
|
|
11
|
-
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir:
|
|
9
|
+
exports.default = (config, entryPoints, testName) => {
|
|
10
|
+
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node", testName);
|
|
11
|
+
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir: `testeranto/bundles/node/${testName}/`,
|
|
12
12
|
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
13
13
|
metafile: true, supported: {
|
|
14
14
|
"dynamic-import": true,
|
|
@@ -21,7 +21,10 @@ exports.default = (config, entryPoints) => {
|
|
|
21
21
|
inputFilesPluginFactory,
|
|
22
22
|
{
|
|
23
23
|
name: "rebuild-notify",
|
|
24
|
-
setup(build) {
|
|
24
|
+
setup: (build) => {
|
|
25
|
+
build.onStart(() => {
|
|
26
|
+
console.log(`> node build starting...`);
|
|
27
|
+
});
|
|
25
28
|
build.onEnd((result) => {
|
|
26
29
|
console.log(`> node build ended with ${result.errors.length} errors`);
|
|
27
30
|
if (result.errors.length > 0) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const index_js_1 = __importDefault(require("./index.js"));
|
|
7
|
+
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
|
+
const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
|
|
9
|
+
exports.default = (config, entryPoints, testName) => {
|
|
10
|
+
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("pure", testName);
|
|
11
|
+
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { drop: ["console", "debugger"], splitting: true, outdir: `testeranto/bundles/pure/${testName}/`,
|
|
12
|
+
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
13
|
+
metafile: true, supported: {
|
|
14
|
+
"dynamic-import": true,
|
|
15
|
+
}, define: {
|
|
16
|
+
"process.env.FLUENTFFMPEG_COV": "0",
|
|
17
|
+
}, absWorkingDir: process.cwd(), banner: {
|
|
18
|
+
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
19
|
+
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
20
|
+
featuresPlugin_js_1.default,
|
|
21
|
+
inputFilesPluginFactory,
|
|
22
|
+
{
|
|
23
|
+
name: "rebuild-notify",
|
|
24
|
+
setup: (build) => {
|
|
25
|
+
build.onStart(() => {
|
|
26
|
+
console.log(`> pure build starting...`);
|
|
27
|
+
});
|
|
28
|
+
build.onEnd((result) => {
|
|
29
|
+
console.log(`> pure build ended with ${result.errors.length} errors`);
|
|
30
|
+
if (result.errors.length > 0) {
|
|
31
|
+
console.log(result);
|
|
32
|
+
}
|
|
33
|
+
// console.log(result);
|
|
34
|
+
// result.errors.length !== 0 && process.exit(-1);
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
...((config.nodePlugins || []).map((p) => p(register, entryPoints)) ||
|
|
39
|
+
[]),
|
|
40
|
+
] });
|
|
41
|
+
};
|