@codeyam/codeyam-cli 0.1.0-staging.1a2737b → 0.1.0-staging.27d5a59
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/analyzer-template/.build-info.json +7 -7
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +9 -9
- package/analyzer-template/packages/ai/package.json +2 -2
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +34 -3
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +114 -113
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +27 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +78 -2
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +19 -7
- package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +9 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +0 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +12 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +65 -28
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +83 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +23 -4
- package/analyzer-template/packages/aws/package.json +1 -1
- package/analyzer-template/packages/database/index.ts +1 -0
- package/analyzer-template/packages/database/package.json +3 -3
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +8 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +62 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +31 -20
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +0 -5
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +151 -135
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +29 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
- package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/index.js +1 -0
- package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +20 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +45 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +23 -13
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +100 -89
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +6 -2
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +14 -2
- package/analyzer-template/playwright/captureFromUrl.ts +89 -82
- package/analyzer-template/project/constructMockCode.ts +136 -43
- package/analyzer-template/project/reconcileMockDataKeys.ts +19 -14
- package/analyzer-template/project/start.ts +3 -0
- package/analyzer-template/project/startScenarioCapture.ts +9 -0
- package/analyzer-template/project/writeClientLogRoute.ts +125 -0
- package/analyzer-template/project/writeMockDataTsx.ts +17 -0
- package/analyzer-template/project/writeScenarioComponents.ts +36 -7
- package/analyzer-template/tsconfig.json +13 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +115 -34
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +17 -11
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +2 -0
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +5 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
- package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +12 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +29 -7
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +208 -11
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
- package/codeyam-cli/src/cli.js +9 -12
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +17 -7
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +7 -2
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +1982 -0
- package/codeyam-cli/src/commands/editor.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +40 -11
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/commands/memory.js +29 -58
- package/codeyam-cli/src/commands/memory.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +246 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +126 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +295 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +100 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +147 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +76 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js +6 -0
- package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js +9 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
- package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +26 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +21 -5
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/buildFlags.js +4 -0
- package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
- package/codeyam-cli/src/utils/devModeEvents.js +40 -0
- package/codeyam-cli/src/utils/devModeEvents.js.map +1 -0
- package/codeyam-cli/src/utils/editorAudit.js +82 -0
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
- package/codeyam-cli/src/utils/editorDevServer.js +98 -0
- package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
- package/codeyam-cli/src/utils/editorJournal.js +137 -0
- package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
- package/codeyam-cli/src/utils/editorMockState.js +248 -0
- package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js +64 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreview.js +66 -0
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarios.js +56 -0
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
- package/codeyam-cli/src/utils/fileMetadata.js +5 -0
- package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +25 -9
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +103 -0
- package/codeyam-cli/src/utils/git.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +57 -15
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
- package/codeyam-cli/src/utils/npmVersionCheck.js +2 -2
- package/codeyam-cli/src/utils/npmVersionCheck.js.map +1 -1
- package/codeyam-cli/src/utils/pathIgnoring.js +19 -7
- package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
- package/codeyam-cli/src/utils/project.js +15 -5
- package/codeyam-cli/src/utils/project.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
- package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +70 -1
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +7 -6
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/requireSimulations.js +1 -1
- package/codeyam-cli/src/utils/requireSimulations.js.map +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +5 -6
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +2 -5
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -1
- package/codeyam-cli/src/utils/rules/__tests__/parser.test.js +83 -0
- package/codeyam-cli/src/utils/rules/__tests__/parser.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js +118 -0
- package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js +72 -0
- package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js +76 -0
- package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/index.js +1 -0
- package/codeyam-cli/src/utils/rules/index.js.map +1 -1
- package/codeyam-cli/src/utils/rules/parser.js +14 -4
- package/codeyam-cli/src/utils/rules/parser.js.map +1 -1
- package/codeyam-cli/src/utils/rules/pathMatcher.js +34 -3
- package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -1
- package/codeyam-cli/src/utils/rules/rulePlacement.js +65 -0
- package/codeyam-cli/src/utils/rules/rulePlacement.js.map +1 -0
- package/codeyam-cli/src/utils/rules/sourceFiles.js +43 -0
- package/codeyam-cli/src/utils/rules/sourceFiles.js.map +1 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
- package/codeyam-cli/src/utils/serverState.js +27 -2
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +45 -4
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js +63 -42
- package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/testRunner.js +158 -0
- package/codeyam-cli/src/utils/testRunner.js.map +1 -0
- package/codeyam-cli/src/utils/transcriptPruning.js +67 -0
- package/codeyam-cli/src/utils/transcriptPruning.js.map +1 -0
- package/codeyam-cli/src/utils/versionInfo.js +21 -0
- package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
- package/codeyam-cli/src/utils/webappDetection.js +14 -2
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js +41 -27
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
- package/codeyam-cli/src/webserver/backgroundServer.js +118 -18
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-jNYXRRNI.js → CopyButton-DmJveP3T.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-bwuHPyTa.js → EntityItem-C76mRRiF.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-CvzqMxcu.js → EntityTypeBadge-g3saevPb.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-BH0XDim7.js → EntityTypeIcon-CobE682z.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-yjIHlOGa.js → InteractivePreview-DYFW3lDD.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-Cq5o8jL4.js → LibraryFunctionPreview-DLeucoVX.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BvMu2i-g.js → LoadingDots-BU_OAEMP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-kgBTLoJD.js → LogViewer-ceAyBX-H.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-BzPgx-xO.js → ReportIssueModal-djPLI-WV.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-CwZrv-Ok.js → SafeScreenshot-BED4B6sP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-BX2Ny2Qj.js → ScenarioViewer-B76aig_2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/Terminal-nZNBALox.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-CDpEprKa.js → TruncatedFilePath-C8OKAR5x.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{_index-BRx8ZGZo.js → _index-C96V0n15.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-4S4yPfFw.js → activity.(_tab)-BpKzcsJz.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/addon-fit-CUXOrorO.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-web-links-Duc5hnl7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-D9hemwl6.js +22 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.dev-mode-events-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-audit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-capture-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-entry-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-refresh-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenarios-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.rule-path-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-D4IPYH_y.js → book-open-D_nMCFmP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-CG65viiV.js → chevron-down-BH2h1Ea2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-DB3aFuEO.js → chunk-JZWAC4HX-C4pqxYJB.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-igfMr5DY.js → circle-check-DyIKORY6.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{copy-Coc4o_8c.js → copy-NDbZjXao.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-D1zB-pYc.js → createLucideIcon-CMT1jU2q.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BiM6z3Do.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor-B2KwhQph.js +8 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-B0h9AqE6.js → entity._sha._-CrjR3zZW.js} +10 -10
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-DjACbfdI.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C28BiQzt.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-PePWg17F.js → entity._sha_.edit._scenarioId-BMvVHNXU.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-I-Wo99C_.js → entry.client-DTvKq3TY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-9sMMAiWJ.js → fileTableUtils-cPo8LiG3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-Co65J0s3.js → files-DO4CZ16O.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{git-BdHOxVfg.js → git-CFCTYk9I.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-B17TBSS6.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-CUM5iXwc.js → index-10oVnAAH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-_417gcQW.js → index-BcvgDzbZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/labs-Zk7ryIM1.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-TzRHMVog.js → loader-circle-BAXYRVEO.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-af20abcd.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-Dg0mvYrI.js +96 -0
- package/codeyam-cli/src/webserver/build/client/assets/{pause-hjzB7t2z.js → pause-DTAcYxBt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-DUKqhFlb.js +67 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DcAwD_Ln.js → search-fKo7v0Zo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-DfuTtcJP.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-DVNJVQgD.js → simulations-B3aOzpCZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-DbEAHMbA.js → terminal-BG4heKCG.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CAD5b1o_.js → triangle-alert-DtSmdtM4.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-BqgrAzs3.js → useCustomSizes-ByhSyh0W.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C14nCb1q.js +2 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DZlYx2c4.js → useReportContext-O-jkvSPx.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-ihdMtlf6.js → useToast-9FIWuYfK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
- package/codeyam-cli/src/webserver/build/server/assets/index-D_kZbNJs.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CWy5OIH9.js +366 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/src/webserver/devServer.js +39 -5
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/editorProxy.js +440 -0
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +175 -0
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +140 -0
- package/codeyam-cli/src/webserver/server.js +226 -1
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +698 -0
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +68 -0
- package/codeyam-cli/templates/editor-step-hook.py +147 -0
- package/codeyam-cli/templates/hooks/staleness-check.sh +43 -0
- package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
- package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
- package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
- package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
- package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
- package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/PRISMA_SETUP.md +84 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +19 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +43 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +35 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
- package/codeyam-cli/templates/prompts/conversation-guidance.txt +44 -0
- package/codeyam-cli/templates/prompts/conversation-prompt.txt +28 -0
- package/codeyam-cli/templates/prompts/interruption-prompt.txt +31 -0
- package/codeyam-cli/templates/prompts/stale-rules-prompt.txt +24 -0
- package/codeyam-cli/templates/rule-notification-hook.py +44 -17
- package/codeyam-cli/templates/rule-reflection-hook.py +24 -4
- package/codeyam-cli/templates/rules-instructions.md +34 -88
- package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +69 -0
- package/codeyam-cli/templates/{codeyam-memory.md → skills/codeyam-memory/SKILL.md} +215 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
- package/codeyam-cli/templates/{codeyam-new-rule.md → skills/codeyam-new-rule/SKILL.md} +0 -2
- package/package.json +12 -10
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +22 -4
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +10 -7
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +21 -0
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
- package/packages/ai/src/lib/generateEntityScenarioData.js +57 -2
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +13 -4
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/index.js +4 -2
- package/packages/analyze/src/lib/asts/index.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +8 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +0 -5
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +9 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +54 -27
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +65 -0
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +18 -4
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/database/index.js +1 -0
- package/packages/database/index.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +5 -0
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +45 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/packages/database/src/lib/loadCommits.js +23 -13
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +100 -89
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/packages/utils/src/lib/fs/rsyncCopy.js +6 -2
- package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/scripts/npm-post-install.cjs +34 -0
- package/codeyam-cli/src/commands/detect-universal-mocks.js +0 -120
- package/codeyam-cli/src/commands/detect-universal-mocks.js.map +0 -1
- package/codeyam-cli/src/commands/list.js +0 -31
- package/codeyam-cli/src/commands/list.js.map +0 -1
- package/codeyam-cli/src/commands/webapp-info.js +0 -146
- package/codeyam-cli/src/commands/webapp-info.js.map +0 -1
- package/codeyam-cli/src/utils/universal-mocks.js +0 -152
- package/codeyam-cli/src/utils/universal-mocks.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-EhOseatT.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DHKuQSmR.js +0 -17
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-JTAjQ54M.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DjLxr2JB.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-CtYowLOt.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/globals-BSZfYCkU.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/labs-BK0C1H1T.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-040dab1c.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/memory-UIDVz141.js +0 -92
- package/codeyam-cli/src/webserver/build/client/assets/root-D1WadSdf.js +0 -62
- package/codeyam-cli/src/webserver/build/client/assets/settings-CclxrcPK.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-DAFqfEDH.js +0 -2
- package/codeyam-cli/src/webserver/build/server/assets/index-B3dE0r28.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-DYbfdxa3.js +0 -273
- package/codeyam-cli/templates/codeyam-stop-hook.sh +0 -284
- package/scripts/finalize-analyzer.cjs +0 -13
- /package/codeyam-cli/templates/{codeyam-diagnose.md → commands/codeyam-diagnose.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-debug.md → skills/codeyam-debug/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-setup.md → skills/codeyam-setup/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-sim.md → skills/codeyam-sim/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-test.md → skills/codeyam-test/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-verify.md → skills/codeyam-verify/SKILL.md} +0 -0
|
@@ -95,8 +95,13 @@ export function createProgramFromTsConfigPath(
|
|
|
95
95
|
throw new Error('Could not parse tsconfig.json');
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
//
|
|
99
|
-
|
|
98
|
+
// Always filter out node_modules from root files to prevent OOM on large projects.
|
|
99
|
+
// This only removes them as root compilation targets — TypeScript's module resolution
|
|
100
|
+
// still follows imports into node_modules for type info when processing source files.
|
|
101
|
+
let fileNames = parsedCommandLine.fileNames.filter(
|
|
102
|
+
(f) => !f.includes('/node_modules/'),
|
|
103
|
+
);
|
|
104
|
+
|
|
100
105
|
if (excludePatterns && excludePatterns.length > 0) {
|
|
101
106
|
const regexPatterns = excludePatterns
|
|
102
107
|
.map((pattern) => {
|
|
@@ -310,7 +310,15 @@ export default async function analyzeEntities({
|
|
|
310
310
|
);
|
|
311
311
|
|
|
312
312
|
// Flush transformation trace if tracing is enabled
|
|
313
|
-
|
|
313
|
+
// Wrapped in try/catch because trace data can exceed V8's max string length
|
|
314
|
+
// for large projects, and we must not crash the analysis process over tracing.
|
|
315
|
+
try {
|
|
316
|
+
transformationTracer.flush();
|
|
317
|
+
} catch (e) {
|
|
318
|
+
console.warn(
|
|
319
|
+
`CodeYam Warning: Failed to flush transformation trace: ${e.message}`,
|
|
320
|
+
);
|
|
321
|
+
}
|
|
314
322
|
|
|
315
323
|
return analyses;
|
|
316
324
|
|
|
@@ -100,12 +100,6 @@ export function getCandidatesReadyForCapture(
|
|
|
100
100
|
continue;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
// Skip notExported entities - they can't be imported into the simulation
|
|
104
|
-
// environment and will always fail capture. Don't mark them as ready.
|
|
105
|
-
if (candidate.entity?.metadata?.notExported) {
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
103
|
// Get all transitive dependencies
|
|
110
104
|
const candidateKey = `${candidate.filePath}:${candidate.entityName}`;
|
|
111
105
|
const { missingDependencies } = getTransitiveDependencies(
|
|
@@ -138,6 +138,18 @@ export default async function findOrCreateEntity({
|
|
|
138
138
|
break;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
+
|
|
142
|
+
// Mark previous versions as superseded
|
|
143
|
+
const entitiesToSupersede = previousEntities.filter(
|
|
144
|
+
(e) => !e.metadata?.isSuperseded,
|
|
145
|
+
);
|
|
146
|
+
if (entitiesToSupersede.length > 0) {
|
|
147
|
+
for (const prev of entitiesToSupersede) {
|
|
148
|
+
prev.metadata = prev.metadata || {};
|
|
149
|
+
prev.metadata.isSuperseded = true;
|
|
150
|
+
}
|
|
151
|
+
await upsertEntities(entitiesToSupersede);
|
|
152
|
+
}
|
|
141
153
|
}
|
|
142
154
|
|
|
143
155
|
entity = {
|
|
@@ -404,22 +404,15 @@ export class TransformationTracer {
|
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
/**
|
|
407
|
-
*
|
|
407
|
+
* Compute the summary data for the current traces.
|
|
408
408
|
*/
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
const entities = Array.from(this.traces.keys());
|
|
417
|
-
const stageCounts = entities
|
|
418
|
-
.map((e) => `${e}(${this.traces.get(e)!.stages.length})`)
|
|
419
|
-
.join(', ');
|
|
420
|
-
this.log(`flush: writing ${entities.length} entities: ${stageCounts}`);
|
|
421
|
-
|
|
422
|
-
// Compute summary
|
|
409
|
+
private computeFlushSummary(): {
|
|
410
|
+
stageChangeCounts: Record<
|
|
411
|
+
string,
|
|
412
|
+
{ added: number; removed: number; changed: number }
|
|
413
|
+
>;
|
|
414
|
+
entitiesWithMostChanges: string[];
|
|
415
|
+
} {
|
|
423
416
|
const stageChangeCounts: Record<
|
|
424
417
|
string,
|
|
425
418
|
{ added: number; removed: number; changed: number }
|
|
@@ -484,17 +477,39 @@ export class TransformationTracer {
|
|
|
484
477
|
.slice(0, 10)
|
|
485
478
|
.map(([name]) => name);
|
|
486
479
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
480
|
+
return { stageChangeCounts, entitiesWithMostChanges };
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Write the trace to the output file.
|
|
485
|
+
* Uses streaming per-entity writes to avoid exceeding V8's max string length
|
|
486
|
+
* on large projects.
|
|
487
|
+
*/
|
|
488
|
+
flush(): void {
|
|
489
|
+
if (!this.isEnabled()) return;
|
|
490
|
+
if (this.traces.size === 0) {
|
|
491
|
+
this.log('flush: no traces to write');
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
const entities = Array.from(this.traces.keys());
|
|
496
|
+
const stageCounts = entities
|
|
497
|
+
.map((e) => `${e}(${this.traces.get(e)!.stages.length})`)
|
|
498
|
+
.join(', ');
|
|
499
|
+
this.log(`flush: writing ${entities.length} entities: ${stageCounts}`);
|
|
500
|
+
|
|
501
|
+
const { stageChangeCounts, entitiesWithMostChanges } =
|
|
502
|
+
this.computeFlushSummary();
|
|
503
|
+
|
|
504
|
+
const meta = {
|
|
505
|
+
timestamp: new Date().toISOString(),
|
|
506
|
+
projectSlug: this.projectSlug,
|
|
507
|
+
entityCount: this.traces.size,
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
const summary = {
|
|
511
|
+
stageChangeCounts,
|
|
512
|
+
entitiesWithMostChanges,
|
|
498
513
|
};
|
|
499
514
|
|
|
500
515
|
// Ensure directory exists
|
|
@@ -503,8 +518,30 @@ export class TransformationTracer {
|
|
|
503
518
|
fs.mkdirSync(dir, { recursive: true });
|
|
504
519
|
}
|
|
505
520
|
|
|
506
|
-
|
|
507
|
-
|
|
521
|
+
// Stream JSON per-entity to avoid exceeding V8's max string length.
|
|
522
|
+
// Each entity is serialized individually so no single JSON.stringify
|
|
523
|
+
// call needs to produce the entire trace.
|
|
524
|
+
const fd = fs.openSync(this.outputPath, 'w');
|
|
525
|
+
try {
|
|
526
|
+
fs.writeSync(fd, '{\n "meta": ');
|
|
527
|
+
fs.writeSync(fd, JSON.stringify(meta, null, 2));
|
|
528
|
+
fs.writeSync(fd, ',\n "summary": ');
|
|
529
|
+
fs.writeSync(fd, JSON.stringify(summary, null, 2));
|
|
530
|
+
fs.writeSync(fd, ',\n "entities": {');
|
|
531
|
+
|
|
532
|
+
let first = true;
|
|
533
|
+
for (const [entityName, entityTrace] of this.traces) {
|
|
534
|
+
if (!first) fs.writeSync(fd, ',');
|
|
535
|
+
fs.writeSync(fd, `\n ${JSON.stringify(entityName)}: `);
|
|
536
|
+
fs.writeSync(fd, JSON.stringify(entityTrace, null, 2));
|
|
537
|
+
first = false;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
fs.writeSync(fd, '\n }\n}\n');
|
|
541
|
+
this.log(`flush: wrote trace to ${this.outputPath}`);
|
|
542
|
+
} finally {
|
|
543
|
+
fs.closeSync(fd);
|
|
544
|
+
}
|
|
508
545
|
}
|
|
509
546
|
|
|
510
547
|
/**
|
|
@@ -461,6 +461,17 @@ export default function generateDataStructure({
|
|
|
461
461
|
|
|
462
462
|
const { isolatedDataStructure } = entity.metadata;
|
|
463
463
|
|
|
464
|
+
if (!isolatedDataStructure) {
|
|
465
|
+
awsLog(
|
|
466
|
+
'CodeYam: Skipping data structure generation — isolatedDataStructure is undefined (scope analysis may have failed)',
|
|
467
|
+
{
|
|
468
|
+
entityName: entity.name,
|
|
469
|
+
filePath: entity.filePath,
|
|
470
|
+
},
|
|
471
|
+
);
|
|
472
|
+
return analysis;
|
|
473
|
+
}
|
|
474
|
+
|
|
464
475
|
// Transformation tracing: start entity and capture isolated data structure
|
|
465
476
|
transformationTracer.startEntity({
|
|
466
477
|
name: entity.name,
|
|
@@ -643,6 +654,78 @@ export default function generateDataStructure({
|
|
|
643
654
|
},
|
|
644
655
|
);
|
|
645
656
|
|
|
657
|
+
// Infer function types from child component usage BEFORE fillInSchemaGapsAndUnknowns.
|
|
658
|
+
// When a hook returns a property with type 'unknown' that is passed to a child
|
|
659
|
+
// component which calls it as a function (e.g., isEntityPending(entity)),
|
|
660
|
+
// promote it to 'function'. Without this, name heuristics like isLikelyBoolean
|
|
661
|
+
// would mistype "isEntityPending" as boolean because of the "is" prefix.
|
|
662
|
+
//
|
|
663
|
+
// sourceEquivalencies are in isolatedDataStructure.dependencySchemas (not in
|
|
664
|
+
// mergedDataStructure.dependencySchemas — they're dropped during the merge).
|
|
665
|
+
// The child's signatureSchema (with function call evidence) IS in the merged schemas.
|
|
666
|
+
{
|
|
667
|
+
const isolatedDepSchemas =
|
|
668
|
+
entity.metadata.isolatedDataStructure?.dependencySchemas;
|
|
669
|
+
if (isolatedDepSchemas) {
|
|
670
|
+
for (const childFilePath in isolatedDepSchemas) {
|
|
671
|
+
const childIsolated = isolatedDepSchemas[childFilePath];
|
|
672
|
+
for (const childName in childIsolated) {
|
|
673
|
+
const sourceEq = childIsolated[childName]?.sourceEquivalencies;
|
|
674
|
+
if (!sourceEq) continue;
|
|
675
|
+
|
|
676
|
+
// Get the child's signatureSchema from the MERGED schemas (richer)
|
|
677
|
+
const mergedChildSchema =
|
|
678
|
+
mergedDataStructure.dependencySchemas[childFilePath]?.[
|
|
679
|
+
childName
|
|
680
|
+
];
|
|
681
|
+
const sigSchema = mergedChildSchema?.signatureSchema;
|
|
682
|
+
if (!sigSchema) continue;
|
|
683
|
+
|
|
684
|
+
for (const childPath in sourceEq) {
|
|
685
|
+
for (const source of sourceEq[childPath]) {
|
|
686
|
+
const fcrvSuffix = '.functionCallReturnValue.';
|
|
687
|
+
const fcrvIndex = source.schemaPath.indexOf(fcrvSuffix);
|
|
688
|
+
if (fcrvIndex === -1) continue;
|
|
689
|
+
|
|
690
|
+
const propName = source.schemaPath.slice(
|
|
691
|
+
fcrvIndex + fcrvSuffix.length,
|
|
692
|
+
);
|
|
693
|
+
|
|
694
|
+
// Find the corresponding child signature path
|
|
695
|
+
const entityCallPrefix = childName + '().';
|
|
696
|
+
const sigPathBase = childPath.startsWith(entityCallPrefix)
|
|
697
|
+
? childPath.slice(entityCallPrefix.length)
|
|
698
|
+
: childPath;
|
|
699
|
+
|
|
700
|
+
// Check if the child's signatureSchema has a function call version
|
|
701
|
+
let isFunction = false;
|
|
702
|
+
for (const sigKey in sigSchema) {
|
|
703
|
+
if (
|
|
704
|
+
sigKey.startsWith(sigPathBase + '(') &&
|
|
705
|
+
sigSchema[sigKey] === 'function'
|
|
706
|
+
) {
|
|
707
|
+
isFunction = true;
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
if (isFunction) {
|
|
713
|
+
for (const rvKey in depSchema.returnValueSchema) {
|
|
714
|
+
if (
|
|
715
|
+
rvKey.endsWith('.' + propName) &&
|
|
716
|
+
depSchema.returnValueSchema[rvKey] === 'unknown'
|
|
717
|
+
) {
|
|
718
|
+
depSchema.returnValueSchema[rvKey] = 'function';
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
646
729
|
// Fill in type gaps BEFORE clearing attributes, so evidence like .includes()
|
|
647
730
|
// is used for type inference before being deleted
|
|
648
731
|
|
package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts
CHANGED
|
@@ -52,6 +52,7 @@ const PRIMITIVE_TYPES = new Set([
|
|
|
52
52
|
|
|
53
53
|
// Check if a type string represents a primitive type
|
|
54
54
|
// Handles union types like "string | undefined" or "number | null"
|
|
55
|
+
// Also handles string literal unions like "'suggestion' | 'warning' | 'tip'"
|
|
55
56
|
function isPrimitiveType(typeStr: string): boolean {
|
|
56
57
|
if (PRIMITIVE_TYPES.has(typeStr)) {
|
|
57
58
|
return true;
|
|
@@ -59,9 +60,15 @@ function isPrimitiveType(typeStr: string): boolean {
|
|
|
59
60
|
// Check union types - if ALL parts of the union are primitives, it's primitive
|
|
60
61
|
// e.g., "string | undefined" -> ["string", "undefined"] -> both are primitive -> true
|
|
61
62
|
// e.g., "object | null" -> ["object", "null"] -> object is not primitive -> false
|
|
63
|
+
// e.g., "'suggestion' | 'warning'" -> string literal union -> true
|
|
62
64
|
if (typeStr.includes('|')) {
|
|
63
65
|
const parts = typeStr.split('|').map((p) => p.trim());
|
|
64
|
-
return parts.every(
|
|
66
|
+
return parts.every(
|
|
67
|
+
(part) =>
|
|
68
|
+
PRIMITIVE_TYPES.has(part) ||
|
|
69
|
+
// String literal values like 'suggestion', 'warning' are primitives
|
|
70
|
+
(part.startsWith("'") && part.endsWith("'")),
|
|
71
|
+
);
|
|
65
72
|
}
|
|
66
73
|
return false;
|
|
67
74
|
}
|
|
@@ -110,9 +117,21 @@ function pathPartMatches(pathPart: string, schemaPathPart: string): boolean {
|
|
|
110
117
|
function bestValueFromOptions(options: Array<string | undefined>) {
|
|
111
118
|
options = options.filter(Boolean) as string[];
|
|
112
119
|
|
|
113
|
-
const known = options.
|
|
114
|
-
if (known) {
|
|
115
|
-
|
|
120
|
+
const known = options.filter((o) => !o.includes('unknown'));
|
|
121
|
+
if (known.length > 0) {
|
|
122
|
+
// Among known values, prefer string literal unions over bare primitives.
|
|
123
|
+
// e.g., "'draft' | 'inProgress' | 'paused' | 'completed'" is more specific than "string".
|
|
124
|
+
// This handles cases where a dependency schema has a bare type like "string" but the
|
|
125
|
+
// child entity's analysis has the actual literal union from TypeScript type resolution.
|
|
126
|
+
if (known.length > 1 && known.some((o) => PRIMITIVE_TYPES.has(o))) {
|
|
127
|
+
const literalUnion = known.find(
|
|
128
|
+
(o) => !PRIMITIVE_TYPES.has(o) && o.includes("'"),
|
|
129
|
+
);
|
|
130
|
+
if (literalUnion) {
|
|
131
|
+
return literalUnion;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return known[0];
|
|
116
135
|
}
|
|
117
136
|
|
|
118
137
|
const notUnknown = options.find((o) => o !== 'unknown');
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"author": "",
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@aws-sdk/client-codebuild": "^3.
|
|
14
|
+
"@aws-sdk/client-codebuild": "^3.1000.0",
|
|
15
15
|
"@aws-sdk/client-cloudwatch-logs": "^3.990.0",
|
|
16
16
|
"@aws-sdk/client-dynamodb": "^3.990.0",
|
|
17
17
|
"@aws-sdk/client-ecr": "^3.990.0",
|
|
@@ -75,6 +75,7 @@ export * from './src/lib/kysely/tables/backgroundJobsTable';
|
|
|
75
75
|
export * from './src/lib/kysely/tables/branchesTable';
|
|
76
76
|
export * from './src/lib/kysely/tables/commitBranchesTable';
|
|
77
77
|
export * from './src/lib/kysely/tables/commitsTable';
|
|
78
|
+
export * from './src/lib/kysely/tables/editorScenariosTable';
|
|
78
79
|
export * from './src/lib/kysely/tables/entitiesTable';
|
|
79
80
|
export * from './src/lib/kysely/tables/entityBranchesTable';
|
|
80
81
|
export * from './src/lib/kysely/tables/entityStatementsTable';
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"license": "ISC",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@supabase/supabase-js": "2.88.0",
|
|
16
|
-
"better-sqlite3": "^12.
|
|
16
|
+
"better-sqlite3": "^12.6.2",
|
|
17
17
|
"fetch-retry": "^6.0.0",
|
|
18
18
|
"kysely": "^0.28.11",
|
|
19
|
-
"pg": "^8.
|
|
19
|
+
"pg": "^8.19.0"
|
|
20
20
|
},
|
|
21
21
|
"jest": {
|
|
22
22
|
"preset": "ts-jest",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/better-sqlite3": "^7.6.13",
|
|
27
27
|
"@types/jest": "^30.0.0",
|
|
28
|
-
"@types/pg": "^8.
|
|
28
|
+
"@types/pg": "^8.18.0",
|
|
29
29
|
"@types/ws": "^8.18.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -62,6 +62,10 @@ import {
|
|
|
62
62
|
createScenarioCommentsTable,
|
|
63
63
|
ScenarioCommentsTable,
|
|
64
64
|
} from './tables/scenarioCommentsTable';
|
|
65
|
+
import {
|
|
66
|
+
createEditorScenariosTable,
|
|
67
|
+
EditorScenariosTable,
|
|
68
|
+
} from './tables/editorScenariosTable';
|
|
65
69
|
import { createScenariosTable, ScenariosTable } from './tables/scenariosTable';
|
|
66
70
|
import {
|
|
67
71
|
createStatementsTable,
|
|
@@ -106,6 +110,7 @@ const databaseSchema = {
|
|
|
106
110
|
commit_branches: schemaField<CommitBranchesTable>(),
|
|
107
111
|
commits: schemaField<CommitsTable>(),
|
|
108
112
|
debug_reports: schemaField<DebugBundlesTable>(),
|
|
113
|
+
editor_scenarios: schemaField<EditorScenariosTable>(),
|
|
109
114
|
entities: schemaField<EntitiesTable>(),
|
|
110
115
|
entity_branches: schemaField<EntityBranchesTable>(),
|
|
111
116
|
entity_statements: schemaField<EntityStatementsTable>(),
|
|
@@ -210,6 +215,7 @@ export function getSqliteDatabase(sqlitePath?: string) {
|
|
|
210
215
|
fileMustExist: false,
|
|
211
216
|
});
|
|
212
217
|
sqlite.pragma('journal_mode = WAL');
|
|
218
|
+
sqlite.pragma('busy_timeout = 5000');
|
|
213
219
|
sqlite.pragma('synchronous = FULL');
|
|
214
220
|
|
|
215
221
|
// Verify the database has the expected schema
|
|
@@ -305,6 +311,7 @@ export async function getDatabaseForTesting(
|
|
|
305
311
|
// Standard SQLite testing path
|
|
306
312
|
const sqlite = new SQLiteDatabase(dbPath);
|
|
307
313
|
sqlite.pragma('journal_mode = WAL');
|
|
314
|
+
sqlite.pragma('busy_timeout = 5000');
|
|
308
315
|
sqlite.pragma('synchronous = FULL');
|
|
309
316
|
const kyselyDb = new Kysely<Database>({
|
|
310
317
|
dialect: new SqliteDialect({ database: sqlite }),
|
|
@@ -390,6 +397,7 @@ export async function createSqliteSchema(db: Kysely<Database>): Promise<void> {
|
|
|
390
397
|
await createCommitBranchesTable(db);
|
|
391
398
|
await createCommitsTable(db);
|
|
392
399
|
await createDebugBundlesTable(db);
|
|
400
|
+
await createEditorScenariosTable(db);
|
|
393
401
|
await createEntitiesTable(db);
|
|
394
402
|
await createEntityBranchesTable(db);
|
|
395
403
|
await createEntityStatementsTable(db);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Kysely, ColumnDefinitionBuilder } from 'kysely';
|
|
2
|
+
import type { Generated } from 'kysely';
|
|
3
|
+
|
|
4
|
+
import { schemaField, defaultNow } from '../schemaHelpers';
|
|
5
|
+
|
|
6
|
+
const editorScenariosSchema = {
|
|
7
|
+
id: schemaField<Generated<string>>(),
|
|
8
|
+
project_id: schemaField<string>(),
|
|
9
|
+
name: schemaField<string>(),
|
|
10
|
+
description: schemaField<string | null>(),
|
|
11
|
+
component_name: schemaField<string | null>(),
|
|
12
|
+
component_path: schemaField<string | null>(),
|
|
13
|
+
screenshot_path: schemaField<string | null>(),
|
|
14
|
+
created_at: schemaField<Generated<string>>(),
|
|
15
|
+
updated_at: schemaField<Generated<string>>(),
|
|
16
|
+
} as const;
|
|
17
|
+
|
|
18
|
+
export type EditorScenariosTable = {
|
|
19
|
+
[K in keyof typeof editorScenariosSchema]: (typeof editorScenariosSchema)[K];
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const EditorScenariosTableColumns = Object.keys(
|
|
23
|
+
editorScenariosSchema,
|
|
24
|
+
) as (keyof EditorScenariosTable)[];
|
|
25
|
+
|
|
26
|
+
export async function createEditorScenariosTable(
|
|
27
|
+
db: Kysely<any>,
|
|
28
|
+
): Promise<void> {
|
|
29
|
+
await db.schema
|
|
30
|
+
.createTable('editor_scenarios')
|
|
31
|
+
.addColumn('id', 'uuid', (col: ColumnDefinitionBuilder) => col.primaryKey())
|
|
32
|
+
.addColumn('project_id', 'uuid', (col: ColumnDefinitionBuilder) =>
|
|
33
|
+
col.notNull(),
|
|
34
|
+
)
|
|
35
|
+
.addColumn('name', 'varchar', (col: ColumnDefinitionBuilder) =>
|
|
36
|
+
col.notNull(),
|
|
37
|
+
)
|
|
38
|
+
.addColumn('description', 'text')
|
|
39
|
+
.addColumn('component_name', 'varchar')
|
|
40
|
+
.addColumn('component_path', 'varchar')
|
|
41
|
+
.addColumn('screenshot_path', 'varchar')
|
|
42
|
+
.addColumn('created_at', 'datetime', defaultNow(true))
|
|
43
|
+
.addColumn('updated_at', 'datetime', defaultNow(true))
|
|
44
|
+
.ifNotExists()
|
|
45
|
+
.execute();
|
|
46
|
+
|
|
47
|
+
// Add columns to existing tables (ALTER TABLE has no IF NOT EXISTS in SQLite)
|
|
48
|
+
for (const col of [
|
|
49
|
+
'component_name',
|
|
50
|
+
'component_path',
|
|
51
|
+
'screenshot_path',
|
|
52
|
+
] as const) {
|
|
53
|
+
try {
|
|
54
|
+
await db.schema
|
|
55
|
+
.alterTable('editor_scenarios')
|
|
56
|
+
.addColumn(col, 'varchar')
|
|
57
|
+
.execute();
|
|
58
|
+
} catch {
|
|
59
|
+
// Column already exists — expected for fresh databases
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { awsLog } from '~codeyam/utils';
|
|
10
10
|
import { Commit } from '~codeyam/types';
|
|
11
11
|
import { ScenariosTableColumns } from './kysely/tables/scenariosTable';
|
|
12
|
+
import { CommitsTableColumnsLite } from './kysely/tables/commitsTable';
|
|
12
13
|
import { sql, ExpressionBuilder } from 'kysely';
|
|
13
14
|
|
|
14
15
|
interface LoadCommitsArgs {
|
|
@@ -150,25 +151,35 @@ export default async function loadCommits({
|
|
|
150
151
|
const startTime = Date.now();
|
|
151
152
|
|
|
152
153
|
try {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
154
|
+
// When skipRelations is true, use lite columns (excludes 'files' which can be 1MB+ per commit)
|
|
155
|
+
// and skip the author subquery for maximum efficiency
|
|
156
|
+
let query: any;
|
|
157
|
+
if (skipRelations) {
|
|
158
|
+
const liteColumns = CommitsTableColumnsLite.map(
|
|
159
|
+
(col) => `commits.${col}` as any,
|
|
160
|
+
);
|
|
161
|
+
query = db.selectFrom('commits').select(liteColumns);
|
|
162
|
+
} else {
|
|
163
|
+
query = db
|
|
164
|
+
.selectFrom('commits')
|
|
165
|
+
.selectAll('commits')
|
|
166
|
+
.select((eb: ExpressionBuilder<any, any>) => [
|
|
167
|
+
jsonObjectFrom(
|
|
168
|
+
eb
|
|
169
|
+
.selectFrom('github_users')
|
|
170
|
+
.select([
|
|
171
|
+
'username',
|
|
172
|
+
'preferred_username as preferredUsername',
|
|
173
|
+
'avatar_url as avatarUrl',
|
|
174
|
+
])
|
|
175
|
+
.where(
|
|
176
|
+
'github_users.username',
|
|
177
|
+
'=',
|
|
178
|
+
eb.ref('commits.author_github_username'),
|
|
179
|
+
),
|
|
180
|
+
).as('author'),
|
|
181
|
+
]);
|
|
182
|
+
}
|
|
172
183
|
|
|
173
184
|
if (projectId) {
|
|
174
185
|
query = query.where('project_id', '=', projectId);
|
|
@@ -215,7 +226,7 @@ export default async function loadCommits({
|
|
|
215
226
|
|
|
216
227
|
// DEBUG: Log slow queries (includes files column which can be 1MB+)
|
|
217
228
|
if (queryTime > 100) {
|
|
218
|
-
const totalFilesSize = commits.reduce((sum, c: any) => {
|
|
229
|
+
const totalFilesSize = commits.reduce((sum: number, c: any) => {
|
|
219
230
|
return sum + (c.files ? JSON.stringify(c.files).length : 0);
|
|
220
231
|
}, 0);
|
|
221
232
|
console.log(
|
|
@@ -48,11 +48,6 @@ export default async function loadReadyToBeCapturedAnalyses(
|
|
|
48
48
|
sql<string>`${sql.ref('analyses.status')} -> 'readyToBeCaptured'`,
|
|
49
49
|
'=',
|
|
50
50
|
'true',
|
|
51
|
-
)
|
|
52
|
-
// Exclude entities that are not exported - they cannot be captured because they can't be imported
|
|
53
|
-
// Use -> operator for cross-database boolean comparison
|
|
54
|
-
.where(
|
|
55
|
-
sql<boolean>`(${sql.ref('entities.metadata')} -> 'notExported') IS NULL OR (${sql.ref('entities.metadata')} -> 'notExported') != 'true'`,
|
|
56
51
|
);
|
|
57
52
|
|
|
58
53
|
if (projectId) {
|