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
package/src/build.ts
CHANGED
|
@@ -1,51 +1,46 @@
|
|
|
1
|
+
import ansiC from "ansi-colors";
|
|
1
2
|
import fs, { watch } from "fs";
|
|
2
3
|
import path from "path";
|
|
3
4
|
import readline from "readline";
|
|
4
|
-
import { glob } from "glob";
|
|
5
5
|
import esbuild from "esbuild";
|
|
6
6
|
|
|
7
7
|
import esbuildNodeConfiger from "./esbuildConfigs/node.js";
|
|
8
8
|
import esbuildWebConfiger from "./esbuildConfigs/web.js";
|
|
9
|
+
import esbuildImportConfiger from "./esbuildConfigs/pure.js";
|
|
9
10
|
import webHtmlFrame from "./web.html.js";
|
|
11
|
+
|
|
12
|
+
import { getRunnables } from "./utils.js";
|
|
10
13
|
import {
|
|
11
|
-
|
|
12
|
-
IRunnables,
|
|
13
|
-
IBaseConfig,
|
|
14
|
-
IRunTime,
|
|
14
|
+
ITestconfig,
|
|
15
15
|
IBuiltConfig,
|
|
16
|
-
|
|
16
|
+
IProject,
|
|
17
|
+
IRunTime,
|
|
18
|
+
ITestTypes,
|
|
19
|
+
} from "./Types.js";
|
|
17
20
|
|
|
18
21
|
readline.emitKeypressEvents(process.stdin);
|
|
19
22
|
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
tests: ITestTypes[],
|
|
23
|
-
payload = {
|
|
24
|
-
nodeEntryPoints: {},
|
|
25
|
-
webEntryPoints: {},
|
|
26
|
-
}
|
|
27
|
-
): IRunnables => {
|
|
28
|
-
return tests.reduce((pt, cv, cndx, cry) => {
|
|
29
|
-
if (cv[1] === "node") {
|
|
30
|
-
pt.nodeEntryPoints[cv[0]] = path.resolve(
|
|
31
|
-
`./docs/node/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`
|
|
32
|
-
);
|
|
33
|
-
} else if (cv[1] === "web") {
|
|
34
|
-
pt.webEntryPoints[cv[0]] = path.resolve(
|
|
35
|
-
`./docs/web/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`
|
|
36
|
-
);
|
|
37
|
-
}
|
|
24
|
+
let testName = process.argv[2];
|
|
38
25
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
let mode = process.argv[3] as "once" | "dev";
|
|
27
|
+
if (mode !== "once" && mode !== "dev") {
|
|
28
|
+
console.error(`The 4th argument should be 'dev' or 'once', not '${mode}'.`);
|
|
29
|
+
process.exit(-1);
|
|
30
|
+
}
|
|
42
31
|
|
|
43
|
-
|
|
44
|
-
}, payload as IRunnables);
|
|
45
|
-
};
|
|
32
|
+
console.log("testeranto is building", testName, mode);
|
|
46
33
|
|
|
47
|
-
import(process.cwd() + "/" +
|
|
48
|
-
const
|
|
34
|
+
import(process.cwd() + "/" + "testeranto.config.ts").then(async (module) => {
|
|
35
|
+
const bigConfig: IProject = module.default;
|
|
36
|
+
|
|
37
|
+
const project = bigConfig.projects[testName];
|
|
38
|
+
if (!project) {
|
|
39
|
+
console.error("no project found for", testName, "in testeranto.config.ts");
|
|
40
|
+
process.exit(-1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const rawConfig: ITestconfig = bigConfig.projects[testName];
|
|
49
44
|
|
|
50
45
|
const getSecondaryEndpointsPoints = (runtime?: IRunTime): string[] => {
|
|
51
46
|
const meta = (ts: ITestTypes[], st: Set<string>): Set<string> => {
|
|
@@ -64,16 +59,36 @@ import(process.cwd() + "/" + process.argv[2]).then(async (module) => {
|
|
|
64
59
|
|
|
65
60
|
const config: IBuiltConfig = {
|
|
66
61
|
...rawConfig,
|
|
67
|
-
buildDir: process.cwd() + "/" +
|
|
62
|
+
buildDir: process.cwd() + "/testeranto/bundles/" + testName,
|
|
68
63
|
};
|
|
69
64
|
|
|
65
|
+
console.log(
|
|
66
|
+
`Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`
|
|
67
|
+
);
|
|
68
|
+
process.stdin.on("keypress", (str, key) => {
|
|
69
|
+
if (key.name === "q") {
|
|
70
|
+
console.log("Testeranto-Build is shutting down...");
|
|
71
|
+
mode = "once";
|
|
72
|
+
onDone();
|
|
73
|
+
} else if (key.name === "x") {
|
|
74
|
+
console.log("Testeranto-Build is shutting down forcefully...");
|
|
75
|
+
process.exit(-1);
|
|
76
|
+
} else {
|
|
77
|
+
console.log(
|
|
78
|
+
`Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
70
82
|
let nodeDone: boolean = false;
|
|
71
83
|
let webDone: boolean = false;
|
|
72
|
-
let
|
|
84
|
+
let importDone: boolean = false;
|
|
85
|
+
|
|
73
86
|
let status: "build" | "built" = "build";
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
87
|
+
|
|
88
|
+
const { nodeEntryPoints, webEntryPoints, importEntryPoints } = getRunnables(
|
|
89
|
+
config.tests,
|
|
90
|
+
testName
|
|
91
|
+
);
|
|
77
92
|
|
|
78
93
|
const onNodeDone = () => {
|
|
79
94
|
nodeDone = true;
|
|
@@ -85,89 +100,90 @@ import(process.cwd() + "/" + process.argv[2]).then(async (module) => {
|
|
|
85
100
|
onDone();
|
|
86
101
|
};
|
|
87
102
|
|
|
103
|
+
const onImportDone = () => {
|
|
104
|
+
importDone = true;
|
|
105
|
+
onDone();
|
|
106
|
+
};
|
|
107
|
+
|
|
88
108
|
const onDone = async () => {
|
|
89
|
-
if (nodeDone && webDone) {
|
|
109
|
+
if (nodeDone && webDone && importDone) {
|
|
90
110
|
status = "built";
|
|
91
111
|
}
|
|
92
|
-
if (nodeDone && webDone &&
|
|
93
|
-
|
|
94
|
-
// console.log("watching", outputFile);
|
|
95
|
-
// try {
|
|
96
|
-
// watch(outputFile, async (filename) => {
|
|
97
|
-
// const hash = await fileHash(outputFile);
|
|
98
|
-
// if (fileHashes[k] !== hash) {
|
|
99
|
-
// fileHashes[k] = hash;
|
|
100
|
-
// console.log(`< ${filename} `);
|
|
101
|
-
// pm.launchNode(k, outputFile);
|
|
102
|
-
// }
|
|
103
|
-
// });
|
|
104
|
-
// } catch (e) {
|
|
105
|
-
// console.error(e);
|
|
106
|
-
// }
|
|
107
|
-
// });
|
|
108
|
-
// Object.entries(webEntryPoints).forEach(([k, outputFile]) => {
|
|
109
|
-
// console.log("watching", outputFile);
|
|
110
|
-
// watch(outputFile, async (filename) => {
|
|
111
|
-
// const hash = await fileHash(outputFile);
|
|
112
|
-
// console.log(`< ${filename} ${hash}`);
|
|
113
|
-
// if (fileHashes[k] !== hash) {
|
|
114
|
-
// fileHashes[k] = hash;
|
|
115
|
-
// pm.launchWeb(k, outputFile);
|
|
116
|
-
// }
|
|
117
|
-
// });
|
|
118
|
-
// });
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (nodeDone && webDone && mode === "PROD") {
|
|
122
|
-
console.log("Testeranto-EsBuild is all done. Goodbye!");
|
|
112
|
+
if (nodeDone && webDone && importDone && mode === "once") {
|
|
113
|
+
console.log(ansiC.inverse(`${testName} has been built. Goodbye.`));
|
|
123
114
|
process.exit();
|
|
124
|
-
} else {
|
|
125
|
-
if (mode === "PROD") {
|
|
126
|
-
console.log("waiting for tests to finish");
|
|
127
|
-
console.log(
|
|
128
|
-
JSON.stringify(
|
|
129
|
-
{
|
|
130
|
-
nodeDone: nodeDone,
|
|
131
|
-
webDone: webDone,
|
|
132
|
-
mode: mode,
|
|
133
|
-
},
|
|
134
|
-
null,
|
|
135
|
-
2
|
|
136
|
-
)
|
|
137
|
-
);
|
|
138
|
-
} else {
|
|
139
|
-
console.log("waiting for tests to change");
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if (config.devMode) {
|
|
143
|
-
console.log("ready and watching for changes...");
|
|
144
|
-
} else {
|
|
145
|
-
// pm.shutDown();
|
|
146
|
-
}
|
|
147
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
148
115
|
}
|
|
149
116
|
};
|
|
150
117
|
|
|
151
|
-
|
|
152
|
-
`
|
|
118
|
+
if (!fs.existsSync(`testeranto/reports/${testName}`)) {
|
|
119
|
+
fs.mkdirSync(`testeranto/reports/${testName}`);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
fs.writeFileSync(
|
|
123
|
+
`${process.cwd()}/testeranto/reports/${testName}/index.html`,
|
|
124
|
+
`
|
|
125
|
+
<!DOCTYPE html>
|
|
126
|
+
<html lang="en">
|
|
127
|
+
|
|
128
|
+
<head>
|
|
129
|
+
<meta name="description" content="Webpage description goes here" />
|
|
130
|
+
<meta charset="utf-8" />
|
|
131
|
+
<title>kokomoBay - testeranto</title>
|
|
132
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
133
|
+
<meta name="author" content="" />
|
|
134
|
+
|
|
135
|
+
<link rel="stylesheet" href="/kokomoBay/testeranto/ReportClient.css" />
|
|
136
|
+
<script type="module" src="/kokomoBay/testeranto/ReportClient.js"></script>
|
|
137
|
+
|
|
138
|
+
</head>
|
|
139
|
+
|
|
140
|
+
<body>
|
|
141
|
+
<div id="root">
|
|
142
|
+
react is loading
|
|
143
|
+
</div>
|
|
144
|
+
</body>
|
|
145
|
+
|
|
146
|
+
</html>
|
|
147
|
+
`
|
|
153
148
|
);
|
|
154
|
-
process.stdin.on("keypress", (str, key) => {
|
|
155
|
-
if (key.name === "q") {
|
|
156
|
-
console.log("Testeranto-Build is shutting down...");
|
|
157
|
-
mode = "PROD";
|
|
158
|
-
onDone();
|
|
159
|
-
}
|
|
160
|
-
if (key.name === "x") {
|
|
161
|
-
console.log("Testeranto-Build is shutting down forcefully...");
|
|
162
|
-
process.exit(-1);
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
149
|
|
|
166
150
|
fs.writeFileSync(
|
|
167
|
-
|
|
151
|
+
`testeranto/reports/${testName}/config.json`,
|
|
168
152
|
JSON.stringify(config, null, 2)
|
|
169
153
|
);
|
|
170
154
|
|
|
155
|
+
fs.writeFileSync(
|
|
156
|
+
`${process.cwd()}/testeranto/index.html`,
|
|
157
|
+
`
|
|
158
|
+
<!DOCTYPE html>
|
|
159
|
+
<html lang="en">
|
|
160
|
+
|
|
161
|
+
<head>
|
|
162
|
+
<meta name="description" content="Webpage description goes here" />
|
|
163
|
+
<meta charset="utf-8" />
|
|
164
|
+
<title>kokomoBay - testeranto</title>
|
|
165
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
166
|
+
<meta name="author" content="" />
|
|
167
|
+
|
|
168
|
+
<script type="application/json" id="bigConfig">
|
|
169
|
+
${JSON.stringify(Object.keys(bigConfig.projects))}
|
|
170
|
+
</script>
|
|
171
|
+
|
|
172
|
+
<link rel="stylesheet" href="/kokomoBay/testeranto/Project.css" />
|
|
173
|
+
<script type="module" src="/kokomoBay/testeranto/Project.js"></script>
|
|
174
|
+
|
|
175
|
+
</head>
|
|
176
|
+
|
|
177
|
+
<body>
|
|
178
|
+
<div id="root">
|
|
179
|
+
react is loading
|
|
180
|
+
</div>
|
|
181
|
+
</body>
|
|
182
|
+
|
|
183
|
+
</html>
|
|
184
|
+
`
|
|
185
|
+
);
|
|
186
|
+
|
|
171
187
|
Promise.resolve(
|
|
172
188
|
Promise.all(
|
|
173
189
|
[...getSecondaryEndpointsPoints("web")].map(async (sourceFilePath) => {
|
|
@@ -180,7 +196,7 @@ import(process.cwd() + "/" + process.argv[2]).then(async (module) => {
|
|
|
180
196
|
.join(".");
|
|
181
197
|
|
|
182
198
|
const htmlFilePath = path.normalize(
|
|
183
|
-
`${process.cwd()}/${
|
|
199
|
+
`${process.cwd()}/testeranto/bundles/web/${testName}/${sourceDir.join(
|
|
184
200
|
"/"
|
|
185
201
|
)}/${sourceFileNameMinusJs}.html`
|
|
186
202
|
);
|
|
@@ -198,43 +214,37 @@ import(process.cwd() + "/" + process.argv[2]).then(async (module) => {
|
|
|
198
214
|
)
|
|
199
215
|
);
|
|
200
216
|
|
|
201
|
-
glob(
|
|
202
|
-
|
|
203
|
-
}).then((chunks) => {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
});
|
|
217
|
+
// glob(`${process.cwd()}/testeranto/bundles/${testName}/chunk-*.mjs`, {
|
|
218
|
+
// ignore: "node_modules/**",
|
|
219
|
+
// }).then((chunks) => {
|
|
220
|
+
// chunks.forEach((chunk) => {
|
|
221
|
+
// fs.unlinkSync(chunk);
|
|
222
|
+
// });
|
|
223
|
+
// });
|
|
208
224
|
|
|
209
225
|
await Promise.all([
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
webContext.rebuild().then((v) => {
|
|
234
|
-
onWebDone();
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
return webContext;
|
|
238
|
-
}),
|
|
226
|
+
...(
|
|
227
|
+
[
|
|
228
|
+
[esbuildImportConfiger, importEntryPoints, onImportDone],
|
|
229
|
+
[esbuildNodeConfiger, nodeEntryPoints, onNodeDone],
|
|
230
|
+
[esbuildWebConfiger, webEntryPoints, onWebDone],
|
|
231
|
+
] as [(a, b, c) => any, Record<string, string>, () => void][]
|
|
232
|
+
).map(([configer, entryPoints, done]) => {
|
|
233
|
+
esbuild
|
|
234
|
+
.context(configer(config, Object.keys(entryPoints), testName))
|
|
235
|
+
.then(async (ctx) => {
|
|
236
|
+
if (mode === "dev") {
|
|
237
|
+
await ctx.watch().then((v) => {
|
|
238
|
+
done();
|
|
239
|
+
});
|
|
240
|
+
} else {
|
|
241
|
+
ctx.rebuild().then((v) => {
|
|
242
|
+
done();
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return ctx;
|
|
247
|
+
});
|
|
248
|
+
}),
|
|
239
249
|
]);
|
|
240
250
|
});
|
package/src/defaultConfig.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITestconfig } from "./lib";
|
|
2
2
|
|
|
3
|
-
const config:
|
|
3
|
+
const config: ITestconfig = {
|
|
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: string): Promise<string> {
|
|
17
15
|
throw new Error("Function not implemented.");
|
|
18
16
|
},
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { BuildOptions } from "esbuild";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ITestconfig } from "../lib";
|
|
4
4
|
|
|
5
|
-
export default (config:
|
|
5
|
+
export default (config: ITestconfig): BuildOptions => {
|
|
6
6
|
return {
|
|
7
7
|
// packages: "external",
|
|
8
8
|
target: "esnext",
|
|
9
9
|
format: "esm",
|
|
10
10
|
splitting: true,
|
|
11
11
|
outExtension: { ".js": ".mjs" },
|
|
12
|
-
outbase:
|
|
12
|
+
outbase: ".",
|
|
13
13
|
jsx: "transform",
|
|
14
14
|
bundle: true,
|
|
15
15
|
minify: config.minify === true,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import type { Plugin } from "esbuild";
|
|
3
|
+
import { IRunTime } from "../lib";
|
|
3
4
|
|
|
4
5
|
const otherInputs: Record<string, Set<string>> = {};
|
|
5
6
|
|
|
@@ -11,12 +12,17 @@ const register = (entrypoint: string, sources: string[]): void => {
|
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export default (
|
|
14
|
-
platform:
|
|
15
|
-
|
|
15
|
+
platform: IRunTime,
|
|
16
|
+
testName: string
|
|
16
17
|
): {
|
|
17
18
|
register: (entrypoint: string, sources: string[]) => void;
|
|
18
19
|
inputFilesPluginFactory: Plugin;
|
|
19
20
|
} => {
|
|
21
|
+
const d = `testeranto/bundles/${platform}/${testName}/`;
|
|
22
|
+
const f = `testeranto/bundles/${platform}/${testName}/metafile.json`;
|
|
23
|
+
if (!fs.existsSync(d)) {
|
|
24
|
+
fs.mkdirSync(d);
|
|
25
|
+
}
|
|
20
26
|
return {
|
|
21
27
|
register,
|
|
22
28
|
|
|
@@ -24,11 +30,7 @@ export default (
|
|
|
24
30
|
name: "metafileWriter",
|
|
25
31
|
setup(build) {
|
|
26
32
|
build.onEnd((result) => {
|
|
27
|
-
|
|
28
|
-
fs.writeFileSync(
|
|
29
|
-
`docs/${platform}/metafile.json`,
|
|
30
|
-
JSON.stringify(result, null, 2)
|
|
31
|
-
);
|
|
33
|
+
fs.writeFileSync(f, JSON.stringify(result, null, 2));
|
|
32
34
|
});
|
|
33
35
|
},
|
|
34
36
|
},
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { BuildOptions } from "esbuild";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ITestconfig } from "../lib/index.js";
|
|
4
4
|
|
|
5
5
|
import baseEsBuildConfig from "./index.js";
|
|
6
6
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
7
7
|
import featuresPlugin from "./featuresPlugin";
|
|
8
8
|
|
|
9
9
|
export default (
|
|
10
|
-
config:
|
|
11
|
-
entryPoints:
|
|
10
|
+
config: ITestconfig,
|
|
11
|
+
entryPoints: string[],
|
|
12
|
+
testName: string
|
|
12
13
|
): BuildOptions => {
|
|
13
14
|
const { inputFilesPluginFactory, register } = inputFilesPlugin(
|
|
14
15
|
"node",
|
|
15
|
-
|
|
16
|
+
testName
|
|
16
17
|
);
|
|
17
18
|
return {
|
|
18
19
|
...baseEsBuildConfig(config),
|
|
19
20
|
|
|
20
21
|
splitting: true,
|
|
21
22
|
|
|
22
|
-
outdir:
|
|
23
|
+
outdir: `testeranto/bundles/node/${testName}/`,
|
|
23
24
|
|
|
24
25
|
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
25
26
|
metafile: true,
|
|
@@ -45,7 +46,10 @@ export default (
|
|
|
45
46
|
inputFilesPluginFactory,
|
|
46
47
|
{
|
|
47
48
|
name: "rebuild-notify",
|
|
48
|
-
setup(build) {
|
|
49
|
+
setup: (build) => {
|
|
50
|
+
build.onStart(() => {
|
|
51
|
+
console.log(`> node build starting...`);
|
|
52
|
+
});
|
|
49
53
|
build.onEnd((result) => {
|
|
50
54
|
console.log(
|
|
51
55
|
`> node build ended with ${result.errors.length} errors`
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { BuildOptions } from "esbuild";
|
|
2
|
+
|
|
3
|
+
import { ITestconfig } from "../lib/index.js";
|
|
4
|
+
|
|
5
|
+
import baseEsBuildConfig from "./index.js";
|
|
6
|
+
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
7
|
+
import featuresPlugin from "./featuresPlugin.js";
|
|
8
|
+
|
|
9
|
+
export default (
|
|
10
|
+
config: ITestconfig,
|
|
11
|
+
entryPoints: string[],
|
|
12
|
+
testName: string
|
|
13
|
+
): BuildOptions => {
|
|
14
|
+
const { inputFilesPluginFactory, register } = inputFilesPlugin(
|
|
15
|
+
"pure",
|
|
16
|
+
testName
|
|
17
|
+
);
|
|
18
|
+
return {
|
|
19
|
+
...baseEsBuildConfig(config),
|
|
20
|
+
|
|
21
|
+
drop: ["console", "debugger"],
|
|
22
|
+
|
|
23
|
+
splitting: true,
|
|
24
|
+
|
|
25
|
+
outdir: `testeranto/bundles/pure/${testName}/`,
|
|
26
|
+
|
|
27
|
+
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
28
|
+
metafile: true,
|
|
29
|
+
supported: {
|
|
30
|
+
"dynamic-import": true,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
define: {
|
|
34
|
+
"process.env.FLUENTFFMPEG_COV": "0",
|
|
35
|
+
},
|
|
36
|
+
absWorkingDir: process.cwd(),
|
|
37
|
+
banner: {
|
|
38
|
+
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
39
|
+
},
|
|
40
|
+
platform: "node",
|
|
41
|
+
|
|
42
|
+
external: ["react", ...config.externals],
|
|
43
|
+
|
|
44
|
+
entryPoints: [...entryPoints],
|
|
45
|
+
plugins: [
|
|
46
|
+
featuresPlugin,
|
|
47
|
+
|
|
48
|
+
inputFilesPluginFactory,
|
|
49
|
+
{
|
|
50
|
+
name: "rebuild-notify",
|
|
51
|
+
setup: (build) => {
|
|
52
|
+
build.onStart(() => {
|
|
53
|
+
console.log(`> pure build starting...`);
|
|
54
|
+
});
|
|
55
|
+
build.onEnd((result) => {
|
|
56
|
+
console.log(
|
|
57
|
+
`> pure build ended with ${result.errors.length} errors`
|
|
58
|
+
);
|
|
59
|
+
if (result.errors.length > 0) {
|
|
60
|
+
console.log(result);
|
|
61
|
+
}
|
|
62
|
+
// console.log(result);
|
|
63
|
+
// result.errors.length !== 0 && process.exit(-1);
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
...((config.nodePlugins || []).map((p) => p(register, entryPoints)) ||
|
|
69
|
+
[]),
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { BuildOptions } from "esbuild";
|
|
2
2
|
import path from "path";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { ITestconfig } from "../lib/index.js";
|
|
5
5
|
|
|
6
6
|
import baseEsBuildConfig from "./index.js";
|
|
7
7
|
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
8
8
|
import featuresPlugin from "./featuresPlugin.js";
|
|
9
9
|
|
|
10
10
|
export default (
|
|
11
|
-
config:
|
|
12
|
-
entryPoints:
|
|
11
|
+
config: ITestconfig,
|
|
12
|
+
entryPoints: string[],
|
|
13
|
+
testName: string
|
|
13
14
|
): BuildOptions => {
|
|
14
15
|
const { inputFilesPluginFactory, register } = inputFilesPlugin(
|
|
15
16
|
"web",
|
|
16
|
-
|
|
17
|
+
testName
|
|
17
18
|
);
|
|
18
19
|
|
|
19
20
|
return {
|
|
20
21
|
...baseEsBuildConfig(config),
|
|
21
22
|
|
|
22
|
-
outdir:
|
|
23
|
+
outdir: `testeranto/bundles/web/${testName}`,
|
|
23
24
|
|
|
24
25
|
alias: {
|
|
25
26
|
react: path.resolve("./node_modules/react"),
|
|
@@ -56,7 +57,10 @@ export default (
|
|
|
56
57
|
inputFilesPluginFactory,
|
|
57
58
|
{
|
|
58
59
|
name: "rebuild-notify",
|
|
59
|
-
setup(build) {
|
|
60
|
+
setup: (build) => {
|
|
61
|
+
build.onStart(() => {
|
|
62
|
+
console.log(`> web build starting...`);
|
|
63
|
+
});
|
|
60
64
|
build.onEnd((result) => {
|
|
61
65
|
console.log(
|
|
62
66
|
`> web build ended with ${result.errors.length} errors`
|
|
@@ -70,7 +74,7 @@ export default (
|
|
|
70
74
|
},
|
|
71
75
|
},
|
|
72
76
|
|
|
73
|
-
...(config.
|
|
77
|
+
...((config.webPlugins || []).map((p) => p(register, entryPoints)) || []),
|
|
74
78
|
],
|
|
75
79
|
};
|
|
76
80
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export type IProps = { foo: string; children: [] };
|
|
4
|
+
export type IState = { count: number };
|
|
5
|
+
|
|
6
|
+
export class ClassicalComponent extends React.Component<IProps, IState> {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(props);
|
|
9
|
+
this.state = {
|
|
10
|
+
count: 0,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
render() {
|
|
15
|
+
return (
|
|
16
|
+
<div style={{ border: "3px solid black" }}>
|
|
17
|
+
<h1 id="theHeader">Hello Marcus</h1>
|
|
18
|
+
<pre id="theProps">{JSON.stringify(this.props)}</pre>
|
|
19
|
+
<p>foo: {this.props.foo}</p>
|
|
20
|
+
<pre id="theStat">{JSON.stringify(this.state)}</pre>
|
|
21
|
+
<p>count: {this.state.count} times</p>
|
|
22
|
+
<button
|
|
23
|
+
id="theButton"
|
|
24
|
+
onClick={async () => {
|
|
25
|
+
this.setState({ count: this.state.count + 1 });
|
|
26
|
+
}}
|
|
27
|
+
>
|
|
28
|
+
Click
|
|
29
|
+
</button>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default ClassicalComponent;
|