@codeyam/codeyam-cli 0.1.0-staging.596f0eb → 0.1.0-staging.62d4615
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 +8 -8
- package/analyzer-template/common/execAsync.ts +1 -1
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +16 -12
- package/analyzer-template/packages/ai/index.ts +20 -5
- package/analyzer-template/packages/ai/package.json +3 -3
- package/analyzer-template/packages/ai/src/lib/__mocks__/completionCall.ts +122 -0
- package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +214 -24
- package/analyzer-template/packages/ai/src/lib/astScopes/arrayDerivationDetector.ts +199 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +205 -10
- package/analyzer-template/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.ts +644 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +181 -23
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.ts +10 -17
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.ts +18 -0
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.ts +38 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.ts +181 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +1518 -125
- package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +318 -5
- package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +29 -10
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +216 -36
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +2301 -348
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +7 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +976 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +243 -77
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.ts +16 -3
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.ts +6 -4
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +71 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +161 -19
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.ts +70 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +93 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.ts +179 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.ts +40 -30
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +422 -86
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.ts +129 -0
- package/analyzer-template/packages/ai/src/lib/dataStructureChunking.ts +156 -0
- package/analyzer-template/packages/ai/src/lib/deepEqual.ts +30 -0
- package/analyzer-template/packages/ai/src/lib/e2eDataTracking.ts +334 -0
- package/analyzer-template/packages/ai/src/lib/extractCriticalDataKeys.ts +120 -0
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +74 -7
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +89 -112
- package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +63 -2
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +1394 -92
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +216 -109
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +578 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +528 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +2267 -0
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.ts +239 -0
- package/analyzer-template/packages/ai/src/lib/getConditionalUsagesFromCode.ts +143 -31
- package/analyzer-template/packages/ai/src/lib/guessScenarioDataFromDescription.ts +8 -2
- package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +328 -7
- package/analyzer-template/packages/ai/src/lib/mergeStatements.ts +111 -87
- package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +17 -7
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.ts +1 -1
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +32 -102
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChunkPrompt.ts +82 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateCriticalKeysPrompt.ts +103 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.ts +90 -6
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.ts +14 -53
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.ts +58 -0
- package/analyzer-template/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.ts +28 -2
- package/analyzer-template/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.ts +391 -0
- package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +824 -0
- package/analyzer-template/packages/ai/src/lib/splitOutsideParentheses.ts +5 -1
- package/analyzer-template/packages/ai/src/lib/validateExecutionFlowPaths.ts +531 -0
- package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +127 -3
- package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +121 -2
- package/analyzer-template/packages/analyze/index.ts +2 -0
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +79 -59
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +113 -26
- package/analyzer-template/packages/analyze/src/lib/analysisContext.ts +44 -4
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/index.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/isAsyncFunction.ts +67 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +19 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.ts +19 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllExports.ts +11 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.ts +8 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.ts +49 -1
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.ts +2 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +522 -272
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +34 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +6 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +3 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +4 -2
- package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +33 -10
- package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +31 -15
- package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +11 -7
- package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +11 -12
- package/analyzer-template/packages/analyze/src/lib/files/analyzeRemixRoute.ts +4 -5
- package/analyzer-template/packages/analyze/src/lib/files/enums/steps.ts +1 -1
- package/analyzer-template/packages/analyze/src/lib/files/getImportedExports.ts +14 -12
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +1315 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +313 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.ts +102 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +625 -52
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.ts +1 -1
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +28 -62
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +550 -137
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +264 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +78 -83
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarios.ts +4 -8
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +917 -130
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.ts +56 -11
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/propagateArrayItemSchemas.ts +474 -0
- package/analyzer-template/packages/analyze/src/lib/files/setImportedExports.ts +2 -1
- package/analyzer-template/packages/analyze/src/lib/index.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/utils/getFileByPath.ts +19 -0
- package/analyzer-template/packages/aws/codebuild/index.ts +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts +11 -1
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js +29 -18
- package/analyzer-template/packages/aws/dist/src/lib/codebuild/waitForBuild.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts +2 -2
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js +2 -2
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsDefineContainer.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts +8 -18
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js +17 -61
- package/analyzer-template/packages/aws/dist/src/lib/ecs/ecsTaskFactory.js.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.d.ts +15 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.d.ts.map +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.js +31 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/checkS3ObjectExists.js.map +1 -0
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.d.ts.map +1 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js +8 -1
- package/analyzer-template/packages/aws/dist/src/lib/s3/uploadFileToS3.js.map +1 -1
- package/analyzer-template/packages/aws/package.json +3 -3
- package/analyzer-template/packages/aws/s3/index.ts +1 -0
- package/analyzer-template/packages/aws/src/lib/codebuild/waitForBuild.ts +43 -19
- package/analyzer-template/packages/aws/src/lib/ecs/ecsDefineContainer.ts +3 -3
- package/analyzer-template/packages/aws/src/lib/ecs/ecsTaskFactory.ts +17 -69
- package/analyzer-template/packages/aws/src/lib/s3/checkS3ObjectExists.ts +47 -0
- package/analyzer-template/packages/aws/src/lib/s3/uploadFileToS3.ts +8 -1
- package/analyzer-template/packages/database/package.json +1 -1
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +12 -5
- package/analyzer-template/packages/database/src/lib/kysely/tableRelations.ts +2 -2
- package/analyzer-template/packages/database/src/lib/kysely/tables/commitsTable.ts +6 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/debugReportsTable.ts +36 -9
- package/analyzer-template/packages/database/src/lib/loadAnalyses.ts +58 -1
- package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +13 -0
- package/analyzer-template/packages/database/src/lib/loadBranch.ts +16 -1
- package/analyzer-template/packages/database/src/lib/loadCommit.ts +11 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +28 -0
- package/analyzer-template/packages/database/src/lib/loadEntities.ts +26 -3
- package/analyzer-template/packages/database/src/lib/loadEntityBranches.ts +12 -0
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +7 -3
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +7 -14
- package/analyzer-template/packages/generate/index.ts +3 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.ts +17 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +193 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.ts +73 -0
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +9 -4
- package/analyzer-template/packages/generate/src/lib/deepMerge.ts +26 -1
- package/analyzer-template/packages/generate/src/lib/scenarioComponentForServer.ts +114 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -2
- 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 +10 -3
- 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/tableRelations.d.ts +2 -2
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts +1 -11
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/analysesTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js +3 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts +30 -7
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js +9 -3
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/entitiesTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +2 -6
- 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/loadAnalyses.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js +45 -2
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +8 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js +11 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js +7 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts +3 -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 +22 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts +3 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +23 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js +9 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.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 +7 -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 +2 -2
- 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 +5 -4
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/index.d.ts +3 -0
- package/analyzer-template/packages/github/dist/generate/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/index.js +3 -0
- package/analyzer-template/packages/github/dist/generate/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts +9 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts +20 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
- 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 +8 -4
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.js +27 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/deepMerge.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts +8 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js +89 -0
- package/analyzer-template/packages/github/dist/generate/src/lib/scenarioComponentForServer.js.map +1 -0
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js +10 -0
- package/analyzer-template/packages/github/dist/github/src/lib/loadOrCreateCommit.js.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js +3 -0
- package/analyzer-template/packages/github/dist/github/src/lib/syncPrimaryBranch.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/index.d.ts +2 -2
- package/analyzer-template/packages/github/dist/types/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts +87 -13
- package/analyzer-template/packages/github/dist/types/src/types/Analysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/Entity.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +3 -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 +11 -6
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +199 -3
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/StatementInfo.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.js +25 -0
- package/analyzer-template/packages/github/dist/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts +9 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js +29 -3
- package/analyzer-template/packages/github/dist/utils/src/lib/safeFileName.js.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/github/src/lib/loadOrCreateCommit.ts +14 -0
- package/analyzer-template/packages/github/src/lib/syncPrimaryBranch.ts +2 -0
- package/analyzer-template/packages/process/index.ts +2 -0
- package/analyzer-template/packages/process/package.json +12 -0
- package/analyzer-template/packages/process/tsconfig.json +8 -0
- package/analyzer-template/packages/types/index.ts +5 -0
- package/analyzer-template/packages/types/src/types/Analysis.ts +104 -13
- package/analyzer-template/packages/types/src/types/Commit.ts +2 -0
- package/analyzer-template/packages/types/src/types/Entity.ts +2 -0
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +11 -10
- package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +228 -3
- package/analyzer-template/packages/types/src/types/ScopeAnalysis.ts +6 -1
- package/analyzer-template/packages/types/src/types/StatementInfo.ts +2 -0
- package/analyzer-template/packages/ui-components/src/components/ScenarioDetailInteractiveView.tsx +23 -7
- package/analyzer-template/packages/utils/dist/types/index.d.ts +2 -2
- package/analyzer-template/packages/utils/dist/types/index.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/index.js.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts +87 -13
- package/analyzer-template/packages/utils/dist/types/src/types/Analysis.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Entity.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +3 -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 +11 -6
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +199 -3
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/StatementInfo.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.js +25 -0
- package/analyzer-template/packages/utils/dist/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts +9 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js +29 -3
- package/analyzer-template/packages/utils/dist/utils/src/lib/safeFileName.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/lightweightEntityExtractor.ts +27 -0
- package/analyzer-template/packages/utils/src/lib/safeFileName.ts +48 -3
- package/analyzer-template/playwright/capture.ts +57 -26
- package/analyzer-template/playwright/captureStatic.ts +1 -1
- package/analyzer-template/playwright/getCodeYamInfo.ts +12 -7
- package/analyzer-template/playwright/takeElementScreenshot.ts +26 -11
- package/analyzer-template/playwright/takeScreenshot.ts +9 -7
- package/analyzer-template/playwright/waitForServer.ts +21 -6
- package/analyzer-template/project/analyzeBaselineCommit.ts +9 -0
- package/analyzer-template/project/analyzeBranchCommit.ts +4 -0
- package/analyzer-template/project/analyzeFileEntities.ts +4 -0
- package/analyzer-template/project/analyzeRegularCommit.ts +9 -0
- package/analyzer-template/project/captureLibraryFunctionDirect.ts +29 -26
- package/analyzer-template/project/constructMockCode.ts +1268 -167
- package/analyzer-template/project/controller/startController.ts +16 -1
- package/analyzer-template/project/createEntitiesAndSortFiles.ts +83 -0
- package/analyzer-template/project/executeLibraryFunctionDirect.ts +7 -3
- package/analyzer-template/project/loadReadyToBeCaptured.ts +65 -41
- package/analyzer-template/project/mocks/analyzeFileMock.ts +8 -7
- package/analyzer-template/project/orchestrateCapture/AwsCaptureTaskRunner.ts +12 -4
- package/analyzer-template/project/orchestrateCapture/KyselyAnalysisLoader.ts +3 -6
- package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +93 -42
- package/analyzer-template/project/orchestrateCapture/taskRunner.ts +4 -2
- package/analyzer-template/project/orchestrateCapture.ts +81 -9
- package/analyzer-template/project/reconcileMockDataKeys.ts +245 -2
- package/analyzer-template/project/runAnalysis.ts +11 -0
- package/analyzer-template/project/runMultiScenarioServer.ts +11 -10
- package/analyzer-template/project/serverOnlyModules.ts +194 -21
- package/analyzer-template/project/start.ts +61 -15
- package/analyzer-template/project/startScenarioCapture.ts +79 -41
- package/analyzer-template/project/writeMockDataTsx.ts +405 -65
- package/analyzer-template/project/writeScenarioClientWrapper.ts +21 -0
- package/analyzer-template/project/writeScenarioComponents.ts +862 -183
- package/analyzer-template/project/writeScenarioFiles.ts +26 -0
- package/analyzer-template/project/writeSimpleRoot.ts +31 -23
- package/analyzer-template/scripts/comboWorkerLoop.cjs +99 -50
- package/analyzer-template/scripts/defaultCmd.sh +9 -0
- package/analyzer-template/tsconfig.json +2 -1
- package/background/src/lib/local/createLocalAnalyzer.js +1 -29
- package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
- package/background/src/lib/local/execAsync.js +1 -1
- package/background/src/lib/local/execAsync.js.map +1 -1
- package/background/src/lib/virtualized/common/execAsync.js +1 -1
- package/background/src/lib/virtualized/common/execAsync.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeBaselineCommit.js +7 -1
- package/background/src/lib/virtualized/project/analyzeBaselineCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeBranchCommit.js +2 -1
- package/background/src/lib/virtualized/project/analyzeBranchCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeFileEntities.js +2 -1
- package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeRegularCommit.js +7 -1
- package/background/src/lib/virtualized/project/analyzeRegularCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js +3 -3
- package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js.map +1 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +1126 -126
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/controller/startController.js +11 -1
- package/background/src/lib/virtualized/project/controller/startController.js.map +1 -1
- package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js +73 -1
- package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js.map +1 -1
- package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js +6 -3
- package/background/src/lib/virtualized/project/executeLibraryFunctionDirect.js.map +1 -1
- package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js +19 -8
- package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js.map +1 -1
- package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js +7 -7
- package/background/src/lib/virtualized/project/mocks/analyzeFileMock.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js +2 -2
- package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js +3 -2
- package/background/src/lib/virtualized/project/orchestrateCapture/KyselyAnalysisLoader.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +73 -36
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js +65 -10
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +204 -2
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/runAnalysis.js +9 -0
- package/background/src/lib/virtualized/project/runAnalysis.js.map +1 -1
- package/background/src/lib/virtualized/project/runMultiScenarioServer.js +11 -9
- package/background/src/lib/virtualized/project/runMultiScenarioServer.js.map +1 -1
- package/background/src/lib/virtualized/project/serverOnlyModules.js +163 -23
- package/background/src/lib/virtualized/project/serverOnlyModules.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +53 -15
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +61 -31
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +354 -54
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js +15 -0
- package/background/src/lib/virtualized/project/writeScenarioClientWrapper.js.map +1 -0
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +624 -127
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioFiles.js +19 -0
- package/background/src/lib/virtualized/project/writeScenarioFiles.js.map +1 -1
- package/background/src/lib/virtualized/project/writeSimpleRoot.js +31 -21
- package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +180 -0
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/cli.js +9 -1
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +1 -1
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/baseline.js +174 -0
- package/codeyam-cli/src/commands/baseline.js.map +1 -0
- package/codeyam-cli/src/commands/debug.js +42 -18
- package/codeyam-cli/src/commands/debug.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +0 -15
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/memory.js +264 -0
- package/codeyam-cli/src/commands/memory.js.map +1 -0
- package/codeyam-cli/src/commands/recapture.js +226 -0
- package/codeyam-cli/src/commands/recapture.js.map +1 -0
- package/codeyam-cli/src/commands/report.js +72 -24
- package/codeyam-cli/src/commands/report.js.map +1 -1
- package/codeyam-cli/src/commands/start.js +8 -12
- package/codeyam-cli/src/commands/start.js.map +1 -1
- package/codeyam-cli/src/commands/status.js +23 -1
- package/codeyam-cli/src/commands/status.js.map +1 -1
- package/codeyam-cli/src/commands/test-startup.js +1 -1
- package/codeyam-cli/src/commands/test-startup.js.map +1 -1
- package/codeyam-cli/src/commands/wipe.js +108 -0
- package/codeyam-cli/src/commands/wipe.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js +81 -0
- package/codeyam-cli/src/utils/__tests__/serverVersionStaleness.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +31 -27
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js +29 -15
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +18 -4
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/database.js +91 -5
- package/codeyam-cli/src/utils/database.js.map +1 -1
- package/codeyam-cli/src/utils/generateReport.js +253 -106
- package/codeyam-cli/src/utils/generateReport.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +79 -0
- package/codeyam-cli/src/utils/git.js.map +1 -0
- package/codeyam-cli/src/utils/install-skills.js +76 -17
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +38 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +249 -16
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +25 -7
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/queue/persistence.js.map +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js +82 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +128 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +67 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js +105 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js +34 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js +162 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +75 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +285 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +83 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js +127 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js +50 -0
- package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js +96 -0
- package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/index.js +5 -0
- package/codeyam-cli/src/utils/ruleReflection/index.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js +33 -0
- package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js +85 -0
- package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/types.js +5 -0
- package/codeyam-cli/src/utils/ruleReflection/types.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js +293 -0
- package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/index.js +6 -0
- package/codeyam-cli/src/utils/rules/index.js.map +1 -0
- package/codeyam-cli/src/utils/rules/parser.js +78 -0
- package/codeyam-cli/src/utils/rules/parser.js.map +1 -0
- package/codeyam-cli/src/utils/rules/pathMatcher.js +18 -0
- package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -0
- package/codeyam-cli/src/utils/rules/ruleState.js +150 -0
- package/codeyam-cli/src/utils/rules/ruleState.js.map +1 -0
- package/codeyam-cli/src/utils/rules/staleness.js +137 -0
- package/codeyam-cli/src/utils/rules/staleness.js.map +1 -0
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +7 -5
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/versionInfo.js +25 -19
- package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
- package/codeyam-cli/src/utils/wipe.js +128 -0
- package/codeyam-cli/src/utils/wipe.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/database.js +104 -3
- 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 +5 -10
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/bootstrap.js +49 -0
- package/codeyam-cli/src/webserver/bootstrap.js.map +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CA3JxPb7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-B86KKU7e.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-efWKDYMr.js → EntityTypeBadge-B5ctlSYt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-BqY8gDAW.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-ClaLpuOo.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-BDhPilK7.js +25 -0
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-VeqEBv9v.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/LoadingDots-Bs7Nn1Jr.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/LogViewer-Bm3PmcCz.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-C6PKeMYR.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-Gq3Ocjo6.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-BNLaXBHR.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-COPstp9J.js → TruncatedFilePath-CiwXDxLh.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/_index-B3TDXxnk.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-DD1r_QU0.js +27 -0
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DfKzxuoe.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.agent-transcripts-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.health-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.memory-profile-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.restart-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.save-fixture-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/book-open-PttOB2SF.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/chevron-down-TJp6ofnp.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-JE9ZIoBl.js +51 -0
- package/codeyam-cli/src/webserver/build/client/assets/circle-check-CXhHQYrI.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/copy-6y9ALfGT.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-Ca9fAY46.js +21 -0
- package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-C1gnJVOL.svg → cy-logo-cli-CCKUIm0S.svg} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DcX-ZS3p.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-C5lqplTC.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-n38keI1k.js +23 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-CBoafmVs.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DGgZjdFg.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-38yPijoD.js +5 -0
- package/codeyam-cli/src/webserver/build/client/assets/entry.client-BSHEfydn.js +29 -0
- package/codeyam-cli/src/webserver/build/client/assets/executionFlowCoverage-BWhdfn70.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-DCPhhSMo.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/files-Dk8wkAS7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/git-DXnyr8uP.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-Bh6jH0cL.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-fmIEn3Bc.js +9 -0
- package/codeyam-cli/src/webserver/build/client/assets/index-CcsFv748.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/index-ChN9-fAY.js +9 -0
- package/codeyam-cli/src/webserver/build/client/assets/labs-BUvfJMNR.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-CTqLEAGU.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/manifest-d4e77269.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-DCHBwHou.js +76 -0
- package/codeyam-cli/src/webserver/build/client/assets/pause-D6vreykR.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/preload-helper-ckwbz45p.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-D6oziHts.js +62 -0
- package/codeyam-cli/src/webserver/build/client/assets/scenarioStatus-B_8jpV3e.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/search-B8VUL8nl.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/settings-B2X7lJgQ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CPoAg7Zo.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/terminal-BrCP7uQo.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-BZz2NjYa.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-DNwUduNu.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-3pmpUQB-.js → useLastLogLine-COky1GVF.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-CpZgwliL.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-DEyawJ8r.js → useToast-Bv9JFvUO.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-C0KrUQp-.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-C2h1v1XD.js +260 -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 +1 -3
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/server.js +35 -25
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/templates/codeyam-memory-hook.sh +199 -0
- package/codeyam-cli/templates/{codeyam-debug-skill.md → codeyam:debug.md} +48 -4
- package/codeyam-cli/templates/codeyam:diagnose.md +803 -0
- package/codeyam-cli/templates/codeyam:memory.md +404 -0
- package/codeyam-cli/templates/codeyam:new-rule.md +13 -0
- package/codeyam-cli/templates/{codeyam-setup-skill.md → codeyam:setup.md} +139 -4
- package/codeyam-cli/templates/{codeyam-sim-skill.md → codeyam:sim.md} +1 -1
- package/codeyam-cli/templates/{codeyam-test-skill.md → codeyam:test.md} +1 -1
- package/codeyam-cli/templates/{codeyam-verify-skill.md → codeyam:verify.md} +1 -1
- package/codeyam-cli/templates/rule-notification-hook.py +54 -0
- package/codeyam-cli/templates/rule-reflection-hook.py +428 -0
- package/codeyam-cli/templates/rules-instructions.md +123 -0
- package/package.json +22 -19
- package/packages/ai/index.js +8 -6
- package/packages/ai/index.js.map +1 -1
- package/packages/ai/src/lib/analyzeScope.js +167 -13
- package/packages/ai/src/lib/analyzeScope.js.map +1 -1
- package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js +150 -0
- package/packages/ai/src/lib/astScopes/arrayDerivationDetector.js.map +1 -0
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +154 -9
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js +435 -0
- package/packages/ai/src/lib/astScopes/conditionalEffectsExtractor.js.map +1 -0
- package/packages/ai/src/lib/astScopes/methodSemantics.js +138 -23
- package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js +10 -14
- package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js +8 -0
- package/packages/ai/src/lib/astScopes/patterns/ifStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js +23 -0
- package/packages/ai/src/lib/astScopes/patterns/switchStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js +138 -1
- package/packages/ai/src/lib/astScopes/patterns/variableDeclarationHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/processExpression.js +1157 -103
- package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
- package/packages/ai/src/lib/checkAllAttributes.js +24 -9
- package/packages/ai/src/lib/checkAllAttributes.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +178 -31
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +1816 -216
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +7 -2
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +661 -0
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +180 -56
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js +13 -3
- package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js +6 -4
- package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +66 -2
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +139 -13
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js +63 -0
- package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +83 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js +86 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js +173 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js +37 -20
- package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +355 -77
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js +107 -0
- package/packages/ai/src/lib/dataStructure/helpers/fixNullIdsBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructureChunking.js +111 -0
- package/packages/ai/src/lib/dataStructureChunking.js.map +1 -0
- package/packages/ai/src/lib/deepEqual.js +32 -0
- package/packages/ai/src/lib/deepEqual.js.map +1 -0
- package/packages/ai/src/lib/e2eDataTracking.js +241 -0
- package/packages/ai/src/lib/e2eDataTracking.js.map +1 -0
- package/packages/ai/src/lib/extractCriticalDataKeys.js +96 -0
- package/packages/ai/src/lib/extractCriticalDataKeys.js.map +1 -0
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js +62 -5
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarios.js +81 -90
- package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateEntityDataStructure.js +50 -1
- package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +1109 -85
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarios.js +193 -83
- package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlows.js +400 -0
- package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js +380 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +1646 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js +194 -0
- package/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.js.map +1 -0
- package/packages/ai/src/lib/getConditionalUsagesFromCode.js +84 -14
- package/packages/ai/src/lib/getConditionalUsagesFromCode.js.map +1 -1
- package/packages/ai/src/lib/guessScenarioDataFromDescription.js +2 -1
- package/packages/ai/src/lib/guessScenarioDataFromDescription.js.map +1 -1
- package/packages/ai/src/lib/isolateScopes.js +270 -7
- package/packages/ai/src/lib/isolateScopes.js.map +1 -1
- package/packages/ai/src/lib/mergeStatements.js +88 -46
- package/packages/ai/src/lib/mergeStatements.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +16 -4
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +21 -64
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js +54 -0
- package/packages/ai/src/lib/promptGenerators/generateChunkPrompt.js.map +1 -0
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js +68 -6
- package/packages/ai/src/lib/promptGenerators/generateEntityScenarioDataGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js +10 -34
- package/packages/ai/src/lib/promptGenerators/generateEntityScenariosGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js +45 -0
- package/packages/ai/src/lib/promptGenerators/generateMissingKeysPrompt.js.map +1 -0
- package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js +16 -3
- package/packages/ai/src/lib/promptGenerators/guessNewScenarioDataFromDescriptionGenerator.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js +335 -0
- package/packages/ai/src/lib/promptGenerators/simplifyKeysForLLM.js.map +1 -0
- package/packages/ai/src/lib/resolvePathToControllable.js +677 -0
- package/packages/ai/src/lib/resolvePathToControllable.js.map +1 -0
- package/packages/ai/src/lib/splitOutsideParentheses.js +3 -1
- package/packages/ai/src/lib/splitOutsideParentheses.js.map +1 -1
- package/packages/ai/src/lib/worker/SerializableDataStructure.js +29 -0
- package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js +98 -1
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js.map +1 -1
- package/packages/analyze/index.js +1 -0
- package/packages/analyze/index.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +75 -36
- package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +96 -26
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/analysisContext.js +30 -5
- package/packages/analyze/src/lib/analysisContext.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/index.js +1 -0
- package/packages/analyze/src/lib/asts/nodes/index.js.map +1 -1
- package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js +52 -0
- package/packages/analyze/src/lib/asts/nodes/isAsyncFunction.js.map +1 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +14 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js +14 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js +6 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js +6 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js +39 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js +2 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +268 -52
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +24 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +5 -0
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +2 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +2 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +31 -10
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeChange.js +21 -11
- package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeEntity.js +9 -8
- package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeInitial.js +9 -10
- package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeRemixRoute.js +3 -2
- package/packages/analyze/src/lib/files/analyzeRemixRoute.js.map +1 -1
- package/packages/analyze/src/lib/files/enums/steps.js +1 -1
- package/packages/analyze/src/lib/files/enums/steps.js.map +1 -1
- package/packages/analyze/src/lib/files/getImportedExports.js +11 -7
- package/packages/analyze/src/lib/files/getImportedExports.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +880 -0
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +255 -0
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js +85 -0
- package/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +483 -48
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.js +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js +29 -34
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +404 -85
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +144 -0
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +56 -69
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js +4 -8
- package/packages/analyze/src/lib/files/scenarios/generateScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +768 -117
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js +46 -9
- package/packages/analyze/src/lib/files/scenarios/mergeValidatedDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/setImportedExports.js +2 -1
- package/packages/analyze/src/lib/files/setImportedExports.js.map +1 -1
- package/packages/analyze/src/lib/index.js +1 -0
- package/packages/analyze/src/lib/index.js.map +1 -1
- package/packages/analyze/src/lib/utils/getFileByPath.js +12 -0
- package/packages/analyze/src/lib/utils/getFileByPath.js.map +1 -0
- package/packages/aws/src/lib/ecs/ecsDefineContainer.js +2 -2
- package/packages/aws/src/lib/ecs/ecsDefineContainer.js.map +1 -1
- package/packages/aws/src/lib/ecs/ecsTaskFactory.js +17 -61
- package/packages/aws/src/lib/ecs/ecsTaskFactory.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +10 -3
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/commitsTable.js +3 -0
- package/packages/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/debugReportsTable.js +9 -3
- package/packages/database/src/lib/kysely/tables/debugReportsTable.js.map +1 -1
- package/packages/database/src/lib/loadAnalyses.js +45 -2
- package/packages/database/src/lib/loadAnalyses.js.map +1 -1
- package/packages/database/src/lib/loadAnalysis.js +8 -0
- package/packages/database/src/lib/loadAnalysis.js.map +1 -1
- package/packages/database/src/lib/loadBranch.js +11 -1
- package/packages/database/src/lib/loadBranch.js.map +1 -1
- package/packages/database/src/lib/loadCommit.js +7 -0
- package/packages/database/src/lib/loadCommit.js.map +1 -1
- package/packages/database/src/lib/loadCommits.js +22 -1
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadEntities.js +23 -4
- package/packages/database/src/lib/loadEntities.js.map +1 -1
- package/packages/database/src/lib/loadEntityBranches.js +9 -0
- package/packages/database/src/lib/loadEntityBranches.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +7 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +5 -4
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/generate/index.js +3 -0
- package/packages/generate/index.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js +16 -1
- package/packages/generate/src/lib/componentScenarioPage/componentScenarioPageNext.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +189 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js +53 -0
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioServerComponent.js.map +1 -0
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +8 -4
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/packages/generate/src/lib/deepMerge.js +27 -1
- package/packages/generate/src/lib/deepMerge.js.map +1 -1
- package/packages/generate/src/lib/scenarioComponentForServer.js +89 -0
- package/packages/generate/src/lib/scenarioComponentForServer.js.map +1 -0
- package/packages/github/src/lib/loadOrCreateCommit.js +10 -0
- package/packages/github/src/lib/loadOrCreateCommit.js.map +1 -1
- package/packages/github/src/lib/syncPrimaryBranch.js +3 -0
- package/packages/github/src/lib/syncPrimaryBranch.js.map +1 -1
- package/packages/process/index.js +3 -0
- package/packages/process/index.js.map +1 -0
- package/packages/process/src/GlobalProcessManager.js.map +1 -0
- package/{background/src/lib/process → packages/process/src}/ProcessManager.js +1 -1
- package/packages/process/src/ProcessManager.js.map +1 -0
- package/packages/process/src/index.js.map +1 -0
- package/packages/process/src/managedExecAsync.js.map +1 -0
- package/packages/types/index.js.map +1 -1
- package/packages/utils/src/lib/lightweightEntityExtractor.js +25 -0
- package/packages/utils/src/lib/lightweightEntityExtractor.js.map +1 -1
- package/packages/utils/src/lib/safeFileName.js +29 -3
- package/packages/utils/src/lib/safeFileName.js.map +1 -1
- package/scripts/finalize-analyzer.cjs +6 -4
- package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +0 -102
- package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +0 -197
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +0 -271
- package/analyzer-template/packages/ai/src/lib/generateEntityKeyAttributes.ts +0 -294
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.ts +0 -67
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.ts +0 -115
- package/analyzer-template/process/INTEGRATION_COMPLETE.md +0 -333
- package/analyzer-template/process/INTEGRATION_EXAMPLE.md +0 -525
- package/analyzer-template/process/README.md +0 -507
- package/background/src/lib/process/GlobalProcessManager.js.map +0 -1
- package/background/src/lib/process/ProcessManager.js.map +0 -1
- package/background/src/lib/process/index.js.map +0 -1
- package/background/src/lib/process/managedExecAsync.js.map +0 -1
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js +0 -238
- package/codeyam-cli/scripts/fixtures/cal.com/universal-mocks/packages/prisma/index.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-CVbSvOjo.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeIcon-DcwcHyl5.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-WgwC1GfJ.js +0 -26
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-IEKom9O2.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/LogViewer-BYnfxbUG.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/ReportIssueModal-_lBPJCzG.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-lHVhvsu_.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-d_TBk4GQ.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/_index-kGT7VUqj.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-DDGmhu7P.js +0 -7
- package/codeyam-cli/src/webserver/build/client/assets/chevron-down-n_HPRfM_.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-WWGJGFF6-CbVoyx1U.js +0 -26
- package/codeyam-cli/src/webserver/build/client/assets/circle-check-D1VOYveA.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-YR8jjAlu.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-B8vP3V_s.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha._-CN6aLCT1.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DA5Jeu2P.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.edit._scenarioId-BTeitalf.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/entry.client-du6UEYD-.js +0 -13
- package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-BpjkhMoi.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-BQGvk4lJ.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-DVdYRT-I.js +0 -12
- package/codeyam-cli/src/webserver/build/client/assets/globals-CO-U8Bpo.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/html2canvas-pro.esm-XQCGvadH.js +0 -5
- package/codeyam-cli/src/webserver/build/client/assets/index-DCG-vks0.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/loader-circle-GazdNeLl.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-0b694d28.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-D3tQP7hx.js +0 -16
- package/codeyam-cli/src/webserver/build/client/assets/search-CIY6XmtE.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/server-build-CMKNK2uU.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-CoMDgElu.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-agkniXp2.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/triangle-alert-B2VUcygF.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-EvdK-zXP.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-DGVHQEXD.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CghkTkIL.js +0 -166
- package/codeyam-cli/templates/debug-command.md +0 -303
- package/packages/ai/src/lib/findMatchingAttribute.js +0 -77
- package/packages/ai/src/lib/findMatchingAttribute.js.map +0 -1
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +0 -136
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +0 -220
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/generateEntityKeyAttributes.js +0 -241
- package/packages/ai/src/lib/generateEntityKeyAttributes.js.map +0 -1
- package/packages/ai/src/lib/isFrontend.js +0 -5
- package/packages/ai/src/lib/isFrontend.js.map +0 -1
- package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js +0 -40
- package/packages/ai/src/lib/promptGenerators/generateEntityKeyAttributesGenerator.js.map +0 -1
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js +0 -72
- package/packages/analyze/src/lib/files/scenarios/generateKeyAttributes.js.map +0 -1
- /package/analyzer-template/{process → packages/process/src}/GlobalProcessManager.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/ProcessManager.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/index.ts +0 -0
- /package/analyzer-template/{process → packages/process/src}/managedExecAsync.ts +0 -0
- /package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-CMKNK2uU.css → styles-CMKNK2uU.css} +0 -0
- /package/{background/src/lib/process → packages/process/src}/GlobalProcessManager.js +0 -0
- /package/{background/src/lib/process → packages/process/src}/index.js +0 -0
- /package/{background/src/lib/process → packages/process/src}/managedExecAsync.js +0 -0
|
@@ -0,0 +1,976 @@
|
|
|
1
|
+
import { ScopeDataStructure, ScopeNode } from '../../ScopeDataStructure';
|
|
2
|
+
import {
|
|
3
|
+
AddEquivalenciesInfo,
|
|
4
|
+
EquivalencyManager,
|
|
5
|
+
} from '../EquivalencyManager';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Framework manager for MUI (Material UI) components.
|
|
9
|
+
*
|
|
10
|
+
* Handles patterns where MUI component callbacks receive data from array props:
|
|
11
|
+
*
|
|
12
|
+
* 1. DataGrid: `rows` array → `columns[].renderCell` callback receives `params.row`
|
|
13
|
+
* 2. Autocomplete: `options` array → `renderOption`/`getOptionLabel` callbacks receive option
|
|
14
|
+
*
|
|
15
|
+
* Example DataGrid:
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <DataGrid
|
|
18
|
+
* rows={data}
|
|
19
|
+
* columns={[{ renderCell: (params) => <Cell value={params.row.id} /> }]}
|
|
20
|
+
* />
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* Example Autocomplete:
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Autocomplete
|
|
26
|
+
* options={users}
|
|
27
|
+
* getOptionLabel={(option) => option.name}
|
|
28
|
+
* renderOption={(props, option) => <li {...props}>{option.email}</li>}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export class MuiManager implements EquivalencyManager {
|
|
33
|
+
postProcess(scopeNode: ScopeNode, scopeDataStructure: ScopeDataStructure) {
|
|
34
|
+
// Check this scope for DataGrid patterns when it's post-processed
|
|
35
|
+
this.processDataGridCallbacks(scopeNode, scopeDataStructure);
|
|
36
|
+
|
|
37
|
+
// Check for Autocomplete patterns
|
|
38
|
+
this.processAutocompleteCallbacks(scopeNode, scopeDataStructure);
|
|
39
|
+
|
|
40
|
+
// Also check if this scope is inside a DataGrid callback and propagate row property accesses
|
|
41
|
+
this.propagateFromChildScope(scopeNode, scopeDataStructure);
|
|
42
|
+
|
|
43
|
+
// NOTE: processGridApiContext, processCreateTheme, and processGridSelector
|
|
44
|
+
// are now called from finalize() instead of here.
|
|
45
|
+
// This is because external function calls are only added AFTER postProcess()
|
|
46
|
+
// runs (in trackFunctionCalls), so getExternalFunctionCallInfo() would return
|
|
47
|
+
// undefined during postProcess(). See Issue 23.
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Handle useGridApiContext() calls by adding the expected apiRef structure to the schema.
|
|
52
|
+
*
|
|
53
|
+
* useGridApiContext() returns an apiRef that has internal state used by useGridSelector.
|
|
54
|
+
* When useGridSelector(apiRef, selector) is called, it accesses apiRef.current.state
|
|
55
|
+
* to extract data like filterModel, sortModel, etc.
|
|
56
|
+
*
|
|
57
|
+
* We add the state structure directly to the external function call's schema
|
|
58
|
+
* to ensure mocks include the necessary paths.
|
|
59
|
+
*/
|
|
60
|
+
private processGridApiContext(
|
|
61
|
+
_scopeNode: ScopeNode,
|
|
62
|
+
scopeDataStructure: ScopeDataStructure,
|
|
63
|
+
) {
|
|
64
|
+
// Find the external function call for useGridApiContext
|
|
65
|
+
const gridApiContextCall =
|
|
66
|
+
scopeDataStructure.getExternalFunctionCallInfo('useGridApiContext');
|
|
67
|
+
|
|
68
|
+
if (!gridApiContextCall) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Add the state structure that useGridSelector needs to the external function call's schema
|
|
73
|
+
// useGridSelector reads from apiRef.current.state internally
|
|
74
|
+
// gridFilterModelSelector reads state.filter.filterModel
|
|
75
|
+
const basePath = 'useGridApiContext().functionCallReturnValue.current';
|
|
76
|
+
const statePaths: Record<string, string> = {
|
|
77
|
+
[`${basePath}.state`]: 'object',
|
|
78
|
+
[`${basePath}.state.filter`]: 'object',
|
|
79
|
+
[`${basePath}.state.filter.filterModel`]: 'object',
|
|
80
|
+
[`${basePath}.state.filter.filterModel.items`]: 'array',
|
|
81
|
+
// Also add common state paths that might be needed by other selectors
|
|
82
|
+
[`${basePath}.state.sorting`]: 'object',
|
|
83
|
+
[`${basePath}.state.sorting.sortModel`]: 'array',
|
|
84
|
+
[`${basePath}.state.pagination`]: 'object',
|
|
85
|
+
[`${basePath}.state.pagination.paginationModel`]: 'object',
|
|
86
|
+
[`${basePath}.state.pagination.paginationModel.page`]: 'number',
|
|
87
|
+
[`${basePath}.state.pagination.paginationModel.pageSize`]: 'number',
|
|
88
|
+
[`${basePath}.state.rows`]: 'object',
|
|
89
|
+
[`${basePath}.state.rows.dataRowIds`]: 'array',
|
|
90
|
+
[`${basePath}.state.columns`]: 'object',
|
|
91
|
+
[`${basePath}.state.columns.all`]: 'array',
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// Add each path to the external function call's schema if it doesn't exist
|
|
95
|
+
for (const [path, type] of Object.entries(statePaths)) {
|
|
96
|
+
if (!gridApiContextCall.schema[path]) {
|
|
97
|
+
gridApiContextCall.schema[path] = type;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Handle createTheme() calls by adding required MUI theme properties to the schema.
|
|
104
|
+
*
|
|
105
|
+
* MUI's ThemeProvider and related components check for specific properties:
|
|
106
|
+
* - `'$$material' in theme` - validates it's a MUI theme object
|
|
107
|
+
* - `'colorSchemes' in theme` - checks for color scheme support (MUI v6+)
|
|
108
|
+
*
|
|
109
|
+
* Without these properties, ThemeProvider throws:
|
|
110
|
+
* "TypeError: Cannot use 'in' operator to search for '$$material' in object"
|
|
111
|
+
* "TypeError: Cannot use 'in' operator to search for 'colorSchemes' in true"
|
|
112
|
+
*
|
|
113
|
+
* We add these properties to the createTheme return value schema
|
|
114
|
+
* to ensure mocks include the necessary properties.
|
|
115
|
+
*/
|
|
116
|
+
private processCreateTheme(
|
|
117
|
+
_scopeNode: ScopeNode,
|
|
118
|
+
scopeDataStructure: ScopeDataStructure,
|
|
119
|
+
) {
|
|
120
|
+
// Find the external function call for createTheme
|
|
121
|
+
const createThemeCall =
|
|
122
|
+
scopeDataStructure.getExternalFunctionCallInfo('createTheme');
|
|
123
|
+
|
|
124
|
+
if (!createThemeCall) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Use the actual call signature to construct the path
|
|
129
|
+
// createTheme can be called with various arguments:
|
|
130
|
+
// - createTheme()
|
|
131
|
+
// - createTheme(options)
|
|
132
|
+
// - createTheme(getTheme(false), { components: {} })
|
|
133
|
+
const callSignature = createThemeCall.callSignature;
|
|
134
|
+
const basePath = `${callSignature}.functionCallReturnValue`;
|
|
135
|
+
|
|
136
|
+
// Add required MUI theme properties
|
|
137
|
+
const themeProperties: Record<string, string> = {
|
|
138
|
+
[`${basePath}.$$material`]: 'boolean',
|
|
139
|
+
[`${basePath}.colorSchemes`]: 'object',
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
for (const [path, type] of Object.entries(themeProperties)) {
|
|
143
|
+
if (!createThemeCall.schema[path]) {
|
|
144
|
+
createThemeCall.schema[path] = type;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Handle useGridSelector(apiRef, selector) calls by adding return value schema.
|
|
151
|
+
*
|
|
152
|
+
* useGridSelector is a MUI X Data Grid hook that extracts data from the grid's
|
|
153
|
+
* internal state using a selector function. It's unique because:
|
|
154
|
+
* 1. It takes arguments (apiRef and selector), so it's not automatically mocked
|
|
155
|
+
* 2. But its return value depends on which selector is used
|
|
156
|
+
* 3. The selector reads from apiRef.current.state
|
|
157
|
+
*
|
|
158
|
+
* Common selectors and their return types:
|
|
159
|
+
* - gridFilterModelSelector -> { items: GridFilterItem[] }
|
|
160
|
+
* - gridSortModelSelector -> GridSortItem[]
|
|
161
|
+
* - gridPaginationModelSelector -> { page: number, pageSize: number }
|
|
162
|
+
* - gridRowCountSelector -> number
|
|
163
|
+
*
|
|
164
|
+
* We detect which selector is used from the call signature and add the
|
|
165
|
+
* appropriate return value schema.
|
|
166
|
+
*/
|
|
167
|
+
private processGridSelector(
|
|
168
|
+
_scopeNode: ScopeNode,
|
|
169
|
+
scopeDataStructure: ScopeDataStructure,
|
|
170
|
+
) {
|
|
171
|
+
// Find external function calls for useGridSelector
|
|
172
|
+
const gridSelectorCall =
|
|
173
|
+
scopeDataStructure.getExternalFunctionCallInfo('useGridSelector');
|
|
174
|
+
|
|
175
|
+
if (!gridSelectorCall) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const callSignature = gridSelectorCall.callSignature;
|
|
180
|
+
const basePath = `${callSignature}.functionCallReturnValue`;
|
|
181
|
+
|
|
182
|
+
// Determine which selector is being used and add appropriate schema
|
|
183
|
+
if (callSignature.includes('gridFilterModelSelector')) {
|
|
184
|
+
// gridFilterModelSelector returns { items: GridFilterItem[] }
|
|
185
|
+
const filterPaths: Record<string, string> = {
|
|
186
|
+
[basePath]: 'object',
|
|
187
|
+
[`${basePath}.items`]: 'array',
|
|
188
|
+
[`${basePath}.items[]`]: 'object',
|
|
189
|
+
[`${basePath}.items[].field`]: 'string',
|
|
190
|
+
[`${basePath}.items[].operator`]: 'string',
|
|
191
|
+
[`${basePath}.items[].value`]: 'array',
|
|
192
|
+
[`${basePath}.items[].value[]`]: 'string',
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
for (const [path, type] of Object.entries(filterPaths)) {
|
|
196
|
+
if (!gridSelectorCall.schema[path]) {
|
|
197
|
+
gridSelectorCall.schema[path] = type;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
} else if (callSignature.includes('gridSortModelSelector')) {
|
|
201
|
+
// gridSortModelSelector returns GridSortItem[]
|
|
202
|
+
const sortPaths: Record<string, string> = {
|
|
203
|
+
[basePath]: 'array',
|
|
204
|
+
[`${basePath}[]`]: 'object',
|
|
205
|
+
[`${basePath}[].field`]: 'string',
|
|
206
|
+
[`${basePath}[].sort`]: 'string',
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
for (const [path, type] of Object.entries(sortPaths)) {
|
|
210
|
+
if (!gridSelectorCall.schema[path]) {
|
|
211
|
+
gridSelectorCall.schema[path] = type;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
} else if (callSignature.includes('gridPaginationModelSelector')) {
|
|
215
|
+
// gridPaginationModelSelector returns { page: number, pageSize: number }
|
|
216
|
+
const paginationPaths: Record<string, string> = {
|
|
217
|
+
[basePath]: 'object',
|
|
218
|
+
[`${basePath}.page`]: 'number',
|
|
219
|
+
[`${basePath}.pageSize`]: 'number',
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
for (const [path, type] of Object.entries(paginationPaths)) {
|
|
223
|
+
if (!gridSelectorCall.schema[path]) {
|
|
224
|
+
gridSelectorCall.schema[path] = type;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
} else if (callSignature.includes('gridRowCountSelector')) {
|
|
228
|
+
// gridRowCountSelector returns number
|
|
229
|
+
if (!gridSelectorCall.schema[basePath]) {
|
|
230
|
+
gridSelectorCall.schema[basePath] = 'number';
|
|
231
|
+
}
|
|
232
|
+
} else {
|
|
233
|
+
// Unknown selector - add generic object return type
|
|
234
|
+
// This ensures the hook is at least mocked with some structure
|
|
235
|
+
if (!gridSelectorCall.schema[basePath]) {
|
|
236
|
+
gridSelectorCall.schema[basePath] = 'object';
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
private processDataGridCallbacks(
|
|
242
|
+
scopeNode: ScopeNode,
|
|
243
|
+
scopeDataStructure: ScopeDataStructure,
|
|
244
|
+
) {
|
|
245
|
+
// Find DataGrid calls and link renderCell callbacks to rows
|
|
246
|
+
for (const [path, equivalencies] of Object.entries(
|
|
247
|
+
scopeNode.equivalencies,
|
|
248
|
+
)) {
|
|
249
|
+
// Case 1: Look for DataGrid().signature[0].columns equivalency pointing to a columns variable
|
|
250
|
+
const dataGridMatch = path.match(
|
|
251
|
+
/^(DataGrid(?:Pro|Premium)?\(\))\.signature\[0\]\.columns$/,
|
|
252
|
+
);
|
|
253
|
+
if (dataGridMatch) {
|
|
254
|
+
const dataGridCall = dataGridMatch[1];
|
|
255
|
+
|
|
256
|
+
// Find what columns is equivalent to (e.g., "columns" variable)
|
|
257
|
+
for (const equiv of equivalencies) {
|
|
258
|
+
const columnsVar = equiv.schemaPath;
|
|
259
|
+
|
|
260
|
+
// Find renderCell callbacks, following equivalency chains if needed
|
|
261
|
+
const callbackScopes = this.findRenderCellCallbacks(
|
|
262
|
+
columnsVar,
|
|
263
|
+
scopeNode,
|
|
264
|
+
new Set(),
|
|
265
|
+
scopeDataStructure,
|
|
266
|
+
);
|
|
267
|
+
|
|
268
|
+
for (const callbackScopeName of callbackScopes) {
|
|
269
|
+
this.addRowEquivalencyToCallback(
|
|
270
|
+
callbackScopeName,
|
|
271
|
+
dataGridCall,
|
|
272
|
+
scopeNode,
|
|
273
|
+
scopeDataStructure,
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// Case 2: Look for inline array props where DataGrid().signature[0].columns[N].renderCell
|
|
281
|
+
// directly points to a callback scope (e.g., DataGrid().signature[0].columns[0].renderCell → cyScope1())
|
|
282
|
+
// Also handles columns[].renderCell for normalized paths
|
|
283
|
+
const inlineRenderCellMatch = path.match(
|
|
284
|
+
/^(DataGrid(?:Pro|Premium)?\(\))\.signature\[0\]\.columns\[(?:\d+|)\]\.renderCell$/,
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
if (inlineRenderCellMatch) {
|
|
288
|
+
const dataGridCall = inlineRenderCellMatch[1];
|
|
289
|
+
|
|
290
|
+
for (const equiv of equivalencies) {
|
|
291
|
+
// Check if the equivalency points to a callback scope (cyScope*)
|
|
292
|
+
// Could be cyScope1() or cyScope1().functionCallReturnValue
|
|
293
|
+
const callbackMatch = equiv.schemaPath.match(
|
|
294
|
+
/^(cyScope[0-9A-Fa-f]+)\(\)(?:\.functionCallReturnValue)?$/,
|
|
295
|
+
);
|
|
296
|
+
if (callbackMatch) {
|
|
297
|
+
// Try both naming conventions:
|
|
298
|
+
// 1. Just the cyScope name (e.g., "cyScope1")
|
|
299
|
+
// 2. Parent____cyScope name (e.g., "CustomersPage____cyScope1")
|
|
300
|
+
const callbackScopeName = callbackMatch[1];
|
|
301
|
+
const prefixedCallbackScopeName = `${scopeNode.name}____${callbackMatch[1]}`;
|
|
302
|
+
// Try unprefixed name first, then prefixed
|
|
303
|
+
this.addRowEquivalencyToCallback(
|
|
304
|
+
callbackScopeName,
|
|
305
|
+
dataGridCall,
|
|
306
|
+
scopeNode,
|
|
307
|
+
scopeDataStructure,
|
|
308
|
+
);
|
|
309
|
+
// Also try prefixed version in case it exists
|
|
310
|
+
this.addRowEquivalencyToCallback(
|
|
311
|
+
prefixedCallbackScopeName,
|
|
312
|
+
dataGridCall,
|
|
313
|
+
scopeNode,
|
|
314
|
+
scopeDataStructure,
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Helper to add the signature[0].row → DataGrid().signature[0].rows[] equivalency
|
|
324
|
+
*/
|
|
325
|
+
private addRowEquivalencyToCallback(
|
|
326
|
+
callbackScopeName: string,
|
|
327
|
+
dataGridCall: string,
|
|
328
|
+
scopeNode: ScopeNode,
|
|
329
|
+
scopeDataStructure: ScopeDataStructure,
|
|
330
|
+
) {
|
|
331
|
+
const callbackScopeNode =
|
|
332
|
+
scopeDataStructure.getScopeOrFunctionCallInfo(callbackScopeName);
|
|
333
|
+
if (!callbackScopeNode) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Add equivalency: signature[0].row ≡ DataGrid().signature[0].rows[]
|
|
338
|
+
const callbackParamRowPath = 'signature[0].row';
|
|
339
|
+
const rowsArrayElementPath = `${dataGridCall}.signature[0].rows[]`;
|
|
340
|
+
|
|
341
|
+
scopeDataStructure.addEquivalency(
|
|
342
|
+
callbackParamRowPath,
|
|
343
|
+
rowsArrayElementPath,
|
|
344
|
+
scopeNode.name,
|
|
345
|
+
callbackScopeNode as ScopeNode,
|
|
346
|
+
'MUI DataGrid renderCell params.row equivalency',
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Process Autocomplete callbacks to link option parameters to options array.
|
|
352
|
+
*
|
|
353
|
+
* Autocomplete has two callback props that receive individual options:
|
|
354
|
+
* - getOptionLabel(option) - param 0 is the option
|
|
355
|
+
* - renderOption(props, option, state) - param 1 is the option
|
|
356
|
+
*/
|
|
357
|
+
private processAutocompleteCallbacks(
|
|
358
|
+
scopeNode: ScopeNode,
|
|
359
|
+
scopeDataStructure: ScopeDataStructure,
|
|
360
|
+
) {
|
|
361
|
+
for (const [path, equivalencies] of Object.entries(
|
|
362
|
+
scopeNode.equivalencies,
|
|
363
|
+
)) {
|
|
364
|
+
// Look for Autocomplete().signature[0].options equivalency
|
|
365
|
+
const autocompleteMatch = path.match(
|
|
366
|
+
/^(Autocomplete\(\))\.signature\[0\]\.options$/,
|
|
367
|
+
);
|
|
368
|
+
if (!autocompleteMatch) continue;
|
|
369
|
+
|
|
370
|
+
const autocompleteCall = autocompleteMatch[1];
|
|
371
|
+
|
|
372
|
+
// Find callback props: getOptionLabel, renderOption
|
|
373
|
+
for (const callbackProp of ['getOptionLabel', 'renderOption']) {
|
|
374
|
+
const callbackPath = `${autocompleteCall}.signature[0].${callbackProp}`;
|
|
375
|
+
const callbackEquivs = scopeNode.equivalencies[callbackPath];
|
|
376
|
+
|
|
377
|
+
if (callbackEquivs) {
|
|
378
|
+
for (const callbackEquiv of callbackEquivs) {
|
|
379
|
+
const callbackMatch = callbackEquiv.schemaPath.match(
|
|
380
|
+
/^(cyScope[0-9A-Fa-f]+)\(\)\.functionCallReturnValue$/,
|
|
381
|
+
);
|
|
382
|
+
if (!callbackMatch) continue;
|
|
383
|
+
|
|
384
|
+
const callbackScopeName = callbackMatch[1];
|
|
385
|
+
const callbackScopeNode =
|
|
386
|
+
scopeDataStructure.getScopeOrFunctionCallInfo(callbackScopeName);
|
|
387
|
+
if (!callbackScopeNode) continue;
|
|
388
|
+
|
|
389
|
+
// Determine which parameter index receives the option
|
|
390
|
+
// getOptionLabel: (option) => ... → param 0
|
|
391
|
+
// renderOption: (props, option, state) => ... → param 1
|
|
392
|
+
const paramIndex = callbackProp === 'renderOption' ? 1 : 0;
|
|
393
|
+
|
|
394
|
+
const callbackParamPath = `signature[${paramIndex}]`;
|
|
395
|
+
const optionsArrayElementPath = `${autocompleteCall}.signature[0].options[]`;
|
|
396
|
+
|
|
397
|
+
scopeDataStructure.addEquivalency(
|
|
398
|
+
callbackParamPath,
|
|
399
|
+
optionsArrayElementPath,
|
|
400
|
+
scopeNode.name,
|
|
401
|
+
callbackScopeNode as ScopeNode,
|
|
402
|
+
`MUI Autocomplete ${callbackProp} option equivalency`,
|
|
403
|
+
);
|
|
404
|
+
// Note: Property accesses are propagated in finalize() after all scopes are established
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Propagate property accesses from Autocomplete callback scope.
|
|
413
|
+
* When we find usages like `option.email`, create equivalencies to `options[].email`
|
|
414
|
+
* and trace back to the original data source (e.g., `users[].email`).
|
|
415
|
+
*/
|
|
416
|
+
private propagateAutocompletePropertyAccesses(
|
|
417
|
+
callbackScope: ScopeNode,
|
|
418
|
+
autocompleteCall: string,
|
|
419
|
+
optionParamIndex: number,
|
|
420
|
+
parentScopeName: string,
|
|
421
|
+
scopeDataStructure: ScopeDataStructure,
|
|
422
|
+
) {
|
|
423
|
+
const parentScope = scopeDataStructure.getScopeOrFunctionCallInfo(
|
|
424
|
+
parentScopeName,
|
|
425
|
+
) as ScopeNode;
|
|
426
|
+
if (!parentScope) return;
|
|
427
|
+
|
|
428
|
+
// Find what options is equivalent to (e.g., "users")
|
|
429
|
+
const optionsPath = `${autocompleteCall}.signature[0].options`;
|
|
430
|
+
const optionsEquivs = parentScope.equivalencies?.[optionsPath];
|
|
431
|
+
const dataSourcePath = optionsEquivs?.[0]?.schemaPath;
|
|
432
|
+
|
|
433
|
+
// Check for property accesses on the option parameter in the schema
|
|
434
|
+
// The schema contains entries like "signature[1].email" for property accesses
|
|
435
|
+
for (const schemaPath of Object.keys(callbackScope.schema || {})) {
|
|
436
|
+
// Match patterns like signature[0].name, signature[1].email (depending on param index)
|
|
437
|
+
const optionPropertyMatch = schemaPath.match(
|
|
438
|
+
new RegExp(`^signature\\[${optionParamIndex}\\]\\.(\\w+)$`),
|
|
439
|
+
);
|
|
440
|
+
|
|
441
|
+
if (optionPropertyMatch) {
|
|
442
|
+
const propertyName = optionPropertyMatch[1];
|
|
443
|
+
|
|
444
|
+
// Create equivalency: schemaPath → options[].propertyName
|
|
445
|
+
const optionsPropertyPath = `${autocompleteCall}.signature[0].options[].${propertyName}`;
|
|
446
|
+
|
|
447
|
+
scopeDataStructure.addEquivalency(
|
|
448
|
+
schemaPath,
|
|
449
|
+
optionsPropertyPath,
|
|
450
|
+
parentScopeName,
|
|
451
|
+
callbackScope,
|
|
452
|
+
'MUI Autocomplete option property equivalency',
|
|
453
|
+
);
|
|
454
|
+
|
|
455
|
+
// Also create equivalency to the data source (e.g., users[].email)
|
|
456
|
+
if (dataSourcePath) {
|
|
457
|
+
const dataPropertyPath = `${dataSourcePath}[].${propertyName}`;
|
|
458
|
+
|
|
459
|
+
// Add to parent scope's schema
|
|
460
|
+
if (!parentScope.schema[dataPropertyPath]) {
|
|
461
|
+
parentScope.schema[dataPropertyPath] = 'unknown';
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// Create bidirectional equivalencies to ensure propagation
|
|
465
|
+
scopeDataStructure.addEquivalency(
|
|
466
|
+
schemaPath,
|
|
467
|
+
dataPropertyPath,
|
|
468
|
+
parentScopeName,
|
|
469
|
+
callbackScope,
|
|
470
|
+
'MUI Autocomplete option property equivalency',
|
|
471
|
+
);
|
|
472
|
+
|
|
473
|
+
scopeDataStructure.addEquivalency(
|
|
474
|
+
dataPropertyPath,
|
|
475
|
+
schemaPath,
|
|
476
|
+
parentScopeName,
|
|
477
|
+
parentScope,
|
|
478
|
+
'MUI Autocomplete option property equivalency',
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Find renderCell callbacks for a columns variable, following equivalency chains.
|
|
487
|
+
* For example: tableColumns → allColumns → allColumns[].renderCell → cyScope
|
|
488
|
+
*
|
|
489
|
+
* Also handles useMemo patterns where:
|
|
490
|
+
* - tableColumns → useMemo(cyScope(), [allColumns]).functionCallReturnValue
|
|
491
|
+
* - And allColumns[].renderCell → cyScope()
|
|
492
|
+
*/
|
|
493
|
+
private findRenderCellCallbacks(
|
|
494
|
+
columnsVar: string,
|
|
495
|
+
scopeNode: ScopeNode,
|
|
496
|
+
visited: Set<string>,
|
|
497
|
+
scopeDataStructure?: ScopeDataStructure,
|
|
498
|
+
): string[] {
|
|
499
|
+
if (visited.has(columnsVar)) return [];
|
|
500
|
+
visited.add(columnsVar);
|
|
501
|
+
|
|
502
|
+
const callbackScopes: string[] = [];
|
|
503
|
+
|
|
504
|
+
// Try direct path: columnsVar[].renderCell - check both current scope and parent scopes
|
|
505
|
+
// Also check for indexed paths like columnsVar[3].renderCell (with specific indices)
|
|
506
|
+
const renderCellPath = `${columnsVar}[].renderCell`;
|
|
507
|
+
let renderCellEquivs = scopeNode.equivalencies[renderCellPath];
|
|
508
|
+
|
|
509
|
+
// If not found in current scope, check parent scopes (via scopeNode.tree)
|
|
510
|
+
if (!renderCellEquivs && scopeDataStructure && scopeNode.tree) {
|
|
511
|
+
for (const parentScopeName of scopeNode.tree) {
|
|
512
|
+
const parentScope = scopeDataStructure.getScopeOrFunctionCallInfo(
|
|
513
|
+
parentScopeName,
|
|
514
|
+
) as ScopeNode;
|
|
515
|
+
if (parentScope?.equivalencies?.[renderCellPath]) {
|
|
516
|
+
renderCellEquivs = parentScope.equivalencies[renderCellPath];
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// Also look for indexed paths like tableColumns[3].renderCell, tableColumns[5].renderCell, etc.
|
|
523
|
+
// This is needed because column definitions often have specific indices
|
|
524
|
+
const indexedRenderCellPattern = new RegExp(
|
|
525
|
+
`^${columnsVar.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\[\\d+\\]\\.renderCell$`,
|
|
526
|
+
);
|
|
527
|
+
const allScopesToCheck = [scopeNode];
|
|
528
|
+
if (scopeDataStructure && scopeNode.tree) {
|
|
529
|
+
for (const parentScopeName of scopeNode.tree) {
|
|
530
|
+
const parentScope = scopeDataStructure.getScopeOrFunctionCallInfo(
|
|
531
|
+
parentScopeName,
|
|
532
|
+
) as ScopeNode;
|
|
533
|
+
if (parentScope) allScopesToCheck.push(parentScope);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
for (const scope of allScopesToCheck) {
|
|
538
|
+
for (const [path, equivs] of Object.entries(scope.equivalencies || {})) {
|
|
539
|
+
if (indexedRenderCellPattern.test(path)) {
|
|
540
|
+
for (const equiv of equivs) {
|
|
541
|
+
const callbackMatch = equiv.schemaPath.match(
|
|
542
|
+
/^(cyScope\d+)\(\)\.functionCallReturnValue$/,
|
|
543
|
+
);
|
|
544
|
+
if (callbackMatch && !callbackScopes.includes(callbackMatch[1])) {
|
|
545
|
+
callbackScopes.push(callbackMatch[1]);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (renderCellEquivs) {
|
|
553
|
+
for (const renderCellEquiv of renderCellEquivs) {
|
|
554
|
+
// Check if it points to a callback (cyScope().functionCallReturnValue)
|
|
555
|
+
const callbackMatch = renderCellEquiv.schemaPath.match(
|
|
556
|
+
/^(cyScope\d+)\(\)\.functionCallReturnValue$/,
|
|
557
|
+
);
|
|
558
|
+
if (callbackMatch && !callbackScopes.includes(callbackMatch[1])) {
|
|
559
|
+
callbackScopes.push(callbackMatch[1]);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// If no direct callbacks found, follow equivalency chains
|
|
565
|
+
if (callbackScopes.length === 0) {
|
|
566
|
+
// Look for what columnsVar is equivalent to - check current scope and parent scopes
|
|
567
|
+
let varEquivs = scopeNode.equivalencies[columnsVar];
|
|
568
|
+
let equivScopeNode = scopeNode;
|
|
569
|
+
|
|
570
|
+
// If not found or only self-reference, check parent scopes (via scopeNode.tree)
|
|
571
|
+
if (
|
|
572
|
+
(!varEquivs ||
|
|
573
|
+
(varEquivs.length === 1 && varEquivs[0].schemaPath === columnsVar)) &&
|
|
574
|
+
scopeDataStructure &&
|
|
575
|
+
scopeNode.tree
|
|
576
|
+
) {
|
|
577
|
+
for (const parentScopeName of scopeNode.tree) {
|
|
578
|
+
const parentScope = scopeDataStructure.getScopeOrFunctionCallInfo(
|
|
579
|
+
parentScopeName,
|
|
580
|
+
) as ScopeNode;
|
|
581
|
+
if (parentScope?.equivalencies?.[columnsVar]) {
|
|
582
|
+
const parentEquivs = parentScope.equivalencies[columnsVar];
|
|
583
|
+
// Check if it has non-self-reference equivalencies
|
|
584
|
+
if (
|
|
585
|
+
parentEquivs.some((e) => e.schemaPath !== columnsVar) ||
|
|
586
|
+
parentEquivs.some((e) => e.schemaPath.includes('useMemo'))
|
|
587
|
+
) {
|
|
588
|
+
varEquivs = parentEquivs;
|
|
589
|
+
equivScopeNode = parentScope;
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
if (varEquivs) {
|
|
597
|
+
for (const varEquiv of varEquivs) {
|
|
598
|
+
const schemaPath = varEquiv.schemaPath;
|
|
599
|
+
|
|
600
|
+
// Handle useMemo pattern: useMemo(cyScope(), [allColumns]).functionCallReturnValue
|
|
601
|
+
// The second argument [allColumns] tells us what's being passed to useMemo
|
|
602
|
+
const useMemoMatch = schemaPath.match(
|
|
603
|
+
/^useMemo\(cyScope\d+\(\), \[([^\]]+)\]\)\.functionCallReturnValue$/,
|
|
604
|
+
);
|
|
605
|
+
if (useMemoMatch) {
|
|
606
|
+
// The array in the dependency list often contains the actual columns variable
|
|
607
|
+
const depsList = useMemoMatch[1];
|
|
608
|
+
// Parse the deps - could be comma-separated
|
|
609
|
+
const deps = depsList.split(',').map((d) => d.trim());
|
|
610
|
+
for (const dep of deps) {
|
|
611
|
+
const nestedCallbacks = this.findRenderCellCallbacks(
|
|
612
|
+
dep,
|
|
613
|
+
equivScopeNode,
|
|
614
|
+
visited,
|
|
615
|
+
scopeDataStructure,
|
|
616
|
+
);
|
|
617
|
+
callbackScopes.push(...nestedCallbacks);
|
|
618
|
+
}
|
|
619
|
+
continue;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
// Skip other function calls and internal paths
|
|
623
|
+
if (schemaPath.includes('()') || schemaPath.includes('[')) {
|
|
624
|
+
continue;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
// Skip self-references
|
|
628
|
+
if (schemaPath === columnsVar) {
|
|
629
|
+
continue;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
// Recursively search in the equivalent variable
|
|
633
|
+
const nestedCallbacks = this.findRenderCellCallbacks(
|
|
634
|
+
schemaPath,
|
|
635
|
+
equivScopeNode,
|
|
636
|
+
visited,
|
|
637
|
+
scopeDataStructure,
|
|
638
|
+
);
|
|
639
|
+
callbackScopes.push(...nestedCallbacks);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
return callbackScopes;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Propagate row property accesses from callback scope and its children.
|
|
649
|
+
* When we find usages like `params.row.id`, create equivalencies to `rows[].id`.
|
|
650
|
+
*/
|
|
651
|
+
private propagateRowPropertyAccesses(
|
|
652
|
+
callbackScope: ScopeNode,
|
|
653
|
+
dataGridCall: string,
|
|
654
|
+
parentScopeName: string,
|
|
655
|
+
scopeDataStructure: ScopeDataStructure,
|
|
656
|
+
) {
|
|
657
|
+
// Check all scopes (callback and its children) for params.row.* accesses
|
|
658
|
+
const scopesToCheck = [callbackScope];
|
|
659
|
+
|
|
660
|
+
// Find child scopes by looking for scopes whose tree includes the callback scope
|
|
661
|
+
const callbackScopeName = callbackScope.name;
|
|
662
|
+
for (const [scopeName, scope] of Object.entries(
|
|
663
|
+
scopeDataStructure.scopeNodes,
|
|
664
|
+
)) {
|
|
665
|
+
if (
|
|
666
|
+
scope.tree &&
|
|
667
|
+
scope.tree.includes(callbackScopeName) &&
|
|
668
|
+
scopeName !== callbackScopeName
|
|
669
|
+
) {
|
|
670
|
+
scopesToCheck.push(scope);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
for (const scope of scopesToCheck) {
|
|
675
|
+
// Find equivalencies that reference params.row.* or signature[0].row.*
|
|
676
|
+
for (const [path, equivs] of Object.entries(scope.equivalencies)) {
|
|
677
|
+
for (const equiv of equivs) {
|
|
678
|
+
const schemaPath = equiv.schemaPath;
|
|
679
|
+
|
|
680
|
+
// Match patterns like params.row.id, params.row.flagged, signature[0].row.status
|
|
681
|
+
const rowPropertyMatch = schemaPath.match(
|
|
682
|
+
/^(?:params|signature\[0\])\.row\.(\w+)$/,
|
|
683
|
+
);
|
|
684
|
+
|
|
685
|
+
if (rowPropertyMatch) {
|
|
686
|
+
const propertyName = rowPropertyMatch[1];
|
|
687
|
+
|
|
688
|
+
// Create equivalency: the path accessing params.row.X → rows[].X
|
|
689
|
+
// e.g., updateStatus().signature[0].id → DataGrid().signature[0].rows[].id
|
|
690
|
+
const rowsPropertyPath = `${dataGridCall}.signature[0].rows[].${propertyName}`;
|
|
691
|
+
|
|
692
|
+
scopeDataStructure.addEquivalency(
|
|
693
|
+
path,
|
|
694
|
+
rowsPropertyPath,
|
|
695
|
+
parentScopeName,
|
|
696
|
+
scope,
|
|
697
|
+
'MUI DataGrid renderCell params.row equivalency',
|
|
698
|
+
);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Process from child scope perspective: look for params.row.* accesses
|
|
707
|
+
* and trace back to find DataGrid rows equivalency in parent scopes.
|
|
708
|
+
*/
|
|
709
|
+
private propagateFromChildScope(
|
|
710
|
+
scopeNode: ScopeNode,
|
|
711
|
+
scopeDataStructure: ScopeDataStructure,
|
|
712
|
+
) {
|
|
713
|
+
// Look for equivalencies in this scope that reference params.row.*
|
|
714
|
+
for (const [path, equivs] of Object.entries(scopeNode.equivalencies)) {
|
|
715
|
+
for (const equiv of equivs) {
|
|
716
|
+
const schemaPath = equiv.schemaPath;
|
|
717
|
+
|
|
718
|
+
// Match patterns like params.row.id, params.row.status
|
|
719
|
+
const rowPropertyMatch = schemaPath.match(/^params\.row\.(\w+)$/);
|
|
720
|
+
|
|
721
|
+
if (rowPropertyMatch) {
|
|
722
|
+
const propertyName = rowPropertyMatch[1];
|
|
723
|
+
|
|
724
|
+
// Look in parent scopes for DataGrid rows equivalency
|
|
725
|
+
// The pattern we're looking for is: signature[0].row → DataGrid().signature[0].rows[]
|
|
726
|
+
const dataGridCall = this.findDataGridInParentScopes(
|
|
727
|
+
scopeNode,
|
|
728
|
+
scopeDataStructure,
|
|
729
|
+
);
|
|
730
|
+
|
|
731
|
+
if (dataGridCall) {
|
|
732
|
+
// Find the parent scope that has the DataGrid
|
|
733
|
+
const parentScopeName = this.findDataGridScopeName(
|
|
734
|
+
scopeNode,
|
|
735
|
+
scopeDataStructure,
|
|
736
|
+
);
|
|
737
|
+
const parentScope = parentScopeName
|
|
738
|
+
? (scopeDataStructure.getScopeOrFunctionCallInfo(
|
|
739
|
+
parentScopeName,
|
|
740
|
+
) as ScopeNode)
|
|
741
|
+
: undefined;
|
|
742
|
+
|
|
743
|
+
// Find what DataGrid().signature[0].rows is equivalent to (e.g., "data.quotes")
|
|
744
|
+
const rowsPath = `${dataGridCall}.signature[0].rows`;
|
|
745
|
+
const rowsEquivs = parentScope?.equivalencies?.[rowsPath];
|
|
746
|
+
const dataSourcePath = rowsEquivs?.[0]?.schemaPath;
|
|
747
|
+
|
|
748
|
+
if (dataSourcePath && parentScope) {
|
|
749
|
+
// Create equivalency: path → dataSource[].propertyName (e.g., data.quotes[].id)
|
|
750
|
+
const dataPropertyPath = `${dataSourcePath}[].${propertyName}`;
|
|
751
|
+
|
|
752
|
+
// Add equivalency in child scope
|
|
753
|
+
scopeDataStructure.addEquivalency(
|
|
754
|
+
path,
|
|
755
|
+
dataPropertyPath,
|
|
756
|
+
parentScopeName || scopeNode.name,
|
|
757
|
+
scopeNode,
|
|
758
|
+
'MUI DataGrid renderCell params.row equivalency',
|
|
759
|
+
);
|
|
760
|
+
|
|
761
|
+
// Also add the property access to the parent scope's schema
|
|
762
|
+
// This ensures that data.quotes[].id shows up as an accessed property
|
|
763
|
+
if (!parentScope.schema[dataPropertyPath]) {
|
|
764
|
+
parentScope.schema[dataPropertyPath] = 'unknown';
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
// And create an equivalency FROM the data path so it propagates to returnValue
|
|
768
|
+
scopeDataStructure.addEquivalency(
|
|
769
|
+
dataPropertyPath,
|
|
770
|
+
path,
|
|
771
|
+
parentScopeName!,
|
|
772
|
+
parentScope,
|
|
773
|
+
'MUI DataGrid renderCell params.row equivalency',
|
|
774
|
+
);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* Find the DataGrid call in parent scopes by looking for signature[0].row → DataGrid().signature[0].rows[]
|
|
784
|
+
*/
|
|
785
|
+
private findDataGridInParentScopes(
|
|
786
|
+
scopeNode: ScopeNode,
|
|
787
|
+
scopeDataStructure: ScopeDataStructure,
|
|
788
|
+
): string | undefined {
|
|
789
|
+
// Check the scope tree (parent scopes)
|
|
790
|
+
if (!scopeNode.tree) return undefined;
|
|
791
|
+
|
|
792
|
+
for (const parentScopeName of scopeNode.tree) {
|
|
793
|
+
const parentScope = scopeDataStructure.getScopeOrFunctionCallInfo(
|
|
794
|
+
parentScopeName,
|
|
795
|
+
) as ScopeNode;
|
|
796
|
+
if (!parentScope?.equivalencies) continue;
|
|
797
|
+
|
|
798
|
+
// Look for signature[0].row → DataGrid().signature[0].rows[]
|
|
799
|
+
const rowEquivs = parentScope.equivalencies['signature[0].row'];
|
|
800
|
+
if (rowEquivs) {
|
|
801
|
+
for (const equiv of rowEquivs) {
|
|
802
|
+
const match = equiv.schemaPath.match(
|
|
803
|
+
/^(DataGrid(?:Pro|Premium)?)\(\)\.signature\[0\]\.rows\[\]$/,
|
|
804
|
+
);
|
|
805
|
+
if (match) {
|
|
806
|
+
return `${match[1]}()`;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
return undefined;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Find the scope name that contains the DataGrid call
|
|
817
|
+
*/
|
|
818
|
+
private findDataGridScopeName(
|
|
819
|
+
scopeNode: ScopeNode,
|
|
820
|
+
scopeDataStructure: ScopeDataStructure,
|
|
821
|
+
): string | undefined {
|
|
822
|
+
if (!scopeNode.tree) return undefined;
|
|
823
|
+
|
|
824
|
+
for (const parentScopeName of scopeNode.tree) {
|
|
825
|
+
const parentScope = scopeDataStructure.getScopeOrFunctionCallInfo(
|
|
826
|
+
parentScopeName,
|
|
827
|
+
) as ScopeNode;
|
|
828
|
+
if (!parentScope?.equivalencies) continue;
|
|
829
|
+
|
|
830
|
+
// Look for DataGrid().signature[0].columns
|
|
831
|
+
for (const path of Object.keys(parentScope.equivalencies)) {
|
|
832
|
+
if (
|
|
833
|
+
path.match(/^DataGrid(?:Pro|Premium)?\(\)\.signature\[0\]\.columns$/)
|
|
834
|
+
) {
|
|
835
|
+
return parentScopeName;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
return undefined;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
isInterestedInSubpath(
|
|
844
|
+
subPathParts: string[],
|
|
845
|
+
_scopeNode: ScopeNode,
|
|
846
|
+
_scopeDataStructure: ScopeDataStructure,
|
|
847
|
+
): boolean {
|
|
848
|
+
// We're interested in MUI component paths (DataGrid variants and Autocomplete)
|
|
849
|
+
const hasMuiComponent = subPathParts.some((part) =>
|
|
850
|
+
part.match(/^(DataGrid(Pro|Premium)?|Autocomplete)\(/),
|
|
851
|
+
);
|
|
852
|
+
return hasMuiComponent;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
addEquivalencies(_addEquivalenciesInfo: AddEquivalenciesInfo): boolean {
|
|
856
|
+
// We handle DataGrid in finalize() instead, since we need to scan
|
|
857
|
+
// for all equivalencies after they've been established
|
|
858
|
+
return false;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
finalize(_scopeNode: ScopeNode, scopeDataStructure: ScopeDataStructure) {
|
|
862
|
+
// Process external function call schemas ONCE (not per-scope) since they
|
|
863
|
+
// are global. These were moved from postProcess() because external function
|
|
864
|
+
// calls are only available AFTER postProcess() runs (in trackFunctionCalls).
|
|
865
|
+
// See Issue 23.
|
|
866
|
+
this.processGridApiContext(_scopeNode, scopeDataStructure);
|
|
867
|
+
this.processCreateTheme(_scopeNode, scopeDataStructure);
|
|
868
|
+
this.processGridSelector(_scopeNode, scopeDataStructure);
|
|
869
|
+
|
|
870
|
+
// Iterate through all scopes (finalize is only called on root)
|
|
871
|
+
for (const [scopeName, scopeNode] of Object.entries(
|
|
872
|
+
scopeDataStructure.scopeNodes,
|
|
873
|
+
)) {
|
|
874
|
+
this.finalizeScope(scopeNode, scopeDataStructure);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
private finalizeScope(
|
|
879
|
+
scopeNode: ScopeNode,
|
|
880
|
+
scopeDataStructure: ScopeDataStructure,
|
|
881
|
+
) {
|
|
882
|
+
// Propagate row property accesses after all scopes are established
|
|
883
|
+
// Find DataGrid calls in this scope and link renderCell params.row.* to rows[].*
|
|
884
|
+
for (const [path, equivalencies] of Object.entries(
|
|
885
|
+
scopeNode.equivalencies,
|
|
886
|
+
)) {
|
|
887
|
+
// Look for DataGrid().signature[0].columns equivalency
|
|
888
|
+
const dataGridMatch = path.match(
|
|
889
|
+
/^(DataGrid(?:Pro|Premium)?\(\))\.signature\[0\]\.columns$/,
|
|
890
|
+
);
|
|
891
|
+
if (dataGridMatch) {
|
|
892
|
+
const dataGridCall = dataGridMatch[1];
|
|
893
|
+
|
|
894
|
+
// Find what columns is equivalent to
|
|
895
|
+
for (const equiv of equivalencies) {
|
|
896
|
+
const columnsVar = equiv.schemaPath;
|
|
897
|
+
|
|
898
|
+
// Find renderCell callbacks
|
|
899
|
+
const callbackScopes = this.findRenderCellCallbacks(
|
|
900
|
+
columnsVar,
|
|
901
|
+
scopeNode,
|
|
902
|
+
new Set(),
|
|
903
|
+
scopeDataStructure,
|
|
904
|
+
);
|
|
905
|
+
|
|
906
|
+
for (const callbackScopeName of callbackScopes) {
|
|
907
|
+
const callbackScopeNode =
|
|
908
|
+
scopeDataStructure.getScopeOrFunctionCallInfo(callbackScopeName);
|
|
909
|
+
if (!callbackScopeNode) continue;
|
|
910
|
+
|
|
911
|
+
// Propagate sub-property accesses from params.row.*
|
|
912
|
+
this.propagateRowPropertyAccesses(
|
|
913
|
+
callbackScopeNode as ScopeNode,
|
|
914
|
+
dataGridCall,
|
|
915
|
+
scopeNode.name,
|
|
916
|
+
scopeDataStructure,
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
continue;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
// Look for Autocomplete().signature[0].options equivalency
|
|
924
|
+
const autocompleteMatch = path.match(
|
|
925
|
+
/^(Autocomplete\(\))\.signature\[0\]\.options$/,
|
|
926
|
+
);
|
|
927
|
+
if (autocompleteMatch) {
|
|
928
|
+
const autocompleteCall = autocompleteMatch[1];
|
|
929
|
+
|
|
930
|
+
// Find callback props and propagate property accesses
|
|
931
|
+
for (const callbackProp of ['getOptionLabel', 'renderOption']) {
|
|
932
|
+
const callbackPath = `${autocompleteCall}.signature[0].${callbackProp}`;
|
|
933
|
+
const callbackEquivs = scopeNode.equivalencies[callbackPath];
|
|
934
|
+
|
|
935
|
+
if (callbackEquivs) {
|
|
936
|
+
for (const callbackEquiv of callbackEquivs) {
|
|
937
|
+
const callbackMatch = callbackEquiv.schemaPath.match(
|
|
938
|
+
/^(cyScope[0-9A-Fa-f]+)\(\)\.functionCallReturnValue$/,
|
|
939
|
+
);
|
|
940
|
+
if (!callbackMatch) continue;
|
|
941
|
+
|
|
942
|
+
const callbackScopeName = callbackMatch[1];
|
|
943
|
+
const callbackScopeNode =
|
|
944
|
+
scopeDataStructure.getScopeOrFunctionCallInfo(
|
|
945
|
+
callbackScopeName,
|
|
946
|
+
);
|
|
947
|
+
if (!callbackScopeNode) continue;
|
|
948
|
+
|
|
949
|
+
// Determine which parameter index receives the option
|
|
950
|
+
const paramIndex = callbackProp === 'renderOption' ? 1 : 0;
|
|
951
|
+
|
|
952
|
+
// Propagate property accesses from this callback
|
|
953
|
+
this.propagateAutocompletePropertyAccesses(
|
|
954
|
+
callbackScopeNode as ScopeNode,
|
|
955
|
+
autocompleteCall,
|
|
956
|
+
paramIndex,
|
|
957
|
+
scopeNode.name,
|
|
958
|
+
scopeDataStructure,
|
|
959
|
+
);
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
// NOTE: We intentionally do NOT include DataGrid/Autocomplete in internalFunctions.
|
|
968
|
+
// While they're MUI components (not external data sources), we need them to remain
|
|
969
|
+
// in externalFunctionCalls so that data flow tracing works correctly.
|
|
970
|
+
// For example: DataGrid().signature[0].rows → data.items[] tracing
|
|
971
|
+
internalFunctions: Set<string> = new Set([]);
|
|
972
|
+
|
|
973
|
+
toString() {
|
|
974
|
+
return 'MuiManager';
|
|
975
|
+
}
|
|
976
|
+
}
|