@skyramp/mcp 0.4.1 → 0.4.2-rc.1
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/build/adapters/jestAdapter.js +23 -5
- package/build/adapters/mochaAdapter.js +7 -1
- package/build/adapters/playwrightAdapter.js +3 -1
- package/build/adapters/pytestAdapter.js +14 -3
- package/build/commands/localDevTestChangesCommand.js +1 -0
- package/build/commands/recommendTestsAndExecuteCommand.js +5 -6
- package/build/commands/testThisEndpointCommand.js +16 -4
- package/build/index.js +34 -4
- package/build/playwright/blueprintDigest.js +28 -7
- package/build/playwright/registerPlaywrightTools.js +33 -28
- package/build/playwright/traceRecordingPrompt.js +9 -2
- package/build/prompts/code-reuse.js +95 -29
- package/build/prompts/fix-error-prompt.d.ts +9 -1
- package/build/prompts/fix-error-prompt.js +31 -28
- package/build/prompts/local-dev/local-dev-plan.d.ts +3 -0
- package/build/prompts/local-dev/local-dev-plan.js +3 -1
- package/build/prompts/local-dev/local-dev-prompts.d.ts +1 -1
- package/build/prompts/local-dev/local-dev-prompts.js +30 -3
- package/build/prompts/modularization/integration-test-modularization.js +13 -6
- package/build/prompts/modularization/ui-test-modularization.js +1 -1
- package/build/prompts/personas.js +1 -1
- package/build/prompts/pom-aware-code-reuse.js +7 -9
- package/build/prompts/reuse-hand-off.d.ts +64 -0
- package/build/prompts/reuse-hand-off.js +130 -0
- package/build/prompts/shared-helper-policy.d.ts +88 -2
- package/build/prompts/shared-helper-policy.js +145 -11
- package/build/prompts/sut-setup/modes/adaptWorkflowPrompt.js +1 -1
- package/build/prompts/sut-setup/modes/dockerComposePrompt.js +1 -1
- package/build/prompts/sut-setup/shared.d.ts +4 -1
- package/build/prompts/sut-setup/shared.js +2 -2
- package/build/prompts/test-maintenance/actionsInstructions.d.ts +19 -11
- package/build/prompts/test-maintenance/actionsInstructions.js +47 -26
- package/build/prompts/test-maintenance/drift-analysis-prompt.js +3 -2
- package/build/prompts/test-maintenance/driftAnalysisSections.js +5 -3
- package/build/prompts/test-maintenance/driftAnalysisShared.js +4 -2
- package/build/prompts/test-maintenance/uiDriftAnalysisSections.js +7 -4
- package/build/prompts/test-recommendation/recommendationSections.js +19 -8
- package/build/prompts/test-recommendation/registerRecommendTestsPrompt.js +5 -2
- package/build/prompts/test-recommendation/test-recommendation-prompt.js +10 -7
- package/build/prompts/testbot/testbot-prompts.js +123 -55
- package/build/recommendation/answers.js +18 -9
- package/build/recommendation/pullRequestText.js +1 -1
- package/build/recommendation/registerPlan.js +31 -17
- package/build/recommendation/subjectStep.d.ts +8 -10
- package/build/recommendation/subjectStep.js +17 -16
- package/build/recommendation/types.d.ts +71 -17
- package/build/recommendation/types.js +9 -15
- package/build/recommendation/verifierContracts.d.ts +7 -3
- package/build/recommendation/verifierContracts.js +8 -4
- package/build/recommendation/verifiers/changedFile.js +11 -13
- package/build/recommendation/verifiers/citedPath.d.ts +8 -0
- package/build/recommendation/verifiers/citedPath.js +16 -2
- package/build/recommendation/verifiers/coverage.d.ts +2 -2
- package/build/recommendation/verifiers/coverage.js +190 -134
- package/build/recommendation/verifiers/defects.js +56 -16
- package/build/recommendation/verifiers/deliveredMatchesPlan.d.ts +7 -1
- package/build/recommendation/verifiers/deliveredMatchesPlan.js +28 -14
- package/build/recommendation/verifiers/endpointGrounded.js +14 -8
- package/build/recommendation/verifiers/existingCoverage.d.ts +6 -0
- package/build/recommendation/verifiers/existingCoverage.js +30 -21
- package/build/recommendation/verifiers/expectedOutcome.js +17 -8
- package/build/recommendation/verifiers/expectedValueSourced.js +54 -43
- package/build/recommendation/verifiers/issueTraceability.d.ts +5 -0
- package/build/recommendation/verifiers/issueTraceability.js +64 -7
- package/build/recommendation/verifiers/removedElementGuarded.js +19 -11
- package/build/recommendation/verifiers/reportedCategory.js +9 -4
- package/build/recommendation/verifiers/requirementSourced.js +34 -21
- package/build/recommendation/verifiers/screenRoute.js +15 -10
- package/build/recommendation/verifiers/statedDifference.js +15 -8
- package/build/recommendation/verifiers/uiElementGrounded.js +50 -16
- package/build/resources/analysisResources.js +7 -3
- package/build/resources/progressResource.js +4 -2
- package/build/resources/sutSetupResource.js +20 -2
- package/build/resources/testbotResource.js +19 -1
- package/build/services/AnalyticsService.js +3 -1
- package/build/services/ScenarioGenerationService.js +5 -5
- package/build/services/TestDiscoveryService.js +21 -5
- package/build/services/TestExecutionService.js +63 -21
- package/build/services/TestGenerationService.d.ts +1 -1
- package/build/services/TestGenerationService.js +43 -24
- package/build/skills/enhanceAssertionsSkill.d.ts +45 -0
- package/build/skills/enhanceAssertionsSkill.js +103 -0
- package/build/skills/fixTestImportErrorsSkill.d.ts +2 -2
- package/build/skills/fixTestImportErrorsSkill.js +2 -2
- package/build/skills/skillFiles.d.ts +38 -0
- package/build/skills/skillFiles.js +94 -0
- package/build/skills/validateAssertionAlignmentSkill.d.ts +34 -0
- package/build/skills/validateAssertionAlignmentSkill.js +59 -0
- package/build/tool-phases.js +4 -0
- package/build/tools/auth/loginTool.js +3 -1
- package/build/tools/auth/logoutTool.js +3 -1
- package/build/tools/code-refactor/alignAssertionsTool.d.ts +2 -0
- package/build/tools/code-refactor/alignAssertionsTool.js +51 -0
- package/build/tools/code-refactor/assertion-state.d.ts +1 -1
- package/build/tools/code-refactor/assertion-state.js +1 -1
- package/build/tools/code-refactor/assertionOperations.d.ts +44 -0
- package/build/tools/code-refactor/assertionOperations.js +82 -0
- package/build/tools/code-refactor/assertionSkillTools.d.ts +3 -0
- package/build/tools/code-refactor/assertionSkillTools.js +86 -0
- package/build/tools/code-refactor/codeReuseTool.js +27 -3
- package/build/tools/code-refactor/enhanceAssertionsTool.js +19 -83
- package/build/tools/code-refactor/gate-markers.d.ts +51 -0
- package/build/tools/code-refactor/gate-markers.js +95 -0
- package/build/tools/code-refactor/retrofit-state.d.ts +3 -1
- package/build/tools/code-refactor/retrofit-state.js +44 -2
- package/build/tools/code-refactor/reuse-outcome.d.ts +23 -1
- package/build/tools/code-refactor/reuse-outcome.js +36 -13
- package/build/tools/code-refactor/reuse-state.d.ts +90 -16
- package/build/tools/code-refactor/reuse-state.js +191 -61
- package/build/tools/code-refactor/utils-verify-gates.d.ts +4 -0
- package/build/tools/code-refactor/utils-verify-gates.js +252 -27
- package/build/tools/code-refactor/verify-gates.d.ts +15 -1
- package/build/tools/code-refactor/verify-gates.js +36 -4
- package/build/tools/enrichTestWithMocksTool.d.ts +1 -1
- package/build/tools/enrichTestWithMocksTool.js +9 -5
- package/build/tools/executeSkyrampTestTool.d.ts +22 -1
- package/build/tools/executeSkyrampTestTool.js +571 -271
- package/build/tools/execution-video-state.js +1 -1
- package/build/tools/fixErrorTool.js +5 -6
- package/build/tools/generate-tests/batchMockGenerationTool.js +1 -1
- package/build/tools/generate-tests/generateBatchScenarioRestTool.js +114 -73
- package/build/tools/generate-tests/generateContractRestTool.js +34 -16
- package/build/tools/generate-tests/generateE2ERestTool.d.ts +1 -0
- package/build/tools/generate-tests/generateE2ERestTool.js +9 -1
- package/build/tools/generate-tests/generateIntegrationRestTool.js +22 -7
- package/build/tools/generate-tests/generateMockRestTool.js +3 -1
- package/build/tools/generate-tests/generateUIRestTool.d.ts +2 -0
- package/build/tools/generate-tests/generateUIRestTool.js +11 -2
- package/build/tools/generate-tests/loadTestSchema.js +1 -3
- package/build/tools/generate-tests/planGuard.js +6 -3
- package/build/tools/generate-tests/scenarioFileIdentity.js +4 -1
- package/build/tools/generate-tests/scenarioLint.js +17 -5
- package/build/tools/generate-tests/trace-reuse-guard.js +5 -2
- package/build/tools/generateEnrichedIntegrationTestTool.js +9 -3
- package/build/tools/one-click/oneClickTool.js +3 -1
- package/build/tools/preflightMockCheckTool.js +23 -7
- package/build/tools/runExistingTestsTool.d.ts +1 -1
- package/build/tools/runExistingTestsTool.js +43 -21
- package/build/tools/submitReportTool.d.ts +51 -12
- package/build/tools/submitReportTool.js +860 -161
- package/build/tools/test-management/actionsTool.js +210 -51
- package/build/tools/test-management/analyzeChangesTool.d.ts +4 -5
- package/build/tools/test-management/analyzeChangesTool.js +127 -68
- package/build/tools/test-management/analyzeTestHealthTool.js +35 -13
- package/build/tools/test-management/registerTestPlanTool.d.ts +44 -34
- package/build/tools/test-management/registerTestPlanTool.js +255 -111
- package/build/tools/test-management/resolveScreenTool.js +33 -9
- package/build/tools/trace/startTraceCollectionTool.js +3 -1
- package/build/tools/trace/stopTraceCollectionTool.js +41 -5
- package/build/tools/verifyTestDependenciesTool.d.ts +3 -0
- package/build/tools/verifyTestDependenciesTool.js +54 -0
- package/build/tools/workspace/initScanWorkspaceTool.js +9 -3
- package/build/tools/workspace/initializeWorkspaceTool.js +3 -1
- package/build/types/AssertionOutcome.d.ts +1 -1
- package/build/types/EnhanceType.d.ts +6 -0
- package/build/types/EnhanceType.js +1 -0
- package/build/types/ExternalTestExecution.d.ts +2 -2
- package/build/types/RepositoryAnalysis.d.ts +0 -40
- package/build/types/ReuseOutcome.d.ts +96 -4
- package/build/types/ReuseOutcome.js +16 -0
- package/build/types/StepMethod.js +20 -6
- package/build/types/TestAnalysis.d.ts +10 -2
- package/build/types/TestExecution.d.ts +45 -0
- package/build/types/TestRecommendation.d.ts +1 -1
- package/build/types/TestRecommendation.js +4 -1
- package/build/types/TestTypes.d.ts +13 -0
- package/build/types/TestTypes.js +34 -3
- package/build/types/TestbotPromptOptions.d.ts +9 -1
- package/build/types/TestbotReport.d.ts +45 -9
- package/build/utils/AnalysisStateManager.d.ts +137 -27
- package/build/utils/AnalysisStateManager.js +227 -43
- package/build/utils/assertion-verify/api-shared-lints.js +34 -16
- package/build/utils/assertion-verify/metrics.js +39 -6
- package/build/utils/assertion-verify/ui-lints.js +4 -2
- package/build/utils/branchDiff.js +47 -12
- package/build/utils/canonicalJson.js +3 -1
- package/build/utils/dartRouteExtractor.js +36 -7
- package/build/utils/fixAttempts.d.ts +26 -0
- package/build/utils/fixAttempts.js +109 -0
- package/build/utils/frontendSelectors.js +23 -4
- package/build/utils/generatedTestRecord.d.ts +19 -0
- package/build/utils/generatedTestRecord.js +61 -0
- package/build/utils/gitStaging.js +7 -2
- package/build/utils/initAgent.js +26 -6
- package/build/utils/language-helper.js +39 -45
- package/build/utils/pathMatching.js +2 -1
- package/build/utils/pathSignatures.js +6 -2
- package/build/utils/planMatchKeys.d.ts +2 -2
- package/build/utils/planMatchKeys.js +20 -14
- package/build/utils/pom-catalog-parse.js +7 -2
- package/build/utils/pom-scope/import-expansion.js +6 -1
- package/build/utils/pom-scope/index.js +50 -12
- package/build/utils/pom-scope/scoring.js +13 -3
- package/build/utils/pom-scope/selector-extractor.js +16 -3
- package/build/utils/pom-scope/strip.d.ts +8 -0
- package/build/utils/pom-scope/strip.js +238 -0
- package/build/utils/pom-scope/testIdDiscovery.js +14 -2
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.d.ts +1 -1
- package/build/utils/pom-verify/__fixtures__/af-style/asset-list.page.js +4 -2
- package/build/utils/pom-verify/__fixtures__/af-style/report.iframe.page.js +3 -1
- package/build/utils/pom-verify/__fixtures__/af-style/workflow-footer.page.js +3 -1
- package/build/utils/pom-verify/bindings.js +5 -1
- package/build/utils/pom-verify/calls.js +9 -2
- package/build/utils/pom-verify/verify.js +27 -5
- package/build/utils/pr-comment-parser.js +20 -7
- package/build/utils/proxy-terminal.d.ts +19 -1
- package/build/utils/proxy-terminal.js +346 -21
- package/build/utils/removedUiElements.js +1 -1
- package/build/utils/reportLanguage.js +35 -7
- package/build/utils/reportVerification.d.ts +14 -8
- package/build/utils/reportVerification.js +19 -19
- package/build/utils/repositorySlug.d.ts +32 -0
- package/build/utils/repositorySlug.js +77 -0
- package/build/utils/reuseRouting.js +6 -2
- package/build/utils/runSerialized.d.ts +3 -0
- package/build/utils/runSerialized.js +39 -0
- package/build/utils/screenRoutes.js +74 -18
- package/build/utils/sourceRouteExtractor.js +13 -6
- package/build/utils/telemetry.d.ts +1 -0
- package/build/utils/telemetry.js +8 -5
- package/build/utils/testDependencyPolicy.d.ts +9 -0
- package/build/utils/testDependencyPolicy.js +788 -0
- package/build/utils/testExecutionRecord.d.ts +90 -0
- package/build/utils/testExecutionRecord.js +267 -0
- package/build/utils/testFileClassification.js +3 -1
- package/build/utils/trace-parser.js +62 -14
- package/build/utils/urlPath.js +3 -1
- package/build/utils/utils-verify/action-key.d.ts +4 -0
- package/build/utils/utils-verify/action-key.js +2 -2
- package/build/utils/utils-verify/allow.d.ts +122 -3
- package/build/utils/utils-verify/allow.js +146 -21
- package/build/utils/utils-verify/body-reach.d.ts +120 -0
- package/build/utils/utils-verify/body-reach.js +335 -0
- package/build/utils/utils-verify/call-sites.d.ts +6 -1
- package/build/utils/utils-verify/call-sites.js +72 -8
- package/build/utils/utils-verify/delivered-imports.d.ts +43 -0
- package/build/utils/utils-verify/delivered-imports.js +84 -0
- package/build/utils/utils-verify/fixed-sleep.d.ts +96 -0
- package/build/utils/utils-verify/fixed-sleep.js +461 -0
- package/build/utils/utils-verify/in-house.d.ts +93 -0
- package/build/utils/utils-verify/in-house.js +719 -0
- package/build/utils/utils-verify/incumbent.d.ts +3 -0
- package/build/utils/utils-verify/incumbent.js +75 -0
- package/build/utils/utils-verify/index.d.ts +1 -0
- package/build/utils/utils-verify/index.js +1 -0
- package/build/utils/utils-verify/language-spec.d.ts +26 -10
- package/build/utils/utils-verify/language-spec.js +217 -20
- package/build/utils/utils-verify/locate.d.ts +26 -0
- package/build/utils/utils-verify/locate.js +125 -23
- package/build/utils/utils-verify/module-name.d.ts +40 -0
- package/build/utils/utils-verify/module-name.js +98 -0
- package/build/utils/utils-verify/parse.d.ts +46 -6
- package/build/utils/utils-verify/parse.js +176 -38
- package/build/utils/utils-verify/retrofit-equivalence.d.ts +5 -0
- package/build/utils/utils-verify/retrofit-equivalence.js +4 -2
- package/build/utils/utils-verify/stage.d.ts +5 -0
- package/build/utils/utils-verify/stage.js +47 -2
- package/build/utils/utils-verify/status-once.d.ts +62 -0
- package/build/utils/utils-verify/status-once.js +207 -0
- package/build/utils/utils-verify/typecheck.d.ts +61 -0
- package/build/utils/utils-verify/typecheck.js +338 -0
- package/build/utils/utils-verify/verify.d.ts +76 -1
- package/build/utils/utils-verify/verify.js +516 -44
- package/build/utils/versions.d.ts +3 -3
- package/build/utils/versions.js +1 -1
- package/build/utils/workspaceAuth.js +107 -37
- package/build/workspace/queryParamResolution.js +11 -4
- package/build/workspace/workspace.js +7 -7
- package/node_modules/playwright/ThirdPartyNotices.txt +19 -19
- package/node_modules/playwright/lib/mcp/skyramp/assertTool.js +8 -2
- package/node_modules/playwright/lib/mcp/skyramp/common/cssValue.js +87 -0
- package/node_modules/playwright/lib/mcp/skyramp/loadTraceTool.js +31 -0
- package/node_modules/playwright/lib/mcp/skyramp/skyRampImport.js +3 -0
- package/node_modules/playwright/lib/mcp/skyramp/traceRecordingBackend.js +181 -15
- package/node_modules/playwright/lib/mcp/test/skyRampExport.js +24 -0
- package/node_modules/playwright/lib/transform/babelBundleImpl.js +2353 -190
- package/node_modules/playwright/node_modules/playwright-core/ThirdPartyNotices.txt +62 -34
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/.package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/dist/serve-static.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/@hono/node-server/package.json +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/README.md +16 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/index.js +4 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/read.js +17 -17
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/json.js +60 -32
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/raw.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/text.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/types/urlencoded.js +16 -20
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/lib/utils.js +18 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/body-parser/package.json +23 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/CHANGELOG.md +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/isObject.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/index.js +266 -45
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/schemes.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/lib/utils.js +396 -92
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/component-safe-serialization.test.js +163 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/equal.test.js +31 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/fixtures/uri-js-parse.json +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-canonical.test.js +34 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/ipv6-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-percent.test.js +77 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/malformed-urn.test.js +61 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/parse.test.js +7 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/reserved-path-normalization.test.js +109 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/scheme-validation.test.js +124 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security-normalization.test.js +101 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/security.test.js +301 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/urn-full-input.test.js +29 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/fast-uri/test/websocket-query-preservation.test.js +24 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/index.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hasown/package.json +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/base.js +44 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/components.js +25 -26
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/context.js +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/jsx/streaming.js +4 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/request.js +20 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +65 -59
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +71 -128
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router/utils.js +27 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/cookie.js +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/cjs/utils/url.js +19 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/client.js +30 -16
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/client/utils.js +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/context.js +32 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/accepts/accepts.js +36 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/proxy/index.js +4 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/ssg.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/ssg/utils.js +30 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/helper/streaming/sse.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/hono-base.js +10 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/base.js +41 -23
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/components.js +26 -27
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/context.js +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/render.js +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/dom/server.js +5 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/hooks/index.js +16 -13
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/intrinsic-element/components.js +4 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/jsx/streaming.js +5 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cache/index.js +103 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/compress/index.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/cors/index.js +17 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/csrf/index.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/digest.js +47 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/etag/index.js +7 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/language/language.js +10 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/pretty-json/index.js +3 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +16 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/request.js +21 -14
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/linear-router/router.js +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/pattern-router/router.js +3 -9
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/node.js +61 -58
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/router.js +77 -129
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/reg-exp-router/trie.js +14 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/node.js +47 -70
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/trie-router/router.js +3 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router/utils.js +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/router.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/client/types.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/context.d.ts +6 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/hono-base.d.ts +4 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/base.d.ts +7 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +4 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/node.d.ts +1 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router/utils.d.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/router.d.ts +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/types/utils/url.d.ts +5 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/accept.js +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/body.js +21 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/cookie.js +5 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/ipaddr.js +5 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/stream.js +12 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/dist/utils/url.js +17 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/hono/package.json +11 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/CHANGELOG.md +26 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/README.md +19 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/dist/qs.js +25 -25
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/parse.js +16 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/lib/utils.js +57 -11
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/package.json +8 -7
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/parse.js +419 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/qs/test/utils.js +206 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/README.md +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/index.js +5 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/package.json +10 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/index.js +8 -18
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/README.md +71 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/node_modules/type-is/package.json +9 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/mcp/package-lock.json +72 -41
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/.package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/README.md +23 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/index.js +265 -86
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/brace-expansion/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/README.md +173 -143
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.d.ts +11 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/address-error.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.d.ts +49 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js +79 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.d.ts +78 -5
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js +119 -24
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.d.ts +151 -10
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js +316 -90
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.d.ts +12 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js +45 -2
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.d.ts +14 -0
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js +50 -3
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/node_modules/ip-address/package.json +6 -4
- package/node_modules/playwright/node_modules/playwright-core/bundles/utils/package-lock.json +6 -6
- package/node_modules/playwright/node_modules/playwright-core/lib/cli/program.js +18 -9
- package/node_modules/playwright/node_modules/playwright-core/lib/mcpBundleImpl/index.js +47 -47
- package/node_modules/playwright/node_modules/playwright-core/lib/server/codegen/skyramp/jsonlReader.js +3 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/server/recorder/recorderRunner.js +42 -0
- package/node_modules/playwright/node_modules/playwright-core/lib/utilsBundleImpl/index.js +121 -121
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/{index.B7KbSQcC.js → index.BAkLd5DX.js} +1 -1
- package/node_modules/playwright/node_modules/playwright-core/lib/vite/traceViewer/index.html +1 -1
- package/node_modules/playwright/node_modules/playwright-core/package.json +1 -1
- package/node_modules/playwright/node_modules/playwright-core/src/cli/program.ts +31 -9
- package/node_modules/playwright/node_modules/playwright-core/src/server/codegen/skyramp/jsonlReader.ts +1 -0
- package/node_modules/playwright/node_modules/playwright-core/src/server/recorder/recorderRunner.ts +57 -1
- package/node_modules/playwright/package.json +2 -2
- package/package.json +7 -6
- package/plugin/prompts/code-reuse/hand-off.md +30 -0
- package/plugin/prompts/generate-tests/generation.md +1 -1
- package/plugin/prompts/plan-tests.md +14 -14
- package/plugin/prompts/testbot-task1.md +4 -2
- package/plugin/skills/enhance-assertions/SKILL.md +25 -0
- package/plugin/skills/enhance-assertions/reference/contract.md +51 -0
- package/plugin/skills/enhance-assertions/reference/integration.md +58 -0
- package/plugin/skills/enhance-assertions/reference/shared-rules.md +220 -0
- package/plugin/skills/enhance-assertions/reference/ui.md +373 -0
- package/plugin/skills/fix-test-import-errors/SKILL.md +44 -50
- package/plugin/skills/validate-assertion-alignment-post-execution/SKILL.md +32 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/checks.md +44 -0
- package/plugin/skills/validate-assertion-alignment-post-execution/reference/evidence.md +47 -0
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/contractProviderAssertionsPrompt.js +0 -29
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/integrationAssertionsPrompt.js +0 -36
- package/build/prompts/enhance-assertions/sharedAssertionRules.d.ts +0 -16
- package/build/prompts/enhance-assertions/sharedAssertionRules.js +0 -284
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.d.ts +0 -2
- package/build/prompts/enhance-assertions/uiAssertionsPrompt.js +0 -388
- package/node_modules/playwright/node_modules/playwright-core/.DS_Store +0 -0
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
import { paramName, parseUtilsFile, signatureParams, } from "./parse.js";
|
|
3
|
+
import { callText, generatedSiblings, REQUEST_CALL_RE, } from "./call-sites.js";
|
|
4
|
+
/** Words a fallback idiom spells that name no value: `x or {}`, `x ?? {}`,
|
|
5
|
+
* `x if x else None`. What remains after them is what the override actually sends. */
|
|
6
|
+
const OVERRIDE_FILLER = new Set([
|
|
7
|
+
"or",
|
|
8
|
+
"and",
|
|
9
|
+
"if",
|
|
10
|
+
"else",
|
|
11
|
+
"None",
|
|
12
|
+
"null",
|
|
13
|
+
"undefined",
|
|
14
|
+
"True",
|
|
15
|
+
"False",
|
|
16
|
+
"true",
|
|
17
|
+
"false",
|
|
18
|
+
]);
|
|
19
|
+
/**
|
|
20
|
+
* The TOP-LEVEL options of a request call, as `name -> value text`.
|
|
21
|
+
*
|
|
22
|
+
* Both SDK spellings: the keyword arguments of `send_request(url=…, body=…)`, and the
|
|
23
|
+
* properties of the single object `sendRequest({ url: …, body })` takes. A shorthand
|
|
24
|
+
* property's value is its own name, which is what makes it a shorthand.
|
|
25
|
+
*
|
|
26
|
+
* Top-level is the whole point, and a regex could not hold it. Reading `body` or
|
|
27
|
+
* `data_override` anywhere in the call text made an option's value run to the first
|
|
28
|
+
* `)` — so an argument written AFTER the override joined its value — and made a name
|
|
29
|
+
* of the same spelling nested inside ANOTHER option read as the SDK's own, which
|
|
30
|
+
* blocks a delivery over something that is not there.
|
|
31
|
+
*
|
|
32
|
+
* Not `signatureParams`: that reads a parameter list, does not unwrap the object the
|
|
33
|
+
* TypeScript SDK takes, and expects text whose strings its caller already blanked.
|
|
34
|
+
* Here the call is raw — a path literal can carry a comma or a brace — so the
|
|
35
|
+
* structure is walked on a blanked copy and each value is cut from the original.
|
|
36
|
+
*/
|
|
37
|
+
export function requestOptions(call) {
|
|
38
|
+
const out = new Map();
|
|
39
|
+
const inert = blankStringContents(call);
|
|
40
|
+
let from = inert.indexOf("(");
|
|
41
|
+
if (from === -1)
|
|
42
|
+
return out;
|
|
43
|
+
let to = matching(inert, from);
|
|
44
|
+
if (to === -1)
|
|
45
|
+
return out;
|
|
46
|
+
from += 1;
|
|
47
|
+
// `sendRequest({ … })` — one object argument, whose PROPERTIES are the options.
|
|
48
|
+
const inner = inert.slice(from, to);
|
|
49
|
+
const open = inner.indexOf("{");
|
|
50
|
+
if (open !== -1 && inner.slice(0, open).trim() === "") {
|
|
51
|
+
const close = matching(inert, from + open);
|
|
52
|
+
if (close !== -1 && inert.slice(close + 1, to).trim() === "") {
|
|
53
|
+
from += open + 1;
|
|
54
|
+
to = close;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
let depth = 0;
|
|
58
|
+
let cut = from;
|
|
59
|
+
const take = (stop) => {
|
|
60
|
+
const part = call.slice(cut, stop);
|
|
61
|
+
const named = /^\s*([A-Za-z_$][\w$]*)\s*[=:]\s*([\s\S]+)$/.exec(part);
|
|
62
|
+
if (named) {
|
|
63
|
+
if (!out.has(named[1]))
|
|
64
|
+
out.set(named[1], named[2].trim());
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const shorthand = /^\s*([A-Za-z_$][\w$]*)\s*$/.exec(part);
|
|
68
|
+
// First wins: a later option of one name does not replace the one in force.
|
|
69
|
+
if (shorthand && !out.has(shorthand[1]))
|
|
70
|
+
out.set(shorthand[1], shorthand[1]);
|
|
71
|
+
};
|
|
72
|
+
for (let i = from; i < to; i++) {
|
|
73
|
+
const ch = inert[i];
|
|
74
|
+
if ("([{".includes(ch))
|
|
75
|
+
depth++;
|
|
76
|
+
else if (")]}".includes(ch))
|
|
77
|
+
depth--;
|
|
78
|
+
else if (ch === "," && depth === 0) {
|
|
79
|
+
take(i);
|
|
80
|
+
cut = i + 1;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
take(to);
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
/** Index of the bracket closing the one at `open`, or -1 when it is unbalanced. */
|
|
87
|
+
function matching(text, open) {
|
|
88
|
+
let depth = 0;
|
|
89
|
+
for (let i = open; i < text.length; i++) {
|
|
90
|
+
if ("([{".includes(text[i]))
|
|
91
|
+
depth++;
|
|
92
|
+
else if (")]}".includes(text[i]) && --depth === 0)
|
|
93
|
+
return i;
|
|
94
|
+
}
|
|
95
|
+
return -1;
|
|
96
|
+
}
|
|
97
|
+
/** Offset-preserving blanking of string contents, so a comma or a bracket inside a
|
|
98
|
+
* path or a body literal is never read as structure. */
|
|
99
|
+
function blankStringContents(src) {
|
|
100
|
+
const out = src.split("");
|
|
101
|
+
let quote = "";
|
|
102
|
+
for (let i = 0; i < src.length; i++) {
|
|
103
|
+
const c = src[i];
|
|
104
|
+
if (quote) {
|
|
105
|
+
if (c === "\\") {
|
|
106
|
+
i++;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
if (c === quote)
|
|
110
|
+
quote = "";
|
|
111
|
+
else
|
|
112
|
+
out[i] = " ";
|
|
113
|
+
}
|
|
114
|
+
else if (c === '"' || c === "'" || c === "`")
|
|
115
|
+
quote = c;
|
|
116
|
+
}
|
|
117
|
+
return out.join("");
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The request's `body` option, as the text of its value, or `undefined` when the call
|
|
121
|
+
* sends no body.
|
|
122
|
+
*
|
|
123
|
+
* `shared-helper-policy` prescribes the object SHORTHAND as the canonical TypeScript
|
|
124
|
+
* form of body-form 2 — `updateOrder(client, orderId, body = DEFAULT_ORDER_BODY)`
|
|
125
|
+
* calling `sendRequest({ ..., body })` — so a reader that saw only `body:` judged the
|
|
126
|
+
* helper the prompt TEACHES as sending no body at all.
|
|
127
|
+
*/
|
|
128
|
+
export function bodyArgument(call) {
|
|
129
|
+
return requestOptions(call).get("body");
|
|
130
|
+
}
|
|
131
|
+
/** The request's override option, as the text of its value. Either spelling. */
|
|
132
|
+
export function overrideArgument(call) {
|
|
133
|
+
const options = requestOptions(call);
|
|
134
|
+
return options.get("data_override") ?? options.get("dataOverride");
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Whether a caller can change what this request sends, through the helper's signature.
|
|
138
|
+
*
|
|
139
|
+
* The question is whether the body DERIVES from a parameter, not which mechanism
|
|
140
|
+
* carried it there. Naming the mechanisms would answer the shapes already seen and
|
|
141
|
+
* mis-judge the next one: the body as the parameter, an override map, and a local
|
|
142
|
+
* template with the parameters interpolated into it are three ways to reach the same
|
|
143
|
+
* property, and there is no reason to think they are the last three.
|
|
144
|
+
*
|
|
145
|
+
* FAILS OPEN — this feeds a blocking gate, so every answer it cannot establish is
|
|
146
|
+
* `true`. A request with no body has nothing to reach; a signature it cannot read is
|
|
147
|
+
* not judged. Only a body it can see, built from no parameter at all, is false.
|
|
148
|
+
*
|
|
149
|
+
* `before` is the helper text that precedes the request call. A body passed by name
|
|
150
|
+
* is resolved there: generated code assigns the template immediately above the call,
|
|
151
|
+
* so a parameter that reaches the body appears between that assignment and the call.
|
|
152
|
+
*/
|
|
153
|
+
export function bodyReachable(call, params, before = "") {
|
|
154
|
+
if (params === undefined)
|
|
155
|
+
return true;
|
|
156
|
+
const value = bodyArgument(call);
|
|
157
|
+
if (value === undefined)
|
|
158
|
+
return true;
|
|
159
|
+
const names = new Set(params.map(paramName).filter(Boolean));
|
|
160
|
+
const mentionsParam = (text) => {
|
|
161
|
+
for (const m of text.matchAll(/[A-Za-z_$][\w$]*/g))
|
|
162
|
+
if (names.has(m[0]))
|
|
163
|
+
return true;
|
|
164
|
+
return false;
|
|
165
|
+
};
|
|
166
|
+
// The body IS a parameter.
|
|
167
|
+
if (names.has(value))
|
|
168
|
+
return true;
|
|
169
|
+
// The body is written at the call and names a parameter inside it.
|
|
170
|
+
if (mentionsParam(value))
|
|
171
|
+
return true;
|
|
172
|
+
// An override argument carries a parameter into the body.
|
|
173
|
+
const override = overrideArgument(call);
|
|
174
|
+
if (override !== undefined && mentionsParam(override))
|
|
175
|
+
return true;
|
|
176
|
+
// The body is passed by name: resolve it to its assignment in the helper and read
|
|
177
|
+
// from there to the call.
|
|
178
|
+
const assign = new RegExp(`\\b${value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b\\s*(?::[^=\\n]*)?=`).exec(before);
|
|
179
|
+
if (assign)
|
|
180
|
+
return mentionsParam(before.slice(assign.index + assign[0].length));
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The override parameter of a helper that reaches its own request body TWICE: once
|
|
185
|
+
* through a body parameter, and again through an override argument passed straight
|
|
186
|
+
* from the signature. `undefined` when the helper reaches its body through at most
|
|
187
|
+
* one of them.
|
|
188
|
+
*
|
|
189
|
+
* The prompt already states the rule — two body forms are offered and the helper
|
|
190
|
+
* takes "the FIRST one that reaches everything the callers need" — and nothing
|
|
191
|
+
* checked it. A body parameter reaches every property of the request body, so an
|
|
192
|
+
* override beside it can change nothing it cannot; carrying both is the hedge a run
|
|
193
|
+
* writes when no rule decides, and it is what made demoshop's `create_order` arity 5
|
|
194
|
+
* in one run and 4 in the other (testplan-run-9).
|
|
195
|
+
*
|
|
196
|
+
* The body must BE a parameter — form 2 as the policy states it. A body built at the
|
|
197
|
+
* call out of a parameter reaches only the properties it names, so an override beside
|
|
198
|
+
* it carries what the parameter cannot and the two are not one mechanism twice.
|
|
199
|
+
*
|
|
200
|
+
* The override must be a BARE PASS-THROUGH — the parameter and nothing else, a
|
|
201
|
+
* `or {}` / `?? {}` fallback aside. An override that BUILDS a map carries values the
|
|
202
|
+
* body parameter's default does not, which is the prompt's form 1 working; that is
|
|
203
|
+
* the shape a unique-suffix helper delivers, and it is not this fault.
|
|
204
|
+
*
|
|
205
|
+
* Reads the request call alone, never a body resolved from an assignment above it:
|
|
206
|
+
* this feeds a blocking gate, and the direct form is the one that cannot be read two
|
|
207
|
+
* ways.
|
|
208
|
+
*/
|
|
209
|
+
export function bodyReachedTwice(call, params) {
|
|
210
|
+
if (params === undefined)
|
|
211
|
+
return undefined;
|
|
212
|
+
const bodyValue = bodyArgument(call);
|
|
213
|
+
const expr = overrideArgument(call);
|
|
214
|
+
if (bodyValue === undefined || expr === undefined)
|
|
215
|
+
return undefined;
|
|
216
|
+
const names = new Set(params.map(paramName).filter(Boolean));
|
|
217
|
+
const identifiers = (text) => [...text.matchAll(/[A-Za-z_$][\w$]*/g)].map((m) => m[0]);
|
|
218
|
+
// The body option must BE a parameter, not merely mention one. The rule's whole
|
|
219
|
+
// claim is that a whole-body parameter reaches every property the override could;
|
|
220
|
+
// a body BUILT from a parameter (`body: { title }`) reaches one property and
|
|
221
|
+
// leaves every other to the override, which is then not redundant at all — and
|
|
222
|
+
// the remediation this finding carries, delete the override, would break the
|
|
223
|
+
// helper. Anything else fails open.
|
|
224
|
+
const body = bodyValue.trim();
|
|
225
|
+
if (!names.has(body))
|
|
226
|
+
return undefined;
|
|
227
|
+
// A brace holding anything at all builds a map of its own — an object literal, a
|
|
228
|
+
// dict, or the TypeScript shorthand `{ name }`. `{}` is the empty fallback.
|
|
229
|
+
if (/\{\s*[^}\s]/.test(expr))
|
|
230
|
+
return undefined;
|
|
231
|
+
const carried = identifiers(expr).filter((id) => !OVERRIDE_FILLER.has(id));
|
|
232
|
+
if (carried.length !== 1 || !names.has(carried[0]))
|
|
233
|
+
return undefined;
|
|
234
|
+
const name = carried[0];
|
|
235
|
+
// One parameter named twice is one mechanism, not two.
|
|
236
|
+
return name === body ? undefined : name;
|
|
237
|
+
}
|
|
238
|
+
/** Every helper in the located modules that reaches its request body twice. Never
|
|
239
|
+
* throws; a file it cannot read contributes nothing. */
|
|
240
|
+
export async function findDuplicateBodyReach(utilsFiles, spec) {
|
|
241
|
+
const out = [];
|
|
242
|
+
for (const utilsFile of utilsFiles) {
|
|
243
|
+
let content;
|
|
244
|
+
try {
|
|
245
|
+
content = await fs.promises.readFile(utilsFile, "utf8");
|
|
246
|
+
}
|
|
247
|
+
catch {
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
for (const h of parseUtilsFile(content, spec)) {
|
|
251
|
+
const call = helperRequest(content, h);
|
|
252
|
+
if (!call)
|
|
253
|
+
continue;
|
|
254
|
+
const override = bodyReachedTwice(call, signatureParams(helperSignature(content, h)));
|
|
255
|
+
if (override)
|
|
256
|
+
out.push({ helper: h.name, utilsFile, line: h.line, override });
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return out;
|
|
260
|
+
}
|
|
261
|
+
/** The helper's own request call, or undefined when it issues none. */
|
|
262
|
+
function helperRequest(content, helper) {
|
|
263
|
+
for (const m of content.matchAll(new RegExp(REQUEST_CALL_RE))) {
|
|
264
|
+
const start = m.index ?? 0;
|
|
265
|
+
const line = content.slice(0, start).split("\n").length;
|
|
266
|
+
if (line < helper.line || line > helper.endLine)
|
|
267
|
+
continue;
|
|
268
|
+
return callText(content, start + m[0].length - 1);
|
|
269
|
+
}
|
|
270
|
+
return undefined;
|
|
271
|
+
}
|
|
272
|
+
/** The helper's text from its definition to its request call — where a body passed
|
|
273
|
+
* by name is assigned. */
|
|
274
|
+
function helperTextBefore(content, helper, call) {
|
|
275
|
+
const body = content
|
|
276
|
+
.split("\n")
|
|
277
|
+
.slice(helper.line - 1, helper.endLine)
|
|
278
|
+
.join("\n");
|
|
279
|
+
const at = body.indexOf(call);
|
|
280
|
+
return at === -1 ? body : body.slice(0, at);
|
|
281
|
+
}
|
|
282
|
+
/** The signature text of a helper, as signatureParams reads it. */
|
|
283
|
+
function helperSignature(content, helper) {
|
|
284
|
+
return content.split("\n").slice(helper.line - 1, helper.endLine);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Shared helpers whose body no parameter reaches, each paired with a sibling spec
|
|
288
|
+
* that defines its own helper for the same route. Never throws; fails open to [].
|
|
289
|
+
*/
|
|
290
|
+
export async function findUnreachableBodies(testFile, utilsFiles, spec, preReadSiblings) {
|
|
291
|
+
const frozen = new Map();
|
|
292
|
+
for (const utilsFile of utilsFiles) {
|
|
293
|
+
let content;
|
|
294
|
+
try {
|
|
295
|
+
content = await fs.promises.readFile(utilsFile, "utf8");
|
|
296
|
+
}
|
|
297
|
+
catch {
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
for (const h of parseUtilsFile(content, spec)) {
|
|
301
|
+
if (!h.method || !h.normalizedPath)
|
|
302
|
+
continue;
|
|
303
|
+
const call = helperRequest(content, h);
|
|
304
|
+
if (!call)
|
|
305
|
+
continue;
|
|
306
|
+
if (bodyReachable(call, signatureParams(helperSignature(content, h)), helperTextBefore(content, h, call)))
|
|
307
|
+
continue;
|
|
308
|
+
frozen.set(`${h.method} ${h.normalizedPath}`, {
|
|
309
|
+
helper: h.name,
|
|
310
|
+
utilsFile,
|
|
311
|
+
method: h.method,
|
|
312
|
+
path: h.path ?? h.normalizedPath,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (frozen.size === 0)
|
|
317
|
+
return [];
|
|
318
|
+
// The delivered spec is one of the callers, so the walk includes it.
|
|
319
|
+
const siblings = preReadSiblings ??
|
|
320
|
+
(await generatedSiblings(testFile, spec, { includeSelf: true }));
|
|
321
|
+
const out = [];
|
|
322
|
+
for (const { file, content } of siblings) {
|
|
323
|
+
for (const h of parseUtilsFile(content, spec)) {
|
|
324
|
+
if (/^test/i.test(h.name))
|
|
325
|
+
continue;
|
|
326
|
+
if (!h.method || !h.normalizedPath)
|
|
327
|
+
continue;
|
|
328
|
+
const held = frozen.get(`${h.method} ${h.normalizedPath}`);
|
|
329
|
+
if (!held)
|
|
330
|
+
continue;
|
|
331
|
+
out.push({ ...held, rivalFile: file, rivalHelper: h.name });
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return out;
|
|
335
|
+
}
|
|
@@ -135,7 +135,12 @@ export declare function queryKeys(call: string): Set<string>;
|
|
|
135
135
|
* this is a TS/JS-only change. */
|
|
136
136
|
export declare function callShape(call: string): Set<string>;
|
|
137
137
|
/** The keyword names of a request call (`path=`, `method=`, `query_params=` … / TS
|
|
138
|
-
* object keys), less the liftable ones — a cheap normalised call shape.
|
|
138
|
+
* object keys), less the liftable ones — a cheap normalised call shape. Read from a
|
|
139
|
+
* string-blanked copy: a value carries colons and equals signs of its own — a URL
|
|
140
|
+
* scheme (`"https://…"`), a query string or a field expression in a path literal
|
|
141
|
+
* (`"/search?q=name:foo"`) — and reading one as a keyword invents an entry on
|
|
142
|
+
* whichever side spells the value that way, so two calls carrying the same keywords
|
|
143
|
+
* compare as different shapes. */
|
|
139
144
|
export declare function shapeKeys(call: string): Set<string>;
|
|
140
145
|
/** Text of the parenthesised argument list starting at the `(` at `open`. */
|
|
141
146
|
export declare function callText(content: string, open: number): string;
|
|
@@ -82,7 +82,7 @@ export async function findSiblingInlineCallSites(testFile, utilsFiles, _helpers,
|
|
|
82
82
|
const match = byRoute.get(c.key);
|
|
83
83
|
if (!match)
|
|
84
84
|
continue;
|
|
85
|
-
if (!sameShape(
|
|
85
|
+
if (!sameShape(inlineShape(c.call), match.keys))
|
|
86
86
|
continue;
|
|
87
87
|
if (!substitutable(match, {
|
|
88
88
|
fields: requestFields(content, c.call, c.start),
|
|
@@ -166,7 +166,7 @@ async function helperRoutes(utilsFiles, spec) {
|
|
|
166
166
|
byRoute.set(`${owner.method} ${owner.normalizedPath}`, {
|
|
167
167
|
helper: owner.name,
|
|
168
168
|
utilsFile,
|
|
169
|
-
keys:
|
|
169
|
+
keys: inlineShape(call),
|
|
170
170
|
fields: requestFields(content, call, start),
|
|
171
171
|
query: queryKeys(call),
|
|
172
172
|
schemaChecked: hasSchemaCheck(content, owner.line, owner.endLine),
|
|
@@ -356,11 +356,25 @@ export function requestFields(content, call, callAt) {
|
|
|
356
356
|
}
|
|
357
357
|
const OVERRIDE_OBJECT_RE = /\b(?:data_override|dataOverride)\s*[=:]\s*\{/g;
|
|
358
358
|
const BODY_OBJECT_RE = /\b(?:body|data)\s*[=:]\s*\{/g;
|
|
359
|
-
|
|
359
|
+
/** The keyword a query object is written under, in either spelling. */
|
|
360
|
+
const QUERY_KEYWORDS = ["query_params", "queryParams"];
|
|
361
|
+
const QUERY_OBJECT_RE = new RegExp(`\\b(?:${QUERY_KEYWORDS.join("|")})\\s*[=:]\\s*\\{`, "g");
|
|
362
|
+
/** An object ENTRY whose key queryKeys cannot enumerate: a spread or an unpack of
|
|
363
|
+
* another value (`{ ...params }`, `{**params}`), or a computed key (`{ [k]: v }`).
|
|
364
|
+
* Anchored to an entry position, so an array VALUE (`{ fields: ["id"] }`, which the
|
|
365
|
+
* generated code writes) and a `**` exponent inside one are not mistaken for it. */
|
|
366
|
+
const DYNAMIC_ENTRY_RE = /[{,]\s*(?:\.\.\.|\*\*|\[)/;
|
|
367
|
+
/** The query argument however it is written — the object form above, or a reference
|
|
368
|
+
* (`query_params=params`) whose contents are not at the call. */
|
|
369
|
+
const QUERY_ARGUMENT_RE = new RegExp(`\\b(?:${QUERY_KEYWORDS.join("|")})\\s*[=:]`, "g");
|
|
360
370
|
/** A bare identifier between `{`/`,` and `,`/`}` — TS object shorthand. */
|
|
361
371
|
const SHORTHAND_KEY_RE = /(?:^|[{,])\s*([A-Za-z_$][\w$]*)\s*(?=[,}])/g;
|
|
362
|
-
/** One quoted string, any of the three
|
|
363
|
-
|
|
372
|
+
/** One quoted string: a Python triple quote, or any of the three single-character
|
|
373
|
+
* quote kinds, escapes honoured. The triple forms come FIRST — read as one quote,
|
|
374
|
+
* a triple delimiter opens an EMPTY string at its first two characters and leaves
|
|
375
|
+
* the payload outside any literal, where every scan that reads a blanked copy sees
|
|
376
|
+
* its contents as code. Generated Python passes the request body this way. */
|
|
377
|
+
const STRING_LITERAL_RE = /("""|'''|["'`])(?:\\.|(?!\1)[^\\])*\1/g;
|
|
364
378
|
/** The key names written in one `{…}` object literal: quoted (`"page":`, either
|
|
365
379
|
* language), unquoted (`page:`, TS) and shorthand (`page,`, TS). The unquoted and
|
|
366
380
|
* shorthand passes run with string CONTENTS blanked, so `q: "a, b: c"` names one
|
|
@@ -408,7 +422,7 @@ function keyedObjects(call, keyRe) {
|
|
|
408
422
|
/** `text` with the CONTENTS of every string literal replaced by spaces, quotes kept,
|
|
409
423
|
* length preserved — so offsets found on the copy index into the original. */
|
|
410
424
|
function blankStringContents(text) {
|
|
411
|
-
return text.replace(STRING_LITERAL_RE, (
|
|
425
|
+
return text.replace(STRING_LITERAL_RE, (lit, quote) => quote + " ".repeat(Math.max(0, lit.length - 2 * quote.length)) + quote);
|
|
412
426
|
}
|
|
413
427
|
/** The call shape both sibling scans compare: shapeKeys of the call with the interior
|
|
414
428
|
* of every keyed `{…}` value blanked, so the keys INSIDE a body, path-params or
|
|
@@ -422,6 +436,51 @@ function blankStringContents(text) {
|
|
|
422
436
|
export function callShape(call) {
|
|
423
437
|
return shapeKeys(withoutKeyedLiterals(call));
|
|
424
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* The shape the INLINE CALL-SITE scan compares: `callShape` less the query argument.
|
|
441
|
+
*
|
|
442
|
+
* A query object is a literal the merge rule lifts, exactly as a body is — a site
|
|
443
|
+
* writing `?status=paid` against a helper that sends no query differs from it by one
|
|
444
|
+
* value, and the repair is a `status` parameter. Whether the helper can stand in is
|
|
445
|
+
* the question `substitutable` answers, and it already applies the body rule to the
|
|
446
|
+
* query keys; while the keyword itself counted as shape, the two keyword sets differed
|
|
447
|
+
* by one entry, `sameShape` discarded the site, and `substitutable` never saw it.
|
|
448
|
+
*
|
|
449
|
+
* Only this scan sets it aside. findUnextractedDuplicates asks whether a helper should
|
|
450
|
+
* EXIST, where two sites that carry different options are two shapes rather than one
|
|
451
|
+
* literal to lift, so it keeps `callShape`. And LIFTABLE_KEYS is left alone: it also
|
|
452
|
+
* feeds retrofit-equivalence, which reads `shapeKeys` as an exact-match gate on an
|
|
453
|
+
* edit already made, where a dropped query IS a changed request.
|
|
454
|
+
*/
|
|
455
|
+
function inlineShape(call) {
|
|
456
|
+
const keys = callShape(call);
|
|
457
|
+
if (!queryIsReadable(call))
|
|
458
|
+
return keys;
|
|
459
|
+
for (const k of QUERY_KEYWORDS)
|
|
460
|
+
keys.delete(k);
|
|
461
|
+
return keys;
|
|
462
|
+
}
|
|
463
|
+
/** Whether every query argument the call carries is a `{…}` written at the call, so
|
|
464
|
+
* queryKeys can read its names. A reference (`query_params=params`) yields an EMPTY
|
|
465
|
+
* key set, which is what a call sending NO query yields: setting the keyword aside
|
|
466
|
+
* would have substitutable compare nothing against nothing and offer the helper to a
|
|
467
|
+
* site that sends no query, when substituting it adds whatever the reference holds.
|
|
468
|
+
* So the keyword stays in the shape whenever its value cannot be read, and the site
|
|
469
|
+
* is discarded as it was before — the scan only ever drops candidates. */
|
|
470
|
+
function queryIsReadable(call) {
|
|
471
|
+
// Counted at OPTION level: a request field of the payload may be named
|
|
472
|
+
// `queryParams`, and reading that as a second, unreadable query argument discarded
|
|
473
|
+
// a site whose own query argument is a plain object literal. withoutKeyedLiterals
|
|
474
|
+
// blanks each keyed value's interior while keeping its own braces, which is the
|
|
475
|
+
// level callShape reads the keywords at.
|
|
476
|
+
const scan = blankStringContents(withoutKeyedLiterals(call));
|
|
477
|
+
if ([...scan.matchAll(QUERY_ARGUMENT_RE)].length !==
|
|
478
|
+
[...scan.matchAll(QUERY_OBJECT_RE)].length)
|
|
479
|
+
return false;
|
|
480
|
+
// An object literal is not the same as a readable one. The interiors are blanked in
|
|
481
|
+
// `scan`, so the entries are read from the original.
|
|
482
|
+
return !keyedObjects(call, QUERY_OBJECT_RE).some((o) => DYNAMIC_ENTRY_RE.test(blankStringContents(o)));
|
|
483
|
+
}
|
|
425
484
|
/** `call` with the interior of every keyed `{…}` value blanked, offsets kept. */
|
|
426
485
|
function withoutKeyedLiterals(call) {
|
|
427
486
|
// Balanced on the string-blanked copy (see keyedObjects); the copy and the output
|
|
@@ -469,10 +528,15 @@ const LIFTABLE_KEYS = new Set([
|
|
|
469
528
|
"pathParams",
|
|
470
529
|
]);
|
|
471
530
|
/** The keyword names of a request call (`path=`, `method=`, `query_params=` … / TS
|
|
472
|
-
* object keys), less the liftable ones — a cheap normalised call shape.
|
|
531
|
+
* object keys), less the liftable ones — a cheap normalised call shape. Read from a
|
|
532
|
+
* string-blanked copy: a value carries colons and equals signs of its own — a URL
|
|
533
|
+
* scheme (`"https://…"`), a query string or a field expression in a path literal
|
|
534
|
+
* (`"/search?q=name:foo"`) — and reading one as a keyword invents an entry on
|
|
535
|
+
* whichever side spells the value that way, so two calls carrying the same keywords
|
|
536
|
+
* compare as different shapes. */
|
|
473
537
|
export function shapeKeys(call) {
|
|
474
538
|
const keys = new Set();
|
|
475
|
-
for (const m of call.matchAll(/\b([A-Za-z_]\w*)\s*[=:](?![=])/g)) {
|
|
539
|
+
for (const m of blankStringContents(call).matchAll(/\b([A-Za-z_]\w*)\s*[=:](?![=])/g)) {
|
|
476
540
|
if (!LIFTABLE_KEYS.has(m[1]))
|
|
477
541
|
keys.add(m[1]);
|
|
478
542
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a DELIVERED test file imports from the shared utils modules beside it —
|
|
3
|
+
* read from the file, with no run state and no verify pass behind it.
|
|
4
|
+
*
|
|
5
|
+
* This exists because the report's shared-helper record was keyed on the agent
|
|
6
|
+
* having called `skyramp_reuse_code` with `verify: true` on that file. A spec that
|
|
7
|
+
* imports and calls a helper from a header-bearing module reused it whether or not
|
|
8
|
+
* anything verified it, and a record keyed on the tool's own activity describes the
|
|
9
|
+
* tool rather than the product: every contract row in the 2026-09-18 cohort read
|
|
10
|
+
* `reuse: null` over a file that imported three helpers and called them.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately NOT a second verifier. It runs no gate, produces no verdict, and
|
|
13
|
+
* cannot refuse a report — `verifyUtils` remains the only thing that judges a
|
|
14
|
+
* module. The one fact it establishes is which helpers the delivered file takes
|
|
15
|
+
* from which module, which is exactly the fact the record was missing.
|
|
16
|
+
*
|
|
17
|
+
* The same "imported AND defined" rule `verifyUtils` applies: a name the spec
|
|
18
|
+
* imports that the module does not define is a broken import, not reuse.
|
|
19
|
+
*/
|
|
20
|
+
export interface DeliveredImports {
|
|
21
|
+
/** Utils files located for the spec (absolute, sorted). Empty means no shared
|
|
22
|
+
* module exists beside it or in its imports — which is a finding, not a failure. */
|
|
23
|
+
utilsFiles: string[];
|
|
24
|
+
/** Names the spec imports from those files that the files define, sorted and
|
|
25
|
+
* deduplicated across files. Empty with a non-empty `utilsFiles` means a module
|
|
26
|
+
* exists and this spec takes nothing from it. */
|
|
27
|
+
importedNames: string[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Read `testFile`'s imports of its shared modules, or state why it could not be done.
|
|
31
|
+
*
|
|
32
|
+
* Returns a `reason` rather than throwing or answering an empty result, because the
|
|
33
|
+
* caller writes that reason into the report row: an empty answer and an unreadable
|
|
34
|
+
* file are different facts, and a row that cannot tell them apart is the `null` this
|
|
35
|
+
* function exists to replace.
|
|
36
|
+
*/
|
|
37
|
+
export declare function readDeliveredImports(params: {
|
|
38
|
+
testFile: string;
|
|
39
|
+
language?: string;
|
|
40
|
+
cwd?: string;
|
|
41
|
+
}): Promise<DeliveredImports | {
|
|
42
|
+
reason: string;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { logger } from "../logger.js";
|
|
4
|
+
import { locateUtilsFiles } from "./locate.js";
|
|
5
|
+
import { parseUtilsFile } from "./parse.js";
|
|
6
|
+
import { utilsSpecFor, utilsSpecForFile } from "./language-spec.js";
|
|
7
|
+
/**
|
|
8
|
+
* Read `testFile`'s imports of its shared modules, or state why it could not be done.
|
|
9
|
+
*
|
|
10
|
+
* Returns a `reason` rather than throwing or answering an empty result, because the
|
|
11
|
+
* caller writes that reason into the report row: an empty answer and an unreadable
|
|
12
|
+
* file are different facts, and a row that cannot tell them apart is the `null` this
|
|
13
|
+
* function exists to replace.
|
|
14
|
+
*/
|
|
15
|
+
export async function readDeliveredImports(params) {
|
|
16
|
+
const spec = utilsSpecFor(params.language) ?? utilsSpecForFile(params.testFile);
|
|
17
|
+
if (!spec)
|
|
18
|
+
return {
|
|
19
|
+
reason: `no shared-helper support for this file type (${path.extname(params.testFile) || "no extension"})`,
|
|
20
|
+
};
|
|
21
|
+
let specContent;
|
|
22
|
+
try {
|
|
23
|
+
specContent = await fs.promises.readFile(params.testFile, "utf8");
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
return {
|
|
27
|
+
reason: `the delivered file could not be read (${err?.code ?? String(err)})`,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
let utilsFiles;
|
|
31
|
+
try {
|
|
32
|
+
utilsFiles = await locateUtilsFiles(params);
|
|
33
|
+
}
|
|
34
|
+
catch (err) {
|
|
35
|
+
// locateUtilsFiles is documented never to throw; if that ever changes, the row
|
|
36
|
+
// says so rather than claiming the spec imports nothing.
|
|
37
|
+
logger.warning("Could not locate shared utils files for a delivered test", {
|
|
38
|
+
testFile: params.testFile,
|
|
39
|
+
error: String(err),
|
|
40
|
+
});
|
|
41
|
+
return {
|
|
42
|
+
reason: "the shared modules beside this test could not be located",
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
const importedNames = new Set();
|
|
46
|
+
// Built from the modules actually READ, never from the located list. A module that
|
|
47
|
+
// is named but whose helpers were never counted publishes "this test takes nothing
|
|
48
|
+
// from it" over an unknown — the same false zero this reader exists to stop.
|
|
49
|
+
const read = [];
|
|
50
|
+
for (const file of utilsFiles) {
|
|
51
|
+
let content;
|
|
52
|
+
try {
|
|
53
|
+
content = await fs.promises.readFile(file, "utf8");
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
// A module that vanished between locating and reading is the ordinary race, not
|
|
57
|
+
// a fault: it leaves the list with the rest, and the others still answer.
|
|
58
|
+
if (err?.code === "ENOENT")
|
|
59
|
+
continue;
|
|
60
|
+
// Anything else means a module exists that cannot be read, so what this spec
|
|
61
|
+
// takes from it is unknown. A partial answer cannot be represented here, and
|
|
62
|
+
// a silent one would be read as a measured zero.
|
|
63
|
+
//
|
|
64
|
+
// Untested, and untestable from outside: `locateUtilsFiles` screens every
|
|
65
|
+
// candidate with `hasUtilsHeader`, which opens and reads it, so a module that
|
|
66
|
+
// cannot be read is never located and this branch is not reached. It stands as
|
|
67
|
+
// the guard that keeps `read` below honest if that screen ever changes.
|
|
68
|
+
logger.warning("Could not read a located utils file for the report", {
|
|
69
|
+
file,
|
|
70
|
+
error: String(err),
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
reason: `a shared helper module beside this test could not be read (${path.basename(file)}: ${err?.code ?? String(err)})`,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
read.push(file);
|
|
77
|
+
const defined = new Set(parseUtilsFile(content, spec).map((h) => h.name));
|
|
78
|
+
const stem = path.basename(file).replace(/\.[^.]+$/, "");
|
|
79
|
+
for (const n of spec.importedNames(specContent, stem))
|
|
80
|
+
if (defined.has(n))
|
|
81
|
+
importedNames.add(n);
|
|
82
|
+
}
|
|
83
|
+
return { utilsFiles: read, importedNames: [...importedNames].sort() };
|
|
84
|
+
}
|