@automattic/vip 4.1.2 → 4.1.4
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/.buildkite/build-macos-installer.sh +34 -0
- package/.buildkite/build-macos.sh +2 -3
- package/.buildkite/build-windows-installer.ps1 +65 -0
- package/.buildkite/build-windows.ps1 +2 -18
- package/.buildkite/pipeline.yml +32 -0
- package/.buildkite/sign-windows.ps1 +21 -0
- package/.buildkite/test-windows-installer-download.ps1 +54 -0
- package/.buildkite/test_pipeline.py +69 -0
- package/Gemfile.lock +44 -41
- package/cmd/installer-payload/main.go +19 -0
- package/cmd/installer-version/main.go +22 -0
- package/cmd/vip-next/commands/app_debug_test.go +89 -0
- package/cmd/vip-next/commands/app_deploy.go +4 -0
- package/cmd/vip-next/commands/app_deploy_validate.go +2 -0
- package/cmd/vip-next/commands/config_debug_test.go +137 -0
- package/cmd/vip-next/commands/config_envvar_delete.go +2 -0
- package/cmd/vip-next/commands/config_envvar_get.go +2 -0
- package/cmd/vip-next/commands/config_envvar_get_all.go +2 -0
- package/cmd/vip-next/commands/config_envvar_list.go +2 -0
- package/cmd/vip-next/commands/config_envvar_set.go +2 -0
- package/cmd/vip-next/commands/config_software_update.go +12 -1
- package/cmd/vip-next/commands/devenv_create_test.go +5 -5
- package/cmd/vip-next/commands/devenv_debug_test.go +34 -0
- package/cmd/vip-next/commands/devenv_envvar.go +6 -0
- package/cmd/vip-next/commands/devenv_lifecycle.go +30 -11
- package/cmd/vip-next/commands/devenv_update.go +1 -1
- package/cmd/vip-next/commands/devenv_update_test.go +28 -2
- package/cmd/vip-next/commands/import_debug_test.go +110 -0
- package/cmd/vip-next/commands/import_media.go +4 -0
- package/cmd/vip-next/commands/import_sql.go +9 -1
- package/cmd/vip-next/commands/logout.go +1 -1
- package/cmd/vip-next/commands/searchreplace.go +3 -1
- package/cmd/vip-next/commands/searchreplace_debug_test.go +82 -0
- package/cmd/vip-next/commands/whoami.go +10 -1
- package/cmd/vip-next/commands/whoami_debug_test.go +79 -0
- package/cmd/vip-next/commands/wp.go +2 -0
- package/cmd/vip-next/commands/wp_debug_test.go +32 -0
- package/cmd/vip-next/debug_args.go +63 -0
- package/cmd/vip-next/debug_test.go +122 -0
- package/cmd/vip-next/main.go +58 -2
- package/cmd/vip-next/pendo_wiring_test.go +148 -0
- package/cmd/vip-next/root.go +17 -0
- package/dist/bin/vip-dev-env-envvar-get.js +2 -2
- package/dist/bin/vip-dev-env-envvar-set.js +2 -2
- package/dist/bin/vip-dev-env-update.js +1 -1
- package/dist/lib/analytics/clients/pendo.js +19 -7
- package/dist/lib/constants/dev-environment.js +8 -7
- package/dist/lib/dev-environment/dev-environment-cli.js +10 -2
- package/dist/lib/dev-environment/dev-environment-core.js +1 -1
- package/dist/lib/edge-workers/toolchains/assemblyscript/constants.js +1 -1
- package/docs/BUILD-SIGNING.md +147 -6
- package/docs/DEBUGGING.md +61 -0
- package/docs/EDGE-WORKERS.md +2 -2
- package/docs/GO-UPDATES.md +7 -1
- package/docs/NPM-RELEASE-RECOVERY.md +47 -0
- package/docs/RELEASING.md +3 -2
- package/docs/SETUP.md +2 -1
- package/fastlane/Fastfile +66 -3
- package/fastlane/test_signing.rb +83 -0
- package/internal/auth/logout.go +14 -1
- package/internal/auth/logout_test.go +46 -0
- package/internal/debuglog/debuglog.go +85 -0
- package/internal/debuglog/debuglog_test.go +44 -0
- package/internal/devenv/compose/view.go +6 -3
- package/internal/devenv/compose/view_test.go +1 -1
- package/internal/devenv/debug.go +4 -0
- package/internal/devenv/debug_test.go +103 -0
- package/internal/devenv/devenv.go +20 -2
- package/internal/devenv/devexec.go +3 -0
- package/internal/devenv/importdata.go +4 -1
- package/internal/devenv/list.go +9 -1
- package/internal/devenv/logs.go +2 -0
- package/internal/devenv/proxy/ca.go +9 -2
- package/internal/devenv/proxy/ca_test.go +1 -1
- package/internal/devenv/proxy/network.go +7 -3
- package/internal/devenv/proxy/network_test.go +6 -0
- package/internal/devenv/proxy/proxy.go +37 -8
- package/internal/devenv/proxy/proxy_test.go +61 -6
- package/internal/devenv/proxy/scripts/gen-certs.sh +20 -5
- package/internal/devenv/update.go +2 -0
- package/internal/edgeworkers/build_test.go +1 -1
- package/internal/edgeworkers/templates/edge-workers.json +1 -1
- package/internal/edgeworkers/templates/package.json +1 -1
- package/internal/gql/debug_test.go +79 -0
- package/internal/gql/error.go +27 -1
- package/internal/gql/rechallenge.go +9 -5
- package/internal/gql/retry.go +21 -2
- package/internal/gql/transport.go +9 -0
- package/internal/httpproxy/debug_test.go +32 -0
- package/internal/httpproxy/httpproxy.go +8 -1
- package/internal/installer/version.go +41 -0
- package/internal/installer/version_test.go +33 -0
- package/internal/parity/edge_workers_debug_test.go +87 -0
- package/internal/parity/pendo_test.go +122 -0
- package/internal/rechallenge/flow.go +8 -0
- package/internal/rechallenge/flow_test.go +15 -1
- package/internal/releasepromotion/buildkite.go +12 -1
- package/internal/releasepromotion/buildkite_test.go +31 -0
- package/internal/releasepromotion/contract.go +49 -1
- package/internal/releasepromotion/contract_test.go +38 -0
- package/internal/releasepromotion/github.go +4 -10
- package/internal/releasepromotion/optional_installers_test.go +87 -0
- package/internal/releasepromotion/verify.go +99 -2
- package/internal/releasepromotion/verify_test.go +99 -0
- package/internal/searchreplace/debug_test.go +71 -0
- package/internal/searchreplace/searchreplace.go +14 -0
- package/internal/siteimport/debug_test.go +34 -0
- package/internal/siteimport/status.go +11 -0
- package/internal/telemetry/pendo.go +41 -10
- package/internal/telemetry/pendo_auth_test.go +92 -0
- package/internal/telemetry/pendo_test.go +24 -5
- package/internal/telemetry/tracker.go +26 -0
- package/internal/update/github.go +36 -17
- package/internal/update/ownership.go +22 -0
- package/internal/update/ownership_test.go +44 -0
- package/internal/update/release_test.go +53 -13
- package/internal/update/service_test.go +39 -0
- package/internal/upload/debug_test.go +76 -0
- package/internal/upload/multipart.go +3 -0
- package/internal/upload/orchestrate.go +10 -0
- package/internal/upload/putobject.go +3 -0
- package/internal/wpssh/debug_test.go +67 -0
- package/internal/wpssh/wpssh.go +7 -0
- package/internal/wpstream/debug_test.go +116 -0
- package/internal/wpstream/run.go +10 -1
- package/node_modules/@apollo/client/CHANGELOG.md +1130 -0
- package/node_modules/@apollo/client/__cjs/cache/core/Scalar.cjs +36 -0
- package/node_modules/@apollo/client/__cjs/cache/core/Scalar.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/cache/core/Scalar.d.cts +56 -0
- package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs +32 -1
- package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/core/cache.d.cts +89 -6
- package/node_modules/@apollo/client/__cjs/cache/core/types/Cache.d.cts +30 -2
- package/node_modules/@apollo/client/__cjs/cache/index.cjs +3 -1
- package/node_modules/@apollo/client/__cjs/cache/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/index.d.cts +2 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.cjs +63 -5
- package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.d.cts +3 -0
- package/node_modules/@apollo/client/__cjs/cache/inmemory/helpers.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/cache/inmemory/helpers.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/helpers.d.cts +11 -2
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs +95 -4
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.d.cts +44 -5
- package/node_modules/@apollo/client/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.cjs +34 -6
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.d.cts +3 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs +489 -45
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.d.cts +11 -2
- package/node_modules/@apollo/client/__cjs/cache/inmemory/types.d.cts +31 -4
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs +5 -9
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/ApolloClient.cjs +14 -14
- package/node_modules/@apollo/client/__cjs/core/ApolloClient.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/ApolloClient.d.cts +11 -11
- package/node_modules/@apollo/client/__cjs/core/ObservableQuery.cjs +186 -72
- package/node_modules/@apollo/client/__cjs/core/ObservableQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/ObservableQuery.d.cts +4 -7
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs +164 -197
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.d.cts +17 -21
- package/node_modules/@apollo/client/__cjs/core/QueryManager.cjs +75 -48
- package/node_modules/@apollo/client/__cjs/core/QueryManager.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/QueryManager.d.cts +4 -4
- package/node_modules/@apollo/client/__cjs/core/RefetchEventManager.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/core/dataStateErrorCache.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/core/dataStateErrorCache.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/core/dataStateErrorCache.d.cts +3 -0
- package/node_modules/@apollo/client/__cjs/core/deprecated.d.cts +3 -3
- package/node_modules/@apollo/client/__cjs/core/index.cjs +2 -1
- package/node_modules/@apollo/client/__cjs/core/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/index.d.cts +4 -3
- package/node_modules/@apollo/client/__cjs/core/types.d.cts +11 -7
- package/node_modules/@apollo/client/__cjs/incremental/GraphQLCodegenIncremental.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/incremental/GraphQLCodegenIncremental.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/incremental/GraphQLCodegenIncremental.d.cts +55 -0
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.d.cts +2 -4
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs +47 -16
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.d.cts +29 -6
- package/node_modules/@apollo/client/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/index.d.cts +1 -0
- package/node_modules/@apollo/client/__cjs/{utilities/internal/types/NoInfer.cjs → incremental/internal/types.cjs} +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/internal/types.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/incremental/internal/types.d.cts +17 -0
- package/node_modules/@apollo/client/__cjs/incremental/types.d.cts +55 -4
- package/node_modules/@apollo/client/__cjs/invariantErrorCodes.cjs +164 -113
- package/node_modules/@apollo/client/__cjs/link/core/ApolloLink.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/link/http/checkFetcher.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/link/persisted-queries/index.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/link/ws/index.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/local-state/LocalState.cjs +11 -11
- package/node_modules/@apollo/client/__cjs/local-state/LocalState.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/local-state/LocalState.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/masking/internal/types.d.cts +1 -2
- package/node_modules/@apollo/client/__cjs/masking/maskDefinition.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/masking/maskFragment.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/masking/maskOperation.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/masking/utils.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/react/context/ApolloContext.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/context/ApolloProvider.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/internal/validateSuspenseHookOptions.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/react/hooks/useApolloClient.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useBackgroundQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useBackgroundQuery.d.cts +3 -3
- package/node_modules/@apollo/client/__cjs/react/hooks/useFragment.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useFragment.d.cts +0 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useLazyQuery.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useLazyQuery.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useLoadableQuery.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/react/hooks/useMutation.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useMutation.d.cts +14 -14
- package/node_modules/@apollo/client/__cjs/react/hooks/useQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useQuery.d.cts +16 -3
- package/node_modules/@apollo/client/__cjs/react/hooks/useSubscription.cjs +7 -3
- package/node_modules/@apollo/client/__cjs/react/hooks/useSubscription.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useSubscription.d.cts +27 -5
- package/node_modules/@apollo/client/__cjs/react/hooks/useSuspenseFragment.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useSuspenseFragment.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useSuspenseQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useSuspenseQuery.d.cts +30 -30
- package/node_modules/@apollo/client/__cjs/react/hooks/useSyncExternalStore.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/internal/cache/QueryReference.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/react/query-preloader/createQueryPreloader.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/query-preloader/createQueryPreloader.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/react/ssr/prerenderStatic.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/react/types/deprecated.d.cts +5 -4
- package/node_modules/@apollo/client/__cjs/react/types/types.documentation.d.cts +12 -1
- package/node_modules/@apollo/client/__cjs/testing/core/mocking/mockLink.cjs +25 -5
- package/node_modules/@apollo/client/__cjs/testing/core/mocking/mockLink.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/testing/core/mocking/mockLink.d.cts +1 -2
- package/node_modules/@apollo/client/__cjs/utilities/caching/sizes.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/caching/sizes.d.cts +39 -1
- package/node_modules/@apollo/client/__cjs/utilities/graphql/DocumentTransform.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/StreamArrayState.cjs +27 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/StreamArrayState.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/StreamArrayState.d.cts +12 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/addDeferFragmentLabels.cjs +33 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/addDeferFragmentLabels.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/addDeferFragmentLabels.d.cts +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/capitalize.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/capitalize.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/capitalize.d.cts +7 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/coerceScalarFieldsToParsed.cjs +102 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/coerceScalarFieldsToParsed.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/coerceScalarFieldsToParsed.d.cts +9 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/constants.cjs +20 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/constants.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/constants.d.cts +19 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getDirectiveArgValue.cjs +19 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getDirectiveArgValue.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getDirectiveArgValue.d.cts +9 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentDefinition.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentDefinition.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentFromSelection.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentFromSelection.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/getFragmentQueryDocument.cjs +2 -2
- package/node_modules/@apollo/client/__cjs/utilities/internal/getMainDefinition.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/getMemoryInternals.cjs +6 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getMemoryInternals.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/getMemoryInternals.d.cts +4 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/getQueryDefinition.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.cjs +27 -2
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.d.cts +17 -2
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs +38 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.d.cts +9 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs +37 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.d.cts +9 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isTypenameField.cjs +7 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isTypenameField.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/isTypenameField.d.cts +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/makeStreamInfoTrie.cjs +17 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/makeStreamInfoTrie.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/makeStreamInfoTrie.d.cts +8 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/matchScalarList.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/matchScalarList.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/matchScalarList.d.cts +8 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/removeDirectivesFromDocument.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/shouldInclude.cjs +4 -4
- package/node_modules/@apollo/client/__cjs/utilities/internal/toDiffWithDataState.cjs +20 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/toDiffWithDataState.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/toDiffWithDataState.d.cts +8 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.d.cts +10 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/Exact.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/Exact.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/Exact.d.cts +2 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsLooselyEqual.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsLooselyEqual.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsLooselyEqual.d.cts +10 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsNeverish.cjs +3 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsNeverish.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/IsNeverish.d.cts +4 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/StreamInfoTrie.d.cts +2 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/unwrapScalarType.cjs +12 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/unwrapScalarType.cjs.map +1 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/unwrapScalarType.d.cts +10 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/valueToObjectRepresentation.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/version.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/version.cjs.map +1 -1
- package/node_modules/@apollo/client/cache/core/Scalar.d.ts +56 -0
- package/node_modules/@apollo/client/cache/core/Scalar.js +32 -0
- package/node_modules/@apollo/client/cache/core/Scalar.js.map +1 -0
- package/node_modules/@apollo/client/cache/core/cache.d.ts +89 -6
- package/node_modules/@apollo/client/cache/core/cache.js +33 -2
- package/node_modules/@apollo/client/cache/core/cache.js.map +1 -1
- package/node_modules/@apollo/client/cache/core/types/Cache.d.ts +30 -2
- package/node_modules/@apollo/client/cache/core/types/Cache.js.map +1 -1
- package/node_modules/@apollo/client/cache/index.d.ts +2 -1
- package/node_modules/@apollo/client/cache/index.js +1 -0
- package/node_modules/@apollo/client/cache/index.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/entityStore.d.ts +3 -0
- package/node_modules/@apollo/client/cache/inmemory/entityStore.js +64 -6
- package/node_modules/@apollo/client/cache/inmemory/entityStore.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/helpers.d.ts +11 -2
- package/node_modules/@apollo/client/cache/inmemory/helpers.js +11 -0
- package/node_modules/@apollo/client/cache/inmemory/helpers.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts +44 -5
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js +97 -6
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/key-extractor.js +1 -1
- package/node_modules/@apollo/client/cache/inmemory/policies.d.ts +3 -1
- package/node_modules/@apollo/client/cache/inmemory/policies.js +34 -6
- package/node_modules/@apollo/client/cache/inmemory/policies.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.d.ts +11 -2
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.js +485 -45
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/types.d.ts +32 -5
- package/node_modules/@apollo/client/cache/inmemory/types.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.js +6 -10
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.js.map +1 -1
- package/node_modules/@apollo/client/core/ApolloClient.d.ts +11 -11
- package/node_modules/@apollo/client/core/ApolloClient.js +14 -14
- package/node_modules/@apollo/client/core/ApolloClient.js.map +1 -1
- package/node_modules/@apollo/client/core/ObservableQuery.d.ts +4 -7
- package/node_modules/@apollo/client/core/ObservableQuery.js +183 -73
- package/node_modules/@apollo/client/core/ObservableQuery.js.map +1 -1
- package/node_modules/@apollo/client/core/QueryInfo.d.ts +18 -22
- package/node_modules/@apollo/client/core/QueryInfo.js +165 -198
- package/node_modules/@apollo/client/core/QueryInfo.js.map +1 -1
- package/node_modules/@apollo/client/core/QueryManager.d.ts +4 -4
- package/node_modules/@apollo/client/core/QueryManager.js +76 -49
- package/node_modules/@apollo/client/core/QueryManager.js.map +1 -1
- package/node_modules/@apollo/client/core/RefetchEventManager.js +3 -3
- package/node_modules/@apollo/client/core/dataStateErrorCache.d.ts +3 -0
- package/node_modules/@apollo/client/core/dataStateErrorCache.js +9 -0
- package/node_modules/@apollo/client/core/dataStateErrorCache.js.map +1 -0
- package/node_modules/@apollo/client/core/deprecated.d.ts +3 -3
- package/node_modules/@apollo/client/core/deprecated.js.map +1 -1
- package/node_modules/@apollo/client/core/index.d.ts +4 -3
- package/node_modules/@apollo/client/core/index.js +1 -1
- package/node_modules/@apollo/client/core/index.js.map +1 -1
- package/node_modules/@apollo/client/core/types.d.ts +11 -7
- package/node_modules/@apollo/client/core/types.js.map +1 -1
- package/node_modules/@apollo/client/incremental/GraphQLCodegenIncremental.d.ts +55 -0
- package/node_modules/@apollo/client/incremental/GraphQLCodegenIncremental.js +2 -0
- package/node_modules/@apollo/client/incremental/GraphQLCodegenIncremental.js.map +1 -0
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.d.ts +2 -4
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.js.map +1 -1
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.d.ts +29 -6
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js +48 -17
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js.map +1 -1
- package/node_modules/@apollo/client/incremental/handlers/notImplemented.js +1 -1
- package/node_modules/@apollo/client/incremental/index.d.ts +1 -0
- package/node_modules/@apollo/client/incremental/index.js.map +1 -1
- package/node_modules/@apollo/client/incremental/internal/types.d.ts +17 -0
- package/node_modules/@apollo/client/incremental/internal/types.js +2 -0
- package/node_modules/@apollo/client/incremental/internal/types.js.map +1 -0
- package/node_modules/@apollo/client/incremental/types.d.ts +55 -4
- package/node_modules/@apollo/client/incremental/types.js.map +1 -1
- package/node_modules/@apollo/client/invariantErrorCodes.js +164 -113
- package/node_modules/@apollo/client/link/core/ApolloLink.js +3 -3
- package/node_modules/@apollo/client/link/http/checkFetcher.js +1 -1
- package/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +1 -1
- package/node_modules/@apollo/client/link/persisted-queries/index.js +2 -2
- package/node_modules/@apollo/client/link/ws/index.js +1 -1
- package/node_modules/@apollo/client/local-state/LocalState.d.ts +1 -1
- package/node_modules/@apollo/client/local-state/LocalState.js +11 -11
- package/node_modules/@apollo/client/local-state/LocalState.js.map +1 -1
- package/node_modules/@apollo/client/masking/internal/types.d.ts +1 -2
- package/node_modules/@apollo/client/masking/internal/types.js.map +1 -1
- package/node_modules/@apollo/client/masking/maskDefinition.js +2 -2
- package/node_modules/@apollo/client/masking/maskFragment.js +2 -2
- package/node_modules/@apollo/client/masking/maskOperation.js +1 -1
- package/node_modules/@apollo/client/masking/utils.js +3 -3
- package/node_modules/@apollo/client/package.json +1 -1
- package/node_modules/@apollo/client/react/context/ApolloContext.js +1 -1
- package/node_modules/@apollo/client/react/context/ApolloProvider.js +1 -1
- package/node_modules/@apollo/client/react/hooks/internal/validateSuspenseHookOptions.js +2 -2
- package/node_modules/@apollo/client/react/hooks/useApolloClient.js +1 -1
- package/node_modules/@apollo/client/react/hooks/useBackgroundQuery.d.ts +3 -3
- package/node_modules/@apollo/client/react/hooks/useBackgroundQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useFragment.d.ts +0 -1
- package/node_modules/@apollo/client/react/hooks/useFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useLazyQuery.d.ts +1 -1
- package/node_modules/@apollo/client/react/hooks/useLazyQuery.js +2 -2
- package/node_modules/@apollo/client/react/hooks/useLazyQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useLoadableQuery.js +2 -2
- package/node_modules/@apollo/client/react/hooks/useMutation.d.ts +14 -14
- package/node_modules/@apollo/client/react/hooks/useMutation.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useQuery.d.ts +16 -3
- package/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useSubscription.d.ts +27 -5
- package/node_modules/@apollo/client/react/hooks/useSubscription.js +7 -3
- package/node_modules/@apollo/client/react/hooks/useSubscription.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useSuspenseFragment.d.ts +1 -1
- package/node_modules/@apollo/client/react/hooks/useSuspenseFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useSuspenseQuery.d.ts +30 -30
- package/node_modules/@apollo/client/react/hooks/useSuspenseQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/internal/validateSuspenseHookOptions.js +2 -2
- package/node_modules/@apollo/client/react/hooks-compiled/useApolloClient.js +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useBackgroundQuery.d.ts +3 -3
- package/node_modules/@apollo/client/react/hooks-compiled/useBackgroundQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useFragment.d.ts +0 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useLazyQuery.d.ts +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useLazyQuery.js +2 -2
- package/node_modules/@apollo/client/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useLoadableQuery.js +2 -2
- package/node_modules/@apollo/client/react/hooks-compiled/useMutation.d.ts +14 -14
- package/node_modules/@apollo/client/react/hooks-compiled/useMutation.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useQuery.d.ts +16 -3
- package/node_modules/@apollo/client/react/hooks-compiled/useQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSubscription.d.ts +27 -5
- package/node_modules/@apollo/client/react/hooks-compiled/useSubscription.js +107 -93
- package/node_modules/@apollo/client/react/hooks-compiled/useSubscription.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSuspenseFragment.d.ts +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSuspenseFragment.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSuspenseQuery.d.ts +30 -30
- package/node_modules/@apollo/client/react/hooks-compiled/useSuspenseQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useSyncExternalStore.js +1 -1
- package/node_modules/@apollo/client/react/internal/cache/QueryReference.js +1 -1
- package/node_modules/@apollo/client/react/query-preloader/createQueryPreloader.d.ts +1 -1
- package/node_modules/@apollo/client/react/query-preloader/createQueryPreloader.js.map +1 -1
- package/node_modules/@apollo/client/react/ssr/prerenderStatic.js +2 -2
- package/node_modules/@apollo/client/react/types/deprecated.d.ts +5 -4
- package/node_modules/@apollo/client/react/types/deprecated.js.map +1 -1
- package/node_modules/@apollo/client/react/types/types.documentation.d.ts +12 -1
- package/node_modules/@apollo/client/react/types/types.documentation.js.map +1 -1
- package/node_modules/@apollo/client/testing/core/mocking/mockLink.d.ts +1 -2
- package/node_modules/@apollo/client/testing/core/mocking/mockLink.js +25 -5
- package/node_modules/@apollo/client/testing/core/mocking/mockLink.js.map +1 -1
- package/node_modules/@apollo/client/utilities/caching/sizes.d.ts +39 -1
- package/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
- package/node_modules/@apollo/client/utilities/graphql/DocumentTransform.js +1 -1
- package/node_modules/@apollo/client/utilities/internal/StreamArrayState.d.ts +12 -0
- package/node_modules/@apollo/client/utilities/internal/StreamArrayState.js +23 -0
- package/node_modules/@apollo/client/utilities/internal/StreamArrayState.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/addDeferFragmentLabels.d.ts +3 -0
- package/node_modules/@apollo/client/utilities/internal/addDeferFragmentLabels.js +30 -0
- package/node_modules/@apollo/client/utilities/internal/addDeferFragmentLabels.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/capitalize.d.ts +7 -0
- package/node_modules/@apollo/client/utilities/internal/capitalize.js +9 -0
- package/node_modules/@apollo/client/utilities/internal/capitalize.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/coerceScalarFieldsToParsed.d.ts +9 -0
- package/node_modules/@apollo/client/utilities/internal/coerceScalarFieldsToParsed.js +95 -0
- package/node_modules/@apollo/client/utilities/internal/coerceScalarFieldsToParsed.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/constants.d.ts +19 -0
- package/node_modules/@apollo/client/utilities/internal/constants.js +19 -0
- package/node_modules/@apollo/client/utilities/internal/constants.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/getDirectiveArgValue.d.ts +9 -0
- package/node_modules/@apollo/client/utilities/internal/getDirectiveArgValue.js +16 -0
- package/node_modules/@apollo/client/utilities/internal/getDirectiveArgValue.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/getFragmentDefinition.js +3 -3
- package/node_modules/@apollo/client/utilities/internal/getFragmentDefinition.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/getFragmentFromSelection.js +2 -2
- package/node_modules/@apollo/client/utilities/internal/getFragmentFromSelection.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/getFragmentQueryDocument.js +2 -2
- package/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +1 -1
- package/node_modules/@apollo/client/utilities/internal/getMemoryInternals.d.ts +4 -0
- package/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +6 -0
- package/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/getQueryDefinition.js +1 -1
- package/node_modules/@apollo/client/utilities/internal/index.d.ts +17 -2
- package/node_modules/@apollo/client/utilities/internal/index.js +13 -1
- package/node_modules/@apollo/client/utilities/internal/index.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.d.ts +9 -0
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js +35 -0
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/isStreamField.d.ts +9 -0
- package/node_modules/@apollo/client/utilities/internal/isStreamField.js +34 -0
- package/node_modules/@apollo/client/utilities/internal/isStreamField.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/isTypenameField.d.ts +3 -0
- package/node_modules/@apollo/client/utilities/internal/isTypenameField.js +4 -0
- package/node_modules/@apollo/client/utilities/internal/isTypenameField.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/makeStreamInfoTrie.d.ts +8 -0
- package/node_modules/@apollo/client/utilities/internal/makeStreamInfoTrie.js +14 -0
- package/node_modules/@apollo/client/utilities/internal/makeStreamInfoTrie.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/matchScalarList.d.ts +8 -0
- package/node_modules/@apollo/client/utilities/internal/matchScalarList.js +9 -0
- package/node_modules/@apollo/client/utilities/internal/matchScalarList.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/removeDirectivesFromDocument.js +1 -1
- package/node_modules/@apollo/client/utilities/internal/shouldInclude.js +4 -4
- package/node_modules/@apollo/client/utilities/internal/toDiffWithDataState.d.ts +8 -0
- package/node_modules/@apollo/client/utilities/internal/toDiffWithDataState.js +17 -0
- package/node_modules/@apollo/client/utilities/internal/toDiffWithDataState.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.d.ts +10 -0
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/Exact.d.ts +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/Exact.js +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/Exact.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsLooselyEqual.d.ts +10 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsLooselyEqual.js +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsLooselyEqual.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsNeverish.d.ts +4 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsNeverish.js +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/IsNeverish.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/types/StreamInfoTrie.d.ts +2 -0
- package/node_modules/@apollo/client/utilities/internal/types/StreamInfoTrie.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/unwrapScalarType.d.ts +10 -0
- package/node_modules/@apollo/client/utilities/internal/unwrapScalarType.js +9 -0
- package/node_modules/@apollo/client/utilities/internal/unwrapScalarType.js.map +1 -0
- package/node_modules/@apollo/client/utilities/internal/valueToObjectRepresentation.js +1 -1
- package/node_modules/@apollo/client/version.js +1 -1
- package/node_modules/@apollo/client/version.js.map +1 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.buffer.d.ts +10 -5
- package/node_modules/@types/node/buffer.d.ts +1 -0
- package/node_modules/@types/node/crypto.d.ts +2 -4
- package/node_modules/@types/node/dgram.d.ts +119 -4
- package/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/node/ffi.d.ts +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +61 -65
- package/node_modules/@types/node/fs.d.ts +86 -76
- package/node_modules/@types/node/http.d.ts +18 -2
- package/node_modules/@types/node/http2.d.ts +12 -4
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/inspector.d.ts +2 -1
- package/node_modules/@types/node/net.d.ts +108 -16
- package/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/node/perf_hooks.d.ts +31 -19
- package/node_modules/@types/node/process.d.ts +52 -0
- package/node_modules/@types/node/quic.d.ts +252 -42
- package/node_modules/@types/node/sqlite.d.ts +6 -2
- package/node_modules/@types/node/stream/iter.d.ts +4 -4
- package/node_modules/@types/node/stream/web.d.ts +20 -0
- package/node_modules/@types/node/test.d.ts +36 -0
- package/node_modules/@types/node/tls.d.ts +50 -15
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +5 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +1 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +1 -0
- package/node_modules/@types/node/tty.d.ts +4 -3
- package/node_modules/@types/node/vfs.d.ts +211 -0
- package/node_modules/@types/node/vm.d.ts +1 -1
- package/node_modules/@types/node/web-globals/streams.d.ts +4 -0
- package/node_modules/@types/node/zlib.d.ts +17 -0
- package/node_modules/cpu-features/build/Makefile +2 -2
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o.d +1 -1
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpufeatures/src/binding.o.d +145 -145
- package/node_modules/cpu-features/build/config.gypi +8 -9
- package/node_modules/cpu-features/build/cpufeatures.target.mk +14 -14
- package/node_modules/cpu-features/build/deps/cpu_features/cpu_features.target.mk +14 -14
- package/node_modules/default-browser/package.json +1 -1
- package/node_modules/default-browser/windows.js +3 -1
- package/node_modules/js-yaml/README.md +0 -3
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +822 -779
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +29 -23
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.cjs.js +425 -397
- package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.d.ts +101 -32
- package/node_modules/js-yaml/dist/js-yaml.mjs +429 -397
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/package.json +1 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js +11 -3
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs +11 -3
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/lando/node_modules/js-yaml/lib/loader.js +16 -3
- package/node_modules/lando/node_modules/js-yaml/package.json +1 -1
- package/node_modules/open/index.js +15 -3
- package/node_modules/open/package.json +3 -3
- package/node_modules/{lando → path-scurry}/node_modules/lru-cache/README.md +96 -10
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/{lando/node_modules/lru-cache/dist/commonjs → path-scurry/node_modules/lru-cache/dist/commonjs/browser}/index.d.ts +109 -32
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js +1733 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/{lando/node_modules/lru-cache/dist/esm → path-scurry/node_modules/lru-cache/dist/commonjs}/index.d.ts +109 -32
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1733 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js +1733 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -0
- package/node_modules/{lando/node_modules/lru-cache/dist/esm → path-scurry/node_modules/lru-cache/dist/esm/browser}/index.js +315 -177
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/{lando/node_modules/lru-cache/dist/commonjs → path-scurry/node_modules/lru-cache/dist/esm}/index.js +316 -182
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.d.ts +1400 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js +1729 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js.map +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
- package/node_modules/path-scurry/node_modules/lru-cache/package.json +154 -0
- package/node_modules/powershell-utils/index.d.ts +16 -2
- package/node_modules/powershell-utils/index.js +12 -9
- package/node_modules/powershell-utils/package.json +1 -1
- package/node_modules/powershell-utils/readme.md +7 -2
- package/node_modules/ssh2/lib/protocol/crypto/build/Makefile +2 -2
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/obj.target/sshcrypto/src/binding.o.d +237 -237
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto/src/binding.o +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto.node +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/sshcrypto.target.mk +14 -14
- package/node_modules/undici/docs/docs/api/Client.md +4 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +3 -2
- package/node_modules/undici/docs/docs/api/EventSource.md +4 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +7 -3
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +7 -1
- package/node_modules/undici/lib/cache/memory-cache-store.js +2 -2
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/dispatcher/agent.js +7 -2
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +7 -4
- package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +43 -3
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +13 -1
- package/node_modules/undici/lib/dispatcher/dispatcher.js +15 -1
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +10 -3
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +18 -1
- package/node_modules/undici/lib/dispatcher/retry-agent.js +3 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +1 -1
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +91 -21
- package/node_modules/undici/lib/handler/cache-handler.js +29 -5
- package/node_modules/undici/lib/handler/decorator-handler.js +7 -1
- package/node_modules/undici/lib/handler/deduplication-handler.js +12 -6
- package/node_modules/undici/lib/handler/redirect-handler.js +21 -4
- package/node_modules/undici/lib/handler/retry-handler.js +148 -30
- package/node_modules/undici/lib/interceptor/cache.js +65 -12
- package/node_modules/undici/lib/interceptor/decompress.js +115 -13
- package/node_modules/undici/lib/interceptor/deduplicate.js +5 -4
- package/node_modules/undici/lib/interceptor/dns.js +7 -0
- package/node_modules/undici/lib/interceptor/dump.js +10 -23
- package/node_modules/undici/lib/mock/mock-agent.js +13 -1
- package/node_modules/undici/lib/mock/mock-utils.js +11 -10
- package/node_modules/undici/lib/util/cache.js +45 -3
- package/node_modules/undici/lib/web/cookies/parse.js +150 -147
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +28 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +13 -3
- package/node_modules/undici/lib/web/fetch/index.js +6 -0
- package/node_modules/undici/lib/web/fetch/request.js +2 -3
- package/node_modules/undici/lib/web/fetch/util.js +6 -1
- package/node_modules/undici/lib/web/webidl/index.js +3 -3
- package/node_modules/undici/lib/web/websocket/connection.js +1 -1
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
- package/node_modules/undici/package.json +3 -3
- package/node_modules/undici/types/client.d.ts +10 -0
- package/node_modules/undici/types/interceptors.d.ts +2 -0
- package/node_modules/undici/types/mock-agent.d.ts +11 -10
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -0
- package/node_modules/undici-types/client.d.ts +8 -3
- package/node_modules/undici-types/connector.d.ts +1 -0
- package/node_modules/undici-types/cookies.d.ts +1 -1
- package/node_modules/undici-types/dispatcher.d.ts +3 -3
- package/node_modules/undici-types/errors.d.ts +10 -0
- package/node_modules/undici-types/fetch.d.ts +5 -1
- package/node_modules/undici-types/handlers.d.ts +2 -0
- package/node_modules/undici-types/interceptors.d.ts +1 -1
- package/node_modules/undici-types/mock-interceptor.d.ts +5 -1
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/proxy-agent.d.ts +7 -0
- package/package.json +2 -2
- package/packaging/macos/build-pkg.sh +53 -0
- package/packaging/macos/preinstall +33 -0
- package/packaging/macos/test-install.sh +51 -0
- package/packaging/macos/test_package.py +74 -0
- package/packaging/macos/uninstall.sh +24 -0
- package/packaging/macos/verify-pkg.py +61 -0
- package/packaging/windows/build-msi.ps1 +153 -0
- package/packaging/windows/test-msi.ps1 +225 -0
- package/packaging/windows/verify-msi.ps1 +74 -0
- package/packaging/windows/vip-next.wxs +79 -0
- package/testdata/installer-fixture/main.go +40 -0
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/NoInfer.cjs.map +0 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/NoInfer.d.cts +0 -35
- package/node_modules/@apollo/client/utilities/internal/types/NoInfer.d.ts +0 -35
- package/node_modules/@apollo/client/utilities/internal/types/NoInfer.js +0 -2
- package/node_modules/@apollo/client/utilities/internal/types/NoInfer.js.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/commonjs/index.js.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/commonjs/index.min.js +0 -2
- package/node_modules/lando/node_modules/lru-cache/dist/commonjs/index.min.js.map +0 -7
- package/node_modules/lando/node_modules/lru-cache/dist/esm/index.d.ts.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/esm/index.js.map +0 -1
- package/node_modules/lando/node_modules/lru-cache/dist/esm/index.min.js +0 -2
- package/node_modules/lando/node_modules/lru-cache/dist/esm/index.min.js.map +0 -7
- package/node_modules/lando/node_modules/lru-cache/package.json +0 -93
- /package/node_modules/{lando/node_modules/lru-cache → path-scurry}/LICENSE.md +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/README.md +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/commonjs/index.d.ts +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/commonjs/index.d.ts.map +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/commonjs/index.js +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/commonjs/index.js.map +0 -0
- /package/node_modules/{lando/node_modules/lru-cache → path-scurry}/dist/commonjs/package.json +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/esm/index.d.ts +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/esm/index.d.ts.map +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/esm/index.js +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/dist/esm/index.js.map +0 -0
- /package/node_modules/{lando/node_modules/lru-cache → path-scurry}/dist/esm/package.json +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry/node_modules/lru-cache}/LICENSE.md +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry/node_modules/lru-cache}/dist/commonjs/package.json +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry/node_modules/lru-cache}/dist/esm/package.json +0 -0
- /package/node_modules/{lando/node_modules/path-scurry → path-scurry}/package.json +0 -0
|
@@ -8,11 +8,28 @@ import (
|
|
|
8
8
|
// scriptRunner returns scripted results per docker subcommand for control-flow
|
|
9
9
|
// tests. runErrs is consumed in order for each `run` call (nil = success).
|
|
10
10
|
type scriptRunner struct {
|
|
11
|
-
running bool //
|
|
11
|
+
running bool // proxy container exists and is running
|
|
12
|
+
stopped bool // proxy container exists but is stopped (orphan)
|
|
12
13
|
runErrs []error // sequential results for `run` calls
|
|
13
14
|
calls [][]string
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
// DockerOut scripts `inspect -f {{.State.Running}}`: exit 0 with "true" or
|
|
18
|
+
// "false" when the container exists (running or stopped), error when absent.
|
|
19
|
+
func (s *scriptRunner) DockerOut(ctx context.Context, args ...string) ([]byte, error) {
|
|
20
|
+
s.calls = append(s.calls, args)
|
|
21
|
+
if len(args) > 0 && args[0] == "inspect" {
|
|
22
|
+
switch {
|
|
23
|
+
case s.running:
|
|
24
|
+
return []byte("true\n"), nil
|
|
25
|
+
case s.stopped:
|
|
26
|
+
return []byte("false\n"), nil
|
|
27
|
+
}
|
|
28
|
+
return nil, errDocker
|
|
29
|
+
}
|
|
30
|
+
return nil, nil
|
|
31
|
+
}
|
|
32
|
+
|
|
16
33
|
func (s *scriptRunner) Docker(ctx context.Context, args ...string) error {
|
|
17
34
|
s.calls = append(s.calls, args)
|
|
18
35
|
switch {
|
|
@@ -23,11 +40,6 @@ func (s *scriptRunner) Docker(ctx context.Context, args ...string) error {
|
|
|
23
40
|
return e
|
|
24
41
|
}
|
|
25
42
|
return nil
|
|
26
|
-
case len(args) >= 2 && args[0] == "inspect":
|
|
27
|
-
if s.running {
|
|
28
|
-
return nil
|
|
29
|
-
}
|
|
30
|
-
return errDocker
|
|
31
43
|
}
|
|
32
44
|
return nil
|
|
33
45
|
}
|
|
@@ -69,6 +81,49 @@ func TestEnsureNoopWhenAlreadyRunning(t *testing.T) {
|
|
|
69
81
|
}
|
|
70
82
|
}
|
|
71
83
|
|
|
84
|
+
func TestEnsureRemovesStoppedOrphanThenStarts(t *testing.T) {
|
|
85
|
+
t.Setenv("XDG_DATA_HOME", t.TempDir())
|
|
86
|
+
// A stopped proxy container exists: inspect succeeds but prints "false".
|
|
87
|
+
// Ensure must not treat it as running; it removes the orphan (docker rm
|
|
88
|
+
// without -f) and starts a fresh proxy.
|
|
89
|
+
r := &scriptRunner{stopped: true}
|
|
90
|
+
got, err := Ensure(context.Background(), r, EnsureOptions{Domain: "vipdev.lndo.site", free: func(int) bool { return true }})
|
|
91
|
+
if err != nil {
|
|
92
|
+
t.Fatalf("Ensure: %v", err)
|
|
93
|
+
}
|
|
94
|
+
if got.HTTP != 80 || got.HTTPS != 443 {
|
|
95
|
+
t.Fatalf("expected default ports, got %+v", got)
|
|
96
|
+
}
|
|
97
|
+
var sawRm, sawRun bool
|
|
98
|
+
for _, c := range r.calls {
|
|
99
|
+
switch {
|
|
100
|
+
case len(c) == 2 && c[0] == "rm" && c[1] == ProxyContainerName:
|
|
101
|
+
if sawRun {
|
|
102
|
+
t.Fatalf("orphan must be removed before run: %v", r.calls)
|
|
103
|
+
}
|
|
104
|
+
sawRm = true
|
|
105
|
+
case len(c) > 0 && c[0] == "run":
|
|
106
|
+
sawRun = true
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if !sawRm || !sawRun {
|
|
110
|
+
t.Fatalf("expected rm then run, got calls: %v", r.calls)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
func TestIsRunningReadsInspectOutput(t *testing.T) {
|
|
115
|
+
ctx := context.Background()
|
|
116
|
+
if IsRunning(ctx, &scriptRunner{running: true}) != true {
|
|
117
|
+
t.Fatal("running container should report true")
|
|
118
|
+
}
|
|
119
|
+
if IsRunning(ctx, &scriptRunner{stopped: true}) {
|
|
120
|
+
t.Fatal("stopped container must not report running")
|
|
121
|
+
}
|
|
122
|
+
if IsRunning(ctx, &scriptRunner{}) {
|
|
123
|
+
t.Fatal("absent container must not report running")
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
72
127
|
func TestEnsureRetriesNextPortOnBindFailure(t *testing.T) {
|
|
73
128
|
t.Setenv("XDG_DATA_HOME", t.TempDir())
|
|
74
129
|
// First run fails (port busy at bind time despite probe), second succeeds.
|
|
@@ -5,12 +5,27 @@ set -e
|
|
|
5
5
|
CA_CERT="${CA_CERT:-/certs/lndo.site.pem}"
|
|
6
6
|
CA_KEY="${CA_KEY:-/certs/lndo.site.key}"
|
|
7
7
|
|
|
8
|
+
# quiet runs a command with its stderr captured, replaying it only on failure.
|
|
9
|
+
# openssl narrates success on stderr ("Certificate request self-signature ok",
|
|
10
|
+
# "subject=..."), which the CLI would otherwise tee to the user's terminal.
|
|
11
|
+
quiet() {
|
|
12
|
+
_err=$(mktemp)
|
|
13
|
+
if "$@" 2>"$_err"; then
|
|
14
|
+
rm -f "$_err"
|
|
15
|
+
else
|
|
16
|
+
_st=$?
|
|
17
|
+
cat "$_err" >&2
|
|
18
|
+
rm -f "$_err"
|
|
19
|
+
return $_st
|
|
20
|
+
fi
|
|
21
|
+
}
|
|
22
|
+
|
|
8
23
|
# 1. Ensure the CA exists (idempotent). Subject CN parity: WPVIP Local CA.
|
|
9
24
|
if [ ! -f "$CA_KEY" ]; then
|
|
10
|
-
openssl genrsa -out "$CA_KEY" 2048
|
|
25
|
+
quiet openssl genrsa -out "$CA_KEY" 2048
|
|
11
26
|
fi
|
|
12
27
|
if [ ! -f "$CA_CERT" ]; then
|
|
13
|
-
openssl req -x509 -new -nodes -key "$CA_KEY" -sha256 -days 8675 \
|
|
28
|
+
quiet openssl req -x509 -new -nodes -key "$CA_KEY" -sha256 -days 8675 \
|
|
14
29
|
-out "$CA_CERT" \
|
|
15
30
|
-subj "/C=US/ST=California/L=San Francisco/O=Automattic/OU=WPVIP/CN=WPVIP Local CA"
|
|
16
31
|
fi
|
|
@@ -41,10 +56,10 @@ if [ -n "$CERT_BASENAME" ] && [ -n "$CERT_SANS" ]; then
|
|
|
41
56
|
done
|
|
42
57
|
set +f
|
|
43
58
|
|
|
44
|
-
openssl genrsa -out "$KEY" 2048
|
|
45
|
-
openssl req -new -key "$KEY" -out "$CSR" \
|
|
59
|
+
quiet openssl genrsa -out "$KEY" 2048
|
|
60
|
+
quiet openssl req -new -key "$KEY" -out "$CSR" \
|
|
46
61
|
-subj "/C=US/ST=California/L=San Francisco/O=Automattic/OU=WPVIP/CN=${CN}"
|
|
47
|
-
openssl x509 -req -in "$CSR" -CA "$CA_CERT" -CAkey "$CA_KEY" \
|
|
62
|
+
quiet openssl x509 -req -in "$CSR" -CA "$CA_CERT" -CAkey "$CA_KEY" \
|
|
48
63
|
-CAcreateserial -out "$CRT" -days 825 -sha256 -extfile "$EXT"
|
|
49
64
|
rm -f "$CSR" "$EXT"
|
|
50
65
|
|
|
@@ -3,6 +3,7 @@ package devenv
|
|
|
3
3
|
import (
|
|
4
4
|
"context"
|
|
5
5
|
|
|
6
|
+
"github.com/Automattic/vip/internal/debuglog"
|
|
6
7
|
"github.com/Automattic/vip/internal/devenv/instancedata"
|
|
7
8
|
)
|
|
8
9
|
|
|
@@ -71,6 +72,7 @@ func applyUpdate(d *instancedata.InstanceData, c UpdateConfig) {
|
|
|
71
72
|
// Update reads, overlays, re-materializes, and persists an env's instance data.
|
|
72
73
|
// Like Node it does NOT restart — the caller instructs the user to start again.
|
|
73
74
|
func Update(ctx context.Context, slug string, c UpdateConfig) error {
|
|
75
|
+
debuglog.Printf(ctx, debugNamespace, "Will update an environment %q", slug)
|
|
74
76
|
d, err := instancedata.Read(slug)
|
|
75
77
|
if err != nil {
|
|
76
78
|
return err
|
|
@@ -16,7 +16,7 @@ func TestScaffoldDoesNotOverwriteOrInstall(t *testing.T) {
|
|
|
16
16
|
t.Fatal(err)
|
|
17
17
|
}
|
|
18
18
|
before, _ := os.ReadFile(filepath.Join(dir, "package.json"))
|
|
19
|
-
if !strings.Contains(string(before), `"0.
|
|
19
|
+
if !strings.Contains(string(before), `"0.5.0"`) || !strings.Contains(string(before), `"0.27.0"`) {
|
|
20
20
|
t.Fatalf("dependencies: %s", before)
|
|
21
21
|
}
|
|
22
22
|
if err := ScaffoldProject(dir, "assemblyscript"); err == nil {
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
package gql
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"bytes"
|
|
5
|
+
"context"
|
|
6
|
+
"io"
|
|
7
|
+
"net/http"
|
|
8
|
+
"strings"
|
|
9
|
+
"testing"
|
|
10
|
+
|
|
11
|
+
"github.com/Automattic/vip/internal/debuglog"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
type debugTransportFunc func(*http.Request) (*http.Response, error)
|
|
15
|
+
|
|
16
|
+
func (f debugTransportFunc) RoundTrip(r *http.Request) (*http.Response, error) { return f(r) }
|
|
17
|
+
|
|
18
|
+
func TestHTTPDiagnosticsPreserveRequestAndOmitSecrets(t *testing.T) {
|
|
19
|
+
var out bytes.Buffer
|
|
20
|
+
ctx := debuglog.WithLogger(context.Background(), "@automattic/vip:http", &out)
|
|
21
|
+
body := `{"operationName":"EdgeWorkers","query":"query EdgeWorkers { me { id } }","variables":{"secret":"body-secret"}}`
|
|
22
|
+
req, _ := http.NewRequestWithContext(ctx, "POST", "https://user:password-secret@example.test/graphql?token=query-secret", strings.NewReader(body))
|
|
23
|
+
c := NewClient(Config{Token: "header-secret", HTTPClient: &http.Client{Transport: debugTransportFunc(func(r *http.Request) (*http.Response, error) {
|
|
24
|
+
got, _ := io.ReadAll(r.Body)
|
|
25
|
+
if string(got) != body || r.URL.Query().Get("token") != "query-secret" || r.Header.Get("Authorization") != "Bearer header-secret" {
|
|
26
|
+
t.Fatal("diagnostics changed request")
|
|
27
|
+
}
|
|
28
|
+
return &http.Response{StatusCode: 200, Body: io.NopCloser(strings.NewReader(`{"data":{}}`)), Header: make(http.Header)}, nil
|
|
29
|
+
})}})
|
|
30
|
+
resp, err := c.Do(req)
|
|
31
|
+
if err != nil {
|
|
32
|
+
t.Fatal(err)
|
|
33
|
+
}
|
|
34
|
+
resp.Body.Close()
|
|
35
|
+
if !strings.Contains(out.String(), "running fetch https://example.test/graphql") {
|
|
36
|
+
t.Fatalf("missing fetch diagnostic: %q", out.String())
|
|
37
|
+
}
|
|
38
|
+
for _, secret := range []string{"password-secret", "body-secret", "query-secret", "header-secret"} {
|
|
39
|
+
if strings.Contains(out.String(), secret) {
|
|
40
|
+
t.Fatalf("diagnostic exposed %s", secret)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
func TestGraphQLDebugWithHandledErrorsAndRetries(t *testing.T) {
|
|
46
|
+
var out, ordinaryErrors bytes.Buffer
|
|
47
|
+
ctx := WithAllowGQLErrors(debuglog.WithLogger(context.Background(), "@automattic/vip:http:graphql", &out))
|
|
48
|
+
responseBody := `{"errors":[{"message":"message-secret","path":["app"],"extensions":{"code":"FORBIDDEN","token":"extension-secret"}}]}`
|
|
49
|
+
calls := 0
|
|
50
|
+
c := NewClient(Config{HTTPClient: &http.Client{Transport: debugTransportFunc(func(r *http.Request) (*http.Response, error) {
|
|
51
|
+
_, _ = io.Copy(io.Discard, r.Body)
|
|
52
|
+
calls++
|
|
53
|
+
status := 200
|
|
54
|
+
if calls == 1 {
|
|
55
|
+
status = 503
|
|
56
|
+
}
|
|
57
|
+
return &http.Response{StatusCode: status, Body: io.NopCloser(strings.NewReader(responseBody)), Header: make(http.Header)}, nil
|
|
58
|
+
})}, Middleware: []Middleware{NewErrorMiddleware(ErrorConfig{Stderr: &ordinaryErrors, ExitOnError: true, Exit: func(int) { t.Fatal("handled error exited") }}), NewRetryMiddleware(RetryConfig{MaxAttempts: 2, NoDelay: true})}})
|
|
59
|
+
req, _ := http.NewRequestWithContext(ctx, "POST", "https://example.test/graphql", strings.NewReader(`{"operationName":"EdgeWorkers","query":"query EdgeWorkers { me { id } }"}`))
|
|
60
|
+
resp, err := c.Do(req)
|
|
61
|
+
if err != nil {
|
|
62
|
+
t.Fatal(err)
|
|
63
|
+
}
|
|
64
|
+
defer resp.Body.Close()
|
|
65
|
+
body, _ := io.ReadAll(resp.Body)
|
|
66
|
+
if string(body) != responseBody || calls != 2 || ordinaryErrors.Len() != 0 {
|
|
67
|
+
t.Fatal("diagnostics changed retry/error handling")
|
|
68
|
+
}
|
|
69
|
+
for _, want := range []string{"Retrying", "EdgeWorkers", "Attempt: 1", "GraphQL errors", "FORBIDDEN"} {
|
|
70
|
+
if !strings.Contains(out.String(), want) {
|
|
71
|
+
t.Errorf("missing %q in %q", want, out.String())
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
for _, secret := range []string{"message-secret", "extension-secret"} {
|
|
75
|
+
if strings.Contains(out.String(), secret) {
|
|
76
|
+
t.Fatalf("diagnostic exposed %s", secret)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
package/internal/gql/error.go
CHANGED
|
@@ -9,6 +9,8 @@ import (
|
|
|
9
9
|
"os"
|
|
10
10
|
|
|
11
11
|
json "encoding/json/v2"
|
|
12
|
+
|
|
13
|
+
"github.com/Automattic/vip/internal/debuglog"
|
|
12
14
|
)
|
|
13
15
|
|
|
14
16
|
// ErrorConfig controls the behavior of the error middleware.
|
|
@@ -64,6 +66,11 @@ type errorDoer struct {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
func (e *errorDoer) Do(req *http.Request) (*http.Response, error) {
|
|
69
|
+
operation := ""
|
|
70
|
+
debugEnabled := debuglog.Enabled(req.Context(), "@automattic/vip:http:graphql")
|
|
71
|
+
if debugEnabled {
|
|
72
|
+
operation, _ = operationNameFromBody(req)
|
|
73
|
+
}
|
|
67
74
|
resp, err := e.next.Do(req)
|
|
68
75
|
if err != nil || resp == nil {
|
|
69
76
|
return resp, err
|
|
@@ -84,7 +91,26 @@ func (e *errorDoer) Do(req *http.Request) (*http.Response, error) {
|
|
|
84
91
|
resp.Body.Close()
|
|
85
92
|
resp.Body = io.NopCloser(bytes.NewReader(body))
|
|
86
93
|
|
|
87
|
-
if hasGraphQLErrors(body)
|
|
94
|
+
if hasGraphQLErrors(body) {
|
|
95
|
+
// Node emits safe diagnostic metadata even when the command handles
|
|
96
|
+
// GraphQL errors itself. Never include messages, variables or extensions
|
|
97
|
+
// other than the error code in the diagnostic stream.
|
|
98
|
+
var doc struct {
|
|
99
|
+
Errors []struct {
|
|
100
|
+
Path []any `json:"path"`
|
|
101
|
+
Extensions struct {
|
|
102
|
+
Code string `json:"code"`
|
|
103
|
+
} `json:"extensions"`
|
|
104
|
+
} `json:"errors"`
|
|
105
|
+
}
|
|
106
|
+
if debugEnabled && json.Unmarshal(body, &doc) == nil {
|
|
107
|
+
for _, item := range doc.Errors {
|
|
108
|
+
debuglog.Printf(req.Context(), "@automattic/vip:http:graphql", "GraphQL errors in response: operation=%s path=%v code=%s", operation, item.Path, item.Extensions.Code)
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if allowGQLErrorsFromContext(req.Context()) {
|
|
112
|
+
return resp, nil
|
|
113
|
+
}
|
|
88
114
|
for _, m := range extractGraphQLErrorMessages(body) {
|
|
89
115
|
fmt.Fprintf(e.cfg.Stderr, "Error: %s\n", m)
|
|
90
116
|
}
|
|
@@ -10,6 +10,7 @@ import (
|
|
|
10
10
|
|
|
11
11
|
json "encoding/json/v2"
|
|
12
12
|
|
|
13
|
+
"github.com/Automattic/vip/internal/debuglog"
|
|
13
14
|
"github.com/Automattic/vip/internal/rechallenge"
|
|
14
15
|
)
|
|
15
16
|
|
|
@@ -20,8 +21,8 @@ type RechallengeConfig struct {
|
|
|
20
21
|
TokenCache *rechallenge.TokenCache
|
|
21
22
|
Runner *rechallenge.Runner
|
|
22
23
|
// Context, if non-nil, supplies the context used for Parker calls.
|
|
23
|
-
// Defaults to context
|
|
24
|
-
//
|
|
24
|
+
// Defaults to the request context, preserving command diagnostics and
|
|
25
|
+
// cancellation through the flow.
|
|
25
26
|
Context func() context.Context
|
|
26
27
|
// Interactive, when non-nil, replaces the default
|
|
27
28
|
// rechallenge.IsInteractiveContext(nil) fallback for the Runner's
|
|
@@ -65,13 +66,13 @@ type rechallengeDoer struct {
|
|
|
65
66
|
cfg RechallengeConfig
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
func (r *rechallengeDoer) ctx() context.Context {
|
|
69
|
+
func (r *rechallengeDoer) ctx(fallback context.Context) context.Context {
|
|
69
70
|
if r.cfg.Context != nil {
|
|
70
71
|
if c := r.cfg.Context(); c != nil {
|
|
71
72
|
return c
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
return
|
|
75
|
+
return fallback
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
func (r *rechallengeDoer) Do(req *http.Request) (*http.Response, error) {
|
|
@@ -98,6 +99,8 @@ func (r *rechallengeDoer) Do(req *http.Request) (*http.Response, error) {
|
|
|
98
99
|
if r.cfg.TokenCache != nil {
|
|
99
100
|
if tok, err := r.cfg.TokenCache.Get(scope); err == nil && tok != nil {
|
|
100
101
|
attachElevatedHeader(req, *tok)
|
|
102
|
+
} else if err != nil {
|
|
103
|
+
debuglog.Printf(req.Context(), "@automattic/vip:rechallenge:link", "preflight error: unable to load elevated token")
|
|
101
104
|
}
|
|
102
105
|
}
|
|
103
106
|
|
|
@@ -128,13 +131,14 @@ func (r *rechallengeDoer) Do(req *http.Request) (*http.Response, error) {
|
|
|
128
131
|
if r.cfg.Wait != nil {
|
|
129
132
|
wait = r.cfg.Wait()
|
|
130
133
|
}
|
|
131
|
-
tok, runErr := r.cfg.Runner.Run(r.ctx(), rechallenge.RunInput{
|
|
134
|
+
tok, runErr := r.cfg.Runner.Run(r.ctx(req.Context()), rechallenge.RunInput{
|
|
132
135
|
RequestedOperation: scope,
|
|
133
136
|
Extension: *ext,
|
|
134
137
|
Interactive: interactive,
|
|
135
138
|
Wait: wait,
|
|
136
139
|
})
|
|
137
140
|
if runErr != nil || tok == nil {
|
|
141
|
+
debuglog.Printf(req.Context(), "@automattic/vip:rechallenge:link", "rechallenge flow failed for %s", scope)
|
|
138
142
|
r.reportStepUpFailure(scope, runErr)
|
|
139
143
|
// Surface the ORIGINAL error response upstream.
|
|
140
144
|
return resp, nil
|
package/internal/gql/retry.go
CHANGED
|
@@ -7,6 +7,8 @@ import (
|
|
|
7
7
|
"net/http"
|
|
8
8
|
"syscall"
|
|
9
9
|
"time"
|
|
10
|
+
|
|
11
|
+
"github.com/Automattic/vip/internal/debuglog"
|
|
10
12
|
)
|
|
11
13
|
|
|
12
14
|
type RetryConfig struct {
|
|
@@ -49,7 +51,12 @@ func (r *retryDoer) Do(req *http.Request) (*http.Response, error) {
|
|
|
49
51
|
req.Body = io.NopCloser(bytes.NewReader(body))
|
|
50
52
|
req.ContentLength = int64(len(body))
|
|
51
53
|
}
|
|
52
|
-
|
|
54
|
+
operation, parseErr := ParseOperationFromBody(body)
|
|
55
|
+
retryable := parseErr == nil && operation != nil && !operation.IsMutation
|
|
56
|
+
operationName := ""
|
|
57
|
+
if operation != nil {
|
|
58
|
+
operationName = operation.OperationName
|
|
59
|
+
}
|
|
53
60
|
var resp *http.Response
|
|
54
61
|
var lastErr error
|
|
55
62
|
for attempt := 1; attempt <= r.cfg.MaxAttempts; attempt++ {
|
|
@@ -58,7 +65,19 @@ func (r *retryDoer) Do(req *http.Request) (*http.Response, error) {
|
|
|
58
65
|
req.ContentLength = int64(len(body))
|
|
59
66
|
}
|
|
60
67
|
resp, lastErr = r.next.Do(req)
|
|
61
|
-
|
|
68
|
+
retry := shouldRetry(resp, lastErr, retryable, attempt, r.cfg.MaxAttempts)
|
|
69
|
+
if lastErr != nil || (resp != nil && resp.StatusCode >= 400) {
|
|
70
|
+
status := 0
|
|
71
|
+
if resp != nil {
|
|
72
|
+
status = resp.StatusCode
|
|
73
|
+
}
|
|
74
|
+
action := "Request failed."
|
|
75
|
+
if retry {
|
|
76
|
+
action += " Retrying request."
|
|
77
|
+
}
|
|
78
|
+
debuglog.Printf(req.Context(), "@automattic/vip:http:graphql", "%s Operation: %s. Attempt: %d. Status code: %d.", action, operationName, attempt, status)
|
|
79
|
+
}
|
|
80
|
+
if !retry {
|
|
62
81
|
return resp, lastErr
|
|
63
82
|
}
|
|
64
83
|
if resp != nil {
|
|
@@ -6,6 +6,8 @@ import (
|
|
|
6
6
|
"net/http"
|
|
7
7
|
"net/url"
|
|
8
8
|
"strings"
|
|
9
|
+
|
|
10
|
+
"github.com/Automattic/vip/internal/debuglog"
|
|
9
11
|
)
|
|
10
12
|
|
|
11
13
|
type transport struct {
|
|
@@ -31,6 +33,13 @@ func (t *transport) Do(req *http.Request) (*http.Response, error) {
|
|
|
31
33
|
if req.Header.Get("Content-Type") == "" {
|
|
32
34
|
req.Header.Set("Content-Type", "application/json")
|
|
33
35
|
}
|
|
36
|
+
// Mirror Node's HTTP diagnostic without exposing URL credentials or
|
|
37
|
+
// arbitrary query parameters (which can contain signed download tokens).
|
|
38
|
+
safeURL := *req.URL
|
|
39
|
+
safeURL.User = nil
|
|
40
|
+
safeURL.RawQuery = ""
|
|
41
|
+
safeURL.Fragment = ""
|
|
42
|
+
debuglog.Printf(req.Context(), "@automattic/vip:http", "running fetch %s", safeURL.String())
|
|
34
43
|
return t.cfg.HTTPClient.Do(req)
|
|
35
44
|
}
|
|
36
45
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
package httpproxy
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"bytes"
|
|
5
|
+
"context"
|
|
6
|
+
"net/http"
|
|
7
|
+
"strings"
|
|
8
|
+
"testing"
|
|
9
|
+
|
|
10
|
+
"github.com/Automattic/vip/internal/debuglog"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
func TestProxyDiagnosticOmitsCredentials(t *testing.T) {
|
|
14
|
+
clearProxyEnv(t)
|
|
15
|
+
t.Setenv("VIP_PROXY", "socks5://user:proxy-secret@localhost:1080")
|
|
16
|
+
var out bytes.Buffer
|
|
17
|
+
ctx := debuglog.WithLogger(context.Background(), "vip:proxy-dispatcher", &out)
|
|
18
|
+
req, _ := http.NewRequestWithContext(ctx, "GET", "https://example.test/graphql?token=request-secret", nil)
|
|
19
|
+
u, err := ProxyURL(req)
|
|
20
|
+
if err != nil {
|
|
21
|
+
t.Fatal(err)
|
|
22
|
+
}
|
|
23
|
+
if u == nil || u.User == nil {
|
|
24
|
+
t.Fatal("proxy authentication lost")
|
|
25
|
+
}
|
|
26
|
+
if !strings.Contains(out.String(), "socks5://localhost:1080") {
|
|
27
|
+
t.Fatalf("missing proxy diagnostic: %q", out.String())
|
|
28
|
+
}
|
|
29
|
+
if strings.Contains(out.String(), "secret") || strings.Contains(out.String(), "user") {
|
|
30
|
+
t.Fatalf("credentials exposed: %q", out.String())
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -21,6 +21,8 @@ import (
|
|
|
21
21
|
"strconv"
|
|
22
22
|
"strings"
|
|
23
23
|
"time"
|
|
24
|
+
|
|
25
|
+
"github.com/Automattic/vip/internal/debuglog"
|
|
24
26
|
)
|
|
25
27
|
|
|
26
28
|
// ProxyURL is the port of createProxyAgent (proxy-agent.ts:20-46). It is shaped
|
|
@@ -41,10 +43,15 @@ import (
|
|
|
41
43
|
// Errors are returned rather than swallowed. A proxy the user configured but
|
|
42
44
|
// that we cannot honour must fail the request; silently connecting direct is
|
|
43
45
|
// how the SOCKS half of this bug went unnoticed.
|
|
44
|
-
func ProxyURL(req *http.Request) (*url.URL, error) {
|
|
46
|
+
func ProxyURL(req *http.Request) (selected *url.URL, err error) {
|
|
45
47
|
if req == nil || req.URL == nil {
|
|
46
48
|
return nil, nil
|
|
47
49
|
}
|
|
50
|
+
defer func() {
|
|
51
|
+
if selected != nil && err == nil {
|
|
52
|
+
debuglog.Printf(req.Context(), "vip:proxy-dispatcher", "Enabling fetch dispatcher proxy support using config: %s://%s", selected.Scheme, selected.Host)
|
|
53
|
+
}
|
|
54
|
+
}()
|
|
48
55
|
target := req.URL
|
|
49
56
|
|
|
50
57
|
// 1. VIP Socks Proxy takes precedence and is fully backward compatible.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Package installer defines the version contract shared by native packages.
|
|
2
|
+
package installer
|
|
3
|
+
|
|
4
|
+
import (
|
|
5
|
+
"fmt"
|
|
6
|
+
"regexp"
|
|
7
|
+
"strconv"
|
|
8
|
+
"strings"
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
var versionPattern = regexp.MustCompile(`^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-(?:(alpha|beta|rc)\.(0|[1-9][0-9]*)|dev\.[0-9A-Za-z]+))?$`)
|
|
12
|
+
|
|
13
|
+
// NumericVersion preserves release ordering in MSI's three numeric fields.
|
|
14
|
+
// Each patch reserves 1000 values: dev=0, alpha=100..299, beta=300..499,
|
|
15
|
+
// rc=500..699, stable=999. Bounds are checked rather than silently truncating
|
|
16
|
+
// a version, which could otherwise make a newer release look like a downgrade.
|
|
17
|
+
func NumericVersion(version string) (string, error) {
|
|
18
|
+
m := versionPattern.FindStringSubmatch(version)
|
|
19
|
+
if m == nil {
|
|
20
|
+
return "", fmt.Errorf("invalid installer version %q", version)
|
|
21
|
+
}
|
|
22
|
+
values := make([]int, 3)
|
|
23
|
+
for i, max := range []int{255, 255, 64} {
|
|
24
|
+
n, err := strconv.Atoi(m[i+1])
|
|
25
|
+
if err != nil || n > max {
|
|
26
|
+
return "", fmt.Errorf("installer version %q exceeds numeric field %d limit %d", version, i+1, max)
|
|
27
|
+
}
|
|
28
|
+
values[i] = n
|
|
29
|
+
}
|
|
30
|
+
stage := 999
|
|
31
|
+
if m[4] != "" {
|
|
32
|
+
n, err := strconv.Atoi(m[5])
|
|
33
|
+
if err != nil || n > 199 {
|
|
34
|
+
return "", fmt.Errorf("installer prerelease number must be between 0 and 199")
|
|
35
|
+
}
|
|
36
|
+
stage = map[string]int{"alpha": 100, "beta": 300, "rc": 500}[m[4]] + n
|
|
37
|
+
} else if strings.Contains(version, "-dev.") {
|
|
38
|
+
stage = 0
|
|
39
|
+
}
|
|
40
|
+
return fmt.Sprintf("%d.%d.%d", values[0], values[1], values[2]*1000+stage), nil
|
|
41
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
package installer
|
|
2
|
+
|
|
3
|
+
import "testing"
|
|
4
|
+
|
|
5
|
+
func TestNumericVersion(t *testing.T) {
|
|
6
|
+
for _, tt := range []struct{ input, want string }{
|
|
7
|
+
{"5.0.0-dev.abc1234", "5.0.0"},
|
|
8
|
+
{"5.0.0-alpha.0", "5.0.100"},
|
|
9
|
+
{"5.0.0-alpha.199", "5.0.299"},
|
|
10
|
+
{"5.0.0-beta.0", "5.0.300"},
|
|
11
|
+
{"5.0.0-beta.199", "5.0.499"},
|
|
12
|
+
{"5.0.0-rc.0", "5.0.500"},
|
|
13
|
+
{"5.0.0-rc.199", "5.0.699"},
|
|
14
|
+
{"5.0.0", "5.0.999"},
|
|
15
|
+
{"5.0.1-alpha.0", "5.0.1100"},
|
|
16
|
+
{"5.12.3-alpha.10", "5.12.3110"},
|
|
17
|
+
{"255.255.64", "255.255.64999"},
|
|
18
|
+
} {
|
|
19
|
+
t.Run(tt.input, func(t *testing.T) {
|
|
20
|
+
got, err := NumericVersion(tt.input)
|
|
21
|
+
if err != nil || got != tt.want {
|
|
22
|
+
t.Fatalf("got %q, %v; want %q", got, err, tt.want)
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
for _, input := range []string{"", "v5.0.0", "5.0", "5.0.0-beta1", "5.0.0-beta.200", "5.0.0-alpha.01", "5.0.0-rc.-1", "256.0.0", "5.256.0", "5.0.65", "05.0.0", "5.0.0-unknown.1", "5.0.0-dev.", "5.0.0+meta", "9999999999999999999999.0.0"} {
|
|
27
|
+
t.Run(input, func(t *testing.T) {
|
|
28
|
+
if got, err := NumericVersion(input); err == nil {
|
|
29
|
+
t.Fatalf("accepted %q as %q", input, got)
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//go:build parity
|
|
2
|
+
|
|
3
|
+
package parity
|
|
4
|
+
|
|
5
|
+
import (
|
|
6
|
+
json "encoding/json/v2"
|
|
7
|
+
"reflect"
|
|
8
|
+
"regexp"
|
|
9
|
+
"strings"
|
|
10
|
+
"testing"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
// This catches debug flags being parsed but never connected to the transport,
|
|
14
|
+
// namespace filters being ignored, and diagnostics contaminating JSON stdout.
|
|
15
|
+
func TestEdgeWorkersListDebugParity(t *testing.T) {
|
|
16
|
+
rig, skip := differentialAvailable(t)
|
|
17
|
+
if skip != "" {
|
|
18
|
+
t.Skip(LoudSkip("Edge Workers debug real Node-vs-Go comparisons", skip))
|
|
19
|
+
}
|
|
20
|
+
for _, tc := range []struct {
|
|
21
|
+
name string
|
|
22
|
+
flags []string
|
|
23
|
+
env string
|
|
24
|
+
wantHTTP bool
|
|
25
|
+
}{
|
|
26
|
+
{name: "disabled"},
|
|
27
|
+
{name: "short", flags: []string{"-d"}, wantHTTP: true},
|
|
28
|
+
{name: "long", flags: []string{"--debug"}, wantHTTP: true},
|
|
29
|
+
{name: "matching", flags: []string{"--debug=@automattic/vip:http"}, wantHTTP: true},
|
|
30
|
+
{name: "matching-separated", flags: []string{"--debug", "@automattic/vip:http"}, wantHTTP: true},
|
|
31
|
+
{name: "nonmatching-separated", flags: []string{"-d", "unrelated:namespace"}},
|
|
32
|
+
{name: "wildcard-exclusion", flags: []string{"--debug=*,-@automattic/vip:http"}},
|
|
33
|
+
{name: "nonmatching", flags: []string{"--debug=unrelated:namespace"}},
|
|
34
|
+
{name: "environment", env: "@automattic/vip:http", wantHTTP: true},
|
|
35
|
+
{name: "flag-overrides-environment", env: "@automattic/vip:http", flags: []string{"--debug=unrelated:namespace"}},
|
|
36
|
+
{name: "empty-flag-keeps-environment", env: "@automattic/vip:http", flags: []string{"--debug="}, wantHTTP: true},
|
|
37
|
+
} {
|
|
38
|
+
t.Run(tc.name, func(t *testing.T) {
|
|
39
|
+
var outputs [2]any
|
|
40
|
+
for side, bin := range []string{rig.nodeBin, rig.goBin} {
|
|
41
|
+
api := newEdgeFixtureAPI("inactive")
|
|
42
|
+
// A list response has no reason to reveal stored source in diagnostics.
|
|
43
|
+
api.workers[0]["source"] = "debug-parity-private-source"
|
|
44
|
+
rig.serve(t, api)
|
|
45
|
+
env := rig.scenarioEnv(&Scenario{Env: map[string]string{"DEBUG": tc.env}})
|
|
46
|
+
args := append([]string{"edge-workers", "list", "--app=42", "--env=develop", "--format=json"}, tc.flags...)
|
|
47
|
+
result, err := Run(RunSpec{Binary: bin, Dir: t.TempDir(), Argv: args, Env: FixtureEnv(env)})
|
|
48
|
+
if err != nil {
|
|
49
|
+
t.Fatal(err)
|
|
50
|
+
}
|
|
51
|
+
if result.ExitCode != 0 {
|
|
52
|
+
t.Fatalf("side %d exited %d: %s", side, result.ExitCode, result.Stderr)
|
|
53
|
+
}
|
|
54
|
+
// Approved runtime banner difference, CUTOVER-BREAKING-CHANGES 1.10.
|
|
55
|
+
stdout := regexp.MustCompile(`(?m)^Debug: VIP-CLI v[^,\n]+, Node v[^,\n]+, [^,\n]+, Runtime node-script\n`).ReplaceAllString(result.Stdout, "")
|
|
56
|
+
if err := json.Unmarshal([]byte(stdout), &outputs[side]); err != nil {
|
|
57
|
+
t.Fatalf("side %d stdout is not JSON: %v\n%s", side, err, stdout)
|
|
58
|
+
}
|
|
59
|
+
count := 0
|
|
60
|
+
for _, line := range strings.Split(result.Stderr, "\n") {
|
|
61
|
+
if strings.Contains(line, "@automattic/vip:http running fetch "+rig.srv.URL+"/graphql") {
|
|
62
|
+
count++
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
wantCount := 0
|
|
66
|
+
if tc.wantHTTP {
|
|
67
|
+
wantCount = 2 // app resolution, then EdgeWorkers
|
|
68
|
+
}
|
|
69
|
+
if count != wantCount {
|
|
70
|
+
t.Errorf("side %d HTTP diagnostics = %d, want %d; stderr:\n%s", side, count, wantCount, result.Stderr)
|
|
71
|
+
}
|
|
72
|
+
for _, secret := range []string{rig.token, "debug-parity-private-source", "Bearer ", `"variables":`, `"edgeWorkers":`} {
|
|
73
|
+
if strings.Contains(result.Stderr, secret) {
|
|
74
|
+
t.Errorf("side %d diagnostics exposed credential or payload data", side)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
ops, observations := api.snapshot()
|
|
78
|
+
if len(ops) != 0 || len(observations) != 1 || observations[0].Operation != "EdgeWorkers" || observations[0].Source {
|
|
79
|
+
t.Errorf("side %d did not perform exactly one source-free list: operations=%v requests=%v", side, ops, observations)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if !reflect.DeepEqual(outputs[0], outputs[1]) {
|
|
83
|
+
t.Errorf("JSON output differs: Node=%v Go=%v", outputs[0], outputs[1])
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
}
|