@apollo/client 3.8.0-beta.5 → 3.8.0-beta.7
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/apollo-client.cjs +282 -242
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/cache/cache.cjs +12 -12
- package/cache/cache.cjs.map +1 -1
- package/cache/cache.cjs.native.js +12 -12
- package/cache/core/cache.d.ts +3 -3
- package/cache/core/cache.d.ts.map +1 -1
- package/cache/core/cache.js +1 -1
- package/cache/core/cache.js.map +1 -1
- package/cache/core/types/Cache.d.ts +3 -3
- package/cache/core/types/Cache.d.ts.map +1 -1
- package/cache/core/types/Cache.js.map +1 -1
- package/cache/core/types/DataProxy.d.ts +2 -2
- package/cache/core/types/DataProxy.d.ts.map +1 -1
- package/cache/core/types/DataProxy.js.map +1 -1
- package/cache/core/types/common.d.ts +2 -2
- package/cache/core/types/common.d.ts.map +1 -1
- package/cache/core/types/common.js.map +1 -1
- package/cache/index.d.ts +14 -14
- package/cache/index.d.ts.map +1 -1
- package/cache/index.js +13 -13
- package/cache/index.js.map +1 -1
- package/cache/inmemory/entityStore.d.ts +5 -5
- package/cache/inmemory/entityStore.d.ts.map +1 -1
- package/cache/inmemory/entityStore.js +3 -3
- package/cache/inmemory/entityStore.js.map +1 -1
- package/cache/inmemory/fragmentRegistry.js.map +1 -1
- package/cache/inmemory/helpers.d.ts +5 -5
- package/cache/inmemory/helpers.d.ts.map +1 -1
- package/cache/inmemory/helpers.js +1 -1
- package/cache/inmemory/helpers.js.map +1 -1
- package/cache/inmemory/inMemoryCache.d.ts +8 -8
- package/cache/inmemory/inMemoryCache.d.ts.map +1 -1
- package/cache/inmemory/inMemoryCache.js +13 -13
- package/cache/inmemory/inMemoryCache.js.map +1 -1
- package/cache/inmemory/key-extractor.d.ts +1 -1
- package/cache/inmemory/key-extractor.d.ts.map +1 -1
- package/cache/inmemory/key-extractor.js.map +1 -1
- package/cache/inmemory/object-canon.d.ts.map +1 -1
- package/cache/inmemory/object-canon.js +2 -3
- package/cache/inmemory/object-canon.js.map +1 -1
- package/cache/inmemory/policies.d.ts +6 -6
- package/cache/inmemory/policies.d.ts.map +1 -1
- package/cache/inmemory/policies.js +9 -9
- package/cache/inmemory/policies.js.map +1 -1
- package/cache/inmemory/reactiveVars.d.ts +1 -1
- package/cache/inmemory/reactiveVars.d.ts.map +1 -1
- package/cache/inmemory/reactiveVars.js.map +1 -1
- package/cache/inmemory/readFromStore.d.ts +6 -6
- package/cache/inmemory/readFromStore.d.ts.map +1 -1
- package/cache/inmemory/readFromStore.js +7 -7
- package/cache/inmemory/readFromStore.js.map +1 -1
- package/cache/inmemory/types.d.ts +6 -6
- package/cache/inmemory/types.d.ts.map +1 -1
- package/cache/inmemory/types.js.map +1 -1
- package/cache/inmemory/writeToStore.d.ts +6 -6
- package/cache/inmemory/writeToStore.d.ts.map +1 -1
- package/cache/inmemory/writeToStore.js +10 -10
- package/cache/inmemory/writeToStore.js.map +1 -1
- package/config/jest/setup.d.ts +1 -1
- package/config/jest/setup.d.ts.map +1 -1
- package/config/jest/setup.js +2 -2
- package/config/jest/setup.js.map +1 -1
- package/core/ApolloClient.d.ts +10 -10
- package/core/ApolloClient.d.ts.map +1 -1
- package/core/ApolloClient.js +12 -11
- package/core/ApolloClient.js.map +1 -1
- package/core/LocalState.d.ts +5 -5
- package/core/LocalState.d.ts.map +1 -1
- package/core/LocalState.js +5 -5
- package/core/LocalState.js.map +1 -1
- package/core/ObservableQuery.d.ts +11 -10
- package/core/ObservableQuery.d.ts.map +1 -1
- package/core/ObservableQuery.js +17 -13
- package/core/ObservableQuery.js.map +1 -1
- package/core/QueryInfo.d.ts +9 -9
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +4 -4
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +12 -12
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +25 -25
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +43 -37
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +43 -37
- package/core/equalByQuery.d.ts +2 -2
- package/core/equalByQuery.d.ts.map +1 -1
- package/core/equalByQuery.js +9 -8
- package/core/equalByQuery.js.map +1 -1
- package/core/index.d.ts +13 -13
- package/core/index.d.ts.map +1 -1
- package/core/index.js +12 -13
- package/core/index.js.map +1 -1
- package/core/types.d.ts +10 -10
- package/core/types.d.ts.map +1 -1
- package/core/types.js.map +1 -1
- package/core/watchQueryOptions.d.ts +4 -4
- package/core/watchQueryOptions.d.ts.map +1 -1
- package/core/watchQueryOptions.js.map +1 -1
- package/dev/dev.cjs +73 -81
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +73 -81
- package/dev/index.d.ts +3 -3
- package/dev/index.d.ts.map +1 -1
- package/dev/index.js +3 -3
- package/dev/index.js.map +1 -1
- package/dev/loadDevMessages.js +2 -2
- package/dev/loadDevMessages.js.map +1 -1
- package/dev/loadErrorMessageHandler.d.ts +1 -1
- package/dev/loadErrorMessageHandler.d.ts.map +1 -1
- package/dev/loadErrorMessageHandler.js +2 -2
- package/dev/loadErrorMessageHandler.js.map +1 -1
- package/dev/loadErrorMessages.js +2 -2
- package/dev/loadErrorMessages.js.map +1 -1
- package/errors/errors.cjs.map +1 -1
- package/errors/index.d.ts +4 -4
- package/errors/index.d.ts.map +1 -1
- package/errors/index.js +2 -2
- package/errors/index.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/invariantErrorCodes.js +71 -78
- package/link/batch/batch.cjs.map +1 -1
- package/link/batch/batchLink.d.ts +5 -5
- package/link/batch/batchLink.d.ts.map +1 -1
- package/link/batch/batchLink.js +3 -3
- package/link/batch/batchLink.js.map +1 -1
- package/link/batch/batching.d.ts +2 -2
- package/link/batch/batching.d.ts.map +1 -1
- package/link/batch/batching.js +1 -1
- package/link/batch/batching.js.map +1 -1
- package/link/batch/index.d.ts +1 -1
- package/link/batch/index.d.ts.map +1 -1
- package/link/batch/index.js +1 -1
- package/link/batch/index.js.map +1 -1
- package/link/batch-http/batch-http.cjs.map +1 -1
- package/link/batch-http/batchHttpLink.d.ts +5 -5
- package/link/batch-http/batchHttpLink.d.ts.map +1 -1
- package/link/batch-http/batchHttpLink.js +5 -5
- package/link/batch-http/batchHttpLink.js.map +1 -1
- package/link/batch-http/index.d.ts +1 -1
- package/link/batch-http/index.d.ts.map +1 -1
- package/link/batch-http/index.js +1 -1
- package/link/batch-http/index.js.map +1 -1
- package/link/context/context.cjs.map +1 -1
- package/link/context/index.d.ts +3 -3
- package/link/context/index.d.ts.map +1 -1
- package/link/context/index.js +2 -2
- package/link/context/index.js.map +1 -1
- package/link/core/ApolloLink.d.ts +3 -3
- package/link/core/ApolloLink.d.ts.map +1 -1
- package/link/core/ApolloLink.js +5 -5
- package/link/core/ApolloLink.js.map +1 -1
- package/link/core/concat.d.ts +1 -1
- package/link/core/concat.d.ts.map +1 -1
- package/link/core/concat.js +1 -1
- package/link/core/concat.js.map +1 -1
- package/link/core/core.cjs +2 -2
- package/link/core/core.cjs.map +1 -1
- package/link/core/core.cjs.native.js +2 -2
- package/link/core/empty.d.ts +1 -1
- package/link/core/empty.d.ts.map +1 -1
- package/link/core/empty.js +1 -1
- package/link/core/empty.js.map +1 -1
- package/link/core/execute.d.ts +1 -1
- package/link/core/execute.d.ts.map +1 -1
- package/link/core/execute.js +1 -1
- package/link/core/execute.js.map +1 -1
- package/link/core/from.d.ts +1 -1
- package/link/core/from.d.ts.map +1 -1
- package/link/core/from.js +1 -1
- package/link/core/from.js.map +1 -1
- package/link/core/index.d.ts +8 -8
- package/link/core/index.d.ts.map +1 -1
- package/link/core/index.js +8 -8
- package/link/core/index.js.map +1 -1
- package/link/core/split.d.ts +1 -1
- package/link/core/split.d.ts.map +1 -1
- package/link/core/split.js +1 -1
- package/link/core/split.js.map +1 -1
- package/link/core/types.d.ts +2 -2
- package/link/core/types.d.ts.map +1 -1
- package/link/core/types.js.map +1 -1
- package/link/error/error.cjs.map +1 -1
- package/link/error/index.d.ts +4 -4
- package/link/error/index.d.ts.map +1 -1
- package/link/error/index.js +2 -2
- package/link/error/index.js.map +1 -1
- package/link/http/HttpLink.d.ts +3 -3
- package/link/http/HttpLink.d.ts.map +1 -1
- package/link/http/HttpLink.js +2 -2
- package/link/http/HttpLink.js.map +1 -1
- package/link/http/checkFetcher.js +2 -2
- package/link/http/checkFetcher.js.map +1 -1
- package/link/http/createHttpLink.d.ts +2 -2
- package/link/http/createHttpLink.d.ts.map +1 -1
- package/link/http/createHttpLink.js +14 -14
- package/link/http/createHttpLink.js.map +1 -1
- package/link/http/http.cjs +4 -4
- package/link/http/http.cjs.map +1 -1
- package/link/http/http.cjs.native.js +4 -4
- package/link/http/index.d.ts +10 -10
- package/link/http/index.d.ts.map +1 -1
- package/link/http/index.js +10 -10
- package/link/http/index.js.map +1 -1
- package/link/http/iterators/nodeStream.js.map +1 -1
- package/link/http/iterators/promise.js.map +1 -1
- package/link/http/iterators/reader.js.map +1 -1
- package/link/http/parseAndCheckHttpResponse.d.ts +2 -2
- package/link/http/parseAndCheckHttpResponse.d.ts.map +1 -1
- package/link/http/parseAndCheckHttpResponse.js +2 -2
- package/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/link/http/responseIterator.js.map +1 -1
- package/link/http/rewriteURIForGET.d.ts +1 -1
- package/link/http/rewriteURIForGET.d.ts.map +1 -1
- package/link/http/rewriteURIForGET.js +1 -1
- package/link/http/rewriteURIForGET.js.map +1 -1
- package/link/http/selectHttpOptionsAndBody.d.ts +2 -2
- package/link/http/selectHttpOptionsAndBody.d.ts.map +1 -1
- package/link/http/selectHttpOptionsAndBody.js +1 -1
- package/link/http/selectHttpOptionsAndBody.js.map +1 -1
- package/link/http/selectURI.d.ts +1 -1
- package/link/http/selectURI.d.ts.map +1 -1
- package/link/http/selectURI.js.map +1 -1
- package/link/http/serializeFetchParameter.d.ts +1 -1
- package/link/http/serializeFetchParameter.d.ts.map +1 -1
- package/link/http/serializeFetchParameter.js +2 -2
- package/link/http/serializeFetchParameter.js.map +1 -1
- package/link/persisted-queries/index.d.ts +3 -3
- package/link/persisted-queries/index.d.ts.map +1 -1
- package/link/persisted-queries/index.js +6 -6
- package/link/persisted-queries/index.js.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs +2 -2
- package/link/persisted-queries/persisted-queries.cjs.map +1 -1
- package/link/persisted-queries/persisted-queries.cjs.native.js +2 -2
- package/link/remove-typename/index.d.ts +1 -1
- package/link/remove-typename/index.d.ts.map +1 -1
- package/link/remove-typename/index.js +1 -1
- package/link/remove-typename/index.js.map +1 -1
- package/link/remove-typename/remove-typename.cjs.map +1 -1
- package/link/remove-typename/removeTypenameFromVariables.d.ts +1 -1
- package/link/remove-typename/removeTypenameFromVariables.d.ts.map +1 -1
- package/link/remove-typename/removeTypenameFromVariables.js +2 -2
- package/link/remove-typename/removeTypenameFromVariables.js.map +1 -1
- package/link/retry/delayFunction.d.ts +1 -1
- package/link/retry/delayFunction.d.ts.map +1 -1
- package/link/retry/delayFunction.js.map +1 -1
- package/link/retry/index.d.ts +1 -1
- package/link/retry/index.d.ts.map +1 -1
- package/link/retry/index.js +1 -1
- package/link/retry/index.js.map +1 -1
- package/link/retry/retry.cjs.map +1 -1
- package/link/retry/retryFunction.d.ts +1 -1
- package/link/retry/retryFunction.d.ts.map +1 -1
- package/link/retry/retryFunction.js.map +1 -1
- package/link/retry/retryLink.d.ts +5 -5
- package/link/retry/retryLink.d.ts.map +1 -1
- package/link/retry/retryLink.js +4 -4
- package/link/retry/retryLink.js.map +1 -1
- package/link/schema/index.d.ts +3 -3
- package/link/schema/index.d.ts.map +1 -1
- package/link/schema/index.js +2 -2
- package/link/schema/index.js.map +1 -1
- package/link/schema/schema.cjs.map +1 -1
- package/link/subscriptions/index.d.ts +3 -3
- package/link/subscriptions/index.d.ts.map +1 -1
- package/link/subscriptions/index.js +1 -1
- package/link/subscriptions/index.js.map +1 -1
- package/link/subscriptions/subscriptions.cjs.map +1 -1
- package/link/utils/createOperation.d.ts +1 -1
- package/link/utils/createOperation.d.ts.map +1 -1
- package/link/utils/createOperation.js.map +1 -1
- package/link/utils/fromError.d.ts +1 -1
- package/link/utils/fromError.d.ts.map +1 -1
- package/link/utils/fromError.js +1 -1
- package/link/utils/fromError.js.map +1 -1
- package/link/utils/fromPromise.d.ts +1 -1
- package/link/utils/fromPromise.d.ts.map +1 -1
- package/link/utils/fromPromise.js +1 -1
- package/link/utils/fromPromise.js.map +1 -1
- package/link/utils/index.d.ts +9 -9
- package/link/utils/index.d.ts.map +1 -1
- package/link/utils/index.js +9 -9
- package/link/utils/index.js.map +1 -1
- package/link/utils/toPromise.d.ts +1 -1
- package/link/utils/toPromise.d.ts.map +1 -1
- package/link/utils/toPromise.js +2 -2
- package/link/utils/toPromise.js.map +1 -1
- package/link/utils/transformOperation.d.ts +1 -1
- package/link/utils/transformOperation.d.ts.map +1 -1
- package/link/utils/transformOperation.js +1 -1
- package/link/utils/transformOperation.js.map +1 -1
- package/link/utils/utils.cjs +2 -2
- package/link/utils/utils.cjs.map +1 -1
- package/link/utils/utils.cjs.native.js +2 -2
- package/link/utils/validateOperation.d.ts +1 -1
- package/link/utils/validateOperation.d.ts.map +1 -1
- package/link/utils/validateOperation.js +2 -2
- package/link/utils/validateOperation.js.map +1 -1
- package/link/ws/index.d.ts +3 -3
- package/link/ws/index.d.ts.map +1 -1
- package/link/ws/index.js +1 -1
- package/link/ws/index.js.map +1 -1
- package/link/ws/ws.cjs.map +1 -1
- package/package.json +18 -14
- package/react/cache/QueryReference.d.ts +9 -6
- package/react/cache/QueryReference.d.ts.map +1 -1
- package/react/cache/QueryReference.js +108 -52
- package/react/cache/QueryReference.js.map +1 -1
- package/react/cache/SuspenseCache.d.ts +3 -3
- package/react/cache/SuspenseCache.d.ts.map +1 -1
- package/react/cache/SuspenseCache.js +2 -2
- package/react/cache/SuspenseCache.js.map +1 -1
- package/react/cache/index.d.ts +1 -1
- package/react/cache/index.d.ts.map +1 -1
- package/react/cache/index.js +1 -1
- package/react/cache/index.js.map +1 -1
- package/react/components/Mutation.d.ts +3 -3
- package/react/components/Mutation.d.ts.map +1 -1
- package/react/components/Mutation.js +1 -1
- package/react/components/Mutation.js.map +1 -1
- package/react/components/Query.d.ts +2 -2
- package/react/components/Query.d.ts.map +1 -1
- package/react/components/Query.js +1 -1
- package/react/components/Query.js.map +1 -1
- package/react/components/Subscription.d.ts +2 -2
- package/react/components/Subscription.d.ts.map +1 -1
- package/react/components/Subscription.js +1 -1
- package/react/components/Subscription.js.map +1 -1
- package/react/components/components.cjs.map +1 -1
- package/react/components/index.d.ts +4 -4
- package/react/components/index.d.ts.map +1 -1
- package/react/components/index.js +4 -4
- package/react/components/index.js.map +1 -1
- package/react/components/types.d.ts +2 -2
- package/react/components/types.d.ts.map +1 -1
- package/react/components/types.js.map +1 -1
- package/react/context/ApolloConsumer.d.ts +1 -1
- package/react/context/ApolloConsumer.d.ts.map +1 -1
- package/react/context/ApolloConsumer.js +3 -3
- package/react/context/ApolloConsumer.js.map +1 -1
- package/react/context/ApolloContext.d.ts +4 -5
- package/react/context/ApolloContext.d.ts.map +1 -1
- package/react/context/ApolloContext.js +12 -5
- package/react/context/ApolloContext.js.map +1 -1
- package/react/context/ApolloProvider.d.ts +2 -2
- package/react/context/ApolloProvider.d.ts.map +1 -1
- package/react/context/ApolloProvider.js +3 -3
- package/react/context/ApolloProvider.js.map +1 -1
- package/react/context/context.cjs +12 -5
- package/react/context/context.cjs.map +1 -1
- package/react/context/context.cjs.native.js +12 -5
- package/react/context/index.d.ts +4 -4
- package/react/context/index.d.ts.map +1 -1
- package/react/context/index.js +4 -4
- package/react/context/index.js.map +1 -1
- package/react/hoc/graphql.d.ts +2 -2
- package/react/hoc/graphql.d.ts.map +1 -1
- package/react/hoc/graphql.js +4 -4
- package/react/hoc/graphql.js.map +1 -1
- package/react/hoc/hoc-utils.d.ts +2 -2
- package/react/hoc/hoc-utils.d.ts.map +1 -1
- package/react/hoc/hoc-utils.js +2 -2
- package/react/hoc/hoc-utils.js.map +1 -1
- package/react/hoc/hoc.cjs +2 -2
- package/react/hoc/hoc.cjs.map +1 -1
- package/react/hoc/hoc.cjs.native.js +2 -2
- package/react/hoc/index.d.ts +7 -7
- package/react/hoc/index.d.ts.map +1 -1
- package/react/hoc/index.js +7 -7
- package/react/hoc/index.js.map +1 -1
- package/react/hoc/mutation-hoc.d.ts +3 -3
- package/react/hoc/mutation-hoc.d.ts.map +1 -1
- package/react/hoc/mutation-hoc.js +3 -3
- package/react/hoc/mutation-hoc.js.map +1 -1
- package/react/hoc/query-hoc.d.ts +1 -1
- package/react/hoc/query-hoc.d.ts.map +1 -1
- package/react/hoc/query-hoc.js +3 -3
- package/react/hoc/query-hoc.js.map +1 -1
- package/react/hoc/subscription-hoc.d.ts +1 -1
- package/react/hoc/subscription-hoc.d.ts.map +1 -1
- package/react/hoc/subscription-hoc.js +3 -3
- package/react/hoc/subscription-hoc.js.map +1 -1
- package/react/hoc/types.d.ts +4 -4
- package/react/hoc/types.d.ts.map +1 -1
- package/react/hoc/types.js.map +1 -1
- package/react/hoc/withApollo.d.ts +1 -1
- package/react/hoc/withApollo.d.ts.map +1 -1
- package/react/hoc/withApollo.js +3 -3
- package/react/hoc/withApollo.js.map +1 -1
- package/react/hooks/hooks.cjs +179 -140
- package/react/hooks/hooks.cjs.map +1 -1
- package/react/hooks/hooks.cjs.native.js +179 -140
- package/react/hooks/index.d.ts +11 -11
- package/react/hooks/index.d.ts.map +1 -1
- package/react/hooks/index.js +11 -11
- package/react/hooks/index.js.map +1 -1
- package/react/hooks/internal/__use.js +2 -2
- package/react/hooks/internal/__use.js.map +1 -1
- package/react/hooks/internal/index.d.ts +3 -4
- package/react/hooks/internal/index.d.ts.map +1 -1
- package/react/hooks/internal/index.js +3 -4
- package/react/hooks/internal/index.js.map +1 -1
- package/react/hooks/internal/useDeepMemo.js +2 -2
- package/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts +2 -2
- package/react/hooks/internal/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/react/hooks/internal/useIsomorphicLayoutEffect.js +4 -4
- package/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/react/hooks/useApolloClient.d.ts +1 -1
- package/react/hooks/useApolloClient.d.ts.map +1 -1
- package/react/hooks/useApolloClient.js +5 -5
- package/react/hooks/useApolloClient.js.map +1 -1
- package/react/hooks/useBackgroundQuery.d.ts +5 -5
- package/react/hooks/useBackgroundQuery.d.ts.map +1 -1
- package/react/hooks/useBackgroundQuery.js +16 -17
- package/react/hooks/useBackgroundQuery.js.map +1 -1
- package/react/hooks/useFragment.d.ts +4 -4
- package/react/hooks/useFragment.d.ts.map +1 -1
- package/react/hooks/useFragment.js +2 -2
- package/react/hooks/useFragment.js.map +1 -1
- package/react/hooks/useLazyQuery.d.ts +2 -2
- package/react/hooks/useLazyQuery.d.ts.map +1 -1
- package/react/hooks/useLazyQuery.js +9 -9
- package/react/hooks/useLazyQuery.js.map +1 -1
- package/react/hooks/useMutation.d.ts +2 -2
- package/react/hooks/useMutation.d.ts.map +1 -1
- package/react/hooks/useMutation.js +10 -10
- package/react/hooks/useMutation.js.map +1 -1
- package/react/hooks/useQuery.d.ts +4 -4
- package/react/hooks/useQuery.d.ts.map +1 -1
- package/react/hooks/useQuery.js +17 -17
- package/react/hooks/useQuery.js.map +1 -1
- package/react/hooks/useReactiveVar.d.ts +1 -1
- package/react/hooks/useReactiveVar.d.ts.map +1 -1
- package/react/hooks/useReactiveVar.js +3 -3
- package/react/hooks/useReactiveVar.js.map +1 -1
- package/react/hooks/useReadQuery.d.ts +3 -3
- package/react/hooks/useReadQuery.d.ts.map +1 -1
- package/react/hooks/useReadQuery.js +6 -6
- package/react/hooks/useReadQuery.js.map +1 -1
- package/react/hooks/useSubscription.d.ts +2 -2
- package/react/hooks/useSubscription.d.ts.map +1 -1
- package/react/hooks/useSubscription.js +14 -14
- package/react/hooks/useSubscription.js.map +1 -1
- package/react/hooks/useSuspenseCache.d.ts +1 -1
- package/react/hooks/useSuspenseCache.d.ts.map +1 -1
- package/react/hooks/useSuspenseCache.js +5 -5
- package/react/hooks/useSuspenseCache.js.map +1 -1
- package/react/hooks/useSuspenseQuery.d.ts +4 -6
- package/react/hooks/useSuspenseQuery.d.ts.map +1 -1
- package/react/hooks/useSuspenseQuery.js +30 -34
- package/react/hooks/useSuspenseQuery.js.map +1 -1
- package/react/hooks/useSyncExternalStore.js +4 -4
- package/react/hooks/useSyncExternalStore.js.map +1 -1
- package/react/index.d.ts +6 -6
- package/react/index.d.ts.map +1 -1
- package/react/index.js +6 -6
- package/react/index.js.map +1 -1
- package/react/parser/index.js +6 -6
- package/react/parser/index.js.map +1 -1
- package/react/parser/parser.cjs +5 -5
- package/react/parser/parser.cjs.map +1 -1
- package/react/parser/parser.cjs.native.js +5 -5
- package/react/react.cjs +106 -50
- package/react/react.cjs.map +1 -1
- package/react/react.cjs.native.js +106 -50
- package/react/ssr/RenderPromises.d.ts +2 -2
- package/react/ssr/RenderPromises.d.ts.map +1 -1
- package/react/ssr/RenderPromises.js.map +1 -1
- package/react/ssr/getDataFromTree.js +2 -2
- package/react/ssr/getDataFromTree.js.map +1 -1
- package/react/ssr/index.d.ts +3 -3
- package/react/ssr/index.d.ts.map +1 -1
- package/react/ssr/index.js +3 -3
- package/react/ssr/index.js.map +1 -1
- package/react/ssr/renderToStringWithData.js +1 -1
- package/react/ssr/renderToStringWithData.js.map +1 -1
- package/react/ssr/ssr.cjs.map +1 -1
- package/react/types/types.d.ts +7 -7
- package/react/types/types.d.ts.map +1 -1
- package/react/types/types.js.map +1 -1
- package/testing/core/core.cjs +1 -1
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +1 -1
- package/testing/core/index.d.ts +7 -7
- package/testing/core/index.d.ts.map +1 -1
- package/testing/core/index.js +7 -7
- package/testing/core/index.js.map +1 -1
- package/testing/core/mocking/mockClient.d.ts +2 -2
- package/testing/core/mocking/mockClient.d.ts.map +1 -1
- package/testing/core/mocking/mockClient.js +3 -3
- package/testing/core/mocking/mockClient.js.map +1 -1
- package/testing/core/mocking/mockLink.d.ts +3 -3
- package/testing/core/mocking/mockLink.d.ts.map +1 -1
- package/testing/core/mocking/mockLink.js +4 -4
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/mocking/mockQueryManager.d.ts +3 -3
- package/testing/core/mocking/mockQueryManager.d.ts.map +1 -1
- package/testing/core/mocking/mockQueryManager.js +3 -3
- package/testing/core/mocking/mockQueryManager.js.map +1 -1
- package/testing/core/mocking/mockSubscriptionLink.d.ts +3 -3
- package/testing/core/mocking/mockSubscriptionLink.d.ts.map +1 -1
- package/testing/core/mocking/mockSubscriptionLink.js +2 -2
- package/testing/core/mocking/mockSubscriptionLink.js.map +1 -1
- package/testing/core/mocking/mockWatchQuery.d.ts +2 -2
- package/testing/core/mocking/mockWatchQuery.d.ts.map +1 -1
- package/testing/core/mocking/mockWatchQuery.js +1 -1
- package/testing/core/mocking/mockWatchQuery.js.map +1 -1
- package/testing/core/observableToPromise.d.ts +2 -2
- package/testing/core/observableToPromise.d.ts.map +1 -1
- package/testing/core/observableToPromise.js.map +1 -1
- package/testing/core/subscribeAndCount.d.ts +1 -1
- package/testing/core/subscribeAndCount.d.ts.map +1 -1
- package/testing/core/subscribeAndCount.js +1 -1
- package/testing/core/subscribeAndCount.js.map +1 -1
- package/testing/index.d.ts +3 -3
- package/testing/index.d.ts.map +1 -1
- package/testing/index.js +3 -3
- package/testing/index.js.map +1 -1
- package/testing/matchers/index.js +2 -2
- package/testing/matchers/index.js.map +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.d.ts.map +1 -1
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.js +2 -2
- package/testing/matchers/toHaveSuspenseCacheEntryUsing.js.map +1 -1
- package/testing/matchers/toMatchDocument.d.ts +1 -1
- package/testing/matchers/toMatchDocument.d.ts.map +1 -1
- package/testing/matchers/toMatchDocument.js +1 -1
- package/testing/matchers/toMatchDocument.js.map +1 -1
- package/testing/react/MockedProvider.d.ts +7 -7
- package/testing/react/MockedProvider.d.ts.map +1 -1
- package/testing/react/MockedProvider.js +5 -5
- package/testing/react/MockedProvider.js.map +1 -1
- package/testing/testing.cjs.map +1 -1
- package/utilities/common/canUse.js.map +1 -1
- package/utilities/common/compact.d.ts +1 -1
- package/utilities/common/compact.d.ts.map +1 -1
- package/utilities/common/compact.js.map +1 -1
- package/utilities/common/errorHandling.d.ts +1 -1
- package/utilities/common/errorHandling.d.ts.map +1 -1
- package/utilities/common/errorHandling.js.map +1 -1
- package/utilities/common/incrementalResult.d.ts +1 -1
- package/utilities/common/incrementalResult.d.ts.map +1 -1
- package/utilities/common/incrementalResult.js.map +1 -1
- package/utilities/common/maybeDeepFreeze.d.ts.map +1 -1
- package/utilities/common/maybeDeepFreeze.js +3 -4
- package/utilities/common/maybeDeepFreeze.js.map +1 -1
- package/utilities/common/mergeDeep.d.ts +1 -1
- package/utilities/common/mergeDeep.d.ts.map +1 -1
- package/utilities/common/mergeDeep.js.map +1 -1
- package/utilities/common/mergeOptions.d.ts +1 -1
- package/utilities/common/mergeOptions.d.ts.map +1 -1
- package/utilities/common/mergeOptions.js.map +1 -1
- package/utilities/common/omitDeep.d.ts +1 -1
- package/utilities/common/omitDeep.d.ts.map +1 -1
- package/utilities/common/omitDeep.js +1 -1
- package/utilities/common/omitDeep.js.map +1 -1
- package/utilities/common/responseIterator.js.map +1 -1
- package/utilities/common/stringifyForDisplay.js.map +1 -1
- package/utilities/common/stripTypename.d.ts +1 -1
- package/utilities/common/stripTypename.d.ts.map +1 -1
- package/utilities/common/stripTypename.js +1 -1
- package/utilities/common/stripTypename.js.map +1 -1
- package/utilities/globals/global.d.ts.map +1 -1
- package/utilities/globals/global.js.map +1 -1
- package/utilities/globals/globals.cjs +4 -16
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +4 -16
- package/utilities/globals/index.d.ts +5 -6
- package/utilities/globals/index.d.ts.map +1 -1
- package/utilities/globals/index.js +2 -5
- package/utilities/globals/index.js.map +1 -1
- package/utilities/globals/invariantWrappers.d.ts +1 -1
- package/utilities/globals/invariantWrappers.d.ts.map +1 -1
- package/utilities/globals/invariantWrappers.js +3 -3
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/utilities/graphql/DocumentTransform.js +4 -4
- package/utilities/graphql/DocumentTransform.js.map +1 -1
- package/utilities/graphql/directives.js +5 -5
- package/utilities/graphql/directives.js.map +1 -1
- package/utilities/graphql/fragments.js +4 -4
- package/utilities/graphql/fragments.js.map +1 -1
- package/utilities/graphql/getFromAST.js +10 -10
- package/utilities/graphql/getFromAST.js.map +1 -1
- package/utilities/graphql/operations.d.ts +1 -1
- package/utilities/graphql/operations.d.ts.map +1 -1
- package/utilities/graphql/operations.js +1 -1
- package/utilities/graphql/operations.js.map +1 -1
- package/utilities/graphql/print.js +1 -1
- package/utilities/graphql/print.js.map +1 -1
- package/utilities/graphql/storeUtils.d.ts +1 -1
- package/utilities/graphql/storeUtils.d.ts.map +1 -1
- package/utilities/graphql/storeUtils.js +4 -4
- package/utilities/graphql/storeUtils.js.map +1 -1
- package/utilities/graphql/transform.js +7 -7
- package/utilities/graphql/transform.js.map +1 -1
- package/utilities/index.d.ts +34 -34
- package/utilities/index.d.ts.map +1 -1
- package/utilities/index.js +32 -32
- package/utilities/index.js.map +1 -1
- package/utilities/observables/Concast.d.ts +2 -2
- package/utilities/observables/Concast.d.ts.map +1 -1
- package/utilities/observables/Concast.js.map +1 -1
- package/utilities/observables/asyncMap.d.ts +1 -1
- package/utilities/observables/asyncMap.d.ts.map +1 -1
- package/utilities/observables/asyncMap.js.map +1 -1
- package/utilities/observables/iteration.d.ts +1 -1
- package/utilities/observables/iteration.d.ts.map +1 -1
- package/utilities/observables/iteration.js.map +1 -1
- package/utilities/observables/subclassing.d.ts +1 -1
- package/utilities/observables/subclassing.d.ts.map +1 -1
- package/utilities/observables/subclassing.js.map +1 -1
- package/utilities/policies/pagination.d.ts +1 -1
- package/utilities/policies/pagination.d.ts.map +1 -1
- package/utilities/policies/pagination.js +1 -1
- package/utilities/policies/pagination.js.map +1 -1
- package/utilities/promises/decoration.d.ts.map +1 -1
- package/utilities/promises/decoration.js +1 -0
- package/utilities/promises/decoration.js.map +1 -1
- package/utilities/types/DeepOmit.d.ts +1 -1
- package/utilities/types/DeepOmit.d.ts.map +1 -1
- package/utilities/types/DeepOmit.js.map +1 -1
- package/utilities/types/DeepPartial.d.ts +1 -1
- package/utilities/types/DeepPartial.d.ts.map +1 -1
- package/utilities/types/DeepPartial.js.map +1 -1
- package/utilities/utilities.cjs +22 -21
- package/utilities/utilities.cjs.map +1 -1
- package/utilities/utilities.cjs.native.js +22 -21
- package/version.js +1 -1
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.d.ts +0 -2
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.d.ts.map +0 -1
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.js +0 -11
- package/react/hooks/internal/useStrictModeSafeCleanupEffect.js.map +0 -1
- package/utilities/globals/DEV.d.ts +0 -3
- package/utilities/globals/DEV.d.ts.map +0 -1
- package/utilities/globals/DEV.js +0 -4
- package/utilities/globals/DEV.js.map +0 -1
- package/utilities/globals/fix-graphql.d.ts +0 -2
- package/utilities/globals/fix-graphql.d.ts.map +0 -1
- package/utilities/globals/fix-graphql.js +0 -6
- package/utilities/globals/fix-graphql.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incrementalResult.js","sourceRoot":"","sources":["../../../src/utilities/common/incrementalResult.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"incrementalResult.js","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iC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpE,QAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;gBACnB,IAAI,GAAG,QAAqB,CAAC;aAC9B;YACD,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,UAAmB,CAAC;AAC7B,CAAC","sourcesContent":["import type {\n ExecutionPatchIncrementalResult,\n ExecutionPatchInitialResult,\n ExecutionPatchResult,\n ApolloPayloadResult,\n FetchResult,\n} from \"../../link/core/index.js\";\nimport { isNonNullObject } from \"./objects.js\";\nimport { isNonEmptyArray } from \"./arrays.js\";\nimport { DeepMerger } from \"./mergeDeep.js\";\n\nexport function isExecutionPatchIncrementalResult<T>(\n value: FetchResult<T>\n): value is ExecutionPatchIncrementalResult {\n return \"incremental\" in value;\n}\n\nexport function isExecutionPatchInitialResult<T>(\n value: FetchResult<T>\n): value is ExecutionPatchInitialResult<T> {\n return \"hasNext\" in value && \"data\" in value;\n}\n\nexport function isExecutionPatchResult<T>(\n value: FetchResult<T>\n): value is ExecutionPatchResult<T> {\n return (\n isExecutionPatchIncrementalResult(value) ||\n isExecutionPatchInitialResult(value)\n );\n}\n\n// This function detects an Apollo payload result before it is transformed\n// into a FetchResult via HttpLink; it cannot detect an ApolloPayloadResult\n// once it leaves the link chain.\nexport function isApolloPayloadResult(\n value: unknown\n): value is ApolloPayloadResult {\n return isNonNullObject(value) && \"payload\" in value;\n}\n\nexport function mergeIncrementalData<TData extends object>(\n prevResult: TData,\n result: ExecutionPatchResult<TData>\n) {\n let mergedData = prevResult;\n const merger = new DeepMerger();\n if (\n isExecutionPatchIncrementalResult(result) &&\n isNonEmptyArray(result.incremental)\n ) {\n result.incremental.forEach(({ data, path }) => {\n for (let i = path.length - 1; i >= 0; --i) {\n const key = path[i];\n const isNumericKey = !isNaN(+key);\n const parent: Record<string | number, any> = isNumericKey ? [] : {};\n parent[key] = data;\n data = parent as typeof data;\n }\n mergedData = merger.merge(mergedData, data);\n });\n }\n return mergedData as TData;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybeDeepFreeze.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/maybeDeepFreeze.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"maybeDeepFreeze.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/maybeDeepFreeze.ts"],"names":[],"mappings":"AA6BA,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAK5C"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isNonNullObject } from "./objects.js";
|
|
1
|
+
import { isNonNullObject } from './objects.js';
|
|
3
2
|
function deepFreeze(value) {
|
|
4
3
|
var workSet = new Set([value]);
|
|
5
4
|
workSet.forEach(function (obj) {
|
|
@@ -13,7 +12,7 @@ function deepFreeze(value) {
|
|
|
13
12
|
return value;
|
|
14
13
|
}
|
|
15
14
|
function shallowFreeze(obj) {
|
|
16
|
-
if (__DEV__ && !Object.isFrozen(obj)) {
|
|
15
|
+
if (globalThis.__DEV__ !== false && !Object.isFrozen(obj)) {
|
|
17
16
|
try {
|
|
18
17
|
Object.freeze(obj);
|
|
19
18
|
}
|
|
@@ -26,7 +25,7 @@ function shallowFreeze(obj) {
|
|
|
26
25
|
return obj;
|
|
27
26
|
}
|
|
28
27
|
export function maybeDeepFreeze(obj) {
|
|
29
|
-
if (__DEV__) {
|
|
28
|
+
if (globalThis.__DEV__ !== false) {
|
|
30
29
|
deepFreeze(obj);
|
|
31
30
|
}
|
|
32
31
|
return obj;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maybeDeepFreeze.js","sourceRoot":"","sources":["../../../src/utilities/common/maybeDeepFreeze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"maybeDeepFreeze.js","sourceRoot":"","sources":["../../../src/utilities/common/maybeDeepFreeze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,SAAS,UAAU,CAAC,KAAU;IAC5B,IAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACjC,OAAO,CAAC,OAAO,CAAC,UAAA,GAAG;QACjB,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE;YACtD,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAA,IAAI;gBAC1C,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAmB,GAAM;IAC7C,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACpC,IAAI;YACF,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACpB;QAAC,OAAO,CAAC,EAAE;YAIV,IAAI,CAAC,YAAY,SAAS;gBAAE,OAAO,IAAI,CAAC;YACxC,MAAM,CAAC,CAAC;SACT;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,eAAe,CAAI,GAAM;IACvC,IAAI,OAAO,EAAE;QACX,UAAU,CAAC,GAAG,CAAC,CAAC;KACjB;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { isNonNullObject } from './objects.js';\n\nfunction deepFreeze(value: any) {\n const workSet = new Set([value]);\n workSet.forEach(obj => {\n if (isNonNullObject(obj) && shallowFreeze(obj) === obj) {\n Object.getOwnPropertyNames(obj).forEach(name => {\n if (isNonNullObject(obj[name])) workSet.add(obj[name]);\n });\n }\n });\n return value;\n}\n\nfunction shallowFreeze<T extends object>(obj: T): T | null {\n if (__DEV__ && !Object.isFrozen(obj)) {\n try {\n Object.freeze(obj);\n } catch (e) {\n // Some types like Uint8Array and Node.js's Buffer cannot be frozen, but\n // they all throw a TypeError when you try, so we re-throw any exceptions\n // that are not TypeErrors, since that would be unexpected.\n if (e instanceof TypeError) return null;\n throw e;\n }\n }\n return obj;\n}\n\nexport function maybeDeepFreeze<T>(obj: T): T {\n if (__DEV__) {\n deepFreeze(obj);\n }\n return obj;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isNonNullObject } from "./objects";
|
|
1
|
+
import { isNonNullObject } from "./objects.js";
|
|
2
2
|
export type TupleToIntersection<T extends any[]> = T extends [infer A] ? A : T extends [infer A, infer B] ? A & B : T extends [infer A, infer B, infer C] ? A & B & C : T extends [infer A, infer B, infer C, infer D] ? A & B & C & D : T extends [infer A, infer B, infer C, infer D, infer E] ? A & B & C & D & E : T extends (infer U)[] ? U : any;
|
|
3
3
|
export declare function mergeDeep<T extends any[]>(...sources: T): TupleToIntersection<T>;
|
|
4
4
|
export declare function mergeDeepArray<T>(sources: T[]): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeDeep.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/mergeDeep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mergeDeep.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/mergeDeep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAkB/C,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,GAAG,EAAE,IAC7C,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GACvB,CAAC,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IAGnE,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,YAAY,GAAG,GAAG;IA6B9D,QAAQ,yBAAmB;IAElC,OAAO,CAAC,UAAU,CAAkB;IAE7B,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC;CAgB3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeDeep.js","sourceRoot":"","sources":["../../../src/utilities/common/mergeDeep.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mergeDeep.js","sourceRoot":"","sources":["../../../src/utilities/common/mergeDeep.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvC,IAAA,cAAc,GAAK,MAAM,CAAC,SAAS,eAArB,CAAsB;AAwB5C,MAAM,UAAU,SAAS;IACvB,iBAAa;SAAb,UAAa,EAAb,qBAAa,EAAb,IAAa;QAAb,4BAAa;;IAEb,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAQD,MAAM,UAAU,cAAc,CAAI,OAAY;IAC5C,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,IAAK,EAAQ,CAAC;IACrC,IAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAC7B,IAAI,KAAK,GAAG,CAAC,EAAE;QACb,IAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC,EAAE;YAC9B,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3C;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAUD,IAAM,iBAAiB,GACrB,UAAU,MAAM,EAAE,MAAM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CAAC;YAEH,OAAO,MAAM,CAAC;SACf;QAGD,OAAO,MAAM,CAAC;IAChB,CAAC;IAMM,wCAAmB,GAA1B,UAA8B,KAAQ;QACpC,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBAC/B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACxB,KAAK,GAAI,KAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;iBACjC;qBAAM;oBACL,KAAK,cACH,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,IACpC,KAAK,CACT,CAAC;iBACH;gBACD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC5B;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACH,iBAAC;AAAD,CAAC,AAtDD,IAsDC","sourcesContent":["import { isNonNullObject } from \"./objects.js\";\n\nconst { hasOwnProperty } = Object.prototype;\n\n// These mergeDeep and mergeDeepArray utilities merge any number of objects\n// together, sharing as much memory as possible with the source objects, while\n// remaining careful to avoid modifying any source objects.\n\n// Logically, the return type of mergeDeep should be the intersection of\n// all the argument types. The binary call signature is by far the most\n// common, but we support 0- through 5-ary as well. After that, the\n// resulting type is just the inferred array element type. Note to nerds:\n// there is a more clever way of doing this that converts the tuple type\n// first to a union type (easy enough: T[number]) and then converts the\n// union to an intersection type using distributive conditional type\n// inference, but that approach has several fatal flaws (boolean becomes\n// true & false, and the inferred type ends up as unknown in many cases),\n// in addition to being nearly impossible to explain/understand.\nexport type TupleToIntersection<T extends any[]> =\n T extends [infer A] ? A :\n T extends [infer A, infer B] ? A & B :\n T extends [infer A, infer B, infer C] ? A & B & C :\n T extends [infer A, infer B, infer C, infer D] ? A & B & C & D :\n T extends [infer A, infer B, infer C, infer D, infer E] ? A & B & C & D & E :\n T extends (infer U)[] ? U : any;\n\nexport function mergeDeep<T extends any[]>(\n ...sources: T\n): TupleToIntersection<T> {\n return mergeDeepArray(sources);\n}\n\n// In almost any situation where you could succeed in getting the\n// TypeScript compiler to infer a tuple type for the sources array, you\n// could just use mergeDeep instead of mergeDeepArray, so instead of\n// trying to convert T[] to an intersection type we just infer the array\n// element type, which works perfectly when the sources array has a\n// consistent element type.\nexport function mergeDeepArray<T>(sources: T[]): T {\n let target = sources[0] || ({} as T);\n const count = sources.length;\n if (count > 1) {\n const merger = new DeepMerger();\n for (let i = 1; i < count; ++i) {\n target = merger.merge(target, sources[i]);\n }\n }\n return target;\n}\n\nexport type ReconcilerFunction<TContextArgs extends any[]> = (\n this: DeepMerger<TContextArgs>,\n target: Record<string | number, any>,\n source: Record<string | number, any>,\n property: string | number,\n ...context: TContextArgs\n) => any;\n\nconst defaultReconciler: ReconcilerFunction<any[]> =\n function (target, source, property) {\n return this.merge(target[property], source[property]);\n };\n\nexport class DeepMerger<TContextArgs extends any[]> {\n constructor(\n private reconciler: ReconcilerFunction<TContextArgs> = defaultReconciler,\n ) {}\n\n public merge(target: any, source: any, ...context: TContextArgs): any {\n if (isNonNullObject(source) && isNonNullObject(target)) {\n Object.keys(source).forEach(sourceKey => {\n if (hasOwnProperty.call(target, sourceKey)) {\n const targetValue = target[sourceKey];\n if (source[sourceKey] !== targetValue) {\n const result = this.reconciler(target, source, sourceKey, ...context);\n // A well-implemented reconciler may return targetValue to indicate\n // the merge changed nothing about the structure of the target.\n if (result !== targetValue) {\n target = this.shallowCopyForMerge(target);\n target[sourceKey] = result;\n }\n }\n } else {\n // If there is no collision, the target can safely share memory with\n // the source, and the recursion can terminate here.\n target = this.shallowCopyForMerge(target);\n target[sourceKey] = source[sourceKey];\n }\n });\n\n return target;\n }\n\n // If source (or target) is not an object, let source replace target.\n return source;\n }\n\n public isObject = isNonNullObject;\n\n private pastCopies = new Set<any>();\n\n public shallowCopyForMerge<T>(value: T): T {\n if (isNonNullObject(value)) {\n if (!this.pastCopies.has(value)) {\n if (Array.isArray(value)) {\n value = (value as any).slice(0);\n } else {\n value = {\n __proto__: Object.getPrototypeOf(value),\n ...value,\n };\n }\n this.pastCopies.add(value);\n }\n }\n return value;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { QueryOptions, WatchQueryOptions, MutationOptions, OperationVariables } from "../../core";
|
|
1
|
+
import type { QueryOptions, WatchQueryOptions, MutationOptions, OperationVariables } from "../../core/index.js";
|
|
2
2
|
type OptionsUnion<TData, TVariables extends OperationVariables, TContext> = WatchQueryOptions<TVariables, TData> | QueryOptions<TVariables, TData> | MutationOptions<TData, TVariables, TContext>;
|
|
3
3
|
export declare function mergeOptions<TDefaultOptions extends Partial<OptionsUnion<any, any, any>>, TOptions extends TDefaultOptions>(defaults: TDefaultOptions | Partial<TDefaultOptions> | undefined, options: TOptions | Partial<TOptions>): TOptions & TDefaultOptions;
|
|
4
4
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeOptions.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/mergeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EACnB,MAAM,
|
|
1
|
+
{"version":3,"file":"mergeOptions.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/mergeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAI7B,KAAK,YAAY,CAAC,KAAK,EAAE,UAAU,SAAS,kBAAkB,EAAE,QAAQ,IACpE,iBAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,GACpC,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,GAC/B,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAEjD,wBAAgB,YAAY,CAC1B,eAAe,SAAS,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAC5D,QAAQ,SAAS,eAAe,EAEhC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,EAChE,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,GACpC,QAAQ,GAAG,eAAe,CAO5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeOptions.js","sourceRoot":"","sources":["../../../src/utilities/common/mergeOptions.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mergeOptions.js","sourceRoot":"","sources":["../../../src/utilities/common/mergeOptions.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAOvC,MAAM,UAAU,YAAY,CAI1B,QAAgE,EAChE,OAAqC;IAErC,OAAO,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,SAAS,IAAI;QACrD,SAAS,EAAE,OAAO,uBACb,CAAC,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,GAChC,OAAO,CAAC,SAAS,EACpB;KACH,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type {\n QueryOptions,\n WatchQueryOptions,\n MutationOptions,\n OperationVariables,\n} from \"../../core/index.js\";\n\nimport { compact } from \"./compact.js\";\n\ntype OptionsUnion<TData, TVariables extends OperationVariables, TContext> =\n | WatchQueryOptions<TVariables, TData>\n | QueryOptions<TVariables, TData>\n | MutationOptions<TData, TVariables, TContext>;\n\nexport function mergeOptions<\n TDefaultOptions extends Partial<OptionsUnion<any, any, any>>,\n TOptions extends TDefaultOptions\n>(\n defaults: TDefaultOptions | Partial<TDefaultOptions> | undefined,\n options: TOptions | Partial<TOptions>,\n): TOptions & TDefaultOptions {\n return compact(defaults, options, options.variables && {\n variables: compact({\n ...(defaults && defaults.variables),\n ...options.variables,\n }),\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omitDeep.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/omitDeep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"omitDeep.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/omitDeep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,kBAE7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"omitDeep.js","sourceRoot":"","sources":["../../../src/utilities/common/omitDeep.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"omitDeep.js","sourceRoot":"","sources":["../../../src/utilities/common/omitDeep.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,UAAU,QAAQ,CAAsB,KAAQ,EAAE,GAAM;IAC5D,OAAO,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,UAAU,CACjB,KAAQ,EACR,GAAM,EACN,KAA2B;IAA3B,sBAAA,EAAA,YAAY,GAAG,EAAY;IAE3B,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QACpB,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;KACzB;IAED,IAAI,QAAQ,GAAG,KAAK,CAAC;IAErB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,IAAM,OAAK,GAAU,EAAE,CAAC;QACxB,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,OAAK,CAAC,CAAC;QAExB,KAAK,CAAC,OAAO,CAAC,UAAC,KAAK,EAAE,KAAK;YACzB,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;YAC7C,QAAQ,KAAR,QAAQ,GAAK,MAAM,KAAK,KAAK,EAAC;YAE9B,OAAK,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE;YACZ,OAAO,OAAuB,CAAC;SAChC;KACF;SAAM,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE;QAC/B,IAAM,KAAG,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,KAAG,CAAC,CAAC;QAEtB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAC,CAAC;YAC3B,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,QAAQ,GAAG,IAAI,CAAC;gBAChB,OAAO;aACR;YAED,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;YAChD,QAAQ,KAAR,QAAQ,GAAK,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,EAAC;YAEjC,KAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,IAAI,QAAQ,EAAE;YACZ,OAAO,KAAG,CAAC;SACZ;KACF;IAED,OAAO,KAAuB,CAAC;AACjC,CAAC","sourcesContent":["import type { DeepOmit } from '../types/DeepOmit.js';\nimport { isPlainObject } from './objects.js';\n\nexport function omitDeep<T, K extends string>(value: T, key: K) {\n return __omitDeep(value, key);\n}\n\nfunction __omitDeep<T, K extends string>(\n value: T,\n key: K,\n known = new Map<any, any>()\n): DeepOmit<T, K> {\n if (known.has(value)) {\n return known.get(value);\n }\n\n let modified = false;\n\n if (Array.isArray(value)) {\n const array: any[] = [];\n known.set(value, array);\n\n value.forEach((value, index) => {\n const result = __omitDeep(value, key, known);\n modified ||= result !== value;\n\n array[index] = result;\n });\n\n if (modified) {\n return array as DeepOmit<T, K>;\n }\n } else if (isPlainObject(value)) {\n const obj = Object.create(Object.getPrototypeOf(value));\n known.set(value, obj);\n\n Object.keys(value).forEach((k) => {\n if (k === key) {\n modified = true;\n return;\n }\n\n const result = __omitDeep(value[k], key, known);\n modified ||= result !== value[k];\n\n obj[k] = result;\n });\n\n if (modified) {\n return obj;\n }\n }\n\n return value as DeepOmit<T, K>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responseIterator.js","sourceRoot":"","sources":["../../../src/utilities/common/responseIterator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"responseIterator.js","sourceRoot":"","sources":["../../../src/utilities/common/responseIterator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,UAAU,cAAc,CAAC,KAAU;IACvC,OAAO,CAAC,CAAE,KAAsB,CAAC,IAAI,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAU;IACzC,OAAO,CAAC,CAAE,KAA6B,CAAC,SAAS,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,KAAU;IAEV,OAAO,CAAC,CAAC,CACP,yBAAyB;QACxB,KAAoC,CAAC,MAAM,CAAC,aAAa,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAU;IACzC,OAAO,CAAC,CAAE,KAAc,CAAC,MAAM,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAU;IAC/B,OAAO,CAAC,CAAE,KAAc,CAAC,WAAW,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAU;IAC7C,OAAO,CAAC,CAAE,KAA4B,CAAC,IAAI,CAAC;AAC9C,CAAC","sourcesContent":["import type { Response as NodeResponse } from \"node-fetch\";\nimport type { Readable as NodeReadableStream } from \"stream\";\nimport { canUseAsyncIteratorSymbol } from \"./canUse.js\";\n\nexport function isNodeResponse(value: any): value is NodeResponse {\n return !!(value as NodeResponse).body;\n}\n\nexport function isReadableStream(value: any): value is ReadableStream<any> {\n return !!(value as ReadableStream<any>).getReader;\n}\n\nexport function isAsyncIterableIterator(\n value: any\n): value is AsyncIterableIterator<any> {\n return !!(\n canUseAsyncIteratorSymbol &&\n (value as AsyncIterableIterator<any>)[Symbol.asyncIterator]\n );\n}\n\nexport function isStreamableBlob(value: any): value is Blob {\n return !!(value as Blob).stream;\n}\n\nexport function isBlob(value: any): value is Blob {\n return !!(value as Blob).arrayBuffer;\n}\n\nexport function isNodeReadableStream(value: any): value is NodeReadableStream {\n return !!(value as NodeReadableStream).pipe;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringifyForDisplay.js","sourceRoot":"","sources":["../../../src/utilities/common/stringifyForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"stringifyForDisplay.js","sourceRoot":"","sources":["../../../src/utilities/common/stringifyForDisplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,UAAU,mBAAmB,CAAC,KAAU,EAAE,KAAS;IAAT,sBAAA,EAAA,SAAS;IACvD,IAAM,OAAO,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAC;IACpD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,UAAC,GAAG,EAAE,KAAK;QACtC,OAAO,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAC5C,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["import { makeUniqueId } from \"./makeUniqueId.js\";\n\nexport function stringifyForDisplay(value: any, space = 0): string {\n const undefId = makeUniqueId(\"stringifyForDisplay\");\n return JSON.stringify(value, (key, value) => {\n return value === void 0 ? undefId : value;\n }, space).split(JSON.stringify(undefId)).join(\"<undefined>\");\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function stripTypename<T>(value: T): import("
|
|
1
|
+
export declare function stripTypename<T>(value: T): import("../index.js").DeepOmit<T, "__typename">;
|
|
2
2
|
//# sourceMappingURL=stripTypename.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripTypename.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/stripTypename.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"stripTypename.d.ts","sourceRoot":"","sources":["../../../src/utilities/common/stripTypename.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,mDAExC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stripTypename.js","sourceRoot":"","sources":["../../../src/utilities/common/stripTypename.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"stripTypename.js","sourceRoot":"","sources":["../../../src/utilities/common/stripTypename.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,UAAU,aAAa,CAAI,KAAQ;IACvC,OAAO,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AACvC,CAAC","sourcesContent":["import { omitDeep } from './omitDeep.js';\n\nexport function stripTypename<T>(value: T) {\n return omitDeep(value, '__typename');\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/utilities/globals/global.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/utilities/globals/global.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;IACb,MAAM,OAAO,EAAE,OAAO,CAAC;IACxB,UAAU,MAAM;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KAClB;CACD;;AAED,wBAYgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/utilities/globals/global.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"global.js","sourceRoot":"","sources":["../../../src/utilities/globals/global.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AASnC,eAAe,CACb,KAAK,CAAC,cAAM,OAAA,UAAU,EAAV,CAAU,CAAC;IACvB,KAAK,CAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC;IACnB,KAAK,CAAC,cAAM,OAAA,IAAI,EAAJ,CAAI,CAAC;IACjB,KAAK,CAAC,cAAM,OAAA,MAAM,EAAN,CAAM,CAAC;IAOnB,KAAK,CAAC,cAAa,OAAO,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,CAAA,CAAC,CAAC,CAAC,CAClC,CAAC","sourcesContent":["import { maybe } from \"./maybe.js\";\n\ndeclare global {\n const __DEV__: boolean; // will be removed in `dist` by the `postprocessDist` script\n\tinterface Window {\n\t\t__DEV__?: boolean;\n\t}\n}\n\nexport default (\n maybe(() => globalThis) ||\n maybe(() => window) ||\n maybe(() => self) ||\n maybe(() => global) ||\n // We don't expect the Function constructor ever to be invoked at runtime, as\n // long as at least one of globalThis, window, self, or global is defined, so\n // we are under no obligation to make it easy for static analysis tools to\n // detect syntactic usage of the Function constructor. If you think you can\n // improve your static analysis to detect this obfuscation, think again. This\n // is an arms race you cannot win, at least not in JavaScript.\n maybe(function() { return maybe.constructor(\"return this\")() })\n) as typeof globalThis & Window;\n"]}
|
|
@@ -4,10 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var tsInvariant = require('ts-invariant');
|
|
7
|
-
var process$1 = require('ts-invariant/process');
|
|
8
|
-
var graphql = require('graphql');
|
|
9
7
|
|
|
10
|
-
var version = '3.8.0-beta.
|
|
8
|
+
var version = '3.8.0-beta.7';
|
|
11
9
|
|
|
12
10
|
function maybe(thunk) {
|
|
13
11
|
try {
|
|
@@ -19,8 +17,7 @@ function maybe(thunk) {
|
|
|
19
17
|
var global$1 = (maybe(function () { return globalThis; }) ||
|
|
20
18
|
maybe(function () { return window; }) ||
|
|
21
19
|
maybe(function () { return self; }) ||
|
|
22
|
-
maybe(function () { return global; }) ||
|
|
23
|
-
maybe(function () { return maybe.constructor("return this")(); }));
|
|
20
|
+
maybe(function () { return global; }) || maybe(function () { return maybe.constructor("return this")(); }));
|
|
24
21
|
|
|
25
22
|
var prefixCounts = new Map();
|
|
26
23
|
function makeUniqueId(prefix) {
|
|
@@ -84,20 +81,11 @@ function getErrorMsg(message, messageArgs) {
|
|
|
84
81
|
}))));
|
|
85
82
|
}
|
|
86
83
|
|
|
87
|
-
var DEV =
|
|
88
|
-
? Boolean(global$1.__DEV__)
|
|
89
|
-
: maybe(function () { return process.env.NODE_ENV; }) !== "production");
|
|
90
|
-
|
|
91
|
-
function removeTemporaryGlobals() {
|
|
92
|
-
return typeof graphql.Source === "function" ? process$1.remove() : process$1.remove();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
var __DEV__ = DEV;
|
|
96
|
-
removeTemporaryGlobals();
|
|
84
|
+
var DEV = globalThis.__DEV__ !== false;
|
|
97
85
|
|
|
98
86
|
exports.InvariantError = tsInvariant.InvariantError;
|
|
99
87
|
exports.DEV = DEV;
|
|
100
|
-
exports.__DEV__ =
|
|
88
|
+
exports.__DEV__ = DEV;
|
|
101
89
|
exports.global = global$1;
|
|
102
90
|
exports.invariant = invariant;
|
|
103
91
|
exports.maybe = maybe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globals.cjs","sources":["../../version.js","maybe.js","global.js","../common/makeUniqueId.js","../common/stringifyForDisplay.js","invariantWrappers.js","
|
|
1
|
+
{"version":3,"file":"globals.cjs","sources":["../../version.js","maybe.js","global.js","../common/makeUniqueId.js","../common/stringifyForDisplay.js","invariantWrappers.js","index.js"],"sourcesContent":["export var version = '3.8.0-beta.7';\n//# sourceMappingURL=version.js.map","export function maybe(thunk) {\n try {\n return thunk();\n }\n catch (_a) { }\n}\n//# sourceMappingURL=maybe.js.map","import { maybe } from \"./maybe.js\";\nexport default (maybe(function () { return globalThis; }) ||\n maybe(function () { return window; }) ||\n maybe(function () { return self; }) ||\n maybe(function () { return global; }) || maybe(function () { return maybe.constructor(\"return this\")(); }));\n//# sourceMappingURL=global.js.map","var prefixCounts = new Map();\nexport function makeUniqueId(prefix) {\n var count = prefixCounts.get(prefix) || 1;\n prefixCounts.set(prefix, count + 1);\n return \"\".concat(prefix, \":\").concat(count, \":\").concat(Math.random().toString(36).slice(2));\n}\n//# sourceMappingURL=makeUniqueId.js.map","import { makeUniqueId } from \"./makeUniqueId.js\";\nexport function stringifyForDisplay(value, space) {\n if (space === void 0) { space = 0; }\n var undefId = makeUniqueId(\"stringifyForDisplay\");\n return JSON.stringify(value, function (key, value) {\n return value === void 0 ? undefId : value;\n }, space).split(JSON.stringify(undefId)).join(\"<undefined>\");\n}\n//# sourceMappingURL=stringifyForDisplay.js.map","import { __spreadArray } from \"tslib\";\nimport { invariant as originalInvariant, InvariantError } from 'ts-invariant';\nimport { version } from '../../version.js';\nimport global from './global.js';\nimport { stringifyForDisplay } from '../common/stringifyForDisplay.js';\nfunction wrap(fn) {\n return function (message) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n fn.apply(void 0, __spreadArray([typeof message === 'number' ? getErrorMsg(message) : message], args, false));\n };\n}\nvar invariant = Object.assign(function invariant(condition, message) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n if (!condition) {\n originalInvariant(condition, getErrorMsg(message, args));\n }\n}, {\n debug: wrap(originalInvariant.debug),\n log: wrap(originalInvariant.log),\n warn: wrap(originalInvariant.warn),\n error: wrap(originalInvariant.error),\n});\nfunction newInvariantError(message) {\n var optionalParams = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n optionalParams[_i - 1] = arguments[_i];\n }\n return new InvariantError(getErrorMsg(message, optionalParams));\n}\nvar ApolloErrorMessageHandler = Symbol.for('ApolloErrorMessageHandler_' + version);\nfunction getErrorMsg(message, messageArgs) {\n if (messageArgs === void 0) { messageArgs = []; }\n if (!message)\n return;\n var args = messageArgs.map(function (arg) {\n return typeof arg == 'string' ? arg : stringifyForDisplay(arg, 2).slice(0, 1000);\n });\n return ((global[ApolloErrorMessageHandler] &&\n global[ApolloErrorMessageHandler](message, args)) ||\n \"An error occured! For more details, see the full error text at https://go.apollo.dev/c/err#\".concat(encodeURIComponent(JSON.stringify({\n version: version,\n message: message,\n args: args,\n }))));\n}\nexport { invariant, InvariantError, newInvariantError, ApolloErrorMessageHandler, };\n//# sourceMappingURL=invariantWrappers.js.map","import { invariant, newInvariantError, InvariantError } from \"./invariantWrappers.js\";\nexport { maybe } from \"./maybe.js\";\nexport { default as global } from \"./global.js\";\nexport { invariant, newInvariantError, InvariantError };\nexport var DEV = globalThis.__DEV__ !== false;\nexport { DEV as __DEV__ };\n//# sourceMappingURL=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,EAAE,IAAI,CAAC,CAAC;AACzF,KAAK,CAAC,CAAC;AACP,IAAI,QAAQ,CAACC,QAAM,CAAC,yBAAyB,CAAC;AAC9C,QAAQA,QAAM,CAAC,yBAAyB,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;AACxD,QAAQ,6FAA6F,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC;AAC/I,YAAY,OAAO,EAAE,OAAO;AAC5B,YAAY,OAAO,EAAE,OAAO;AAC5B,YAAY,IAAI,EAAE,IAAI;AACtB,SAAS,CAAC,CAAC,CAAC,EAAE;AACd;;AC9CU,IAAC,GAAG,GAAG,UAAU,CAAC,OAAO,KAAK;;;;;;;;;;"}
|
|
@@ -4,10 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var tsInvariant = require('ts-invariant');
|
|
7
|
-
var process$1 = require('ts-invariant/process');
|
|
8
|
-
var graphql = require('graphql');
|
|
9
7
|
|
|
10
|
-
var version = '3.8.0-beta.
|
|
8
|
+
var version = '3.8.0-beta.7';
|
|
11
9
|
|
|
12
10
|
function maybe(thunk) {
|
|
13
11
|
try {
|
|
@@ -19,8 +17,7 @@ function maybe(thunk) {
|
|
|
19
17
|
var global$1 = (maybe(function () { return globalThis; }) ||
|
|
20
18
|
maybe(function () { return window; }) ||
|
|
21
19
|
maybe(function () { return self; }) ||
|
|
22
|
-
maybe(function () { return global; }) ||
|
|
23
|
-
maybe(function () { return maybe.constructor("return this")(); }));
|
|
20
|
+
maybe(function () { return global; }) || maybe(function () { return maybe.constructor("return this")(); }));
|
|
24
21
|
|
|
25
22
|
var prefixCounts = new Map();
|
|
26
23
|
function makeUniqueId(prefix) {
|
|
@@ -84,20 +81,11 @@ function getErrorMsg(message, messageArgs) {
|
|
|
84
81
|
}))));
|
|
85
82
|
}
|
|
86
83
|
|
|
87
|
-
var DEV =
|
|
88
|
-
? Boolean(global$1.__DEV__)
|
|
89
|
-
: maybe(function () { return process.env.NODE_ENV; }) !== "production");
|
|
90
|
-
|
|
91
|
-
function removeTemporaryGlobals() {
|
|
92
|
-
return typeof graphql.Source === "function" ? process$1.remove() : process$1.remove();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
var __DEV__ = DEV;
|
|
96
|
-
removeTemporaryGlobals();
|
|
84
|
+
var DEV = globalThis.__DEV__ !== false;
|
|
97
85
|
|
|
98
86
|
exports.InvariantError = tsInvariant.InvariantError;
|
|
99
87
|
exports.DEV = DEV;
|
|
100
|
-
exports.__DEV__ =
|
|
88
|
+
exports.__DEV__ = DEV;
|
|
101
89
|
exports.global = global$1;
|
|
102
90
|
exports.invariant = invariant;
|
|
103
91
|
exports.maybe = maybe;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { invariant, newInvariantError, InvariantError } from "./invariantWrappers";
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export declare const __DEV__: boolean;
|
|
5
|
-
export { maybe } from "./maybe";
|
|
6
|
-
export { default as global } from "./global";
|
|
1
|
+
import { invariant, newInvariantError, InvariantError } from "./invariantWrappers.js";
|
|
2
|
+
export { maybe } from "./maybe.js";
|
|
3
|
+
export { default as global } from "./global.js";
|
|
7
4
|
export { invariant, newInvariantError, InvariantError };
|
|
5
|
+
export declare const DEV: boolean;
|
|
6
|
+
export { DEV as __DEV__ };
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/globals/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/globals/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAA;AASvD,eAAO,MAAM,GAAG,SAA+B,CAAC;AAChD,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { invariant, newInvariantError, InvariantError } from "./invariantWrappers.js";
|
|
2
|
-
import DEV from "./DEV.js";
|
|
3
|
-
export { DEV };
|
|
4
|
-
export var __DEV__ = DEV;
|
|
5
|
-
import { removeTemporaryGlobals } from "./fix-graphql.js";
|
|
6
|
-
removeTemporaryGlobals();
|
|
7
2
|
export { maybe } from "./maybe.js";
|
|
8
3
|
export { default as global } from "./global.js";
|
|
9
4
|
export { invariant, newInvariantError, InvariantError };
|
|
5
|
+
export var DEV = globalThis.__DEV__ !== false;
|
|
6
|
+
export { DEV as __DEV__ };
|
|
10
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/globals/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/globals/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAA;AASvD,MAAM,CAAC,IAAM,GAAG,GAAG,UAAU,CAAC,OAAO,KAAK,KAAK,CAAC;AAChD,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,CAAC","sourcesContent":["import { invariant, newInvariantError, InvariantError } from \"./invariantWrappers.js\";\n\nexport { maybe } from \"./maybe.js\";\nexport { default as global } from \"./global.js\";\nexport { invariant, newInvariantError, InvariantError }\n\n/** \n * @deprecated we do not use this internally anymore, \n * it is just exported for backwards compatibility \n */\n// this file is extempt from automatic `__DEV__` replacement \n// so we have to write it out here \n// @ts-ignore\nexport const DEV = globalThis.__DEV__ !== false;\nexport { DEV as __DEV__ };"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invariantWrappers.d.ts","sourceRoot":"","sources":["../../../src/utilities/globals/invariantWrappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"invariantWrappers.d.ts","sourceRoot":"","sources":["../../../src/utilities/globals/invariantWrappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAS/D,KAAK,WAAW,GAAG;IAgBjB,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CACrD,CAAC;AAEF,KAAK,gBAAgB,GAAG;IAgBtB,CACE,SAAS,EAAE,GAAG,EACd,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EACzB,GAAG,cAAc,EAAE,OAAO,EAAE,GAC3B,OAAO,CAAC,SAAS,CAAC;IAErB,KAAK,EAAE,WAAW,CAAC;IACnB,GAAG,EAAE,WAAW,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AACF,QAAA,MAAM,SAAS,EAAE,gBAgBhB,CAAC;AAYF,iBAAS,iBAAiB,CACxB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EACzB,GAAG,cAAc,EAAE,OAAO,EAAE,kBAG7B;AAED,QAAA,MAAM,yBAAyB,eAE9B,CAAC;AACF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,CAAC,yBAAyB,CAAC,CAAC,EAAE;YAC5B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;SACjE,GAAG,UAAU,CAAC;KAChB;CACF;AAoBD,OAAO,EACL,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,yBAAyB,GAC1B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __spreadArray } from "tslib";
|
|
2
2
|
import { invariant as originalInvariant, InvariantError } from 'ts-invariant';
|
|
3
|
-
import { version } from
|
|
4
|
-
import global from
|
|
5
|
-
import { stringifyForDisplay } from
|
|
3
|
+
import { version } from '../../version.js';
|
|
4
|
+
import global from './global.js';
|
|
5
|
+
import { stringifyForDisplay } from '../common/stringifyForDisplay.js';
|
|
6
6
|
function wrap(fn) {
|
|
7
7
|
return function (message) {
|
|
8
8
|
var args = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invariantWrappers.js","sourceRoot":"","sources":["../../../src/utilities/globals/invariantWrappers.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"invariantWrappers.js","sourceRoot":"","sources":["../../../src/utilities/globals/invariantWrappers.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,IAAI,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,k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AyB,EAAE,WAA2B;IAA3B,4BAAA,EAAA,gBAA2B;IACzE,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,IAAM,IAAI,GAAG,WAAW,CAAC,GAAG,CAAC,UAAC,GAAG;QAC/B,OAAA,OAAO,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC;IAAzE,CAAyE,CAC1E,CAAC;IACF,OAAO,CACL,CAAC,MAAM,CAAC,yBAAyB,CAAC;QAChC,MAAM,CAAC,yBAAyB,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACnD,qGAA8F,kBAAkB,CAC9G,IAAI,CAAC,SAAS,CAAC;YACb,OAAO,SAAA;YACP,OAAO,SAAA;YACP,IAAI,MAAA;SACL,CAAC,CACH,CAAE,CACJ,CAAC;AACJ,CAAC;AAED,OAAO,EACL,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,yBAAyB,GAC1B,CAAC","sourcesContent":["import { invariant as originalInvariant, InvariantError } from 'ts-invariant';\nimport { version } from '../../version.js';\nimport global from './global.js';\nimport type { ErrorCodes } from '../../invariantErrorCodes.js';\nimport { stringifyForDisplay } from '../common/stringifyForDisplay.js';\n\nfunction wrap(fn: (msg?: string, ...args: any[]) => void) {\n return function (message: string | number, ...args: any[]) {\n fn(typeof message === 'number' ? getErrorMsg(message) : message, ...args);\n };\n}\n\ntype LogFunction = {\n /**\n * Logs a `$level` message if the user used `ts-invariant`'s `setVerbosity` to set\n * a verbosity level of `$level` or lower. (defaults to `\"log\"`).\n *\n * The user will either be presented with a link to the documentation for the message,\n * or they can use the `loadDevMessages` to add the message strings to the bundle.\n * The documentation will display the message without argument substitution.\n * Instead, the arguments will be printed on the console after the link.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n *\n * String substitutions like %s, %o, %d or %f are supported.\n */\n (message?: any, ...optionalParams: unknown[]): void;\n};\n\ntype WrappedInvariant = {\n /**\n * Throws and InvariantError with the given message if the condition is false.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n *\n * The user will either be presented with a link to the documentation for the message,\n * or they can use the `loadErrorMessages` to add the message strings to the bundle.\n * The documentation will display the message with the arguments substituted.\n *\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\n (\n condition: any,\n message?: string | number,\n ...optionalParams: unknown[]\n ): asserts condition;\n\n debug: LogFunction;\n log: LogFunction;\n warn: LogFunction;\n error: LogFunction;\n};\nconst invariant: WrappedInvariant = Object.assign(\n function invariant(\n condition: any,\n message?: string | number,\n ...args: unknown[]\n ): asserts condition {\n if (!condition) {\n originalInvariant(condition, getErrorMsg(message, args));\n }\n },\n {\n debug: wrap(originalInvariant.debug),\n log: wrap(originalInvariant.log),\n warn: wrap(originalInvariant.warn),\n error: wrap(originalInvariant.error),\n }\n);\n\n/**\n * Returns an InvariantError.\n *\n * `message` can only be a string, a concatenation of strings, or a ternary statement\n * that results in a string. This will be enforced on build, where the message will\n * be replaced with a message number.\n * String substitutions with %s are supported and will also return\n * pretty-stringified objects.\n * Excess `optionalParams` will be swallowed.\n */\nfunction newInvariantError(\n message?: string | number,\n ...optionalParams: unknown[]\n) {\n return new InvariantError(getErrorMsg(message, optionalParams));\n}\n\nconst ApolloErrorMessageHandler = Symbol.for(\n 'ApolloErrorMessageHandler_' + version\n);\ndeclare global {\n interface Window {\n [ApolloErrorMessageHandler]?: {\n (message: string | number, args: unknown[]): string | undefined;\n } & ErrorCodes;\n }\n}\n\nfunction getErrorMsg(message?: string | number, messageArgs: unknown[] = []) {\n if (!message) return;\n const args = messageArgs.map((arg) =>\n typeof arg == 'string' ? arg : stringifyForDisplay(arg, 2).slice(0, 1000)\n );\n return (\n (global[ApolloErrorMessageHandler] &&\n global[ApolloErrorMessageHandler](message, args)) ||\n `An error occured! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(\n JSON.stringify({\n version,\n message,\n args,\n })\n )}`\n );\n}\n\nexport {\n invariant,\n InvariantError,\n newInvariantError,\n ApolloErrorMessageHandler,\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Trie } from '@wry/trie';
|
|
2
|
-
import { canUseWeakMap, canUseWeakSet } from
|
|
3
|
-
import { checkDocument } from
|
|
4
|
-
import { invariant } from
|
|
2
|
+
import { canUseWeakMap, canUseWeakSet } from '../common/canUse.js';
|
|
3
|
+
import { checkDocument } from './getFromAST.js';
|
|
4
|
+
import { invariant } from '../globals/index.js';
|
|
5
5
|
function identity(document) {
|
|
6
6
|
return document;
|
|
7
7
|
}
|
|
@@ -59,7 +59,7 @@ var DocumentTransform = (function () {
|
|
|
59
59
|
return;
|
|
60
60
|
var cacheKeys = this.getCacheKey(document);
|
|
61
61
|
if (cacheKeys) {
|
|
62
|
-
invariant(Array.isArray(cacheKeys),
|
|
62
|
+
invariant(Array.isArray(cacheKeys), 64);
|
|
63
63
|
return this.stableCacheKeys.lookupArray(cacheKeys);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentTransform.js","sourceRoot":"","sources":["../../../src/utilities/graphql/DocumentTransform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"DocumentTransform.js","sourceRoot":"","sources":["../../../src/utilities/graphql/DocumentTransform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,aAAa,E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C;SACpD;IACH,CAAC;IACH,wBAAC;AAAD,CAAC,AA9GD,IA8GC","sourcesContent":["import { Trie } from '@wry/trie';\nimport { canUseWeakMap, canUseWeakSet } from '../common/canUse.js';\nimport { checkDocument } from './getFromAST.js';\nimport { invariant } from '../globals/index.js';\nimport type { DocumentNode } from 'graphql';\n\nexport type DocumentTransformCacheKey = ReadonlyArray<unknown>;\n\ntype TransformFn = (document: DocumentNode) => DocumentNode;\n\ninterface DocumentTransformOptions {\n cache?: boolean;\n getCacheKey?: (\n document: DocumentNode\n ) => DocumentTransformCacheKey | undefined;\n}\n\nfunction identity(document: DocumentNode) {\n return document;\n}\n\nexport class DocumentTransform {\n private readonly transform: TransformFn;\n\n private readonly resultCache = canUseWeakSet\n ? new WeakSet<DocumentNode>()\n : new Set<DocumentNode>();\n\n private stableCacheKeys:\n | Trie<{ key: DocumentTransformCacheKey; value?: DocumentNode }>\n | undefined;\n\n // This default implementation of getCacheKey can be overridden by providing\n // options.getCacheKey to the DocumentTransform constructor. In general, a\n // getCacheKey function may either return an array of keys (often including\n // the document) to be used as a cache key, or undefined to indicate the\n // transform for this document should not be cached.\n private getCacheKey(\n document: DocumentNode\n ): DocumentTransformCacheKey | undefined {\n return [document];\n }\n\n static identity() {\n // No need to cache this transform since it just returns the document\n // unchanged. This should save a bit of memory that would otherwise be\n // needed to populate the `documentCache` of this transform.\n return new DocumentTransform(identity, { cache: false });\n }\n\n static split(\n predicate: (document: DocumentNode) => boolean,\n left: DocumentTransform,\n right: DocumentTransform = DocumentTransform.identity()\n ) {\n return new DocumentTransform(\n (document) => {\n const documentTransform = predicate(document) ? left : right;\n\n return documentTransform.transformDocument(document);\n },\n // Reasonably assume both `left` and `right` transforms handle their own caching\n { cache: false }\n );\n }\n\n constructor(\n transform: TransformFn,\n options: DocumentTransformOptions = Object.create(null)\n ) {\n this.transform = transform;\n\n if (options.getCacheKey) {\n // Override default `getCacheKey` function, which returns [document].\n this.getCacheKey = options.getCacheKey;\n }\n\n if (options.cache !== false) {\n this.stableCacheKeys = new Trie(canUseWeakMap, (key) => ({ key }));\n }\n }\n\n transformDocument(document: DocumentNode) {\n // If a user passes an already transformed result back to this function,\n // immediately return it.\n if (this.resultCache.has(document)) {\n return document;\n }\n\n const cacheEntry = this.getStableCacheEntry(document);\n\n if (cacheEntry && cacheEntry.value) {\n return cacheEntry.value;\n }\n\n checkDocument(document);\n\n const transformedDocument = this.transform(document);\n\n this.resultCache.add(transformedDocument);\n\n if (cacheEntry) {\n cacheEntry.value = transformedDocument;\n }\n\n return transformedDocument;\n }\n\n concat(otherTransform: DocumentTransform) {\n return new DocumentTransform(\n (document) => {\n return otherTransform.transformDocument(\n this.transformDocument(document)\n );\n },\n // Reasonably assume both transforms handle their own caching\n { cache: false }\n );\n }\n\n getStableCacheEntry(document: DocumentNode) {\n if (!this.stableCacheKeys) return;\n const cacheKeys = this.getCacheKey(document);\n if (cacheKeys) {\n invariant(\n Array.isArray(cacheKeys),\n '`getCacheKey` must return an array or undefined'\n );\n return this.stableCacheKeys.lookupArray(cacheKeys);\n }\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { invariant } from
|
|
1
|
+
import { invariant } from '../globals/index.js';
|
|
2
2
|
import { visit, BREAK, } from 'graphql';
|
|
3
3
|
export function shouldInclude(_a, variables) {
|
|
4
4
|
var directives = _a.directives;
|
|
@@ -10,7 +10,7 @@ export function shouldInclude(_a, variables) {
|
|
|
10
10
|
var evaledValue = false;
|
|
11
11
|
if (ifArgument.value.kind === 'Variable') {
|
|
12
12
|
evaledValue = variables && variables[ifArgument.value.name.value];
|
|
13
|
-
invariant(evaledValue !== void 0,
|
|
13
|
+
invariant(evaledValue !== void 0, 65, directive.name.value);
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
16
|
evaledValue = ifArgument.value.value;
|
|
@@ -57,12 +57,12 @@ export function getInclusionDirectives(directives) {
|
|
|
57
57
|
return;
|
|
58
58
|
var directiveArguments = directive.arguments;
|
|
59
59
|
var directiveName = directive.name.value;
|
|
60
|
-
invariant(directiveArguments && directiveArguments.length === 1,
|
|
60
|
+
invariant(directiveArguments && directiveArguments.length === 1, 66, directiveName);
|
|
61
61
|
var ifArgument = directiveArguments[0];
|
|
62
|
-
invariant(ifArgument.name && ifArgument.name.value === 'if',
|
|
62
|
+
invariant(ifArgument.name && ifArgument.name.value === 'if', 67, directiveName);
|
|
63
63
|
var ifValue = ifArgument.value;
|
|
64
64
|
invariant(ifValue &&
|
|
65
|
-
(ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'),
|
|
65
|
+
(ifValue.kind === 'Variable' || ifValue.kind === 'BooleanValue'), 68, directiveName);
|
|
66
66
|
result.push({ directive: directive, ifArgument: ifArgument });
|
|
67
67
|
});
|
|
68
68
|
}
|