@slicemachine/manager 0.1.1-dev-plugins.3
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/LICENSE +202 -0
- package/dist/__node_modules/@mswjs/cookies/lib/index.cjs +26 -0
- package/dist/__node_modules/@mswjs/cookies/lib/index.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/cookies/lib/index.js +25 -0
- package/dist/__node_modules/@mswjs/cookies/lib/index.js.map +1 -0
- package/dist/__node_modules/@mswjs/cookies/lib/store.cjs +175 -0
- package/dist/__node_modules/@mswjs/cookies/lib/store.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/cookies/lib/store.js +174 -0
- package/dist/__node_modules/@mswjs/cookies/lib/store.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/BatchInterceptor.cjs +92 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/BatchInterceptor.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/BatchInterceptor.js +93 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/BatchInterceptor.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/InteractiveIsomorphicRequest.cjs +52 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/InteractiveIsomorphicRequest.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/InteractiveIsomorphicRequest.js +53 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/InteractiveIsomorphicRequest.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/Interceptor.cjs +176 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/Interceptor.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/Interceptor.js +175 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/Interceptor.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/IsomorphicRequest.cjs +186 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/IsomorphicRequest.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/IsomorphicRequest.js +187 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/IsomorphicRequest.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/glossary.cjs +7 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/glossary.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/glossary.js +8 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/glossary.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/index.cjs +54 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/index.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/index.js +53 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/index.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/XMLHttpRequestOverride.cjs +554 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/XMLHttpRequestOverride.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/XMLHttpRequestOverride.js +554 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/XMLHttpRequestOverride.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/index.cjs +83 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/index.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/index.js +83 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/index.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/polyfills/EventPolyfill.cjs +57 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/polyfills/EventPolyfill.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/polyfills/EventPolyfill.js +57 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/polyfills/EventPolyfill.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/polyfills/ProgressEventPolyfill.cjs +51 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/polyfills/ProgressEventPolyfill.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/polyfills/ProgressEventPolyfill.js +51 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/polyfills/ProgressEventPolyfill.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/utils/bufferFrom.cjs +26 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/utils/bufferFrom.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/utils/bufferFrom.js +26 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/utils/bufferFrom.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/utils/createEvent.cjs +41 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/utils/createEvent.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/utils/createEvent.js +41 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/XMLHttpRequest/utils/createEvent.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/fetch/index.cjs +319 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/fetch/index.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/fetch/index.js +319 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/interceptors/fetch/index.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/AsyncEventEmitter.cjs +327 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/AsyncEventEmitter.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/AsyncEventEmitter.js +326 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/AsyncEventEmitter.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/bufferUtils.cjs +24 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/bufferUtils.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/bufferUtils.js +25 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/bufferUtils.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/createLazyCallback.cjs +148 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/createLazyCallback.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/createLazyCallback.js +149 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/createLazyCallback.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/getCleanUrl.cjs +13 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/getCleanUrl.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/getCleanUrl.js +14 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/getCleanUrl.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/nextTick.cjs +18 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/nextTick.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/nextTick.js +19 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/nextTick.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/parseJson.cjs +23 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/parseJson.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/parseJson.js +23 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/parseJson.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/toIsoResponse.cjs +26 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/toIsoResponse.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/toIsoResponse.js +26 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/toIsoResponse.js.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/uuid.cjs +14 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/uuid.cjs.map +1 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/uuid.js +15 -0
- package/dist/__node_modules/@mswjs/interceptors/lib/utils/uuid.js.map +1 -0
- package/dist/__node_modules/@open-draft/until/lib/index.cjs +9 -0
- package/dist/__node_modules/@open-draft/until/lib/index.cjs.map +1 -0
- package/dist/__node_modules/@open-draft/until/lib/index.js +10 -0
- package/dist/__node_modules/@open-draft/until/lib/index.js.map +1 -0
- package/dist/__node_modules/@open-draft/until/lib/until.cjs +15 -0
- package/dist/__node_modules/@open-draft/until/lib/until.cjs.map +1 -0
- package/dist/__node_modules/@open-draft/until/lib/until.js +16 -0
- package/dist/__node_modules/@open-draft/until/lib/until.js.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/conventions.cjs +144 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/conventions.cjs.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/conventions.js +144 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/conventions.js.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/dom-parser.cjs +226 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/dom-parser.cjs.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/dom-parser.js +226 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/dom-parser.js.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/dom.cjs +1396 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/dom.cjs.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/dom.js +1396 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/dom.js.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/entities.cjs +261 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/entities.cjs.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/entities.js +261 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/entities.js.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/index.cjs +18 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/index.cjs.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/index.js +18 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/index.js.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/sax.cjs +588 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/sax.cjs.map +1 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/sax.js +588 -0
- package/dist/__node_modules/@xmldom/xmldom/lib/sax.js.map +1 -0
- package/dist/__node_modules/busboy/lib/index.cjs +51 -0
- package/dist/__node_modules/busboy/lib/index.cjs.map +1 -0
- package/dist/__node_modules/busboy/lib/index.js +52 -0
- package/dist/__node_modules/busboy/lib/index.js.map +1 -0
- package/dist/__node_modules/busboy/lib/types/multipart.cjs +1046 -0
- package/dist/__node_modules/busboy/lib/types/multipart.cjs.map +1 -0
- package/dist/__node_modules/busboy/lib/types/multipart.js +1047 -0
- package/dist/__node_modules/busboy/lib/types/multipart.js.map +1 -0
- package/dist/__node_modules/busboy/lib/types/urlencoded.cjs +545 -0
- package/dist/__node_modules/busboy/lib/types/urlencoded.cjs.map +1 -0
- package/dist/__node_modules/busboy/lib/types/urlencoded.js +546 -0
- package/dist/__node_modules/busboy/lib/types/urlencoded.js.map +1 -0
- package/dist/__node_modules/busboy/lib/utils.cjs +1681 -0
- package/dist/__node_modules/busboy/lib/utils.cjs.map +1 -0
- package/dist/__node_modules/busboy/lib/utils.js +1682 -0
- package/dist/__node_modules/busboy/lib/utils.js.map +1 -0
- package/dist/__node_modules/common-tags/es/TemplateTag/TemplateTag.cjs +135 -0
- package/dist/__node_modules/common-tags/es/TemplateTag/TemplateTag.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/TemplateTag/TemplateTag.js +136 -0
- package/dist/__node_modules/common-tags/es/TemplateTag/TemplateTag.js.map +1 -0
- package/dist/__node_modules/common-tags/es/commaLists/commaLists.cjs +7 -0
- package/dist/__node_modules/common-tags/es/commaLists/commaLists.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/commaLists/commaLists.js +6 -0
- package/dist/__node_modules/common-tags/es/commaLists/commaLists.js.map +1 -0
- package/dist/__node_modules/common-tags/es/commaListsAnd/commaListsAnd.cjs +7 -0
- package/dist/__node_modules/common-tags/es/commaListsAnd/commaListsAnd.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/commaListsAnd/commaListsAnd.js +6 -0
- package/dist/__node_modules/common-tags/es/commaListsAnd/commaListsAnd.js.map +1 -0
- package/dist/__node_modules/common-tags/es/commaListsOr/commaListsOr.cjs +7 -0
- package/dist/__node_modules/common-tags/es/commaListsOr/commaListsOr.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/commaListsOr/commaListsOr.js +6 -0
- package/dist/__node_modules/common-tags/es/commaListsOr/commaListsOr.js.map +1 -0
- package/dist/__node_modules/common-tags/es/html/html.cjs +9 -0
- package/dist/__node_modules/common-tags/es/html/html.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/html/html.js +8 -0
- package/dist/__node_modules/common-tags/es/html/html.js.map +1 -0
- package/dist/__node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.cjs +32 -0
- package/dist/__node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.js +33 -0
- package/dist/__node_modules/common-tags/es/inlineArrayTransformer/inlineArrayTransformer.js.map +1 -0
- package/dist/__node_modules/common-tags/es/inlineLists/inlineLists.cjs +7 -0
- package/dist/__node_modules/common-tags/es/inlineLists/inlineLists.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/inlineLists/inlineLists.js +6 -0
- package/dist/__node_modules/common-tags/es/inlineLists/inlineLists.js.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLine/oneLine.cjs +6 -0
- package/dist/__node_modules/common-tags/es/oneLine/oneLine.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLine/oneLine.js +5 -0
- package/dist/__node_modules/common-tags/es/oneLine/oneLine.js.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.cjs +7 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.js +6 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaLists/oneLineCommaLists.js.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.cjs +7 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.js +6 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaListsAnd/oneLineCommaListsAnd.js.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.cjs +7 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.js +6 -0
- package/dist/__node_modules/common-tags/es/oneLineCommaListsOr/oneLineCommaListsOr.js.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.cjs +7 -0
- package/dist/__node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.js +6 -0
- package/dist/__node_modules/common-tags/es/oneLineInlineLists/oneLineInlineLists.js.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineTrim/oneLineTrim.cjs +6 -0
- package/dist/__node_modules/common-tags/es/oneLineTrim/oneLineTrim.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/oneLineTrim/oneLineTrim.js +5 -0
- package/dist/__node_modules/common-tags/es/oneLineTrim/oneLineTrim.js.map +1 -0
- package/dist/__node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.cjs +19 -0
- package/dist/__node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.js +20 -0
- package/dist/__node_modules/common-tags/es/removeNonPrintingValuesTransformer/removeNonPrintingValuesTransformer.js.map +1 -0
- package/dist/__node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.cjs +13 -0
- package/dist/__node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.js +14 -0
- package/dist/__node_modules/common-tags/es/replaceResultTransformer/replaceResultTransformer.js.map +1 -0
- package/dist/__node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.cjs +17 -0
- package/dist/__node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.js +18 -0
- package/dist/__node_modules/common-tags/es/replaceSubstitutionTransformer/replaceSubstitutionTransformer.js.map +1 -0
- package/dist/__node_modules/common-tags/es/safeHtml/safeHtml.cjs +9 -0
- package/dist/__node_modules/common-tags/es/safeHtml/safeHtml.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/safeHtml/safeHtml.js +8 -0
- package/dist/__node_modules/common-tags/es/safeHtml/safeHtml.js.map +1 -0
- package/dist/__node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.cjs +17 -0
- package/dist/__node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.js +18 -0
- package/dist/__node_modules/common-tags/es/splitStringTransformer/splitStringTransformer.js.map +1 -0
- package/dist/__node_modules/common-tags/es/stripIndent/stripIndent.cjs +7 -0
- package/dist/__node_modules/common-tags/es/stripIndent/stripIndent.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/stripIndent/stripIndent.js +8 -0
- package/dist/__node_modules/common-tags/es/stripIndent/stripIndent.js.map +1 -0
- package/dist/__node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.cjs +35 -0
- package/dist/__node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.js +36 -0
- package/dist/__node_modules/common-tags/es/stripIndentTransformer/stripIndentTransformer.js.map +1 -0
- package/dist/__node_modules/common-tags/es/stripIndents/stripIndents.cjs +6 -0
- package/dist/__node_modules/common-tags/es/stripIndents/stripIndents.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/stripIndents/stripIndents.js +5 -0
- package/dist/__node_modules/common-tags/es/stripIndents/stripIndents.js.map +1 -0
- package/dist/__node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.cjs +21 -0
- package/dist/__node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.cjs.map +1 -0
- package/dist/__node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.js +22 -0
- package/dist/__node_modules/common-tags/es/trimResultTransformer/trimResultTransformer.js.map +1 -0
- package/dist/__node_modules/data-uri-to-buffer/dist/index.cjs +41 -0
- package/dist/__node_modules/data-uri-to-buffer/dist/index.cjs.map +1 -0
- package/dist/__node_modules/data-uri-to-buffer/dist/index.js +41 -0
- package/dist/__node_modules/data-uri-to-buffer/dist/index.js.map +1 -0
- package/dist/__node_modules/debug/__node_modules/ms/index.cjs +122 -0
- package/dist/__node_modules/debug/__node_modules/ms/index.cjs.map +1 -0
- package/dist/__node_modules/debug/__node_modules/ms/index.js +122 -0
- package/dist/__node_modules/debug/__node_modules/ms/index.js.map +1 -0
- package/dist/__node_modules/debug/src/browser.cjs +165 -0
- package/dist/__node_modules/debug/src/browser.cjs.map +1 -0
- package/dist/__node_modules/debug/src/browser.js +164 -0
- package/dist/__node_modules/debug/src/browser.js.map +1 -0
- package/dist/__node_modules/debug/src/common.cjs +161 -0
- package/dist/__node_modules/debug/src/common.cjs.map +1 -0
- package/dist/__node_modules/debug/src/common.js +162 -0
- package/dist/__node_modules/debug/src/common.js.map +1 -0
- package/dist/__node_modules/devalue/src/constants.cjs +15 -0
- package/dist/__node_modules/devalue/src/constants.cjs.map +1 -0
- package/dist/__node_modules/devalue/src/constants.js +15 -0
- package/dist/__node_modules/devalue/src/constants.js.map +1 -0
- package/dist/__node_modules/devalue/src/parse.cjs +95 -0
- package/dist/__node_modules/devalue/src/parse.cjs.map +1 -0
- package/dist/__node_modules/devalue/src/parse.js +95 -0
- package/dist/__node_modules/devalue/src/parse.js.map +1 -0
- package/dist/__node_modules/devalue/src/stringify.cjs +140 -0
- package/dist/__node_modules/devalue/src/stringify.cjs.map +1 -0
- package/dist/__node_modules/devalue/src/stringify.js +140 -0
- package/dist/__node_modules/devalue/src/stringify.js.map +1 -0
- package/dist/__node_modules/devalue/src/uneval.cjs +4 -0
- package/dist/__node_modules/devalue/src/uneval.cjs.map +1 -0
- package/dist/__node_modules/devalue/src/uneval.js +3 -0
- package/dist/__node_modules/devalue/src/uneval.js.map +1 -0
- package/dist/__node_modules/devalue/src/utils.cjs +68 -0
- package/dist/__node_modules/devalue/src/utils.cjs.map +1 -0
- package/dist/__node_modules/devalue/src/utils.js +68 -0
- package/dist/__node_modules/devalue/src/utils.js.map +1 -0
- package/dist/__node_modules/fetch-blob/file.cjs +61 -0
- package/dist/__node_modules/fetch-blob/file.cjs.map +1 -0
- package/dist/__node_modules/fetch-blob/file.js +61 -0
- package/dist/__node_modules/fetch-blob/file.js.map +1 -0
- package/dist/__node_modules/fetch-blob/index.cjs +217 -0
- package/dist/__node_modules/fetch-blob/index.cjs.map +1 -0
- package/dist/__node_modules/fetch-blob/index.js +217 -0
- package/dist/__node_modules/fetch-blob/index.js.map +1 -0
- package/dist/__node_modules/fetch-blob/streams.cjs +43 -0
- package/dist/__node_modules/fetch-blob/streams.cjs.map +1 -0
- package/dist/__node_modules/fetch-blob/streams.js +42 -0
- package/dist/__node_modules/fetch-blob/streams.js.map +1 -0
- package/dist/__node_modules/file-type/core.cjs +1147 -0
- package/dist/__node_modules/file-type/core.cjs.map +1 -0
- package/dist/__node_modules/file-type/core.js +1147 -0
- package/dist/__node_modules/file-type/core.js.map +1 -0
- package/dist/__node_modules/file-type/util.cjs +27 -0
- package/dist/__node_modules/file-type/util.cjs.map +1 -0
- package/dist/__node_modules/file-type/util.js +27 -0
- package/dist/__node_modules/file-type/util.js.map +1 -0
- package/dist/__node_modules/formdata-node/lib/browser.cjs +16 -0
- package/dist/__node_modules/formdata-node/lib/browser.cjs.map +1 -0
- package/dist/__node_modules/formdata-node/lib/browser.js +16 -0
- package/dist/__node_modules/formdata-node/lib/browser.js.map +1 -0
- package/dist/__node_modules/formdata-polyfill/esm.min.cjs +116 -0
- package/dist/__node_modules/formdata-polyfill/esm.min.cjs.map +1 -0
- package/dist/__node_modules/formdata-polyfill/esm.min.js +116 -0
- package/dist/__node_modules/formdata-polyfill/esm.min.js.map +1 -0
- package/dist/__node_modules/fp-ts/es6/Either.cjs +14 -0
- package/dist/__node_modules/fp-ts/es6/Either.cjs.map +1 -0
- package/dist/__node_modules/fp-ts/es6/Either.js +14 -0
- package/dist/__node_modules/fp-ts/es6/Either.js.map +1 -0
- package/dist/__node_modules/fp-ts/es6/function.cjs +33 -0
- package/dist/__node_modules/fp-ts/es6/function.cjs.map +1 -0
- package/dist/__node_modules/fp-ts/es6/function.js +33 -0
- package/dist/__node_modules/fp-ts/es6/function.js.map +1 -0
- package/dist/__node_modules/fp-ts/es6/internal.cjs +18 -0
- package/dist/__node_modules/fp-ts/es6/internal.cjs.map +1 -0
- package/dist/__node_modules/fp-ts/es6/internal.js +18 -0
- package/dist/__node_modules/fp-ts/es6/internal.js.map +1 -0
- package/dist/__node_modules/get-port/index.cjs +113 -0
- package/dist/__node_modules/get-port/index.cjs.map +1 -0
- package/dist/__node_modules/get-port/index.js +114 -0
- package/dist/__node_modules/get-port/index.js.map +1 -0
- package/dist/__node_modules/graphql/error/GraphQLError.cjs +162 -0
- package/dist/__node_modules/graphql/error/GraphQLError.cjs.map +1 -0
- package/dist/__node_modules/graphql/error/GraphQLError.js +162 -0
- package/dist/__node_modules/graphql/error/GraphQLError.js.map +1 -0
- package/dist/__node_modules/graphql/error/locatedError.cjs +23 -0
- package/dist/__node_modules/graphql/error/locatedError.cjs.map +1 -0
- package/dist/__node_modules/graphql/error/locatedError.js +23 -0
- package/dist/__node_modules/graphql/error/locatedError.js.map +1 -0
- package/dist/__node_modules/graphql/error/syntaxError.cjs +11 -0
- package/dist/__node_modules/graphql/error/syntaxError.cjs.map +1 -0
- package/dist/__node_modules/graphql/error/syntaxError.js +11 -0
- package/dist/__node_modules/graphql/error/syntaxError.js.map +1 -0
- package/dist/__node_modules/graphql/execution/collectFields.cjs +128 -0
- package/dist/__node_modules/graphql/execution/collectFields.cjs.map +1 -0
- package/dist/__node_modules/graphql/execution/collectFields.js +128 -0
- package/dist/__node_modules/graphql/execution/collectFields.js.map +1 -0
- package/dist/__node_modules/graphql/execution/execute.cjs +600 -0
- package/dist/__node_modules/graphql/execution/execute.cjs.map +1 -0
- package/dist/__node_modules/graphql/execution/execute.js +600 -0
- package/dist/__node_modules/graphql/execution/execute.js.map +1 -0
- package/dist/__node_modules/graphql/execution/mapAsyncIterator.cjs +46 -0
- package/dist/__node_modules/graphql/execution/mapAsyncIterator.cjs.map +1 -0
- package/dist/__node_modules/graphql/execution/mapAsyncIterator.js +46 -0
- package/dist/__node_modules/graphql/execution/mapAsyncIterator.js.map +1 -0
- package/dist/__node_modules/graphql/execution/subscribe.cjs +121 -0
- package/dist/__node_modules/graphql/execution/subscribe.cjs.map +1 -0
- package/dist/__node_modules/graphql/execution/subscribe.js +121 -0
- package/dist/__node_modules/graphql/execution/subscribe.js.map +1 -0
- package/dist/__node_modules/graphql/execution/values.cjs +184 -0
- package/dist/__node_modules/graphql/execution/values.cjs.map +1 -0
- package/dist/__node_modules/graphql/execution/values.js +184 -0
- package/dist/__node_modules/graphql/execution/values.js.map +1 -0
- package/dist/__node_modules/graphql/graphql.cjs +67 -0
- package/dist/__node_modules/graphql/graphql.cjs.map +1 -0
- package/dist/__node_modules/graphql/graphql.js +67 -0
- package/dist/__node_modules/graphql/graphql.js.map +1 -0
- package/dist/__node_modules/graphql/index.cjs +320 -0
- package/dist/__node_modules/graphql/index.cjs.map +1 -0
- package/dist/__node_modules/graphql/index.js +299 -0
- package/dist/__node_modules/graphql/index.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/Path.cjs +21 -0
- package/dist/__node_modules/graphql/jsutils/Path.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/Path.js +21 -0
- package/dist/__node_modules/graphql/jsutils/Path.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/devAssert.cjs +10 -0
- package/dist/__node_modules/graphql/jsutils/devAssert.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/devAssert.js +10 -0
- package/dist/__node_modules/graphql/jsutils/devAssert.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/didYouMean.cjs +24 -0
- package/dist/__node_modules/graphql/jsutils/didYouMean.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/didYouMean.js +24 -0
- package/dist/__node_modules/graphql/jsutils/didYouMean.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/groupBy.cjs +17 -0
- package/dist/__node_modules/graphql/jsutils/groupBy.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/groupBy.js +17 -0
- package/dist/__node_modules/graphql/jsutils/groupBy.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/identityFunc.cjs +7 -0
- package/dist/__node_modules/graphql/jsutils/identityFunc.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/identityFunc.js +7 -0
- package/dist/__node_modules/graphql/jsutils/identityFunc.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/inspect.cjs +85 -0
- package/dist/__node_modules/graphql/jsutils/inspect.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/inspect.js +85 -0
- package/dist/__node_modules/graphql/jsutils/inspect.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/instanceOf.cjs +41 -0
- package/dist/__node_modules/graphql/jsutils/instanceOf.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/instanceOf.js +41 -0
- package/dist/__node_modules/graphql/jsutils/instanceOf.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/invariant.cjs +12 -0
- package/dist/__node_modules/graphql/jsutils/invariant.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/invariant.js +12 -0
- package/dist/__node_modules/graphql/jsutils/invariant.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/isAsyncIterable.cjs +7 -0
- package/dist/__node_modules/graphql/jsutils/isAsyncIterable.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/isAsyncIterable.js +7 -0
- package/dist/__node_modules/graphql/jsutils/isAsyncIterable.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/isIterableObject.cjs +7 -0
- package/dist/__node_modules/graphql/jsutils/isIterableObject.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/isIterableObject.js +7 -0
- package/dist/__node_modules/graphql/jsutils/isIterableObject.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/isObjectLike.cjs +7 -0
- package/dist/__node_modules/graphql/jsutils/isObjectLike.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/isObjectLike.js +7 -0
- package/dist/__node_modules/graphql/jsutils/isObjectLike.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/isPromise.cjs +7 -0
- package/dist/__node_modules/graphql/jsutils/isPromise.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/isPromise.js +7 -0
- package/dist/__node_modules/graphql/jsutils/isPromise.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/keyMap.cjs +11 -0
- package/dist/__node_modules/graphql/jsutils/keyMap.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/keyMap.js +11 -0
- package/dist/__node_modules/graphql/jsutils/keyMap.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/keyValMap.cjs +11 -0
- package/dist/__node_modules/graphql/jsutils/keyValMap.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/keyValMap.js +11 -0
- package/dist/__node_modules/graphql/jsutils/keyValMap.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/mapValue.cjs +11 -0
- package/dist/__node_modules/graphql/jsutils/mapValue.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/mapValue.js +11 -0
- package/dist/__node_modules/graphql/jsutils/mapValue.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/memoize3.cjs +28 -0
- package/dist/__node_modules/graphql/jsutils/memoize3.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/memoize3.js +28 -0
- package/dist/__node_modules/graphql/jsutils/memoize3.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/naturalCompare.cjs +47 -0
- package/dist/__node_modules/graphql/jsutils/naturalCompare.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/naturalCompare.js +47 -0
- package/dist/__node_modules/graphql/jsutils/naturalCompare.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/printPathArray.cjs +9 -0
- package/dist/__node_modules/graphql/jsutils/printPathArray.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/printPathArray.js +9 -0
- package/dist/__node_modules/graphql/jsutils/printPathArray.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/promiseForObject.cjs +13 -0
- package/dist/__node_modules/graphql/jsutils/promiseForObject.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/promiseForObject.js +13 -0
- package/dist/__node_modules/graphql/jsutils/promiseForObject.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/promiseReduce.cjs +12 -0
- package/dist/__node_modules/graphql/jsutils/promiseReduce.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/promiseReduce.js +12 -0
- package/dist/__node_modules/graphql/jsutils/promiseReduce.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/suggestionList.cjs +94 -0
- package/dist/__node_modules/graphql/jsutils/suggestionList.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/suggestionList.js +94 -0
- package/dist/__node_modules/graphql/jsutils/suggestionList.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/toError.cjs +15 -0
- package/dist/__node_modules/graphql/jsutils/toError.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/toError.js +15 -0
- package/dist/__node_modules/graphql/jsutils/toError.js.map +1 -0
- package/dist/__node_modules/graphql/jsutils/toObjMap.cjs +17 -0
- package/dist/__node_modules/graphql/jsutils/toObjMap.cjs.map +1 -0
- package/dist/__node_modules/graphql/jsutils/toObjMap.js +17 -0
- package/dist/__node_modules/graphql/jsutils/toObjMap.js.map +1 -0
- package/dist/__node_modules/graphql/language/ast.cjs +175 -0
- package/dist/__node_modules/graphql/language/ast.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/ast.js +176 -0
- package/dist/__node_modules/graphql/language/ast.js.map +1 -0
- package/dist/__node_modules/graphql/language/blockString.cjs +109 -0
- package/dist/__node_modules/graphql/language/blockString.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/blockString.js +109 -0
- package/dist/__node_modules/graphql/language/blockString.js.map +1 -0
- package/dist/__node_modules/graphql/language/characterClasses.cjs +23 -0
- package/dist/__node_modules/graphql/language/characterClasses.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/characterClasses.js +23 -0
- package/dist/__node_modules/graphql/language/characterClasses.js.map +1 -0
- package/dist/__node_modules/graphql/language/directiveLocation.cjs +25 -0
- package/dist/__node_modules/graphql/language/directiveLocation.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/directiveLocation.js +26 -0
- package/dist/__node_modules/graphql/language/directiveLocation.js.map +1 -0
- package/dist/__node_modules/graphql/language/kinds.cjs +49 -0
- package/dist/__node_modules/graphql/language/kinds.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/kinds.js +50 -0
- package/dist/__node_modules/graphql/language/kinds.js.map +1 -0
- package/dist/__node_modules/graphql/language/lexer.cjs +509 -0
- package/dist/__node_modules/graphql/language/lexer.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/lexer.js +509 -0
- package/dist/__node_modules/graphql/language/lexer.js.map +1 -0
- package/dist/__node_modules/graphql/language/location.cjs +22 -0
- package/dist/__node_modules/graphql/language/location.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/location.js +22 -0
- package/dist/__node_modules/graphql/language/location.js.map +1 -0
- package/dist/__node_modules/graphql/language/parser.cjs +1283 -0
- package/dist/__node_modules/graphql/language/parser.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/parser.js +1283 -0
- package/dist/__node_modules/graphql/language/parser.js.map +1 -0
- package/dist/__node_modules/graphql/language/predicates.cjs +44 -0
- package/dist/__node_modules/graphql/language/predicates.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/predicates.js +44 -0
- package/dist/__node_modules/graphql/language/predicates.js.map +1 -0
- package/dist/__node_modules/graphql/language/printLocation.cjs +51 -0
- package/dist/__node_modules/graphql/language/printLocation.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/printLocation.js +51 -0
- package/dist/__node_modules/graphql/language/printLocation.js.map +1 -0
- package/dist/__node_modules/graphql/language/printString.cjs +178 -0
- package/dist/__node_modules/graphql/language/printString.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/printString.js +178 -0
- package/dist/__node_modules/graphql/language/printString.js.map +1 -0
- package/dist/__node_modules/graphql/language/printer.cjs +245 -0
- package/dist/__node_modules/graphql/language/printer.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/printer.js +245 -0
- package/dist/__node_modules/graphql/language/printer.js.map +1 -0
- package/dist/__node_modules/graphql/language/source.cjs +33 -0
- package/dist/__node_modules/graphql/language/source.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/source.js +33 -0
- package/dist/__node_modules/graphql/language/source.js.map +1 -0
- package/dist/__node_modules/graphql/language/tokenKind.cjs +28 -0
- package/dist/__node_modules/graphql/language/tokenKind.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/tokenKind.js +29 -0
- package/dist/__node_modules/graphql/language/tokenKind.js.map +1 -0
- package/dist/__node_modules/graphql/language/visitor.cjs +200 -0
- package/dist/__node_modules/graphql/language/visitor.cjs.map +1 -0
- package/dist/__node_modules/graphql/language/visitor.js +200 -0
- package/dist/__node_modules/graphql/language/visitor.js.map +1 -0
- package/dist/__node_modules/graphql/type/assertName.cjs +34 -0
- package/dist/__node_modules/graphql/type/assertName.cjs.map +1 -0
- package/dist/__node_modules/graphql/type/assertName.js +34 -0
- package/dist/__node_modules/graphql/type/assertName.js.map +1 -0
- package/dist/__node_modules/graphql/type/definition.cjs +762 -0
- package/dist/__node_modules/graphql/type/definition.cjs.map +1 -0
- package/dist/__node_modules/graphql/type/definition.js +762 -0
- package/dist/__node_modules/graphql/type/definition.js.map +1 -0
- package/dist/__node_modules/graphql/type/directives.cjs +139 -0
- package/dist/__node_modules/graphql/type/directives.cjs.map +1 -0
- package/dist/__node_modules/graphql/type/directives.js +139 -0
- package/dist/__node_modules/graphql/type/directives.js.map +1 -0
- package/dist/__node_modules/graphql/type/introspection.cjs +495 -0
- package/dist/__node_modules/graphql/type/introspection.cjs.map +1 -0
- package/dist/__node_modules/graphql/type/introspection.js +496 -0
- package/dist/__node_modules/graphql/type/introspection.js.map +1 -0
- package/dist/__node_modules/graphql/type/scalars.cjs +248 -0
- package/dist/__node_modules/graphql/type/scalars.cjs.map +1 -0
- package/dist/__node_modules/graphql/type/scalars.js +248 -0
- package/dist/__node_modules/graphql/type/scalars.js.map +1 -0
- package/dist/__node_modules/graphql/type/schema.cjs +223 -0
- package/dist/__node_modules/graphql/type/schema.cjs.map +1 -0
- package/dist/__node_modules/graphql/type/schema.js +223 -0
- package/dist/__node_modules/graphql/type/schema.js.map +1 -0
- package/dist/__node_modules/graphql/type/validate.cjs +428 -0
- package/dist/__node_modules/graphql/type/validate.cjs.map +1 -0
- package/dist/__node_modules/graphql/type/validate.js +428 -0
- package/dist/__node_modules/graphql/type/validate.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/TypeInfo.cjs +257 -0
- package/dist/__node_modules/graphql/utilities/TypeInfo.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/TypeInfo.js +257 -0
- package/dist/__node_modules/graphql/utilities/TypeInfo.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/assertValidName.cjs +28 -0
- package/dist/__node_modules/graphql/utilities/assertValidName.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/assertValidName.js +28 -0
- package/dist/__node_modules/graphql/utilities/assertValidName.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/astFromValue.cjs +111 -0
- package/dist/__node_modules/graphql/utilities/astFromValue.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/astFromValue.js +111 -0
- package/dist/__node_modules/graphql/utilities/astFromValue.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/buildASTSchema.cjs +62 -0
- package/dist/__node_modules/graphql/utilities/buildASTSchema.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/buildASTSchema.js +62 -0
- package/dist/__node_modules/graphql/utilities/buildASTSchema.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/buildClientSchema.cjs +264 -0
- package/dist/__node_modules/graphql/utilities/buildClientSchema.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/buildClientSchema.js +264 -0
- package/dist/__node_modules/graphql/utilities/buildClientSchema.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/coerceInputValue.cjs +133 -0
- package/dist/__node_modules/graphql/utilities/coerceInputValue.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/coerceInputValue.js +133 -0
- package/dist/__node_modules/graphql/utilities/coerceInputValue.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/concatAST.cjs +15 -0
- package/dist/__node_modules/graphql/utilities/concatAST.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/concatAST.js +15 -0
- package/dist/__node_modules/graphql/utilities/concatAST.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/extendSchema.cjs +448 -0
- package/dist/__node_modules/graphql/utilities/extendSchema.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/extendSchema.js +448 -0
- package/dist/__node_modules/graphql/utilities/extendSchema.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/findBreakingChanges.cjs +384 -0
- package/dist/__node_modules/graphql/utilities/findBreakingChanges.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/findBreakingChanges.js +386 -0
- package/dist/__node_modules/graphql/utilities/findBreakingChanges.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/getIntrospectionQuery.cjs +119 -0
- package/dist/__node_modules/graphql/utilities/getIntrospectionQuery.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/getIntrospectionQuery.js +119 -0
- package/dist/__node_modules/graphql/utilities/getIntrospectionQuery.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/getOperationAST.cjs +22 -0
- package/dist/__node_modules/graphql/utilities/getOperationAST.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/getOperationAST.js +22 -0
- package/dist/__node_modules/graphql/utilities/getOperationAST.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/getOperationRootType.cjs +43 -0
- package/dist/__node_modules/graphql/utilities/getOperationRootType.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/getOperationRootType.js +43 -0
- package/dist/__node_modules/graphql/utilities/getOperationRootType.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/introspectionFromSchema.cjs +24 -0
- package/dist/__node_modules/graphql/utilities/introspectionFromSchema.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/introspectionFromSchema.js +24 -0
- package/dist/__node_modules/graphql/utilities/introspectionFromSchema.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/lexicographicSortSchema.cjs +129 -0
- package/dist/__node_modules/graphql/utilities/lexicographicSortSchema.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/lexicographicSortSchema.js +129 -0
- package/dist/__node_modules/graphql/utilities/lexicographicSortSchema.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/printSchema.cjs +192 -0
- package/dist/__node_modules/graphql/utilities/printSchema.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/printSchema.js +192 -0
- package/dist/__node_modules/graphql/utilities/printSchema.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/separateOperations.cjs +57 -0
- package/dist/__node_modules/graphql/utilities/separateOperations.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/separateOperations.js +57 -0
- package/dist/__node_modules/graphql/utilities/separateOperations.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/sortValueNode.cjs +30 -0
- package/dist/__node_modules/graphql/utilities/sortValueNode.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/sortValueNode.js +30 -0
- package/dist/__node_modules/graphql/utilities/sortValueNode.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/stripIgnoredCharacters.cjs +35 -0
- package/dist/__node_modules/graphql/utilities/stripIgnoredCharacters.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/stripIgnoredCharacters.js +35 -0
- package/dist/__node_modules/graphql/utilities/stripIgnoredCharacters.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/typeComparators.cjs +58 -0
- package/dist/__node_modules/graphql/utilities/typeComparators.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/typeComparators.js +58 -0
- package/dist/__node_modules/graphql/utilities/typeComparators.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/typeFromAST.cjs +20 -0
- package/dist/__node_modules/graphql/utilities/typeFromAST.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/typeFromAST.js +20 -0
- package/dist/__node_modules/graphql/utilities/typeFromAST.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/valueFromAST.cjs +100 -0
- package/dist/__node_modules/graphql/utilities/valueFromAST.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/valueFromAST.js +100 -0
- package/dist/__node_modules/graphql/utilities/valueFromAST.js.map +1 -0
- package/dist/__node_modules/graphql/utilities/valueFromASTUntyped.cjs +32 -0
- package/dist/__node_modules/graphql/utilities/valueFromASTUntyped.cjs.map +1 -0
- package/dist/__node_modules/graphql/utilities/valueFromASTUntyped.js +32 -0
- package/dist/__node_modules/graphql/utilities/valueFromASTUntyped.js.map +1 -0
- package/dist/__node_modules/graphql/validation/ValidationContext.cjs +170 -0
- package/dist/__node_modules/graphql/validation/ValidationContext.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/ValidationContext.js +170 -0
- package/dist/__node_modules/graphql/validation/ValidationContext.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/ExecutableDefinitionsRule.cjs +24 -0
- package/dist/__node_modules/graphql/validation/rules/ExecutableDefinitionsRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js +24 -0
- package/dist/__node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.cjs +80 -0
- package/dist/__node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js +80 -0
- package/dist/__node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.cjs +43 -0
- package/dist/__node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js +43 -0
- package/dist/__node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/KnownArgumentNamesRule.cjs +73 -0
- package/dist/__node_modules/graphql/validation/rules/KnownArgumentNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/KnownArgumentNamesRule.js +73 -0
- package/dist/__node_modules/graphql/validation/rules/KnownArgumentNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/KnownDirectivesRule.cjs +110 -0
- package/dist/__node_modules/graphql/validation/rules/KnownDirectivesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/KnownDirectivesRule.js +110 -0
- package/dist/__node_modules/graphql/validation/rules/KnownDirectivesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/KnownFragmentNamesRule.cjs +20 -0
- package/dist/__node_modules/graphql/validation/rules/KnownFragmentNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/KnownFragmentNamesRule.js +20 -0
- package/dist/__node_modules/graphql/validation/rules/KnownFragmentNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/KnownTypeNamesRule.cjs +55 -0
- package/dist/__node_modules/graphql/validation/rules/KnownTypeNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/KnownTypeNamesRule.js +55 -0
- package/dist/__node_modules/graphql/validation/rules/KnownTypeNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/LoneAnonymousOperationRule.cjs +28 -0
- package/dist/__node_modules/graphql/validation/rules/LoneAnonymousOperationRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js +28 -0
- package/dist/__node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.cjs +34 -0
- package/dist/__node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js +34 -0
- package/dist/__node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/NoFragmentCyclesRule.cjs +53 -0
- package/dist/__node_modules/graphql/validation/rules/NoFragmentCyclesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/NoFragmentCyclesRule.js +53 -0
- package/dist/__node_modules/graphql/validation/rules/NoFragmentCyclesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/NoUndefinedVariablesRule.cjs +34 -0
- package/dist/__node_modules/graphql/validation/rules/NoUndefinedVariablesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js +34 -0
- package/dist/__node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/NoUnusedFragmentsRule.cjs +41 -0
- package/dist/__node_modules/graphql/validation/rules/NoUnusedFragmentsRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js +41 -0
- package/dist/__node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/NoUnusedVariablesRule.cjs +38 -0
- package/dist/__node_modules/graphql/validation/rules/NoUnusedVariablesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/NoUnusedVariablesRule.js +38 -0
- package/dist/__node_modules/graphql/validation/rules/NoUnusedVariablesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.cjs +477 -0
- package/dist/__node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js +477 -0
- package/dist/__node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.cjs +55 -0
- package/dist/__node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js +55 -0
- package/dist/__node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.cjs +111 -0
- package/dist/__node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js +111 -0
- package/dist/__node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.cjs +97 -0
- package/dist/__node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js +97 -0
- package/dist/__node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/ScalarLeafsRule.cjs +42 -0
- package/dist/__node_modules/graphql/validation/rules/ScalarLeafsRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/ScalarLeafsRule.js +42 -0
- package/dist/__node_modules/graphql/validation/rules/ScalarLeafsRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.cjs +62 -0
- package/dist/__node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js +62 -0
- package/dist/__node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.cjs +47 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js +47 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueArgumentNamesRule.cjs +29 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueArgumentNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js +29 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.cjs +38 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js +38 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.cjs +63 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +63 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.cjs +50 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js +50 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.cjs +59 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js +59 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueFragmentNamesRule.cjs +27 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueFragmentNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js +27 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.cjs +38 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js +38 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueOperationNamesRule.cjs +32 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueOperationNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueOperationNamesRule.js +32 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueOperationNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueOperationTypesRule.cjs +48 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueOperationTypesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueOperationTypesRule.js +48 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueOperationTypesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueTypeNamesRule.cjs +41 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueTypeNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueTypeNamesRule.js +41 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueTypeNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueVariableNamesRule.cjs +30 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueVariableNamesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueVariableNamesRule.js +30 -0
- package/dist/__node_modules/graphql/validation/rules/UniqueVariableNamesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.cjs +132 -0
- package/dist/__node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +132 -0
- package/dist/__node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/VariablesAreInputTypesRule.cjs +27 -0
- package/dist/__node_modules/graphql/validation/rules/VariablesAreInputTypesRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js +27 -0
- package/dist/__node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.cjs +64 -0
- package/dist/__node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js +64 -0
- package/dist/__node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.cjs +89 -0
- package/dist/__node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js +89 -0
- package/dist/__node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.cjs +24 -0
- package/dist/__node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js +24 -0
- package/dist/__node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js.map +1 -0
- package/dist/__node_modules/graphql/validation/specifiedRules.cjs +84 -0
- package/dist/__node_modules/graphql/validation/specifiedRules.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/specifiedRules.js +84 -0
- package/dist/__node_modules/graphql/validation/specifiedRules.js.map +1 -0
- package/dist/__node_modules/graphql/validation/validate.cjs +72 -0
- package/dist/__node_modules/graphql/validation/validate.cjs.map +1 -0
- package/dist/__node_modules/graphql/validation/validate.js +72 -0
- package/dist/__node_modules/graphql/validation/validate.js.map +1 -0
- package/dist/__node_modules/graphql/version.cjs +12 -0
- package/dist/__node_modules/graphql/version.cjs.map +1 -0
- package/dist/__node_modules/graphql/version.js +12 -0
- package/dist/__node_modules/graphql/version.js.map +1 -0
- package/dist/__node_modules/headers-polyfill/lib/index.cjs +214 -0
- package/dist/__node_modules/headers-polyfill/lib/index.cjs.map +1 -0
- package/dist/__node_modules/headers-polyfill/lib/index.js +215 -0
- package/dist/__node_modules/headers-polyfill/lib/index.js.map +1 -0
- package/dist/__node_modules/is-node-process/lib/index.cjs +18 -0
- package/dist/__node_modules/is-node-process/lib/index.cjs.map +1 -0
- package/dist/__node_modules/is-node-process/lib/index.js +17 -0
- package/dist/__node_modules/is-node-process/lib/index.js.map +1 -0
- package/dist/__node_modules/js-levenshtein/index.cjs +91 -0
- package/dist/__node_modules/js-levenshtein/index.cjs.map +1 -0
- package/dist/__node_modules/js-levenshtein/index.js +91 -0
- package/dist/__node_modules/js-levenshtein/index.js.map +1 -0
- package/dist/__node_modules/msw/__node_modules/node-fetch/browser.cjs +34 -0
- package/dist/__node_modules/msw/__node_modules/node-fetch/browser.cjs.map +1 -0
- package/dist/__node_modules/msw/__node_modules/node-fetch/browser.js +34 -0
- package/dist/__node_modules/msw/__node_modules/node-fetch/browser.js.map +1 -0
- package/dist/__node_modules/msw/__node_modules/path-to-regexp/dist.es2015/index.cjs +363 -0
- package/dist/__node_modules/msw/__node_modules/path-to-regexp/dist.es2015/index.cjs.map +1 -0
- package/dist/__node_modules/msw/__node_modules/path-to-regexp/dist.es2015/index.js +363 -0
- package/dist/__node_modules/msw/__node_modules/path-to-regexp/dist.es2015/index.js.map +1 -0
- package/dist/__node_modules/msw/lib/index.cjs +1937 -0
- package/dist/__node_modules/msw/lib/index.cjs.map +1 -0
- package/dist/__node_modules/msw/lib/index.js +1938 -0
- package/dist/__node_modules/msw/lib/index.js.map +1 -0
- package/dist/__node_modules/node-domexception/index.cjs +11 -0
- package/dist/__node_modules/node-domexception/index.cjs.map +1 -0
- package/dist/__node_modules/node-domexception/index.js +10 -0
- package/dist/__node_modules/node-domexception/index.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/body.cjs +262 -0
- package/dist/__node_modules/node-fetch/src/body.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/body.js +262 -0
- package/dist/__node_modules/node-fetch/src/body.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/errors/abort-error.cjs +10 -0
- package/dist/__node_modules/node-fetch/src/errors/abort-error.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/errors/abort-error.js +10 -0
- package/dist/__node_modules/node-fetch/src/errors/abort-error.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/errors/base.cjs +17 -0
- package/dist/__node_modules/node-fetch/src/errors/base.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/errors/base.js +17 -0
- package/dist/__node_modules/node-fetch/src/errors/base.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/errors/fetch-error.cjs +19 -0
- package/dist/__node_modules/node-fetch/src/errors/fetch-error.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/errors/fetch-error.js +19 -0
- package/dist/__node_modules/node-fetch/src/errors/fetch-error.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/headers.cjs +190 -0
- package/dist/__node_modules/node-fetch/src/headers.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/headers.js +190 -0
- package/dist/__node_modules/node-fetch/src/headers.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/index.cjs +292 -0
- package/dist/__node_modules/node-fetch/src/index.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/index.js +292 -0
- package/dist/__node_modules/node-fetch/src/index.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/request.cjs +206 -0
- package/dist/__node_modules/node-fetch/src/request.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/request.js +206 -0
- package/dist/__node_modules/node-fetch/src/request.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/response.cjs +122 -0
- package/dist/__node_modules/node-fetch/src/response.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/response.js +123 -0
- package/dist/__node_modules/node-fetch/src/response.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/get-search.cjs +12 -0
- package/dist/__node_modules/node-fetch/src/utils/get-search.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/get-search.js +12 -0
- package/dist/__node_modules/node-fetch/src/utils/get-search.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/is-redirect.cjs +8 -0
- package/dist/__node_modules/node-fetch/src/utils/is-redirect.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/is-redirect.js +8 -0
- package/dist/__node_modules/node-fetch/src/utils/is-redirect.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/is.cjs +28 -0
- package/dist/__node_modules/node-fetch/src/utils/is.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/is.js +28 -0
- package/dist/__node_modules/node-fetch/src/utils/is.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/multipart-parser.cjs +356 -0
- package/dist/__node_modules/node-fetch/src/utils/multipart-parser.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/multipart-parser.js +356 -0
- package/dist/__node_modules/node-fetch/src/utils/multipart-parser.js.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/referrer.cjs +149 -0
- package/dist/__node_modules/node-fetch/src/utils/referrer.cjs.map +1 -0
- package/dist/__node_modules/node-fetch/src/utils/referrer.js +149 -0
- package/dist/__node_modules/node-fetch/src/utils/referrer.js.map +1 -0
- package/dist/__node_modules/outvariant/lib/format.cjs +53 -0
- package/dist/__node_modules/outvariant/lib/format.cjs.map +1 -0
- package/dist/__node_modules/outvariant/lib/format.js +54 -0
- package/dist/__node_modules/outvariant/lib/format.js.map +1 -0
- package/dist/__node_modules/outvariant/lib/index.cjs +29 -0
- package/dist/__node_modules/outvariant/lib/index.cjs.map +1 -0
- package/dist/__node_modules/outvariant/lib/index.js +28 -0
- package/dist/__node_modules/outvariant/lib/index.js.map +1 -0
- package/dist/__node_modules/outvariant/lib/invariant.cjs +95 -0
- package/dist/__node_modules/outvariant/lib/invariant.cjs.map +1 -0
- package/dist/__node_modules/outvariant/lib/invariant.js +94 -0
- package/dist/__node_modules/outvariant/lib/invariant.js.map +1 -0
- package/dist/__node_modules/p-limit/index.cjs +53 -0
- package/dist/__node_modules/p-limit/index.cjs.map +1 -0
- package/dist/__node_modules/p-limit/index.js +54 -0
- package/dist/__node_modules/p-limit/index.js.map +1 -0
- package/dist/__node_modules/peek-readable/lib/EndOfFileStream.cjs +11 -0
- package/dist/__node_modules/peek-readable/lib/EndOfFileStream.cjs.map +1 -0
- package/dist/__node_modules/peek-readable/lib/EndOfFileStream.js +11 -0
- package/dist/__node_modules/peek-readable/lib/EndOfFileStream.js.map +1 -0
- package/dist/__node_modules/r19/dist/client/createRPCClient.cjs +50 -0
- package/dist/__node_modules/r19/dist/client/createRPCClient.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/client/createRPCClient.js +50 -0
- package/dist/__node_modules/r19/dist/client/createRPCClient.js.map +1 -0
- package/dist/__node_modules/r19/dist/constants.cjs +5 -0
- package/dist/__node_modules/r19/dist/constants.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/constants.js +5 -0
- package/dist/__node_modules/r19/dist/constants.js.map +1 -0
- package/dist/__node_modules/r19/dist/createRPCMiddleware.cjs +25 -0
- package/dist/__node_modules/r19/dist/createRPCMiddleware.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/createRPCMiddleware.js +25 -0
- package/dist/__node_modules/r19/dist/createRPCMiddleware.js.map +1 -0
- package/dist/__node_modules/r19/dist/handleRPCRequest.cjs +182 -0
- package/dist/__node_modules/r19/dist/handleRPCRequest.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/handleRPCRequest.js +182 -0
- package/dist/__node_modules/r19/dist/handleRPCRequest.js.map +1 -0
- package/dist/__node_modules/r19/dist/lib/encodeFormData.cjs +46 -0
- package/dist/__node_modules/r19/dist/lib/encodeFormData.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/lib/encodeFormData.js +46 -0
- package/dist/__node_modules/r19/dist/lib/encodeFormData.js.map +1 -0
- package/dist/__node_modules/r19/dist/lib/flattenObject.cjs +43 -0
- package/dist/__node_modules/r19/dist/lib/flattenObject.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/lib/flattenObject.js +43 -0
- package/dist/__node_modules/r19/dist/lib/flattenObject.js.map +1 -0
- package/dist/__node_modules/r19/dist/lib/formDataToObject.client.cjs +19 -0
- package/dist/__node_modules/r19/dist/lib/formDataToObject.client.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/lib/formDataToObject.client.js +19 -0
- package/dist/__node_modules/r19/dist/lib/formDataToObject.client.js.map +1 -0
- package/dist/__node_modules/r19/dist/lib/isErrorLike.cjs +7 -0
- package/dist/__node_modules/r19/dist/lib/isErrorLike.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/lib/isErrorLike.js +7 -0
- package/dist/__node_modules/r19/dist/lib/isErrorLike.js.map +1 -0
- package/dist/__node_modules/r19/dist/lib/objectToFormData.client.cjs +20 -0
- package/dist/__node_modules/r19/dist/lib/objectToFormData.client.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/lib/objectToFormData.client.js +20 -0
- package/dist/__node_modules/r19/dist/lib/objectToFormData.client.js.map +1 -0
- package/dist/__node_modules/r19/dist/lib/objectToFormData.server.cjs +22 -0
- package/dist/__node_modules/r19/dist/lib/objectToFormData.server.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/lib/objectToFormData.server.js +22 -0
- package/dist/__node_modules/r19/dist/lib/objectToFormData.server.js.map +1 -0
- package/dist/__node_modules/r19/dist/lib/unflattenObject.cjs +20 -0
- package/dist/__node_modules/r19/dist/lib/unflattenObject.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/lib/unflattenObject.js +20 -0
- package/dist/__node_modules/r19/dist/lib/unflattenObject.js.map +1 -0
- package/dist/__node_modules/r19/dist/proceduresFromInstance.cjs +33 -0
- package/dist/__node_modules/r19/dist/proceduresFromInstance.cjs.map +1 -0
- package/dist/__node_modules/r19/dist/proceduresFromInstance.js +33 -0
- package/dist/__node_modules/r19/dist/proceduresFromInstance.js.map +1 -0
- package/dist/__node_modules/set-cookie-parser/lib/set-cookie.cjs +161 -0
- package/dist/__node_modules/set-cookie-parser/lib/set-cookie.cjs.map +1 -0
- package/dist/__node_modules/set-cookie-parser/lib/set-cookie.js +162 -0
- package/dist/__node_modules/set-cookie-parser/lib/set-cookie.js.map +1 -0
- package/dist/__node_modules/streamsearch/lib/sbmh.cjs +393 -0
- package/dist/__node_modules/streamsearch/lib/sbmh.cjs.map +1 -0
- package/dist/__node_modules/streamsearch/lib/sbmh.js +394 -0
- package/dist/__node_modules/streamsearch/lib/sbmh.js.map +1 -0
- package/dist/__node_modules/strict-event-emitter/lib/StrictEventEmitter.cjs +98 -0
- package/dist/__node_modules/strict-event-emitter/lib/StrictEventEmitter.cjs.map +1 -0
- package/dist/__node_modules/strict-event-emitter/lib/StrictEventEmitter.js +98 -0
- package/dist/__node_modules/strict-event-emitter/lib/StrictEventEmitter.js.map +1 -0
- package/dist/__node_modules/strict-event-emitter/lib/index.cjs +34 -0
- package/dist/__node_modules/strict-event-emitter/lib/index.cjs.map +1 -0
- package/dist/__node_modules/strict-event-emitter/lib/index.js +34 -0
- package/dist/__node_modules/strict-event-emitter/lib/index.js.map +1 -0
- package/dist/__node_modules/strtok3/lib/AbstractTokenizer.cjs +98 -0
- package/dist/__node_modules/strtok3/lib/AbstractTokenizer.cjs.map +1 -0
- package/dist/__node_modules/strtok3/lib/AbstractTokenizer.js +98 -0
- package/dist/__node_modules/strtok3/lib/AbstractTokenizer.js.map +1 -0
- package/dist/__node_modules/strtok3/lib/BufferTokenizer.cjs +53 -0
- package/dist/__node_modules/strtok3/lib/BufferTokenizer.cjs.map +1 -0
- package/dist/__node_modules/strtok3/lib/BufferTokenizer.js +53 -0
- package/dist/__node_modules/strtok3/lib/BufferTokenizer.js.map +1 -0
- package/dist/__node_modules/strtok3/lib/core.cjs +9 -0
- package/dist/__node_modules/strtok3/lib/core.cjs.map +1 -0
- package/dist/__node_modules/strtok3/lib/core.js +9 -0
- package/dist/__node_modules/strtok3/lib/core.js.map +1 -0
- package/dist/__node_modules/token-types/lib/index.cjs +94 -0
- package/dist/__node_modules/token-types/lib/index.cjs.map +1 -0
- package/dist/__node_modules/token-types/lib/index.js +94 -0
- package/dist/__node_modules/token-types/lib/index.js.map +1 -0
- package/dist/__node_modules/unist-util-is/index.cjs +73 -0
- package/dist/__node_modules/unist-util-is/index.cjs.map +1 -0
- package/dist/__node_modules/unist-util-is/index.js +73 -0
- package/dist/__node_modules/unist-util-is/index.js.map +1 -0
- package/dist/__node_modules/unist-util-visit/index.cjs +32 -0
- package/dist/__node_modules/unist-util-visit/index.cjs.map +1 -0
- package/dist/__node_modules/unist-util-visit/index.js +33 -0
- package/dist/__node_modules/unist-util-visit/index.js.map +1 -0
- package/dist/__node_modules/unist-util-visit-parents/color.browser.cjs +7 -0
- package/dist/__node_modules/unist-util-visit-parents/color.browser.cjs.map +1 -0
- package/dist/__node_modules/unist-util-visit-parents/color.browser.js +7 -0
- package/dist/__node_modules/unist-util-visit-parents/color.browser.js.map +1 -0
- package/dist/__node_modules/unist-util-visit-parents/index.cjs +74 -0
- package/dist/__node_modules/unist-util-visit-parents/index.cjs.map +1 -0
- package/dist/__node_modules/unist-util-visit-parents/index.js +74 -0
- package/dist/__node_modules/unist-util-visit-parents/index.js.map +1 -0
- package/dist/__node_modules/web-encoding/src/lib.cjs +7 -0
- package/dist/__node_modules/web-encoding/src/lib.cjs.map +1 -0
- package/dist/__node_modules/web-encoding/src/lib.js +8 -0
- package/dist/__node_modules/web-encoding/src/lib.js.map +1 -0
- package/dist/__node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +3822 -0
- package/dist/__node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +1 -0
- package/dist/__node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +3822 -0
- package/dist/__node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +1 -0
- package/dist/__node_modules/yocto-queue/index.cjs +89 -0
- package/dist/__node_modules/yocto-queue/index.cjs.map +1 -0
- package/dist/__node_modules/yocto-queue/index.js +90 -0
- package/dist/__node_modules/yocto-queue/index.js.map +1 -0
- package/dist/_virtual/AsyncEventEmitter.cjs +5 -0
- package/dist/_virtual/AsyncEventEmitter.cjs.map +1 -0
- package/dist/_virtual/AsyncEventEmitter.js +5 -0
- package/dist/_virtual/AsyncEventEmitter.js.map +1 -0
- package/dist/_virtual/BatchInterceptor.cjs +5 -0
- package/dist/_virtual/BatchInterceptor.cjs.map +1 -0
- package/dist/_virtual/BatchInterceptor.js +5 -0
- package/dist/_virtual/BatchInterceptor.js.map +1 -0
- package/dist/_virtual/EventPolyfill.cjs +5 -0
- package/dist/_virtual/EventPolyfill.cjs.map +1 -0
- package/dist/_virtual/EventPolyfill.js +5 -0
- package/dist/_virtual/EventPolyfill.js.map +1 -0
- package/dist/_virtual/InteractiveIsomorphicRequest.cjs +5 -0
- package/dist/_virtual/InteractiveIsomorphicRequest.cjs.map +1 -0
- package/dist/_virtual/InteractiveIsomorphicRequest.js +5 -0
- package/dist/_virtual/InteractiveIsomorphicRequest.js.map +1 -0
- package/dist/_virtual/Interceptor.cjs +5 -0
- package/dist/_virtual/Interceptor.cjs.map +1 -0
- package/dist/_virtual/Interceptor.js +5 -0
- package/dist/_virtual/Interceptor.js.map +1 -0
- package/dist/_virtual/IsomorphicRequest.cjs +5 -0
- package/dist/_virtual/IsomorphicRequest.cjs.map +1 -0
- package/dist/_virtual/IsomorphicRequest.js +5 -0
- package/dist/_virtual/IsomorphicRequest.js.map +1 -0
- package/dist/_virtual/ProgressEventPolyfill.cjs +5 -0
- package/dist/_virtual/ProgressEventPolyfill.cjs.map +1 -0
- package/dist/_virtual/ProgressEventPolyfill.js +5 -0
- package/dist/_virtual/ProgressEventPolyfill.js.map +1 -0
- package/dist/_virtual/StrictEventEmitter.cjs +5 -0
- package/dist/_virtual/StrictEventEmitter.cjs.map +1 -0
- package/dist/_virtual/StrictEventEmitter.js +5 -0
- package/dist/_virtual/StrictEventEmitter.js.map +1 -0
- package/dist/_virtual/XMLHttpRequestOverride.cjs +5 -0
- package/dist/_virtual/XMLHttpRequestOverride.cjs.map +1 -0
- package/dist/_virtual/XMLHttpRequestOverride.js +5 -0
- package/dist/_virtual/XMLHttpRequestOverride.js.map +1 -0
- package/dist/_virtual/_commonjsHelpers.cjs +35 -0
- package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/_virtual/_commonjsHelpers.js +35 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/browser.cjs +13 -0
- package/dist/_virtual/browser.cjs.map +1 -0
- package/dist/_virtual/browser.js +14 -0
- package/dist/_virtual/browser.js.map +1 -0
- package/dist/_virtual/browser2.cjs +13 -0
- package/dist/_virtual/browser2.cjs.map +1 -0
- package/dist/_virtual/browser2.js +14 -0
- package/dist/_virtual/browser2.js.map +1 -0
- package/dist/_virtual/bufferFrom.cjs +5 -0
- package/dist/_virtual/bufferFrom.cjs.map +1 -0
- package/dist/_virtual/bufferFrom.js +5 -0
- package/dist/_virtual/bufferFrom.js.map +1 -0
- package/dist/_virtual/bufferUtils.cjs +5 -0
- package/dist/_virtual/bufferUtils.cjs.map +1 -0
- package/dist/_virtual/bufferUtils.js +5 -0
- package/dist/_virtual/bufferUtils.js.map +1 -0
- package/dist/_virtual/conventions.cjs +5 -0
- package/dist/_virtual/conventions.cjs.map +1 -0
- package/dist/_virtual/conventions.js +5 -0
- package/dist/_virtual/conventions.js.map +1 -0
- package/dist/_virtual/createEvent.cjs +5 -0
- package/dist/_virtual/createEvent.cjs.map +1 -0
- package/dist/_virtual/createEvent.js +5 -0
- package/dist/_virtual/createEvent.js.map +1 -0
- package/dist/_virtual/createLazyCallback.cjs +5 -0
- package/dist/_virtual/createLazyCallback.cjs.map +1 -0
- package/dist/_virtual/createLazyCallback.js +5 -0
- package/dist/_virtual/createLazyCallback.js.map +1 -0
- package/dist/_virtual/dom-parser.cjs +5 -0
- package/dist/_virtual/dom-parser.cjs.map +1 -0
- package/dist/_virtual/dom-parser.js +5 -0
- package/dist/_virtual/dom-parser.js.map +1 -0
- package/dist/_virtual/dom.cjs +5 -0
- package/dist/_virtual/dom.cjs.map +1 -0
- package/dist/_virtual/dom.js +5 -0
- package/dist/_virtual/dom.js.map +1 -0
- package/dist/_virtual/entities.cjs +5 -0
- package/dist/_virtual/entities.cjs.map +1 -0
- package/dist/_virtual/entities.js +5 -0
- package/dist/_virtual/entities.js.map +1 -0
- package/dist/_virtual/format.cjs +5 -0
- package/dist/_virtual/format.cjs.map +1 -0
- package/dist/_virtual/format.js +5 -0
- package/dist/_virtual/format.js.map +1 -0
- package/dist/_virtual/getCleanUrl.cjs +5 -0
- package/dist/_virtual/getCleanUrl.cjs.map +1 -0
- package/dist/_virtual/getCleanUrl.js +5 -0
- package/dist/_virtual/getCleanUrl.js.map +1 -0
- package/dist/_virtual/glossary.cjs +5 -0
- package/dist/_virtual/glossary.cjs.map +1 -0
- package/dist/_virtual/glossary.js +5 -0
- package/dist/_virtual/glossary.js.map +1 -0
- package/dist/_virtual/index.cjs +6 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +7 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index10.cjs +5 -0
- package/dist/_virtual/index10.cjs.map +1 -0
- package/dist/_virtual/index10.js +5 -0
- package/dist/_virtual/index10.js.map +1 -0
- package/dist/_virtual/index11.cjs +5 -0
- package/dist/_virtual/index11.cjs.map +1 -0
- package/dist/_virtual/index11.js +5 -0
- package/dist/_virtual/index11.js.map +1 -0
- package/dist/_virtual/index2.cjs +6 -0
- package/dist/_virtual/index2.cjs.map +1 -0
- package/dist/_virtual/index2.js +7 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.cjs +13 -0
- package/dist/_virtual/index3.cjs.map +1 -0
- package/dist/_virtual/index3.js +14 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.cjs +5 -0
- package/dist/_virtual/index4.cjs.map +1 -0
- package/dist/_virtual/index4.js +5 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/index5.cjs +5 -0
- package/dist/_virtual/index5.cjs.map +1 -0
- package/dist/_virtual/index5.js +5 -0
- package/dist/_virtual/index5.js.map +1 -0
- package/dist/_virtual/index6.cjs +5 -0
- package/dist/_virtual/index6.cjs.map +1 -0
- package/dist/_virtual/index6.js +5 -0
- package/dist/_virtual/index6.js.map +1 -0
- package/dist/_virtual/index7.cjs +5 -0
- package/dist/_virtual/index7.cjs.map +1 -0
- package/dist/_virtual/index7.js +5 -0
- package/dist/_virtual/index7.js.map +1 -0
- package/dist/_virtual/index8.cjs +5 -0
- package/dist/_virtual/index8.cjs.map +1 -0
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index8.js.map +1 -0
- package/dist/_virtual/index9.cjs +5 -0
- package/dist/_virtual/index9.cjs.map +1 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/index9.js.map +1 -0
- package/dist/_virtual/invariant.cjs +5 -0
- package/dist/_virtual/invariant.cjs.map +1 -0
- package/dist/_virtual/invariant.js +5 -0
- package/dist/_virtual/invariant.js.map +1 -0
- package/dist/_virtual/lib.cjs +5 -0
- package/dist/_virtual/lib.cjs.map +1 -0
- package/dist/_virtual/lib.js +5 -0
- package/dist/_virtual/lib.js.map +1 -0
- package/dist/_virtual/nextTick.cjs +5 -0
- package/dist/_virtual/nextTick.cjs.map +1 -0
- package/dist/_virtual/nextTick.js +5 -0
- package/dist/_virtual/nextTick.js.map +1 -0
- package/dist/_virtual/parseJson.cjs +5 -0
- package/dist/_virtual/parseJson.cjs.map +1 -0
- package/dist/_virtual/parseJson.js +5 -0
- package/dist/_virtual/parseJson.js.map +1 -0
- package/dist/_virtual/ponyfill.es2018.cjs +13 -0
- package/dist/_virtual/ponyfill.es2018.cjs.map +1 -0
- package/dist/_virtual/ponyfill.es2018.js +14 -0
- package/dist/_virtual/ponyfill.es2018.js.map +1 -0
- package/dist/_virtual/sax.cjs +5 -0
- package/dist/_virtual/sax.cjs.map +1 -0
- package/dist/_virtual/sax.js +5 -0
- package/dist/_virtual/sax.js.map +1 -0
- package/dist/_virtual/set-cookie.cjs +13 -0
- package/dist/_virtual/set-cookie.cjs.map +1 -0
- package/dist/_virtual/set-cookie.js +14 -0
- package/dist/_virtual/set-cookie.js.map +1 -0
- package/dist/_virtual/store.cjs +5 -0
- package/dist/_virtual/store.cjs.map +1 -0
- package/dist/_virtual/store.js +5 -0
- package/dist/_virtual/store.js.map +1 -0
- package/dist/_virtual/toIsoResponse.cjs +5 -0
- package/dist/_virtual/toIsoResponse.cjs.map +1 -0
- package/dist/_virtual/toIsoResponse.js +5 -0
- package/dist/_virtual/toIsoResponse.js.map +1 -0
- package/dist/_virtual/until.cjs +5 -0
- package/dist/_virtual/until.cjs.map +1 -0
- package/dist/_virtual/until.js +5 -0
- package/dist/_virtual/until.js.map +1 -0
- package/dist/_virtual/uuid.cjs +5 -0
- package/dist/_virtual/uuid.cjs.map +1 -0
- package/dist/_virtual/uuid.js +5 -0
- package/dist/_virtual/uuid.js.map +1 -0
- package/dist/auth/PrismicAuthManager.cjs +280 -0
- package/dist/auth/PrismicAuthManager.cjs.map +1 -0
- package/dist/auth/PrismicAuthManager.d.ts +58 -0
- package/dist/auth/PrismicAuthManager.js +258 -0
- package/dist/auth/PrismicAuthManager.js.map +1 -0
- package/dist/auth/createPrismicAuthManager.cjs +8 -0
- package/dist/auth/createPrismicAuthManager.cjs.map +1 -0
- package/dist/auth/createPrismicAuthManager.d.ts +4 -0
- package/dist/auth/createPrismicAuthManager.js +8 -0
- package/dist/auth/createPrismicAuthManager.js.map +1 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.cjs +50 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.cjs.map +1 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.d.ts +14 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.js +33 -0
- package/dist/auth/createPrismicAuthManagerMiddleware.js.map +1 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client.cjs +20 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.js +20 -0
- package/dist/client.js.map +1 -0
- package/dist/constants/API_ENDPOINTS.cjs +45 -0
- package/dist/constants/API_ENDPOINTS.cjs.map +1 -0
- package/dist/constants/API_ENDPOINTS.d.ts +9 -0
- package/dist/constants/API_ENDPOINTS.js +45 -0
- package/dist/constants/API_ENDPOINTS.js.map +1 -0
- package/dist/constants/API_TOKENS.cjs +17 -0
- package/dist/constants/API_TOKENS.cjs.map +1 -0
- package/dist/constants/API_TOKENS.d.ts +5 -0
- package/dist/constants/API_TOKENS.js +17 -0
- package/dist/constants/API_TOKENS.js.map +1 -0
- package/dist/constants/APPLICATION_MODE.cjs +9 -0
- package/dist/constants/APPLICATION_MODE.cjs.map +1 -0
- package/dist/constants/APPLICATION_MODE.d.ts +5 -0
- package/dist/constants/APPLICATION_MODE.js +9 -0
- package/dist/constants/APPLICATION_MODE.js.map +1 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.cjs +5 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.cjs.map +1 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.d.ts +5 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.js +5 -0
- package/dist/constants/DEFAULT_SLICE_SCREENSHOT_URL.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.js +5 -0
- package/dist/constants/SLICE_MACHINE_CONFIG_FILENAME.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.js +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.js +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.js +5 -0
- package/dist/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.js +5 -0
- package/dist/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.js.map +1 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.cjs +5 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.cjs.map +1 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.d.ts +1 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.js +5 -0
- package/dist/constants/SLICE_MACHINE_USER_AGENT.js.map +1 -0
- package/dist/constants/TS_CONFIG_FILENAME.cjs +5 -0
- package/dist/constants/TS_CONFIG_FILENAME.cjs.map +1 -0
- package/dist/constants/TS_CONFIG_FILENAME.d.ts +1 -0
- package/dist/constants/TS_CONFIG_FILENAME.js +5 -0
- package/dist/constants/TS_CONFIG_FILENAME.js.map +1 -0
- package/dist/constants/VERSION_KIND.cjs +10 -0
- package/dist/constants/VERSION_KIND.cjs.map +1 -0
- package/dist/constants/VERSION_KIND.d.ts +6 -0
- package/dist/constants/VERSION_KIND.js +10 -0
- package/dist/constants/VERSION_KIND.js.map +1 -0
- package/dist/errors.cjs +77 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.ts +34 -0
- package/dist/errors.js +77 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.cjs +17 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/DecodeError.cjs +22 -0
- package/dist/lib/DecodeError.cjs.map +1 -0
- package/dist/lib/DecodeError.d.ts +12 -0
- package/dist/lib/DecodeError.js +22 -0
- package/dist/lib/DecodeError.js.map +1 -0
- package/dist/lib/assertPluginsInitialized.cjs +9 -0
- package/dist/lib/assertPluginsInitialized.cjs.map +1 -0
- package/dist/lib/assertPluginsInitialized.d.ts +2 -0
- package/dist/lib/assertPluginsInitialized.js +9 -0
- package/dist/lib/assertPluginsInitialized.js.map +1 -0
- package/dist/lib/bufferCodec.cjs +24 -0
- package/dist/lib/bufferCodec.cjs.map +1 -0
- package/dist/lib/bufferCodec.d.ts +3 -0
- package/dist/lib/bufferCodec.js +7 -0
- package/dist/lib/bufferCodec.js.map +1 -0
- package/dist/lib/castArray.cjs +7 -0
- package/dist/lib/castArray.cjs.map +1 -0
- package/dist/lib/castArray.d.ts +1 -0
- package/dist/lib/castArray.js +7 -0
- package/dist/lib/castArray.js.map +1 -0
- package/dist/lib/checkIsURLAccessible.cjs +9 -0
- package/dist/lib/checkIsURLAccessible.cjs.map +1 -0
- package/dist/lib/checkIsURLAccessible.d.ts +1 -0
- package/dist/lib/checkIsURLAccessible.js +9 -0
- package/dist/lib/checkIsURLAccessible.js.map +1 -0
- package/dist/lib/createContentDigest.cjs +25 -0
- package/dist/lib/createContentDigest.cjs.map +1 -0
- package/dist/lib/createContentDigest.d.ts +9 -0
- package/dist/lib/createContentDigest.js +8 -0
- package/dist/lib/createContentDigest.js.map +1 -0
- package/dist/lib/decode.cjs +18 -0
- package/dist/lib/decode.cjs.map +1 -0
- package/dist/lib/decode.d.ts +10 -0
- package/dist/lib/decode.js +18 -0
- package/dist/lib/decode.js.map +1 -0
- package/dist/lib/decodeHookResult.cjs +21 -0
- package/dist/lib/decodeHookResult.cjs.map +1 -0
- package/dist/lib/decodeHookResult.d.ts +10 -0
- package/dist/lib/decodeHookResult.js +21 -0
- package/dist/lib/decodeHookResult.js.map +1 -0
- package/dist/lib/decodeSliceMachineConfig.cjs +50 -0
- package/dist/lib/decodeSliceMachineConfig.cjs.map +1 -0
- package/dist/lib/decodeSliceMachineConfig.d.ts +3 -0
- package/dist/lib/decodeSliceMachineConfig.js +33 -0
- package/dist/lib/decodeSliceMachineConfig.js.map +1 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.cjs +102 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.cjs.map +1 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.d.ts +21 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.js +85 -0
- package/dist/lib/fetchGitHubReleaseBodyForRelease.js.map +1 -0
- package/dist/lib/fetchNPMPackageVersions.cjs +41 -0
- package/dist/lib/fetchNPMPackageVersions.cjs.map +1 -0
- package/dist/lib/fetchNPMPackageVersions.d.ts +5 -0
- package/dist/lib/fetchNPMPackageVersions.js +24 -0
- package/dist/lib/fetchNPMPackageVersions.js.map +1 -0
- package/dist/lib/format.cjs +33 -0
- package/dist/lib/format.cjs.map +1 -0
- package/dist/lib/format.d.ts +12 -0
- package/dist/lib/format.js +33 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/functionCodec.cjs +29 -0
- package/dist/lib/functionCodec.cjs.map +1 -0
- package/dist/lib/functionCodec.d.ts +2 -0
- package/dist/lib/functionCodec.js +12 -0
- package/dist/lib/functionCodec.js.map +1 -0
- package/dist/lib/locateFileUpward.cjs +50 -0
- package/dist/lib/locateFileUpward.cjs.map +1 -0
- package/dist/lib/locateFileUpward.d.ts +10 -0
- package/dist/lib/locateFileUpward.js +32 -0
- package/dist/lib/locateFileUpward.js.map +1 -0
- package/dist/lib/markdownToHTML.cjs +90 -0
- package/dist/lib/markdownToHTML.cjs.map +1 -0
- package/dist/lib/markdownToHTML.d.ts +1 -0
- package/dist/lib/markdownToHTML.js +68 -0
- package/dist/lib/markdownToHTML.js.map +1 -0
- package/dist/lib/prismicrc.cjs +48 -0
- package/dist/lib/prismicrc.cjs.map +1 -0
- package/dist/lib/prismicrc.d.ts +10 -0
- package/dist/lib/prismicrc.js +29 -0
- package/dist/lib/prismicrc.js.map +1 -0
- package/dist/lib/serializeCookies.cjs +29 -0
- package/dist/lib/serializeCookies.cjs.map +1 -0
- package/dist/lib/serializeCookies.d.ts +6 -0
- package/dist/lib/serializeCookies.js +29 -0
- package/dist/lib/serializeCookies.js.map +1 -0
- package/dist/managers/BaseManager.cjs +63 -0
- package/dist/managers/BaseManager.cjs.map +1 -0
- package/dist/managers/BaseManager.d.ts +33 -0
- package/dist/managers/BaseManager.js +63 -0
- package/dist/managers/BaseManager.js.map +1 -0
- package/dist/managers/SliceMachineManager.cjs +217 -0
- package/dist/managers/SliceMachineManager.cjs.map +1 -0
- package/dist/managers/SliceMachineManager.d.ts +93 -0
- package/dist/managers/SliceMachineManager.js +217 -0
- package/dist/managers/SliceMachineManager.js.map +1 -0
- package/dist/managers/createSliceMachineManager.cjs +8 -0
- package/dist/managers/createSliceMachineManager.cjs.map +1 -0
- package/dist/managers/createSliceMachineManager.d.ts +4 -0
- package/dist/managers/createSliceMachineManager.js +8 -0
- package/dist/managers/createSliceMachineManager.js.map +1 -0
- package/dist/managers/createSliceMachineManagerClient.cjs +11 -0
- package/dist/managers/createSliceMachineManagerClient.cjs.map +1 -0
- package/dist/managers/createSliceMachineManagerClient.d.ts +8 -0
- package/dist/managers/createSliceMachineManagerClient.js +11 -0
- package/dist/managers/createSliceMachineManagerClient.js.map +1 -0
- package/dist/managers/createSliceMachineManagerMiddleware.cjs +47 -0
- package/dist/managers/createSliceMachineManagerMiddleware.cjs.map +1 -0
- package/dist/managers/createSliceMachineManagerMiddleware.d.ts +14 -0
- package/dist/managers/createSliceMachineManagerMiddleware.js +47 -0
- package/dist/managers/createSliceMachineManagerMiddleware.js.map +1 -0
- package/dist/managers/customTypes/CustomTypesManager.cjs +177 -0
- package/dist/managers/customTypes/CustomTypesManager.cjs.map +1 -0
- package/dist/managers/customTypes/CustomTypesManager.d.ts +50 -0
- package/dist/managers/customTypes/CustomTypesManager.js +159 -0
- package/dist/managers/customTypes/CustomTypesManager.js.map +1 -0
- package/dist/managers/plugins/PluginsManager.cjs +36 -0
- package/dist/managers/plugins/PluginsManager.cjs.map +1 -0
- package/dist/managers/plugins/PluginsManager.d.ts +13 -0
- package/dist/managers/plugins/PluginsManager.js +36 -0
- package/dist/managers/plugins/PluginsManager.js.map +1 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.cjs +199 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.cjs.map +1 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.d.ts +28 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.js +182 -0
- package/dist/managers/prismicRepository/PrismicRepositoryManager.js.map +1 -0
- package/dist/managers/prismicRepository/types.cjs +45 -0
- package/dist/managers/prismicRepository/types.cjs.map +1 -0
- package/dist/managers/prismicRepository/types.d.ts +38 -0
- package/dist/managers/prismicRepository/types.js +28 -0
- package/dist/managers/prismicRepository/types.js.map +1 -0
- package/dist/managers/project/ProjectManager.cjs +120 -0
- package/dist/managers/project/ProjectManager.cjs.map +1 -0
- package/dist/managers/project/ProjectManager.d.ts +30 -0
- package/dist/managers/project/ProjectManager.js +102 -0
- package/dist/managers/project/ProjectManager.js.map +1 -0
- package/dist/managers/screenshots/ScreenshotsManager.cjs +206 -0
- package/dist/managers/screenshots/ScreenshotsManager.cjs.map +1 -0
- package/dist/managers/screenshots/ScreenshotsManager.d.ts +31 -0
- package/dist/managers/screenshots/ScreenshotsManager.js +168 -0
- package/dist/managers/screenshots/ScreenshotsManager.js.map +1 -0
- package/dist/managers/simulator/SimulatorManager.cjs +100 -0
- package/dist/managers/simulator/SimulatorManager.cjs.map +1 -0
- package/dist/managers/simulator/SimulatorManager.d.ts +37 -0
- package/dist/managers/simulator/SimulatorManager.js +83 -0
- package/dist/managers/simulator/SimulatorManager.js.map +1 -0
- package/dist/managers/slices/SlicesManager.cjs +341 -0
- package/dist/managers/slices/SlicesManager.cjs.map +1 -0
- package/dist/managers/slices/SlicesManager.d.ts +111 -0
- package/dist/managers/slices/SlicesManager.js +323 -0
- package/dist/managers/slices/SlicesManager.js.map +1 -0
- package/dist/managers/snippets/SnippetsManager.cjs +41 -0
- package/dist/managers/snippets/SnippetsManager.cjs.map +1 -0
- package/dist/managers/snippets/SnippetsManager.d.ts +11 -0
- package/dist/managers/snippets/SnippetsManager.js +24 -0
- package/dist/managers/snippets/SnippetsManager.js.map +1 -0
- package/dist/managers/telemetry/TelemetryManager.cjs +105 -0
- package/dist/managers/telemetry/TelemetryManager.cjs.map +1 -0
- package/dist/managers/telemetry/TelemetryManager.d.ts +17 -0
- package/dist/managers/telemetry/TelemetryManager.js +105 -0
- package/dist/managers/telemetry/TelemetryManager.js.map +1 -0
- package/dist/managers/telemetry/types.cjs +15 -0
- package/dist/managers/telemetry/types.cjs.map +1 -0
- package/dist/managers/telemetry/types.d.ts +28 -0
- package/dist/managers/telemetry/types.js +15 -0
- package/dist/managers/telemetry/types.js.map +1 -0
- package/dist/managers/user/UserManager.cjs +25 -0
- package/dist/managers/user/UserManager.cjs.map +1 -0
- package/dist/managers/user/UserManager.d.ts +38 -0
- package/dist/managers/user/UserManager.js +25 -0
- package/dist/managers/user/UserManager.js.map +1 -0
- package/dist/managers/versions/VersionsManager.cjs +104 -0
- package/dist/managers/versions/VersionsManager.cjs.map +1 -0
- package/dist/managers/versions/VersionsManager.d.ts +19 -0
- package/dist/managers/versions/VersionsManager.js +86 -0
- package/dist/managers/versions/VersionsManager.js.map +1 -0
- package/dist/managers/versions/types.d.ts +5 -0
- package/dist/test/createSliceMachineManagerMSWHandler.cjs +27 -0
- package/dist/test/createSliceMachineManagerMSWHandler.cjs.map +1 -0
- package/dist/test/createSliceMachineManagerMSWHandler.d.ts +7 -0
- package/dist/test/createSliceMachineManagerMSWHandler.js +27 -0
- package/dist/test/createSliceMachineManagerMSWHandler.js.map +1 -0
- package/dist/test/index.d.ts +1 -0
- package/dist/test.cjs +5 -0
- package/dist/test.cjs.map +1 -0
- package/dist/test.js +5 -0
- package/dist/test.js.map +1 -0
- package/dist/types.d.ts +45 -0
- package/package.json +128 -0
- package/src/auth/PrismicAuthManager.ts +403 -0
- package/src/auth/createPrismicAuthManager.ts +11 -0
- package/src/auth/createPrismicAuthManagerMiddleware.ts +70 -0
- package/src/client/index.ts +32 -0
- package/src/constants/API_ENDPOINTS.ts +62 -0
- package/src/constants/API_TOKENS.ts +18 -0
- package/src/constants/APPLICATION_MODE.ts +5 -0
- package/src/constants/DEFAULT_SLICE_SCREENSHOT_URL.ts +6 -0
- package/src/constants/SLICE_MACHINE_CONFIG_FILENAME.ts +1 -0
- package/src/constants/SLICE_MACHINE_GITHUB_PACKAGE_NAME.ts +1 -0
- package/src/constants/SLICE_MACHINE_GITHUB_REPOSITORY_NAME.ts +1 -0
- package/src/constants/SLICE_MACHINE_GITHUB_REPOSITORY_ORGANIZATION.ts +1 -0
- package/src/constants/SLICE_MACHINE_NPM_PACKAGE_NAME.ts +1 -0
- package/src/constants/SLICE_MACHINE_USER_AGENT.ts +1 -0
- package/src/constants/TS_CONFIG_FILENAME.ts +1 -0
- package/src/constants/VERSION_KIND.ts +6 -0
- package/src/errors.ts +146 -0
- package/src/index.ts +27 -0
- package/src/lib/DecodeError.ts +22 -0
- package/src/lib/assertPluginsInitialized.ts +11 -0
- package/src/lib/bufferCodec.ts +10 -0
- package/src/lib/castArray.ts +3 -0
- package/src/lib/checkIsURLAccessible.ts +7 -0
- package/src/lib/createContentDigest.ts +12 -0
- package/src/lib/decode.ts +36 -0
- package/src/lib/decodeHookResult.ts +36 -0
- package/src/lib/decodeSliceMachineConfig.ts +43 -0
- package/src/lib/fetchGitHubReleaseBodyForRelease.ts +143 -0
- package/src/lib/fetchNPMPackageVersions.ts +46 -0
- package/src/lib/format.ts +34 -0
- package/src/lib/functionCodec.ts +16 -0
- package/src/lib/locateFileUpward.ts +58 -0
- package/src/lib/markdownToHTML.ts +113 -0
- package/src/lib/prismicrc.ts +64 -0
- package/src/lib/serializeCookies.ts +45 -0
- package/src/managers/BaseManager.ts +92 -0
- package/src/managers/SliceMachineManager.ts +362 -0
- package/src/managers/createSliceMachineManager.ts +11 -0
- package/src/managers/createSliceMachineManagerClient.ts +23 -0
- package/src/managers/createSliceMachineManagerMiddleware.ts +75 -0
- package/src/managers/customTypes/CustomTypesManager.ts +303 -0
- package/src/managers/plugins/PluginsManager.ts +48 -0
- package/src/managers/prismicRepository/PrismicRepositoryManager.ts +266 -0
- package/src/managers/prismicRepository/types.ts +30 -0
- package/src/managers/project/ProjectManager.ts +165 -0
- package/src/managers/screenshots/ScreenshotsManager.ts +242 -0
- package/src/managers/simulator/SimulatorManager.ts +151 -0
- package/src/managers/slices/SlicesManager.ts +604 -0
- package/src/managers/snippets/SnippetsManager.ts +45 -0
- package/src/managers/telemetry/TelemetryManager.ts +142 -0
- package/src/managers/telemetry/types.ts +46 -0
- package/src/managers/user/UserManager.ts +27 -0
- package/src/managers/versions/VersionsManager.ts +121 -0
- package/src/managers/versions/types.ts +6 -0
- package/src/test/createSliceMachineManagerMSWHandler.ts +41 -0
- package/src/test/index.ts +4 -0
- package/src/types.ts +59 -0
|
@@ -0,0 +1,1938 @@
|
|
|
1
|
+
import lib$3 from "../../headers-polyfill/lib/index.js";
|
|
2
|
+
import cookie$1 from "cookie";
|
|
3
|
+
import "../../is-node-process/lib/index.js";
|
|
4
|
+
import { __require as requireBrowser } from './../__node_modules/node-fetch/browser.js';
|
|
5
|
+
import "../../outvariant/lib/index.js";
|
|
6
|
+
import "../../@open-draft/until/lib/index.js";
|
|
7
|
+
import "../../@mswjs/interceptors/lib/index.js";
|
|
8
|
+
import "../../@mswjs/cookies/lib/index.js";
|
|
9
|
+
import "../../@mswjs/interceptors/lib/utils/bufferUtils.js";
|
|
10
|
+
import { __require as requireJsLevenshtein } from "../../js-levenshtein/index.js";
|
|
11
|
+
import require$$10 from "../../../_virtual/index.js";
|
|
12
|
+
import require$$11 from "../../../_virtual/index2.js";
|
|
13
|
+
import "../../@mswjs/interceptors/lib/utils/getCleanUrl.js";
|
|
14
|
+
import { __require as requireFetch } from "../../@mswjs/interceptors/lib/interceptors/fetch/index.js";
|
|
15
|
+
import { __require as requireXMLHttpRequest } from "../../@mswjs/interceptors/lib/interceptors/XMLHttpRequest/index.js";
|
|
16
|
+
import { __require as requireLib } from "../../strict-event-emitter/lib/index.js";
|
|
17
|
+
import { exports as libExports } from "../../../_virtual/index3.js";
|
|
18
|
+
import { __exports as lib$1 } from "../../../_virtual/index4.js";
|
|
19
|
+
import { __exports as lib$2 } from "../../../_virtual/index5.js";
|
|
20
|
+
import { __exports as bufferUtils } from "../../../_virtual/bufferUtils.js";
|
|
21
|
+
import { __exports as lib$4 } from "../../../_virtual/index6.js";
|
|
22
|
+
import { __exports as getCleanUrl } from "../../../_virtual/getCleanUrl.js";
|
|
23
|
+
import { __exports as lib$5 } from "../../../_virtual/index7.js";
|
|
24
|
+
var __create = Object.create;
|
|
25
|
+
var __defProp = Object.defineProperty;
|
|
26
|
+
var __defProps = Object.defineProperties;
|
|
27
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
28
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
29
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
30
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
31
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
32
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
33
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
34
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
35
|
+
var __spreadValues = (a, b) => {
|
|
36
|
+
for (var prop in b || (b = {}))
|
|
37
|
+
if (__hasOwnProp.call(b, prop))
|
|
38
|
+
__defNormalProp(a, prop, b[prop]);
|
|
39
|
+
if (__getOwnPropSymbols)
|
|
40
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
41
|
+
if (__propIsEnum.call(b, prop))
|
|
42
|
+
__defNormalProp(a, prop, b[prop]);
|
|
43
|
+
}
|
|
44
|
+
return a;
|
|
45
|
+
};
|
|
46
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
47
|
+
var __objRest = (source, exclude) => {
|
|
48
|
+
var target = {};
|
|
49
|
+
for (var prop in source)
|
|
50
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
51
|
+
target[prop] = source[prop];
|
|
52
|
+
if (source != null && __getOwnPropSymbols)
|
|
53
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
54
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
55
|
+
target[prop] = source[prop];
|
|
56
|
+
}
|
|
57
|
+
return target;
|
|
58
|
+
};
|
|
59
|
+
var __export = (target, all) => {
|
|
60
|
+
for (var name in all)
|
|
61
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
62
|
+
};
|
|
63
|
+
var __copyProps = (to, from, except, desc) => {
|
|
64
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
65
|
+
for (let key of __getOwnPropNames(from))
|
|
66
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
67
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
68
|
+
}
|
|
69
|
+
return to;
|
|
70
|
+
};
|
|
71
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
72
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
73
|
+
var src_exports = {};
|
|
74
|
+
__export(src_exports, {
|
|
75
|
+
GraphQLHandler: () => GraphQLHandler,
|
|
76
|
+
MockedRequest: () => MockedRequest,
|
|
77
|
+
RESTMethods: () => RESTMethods,
|
|
78
|
+
RequestHandler: () => RequestHandler,
|
|
79
|
+
RestHandler: () => RestHandler,
|
|
80
|
+
SetupApi: () => SetupApi,
|
|
81
|
+
cleanUrl: () => cleanUrl,
|
|
82
|
+
compose: () => compose,
|
|
83
|
+
context: () => context_exports,
|
|
84
|
+
createResponseComposition: () => createResponseComposition,
|
|
85
|
+
defaultContext: () => defaultContext,
|
|
86
|
+
defaultResponse: () => defaultResponse,
|
|
87
|
+
graphql: () => graphql,
|
|
88
|
+
graphqlContext: () => graphqlContext,
|
|
89
|
+
handleRequest: () => handleRequest,
|
|
90
|
+
matchRequestUrl: () => matchRequestUrl,
|
|
91
|
+
response: () => response,
|
|
92
|
+
rest: () => rest,
|
|
93
|
+
restContext: () => restContext,
|
|
94
|
+
setupWorker: () => setupWorker
|
|
95
|
+
});
|
|
96
|
+
var lib = __toCommonJS(src_exports);
|
|
97
|
+
var context_exports = {};
|
|
98
|
+
__export(context_exports, {
|
|
99
|
+
body: () => body,
|
|
100
|
+
cookie: () => cookie,
|
|
101
|
+
data: () => data,
|
|
102
|
+
delay: () => delay,
|
|
103
|
+
errors: () => errors,
|
|
104
|
+
extensions: () => extensions,
|
|
105
|
+
fetch: () => fetch,
|
|
106
|
+
json: () => json,
|
|
107
|
+
set: () => set,
|
|
108
|
+
status: () => status,
|
|
109
|
+
text: () => text,
|
|
110
|
+
xml: () => xml
|
|
111
|
+
});
|
|
112
|
+
var _00 = "Continue";
|
|
113
|
+
var _01 = "Switching Protocols";
|
|
114
|
+
var _02 = "Processing";
|
|
115
|
+
var _03 = "Early Hints";
|
|
116
|
+
var _002 = "OK";
|
|
117
|
+
var _012 = "Created";
|
|
118
|
+
var _022 = "Accepted";
|
|
119
|
+
var _032 = "Non-Authoritative Information";
|
|
120
|
+
var _04 = "No Content";
|
|
121
|
+
var _05 = "Reset Content";
|
|
122
|
+
var _06 = "Partial Content";
|
|
123
|
+
var _07 = "Multi-Status";
|
|
124
|
+
var _08 = "Already Reported";
|
|
125
|
+
var _26 = "IM Used";
|
|
126
|
+
var _003 = "Multiple Choices";
|
|
127
|
+
var _013 = "Moved Permanently";
|
|
128
|
+
var _023 = "Found";
|
|
129
|
+
var _033 = "See Other";
|
|
130
|
+
var _042 = "Not Modified";
|
|
131
|
+
var _052 = "Use Proxy";
|
|
132
|
+
var _072 = "Temporary Redirect";
|
|
133
|
+
var _082 = "Permanent Redirect";
|
|
134
|
+
var _004 = "Bad Request";
|
|
135
|
+
var _014 = "Unauthorized";
|
|
136
|
+
var _024 = "Payment Required";
|
|
137
|
+
var _034 = "Forbidden";
|
|
138
|
+
var _043 = "Not Found";
|
|
139
|
+
var _053 = "Method Not Allowed";
|
|
140
|
+
var _062 = "Not Acceptable";
|
|
141
|
+
var _073 = "Proxy Authentication Required";
|
|
142
|
+
var _083 = "Request Timeout";
|
|
143
|
+
var _09 = "Conflict";
|
|
144
|
+
var _10 = "Gone";
|
|
145
|
+
var _11 = "Length Required";
|
|
146
|
+
var _12 = "Precondition Failed";
|
|
147
|
+
var _13 = "Payload Too Large";
|
|
148
|
+
var _14 = "URI Too Long";
|
|
149
|
+
var _15 = "Unsupported Media Type";
|
|
150
|
+
var _16 = "Range Not Satisfiable";
|
|
151
|
+
var _17 = "Expectation Failed";
|
|
152
|
+
var _18 = "I'm a Teapot";
|
|
153
|
+
var _21 = "Misdirected Request";
|
|
154
|
+
var _22 = "Unprocessable Entity";
|
|
155
|
+
var _23 = "Locked";
|
|
156
|
+
var _24 = "Failed Dependency";
|
|
157
|
+
var _25 = "Too Early";
|
|
158
|
+
var _262 = "Upgrade Required";
|
|
159
|
+
var _28 = "Precondition Required";
|
|
160
|
+
var _29 = "Too Many Requests";
|
|
161
|
+
var _31 = "Request Header Fields Too Large";
|
|
162
|
+
var _51 = "Unavailable For Legal Reasons";
|
|
163
|
+
var _005 = "Internal Server Error";
|
|
164
|
+
var _015 = "Not Implemented";
|
|
165
|
+
var _025 = "Bad Gateway";
|
|
166
|
+
var _035 = "Service Unavailable";
|
|
167
|
+
var _044 = "Gateway Timeout";
|
|
168
|
+
var _054 = "HTTP Version Not Supported";
|
|
169
|
+
var _063 = "Variant Also Negotiates";
|
|
170
|
+
var _074 = "Insufficient Storage";
|
|
171
|
+
var _084 = "Loop Detected";
|
|
172
|
+
var _092 = "Bandwidth Limit Exceeded";
|
|
173
|
+
var _102 = "Not Extended";
|
|
174
|
+
var _112 = "Network Authentication Required";
|
|
175
|
+
var codes_default = {
|
|
176
|
+
"100": _00,
|
|
177
|
+
"101": _01,
|
|
178
|
+
"102": _02,
|
|
179
|
+
"103": _03,
|
|
180
|
+
"200": _002,
|
|
181
|
+
"201": _012,
|
|
182
|
+
"202": _022,
|
|
183
|
+
"203": _032,
|
|
184
|
+
"204": _04,
|
|
185
|
+
"205": _05,
|
|
186
|
+
"206": _06,
|
|
187
|
+
"207": _07,
|
|
188
|
+
"208": _08,
|
|
189
|
+
"226": _26,
|
|
190
|
+
"300": _003,
|
|
191
|
+
"301": _013,
|
|
192
|
+
"302": _023,
|
|
193
|
+
"303": _033,
|
|
194
|
+
"304": _042,
|
|
195
|
+
"305": _052,
|
|
196
|
+
"307": _072,
|
|
197
|
+
"308": _082,
|
|
198
|
+
"400": _004,
|
|
199
|
+
"401": _014,
|
|
200
|
+
"402": _024,
|
|
201
|
+
"403": _034,
|
|
202
|
+
"404": _043,
|
|
203
|
+
"405": _053,
|
|
204
|
+
"406": _062,
|
|
205
|
+
"407": _073,
|
|
206
|
+
"408": _083,
|
|
207
|
+
"409": _09,
|
|
208
|
+
"410": _10,
|
|
209
|
+
"411": _11,
|
|
210
|
+
"412": _12,
|
|
211
|
+
"413": _13,
|
|
212
|
+
"414": _14,
|
|
213
|
+
"415": _15,
|
|
214
|
+
"416": _16,
|
|
215
|
+
"417": _17,
|
|
216
|
+
"418": _18,
|
|
217
|
+
"421": _21,
|
|
218
|
+
"422": _22,
|
|
219
|
+
"423": _23,
|
|
220
|
+
"424": _24,
|
|
221
|
+
"425": _25,
|
|
222
|
+
"426": _262,
|
|
223
|
+
"428": _28,
|
|
224
|
+
"429": _29,
|
|
225
|
+
"431": _31,
|
|
226
|
+
"451": _51,
|
|
227
|
+
"500": _005,
|
|
228
|
+
"501": _015,
|
|
229
|
+
"502": _025,
|
|
230
|
+
"503": _035,
|
|
231
|
+
"504": _044,
|
|
232
|
+
"505": _054,
|
|
233
|
+
"506": _063,
|
|
234
|
+
"507": _074,
|
|
235
|
+
"508": _084,
|
|
236
|
+
"509": _092,
|
|
237
|
+
"510": _102,
|
|
238
|
+
"511": _112
|
|
239
|
+
};
|
|
240
|
+
var status = (statusCode, statusText) => {
|
|
241
|
+
return (res) => {
|
|
242
|
+
res.status = statusCode;
|
|
243
|
+
res.statusText = statusText || codes_default[String(statusCode)];
|
|
244
|
+
return res;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
var import_headers_polyfill = lib$3;
|
|
248
|
+
function set(...args) {
|
|
249
|
+
return (res) => {
|
|
250
|
+
const [name, value] = args;
|
|
251
|
+
if (typeof name === "string") {
|
|
252
|
+
res.headers.append(name, value);
|
|
253
|
+
} else {
|
|
254
|
+
const headers = (0, import_headers_polyfill.objectToHeaders)(name);
|
|
255
|
+
headers.forEach((value2, name2) => {
|
|
256
|
+
res.headers.append(name2, value2);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
return res;
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
var cookieUtils = __toESM(cookie$1);
|
|
263
|
+
var cookie = (name, value, options) => {
|
|
264
|
+
return (res) => {
|
|
265
|
+
const serializedCookie = cookieUtils.serialize(name, value, options);
|
|
266
|
+
res.headers.append("Set-Cookie", serializedCookie);
|
|
267
|
+
if (typeof document !== "undefined") {
|
|
268
|
+
document.cookie = serializedCookie;
|
|
269
|
+
}
|
|
270
|
+
return res;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
var body = (value) => {
|
|
274
|
+
return (res) => {
|
|
275
|
+
res.body = value;
|
|
276
|
+
return res;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
function jsonParse(value) {
|
|
280
|
+
try {
|
|
281
|
+
return JSON.parse(value);
|
|
282
|
+
} catch (error2) {
|
|
283
|
+
return void 0;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function isObject(value) {
|
|
287
|
+
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
288
|
+
}
|
|
289
|
+
function mergeRight(left, right) {
|
|
290
|
+
return Object.entries(right).reduce((result, [key, rightValue]) => {
|
|
291
|
+
const leftValue = result[key];
|
|
292
|
+
if (Array.isArray(leftValue) && Array.isArray(rightValue)) {
|
|
293
|
+
result[key] = leftValue.concat(rightValue);
|
|
294
|
+
return result;
|
|
295
|
+
}
|
|
296
|
+
if (isObject(leftValue) && isObject(rightValue)) {
|
|
297
|
+
result[key] = mergeRight(leftValue, rightValue);
|
|
298
|
+
return result;
|
|
299
|
+
}
|
|
300
|
+
result[key] = rightValue;
|
|
301
|
+
return result;
|
|
302
|
+
}, Object.assign({}, left));
|
|
303
|
+
}
|
|
304
|
+
var json = (body2) => {
|
|
305
|
+
return (res) => {
|
|
306
|
+
res.headers.set("Content-Type", "application/json");
|
|
307
|
+
res.body = JSON.stringify(body2);
|
|
308
|
+
return res;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
var data = (payload) => {
|
|
312
|
+
return (res) => {
|
|
313
|
+
const prevBody = jsonParse(res.body) || {};
|
|
314
|
+
const nextBody = mergeRight(prevBody, { data: payload });
|
|
315
|
+
return json(nextBody)(res);
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
var extensions = (payload) => {
|
|
319
|
+
return (res) => {
|
|
320
|
+
const prevBody = jsonParse(res.body) || {};
|
|
321
|
+
const nextBody = mergeRight(prevBody, { extensions: payload });
|
|
322
|
+
return json(nextBody)(res);
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
var import_is_node_process = libExports;
|
|
326
|
+
var SET_TIMEOUT_MAX_ALLOWED_INT = 2147483647;
|
|
327
|
+
var MIN_SERVER_RESPONSE_TIME = 100;
|
|
328
|
+
var MAX_SERVER_RESPONSE_TIME = 400;
|
|
329
|
+
var NODE_SERVER_RESPONSE_TIME = 5;
|
|
330
|
+
var getRandomServerResponseTime = () => {
|
|
331
|
+
if ((0, import_is_node_process.isNodeProcess)()) {
|
|
332
|
+
return NODE_SERVER_RESPONSE_TIME;
|
|
333
|
+
}
|
|
334
|
+
return Math.floor(Math.random() * (MAX_SERVER_RESPONSE_TIME - MIN_SERVER_RESPONSE_TIME) + MIN_SERVER_RESPONSE_TIME);
|
|
335
|
+
};
|
|
336
|
+
var delay = (durationOrMode) => {
|
|
337
|
+
return (res) => {
|
|
338
|
+
let delayTime;
|
|
339
|
+
if (typeof durationOrMode === "string") {
|
|
340
|
+
switch (durationOrMode) {
|
|
341
|
+
case "infinite": {
|
|
342
|
+
delayTime = SET_TIMEOUT_MAX_ALLOWED_INT;
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
case "real": {
|
|
346
|
+
delayTime = getRandomServerResponseTime();
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
default: {
|
|
350
|
+
throw new Error(`Failed to delay a response: unknown delay mode "${durationOrMode}". Please make sure you provide one of the supported modes ("real", "infinite") or a number to "ctx.delay".`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
} else if (typeof durationOrMode === "undefined") {
|
|
354
|
+
delayTime = getRandomServerResponseTime();
|
|
355
|
+
} else {
|
|
356
|
+
if (durationOrMode > SET_TIMEOUT_MAX_ALLOWED_INT) {
|
|
357
|
+
throw new Error(`Failed to delay a response: provided delay duration (${durationOrMode}) exceeds the maximum allowed duration for "setTimeout" (${SET_TIMEOUT_MAX_ALLOWED_INT}). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);
|
|
358
|
+
}
|
|
359
|
+
delayTime = durationOrMode;
|
|
360
|
+
}
|
|
361
|
+
res.delay = delayTime;
|
|
362
|
+
return res;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
var errors = (errorsList) => {
|
|
366
|
+
return (res) => {
|
|
367
|
+
if (errorsList == null) {
|
|
368
|
+
return res;
|
|
369
|
+
}
|
|
370
|
+
const prevBody = jsonParse(res.body) || {};
|
|
371
|
+
const nextBody = mergeRight(prevBody, { errors: errorsList });
|
|
372
|
+
return json(nextBody)(res);
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
var import_is_node_process2 = libExports;
|
|
376
|
+
var import_headers_polyfill2 = lib$3;
|
|
377
|
+
var useFetch = (0, import_is_node_process2.isNodeProcess)() ? (input, init) => Promise.resolve().then(() => __toESM(requireBrowser())).then(({ default: nodeFetch }) => nodeFetch(input, init)) : globalThis.fetch;
|
|
378
|
+
var augmentRequestInit = (requestInit) => {
|
|
379
|
+
const headers = new import_headers_polyfill2.Headers(requestInit.headers);
|
|
380
|
+
headers.set("x-msw-bypass", "true");
|
|
381
|
+
return __spreadProps(__spreadValues({}, requestInit), {
|
|
382
|
+
headers: headers.all()
|
|
383
|
+
});
|
|
384
|
+
};
|
|
385
|
+
var createFetchRequestParameters = (input) => {
|
|
386
|
+
const { body: body2, method } = input;
|
|
387
|
+
const requestParameters = __spreadProps(__spreadValues({}, input), {
|
|
388
|
+
body: void 0
|
|
389
|
+
});
|
|
390
|
+
if (["GET", "HEAD"].includes(method)) {
|
|
391
|
+
return requestParameters;
|
|
392
|
+
}
|
|
393
|
+
if (typeof body2 === "object" || typeof body2 === "number" || typeof body2 === "boolean") {
|
|
394
|
+
requestParameters.body = JSON.stringify(body2);
|
|
395
|
+
} else {
|
|
396
|
+
requestParameters.body = body2;
|
|
397
|
+
}
|
|
398
|
+
return requestParameters;
|
|
399
|
+
};
|
|
400
|
+
var fetch = (input, requestInit = {}) => {
|
|
401
|
+
if (typeof input === "string") {
|
|
402
|
+
return useFetch(input, augmentRequestInit(requestInit));
|
|
403
|
+
}
|
|
404
|
+
const requestParameters = createFetchRequestParameters(input);
|
|
405
|
+
const derivedRequestInit = augmentRequestInit(requestParameters);
|
|
406
|
+
return useFetch(input.url.href, derivedRequestInit);
|
|
407
|
+
};
|
|
408
|
+
var text = (body2) => {
|
|
409
|
+
return (res) => {
|
|
410
|
+
res.headers.set("Content-Type", "text/plain");
|
|
411
|
+
res.body = body2;
|
|
412
|
+
return res;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
var xml = (body2) => {
|
|
416
|
+
return (res) => {
|
|
417
|
+
res.headers.set("Content-Type", "text/xml");
|
|
418
|
+
res.body = body2;
|
|
419
|
+
return res;
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
var import_outvariant4 = lib$5;
|
|
423
|
+
var import_is_node_process3 = libExports;
|
|
424
|
+
var import_until4 = lib$4;
|
|
425
|
+
var import_until = lib$4;
|
|
426
|
+
var getWorkerByRegistration = (registration, absoluteWorkerUrl, findWorker) => {
|
|
427
|
+
const allStates = [
|
|
428
|
+
registration.active,
|
|
429
|
+
registration.installing,
|
|
430
|
+
registration.waiting
|
|
431
|
+
];
|
|
432
|
+
const existingStates = allStates.filter(Boolean);
|
|
433
|
+
const mockWorker = existingStates.find((worker) => {
|
|
434
|
+
return findWorker(worker.scriptURL, absoluteWorkerUrl);
|
|
435
|
+
});
|
|
436
|
+
return mockWorker || null;
|
|
437
|
+
};
|
|
438
|
+
function getAbsoluteWorkerUrl(workerUrl) {
|
|
439
|
+
return new URL(workerUrl, location.href).href;
|
|
440
|
+
}
|
|
441
|
+
var import_outvariant = lib$5;
|
|
442
|
+
var LIBRARY_PREFIX = "[MSW]";
|
|
443
|
+
function formatMessage(message, ...positionals) {
|
|
444
|
+
const interpolatedMessage = (0, import_outvariant.format)(message, ...positionals);
|
|
445
|
+
return `${LIBRARY_PREFIX} ${interpolatedMessage}`;
|
|
446
|
+
}
|
|
447
|
+
function warn(message, ...positionals) {
|
|
448
|
+
console.warn(formatMessage(message, ...positionals));
|
|
449
|
+
}
|
|
450
|
+
function error(message, ...positionals) {
|
|
451
|
+
console.error(formatMessage(message, ...positionals));
|
|
452
|
+
}
|
|
453
|
+
var devUtils = {
|
|
454
|
+
formatMessage,
|
|
455
|
+
warn,
|
|
456
|
+
error
|
|
457
|
+
};
|
|
458
|
+
var getWorkerInstance = async (url, options = {}, findWorker) => {
|
|
459
|
+
const absoluteWorkerUrl = getAbsoluteWorkerUrl(url);
|
|
460
|
+
const mockRegistrations = await navigator.serviceWorker.getRegistrations().then((registrations) => registrations.filter((registration) => getWorkerByRegistration(registration, absoluteWorkerUrl, findWorker)));
|
|
461
|
+
if (!navigator.serviceWorker.controller && mockRegistrations.length > 0) {
|
|
462
|
+
location.reload();
|
|
463
|
+
}
|
|
464
|
+
const [existingRegistration] = mockRegistrations;
|
|
465
|
+
if (existingRegistration) {
|
|
466
|
+
return existingRegistration.update().then(() => {
|
|
467
|
+
return [
|
|
468
|
+
getWorkerByRegistration(existingRegistration, absoluteWorkerUrl, findWorker),
|
|
469
|
+
existingRegistration
|
|
470
|
+
];
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
const [error2, instance] = await (0, import_until.until)(async () => {
|
|
474
|
+
const registration = await navigator.serviceWorker.register(url, options);
|
|
475
|
+
return [
|
|
476
|
+
getWorkerByRegistration(registration, absoluteWorkerUrl, findWorker),
|
|
477
|
+
registration
|
|
478
|
+
];
|
|
479
|
+
});
|
|
480
|
+
if (error2) {
|
|
481
|
+
const isWorkerMissing = error2.message.includes("(404)");
|
|
482
|
+
if (isWorkerMissing) {
|
|
483
|
+
const scopeUrl = new URL((options == null ? void 0 : options.scope) || "/", location.href);
|
|
484
|
+
throw new Error(devUtils.formatMessage(`Failed to register a Service Worker for scope ('${scopeUrl.href}') with script ('${absoluteWorkerUrl}'): Service Worker script does not exist at the given path.
|
|
485
|
+
|
|
486
|
+
Did you forget to run "npx msw init <PUBLIC_DIR>"?
|
|
487
|
+
|
|
488
|
+
Learn more about creating the Service Worker script: https://mswjs.io/docs/cli/init`));
|
|
489
|
+
}
|
|
490
|
+
throw new Error(devUtils.formatMessage("Failed to register the Service Worker:\n\n%s", error2.message));
|
|
491
|
+
}
|
|
492
|
+
return instance;
|
|
493
|
+
};
|
|
494
|
+
function printStartMessage(args = {}) {
|
|
495
|
+
if (args.quiet) {
|
|
496
|
+
return;
|
|
497
|
+
}
|
|
498
|
+
const message = args.message || "Mocking enabled.";
|
|
499
|
+
console.groupCollapsed(`%c${devUtils.formatMessage(message)}`, "color:orangered;font-weight:bold;");
|
|
500
|
+
console.log("%cDocumentation: %chttps://mswjs.io/docs", "font-weight:bold", "font-weight:normal");
|
|
501
|
+
console.log("Found an issue? https://github.com/mswjs/msw/issues");
|
|
502
|
+
if (args.workerUrl) {
|
|
503
|
+
console.log("Worker script URL:", args.workerUrl);
|
|
504
|
+
}
|
|
505
|
+
if (args.workerScope) {
|
|
506
|
+
console.log("Worker scope:", args.workerScope);
|
|
507
|
+
}
|
|
508
|
+
console.groupEnd();
|
|
509
|
+
}
|
|
510
|
+
async function enableMocking(context, options) {
|
|
511
|
+
var _a, _b;
|
|
512
|
+
context.workerChannel.send("MOCK_ACTIVATE");
|
|
513
|
+
await context.events.once("MOCKING_ENABLED");
|
|
514
|
+
if (context.isMockingEnabled) {
|
|
515
|
+
devUtils.warn(`Found a redundant "worker.start()" call. Note that starting the worker while mocking is already enabled will have no effect. Consider removing this "worker.start()" call.`);
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
context.isMockingEnabled = true;
|
|
519
|
+
printStartMessage({
|
|
520
|
+
quiet: options.quiet,
|
|
521
|
+
workerScope: (_a = context.registration) == null ? void 0 : _a.scope,
|
|
522
|
+
workerUrl: (_b = context.worker) == null ? void 0 : _b.scriptURL
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
var WorkerChannel = class {
|
|
526
|
+
constructor(port) {
|
|
527
|
+
this.port = port;
|
|
528
|
+
}
|
|
529
|
+
postMessage(event, ...rest2) {
|
|
530
|
+
const [data2, transfer] = rest2;
|
|
531
|
+
this.port.postMessage({ type: event, data: data2 }, { transfer });
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
var NetworkError = class extends Error {
|
|
535
|
+
constructor(message) {
|
|
536
|
+
super(message);
|
|
537
|
+
this.name = "NetworkError";
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
var import_interceptors2 = lib$2;
|
|
541
|
+
var import_headers_polyfill5 = lib$3;
|
|
542
|
+
var cookieUtils3 = __toESM(cookie$1);
|
|
543
|
+
var import_cookies = lib$1;
|
|
544
|
+
var import_interceptors = lib$2;
|
|
545
|
+
var import_bufferUtils3 = bufferUtils;
|
|
546
|
+
var import_headers_polyfill4 = lib$3;
|
|
547
|
+
var cookieUtils2 = __toESM(cookie$1);
|
|
548
|
+
function getAllCookies() {
|
|
549
|
+
return cookieUtils2.parse(document.cookie);
|
|
550
|
+
}
|
|
551
|
+
function getRequestCookies(request) {
|
|
552
|
+
if (typeof document === "undefined" || typeof location === "undefined") {
|
|
553
|
+
return {};
|
|
554
|
+
}
|
|
555
|
+
switch (request.credentials) {
|
|
556
|
+
case "same-origin": {
|
|
557
|
+
return location.origin === request.url.origin ? getAllCookies() : {};
|
|
558
|
+
}
|
|
559
|
+
case "include": {
|
|
560
|
+
return getAllCookies();
|
|
561
|
+
}
|
|
562
|
+
default: {
|
|
563
|
+
return {};
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
var import_headers_polyfill3 = lib$3;
|
|
568
|
+
function parseContentHeaders(headersString) {
|
|
569
|
+
var _a, _b;
|
|
570
|
+
const headers = (0, import_headers_polyfill3.stringToHeaders)(headersString);
|
|
571
|
+
const contentType = headers.get("content-type") || "text/plain";
|
|
572
|
+
const disposition = headers.get("content-disposition");
|
|
573
|
+
if (!disposition) {
|
|
574
|
+
throw new Error('"Content-Disposition" header is required.');
|
|
575
|
+
}
|
|
576
|
+
const directives = disposition.split(";").reduce((acc, chunk) => {
|
|
577
|
+
const [name2, ...rest2] = chunk.trim().split("=");
|
|
578
|
+
acc[name2] = rest2.join("=");
|
|
579
|
+
return acc;
|
|
580
|
+
}, {});
|
|
581
|
+
const name = (_a = directives.name) == null ? void 0 : _a.slice(1, -1);
|
|
582
|
+
const filename = (_b = directives.filename) == null ? void 0 : _b.slice(1, -1);
|
|
583
|
+
return {
|
|
584
|
+
name,
|
|
585
|
+
filename,
|
|
586
|
+
contentType
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
function parseMultipartData(data2, headers) {
|
|
590
|
+
const contentType = headers == null ? void 0 : headers.get("content-type");
|
|
591
|
+
if (!contentType) {
|
|
592
|
+
return void 0;
|
|
593
|
+
}
|
|
594
|
+
const [, ...directives] = contentType.split(/; */);
|
|
595
|
+
const boundary = directives.filter((d) => d.startsWith("boundary=")).map((s) => s.replace(/^boundary=/, ""))[0];
|
|
596
|
+
if (!boundary) {
|
|
597
|
+
return void 0;
|
|
598
|
+
}
|
|
599
|
+
const boundaryRegExp = new RegExp(`--+${boundary}`);
|
|
600
|
+
const fields = data2.split(boundaryRegExp).filter((chunk) => chunk.startsWith("\r\n") && chunk.endsWith("\r\n")).map((chunk) => chunk.trimStart().replace(/\r\n$/, ""));
|
|
601
|
+
if (!fields.length) {
|
|
602
|
+
return void 0;
|
|
603
|
+
}
|
|
604
|
+
const parsedBody = {};
|
|
605
|
+
try {
|
|
606
|
+
for (const field2 of fields) {
|
|
607
|
+
const [contentHeaders, ...rest2] = field2.split("\r\n\r\n");
|
|
608
|
+
const contentBody = rest2.join("\r\n\r\n");
|
|
609
|
+
const { contentType: contentType2, filename, name } = parseContentHeaders(contentHeaders);
|
|
610
|
+
const value = filename === void 0 ? contentBody : new File([contentBody], filename, { type: contentType2 });
|
|
611
|
+
const parsedValue = parsedBody[name];
|
|
612
|
+
if (parsedValue === void 0) {
|
|
613
|
+
parsedBody[name] = value;
|
|
614
|
+
} else if (Array.isArray(parsedValue)) {
|
|
615
|
+
parsedBody[name] = [...parsedValue, value];
|
|
616
|
+
} else {
|
|
617
|
+
parsedBody[name] = [parsedValue, value];
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return parsedBody;
|
|
621
|
+
} catch (error2) {
|
|
622
|
+
return void 0;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
function parseBody(body2, headers) {
|
|
626
|
+
var _a;
|
|
627
|
+
if (!body2) {
|
|
628
|
+
return body2;
|
|
629
|
+
}
|
|
630
|
+
const contentType = ((_a = headers == null ? void 0 : headers.get("content-type")) == null ? void 0 : _a.toLowerCase()) || "";
|
|
631
|
+
const hasMultipartContent = contentType.startsWith("multipart/form-data");
|
|
632
|
+
if (hasMultipartContent && typeof body2 !== "object") {
|
|
633
|
+
return parseMultipartData(body2.toString(), headers) || body2;
|
|
634
|
+
}
|
|
635
|
+
const hasJsonContent = contentType.includes("json");
|
|
636
|
+
if (hasJsonContent && typeof body2 !== "object") {
|
|
637
|
+
return jsonParse(body2.toString()) || body2;
|
|
638
|
+
}
|
|
639
|
+
return body2;
|
|
640
|
+
}
|
|
641
|
+
function isStringEqual(actual, expected) {
|
|
642
|
+
return actual.toLowerCase() === expected.toLowerCase();
|
|
643
|
+
}
|
|
644
|
+
var MockedRequest = class extends import_interceptors.IsomorphicRequest {
|
|
645
|
+
constructor(url, init = {}) {
|
|
646
|
+
super(url, init);
|
|
647
|
+
if (init.id) {
|
|
648
|
+
this.id = init.id;
|
|
649
|
+
}
|
|
650
|
+
this.cache = init.cache || "default";
|
|
651
|
+
this.destination = init.destination || "";
|
|
652
|
+
this.integrity = init.integrity || "";
|
|
653
|
+
this.keepalive = init.keepalive || false;
|
|
654
|
+
this.mode = init.mode || "cors";
|
|
655
|
+
this.priority = init.priority || "auto";
|
|
656
|
+
this.redirect = init.redirect || "follow";
|
|
657
|
+
this.referrer = init.referrer || "";
|
|
658
|
+
this.referrerPolicy = init.referrerPolicy || "no-referrer";
|
|
659
|
+
this.cookies = init.cookies || this.getCookies();
|
|
660
|
+
}
|
|
661
|
+
get body() {
|
|
662
|
+
const text2 = (0, import_bufferUtils3.decodeBuffer)(this["_body"]);
|
|
663
|
+
const body2 = parseBody(text2, this.headers);
|
|
664
|
+
if (isStringEqual(this.method, "GET") && body2 === "") {
|
|
665
|
+
return void 0;
|
|
666
|
+
}
|
|
667
|
+
return body2;
|
|
668
|
+
}
|
|
669
|
+
passthrough() {
|
|
670
|
+
return {
|
|
671
|
+
status: 101,
|
|
672
|
+
statusText: "Continue",
|
|
673
|
+
headers: new import_headers_polyfill4.Headers(),
|
|
674
|
+
body: null,
|
|
675
|
+
passthrough: true,
|
|
676
|
+
once: false
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
getCookies() {
|
|
680
|
+
var _a;
|
|
681
|
+
const requestCookiesString = this.headers.get("cookie");
|
|
682
|
+
const ownCookies = requestCookiesString ? cookieUtils3.parse(requestCookiesString) : {};
|
|
683
|
+
import_cookies.store.hydrate();
|
|
684
|
+
const cookiesFromStore = Array.from((_a = import_cookies.store.get(__spreadProps(__spreadValues({}, this), { url: this.url.href }))) == null ? void 0 : _a.entries()).reduce((cookies, [name, { value }]) => {
|
|
685
|
+
return Object.assign(cookies, { [name.trim()]: value });
|
|
686
|
+
}, {});
|
|
687
|
+
const cookiesFromDocument = getRequestCookies(this);
|
|
688
|
+
const forwardedCookies = __spreadValues(__spreadValues({}, cookiesFromDocument), cookiesFromStore);
|
|
689
|
+
for (const [name, value] of Object.entries(forwardedCookies)) {
|
|
690
|
+
this.headers.append("cookie", `${name}=${value}`);
|
|
691
|
+
}
|
|
692
|
+
return __spreadValues(__spreadValues({}, forwardedCookies), ownCookies);
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
function parseWorkerRequest(rawRequest) {
|
|
696
|
+
const url = new URL(rawRequest.url);
|
|
697
|
+
const headers = new import_headers_polyfill5.Headers(rawRequest.headers);
|
|
698
|
+
return new MockedRequest(url, __spreadProps(__spreadValues({}, rawRequest), {
|
|
699
|
+
body: (0, import_interceptors2.encodeBuffer)(rawRequest.body || ""),
|
|
700
|
+
headers
|
|
701
|
+
}));
|
|
702
|
+
}
|
|
703
|
+
var import_until2 = lib$4;
|
|
704
|
+
var getResponse = async (request, handlers, resolutionContext) => {
|
|
705
|
+
const relevantHandlers = handlers.filter((handler) => {
|
|
706
|
+
return handler.test(request, resolutionContext);
|
|
707
|
+
});
|
|
708
|
+
if (relevantHandlers.length === 0) {
|
|
709
|
+
return {
|
|
710
|
+
handler: void 0,
|
|
711
|
+
response: void 0
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
const result = await relevantHandlers.reduce(async (executionResult, handler) => {
|
|
715
|
+
const previousResults = await executionResult;
|
|
716
|
+
if (!!(previousResults == null ? void 0 : previousResults.response)) {
|
|
717
|
+
return executionResult;
|
|
718
|
+
}
|
|
719
|
+
const result2 = await handler.run(request, resolutionContext);
|
|
720
|
+
if (result2 === null || result2.handler.shouldSkip) {
|
|
721
|
+
return null;
|
|
722
|
+
}
|
|
723
|
+
if (!result2.response) {
|
|
724
|
+
return {
|
|
725
|
+
request: result2.request,
|
|
726
|
+
handler: result2.handler,
|
|
727
|
+
response: void 0,
|
|
728
|
+
parsedResult: result2.parsedResult
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
if (result2.response.once) {
|
|
732
|
+
handler.markAsSkipped(true);
|
|
733
|
+
}
|
|
734
|
+
return result2;
|
|
735
|
+
}, Promise.resolve(null));
|
|
736
|
+
if (!result) {
|
|
737
|
+
return {
|
|
738
|
+
handler: void 0,
|
|
739
|
+
response: void 0
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
return {
|
|
743
|
+
handler: result.handler,
|
|
744
|
+
publicRequest: result.request,
|
|
745
|
+
parsedRequest: result.parsedResult,
|
|
746
|
+
response: result.response
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
var import_js_levenshtein2 = __toESM(requireJsLevenshtein());
|
|
750
|
+
var import_graphql = require$$10;
|
|
751
|
+
var getPublicUrlFromRequest = (request) => {
|
|
752
|
+
return request.referrer.startsWith(request.url.origin) ? request.url.pathname : new URL(request.url.pathname, `${request.url.protocol}//${request.url.host}`).href;
|
|
753
|
+
};
|
|
754
|
+
function parseDocumentNode(node) {
|
|
755
|
+
var _a;
|
|
756
|
+
const operationDef = node.definitions.find((def) => {
|
|
757
|
+
return def.kind === "OperationDefinition";
|
|
758
|
+
});
|
|
759
|
+
return {
|
|
760
|
+
operationType: operationDef == null ? void 0 : operationDef.operation,
|
|
761
|
+
operationName: (_a = operationDef == null ? void 0 : operationDef.name) == null ? void 0 : _a.value
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
function parseQuery(query) {
|
|
765
|
+
try {
|
|
766
|
+
const ast = (0, import_graphql.parse)(query);
|
|
767
|
+
return parseDocumentNode(ast);
|
|
768
|
+
} catch (error2) {
|
|
769
|
+
return error2;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
function extractMultipartVariables(variables, map, files) {
|
|
773
|
+
const operations = { variables };
|
|
774
|
+
for (const [key, pathArray] of Object.entries(map)) {
|
|
775
|
+
if (!(key in files)) {
|
|
776
|
+
throw new Error(`Given files do not have a key '${key}' .`);
|
|
777
|
+
}
|
|
778
|
+
for (const dotPath of pathArray) {
|
|
779
|
+
const [lastPath, ...reversedPaths] = dotPath.split(".").reverse();
|
|
780
|
+
const paths = reversedPaths.reverse();
|
|
781
|
+
let target = operations;
|
|
782
|
+
for (const path of paths) {
|
|
783
|
+
if (!(path in target)) {
|
|
784
|
+
throw new Error(`Property '${paths}' is not in operations.`);
|
|
785
|
+
}
|
|
786
|
+
target = target[path];
|
|
787
|
+
}
|
|
788
|
+
target[lastPath] = files[key];
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
return operations.variables;
|
|
792
|
+
}
|
|
793
|
+
function getGraphQLInput(request) {
|
|
794
|
+
var _a, _b;
|
|
795
|
+
switch (request.method) {
|
|
796
|
+
case "GET": {
|
|
797
|
+
const query = request.url.searchParams.get("query");
|
|
798
|
+
const variables = request.url.searchParams.get("variables") || "";
|
|
799
|
+
return {
|
|
800
|
+
query,
|
|
801
|
+
variables: jsonParse(variables)
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
case "POST": {
|
|
805
|
+
if ((_a = request.body) == null ? void 0 : _a.query) {
|
|
806
|
+
const { query, variables } = request.body;
|
|
807
|
+
return {
|
|
808
|
+
query,
|
|
809
|
+
variables
|
|
810
|
+
};
|
|
811
|
+
}
|
|
812
|
+
if ((_b = request.body) == null ? void 0 : _b.operations) {
|
|
813
|
+
const _c = request.body, { operations, map } = _c, files = __objRest(_c, ["operations", "map"]);
|
|
814
|
+
const parsedOperations = jsonParse(operations) || {};
|
|
815
|
+
if (!parsedOperations.query) {
|
|
816
|
+
return null;
|
|
817
|
+
}
|
|
818
|
+
const parsedMap = jsonParse(map || "") || {};
|
|
819
|
+
const variables = parsedOperations.variables ? extractMultipartVariables(parsedOperations.variables, parsedMap, files) : {};
|
|
820
|
+
return {
|
|
821
|
+
query: parsedOperations.query,
|
|
822
|
+
variables
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
default:
|
|
827
|
+
return null;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
function parseGraphQLRequest(request) {
|
|
831
|
+
const input = getGraphQLInput(request);
|
|
832
|
+
if (!input || !input.query) {
|
|
833
|
+
return void 0;
|
|
834
|
+
}
|
|
835
|
+
const { query, variables } = input;
|
|
836
|
+
const parsedResult = parseQuery(query);
|
|
837
|
+
if (parsedResult instanceof Error) {
|
|
838
|
+
const requestPublicUrl = getPublicUrlFromRequest(request);
|
|
839
|
+
throw new Error(devUtils.formatMessage('Failed to intercept a GraphQL request to "%s %s": cannot parse query. See the error message from the parser below.\n\n%s', request.method, requestPublicUrl, parsedResult.message));
|
|
840
|
+
}
|
|
841
|
+
return {
|
|
842
|
+
operationType: parsedResult.operationType,
|
|
843
|
+
operationName: parsedResult.operationName,
|
|
844
|
+
variables
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
function getStatusCodeColor(status2) {
|
|
848
|
+
if (status2 < 300) {
|
|
849
|
+
return "#69AB32";
|
|
850
|
+
}
|
|
851
|
+
if (status2 < 400) {
|
|
852
|
+
return "#F0BB4B";
|
|
853
|
+
}
|
|
854
|
+
return "#E95F5D";
|
|
855
|
+
}
|
|
856
|
+
function getTimestamp() {
|
|
857
|
+
const now = new Date();
|
|
858
|
+
return [now.getHours(), now.getMinutes(), now.getSeconds()].map(String).map((chunk) => chunk.slice(0, 2)).map((chunk) => chunk.padStart(2, "0")).join(":");
|
|
859
|
+
}
|
|
860
|
+
function prepareRequest(request) {
|
|
861
|
+
return __spreadProps(__spreadValues({}, request), {
|
|
862
|
+
body: request.body,
|
|
863
|
+
headers: request.headers.all()
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
var import_headers_polyfill6 = lib$3;
|
|
867
|
+
function prepareResponse(res) {
|
|
868
|
+
const responseHeaders = (0, import_headers_polyfill6.objectToHeaders)(res.headers);
|
|
869
|
+
return __spreadProps(__spreadValues({}, res), {
|
|
870
|
+
body: parseBody(res.body, responseHeaders)
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
var import_path_to_regexp = require$$11;
|
|
874
|
+
var import_getCleanUrl3 = getCleanUrl;
|
|
875
|
+
var REDUNDANT_CHARACTERS_EXP = /[\?|#].*$/g;
|
|
876
|
+
function getSearchParams(path) {
|
|
877
|
+
return new URL(`/${path}`, "http://localhost").searchParams;
|
|
878
|
+
}
|
|
879
|
+
function cleanUrl(path) {
|
|
880
|
+
return path.replace(REDUNDANT_CHARACTERS_EXP, "");
|
|
881
|
+
}
|
|
882
|
+
function isAbsoluteUrl(url) {
|
|
883
|
+
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
|
884
|
+
}
|
|
885
|
+
function getAbsoluteUrl(path, baseUrl) {
|
|
886
|
+
if (isAbsoluteUrl(path)) {
|
|
887
|
+
return path;
|
|
888
|
+
}
|
|
889
|
+
if (path.startsWith("*")) {
|
|
890
|
+
return path;
|
|
891
|
+
}
|
|
892
|
+
const origin = baseUrl || typeof document !== "undefined" && document.baseURI;
|
|
893
|
+
return origin ? decodeURI(new URL(encodeURI(path), origin).href) : path;
|
|
894
|
+
}
|
|
895
|
+
function normalizePath(path, baseUrl) {
|
|
896
|
+
if (path instanceof RegExp) {
|
|
897
|
+
return path;
|
|
898
|
+
}
|
|
899
|
+
const maybeAbsoluteUrl = getAbsoluteUrl(path, baseUrl);
|
|
900
|
+
return cleanUrl(maybeAbsoluteUrl);
|
|
901
|
+
}
|
|
902
|
+
function coercePath(path) {
|
|
903
|
+
return path.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g, (_, parameterName, wildcard) => {
|
|
904
|
+
const expression = "(.*)";
|
|
905
|
+
if (!parameterName) {
|
|
906
|
+
return expression;
|
|
907
|
+
}
|
|
908
|
+
return parameterName.startsWith(":") ? `${parameterName}${wildcard}` : `${parameterName}${expression}`;
|
|
909
|
+
}).replace(/([^\/])(:)(?=\d+)/, "$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/, "$1\\$2");
|
|
910
|
+
}
|
|
911
|
+
function matchRequestUrl(url, path, baseUrl) {
|
|
912
|
+
const normalizedPath = normalizePath(path, baseUrl);
|
|
913
|
+
const cleanPath = typeof normalizedPath === "string" ? coercePath(normalizedPath) : normalizedPath;
|
|
914
|
+
const cleanUrl2 = (0, import_getCleanUrl3.getCleanUrl)(url);
|
|
915
|
+
const result = (0, import_path_to_regexp.match)(cleanPath, { decode: decodeURIComponent })(cleanUrl2);
|
|
916
|
+
const params = result && result.params || {};
|
|
917
|
+
return {
|
|
918
|
+
matches: result !== false,
|
|
919
|
+
params
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
var import_headers_polyfill7 = lib$3;
|
|
923
|
+
function compose(...fns) {
|
|
924
|
+
return (...args) => {
|
|
925
|
+
return fns.reduceRight((leftFn, rightFn) => {
|
|
926
|
+
return leftFn instanceof Promise ? Promise.resolve(leftFn).then(rightFn) : rightFn(leftFn);
|
|
927
|
+
}, args[0]);
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
var defaultResponse = {
|
|
931
|
+
status: 200,
|
|
932
|
+
statusText: "OK",
|
|
933
|
+
body: null,
|
|
934
|
+
delay: 0,
|
|
935
|
+
once: false,
|
|
936
|
+
passthrough: false
|
|
937
|
+
};
|
|
938
|
+
var defaultResponseTransformers = [];
|
|
939
|
+
function createResponseComposition(responseOverrides, defaultTransformers = defaultResponseTransformers) {
|
|
940
|
+
return async (...transformers) => {
|
|
941
|
+
const initialResponse = Object.assign({}, defaultResponse, {
|
|
942
|
+
headers: new import_headers_polyfill7.Headers({
|
|
943
|
+
"x-powered-by": "msw"
|
|
944
|
+
})
|
|
945
|
+
}, responseOverrides);
|
|
946
|
+
const resolvedTransformers = [
|
|
947
|
+
...defaultTransformers,
|
|
948
|
+
...transformers
|
|
949
|
+
].filter(Boolean);
|
|
950
|
+
const resolvedResponse = resolvedTransformers.length > 0 ? compose(...resolvedTransformers)(initialResponse) : initialResponse;
|
|
951
|
+
return resolvedResponse;
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
var response = Object.assign(createResponseComposition(), {
|
|
955
|
+
once: createResponseComposition({ once: true }),
|
|
956
|
+
networkError(message) {
|
|
957
|
+
throw new NetworkError(message);
|
|
958
|
+
}
|
|
959
|
+
});
|
|
960
|
+
var SOURCE_FRAME = /[\/\\]msw[\/\\]src[\/\\](.+)/;
|
|
961
|
+
var BUILD_FRAME = /(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/;
|
|
962
|
+
function getCallFrame(error2) {
|
|
963
|
+
const stack = error2.stack;
|
|
964
|
+
if (!stack) {
|
|
965
|
+
return;
|
|
966
|
+
}
|
|
967
|
+
const frames = stack.split("\n").slice(1);
|
|
968
|
+
const declarationFrame = frames.find((frame) => {
|
|
969
|
+
return !(SOURCE_FRAME.test(frame) || BUILD_FRAME.test(frame));
|
|
970
|
+
});
|
|
971
|
+
if (!declarationFrame) {
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
974
|
+
const declarationPath = declarationFrame.replace(/\s*at [^()]*\(([^)]+)\)/, "$1").replace(/^@/, "");
|
|
975
|
+
return declarationPath;
|
|
976
|
+
}
|
|
977
|
+
function isIterable(fn) {
|
|
978
|
+
if (!fn) {
|
|
979
|
+
return false;
|
|
980
|
+
}
|
|
981
|
+
return typeof fn[Symbol.iterator] == "function";
|
|
982
|
+
}
|
|
983
|
+
var defaultContext = {
|
|
984
|
+
status,
|
|
985
|
+
set,
|
|
986
|
+
delay,
|
|
987
|
+
fetch
|
|
988
|
+
};
|
|
989
|
+
var RequestHandler = class {
|
|
990
|
+
constructor(options) {
|
|
991
|
+
this.shouldSkip = false;
|
|
992
|
+
this.ctx = options.ctx || defaultContext;
|
|
993
|
+
this.resolver = options.resolver;
|
|
994
|
+
const callFrame = getCallFrame(new Error());
|
|
995
|
+
this.info = __spreadProps(__spreadValues({}, options.info), {
|
|
996
|
+
callFrame
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
parse(_request, _resolutionContext) {
|
|
1000
|
+
return null;
|
|
1001
|
+
}
|
|
1002
|
+
test(request, resolutionContext) {
|
|
1003
|
+
return this.predicate(request, this.parse(request, resolutionContext), resolutionContext);
|
|
1004
|
+
}
|
|
1005
|
+
getPublicRequest(request, _parsedResult) {
|
|
1006
|
+
return request;
|
|
1007
|
+
}
|
|
1008
|
+
markAsSkipped(shouldSkip = true) {
|
|
1009
|
+
this.shouldSkip = shouldSkip;
|
|
1010
|
+
}
|
|
1011
|
+
async run(request, resolutionContext) {
|
|
1012
|
+
if (this.shouldSkip) {
|
|
1013
|
+
return null;
|
|
1014
|
+
}
|
|
1015
|
+
const parsedResult = this.parse(request, resolutionContext);
|
|
1016
|
+
const shouldIntercept = this.predicate(request, parsedResult, resolutionContext);
|
|
1017
|
+
if (!shouldIntercept) {
|
|
1018
|
+
return null;
|
|
1019
|
+
}
|
|
1020
|
+
const publicRequest = this.getPublicRequest(request, parsedResult);
|
|
1021
|
+
const executeResolver = this.wrapResolver(this.resolver);
|
|
1022
|
+
const mockedResponse = await executeResolver(publicRequest, response, this.ctx);
|
|
1023
|
+
return this.createExecutionResult(parsedResult, publicRequest, mockedResponse);
|
|
1024
|
+
}
|
|
1025
|
+
wrapResolver(resolver) {
|
|
1026
|
+
return async (req, res, ctx) => {
|
|
1027
|
+
const result = this.resolverGenerator || await resolver(req, res, ctx);
|
|
1028
|
+
if (isIterable(result)) {
|
|
1029
|
+
const { value, done } = result[Symbol.iterator]().next();
|
|
1030
|
+
const nextResponse = await value;
|
|
1031
|
+
if (!nextResponse && done) {
|
|
1032
|
+
return this.resolverGeneratorResult;
|
|
1033
|
+
}
|
|
1034
|
+
if (!this.resolverGenerator) {
|
|
1035
|
+
this.resolverGenerator = result;
|
|
1036
|
+
}
|
|
1037
|
+
this.resolverGeneratorResult = nextResponse;
|
|
1038
|
+
return nextResponse;
|
|
1039
|
+
}
|
|
1040
|
+
return result;
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
createExecutionResult(parsedResult, request, response2) {
|
|
1044
|
+
return {
|
|
1045
|
+
handler: this,
|
|
1046
|
+
parsedResult: parsedResult || null,
|
|
1047
|
+
request,
|
|
1048
|
+
response: response2 || null
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
var RESTMethods = /* @__PURE__ */ ((RESTMethods2) => {
|
|
1053
|
+
RESTMethods2["HEAD"] = "HEAD";
|
|
1054
|
+
RESTMethods2["GET"] = "GET";
|
|
1055
|
+
RESTMethods2["POST"] = "POST";
|
|
1056
|
+
RESTMethods2["PUT"] = "PUT";
|
|
1057
|
+
RESTMethods2["PATCH"] = "PATCH";
|
|
1058
|
+
RESTMethods2["OPTIONS"] = "OPTIONS";
|
|
1059
|
+
RESTMethods2["DELETE"] = "DELETE";
|
|
1060
|
+
return RESTMethods2;
|
|
1061
|
+
})(RESTMethods || {});
|
|
1062
|
+
var restContext = __spreadProps(__spreadValues({}, defaultContext), {
|
|
1063
|
+
cookie,
|
|
1064
|
+
body,
|
|
1065
|
+
text,
|
|
1066
|
+
json,
|
|
1067
|
+
xml
|
|
1068
|
+
});
|
|
1069
|
+
var RestRequest = class extends MockedRequest {
|
|
1070
|
+
constructor(request, params) {
|
|
1071
|
+
super(request.url, __spreadProps(__spreadValues({}, request), {
|
|
1072
|
+
body: request["_body"]
|
|
1073
|
+
}));
|
|
1074
|
+
this.params = params;
|
|
1075
|
+
this.id = request.id;
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
var RestHandler = class extends RequestHandler {
|
|
1079
|
+
constructor(method, path, resolver) {
|
|
1080
|
+
super({
|
|
1081
|
+
info: {
|
|
1082
|
+
header: `${method} ${path}`,
|
|
1083
|
+
path,
|
|
1084
|
+
method
|
|
1085
|
+
},
|
|
1086
|
+
ctx: restContext,
|
|
1087
|
+
resolver
|
|
1088
|
+
});
|
|
1089
|
+
this.checkRedundantQueryParameters();
|
|
1090
|
+
}
|
|
1091
|
+
checkRedundantQueryParameters() {
|
|
1092
|
+
const { method, path } = this.info;
|
|
1093
|
+
if (path instanceof RegExp) {
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
const url = cleanUrl(path);
|
|
1097
|
+
if (url === path) {
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
const searchParams = getSearchParams(path);
|
|
1101
|
+
searchParams.forEach((_, paramName) => {
|
|
1102
|
+
});
|
|
1103
|
+
devUtils.warn(`Found a redundant usage of query parameters in the request handler URL for "${method} ${path}". Please match against a path instead and access query parameters in the response resolver function using "req.url.searchParams".`);
|
|
1104
|
+
}
|
|
1105
|
+
parse(request, resolutionContext) {
|
|
1106
|
+
return matchRequestUrl(request.url, this.info.path, resolutionContext == null ? void 0 : resolutionContext.baseUrl);
|
|
1107
|
+
}
|
|
1108
|
+
getPublicRequest(request, parsedResult) {
|
|
1109
|
+
return new RestRequest(request, parsedResult.params || {});
|
|
1110
|
+
}
|
|
1111
|
+
predicate(request, parsedResult) {
|
|
1112
|
+
const matchesMethod = this.info.method instanceof RegExp ? this.info.method.test(request.method) : isStringEqual(this.info.method, request.method);
|
|
1113
|
+
return matchesMethod && parsedResult.matches;
|
|
1114
|
+
}
|
|
1115
|
+
log(request, response2) {
|
|
1116
|
+
const publicUrl = getPublicUrlFromRequest(request);
|
|
1117
|
+
const loggedRequest = prepareRequest(request);
|
|
1118
|
+
const loggedResponse = prepareResponse(response2);
|
|
1119
|
+
const statusColor = getStatusCodeColor(response2.status);
|
|
1120
|
+
console.groupCollapsed(devUtils.formatMessage("%s %s %s (%c%s%c)"), getTimestamp(), request.method, publicUrl, `color:${statusColor}`, `${response2.status} ${response2.statusText}`, "color:inherit");
|
|
1121
|
+
console.log("Request", loggedRequest);
|
|
1122
|
+
console.log("Handler:", this);
|
|
1123
|
+
console.log("Response", loggedResponse);
|
|
1124
|
+
console.groupEnd();
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
var import_outvariant2 = lib$5;
|
|
1128
|
+
var field = (fieldName, fieldValue) => {
|
|
1129
|
+
return (res) => {
|
|
1130
|
+
validateFieldName(fieldName);
|
|
1131
|
+
const prevBody = jsonParse(res.body) || {};
|
|
1132
|
+
const nextBody = mergeRight(prevBody, { [fieldName]: fieldValue });
|
|
1133
|
+
return json(nextBody)(res);
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
function validateFieldName(fieldName) {
|
|
1137
|
+
(0, import_outvariant2.invariant)(fieldName.trim() !== "", devUtils.formatMessage("Failed to set a custom field on a GraphQL response: field name cannot be empty."));
|
|
1138
|
+
(0, import_outvariant2.invariant)(fieldName !== "data", devUtils.formatMessage('Failed to set a custom "%s" field on a mocked GraphQL response: forbidden field name. Did you mean to call "ctx.data()" instead?', fieldName));
|
|
1139
|
+
(0, import_outvariant2.invariant)(fieldName !== "errors", devUtils.formatMessage('Failed to set a custom "%s" field on a mocked GraphQL response: forbidden field name. Did you mean to call "ctx.errors()" instead?', fieldName));
|
|
1140
|
+
(0, import_outvariant2.invariant)(fieldName !== "extensions", devUtils.formatMessage('Failed to set a custom "%s" field on a mocked GraphQL response: forbidden field name. Did you mean to call "ctx.extensions()" instead?', fieldName));
|
|
1141
|
+
}
|
|
1142
|
+
function tryCatch(fn, onException) {
|
|
1143
|
+
try {
|
|
1144
|
+
const result = fn();
|
|
1145
|
+
return result;
|
|
1146
|
+
} catch (error2) {
|
|
1147
|
+
onException == null ? void 0 : onException(error2);
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
var graphqlContext = __spreadProps(__spreadValues({}, defaultContext), {
|
|
1151
|
+
data,
|
|
1152
|
+
extensions,
|
|
1153
|
+
errors,
|
|
1154
|
+
cookie,
|
|
1155
|
+
field
|
|
1156
|
+
});
|
|
1157
|
+
function isDocumentNode(value) {
|
|
1158
|
+
if (value == null) {
|
|
1159
|
+
return false;
|
|
1160
|
+
}
|
|
1161
|
+
return typeof value === "object" && "kind" in value && "definitions" in value;
|
|
1162
|
+
}
|
|
1163
|
+
var GraphQLRequest = class extends MockedRequest {
|
|
1164
|
+
constructor(request, variables) {
|
|
1165
|
+
super(request.url, __spreadProps(__spreadValues({}, request), {
|
|
1166
|
+
body: request["_body"]
|
|
1167
|
+
}));
|
|
1168
|
+
this.variables = variables;
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
var GraphQLHandler = class extends RequestHandler {
|
|
1172
|
+
constructor(operationType, operationName, endpoint, resolver) {
|
|
1173
|
+
let resolvedOperationName = operationName;
|
|
1174
|
+
if (isDocumentNode(operationName)) {
|
|
1175
|
+
const parsedNode = parseDocumentNode(operationName);
|
|
1176
|
+
if (parsedNode.operationType !== operationType) {
|
|
1177
|
+
throw new Error(`Failed to create a GraphQL handler: provided a DocumentNode with a mismatched operation type (expected "${operationType}", but got "${parsedNode.operationType}").`);
|
|
1178
|
+
}
|
|
1179
|
+
if (!parsedNode.operationName) {
|
|
1180
|
+
throw new Error(`Failed to create a GraphQL handler: provided a DocumentNode with no operation name.`);
|
|
1181
|
+
}
|
|
1182
|
+
resolvedOperationName = parsedNode.operationName;
|
|
1183
|
+
}
|
|
1184
|
+
const header = operationType === "all" ? `${operationType} (origin: ${endpoint.toString()})` : `${operationType} ${resolvedOperationName} (origin: ${endpoint.toString()})`;
|
|
1185
|
+
super({
|
|
1186
|
+
info: {
|
|
1187
|
+
header,
|
|
1188
|
+
operationType,
|
|
1189
|
+
operationName: resolvedOperationName
|
|
1190
|
+
},
|
|
1191
|
+
ctx: graphqlContext,
|
|
1192
|
+
resolver
|
|
1193
|
+
});
|
|
1194
|
+
this.endpoint = endpoint;
|
|
1195
|
+
}
|
|
1196
|
+
parse(request) {
|
|
1197
|
+
return tryCatch(() => parseGraphQLRequest(request), (error2) => console.error(error2.message));
|
|
1198
|
+
}
|
|
1199
|
+
getPublicRequest(request, parsedResult) {
|
|
1200
|
+
return new GraphQLRequest(request, (parsedResult == null ? void 0 : parsedResult.variables) || {});
|
|
1201
|
+
}
|
|
1202
|
+
predicate(request, parsedResult) {
|
|
1203
|
+
if (!parsedResult) {
|
|
1204
|
+
return false;
|
|
1205
|
+
}
|
|
1206
|
+
if (!parsedResult.operationName && this.info.operationType !== "all") {
|
|
1207
|
+
const publicUrl = getPublicUrlFromRequest(request);
|
|
1208
|
+
devUtils.warn(`Failed to intercept a GraphQL request at "${request.method} ${publicUrl}": anonymous GraphQL operations are not supported.
|
|
1209
|
+
|
|
1210
|
+
Consider naming this operation or using "graphql.operation" request handler to intercept GraphQL requests regardless of their operation name/type. Read more: https://mswjs.io/docs/api/graphql/operation `);
|
|
1211
|
+
return false;
|
|
1212
|
+
}
|
|
1213
|
+
const hasMatchingUrl = matchRequestUrl(request.url, this.endpoint);
|
|
1214
|
+
const hasMatchingOperationType = this.info.operationType === "all" || parsedResult.operationType === this.info.operationType;
|
|
1215
|
+
const hasMatchingOperationName = this.info.operationName instanceof RegExp ? this.info.operationName.test(parsedResult.operationName || "") : parsedResult.operationName === this.info.operationName;
|
|
1216
|
+
return hasMatchingUrl.matches && hasMatchingOperationType && hasMatchingOperationName;
|
|
1217
|
+
}
|
|
1218
|
+
log(request, response2, parsedRequest) {
|
|
1219
|
+
const loggedRequest = prepareRequest(request);
|
|
1220
|
+
const loggedResponse = prepareResponse(response2);
|
|
1221
|
+
const statusColor = getStatusCodeColor(response2.status);
|
|
1222
|
+
const requestInfo = (parsedRequest == null ? void 0 : parsedRequest.operationName) ? `${parsedRequest == null ? void 0 : parsedRequest.operationType} ${parsedRequest == null ? void 0 : parsedRequest.operationName}` : `anonymous ${parsedRequest == null ? void 0 : parsedRequest.operationType}`;
|
|
1223
|
+
console.groupCollapsed(devUtils.formatMessage("%s %s (%c%s%c)"), getTimestamp(), `${requestInfo}`, `color:${statusColor}`, `${response2.status} ${response2.statusText}`, "color:inherit");
|
|
1224
|
+
console.log("Request:", loggedRequest);
|
|
1225
|
+
console.log("Handler:", this);
|
|
1226
|
+
console.log("Response:", loggedResponse);
|
|
1227
|
+
console.groupEnd();
|
|
1228
|
+
}
|
|
1229
|
+
};
|
|
1230
|
+
var MAX_MATCH_SCORE = 3;
|
|
1231
|
+
var MAX_SUGGESTION_COUNT = 4;
|
|
1232
|
+
var TYPE_MATCH_DELTA = 0.5;
|
|
1233
|
+
function groupHandlersByType(handlers) {
|
|
1234
|
+
return handlers.reduce((groups, handler) => {
|
|
1235
|
+
if (handler instanceof RestHandler) {
|
|
1236
|
+
groups.rest.push(handler);
|
|
1237
|
+
}
|
|
1238
|
+
if (handler instanceof GraphQLHandler) {
|
|
1239
|
+
groups.graphql.push(handler);
|
|
1240
|
+
}
|
|
1241
|
+
return groups;
|
|
1242
|
+
}, {
|
|
1243
|
+
rest: [],
|
|
1244
|
+
graphql: []
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
function getRestHandlerScore() {
|
|
1248
|
+
return (request, handler) => {
|
|
1249
|
+
const { path, method } = handler.info;
|
|
1250
|
+
if (path instanceof RegExp || method instanceof RegExp) {
|
|
1251
|
+
return Infinity;
|
|
1252
|
+
}
|
|
1253
|
+
const hasSameMethod = isStringEqual(request.method, method);
|
|
1254
|
+
const methodScoreDelta = hasSameMethod ? TYPE_MATCH_DELTA : 0;
|
|
1255
|
+
const requestPublicUrl = getPublicUrlFromRequest(request);
|
|
1256
|
+
const score = (0, import_js_levenshtein2.default)(requestPublicUrl, path);
|
|
1257
|
+
return score - methodScoreDelta;
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
function getGraphQLHandlerScore(parsedQuery) {
|
|
1261
|
+
return (_, handler) => {
|
|
1262
|
+
if (typeof parsedQuery.operationName === "undefined") {
|
|
1263
|
+
return Infinity;
|
|
1264
|
+
}
|
|
1265
|
+
const { operationType, operationName } = handler.info;
|
|
1266
|
+
if (typeof operationName !== "string") {
|
|
1267
|
+
return Infinity;
|
|
1268
|
+
}
|
|
1269
|
+
const hasSameOperationType = parsedQuery.operationType === operationType;
|
|
1270
|
+
const operationTypeScoreDelta = hasSameOperationType ? TYPE_MATCH_DELTA : 0;
|
|
1271
|
+
const score = (0, import_js_levenshtein2.default)(parsedQuery.operationName, operationName);
|
|
1272
|
+
return score - operationTypeScoreDelta;
|
|
1273
|
+
};
|
|
1274
|
+
}
|
|
1275
|
+
function getSuggestedHandler(request, handlers, getScore) {
|
|
1276
|
+
const suggestedHandlers = handlers.reduce((suggestions, handler) => {
|
|
1277
|
+
const score = getScore(request, handler);
|
|
1278
|
+
return suggestions.concat([[score, handler]]);
|
|
1279
|
+
}, []).sort(([leftScore], [rightScore]) => leftScore - rightScore).filter(([score]) => score <= MAX_MATCH_SCORE).slice(0, MAX_SUGGESTION_COUNT).map(([, handler]) => handler);
|
|
1280
|
+
return suggestedHandlers;
|
|
1281
|
+
}
|
|
1282
|
+
function getSuggestedHandlersMessage(handlers) {
|
|
1283
|
+
if (handlers.length > 1) {
|
|
1284
|
+
return `Did you mean to request one of the following resources instead?
|
|
1285
|
+
|
|
1286
|
+
${handlers.map((handler) => ` • ${handler.info.header}`).join("\n")}`;
|
|
1287
|
+
}
|
|
1288
|
+
return `Did you mean to request "${handlers[0].info.header}" instead?`;
|
|
1289
|
+
}
|
|
1290
|
+
function onUnhandledRequest(request, handlers, strategy = "warn") {
|
|
1291
|
+
const parsedGraphQLQuery = tryCatch(() => parseGraphQLRequest(request));
|
|
1292
|
+
function generateHandlerSuggestion() {
|
|
1293
|
+
const handlerGroups = groupHandlersByType(handlers);
|
|
1294
|
+
const relevantHandlers = parsedGraphQLQuery ? handlerGroups.graphql : handlerGroups.rest;
|
|
1295
|
+
const suggestedHandlers = getSuggestedHandler(request, relevantHandlers, parsedGraphQLQuery ? getGraphQLHandlerScore(parsedGraphQLQuery) : getRestHandlerScore());
|
|
1296
|
+
return suggestedHandlers.length > 0 ? getSuggestedHandlersMessage(suggestedHandlers) : "";
|
|
1297
|
+
}
|
|
1298
|
+
function generateUnhandledRequestMessage() {
|
|
1299
|
+
const publicUrl = getPublicUrlFromRequest(request);
|
|
1300
|
+
const requestHeader = parsedGraphQLQuery ? `${parsedGraphQLQuery.operationType} ${parsedGraphQLQuery.operationName} (${request.method} ${publicUrl})` : `${request.method} ${publicUrl}`;
|
|
1301
|
+
const handlerSuggestion = generateHandlerSuggestion();
|
|
1302
|
+
const messageTemplate = [
|
|
1303
|
+
`captured a request without a matching request handler:`,
|
|
1304
|
+
` • ${requestHeader}`,
|
|
1305
|
+
handlerSuggestion,
|
|
1306
|
+
`If you still wish to intercept this unhandled request, please create a request handler for it.
|
|
1307
|
+
Read more: https://mswjs.io/docs/getting-started/mocks`
|
|
1308
|
+
].filter(Boolean);
|
|
1309
|
+
return messageTemplate.join("\n\n");
|
|
1310
|
+
}
|
|
1311
|
+
function applyStrategy(strategy2) {
|
|
1312
|
+
const message = generateUnhandledRequestMessage();
|
|
1313
|
+
switch (strategy2) {
|
|
1314
|
+
case "error": {
|
|
1315
|
+
devUtils.error("Error: %s", message);
|
|
1316
|
+
throw new Error(devUtils.formatMessage('Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'));
|
|
1317
|
+
}
|
|
1318
|
+
case "warn": {
|
|
1319
|
+
devUtils.warn("Warning: %s", message);
|
|
1320
|
+
break;
|
|
1321
|
+
}
|
|
1322
|
+
case "bypass":
|
|
1323
|
+
break;
|
|
1324
|
+
default:
|
|
1325
|
+
throw new Error(devUtils.formatMessage('Failed to react to an unhandled request: unknown strategy "%s". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function as the value of the "onUnhandledRequest" option.', strategy2));
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
if (typeof strategy === "function") {
|
|
1329
|
+
strategy(request, {
|
|
1330
|
+
warning: applyStrategy.bind(null, "warn"),
|
|
1331
|
+
error: applyStrategy.bind(null, "error")
|
|
1332
|
+
});
|
|
1333
|
+
return;
|
|
1334
|
+
}
|
|
1335
|
+
applyStrategy(strategy);
|
|
1336
|
+
}
|
|
1337
|
+
var import_cookies2 = lib$1;
|
|
1338
|
+
function readResponseCookies(request, response2) {
|
|
1339
|
+
import_cookies2.store.add(__spreadProps(__spreadValues({}, request), { url: request.url.toString() }), response2);
|
|
1340
|
+
import_cookies2.store.persist();
|
|
1341
|
+
}
|
|
1342
|
+
async function handleRequest(request, handlers, options, emitter, handleRequestOptions) {
|
|
1343
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1344
|
+
emitter.emit("request:start", request);
|
|
1345
|
+
if (request.headers.get("x-msw-bypass") === "true") {
|
|
1346
|
+
emitter.emit("request:end", request);
|
|
1347
|
+
(_a = handleRequestOptions == null ? void 0 : handleRequestOptions.onPassthroughResponse) == null ? void 0 : _a.call(handleRequestOptions, request);
|
|
1348
|
+
return;
|
|
1349
|
+
}
|
|
1350
|
+
const [lookupError, lookupResult] = await (0, import_until2.until)(() => {
|
|
1351
|
+
return getResponse(request, handlers, handleRequestOptions == null ? void 0 : handleRequestOptions.resolutionContext);
|
|
1352
|
+
});
|
|
1353
|
+
if (lookupError) {
|
|
1354
|
+
emitter.emit("unhandledException", lookupError, request);
|
|
1355
|
+
throw lookupError;
|
|
1356
|
+
}
|
|
1357
|
+
const { handler, response: response2 } = lookupResult;
|
|
1358
|
+
if (!handler) {
|
|
1359
|
+
onUnhandledRequest(request, handlers, options.onUnhandledRequest);
|
|
1360
|
+
emitter.emit("request:unhandled", request);
|
|
1361
|
+
emitter.emit("request:end", request);
|
|
1362
|
+
(_b = handleRequestOptions == null ? void 0 : handleRequestOptions.onPassthroughResponse) == null ? void 0 : _b.call(handleRequestOptions, request);
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
if (!response2) {
|
|
1366
|
+
devUtils.warn(`Expected response resolver to return a mocked response Object, but got %s. The original response is going to be used instead.
|
|
1367
|
+
|
|
1368
|
+
• %s
|
|
1369
|
+
%s`, response2, handler.info.header, handler.info.callFrame);
|
|
1370
|
+
emitter.emit("request:end", request);
|
|
1371
|
+
(_c = handleRequestOptions == null ? void 0 : handleRequestOptions.onPassthroughResponse) == null ? void 0 : _c.call(handleRequestOptions, request);
|
|
1372
|
+
return;
|
|
1373
|
+
}
|
|
1374
|
+
if (response2.passthrough) {
|
|
1375
|
+
emitter.emit("request:end", request);
|
|
1376
|
+
(_d = handleRequestOptions == null ? void 0 : handleRequestOptions.onPassthroughResponse) == null ? void 0 : _d.call(handleRequestOptions, request);
|
|
1377
|
+
return;
|
|
1378
|
+
}
|
|
1379
|
+
readResponseCookies(request, response2);
|
|
1380
|
+
emitter.emit("request:match", request);
|
|
1381
|
+
const requiredLookupResult = lookupResult;
|
|
1382
|
+
const transformedResponse = ((_e = handleRequestOptions == null ? void 0 : handleRequestOptions.transformResponse) == null ? void 0 : _e.call(handleRequestOptions, response2)) || response2;
|
|
1383
|
+
(_f = handleRequestOptions == null ? void 0 : handleRequestOptions.onMockedResponse) == null ? void 0 : _f.call(handleRequestOptions, transformedResponse, requiredLookupResult);
|
|
1384
|
+
emitter.emit("request:end", request);
|
|
1385
|
+
return transformedResponse;
|
|
1386
|
+
}
|
|
1387
|
+
var import_headers_polyfill9 = lib$3;
|
|
1388
|
+
function serializeResponse(source) {
|
|
1389
|
+
return {
|
|
1390
|
+
status: source.status,
|
|
1391
|
+
statusText: source.statusText,
|
|
1392
|
+
headers: (0, import_headers_polyfill9.flattenHeadersObject)((0, import_headers_polyfill9.headersToObject)(source.headers)),
|
|
1393
|
+
body: source.body
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
1396
|
+
var createRequestListener = (context, options) => {
|
|
1397
|
+
return async (event, message) => {
|
|
1398
|
+
var _a;
|
|
1399
|
+
const messageChannel = new WorkerChannel(event.ports[0]);
|
|
1400
|
+
const request = parseWorkerRequest(message.payload);
|
|
1401
|
+
try {
|
|
1402
|
+
await handleRequest(request, context.requestHandlers, options, context.emitter, {
|
|
1403
|
+
transformResponse,
|
|
1404
|
+
onPassthroughResponse() {
|
|
1405
|
+
messageChannel.postMessage("NOT_FOUND");
|
|
1406
|
+
},
|
|
1407
|
+
async onMockedResponse(response2, { handler, publicRequest, parsedRequest }) {
|
|
1408
|
+
if (response2.body instanceof ReadableStream) {
|
|
1409
|
+
throw new Error(devUtils.formatMessage('Failed to construct a mocked response with a "ReadableStream" body: mocked streams are not supported. Follow https://github.com/mswjs/msw/issues/1336 for more details.'));
|
|
1410
|
+
}
|
|
1411
|
+
const responseInstance = new Response(response2.body, response2);
|
|
1412
|
+
const responseBodyBuffer = await responseInstance.arrayBuffer();
|
|
1413
|
+
const responseBody = response2.body == null ? null : responseBodyBuffer;
|
|
1414
|
+
messageChannel.postMessage("MOCK_RESPONSE", __spreadProps(__spreadValues({}, response2), {
|
|
1415
|
+
body: responseBody
|
|
1416
|
+
}), [responseBodyBuffer]);
|
|
1417
|
+
if (!options.quiet) {
|
|
1418
|
+
context.emitter.once("response:mocked", (response3) => {
|
|
1419
|
+
handler.log(publicRequest, serializeResponse(response3), parsedRequest);
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
});
|
|
1424
|
+
} catch (error2) {
|
|
1425
|
+
if (error2 instanceof NetworkError) {
|
|
1426
|
+
messageChannel.postMessage("NETWORK_ERROR", {
|
|
1427
|
+
name: error2.name,
|
|
1428
|
+
message: error2.message
|
|
1429
|
+
});
|
|
1430
|
+
return;
|
|
1431
|
+
}
|
|
1432
|
+
if (error2 instanceof Error) {
|
|
1433
|
+
devUtils.error(`Uncaught exception in the request handler for "%s %s":
|
|
1434
|
+
|
|
1435
|
+
%s
|
|
1436
|
+
|
|
1437
|
+
This exception has been gracefully handled as a 500 response, however, it's strongly recommended to resolve this error, as it indicates a mistake in your code. If you wish to mock an error response, please see this guide: https://mswjs.io/docs/recipes/mocking-error-responses`, request.method, request.url, (_a = error2.stack) != null ? _a : error2);
|
|
1438
|
+
messageChannel.postMessage("MOCK_RESPONSE", {
|
|
1439
|
+
status: 500,
|
|
1440
|
+
statusText: "Request Handler Error",
|
|
1441
|
+
headers: {
|
|
1442
|
+
"Content-Type": "application/json"
|
|
1443
|
+
},
|
|
1444
|
+
body: JSON.stringify({
|
|
1445
|
+
name: error2.name,
|
|
1446
|
+
message: error2.message,
|
|
1447
|
+
stack: error2.stack
|
|
1448
|
+
})
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1454
|
+
function transformResponse(response2) {
|
|
1455
|
+
return {
|
|
1456
|
+
status: response2.status,
|
|
1457
|
+
statusText: response2.statusText,
|
|
1458
|
+
headers: response2.headers.all(),
|
|
1459
|
+
body: response2.body,
|
|
1460
|
+
delay: response2.delay
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
async function requestIntegrityCheck(context, serviceWorker) {
|
|
1464
|
+
context.workerChannel.send("INTEGRITY_CHECK_REQUEST");
|
|
1465
|
+
const { payload: actualChecksum } = await context.events.once("INTEGRITY_CHECK_RESPONSE");
|
|
1466
|
+
if (actualChecksum !== "3d6b9f06410d179a7f7404d4bf4c3c70") {
|
|
1467
|
+
throw new Error(`Currently active Service Worker (${actualChecksum}) is behind the latest published one (${"3d6b9f06410d179a7f7404d4bf4c3c70"}).`);
|
|
1468
|
+
}
|
|
1469
|
+
return serviceWorker;
|
|
1470
|
+
}
|
|
1471
|
+
var import_until3 = lib$4;
|
|
1472
|
+
function deferNetworkRequestsUntil(predicatePromise) {
|
|
1473
|
+
const originalXhrSend = window.XMLHttpRequest.prototype.send;
|
|
1474
|
+
window.XMLHttpRequest.prototype.send = function(...args) {
|
|
1475
|
+
(0, import_until3.until)(() => predicatePromise).then(() => {
|
|
1476
|
+
window.XMLHttpRequest.prototype.send = originalXhrSend;
|
|
1477
|
+
this.send(...args);
|
|
1478
|
+
});
|
|
1479
|
+
};
|
|
1480
|
+
const originalFetch = window.fetch;
|
|
1481
|
+
window.fetch = async (...args) => {
|
|
1482
|
+
await (0, import_until3.until)(() => predicatePromise);
|
|
1483
|
+
window.fetch = originalFetch;
|
|
1484
|
+
return window.fetch(...args);
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
function createResponseListener(context) {
|
|
1488
|
+
return (_, message) => {
|
|
1489
|
+
var _a;
|
|
1490
|
+
const { payload: responseJson } = message;
|
|
1491
|
+
if ((_a = responseJson.type) == null ? void 0 : _a.includes("opaque")) {
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1494
|
+
const response2 = new Response(responseJson.body || null, responseJson);
|
|
1495
|
+
const isMockedResponse = response2.headers.get("x-powered-by") === "msw";
|
|
1496
|
+
if (isMockedResponse) {
|
|
1497
|
+
context.emitter.emit("response:mocked", response2, responseJson.requestId);
|
|
1498
|
+
} else {
|
|
1499
|
+
context.emitter.emit("response:bypass", response2, responseJson.requestId);
|
|
1500
|
+
}
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1503
|
+
function validateWorkerScope(registration, options) {
|
|
1504
|
+
if (!(options == null ? void 0 : options.quiet) && !location.href.startsWith(registration.scope)) {
|
|
1505
|
+
devUtils.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${registration.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.
|
|
1506
|
+
|
|
1507
|
+
- (Recommended) Register the worker at the root level ("/") of your application.
|
|
1508
|
+
- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`);
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
var createStartHandler = (context) => {
|
|
1512
|
+
return function start(options, customOptions) {
|
|
1513
|
+
const startWorkerInstance = async () => {
|
|
1514
|
+
context.events.removeAllListeners();
|
|
1515
|
+
context.workerChannel.on("REQUEST", createRequestListener(context, options));
|
|
1516
|
+
context.workerChannel.on("RESPONSE", createResponseListener(context));
|
|
1517
|
+
const instance = await getWorkerInstance(options.serviceWorker.url, options.serviceWorker.options, options.findWorker);
|
|
1518
|
+
const [worker, registration] = instance;
|
|
1519
|
+
if (!worker) {
|
|
1520
|
+
const missingWorkerMessage = (customOptions == null ? void 0 : customOptions.findWorker) ? devUtils.formatMessage(`Failed to locate the Service Worker registration using a custom "findWorker" predicate.
|
|
1521
|
+
|
|
1522
|
+
Please ensure that the custom predicate properly locates the Service Worker registration at "%s".
|
|
1523
|
+
More details: https://mswjs.io/docs/api/setup-worker/start#findworker
|
|
1524
|
+
`, options.serviceWorker.url) : devUtils.formatMessage(`Failed to locate the Service Worker registration.
|
|
1525
|
+
|
|
1526
|
+
This most likely means that the worker script URL "%s" cannot resolve against the actual public hostname (%s). This may happen if your application runs behind a proxy, or has a dynamic hostname.
|
|
1527
|
+
|
|
1528
|
+
Please consider using a custom "serviceWorker.url" option to point to the actual worker script location, or a custom "findWorker" option to resolve the Service Worker registration manually. More details: https://mswjs.io/docs/api/setup-worker/start`, options.serviceWorker.url, location.host);
|
|
1529
|
+
throw new Error(missingWorkerMessage);
|
|
1530
|
+
}
|
|
1531
|
+
context.worker = worker;
|
|
1532
|
+
context.registration = registration;
|
|
1533
|
+
context.events.addListener(window, "beforeunload", () => {
|
|
1534
|
+
if (worker.state !== "redundant") {
|
|
1535
|
+
context.workerChannel.send("CLIENT_CLOSED");
|
|
1536
|
+
}
|
|
1537
|
+
window.clearInterval(context.keepAliveInterval);
|
|
1538
|
+
});
|
|
1539
|
+
const [integrityError] = await (0, import_until4.until)(() => requestIntegrityCheck(context, worker));
|
|
1540
|
+
if (integrityError) {
|
|
1541
|
+
devUtils.error(`Detected outdated Service Worker: ${integrityError.message}
|
|
1542
|
+
|
|
1543
|
+
The mocking is still enabled, but it's highly recommended that you update your Service Worker by running:
|
|
1544
|
+
|
|
1545
|
+
$ npx msw init <PUBLIC_DIR>
|
|
1546
|
+
|
|
1547
|
+
This is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability.
|
|
1548
|
+
If this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues `);
|
|
1549
|
+
}
|
|
1550
|
+
context.keepAliveInterval = window.setInterval(() => context.workerChannel.send("KEEPALIVE_REQUEST"), 5e3);
|
|
1551
|
+
validateWorkerScope(registration, context.startOptions);
|
|
1552
|
+
return registration;
|
|
1553
|
+
};
|
|
1554
|
+
const workerRegistration = startWorkerInstance().then(async (registration) => {
|
|
1555
|
+
const pendingInstance = registration.installing || registration.waiting;
|
|
1556
|
+
if (pendingInstance) {
|
|
1557
|
+
await new Promise((resolve) => {
|
|
1558
|
+
pendingInstance.addEventListener("statechange", () => {
|
|
1559
|
+
if (pendingInstance.state === "activated") {
|
|
1560
|
+
return resolve();
|
|
1561
|
+
}
|
|
1562
|
+
});
|
|
1563
|
+
});
|
|
1564
|
+
}
|
|
1565
|
+
await enableMocking(context, options).catch((error2) => {
|
|
1566
|
+
throw new Error(`Failed to enable mocking: ${error2 == null ? void 0 : error2.message}`);
|
|
1567
|
+
});
|
|
1568
|
+
return registration;
|
|
1569
|
+
});
|
|
1570
|
+
if (options.waitUntilReady) {
|
|
1571
|
+
deferNetworkRequestsUntil(workerRegistration);
|
|
1572
|
+
}
|
|
1573
|
+
return workerRegistration;
|
|
1574
|
+
};
|
|
1575
|
+
};
|
|
1576
|
+
function printStopMessage(args = {}) {
|
|
1577
|
+
if (args.quiet) {
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
console.log(`%c${devUtils.formatMessage("Mocking disabled.")}`, "color:orangered;font-weight:bold;");
|
|
1581
|
+
}
|
|
1582
|
+
var createStop = (context) => {
|
|
1583
|
+
return function stop() {
|
|
1584
|
+
var _a;
|
|
1585
|
+
if (!context.isMockingEnabled) {
|
|
1586
|
+
devUtils.warn('Found a redundant "worker.stop()" call. Note that stopping the worker while mocking already stopped has no effect. Consider removing this "worker.stop()" call.');
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1589
|
+
context.workerChannel.send("MOCK_DEACTIVATE");
|
|
1590
|
+
context.isMockingEnabled = false;
|
|
1591
|
+
window.clearInterval(context.keepAliveInterval);
|
|
1592
|
+
printStopMessage({ quiet: (_a = context.startOptions) == null ? void 0 : _a.quiet });
|
|
1593
|
+
};
|
|
1594
|
+
};
|
|
1595
|
+
var DEFAULT_START_OPTIONS = {
|
|
1596
|
+
serviceWorker: {
|
|
1597
|
+
url: "/mockServiceWorker.js",
|
|
1598
|
+
options: null
|
|
1599
|
+
},
|
|
1600
|
+
quiet: false,
|
|
1601
|
+
waitUntilReady: true,
|
|
1602
|
+
onUnhandledRequest: "warn",
|
|
1603
|
+
findWorker(scriptURL, mockServiceWorkerUrl) {
|
|
1604
|
+
return scriptURL === mockServiceWorkerUrl;
|
|
1605
|
+
}
|
|
1606
|
+
};
|
|
1607
|
+
var import_interceptors4 = lib$2;
|
|
1608
|
+
var import_fetch3 = requireFetch();
|
|
1609
|
+
var import_XMLHttpRequest2 = requireXMLHttpRequest();
|
|
1610
|
+
var import_interceptors3 = lib$2;
|
|
1611
|
+
var noop = () => {
|
|
1612
|
+
throw new Error("Not implemented");
|
|
1613
|
+
};
|
|
1614
|
+
function createResponseFromIsomorphicResponse(response2) {
|
|
1615
|
+
return __spreadProps(__spreadValues({}, response2), {
|
|
1616
|
+
ok: response2.status >= 200 && response2.status < 300,
|
|
1617
|
+
url: "",
|
|
1618
|
+
type: "default",
|
|
1619
|
+
status: response2.status,
|
|
1620
|
+
statusText: response2.statusText,
|
|
1621
|
+
headers: response2.headers,
|
|
1622
|
+
body: new ReadableStream(),
|
|
1623
|
+
redirected: response2.headers.get("Location") != null,
|
|
1624
|
+
async text() {
|
|
1625
|
+
return response2.body || "";
|
|
1626
|
+
},
|
|
1627
|
+
async json() {
|
|
1628
|
+
return JSON.parse(response2.body || "");
|
|
1629
|
+
},
|
|
1630
|
+
async arrayBuffer() {
|
|
1631
|
+
return (0, import_interceptors3.encodeBuffer)(response2.body || "");
|
|
1632
|
+
},
|
|
1633
|
+
bodyUsed: false,
|
|
1634
|
+
formData: noop,
|
|
1635
|
+
blob: noop,
|
|
1636
|
+
clone: noop
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
function createFallbackRequestListener(context, options) {
|
|
1640
|
+
const interceptor = new import_interceptors4.BatchInterceptor({
|
|
1641
|
+
name: "fallback",
|
|
1642
|
+
interceptors: [new import_fetch3.FetchInterceptor(), new import_XMLHttpRequest2.XMLHttpRequestInterceptor()]
|
|
1643
|
+
});
|
|
1644
|
+
interceptor.on("request", async (request) => {
|
|
1645
|
+
const mockedRequest = new MockedRequest(request.url, __spreadProps(__spreadValues({}, request), {
|
|
1646
|
+
body: await request.arrayBuffer()
|
|
1647
|
+
}));
|
|
1648
|
+
const response2 = await handleRequest(mockedRequest, context.requestHandlers, options, context.emitter, {
|
|
1649
|
+
transformResponse(response3) {
|
|
1650
|
+
return {
|
|
1651
|
+
status: response3.status,
|
|
1652
|
+
statusText: response3.statusText,
|
|
1653
|
+
headers: response3.headers.all(),
|
|
1654
|
+
body: response3.body,
|
|
1655
|
+
delay: response3.delay
|
|
1656
|
+
};
|
|
1657
|
+
},
|
|
1658
|
+
onMockedResponse(_, { handler, publicRequest, parsedRequest }) {
|
|
1659
|
+
if (!options.quiet) {
|
|
1660
|
+
context.emitter.once("response:mocked", (response3) => {
|
|
1661
|
+
handler.log(publicRequest, serializeResponse(response3), parsedRequest);
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
});
|
|
1666
|
+
if (response2) {
|
|
1667
|
+
request.respondWith(response2);
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
interceptor.on("response", (request, response2) => {
|
|
1671
|
+
if (!request.id) {
|
|
1672
|
+
return;
|
|
1673
|
+
}
|
|
1674
|
+
const browserResponse = createResponseFromIsomorphicResponse(response2);
|
|
1675
|
+
if (response2.headers.get("x-powered-by") === "msw") {
|
|
1676
|
+
context.emitter.emit("response:mocked", browserResponse, request.id);
|
|
1677
|
+
} else {
|
|
1678
|
+
context.emitter.emit("response:bypass", browserResponse, request.id);
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
interceptor.apply();
|
|
1682
|
+
return interceptor;
|
|
1683
|
+
}
|
|
1684
|
+
function createFallbackStart(context) {
|
|
1685
|
+
return async function start(options) {
|
|
1686
|
+
context.fallbackInterceptor = createFallbackRequestListener(context, options);
|
|
1687
|
+
printStartMessage({
|
|
1688
|
+
message: "Mocking enabled (fallback mode).",
|
|
1689
|
+
quiet: options.quiet
|
|
1690
|
+
});
|
|
1691
|
+
return void 0;
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
function createFallbackStop(context) {
|
|
1695
|
+
return function stop() {
|
|
1696
|
+
var _a, _b;
|
|
1697
|
+
(_a = context.fallbackInterceptor) == null ? void 0 : _a.dispose();
|
|
1698
|
+
printStopMessage({ quiet: (_b = context.startOptions) == null ? void 0 : _b.quiet });
|
|
1699
|
+
};
|
|
1700
|
+
}
|
|
1701
|
+
var import_outvariant3 = lib$5;
|
|
1702
|
+
var import_strict_event_emitter = requireLib();
|
|
1703
|
+
function pipeEvents(source, destination) {
|
|
1704
|
+
const rawEmit = source.emit;
|
|
1705
|
+
if (rawEmit._isPiped) {
|
|
1706
|
+
return;
|
|
1707
|
+
}
|
|
1708
|
+
source.emit = function(event, ...data2) {
|
|
1709
|
+
destination.emit(event, ...data2);
|
|
1710
|
+
return rawEmit.call(this, event, ...data2);
|
|
1711
|
+
};
|
|
1712
|
+
source.emit._isPiped = true;
|
|
1713
|
+
}
|
|
1714
|
+
function toReadonlyArray(source) {
|
|
1715
|
+
const clone = [...source];
|
|
1716
|
+
Object.freeze(clone);
|
|
1717
|
+
return clone;
|
|
1718
|
+
}
|
|
1719
|
+
var SetupApi = class {
|
|
1720
|
+
constructor(...initialHandlers) {
|
|
1721
|
+
this.validateHandlers(...initialHandlers);
|
|
1722
|
+
this.initialHandlers = toReadonlyArray(initialHandlers);
|
|
1723
|
+
this.currentHandlers = [...initialHandlers];
|
|
1724
|
+
this.emitter = new import_strict_event_emitter.StrictEventEmitter();
|
|
1725
|
+
this.publicEmitter = new import_strict_event_emitter.StrictEventEmitter();
|
|
1726
|
+
pipeEvents(this.emitter, this.publicEmitter);
|
|
1727
|
+
this.events = this.createLifeCycleEvents();
|
|
1728
|
+
}
|
|
1729
|
+
validateHandlers(...handlers) {
|
|
1730
|
+
for (const handler of handlers) {
|
|
1731
|
+
(0, import_outvariant3.invariant)(!Array.isArray(handler), devUtils.formatMessage('Failed to construct "%s" given an Array of request handlers. Make sure you spread the request handlers when calling the respective setup function.'), this.constructor.name);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
dispose() {
|
|
1735
|
+
this.emitter.removeAllListeners();
|
|
1736
|
+
this.publicEmitter.removeAllListeners();
|
|
1737
|
+
}
|
|
1738
|
+
use(...runtimeHandlers) {
|
|
1739
|
+
this.currentHandlers.unshift(...runtimeHandlers);
|
|
1740
|
+
}
|
|
1741
|
+
restoreHandlers() {
|
|
1742
|
+
this.currentHandlers.forEach((handler) => {
|
|
1743
|
+
handler.markAsSkipped(false);
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1746
|
+
resetHandlers(...nextHandlers) {
|
|
1747
|
+
this.currentHandlers = nextHandlers.length > 0 ? [...nextHandlers] : [...this.initialHandlers];
|
|
1748
|
+
}
|
|
1749
|
+
listHandlers() {
|
|
1750
|
+
return toReadonlyArray(this.currentHandlers);
|
|
1751
|
+
}
|
|
1752
|
+
createLifeCycleEvents() {
|
|
1753
|
+
return {
|
|
1754
|
+
on: (...args) => {
|
|
1755
|
+
return this.publicEmitter.on(...args);
|
|
1756
|
+
},
|
|
1757
|
+
removeListener: (...args) => {
|
|
1758
|
+
return this.publicEmitter.removeListener(...args);
|
|
1759
|
+
},
|
|
1760
|
+
removeAllListeners: (...args) => {
|
|
1761
|
+
return this.publicEmitter.removeAllListeners(...args);
|
|
1762
|
+
}
|
|
1763
|
+
};
|
|
1764
|
+
}
|
|
1765
|
+
};
|
|
1766
|
+
var SetupWorkerApi = class extends SetupApi {
|
|
1767
|
+
constructor(...handlers) {
|
|
1768
|
+
super(...handlers);
|
|
1769
|
+
this.startHandler = null;
|
|
1770
|
+
this.stopHandler = null;
|
|
1771
|
+
(0, import_outvariant4.invariant)(!(0, import_is_node_process3.isNodeProcess)(), devUtils.formatMessage("Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead."));
|
|
1772
|
+
this.listeners = [];
|
|
1773
|
+
this.context = this.createWorkerContext();
|
|
1774
|
+
}
|
|
1775
|
+
createWorkerContext() {
|
|
1776
|
+
const context = {
|
|
1777
|
+
isMockingEnabled: false,
|
|
1778
|
+
startOptions: null,
|
|
1779
|
+
worker: null,
|
|
1780
|
+
registration: null,
|
|
1781
|
+
requestHandlers: this.currentHandlers,
|
|
1782
|
+
emitter: this.emitter,
|
|
1783
|
+
workerChannel: {
|
|
1784
|
+
on: (eventType, callback) => {
|
|
1785
|
+
this.context.events.addListener(navigator.serviceWorker, "message", (event) => {
|
|
1786
|
+
if (event.source !== this.context.worker) {
|
|
1787
|
+
return;
|
|
1788
|
+
}
|
|
1789
|
+
const message = event.data;
|
|
1790
|
+
if (!message) {
|
|
1791
|
+
return;
|
|
1792
|
+
}
|
|
1793
|
+
if (message.type === eventType) {
|
|
1794
|
+
callback(event, message);
|
|
1795
|
+
}
|
|
1796
|
+
});
|
|
1797
|
+
},
|
|
1798
|
+
send: (type) => {
|
|
1799
|
+
var _a;
|
|
1800
|
+
(_a = this.context.worker) == null ? void 0 : _a.postMessage(type);
|
|
1801
|
+
}
|
|
1802
|
+
},
|
|
1803
|
+
events: {
|
|
1804
|
+
addListener: (target, eventType, callback) => {
|
|
1805
|
+
target.addEventListener(eventType, callback);
|
|
1806
|
+
this.listeners.push({ eventType, target, callback });
|
|
1807
|
+
return () => {
|
|
1808
|
+
target.removeEventListener(eventType, callback);
|
|
1809
|
+
};
|
|
1810
|
+
},
|
|
1811
|
+
removeAllListeners: () => {
|
|
1812
|
+
for (const { target, eventType, callback } of this.listeners) {
|
|
1813
|
+
target.removeEventListener(eventType, callback);
|
|
1814
|
+
}
|
|
1815
|
+
this.listeners = [];
|
|
1816
|
+
},
|
|
1817
|
+
once: (eventType) => {
|
|
1818
|
+
const bindings = [];
|
|
1819
|
+
return new Promise((resolve, reject) => {
|
|
1820
|
+
const handleIncomingMessage = (event) => {
|
|
1821
|
+
try {
|
|
1822
|
+
const message = event.data;
|
|
1823
|
+
if (message.type === eventType) {
|
|
1824
|
+
resolve(message);
|
|
1825
|
+
}
|
|
1826
|
+
} catch (error2) {
|
|
1827
|
+
reject(error2);
|
|
1828
|
+
}
|
|
1829
|
+
};
|
|
1830
|
+
bindings.push(this.context.events.addListener(navigator.serviceWorker, "message", handleIncomingMessage), this.context.events.addListener(navigator.serviceWorker, "messageerror", reject));
|
|
1831
|
+
}).finally(() => {
|
|
1832
|
+
bindings.forEach((unbind) => unbind());
|
|
1833
|
+
});
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1836
|
+
useFallbackMode: !("serviceWorker" in navigator) || location.protocol === "file:"
|
|
1837
|
+
};
|
|
1838
|
+
Object.defineProperties(context, {
|
|
1839
|
+
requestHandlers: {
|
|
1840
|
+
get: () => this.currentHandlers
|
|
1841
|
+
}
|
|
1842
|
+
});
|
|
1843
|
+
this.startHandler = context.useFallbackMode ? createFallbackStart(context) : createStartHandler(context);
|
|
1844
|
+
this.stopHandler = context.useFallbackMode ? createFallbackStop(context) : createStop(context);
|
|
1845
|
+
return context;
|
|
1846
|
+
}
|
|
1847
|
+
async start(options = {}) {
|
|
1848
|
+
this.context.startOptions = mergeRight(DEFAULT_START_OPTIONS, options);
|
|
1849
|
+
return await this.startHandler(this.context.startOptions, options);
|
|
1850
|
+
}
|
|
1851
|
+
printHandlers() {
|
|
1852
|
+
const handlers = this.listHandlers();
|
|
1853
|
+
handlers.forEach((handler) => {
|
|
1854
|
+
const { header, callFrame } = handler.info;
|
|
1855
|
+
const pragma = handler.info.hasOwnProperty("operationType") ? "[graphql]" : "[rest]";
|
|
1856
|
+
console.groupCollapsed(`${pragma} ${header}`);
|
|
1857
|
+
if (callFrame) {
|
|
1858
|
+
console.log(`Declaration: ${callFrame}`);
|
|
1859
|
+
}
|
|
1860
|
+
console.log("Handler:", handler);
|
|
1861
|
+
console.groupEnd();
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
stop() {
|
|
1865
|
+
super.dispose();
|
|
1866
|
+
this.context.events.removeAllListeners();
|
|
1867
|
+
this.context.emitter.removeAllListeners();
|
|
1868
|
+
this.stopHandler();
|
|
1869
|
+
}
|
|
1870
|
+
};
|
|
1871
|
+
function setupWorker(...handlers) {
|
|
1872
|
+
return new SetupWorkerApi(...handlers);
|
|
1873
|
+
}
|
|
1874
|
+
function createRestHandler(method) {
|
|
1875
|
+
return (path, resolver) => {
|
|
1876
|
+
return new RestHandler(method, path, resolver);
|
|
1877
|
+
};
|
|
1878
|
+
}
|
|
1879
|
+
var rest = {
|
|
1880
|
+
all: createRestHandler(/.+/),
|
|
1881
|
+
head: createRestHandler(
|
|
1882
|
+
"HEAD"
|
|
1883
|
+
/* HEAD */
|
|
1884
|
+
),
|
|
1885
|
+
get: createRestHandler(
|
|
1886
|
+
"GET"
|
|
1887
|
+
/* GET */
|
|
1888
|
+
),
|
|
1889
|
+
post: createRestHandler(
|
|
1890
|
+
"POST"
|
|
1891
|
+
/* POST */
|
|
1892
|
+
),
|
|
1893
|
+
put: createRestHandler(
|
|
1894
|
+
"PUT"
|
|
1895
|
+
/* PUT */
|
|
1896
|
+
),
|
|
1897
|
+
delete: createRestHandler(
|
|
1898
|
+
"DELETE"
|
|
1899
|
+
/* DELETE */
|
|
1900
|
+
),
|
|
1901
|
+
patch: createRestHandler(
|
|
1902
|
+
"PATCH"
|
|
1903
|
+
/* PATCH */
|
|
1904
|
+
),
|
|
1905
|
+
options: createRestHandler(
|
|
1906
|
+
"OPTIONS"
|
|
1907
|
+
/* OPTIONS */
|
|
1908
|
+
)
|
|
1909
|
+
};
|
|
1910
|
+
function createScopedGraphQLHandler(operationType, url) {
|
|
1911
|
+
return (operationName, resolver) => {
|
|
1912
|
+
return new GraphQLHandler(operationType, operationName, url, resolver);
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1915
|
+
function createGraphQLOperationHandler(url) {
|
|
1916
|
+
return (resolver) => {
|
|
1917
|
+
return new GraphQLHandler("all", new RegExp(".*"), url, resolver);
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
var standardGraphQLHandlers = {
|
|
1921
|
+
operation: createGraphQLOperationHandler("*"),
|
|
1922
|
+
query: createScopedGraphQLHandler("query", "*"),
|
|
1923
|
+
mutation: createScopedGraphQLHandler("mutation", "*")
|
|
1924
|
+
};
|
|
1925
|
+
function createGraphQLLink(url) {
|
|
1926
|
+
return {
|
|
1927
|
+
operation: createGraphQLOperationHandler(url),
|
|
1928
|
+
query: createScopedGraphQLHandler("query", url),
|
|
1929
|
+
mutation: createScopedGraphQLHandler("mutation", url)
|
|
1930
|
+
};
|
|
1931
|
+
}
|
|
1932
|
+
var graphql = __spreadProps(__spreadValues({}, standardGraphQLHandlers), {
|
|
1933
|
+
link: createGraphQLLink
|
|
1934
|
+
});
|
|
1935
|
+
export {
|
|
1936
|
+
lib as default
|
|
1937
|
+
};
|
|
1938
|
+
//# sourceMappingURL=index.js.map
|