testeranto 0.200.0 → 0.202.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/README.md +26 -1
- package/bundle.js +3 -2
- package/design-editor/DesignEditor.tsx +40 -241
- package/dist/common/design-editor/DesignEditor.js +33 -198
- package/dist/common/src/App.js +158 -16
- package/dist/common/src/PM/PM_WithBuild.js +135 -0
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +79 -67
- package/dist/common/src/PM/PM_WithGit.js +517 -0
- package/dist/common/src/PM/PM_WithProcesses.js +519 -0
- package/dist/common/src/PM/PM_WithWebSocket.js +535 -0
- package/dist/common/src/PM/base.js +62 -0
- package/dist/common/src/PM/main.js +533 -1676
- package/dist/common/src/PM/metafileOutputs.js +78 -0
- package/dist/common/src/PM/node.js +0 -6
- package/dist/common/src/PM/pure.js +0 -8
- package/dist/common/src/PM/types.js +1 -0
- package/dist/common/src/PM/utils.js +210 -0
- package/dist/common/src/PM/web.js +0 -6
- package/dist/common/src/ReportServer.js +0 -10
- package/dist/common/src/ReportServerLib.js +0 -140
- package/dist/common/src/components/pure/AppFrame.js +68 -56
- package/dist/common/src/components/pure/ArtifactTree.js +80 -0
- package/dist/common/src/components/pure/BuildLogViewer.js +106 -0
- package/dist/common/src/components/pure/DebugEnv.js +30 -0
- package/dist/common/src/components/pure/FileTree.js +34 -0
- package/dist/common/src/components/pure/FileTreeItem.js +29 -0
- package/dist/common/src/components/pure/GitHubLoginButton.js +18 -0
- package/dist/common/src/components/pure/GitIntegrationView.js +342 -0
- package/dist/common/src/components/pure/ProcessManager.js +1 -0
- package/dist/common/src/components/pure/ProcessManagerView.js +73 -74
- package/dist/common/src/components/pure/ProjectPageView.js +4 -117
- package/dist/common/src/components/pure/Settings.js +121 -0
- package/dist/common/src/components/pure/Settings.test.js +34 -0
- package/dist/common/src/components/pure/SignIn.js +22 -0
- package/dist/common/src/components/pure/SingleProcessView.js +166 -213
- package/dist/common/src/components/pure/TestPageView.js +113 -368
- package/dist/common/src/components/pure/TestPageView_utils.js +117 -0
- package/dist/common/src/components/pure/TestTable.js +33 -0
- package/dist/common/src/components/pure/ToastNotification.js +14 -0
- package/dist/common/src/components/pure/UserProfile.js +27 -0
- package/dist/common/src/components/stateful/AuthCallbackPage.js +51 -0
- package/dist/common/src/components/stateful/FeaturesReporter.js +2 -1
- package/dist/common/src/components/stateful/FileTree.js +58 -39
- package/dist/common/src/components/stateful/GitIntegrationPage.js +12 -0
- package/dist/common/src/components/stateful/ProcessManagerPage.js +13 -15
- package/dist/common/src/components/stateful/ProjectPage.js +6 -5
- package/dist/common/src/components/stateful/ProjectsPage.js +17 -19
- package/dist/common/src/components/stateful/SingleProcessPage.js +16 -26
- package/dist/common/src/components/stateful/TestPage.js +7 -5
- package/dist/common/src/hooks/useGitMode.js +21 -0
- package/dist/common/src/lib/BaseSuite.test/mock.js +15 -8
- package/dist/common/src/lib/BaseSuite.test/test.js +56 -80
- package/dist/common/src/lib/Tiposkripto.js +24 -0
- package/dist/common/src/lib/Tiposkripto.test/MockTiposkripto.js +154 -10
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.adapter.js +6 -12
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +63 -23
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.specification.js +14 -6
- package/dist/common/src/lib/pmProxy.test/specification.js +167 -52
- package/dist/common/src/services/FileService.js +505 -0
- package/dist/common/src/services/GitHubAuthService.js +184 -0
- package/dist/common/src/testeranto.js +38 -97
- package/dist/common/src/utils/api.js +12 -8
- package/dist/common/src/utils/gitTest.js +27 -0
- package/dist/common/src/utils.js +23 -13
- package/dist/common/testeranto.config.js +21 -17
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/design-editor/DesignEditor.js +33 -199
- package/dist/module/src/App.js +121 -15
- package/dist/module/src/PM/PM_WithBuild.js +128 -0
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +79 -67
- package/dist/module/src/PM/PM_WithGit.js +477 -0
- package/dist/module/src/PM/PM_WithProcesses.js +479 -0
- package/dist/module/src/PM/PM_WithWebSocket.js +528 -0
- package/dist/module/src/PM/base.js +62 -0
- package/dist/module/src/PM/main.js +533 -1676
- package/dist/module/src/PM/metafileOutputs.js +78 -0
- package/dist/module/src/PM/node.js +0 -6
- package/dist/module/src/PM/pure.js +0 -8
- package/dist/module/src/PM/types.js +1 -1
- package/dist/module/src/PM/utils.js +196 -0
- package/dist/module/src/PM/web.js +0 -6
- package/dist/module/src/ReportServer.js +1 -9
- package/dist/module/src/ReportServerLib.js +1 -134
- package/dist/module/src/components/pure/AppFrame.js +66 -24
- package/dist/module/src/components/pure/ArtifactTree.js +80 -0
- package/dist/module/src/components/pure/BuildLogViewer.js +99 -0
- package/dist/module/src/components/pure/DebugEnv.js +23 -0
- package/dist/module/src/components/pure/FileTree.js +27 -0
- package/dist/module/src/components/pure/FileTreeItem.js +22 -0
- package/dist/module/src/components/pure/GitHubLoginButton.js +11 -0
- package/dist/module/src/components/pure/GitIntegrationView.js +305 -0
- package/dist/module/src/components/pure/ProcessManager.js +1 -0
- package/dist/module/src/components/pure/ProcessManagerView.js +74 -75
- package/dist/module/src/components/pure/ProjectPageView.js +5 -118
- package/dist/module/src/components/pure/Settings.js +84 -0
- package/dist/module/src/components/pure/Settings.test.js +29 -0
- package/dist/module/src/components/pure/SignIn.js +15 -0
- package/dist/module/src/components/pure/SingleProcessView.js +130 -214
- package/dist/module/src/components/pure/TestPageView.js +97 -352
- package/dist/module/src/components/pure/TestPageView_utils.js +109 -0
- package/dist/module/src/components/pure/TestTable.js +26 -0
- package/dist/module/src/components/pure/ToastNotification.js +7 -0
- package/dist/module/src/components/pure/UserProfile.js +20 -0
- package/dist/module/src/components/stateful/AuthCallbackPage.js +14 -0
- package/dist/module/src/components/stateful/FeaturesReporter.js +2 -1
- package/dist/module/src/components/stateful/FileTree.js +59 -33
- package/dist/module/src/components/stateful/GitIntegrationPage.js +5 -0
- package/dist/module/src/components/stateful/ProcessManagerPage.js +13 -15
- package/dist/module/src/components/stateful/ProjectPage.js +6 -5
- package/dist/module/src/components/stateful/ProjectsPage.js +16 -18
- package/dist/module/src/components/stateful/SingleProcessPage.js +16 -26
- package/dist/module/src/components/stateful/TestPage.js +8 -6
- package/dist/module/src/hooks/useGitMode.js +17 -0
- package/dist/module/src/lib/BaseSuite.test/mock.js +15 -8
- package/dist/module/src/lib/BaseSuite.test/test.js +56 -80
- package/dist/module/src/lib/Tiposkripto.js +24 -0
- package/dist/module/src/lib/Tiposkripto.test/MockTiposkripto.js +154 -10
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.adapter.js +6 -12
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +63 -23
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.specification.js +14 -6
- package/dist/module/src/lib/pmProxy.test/specification.js +167 -52
- package/dist/module/src/services/FileService.js +468 -0
- package/dist/module/src/services/GitHubAuthService.js +180 -0
- package/dist/module/src/testeranto.js +38 -97
- package/dist/module/src/utils/api.js +10 -7
- package/dist/module/src/utils/gitTest.js +23 -0
- package/dist/module/src/utils.js +21 -12
- package/dist/module/testeranto.config.js +21 -17
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/App.css +94 -121
- package/dist/prebuild/App.js +44601 -11225
- package/dist/prebuild/testeranto.mjs +4106 -0
- package/dist/types/design-editor/DesignEditor.d.ts +1 -18
- package/dist/types/src/App.d.ts +18 -0
- package/dist/types/src/PM/PM_WithBuild.d.ts +13 -0
- package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +2 -4
- package/dist/types/src/PM/PM_WithGit.d.ts +27 -0
- package/dist/types/src/PM/PM_WithProcesses.d.ts +29 -0
- package/dist/types/src/PM/PM_WithWebSocket.d.ts +108 -0
- package/dist/types/src/PM/base.d.ts +1 -1
- package/dist/types/src/PM/index.d.ts +0 -2
- package/dist/types/src/PM/main.d.ts +6 -77
- package/dist/types/src/PM/metafileOutputs.d.ts +0 -0
- package/dist/types/src/PM/node.d.ts +0 -2
- package/dist/types/src/PM/pure.d.ts +0 -2
- package/dist/types/src/PM/types.d.ts +118 -0
- package/dist/types/src/PM/utils.d.ts +35 -0
- package/dist/types/src/PM/web.d.ts +0 -2
- package/dist/types/src/Pure.d.ts +6 -1
- package/dist/types/src/ReportServer.d.ts +0 -1
- package/dist/types/src/ReportServerLib.d.ts +0 -1
- package/dist/types/src/Types.d.ts +1 -0
- package/dist/types/src/components/pure/ArtifactTree.d.ts +0 -0
- package/dist/types/src/components/pure/BuildLogViewer.d.ts +7 -0
- package/dist/types/src/components/pure/DebugEnv.d.ts +2 -0
- package/dist/types/src/components/pure/FileTree.d.ts +6 -0
- package/dist/types/src/components/pure/FileTreeItem.d.ts +8 -0
- package/dist/types/src/components/pure/GitHubLoginButton.d.ts +8 -0
- package/dist/types/src/components/pure/GitIntegrationView.d.ts +1 -0
- package/dist/types/src/components/pure/Settings.d.ts +1 -0
- package/dist/types/src/components/pure/Settings.test.d.ts +1 -0
- package/dist/types/src/components/pure/SignIn.d.ts +1 -0
- package/dist/types/src/components/pure/SingleProcessView.d.ts +10 -0
- package/dist/types/src/components/pure/TestPageView.d.ts +2 -1
- package/dist/types/src/components/pure/TestPageView_utils.d.ts +23 -0
- package/dist/types/src/components/pure/TestTable.d.ts +16 -0
- package/dist/types/src/components/pure/ToastNotification.d.ts +6 -0
- package/dist/types/src/components/pure/UserProfile.d.ts +2 -0
- package/dist/types/src/components/stateful/AuthCallbackPage.d.ts +2 -0
- package/dist/types/src/components/stateful/FileTree.d.ts +0 -8
- package/dist/types/src/components/stateful/GitIntegrationPage.d.ts +1 -0
- package/dist/types/src/hooks/useGitMode.d.ts +7 -0
- package/dist/types/src/lib/BaseSuite.test/mock.d.ts +2 -2
- package/dist/types/src/lib/BaseSuite.test/test.d.ts +4 -3
- package/dist/types/src/lib/Tiposkripto.d.ts +2 -0
- package/dist/types/src/lib/Tiposkripto.test/MockTiposkripto.d.ts +3 -0
- package/dist/types/src/lib/Tiposkripto.test/Tiposkripto.types.d.ts +5 -0
- package/dist/types/src/lib/index.d.ts +6 -0
- package/dist/types/src/services/FileService.d.ts +34 -0
- package/dist/types/src/services/GitHubAuthService.d.ts +32 -0
- package/dist/types/src/utils/api.d.ts +1 -0
- package/dist/types/src/utils/gitTest.d.ts +11 -0
- package/dist/types/src/utils.d.ts +3 -3
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/example/__pycache__/Calculator.cpython-313.pyc +0 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/README.md +187 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_given.go +163 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_suite.go +85 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_then.go +21 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/base_when.go +21 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/golingvu.go +554 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/test_adapter.go +33 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/types.go +72 -0
- package/example/vendor/modules.txt +5 -0
- package/git-integration-plan.md +395 -0
- package/package.json +26 -14
- package/src/App.tsx +169 -18
- package/src/PM/PM_WithBuild.ts +171 -0
- package/src/PM/PM_WithEslintAndTsc.ts +109 -86
- package/src/PM/PM_WithGit.ts +585 -0
- package/src/PM/PM_WithProcesses.ts +639 -0
- package/src/PM/PM_WithWebSocket.ts +631 -0
- package/src/PM/base.ts +63 -1
- package/src/PM/index.ts +8 -5
- package/src/PM/main.ts +672 -2050
- package/src/PM/metafileOutputs.ts +90 -0
- package/src/PM/node.ts +18 -18
- package/src/PM/pure.ts +5 -13
- package/src/PM/types.ts +145 -0
- package/src/PM/utils.ts +256 -0
- package/src/PM/web.ts +8 -8
- package/src/README.md +122 -0
- package/src/ReportServer.ts +0 -12
- package/src/ReportServerLib.ts +0 -147
- package/src/Types.ts +1 -0
- package/src/app.scss +14 -164
- package/src/components/pure/AppFrame.tsx +237 -71
- package/src/components/pure/ArtifactTree.tsx +82 -0
- package/src/components/pure/BuildLogViewer.tsx +168 -0
- package/src/components/pure/DebugEnv.tsx +30 -0
- package/src/components/pure/FileTree.tsx +58 -0
- package/src/components/pure/FileTreeItem.tsx +49 -0
- package/src/components/pure/GitHubLoginButton.tsx +31 -0
- package/src/components/pure/GitIntegrationView.tsx +443 -0
- package/src/components/pure/ProcessManager.tsx +6 -5
- package/src/components/pure/ProcessManagerView.tsx +162 -166
- package/src/components/pure/ProjectPageView.tsx +6 -224
- package/src/components/pure/Settings.test.tsx +34 -0
- package/src/components/pure/Settings.tsx +163 -0
- package/src/components/pure/SignIn.tsx +33 -0
- package/src/components/pure/SingleProcessView.tsx +231 -235
- package/src/components/pure/TestPageView.test/specification.ts +1 -0
- package/src/components/pure/TestPageView.tsx +317 -826
- package/src/components/pure/TestPageView_utils.tsx +285 -0
- package/src/components/pure/TestTable.tsx +88 -0
- package/src/components/pure/ToastNotification.tsx +19 -0
- package/src/components/pure/UserProfile.tsx +44 -0
- package/src/components/stateful/AuthCallbackPage.tsx +21 -0
- package/src/components/stateful/FeaturesReporter.tsx +3 -1
- package/src/components/stateful/FileTree.tsx +58 -58
- package/src/components/stateful/GitIntegrationPage.tsx +8 -0
- package/src/components/stateful/ProcessManagerPage.tsx +13 -17
- package/src/components/stateful/ProjectPage.tsx +6 -5
- package/src/components/stateful/ProjectsPage.tsx +17 -19
- package/src/components/stateful/SVGEditor/CircleForm.tsx +68 -0
- package/src/components/stateful/SVGEditor/GroupForm.tsx +56 -0
- package/src/components/stateful/SVGEditor/RectForm.tsx +74 -0
- package/src/components/stateful/SVGEditor/SVGAttributeField.tsx +29 -0
- package/src/components/stateful/SVGEditor/SVGAttributesEditor.tsx +73 -0
- package/src/components/stateful/SVGEditor/SVGEditorControls.tsx +45 -0
- package/src/components/stateful/SVGEditor/SVGElementForm.tsx +45 -0
- package/src/components/stateful/SVGEditor/SVGPreview.tsx +225 -0
- package/src/components/stateful/SVGEditor/SVGTextEditor.tsx +166 -0
- package/src/components/stateful/SVGEditor/SVGTree.tsx +159 -0
- package/src/components/stateful/SVGEditor/SVGTypes.ts +36 -0
- package/src/components/stateful/SVGEditor/svg.xsd.xml +3038 -0
- package/src/components/stateful/SVGEditorPage.tsx +503 -0
- package/src/components/stateful/SingleProcessPage.tsx +18 -31
- package/src/components/stateful/TestPage.tsx +25 -22
- package/src/golingvu/golingvu.go +38 -2
- package/src/hooks/useGitMode.ts +20 -0
- package/src/lib/BaseSuite.test/mock.ts +16 -10
- package/src/lib/BaseSuite.test/test.ts +144 -103
- package/src/lib/Tiposkripto.test/MockTiposkripto.ts +178 -14
- package/src/lib/Tiposkripto.test/Tiposkripto.adapter.ts +9 -14
- package/src/lib/Tiposkripto.test/Tiposkripto.implementation.ts +78 -38
- package/src/lib/Tiposkripto.test/Tiposkripto.specification.ts +51 -9
- package/src/lib/Tiposkripto.test/Tiposkripto.types.ts +5 -0
- package/src/lib/Tiposkripto.ts +27 -0
- package/src/lib/index.ts +7 -0
- package/src/lib/pmProxy.test/specification.ts +168 -166
- package/src/pitono/PM/__pycache__/python.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/Pitono.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/base_given.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/base_suite.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/base_then.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/base_when.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/core_generator.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/simple_adapter.cpython-313.pyc +0 -0
- package/src/pitono/__pycache__/types.cpython-313.pyc +0 -0
- package/src/services/FileService.ts +542 -0
- package/src/services/GitHubAuthService.ts +240 -0
- package/src/testeranto.ts +62 -140
- package/src/utils/api.ts +15 -13
- package/src/utils/gitTest.ts +29 -0
- package/src/utils.ts +21 -12
- package/testeranto/App.css +94 -121
- package/testeranto/App.js +44601 -11225
- package/testeranto/bundles/golang/core/Calculator.golingvu.go +53 -0
- package/testeranto/bundles/golang/core/Calculator.golingvu.golingvu.go +53 -0
- package/testeranto/bundles/node/core/chunk-RIM6RECA.mjs +1170 -0
- package/testeranto/bundles/node/core/chunk-VXVF7WFO.mjs +4321 -0
- package/testeranto/bundles/node/core/example/Calculator.test.mjs +503 -0
- package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +94 -1231
- package/testeranto/bundles/node/core/src/lib/TipoSkripto.test/TipoSkripto.mjs +574 -0
- package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +482 -0
- package/testeranto/bundles/pure/core/chunk-XYOCRDEQ.mjs +1080 -0
- package/testeranto/bundles/pure/core/src/Pure.test.mjs +410 -0
- package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +93 -1146
- package/testeranto/bundles/python/core/Calculator.pitono.test.py +24 -0
- package/testeranto/bundles/python/core/test_example.py +24 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Black-O75GP5JI.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Bold-R524Q5BH.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-ExtraBold-C6GRMYVT.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Light-WKN65Y2C.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Medium-ZC4DWL7C.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Regular-DT6EKZ3S.ttf +0 -0
- package/testeranto/bundles/web/core/MPLUSRounded1c-Thin-YWDNVG6M.ttf +0 -0
- package/testeranto/bundles/web/core/chunk-DFRN4SYZ.mjs +2297 -0
- package/testeranto/bundles/web/core/chunk-JMDLMADH.mjs +27996 -0
- package/testeranto/bundles/web/core/chunk-LQMU5NCG.mjs +3082 -0
- package/testeranto/bundles/web/core/chunk-Q5TONB2Z.mjs +6874 -0
- package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.mjs +164 -0
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.css +11697 -0
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.mjs +336 -0
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.css +11697 -0
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +517 -0
- package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.mjs +107 -1134
- package/testeranto/metafiles/golang/core.json +3 -3
- package/testeranto/metafiles/node/core.json +474 -31
- package/testeranto/metafiles/pure/core.json +144 -28
- package/testeranto/metafiles/python/core.json +11 -0
- package/testeranto/metafiles/web/core.json +15829 -45
- package/testeranto/reports/core/config.json +40 -0
- package/testeranto/reports/core/src/Pure.test/pure/exit.log +0 -0
- package/testeranto/reports/core/src/Pure.test/pure/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/Pure.test/pure/prompt.txt +14 -0
- package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +73 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/debug.log +0 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +91 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/exit.log +1 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +2 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/tests.json +68 -0
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/warn.log +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/debug.log +0 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +30 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/exit.log +1 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +2 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/tests.json +88 -0
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/warn.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/lint_errors.txt +0 -6
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +0 -11
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stdout.log +1 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +1 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +35 -38
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/lint_errors.txt +0 -2
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +0 -10
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +40 -38
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +1 -1
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/exit.log +1 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/message.txt +17 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/prompt.txt +17 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stderr.log +55 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stdout.log +191 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/type_errors.txt +71 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +1 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/lint_errors.txt +15 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/message.txt +17 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/prompt.txt +17 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +20 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stdout.log +4 -0
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +49 -0
- package/testeranto/reports/core/summary.json +34 -6
- package/testeranto.config.ts +26 -20
- package/tsc.log +141 -91
- package/tsconfig.json +6 -2
- package/dist/prebuild/ReportServer.mjs +0 -227
- package/dist/prebuild/mothership/index.mjs +0 -22
- package/dist/types/design-editor/server.d.ts +0 -1
- package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.html +0 -15
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/lint_errors.txt +0 -2
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/prompt.txt +0 -25
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/type_errors.txt +0 -56
- /package/testeranto/reports/core/src/{lib/BaseSuite.test/web.test/web → Pure.test/pure}/message.txt +0 -0
package/src/App.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState, useEffect, createContext, useContext } from 'react';
|
|
2
2
|
import ReactDom from "react-dom/client";
|
|
3
3
|
import { HashRouter as Router, Routes, Route } from 'react-router-dom';
|
|
4
4
|
|
|
@@ -6,32 +6,183 @@ import { TestPage } from './components/stateful/TestPage';
|
|
|
6
6
|
import { ProjectPage } from './components/stateful/ProjectPage';
|
|
7
7
|
import { ProjectsPage } from './components/stateful/ProjectsPage';
|
|
8
8
|
import { AppFrame } from './components/pure/AppFrame';
|
|
9
|
+
import { SignIn } from './components/pure/SignIn';
|
|
9
10
|
import { FeaturesReporter } from './components/stateful/FeaturesReporter';
|
|
10
11
|
import { DesignEditorPage } from './components/DesignEditorPage';
|
|
11
12
|
import { TextEditorPage } from './components/stateful/TextEditorPage';
|
|
12
13
|
import { ProcessManagerPage } from './components/stateful/ProcessManagerPage';
|
|
13
14
|
import { SingleProcessPage } from './components/stateful/SingleProcessPage';
|
|
14
|
-
import {
|
|
15
|
+
import { Settings } from './components/pure/Settings';
|
|
16
|
+
import { GitIntegrationPage } from './components/stateful/GitIntegrationPage';
|
|
17
|
+
import { AuthCallbackPage } from './components/stateful/AuthCallbackPage';
|
|
18
|
+
import { githubAuthService } from './services/GitHubAuthService';
|
|
19
|
+
import { SVGEditorPage } from './components/stateful/SVGEditorPage';
|
|
15
20
|
|
|
21
|
+
interface WebSocketContextType {
|
|
22
|
+
ws: WebSocket | null;
|
|
23
|
+
isConnected: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface TutorialModeContextType {
|
|
27
|
+
tutorialMode: boolean;
|
|
28
|
+
setTutorialMode: (mode: boolean) => void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface AuthContextType {
|
|
32
|
+
isAuthenticated: boolean;
|
|
33
|
+
user: any;
|
|
34
|
+
login: () => void;
|
|
35
|
+
logout: () => void;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Create a context for the WebSocket
|
|
39
|
+
const WebSocketContext = createContext<WebSocketContextType>({
|
|
40
|
+
ws: null,
|
|
41
|
+
isConnected: false,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// Create a context for tutorial mode
|
|
45
|
+
const TutorialModeContext = createContext<TutorialModeContextType>({
|
|
46
|
+
tutorialMode: false,
|
|
47
|
+
setTutorialMode: () => {},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Create a context for authentication
|
|
51
|
+
const AuthContext = createContext<AuthContextType>({
|
|
52
|
+
isAuthenticated: false,
|
|
53
|
+
user: null,
|
|
54
|
+
login: () => {},
|
|
55
|
+
logout: () => {},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const useWebSocket = () => {
|
|
59
|
+
return useContext(WebSocketContext);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const useTutorialMode = () => {
|
|
63
|
+
return useContext(TutorialModeContext);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const useAuth = () => {
|
|
67
|
+
return useContext(AuthContext);
|
|
68
|
+
};
|
|
16
69
|
|
|
17
70
|
export const App = () => {
|
|
71
|
+
const [ws, setWs] = useState<WebSocket | null>(null);
|
|
72
|
+
const [isConnected, setIsConnected] = useState(false);
|
|
73
|
+
const [tutorialMode, setTutorialMode] = useState(false);
|
|
74
|
+
const [isAuthenticated, setIsAuthenticated] = useState(githubAuthService.isAuthenticated);
|
|
75
|
+
const [user, setUser] = useState(githubAuthService.userInfo);
|
|
76
|
+
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
// Load tutorial mode from localStorage
|
|
79
|
+
const savedTutorialMode = localStorage.getItem('tutorialMode');
|
|
80
|
+
if (savedTutorialMode) {
|
|
81
|
+
setTutorialMode(savedTutorialMode === 'true');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Listen for auth changes
|
|
85
|
+
const handleAuthChange = (authenticated: boolean) => {
|
|
86
|
+
setIsAuthenticated(authenticated);
|
|
87
|
+
setUser(githubAuthService.userInfo);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
githubAuthService.on('authChange', handleAuthChange);
|
|
91
|
+
|
|
92
|
+
// Handle GitHub OAuth callback from popup
|
|
93
|
+
const handleMessage = async (event: MessageEvent) => {
|
|
94
|
+
if (event.data.type === 'github-auth-callback') {
|
|
95
|
+
const { code } = event.data;
|
|
96
|
+
try {
|
|
97
|
+
const success = await githubAuthService.handleCallback(code);
|
|
98
|
+
if (success) {
|
|
99
|
+
console.log('GitHub authentication successful');
|
|
100
|
+
} else {
|
|
101
|
+
console.error('GitHub authentication failed');
|
|
102
|
+
}
|
|
103
|
+
} catch (error) {
|
|
104
|
+
console.error('Error handling GitHub callback:', error);
|
|
105
|
+
}
|
|
106
|
+
} else if (event.data.type === 'github-auth-error') {
|
|
107
|
+
console.error('GitHub authentication error:', event.data.error);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
window.addEventListener('message', handleMessage);
|
|
112
|
+
|
|
113
|
+
const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
114
|
+
const wsUrl = `${wsProtocol}//${window.location.host}`;
|
|
115
|
+
const websocket = new WebSocket(wsUrl);
|
|
116
|
+
|
|
117
|
+
websocket.onopen = () => {
|
|
118
|
+
console.log('WebSocket connected');
|
|
119
|
+
setWs(websocket);
|
|
120
|
+
setIsConnected(true);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
websocket.onclose = () => {
|
|
124
|
+
console.log('WebSocket disconnected');
|
|
125
|
+
setWs(null);
|
|
126
|
+
setIsConnected(false);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
websocket.onerror = (error) => {
|
|
130
|
+
console.error('WebSocket error:', error);
|
|
131
|
+
setIsConnected(false);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
return () => {
|
|
135
|
+
githubAuthService.off('authChange', handleAuthChange);
|
|
136
|
+
window.removeEventListener('message', handleMessage);
|
|
137
|
+
websocket.close();
|
|
138
|
+
};
|
|
139
|
+
}, []);
|
|
140
|
+
|
|
141
|
+
const authContextValue = {
|
|
142
|
+
isAuthenticated,
|
|
143
|
+
user,
|
|
144
|
+
login: () => githubAuthService.initiateLogin(),
|
|
145
|
+
logout: () => githubAuthService.logout(),
|
|
146
|
+
};
|
|
147
|
+
|
|
18
148
|
return (
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
149
|
+
<WebSocketContext.Provider value={{ ws, isConnected }}>
|
|
150
|
+
<TutorialModeContext.Provider value={{ tutorialMode, setTutorialMode }}>
|
|
151
|
+
<AuthContext.Provider value={authContextValue}>
|
|
152
|
+
<Router>
|
|
153
|
+
<AppFrame>
|
|
154
|
+
<Routes>
|
|
155
|
+
{/* Public routes */}
|
|
156
|
+
<Route path="/" element={<ProjectsPage />} />
|
|
157
|
+
<Route path="/projects/:projectName" element={<ProjectPage />} />
|
|
158
|
+
<Route path="/projects/:projectName/tests/*" element={<TestPage />} />
|
|
159
|
+
<Route path="/projects/:projectName#:tab" element={<ProjectPage />} />
|
|
160
|
+
<Route path="/signin" element={<SignIn />} />
|
|
161
|
+
<Route path="/auth/github/callback" element={<AuthCallbackPage />} />
|
|
162
|
+
|
|
163
|
+
{/* Protected routes - handle authentication within components */}
|
|
164
|
+
<Route path="/features-reporter" element={isAuthenticated ? <FeaturesReporter /> : <SignIn />} />
|
|
165
|
+
<Route path="/design-editor" element={isAuthenticated ? <DesignEditorPage /> : <SignIn />} />
|
|
166
|
+
<Route path="/text-editor" element={isAuthenticated ? <TextEditorPage /> : <SignIn />} />
|
|
167
|
+
{/* Conditionally render process-related routes only if WebSocket is connected */}
|
|
168
|
+
{isConnected ? (
|
|
169
|
+
<>
|
|
170
|
+
<Route path="/processes" element={isAuthenticated ? <ProcessManagerPage /> : <SignIn />} />
|
|
171
|
+
<Route path="/processes/:processId" element={isAuthenticated ? <SingleProcessPage /> : <SignIn />} />
|
|
172
|
+
</>
|
|
173
|
+
) : null}
|
|
174
|
+
<Route path="/settings" element={<Settings />} />
|
|
175
|
+
<Route path="/git" element={isAuthenticated ? <GitIntegrationPage /> : <SignIn />} />
|
|
176
|
+
<Route path="/svg-editor" element={isAuthenticated ? <SVGEditorPage /> : <SignIn />} />
|
|
177
|
+
|
|
178
|
+
{/* Catch all - redirect to home for logged out users */}
|
|
179
|
+
<Route path="*" element={<ProjectsPage />} />
|
|
180
|
+
</Routes>
|
|
181
|
+
</AppFrame>
|
|
182
|
+
</Router>
|
|
183
|
+
</AuthContext.Provider>
|
|
184
|
+
</TutorialModeContext.Provider>
|
|
185
|
+
</WebSocketContext.Provider>
|
|
35
186
|
);
|
|
36
187
|
};
|
|
37
188
|
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
import esbuild from "esbuild";
|
|
3
|
+
|
|
4
|
+
import { IBuiltConfig } from "../Types.js";
|
|
5
|
+
import esbuildNodeConfiger from "../esbuildConfigs/node.js";
|
|
6
|
+
import esbuildWebConfiger from "../esbuildConfigs/web.js";
|
|
7
|
+
import esbuildImportConfiger from "../esbuildConfigs/pure.js";
|
|
8
|
+
import { getRunnables } from "../utils.js";
|
|
9
|
+
|
|
10
|
+
import { PM_WithWebSocket } from "./PM_WithWebSocket.js";
|
|
11
|
+
|
|
12
|
+
export abstract class PM_WithBuild extends PM_WithWebSocket {
|
|
13
|
+
configs: IBuiltConfig;
|
|
14
|
+
name: string;
|
|
15
|
+
mode: "once" | "dev";
|
|
16
|
+
currentBuildResolve: (() => void) | null = null;
|
|
17
|
+
currentBuildReject: ((error: any) => void) | null = null;
|
|
18
|
+
|
|
19
|
+
constructor(configs: IBuiltConfig, name: string, mode: "once" | "dev") {
|
|
20
|
+
super(configs);
|
|
21
|
+
this.configs = configs;
|
|
22
|
+
this.name = name;
|
|
23
|
+
this.mode = mode;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async startBuildProcesses(): Promise<void> {
|
|
27
|
+
const { nodeEntryPoints, webEntryPoints, pureEntryPoints } = getRunnables(
|
|
28
|
+
this.configs.tests,
|
|
29
|
+
this.name
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
console.log(`Starting build processes for ${this.name}...`);
|
|
33
|
+
console.log(` Node entry points: ${Object.keys(nodeEntryPoints).length}`);
|
|
34
|
+
console.log(` Web entry points: ${Object.keys(webEntryPoints).length}`);
|
|
35
|
+
console.log(` Pure entry points: ${Object.keys(pureEntryPoints).length}`);
|
|
36
|
+
|
|
37
|
+
// Start all build processes (only node, web, pure)
|
|
38
|
+
await Promise.all([
|
|
39
|
+
this.startBuildProcess(esbuildNodeConfiger, nodeEntryPoints, "node"),
|
|
40
|
+
this.startBuildProcess(esbuildWebConfiger, webEntryPoints, "web"),
|
|
41
|
+
this.startBuildProcess(esbuildImportConfiger, pureEntryPoints, "pure"),
|
|
42
|
+
]);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private async startBuildProcess(
|
|
46
|
+
configer: (
|
|
47
|
+
config: IBuiltConfig,
|
|
48
|
+
entryPoints: string[],
|
|
49
|
+
testName: string
|
|
50
|
+
) => any,
|
|
51
|
+
entryPoints: Record<string, string>,
|
|
52
|
+
runtime: string
|
|
53
|
+
): Promise<void> {
|
|
54
|
+
const entryPointKeys = Object.keys(entryPoints);
|
|
55
|
+
if (entryPointKeys.length === 0) return;
|
|
56
|
+
|
|
57
|
+
// Store reference to 'this' for use in the plugin
|
|
58
|
+
const self = this;
|
|
59
|
+
|
|
60
|
+
// Create a custom plugin to track build processes
|
|
61
|
+
const buildProcessTrackerPlugin = {
|
|
62
|
+
name: 'build-process-tracker',
|
|
63
|
+
setup(build) {
|
|
64
|
+
build.onStart(() => {
|
|
65
|
+
const processId = `build-${runtime}-${Date.now()}`;
|
|
66
|
+
const command = `esbuild ${runtime} for ${self.name}`;
|
|
67
|
+
|
|
68
|
+
// Create a promise that will resolve when the build completes
|
|
69
|
+
const buildPromise = new Promise<void>((resolve, reject) => {
|
|
70
|
+
// Store resolve and reject functions to call them in onEnd
|
|
71
|
+
self.currentBuildResolve = resolve;
|
|
72
|
+
self.currentBuildReject = reject;
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Add to process manager
|
|
76
|
+
if (self.addPromiseProcess) {
|
|
77
|
+
self.addPromiseProcess(
|
|
78
|
+
processId,
|
|
79
|
+
buildPromise,
|
|
80
|
+
command,
|
|
81
|
+
"build-time",
|
|
82
|
+
self.name,
|
|
83
|
+
runtime as any
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
console.log(`Starting ${runtime} build for ${entryPointKeys.length} entry points`);
|
|
88
|
+
// Broadcast build start event
|
|
89
|
+
if (self.broadcast) {
|
|
90
|
+
self.broadcast({
|
|
91
|
+
type: "buildEvent",
|
|
92
|
+
event: "start",
|
|
93
|
+
runtime,
|
|
94
|
+
timestamp: new Date().toISOString(),
|
|
95
|
+
entryPoints: entryPointKeys.length,
|
|
96
|
+
processId
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
build.onEnd((result) => {
|
|
102
|
+
const event = {
|
|
103
|
+
type: "buildEvent",
|
|
104
|
+
event: result.errors.length > 0 ? "error" : "success",
|
|
105
|
+
runtime,
|
|
106
|
+
timestamp: new Date().toISOString(),
|
|
107
|
+
errors: result.errors.length,
|
|
108
|
+
warnings: result.warnings.length
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
if (result.errors.length > 0) {
|
|
112
|
+
console.error(`Build ${runtime} failed with ${result.errors.length} errors`);
|
|
113
|
+
if (self.currentBuildReject) {
|
|
114
|
+
self.currentBuildReject(new Error(`Build failed with ${result.errors.length} errors`));
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
console.log(`Build ${runtime} completed successfully`);
|
|
118
|
+
if (self.currentBuildResolve) {
|
|
119
|
+
self.currentBuildResolve();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Broadcast build result event
|
|
124
|
+
if (self.broadcast) {
|
|
125
|
+
self.broadcast(event);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Clear the current build handlers
|
|
129
|
+
self.currentBuildResolve = null;
|
|
130
|
+
self.currentBuildReject = null;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// Get the base config and add our tracking plugin
|
|
136
|
+
const baseConfig = configer(this.configs, entryPointKeys, this.name);
|
|
137
|
+
const configWithPlugin = {
|
|
138
|
+
...baseConfig,
|
|
139
|
+
plugins: [...(baseConfig.plugins || []), buildProcessTrackerPlugin]
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
try {
|
|
143
|
+
const ctx = await esbuild.context(configWithPlugin);
|
|
144
|
+
|
|
145
|
+
if (this.mode === "dev") {
|
|
146
|
+
// In dev mode, start watching - each rebuild will be tracked as a separate process
|
|
147
|
+
await ctx.watch();
|
|
148
|
+
} else {
|
|
149
|
+
// In once mode, do a single build which will be tracked by the plugin
|
|
150
|
+
const result = await ctx.rebuild();
|
|
151
|
+
await ctx.dispose();
|
|
152
|
+
}
|
|
153
|
+
} catch (error) {
|
|
154
|
+
console.error(`Failed to start ${runtime} build context:`, error);
|
|
155
|
+
// Broadcast error event
|
|
156
|
+
if (this.broadcast) {
|
|
157
|
+
this.broadcast({
|
|
158
|
+
type: "buildEvent",
|
|
159
|
+
event: "error",
|
|
160
|
+
runtime,
|
|
161
|
+
timestamp: new Date().toISOString(),
|
|
162
|
+
errors: 1,
|
|
163
|
+
warnings: 0,
|
|
164
|
+
message: error.message
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
abstract onBuildDone(): void;
|
|
171
|
+
}
|
|
@@ -12,7 +12,7 @@ import tsc from "tsc-prog";
|
|
|
12
12
|
import { lintPather, tscPather } from "../utils";
|
|
13
13
|
import { IBuiltConfig, IRunTime, ISummary } from "../Types.js";
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { PM_WithBuild } from "./PM_WithBuild.js";
|
|
16
16
|
import { makePromptInternal } from "../utils/makePrompt";
|
|
17
17
|
|
|
18
18
|
const eslint = new ESLint();
|
|
@@ -20,16 +20,12 @@ const formatter = await eslint.loadFormatter(
|
|
|
20
20
|
"./node_modules/testeranto/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs"
|
|
21
21
|
);
|
|
22
22
|
|
|
23
|
-
export abstract class PM_WithEslintAndTsc extends
|
|
24
|
-
name: string;
|
|
25
|
-
mode: "once" | "dev";
|
|
23
|
+
export abstract class PM_WithEslintAndTsc extends PM_WithBuild {
|
|
26
24
|
summary: ISummary = {};
|
|
27
25
|
|
|
28
26
|
constructor(configs: IBuiltConfig, name: string, mode: "once" | "dev") {
|
|
29
|
-
super(configs);
|
|
27
|
+
super(configs, name, mode);
|
|
30
28
|
|
|
31
|
-
this.name = name;
|
|
32
|
-
this.mode = mode;
|
|
33
29
|
this.summary = {};
|
|
34
30
|
|
|
35
31
|
// Initialize all test entries first
|
|
@@ -50,59 +46,71 @@ export abstract class PM_WithEslintAndTsc extends PM_Base {
|
|
|
50
46
|
entrypoint: string;
|
|
51
47
|
addableFiles: string[];
|
|
52
48
|
}) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const program = tsc.createProgramFromConfig({
|
|
65
|
-
basePath: process.cwd(), // always required, used for relative paths
|
|
66
|
-
configFilePath: "tsconfig.json", // config to inherit from (optional)
|
|
67
|
-
compilerOptions: {
|
|
68
|
-
outDir: tscPather(entrypoint, platform, this.name),
|
|
69
|
-
// declaration: true,
|
|
70
|
-
// skipLibCheck: true,
|
|
71
|
-
noEmit: true,
|
|
72
|
-
},
|
|
73
|
-
include: addableFiles, //["src/**/*"],
|
|
74
|
-
// exclude: ["node_modules", "../testeranto"],
|
|
75
|
-
// exclude: ["**/*.test.ts", "**/*.spec.ts"],
|
|
76
|
-
});
|
|
77
|
-
const tscPath = tscPather(entrypoint, platform, this.name);
|
|
78
|
-
|
|
79
|
-
const allDiagnostics = program.getSemanticDiagnostics();
|
|
80
|
-
|
|
81
|
-
const results: string[] = [];
|
|
82
|
-
allDiagnostics.forEach((diagnostic) => {
|
|
83
|
-
if (diagnostic.file) {
|
|
84
|
-
const { line, character } = ts.getLineAndCharacterOfPosition(
|
|
85
|
-
diagnostic.file,
|
|
86
|
-
diagnostic.start!
|
|
87
|
-
);
|
|
88
|
-
const message = ts.flattenDiagnosticMessageText(
|
|
89
|
-
diagnostic.messageText,
|
|
90
|
-
"\n"
|
|
91
|
-
);
|
|
92
|
-
results.push(
|
|
93
|
-
`${diagnostic.file.fileName} (${line + 1},${
|
|
94
|
-
character + 1
|
|
95
|
-
}): ${message}`
|
|
96
|
-
);
|
|
97
|
-
} else {
|
|
98
|
-
results.push(
|
|
99
|
-
ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n")
|
|
100
|
-
);
|
|
49
|
+
const processId = `tsc-${entrypoint}-${Date.now()}`;
|
|
50
|
+
const command = `tsc check for ${entrypoint}`;
|
|
51
|
+
|
|
52
|
+
const tscPromise = (async () => {
|
|
53
|
+
try {
|
|
54
|
+
this.typeCheckIsRunning(entrypoint);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
// Log error through process manager
|
|
57
|
+
throw new Error(`Error in tscCheck: ${e.message}`);
|
|
101
58
|
}
|
|
102
|
-
});
|
|
103
59
|
|
|
104
|
-
|
|
105
|
-
|
|
60
|
+
const program = tsc.createProgramFromConfig({
|
|
61
|
+
basePath: process.cwd(),
|
|
62
|
+
configFilePath: "tsconfig.json",
|
|
63
|
+
compilerOptions: {
|
|
64
|
+
outDir: tscPather(entrypoint, platform, this.name),
|
|
65
|
+
noEmit: true,
|
|
66
|
+
},
|
|
67
|
+
include: addableFiles,
|
|
68
|
+
});
|
|
69
|
+
const tscPath = tscPather(entrypoint, platform, this.name);
|
|
70
|
+
|
|
71
|
+
const allDiagnostics = program.getSemanticDiagnostics();
|
|
72
|
+
|
|
73
|
+
const results: string[] = [];
|
|
74
|
+
allDiagnostics.forEach((diagnostic) => {
|
|
75
|
+
if (diagnostic.file) {
|
|
76
|
+
const { line, character } = ts.getLineAndCharacterOfPosition(
|
|
77
|
+
diagnostic.file,
|
|
78
|
+
diagnostic.start!
|
|
79
|
+
);
|
|
80
|
+
const message = ts.flattenDiagnosticMessageText(
|
|
81
|
+
diagnostic.messageText,
|
|
82
|
+
"\n"
|
|
83
|
+
);
|
|
84
|
+
results.push(
|
|
85
|
+
`${diagnostic.file.fileName} (${line + 1},${
|
|
86
|
+
character + 1
|
|
87
|
+
}): ${message}`
|
|
88
|
+
);
|
|
89
|
+
} else {
|
|
90
|
+
results.push(
|
|
91
|
+
ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n")
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
fs.writeFileSync(tscPath, results.join("\n"));
|
|
97
|
+
this.typeCheckIsNowDone(entrypoint, results.length);
|
|
98
|
+
return results.length;
|
|
99
|
+
})();
|
|
100
|
+
|
|
101
|
+
// Add to process manager if available
|
|
102
|
+
if (this.addPromiseProcess) {
|
|
103
|
+
this.addPromiseProcess(
|
|
104
|
+
processId,
|
|
105
|
+
tscPromise,
|
|
106
|
+
command,
|
|
107
|
+
"build-time",
|
|
108
|
+
entrypoint
|
|
109
|
+
);
|
|
110
|
+
} else {
|
|
111
|
+
// Fallback to just running the promise
|
|
112
|
+
await tscPromise;
|
|
113
|
+
}
|
|
106
114
|
};
|
|
107
115
|
|
|
108
116
|
eslintCheck = async (
|
|
@@ -110,32 +118,46 @@ export abstract class PM_WithEslintAndTsc extends PM_Base {
|
|
|
110
118
|
platform: IRunTime,
|
|
111
119
|
addableFiles: string[]
|
|
112
120
|
) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
process.exit(-1);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const filepath = lintPather(entrypoint, platform, this.name);
|
|
126
|
-
if (fs.existsSync(filepath)) fs.rmSync(filepath);
|
|
127
|
-
const results = (await eslint.lintFiles(addableFiles))
|
|
128
|
-
.filter((r) => r.messages.length)
|
|
129
|
-
.filter((r) => {
|
|
130
|
-
return r.messages[0].ruleId !== null;
|
|
131
|
-
})
|
|
132
|
-
.map((r) => {
|
|
133
|
-
delete r.source;
|
|
134
|
-
return r;
|
|
135
|
-
});
|
|
121
|
+
const processId = `eslint-${entrypoint}-${Date.now()}`;
|
|
122
|
+
const command = `eslint check for ${entrypoint}`;
|
|
123
|
+
|
|
124
|
+
const eslintPromise = (async () => {
|
|
125
|
+
try {
|
|
126
|
+
this.lintIsRunning(entrypoint);
|
|
127
|
+
} catch (e) {
|
|
128
|
+
throw new Error(`Error in eslintCheck: ${e.message}`);
|
|
129
|
+
}
|
|
136
130
|
|
|
137
|
-
|
|
138
|
-
|
|
131
|
+
const filepath = lintPather(entrypoint, platform, this.name);
|
|
132
|
+
if (fs.existsSync(filepath)) fs.rmSync(filepath);
|
|
133
|
+
const results = (await eslint.lintFiles(addableFiles))
|
|
134
|
+
.filter((r) => r.messages.length)
|
|
135
|
+
.filter((r) => {
|
|
136
|
+
return r.messages[0].ruleId !== null;
|
|
137
|
+
})
|
|
138
|
+
.map((r) => {
|
|
139
|
+
delete r.source;
|
|
140
|
+
return r;
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
fs.writeFileSync(filepath, await formatter.format(results));
|
|
144
|
+
this.lintIsNowDone(entrypoint, results.length);
|
|
145
|
+
return results.length;
|
|
146
|
+
})();
|
|
147
|
+
|
|
148
|
+
// Add to process manager if available
|
|
149
|
+
if (this.addPromiseProcess) {
|
|
150
|
+
this.addPromiseProcess(
|
|
151
|
+
processId,
|
|
152
|
+
eslintPromise,
|
|
153
|
+
command,
|
|
154
|
+
"build-time",
|
|
155
|
+
entrypoint
|
|
156
|
+
);
|
|
157
|
+
} else {
|
|
158
|
+
// Fallback to just running the promise
|
|
159
|
+
await eslintPromise;
|
|
160
|
+
}
|
|
139
161
|
};
|
|
140
162
|
|
|
141
163
|
makePrompt = async (
|
|
@@ -241,14 +263,15 @@ export abstract class PM_WithEslintAndTsc extends PM_Base {
|
|
|
241
263
|
};
|
|
242
264
|
|
|
243
265
|
writeBigBoard = () => {
|
|
266
|
+
// note: this path is different from the one used by front end
|
|
244
267
|
const summaryPath = `./testeranto/reports/${this.name}/summary.json`;
|
|
245
268
|
const summaryData = JSON.stringify(this.summary, null, 2);
|
|
246
269
|
fs.writeFileSync(summaryPath, summaryData);
|
|
247
|
-
|
|
270
|
+
|
|
248
271
|
// Broadcast the update
|
|
249
272
|
this.broadcast({
|
|
250
|
-
type:
|
|
251
|
-
data: this.summary
|
|
273
|
+
type: "summaryUpdate",
|
|
274
|
+
data: this.summary,
|
|
252
275
|
});
|
|
253
276
|
};
|
|
254
277
|
|