@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
|
@@ -69,6 +69,18 @@ var booleanAttributes = [
|
|
|
69
69
|
"reversed",
|
|
70
70
|
"selected"
|
|
71
71
|
];
|
|
72
|
+
var resolveFunctionComponentResult = (result, suspendedContext) => result.then((resolved) => {
|
|
73
|
+
if (typeof resolved !== "string" && !Array.isArray(resolved) && !(resolved instanceof JSXNode)) {
|
|
74
|
+
return resolved;
|
|
75
|
+
}
|
|
76
|
+
const children = Array.isArray(resolved) ? resolved : [resolved];
|
|
77
|
+
const render = () => {
|
|
78
|
+
const buffer = [""];
|
|
79
|
+
childrenToStringToBuffer(children, buffer);
|
|
80
|
+
return buffer.length === 1 ? raw(buffer[0], buffer.callbacks) : stringBufferToString(buffer, buffer.callbacks);
|
|
81
|
+
};
|
|
82
|
+
return suspendedContext ? suspendedContext(render) : runWithRenderContext(render);
|
|
83
|
+
});
|
|
72
84
|
var childrenToStringToBuffer = (children, buffer) => {
|
|
73
85
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
74
86
|
const child = children[i];
|
|
@@ -78,9 +90,17 @@ var childrenToStringToBuffer = (children, buffer) => {
|
|
|
78
90
|
continue;
|
|
79
91
|
} else if (child instanceof JSXNode) {
|
|
80
92
|
child.toStringToBuffer(buffer);
|
|
81
|
-
} else if (typeof child === "number"
|
|
93
|
+
} else if (typeof child === "number") {
|
|
94
|
+
;
|
|
95
|
+
buffer[0] += child;
|
|
96
|
+
} else if (child.isEscaped) {
|
|
82
97
|
;
|
|
83
98
|
buffer[0] += child;
|
|
99
|
+
const callbacks = child.callbacks;
|
|
100
|
+
if (callbacks) {
|
|
101
|
+
buffer.callbacks ||= [];
|
|
102
|
+
buffer.callbacks.push(...callbacks);
|
|
103
|
+
}
|
|
84
104
|
} else if (child instanceof Promise) {
|
|
85
105
|
buffer.unshift("", child);
|
|
86
106
|
} else {
|
|
@@ -88,13 +108,23 @@ var childrenToStringToBuffer = (children, buffer) => {
|
|
|
88
108
|
}
|
|
89
109
|
}
|
|
90
110
|
};
|
|
111
|
+
var renderChildren = (children) => runWithRenderContext(() => {
|
|
112
|
+
const buffer = [""];
|
|
113
|
+
childrenToStringToBuffer(children, buffer);
|
|
114
|
+
return buffer.length === 1 ? raw(buffer[0], buffer.callbacks) : stringBufferToString(buffer, buffer.callbacks);
|
|
115
|
+
});
|
|
116
|
+
var isUntrustedObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof JSXNode) && !(value instanceof Promise) && !value.isEscaped && typeof value.toString === "function";
|
|
117
|
+
var renderUntrustedObject = (value) => {
|
|
118
|
+
const stringified = value.toString();
|
|
119
|
+
const escape = (result) => renderChildren([String(result)]);
|
|
120
|
+
return stringified instanceof Promise ? stringified.then(escape) : escape(stringified);
|
|
121
|
+
};
|
|
91
122
|
var JSXNode = class {
|
|
92
123
|
tag;
|
|
93
124
|
props;
|
|
94
125
|
key;
|
|
95
126
|
children;
|
|
96
127
|
isEscaped = true;
|
|
97
|
-
suspendedContext;
|
|
98
128
|
constructor(tag, props, children) {
|
|
99
129
|
if (typeof tag !== "function" && !isValidTagName(tag)) {
|
|
100
130
|
throw new Error(`Invalid JSX tag name: ${tag}`);
|
|
@@ -117,7 +147,7 @@ var JSXNode = class {
|
|
|
117
147
|
this.toStringToBuffer(buffer);
|
|
118
148
|
return buffer.length === 1 ? "callbacks" in buffer ? resolveCallbackSync(raw(buffer[0], buffer.callbacks)).toString() : buffer[0] : stringBufferToString(buffer, buffer.callbacks);
|
|
119
149
|
};
|
|
120
|
-
return
|
|
150
|
+
return runWithRenderContext(render);
|
|
121
151
|
}
|
|
122
152
|
toStringToBuffer(buffer) {
|
|
123
153
|
const tag = this.tag;
|
|
@@ -191,21 +221,14 @@ var JSXFunctionNode = class extends JSXNode {
|
|
|
191
221
|
return;
|
|
192
222
|
} else if (res instanceof Promise) {
|
|
193
223
|
if (globalContexts.length === 0) {
|
|
194
|
-
buffer.unshift("", res);
|
|
224
|
+
buffer.unshift("", resolveFunctionComponentResult(res));
|
|
195
225
|
} else {
|
|
196
|
-
|
|
197
|
-
buffer.unshift(
|
|
198
|
-
"",
|
|
199
|
-
res.then((childRes) => {
|
|
200
|
-
if (childRes instanceof JSXNode) {
|
|
201
|
-
childRes.suspendedContext = suspendedContext;
|
|
202
|
-
}
|
|
203
|
-
return childRes;
|
|
204
|
-
})
|
|
205
|
-
);
|
|
226
|
+
buffer.unshift("", resolveFunctionComponentResult(res, captureRenderContext()));
|
|
206
227
|
}
|
|
207
228
|
} else if (res instanceof JSXNode) {
|
|
208
229
|
res.toStringToBuffer(buffer);
|
|
230
|
+
} else if (Array.isArray(res)) {
|
|
231
|
+
childrenToStringToBuffer(res, buffer);
|
|
209
232
|
} else if (typeof res === "number" || res.isEscaped) {
|
|
210
233
|
buffer[0] += res;
|
|
211
234
|
if (res.callbacks) {
|
|
@@ -284,15 +307,7 @@ var shallowEqual = (a, b) => {
|
|
|
284
307
|
return true;
|
|
285
308
|
};
|
|
286
309
|
var memo = (component, propsAreEqual = shallowEqual) => {
|
|
287
|
-
|
|
288
|
-
let prevProps = void 0;
|
|
289
|
-
const wrapper = ((props) => {
|
|
290
|
-
if (prevProps && !propsAreEqual(prevProps, props)) {
|
|
291
|
-
computed = null;
|
|
292
|
-
}
|
|
293
|
-
prevProps = props;
|
|
294
|
-
return computed ||= component(props);
|
|
295
|
-
});
|
|
310
|
+
const wrapper = ((props) => component(props));
|
|
296
311
|
wrapper[DOM_MEMO] = propsAreEqual;
|
|
297
312
|
wrapper[DOM_RENDERER] = component;
|
|
298
313
|
return wrapper;
|
|
@@ -333,10 +348,13 @@ export {
|
|
|
333
348
|
booleanAttributes,
|
|
334
349
|
cloneElement,
|
|
335
350
|
getNameSpaceContext,
|
|
351
|
+
isUntrustedObject,
|
|
336
352
|
isValidElement,
|
|
337
353
|
jsx,
|
|
338
354
|
jsxFn,
|
|
339
355
|
memo,
|
|
340
356
|
reactAPICompatVersion,
|
|
357
|
+
renderChildren,
|
|
358
|
+
renderUntrustedObject,
|
|
341
359
|
shallowEqual
|
|
342
360
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/jsx/components.ts
|
|
2
2
|
import { raw } from "../helper/html/index.js";
|
|
3
3
|
import { HtmlEscapedCallbackPhase, resolveCallback } from "../utils/html.js";
|
|
4
|
-
import { jsx, Fragment } from "./base.js";
|
|
4
|
+
import { jsx, Fragment, isUntrustedObject, renderChildren, renderUntrustedObject } from "./base.js";
|
|
5
5
|
import { DOM_RENDERER } from "./constants.js";
|
|
6
6
|
import { captureRenderContext, useContext } from "./context.js";
|
|
7
7
|
import { ErrorBoundary as ErrorBoundaryDomRenderer } from "./dom/components.js";
|
|
@@ -9,7 +9,7 @@ import { StreamingContext } from "./streaming.js";
|
|
|
9
9
|
var errorBoundaryCounter = 0;
|
|
10
10
|
var childrenToString = async (children) => {
|
|
11
11
|
try {
|
|
12
|
-
return children.flat().map(
|
|
12
|
+
return children.flat().map(resolveChildEarly);
|
|
13
13
|
} catch (e) {
|
|
14
14
|
if (e instanceof Promise) {
|
|
15
15
|
const resume = captureRenderContext();
|
|
@@ -20,18 +20,16 @@ var childrenToString = async (children) => {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
var resolveChildEarly = (
|
|
24
|
-
if (
|
|
23
|
+
var resolveChildEarly = (child) => {
|
|
24
|
+
if (child == null || typeof child === "boolean") {
|
|
25
25
|
return "";
|
|
26
|
-
} else if (typeof
|
|
27
|
-
return
|
|
26
|
+
} else if (typeof child === "string" || Array.isArray(child)) {
|
|
27
|
+
return renderChildren([child]);
|
|
28
|
+
} else if (isUntrustedObject(child)) {
|
|
29
|
+
return renderUntrustedObject(child);
|
|
28
30
|
} else {
|
|
29
|
-
const str =
|
|
30
|
-
|
|
31
|
-
return raw(str);
|
|
32
|
-
} else {
|
|
33
|
-
return str;
|
|
34
|
-
}
|
|
31
|
+
const str = child.toString();
|
|
32
|
+
return str instanceof Promise ? str : raw(str);
|
|
35
33
|
}
|
|
36
34
|
};
|
|
37
35
|
var ErrorBoundary = async ({ children, fallback, fallbackRender, onError }) => {
|
|
@@ -47,26 +45,27 @@ var ErrorBoundary = async ({ children, fallback, fallbackRender, onError }) => {
|
|
|
47
45
|
let fallbackStrPromise;
|
|
48
46
|
const resolveFallbackStr = () => fallbackStrPromise ||= (async () => {
|
|
49
47
|
const awaitedFallback = await fallback;
|
|
50
|
-
if (
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
);
|
|
59
|
-
}
|
|
48
|
+
if (awaitedFallback === null || awaitedFallback === void 0) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (typeof awaitedFallback === "string" || Array.isArray(awaitedFallback)) {
|
|
52
|
+
return getResume()(() => renderChildren([awaitedFallback]));
|
|
53
|
+
}
|
|
54
|
+
if (isUntrustedObject(awaitedFallback)) {
|
|
55
|
+
return getResume()(() => renderUntrustedObject(awaitedFallback));
|
|
60
56
|
}
|
|
57
|
+
const fallbackResult = await getResume()(() => awaitedFallback.toString());
|
|
58
|
+
return raw(
|
|
59
|
+
fallbackResult,
|
|
60
|
+
fallbackResult.callbacks || awaitedFallback.callbacks
|
|
61
|
+
);
|
|
61
62
|
})();
|
|
62
63
|
const renderFallback = async (error) => {
|
|
63
64
|
const fallbackStr = await resolveFallbackStr();
|
|
64
65
|
return getResume()(async () => {
|
|
65
66
|
onError?.(error);
|
|
66
67
|
const fallbackRes = fallbackStr !== void 0 ? fallbackStr : fallbackRender && jsx(Fragment, {}, fallbackRender(error)) || "";
|
|
67
|
-
const fallbackResString = await Fragment({
|
|
68
|
-
children: fallbackRes
|
|
69
|
-
}).toString();
|
|
68
|
+
const fallbackResString = await Fragment({ children: fallbackRes }).toString();
|
|
70
69
|
return raw(
|
|
71
70
|
fallbackResString,
|
|
72
71
|
fallbackResString.callbacks || fallbackRes.callbacks
|
|
@@ -99,7 +98,7 @@ var ErrorBoundary = async ({ children, fallback, fallbackRender, onError }) => {
|
|
|
99
98
|
const fallbackResString = await renderFallback(error2);
|
|
100
99
|
const fallbackCallbacks = fallbackResString.callbacks;
|
|
101
100
|
if (buffer) {
|
|
102
|
-
buffer[0] = buffer[0].replace(replaceRe, fallbackResString);
|
|
101
|
+
buffer[0] = buffer[0].replace(replaceRe, () => fallbackResString);
|
|
103
102
|
return fallbackCallbacks?.length ? raw("", fallbackCallbacks) : "";
|
|
104
103
|
}
|
|
105
104
|
return raw(
|
|
@@ -138,7 +137,7 @@ d.parentElement.insertBefore(c.content,d.nextSibling)
|
|
|
138
137
|
</script>`;
|
|
139
138
|
if (htmlArray.every((html2) => !html2.callbacks?.length)) {
|
|
140
139
|
if (buffer) {
|
|
141
|
-
buffer[0] = buffer[0].replace(replaceRe, content);
|
|
140
|
+
buffer[0] = buffer[0].replace(replaceRe, () => content);
|
|
142
141
|
}
|
|
143
142
|
return html;
|
|
144
143
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/jsx/context.ts
|
|
2
2
|
import { raw } from "../helper/html/index.js";
|
|
3
|
-
import { JSXFragmentNode } from "./base.js";
|
|
3
|
+
import { isUntrustedObject, JSXFragmentNode, renderChildren, renderUntrustedObject } from "./base.js";
|
|
4
4
|
import { DOM_RENDERER } from "./constants.js";
|
|
5
5
|
import { createContextProviderFunction } from "./dom/context.js";
|
|
6
6
|
var globalContexts = [];
|
|
@@ -130,18 +130,18 @@ var createContext = (defaultValue) => {
|
|
|
130
130
|
const context = ((props) => {
|
|
131
131
|
const contextValues = getContextValuesIn(getCurrentStore(), context);
|
|
132
132
|
contextValues.push(props.value);
|
|
133
|
-
let
|
|
133
|
+
let rendered;
|
|
134
134
|
try {
|
|
135
|
-
|
|
135
|
+
rendered = typeof props.children === "string" ? renderChildren([props.children]) : isUntrustedObject(props.children) ? renderUntrustedObject(props.children) : props.children ? (Array.isArray(props.children) ? new JSXFragmentNode("", {}, props.children) : props.children).toString() : raw("");
|
|
136
136
|
} catch (e) {
|
|
137
137
|
contextValues.pop();
|
|
138
138
|
throw e;
|
|
139
139
|
}
|
|
140
|
-
if (
|
|
141
|
-
return
|
|
140
|
+
if (rendered instanceof Promise) {
|
|
141
|
+
return rendered.finally(() => contextValues.pop()).then((resString) => raw(resString, resString.callbacks));
|
|
142
142
|
} else {
|
|
143
143
|
contextValues.pop();
|
|
144
|
-
return raw(
|
|
144
|
+
return raw(rendered);
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
147
|
context.values = values;
|
|
@@ -78,6 +78,7 @@ var applyProps = (container, attributes, oldAttributes) => {
|
|
|
78
78
|
} else if (key === "dangerouslySetInnerHTML" && value) {
|
|
79
79
|
container.innerHTML = value.__html;
|
|
80
80
|
} else if (key === "ref") {
|
|
81
|
+
refCleanupMap.get(container)?.();
|
|
81
82
|
let cleanup;
|
|
82
83
|
if (typeof value === "function") {
|
|
83
84
|
cleanup = value(container) || (() => value(null));
|
|
@@ -142,6 +143,7 @@ var applyProps = (container, attributes, oldAttributes) => {
|
|
|
142
143
|
container.removeEventListener(eventSpec[0], value, eventSpec[1]);
|
|
143
144
|
} else if (key === "ref") {
|
|
144
145
|
refCleanupMap.get(container)?.();
|
|
146
|
+
refCleanupMap.delete(container);
|
|
145
147
|
} else {
|
|
146
148
|
try {
|
|
147
149
|
container.removeAttribute(toAttributeName(container, key));
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
// src/jsx/dom/server.ts
|
|
2
|
+
import { renderChildren } from "../base.js";
|
|
2
3
|
import { renderToReadableStream as renderToReadableStreamHono } from "../streaming.js";
|
|
3
4
|
import version from "./index.js";
|
|
5
|
+
var prepareRoot = (element) => typeof element === "string" || Array.isArray(element) ? renderChildren([element]) : element;
|
|
4
6
|
var renderToString = (element, options = {}) => {
|
|
5
7
|
if (Object.keys(options).length > 0) {
|
|
6
8
|
console.warn("options are not supported yet");
|
|
7
9
|
}
|
|
8
|
-
|
|
10
|
+
element = prepareRoot(element);
|
|
11
|
+
const res = element instanceof Promise ? element : element?.toString() ?? "";
|
|
9
12
|
if (typeof res !== "string") {
|
|
10
13
|
throw new Error("Async component is not supported in renderToString");
|
|
11
14
|
}
|
|
@@ -15,6 +18,7 @@ var renderToReadableStream = async (element, options = {}) => {
|
|
|
15
18
|
if (Object.keys(options).some((key) => key !== "onError")) {
|
|
16
19
|
console.warn("options are not supported yet, except onError");
|
|
17
20
|
}
|
|
21
|
+
element = prepareRoot(element);
|
|
18
22
|
if (!element || typeof element !== "object") {
|
|
19
23
|
element = element?.toString() ?? "";
|
|
20
24
|
}
|
|
@@ -222,7 +222,7 @@ var useCallback = (callback, deps) => {
|
|
|
222
222
|
}
|
|
223
223
|
return callback;
|
|
224
224
|
};
|
|
225
|
-
|
|
225
|
+
function useRef(initialValue) {
|
|
226
226
|
const buildData = buildDataStack.at(-1);
|
|
227
227
|
if (!buildData) {
|
|
228
228
|
return { current: initialValue };
|
|
@@ -231,7 +231,7 @@ var useRef = (initialValue) => {
|
|
|
231
231
|
const refArray = node[DOM_STASH][1][STASH_REF] ||= [];
|
|
232
232
|
const hookIndex = node[DOM_STASH][0]++;
|
|
233
233
|
return refArray[hookIndex] ||= { current: initialValue };
|
|
234
|
-
}
|
|
234
|
+
}
|
|
235
235
|
var use = (promise) => {
|
|
236
236
|
const cachedRes = resolvedPromiseValueMap.get(promise);
|
|
237
237
|
if (cachedRes) {
|
|
@@ -289,19 +289,22 @@ var useSyncExternalStore = (subscribe, getSnapshot, getServerSnapshot) => {
|
|
|
289
289
|
}
|
|
290
290
|
return getServerSnapshot();
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
const [
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
const snapshot = buildData[0][4] && getServerSnapshot ? getServerSnapshot() : getSnapshot();
|
|
293
|
+
const [, setVersion] = useState(0);
|
|
294
|
+
const latestSnapshot = useRef([snapshot, getSnapshot]);
|
|
295
|
+
latestSnapshot.current = [snapshot, getSnapshot];
|
|
296
|
+
const unsubscribeRef = useRef(null);
|
|
296
297
|
useEffect(() => {
|
|
297
|
-
|
|
298
|
-
|
|
298
|
+
const update2 = () => setVersion((version) => version + 1);
|
|
299
|
+
unsubscribeRef.current?.();
|
|
300
|
+
unsubscribeRef.current = subscribe(update2);
|
|
301
|
+
const [snapshot2, getSnapshot2] = latestSnapshot.current;
|
|
302
|
+
if (!Object.is(snapshot2, getSnapshot2())) {
|
|
303
|
+
update2();
|
|
299
304
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}, []);
|
|
304
|
-
return state;
|
|
305
|
+
}, [subscribe]);
|
|
306
|
+
useEffect(() => () => unsubscribeRef.current?.(), []);
|
|
307
|
+
return snapshot;
|
|
305
308
|
};
|
|
306
309
|
export {
|
|
307
310
|
STASH_EFFECT,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/jsx/intrinsic-element/components.ts
|
|
2
2
|
import { raw } from "../../helper/html/index.js";
|
|
3
|
-
import { JSXNode, getNameSpaceContext } from "../base.js";
|
|
3
|
+
import { JSXNode, getNameSpaceContext, renderChildren } from "../base.js";
|
|
4
4
|
import { toArray } from "../children.js";
|
|
5
5
|
import { PERMALINK } from "../constants.js";
|
|
6
6
|
import { useContext } from "../context.js";
|
|
@@ -62,10 +62,10 @@ var insertIntoHead = (tagName, tag, props, precedence) => ({ buffer, context })
|
|
|
62
62
|
insertTags.forEach((tag2) => {
|
|
63
63
|
buffer[0] = buffer[0].replaceAll(tag2, "");
|
|
64
64
|
});
|
|
65
|
-
buffer[0] = buffer[0].replace(/(?=<\/head>)/, insertTags.join(""));
|
|
65
|
+
buffer[0] = buffer[0].replace(/(?=<\/head>)/, () => insertTags.join(""));
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
var returnWithoutSpecialBehavior = (tag, children, props) =>
|
|
68
|
+
var returnWithoutSpecialBehavior = (tag, children, props) => renderChildren([new JSXNode(tag, props, toArray(children ?? []))]);
|
|
69
69
|
var documentMetadataTag = (tag, children, props, sort) => {
|
|
70
70
|
if ("itemProp" in props) {
|
|
71
71
|
return returnWithoutSpecialBehavior(tag, children, props);
|
|
@@ -78,7 +78,7 @@ var documentMetadataTag = (tag, children, props, sort) => {
|
|
|
78
78
|
const string = new JSXNode(tag, restProps, toArray(children || [])).toString();
|
|
79
79
|
if (string instanceof Promise) {
|
|
80
80
|
return string.then(
|
|
81
|
-
(resString) => raw(
|
|
81
|
+
(resString) => raw(resString, [
|
|
82
82
|
...resString.callbacks || [],
|
|
83
83
|
insertIntoHead(tag, resString, restProps, precedence)
|
|
84
84
|
])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/jsx/streaming.ts
|
|
2
2
|
import { raw } from "../helper/html/index.js";
|
|
3
3
|
import { HtmlEscapedCallbackPhase, resolveCallback } from "../utils/html.js";
|
|
4
|
-
import { JSXNode } from "./base.js";
|
|
4
|
+
import { isUntrustedObject, JSXNode, renderChildren, renderUntrustedObject } from "./base.js";
|
|
5
5
|
import { childrenToString } from "./components.js";
|
|
6
6
|
import { DOM_RENDERER, DOM_STASH } from "./constants.js";
|
|
7
7
|
import { captureRenderContext, createContext, useContext } from "./context.js";
|
|
@@ -9,6 +9,7 @@ import { Suspense as SuspenseDomRenderer } from "./dom/components.js";
|
|
|
9
9
|
import { buildDataStack } from "./dom/render.js";
|
|
10
10
|
var StreamingContext = createContext(null);
|
|
11
11
|
var suspenseCounter = 0;
|
|
12
|
+
var serializeBoundaryChild = (child) => typeof child === "string" || Array.isArray(child) ? renderChildren([child]) : child == null || typeof child === "boolean" ? "" : isUntrustedObject(child) ? renderUntrustedObject(child) : child.toString();
|
|
12
13
|
var Suspense = async ({
|
|
13
14
|
children,
|
|
14
15
|
fallback
|
|
@@ -25,9 +26,7 @@ var Suspense = async ({
|
|
|
25
26
|
try {
|
|
26
27
|
stackNode[DOM_STASH][0] = 0;
|
|
27
28
|
buildDataStack.push([[], stackNode]);
|
|
28
|
-
resArray = children.map(
|
|
29
|
-
(c) => c == null || typeof c === "boolean" ? "" : c.toString()
|
|
30
|
-
);
|
|
29
|
+
resArray = children.map(serializeBoundaryChild);
|
|
31
30
|
} catch (e) {
|
|
32
31
|
if (e instanceof Promise) {
|
|
33
32
|
const resume = captureRenderContext();
|
|
@@ -48,7 +47,7 @@ var Suspense = async ({
|
|
|
48
47
|
}
|
|
49
48
|
if (resArray.some((res) => res instanceof Promise)) {
|
|
50
49
|
const index = suspenseCounter++;
|
|
51
|
-
const fallbackStr = await fallback.toString();
|
|
50
|
+
const fallbackStr = await (typeof fallback === "string" || Array.isArray(fallback) ? renderChildren([fallback]) : isUntrustedObject(fallback) ? renderUntrustedObject(fallback) : fallback.toString());
|
|
52
51
|
return raw(`<template id="H:${index}"></template>${fallbackStr}<!--/$-->`, [
|
|
53
52
|
...fallbackStr.callbacks || [],
|
|
54
53
|
({ phase, buffer, context }) => {
|
|
@@ -61,7 +60,7 @@ var Suspense = async ({
|
|
|
61
60
|
if (buffer) {
|
|
62
61
|
buffer[0] = buffer[0].replace(
|
|
63
62
|
new RegExp(`<template id="H:${index}"></template>.*?<!--/\\$-->`),
|
|
64
|
-
content
|
|
63
|
+
() => content
|
|
65
64
|
);
|
|
66
65
|
}
|
|
67
66
|
let html = buffer ? "" : `<template data-hono-target="H:${index}">${content}</template><script${nonce ? ` nonce="${nonce}"` : ""}>
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
// src/middleware/cache/index.ts
|
|
2
|
+
import { cloneRawRequest } from "../../request.js";
|
|
3
|
+
import { sha256 } from "../../utils/crypto.js";
|
|
2
4
|
var defaultCacheableStatusCodes = [200];
|
|
5
|
+
var defaultMaxQueryBodySize = 64 * 1024;
|
|
6
|
+
var cacheKeyPath = "/.hono/cache";
|
|
7
|
+
var cacheKeyParameter = "__hono_cache_key";
|
|
8
|
+
var cacheMethodKeyParameter = "__hono_cache_method";
|
|
9
|
+
var queryDigestKeyParameter = "__hono_query_digest";
|
|
10
|
+
var cacheVaryKeyParameter = "__hono_cache_vary";
|
|
11
|
+
var queryRepresentationMetadataHeaders = [
|
|
12
|
+
"content-type",
|
|
13
|
+
"content-encoding",
|
|
14
|
+
"content-language",
|
|
15
|
+
"content-location"
|
|
16
|
+
];
|
|
3
17
|
var shouldSkipCacheControl = (cacheControl) => !!cacheControl && /(?:^|,\s*)(?:private|no-(?:store|cache))(?:\s*(?:=|,|$))/i.test(cacheControl);
|
|
4
18
|
var parseVaryDirectives = (vary) => {
|
|
5
19
|
if (vary == null) {
|
|
@@ -7,17 +21,86 @@ var parseVaryDirectives = (vary) => {
|
|
|
7
21
|
}
|
|
8
22
|
return (Array.isArray(vary) ? vary : vary.split(",")).map((directive) => directive.trim().toLowerCase()).filter(Boolean);
|
|
9
23
|
};
|
|
24
|
+
var createCacheKey = (key, requestUrl, request, varyHeaders) => {
|
|
25
|
+
const url = new URL(cacheKeyPath, requestUrl);
|
|
26
|
+
url.searchParams.append(cacheKeyParameter, key);
|
|
27
|
+
url.searchParams.append(cacheMethodKeyParameter, request.method);
|
|
28
|
+
if (request.method === "QUERY") {
|
|
29
|
+
url.searchParams.append(queryDigestKeyParameter, request.digest);
|
|
30
|
+
}
|
|
31
|
+
for (const header of varyHeaders) {
|
|
32
|
+
url.searchParams.append(cacheVaryKeyParameter, JSON.stringify(header));
|
|
33
|
+
}
|
|
34
|
+
return url.href;
|
|
35
|
+
};
|
|
10
36
|
var shouldSkipCache = (res, optionsVaryDirectives, responseVary) => responseVary.length && (!optionsVaryDirectives || responseVary.some((name) => !optionsVaryDirectives.has(name))) || shouldSkipCacheControl(res.headers.get("Cache-Control")) || res.headers.has("Set-Cookie");
|
|
37
|
+
var reportCacheNotAvailable = (onCacheNotAvailable, reason) => {
|
|
38
|
+
if (onCacheNotAvailable === false) {
|
|
39
|
+
} else if (onCacheNotAvailable) {
|
|
40
|
+
onCacheNotAvailable(reason);
|
|
41
|
+
} else {
|
|
42
|
+
console.log(reason);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var createQueryDigest = async (c, maxQueryBodySize) => {
|
|
46
|
+
if (!globalThis.crypto?.subtle) {
|
|
47
|
+
return void 0;
|
|
48
|
+
}
|
|
49
|
+
if (c.req.raw.bodyUsed && Object.keys(c.req.bodyCache)[0] === "formData") {
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const requestHeaders = c.req.raw.headers;
|
|
54
|
+
const metadata = new TextEncoder().encode(
|
|
55
|
+
JSON.stringify(
|
|
56
|
+
queryRepresentationMetadataHeaders.map((header) => [header, requestHeaders.get(header)])
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
const body = (await cloneRawRequest(c.req)).body;
|
|
60
|
+
const chunks = [];
|
|
61
|
+
let bodySize = 0;
|
|
62
|
+
if (body) {
|
|
63
|
+
const reader = body.getReader();
|
|
64
|
+
for (; ; ) {
|
|
65
|
+
const { done, value } = await reader.read();
|
|
66
|
+
if (done) {
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
bodySize += value.byteLength;
|
|
70
|
+
if (bodySize > maxQueryBodySize) {
|
|
71
|
+
void reader.cancel().catch(() => {
|
|
72
|
+
});
|
|
73
|
+
return void 0;
|
|
74
|
+
}
|
|
75
|
+
chunks.push(value);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const data = new Uint8Array(metadata.byteLength + bodySize);
|
|
79
|
+
data.set(metadata);
|
|
80
|
+
let offset = metadata.byteLength;
|
|
81
|
+
for (const chunk of chunks) {
|
|
82
|
+
data.set(chunk, offset);
|
|
83
|
+
offset += chunk.byteLength;
|
|
84
|
+
}
|
|
85
|
+
return await sha256(data) ?? void 0;
|
|
86
|
+
} catch {
|
|
87
|
+
return void 0;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
11
90
|
var cache = (options) => {
|
|
12
91
|
if (!globalThis.caches) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
console.log("Cache Middleware is not enabled because caches is not defined.");
|
|
18
|
-
}
|
|
92
|
+
reportCacheNotAvailable(
|
|
93
|
+
options.onCacheNotAvailable,
|
|
94
|
+
"Cache Middleware is not enabled because caches is not defined."
|
|
95
|
+
);
|
|
19
96
|
return async (_c, next) => await next();
|
|
20
97
|
}
|
|
98
|
+
if (!globalThis.crypto?.subtle) {
|
|
99
|
+
reportCacheNotAvailable(
|
|
100
|
+
options.onCacheNotAvailable,
|
|
101
|
+
"Cache Middleware cannot cache QUERY requests because Web Crypto is not available."
|
|
102
|
+
);
|
|
103
|
+
}
|
|
21
104
|
if (options.wait === void 0) {
|
|
22
105
|
options.wait = false;
|
|
23
106
|
}
|
|
@@ -32,6 +115,7 @@ var cache = (options) => {
|
|
|
32
115
|
const cacheableStatusCodes = new Set(
|
|
33
116
|
options.cacheableStatusCodes ?? defaultCacheableStatusCodes
|
|
34
117
|
);
|
|
118
|
+
const maxQueryBodySize = options.maxQueryBodySize ?? defaultMaxQueryBodySize;
|
|
35
119
|
const addHeader = (c, responseVary) => {
|
|
36
120
|
if (cacheControlDirectives) {
|
|
37
121
|
const existingDirectives = c.res.headers.get("Cache-Control")?.split(",").map((d) => d.trim().split("=", 1)[0].toLowerCase()) ?? [];
|
|
@@ -60,20 +144,31 @@ var cache = (options) => {
|
|
|
60
144
|
}
|
|
61
145
|
};
|
|
62
146
|
return async function cache2(c, next) {
|
|
63
|
-
if (c.req.method !== "GET" || c.req.raw.headers.has("Authorization")) {
|
|
147
|
+
if (c.req.method !== "GET" && c.req.method !== "QUERY" || c.req.raw.headers.has("Authorization")) {
|
|
64
148
|
await next();
|
|
65
149
|
return;
|
|
66
150
|
}
|
|
151
|
+
let cacheKeyRequest = { method: "GET" };
|
|
152
|
+
if (c.req.method === "QUERY") {
|
|
153
|
+
const digest = await createQueryDigest(c, maxQueryBodySize);
|
|
154
|
+
if (digest === void 0) {
|
|
155
|
+
await next();
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
cacheKeyRequest = { method: "QUERY", digest };
|
|
159
|
+
}
|
|
67
160
|
let key = c.req.url;
|
|
68
161
|
if (options.keyGenerator) {
|
|
69
162
|
key = await options.keyGenerator(c);
|
|
70
163
|
}
|
|
164
|
+
const varyHeaders = [];
|
|
71
165
|
if (varyDirectives) {
|
|
72
166
|
for (const directive of varyDirectives) {
|
|
73
167
|
const value = c.req.raw.headers.get(directive) ?? "";
|
|
74
|
-
|
|
168
|
+
varyHeaders.push([directive, value]);
|
|
75
169
|
}
|
|
76
170
|
}
|
|
171
|
+
key = createCacheKey(key, c.req.url, cacheKeyRequest, varyHeaders);
|
|
77
172
|
const cacheName = typeof options.cacheName === "function" ? await options.cacheName(c) : options.cacheName;
|
|
78
173
|
const cache3 = await caches.open(cacheName);
|
|
79
174
|
const response = await cache3.match(key);
|
|
@@ -21,6 +21,7 @@ var selectEncoding = (header, candidates) => {
|
|
|
21
21
|
}
|
|
22
22
|
return best?.encoding;
|
|
23
23
|
};
|
|
24
|
+
var varyAcceptEncodingRegExp = /(?:^|,)\s*accept-encoding\s*(?:,|$)/i;
|
|
24
25
|
var compress = (options) => {
|
|
25
26
|
const threshold = options?.threshold ?? 1024;
|
|
26
27
|
const candidates = options?.encoding ? [options.encoding] : ENCODING_TYPES;
|
|
@@ -44,6 +45,10 @@ var compress = (options) => {
|
|
|
44
45
|
!shouldTransform(ctx.res)) {
|
|
45
46
|
return;
|
|
46
47
|
}
|
|
48
|
+
const current = ctx.res.headers.get("Vary");
|
|
49
|
+
if (current !== "*" && !(current && varyAcceptEncodingRegExp.test(current))) {
|
|
50
|
+
ctx.header("Vary", current ? `${current}, Accept-Encoding` : "Accept-Encoding");
|
|
51
|
+
}
|
|
47
52
|
const accepted = ctx.req.header("Accept-Encoding");
|
|
48
53
|
const encoding = selectEncoding(accepted, candidates);
|
|
49
54
|
if (!encoding || !ctx.res.body) {
|