@codeyam/codeyam-cli 0.1.0-staging.b8a55ba → 0.1.0-staging.d0ad4ae
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analyzer-template/.build-info.json +7 -7
- package/analyzer-template/common/execAsync.ts +1 -1
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +7 -4
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +14 -1
- package/analyzer-template/packages/ai/src/lib/checkAllAttributes.ts +29 -10
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +120 -19
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +2 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.ts +91 -35
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.ts +110 -74
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +11 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertNullToUndefinedBySchema.ts +98 -0
- package/analyzer-template/packages/ai/src/lib/deepEqual.ts +30 -0
- package/analyzer-template/packages/ai/src/lib/findMatchingAttribute.ts +24 -17
- package/analyzer-template/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.ts +214 -39
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityKeyAttributes.ts +54 -1
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarioData.ts +72 -6
- package/analyzer-template/packages/ai/src/lib/generateChangesEntityScenarios.ts +12 -5
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +39 -23
- package/analyzer-template/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.ts +32 -0
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +14 -0
- 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/files/analyze/analyzeEntities/prepareDataStructures.ts +73 -69
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +6 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +3 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +22 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyzeEntity.ts +9 -5
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +49 -11
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichUnknownTypesFromSourceEquivalencies.ts +102 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +399 -52
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.ts +128 -2
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +114 -70
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateScenarioData.ts +34 -129
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +155 -79
- 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/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 +1 -1
- 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/uploadFileToS3.ts +8 -1
- 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/scenarioComponentForServer.ts +114 -0
- 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 +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.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/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/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/Scenario.d.ts +6 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +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/src/types/Entity.ts +2 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +6 -0
- 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/Scenario.d.ts +6 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/playwright/capture.ts +37 -18
- package/analyzer-template/playwright/waitForServer.ts +21 -6
- package/analyzer-template/project/constructMockCode.ts +781 -140
- package/analyzer-template/project/orchestrateCapture/KyselyAnalysisLoader.ts +3 -6
- package/analyzer-template/project/orchestrateCapture.ts +10 -3
- package/analyzer-template/project/reconcileMockDataKeys.ts +28 -100
- package/analyzer-template/project/runAnalysis.ts +5 -0
- package/analyzer-template/project/serverOnlyModules.ts +127 -2
- package/analyzer-template/project/start.ts +5 -3
- package/analyzer-template/project/startScenarioCapture.ts +6 -0
- package/analyzer-template/project/writeMockDataTsx.ts +50 -22
- package/analyzer-template/project/writeScenarioClientWrapper.ts +21 -0
- package/analyzer-template/project/writeScenarioComponents.ts +162 -100
- package/analyzer-template/project/writeScenarioFiles.ts +26 -0
- package/analyzer-template/project/writeSimpleRoot.ts +11 -35
- package/analyzer-template/scripts/comboWorkerLoop.cjs +1 -0
- package/analyzer-template/scripts/defaultCmd.sh +9 -0
- 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/constructMockCode.js +718 -127
- package/background/src/lib/virtualized/project/constructMockCode.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.js +7 -4
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +25 -61
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/runAnalysis.js +4 -0
- package/background/src/lib/virtualized/project/runAnalysis.js.map +1 -1
- package/background/src/lib/virtualized/project/serverOnlyModules.js +106 -3
- package/background/src/lib/virtualized/project/serverOnlyModules.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +5 -3
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +7 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +52 -23
- 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 +136 -83
- 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 +11 -34
- package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
- package/codeyam-cli/src/cli.js +5 -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 +177 -0
- package/codeyam-cli/src/commands/baseline.js.map +1 -0
- 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/database.js +91 -5
- package/codeyam-cli/src/utils/database.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/queue/job.js +104 -0
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/persistence.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 +66 -17
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-wXL1Z2Aq.js → EntityItem-Cmysw5OP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-CzGX-miz.js → EntityTypeBadge-DLqD3qNt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CXFKsCOD.js → EntityTypeIcon-CAneekK2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-D-9pXIaY.js → InteractivePreview-Cu16OUmx.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CBQPrpT0.js → LibraryFunctionPreview-CVtiBnY5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-D1CdlbrV.js → LoadingDots-B0GLXMsr.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-wDPcZNKx.js → LogViewer-xgeCVgSM.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-4lcOlid-.js → ReportIssueModal-DcAUIpD_.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-BfmDgXxG.js → SafeScreenshot-DuDvi0jm.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-BMKg0SAF.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-6J7zDUD5.js → TruncatedFilePath-DyFZkK0l.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/_index-DSmTpjmK.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-BF_aK4y6.js +32 -0
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BYimnrHg.js → chevron-down-Cx24_aWc.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-EPOLDU6W-CXRTFQ3F.js +51 -0
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-CaVsIRxt.js → circle-check-BOARzkeR.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-CgUsG7ib.js → createLucideIcon-BdhJEx6B.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-DW_hdGUc.js → dev.empty-RJCf3Tvw.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-zUEpfPsu.js → entity._sha._-D0-YwkBh.js} +12 -12
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-EylcgScH.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-D_3ero5o.js → entity._sha_.create-scenario-DMe7kvgo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CfLCUi9S.js → entity._sha_.edit._scenarioId-C1H_a_Y3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-DKJyZfAY.js → entry.client-CS2cb_eZ.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-DAtOlaWE.js → fileTableUtils-DMJ7zii9.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-ClR0d32A.js → files-BW7Cyeyi.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{git-D62Lxxmv.js → git-CZu4fif0.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/globals-wHVy_II5.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-CzNNiTkw.js → index-B1h680n5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-BosqDOlH.js → index-lzqtyFU8.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-CNp9QFCX.js → loader-circle-B7B9V-bu.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{manifest-09d684be.js → manifest-2d191949.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-FHgpM6gc.js +56 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DDGjYAMJ.js → search-CxXUmBSd.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{settings-DgTyB-Wg.js → settings-6D8k8Jp5.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CDJZnWhN.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CBc5dE1s.js → triangle-alert-B6LgvRJg.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-BMIGFP-m.js → useCustomSizes-Dv18q8LD.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useInteractiveMode-Dk_FQqWJ.js → useInteractiveMode-0ToGk4K3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-BqPPNjAl.js → useLastLogLine-aSv48UbS.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DsJbgMY9.js → useReportContext-1BX144Eg.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-DWHcCcl1.js → useToast-mBRpZPiu.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/{index-CV6i1S1A.js → index-pU0o5t1o.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-YzfkRwdn.js +178 -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/templates/codeyam-setup-skill.md +138 -3
- package/codeyam-cli/templates/debug-codeyam.md +7 -2
- package/package.json +5 -5
- package/packages/ai/src/lib/astScopes/processExpression.js +13 -1
- 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/dataStructure/ScopeDataStructure.js +94 -18
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +2 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js +51 -23
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/MuiManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js +70 -54
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/ReactFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +11 -0
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.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/deepEqual.js +32 -0
- package/packages/ai/src/lib/deepEqual.js.map +1 -0
- package/packages/ai/src/lib/findMatchingAttribute.js +20 -16
- package/packages/ai/src/lib/findMatchingAttribute.js.map +1 -1
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js +168 -41
- package/packages/ai/src/lib/gatherRelevantDependentKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js +42 -1
- package/packages/ai/src/lib/generateChangesEntityKeyAttributes.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js +59 -3
- package/packages/ai/src/lib/generateChangesEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateChangesEntityScenarios.js +6 -6
- package/packages/ai/src/lib/generateChangesEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +32 -23
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js +20 -1
- package/packages/ai/src/lib/promptGenerators/generateChangesEntityScenariosGenerator.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +15 -0
- package/packages/analyze/src/lib/FileAnalyzer.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/files/analyze/analyzeEntities/prepareDataStructures.js +59 -50
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +6 -0
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.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/analyzeChange.js +14 -4
- package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeEntity.js +7 -6
- package/packages/analyze/src/lib/files/analyzeEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +44 -10
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
- 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 +314 -52
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js +97 -2
- package/packages/analyze/src/lib/files/scenarios/generateChangesScenarios.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +88 -52
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js +26 -98
- package/packages/analyze/src/lib/files/scenarios/generateScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +141 -75
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- 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/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/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/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/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js +0 -7
- package/codeyam-cli/scripts/fixtures/formbricks/universal-mocks/apps/web/lib/instance/service.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/ScenarioViewer-CUxUNEEC.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/_index-DHImXdXq.js +0 -11
- package/codeyam-cli/src/webserver/build/client/assets/activity.(_tab)-2mG6mjVb.js +0 -32
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JMJ3UQ3L-BambyYE_.js +0 -51
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DyB90fWk.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-C6vQASxy.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-BxJUvKau.js +0 -56
- package/codeyam-cli/src/webserver/build/client/assets/simulations-CoNWGt0K.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BDlyhfrv.js +0 -175
- /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/{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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"buildTimestamp": "2026-01-
|
|
3
|
-
"buildTime":
|
|
4
|
-
"gitCommit": "
|
|
2
|
+
"buildTimestamp": "2026-01-13T17:06:17.271Z",
|
|
3
|
+
"buildTime": 1768323977271,
|
|
4
|
+
"gitCommit": "d0ad4aecb8553860bc47e123117cf87438cf7ca1",
|
|
5
5
|
"nodeVersion": "v20.19.6",
|
|
6
|
-
"contentHash": "
|
|
7
|
-
"buildNumber":
|
|
8
|
-
"semanticVersion": "0.1.
|
|
9
|
-
"version": "0.1.
|
|
6
|
+
"contentHash": "68dcc7fe40d189a68998635c58ffd67eb34b236b0a7390d2bd47d8bcfba3573f",
|
|
7
|
+
"buildNumber": 400,
|
|
8
|
+
"semanticVersion": "0.1.400",
|
|
9
|
+
"version": "0.1.400 (2026-01-13T17:06+68dcc7f)"
|
|
10
10
|
}
|
|
@@ -6,7 +6,7 @@ import * as fs from 'fs';
|
|
|
6
6
|
import { ChildProcessWithoutNullStreams, spawn } from 'child_process';
|
|
7
7
|
|
|
8
8
|
import { loadEnv } from '~codeyam/utils/server';
|
|
9
|
-
import { getGlobalProcessManager, ProcessType } from '
|
|
9
|
+
import { getGlobalProcessManager, ProcessType } from '~codeyam/process';
|
|
10
10
|
|
|
11
11
|
loadEnv();
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
[1/
|
|
3
|
-
[1/
|
|
2
|
+
[1/13/2026, 5:06:17 PM] > codeyam-combo@1.0.0 mergeDependencies
|
|
3
|
+
[1/13/2026, 5:06:17 PM] > node ./scripts/mergePackageJsonFiles.cjs
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
[1/
|
|
6
|
+
[1/13/2026, 5:06:17 PM] Merged dependencies into root package.json
|
|
7
7
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"build": "tsc && node ./scripts/postbuild.cjs"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@aws-sdk/client-cloudwatch-logs": "^3.
|
|
11
|
-
"@aws-sdk/client-cloudfront": "^3.
|
|
10
|
+
"@aws-sdk/client-cloudwatch-logs": "^3.966.0",
|
|
11
|
+
"@aws-sdk/client-cloudfront": "^3.966.0",
|
|
12
12
|
"@aws-sdk/client-codebuild": "^3.948.0",
|
|
13
13
|
"@aws-sdk/client-dynamodb": "^3.956.0",
|
|
14
14
|
"@aws-sdk/client-ec2": "^3.899.0",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"jsdom": "^27.4.0",
|
|
32
32
|
"jsonc-parser": "^3.2.1",
|
|
33
33
|
"lru-cache": "^11.2.4",
|
|
34
|
-
"openai": "^6.
|
|
34
|
+
"openai": "^6.16.0",
|
|
35
35
|
"p-queue": "^8.1.0",
|
|
36
|
-
"p-retry": "^
|
|
36
|
+
"p-retry": "^7.1.1",
|
|
37
37
|
"piscina": "^5.1.4",
|
|
38
38
|
"pixelmatch": "^5.3.0",
|
|
39
39
|
"playwright": "^1.56.1",
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
"undici": "^7.16.0",
|
|
43
43
|
"uuid": "^11.1.0",
|
|
44
44
|
"pluralize": "^8.0.0",
|
|
45
|
+
"yargs": "^18.0.0",
|
|
46
|
+
"json5": "^2.2.3",
|
|
45
47
|
"@anthropic-ai/sdk": "^0.71.0",
|
|
46
48
|
"@aws-sdk/s3-request-presigner": "^3.940.0",
|
|
47
49
|
"better-sqlite3": "^12.4.1",
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
"typescript": "^5.9.3",
|
|
57
59
|
"@jest/types": "^30.2.0",
|
|
58
60
|
"@types/node": "^25.0.2",
|
|
61
|
+
"@types/yargs": "^17.0.34",
|
|
59
62
|
"@types/jsdom": "^27.0.0",
|
|
60
63
|
"@types/better-sqlite3": "^7.6.13",
|
|
61
64
|
"@types/jest": "^30.0.0",
|
|
@@ -20,6 +20,18 @@ import {
|
|
|
20
20
|
} from './sharedPatterns';
|
|
21
21
|
import { processBindingPattern } from './processBindings';
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Detects if a property access looks like an environment variable store access.
|
|
25
|
+
* Matches patterns like `env.DATABASE_URL`, `env.IS_FORMBRICKS_CLOUD`, etc.
|
|
26
|
+
* where the object is named "env" and the property looks like an env var name.
|
|
27
|
+
*/
|
|
28
|
+
function isEnvStoreAccess(fullText: string): boolean {
|
|
29
|
+
// Match: env.SOME_VAR or env.someVar (but object must be exactly "env")
|
|
30
|
+
// This catches patterns from @t3-oss/env-nextjs and similar packages
|
|
31
|
+
const envStorePattern = /^env\.[A-Z_][A-Z0-9_]*$/;
|
|
32
|
+
return envStorePattern.test(fullText);
|
|
33
|
+
}
|
|
34
|
+
|
|
23
35
|
/**
|
|
24
36
|
* Converts a call expression argument to a StructuredPath.
|
|
25
37
|
*
|
|
@@ -802,7 +814,8 @@ export function processExpression({
|
|
|
802
814
|
// Check if this is an environment variable access
|
|
803
815
|
const fullText = unwrappedNode.getText(context.sourceFile);
|
|
804
816
|
if (
|
|
805
|
-
fullText.includes('.env.') //
|
|
817
|
+
fullText.includes('.env.') || // process.env.X, window.env.X
|
|
818
|
+
isEnvStoreAccess(fullText) // env.X where env is likely an env config object
|
|
806
819
|
) {
|
|
807
820
|
context.addEnvironmentVariable(fullText);
|
|
808
821
|
}
|
|
@@ -1,25 +1,44 @@
|
|
|
1
|
-
export default function checkAllAttributes(
|
|
2
|
-
|
|
1
|
+
export default function checkAllAttributes(
|
|
2
|
+
data: { [key: string]: unknown } | unknown,
|
|
3
|
+
): unknown {
|
|
4
|
+
// Handle non-object values (strings, numbers, etc.) - return them as-is
|
|
5
|
+
if (data === null || data === undefined) {
|
|
6
|
+
return data;
|
|
7
|
+
}
|
|
8
|
+
if (typeof data !== 'object') {
|
|
9
|
+
return data;
|
|
10
|
+
}
|
|
11
|
+
// Handle arrays - recurse into each element
|
|
12
|
+
if (Array.isArray(data)) {
|
|
13
|
+
return data.map((item) => checkAllAttributes(item));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const obj = data as { [key: string]: unknown };
|
|
17
|
+
for (const key of Object.keys(obj)) {
|
|
3
18
|
try {
|
|
4
|
-
if (
|
|
5
|
-
delete
|
|
19
|
+
if (obj[key] === undefined) {
|
|
20
|
+
delete obj[key];
|
|
6
21
|
continue;
|
|
7
22
|
}
|
|
8
23
|
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
if (Array.isArray(obj[key])) {
|
|
25
|
+
obj[key] = (obj[key] as unknown[]).map((item) =>
|
|
26
|
+
checkAllAttributes(item),
|
|
27
|
+
);
|
|
28
|
+
} else if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
29
|
+
checkAllAttributes(obj[key]);
|
|
30
|
+
} else if (typeof obj[key] === 'string') {
|
|
31
|
+
obj[key] = (obj[key] as string).replace(/\n/g, '\\n');
|
|
13
32
|
}
|
|
14
33
|
} catch (e) {
|
|
15
34
|
console.error('Error checking all attributes', {
|
|
16
35
|
key,
|
|
17
|
-
data,
|
|
36
|
+
data: obj,
|
|
18
37
|
error: e,
|
|
19
38
|
});
|
|
20
39
|
throw e;
|
|
21
40
|
}
|
|
22
41
|
}
|
|
23
42
|
|
|
24
|
-
return
|
|
43
|
+
return obj;
|
|
25
44
|
}
|
|
@@ -1395,6 +1395,18 @@ export class ScopeDataStructure {
|
|
|
1395
1395
|
const equivalentSchemaPath = equivalentSchemaPathMap.get(remainingKey);
|
|
1396
1396
|
|
|
1397
1397
|
if (equivalentSchemaPath) {
|
|
1398
|
+
// Skip propagation when there's a structural mismatch:
|
|
1399
|
+
// - schemaPath ends with [] (array element, represents an object)
|
|
1400
|
+
// - equivalentSchemaPath doesn't end with [] (non-array prop, usually a scalar)
|
|
1401
|
+
// This prevents incorrectly typing array elements as strings when they're
|
|
1402
|
+
// equivalent to scalar props like JSX keys (e.g., workouts[] ↔ Card().key)
|
|
1403
|
+
const schemaPathEndsWithArray = schemaPath.endsWith('[]');
|
|
1404
|
+
const equivalentEndsWithArray = equivalentSchemaPath.endsWith('[]');
|
|
1405
|
+
if (schemaPathEndsWithArray !== equivalentEndsWithArray) {
|
|
1406
|
+
// Don't propagate between array element paths and non-array paths
|
|
1407
|
+
continue;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1398
1410
|
const value1 = scopeNode.schema[schemaPath];
|
|
1399
1411
|
const value2 = equivalentScopeNode.schema[equivalentSchemaPath];
|
|
1400
1412
|
|
|
@@ -3409,12 +3421,14 @@ export class ScopeDataStructure {
|
|
|
3409
3421
|
);
|
|
3410
3422
|
|
|
3411
3423
|
const equivalencies = this.getEquivalencies(functionName);
|
|
3424
|
+
const scopeName = functionName ?? this.scopeTreeManager.getRootName();
|
|
3425
|
+
|
|
3412
3426
|
for (const equivalenceKey in equivalencies ?? {}) {
|
|
3413
3427
|
for (const equivalenceValue of equivalencies[equivalenceKey]) {
|
|
3414
3428
|
const schemaPath = equivalenceValue.schemaPath;
|
|
3415
3429
|
if (
|
|
3416
3430
|
schemaPath.startsWith('signature[') &&
|
|
3417
|
-
equivalenceValue.scopeNodeName ===
|
|
3431
|
+
equivalenceValue.scopeNodeName === scopeName &&
|
|
3418
3432
|
!signatureInSchema[schemaPath]
|
|
3419
3433
|
) {
|
|
3420
3434
|
signatureInSchema[schemaPath] = 'unknown';
|
|
@@ -3428,14 +3442,60 @@ export class ScopeDataStructure {
|
|
|
3428
3442
|
equivalencies,
|
|
3429
3443
|
);
|
|
3430
3444
|
|
|
3431
|
-
// CRITICAL: Set onlyEquivalencies to true to prevent database modifications
|
|
3432
|
-
// during this "getter" method. validateSchema triggers manager.finalize which
|
|
3433
|
-
// can call addToSchema -> addToEquivalencyDatabase -> mergeEquivalencyDatabaseEntries,
|
|
3434
|
-
// which would incorrectly remove entries from the database.
|
|
3435
|
-
const wasOnlyEquivalencies = this.onlyEquivalencies;
|
|
3436
|
-
this.onlyEquivalencies = true;
|
|
3437
3445
|
this.validateSchema(tempScopeNode, true, fillInUnknowns);
|
|
3438
|
-
|
|
3446
|
+
|
|
3447
|
+
// After validateSchema has filled in types, propagate nested paths from
|
|
3448
|
+
// variables to their signature equivalents.
|
|
3449
|
+
// e.g., workouts[].activity_type -> signature[0].workouts[].activity_type
|
|
3450
|
+
//
|
|
3451
|
+
// Build a map of variable names that are equivalent to signature paths
|
|
3452
|
+
// e.g., { 'workouts': 'signature[0].workouts' }
|
|
3453
|
+
const variableToSignatureMap: Record<string, string> = {};
|
|
3454
|
+
|
|
3455
|
+
for (const equivalenceKey in equivalencies ?? {}) {
|
|
3456
|
+
for (const equivalenceValue of equivalencies[equivalenceKey]) {
|
|
3457
|
+
const schemaPath = equivalenceValue.schemaPath;
|
|
3458
|
+
// Track which variables map to signature paths
|
|
3459
|
+
// equivalenceKey is the variable name (e.g., 'workouts')
|
|
3460
|
+
// schemaPath is where it comes from (e.g., 'signature[0].workouts')
|
|
3461
|
+
if (
|
|
3462
|
+
schemaPath.startsWith('signature[') &&
|
|
3463
|
+
equivalenceValue.scopeNodeName === scopeName
|
|
3464
|
+
) {
|
|
3465
|
+
variableToSignatureMap[equivalenceKey] = schemaPath;
|
|
3466
|
+
}
|
|
3467
|
+
}
|
|
3468
|
+
}
|
|
3469
|
+
|
|
3470
|
+
// Propagate nested paths from variables to their signature equivalents
|
|
3471
|
+
// e.g., if workouts = signature[0].workouts, then workouts[].title becomes
|
|
3472
|
+
// signature[0].workouts[].title
|
|
3473
|
+
for (const schemaKey in schema) {
|
|
3474
|
+
// Skip keys that already start with signature[
|
|
3475
|
+
if (schemaKey.startsWith('signature[')) continue;
|
|
3476
|
+
|
|
3477
|
+
// Check if this key starts with a variable that maps to a signature path
|
|
3478
|
+
for (const [variableName, signaturePath] of Object.entries(
|
|
3479
|
+
variableToSignatureMap,
|
|
3480
|
+
)) {
|
|
3481
|
+
// Check if schemaKey starts with variableName followed by a property accessor
|
|
3482
|
+
// e.g., 'workouts[]' starts with 'workouts'
|
|
3483
|
+
if (
|
|
3484
|
+
schemaKey === variableName ||
|
|
3485
|
+
schemaKey.startsWith(variableName + '.') ||
|
|
3486
|
+
schemaKey.startsWith(variableName + '[')
|
|
3487
|
+
) {
|
|
3488
|
+
// Transform the path: replace the variable prefix with the signature path
|
|
3489
|
+
const suffix = schemaKey.slice(variableName.length);
|
|
3490
|
+
const signatureKey = signaturePath + suffix;
|
|
3491
|
+
|
|
3492
|
+
// Add to schema if not already present
|
|
3493
|
+
if (!tempScopeNode.schema[signatureKey]) {
|
|
3494
|
+
tempScopeNode.schema[signatureKey] = schema[schemaKey];
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
}
|
|
3439
3499
|
|
|
3440
3500
|
return tempScopeNode.schema;
|
|
3441
3501
|
}
|
|
@@ -4049,6 +4109,16 @@ export class ScopeDataStructure {
|
|
|
4049
4109
|
if (Object.keys(perVariableSchemas).length < numReceivingVars) {
|
|
4050
4110
|
// Not all variables have schemas - fall back to rootSchema extraction
|
|
4051
4111
|
perVariableSchemas = undefined;
|
|
4112
|
+
} else {
|
|
4113
|
+
// Also check that at least one schema is non-empty
|
|
4114
|
+
// Bug fix: perCallSignatureSchemas may have entries but with empty schemas {}
|
|
4115
|
+
// In this case, we should fall through to Fallback which uses rootSchema
|
|
4116
|
+
const hasNonEmptySchema = Object.values(perVariableSchemas).some(
|
|
4117
|
+
(schema) => Object.keys(schema).length > 0,
|
|
4118
|
+
);
|
|
4119
|
+
if (!hasNonEmptySchema) {
|
|
4120
|
+
perVariableSchemas = undefined;
|
|
4121
|
+
}
|
|
4052
4122
|
}
|
|
4053
4123
|
}
|
|
4054
4124
|
|
|
@@ -4068,7 +4138,11 @@ export class ScopeDataStructure {
|
|
|
4068
4138
|
}
|
|
4069
4139
|
}
|
|
4070
4140
|
|
|
4071
|
-
// CASE 3:
|
|
4141
|
+
// CASE 3: Extract from efc.schema when perCallSignatureSchemas is missing or empty
|
|
4142
|
+
// This handles two scenarios:
|
|
4143
|
+
// 1. Parameterized calls that create SEPARATE efc entries (no perCallSignatureSchemas)
|
|
4144
|
+
// 2. Destructuring where perCallSignatureSchemas exists but has EMPTY schemas
|
|
4145
|
+
//
|
|
4072
4146
|
// When useFetcher<ConfigData>() and useFetcher<SettingsData>() are called, they create separate
|
|
4073
4147
|
// efc entries because getFunctionCallRoot preserves type parameters. Each entry has its own
|
|
4074
4148
|
// `schema` field, but due to variable reassignment, the schema may be contaminated with paths
|
|
@@ -4084,14 +4158,39 @@ export class ScopeDataStructure {
|
|
|
4084
4158
|
//
|
|
4085
4159
|
// We filter to only keep paths that should belong to THIS call by checking if the
|
|
4086
4160
|
// receiving variable's equivalency points to this call's return value.
|
|
4161
|
+
//
|
|
4162
|
+
// BUG FIX: The old condition `!efc.perCallSignatureSchemas` was FALSE when the object
|
|
4163
|
+
// existed (even with empty schemas), causing this case to be skipped. We now also check
|
|
4164
|
+
// if all schemas in perCallSignatureSchemas are empty.
|
|
4165
|
+
const hasNonEmptyPerCallSignatureSchemas =
|
|
4166
|
+
efc.perCallSignatureSchemas &&
|
|
4167
|
+
Object.values(efc.perCallSignatureSchemas).some(
|
|
4168
|
+
(schema) => Object.keys(schema).length > 0,
|
|
4169
|
+
);
|
|
4170
|
+
|
|
4171
|
+
// Build the call signature prefix that paths should start with
|
|
4172
|
+
const callSigPrefix = `${efc.callSignature}.functionCallReturnValue`;
|
|
4173
|
+
|
|
4174
|
+
// Check if efc.schema has variable-specific paths (indicating destructuring).
|
|
4175
|
+
// Destructuring: const { entities, gitStatus } = useLoaderData()
|
|
4176
|
+
// - efc.schema has paths like: useLoaderData().functionCallReturnValue.entities...
|
|
4177
|
+
// Multiple calls: const x = useFetcher(); const y = useFetcher();
|
|
4178
|
+
// - efc.schema has paths like: useFetcher().functionCallReturnValue.data...
|
|
4179
|
+
// CASE 3 should only run for destructuring (variable-specific paths exist).
|
|
4180
|
+
const hasVariableSpecificPaths = (
|
|
4181
|
+
efc.receivingVariableNames ?? []
|
|
4182
|
+
).some((varName) =>
|
|
4183
|
+
Object.keys(efc.schema).some((path) =>
|
|
4184
|
+
path.startsWith(`${callSigPrefix}.${varName}`),
|
|
4185
|
+
),
|
|
4186
|
+
);
|
|
4187
|
+
|
|
4087
4188
|
if (
|
|
4088
4189
|
!perVariableSchemas &&
|
|
4089
|
-
!
|
|
4090
|
-
numReceivingVars >= 1
|
|
4190
|
+
!hasNonEmptyPerCallSignatureSchemas &&
|
|
4191
|
+
numReceivingVars >= 1 &&
|
|
4192
|
+
hasVariableSpecificPaths
|
|
4091
4193
|
) {
|
|
4092
|
-
// Build the call signature prefix that paths should start with
|
|
4093
|
-
const callSigPrefix = `${efc.callSignature}.functionCallReturnValue`;
|
|
4094
|
-
|
|
4095
4194
|
// Filter efc.schema to only include paths matching this call signature
|
|
4096
4195
|
const filteredSchema: Record<string, string> = {};
|
|
4097
4196
|
for (const [path, type] of Object.entries(efc.schema)) {
|
|
@@ -4101,16 +4200,18 @@ export class ScopeDataStructure {
|
|
|
4101
4200
|
}
|
|
4102
4201
|
|
|
4103
4202
|
// Build perVariableSchemas from the filtered schema
|
|
4203
|
+
// For destructuring, filter paths by variable name
|
|
4104
4204
|
if (Object.keys(filteredSchema).length > 0) {
|
|
4105
4205
|
perVariableSchemas = {};
|
|
4106
4206
|
for (const varName of efc.receivingVariableNames ?? []) {
|
|
4107
|
-
// For
|
|
4207
|
+
// For destructuring, extract only paths specific to this variable
|
|
4208
|
+
const varSpecificPrefix = `${callSigPrefix}.${varName}`;
|
|
4108
4209
|
const varSchema: Record<string, string> = {};
|
|
4210
|
+
|
|
4109
4211
|
for (const [path, type] of Object.entries(filteredSchema)) {
|
|
4110
|
-
if (path.startsWith(
|
|
4111
|
-
// Transform
|
|
4112
|
-
//
|
|
4113
|
-
// -> "functionCallReturnValue.data.data.theme"
|
|
4212
|
+
if (path.startsWith(varSpecificPrefix)) {
|
|
4213
|
+
// Transform: useLoaderData().functionCallReturnValue.entities.sha
|
|
4214
|
+
// -> functionCallReturnValue.entities.sha (keep the variable name)
|
|
4114
4215
|
const suffix = path.slice(callSigPrefix.length);
|
|
4115
4216
|
const returnValuePath = `functionCallReturnValue${suffix}`;
|
|
4116
4217
|
varSchema[returnValuePath] = type;
|
|
@@ -518,8 +518,9 @@ export class JavascriptFrameworkManager implements EquivalencyManager {
|
|
|
518
518
|
|
|
519
519
|
for (const [arrayPath, arrayInfo] of Object.entries(arrays)) {
|
|
520
520
|
if (arrayInfo.paths.size > 1 && arrayInfo.values.size === 1) {
|
|
521
|
+
const elementType = Array.from(arrayInfo.values)[0];
|
|
521
522
|
arrayInfo.paths.forEach((path) => delete scopeNode.schema[path]);
|
|
522
|
-
scopeNode.schema[`${arrayPath}[]`] =
|
|
523
|
+
scopeNode.schema[`${arrayPath}[]`] = elementType;
|
|
523
524
|
}
|
|
524
525
|
}
|
|
525
526
|
}
|
|
@@ -49,50 +49,107 @@ export class MuiManager implements EquivalencyManager {
|
|
|
49
49
|
for (const [path, equivalencies] of Object.entries(
|
|
50
50
|
scopeNode.equivalencies,
|
|
51
51
|
)) {
|
|
52
|
-
// Look for DataGrid().signature[0].columns equivalency
|
|
52
|
+
// Case 1: Look for DataGrid().signature[0].columns equivalency pointing to a columns variable
|
|
53
53
|
const dataGridMatch = path.match(
|
|
54
54
|
/^(DataGrid(?:Pro|Premium)?\(\))\.signature\[0\]\.columns$/,
|
|
55
55
|
);
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
const dataGridCall = dataGridMatch[1];
|
|
56
|
+
if (dataGridMatch) {
|
|
57
|
+
const dataGridCall = dataGridMatch[1];
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
// Find what columns is equivalent to (e.g., "columns" variable)
|
|
60
|
+
for (const equiv of equivalencies) {
|
|
61
|
+
const columnsVar = equiv.schemaPath;
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
// Find renderCell callbacks, following equivalency chains if needed
|
|
64
|
+
const callbackScopes = this.findRenderCellCallbacks(
|
|
65
|
+
columnsVar,
|
|
66
|
+
scopeNode,
|
|
67
|
+
new Set(),
|
|
68
|
+
scopeDataStructure,
|
|
69
|
+
);
|
|
71
70
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
for (const callbackScopeName of callbackScopes) {
|
|
72
|
+
this.addRowEquivalencyToCallback(
|
|
73
|
+
callbackScopeName,
|
|
74
|
+
dataGridCall,
|
|
75
|
+
scopeNode,
|
|
76
|
+
scopeDataStructure,
|
|
77
|
+
);
|
|
78
78
|
}
|
|
79
|
+
}
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
// Case 2: Look for inline array props where DataGrid().signature[0].columns[N].renderCell
|
|
84
|
+
// directly points to a callback scope (e.g., DataGrid().signature[0].columns[0].renderCell → cyScope1())
|
|
85
|
+
// Also handles columns[].renderCell for normalized paths
|
|
86
|
+
const inlineRenderCellMatch = path.match(
|
|
87
|
+
/^(DataGrid(?:Pro|Premium)?\(\))\.signature\[0\]\.columns\[(?:\d+|)\]\.renderCell$/,
|
|
88
|
+
);
|
|
83
89
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
if (inlineRenderCellMatch) {
|
|
91
|
+
const dataGridCall = inlineRenderCellMatch[1];
|
|
92
|
+
|
|
93
|
+
for (const equiv of equivalencies) {
|
|
94
|
+
// Check if the equivalency points to a callback scope (cyScope*)
|
|
95
|
+
// Could be cyScope1() or cyScope1().functionCallReturnValue
|
|
96
|
+
const callbackMatch = equiv.schemaPath.match(
|
|
97
|
+
/^(cyScope[0-9A-Fa-f]+)\(\)(?:\.functionCallReturnValue)?$/,
|
|
90
98
|
);
|
|
99
|
+
if (callbackMatch) {
|
|
100
|
+
// Try both naming conventions:
|
|
101
|
+
// 1. Just the cyScope name (e.g., "cyScope1")
|
|
102
|
+
// 2. Parent____cyScope name (e.g., "CustomersPage____cyScope1")
|
|
103
|
+
const callbackScopeName = callbackMatch[1];
|
|
104
|
+
const prefixedCallbackScopeName = `${scopeNode.name}____${callbackMatch[1]}`;
|
|
105
|
+
// Try unprefixed name first, then prefixed
|
|
106
|
+
this.addRowEquivalencyToCallback(
|
|
107
|
+
callbackScopeName,
|
|
108
|
+
dataGridCall,
|
|
109
|
+
scopeNode,
|
|
110
|
+
scopeDataStructure,
|
|
111
|
+
);
|
|
112
|
+
// Also try prefixed version in case it exists
|
|
113
|
+
this.addRowEquivalencyToCallback(
|
|
114
|
+
prefixedCallbackScopeName,
|
|
115
|
+
dataGridCall,
|
|
116
|
+
scopeNode,
|
|
117
|
+
scopeDataStructure,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
91
120
|
}
|
|
92
121
|
}
|
|
93
122
|
}
|
|
94
123
|
}
|
|
95
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Helper to add the signature[0].row → DataGrid().signature[0].rows[] equivalency
|
|
127
|
+
*/
|
|
128
|
+
private addRowEquivalencyToCallback(
|
|
129
|
+
callbackScopeName: string,
|
|
130
|
+
dataGridCall: string,
|
|
131
|
+
scopeNode: ScopeNode,
|
|
132
|
+
scopeDataStructure: ScopeDataStructure,
|
|
133
|
+
) {
|
|
134
|
+
const callbackScopeNode =
|
|
135
|
+
scopeDataStructure.getScopeOrFunctionCallInfo(callbackScopeName);
|
|
136
|
+
if (!callbackScopeNode) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Add equivalency: signature[0].row ≡ DataGrid().signature[0].rows[]
|
|
141
|
+
const callbackParamRowPath = 'signature[0].row';
|
|
142
|
+
const rowsArrayElementPath = `${dataGridCall}.signature[0].rows[]`;
|
|
143
|
+
|
|
144
|
+
scopeDataStructure.addEquivalency(
|
|
145
|
+
callbackParamRowPath,
|
|
146
|
+
rowsArrayElementPath,
|
|
147
|
+
scopeNode.name,
|
|
148
|
+
callbackScopeNode as ScopeNode,
|
|
149
|
+
'MUI DataGrid renderCell params.row equivalency',
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
96
153
|
/**
|
|
97
154
|
* Process Autocomplete callbacks to link option parameters to options array.
|
|
98
155
|
*
|
|
@@ -702,12 +759,11 @@ export class MuiManager implements EquivalencyManager {
|
|
|
702
759
|
}
|
|
703
760
|
}
|
|
704
761
|
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
]);
|
|
762
|
+
// NOTE: We intentionally do NOT include DataGrid/Autocomplete in internalFunctions.
|
|
763
|
+
// While they're MUI components (not external data sources), we need them to remain
|
|
764
|
+
// in externalFunctionCalls so that data flow tracing works correctly.
|
|
765
|
+
// For example: DataGrid().signature[0].rows → data.items[] tracing
|
|
766
|
+
internalFunctions: Set<string> = new Set([]);
|
|
711
767
|
|
|
712
768
|
toString() {
|
|
713
769
|
return 'MuiManager';
|