testeranto 0.202.0 → 0.205.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/.vscode/settings.json +1 -0
- package/Dockerfile.golang +14 -0
- package/Dockerfile.mothership +11 -0
- package/Dockerfile.node +9 -0
- package/Dockerfile.python +19 -0
- package/Dockerfile.web +9 -0
- package/README.md +26 -1
- package/UX/chache/index.md +11 -0
- package/bundle.js +2 -11
- package/dist/cjs-shim.js +2 -0
- package/dist/common/example/Calculator.js +105 -0
- package/dist/common/example/Calculator.test.adapter.js +39 -0
- package/dist/common/example/Calculator.test.implementation.js +50 -0
- package/dist/common/example/Calculator.test.js +11 -0
- package/dist/common/example/Calculator.test.specification.js +92 -0
- package/dist/common/example/Calculator.test.types.js +3 -0
- package/dist/common/scripts/build-example.js +105 -0
- package/dist/common/src/Helpo.js +55 -0
- package/dist/common/src/Init.js +9 -1
- package/dist/common/src/Node.js +0 -1
- package/dist/common/src/PM/golingvuBuild.js +46 -0
- package/dist/common/src/PM/pitonoBuild.js +46 -0
- package/dist/common/src/PM/utils.js +8 -1
- package/dist/common/src/PM/web.js +4 -8
- package/dist/common/src/Pure.js +0 -14
- package/dist/common/src/Pure.test.js +1 -6
- package/dist/common/src/Web.js +1 -35
- package/dist/common/src/WebSidecar.js +0 -1
- package/dist/common/src/app/FileService.js +25 -0
- package/dist/common/src/app/api.js +73 -0
- package/dist/common/src/app/backend/PM_0.js +317 -0
- package/dist/common/src/app/backend/PM_1_WithProcesses.js +922 -0
- package/dist/common/src/app/backend/PM_2_WithTCP.js +244 -0
- package/dist/common/src/app/backend/PM_WithBuild.js +120 -0
- package/dist/common/src/app/backend/PM_WithEslintAndTsc.js +133 -0
- package/dist/common/src/app/backend/PM_WithGit.js +586 -0
- package/dist/common/src/app/backend/PM_WithHelpo.js +257 -0
- package/dist/common/src/app/backend/PM_WithProcesses.js +1083 -0
- package/dist/common/src/app/backend/PM_WithTCP.js +388 -0
- package/dist/common/src/app/backend/getAllFilesRecursively.js +22 -0
- package/dist/common/src/app/backend/main.js +804 -0
- package/dist/common/src/app/backend/makePrompt.js +73 -0
- package/dist/common/src/app/backend/utils.js +144 -0
- package/dist/common/src/app/frontend/App.js +206 -0
- package/dist/common/src/app/frontend/DevelopmentFileService.js +98 -0
- package/dist/common/src/app/frontend/GitFileService.js +262 -0
- package/dist/common/src/app/frontend/GitHubAuthService.js +184 -0
- package/dist/common/src/app/frontend/api.js +93 -0
- package/dist/common/src/app/frontend/components/DesignEditorPage.js +208 -0
- package/dist/common/src/app/frontend/components/SunriseAnimation.js +291 -0
- package/dist/common/src/app/frontend/components/SunriseAnimation.test/interface.js +68 -0
- package/dist/common/src/app/frontend/components/pure/AppFrame.js +177 -0
- package/dist/common/src/app/frontend/components/pure/GitHubLoginButton.js +18 -0
- package/dist/common/src/app/frontend/components/pure/GitIntegrationView.js +383 -0
- package/dist/common/src/app/frontend/components/pure/HelpoChatDrawer.js +179 -0
- package/dist/common/src/app/frontend/components/pure/MagicRobotModal.js +73 -0
- package/dist/common/src/app/frontend/components/pure/ModalContent.test/index.js +61 -0
- package/dist/common/src/app/frontend/components/pure/NavBar.js +45 -0
- package/dist/common/src/app/frontend/components/pure/ProcessDetails.js +49 -0
- package/dist/common/src/app/frontend/components/pure/ProcessInput.js +62 -0
- package/dist/common/src/app/frontend/components/pure/ProcessList.js +52 -0
- package/dist/common/src/app/frontend/components/pure/ProcessLogs.js +67 -0
- package/dist/common/src/app/frontend/components/pure/ProcessManager.js +113 -0
- package/dist/common/src/app/frontend/components/pure/ProcessManagerView.js +82 -0
- package/dist/common/src/app/frontend/components/pure/ProcessManagerViewTypes.js +2 -0
- package/dist/common/src/app/frontend/components/pure/ProcessSidebar.js +56 -0
- package/dist/common/src/app/frontend/components/pure/ProcessTerminal.js +62 -0
- package/dist/common/src/app/frontend/components/pure/ProjectPageView.js +69 -0
- package/dist/common/src/app/frontend/components/pure/ProjectPageView.test/implementation.js +185 -0
- package/dist/common/src/app/frontend/components/pure/Settings.js +122 -0
- package/dist/common/src/app/frontend/components/pure/Settings.test.js +30 -0
- package/dist/common/src/app/frontend/components/pure/SignIn.js +22 -0
- package/dist/common/src/app/frontend/components/pure/SingleProcessView.js +126 -0
- package/dist/common/src/app/frontend/components/pure/TerminalInput.js +76 -0
- package/dist/common/src/app/frontend/components/pure/TerminalLogs.js +80 -0
- package/dist/common/src/app/frontend/components/stateful/DratoPage.js +319 -0
- package/dist/common/src/app/frontend/components/stateful/FeaturesReporter.js +22 -0
- package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/AttributeEditor.js +51 -0
- package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/Drawer.js +152 -0
- package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/GenericPreview.js +156 -0
- package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/GenericTextEditor.js +169 -0
- package/dist/common/src/app/frontend/components/stateful/GenericXMLEditor/GenericTree.js +30 -0
- package/dist/common/src/app/frontend/components/stateful/GenericXMLEditorPage.js +306 -0
- package/dist/common/src/app/frontend/components/stateful/GitIntegrationPage.js +252 -0
- package/dist/common/src/app/frontend/components/stateful/GrafeoPage.js +437 -0
- package/dist/common/src/app/frontend/components/stateful/ProcessManagerPage.js +113 -0
- package/dist/common/src/app/frontend/components/stateful/ProjectPage.js +108 -0
- package/dist/common/src/app/frontend/components/stateful/ProjectsPage.js +136 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/CircleForm.js +24 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/GroupForm.js +22 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/RectForm.js +25 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGAttributeField.js +15 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGAttributesEditor.js +87 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGEditorControls.js +23 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGElementForm.js +23 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGPreview.js +178 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGTextEditor.js +155 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGTree.js +105 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditor/SVGTypes.js +2 -0
- package/dist/common/src/app/frontend/components/stateful/SVGEditorPage.js +437 -0
- package/dist/common/src/app/frontend/components/stateful/SingleProcessPage.js +134 -0
- package/dist/common/src/app/frontend/components/stateful/SkriboPage.js +517 -0
- package/dist/common/src/app/frontend/fetchDataUtil.js +187 -0
- package/dist/common/src/app/frontend/flua/FluaPage.js +378 -0
- package/dist/common/src/app/frontend/testPage/ITestPageViewProps.js +2 -0
- package/dist/common/src/app/frontend/testPage/ProjectsTree.js +179 -0
- package/dist/common/src/app/frontend/testPage/TestPage.js +85 -0
- package/dist/common/src/app/frontend/testPage/TestPageLeftContent.js +48 -0
- package/dist/common/src/app/frontend/testPage/TestPageMainContent.js +82 -0
- package/dist/common/src/app/frontend/testPage/TestPageNavbar.js +33 -0
- package/dist/common/src/app/frontend/testPage/TestPageView.js +352 -0
- package/dist/common/src/app/frontend/testPage/TestPageView.test/implementation.js +158 -0
- package/dist/common/src/app/frontend/testPage/TestPageView.test/index.js +15 -0
- package/dist/common/src/app/frontend/testPage/TestPageView.test/specification.js +27 -0
- package/dist/common/src/app/frontend/testPage/TestPageView_utils.js +128 -0
- package/dist/common/src/app/frontend/useFileSystemSync.js +108 -0
- package/dist/common/src/app/frontend/useFs.js +15 -0
- package/dist/common/src/app/frontend/useGitMode.js +20 -0
- package/dist/common/src/app/frontend/useTerminalWebSocket.js +44 -0
- package/dist/common/src/app/frontend/useWebSocket.js +16 -0
- package/dist/common/src/app/types.js +2 -0
- package/dist/common/src/builders/golang.js +30 -0
- package/dist/common/src/builders/node.js +35 -0
- package/dist/common/src/builders/python.js +28 -0
- package/dist/common/src/builders/web.js +35 -0
- package/dist/common/src/esbuildConfigs/node.js +3 -1
- package/dist/common/src/lib/BaseGiven.js +95 -18
- package/dist/common/src/lib/BaseSuite.js +55 -8
- package/dist/common/src/lib/BaseSuite.test/test.js +58 -103
- package/dist/common/src/lib/BaseThen.js +28 -29
- package/dist/common/src/lib/BaseWhen.js +7 -5
- package/dist/common/src/lib/Tiposkripto.js +26 -11
- package/dist/common/src/lib/Tiposkripto.test/MockTiposkripto.js +35 -45
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +15 -13
- package/dist/common/src/lib/Tiposkripto.test/Tiposkripto.specification.js +8 -5
- package/dist/common/src/lib/pmProxy.js +0 -33
- package/dist/common/src/lib/pmProxy.test/implementation.js +83 -90
- package/dist/common/src/lib/pmProxy.test/index.js +1 -3
- package/dist/common/src/lib/pmProxy.test/mockPM.js +1 -0
- package/dist/common/src/lib/pmProxy.test/specification.js +0 -1
- package/dist/common/src/mothership/index.js +164 -2
- package/dist/common/src/mothership/test.js +4 -2
- package/dist/common/src/testeranto.js +96 -97
- package/dist/common/src/utils/generateGolingvuMetafile.js +157 -0
- package/dist/common/src/utils/golingvuMetafile/fileDiscovery.js +142 -0
- package/dist/common/src/utils/golingvuMetafile/goList.js +103 -0
- package/dist/common/src/utils/golingvuMetafile/helpers.js +68 -0
- package/dist/common/src/utils/golingvuMetafile/importParser.js +89 -0
- package/dist/common/src/utils/golingvuMetafile/types.js +3 -0
- package/dist/common/src/utils/golingvuMetafile.js +7 -114
- package/dist/common/src/utils/golingvuWatcher.js +233 -0
- package/dist/common/src/utils/logFiles.js +9 -1
- package/dist/common/src/utils/pitonoMetafile.js +222 -42
- package/dist/common/src/utils/pitonoWatcher.js +130 -0
- package/dist/common/src/utils/writeGolingvuMetafile.js +324 -0
- package/dist/common/testeranto.config.js +28 -39
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/example/Calculator.js +101 -0
- package/dist/module/example/Calculator.test.adapter.js +36 -0
- package/dist/module/example/Calculator.test.implementation.js +47 -0
- package/dist/module/example/Calculator.test.js +6 -0
- package/dist/module/example/Calculator.test.specification.js +88 -0
- package/dist/module/example/Calculator.test.types.js +2 -0
- package/dist/module/scripts/build-example.js +100 -0
- package/dist/module/src/Helpo.js +48 -0
- package/dist/module/src/Init.js +9 -1
- package/dist/module/src/Node.js +0 -1
- package/dist/module/src/PM/golingvuBuild.js +42 -0
- package/dist/module/src/PM/pitonoBuild.js +42 -0
- package/dist/module/src/PM/utils.js +8 -1
- package/dist/module/src/PM/web.js +4 -8
- package/dist/module/src/Pure.js +0 -14
- package/dist/module/src/Pure.test.js +1 -6
- package/dist/module/src/Web.js +1 -35
- package/dist/module/src/WebSidecar.js +0 -1
- package/dist/module/src/app/FileService.js +21 -0
- package/dist/module/src/app/api.js +70 -0
- package/dist/module/src/app/backend/PM_0.js +310 -0
- package/dist/module/src/app/backend/PM_1_WithProcesses.js +882 -0
- package/dist/module/src/app/backend/PM_2_WithTCP.js +237 -0
- package/dist/module/src/app/backend/PM_WithBuild.js +113 -0
- package/dist/module/src/app/backend/PM_WithEslintAndTsc.js +126 -0
- package/dist/module/src/app/backend/PM_WithGit.js +546 -0
- package/dist/module/src/app/backend/PM_WithHelpo.js +250 -0
- package/dist/module/src/app/backend/PM_WithProcesses.js +1083 -0
- package/dist/module/src/app/backend/PM_WithTCP.js +381 -0
- package/dist/module/src/app/backend/getAllFilesRecursively.js +16 -0
- package/dist/module/src/app/backend/main.js +764 -0
- package/dist/module/src/app/backend/makePrompt.js +66 -0
- package/dist/module/src/app/backend/utils.js +131 -0
- package/dist/module/src/app/frontend/App.js +164 -0
- package/dist/module/src/app/frontend/DevelopmentFileService.js +91 -0
- package/dist/module/src/app/frontend/GitFileService.js +258 -0
- package/dist/module/src/app/frontend/GitHubAuthService.js +180 -0
- package/dist/module/src/app/frontend/api.js +87 -0
- package/dist/module/src/app/frontend/components/DesignEditorPage.js +171 -0
- package/dist/module/src/app/frontend/components/SunriseAnimation.js +256 -0
- package/dist/module/src/app/frontend/components/SunriseAnimation.test/interface.js +32 -0
- package/dist/module/src/app/frontend/components/pure/AppFrame.js +140 -0
- package/dist/module/src/app/frontend/components/pure/GitHubLoginButton.js +11 -0
- package/dist/module/src/app/frontend/components/pure/GitIntegrationView.js +346 -0
- package/dist/module/src/app/frontend/components/pure/HelpoChatDrawer.js +142 -0
- package/dist/module/src/app/frontend/components/pure/MagicRobotModal.js +66 -0
- package/dist/module/src/app/frontend/components/pure/ModalContent.test/index.js +56 -0
- package/dist/module/src/app/frontend/components/pure/NavBar.js +38 -0
- package/dist/module/src/app/frontend/components/pure/ProcessDetails.js +42 -0
- package/dist/module/src/app/frontend/components/pure/ProcessInput.js +25 -0
- package/dist/module/src/app/frontend/components/pure/ProcessList.js +45 -0
- package/dist/module/src/app/frontend/components/pure/ProcessLogs.js +30 -0
- package/dist/module/src/app/frontend/components/pure/ProcessManager.js +76 -0
- package/dist/module/src/app/frontend/components/pure/ProcessManagerView.js +45 -0
- package/dist/module/src/app/frontend/components/pure/ProcessSidebar.js +49 -0
- package/dist/module/src/app/frontend/components/pure/ProcessTerminal.js +25 -0
- package/dist/module/src/app/frontend/components/pure/ProjectPageView.js +62 -0
- package/dist/module/src/app/frontend/components/pure/ProjectPageView.test/implementation.js +182 -0
- package/dist/module/src/app/frontend/components/pure/Settings.js +85 -0
- package/dist/module/src/app/frontend/components/pure/Settings.test.js +30 -0
- package/dist/module/src/app/frontend/components/pure/SignIn.js +15 -0
- package/dist/module/src/app/frontend/components/pure/SingleProcessView.js +126 -0
- package/dist/module/src/app/frontend/components/pure/TerminalInput.js +39 -0
- package/dist/module/src/app/frontend/components/pure/TerminalLogs.js +43 -0
- package/dist/module/src/app/frontend/components/stateful/DratoPage.js +282 -0
- package/dist/module/src/app/frontend/components/stateful/FeaturesReporter.js +22 -0
- package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/AttributeEditor.js +44 -0
- package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/Drawer.js +115 -0
- package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/GenericPreview.js +119 -0
- package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/GenericTextEditor.js +132 -0
- package/dist/module/src/app/frontend/components/stateful/GenericXMLEditor/GenericTree.js +23 -0
- package/dist/module/src/app/frontend/components/stateful/GenericXMLEditorPage.js +269 -0
- package/dist/module/src/app/frontend/components/stateful/GitIntegrationPage.js +215 -0
- package/dist/module/src/app/frontend/components/stateful/GrafeoPage.js +400 -0
- package/dist/module/src/app/frontend/components/stateful/ProcessManagerPage.js +76 -0
- package/dist/module/src/app/frontend/components/stateful/ProjectPage.js +71 -0
- package/dist/module/src/app/frontend/components/stateful/ProjectsPage.js +99 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/CircleForm.js +17 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/GroupForm.js +15 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/RectForm.js +18 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGAttributeField.js +8 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGAttributesEditor.js +50 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGEditorControls.js +16 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGElementForm.js +16 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGPreview.js +141 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGTextEditor.js +118 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGTree.js +68 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditor/SVGTypes.js +1 -0
- package/dist/module/src/app/frontend/components/stateful/SVGEditorPage.js +400 -0
- package/dist/module/src/app/frontend/components/stateful/SingleProcessPage.js +134 -0
- package/dist/module/src/app/frontend/components/stateful/SkriboPage.js +510 -0
- package/dist/module/src/app/frontend/fetchDataUtil.js +187 -0
- package/dist/module/src/app/frontend/flua/FluaPage.js +341 -0
- package/dist/module/src/app/frontend/testPage/ITestPageViewProps.js +1 -0
- package/dist/module/src/app/frontend/testPage/ProjectsTree.js +142 -0
- package/dist/module/src/app/frontend/testPage/TestPage.js +48 -0
- package/dist/module/src/app/frontend/testPage/TestPageLeftContent.js +11 -0
- package/dist/module/src/app/frontend/testPage/TestPageMainContent.js +75 -0
- package/dist/module/src/app/frontend/testPage/TestPageNavbar.js +26 -0
- package/dist/module/src/app/frontend/testPage/TestPageView.js +315 -0
- package/dist/module/src/app/frontend/testPage/TestPageView.test/implementation.js +122 -0
- package/dist/module/src/app/frontend/testPage/TestPageView.test/index.js +10 -0
- package/dist/module/src/app/frontend/testPage/TestPageView.test/specification.js +23 -0
- package/dist/module/src/app/frontend/testPage/TestPageView_utils.js +120 -0
- package/dist/module/src/app/frontend/useFileSystemSync.js +108 -0
- package/dist/module/src/app/frontend/useFs.js +11 -0
- package/dist/module/src/app/frontend/useGitMode.js +16 -0
- package/dist/module/src/app/frontend/useTerminalWebSocket.js +40 -0
- package/dist/module/src/app/frontend/useWebSocket.js +12 -0
- package/dist/module/src/app/types.js +1 -0
- package/dist/module/src/builders/golang.js +28 -0
- package/dist/module/src/builders/node.js +33 -0
- package/dist/module/src/builders/python.js +26 -0
- package/dist/module/src/builders/web.js +33 -0
- package/dist/module/src/esbuildConfigs/node.js +3 -1
- package/dist/module/src/lib/BaseGiven.js +95 -18
- package/dist/module/src/lib/BaseSuite.js +55 -8
- package/dist/module/src/lib/BaseSuite.test/test.js +58 -103
- package/dist/module/src/lib/BaseThen.js +28 -29
- package/dist/module/src/lib/BaseWhen.js +7 -5
- package/dist/module/src/lib/Tiposkripto.js +26 -11
- package/dist/module/src/lib/Tiposkripto.test/MockTiposkripto.js +35 -45
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.implementation.js +15 -13
- package/dist/module/src/lib/Tiposkripto.test/Tiposkripto.specification.js +8 -5
- package/dist/module/src/lib/pmProxy.js +0 -33
- package/dist/module/src/lib/pmProxy.test/implementation.js +83 -90
- package/dist/module/src/lib/pmProxy.test/index.js +1 -3
- package/dist/module/src/lib/pmProxy.test/mockPM.js +1 -0
- package/dist/module/src/lib/pmProxy.test/specification.js +0 -1
- package/dist/module/src/mothership/index.js +164 -2
- package/dist/module/src/mothership/test.js +4 -2
- package/dist/module/src/testeranto.js +94 -95
- package/dist/module/src/utils/generateGolingvuMetafile.js +151 -0
- package/dist/module/src/utils/golingvuMetafile/fileDiscovery.js +136 -0
- package/dist/module/src/utils/golingvuMetafile/goList.js +97 -0
- package/dist/module/src/utils/golingvuMetafile/helpers.js +59 -0
- package/dist/module/src/utils/golingvuMetafile/importParser.js +83 -0
- package/dist/module/src/utils/golingvuMetafile/types.js +2 -0
- package/dist/module/src/utils/golingvuMetafile.js +6 -109
- package/dist/module/src/utils/golingvuWatcher.js +226 -0
- package/dist/module/src/utils/logFiles.js +9 -1
- package/dist/module/src/utils/pitonoMetafile.js +224 -44
- package/dist/module/src/utils/pitonoWatcher.js +123 -0
- package/dist/module/src/utils/writeGolingvuMetafile.js +318 -0
- package/dist/module/testeranto.config.js +28 -39
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/App.css +251 -173
- package/dist/prebuild/App.js +20096 -43669
- package/dist/prebuild/init-docs.mjs +9 -1
- package/dist/prebuild/testeranto.mjs +3635 -2389
- package/dist/types/src/Helpo.d.ts +1 -0
- package/dist/types/src/PM/golingvuBuild.d.ts +11 -0
- package/dist/types/src/PM/pitonoBuild.d.ts +11 -0
- package/dist/types/src/PM/web.d.ts +4 -4
- package/dist/types/src/Pure.d.ts +1 -1
- package/dist/types/src/Pure.test.d.ts +60 -1
- package/dist/types/src/Types.d.ts +1 -0
- package/dist/types/src/Web.d.ts +1 -1
- package/dist/types/src/app/FileService.d.ts +37 -0
- package/dist/types/src/app/api.d.ts +37 -0
- package/dist/types/src/app/backend/PM_0.d.ts +38 -0
- package/dist/types/src/app/backend/PM_1_WithProcesses.d.ts +149 -0
- package/dist/types/src/app/backend/PM_2_WithTCP.d.ts +29 -0
- package/dist/types/src/app/backend/PM_WithBuild.d.ts +8 -0
- package/dist/types/src/app/backend/PM_WithEslintAndTsc.d.ts +22 -0
- package/dist/types/src/app/backend/PM_WithGit.d.ts +24 -0
- package/dist/types/src/app/backend/PM_WithHelpo.d.ts +43 -0
- package/dist/types/src/app/backend/PM_WithTCP.d.ts +41 -0
- package/dist/types/src/app/backend/getAllFilesRecursively.d.ts +1 -0
- package/dist/types/src/app/backend/main.d.ts +15 -0
- package/dist/types/src/app/backend/makePrompt.d.ts +2 -0
- package/dist/types/src/app/backend/utils.d.ts +20 -0
- package/dist/types/src/app/frontend/App.d.ts +14 -0
- package/dist/types/src/app/frontend/DevelopmentFileService.d.ts +25 -0
- package/dist/types/src/app/frontend/GitFileService.d.ts +27 -0
- package/dist/types/src/app/frontend/api.d.ts +10 -0
- package/dist/types/src/app/frontend/components/SunriseAnimation.test/interface.d.ts +11 -0
- package/dist/types/src/app/frontend/components/SunriseAnimation.test/types.d.ts +39 -0
- package/dist/types/src/app/frontend/components/pure/AppFrame.d.ts +11 -0
- package/dist/types/src/app/frontend/components/pure/AppFrame.test/index.d.ts +3 -0
- package/dist/types/src/app/frontend/components/pure/FeaturesReporterView.d.ts +7 -0
- package/dist/types/src/app/frontend/components/pure/FeaturesReporterView.test/index.d.ts +2 -0
- package/dist/types/src/app/frontend/components/pure/GitIntegrationView.d.ts +27 -0
- package/dist/types/src/app/frontend/components/pure/HelpoChatDrawer.d.ts +7 -0
- package/dist/types/src/app/frontend/components/pure/MagicRobotModal.d.ts +16 -0
- package/dist/types/src/app/frontend/components/pure/ModalContent.test/index.d.ts +14 -0
- package/dist/types/src/app/frontend/components/pure/ProcessDetails.d.ts +8 -0
- package/dist/types/src/app/frontend/components/pure/ProcessInput.d.ts +10 -0
- package/dist/types/src/app/frontend/components/pure/ProcessList.d.ts +10 -0
- package/dist/types/src/app/frontend/components/pure/ProcessLogs.d.ts +6 -0
- package/dist/types/src/app/frontend/components/pure/ProcessManagerView.d.ts +10 -0
- package/dist/types/src/app/frontend/components/pure/ProcessManagerViewTypes.d.ts +10 -0
- package/dist/types/src/app/frontend/components/pure/ProcessSidebar.d.ts +8 -0
- package/dist/types/src/app/frontend/components/pure/ProcessTerminal.d.ts +8 -0
- package/dist/types/src/app/frontend/components/pure/ProjectPageView.d.ts +14 -0
- package/dist/types/src/app/frontend/components/pure/ProjectPageView.test/implementation.d.ts +3 -0
- package/dist/types/src/app/frontend/components/pure/ProjectPageView.test/index.d.ts +17 -0
- package/dist/types/src/app/frontend/components/pure/TerminalInput.d.ts +6 -0
- package/dist/types/src/app/frontend/components/pure/TerminalLogs.d.ts +6 -0
- package/dist/types/src/app/frontend/components/stateful/DratoPage.d.ts +8 -0
- package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/AttributeEditor.d.ts +9 -0
- package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/Drawer.d.ts +12 -0
- package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/GenericPreview.d.ts +11 -0
- package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/GenericTextEditor.d.ts +8 -0
- package/dist/types/src/app/frontend/components/stateful/GenericXMLEditor/GenericTree.d.ts +17 -0
- package/dist/types/src/app/frontend/components/stateful/GenericXMLEditorPage.d.ts +21 -0
- package/dist/types/src/app/frontend/components/stateful/GrafeoPage.d.ts +8 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/CircleForm.d.ts +8 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/GroupForm.d.ts +8 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/RectForm.d.ts +8 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGAttributeField.d.ts +9 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGAttributesEditor.d.ts +9 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGEditorControls.d.ts +9 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGElementForm.d.ts +9 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGPreview.d.ts +12 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGTextEditor.d.ts +8 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGTree.d.ts +20 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditor/SVGTypes.d.ts +30 -0
- package/dist/types/src/app/frontend/components/stateful/SVGEditorPage.d.ts +7 -0
- package/dist/types/src/app/frontend/components/stateful/SkriboPage.d.ts +1 -0
- package/dist/types/src/app/frontend/flua/FluaPage.d.ts +2 -0
- package/dist/types/src/app/frontend/testPage/ITestPageViewProps.d.ts +14 -0
- package/dist/types/src/app/frontend/testPage/ProjectsTree.d.ts +17 -0
- package/dist/types/src/app/frontend/testPage/TestPageLeftContent.d.ts +14 -0
- package/dist/types/src/app/frontend/testPage/TestPageMainContent.d.ts +7 -0
- package/dist/types/src/app/frontend/testPage/TestPageNavbar.d.ts +7 -0
- package/dist/types/src/app/frontend/testPage/TestPageView.d.ts +2 -0
- package/dist/types/src/app/frontend/testPage/TestPageView.test/implementation.d.ts +13 -0
- package/dist/types/src/app/frontend/testPage/TestPageView.test/index.d.ts +13 -0
- package/dist/types/src/app/frontend/testPage/TestPageView.test/specification.d.ts +11 -0
- package/dist/types/src/app/frontend/testPage/TestPageView.test/types.d.ts +65 -0
- package/dist/types/src/app/frontend/testPage/TestPageView_utils.d.ts +23 -0
- package/dist/types/src/app/frontend/useFs.d.ts +2 -0
- package/dist/types/src/app/frontend/useTerminalWebSocket.d.ts +4 -0
- package/dist/types/src/app/frontend/useWebSocket.d.ts +8 -0
- package/dist/types/src/app/types.d.ts +1 -0
- package/dist/types/src/builders/golang.d.ts +1 -0
- package/dist/types/src/builders/node.d.ts +1 -0
- package/dist/types/src/builders/python.d.ts +1 -0
- package/dist/types/src/builders/web.d.ts +1 -0
- package/dist/types/src/lib/BaseGiven.d.ts +3 -3
- package/dist/types/src/lib/BaseSuite.d.ts +4 -3
- package/dist/types/src/lib/BaseSuite.test/pure.test.d.ts +2 -1
- package/dist/types/src/lib/BaseSuite.test/web.test.d.ts +2 -1
- package/dist/types/src/lib/BaseThen.d.ts +2 -0
- package/dist/types/src/lib/BaseWhen.d.ts +2 -0
- package/dist/types/src/lib/pmProxy.test/mockPMBase.d.ts +1 -1
- package/dist/types/src/utils/generateGolingvuMetafile.d.ts +2 -0
- package/dist/types/src/utils/golingvuMetafile/fileDiscovery.d.ts +1 -0
- package/dist/types/src/utils/golingvuMetafile/goList.d.ts +2 -0
- package/dist/types/src/utils/golingvuMetafile/helpers.d.ts +7 -0
- package/dist/types/src/utils/golingvuMetafile/importParser.d.ts +5 -0
- package/dist/types/src/utils/golingvuMetafile/types.d.ts +66 -0
- package/dist/types/src/utils/golingvuMetafile.d.ts +4 -19
- package/dist/types/src/utils/golingvuWatcher.d.ts +14 -0
- package/dist/types/src/utils/logFiles.d.ts +29 -1
- package/dist/types/src/utils/pitonoMetafile.d.ts +18 -3
- package/dist/types/src/utils/pitonoWatcher.d.ts +13 -0
- package/dist/types/src/utils/writeGolingvuMetafile.d.ts +2 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docker-compose.yml +74 -0
- package/docs/testing.prompt.txt +5 -1
- package/example/Calculator.go +99 -0
- package/example/Calculator.golingvu.adapter.go +81 -0
- package/example/Calculator.golingvu.implementation.go +144 -0
- package/example/Calculator.golingvu.specification.go +68 -0
- package/example/Calculator.golingvu.test.go +216 -0
- package/example/Calculator.pitono.adapter.py +68 -0
- package/example/Calculator.pitono.implementation.py +30 -0
- package/example/Calculator.pitono.specification.py +154 -0
- package/example/Calculator.pitono.test.py +132 -0
- package/example/Calculator.py +93 -0
- package/example/Calculator.test.adapter.ts +46 -0
- package/example/Calculator.test.implementation.ts +55 -0
- package/example/Calculator.test.specification.ts +213 -0
- package/example/Calculator.test.ts +13 -0
- package/example/Calculator.test.types.ts +50 -0
- package/example/Calculator.ts +114 -0
- package/example/README.md +1 -0
- package/example/__pycache__/Calculator.cpython-313.pyc +0 -0
- package/example/go.mod +7 -0
- package/example/go.sum +2 -0
- package/example/requirements.txt +9 -0
- package/example/single-kanban-process.xml +9 -0
- package/example/test_example.py +143 -74
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/LICENSE +21 -0
- package/example/vendor/github.com/adamwong246/testeranto/src/golingvu/golingvu.go +398 -63
- package/example/vendor/modules.txt +1 -2
- package/go.mod +6 -1
- package/go.sum +2 -0
- package/golingvu.tmp.txt +68 -0
- package/log.txt +39 -0
- package/package.json +61 -44
- package/scripts/build-example.ts +106 -0
- package/src/Helpo.tsx +89 -0
- package/src/Init.ts +9 -1
- package/src/Node.ts +0 -1
- package/src/NodeSidecar.ts +0 -8
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +4 -1
- package/src/PM/golingvuBuild.ts +56 -0
- package/src/PM/pitonoBuild.ts +56 -0
- package/src/PM/types.ts +1 -0
- package/src/PM/utils.ts +7 -1
- package/src/PM/web.ts +8 -24
- package/src/Pure.test.ts +18 -9
- package/src/Pure.ts +1 -16
- package/src/Types.ts +1 -0
- package/src/Web.ts +2 -38
- package/src/WebSidecar.ts +1 -1
- package/src/app/FileService.ts +91 -0
- package/src/app/api.ts +75 -0
- package/src/app/backend/PM_0.ts +392 -0
- package/src/app/backend/PM_1_WithProcesses.ts +1186 -0
- package/src/app/backend/PM_2_WithTCP.ts +283 -0
- package/src/app/backend/PM_WithBuild.ts +148 -0
- package/src/app/backend/PM_WithEslintAndTsc.ts +194 -0
- package/src/app/backend/PM_WithGit.ts +662 -0
- package/src/app/backend/PM_WithHelpo.ts +340 -0
- package/src/app/backend/PM_WithProcesses.ts +1247 -0
- package/src/app/backend/PM_WithTCP.ts +777 -0
- package/src/app/backend/getAllFilesRecursively.ts +17 -0
- package/src/app/backend/main.ts +1011 -0
- package/src/app/backend/makePrompt.ts +92 -0
- package/src/app/backend/utils.ts +202 -0
- package/src/app/frontend/App.tsx +242 -0
- package/src/app/frontend/DevelopmentFileService.ts +117 -0
- package/src/app/frontend/GitFileService.ts +285 -0
- package/src/app/frontend/GitHubAuthService.ts +241 -0
- package/src/app/frontend/api.ts +108 -0
- package/src/app/frontend/app.scss +119 -0
- package/src/app/frontend/components/DesignEditorPage.tsx +210 -0
- package/src/app/frontend/components/SunriseAnimation.test/interface.ts +50 -0
- package/src/app/frontend/components/SunriseAnimation.test/types.ts +53 -0
- package/src/app/frontend/components/SunriseAnimation.tsx +350 -0
- package/src/app/frontend/components/pure/AppFrame.tsx +445 -0
- package/src/app/frontend/components/pure/FeaturesReporterView.tsx +38 -0
- package/src/app/frontend/components/pure/GitHubLoginButton.tsx +32 -0
- package/src/app/frontend/components/pure/GitIntegrationView.tsx +727 -0
- package/src/app/frontend/components/pure/HelpoChatDrawer.tsx +223 -0
- package/src/app/frontend/components/pure/MagicRobotModal.tsx +135 -0
- package/src/app/frontend/components/pure/ModalContent.test/index.tsx +68 -0
- package/src/app/frontend/components/pure/NavBar.tsx +119 -0
- package/src/app/frontend/components/pure/ProcessDetails.tsx +99 -0
- package/src/app/frontend/components/pure/ProcessInput.tsx +67 -0
- package/src/app/frontend/components/pure/ProcessList.tsx +89 -0
- package/src/app/frontend/components/pure/ProcessLogs.tsx +54 -0
- package/src/app/frontend/components/pure/ProcessManager.tsx +109 -0
- package/src/app/frontend/components/pure/ProcessManagerView.tsx +89 -0
- package/src/app/frontend/components/pure/ProcessManagerViewTypes.ts +10 -0
- package/src/app/frontend/components/pure/ProcessSidebar.tsx +88 -0
- package/src/app/frontend/components/pure/ProcessTerminal.tsx +55 -0
- package/src/app/frontend/components/pure/ProjectPageView.test/implementation.tsx +216 -0
- package/src/app/frontend/components/pure/ProjectPageView.tsx +165 -0
- package/src/app/frontend/components/pure/Settings.test.tsx +34 -0
- package/src/app/frontend/components/pure/Settings.tsx +171 -0
- package/src/app/frontend/components/pure/SignIn.tsx +33 -0
- package/src/app/frontend/components/pure/SingleProcessView.tsx +140 -0
- package/src/app/frontend/components/pure/TerminalInput.tsx +73 -0
- package/src/app/frontend/components/pure/TerminalLogs.tsx +80 -0
- package/src/app/frontend/components/stateful/DratoPage.tsx +457 -0
- package/src/app/frontend/components/stateful/FeaturesReporter.tsx +27 -0
- package/src/app/frontend/components/stateful/GenericXMLEditor/AttributeEditor.tsx +105 -0
- package/src/app/frontend/components/stateful/GenericXMLEditor/Drawer.tsx +174 -0
- package/src/app/frontend/components/stateful/GenericXMLEditor/GenericPreview.tsx +234 -0
- package/src/app/frontend/components/stateful/GenericXMLEditor/GenericTextEditor.tsx +173 -0
- package/src/app/frontend/components/stateful/GenericXMLEditor/GenericTree.tsx +105 -0
- package/src/app/frontend/components/stateful/GenericXMLEditorPage.tsx +455 -0
- package/src/app/frontend/components/stateful/GitIntegrationPage.tsx +256 -0
- package/src/app/frontend/components/stateful/GrafeoPage.tsx +563 -0
- package/src/app/frontend/components/stateful/ProcessManagerPage.tsx +110 -0
- package/src/app/frontend/components/stateful/ProjectPage.tsx +94 -0
- package/src/app/frontend/components/stateful/ProjectsPage.tsx +129 -0
- package/src/app/frontend/components/stateful/SVGEditor/SVGAttributesEditor.tsx +91 -0
- package/src/app/frontend/components/stateful/SVGEditor/SVGPreview.tsx +227 -0
- package/src/app/frontend/components/stateful/SVGEditorPage.tsx +517 -0
- package/src/app/frontend/components/stateful/SingleProcessPage.tsx +144 -0
- package/src/app/frontend/components/stateful/SkriboPage.tsx +577 -0
- package/src/app/frontend/fetchDataUtil.ts +206 -0
- package/src/app/frontend/flua/FluaPage.tsx +458 -0
- package/src/app/frontend/flua/agile.xsd +32 -0
- package/src/app/frontend/flua/core.xsd +42 -0
- package/src/app/frontend/flua/kanban.xsd +21 -0
- package/src/app/frontend/flua/scrum.xsd +35 -0
- package/src/app/frontend/testPage/ITestPageViewProps.ts +14 -0
- package/src/app/frontend/testPage/ProjectsTree.tsx +329 -0
- package/src/app/frontend/testPage/TestPage.tsx +75 -0
- package/src/app/frontend/testPage/TestPageLeftContent.tsx +54 -0
- package/src/app/frontend/testPage/TestPageMainContent.tsx +181 -0
- package/src/app/frontend/testPage/TestPageNavbar.tsx +52 -0
- package/src/app/frontend/testPage/TestPageView.test/implementation.ts +209 -0
- package/src/app/frontend/testPage/TestPageView.test/index.tsx +22 -0
- package/src/app/frontend/testPage/TestPageView.test/specification.ts +60 -0
- package/src/app/frontend/testPage/TestPageView.test/types.ts +92 -0
- package/src/app/frontend/testPage/TestPageView.tsx +481 -0
- package/src/app/frontend/testPage/TestPageView_utils.tsx +301 -0
- package/src/app/frontend/testPage/index.md +14 -0
- package/src/app/frontend/useFileSystemSync.ts +117 -0
- package/src/app/frontend/useFs.ts +16 -0
- package/src/app/frontend/useGitMode.ts +21 -0
- package/src/app/frontend/useTerminalWebSocket.ts +56 -0
- package/src/app/frontend/useWebSocket.ts +20 -0
- package/src/app/trash +1697 -0
- package/src/app/types.ts +1 -0
- package/src/builders/golang.ts +29 -0
- package/src/builders/node.ts +34 -0
- package/src/builders/python.ts +28 -0
- package/src/builders/web.ts +34 -0
- package/src/cjs-shim.js +2 -0
- package/src/esbuildConfigs/node.ts +1 -1
- package/src/golingvu/PM/golang_test.go +103 -0
- package/src/golingvu/README.md +186 -2
- package/src/golingvu/base_given.go +110 -24
- package/src/golingvu/base_suite.go +54 -8
- package/src/golingvu/base_then.go +2 -2
- package/src/golingvu/base_when.go +2 -2
- package/src/golingvu/go.mod +6 -0
- package/src/golingvu/golingvu.go +683 -32
- package/src/golingvu/types.go +0 -14
- package/src/graphml.xsd +345 -0
- package/src/helpo/directives.md +5 -0
- package/src/helpo/prompt.txt +38 -0
- package/src/lib/BaseGiven.ts +106 -32
- package/src/lib/BaseSuite.test/test.ts +92 -180
- package/src/lib/BaseSuite.ts +60 -10
- package/src/lib/BaseThen.ts +36 -37
- package/src/lib/BaseWhen.ts +12 -13
- package/src/lib/Tiposkripto.test/MockTiposkripto.ts +59 -63
- package/src/lib/Tiposkripto.test/Tiposkripto.implementation.ts +33 -20
- package/src/lib/Tiposkripto.test/Tiposkripto.specification.ts +9 -8
- package/src/lib/Tiposkripto.ts +27 -15
- package/src/lib/pmProxy.test/implementation.ts +112 -117
- package/src/lib/pmProxy.test/index.ts +2 -2
- package/src/lib/pmProxy.test/mockPM.ts +1 -0
- package/src/lib/pmProxy.test/mockPMBase.ts +1 -1
- package/src/lib/pmProxy.test/specification.ts +0 -2
- package/src/lib/pmProxy.test/types.ts +1 -0
- package/src/lib/pmProxy.ts +0 -37
- package/src/mothership/index.ts +197 -2
- package/src/mothership/test.ts +5 -5
- package/src/pitono/PM/__pycache__/python.cpython-313.pyc +0 -0
- package/src/pitono/PM/python.py +168 -0
- package/src/pitono/Pitono.py +444 -0
- package/src/pitono/PitonoTest.py +25 -0
- package/src/pitono/README.md +21 -0
- package/src/pitono/__init__.py +6 -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/pitono/base_given.py +178 -0
- package/src/pitono/base_suite.py +149 -0
- package/src/pitono/base_then.py +65 -0
- package/src/pitono/base_when.py +67 -0
- package/src/pitono/pitono.egg-info/PKG-INFO +42 -0
- package/src/pitono/pitono.egg-info/SOURCES.txt +8 -0
- package/src/pitono/types.py +87 -0
- package/src/style.scss +261 -2
- package/src/testeranto.ts +120 -153
- package/src/utils/generateGolingvuMetafile.ts +196 -0
- package/src/utils/golingvuMetafile/fileDiscovery.ts +157 -0
- package/src/utils/golingvuMetafile/goList.ts +106 -0
- package/src/utils/golingvuMetafile/helpers.ts +65 -0
- package/src/utils/golingvuMetafile/importParser.ts +97 -0
- package/src/utils/golingvuMetafile/types.ts +78 -0
- package/src/utils/golingvuMetafile.ts +6 -163
- package/src/utils/golingvuWatcher.ts +280 -0
- package/src/utils/logFiles.ts +10 -2
- package/src/utils/pitonoMetafile.ts +328 -58
- package/src/utils/pitonoWatcher.ts +150 -0
- package/src/utils/writeGolingvuMetafile.ts +386 -0
- package/testeranto/App.css +251 -173
- package/testeranto/App.js +20080 -43664
- package/testeranto/bundles/golang/core/example/Calculator.golingvu.test +58 -0
- package/testeranto/bundles/node/core/example/Calculator.test.mjs +5481 -122
- package/testeranto/bundles/python/core/Calculator.pitono.test.py +1 -1
- package/testeranto/helpo_chat_history.json +1 -0
- package/testeranto/metafiles/golang/core.json +144 -49
- package/testeranto/metafiles/node/core.json +92 -583
- package/testeranto/metafiles/python/core.json +50 -9
- package/testeranto/reports/core/config.json +5 -61
- package/testeranto/reports/core/example/Calculator.golingvu.test/golang/exit.log +1 -0
- package/testeranto/reports/core/example/Calculator.golingvu.test/golang/stderr.log +7 -0
- package/testeranto/reports/core/example/Calculator.pitono.test/python/message.txt +16 -0
- package/testeranto/reports/core/example/Calculator.pitono.test/python/prompt.txt +13 -0
- package/testeranto/reports/core/example/Calculator.pitono.test/python/stdout.log +26 -0
- package/testeranto/reports/core/example/Calculator.pitono.test/python/tests.json +255 -0
- package/testeranto/reports/core/example/Calculator.test/node/lint_errors.txt +2 -0
- package/testeranto/reports/core/example/Calculator.test/node/message.txt +16 -0
- package/testeranto/reports/core/example/Calculator.test/node/prompt.txt +13 -0
- package/testeranto/reports/core/example/Calculator.test/node/stderr.log +566 -0
- package/testeranto/reports/core/example/Calculator.test/node/tests.json +1163 -0
- package/testeranto/reports/core/example/Calculator.test/node/type_errors.txt +26 -0
- package/testeranto/reports/core/summary.json +7 -47
- package/testeranto.config.ts +33 -43
- package/tsc.log +305 -370
- package/dist/common/src/App.js +0 -219
- package/dist/common/src/PM/PM_WithBuild.js +0 -135
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +0 -204
- package/dist/common/src/PM/PM_WithGit.js +0 -517
- package/dist/common/src/PM/PM_WithProcesses.js +0 -519
- package/dist/common/src/PM/PM_WithWebSocket.js +0 -535
- package/dist/common/src/PM/base.js +0 -319
- package/dist/common/src/PM/main.js +0 -672
- package/dist/common/src/PM/metafileOutputs.js +0 -78
- package/dist/common/src/ReportServer.js +0 -1
- package/dist/common/src/ReportServer.test.ts/index.js +0 -78
- package/dist/common/src/ReportServerLib.js +0 -1
- package/dist/common/src/components/DesignEditorPage.js +0 -205
- package/dist/common/src/components/SunriseAnimation.js +0 -291
- package/dist/common/src/components/SunriseAnimation.test/interface.js +0 -68
- package/dist/common/src/components/pure/AppFrame.js +0 -81
- package/dist/common/src/components/pure/GitHubLoginButton.js +0 -18
- package/dist/common/src/components/pure/GitIntegrationView.js +0 -342
- package/dist/common/src/components/pure/ModalContent.test/index.js +0 -58
- package/dist/common/src/components/pure/NavBar.js +0 -44
- package/dist/common/src/components/pure/ProcessManager.js +0 -113
- package/dist/common/src/components/pure/ProcessManagerView.js +0 -236
- package/dist/common/src/components/pure/ProjectPageView.js +0 -68
- package/dist/common/src/components/pure/ProjectPageView.test/implementation.js +0 -184
- package/dist/common/src/components/pure/Settings.js +0 -121
- package/dist/common/src/components/pure/Settings.test.js +0 -34
- package/dist/common/src/components/pure/SignIn.js +0 -22
- package/dist/common/src/components/pure/SingleProcessView.js +0 -167
- package/dist/common/src/components/pure/TestPageView.js +0 -373
- package/dist/common/src/components/pure/TestPageView.test/implementation.js +0 -157
- package/dist/common/src/components/pure/TestPageView.test/index.js +0 -15
- package/dist/common/src/components/pure/TestPageView.test/specification.js +0 -26
- package/dist/common/src/components/pure/TestPageView_utils.js +0 -117
- package/dist/common/src/components/stateful/FeaturesReporter.js +0 -60
- package/dist/common/src/components/stateful/GitIntegrationPage.js +0 -12
- package/dist/common/src/components/stateful/ProcessManagerPage.js +0 -110
- package/dist/common/src/components/stateful/ProjectPage.js +0 -102
- package/dist/common/src/components/stateful/ProjectsPage.js +0 -116
- package/dist/common/src/components/stateful/SingleProcessPage.js +0 -137
- package/dist/common/src/components/stateful/TestPage.js +0 -270
- package/dist/common/src/hooks/useGitMode.js +0 -21
- package/dist/common/src/services/FileService.js +0 -505
- package/dist/common/src/services/GitHubAuthService.js +0 -184
- package/dist/common/src/types/features.js +0 -34
- package/dist/common/src/utils/api.js +0 -93
- package/dist/common/src/utils/featureUtils.js +0 -29
- package/dist/common/src/utils/gitTest.js +0 -27
- package/dist/common/src/utils/makePrompt.js +0 -116
- package/dist/common/src/utils.js +0 -143
- package/dist/module/src/App.js +0 -176
- package/dist/module/src/PM/PM_WithBuild.js +0 -128
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +0 -197
- package/dist/module/src/PM/PM_WithGit.js +0 -477
- package/dist/module/src/PM/PM_WithProcesses.js +0 -479
- package/dist/module/src/PM/PM_WithWebSocket.js +0 -528
- package/dist/module/src/PM/base.js +0 -312
- package/dist/module/src/PM/main.js +0 -632
- package/dist/module/src/PM/metafileOutputs.js +0 -78
- package/dist/module/src/ReportServer.js +0 -1
- package/dist/module/src/ReportServer.test.ts/index.js +0 -73
- package/dist/module/src/ReportServerLib.js +0 -1
- package/dist/module/src/components/DesignEditorPage.js +0 -168
- package/dist/module/src/components/SunriseAnimation.js +0 -256
- package/dist/module/src/components/SunriseAnimation.test/interface.js +0 -32
- package/dist/module/src/components/pure/AppFrame.js +0 -74
- package/dist/module/src/components/pure/GitHubLoginButton.js +0 -11
- package/dist/module/src/components/pure/GitIntegrationView.js +0 -305
- package/dist/module/src/components/pure/ModalContent.test/index.js +0 -53
- package/dist/module/src/components/pure/NavBar.js +0 -37
- package/dist/module/src/components/pure/ProcessManager.js +0 -76
- package/dist/module/src/components/pure/ProcessManagerView.js +0 -199
- package/dist/module/src/components/pure/ProjectPageView.js +0 -61
- package/dist/module/src/components/pure/ProjectPageView.test/implementation.js +0 -181
- package/dist/module/src/components/pure/Settings.js +0 -84
- package/dist/module/src/components/pure/Settings.test.js +0 -29
- package/dist/module/src/components/pure/SignIn.js +0 -15
- package/dist/module/src/components/pure/SingleProcessView.js +0 -130
- package/dist/module/src/components/pure/TestPageView.js +0 -336
- package/dist/module/src/components/pure/TestPageView.test/implementation.js +0 -121
- package/dist/module/src/components/pure/TestPageView.test/index.js +0 -10
- package/dist/module/src/components/pure/TestPageView.test/specification.js +0 -22
- package/dist/module/src/components/pure/TestPageView_utils.js +0 -109
- package/dist/module/src/components/stateful/FeaturesReporter.js +0 -23
- package/dist/module/src/components/stateful/GitIntegrationPage.js +0 -5
- package/dist/module/src/components/stateful/ProcessManagerPage.js +0 -73
- package/dist/module/src/components/stateful/ProjectPage.js +0 -65
- package/dist/module/src/components/stateful/ProjectsPage.js +0 -79
- package/dist/module/src/components/stateful/SingleProcessPage.js +0 -100
- package/dist/module/src/components/stateful/TestPage.js +0 -233
- package/dist/module/src/hooks/useGitMode.js +0 -17
- package/dist/module/src/services/FileService.js +0 -468
- package/dist/module/src/services/GitHubAuthService.js +0 -180
- package/dist/module/src/types/features.js +0 -31
- package/dist/module/src/utils/api.js +0 -87
- package/dist/module/src/utils/featureUtils.js +0 -24
- package/dist/module/src/utils/gitTest.js +0 -23
- package/dist/module/src/utils/makePrompt.js +0 -109
- package/dist/module/src/utils.js +0 -130
- package/dist/types/src/App.d.ts +0 -19
- package/dist/types/src/PM/PM_WithBuild.d.ts +0 -13
- package/dist/types/src/PM/PM_WithEslintAndTsc.d.ts +0 -22
- package/dist/types/src/PM/PM_WithGit.d.ts +0 -27
- package/dist/types/src/PM/PM_WithProcesses.d.ts +0 -29
- package/dist/types/src/PM/PM_WithWebSocket.d.ts +0 -108
- package/dist/types/src/PM/base.d.ts +0 -35
- package/dist/types/src/PM/main.d.ts +0 -8
- package/dist/types/src/ReportServer.test.ts/index.d.ts +0 -2
- package/dist/types/src/components/SunriseAnimation.test/interface.d.ts +0 -11
- package/dist/types/src/components/SunriseAnimation.test/types.d.ts +0 -39
- package/dist/types/src/components/pure/AppFrame.d.ts +0 -11
- package/dist/types/src/components/pure/AppFrame.test/index.d.ts +0 -3
- package/dist/types/src/components/pure/FeaturesReporterView.d.ts +0 -7
- package/dist/types/src/components/pure/FeaturesReporterView.test/index.d.ts +0 -2
- package/dist/types/src/components/pure/GitIntegrationView.d.ts +0 -1
- package/dist/types/src/components/pure/ModalContent.test/index.d.ts +0 -2
- package/dist/types/src/components/pure/ProcessManagerView.d.ts +0 -20
- package/dist/types/src/components/pure/ProjectPageView.d.ts +0 -14
- package/dist/types/src/components/pure/ProjectPageView.test/implementation.d.ts +0 -3
- package/dist/types/src/components/pure/ProjectPageView.test/index.d.ts +0 -2
- package/dist/types/src/components/pure/SingleProcessView.d.ts +0 -10
- package/dist/types/src/components/pure/TestPageView.d.ts +0 -16
- package/dist/types/src/components/pure/TestPageView.test/implementation.d.ts +0 -12
- package/dist/types/src/components/pure/TestPageView.test/index.d.ts +0 -3
- package/dist/types/src/components/pure/TestPageView.test/specification.d.ts +0 -11
- package/dist/types/src/components/pure/TestPageView.test/types.d.ts +0 -65
- package/dist/types/src/components/pure/TestPageView_utils.d.ts +0 -23
- package/dist/types/src/components/stateful/FeaturesReporter.d.ts +0 -2
- package/dist/types/src/components/stateful/SingleProcessPage.d.ts +0 -2
- package/dist/types/src/services/FileService.d.ts +0 -34
- package/dist/types/src/types/features.d.ts +0 -7
- package/dist/types/src/utils/api.d.ts +0 -10
- package/dist/types/src/utils/featureUtils.d.ts +0 -6
- package/dist/types/src/utils/gitTest.d.ts +0 -11
- package/dist/types/src/utils/makePrompt.d.ts +0 -2
- package/dist/types/src/utils.d.ts +0 -20
- package/pitono/__init__.py +0 -54
- package/pitono/base_given.py +0 -131
- package/pitono/base_suite.py +0 -95
- package/pitono/base_then.py +0 -50
- package/pitono/base_when.py +0 -52
- package/pitono/pitono.egg-info/PKG-INFO +0 -17
- package/pitono/pitono.egg-info/SOURCES.txt +0 -7
- package/pitono/types.py +0 -78
- package/src/App.tsx +0 -228
- package/src/PM/PM_WithBuild.ts +0 -171
- package/src/PM/PM_WithEslintAndTsc.ts +0 -279
- package/src/PM/PM_WithGit.ts +0 -585
- package/src/PM/PM_WithProcesses.ts +0 -639
- package/src/PM/PM_WithWebSocket.ts +0 -631
- package/src/PM/base.ts +0 -390
- package/src/PM/main.ts +0 -849
- package/src/PM/metafileOutputs.ts +0 -90
- package/src/ReportServer.test.ts/index.ts +0 -194
- package/src/app.scss +0 -19
- package/src/components/DesignEditorPage.tsx +0 -202
- package/src/components/SunriseAnimation.test/interface.ts +0 -49
- package/src/components/SunriseAnimation.test/types.ts +0 -53
- package/src/components/SunriseAnimation.tsx +0 -350
- package/src/components/pure/AppFrame.tsx +0 -300
- package/src/components/pure/FeaturesReporterView.tsx +0 -37
- package/src/components/pure/GitHubLoginButton.tsx +0 -31
- package/src/components/pure/GitIntegrationView.tsx +0 -443
- package/src/components/pure/ModalContent.test/index.tsx +0 -67
- package/src/components/pure/NavBar.tsx +0 -118
- package/src/components/pure/ProcessManager.tsx +0 -118
- package/src/components/pure/ProcessManagerView.tsx +0 -410
- package/src/components/pure/ProjectPageView.test/implementation.tsx +0 -213
- package/src/components/pure/ProjectPageView.tsx +0 -148
- package/src/components/pure/Settings.test.tsx +0 -34
- package/src/components/pure/Settings.tsx +0 -163
- package/src/components/pure/SignIn.tsx +0 -33
- package/src/components/pure/SingleProcessView.tsx +0 -231
- package/src/components/pure/TestPageView.test/implementation.ts +0 -162
- package/src/components/pure/TestPageView.test/index.tsx +0 -20
- package/src/components/pure/TestPageView.test/specification.ts +0 -59
- package/src/components/pure/TestPageView.test/types.ts +0 -92
- package/src/components/pure/TestPageView.tsx +0 -706
- package/src/components/pure/TestPageView_utils.tsx +0 -285
- package/src/components/stateful/FeaturesReporter.tsx +0 -26
- package/src/components/stateful/GitIntegrationPage.tsx +0 -8
- package/src/components/stateful/ProcessManagerPage.tsx +0 -104
- package/src/components/stateful/ProjectPage.tsx +0 -86
- package/src/components/stateful/ProjectsPage.tsx +0 -100
- package/src/components/stateful/SVGEditor/SVGAttributesEditor.tsx +0 -73
- package/src/components/stateful/SVGEditor/SVGPreview.tsx +0 -225
- package/src/components/stateful/SVGEditorPage.tsx +0 -503
- package/src/components/stateful/SingleProcessPage.tsx +0 -142
- package/src/components/stateful/TestPage.tsx +0 -268
- package/src/golingvu/base_suite_test.go +0 -197
- package/src/hooks/useGitMode.ts +0 -20
- package/src/services/FileService.ts +0 -542
- package/src/services/GitHubAuthService.ts +0 -240
- package/src/templates/frontpage.html +0 -340
- package/src/templates/frontpage.md +0 -79
- package/src/types/features.ts +0 -38
- package/src/utils/api.ts +0 -108
- package/src/utils/featureUtils.tsx +0 -42
- package/src/utils/gitTest.ts +0 -29
- package/src/utils/makePrompt.ts +0 -149
- package/src/utils.ts +0 -202
- package/stargazers.txt +0 -15
- package/testeranto/bundles/golang/core/Calculator.golingvu.go +0 -53
- package/testeranto/bundles/golang/core/Calculator.golingvu.golingvu.go +0 -53
- package/testeranto/bundles/node/core/chunk-RIM6RECA.mjs +0 -1170
- package/testeranto/bundles/node/core/chunk-VXVF7WFO.mjs +0 -4321
- package/testeranto/bundles/node/core/src/lib/BaseSuite.test/node.test.mjs +0 -270
- package/testeranto/bundles/node/core/src/lib/TipoSkripto.test/TipoSkripto.mjs +0 -574
- package/testeranto/bundles/node/core/src/lib/pmProxy.test/index.mjs +0 -482
- package/testeranto/bundles/pure/core/chunk-XYOCRDEQ.mjs +0 -1080
- package/testeranto/bundles/pure/core/src/Pure.test.mjs +0 -410
- package/testeranto/bundles/pure/core/src/lib/BaseSuite.test/pure.test.mjs +0 -270
- package/testeranto/bundles/python/core/test_example.py +0 -24
- 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 +0 -2297
- package/testeranto/bundles/web/core/chunk-JMDLMADH.mjs +0 -27996
- package/testeranto/bundles/web/core/chunk-LQMU5NCG.mjs +0 -3082
- package/testeranto/bundles/web/core/chunk-Q5TONB2Z.mjs +0 -6874
- package/testeranto/bundles/web/core/src/components/pure/FeaturesReporterView.test/index.mjs +0 -164
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.css +0 -11697
- package/testeranto/bundles/web/core/src/components/pure/ModalContent.test/index.mjs +0 -336
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.css +0 -11697
- package/testeranto/bundles/web/core/src/components/pure/ProjectPageView.test/index.mjs +0 -517
- package/testeranto/bundles/web/core/src/lib/BaseSuite.test/web.test.mjs +0 -285
- package/testeranto/metafiles/pure/core.json +0 -734
- package/testeranto/metafiles/web/core.json +0 -16501
- package/testeranto/reports/core/src/Pure.test/pure/message.txt +0 -17
- package/testeranto/reports/core/src/Pure.test/pure/prompt.txt +0 -14
- package/testeranto/reports/core/src/Pure.test/pure/type_errors.txt +0 -73
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/error.log +0 -91
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/info.log +0 -2
- package/testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/tests.json +0 -68
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/error.log +0 -30
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/info.log +0 -2
- package/testeranto/reports/core/src/components/pure/ProjectPageView.test/index/web/tests.json +0 -88
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/exit.log +0 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/message.txt +0 -17
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/prompt.txt +0 -15
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/stdout.log +0 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/tests.json +0 -29
- package/testeranto/reports/core/src/lib/BaseSuite.test/node.test/node/type_errors.txt +0 -53
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/exit.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/lint_errors.txt +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/message.txt +0 -17
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/prompt.txt +0 -15
- package/testeranto/reports/core/src/lib/BaseSuite.test/pure.test/pure/type_errors.txt +0 -58
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/debug.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/error.log +0 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/exit.log +0 -1
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/info.log +0 -0
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/tests.json +0 -29
- package/testeranto/reports/core/src/lib/BaseSuite.test/web.test/web/warn.log +0 -0
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/exit.log +0 -1
- 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 +0 -17
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/prompt.txt +0 -17
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stderr.log +0 -55
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/stdout.log +0 -191
- package/testeranto/reports/core/src/lib/TipoSkripto.test/TipoSkripto/node/type_errors.txt +0 -71
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/exit.log +0 -1
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/lint_errors.txt +0 -15
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/message.txt +0 -17
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/prompt.txt +0 -17
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stderr.log +0 -20
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/stdout.log +0 -4
- package/testeranto/reports/core/src/lib/pmProxy.test/index/node/type_errors.txt +0 -49
- package/testeranto.ts-0.0.1.tgz +0 -0
- package/type-fix.txt +0 -2
- /package/{dist/types/src/PM/metafileOutputs.d.ts → build-go.sh} +0 -0
- /package/dist/common/src/{components → app/frontend/components}/SunriseAnimation.test/implementation.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/SunriseAnimation.test/index.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/SunriseAnimation.test/specification.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/SunriseAnimation.test/types.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/TestStatusBadge.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/AppFrame.test/implementation.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/AppFrame.test/index.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/AppFrame.test/specification.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/AppFrame.test/types.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ArtifactTree.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/BuildLogViewer.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/DebugEnv.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/implementation.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/index.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/specification.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/types.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/FileTree.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/FileTreeItem.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ModalContent.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ModalContent.test/implementation.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ModalContent.test/specification.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ModalContent.test/types.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ProjectPageView.test/index.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ProjectPageView.test/specification.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ProjectPageView.test/types.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ProjectsPageView.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/SettingsButton.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/TestTable.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ThemeCard.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/ToastNotification.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/pure/UserProfile.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/stateful/AuthCallbackPage.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/stateful/FileTree.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/stateful/SettingsPage.js +0 -0
- /package/dist/common/src/{components → app/frontend/components}/stateful/TextEditorPage.js +0 -0
- /package/dist/common/src/{components/pure → app/frontend/testPage}/TestPageView.test/types.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/SunriseAnimation.test/implementation.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/SunriseAnimation.test/index.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/SunriseAnimation.test/specification.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/SunriseAnimation.test/types.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/TestStatusBadge.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/AppFrame.test/implementation.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/AppFrame.test/index.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/AppFrame.test/specification.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/AppFrame.test/types.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ArtifactTree.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/BuildLogViewer.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/DebugEnv.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/implementation.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/index.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/specification.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/types.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/FileTree.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/FileTreeItem.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ModalContent.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ModalContent.test/implementation.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ModalContent.test/specification.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ModalContent.test/types.js +0 -0
- /package/dist/{types/src/components/pure/Settings.test.d.ts → module/src/app/frontend/components/pure/ProcessManagerViewTypes.js} +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ProjectPageView.test/index.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ProjectPageView.test/specification.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ProjectPageView.test/types.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ProjectsPageView.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/SettingsButton.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/TestTable.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ThemeCard.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/ToastNotification.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/pure/UserProfile.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/stateful/AuthCallbackPage.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/stateful/FileTree.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/stateful/SettingsPage.js +0 -0
- /package/dist/module/src/{components → app/frontend/components}/stateful/TextEditorPage.js +0 -0
- /package/dist/module/src/{components/pure → app/frontend/testPage}/TestPageView.test/types.js +0 -0
- /package/dist/types/src/{ReportServer.d.ts → app/backend/PM_WithProcesses.d.ts} +0 -0
- /package/dist/types/src/{services → app/frontend}/GitHubAuthService.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/DesignEditorPage.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/SunriseAnimation.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/SunriseAnimation.test/implementation.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/SunriseAnimation.test/index.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/SunriseAnimation.test/specification.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/TestStatusBadge.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/AppFrame.test/implementation.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/AppFrame.test/specification.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/AppFrame.test/types.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ArtifactTree.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/BuildLogViewer.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/DebugEnv.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/implementation.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/specification.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/types.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/FileTree.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/FileTreeItem.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/GitHubLoginButton.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ModalContent.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ModalContent.test/implementation.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ModalContent.test/specification.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ModalContent.test/types.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/NavBar.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ProcessManager.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ProjectPageView.test/specification.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ProjectPageView.test/types.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ProjectsPageView.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/Settings.d.ts +0 -0
- /package/dist/types/src/{ReportServerLib.d.ts → app/frontend/components/pure/Settings.test.d.ts} +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/SettingsButton.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/SignIn.d.ts +0 -0
- /package/dist/types/src/{components/stateful/FileTree.d.ts → app/frontend/components/pure/SingleProcessView.d.ts} +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/TestTable.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ThemeCard.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/ToastNotification.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/pure/UserProfile.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/stateful/AuthCallbackPage.d.ts +0 -0
- /package/{src/ReportServer.ts → dist/types/src/app/frontend/components/stateful/FeaturesReporter.d.ts} +0 -0
- /package/{src/ReportServerLib.ts → dist/types/src/app/frontend/components/stateful/FileTree.d.ts} +0 -0
- /package/dist/types/src/{components → app/frontend/components}/stateful/GitIntegrationPage.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/stateful/ProcessManagerPage.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/stateful/ProjectPage.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/stateful/ProjectsPage.d.ts +0 -0
- /package/dist/types/src/{components → app/frontend/components}/stateful/SettingsPage.d.ts +0 -0
- /package/{src/components/SunriseAnimation.test/implementation.ts → dist/types/src/app/frontend/components/stateful/SingleProcessPage.d.ts} +0 -0
- /package/dist/types/src/{components → app/frontend/components}/stateful/TextEditorPage.d.ts +0 -0
- /package/{src/components/SunriseAnimation.test/index.ts → dist/types/src/app/frontend/fetchDataUtil.d.ts} +0 -0
- /package/dist/types/src/{components/stateful → app/frontend/testPage}/TestPage.d.ts +0 -0
- /package/{src/components/SunriseAnimation.test/specification.ts → dist/types/src/app/frontend/useFileSystemSync.d.ts} +0 -0
- /package/dist/types/src/{hooks → app/frontend}/useGitMode.d.ts +0 -0
- /package/{testeranto/reports/core/src/Pure.test/pure/exit.log → docker.md} +0 -0
- /package/{testeranto/reports/core/src/Pure.test/pure/lint_errors.txt → src/app/frontend/components/SunriseAnimation.test/implementation.ts} +0 -0
- /package/{testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/debug.log → src/app/frontend/components/SunriseAnimation.test/index.ts} +0 -0
- /package/src/{components → app/frontend/components}/SunriseAnimation.test/index.tsx +0 -0
- /package/{testeranto/reports/core/src/components/pure/FeaturesReporterView.test/index/web/warn.log → src/app/frontend/components/SunriseAnimation.test/specification.ts} +0 -0
- /package/src/{components → app/frontend/components}/TestStatusBadge.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/AppFrame.test/implementation.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/AppFrame.test/index.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/AppFrame.test/specification.ts +0 -0
- /package/src/{components → app/frontend/components}/pure/AppFrame.test/types.ts +0 -0
- /package/src/{components → app/frontend/components}/pure/ArtifactTree.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/BuildLogViewer.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/DebugEnv.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/implementation.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/index.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/specification.ts +0 -0
- /package/src/{components → app/frontend/components}/pure/FeaturesReporterView.test/types.ts +0 -0
- /package/src/{components → app/frontend/components}/pure/FileTree.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/FileTreeItem.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/ModalContent.test/implementation.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/ModalContent.test/specification.ts +0 -0
- /package/src/{components → app/frontend/components}/pure/ModalContent.test/types.ts +0 -0
- /package/src/{components → app/frontend/components}/pure/ModalContent.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/ProjectPageView.test/index.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/ProjectPageView.test/specification.ts +0 -0
- /package/src/{components → app/frontend/components}/pure/ProjectPageView.test/types.ts +0 -0
- /package/src/{components → app/frontend/components}/pure/ProjectsPageView.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/SettingsButton.md +0 -0
- /package/src/{components → app/frontend/components}/pure/SettingsButton.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/TestTable.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/ThemeCard.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/ToastNotification.tsx +0 -0
- /package/src/{components → app/frontend/components}/pure/UserProfile.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/AuthCallbackPage.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/FileTree.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/CircleForm.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/GroupForm.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/RectForm.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGAttributeField.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGEditorControls.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGElementForm.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGTextEditor.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGTree.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/SVGTypes.ts +0 -0
- /package/src/{components → app/frontend/components}/stateful/SVGEditor/svg.xsd.xml +0 -0
- /package/src/{components → app/frontend/components}/stateful/SettingsPage.tsx +0 -0
- /package/src/{components → app/frontend/components}/stateful/TextEditorPage.tsx +0 -0
- /package/{pitono → src/pitono}/core_generator.py +0 -0
- /package/{pitono → src/pitono}/pitono.egg-info/dependency_links.txt +0 -0
- /package/{pitono → src/pitono}/pitono.egg-info/entry_points.txt +0 -0
- /package/{pitono → src/pitono}/pitono.egg-info/top_level.txt +0 -0
- /package/{pitono → src/pitono}/pyproject.toml +0 -0
- /package/{pitono → src/pitono}/setup.py +0 -0
- /package/{pitono → src/pitono}/simple_adapter.py +0 -0
- /package/testeranto/{reports/core/src/components/pure/ProjectPageView.test/index/web/debug.log → helpo_chat_message.txt} +0 -0
- /package/testeranto/{projects.html → index.html} +0 -0
- /package/testeranto/reports/core/{src/components/pure/ProjectPageView.test/index/web/warn.log → example/Calculator.golingvu.test/golang/stdout.log} +0 -0
- /package/testeranto/reports/core/{src/components/pure/FeaturesReporterView.test/index/web → example/Calculator.pitono.test/python}/exit.log +0 -0
- /package/testeranto/reports/core/{src/lib/BaseSuite.test/node.test/node → example/Calculator.pitono.test/python}/stderr.log +0 -0
- /package/testeranto/reports/core/{src/components/pure/ProjectPageView.test/index/web → example/Calculator.test/node}/exit.log +0 -0
- /package/testeranto/reports/core/{src/lib/BaseSuite.test/node.test/node/lint_errors.txt → example/Calculator.test/node/stdout.log} +0 -0
package/src/app/trash
ADDED
|
@@ -0,0 +1,1697 @@
|
|
|
1
|
+
|
|
2
|
+
// rootHtml(x: any) {
|
|
3
|
+
// throw new Error("Method not implemented.");
|
|
4
|
+
// }
|
|
5
|
+
|
|
6
|
+
// writeFile(path: string, content: string): Promise<void> {
|
|
7
|
+
// throw new Error("Method not implemented.");
|
|
8
|
+
// }
|
|
9
|
+
// readFile(path: string): Promise<string> {
|
|
10
|
+
// throw new Error("Method not implemented.");
|
|
11
|
+
// }
|
|
12
|
+
// createDirectory(path: string): Promise<void> {
|
|
13
|
+
// throw new Error("Method not implemented.");
|
|
14
|
+
// }
|
|
15
|
+
// deleteFile(path: string): Promise<void> {
|
|
16
|
+
// throw new Error("Method not implemented.");
|
|
17
|
+
// }
|
|
18
|
+
// files(path: string): Promise<object> {
|
|
19
|
+
// throw new Error("Method not implemented.");
|
|
20
|
+
// }
|
|
21
|
+
// projects(project: string): Promise<string[]> {
|
|
22
|
+
// throw new Error("Method not implemented.");
|
|
23
|
+
// }
|
|
24
|
+
// tests(project: string): Promise<string[]> {
|
|
25
|
+
// throw new Error("Method not implemented.");
|
|
26
|
+
// }
|
|
27
|
+
// report(project: string, test: string): Promise<object> {
|
|
28
|
+
// throw new Error("Method not implemented.");
|
|
29
|
+
// }
|
|
30
|
+
// }
|
|
31
|
+
|
|
32
|
+
// private changeCallbacks: ((changes: FileChange[]) => void)[] = [];
|
|
33
|
+
// private statusCallbacks: ((status: RemoteStatus) => void)[] = [];
|
|
34
|
+
// private branchCallbacks: ((branch: string) => void)[] = [];
|
|
35
|
+
// private fileCallbacks: Map<string, ((content: string) => void)[]> = new Map();
|
|
36
|
+
// private directoryCallbacks: Map<string, ((entries: FileEntry[]) => void)[]> = new Map();
|
|
37
|
+
|
|
38
|
+
// files(path: string): Promise<object> {
|
|
39
|
+
// throw new Error("Method not implemented.");
|
|
40
|
+
// }
|
|
41
|
+
// projects(project: string): Promise<string[]> {
|
|
42
|
+
// throw new Error("Method not implemented.");
|
|
43
|
+
// }
|
|
44
|
+
// tests(project: string): Promise<string[]> {
|
|
45
|
+
// throw new Error("Method not implemented.");
|
|
46
|
+
// }
|
|
47
|
+
// report(project: string, test: string): Promise<object> {
|
|
48
|
+
// throw new Error("Method not implemented.");
|
|
49
|
+
// }
|
|
50
|
+
// fsTree(path: string): Promise<object> {
|
|
51
|
+
// throw new Error("Method not implemented.");
|
|
52
|
+
// }
|
|
53
|
+
// projectTree(project: string): Promise<object> {
|
|
54
|
+
// throw new Error("Method not implemented.");
|
|
55
|
+
// }
|
|
56
|
+
|
|
57
|
+
// private connectWebSocket() {
|
|
58
|
+
// // Ensure we're in a browser environment
|
|
59
|
+
// if (typeof window === "undefined") return;
|
|
60
|
+
|
|
61
|
+
// try {
|
|
62
|
+
// const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
63
|
+
// const wsUrl = `${protocol}//${window.location.host}/api/git-ws`;
|
|
64
|
+
// this.ws = new WebSocket(wsUrl);
|
|
65
|
+
|
|
66
|
+
// this.ws.onopen = () => {
|
|
67
|
+
// console.log("Git WebSocket connected");
|
|
68
|
+
// // Request initial state
|
|
69
|
+
// if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
70
|
+
// this.ws.send(JSON.stringify({ type: "get-initial-state" }));
|
|
71
|
+
// }
|
|
72
|
+
// };
|
|
73
|
+
|
|
74
|
+
// this.ws.onmessage = (event) => {
|
|
75
|
+
// try {
|
|
76
|
+
// const data = JSON.parse(event.data);
|
|
77
|
+
// switch (data.type) {
|
|
78
|
+
// case "changes":
|
|
79
|
+
// this.changeCallbacks.forEach((callback) =>
|
|
80
|
+
// callback(data.changes)
|
|
81
|
+
// );
|
|
82
|
+
// break;
|
|
83
|
+
// case "status":
|
|
84
|
+
// this.statusCallbacks.forEach((callback) => callback(data.status));
|
|
85
|
+
// break;
|
|
86
|
+
// case "branch":
|
|
87
|
+
// this.branchCallbacks.forEach((callback) => callback(data.branch));
|
|
88
|
+
// break;
|
|
89
|
+
// case "fileContent": {
|
|
90
|
+
// // Handle file content responses
|
|
91
|
+
// const fileCallbacks = this.fileCallbacks.get(data.path) || [];
|
|
92
|
+
// fileCallbacks.forEach((callback) => callback(data.content));
|
|
93
|
+
// this.fileCallbacks.delete(data.path);
|
|
94
|
+
// break;
|
|
95
|
+
// }
|
|
96
|
+
// case "directoryListing": {
|
|
97
|
+
// // Handle directory listing responses
|
|
98
|
+
// const dirCallbacks = this.directoryCallbacks.get(data.path) || [];
|
|
99
|
+
// dirCallbacks.forEach((callback) => callback(data.items));
|
|
100
|
+
// this.directoryCallbacks.delete(data.path);
|
|
101
|
+
// break;
|
|
102
|
+
// }
|
|
103
|
+
// case "error":
|
|
104
|
+
// console.error("Git WebSocket error:", data.message);
|
|
105
|
+
// // Reject pending callbacks
|
|
106
|
+
// if (data.path) {
|
|
107
|
+
// const fileCallbacks = this.fileCallbacks.get(data.path) || [];
|
|
108
|
+
// fileCallbacks.forEach((callback) => callback(""));
|
|
109
|
+
// this.fileCallbacks.delete(data.path);
|
|
110
|
+
|
|
111
|
+
// const dirCallbacks =
|
|
112
|
+
// this.directoryCallbacks.get(data.path) || [];
|
|
113
|
+
// dirCallbacks.forEach((callback) => callback([]));
|
|
114
|
+
// this.directoryCallbacks.delete(data.path);
|
|
115
|
+
// }
|
|
116
|
+
// break;
|
|
117
|
+
// }
|
|
118
|
+
// } catch (error) {
|
|
119
|
+
// console.error("Error parsing WebSocket message:", error);
|
|
120
|
+
// }
|
|
121
|
+
// };
|
|
122
|
+
|
|
123
|
+
// this.ws.onclose = () => {
|
|
124
|
+
// console.log("Git WebSocket disconnected, attempting to reconnect...");
|
|
125
|
+
// setTimeout(() => this.connectWebSocket(), 3000);
|
|
126
|
+
// };
|
|
127
|
+
|
|
128
|
+
// this.ws.onerror = (error) => {
|
|
129
|
+
// console.error("Git WebSocket error:", error);
|
|
130
|
+
// };
|
|
131
|
+
// } catch (error) {
|
|
132
|
+
// console.error("Failed to connect Git WebSocket:", error);
|
|
133
|
+
// }
|
|
134
|
+
// }
|
|
135
|
+
|
|
136
|
+
// // Subscribe to real-time changes
|
|
137
|
+
// onChanges(callback: (changes: FileChange[]) => void) {
|
|
138
|
+
// this.changeCallbacks.push(callback);
|
|
139
|
+
// return () => {
|
|
140
|
+
// this.changeCallbacks = this.changeCallbacks.filter(
|
|
141
|
+
// (cb) => cb !== callback
|
|
142
|
+
// );
|
|
143
|
+
// };
|
|
144
|
+
// }
|
|
145
|
+
|
|
146
|
+
// onStatusUpdate(callback: (status: RemoteStatus) => void) {
|
|
147
|
+
// this.statusCallbacks.push(callback);
|
|
148
|
+
// return () => {
|
|
149
|
+
// this.statusCallbacks = this.statusCallbacks.filter(
|
|
150
|
+
// (cb) => cb !== callback
|
|
151
|
+
// );
|
|
152
|
+
// };
|
|
153
|
+
// }
|
|
154
|
+
|
|
155
|
+
// onBranchUpdate(callback: (branch: string) => void) {
|
|
156
|
+
// this.branchCallbacks.push(callback);
|
|
157
|
+
// return () => {
|
|
158
|
+
// this.branchCallbacks = this.branchCallbacks.filter(
|
|
159
|
+
// (cb) => cb !== callback
|
|
160
|
+
// );
|
|
161
|
+
// };
|
|
162
|
+
// }
|
|
163
|
+
|
|
164
|
+
// private ensureWebSocketConnected(): Promise<void> {
|
|
165
|
+
// return new Promise((resolve, reject) => {
|
|
166
|
+
// // If already connected, resolve immediately
|
|
167
|
+
// if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
168
|
+
// resolve();
|
|
169
|
+
// return;
|
|
170
|
+
// }
|
|
171
|
+
|
|
172
|
+
// // If connecting in progress, wait for it
|
|
173
|
+
// if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
|
174
|
+
// const onOpen = () => {
|
|
175
|
+
// this.ws?.removeEventListener("open", onOpen);
|
|
176
|
+
// resolve();
|
|
177
|
+
// };
|
|
178
|
+
// this.ws.addEventListener("open", onOpen);
|
|
179
|
+
// return;
|
|
180
|
+
// }
|
|
181
|
+
|
|
182
|
+
// // Connect if not connected
|
|
183
|
+
// this.connectWebSocket();
|
|
184
|
+
|
|
185
|
+
// // Wait for connection
|
|
186
|
+
// if (this.ws) {
|
|
187
|
+
// const onOpen = () => {
|
|
188
|
+
// this.ws?.removeEventListener("open", onOpen);
|
|
189
|
+
// resolve();
|
|
190
|
+
// };
|
|
191
|
+
// const onError = (error: Event) => {
|
|
192
|
+
// this.ws?.removeEventListener("error", onError);
|
|
193
|
+
// reject(new Error("Failed to connect WebSocket"));
|
|
194
|
+
// };
|
|
195
|
+
// this.ws.addEventListener("open", onOpen);
|
|
196
|
+
// this.ws.addEventListener("error", onError);
|
|
197
|
+
// } else {
|
|
198
|
+
// reject(new Error("Failed to create WebSocket"));
|
|
199
|
+
// }
|
|
200
|
+
// });
|
|
201
|
+
// }
|
|
202
|
+
|
|
203
|
+
// async readFile(path: string): Promise<string> {
|
|
204
|
+
// return new Promise(async (resolve, reject) => {
|
|
205
|
+
// try {
|
|
206
|
+
// await this.ensureWebSocketConnected();
|
|
207
|
+
|
|
208
|
+
// if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
209
|
+
// reject(new Error("WebSocket is not connected"));
|
|
210
|
+
// return;
|
|
211
|
+
// }
|
|
212
|
+
|
|
213
|
+
// // Add callback
|
|
214
|
+
// if (!this.fileCallbacks.has(path)) {
|
|
215
|
+
// this.fileCallbacks.set(path, []);
|
|
216
|
+
// }
|
|
217
|
+
// const callbacks = this.fileCallbacks.get(path)!;
|
|
218
|
+
// callbacks.push(resolve);
|
|
219
|
+
|
|
220
|
+
// // Send request
|
|
221
|
+
// this.ws.send(
|
|
222
|
+
// JSON.stringify({
|
|
223
|
+
// type: "readFile",
|
|
224
|
+
// path,
|
|
225
|
+
// })
|
|
226
|
+
// );
|
|
227
|
+
|
|
228
|
+
// // Set timeout for error handling
|
|
229
|
+
// setTimeout(() => {
|
|
230
|
+
// const remainingCallbacks = this.fileCallbacks.get(path);
|
|
231
|
+
// if (remainingCallbacks && remainingCallbacks.length > 0) {
|
|
232
|
+
// remainingCallbacks.forEach((cb) => cb(""));
|
|
233
|
+
// this.fileCallbacks.delete(path);
|
|
234
|
+
// reject(new Error("Timeout reading file"));
|
|
235
|
+
// }
|
|
236
|
+
// }, 5000);
|
|
237
|
+
// } catch (error) {
|
|
238
|
+
// reject(error);
|
|
239
|
+
// }
|
|
240
|
+
// });
|
|
241
|
+
// }
|
|
242
|
+
|
|
243
|
+
// async readDirectory(path: string): Promise<FileEntry[]> {
|
|
244
|
+
// return new Promise(async (resolve, reject) => {
|
|
245
|
+
// try {
|
|
246
|
+
// await this.ensureWebSocketConnected();
|
|
247
|
+
|
|
248
|
+
// if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
249
|
+
// reject(new Error("WebSocket is not connected"));
|
|
250
|
+
// return;
|
|
251
|
+
// }
|
|
252
|
+
|
|
253
|
+
// // Add callback
|
|
254
|
+
// if (!this.directoryCallbacks.has(path)) {
|
|
255
|
+
// this.directoryCallbacks.set(path, []);
|
|
256
|
+
// }
|
|
257
|
+
// const callbacks = this.directoryCallbacks.get(path)!;
|
|
258
|
+
// callbacks.push(resolve);
|
|
259
|
+
|
|
260
|
+
// // Send request
|
|
261
|
+
// this.ws.send(
|
|
262
|
+
// JSON.stringify({
|
|
263
|
+
// type: "listDirectory",
|
|
264
|
+
// path,
|
|
265
|
+
// })
|
|
266
|
+
// );
|
|
267
|
+
|
|
268
|
+
// // Set timeout for error handling
|
|
269
|
+
// setTimeout(() => {
|
|
270
|
+
// const remainingCallbacks = this.directoryCallbacks.get(path);
|
|
271
|
+
// if (remainingCallbacks && remainingCallbacks.length > 0) {
|
|
272
|
+
// remainingCallbacks.forEach((cb) => cb([]));
|
|
273
|
+
// this.directoryCallbacks.delete(path);
|
|
274
|
+
// reject(new Error("Timeout reading directory"));
|
|
275
|
+
// }
|
|
276
|
+
// }, 5000);
|
|
277
|
+
// } catch (error) {
|
|
278
|
+
// reject(error);
|
|
279
|
+
// }
|
|
280
|
+
// });
|
|
281
|
+
// }
|
|
282
|
+
|
|
283
|
+
// private async readDirectoryViaWebSocket(path: string): Promise<FileEntry[]> {
|
|
284
|
+
// // This should not be used - WebSocket communication should be handled separately
|
|
285
|
+
// throw new Error("WebSocket directory listing not implemented");
|
|
286
|
+
// }
|
|
287
|
+
|
|
288
|
+
// async exists(path: string): Promise<boolean> {
|
|
289
|
+
// try {
|
|
290
|
+
// await this.readFile(path);
|
|
291
|
+
// return true;
|
|
292
|
+
// } catch {
|
|
293
|
+
// return false;
|
|
294
|
+
// }
|
|
295
|
+
// }
|
|
296
|
+
|
|
297
|
+
// async writeFile(path: string, content: string): Promise<void> {
|
|
298
|
+
// await this.ensureWebSocketConnected();
|
|
299
|
+
|
|
300
|
+
// if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
301
|
+
// throw new Error("WebSocket is not connected");
|
|
302
|
+
// }
|
|
303
|
+
|
|
304
|
+
// this.ws.send(
|
|
305
|
+
// JSON.stringify({
|
|
306
|
+
// type: "writeFile",
|
|
307
|
+
// path,
|
|
308
|
+
// content,
|
|
309
|
+
// })
|
|
310
|
+
// );
|
|
311
|
+
|
|
312
|
+
// // For now, we'll assume it always succeeds
|
|
313
|
+
// // In a real implementation, we'd want to wait for a confirmation
|
|
314
|
+
// }
|
|
315
|
+
|
|
316
|
+
// async createDirectory(path: string): Promise<void> {
|
|
317
|
+
// await this.ensureWebSocketConnected();
|
|
318
|
+
|
|
319
|
+
// if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
320
|
+
// throw new Error("WebSocket is not connected");
|
|
321
|
+
// }
|
|
322
|
+
|
|
323
|
+
// this.ws.send(
|
|
324
|
+
// JSON.stringify({
|
|
325
|
+
// type: "createDirectory",
|
|
326
|
+
// path,
|
|
327
|
+
// })
|
|
328
|
+
// );
|
|
329
|
+
|
|
330
|
+
// // For now, we'll assume it always succeeds
|
|
331
|
+
// }
|
|
332
|
+
|
|
333
|
+
// async deleteFile(path: string): Promise<void> {
|
|
334
|
+
// await this.ensureWebSocketConnected();
|
|
335
|
+
|
|
336
|
+
// if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
337
|
+
// throw new Error("WebSocket is not connected");
|
|
338
|
+
// }
|
|
339
|
+
|
|
340
|
+
// this.ws.send(
|
|
341
|
+
// JSON.stringify({
|
|
342
|
+
// type: "deleteFile",
|
|
343
|
+
// path,
|
|
344
|
+
// })
|
|
345
|
+
// );
|
|
346
|
+
|
|
347
|
+
// // For now, we'll assume it always succeeds
|
|
348
|
+
// }
|
|
349
|
+
|
|
350
|
+
// async getFileStatus(path: string): Promise<FileStatus> {
|
|
351
|
+
// await this.ensureWebSocketConnected();
|
|
352
|
+
// const response = await fetch(
|
|
353
|
+
// `/api/git/status?path=${encodeURIComponent(path)}`
|
|
354
|
+
// );
|
|
355
|
+
// if (!response.ok) return { status: "unchanged" };
|
|
356
|
+
// return await response.json();
|
|
357
|
+
// }
|
|
358
|
+
|
|
359
|
+
// async getChanges(): Promise<FileChange[]> {
|
|
360
|
+
// try {
|
|
361
|
+
// await this.ensureWebSocketConnected();
|
|
362
|
+
// const response = await fetch("/api/git/changes");
|
|
363
|
+
// if (!response.ok) return [];
|
|
364
|
+
// const changes = await response.json();
|
|
365
|
+
// console.log("Raw changes from server:", JSON.stringify(changes, null, 2));
|
|
366
|
+
// return changes;
|
|
367
|
+
// } catch (error) {
|
|
368
|
+
// console.error("Error fetching changes:", error);
|
|
369
|
+
// return [];
|
|
370
|
+
// }
|
|
371
|
+
// }
|
|
372
|
+
|
|
373
|
+
// async commitChanges(message: string, description?: string): Promise<void> {
|
|
374
|
+
// await this.ensureWebSocketConnected();
|
|
375
|
+
// const response = await fetch("/api/git/commit", {
|
|
376
|
+
// method: "POST",
|
|
377
|
+
// headers: { "Content-Type": "application/json" },
|
|
378
|
+
// body: JSON.stringify({ message, description }),
|
|
379
|
+
// });
|
|
380
|
+
// if (!response.ok) {
|
|
381
|
+
// const error = await response.text();
|
|
382
|
+
// throw new Error(`Failed to commit changes: ${error}`);
|
|
383
|
+
// }
|
|
384
|
+
|
|
385
|
+
// // Request updated status after commit
|
|
386
|
+
// this.ws?.send(JSON.stringify({ type: "refresh-status" }));
|
|
387
|
+
// }
|
|
388
|
+
|
|
389
|
+
// async pushChanges(): Promise<void> {
|
|
390
|
+
// await this.ensureWebSocketConnected();
|
|
391
|
+
// const response = await fetch("/api/git/push", {
|
|
392
|
+
// method: "POST",
|
|
393
|
+
// });
|
|
394
|
+
// if (!response.ok) {
|
|
395
|
+
// const error = await response.text();
|
|
396
|
+
// throw new Error(`Failed to push changes: ${error}`);
|
|
397
|
+
// }
|
|
398
|
+
|
|
399
|
+
// this.ws?.send(JSON.stringify({ type: "refresh-status" }));
|
|
400
|
+
// }
|
|
401
|
+
|
|
402
|
+
// async pullChanges(): Promise<void> {
|
|
403
|
+
// await this.ensureWebSocketConnected();
|
|
404
|
+
// const response = await fetch("/api/git/pull", {
|
|
405
|
+
// method: "POST",
|
|
406
|
+
// });
|
|
407
|
+
// if (!response.ok) {
|
|
408
|
+
// const error = await response.text();
|
|
409
|
+
// throw new Error(`Failed to pull changes: ${error}`);
|
|
410
|
+
// }
|
|
411
|
+
|
|
412
|
+
// this.ws?.send(JSON.stringify({ type: "refresh-status" }));
|
|
413
|
+
// }
|
|
414
|
+
|
|
415
|
+
// async getCurrentBranch(): Promise<string> {
|
|
416
|
+
// await this.ensureWebSocketConnected();
|
|
417
|
+
// const response = await fetch("/api/git/branch");
|
|
418
|
+
// if (!response.ok) return "main";
|
|
419
|
+
// return await response.text();
|
|
420
|
+
// }
|
|
421
|
+
|
|
422
|
+
// async getRemoteStatus(): Promise<RemoteStatus> {
|
|
423
|
+
// await this.ensureWebSocketConnected();
|
|
424
|
+
// const response = await fetch("/api/git/remote-status");
|
|
425
|
+
// if (!response.ok) return { ahead: 0, behind: 0 };
|
|
426
|
+
// return await response.json();
|
|
427
|
+
// }
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
// /* eslint-disable @typescript-eslint/no-explicit-any */
|
|
431
|
+
// /* eslint-disable no-async-promise-executor */
|
|
432
|
+
// /* eslint-disable @typescript-eslint/no-unused-vars */
|
|
433
|
+
|
|
434
|
+
// import fs from "@isomorphic-git/lightning-fs";
|
|
435
|
+
// import git from "isomorphic-git";
|
|
436
|
+
|
|
437
|
+
// import {
|
|
438
|
+
// FileService,
|
|
439
|
+
// FileChange,
|
|
440
|
+
// RemoteStatus,
|
|
441
|
+
// FileEntry,
|
|
442
|
+
// FileStatus,
|
|
443
|
+
// } from "../FileService";
|
|
444
|
+
// import { RawData, WebSocketServer } from "ws";
|
|
445
|
+
// import http from "http";
|
|
446
|
+
// import { spawn, ChildProcess } from "child_process";
|
|
447
|
+
// import { WebSocketMessage } from "../../PM/types";
|
|
448
|
+
// import { ApiEndpoint, ApiFilename } from "../api";
|
|
449
|
+
|
|
450
|
+
// export class DevelopmentFileService extends FileService {
|
|
451
|
+
// // private ws: WebSocket;
|
|
452
|
+
// // private changeCallbacks: ((changes: FileChange[]) => void)[] = [];
|
|
453
|
+
// // private statusCallbacks: ((status: RemoteStatus) => void)[] = [];
|
|
454
|
+
// // private branchCallbacks: ((branch: string) => void)[] = [];
|
|
455
|
+
// // private fileCallbacks: Map<string, ((content: string) => void)[]> = new Map();
|
|
456
|
+
// // private directoryCallbacks: Map<string, ((entries: FileEntry[]) => void)[]> =
|
|
457
|
+
// // new Map();
|
|
458
|
+
|
|
459
|
+
// wss: WebSocketServer;
|
|
460
|
+
// httpServer: http.Server;
|
|
461
|
+
// clients: Set<any> = new Set();
|
|
462
|
+
|
|
463
|
+
// public fs = new fs("testfs");
|
|
464
|
+
|
|
465
|
+
// // readonly connected: boolean = false;
|
|
466
|
+
|
|
467
|
+
// constructor() {
|
|
468
|
+
// super();
|
|
469
|
+
|
|
470
|
+
// this.httpServer = http.createServer(this.handleHttpRequest.bind(this));
|
|
471
|
+
|
|
472
|
+
// this.wss = new WebSocketServer({ server: this.httpServer });
|
|
473
|
+
|
|
474
|
+
// this.wss.on("connection", (ws) => {
|
|
475
|
+
// this.clients.add(ws);
|
|
476
|
+
// console.log("Client connected");
|
|
477
|
+
|
|
478
|
+
// ws.on("message", (data) => {
|
|
479
|
+
// try {
|
|
480
|
+
// this.websocket(data, ws);
|
|
481
|
+
// } catch (error) {
|
|
482
|
+
// console.error("Error handling WebSocket message:", error);
|
|
483
|
+
// }
|
|
484
|
+
// });
|
|
485
|
+
|
|
486
|
+
// ws.on("close", () => {
|
|
487
|
+
// this.clients.delete(ws);
|
|
488
|
+
// console.log("Client disconnected");
|
|
489
|
+
// });
|
|
490
|
+
|
|
491
|
+
// ws.on("error", (error) => {
|
|
492
|
+
// console.error("WebSocket error:", error);
|
|
493
|
+
// this.clients.delete(ws);
|
|
494
|
+
// });
|
|
495
|
+
// });
|
|
496
|
+
|
|
497
|
+
// const httpPort = Number(process.env.HTTP_PORT) || 3000;
|
|
498
|
+
|
|
499
|
+
// this.httpServer.on("error", (error) => {
|
|
500
|
+
// console.error("HTTP server error:", error);
|
|
501
|
+
// if ((error as any).code === "EADDRINUSE") {
|
|
502
|
+
// console.error(
|
|
503
|
+
// `Port ${httpPort} is already in use. Please use a different port.`
|
|
504
|
+
// );
|
|
505
|
+
// }
|
|
506
|
+
// process.exit(-1);
|
|
507
|
+
// });
|
|
508
|
+
|
|
509
|
+
// this.httpServer.listen(httpPort, "0.0.0.0", () => {
|
|
510
|
+
// console.log(`HTTP server running on http://localhost:${httpPort}`);
|
|
511
|
+
// });
|
|
512
|
+
// }
|
|
513
|
+
|
|
514
|
+
// websocket(data: RawData, ws: any) {
|
|
515
|
+
// try {
|
|
516
|
+
// const message: WebSocketMessage = JSON.parse(data.toString());
|
|
517
|
+
|
|
518
|
+
// if (message.type === "chatMessage") {
|
|
519
|
+
// // Always record the message, even if aider is not available
|
|
520
|
+
// console.log(`Received chat message: ${message.content}`);
|
|
521
|
+
|
|
522
|
+
// // Pass to PM_WithHelpo if available
|
|
523
|
+
// if ((this as any).handleChatMessage) {
|
|
524
|
+
// (this as any).handleChatMessage(message.content);
|
|
525
|
+
// } else {
|
|
526
|
+
// console.log("PM_WithHelpo not available - message not processed");
|
|
527
|
+
// }
|
|
528
|
+
// return;
|
|
529
|
+
// }
|
|
530
|
+
|
|
531
|
+
// // Handle file operations via WebSocket
|
|
532
|
+
// if (message.type === "listDirectory") {
|
|
533
|
+
// // this.handleListDirectory(ws, message);
|
|
534
|
+
// } else if (message.type === "readFile") {
|
|
535
|
+
// // this.handleReadFile(ws, message);
|
|
536
|
+
// } else if (message.type === "writeFile") {
|
|
537
|
+
// // this.handleWriteFile(ws, message);
|
|
538
|
+
// } else if (message.type === "createDirectory") {
|
|
539
|
+
// // this.handleCreateDirectory(ws, message);
|
|
540
|
+
// } else if (message.type === "deleteFile") {
|
|
541
|
+
// // this.handleDeleteFile(ws, message);
|
|
542
|
+
// } else if (message.type === "executeCommand") {
|
|
543
|
+
// // const executeMessage = message as ExecuteCommandMessage;
|
|
544
|
+
|
|
545
|
+
// if (message.command && message.command.trim().startsWith("aider")) {
|
|
546
|
+
// console.log(`Executing command: ${message.command}`);
|
|
547
|
+
|
|
548
|
+
// const processId = Date.now().toString();
|
|
549
|
+
// const child = spawn(message.command, {
|
|
550
|
+
// shell: true,
|
|
551
|
+
// cwd: process.cwd(),
|
|
552
|
+
// });
|
|
553
|
+
|
|
554
|
+
// this.runningProcesses.set(processId, child);
|
|
555
|
+
// this.allProcesses.set(processId, {
|
|
556
|
+
// child,
|
|
557
|
+
// status: "running",
|
|
558
|
+
// command: message.command,
|
|
559
|
+
// pid: child.pid,
|
|
560
|
+
// timestamp: new Date().toISOString(),
|
|
561
|
+
// type: "process",
|
|
562
|
+
// category: "aider",
|
|
563
|
+
// });
|
|
564
|
+
|
|
565
|
+
// this.processLogs.set(processId, []);
|
|
566
|
+
|
|
567
|
+
// this.webSocketBroadcastMessage({
|
|
568
|
+
// type: "processStarted",
|
|
569
|
+
// processId,
|
|
570
|
+
// command: message.command,
|
|
571
|
+
// timestamp: new Date().toISOString(),
|
|
572
|
+
// logs: [],
|
|
573
|
+
// });
|
|
574
|
+
|
|
575
|
+
// // Capture stdout and stderr
|
|
576
|
+
// child.stdout?.on("data", (data) => {
|
|
577
|
+
// const logData = data.toString();
|
|
578
|
+
// const logs = this.processLogs.get(processId) || [];
|
|
579
|
+
// logs.push(logData);
|
|
580
|
+
// this.processLogs.set(processId, logs);
|
|
581
|
+
|
|
582
|
+
// this.webSocketBroadcastMessage({
|
|
583
|
+
// type: "processStdout",
|
|
584
|
+
// processId,
|
|
585
|
+
// data: logData,
|
|
586
|
+
// timestamp: new Date().toISOString(),
|
|
587
|
+
// });
|
|
588
|
+
// });
|
|
589
|
+
|
|
590
|
+
// child.stderr?.on("data", (data) => {
|
|
591
|
+
// const logData = data.toString();
|
|
592
|
+
// const logs = this.processLogs.get(processId) || [];
|
|
593
|
+
// logs.push(logData);
|
|
594
|
+
// this.processLogs.set(processId, logs);
|
|
595
|
+
|
|
596
|
+
// this.webSocketBroadcastMessage({
|
|
597
|
+
// type: "processStderr",
|
|
598
|
+
// processId,
|
|
599
|
+
// data: logData,
|
|
600
|
+
// timestamp: new Date().toISOString(),
|
|
601
|
+
// });
|
|
602
|
+
// });
|
|
603
|
+
|
|
604
|
+
// child.on("error", (error) => {
|
|
605
|
+
// console.error(`Failed to execute command: ${error}`);
|
|
606
|
+
// this.runningProcesses.delete(processId);
|
|
607
|
+
// const processInfo = this.allProcesses.get(processId);
|
|
608
|
+
// if (processInfo) {
|
|
609
|
+
// this.allProcesses.set(processId, {
|
|
610
|
+
// ...processInfo,
|
|
611
|
+
// status: "error",
|
|
612
|
+
// error: error.message,
|
|
613
|
+
// });
|
|
614
|
+
// }
|
|
615
|
+
// this.webSocketBroadcastMessage({
|
|
616
|
+
// type: "processError",
|
|
617
|
+
// processId,
|
|
618
|
+
// error: error.message,
|
|
619
|
+
// timestamp: new Date().toISOString(),
|
|
620
|
+
// });
|
|
621
|
+
// });
|
|
622
|
+
|
|
623
|
+
// child.on("exit", (code) => {
|
|
624
|
+
// console.log(`Command exited with code ${code}`);
|
|
625
|
+
// this.runningProcesses.delete(processId);
|
|
626
|
+
// const processInfo = this.allProcesses.get(processId);
|
|
627
|
+
// if (processInfo) {
|
|
628
|
+
// this.allProcesses.set(processId, {
|
|
629
|
+
// ...processInfo,
|
|
630
|
+
// status: "exited",
|
|
631
|
+
// // @ts-ignore
|
|
632
|
+
// exitCode: code,
|
|
633
|
+
// });
|
|
634
|
+
// }
|
|
635
|
+
// this.webSocketBroadcastMessage({
|
|
636
|
+
// type: "processExited",
|
|
637
|
+
// processId,
|
|
638
|
+
// exitCode: code,
|
|
639
|
+
// timestamp: new Date().toISOString(),
|
|
640
|
+
// });
|
|
641
|
+
// });
|
|
642
|
+
// } else {
|
|
643
|
+
// console.error('Invalid command: must start with "aider"');
|
|
644
|
+
// }
|
|
645
|
+
// } else if (message.type === "getRunningProcesses") {
|
|
646
|
+
// const processes = Array.from(this.allProcesses.entries()).map(
|
|
647
|
+
// ([id, procInfo]) => ({
|
|
648
|
+
// processId: id,
|
|
649
|
+
// command: procInfo.command,
|
|
650
|
+
// pid: procInfo.pid,
|
|
651
|
+
// status: procInfo.status,
|
|
652
|
+
// exitCode: procInfo.exitCode,
|
|
653
|
+
// error: procInfo.error,
|
|
654
|
+
// timestamp: procInfo.timestamp,
|
|
655
|
+
// category: procInfo.category,
|
|
656
|
+
// testName: procInfo.testName,
|
|
657
|
+
// platform: procInfo.platform,
|
|
658
|
+
// logs: this.processLogs.get(id) || [],
|
|
659
|
+
// })
|
|
660
|
+
// );
|
|
661
|
+
// ws.send(
|
|
662
|
+
// JSON.stringify({
|
|
663
|
+
// type: "runningProcesses",
|
|
664
|
+
// processes,
|
|
665
|
+
// })
|
|
666
|
+
// );
|
|
667
|
+
// } else if (message.type === "getProcess") {
|
|
668
|
+
// const processId = message.processId;
|
|
669
|
+
// const procInfo = this.allProcesses.get(processId);
|
|
670
|
+
// if (procInfo) {
|
|
671
|
+
// ws.send(
|
|
672
|
+
// JSON.stringify({
|
|
673
|
+
// type: "processData",
|
|
674
|
+
// processId,
|
|
675
|
+
// command: procInfo.command,
|
|
676
|
+
// pid: procInfo.pid,
|
|
677
|
+
// status: procInfo.status,
|
|
678
|
+
// exitCode: procInfo.exitCode,
|
|
679
|
+
// error: procInfo.error,
|
|
680
|
+
// timestamp: procInfo.timestamp,
|
|
681
|
+
// category: procInfo.category,
|
|
682
|
+
// testName: procInfo.testName,
|
|
683
|
+
// platform: procInfo.platform,
|
|
684
|
+
// logs: this.processLogs.get(processId) || [],
|
|
685
|
+
// })
|
|
686
|
+
// );
|
|
687
|
+
// }
|
|
688
|
+
// } else if (message.type === "stdin") {
|
|
689
|
+
// const processId = message.processId;
|
|
690
|
+
// const data = message.data;
|
|
691
|
+
// console.log("Received stdin for process", processId, ":", data);
|
|
692
|
+
// const childProcess = this.runningProcesses.get(
|
|
693
|
+
// processId
|
|
694
|
+
// ) as ChildProcess;
|
|
695
|
+
|
|
696
|
+
// if (childProcess && childProcess.stdin) {
|
|
697
|
+
// console.log("Writing to process stdin");
|
|
698
|
+
// childProcess.stdin.write(data);
|
|
699
|
+
// } else {
|
|
700
|
+
// console.log(
|
|
701
|
+
// "Cannot write to stdin - process not found or no stdin:",
|
|
702
|
+
// {
|
|
703
|
+
// processExists: !!childProcess,
|
|
704
|
+
// stdinExists: childProcess?.stdin ? true : false,
|
|
705
|
+
// }
|
|
706
|
+
// );
|
|
707
|
+
// }
|
|
708
|
+
// } else if (message.type === "killProcess") {
|
|
709
|
+
// const processId = message.processId;
|
|
710
|
+
// console.log("Received killProcess for process", processId);
|
|
711
|
+
// const childProcess = this.runningProcesses.get(
|
|
712
|
+
// processId
|
|
713
|
+
// ) as ChildProcess;
|
|
714
|
+
|
|
715
|
+
// if (childProcess) {
|
|
716
|
+
// console.log("Killing process");
|
|
717
|
+
// childProcess.kill("SIGTERM");
|
|
718
|
+
// // The process exit handler will update the status and broadcast the change
|
|
719
|
+
// } else {
|
|
720
|
+
// console.log("Cannot kill process - process not found:", {
|
|
721
|
+
// processExists: !!childProcess,
|
|
722
|
+
// });
|
|
723
|
+
// }
|
|
724
|
+
// } else if (message.type === "getChatHistory") {
|
|
725
|
+
// if ((this as any).getChatHistory) {
|
|
726
|
+
// (this as any)
|
|
727
|
+
// .getChatHistory()
|
|
728
|
+
// .then((history: any) => {
|
|
729
|
+
// ws.send(
|
|
730
|
+
// JSON.stringify({
|
|
731
|
+
// type: "chatHistory",
|
|
732
|
+
// messages: history,
|
|
733
|
+
// })
|
|
734
|
+
// );
|
|
735
|
+
// })
|
|
736
|
+
// .catch((error: any) => {
|
|
737
|
+
// console.error("Error getting chat history:", error);
|
|
738
|
+
// ws.send(
|
|
739
|
+
// JSON.stringify({
|
|
740
|
+
// type: "error",
|
|
741
|
+
// message: "Failed to get chat history",
|
|
742
|
+
// })
|
|
743
|
+
// );
|
|
744
|
+
// });
|
|
745
|
+
// }
|
|
746
|
+
// }
|
|
747
|
+
// } catch (error) {
|
|
748
|
+
// console.error("Error handling WebSocket message:", error);
|
|
749
|
+
// }
|
|
750
|
+
// }
|
|
751
|
+
|
|
752
|
+
// webSocketBroadcastMessage(message: any) {
|
|
753
|
+
// const data =
|
|
754
|
+
// typeof message === "string" ? message : JSON.stringify(message);
|
|
755
|
+
// this.clients.forEach((client) => {
|
|
756
|
+
// if (client.readyState === 1) {
|
|
757
|
+
// client.send(data);
|
|
758
|
+
// }
|
|
759
|
+
// });
|
|
760
|
+
// }
|
|
761
|
+
|
|
762
|
+
// handleHttpRequest(
|
|
763
|
+
// req: http.IncomingMessage,
|
|
764
|
+
// res: http.ServerResponse<http.IncomingMessage> & {
|
|
765
|
+
// req: http.IncomingMessage;
|
|
766
|
+
// }
|
|
767
|
+
// ) {
|
|
768
|
+
// console.log(req.method, req.url);
|
|
769
|
+
|
|
770
|
+
// // Parse the URL from the request
|
|
771
|
+
// const parsedUrl = new URL(req.url, `http://${req.headers.host}`);
|
|
772
|
+
|
|
773
|
+
// // Access the searchParams property, which is a URLSearchParams object
|
|
774
|
+
// const queryParams = parsedUrl.searchParams;
|
|
775
|
+
|
|
776
|
+
// if (req.url === "/testeranto/index.html") {
|
|
777
|
+
// this.rootHtml(res);
|
|
778
|
+
// return;
|
|
779
|
+
// } else if (req.url === ApiEndpoint.style) {
|
|
780
|
+
// this.appCss(res);
|
|
781
|
+
// return;
|
|
782
|
+
// } else {
|
|
783
|
+
// res.writeHead(404);
|
|
784
|
+
// res.end(`404 Not Found. ${req.url}`);
|
|
785
|
+
// return;
|
|
786
|
+
// }
|
|
787
|
+
|
|
788
|
+
// // Get a specific query parameter by name
|
|
789
|
+
// // const paramValue = queryParams.get("yourParamName");
|
|
790
|
+
|
|
791
|
+
// // if (req) {
|
|
792
|
+
// // this.serveFileSync(indexPath, res, true);
|
|
793
|
+
// // }
|
|
794
|
+
// }
|
|
795
|
+
|
|
796
|
+
// appCss(res) {
|
|
797
|
+
// fs.readFile(ApiFilename.style, (err, data) => {
|
|
798
|
+
// if (err) {
|
|
799
|
+
// res.writeHead(404, { "Content-Type": "text/plain" });
|
|
800
|
+
// res.end(`500 ${err.toString()}`);
|
|
801
|
+
// return;
|
|
802
|
+
// }
|
|
803
|
+
// res.writeHead(200, { "Content-Type": "text/css" });
|
|
804
|
+
// res.end(data);
|
|
805
|
+
// });
|
|
806
|
+
// }
|
|
807
|
+
|
|
808
|
+
// rootHtml(res) {
|
|
809
|
+
// fs.readFile(ApiFilename.root, (err, data) => {
|
|
810
|
+
// if (err) {
|
|
811
|
+
// res.writeHead(404, { "Content-Type": "text/plain" });
|
|
812
|
+
// res.end(`500 ${err.toString()}`);
|
|
813
|
+
// return;
|
|
814
|
+
// }
|
|
815
|
+
// res.writeHead(200, { "Content-Type": "text/html" });
|
|
816
|
+
// res.end(data);
|
|
817
|
+
// });
|
|
818
|
+
// }
|
|
819
|
+
|
|
820
|
+
// writeFile(path: string, content: string): Promise<void> {
|
|
821
|
+
// throw new Error("Method not implemented.");
|
|
822
|
+
// }
|
|
823
|
+
// readFile(path: string): Promise<string> {
|
|
824
|
+
// throw new Error("Method not implemented.");
|
|
825
|
+
// }
|
|
826
|
+
// createDirectory(path: string): Promise<void> {
|
|
827
|
+
// throw new Error("Method not implemented.");
|
|
828
|
+
// }
|
|
829
|
+
// deleteFile(path: string): Promise<void> {
|
|
830
|
+
// throw new Error("Method not implemented.");
|
|
831
|
+
// }
|
|
832
|
+
// files(path: string): Promise<object> {
|
|
833
|
+
// throw new Error("Method not implemented.");
|
|
834
|
+
// }
|
|
835
|
+
// projects(project: string): Promise<string[]> {
|
|
836
|
+
// throw new Error("Method not implemented.");
|
|
837
|
+
// }
|
|
838
|
+
// tests(project: string): Promise<string[]> {
|
|
839
|
+
// throw new Error("Method not implemented.");
|
|
840
|
+
// }
|
|
841
|
+
// report(project: string, test: string): Promise<object> {
|
|
842
|
+
// throw new Error("Method not implemented.");
|
|
843
|
+
// }
|
|
844
|
+
|
|
845
|
+
// rootHtml(x: any) {
|
|
846
|
+
// throw new Error("Method not implemented.");
|
|
847
|
+
// }
|
|
848
|
+
|
|
849
|
+
// writeFile(path: string, content: string): Promise<void> {
|
|
850
|
+
// throw new Error("Method not implemented.");
|
|
851
|
+
// }
|
|
852
|
+
// readFile(path: string): Promise<string> {
|
|
853
|
+
// throw new Error("Method not implemented.");
|
|
854
|
+
// }
|
|
855
|
+
// createDirectory(path: string): Promise<void> {
|
|
856
|
+
// throw new Error("Method not implemented.");
|
|
857
|
+
// }
|
|
858
|
+
// deleteFile(path: string): Promise<void> {
|
|
859
|
+
// throw new Error("Method not implemented.");
|
|
860
|
+
// }
|
|
861
|
+
// files(path: string): Promise<object> {
|
|
862
|
+
// throw new Error("Method not implemented.");
|
|
863
|
+
// }
|
|
864
|
+
// projects(project: string): Promise<string[]> {
|
|
865
|
+
// throw new Error("Method not implemented.");
|
|
866
|
+
// }
|
|
867
|
+
// tests(project: string): Promise<string[]> {
|
|
868
|
+
// throw new Error("Method not implemented.");
|
|
869
|
+
// }
|
|
870
|
+
// report(project: string, test: string): Promise<object> {
|
|
871
|
+
// throw new Error("Method not implemented.");
|
|
872
|
+
// }
|
|
873
|
+
|
|
874
|
+
// // files(path: string): Promise<object> {
|
|
875
|
+
// // throw new Error("Method not implemented.");
|
|
876
|
+
// // }
|
|
877
|
+
// // projects(project: string): Promise<string[]> {
|
|
878
|
+
// // throw new Error("Method not implemented.");
|
|
879
|
+
// // }
|
|
880
|
+
// // tests(project: string): Promise<string[]> {
|
|
881
|
+
// // throw new Error("Method not implemented.");
|
|
882
|
+
// // }
|
|
883
|
+
// // report(project: string, test: string): Promise<object> {
|
|
884
|
+
// // throw new Error("Method not implemented.");
|
|
885
|
+
// // }
|
|
886
|
+
// // fsTree(path: string): Promise<object> {
|
|
887
|
+
// // throw new Error("Method not implemented.");
|
|
888
|
+
// // }
|
|
889
|
+
// // projectTree(project: string): Promise<object> {
|
|
890
|
+
// // throw new Error("Method not implemented.");
|
|
891
|
+
// // }
|
|
892
|
+
|
|
893
|
+
// // private connectWebSocket() {
|
|
894
|
+
// // // Ensure we're in a browser environment
|
|
895
|
+
// // if (typeof window === "undefined") return;
|
|
896
|
+
|
|
897
|
+
// // try {
|
|
898
|
+
// // const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
899
|
+
// // const wsUrl = `${protocol}//${window.location.host}/api/git-ws`;
|
|
900
|
+
// // this.ws = new WebSocket(wsUrl);
|
|
901
|
+
|
|
902
|
+
// // this.ws.onopen = () => {
|
|
903
|
+
// // console.log("Git WebSocket connected");
|
|
904
|
+
// // // Request initial state
|
|
905
|
+
// // if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
906
|
+
// // this.ws.send(JSON.stringify({ type: "get-initial-state" }));
|
|
907
|
+
// // }
|
|
908
|
+
// // };
|
|
909
|
+
|
|
910
|
+
// // this.ws.onmessage = (event) => {
|
|
911
|
+
// // try {
|
|
912
|
+
// // const data = JSON.parse(event.data);
|
|
913
|
+
// // switch (data.type) {
|
|
914
|
+
// // case "changes":
|
|
915
|
+
// // this.changeCallbacks.forEach((callback) =>
|
|
916
|
+
// // callback(data.changes)
|
|
917
|
+
// // );
|
|
918
|
+
// // break;
|
|
919
|
+
// // case "status":
|
|
920
|
+
// // this.statusCallbacks.forEach((callback) => callback(data.status));
|
|
921
|
+
// // break;
|
|
922
|
+
// // case "branch":
|
|
923
|
+
// // this.branchCallbacks.forEach((callback) => callback(data.branch));
|
|
924
|
+
// // break;
|
|
925
|
+
// // case "fileContent": {
|
|
926
|
+
// // // Handle file content responses
|
|
927
|
+
// // const fileCallbacks = this.fileCallbacks.get(data.path) || [];
|
|
928
|
+
// // fileCallbacks.forEach((callback) => callback(data.content));
|
|
929
|
+
// // this.fileCallbacks.delete(data.path);
|
|
930
|
+
// // break;
|
|
931
|
+
// // }
|
|
932
|
+
// // case "directoryListing": {
|
|
933
|
+
// // // Handle directory listing responses
|
|
934
|
+
// // const dirCallbacks = this.directoryCallbacks.get(data.path) || [];
|
|
935
|
+
// // dirCallbacks.forEach((callback) => callback(data.items));
|
|
936
|
+
// // this.directoryCallbacks.delete(data.path);
|
|
937
|
+
// // break;
|
|
938
|
+
// // }
|
|
939
|
+
// // case "error":
|
|
940
|
+
// // console.error("Git WebSocket error:", data.message);
|
|
941
|
+
// // // Reject pending callbacks
|
|
942
|
+
// // if (data.path) {
|
|
943
|
+
// // const fileCallbacks = this.fileCallbacks.get(data.path) || [];
|
|
944
|
+
// // fileCallbacks.forEach((callback) => callback(""));
|
|
945
|
+
// // this.fileCallbacks.delete(data.path);
|
|
946
|
+
|
|
947
|
+
// // const dirCallbacks =
|
|
948
|
+
// // this.directoryCallbacks.get(data.path) || [];
|
|
949
|
+
// // dirCallbacks.forEach((callback) => callback([]));
|
|
950
|
+
// // this.directoryCallbacks.delete(data.path);
|
|
951
|
+
// // }
|
|
952
|
+
// // break;
|
|
953
|
+
// // }
|
|
954
|
+
// // } catch (error) {
|
|
955
|
+
// // console.error("Error parsing WebSocket message:", error);
|
|
956
|
+
// // }
|
|
957
|
+
// // };
|
|
958
|
+
|
|
959
|
+
// // this.ws.onclose = () => {
|
|
960
|
+
// // console.log("Git WebSocket disconnected, attempting to reconnect...");
|
|
961
|
+
// // setTimeout(() => this.connectWebSocket(), 3000);
|
|
962
|
+
// // };
|
|
963
|
+
|
|
964
|
+
// // this.ws.onerror = (error) => {
|
|
965
|
+
// // console.error("Git WebSocket error:", error);
|
|
966
|
+
// // };
|
|
967
|
+
// // } catch (error) {
|
|
968
|
+
// // console.error("Failed to connect Git WebSocket:", error);
|
|
969
|
+
// // }
|
|
970
|
+
// // }
|
|
971
|
+
|
|
972
|
+
// // // Subscribe to real-time changes
|
|
973
|
+
// // onChanges(callback: (changes: FileChange[]) => void) {
|
|
974
|
+
// // this.changeCallbacks.push(callback);
|
|
975
|
+
// // return () => {
|
|
976
|
+
// // this.changeCallbacks = this.changeCallbacks.filter(
|
|
977
|
+
// // (cb) => cb !== callback
|
|
978
|
+
// // );
|
|
979
|
+
// // };
|
|
980
|
+
// // }
|
|
981
|
+
|
|
982
|
+
// // onStatusUpdate(callback: (status: RemoteStatus) => void) {
|
|
983
|
+
// // this.statusCallbacks.push(callback);
|
|
984
|
+
// // return () => {
|
|
985
|
+
// // this.statusCallbacks = this.statusCallbacks.filter(
|
|
986
|
+
// // (cb) => cb !== callback
|
|
987
|
+
// // );
|
|
988
|
+
// // };
|
|
989
|
+
// // }
|
|
990
|
+
|
|
991
|
+
// // onBranchUpdate(callback: (branch: string) => void) {
|
|
992
|
+
// // this.branchCallbacks.push(callback);
|
|
993
|
+
// // return () => {
|
|
994
|
+
// // this.branchCallbacks = this.branchCallbacks.filter(
|
|
995
|
+
// // (cb) => cb !== callback
|
|
996
|
+
// // );
|
|
997
|
+
// // };
|
|
998
|
+
// // }
|
|
999
|
+
|
|
1000
|
+
// // private ensureWebSocketConnected(): Promise<void> {
|
|
1001
|
+
// // return new Promise((resolve, reject) => {
|
|
1002
|
+
// // // If already connected, resolve immediately
|
|
1003
|
+
// // if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
|
1004
|
+
// // resolve();
|
|
1005
|
+
// // return;
|
|
1006
|
+
// // }
|
|
1007
|
+
|
|
1008
|
+
// // // If connecting in progress, wait for it
|
|
1009
|
+
// // if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
|
1010
|
+
// // const onOpen = () => {
|
|
1011
|
+
// // this.ws?.removeEventListener("open", onOpen);
|
|
1012
|
+
// // resolve();
|
|
1013
|
+
// // };
|
|
1014
|
+
// // this.ws.addEventListener("open", onOpen);
|
|
1015
|
+
// // return;
|
|
1016
|
+
// // }
|
|
1017
|
+
|
|
1018
|
+
// // // Connect if not connected
|
|
1019
|
+
// // this.connectWebSocket();
|
|
1020
|
+
|
|
1021
|
+
// // // Wait for connection
|
|
1022
|
+
// // if (this.ws) {
|
|
1023
|
+
// // const onOpen = () => {
|
|
1024
|
+
// // this.ws?.removeEventListener("open", onOpen);
|
|
1025
|
+
// // resolve();
|
|
1026
|
+
// // };
|
|
1027
|
+
// // const onError = (error: Event) => {
|
|
1028
|
+
// // this.ws?.removeEventListener("error", onError);
|
|
1029
|
+
// // reject(new Error("Failed to connect WebSocket"));
|
|
1030
|
+
// // };
|
|
1031
|
+
// // this.ws.addEventListener("open", onOpen);
|
|
1032
|
+
// // this.ws.addEventListener("error", onError);
|
|
1033
|
+
// // } else {
|
|
1034
|
+
// // reject(new Error("Failed to create WebSocket"));
|
|
1035
|
+
// // }
|
|
1036
|
+
// // });
|
|
1037
|
+
// // }
|
|
1038
|
+
|
|
1039
|
+
// // async readFile(path: string): Promise<string> {
|
|
1040
|
+
// // return new Promise(async (resolve, reject) => {
|
|
1041
|
+
// // try {
|
|
1042
|
+
// // await this.ensureWebSocketConnected();
|
|
1043
|
+
|
|
1044
|
+
// // if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
1045
|
+
// // reject(new Error("WebSocket is not connected"));
|
|
1046
|
+
// // return;
|
|
1047
|
+
// // }
|
|
1048
|
+
|
|
1049
|
+
// // // Add callback
|
|
1050
|
+
// // if (!this.fileCallbacks.has(path)) {
|
|
1051
|
+
// // this.fileCallbacks.set(path, []);
|
|
1052
|
+
// // }
|
|
1053
|
+
// // const callbacks = this.fileCallbacks.get(path)!;
|
|
1054
|
+
// // callbacks.push(resolve);
|
|
1055
|
+
|
|
1056
|
+
// // // Send request
|
|
1057
|
+
// // this.ws.send(
|
|
1058
|
+
// // JSON.stringify({
|
|
1059
|
+
// // type: "readFile",
|
|
1060
|
+
// // path,
|
|
1061
|
+
// // })
|
|
1062
|
+
// // );
|
|
1063
|
+
|
|
1064
|
+
// // // Set timeout for error handling
|
|
1065
|
+
// // setTimeout(() => {
|
|
1066
|
+
// // const remainingCallbacks = this.fileCallbacks.get(path);
|
|
1067
|
+
// // if (remainingCallbacks && remainingCallbacks.length > 0) {
|
|
1068
|
+
// // remainingCallbacks.forEach((cb) => cb(""));
|
|
1069
|
+
// // this.fileCallbacks.delete(path);
|
|
1070
|
+
// // reject(new Error("Timeout reading file"));
|
|
1071
|
+
// // }
|
|
1072
|
+
// // }, 5000);
|
|
1073
|
+
// // } catch (error) {
|
|
1074
|
+
// // reject(error);
|
|
1075
|
+
// // }
|
|
1076
|
+
// // });
|
|
1077
|
+
// // }
|
|
1078
|
+
|
|
1079
|
+
// // async readDirectory(path: string): Promise<FileEntry[]> {
|
|
1080
|
+
// // return new Promise(async (resolve, reject) => {
|
|
1081
|
+
// // try {
|
|
1082
|
+
// // await this.ensureWebSocketConnected();
|
|
1083
|
+
|
|
1084
|
+
// // if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
1085
|
+
// // reject(new Error("WebSocket is not connected"));
|
|
1086
|
+
// // return;
|
|
1087
|
+
// // }
|
|
1088
|
+
|
|
1089
|
+
// // // Add callback
|
|
1090
|
+
// // if (!this.directoryCallbacks.has(path)) {
|
|
1091
|
+
// // this.directoryCallbacks.set(path, []);
|
|
1092
|
+
// // }
|
|
1093
|
+
// // const callbacks = this.directoryCallbacks.get(path)!;
|
|
1094
|
+
// // callbacks.push(resolve);
|
|
1095
|
+
|
|
1096
|
+
// // // Send request
|
|
1097
|
+
// // this.ws.send(
|
|
1098
|
+
// // JSON.stringify({
|
|
1099
|
+
// // type: "listDirectory",
|
|
1100
|
+
// // path,
|
|
1101
|
+
// // })
|
|
1102
|
+
// // );
|
|
1103
|
+
|
|
1104
|
+
// // // Set timeout for error handling
|
|
1105
|
+
// // setTimeout(() => {
|
|
1106
|
+
// // const remainingCallbacks = this.directoryCallbacks.get(path);
|
|
1107
|
+
// // if (remainingCallbacks && remainingCallbacks.length > 0) {
|
|
1108
|
+
// // remainingCallbacks.forEach((cb) => cb([]));
|
|
1109
|
+
// // this.directoryCallbacks.delete(path);
|
|
1110
|
+
// // reject(new Error("Timeout reading directory"));
|
|
1111
|
+
// // }
|
|
1112
|
+
// // }, 5000);
|
|
1113
|
+
// // } catch (error) {
|
|
1114
|
+
// // reject(error);
|
|
1115
|
+
// // }
|
|
1116
|
+
// // });
|
|
1117
|
+
// // }
|
|
1118
|
+
|
|
1119
|
+
// // private async readDirectoryViaWebSocket(path: string): Promise<FileEntry[]> {
|
|
1120
|
+
// // // This should not be used - WebSocket communication should be handled separately
|
|
1121
|
+
// // throw new Error("WebSocket directory listing not implemented");
|
|
1122
|
+
// // }
|
|
1123
|
+
|
|
1124
|
+
// // async exists(path: string): Promise<boolean> {
|
|
1125
|
+
// // try {
|
|
1126
|
+
// // await this.readFile(path);
|
|
1127
|
+
// // return true;
|
|
1128
|
+
// // } catch {
|
|
1129
|
+
// // return false;
|
|
1130
|
+
// // }
|
|
1131
|
+
// // }
|
|
1132
|
+
|
|
1133
|
+
// // async writeFile(path: string, content: string): Promise<void> {
|
|
1134
|
+
// // await this.ensureWebSocketConnected();
|
|
1135
|
+
|
|
1136
|
+
// // if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
1137
|
+
// // throw new Error("WebSocket is not connected");
|
|
1138
|
+
// // }
|
|
1139
|
+
|
|
1140
|
+
// // this.ws.send(
|
|
1141
|
+
// // JSON.stringify({
|
|
1142
|
+
// // type: "writeFile",
|
|
1143
|
+
// // path,
|
|
1144
|
+
// // content,
|
|
1145
|
+
// // })
|
|
1146
|
+
// // );
|
|
1147
|
+
|
|
1148
|
+
// // // For now, we'll assume it always succeeds
|
|
1149
|
+
// // // In a real implementation, we'd want to wait for a confirmation
|
|
1150
|
+
// // }
|
|
1151
|
+
|
|
1152
|
+
// // async createDirectory(path: string): Promise<void> {
|
|
1153
|
+
// // await this.ensureWebSocketConnected();
|
|
1154
|
+
|
|
1155
|
+
// // if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
1156
|
+
// // throw new Error("WebSocket is not connected");
|
|
1157
|
+
// // }
|
|
1158
|
+
|
|
1159
|
+
// // this.ws.send(
|
|
1160
|
+
// // JSON.stringify({
|
|
1161
|
+
// // type: "createDirectory",
|
|
1162
|
+
// // path,
|
|
1163
|
+
// // })
|
|
1164
|
+
// // );
|
|
1165
|
+
|
|
1166
|
+
// // // For now, we'll assume it always succeeds
|
|
1167
|
+
// // }
|
|
1168
|
+
|
|
1169
|
+
// // async deleteFile(path: string): Promise<void> {
|
|
1170
|
+
// // await this.ensureWebSocketConnected();
|
|
1171
|
+
|
|
1172
|
+
// // if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
1173
|
+
// // throw new Error("WebSocket is not connected");
|
|
1174
|
+
// // }
|
|
1175
|
+
|
|
1176
|
+
// // this.ws.send(
|
|
1177
|
+
// // JSON.stringify({
|
|
1178
|
+
// // type: "deleteFile",
|
|
1179
|
+
// // path,
|
|
1180
|
+
// // })
|
|
1181
|
+
// // );
|
|
1182
|
+
|
|
1183
|
+
// // // For now, we'll assume it always succeeds
|
|
1184
|
+
// // }
|
|
1185
|
+
|
|
1186
|
+
// // async getFileStatus(path: string): Promise<FileStatus> {
|
|
1187
|
+
// // await this.ensureWebSocketConnected();
|
|
1188
|
+
// // const response = await fetch(
|
|
1189
|
+
// // `/api/git/status?path=${encodeURIComponent(path)}`
|
|
1190
|
+
// // );
|
|
1191
|
+
// // if (!response.ok) return { status: "unchanged" };
|
|
1192
|
+
// // return await response.json();
|
|
1193
|
+
// // }
|
|
1194
|
+
|
|
1195
|
+
// // async getChanges(): Promise<FileChange[]> {
|
|
1196
|
+
// // try {
|
|
1197
|
+
// // await this.ensureWebSocketConnected();
|
|
1198
|
+
// // const response = await fetch("/api/git/changes");
|
|
1199
|
+
// // if (!response.ok) return [];
|
|
1200
|
+
// // const changes = await response.json();
|
|
1201
|
+
// // console.log("Raw changes from server:", JSON.stringify(changes, null, 2));
|
|
1202
|
+
// // return changes;
|
|
1203
|
+
// // } catch (error) {
|
|
1204
|
+
// // console.error("Error fetching changes:", error);
|
|
1205
|
+
// // return [];
|
|
1206
|
+
// // }
|
|
1207
|
+
// // }
|
|
1208
|
+
|
|
1209
|
+
// // async commitChanges(message: string, description?: string): Promise<void> {
|
|
1210
|
+
// // await this.ensureWebSocketConnected();
|
|
1211
|
+
// // const response = await fetch("/api/git/commit", {
|
|
1212
|
+
// // method: "POST",
|
|
1213
|
+
// // headers: { "Content-Type": "application/json" },
|
|
1214
|
+
// // body: JSON.stringify({ message, description }),
|
|
1215
|
+
// // });
|
|
1216
|
+
// // if (!response.ok) {
|
|
1217
|
+
// // const error = await response.text();
|
|
1218
|
+
// // throw new Error(`Failed to commit changes: ${error}`);
|
|
1219
|
+
// // }
|
|
1220
|
+
|
|
1221
|
+
// // // Request updated status after commit
|
|
1222
|
+
// // this.ws?.send(JSON.stringify({ type: "refresh-status" }));
|
|
1223
|
+
// // }
|
|
1224
|
+
|
|
1225
|
+
// // async pushChanges(): Promise<void> {
|
|
1226
|
+
// // await this.ensureWebSocketConnected();
|
|
1227
|
+
// // const response = await fetch("/api/git/push", {
|
|
1228
|
+
// // method: "POST",
|
|
1229
|
+
// // });
|
|
1230
|
+
// // if (!response.ok) {
|
|
1231
|
+
// // const error = await response.text();
|
|
1232
|
+
// // throw new Error(`Failed to push changes: ${error}`);
|
|
1233
|
+
// // }
|
|
1234
|
+
|
|
1235
|
+
// // this.ws?.send(JSON.stringify({ type: "refresh-status" }));
|
|
1236
|
+
// // }
|
|
1237
|
+
|
|
1238
|
+
// // async pullChanges(): Promise<void> {
|
|
1239
|
+
// // await this.ensureWebSocketConnected();
|
|
1240
|
+
// // const response = await fetch("/api/git/pull", {
|
|
1241
|
+
// // method: "POST",
|
|
1242
|
+
// // });
|
|
1243
|
+
// // if (!response.ok) {
|
|
1244
|
+
// // const error = await response.text();
|
|
1245
|
+
// // throw new Error(`Failed to pull changes: ${error}`);
|
|
1246
|
+
// // }
|
|
1247
|
+
|
|
1248
|
+
// // this.ws?.send(JSON.stringify({ type: "refresh-status" }));
|
|
1249
|
+
// // }
|
|
1250
|
+
|
|
1251
|
+
// // async getCurrentBranch(): Promise<string> {
|
|
1252
|
+
// // await this.ensureWebSocketConnected();
|
|
1253
|
+
// // const response = await fetch("/api/git/branch");
|
|
1254
|
+
// // if (!response.ok) return "main";
|
|
1255
|
+
// // return await response.text();
|
|
1256
|
+
// // }
|
|
1257
|
+
|
|
1258
|
+
// // async getRemoteStatus(): Promise<RemoteStatus> {
|
|
1259
|
+
// // await this.ensureWebSocketConnected();
|
|
1260
|
+
// // const response = await fetch("/api/git/remote-status");
|
|
1261
|
+
// // if (!response.ok) return { ahead: 0, behind: 0 };
|
|
1262
|
+
// // return await response.json();
|
|
1263
|
+
// // }
|
|
1264
|
+
// }
|
|
1265
|
+
|
|
1266
|
+
// // r to see if connections are being made
|
|
1267
|
+
// // this.httpServer.on("connection", (socket) => {
|
|
1268
|
+
// // // console.log(
|
|
1269
|
+
// // // "New TCP connection from:",
|
|
1270
|
+
// // // socket.remoteAddress,
|
|
1271
|
+
// // // socket.remotePort
|
|
1272
|
+
// // // );
|
|
1273
|
+
|
|
1274
|
+
// // // Track when the connection is closed
|
|
1275
|
+
// // // socket.on("close", () => {
|
|
1276
|
+
// // // console.log(
|
|
1277
|
+
// // // "TCP connection closed:",
|
|
1278
|
+
// // // socket.remoteAddress,
|
|
1279
|
+
// // // socket.remotePort
|
|
1280
|
+
// // // );
|
|
1281
|
+
// // // });
|
|
1282
|
+
|
|
1283
|
+
// // // Track errors on the socket
|
|
1284
|
+
// // // socket.on("error", (error) => {
|
|
1285
|
+
// // // console.log(
|
|
1286
|
+
// // // "TCP connection error from:",
|
|
1287
|
+
// // // socket.remoteAddress,
|
|
1288
|
+
// // // socket.remotePort,
|
|
1289
|
+
// // // error
|
|
1290
|
+
// // // );
|
|
1291
|
+
// // // });
|
|
1292
|
+
// // });
|
|
1293
|
+
|
|
1294
|
+
// // Add request listener to see HTTP requests
|
|
1295
|
+
// // this.httpServer.on("request", (req, res) => {
|
|
1296
|
+
// // // console.log(
|
|
1297
|
+
// // // "HTTP request received:",
|
|
1298
|
+
// // // req.method,
|
|
1299
|
+
// // // req.url,
|
|
1300
|
+
// // // "from",
|
|
1301
|
+
// // // req.socket.remoteAddress,
|
|
1302
|
+
// // // req.socket.remotePort
|
|
1303
|
+
// // // );
|
|
1304
|
+
|
|
1305
|
+
// // // // Track when the response is finished
|
|
1306
|
+
// // // res.on("finish", () => {
|
|
1307
|
+
// // // console.log("HTTP response sent:", res.statusCode, req.method, req.url);
|
|
1308
|
+
// // // });
|
|
1309
|
+
// // });
|
|
1310
|
+
|
|
1311
|
+
// // httpRequest(req: http.IncomingMessage, res: http.ServerResponse) {
|
|
1312
|
+
// // console.log(`httpRequest method called for ${req.method} ${req.url}`);
|
|
1313
|
+
|
|
1314
|
+
// // res.writeHead(200, {
|
|
1315
|
+
// // "Content-Type": "application/json",
|
|
1316
|
+
// // });
|
|
1317
|
+
|
|
1318
|
+
// // // Convert object to JSON string and send
|
|
1319
|
+
// // res.end(JSON.stringify({ wtf: "idk" }));
|
|
1320
|
+
|
|
1321
|
+
// // // // Ensure response is always completed
|
|
1322
|
+
// // // // const completeResponse = () => {
|
|
1323
|
+
// // // // if (!res.writableEnded && !res.headersSent) {
|
|
1324
|
+
// // // // res.writeHead(200, { "Content-Type": "text/plain" });
|
|
1325
|
+
// // // // res.end("Default response");
|
|
1326
|
+
// // // // console.log("Complete response sent");
|
|
1327
|
+
// // // // } else {
|
|
1328
|
+
// // // // console.log("Response already completed, not sending default");
|
|
1329
|
+
// // // // }
|
|
1330
|
+
// // // // };
|
|
1331
|
+
|
|
1332
|
+
// // // // Handle CORS headers for all responses
|
|
1333
|
+
// // // res.setHeader("Access-Control-Allow-Origin", "*");
|
|
1334
|
+
// // // res.setHeader(
|
|
1335
|
+
// // // "Access-Control-Allow-Methods",
|
|
1336
|
+
// // // "GET, POST, OPTIONS, PUT, DELETE"
|
|
1337
|
+
// // // );
|
|
1338
|
+
// // // res.setHeader("Access-Control-Allow-Headers", "Content-Type");
|
|
1339
|
+
|
|
1340
|
+
// // // // Handle preflight requests
|
|
1341
|
+
// // // if (req.method === "OPTIONS") {
|
|
1342
|
+
// // // res.writeHead(200);
|
|
1343
|
+
// // // res.end();
|
|
1344
|
+
// // // return;
|
|
1345
|
+
// // // }
|
|
1346
|
+
|
|
1347
|
+
// // // // Ensure response is always sent
|
|
1348
|
+
// // // const sendResponse = (
|
|
1349
|
+
// // // status: number,
|
|
1350
|
+
// // // contentType: string,
|
|
1351
|
+
// // // body: string | Buffer
|
|
1352
|
+
// // // ) => {
|
|
1353
|
+
// // // res.writeHead(200, {
|
|
1354
|
+
// // // "Content-Type": "application/json",
|
|
1355
|
+
// // // });
|
|
1356
|
+
|
|
1357
|
+
// // // // Convert object to JSON string and send
|
|
1358
|
+
// // // res.end(JSON.stringify({ wtf: "idk" }));
|
|
1359
|
+
|
|
1360
|
+
// // // // res.json("Hello from Express!");
|
|
1361
|
+
// // // // console.log('sendResponse called with:', { status, contentType, body: body.toString().substring(0, 50) });
|
|
1362
|
+
// // // // if (!res.headersSent) {
|
|
1363
|
+
// // // // try {
|
|
1364
|
+
// // // // console.log('About to write headers and end response');
|
|
1365
|
+
// // // // res.writeHead(status, { "Content-Type": contentType });
|
|
1366
|
+
// // // // res.end(body);
|
|
1367
|
+
// // // // console.log('Response sent via sendResponse');
|
|
1368
|
+
// // // // } catch (error) {
|
|
1369
|
+
// // // // console.error('Error sending response:', error);
|
|
1370
|
+
// // // // }
|
|
1371
|
+
// // // // } else {
|
|
1372
|
+
// // // // console.warn('Headers already sent, cannot send response');
|
|
1373
|
+
// // // // }
|
|
1374
|
+
// // // };
|
|
1375
|
+
|
|
1376
|
+
// // // try {
|
|
1377
|
+
|
|
1378
|
+
// // // console.log(`Processing ${req.method} request for: ${req.url}`);
|
|
1379
|
+
// // // console.log("Response writable state:", {
|
|
1380
|
+
// // // writable: res.writable,
|
|
1381
|
+
// // // destroyed: res.destroyed,
|
|
1382
|
+
// // // writableEnded: res.writableEnded,
|
|
1383
|
+
// // // writableFinished: res.writableFinished,
|
|
1384
|
+
// // // headersSent: res.headersSent,
|
|
1385
|
+
// // // });
|
|
1386
|
+
|
|
1387
|
+
// // // // Handle root path
|
|
1388
|
+
// // // if (req.url === "/") {
|
|
1389
|
+
// // // sendResponse(
|
|
1390
|
+
// // // 200,
|
|
1391
|
+
// // // "text/plain",
|
|
1392
|
+
// // // "HTTP Server is working! Try /test endpoint"
|
|
1393
|
+
// // // );
|
|
1394
|
+
// // // return;
|
|
1395
|
+
// // // }
|
|
1396
|
+
|
|
1397
|
+
// // // // Handle test endpoint
|
|
1398
|
+
// // // if (req.url === "/test") {
|
|
1399
|
+
// // // sendResponse(200, "text/plain", "Test endpoint is working!");
|
|
1400
|
+
// // // return;
|
|
1401
|
+
// // // }
|
|
1402
|
+
|
|
1403
|
+
// // // // Handle specific requests
|
|
1404
|
+
// // // if (req.url === "/testeranto/projects.html") {
|
|
1405
|
+
// // // console.log("Handling projects.html request - before sendResponse");
|
|
1406
|
+
// // // sendResponse(
|
|
1407
|
+
// // // 200,
|
|
1408
|
+
// // // "text/html",
|
|
1409
|
+
// // // "<html><body><h1>Projects</h1></body></html>"
|
|
1410
|
+
// // // );
|
|
1411
|
+
// // // console.log("Handling projects.html request - after sendResponse");
|
|
1412
|
+
// // // return;
|
|
1413
|
+
// // // }
|
|
1414
|
+
|
|
1415
|
+
// // // // Send a simple response for all other requests
|
|
1416
|
+
// // // console.log("Handling other request");
|
|
1417
|
+
// // // sendResponse(
|
|
1418
|
+
// // // 200,
|
|
1419
|
+
// // // "text/plain",
|
|
1420
|
+
// // // `Server is working! Request received for: ${req.url}`
|
|
1421
|
+
// // // );
|
|
1422
|
+
// // // return;
|
|
1423
|
+
|
|
1424
|
+
// // // // The rest of the original code is commented out for now
|
|
1425
|
+
// // // /*
|
|
1426
|
+
// // // const parsedUrl = url.parse(req.url || "/", true);
|
|
1427
|
+
// // // const pathname = parsedUrl.pathname || "/";
|
|
1428
|
+
|
|
1429
|
+
// // // // Handle API requests
|
|
1430
|
+
// // // if (pathname?.startsWith("/api/")) {
|
|
1431
|
+
// // // console.log("API request received:", pathname);
|
|
1432
|
+
// // // // If there's an API handler, use it
|
|
1433
|
+
// // // if ((this as any).apiRequest) {
|
|
1434
|
+
// // // (this as any).apiRequest(req, res);
|
|
1435
|
+
// // // } else {
|
|
1436
|
+
// // // sendResponse(404, "application/json", JSON.stringify({ error: "API endpoint not found" }));
|
|
1437
|
+
// // // }
|
|
1438
|
+
// // // return;
|
|
1439
|
+
// // // }
|
|
1440
|
+
|
|
1441
|
+
// // // // Handle root path with a simple response for testing
|
|
1442
|
+
// // // if (pathname === "/") {
|
|
1443
|
+
// // // sendResponse(200, "text/plain", "HTTP Server is working!");
|
|
1444
|
+
// // // return;
|
|
1445
|
+
// // // }
|
|
1446
|
+
|
|
1447
|
+
// // // // Handle static file serving
|
|
1448
|
+
// // // console.log("Handling static file serving for path:", pathname);
|
|
1449
|
+
// // // const processedPathname = pathname;
|
|
1450
|
+
|
|
1451
|
+
// // // // Remove leading slash to get file path
|
|
1452
|
+
// // // let filePath = processedPathname.substring(1);
|
|
1453
|
+
// // // console.log("Looking for file:", filePath);
|
|
1454
|
+
|
|
1455
|
+
// // // // Handle special cases
|
|
1456
|
+
// // // if (filePath.startsWith("reports/")) {
|
|
1457
|
+
// // // filePath = `testeranto/${filePath}`;
|
|
1458
|
+
// // // } else if (filePath.startsWith("metafiles/")) {
|
|
1459
|
+
// // // filePath = `testeranto/${filePath}`;
|
|
1460
|
+
// // // } else if (filePath === "projects.json") {
|
|
1461
|
+
// // // // Keep as is
|
|
1462
|
+
// // // } else {
|
|
1463
|
+
// // // // For frontend assets, try to find the file
|
|
1464
|
+
// // // const possiblePaths = [
|
|
1465
|
+
// // // `dist/${filePath}`,
|
|
1466
|
+
// // // `testeranto/dist/${filePath}`,
|
|
1467
|
+
// // // `../dist/${filePath}`,
|
|
1468
|
+
// // // `./${filePath}`,
|
|
1469
|
+
// // // ];
|
|
1470
|
+
// // // console.log("Checking possible paths:", possiblePaths);
|
|
1471
|
+
|
|
1472
|
+
// // // // Find the first existing file
|
|
1473
|
+
// // // let foundPath = null;
|
|
1474
|
+
// // // for (const possiblePath of possiblePaths) {
|
|
1475
|
+
// // // try {
|
|
1476
|
+
// // // if (fs.existsSync(possiblePath)) {
|
|
1477
|
+
// // // foundPath = possiblePath;
|
|
1478
|
+
// // // console.log("Found file at:", foundPath);
|
|
1479
|
+
// // // break;
|
|
1480
|
+
// // // }
|
|
1481
|
+
// // // } catch (error) {
|
|
1482
|
+
// // // // Continue to next path
|
|
1483
|
+
// // // }
|
|
1484
|
+
// // // }
|
|
1485
|
+
|
|
1486
|
+
// // // if (foundPath) {
|
|
1487
|
+
// // // filePath = foundPath;
|
|
1488
|
+
// // // } else {
|
|
1489
|
+
// // // console.log("File not found, serving index.html or fallback");
|
|
1490
|
+
// // // // Serve index.html for SPA routing
|
|
1491
|
+
// // // const indexPath = this.findIndexHtml();
|
|
1492
|
+
// // // if (indexPath) {
|
|
1493
|
+
// // // this.serveFileSync(indexPath, res, true);
|
|
1494
|
+
// // // } else {
|
|
1495
|
+
// // // sendResponse(200, "text/html", `
|
|
1496
|
+
// // // <html>
|
|
1497
|
+
// // // <body>
|
|
1498
|
+
// // // <h1>Testeranto is running</h1>
|
|
1499
|
+
// // // <p>Frontend files are not built yet. Run 'npm run build' to build the frontend.</p>
|
|
1500
|
+
// // // </body>
|
|
1501
|
+
// // // </html>
|
|
1502
|
+
// // // `);
|
|
1503
|
+
// // // }
|
|
1504
|
+
// // // return;
|
|
1505
|
+
// // // }
|
|
1506
|
+
// // // }
|
|
1507
|
+
|
|
1508
|
+
// // // // Check if file exists and serve it using synchronous check
|
|
1509
|
+
// // // try {
|
|
1510
|
+
// // // console.log("Final file path to serve:", filePath);
|
|
1511
|
+
// // // if (!fs.existsSync(filePath)) {
|
|
1512
|
+
// // // console.log("File does not exist:", filePath);
|
|
1513
|
+
// // // // For SPA routing, serve index.html
|
|
1514
|
+
// // // const indexPath = this.findIndexHtml();
|
|
1515
|
+
// // // if (indexPath) {
|
|
1516
|
+
// // // this.serveFileSync(indexPath, res, true);
|
|
1517
|
+
// // // } else {
|
|
1518
|
+
// // // sendResponse(404, "text/plain", "404 Not Found");
|
|
1519
|
+
// // // }
|
|
1520
|
+
// // // return;
|
|
1521
|
+
// // // }
|
|
1522
|
+
|
|
1523
|
+
// // // console.log("Serving file:", filePath);
|
|
1524
|
+
// // // this.serveFileSync(filePath, res, false);
|
|
1525
|
+
// // // } catch (error) {
|
|
1526
|
+
// // // console.error(`Error checking file existence for ${filePath}:`, error);
|
|
1527
|
+
// // // sendResponse(500, "text/plain", "500 Internal Server Error");
|
|
1528
|
+
// // // }
|
|
1529
|
+
// // // */
|
|
1530
|
+
// // // } catch (error) {
|
|
1531
|
+
// // // console.error("Unexpected error handling request:", error);
|
|
1532
|
+
// // // try {
|
|
1533
|
+
// // // if (!res.headersSent) {
|
|
1534
|
+
// // // sendResponse(500, "text/plain", "Internal Server Error");
|
|
1535
|
+
// // // } else {
|
|
1536
|
+
// // // console.log("Headers already sent, cannot send error response");
|
|
1537
|
+
// // // }
|
|
1538
|
+
// // // } catch (sendError) {
|
|
1539
|
+
// // // console.error("Failed to send error response:", sendError);
|
|
1540
|
+
// // // // Try to end the response directly
|
|
1541
|
+
// // // if (!res.writableEnded) {
|
|
1542
|
+
// // // res.destroy();
|
|
1543
|
+
// // // }
|
|
1544
|
+
// // // }
|
|
1545
|
+
// // // } finally {
|
|
1546
|
+
// // // // Only complete the response if nothing was sent
|
|
1547
|
+
// // // console.log("Finally block - response state:", {
|
|
1548
|
+
// // // headersSent: res.headersSent,
|
|
1549
|
+
// // // writableEnded: res.writableEnded,
|
|
1550
|
+
// // // writableFinished: res.writableFinished,
|
|
1551
|
+
// // // });
|
|
1552
|
+
// // // if (!res.headersSent && !res.writableEnded) {
|
|
1553
|
+
// // // console.log("No response sent, calling completeResponse");
|
|
1554
|
+
// // // completeResponse();
|
|
1555
|
+
// // // } else {
|
|
1556
|
+
// // // console.log("Response already handled, skipping completeResponse");
|
|
1557
|
+
// // // }
|
|
1558
|
+
// // // }
|
|
1559
|
+
// // }
|
|
1560
|
+
|
|
1561
|
+
// // findIndexHtml(): string | null {
|
|
1562
|
+
// // const possiblePaths = [
|
|
1563
|
+
// // "dist/index.html",
|
|
1564
|
+
// // "testeranto/dist/index.html",
|
|
1565
|
+
// // "../dist/index.html",
|
|
1566
|
+
// // "./index.html",
|
|
1567
|
+
// // ];
|
|
1568
|
+
|
|
1569
|
+
// // for (const path of possiblePaths) {
|
|
1570
|
+
// // try {
|
|
1571
|
+
// // if (fs.existsSync(path)) {
|
|
1572
|
+
// // return path;
|
|
1573
|
+
// // }
|
|
1574
|
+
// // } catch (error) {
|
|
1575
|
+
// // // Continue to next path
|
|
1576
|
+
// // }
|
|
1577
|
+
// // }
|
|
1578
|
+
// // return null;
|
|
1579
|
+
// // }
|
|
1580
|
+
// }
|
|
1581
|
+
|
|
1582
|
+
// // private serveFile(
|
|
1583
|
+
// // filePath: string,
|
|
1584
|
+
// // res: http.ServerResponse,
|
|
1585
|
+
// // isSpaFallback: boolean
|
|
1586
|
+
// // ) {
|
|
1587
|
+
// // // Use the synchronous version
|
|
1588
|
+
// // this.serveFileSync(filePath, res, isSpaFallback);
|
|
1589
|
+
// // }
|
|
1590
|
+
|
|
1591
|
+
// // private serveFileSync(
|
|
1592
|
+
// // filePath: string,
|
|
1593
|
+
// // res: http.ServerResponse,
|
|
1594
|
+
// // isSpaFallback: boolean
|
|
1595
|
+
// // ) {
|
|
1596
|
+
// // // Ensure response is always sent
|
|
1597
|
+
// // const sendResponse = (
|
|
1598
|
+
// // status: number,
|
|
1599
|
+
// // contentType: string,
|
|
1600
|
+
// // body: string | Buffer
|
|
1601
|
+
// // ) => {
|
|
1602
|
+
// // if (!res.headersSent) {
|
|
1603
|
+
// // res.writeHead(status, { "Content-Type": contentType });
|
|
1604
|
+
// // res.end(body);
|
|
1605
|
+
// // }
|
|
1606
|
+
// // };
|
|
1607
|
+
|
|
1608
|
+
// // // Check if the file exists using synchronous check
|
|
1609
|
+
// // try {
|
|
1610
|
+
// // if (!fs.existsSync(filePath) && !isSpaFallback) {
|
|
1611
|
+
// // // Try to serve index.html as fallback for SPA routing
|
|
1612
|
+
// // const indexPath = this.findIndexHtml();
|
|
1613
|
+
// // if (indexPath) {
|
|
1614
|
+
// // this.serveFileSync(indexPath, res, true);
|
|
1615
|
+
// // return;
|
|
1616
|
+
// // } else {
|
|
1617
|
+
// // sendResponse(404, "text/plain", "404 Not Found");
|
|
1618
|
+
// // return;
|
|
1619
|
+
// // }
|
|
1620
|
+
// // } else if (!fs.existsSync(filePath) && isSpaFallback) {
|
|
1621
|
+
// // sendResponse(404, "text/plain", "404 Not Found");
|
|
1622
|
+
// // return;
|
|
1623
|
+
// // }
|
|
1624
|
+
|
|
1625
|
+
// // // File exists, read and serve it
|
|
1626
|
+
// // try {
|
|
1627
|
+
// // const data = fs.readFileSync(filePath);
|
|
1628
|
+
|
|
1629
|
+
// // // For HTML files, inject the configuration
|
|
1630
|
+
// // if (filePath.endsWith(".html")) {
|
|
1631
|
+
// // let content = data.toString();
|
|
1632
|
+
// // // Inject the configuration script before the closing </body> tag
|
|
1633
|
+
// // if (content.includes("</body>")) {
|
|
1634
|
+
// // const configScript = `
|
|
1635
|
+
// // <script>
|
|
1636
|
+
// // window.testerantoConfig = ${JSON.stringify({
|
|
1637
|
+
// // githubOAuth: {
|
|
1638
|
+
// // clientId: process.env.GITHUB_CLIENT_ID || "",
|
|
1639
|
+
// // },
|
|
1640
|
+
// // serverOrigin:
|
|
1641
|
+
// // process.env.SERVER_ORIGIN || "http://localhost:3000",
|
|
1642
|
+
// // })};
|
|
1643
|
+
// // </script>
|
|
1644
|
+
// // `;
|
|
1645
|
+
// // content = content.replace("</body>", `${configScript}</body>`);
|
|
1646
|
+
// // }
|
|
1647
|
+
// // sendResponse(200, "text/html", content);
|
|
1648
|
+
// // } else {
|
|
1649
|
+
// // // Get MIME type for other files
|
|
1650
|
+
// // const mimeType = mime.lookup(filePath) || "application/octet-stream";
|
|
1651
|
+
// // sendResponse(200, mimeType, data);
|
|
1652
|
+
// // }
|
|
1653
|
+
// // } catch (error) {
|
|
1654
|
+
// // console.error(`Error reading file ${filePath}:`, error);
|
|
1655
|
+
// // sendResponse(500, "text/plain", "500 Internal Server Error");
|
|
1656
|
+
// // return;
|
|
1657
|
+
// // }
|
|
1658
|
+
// // } catch (error) {
|
|
1659
|
+
// // console.error(`Error checking file existence for ${filePath}:`, error);
|
|
1660
|
+
// // sendResponse(500, "text/plain", "500 Internal Server Error");
|
|
1661
|
+
// // return;
|
|
1662
|
+
// // }
|
|
1663
|
+
// // }
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
// useEffect(() => {
|
|
1667
|
+
// if (!projectName || !testPath || !runtime) return;
|
|
1668
|
+
// setTestName(testPath);
|
|
1669
|
+
|
|
1670
|
+
// const fetchData = async () => {
|
|
1671
|
+
// try {
|
|
1672
|
+
// const [testResponse, metafileRes] = await Promise.all([
|
|
1673
|
+
// fetchTestData(projectName, testPath, runtime),
|
|
1674
|
+
// fetch(`metafiles/${runtime}/${projectName}.json`),
|
|
1675
|
+
// ]);
|
|
1676
|
+
|
|
1677
|
+
// fetchDataUtil(
|
|
1678
|
+
// testResponse,
|
|
1679
|
+
// metafileRes,
|
|
1680
|
+
// testPath,
|
|
1681
|
+
// setLogs,
|
|
1682
|
+
// projectName,
|
|
1683
|
+
// setSummary,
|
|
1684
|
+
// setErrorCounts,
|
|
1685
|
+
// setTestsExist,
|
|
1686
|
+
// runtime
|
|
1687
|
+
// );
|
|
1688
|
+
// } catch (err) {
|
|
1689
|
+
// setError(err instanceof Error ? err.message : "Unknown error");
|
|
1690
|
+
// setTestsExist(false);
|
|
1691
|
+
// } finally {
|
|
1692
|
+
// setLoading(false);
|
|
1693
|
+
// }
|
|
1694
|
+
// };
|
|
1695
|
+
|
|
1696
|
+
// fetchData();
|
|
1697
|
+
// }, []);
|