prismic-ts-codegen 0.1.28 → 0.1.29
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/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/cli/configSchema.cjs +29 -36
- package/dist/cli/configSchema.cjs.map +1 -1
- package/dist/cli/configSchema.d.cts +39 -0
- package/dist/cli/configSchema.d.cts.map +1 -0
- package/dist/cli/configSchema.d.ts +39 -3
- package/dist/cli/configSchema.d.ts.map +1 -0
- package/dist/cli/configSchema.js +29 -37
- package/dist/cli/configSchema.js.map +1 -1
- package/dist/cli/constants.cjs +4 -3
- package/dist/cli/constants.cjs.map +1 -1
- package/dist/cli/constants.d.cts +5 -0
- package/dist/cli/constants.d.cts.map +1 -0
- package/dist/cli/constants.d.ts +5 -1
- package/dist/cli/constants.d.ts.map +1 -0
- package/dist/cli/constants.js +5 -4
- package/dist/cli/constants.js.map +1 -1
- package/dist/cli/loadConfig.cjs +17 -27
- package/dist/cli/loadConfig.cjs.map +1 -1
- package/dist/cli/loadConfig.js +13 -25
- package/dist/cli/loadConfig.js.map +1 -1
- package/dist/cli/loadLocaleIDs.cjs +18 -17
- package/dist/cli/loadLocaleIDs.cjs.map +1 -1
- package/dist/cli/loadLocaleIDs.js +16 -18
- package/dist/cli/loadLocaleIDs.js.map +1 -1
- package/dist/cli/loadModels.cjs +45 -70
- package/dist/cli/loadModels.cjs.map +1 -1
- package/dist/cli/loadModels.js +40 -52
- package/dist/cli/loadModels.js.map +1 -1
- package/dist/cli.cjs +78 -91
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +68 -81
- package/dist/cli.js.map +1 -1
- package/dist/constants.cjs +26 -25
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.js +27 -28
- package/dist/constants.js.map +1 -1
- package/dist/detectTypesProvider.cjs +22 -17
- package/dist/detectTypesProvider.cjs.map +1 -1
- package/dist/detectTypesProvider.d.cts +17 -0
- package/dist/detectTypesProvider.d.cts.map +1 -0
- package/dist/detectTypesProvider.d.ts +10 -6
- package/dist/detectTypesProvider.d.ts.map +1 -0
- package/dist/detectTypesProvider.js +21 -17
- package/dist/detectTypesProvider.js.map +1 -1
- package/dist/generateTypes.cjs +76 -85
- package/dist/generateTypes.cjs.map +1 -1
- package/dist/generateTypes.d.cts +21 -0
- package/dist/generateTypes.d.cts.map +1 -0
- package/dist/generateTypes.d.ts +20 -15
- package/dist/generateTypes.d.ts.map +1 -0
- package/dist/generateTypes.js +70 -81
- package/dist/generateTypes.js.map +1 -1
- package/dist/index.cjs +6 -8
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -6
- package/dist/index.js +1 -6
- package/dist/lib/addBlankLine.cjs +7 -9
- package/dist/lib/addBlankLine.cjs.map +1 -1
- package/dist/lib/addBlankLine.js +7 -9
- package/dist/lib/addBlankLine.js.map +1 -1
- package/dist/lib/addLine.cjs +6 -5
- package/dist/lib/addLine.cjs.map +1 -1
- package/dist/lib/addLine.js +6 -5
- package/dist/lib/addLine.js.map +1 -1
- package/dist/lib/addSection.cjs +6 -5
- package/dist/lib/addSection.cjs.map +1 -1
- package/dist/lib/addSection.js +6 -5
- package/dist/lib/addSection.js.map +1 -1
- package/dist/lib/addTrailingNewLine.cjs +6 -8
- package/dist/lib/addTrailingNewLine.cjs.map +1 -1
- package/dist/lib/addTrailingNewLine.js +7 -9
- package/dist/lib/addTrailingNewLine.js.map +1 -1
- package/dist/lib/buildCustomTypeDataType.cjs +41 -44
- package/dist/lib/buildCustomTypeDataType.cjs.map +1 -1
- package/dist/lib/buildCustomTypeDataType.js +39 -43
- package/dist/lib/buildCustomTypeDataType.js.map +1 -1
- package/dist/lib/buildCustomTypeType.cjs +50 -50
- package/dist/lib/buildCustomTypeType.cjs.map +1 -1
- package/dist/lib/buildCustomTypeType.js +44 -45
- package/dist/lib/buildCustomTypeType.js.map +1 -1
- package/dist/lib/buildFieldDocs.cjs +59 -92
- package/dist/lib/buildFieldDocs.cjs.map +1 -1
- package/dist/lib/buildFieldDocs.js +56 -89
- package/dist/lib/buildFieldDocs.js.map +1 -1
- package/dist/lib/buildFieldProperties.cjs +255 -309
- package/dist/lib/buildFieldProperties.cjs.map +1 -1
- package/dist/lib/buildFieldProperties.js +249 -304
- package/dist/lib/buildFieldProperties.js.map +1 -1
- package/dist/lib/buildSharedSliceType.cjs +106 -109
- package/dist/lib/buildSharedSliceType.cjs.map +1 -1
- package/dist/lib/buildSharedSliceType.js +98 -102
- package/dist/lib/buildSharedSliceType.js.map +1 -1
- package/dist/lib/buildTypeName.cjs +9 -11
- package/dist/lib/buildTypeName.cjs.map +1 -1
- package/dist/lib/buildTypeName.js +8 -11
- package/dist/lib/buildTypeName.js.map +1 -1
- package/dist/lib/buildUnion.cjs +5 -4
- package/dist/lib/buildUnion.cjs.map +1 -1
- package/dist/lib/buildUnion.js +6 -5
- package/dist/lib/buildUnion.js.map +1 -1
- package/dist/lib/checkHasUIDFIeld.cjs +5 -4
- package/dist/lib/checkHasUIDFIeld.cjs.map +1 -1
- package/dist/lib/checkHasUIDFIeld.js +6 -5
- package/dist/lib/checkHasUIDFIeld.js.map +1 -1
- package/dist/lib/getAPIIDPath.cjs +21 -23
- package/dist/lib/getAPIIDPath.cjs.map +1 -1
- package/dist/lib/getAPIIDPath.js +22 -24
- package/dist/lib/getAPIIDPath.js.map +1 -1
- package/dist/lib/getCacheKey.cjs +14 -22
- package/dist/lib/getCacheKey.cjs.map +1 -1
- package/dist/lib/getCacheKey.js +12 -5
- package/dist/lib/getCacheKey.js.map +1 -1
- package/dist/lib/getHumanReadableModelName.cjs +12 -17
- package/dist/lib/getHumanReadableModelName.cjs.map +1 -1
- package/dist/lib/getHumanReadableModelName.js +13 -18
- package/dist/lib/getHumanReadableModelName.js.map +1 -1
- package/dist/lib/getHumanReadablePath.cjs +13 -16
- package/dist/lib/getHumanReadablePath.cjs.map +1 -1
- package/dist/lib/getHumanReadablePath.js +13 -16
- package/dist/lib/getHumanReadablePath.js.map +1 -1
- package/dist/types.d.cts +14 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +13 -21
- package/dist/types.d.ts.map +1 -0
- package/package.json +35 -49
- package/src/cli/configSchema.ts +181 -50
- package/src/cli/constants.ts +1 -2
- package/src/cli/index.ts +14 -24
- package/src/cli/loadConfig.ts +5 -9
- package/src/cli/loadLocaleIDs.ts +1 -3
- package/src/cli/loadModels.ts +8 -10
- package/src/constants.ts +1 -2
- package/src/detectTypesProvider.ts +3 -8
- package/src/generateTypes.ts +3 -10
- package/src/index.ts +1 -2
- package/src/lib/addBlankLine.ts +1 -1
- package/src/lib/addLine.ts +1 -1
- package/src/lib/addSection.ts +1 -1
- package/src/lib/addTrailingNewLine.ts +1 -4
- package/src/lib/buildCustomTypeDataType.ts +1 -3
- package/src/lib/buildCustomTypeType.ts +4 -6
- package/src/lib/buildFieldDocs.ts +7 -23
- package/src/lib/buildFieldProperties.ts +25 -66
- package/src/lib/buildSharedSliceType.ts +8 -10
- package/src/lib/buildTypeName.ts +1 -1
- package/src/lib/buildUnion.ts +1 -1
- package/src/lib/getAPIIDPath.ts +2 -2
- package/src/lib/getCacheKey.ts +1 -3
- package/src/lib/getHumanReadableModelName.ts +2 -8
- package/src/lib/getHumanReadablePath.ts +2 -3
- package/src/types.ts +1 -5
- package/dist/_node_modules/@babel/code-frame/lib/index.cjs +0 -217
- package/dist/_node_modules/@babel/code-frame/lib/index.cjs.map +0 -1
- package/dist/_node_modules/@babel/code-frame/lib/index.js +0 -216
- package/dist/_node_modules/@babel/code-frame/lib/index.js.map +0 -1
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.cjs +0 -82
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.cjs.map +0 -1
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.js +0 -83
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +0 -1
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.cjs +0 -62
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.cjs.map +0 -1
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.js +0 -61
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/index.js.map +0 -1
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.cjs +0 -35
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.cjs.map +0 -1
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.js +0 -36
- package/dist/_node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/Client.cjs +0 -1231
- package/dist/_node_modules/@prismicio/client/dist/Client.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/Client.js +0 -1231
- package/dist/_node_modules/@prismicio/client/dist/Client.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/buildQueryURL.cjs +0 -66
- package/dist/_node_modules/@prismicio/client/dist/buildQueryURL.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/buildQueryURL.js +0 -66
- package/dist/_node_modules/@prismicio/client/dist/buildQueryURL.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/cookie.cjs +0 -5
- package/dist/_node_modules/@prismicio/client/dist/cookie.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/cookie.js +0 -5
- package/dist/_node_modules/@prismicio/client/dist/cookie.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/createClient.cjs +0 -6
- package/dist/_node_modules/@prismicio/client/dist/createClient.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/createClient.js +0 -6
- package/dist/_node_modules/@prismicio/client/dist/createClient.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/ForbiddenError.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/ForbiddenError.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/ForbiddenError.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/ForbiddenError.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/NotFoundError.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/NotFoundError.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/NotFoundError.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/NotFoundError.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/ParsingError.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/ParsingError.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/ParsingError.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/ParsingError.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/PreviewTokenExpired.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/PreviewTokenExpired.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/PreviewTokenExpired.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/PreviewTokenExpired.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/PrismicError.cjs +0 -16
- package/dist/_node_modules/@prismicio/client/dist/errors/PrismicError.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/PrismicError.js +0 -16
- package/dist/_node_modules/@prismicio/client/dist/errors/PrismicError.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/RefExpiredError.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/RefExpiredError.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/RefExpiredError.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/RefExpiredError.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/RefNotFoundError.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/RefNotFoundError.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/RefNotFoundError.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/RefNotFoundError.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/RepositoryNotFoundError.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/RepositoryNotFoundError.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/errors/RepositoryNotFoundError.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/errors/RepositoryNotFoundError.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/filter.cjs +0 -247
- package/dist/_node_modules/@prismicio/client/dist/filter.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/filter.js +0 -247
- package/dist/_node_modules/@prismicio/client/dist/filter.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/getRepositoryEndpoint.cjs +0 -13
- package/dist/_node_modules/@prismicio/client/dist/getRepositoryEndpoint.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/getRepositoryEndpoint.js +0 -13
- package/dist/_node_modules/@prismicio/client/dist/getRepositoryEndpoint.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/getRepositoryName.cjs +0 -17
- package/dist/_node_modules/@prismicio/client/dist/getRepositoryName.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/getRepositoryName.js +0 -17
- package/dist/_node_modules/@prismicio/client/dist/getRepositoryName.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asLink.cjs +0 -47
- package/dist/_node_modules/@prismicio/client/dist/helpers/asLink.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/asLink.js +0 -47
- package/dist/_node_modules/@prismicio/client/dist/helpers/asLink.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/documentToLinkField.cjs +0 -27
- package/dist/_node_modules/@prismicio/client/dist/helpers/documentToLinkField.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/helpers/documentToLinkField.js +0 -27
- package/dist/_node_modules/@prismicio/client/dist/helpers/documentToLinkField.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/isRepositoryEndpoint.cjs +0 -12
- package/dist/_node_modules/@prismicio/client/dist/isRepositoryEndpoint.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/isRepositoryEndpoint.js +0 -12
- package/dist/_node_modules/@prismicio/client/dist/isRepositoryEndpoint.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/isRepositoryName.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/isRepositoryName.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/isRepositoryName.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/isRepositoryName.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/appendFilters.cjs +0 -11
- package/dist/_node_modules/@prismicio/client/dist/lib/appendFilters.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/appendFilters.js +0 -11
- package/dist/_node_modules/@prismicio/client/dist/lib/appendFilters.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/castArray.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/lib/castArray.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/castArray.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/lib/castArray.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/castThunk.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/lib/castThunk.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/castThunk.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/lib/castThunk.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/devMsg.cjs +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/devMsg.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/devMsg.js +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/devMsg.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/everyTagFilter.cjs +0 -9
- package/dist/_node_modules/@prismicio/client/dist/lib/everyTagFilter.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/everyTagFilter.js +0 -9
- package/dist/_node_modules/@prismicio/client/dist/lib/everyTagFilter.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/findMasterRef.cjs +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/findMasterRef.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/findMasterRef.js +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/findMasterRef.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/findRef.cjs +0 -12
- package/dist/_node_modules/@prismicio/client/dist/lib/findRef.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/findRef.js +0 -12
- package/dist/_node_modules/@prismicio/client/dist/lib/findRef.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/findRefByID.cjs +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/findRefByID.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/findRefByID.js +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/findRefByID.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/findRefByLabel.cjs +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/findRefByLabel.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/findRefByLabel.js +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/findRefByLabel.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/getPreviewCookie.cjs +0 -21
- package/dist/_node_modules/@prismicio/client/dist/lib/getPreviewCookie.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/getPreviewCookie.js +0 -21
- package/dist/_node_modules/@prismicio/client/dist/lib/getPreviewCookie.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/minifyGraphQLQuery.cjs +0 -7
- package/dist/_node_modules/@prismicio/client/dist/lib/minifyGraphQLQuery.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/minifyGraphQLQuery.js +0 -7
- package/dist/_node_modules/@prismicio/client/dist/lib/minifyGraphQLQuery.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/pLimit.cjs +0 -49
- package/dist/_node_modules/@prismicio/client/dist/lib/pLimit.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/pLimit.js +0 -49
- package/dist/_node_modules/@prismicio/client/dist/lib/pLimit.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/request.cjs +0 -43
- package/dist/_node_modules/@prismicio/client/dist/lib/request.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/request.js +0 -43
- package/dist/_node_modules/@prismicio/client/dist/lib/request.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/someTagsFilter.cjs +0 -9
- package/dist/_node_modules/@prismicio/client/dist/lib/someTagsFilter.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/someTagsFilter.js +0 -9
- package/dist/_node_modules/@prismicio/client/dist/lib/someTagsFilter.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/throttledLog.cjs +0 -17
- package/dist/_node_modules/@prismicio/client/dist/lib/throttledLog.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/throttledLog.js +0 -17
- package/dist/_node_modules/@prismicio/client/dist/lib/throttledLog.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/typeFilter.cjs +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/typeFilter.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/lib/typeFilter.js +0 -8
- package/dist/_node_modules/@prismicio/client/dist/lib/typeFilter.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/package.json.cjs +0 -5
- package/dist/_node_modules/@prismicio/client/dist/package.json.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/package.json.js +0 -5
- package/dist/_node_modules/@prismicio/client/dist/package.json.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/types/model/types.cjs +0 -39
- package/dist/_node_modules/@prismicio/client/dist/types/model/types.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/types/model/types.js +0 -39
- package/dist/_node_modules/@prismicio/client/dist/types/model/types.js.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/types/value/link.cjs +0 -10
- package/dist/_node_modules/@prismicio/client/dist/types/value/link.cjs.map +0 -1
- package/dist/_node_modules/@prismicio/client/dist/types/value/link.js +0 -10
- package/dist/_node_modules/@prismicio/client/dist/types/value/link.js.map +0 -1
- package/dist/_node_modules/arrify/index.cjs +0 -10
- package/dist/_node_modules/arrify/index.cjs.map +0 -1
- package/dist/_node_modules/arrify/index.js +0 -10
- package/dist/_node_modules/arrify/index.js.map +0 -1
- package/dist/_node_modules/camelcase/index.cjs +0 -83
- package/dist/_node_modules/camelcase/index.cjs.map +0 -1
- package/dist/_node_modules/camelcase/index.js +0 -84
- package/dist/_node_modules/camelcase/index.js.map +0 -1
- package/dist/_node_modules/camelcase-keys/index.cjs +0 -55
- package/dist/_node_modules/camelcase-keys/index.cjs.map +0 -1
- package/dist/_node_modules/camelcase-keys/index.js +0 -56
- package/dist/_node_modules/camelcase-keys/index.js.map +0 -1
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs +0 -41
- package/dist/_node_modules/data-uri-to-buffer/dist/index.cjs.map +0 -1
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js +0 -41
- package/dist/_node_modules/data-uri-to-buffer/dist/index.js.map +0 -1
- package/dist/_node_modules/decamelize/index.cjs +0 -38
- package/dist/_node_modules/decamelize/index.cjs.map +0 -1
- package/dist/_node_modules/decamelize/index.js +0 -39
- package/dist/_node_modules/decamelize/index.js.map +0 -1
- package/dist/_node_modules/decamelize-keys/index.cjs +0 -50
- package/dist/_node_modules/decamelize-keys/index.cjs.map +0 -1
- package/dist/_node_modules/decamelize-keys/index.js +0 -51
- package/dist/_node_modules/decamelize-keys/index.js.map +0 -1
- package/dist/_node_modules/error-ex/index.cjs +0 -109
- package/dist/_node_modules/error-ex/index.cjs.map +0 -1
- package/dist/_node_modules/error-ex/index.js +0 -109
- package/dist/_node_modules/error-ex/index.js.map +0 -1
- package/dist/_node_modules/fetch-blob/file.cjs +0 -61
- package/dist/_node_modules/fetch-blob/file.cjs.map +0 -1
- package/dist/_node_modules/fetch-blob/file.js +0 -61
- package/dist/_node_modules/fetch-blob/file.js.map +0 -1
- package/dist/_node_modules/fetch-blob/index.cjs +0 -223
- package/dist/_node_modules/fetch-blob/index.cjs.map +0 -1
- package/dist/_node_modules/fetch-blob/index.js +0 -223
- package/dist/_node_modules/fetch-blob/index.js.map +0 -1
- package/dist/_node_modules/fetch-blob/streams.cjs +0 -43
- package/dist/_node_modules/fetch-blob/streams.cjs.map +0 -1
- package/dist/_node_modules/fetch-blob/streams.js +0 -42
- package/dist/_node_modules/fetch-blob/streams.js.map +0 -1
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs +0 -116
- package/dist/_node_modules/formdata-polyfill/esm.min.cjs.map +0 -1
- package/dist/_node_modules/formdata-polyfill/esm.min.js +0 -116
- package/dist/_node_modules/formdata-polyfill/esm.min.js.map +0 -1
- package/dist/_node_modules/function-bind/implementation.cjs +0 -47
- package/dist/_node_modules/function-bind/implementation.cjs.map +0 -1
- package/dist/_node_modules/function-bind/implementation.js +0 -47
- package/dist/_node_modules/function-bind/implementation.js.map +0 -1
- package/dist/_node_modules/function-bind/index.cjs +0 -7
- package/dist/_node_modules/function-bind/index.cjs.map +0 -1
- package/dist/_node_modules/function-bind/index.js +0 -7
- package/dist/_node_modules/function-bind/index.js.map +0 -1
- package/dist/_node_modules/hard-rejection/index.cjs +0 -25
- package/dist/_node_modules/hard-rejection/index.cjs.map +0 -1
- package/dist/_node_modules/hard-rejection/index.js +0 -26
- package/dist/_node_modules/hard-rejection/index.js.map +0 -1
- package/dist/_node_modules/has/src/index.cjs +0 -7
- package/dist/_node_modules/has/src/index.cjs.map +0 -1
- package/dist/_node_modules/has/src/index.js +0 -7
- package/dist/_node_modules/has/src/index.js.map +0 -1
- package/dist/_node_modules/hosted-git-info/lib/from-url.cjs +0 -93
- package/dist/_node_modules/hosted-git-info/lib/from-url.cjs.map +0 -1
- package/dist/_node_modules/hosted-git-info/lib/from-url.js +0 -93
- package/dist/_node_modules/hosted-git-info/lib/from-url.js.map +0 -1
- package/dist/_node_modules/hosted-git-info/lib/hosts.cjs +0 -164
- package/dist/_node_modules/hosted-git-info/lib/hosts.cjs.map +0 -1
- package/dist/_node_modules/hosted-git-info/lib/hosts.js +0 -164
- package/dist/_node_modules/hosted-git-info/lib/hosts.js.map +0 -1
- package/dist/_node_modules/hosted-git-info/lib/index.cjs +0 -168
- package/dist/_node_modules/hosted-git-info/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hosted-git-info/lib/index.js +0 -168
- package/dist/_node_modules/hosted-git-info/lib/index.js.map +0 -1
- package/dist/_node_modules/hosted-git-info/lib/parse-url.cjs +0 -51
- package/dist/_node_modules/hosted-git-info/lib/parse-url.cjs.map +0 -1
- package/dist/_node_modules/hosted-git-info/lib/parse-url.js +0 -51
- package/dist/_node_modules/hosted-git-info/lib/parse-url.js.map +0 -1
- package/dist/_node_modules/indent-string/index.cjs +0 -34
- package/dist/_node_modules/indent-string/index.cjs.map +0 -1
- package/dist/_node_modules/indent-string/index.js +0 -35
- package/dist/_node_modules/indent-string/index.js.map +0 -1
- package/dist/_node_modules/is-arrayish/index.cjs +0 -10
- package/dist/_node_modules/is-arrayish/index.cjs.map +0 -1
- package/dist/_node_modules/is-arrayish/index.js +0 -10
- package/dist/_node_modules/is-arrayish/index.js.map +0 -1
- package/dist/_node_modules/is-core-module/core.json.cjs +0 -496
- package/dist/_node_modules/is-core-module/core.json.cjs.map +0 -1
- package/dist/_node_modules/is-core-module/core.json.js +0 -496
- package/dist/_node_modules/is-core-module/core.json.js.map +0 -1
- package/dist/_node_modules/is-core-module/index.cjs +0 -62
- package/dist/_node_modules/is-core-module/index.cjs.map +0 -1
- package/dist/_node_modules/is-core-module/index.js +0 -62
- package/dist/_node_modules/is-core-module/index.js.map +0 -1
- package/dist/_node_modules/is-plain-obj/index.cjs +0 -9
- package/dist/_node_modules/is-plain-obj/index.cjs.map +0 -1
- package/dist/_node_modules/is-plain-obj/index.js +0 -9
- package/dist/_node_modules/is-plain-obj/index.js.map +0 -1
- package/dist/_node_modules/js-tokens/index.cjs +0 -27
- package/dist/_node_modules/js-tokens/index.cjs.map +0 -1
- package/dist/_node_modules/js-tokens/index.js +0 -26
- package/dist/_node_modules/js-tokens/index.js.map +0 -1
- package/dist/_node_modules/json-parse-even-better-errors/index.cjs +0 -90
- package/dist/_node_modules/json-parse-even-better-errors/index.cjs.map +0 -1
- package/dist/_node_modules/json-parse-even-better-errors/index.js +0 -90
- package/dist/_node_modules/json-parse-even-better-errors/index.js.map +0 -1
- package/dist/_node_modules/kind-of/index.cjs +0 -129
- package/dist/_node_modules/kind-of/index.cjs.map +0 -1
- package/dist/_node_modules/kind-of/index.js +0 -129
- package/dist/_node_modules/kind-of/index.js.map +0 -1
- package/dist/_node_modules/lines-and-columns/build/index.cjs +0 -67
- package/dist/_node_modules/lines-and-columns/build/index.cjs.map +0 -1
- package/dist/_node_modules/lines-and-columns/build/index.js +0 -66
- package/dist/_node_modules/lines-and-columns/build/index.js.map +0 -1
- package/dist/_node_modules/lru-cache/index.cjs +0 -1015
- package/dist/_node_modules/lru-cache/index.cjs.map +0 -1
- package/dist/_node_modules/lru-cache/index.js +0 -1015
- package/dist/_node_modules/lru-cache/index.js.map +0 -1
- package/dist/_node_modules/map-obj/index.cjs +0 -49
- package/dist/_node_modules/map-obj/index.cjs.map +0 -1
- package/dist/_node_modules/map-obj/index.js +0 -50
- package/dist/_node_modules/map-obj/index.js.map +0 -1
- package/dist/_node_modules/meow/source/index.cjs +0 -88
- package/dist/_node_modules/meow/source/index.cjs.map +0 -1
- package/dist/_node_modules/meow/source/index.js +0 -89
- package/dist/_node_modules/meow/source/index.js.map +0 -1
- package/dist/_node_modules/meow/source/options.cjs +0 -83
- package/dist/_node_modules/meow/source/options.cjs.map +0 -1
- package/dist/_node_modules/meow/source/options.js +0 -83
- package/dist/_node_modules/meow/source/options.js.map +0 -1
- package/dist/_node_modules/meow/source/parser.cjs +0 -61
- package/dist/_node_modules/meow/source/parser.cjs.map +0 -1
- package/dist/_node_modules/meow/source/parser.js +0 -61
- package/dist/_node_modules/meow/source/parser.js.map +0 -1
- package/dist/_node_modules/meow/source/utils.cjs +0 -8
- package/dist/_node_modules/meow/source/utils.cjs.map +0 -1
- package/dist/_node_modules/meow/source/utils.js +0 -8
- package/dist/_node_modules/meow/source/utils.js.map +0 -1
- package/dist/_node_modules/meow/source/validate.cjs +0 -102
- package/dist/_node_modules/meow/source/validate.cjs.map +0 -1
- package/dist/_node_modules/meow/source/validate.js +0 -102
- package/dist/_node_modules/meow/source/validate.js.map +0 -1
- package/dist/_node_modules/min-indent/index.cjs +0 -12
- package/dist/_node_modules/min-indent/index.cjs.map +0 -1
- package/dist/_node_modules/min-indent/index.js +0 -13
- package/dist/_node_modules/min-indent/index.js.map +0 -1
- package/dist/_node_modules/minimist-options/index.cjs +0 -94
- package/dist/_node_modules/minimist-options/index.cjs.map +0 -1
- package/dist/_node_modules/minimist-options/index.js +0 -95
- package/dist/_node_modules/minimist-options/index.js.map +0 -1
- package/dist/_node_modules/node-domexception/index.cjs +0 -11
- package/dist/_node_modules/node-domexception/index.cjs.map +0 -1
- package/dist/_node_modules/node-domexception/index.js +0 -10
- package/dist/_node_modules/node-domexception/index.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/body.cjs +0 -262
- package/dist/_node_modules/node-fetch/src/body.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/body.js +0 -262
- package/dist/_node_modules/node-fetch/src/body.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs +0 -10
- package/dist/_node_modules/node-fetch/src/errors/abort-error.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js +0 -10
- package/dist/_node_modules/node-fetch/src/errors/abort-error.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/errors/base.cjs +0 -17
- package/dist/_node_modules/node-fetch/src/errors/base.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/errors/base.js +0 -17
- package/dist/_node_modules/node-fetch/src/errors/base.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs +0 -19
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js +0 -19
- package/dist/_node_modules/node-fetch/src/errors/fetch-error.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/headers.cjs +0 -190
- package/dist/_node_modules/node-fetch/src/headers.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/headers.js +0 -190
- package/dist/_node_modules/node-fetch/src/headers.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/index.cjs +0 -292
- package/dist/_node_modules/node-fetch/src/index.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/index.js +0 -292
- package/dist/_node_modules/node-fetch/src/index.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/request.cjs +0 -203
- package/dist/_node_modules/node-fetch/src/request.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/request.js +0 -203
- package/dist/_node_modules/node-fetch/src/request.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/response.cjs +0 -122
- package/dist/_node_modules/node-fetch/src/response.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/response.js +0 -123
- package/dist/_node_modules/node-fetch/src/response.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs +0 -12
- package/dist/_node_modules/node-fetch/src/utils/get-search.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/get-search.js +0 -12
- package/dist/_node_modules/node-fetch/src/utils/get-search.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs +0 -8
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.js +0 -8
- package/dist/_node_modules/node-fetch/src/utils/is-redirect.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/is.cjs +0 -28
- package/dist/_node_modules/node-fetch/src/utils/is.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/is.js +0 -28
- package/dist/_node_modules/node-fetch/src/utils/is.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs +0 -356
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js +0 -356
- package/dist/_node_modules/node-fetch/src/utils/multipart-parser.js.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs +0 -149
- package/dist/_node_modules/node-fetch/src/utils/referrer.cjs.map +0 -1
- package/dist/_node_modules/node-fetch/src/utils/referrer.js +0 -149
- package/dist/_node_modules/node-fetch/src/utils/referrer.js.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/extract_description.cjs +0 -24
- package/dist/_node_modules/normalize-package-data/lib/extract_description.cjs.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/extract_description.js +0 -24
- package/dist/_node_modules/normalize-package-data/lib/extract_description.js.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/fixer.cjs +0 -438
- package/dist/_node_modules/normalize-package-data/lib/fixer.cjs.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/fixer.js +0 -438
- package/dist/_node_modules/normalize-package-data/lib/fixer.js.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/make_warning.cjs +0 -26
- package/dist/_node_modules/normalize-package-data/lib/make_warning.cjs.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/make_warning.js +0 -26
- package/dist/_node_modules/normalize-package-data/lib/make_warning.js.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/normalize.cjs +0 -58
- package/dist/_node_modules/normalize-package-data/lib/normalize.cjs.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/normalize.js +0 -59
- package/dist/_node_modules/normalize-package-data/lib/normalize.js.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/typos.json.cjs +0 -41
- package/dist/_node_modules/normalize-package-data/lib/typos.json.cjs.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/typos.json.js +0 -41
- package/dist/_node_modules/normalize-package-data/lib/typos.json.js.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/warning_messages.json.cjs +0 -90
- package/dist/_node_modules/normalize-package-data/lib/warning_messages.json.cjs.map +0 -1
- package/dist/_node_modules/normalize-package-data/lib/warning_messages.json.js +0 -90
- package/dist/_node_modules/normalize-package-data/lib/warning_messages.json.js.map +0 -1
- package/dist/_node_modules/parse-json/index.cjs +0 -54
- package/dist/_node_modules/parse-json/index.cjs.map +0 -1
- package/dist/_node_modules/parse-json/index.js +0 -55
- package/dist/_node_modules/parse-json/index.js.map +0 -1
- package/dist/_node_modules/picocolors/picocolors.browser.cjs +0 -12
- package/dist/_node_modules/picocolors/picocolors.browser.cjs.map +0 -1
- package/dist/_node_modules/picocolors/picocolors.browser.js +0 -12
- package/dist/_node_modules/picocolors/picocolors.browser.js.map +0 -1
- package/dist/_node_modules/quick-lru/index.cjs +0 -235
- package/dist/_node_modules/quick-lru/index.cjs.map +0 -1
- package/dist/_node_modules/quick-lru/index.js +0 -236
- package/dist/_node_modules/quick-lru/index.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.cjs +0 -159
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.js +0 -159
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host-info.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.cjs +0 -88
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.js +0 -88
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/git-host.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/index.cjs +0 -180
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/index.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/index.js +0 -180
- package/dist/_node_modules/read-pkg/_node_modules/hosted-git-info/index.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/lru-cache/index.cjs +0 -268
- package/dist/_node_modules/read-pkg/_node_modules/lru-cache/index.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/lru-cache/index.js +0 -268
- package/dist/_node_modules/read-pkg/_node_modules/lru-cache/index.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.cjs +0 -20
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.js +0 -20
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/extract_description.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.cjs +0 -438
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.js +0 -438
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/fixer.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.cjs +0 -26
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.js +0 -26
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/make_warning.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.cjs +0 -58
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.js +0 -59
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/normalize.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.cjs +0 -41
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.js +0 -41
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/typos.json.js.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.cjs +0 -90
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.js +0 -90
- package/dist/_node_modules/read-pkg/_node_modules/normalize-package-data/lib/warning_messages.json.js.map +0 -1
- package/dist/_node_modules/read-pkg/index.cjs +0 -20
- package/dist/_node_modules/read-pkg/index.cjs.map +0 -1
- package/dist/_node_modules/read-pkg/index.js +0 -20
- package/dist/_node_modules/read-pkg/index.js.map +0 -1
- package/dist/_node_modules/read-pkg-up/_node_modules/find-up/index.cjs +0 -48
- package/dist/_node_modules/read-pkg-up/_node_modules/find-up/index.cjs.map +0 -1
- package/dist/_node_modules/read-pkg-up/_node_modules/find-up/index.js +0 -48
- package/dist/_node_modules/read-pkg-up/_node_modules/find-up/index.js.map +0 -1
- package/dist/_node_modules/read-pkg-up/_node_modules/locate-path/index.cjs +0 -43
- package/dist/_node_modules/read-pkg-up/_node_modules/locate-path/index.cjs.map +0 -1
- package/dist/_node_modules/read-pkg-up/_node_modules/locate-path/index.js +0 -43
- package/dist/_node_modules/read-pkg-up/_node_modules/locate-path/index.js.map +0 -1
- package/dist/_node_modules/read-pkg-up/index.cjs +0 -17
- package/dist/_node_modules/read-pkg-up/index.cjs.map +0 -1
- package/dist/_node_modules/read-pkg-up/index.js +0 -17
- package/dist/_node_modules/read-pkg-up/index.js.map +0 -1
- package/dist/_node_modules/redent/index.cjs +0 -8
- package/dist/_node_modules/redent/index.cjs.map +0 -1
- package/dist/_node_modules/redent/index.js +0 -9
- package/dist/_node_modules/redent/index.js.map +0 -1
- package/dist/_node_modules/semver/classes/semver.cjs +0 -245
- package/dist/_node_modules/semver/classes/semver.cjs.map +0 -1
- package/dist/_node_modules/semver/classes/semver.js +0 -245
- package/dist/_node_modules/semver/classes/semver.js.map +0 -1
- package/dist/_node_modules/semver/functions/clean.cjs +0 -11
- package/dist/_node_modules/semver/functions/clean.cjs.map +0 -1
- package/dist/_node_modules/semver/functions/clean.js +0 -11
- package/dist/_node_modules/semver/functions/clean.js.map +0 -1
- package/dist/_node_modules/semver/functions/parse.cjs +0 -20
- package/dist/_node_modules/semver/functions/parse.cjs.map +0 -1
- package/dist/_node_modules/semver/functions/parse.js +0 -20
- package/dist/_node_modules/semver/functions/parse.js.map +0 -1
- package/dist/_node_modules/semver/functions/valid.cjs +0 -11
- package/dist/_node_modules/semver/functions/valid.cjs.map +0 -1
- package/dist/_node_modules/semver/functions/valid.js +0 -11
- package/dist/_node_modules/semver/functions/valid.js.map +0 -1
- package/dist/_node_modules/semver/internal/constants.cjs +0 -29
- package/dist/_node_modules/semver/internal/constants.cjs.map +0 -1
- package/dist/_node_modules/semver/internal/constants.js +0 -29
- package/dist/_node_modules/semver/internal/constants.js.map +0 -1
- package/dist/_node_modules/semver/internal/debug.cjs +0 -7
- package/dist/_node_modules/semver/internal/debug.cjs.map +0 -1
- package/dist/_node_modules/semver/internal/debug.js +0 -7
- package/dist/_node_modules/semver/internal/debug.js.map +0 -1
- package/dist/_node_modules/semver/internal/identifiers.cjs +0 -19
- package/dist/_node_modules/semver/internal/identifiers.cjs.map +0 -1
- package/dist/_node_modules/semver/internal/identifiers.js +0 -19
- package/dist/_node_modules/semver/internal/identifiers.js.map +0 -1
- package/dist/_node_modules/semver/internal/parse-options.cjs +0 -16
- package/dist/_node_modules/semver/internal/parse-options.cjs.map +0 -1
- package/dist/_node_modules/semver/internal/parse-options.js +0 -16
- package/dist/_node_modules/semver/internal/parse-options.js.map +0 -1
- package/dist/_node_modules/semver/internal/re.cjs +0 -82
- package/dist/_node_modules/semver/internal/re.cjs.map +0 -1
- package/dist/_node_modules/semver/internal/re.js +0 -82
- package/dist/_node_modules/semver/internal/re.js.map +0 -1
- package/dist/_node_modules/spdx-correct/index.cjs +0 -334
- package/dist/_node_modules/spdx-correct/index.cjs.map +0 -1
- package/dist/_node_modules/spdx-correct/index.js +0 -334
- package/dist/_node_modules/spdx-correct/index.js.map +0 -1
- package/dist/_node_modules/spdx-exceptions/index.json.cjs +0 -43
- package/dist/_node_modules/spdx-exceptions/index.json.cjs.map +0 -1
- package/dist/_node_modules/spdx-exceptions/index.json.js +0 -44
- package/dist/_node_modules/spdx-exceptions/index.json.js.map +0 -1
- package/dist/_node_modules/spdx-expression-parse/index.cjs +0 -11
- package/dist/_node_modules/spdx-expression-parse/index.cjs.map +0 -1
- package/dist/_node_modules/spdx-expression-parse/index.js +0 -11
- package/dist/_node_modules/spdx-expression-parse/index.js.map +0 -1
- package/dist/_node_modules/spdx-expression-parse/parse.cjs +0 -111
- package/dist/_node_modules/spdx-expression-parse/parse.cjs.map +0 -1
- package/dist/_node_modules/spdx-expression-parse/parse.js +0 -111
- package/dist/_node_modules/spdx-expression-parse/parse.js.map +0 -1
- package/dist/_node_modules/spdx-expression-parse/scan.cjs +0 -104
- package/dist/_node_modules/spdx-expression-parse/scan.cjs.map +0 -1
- package/dist/_node_modules/spdx-expression-parse/scan.js +0 -104
- package/dist/_node_modules/spdx-expression-parse/scan.js.map +0 -1
- package/dist/_node_modules/spdx-license-ids/deprecated.json.cjs +0 -30
- package/dist/_node_modules/spdx-license-ids/deprecated.json.cjs.map +0 -1
- package/dist/_node_modules/spdx-license-ids/deprecated.json.js +0 -31
- package/dist/_node_modules/spdx-license-ids/deprecated.json.js.map +0 -1
- package/dist/_node_modules/spdx-license-ids/index.json.cjs +0 -510
- package/dist/_node_modules/spdx-license-ids/index.json.cjs.map +0 -1
- package/dist/_node_modules/spdx-license-ids/index.json.js +0 -511
- package/dist/_node_modules/spdx-license-ids/index.json.js.map +0 -1
- package/dist/_node_modules/strip-indent/index.cjs +0 -12
- package/dist/_node_modules/strip-indent/index.cjs.map +0 -1
- package/dist/_node_modules/strip-indent/index.js +0 -13
- package/dist/_node_modules/strip-indent/index.js.map +0 -1
- package/dist/_node_modules/trim-newlines/index.cjs +0 -15
- package/dist/_node_modules/trim-newlines/index.cjs.map +0 -1
- package/dist/_node_modules/trim-newlines/index.js +0 -15
- package/dist/_node_modules/trim-newlines/index.js.map +0 -1
- package/dist/_node_modules/validate-npm-package-license/index.cjs +0 -71
- package/dist/_node_modules/validate-npm-package-license/index.cjs.map +0 -1
- package/dist/_node_modules/validate-npm-package-license/index.js +0 -71
- package/dist/_node_modules/validate-npm-package-license/index.js.map +0 -1
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs +0 -3822
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.cjs.map +0 -1
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +0 -3822
- package/dist/_node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +0 -1
- package/dist/_node_modules/yallist/iterator.cjs +0 -19
- package/dist/_node_modules/yallist/iterator.cjs.map +0 -1
- package/dist/_node_modules/yallist/iterator.js +0 -19
- package/dist/_node_modules/yallist/iterator.js.map +0 -1
- package/dist/_node_modules/yallist/yallist.cjs +0 -367
- package/dist/_node_modules/yallist/yallist.cjs.map +0 -1
- package/dist/_node_modules/yallist/yallist.js +0 -367
- package/dist/_node_modules/yallist/yallist.js.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/index.cjs +0 -56
- package/dist/_node_modules/yargs-parser/build/lib/index.cjs.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/index.js +0 -57
- package/dist/_node_modules/yargs-parser/build/lib/index.js.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/string-utils.cjs +0 -63
- package/dist/_node_modules/yargs-parser/build/lib/string-utils.cjs.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/string-utils.js +0 -63
- package/dist/_node_modules/yargs-parser/build/lib/string-utils.js.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/tokenize-arg-string.cjs +0 -39
- package/dist/_node_modules/yargs-parser/build/lib/tokenize-arg-string.cjs.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/tokenize-arg-string.js +0 -39
- package/dist/_node_modules/yargs-parser/build/lib/tokenize-arg-string.js.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser-types.cjs +0 -15
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser-types.cjs.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser-types.js +0 -16
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser-types.js.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser.cjs +0 -847
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser.cjs.map +0 -1
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser.js +0 -847
- package/dist/_node_modules/yargs-parser/build/lib/yargs-parser.js.map +0 -1
- package/dist/_virtual/_commonjsHelpers.cjs +0 -9
- package/dist/_virtual/_commonjsHelpers.cjs.map +0 -1
- package/dist/_virtual/_commonjsHelpers.js +0 -9
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/identifier.cjs +0 -5
- package/dist/_virtual/identifier.cjs.map +0 -1
- package/dist/_virtual/identifier.js +0 -5
- package/dist/_virtual/identifier.js.map +0 -1
- package/dist/_virtual/index.cjs +0 -5
- package/dist/_virtual/index.cjs.map +0 -1
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/index2.cjs +0 -5
- package/dist/_virtual/index2.cjs.map +0 -1
- package/dist/_virtual/index2.js +0 -5
- package/dist/_virtual/index2.js.map +0 -1
- package/dist/_virtual/index3.cjs +0 -5
- package/dist/_virtual/index3.cjs.map +0 -1
- package/dist/_virtual/index3.js +0 -5
- package/dist/_virtual/index3.js.map +0 -1
- package/dist/_virtual/index4.cjs +0 -5
- package/dist/_virtual/index4.cjs.map +0 -1
- package/dist/_virtual/index4.js +0 -5
- package/dist/_virtual/index4.js.map +0 -1
- package/dist/_virtual/index5.cjs +0 -5
- package/dist/_virtual/index5.cjs.map +0 -1
- package/dist/_virtual/index5.js +0 -5
- package/dist/_virtual/index5.js.map +0 -1
- package/dist/_virtual/index6.cjs +0 -5
- package/dist/_virtual/index6.cjs.map +0 -1
- package/dist/_virtual/index6.js +0 -5
- package/dist/_virtual/index6.js.map +0 -1
- package/dist/_virtual/index7.cjs +0 -5
- package/dist/_virtual/index7.cjs.map +0 -1
- package/dist/_virtual/index7.js +0 -5
- package/dist/_virtual/index7.js.map +0 -1
- package/dist/_virtual/index8.cjs +0 -5
- package/dist/_virtual/index8.cjs.map +0 -1
- package/dist/_virtual/index8.js +0 -5
- package/dist/_virtual/index8.js.map +0 -1
- package/dist/_virtual/keyword.cjs +0 -5
- package/dist/_virtual/keyword.cjs.map +0 -1
- package/dist/_virtual/keyword.js +0 -5
- package/dist/_virtual/keyword.js.map +0 -1
- package/dist/_virtual/picocolors.browser.cjs +0 -5
- package/dist/_virtual/picocolors.browser.cjs.map +0 -1
- package/dist/_virtual/picocolors.browser.js +0 -5
- package/dist/_virtual/picocolors.browser.js.map +0 -1
- package/dist/_virtual/ponyfill.es2018.cjs +0 -5
- package/dist/_virtual/ponyfill.es2018.cjs.map +0 -1
- package/dist/_virtual/ponyfill.es2018.js +0 -5
- package/dist/_virtual/ponyfill.es2018.js.map +0 -1
- package/dist/_virtual/re.cjs +0 -5
- package/dist/_virtual/re.cjs.map +0 -1
- package/dist/_virtual/re.js +0 -5
- package/dist/_virtual/re.js.map +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/loadConfig.d.ts +0 -6
- package/dist/cli/loadLocaleIDs.d.ts +0 -10
- package/dist/cli/loadModels.d.ts +0 -15
- package/dist/cli/types.d.ts +0 -175
- package/dist/constants.d.ts +0 -26
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/addBlankLine.d.ts +0 -5
- package/dist/lib/addLine.d.ts +0 -1
- package/dist/lib/addSection.d.ts +0 -1
- package/dist/lib/addTrailingNewLine.d.ts +0 -5
- package/dist/lib/buildCustomTypeDataType.d.ts +0 -14
- package/dist/lib/buildCustomTypeType.d.ts +0 -17
- package/dist/lib/buildFieldDocs.d.ts +0 -10
- package/dist/lib/buildFieldProperties.d.ts +0 -15
- package/dist/lib/buildSharedSliceType.d.ts +0 -17
- package/dist/lib/buildTypeName.d.ts +0 -1
- package/dist/lib/buildUnion.d.ts +0 -1
- package/dist/lib/checkHasUIDFIeld.d.ts +0 -2
- package/dist/lib/getAPIIDPath.d.ts +0 -6
- package/dist/lib/getCacheKey.d.ts +0 -9
- package/dist/lib/getHumanReadableModelName.d.ts +0 -7
- package/dist/lib/getHumanReadablePath.d.ts +0 -6
- package/src/cli/types.ts +0 -192
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { types } from "node:util";
|
|
2
|
-
import http from "node:http";
|
|
3
|
-
const validateHeaderName = typeof http.validateHeaderName === "function" ? http.validateHeaderName : (name) => {
|
|
4
|
-
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
|
|
5
|
-
const error = new TypeError(`Header name must be a valid HTTP token [${name}]`);
|
|
6
|
-
Object.defineProperty(error, "code", { value: "ERR_INVALID_HTTP_TOKEN" });
|
|
7
|
-
throw error;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
const validateHeaderValue = typeof http.validateHeaderValue === "function" ? http.validateHeaderValue : (name, value) => {
|
|
11
|
-
if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) {
|
|
12
|
-
const error = new TypeError(`Invalid character in header content ["${name}"]`);
|
|
13
|
-
Object.defineProperty(error, "code", { value: "ERR_INVALID_CHAR" });
|
|
14
|
-
throw error;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
class Headers extends URLSearchParams {
|
|
18
|
-
/**
|
|
19
|
-
* Headers class
|
|
20
|
-
*
|
|
21
|
-
* @constructor
|
|
22
|
-
* @param {HeadersInit} [init] - Response headers
|
|
23
|
-
*/
|
|
24
|
-
constructor(init) {
|
|
25
|
-
let result = [];
|
|
26
|
-
if (init instanceof Headers) {
|
|
27
|
-
const raw = init.raw();
|
|
28
|
-
for (const [name, values] of Object.entries(raw)) {
|
|
29
|
-
result.push(...values.map((value) => [name, value]));
|
|
30
|
-
}
|
|
31
|
-
} else if (init == null)
|
|
32
|
-
;
|
|
33
|
-
else if (typeof init === "object" && !types.isBoxedPrimitive(init)) {
|
|
34
|
-
const method = init[Symbol.iterator];
|
|
35
|
-
if (method == null) {
|
|
36
|
-
result.push(...Object.entries(init));
|
|
37
|
-
} else {
|
|
38
|
-
if (typeof method !== "function") {
|
|
39
|
-
throw new TypeError("Header pairs must be iterable");
|
|
40
|
-
}
|
|
41
|
-
result = [...init].map((pair) => {
|
|
42
|
-
if (typeof pair !== "object" || types.isBoxedPrimitive(pair)) {
|
|
43
|
-
throw new TypeError("Each header pair must be an iterable object");
|
|
44
|
-
}
|
|
45
|
-
return [...pair];
|
|
46
|
-
}).map((pair) => {
|
|
47
|
-
if (pair.length !== 2) {
|
|
48
|
-
throw new TypeError("Each header pair must be a name/value tuple");
|
|
49
|
-
}
|
|
50
|
-
return [...pair];
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
} else {
|
|
54
|
-
throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");
|
|
55
|
-
}
|
|
56
|
-
result = result.length > 0 ? result.map(([name, value]) => {
|
|
57
|
-
validateHeaderName(name);
|
|
58
|
-
validateHeaderValue(name, String(value));
|
|
59
|
-
return [String(name).toLowerCase(), String(value)];
|
|
60
|
-
}) : void 0;
|
|
61
|
-
super(result);
|
|
62
|
-
return new Proxy(this, {
|
|
63
|
-
get(target, p, receiver) {
|
|
64
|
-
switch (p) {
|
|
65
|
-
case "append":
|
|
66
|
-
case "set":
|
|
67
|
-
return (name, value) => {
|
|
68
|
-
validateHeaderName(name);
|
|
69
|
-
validateHeaderValue(name, String(value));
|
|
70
|
-
return URLSearchParams.prototype[p].call(
|
|
71
|
-
target,
|
|
72
|
-
String(name).toLowerCase(),
|
|
73
|
-
String(value)
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
case "delete":
|
|
77
|
-
case "has":
|
|
78
|
-
case "getAll":
|
|
79
|
-
return (name) => {
|
|
80
|
-
validateHeaderName(name);
|
|
81
|
-
return URLSearchParams.prototype[p].call(
|
|
82
|
-
target,
|
|
83
|
-
String(name).toLowerCase()
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
case "keys":
|
|
87
|
-
return () => {
|
|
88
|
-
target.sort();
|
|
89
|
-
return new Set(URLSearchParams.prototype.keys.call(target)).keys();
|
|
90
|
-
};
|
|
91
|
-
default:
|
|
92
|
-
return Reflect.get(target, p, receiver);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
get [Symbol.toStringTag]() {
|
|
98
|
-
return this.constructor.name;
|
|
99
|
-
}
|
|
100
|
-
toString() {
|
|
101
|
-
return Object.prototype.toString.call(this);
|
|
102
|
-
}
|
|
103
|
-
get(name) {
|
|
104
|
-
const values = this.getAll(name);
|
|
105
|
-
if (values.length === 0) {
|
|
106
|
-
return null;
|
|
107
|
-
}
|
|
108
|
-
let value = values.join(", ");
|
|
109
|
-
if (/^content-encoding$/i.test(name)) {
|
|
110
|
-
value = value.toLowerCase();
|
|
111
|
-
}
|
|
112
|
-
return value;
|
|
113
|
-
}
|
|
114
|
-
forEach(callback, thisArg = void 0) {
|
|
115
|
-
for (const name of this.keys()) {
|
|
116
|
-
Reflect.apply(callback, thisArg, [this.get(name), name, this]);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
*values() {
|
|
120
|
-
for (const name of this.keys()) {
|
|
121
|
-
yield this.get(name);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* @type {() => IterableIterator<[string, string]>}
|
|
126
|
-
*/
|
|
127
|
-
*entries() {
|
|
128
|
-
for (const name of this.keys()) {
|
|
129
|
-
yield [name, this.get(name)];
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
[Symbol.iterator]() {
|
|
133
|
-
return this.entries();
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Node-fetch non-spec method
|
|
137
|
-
* returning all headers and their values as array
|
|
138
|
-
* @returns {Record<string, string[]>}
|
|
139
|
-
*/
|
|
140
|
-
raw() {
|
|
141
|
-
return [...this.keys()].reduce((result, key) => {
|
|
142
|
-
result[key] = this.getAll(key);
|
|
143
|
-
return result;
|
|
144
|
-
}, {});
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* For better console.log(headers) and also to convert Headers into Node.js Request compatible format
|
|
148
|
-
*/
|
|
149
|
-
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
150
|
-
return [...this.keys()].reduce((result, key) => {
|
|
151
|
-
const values = this.getAll(key);
|
|
152
|
-
if (key === "host") {
|
|
153
|
-
result[key] = values[0];
|
|
154
|
-
} else {
|
|
155
|
-
result[key] = values.length > 1 ? values : values[0];
|
|
156
|
-
}
|
|
157
|
-
return result;
|
|
158
|
-
}, {});
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
Object.defineProperties(
|
|
162
|
-
Headers.prototype,
|
|
163
|
-
["get", "entries", "forEach", "values"].reduce((result, property) => {
|
|
164
|
-
result[property] = { enumerable: true };
|
|
165
|
-
return result;
|
|
166
|
-
}, {})
|
|
167
|
-
);
|
|
168
|
-
function fromRawHeaders(headers = []) {
|
|
169
|
-
return new Headers(
|
|
170
|
-
headers.reduce((result, value, index, array) => {
|
|
171
|
-
if (index % 2 === 0) {
|
|
172
|
-
result.push(array.slice(index, index + 2));
|
|
173
|
-
}
|
|
174
|
-
return result;
|
|
175
|
-
}, []).filter(([name, value]) => {
|
|
176
|
-
try {
|
|
177
|
-
validateHeaderName(name);
|
|
178
|
-
validateHeaderValue(name, String(value));
|
|
179
|
-
return true;
|
|
180
|
-
} catch {
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
})
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
export {
|
|
187
|
-
Headers as default,
|
|
188
|
-
fromRawHeaders
|
|
189
|
-
};
|
|
190
|
-
//# sourceMappingURL=headers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.js","sources":["../../../../node_modules/node-fetch/src/headers.js"],"sourcesContent":["/**\n * Headers.js\n *\n * Headers class offers convenient helpers\n */\n\nimport {types} from 'node:util';\nimport http from 'node:http';\n\n/* c8 ignore next 9 */\nconst validateHeaderName = typeof http.validateHeaderName === 'function' ?\n\thttp.validateHeaderName :\n\tname => {\n\t\tif (!/^[\\^`\\-\\w!#$%&'*+.|~]+$/.test(name)) {\n\t\t\tconst error = new TypeError(`Header name must be a valid HTTP token [${name}]`);\n\t\t\tObject.defineProperty(error, 'code', {value: 'ERR_INVALID_HTTP_TOKEN'});\n\t\t\tthrow error;\n\t\t}\n\t};\n\n/* c8 ignore next 9 */\nconst validateHeaderValue = typeof http.validateHeaderValue === 'function' ?\n\thttp.validateHeaderValue :\n\t(name, value) => {\n\t\tif (/[^\\t\\u0020-\\u007E\\u0080-\\u00FF]/.test(value)) {\n\t\t\tconst error = new TypeError(`Invalid character in header content [\"${name}\"]`);\n\t\t\tObject.defineProperty(error, 'code', {value: 'ERR_INVALID_CHAR'});\n\t\t\tthrow error;\n\t\t}\n\t};\n\n/**\n * @typedef {Headers | Record<string, string> | Iterable<readonly [string, string]> | Iterable<Iterable<string>>} HeadersInit\n */\n\n/**\n * This Fetch API interface allows you to perform various actions on HTTP request and response headers.\n * These actions include retrieving, setting, adding to, and removing.\n * A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.\n * You can add to this using methods like append() (see Examples.)\n * In all methods of this interface, header names are matched by case-insensitive byte sequence.\n *\n */\nexport default class Headers extends URLSearchParams {\n\t/**\n\t * Headers class\n\t *\n\t * @constructor\n\t * @param {HeadersInit} [init] - Response headers\n\t */\n\tconstructor(init) {\n\t\t// Validate and normalize init object in [name, value(s)][]\n\t\t/** @type {string[][]} */\n\t\tlet result = [];\n\t\tif (init instanceof Headers) {\n\t\t\tconst raw = init.raw();\n\t\t\tfor (const [name, values] of Object.entries(raw)) {\n\t\t\t\tresult.push(...values.map(value => [name, value]));\n\t\t\t}\n\t\t} else if (init == null) { // eslint-disable-line no-eq-null, eqeqeq\n\t\t\t// No op\n\t\t} else if (typeof init === 'object' && !types.isBoxedPrimitive(init)) {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t\tif (method == null) {\n\t\t\t\t// Record<ByteString, ByteString>\n\t\t\t\tresult.push(...Object.entries(init));\n\t\t\t} else {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// Sequence<sequence<ByteString>>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tresult = [...init]\n\t\t\t\t\t.map(pair => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof pair !== 'object' || types.isBoxedPrimitive(pair)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tthrow new TypeError('Each header pair must be an iterable object');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn [...pair];\n\t\t\t\t\t}).map(pair => {\n\t\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn [...pair];\n\t\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Failed to construct \\'Headers\\': The provided value is not of type \\'(sequence<sequence<ByteString>> or record<ByteString, ByteString>)');\n\t\t}\n\n\t\t// Validate and lowercase\n\t\tresult =\n\t\t\tresult.length > 0 ?\n\t\t\t\tresult.map(([name, value]) => {\n\t\t\t\t\tvalidateHeaderName(name);\n\t\t\t\t\tvalidateHeaderValue(name, String(value));\n\t\t\t\t\treturn [String(name).toLowerCase(), String(value)];\n\t\t\t\t}) :\n\t\t\t\tundefined;\n\n\t\tsuper(result);\n\n\t\t// Returning a Proxy that will lowercase key names, validate parameters and sort keys\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn new Proxy(this, {\n\t\t\tget(target, p, receiver) {\n\t\t\t\tswitch (p) {\n\t\t\t\t\tcase 'append':\n\t\t\t\t\tcase 'set':\n\t\t\t\t\t\treturn (name, value) => {\n\t\t\t\t\t\t\tvalidateHeaderName(name);\n\t\t\t\t\t\t\tvalidateHeaderValue(name, String(value));\n\t\t\t\t\t\t\treturn URLSearchParams.prototype[p].call(\n\t\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\t\tString(name).toLowerCase(),\n\t\t\t\t\t\t\t\tString(value)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\tcase 'has':\n\t\t\t\t\tcase 'getAll':\n\t\t\t\t\t\treturn name => {\n\t\t\t\t\t\t\tvalidateHeaderName(name);\n\t\t\t\t\t\t\treturn URLSearchParams.prototype[p].call(\n\t\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\t\tString(name).toLowerCase()\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t};\n\n\t\t\t\t\tcase 'keys':\n\t\t\t\t\t\treturn () => {\n\t\t\t\t\t\t\ttarget.sort();\n\t\t\t\t\t\t\treturn new Set(URLSearchParams.prototype.keys.call(target)).keys();\n\t\t\t\t\t\t};\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn Reflect.get(target, p, receiver);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t/* c8 ignore next */\n\t}\n\n\tget [Symbol.toStringTag]() {\n\t\treturn this.constructor.name;\n\t}\n\n\ttoString() {\n\t\treturn Object.prototype.toString.call(this);\n\t}\n\n\tget(name) {\n\t\tconst values = this.getAll(name);\n\t\tif (values.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet value = values.join(', ');\n\t\tif (/^content-encoding$/i.test(name)) {\n\t\t\tvalue = value.toLowerCase();\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tforEach(callback, thisArg = undefined) {\n\t\tfor (const name of this.keys()) {\n\t\t\tReflect.apply(callback, thisArg, [this.get(name), name, this]);\n\t\t}\n\t}\n\n\t* values() {\n\t\tfor (const name of this.keys()) {\n\t\t\tyield this.get(name);\n\t\t}\n\t}\n\n\t/**\n\t * @type {() => IterableIterator<[string, string]>}\n\t */\n\t* entries() {\n\t\tfor (const name of this.keys()) {\n\t\t\tyield [name, this.get(name)];\n\t\t}\n\t}\n\n\t[Symbol.iterator]() {\n\t\treturn this.entries();\n\t}\n\n\t/**\n\t * Node-fetch non-spec method\n\t * returning all headers and their values as array\n\t * @returns {Record<string, string[]>}\n\t */\n\traw() {\n\t\treturn [...this.keys()].reduce((result, key) => {\n\t\t\tresult[key] = this.getAll(key);\n\t\t\treturn result;\n\t\t}, {});\n\t}\n\n\t/**\n\t * For better console.log(headers) and also to convert Headers into Node.js Request compatible format\n\t */\n\t[Symbol.for('nodejs.util.inspect.custom')]() {\n\t\treturn [...this.keys()].reduce((result, key) => {\n\t\t\tconst values = this.getAll(key);\n\t\t\t// Http.request() only supports string as Host header.\n\t\t\t// This hack makes specifying custom Host header possible.\n\t\t\tif (key === 'host') {\n\t\t\t\tresult[key] = values[0];\n\t\t\t} else {\n\t\t\t\tresult[key] = values.length > 1 ? values : values[0];\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}, {});\n\t}\n}\n\n/**\n * Re-shaping object for Web IDL tests\n * Only need to do it for overridden methods\n */\nObject.defineProperties(\n\tHeaders.prototype,\n\t['get', 'entries', 'forEach', 'values'].reduce((result, property) => {\n\t\tresult[property] = {enumerable: true};\n\t\treturn result;\n\t}, {})\n);\n\n/**\n * Create a Headers object from an http.IncomingMessage.rawHeaders, ignoring those that do\n * not conform to HTTP grammar productions.\n * @param {import('http').IncomingMessage['rawHeaders']} headers\n */\nexport function fromRawHeaders(headers = []) {\n\treturn new Headers(\n\t\theaders\n\t\t\t// Split into pairs\n\t\t\t.reduce((result, value, index, array) => {\n\t\t\t\tif (index % 2 === 0) {\n\t\t\t\t\tresult.push(array.slice(index, index + 2));\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t}, [])\n\t\t\t.filter(([name, value]) => {\n\t\t\t\ttry {\n\t\t\t\t\tvalidateHeaderName(name);\n\t\t\t\t\tvalidateHeaderValue(name, String(value));\n\t\t\t\t\treturn true;\n\t\t\t\t} catch {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t})\n\n\t);\n}\n"],"names":[],"mappings":";;AAUA,MAAM,qBAAqB,OAAO,KAAK,uBAAuB,aAC7D,KAAK,qBACL,UAAQ;AACP,MAAI,CAAC,0BAA0B,KAAK,IAAI,GAAG;AAC1C,UAAM,QAAQ,IAA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UAAI,QAAQ,QAAQ;AACnB,eAAO,GAAG,IAAI,OAAO,CAAC;AAAA,MAC1B,OAAU;AACN,eAAO,GAAG,IAAI,OAAO,SAAS,IAAI,SAAS,OAAO,CAAC;AAAA,MACnD;AAED,aAAO;AAAA,IACP,GAAE,CAAE,CAAA;AAAA,EACL;AACF;AAMA,OAAO;AAAA,EACN,QAAQ;AAAA,EACR,CAAC,OAAO,WAAW,WAAW,QAAQ,EAAE,OAAO,CAAC,QAAQ,aAAa;AACpE,WAAO,QAAQ,IAAI,EAAC,YAAY,KAAI;AACpC,WAAO;AAAA,EACP,GAAE,EAAE;AACN;AAOO,SAAS,eAAe,UAAU,IAAI;AAC5C,SAAO,IAAI;AAAA,IACV,QAEE,OAAO,CAAC,QAAQ,OAAO,OAAO,UAAU;AACxC,UAAI,QAAQ,MAAM,GAAG;AACpB,eAAO,KAAK,MAAM,MAAM,OAAO,QAAQ,CAAC,CAAC;AAAA,MACzC;AAED,aAAO;AAAA,IACP,GAAE,EAAE,EACJ,OAAO,CAAC,CAAC,MAAM,KAAK,MAAM;AAC1B,UAAI;AACH,2BAAmB,IAAI;AACvB,4BAAoB,MAAM,OAAO,KAAK,CAAC;AACvC,eAAO;AAAA,MACZ,QAAM;AACD,eAAO;AAAA,MACP;AAAA,IACL,CAAI;AAAA,EAEJ;AACA;","x_google_ignoreList":[0]}
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const http = require("node:http");
|
|
4
|
-
const https = require("node:https");
|
|
5
|
-
const zlib = require("node:zlib");
|
|
6
|
-
const Stream = require("node:stream");
|
|
7
|
-
const node_buffer = require("node:buffer");
|
|
8
|
-
const index$1 = require("../../data-uri-to-buffer/dist/index.cjs");
|
|
9
|
-
const body = require("./body.cjs");
|
|
10
|
-
const response = require("./response.cjs");
|
|
11
|
-
const headers = require("./headers.cjs");
|
|
12
|
-
const request = require("./request.cjs");
|
|
13
|
-
const fetchError = require("./errors/fetch-error.cjs");
|
|
14
|
-
const abortError = require("./errors/abort-error.cjs");
|
|
15
|
-
const isRedirect = require("./utils/is-redirect.cjs");
|
|
16
|
-
const index = require("../../fetch-blob/index.cjs");
|
|
17
|
-
const is = require("./utils/is.cjs");
|
|
18
|
-
const referrer = require("./utils/referrer.cjs");
|
|
19
|
-
require("node:fs");
|
|
20
|
-
require("node:path");
|
|
21
|
-
require("../../node-domexception/index.cjs");
|
|
22
|
-
const supportedSchemas = /* @__PURE__ */ new Set(["data:", "http:", "https:"]);
|
|
23
|
-
async function fetch(url, options_) {
|
|
24
|
-
return new Promise((resolve, reject) => {
|
|
25
|
-
const request$1 = new request.default(url, options_);
|
|
26
|
-
const { parsedURL, options } = request.getNodeRequestOptions(request$1);
|
|
27
|
-
if (!supportedSchemas.has(parsedURL.protocol)) {
|
|
28
|
-
throw new TypeError(`node-fetch cannot load ${url}. URL scheme "${parsedURL.protocol.replace(/:$/, "")}" is not supported.`);
|
|
29
|
-
}
|
|
30
|
-
if (parsedURL.protocol === "data:") {
|
|
31
|
-
const data = index$1.dataUriToBuffer(request$1.url);
|
|
32
|
-
const response$12 = new response(data, { headers: { "Content-Type": data.typeFull } });
|
|
33
|
-
resolve(response$12);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const send = (parsedURL.protocol === "https:" ? https : http).request;
|
|
37
|
-
const { signal } = request$1;
|
|
38
|
-
let response$1 = null;
|
|
39
|
-
const abort = () => {
|
|
40
|
-
const error = new abortError.AbortError("The operation was aborted.");
|
|
41
|
-
reject(error);
|
|
42
|
-
if (request$1.body && request$1.body instanceof Stream.Readable) {
|
|
43
|
-
request$1.body.destroy(error);
|
|
44
|
-
}
|
|
45
|
-
if (!response$1 || !response$1.body) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
response$1.body.emit("error", error);
|
|
49
|
-
};
|
|
50
|
-
if (signal && signal.aborted) {
|
|
51
|
-
abort();
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
const abortAndFinalize = () => {
|
|
55
|
-
abort();
|
|
56
|
-
finalize();
|
|
57
|
-
};
|
|
58
|
-
const request_ = send(parsedURL.toString(), options);
|
|
59
|
-
if (signal) {
|
|
60
|
-
signal.addEventListener("abort", abortAndFinalize);
|
|
61
|
-
}
|
|
62
|
-
const finalize = () => {
|
|
63
|
-
request_.abort();
|
|
64
|
-
if (signal) {
|
|
65
|
-
signal.removeEventListener("abort", abortAndFinalize);
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
request_.on("error", (error) => {
|
|
69
|
-
reject(new fetchError.FetchError(`request to ${request$1.url} failed, reason: ${error.message}`, "system", error));
|
|
70
|
-
finalize();
|
|
71
|
-
});
|
|
72
|
-
fixResponseChunkedTransferBadEnding(request_, (error) => {
|
|
73
|
-
if (response$1 && response$1.body) {
|
|
74
|
-
response$1.body.destroy(error);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
if (process.version < "v14") {
|
|
78
|
-
request_.on("socket", (s) => {
|
|
79
|
-
let endedWithEventsCount;
|
|
80
|
-
s.prependListener("end", () => {
|
|
81
|
-
endedWithEventsCount = s._eventsCount;
|
|
82
|
-
});
|
|
83
|
-
s.prependListener("close", (hadError) => {
|
|
84
|
-
if (response$1 && endedWithEventsCount < s._eventsCount && !hadError) {
|
|
85
|
-
const error = new Error("Premature close");
|
|
86
|
-
error.code = "ERR_STREAM_PREMATURE_CLOSE";
|
|
87
|
-
response$1.body.emit("error", error);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
request_.on("response", (response_) => {
|
|
93
|
-
request_.setTimeout(0);
|
|
94
|
-
const headers$1 = headers.fromRawHeaders(response_.rawHeaders);
|
|
95
|
-
if (isRedirect.isRedirect(response_.statusCode)) {
|
|
96
|
-
const location = headers$1.get("Location");
|
|
97
|
-
let locationURL = null;
|
|
98
|
-
try {
|
|
99
|
-
locationURL = location === null ? null : new URL(location, request$1.url);
|
|
100
|
-
} catch {
|
|
101
|
-
if (request$1.redirect !== "manual") {
|
|
102
|
-
reject(new fetchError.FetchError(`uri requested responds with an invalid redirect URL: ${location}`, "invalid-redirect"));
|
|
103
|
-
finalize();
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
switch (request$1.redirect) {
|
|
108
|
-
case "error":
|
|
109
|
-
reject(new fetchError.FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request$1.url}`, "no-redirect"));
|
|
110
|
-
finalize();
|
|
111
|
-
return;
|
|
112
|
-
case "manual":
|
|
113
|
-
break;
|
|
114
|
-
case "follow": {
|
|
115
|
-
if (locationURL === null) {
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
if (request$1.counter >= request$1.follow) {
|
|
119
|
-
reject(new fetchError.FetchError(`maximum redirect reached at: ${request$1.url}`, "max-redirect"));
|
|
120
|
-
finalize();
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
const requestOptions = {
|
|
124
|
-
headers: new headers.default(request$1.headers),
|
|
125
|
-
follow: request$1.follow,
|
|
126
|
-
counter: request$1.counter + 1,
|
|
127
|
-
agent: request$1.agent,
|
|
128
|
-
compress: request$1.compress,
|
|
129
|
-
method: request$1.method,
|
|
130
|
-
body: body.clone(request$1),
|
|
131
|
-
signal: request$1.signal,
|
|
132
|
-
size: request$1.size,
|
|
133
|
-
referrer: request$1.referrer,
|
|
134
|
-
referrerPolicy: request$1.referrerPolicy
|
|
135
|
-
};
|
|
136
|
-
if (!is.isDomainOrSubdomain(request$1.url, locationURL) || !is.isSameProtocol(request$1.url, locationURL)) {
|
|
137
|
-
for (const name of ["authorization", "www-authenticate", "cookie", "cookie2"]) {
|
|
138
|
-
requestOptions.headers.delete(name);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (response_.statusCode !== 303 && request$1.body && options_.body instanceof Stream.Readable) {
|
|
142
|
-
reject(new fetchError.FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect"));
|
|
143
|
-
finalize();
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
if (response_.statusCode === 303 || (response_.statusCode === 301 || response_.statusCode === 302) && request$1.method === "POST") {
|
|
147
|
-
requestOptions.method = "GET";
|
|
148
|
-
requestOptions.body = void 0;
|
|
149
|
-
requestOptions.headers.delete("content-length");
|
|
150
|
-
}
|
|
151
|
-
const responseReferrerPolicy = referrer.parseReferrerPolicyFromHeader(headers$1);
|
|
152
|
-
if (responseReferrerPolicy) {
|
|
153
|
-
requestOptions.referrerPolicy = responseReferrerPolicy;
|
|
154
|
-
}
|
|
155
|
-
resolve(fetch(new request.default(locationURL, requestOptions)));
|
|
156
|
-
finalize();
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
default:
|
|
160
|
-
return reject(new TypeError(`Redirect option '${request$1.redirect}' is not a valid value of RequestRedirect`));
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (signal) {
|
|
164
|
-
response_.once("end", () => {
|
|
165
|
-
signal.removeEventListener("abort", abortAndFinalize);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
let body$1 = Stream.pipeline(response_, new Stream.PassThrough(), (error) => {
|
|
169
|
-
if (error) {
|
|
170
|
-
reject(error);
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
if (process.version < "v12.10") {
|
|
174
|
-
response_.on("aborted", abortAndFinalize);
|
|
175
|
-
}
|
|
176
|
-
const responseOptions = {
|
|
177
|
-
url: request$1.url,
|
|
178
|
-
status: response_.statusCode,
|
|
179
|
-
statusText: response_.statusMessage,
|
|
180
|
-
headers: headers$1,
|
|
181
|
-
size: request$1.size,
|
|
182
|
-
counter: request$1.counter,
|
|
183
|
-
highWaterMark: request$1.highWaterMark
|
|
184
|
-
};
|
|
185
|
-
const codings = headers$1.get("Content-Encoding");
|
|
186
|
-
if (!request$1.compress || request$1.method === "HEAD" || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {
|
|
187
|
-
response$1 = new response(body$1, responseOptions);
|
|
188
|
-
resolve(response$1);
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
const zlibOptions = {
|
|
192
|
-
flush: zlib.Z_SYNC_FLUSH,
|
|
193
|
-
finishFlush: zlib.Z_SYNC_FLUSH
|
|
194
|
-
};
|
|
195
|
-
if (codings === "gzip" || codings === "x-gzip") {
|
|
196
|
-
body$1 = Stream.pipeline(body$1, zlib.createGunzip(zlibOptions), (error) => {
|
|
197
|
-
if (error) {
|
|
198
|
-
reject(error);
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
response$1 = new response(body$1, responseOptions);
|
|
202
|
-
resolve(response$1);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
if (codings === "deflate" || codings === "x-deflate") {
|
|
206
|
-
const raw = Stream.pipeline(response_, new Stream.PassThrough(), (error) => {
|
|
207
|
-
if (error) {
|
|
208
|
-
reject(error);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
raw.once("data", (chunk) => {
|
|
212
|
-
if ((chunk[0] & 15) === 8) {
|
|
213
|
-
body$1 = Stream.pipeline(body$1, zlib.createInflate(), (error) => {
|
|
214
|
-
if (error) {
|
|
215
|
-
reject(error);
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
} else {
|
|
219
|
-
body$1 = Stream.pipeline(body$1, zlib.createInflateRaw(), (error) => {
|
|
220
|
-
if (error) {
|
|
221
|
-
reject(error);
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
response$1 = new response(body$1, responseOptions);
|
|
226
|
-
resolve(response$1);
|
|
227
|
-
});
|
|
228
|
-
raw.once("end", () => {
|
|
229
|
-
if (!response$1) {
|
|
230
|
-
response$1 = new response(body$1, responseOptions);
|
|
231
|
-
resolve(response$1);
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
if (codings === "br") {
|
|
237
|
-
body$1 = Stream.pipeline(body$1, zlib.createBrotliDecompress(), (error) => {
|
|
238
|
-
if (error) {
|
|
239
|
-
reject(error);
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
response$1 = new response(body$1, responseOptions);
|
|
243
|
-
resolve(response$1);
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
response$1 = new response(body$1, responseOptions);
|
|
247
|
-
resolve(response$1);
|
|
248
|
-
});
|
|
249
|
-
body.writeToStream(request_, request$1).catch(reject);
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
function fixResponseChunkedTransferBadEnding(request2, errorCallback) {
|
|
253
|
-
const LAST_CHUNK = node_buffer.Buffer.from("0\r\n\r\n");
|
|
254
|
-
let isChunkedTransfer = false;
|
|
255
|
-
let properLastChunkReceived = false;
|
|
256
|
-
let previousChunk;
|
|
257
|
-
request2.on("response", (response2) => {
|
|
258
|
-
const { headers: headers2 } = response2;
|
|
259
|
-
isChunkedTransfer = headers2["transfer-encoding"] === "chunked" && !headers2["content-length"];
|
|
260
|
-
});
|
|
261
|
-
request2.on("socket", (socket) => {
|
|
262
|
-
const onSocketClose = () => {
|
|
263
|
-
if (isChunkedTransfer && !properLastChunkReceived) {
|
|
264
|
-
const error = new Error("Premature close");
|
|
265
|
-
error.code = "ERR_STREAM_PREMATURE_CLOSE";
|
|
266
|
-
errorCallback(error);
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
const onData = (buf) => {
|
|
270
|
-
properLastChunkReceived = node_buffer.Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0;
|
|
271
|
-
if (!properLastChunkReceived && previousChunk) {
|
|
272
|
-
properLastChunkReceived = node_buffer.Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 && node_buffer.Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0;
|
|
273
|
-
}
|
|
274
|
-
previousChunk = buf;
|
|
275
|
-
};
|
|
276
|
-
socket.prependListener("close", onSocketClose);
|
|
277
|
-
socket.on("data", onData);
|
|
278
|
-
request2.on("close", () => {
|
|
279
|
-
socket.removeListener("close", onSocketClose);
|
|
280
|
-
socket.removeListener("data", onData);
|
|
281
|
-
});
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
exports.Response = response;
|
|
285
|
-
exports.Headers = headers.default;
|
|
286
|
-
exports.Request = request.default;
|
|
287
|
-
exports.FetchError = fetchError.FetchError;
|
|
288
|
-
exports.AbortError = abortError.AbortError;
|
|
289
|
-
exports.isRedirect = isRedirect.isRedirect;
|
|
290
|
-
exports.Blob = index.default;
|
|
291
|
-
exports.default = fetch;
|
|
292
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../node_modules/node-fetch/src/index.js"],"sourcesContent":["/**\n * Index.js\n *\n * a request API compatible with window.fetch\n *\n * All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/.\n */\n\nimport http from 'node:http';\nimport https from 'node:https';\nimport zlib from 'node:zlib';\nimport Stream, {PassThrough, pipeline as pump} from 'node:stream';\nimport {Buffer} from 'node:buffer';\n\nimport dataUriToBuffer from 'data-uri-to-buffer';\n\nimport {writeToStream, clone} from './body.js';\nimport Response from './response.js';\nimport Headers, {fromRawHeaders} from './headers.js';\nimport Request, {getNodeRequestOptions} from './request.js';\nimport {FetchError} from './errors/fetch-error.js';\nimport {AbortError} from './errors/abort-error.js';\nimport {isRedirect} from './utils/is-redirect.js';\nimport {FormData} from 'formdata-polyfill/esm.min.js';\nimport {isDomainOrSubdomain, isSameProtocol} from './utils/is.js';\nimport {parseReferrerPolicyFromHeader} from './utils/referrer.js';\nimport {\n\tBlob,\n\tFile,\n\tfileFromSync,\n\tfileFrom,\n\tblobFromSync,\n\tblobFrom\n} from 'fetch-blob/from.js';\n\nexport {FormData, Headers, Request, Response, FetchError, AbortError, isRedirect};\nexport {Blob, File, fileFromSync, fileFrom, blobFromSync, blobFrom};\n\nconst supportedSchemas = new Set(['data:', 'http:', 'https:']);\n\n/**\n * Fetch function\n *\n * @param {string | URL | import('./request').default} url - Absolute url or Request instance\n * @param {*} [options_] - Fetch options\n * @return {Promise<import('./response').default>}\n */\nexport default async function fetch(url, options_) {\n\treturn new Promise((resolve, reject) => {\n\t\t// Build request object\n\t\tconst request = new Request(url, options_);\n\t\tconst {parsedURL, options} = getNodeRequestOptions(request);\n\t\tif (!supportedSchemas.has(parsedURL.protocol)) {\n\t\t\tthrow new TypeError(`node-fetch cannot load ${url}. URL scheme \"${parsedURL.protocol.replace(/:$/, '')}\" is not supported.`);\n\t\t}\n\n\t\tif (parsedURL.protocol === 'data:') {\n\t\t\tconst data = dataUriToBuffer(request.url);\n\t\t\tconst response = new Response(data, {headers: {'Content-Type': data.typeFull}});\n\t\t\tresolve(response);\n\t\t\treturn;\n\t\t}\n\n\t\t// Wrap http.request into fetch\n\t\tconst send = (parsedURL.protocol === 'https:' ? https : http).request;\n\t\tconst {signal} = request;\n\t\tlet response = null;\n\n\t\tconst abort = () => {\n\t\t\tconst error = new AbortError('The operation was aborted.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\trequest.body.destroy(error);\n\t\t\t}\n\n\t\t\tif (!response || !response.body) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = () => {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// Send request\n\t\tconst request_ = send(parsedURL.toString(), options);\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tconst finalize = () => {\n\t\t\trequest_.abort();\n\t\t\tif (signal) {\n\t\t\t\tsignal.removeEventListener('abort', abortAndFinalize);\n\t\t\t}\n\t\t};\n\n\t\trequest_.on('error', error => {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${error.message}`, 'system', error));\n\t\t\tfinalize();\n\t\t});\n\n\t\tfixResponseChunkedTransferBadEnding(request_, error => {\n\t\t\tif (response && response.body) {\n\t\t\t\tresponse.body.destroy(error);\n\t\t\t}\n\t\t});\n\n\t\t/* c8 ignore next 18 */\n\t\tif (process.version < 'v14') {\n\t\t\t// Before Node.js 14, pipeline() does not fully support async iterators and does not always\n\t\t\t// properly handle when the socket close/end events are out of order.\n\t\t\trequest_.on('socket', s => {\n\t\t\t\tlet endedWithEventsCount;\n\t\t\t\ts.prependListener('end', () => {\n\t\t\t\t\tendedWithEventsCount = s._eventsCount;\n\t\t\t\t});\n\t\t\t\ts.prependListener('close', hadError => {\n\t\t\t\t\t// if end happened before close but the socket didn't emit an error, do it now\n\t\t\t\t\tif (response && endedWithEventsCount < s._eventsCount && !hadError) {\n\t\t\t\t\t\tconst error = new Error('Premature close');\n\t\t\t\t\t\terror.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\t\tresponse.body.emit('error', error);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\trequest_.on('response', response_ => {\n\t\t\trequest_.setTimeout(0);\n\t\t\tconst headers = fromRawHeaders(response_.rawHeaders);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (isRedirect(response_.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL(location, request.url);\n\t\t\t\t} catch {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// Nothing to do\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow': {\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOptions = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: clone(request),\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\tsize: request.size,\n\t\t\t\t\t\t\treferrer: request.referrer,\n\t\t\t\t\t\t\treferrerPolicy: request.referrerPolicy\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// when forwarding sensitive headers like \"Authorization\",\n\t\t\t\t\t\t// \"WWW-Authenticate\", and \"Cookie\" to untrusted targets,\n\t\t\t\t\t\t// headers will be ignored when following a redirect to a domain\n\t\t\t\t\t\t// that is not a subdomain match or exact match of the initial domain.\n\t\t\t\t\t\t// For example, a redirect from \"foo.com\" to either \"foo.com\" or \"sub.foo.com\"\n\t\t\t\t\t\t// will forward the sensitive headers, but a redirect to \"bar.com\" will not.\n\t\t\t\t\t\t// headers will also be ignored when following a redirect to a domain using\n\t\t\t\t\t\t// a different protocol. For example, a redirect from \"https://foo.com\" to \"http://foo.com\"\n\t\t\t\t\t\t// will not forward the sensitive headers\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOptions.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (response_.statusCode !== 303 && request.body && options_.body instanceof Stream.Readable) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (response_.statusCode === 303 || ((response_.statusCode === 301 || response_.statusCode === 302) && request.method === 'POST')) {\n\t\t\t\t\t\t\trequestOptions.method = 'GET';\n\t\t\t\t\t\t\trequestOptions.body = undefined;\n\t\t\t\t\t\t\trequestOptions.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 14\n\t\t\t\t\t\tconst responseReferrerPolicy = parseReferrerPolicyFromHeader(headers);\n\t\t\t\t\t\tif (responseReferrerPolicy) {\n\t\t\t\t\t\t\trequestOptions.referrerPolicy = responseReferrerPolicy;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOptions)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn reject(new TypeError(`Redirect option '${request.redirect}' is not a valid value of RequestRedirect`));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prepare response\n\t\t\tif (signal) {\n\t\t\t\tresponse_.once('end', () => {\n\t\t\t\t\tsignal.removeEventListener('abort', abortAndFinalize);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlet body = pump(response_, new PassThrough(), error => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\t\t\t});\n\t\t\t// see https://github.com/nodejs/node/pull/29376\n\t\t\t/* c8 ignore next 3 */\n\t\t\tif (process.version < 'v12.10') {\n\t\t\t\tresponse_.on('aborted', abortAndFinalize);\n\t\t\t}\n\n\t\t\tconst responseOptions = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: response_.statusCode,\n\t\t\t\tstatusText: response_.statusMessage,\n\t\t\t\theaders,\n\t\t\t\tsize: request.size,\n\t\t\t\tcounter: request.counter,\n\t\t\t\thighWaterMark: request.highWaterMark\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, responseOptions);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// For gzip\n\t\t\tif (codings === 'gzip' || codings === 'x-gzip') {\n\t\t\t\tbody = pump(body, zlib.createGunzip(zlibOptions), error => {\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tresponse = new Response(body, responseOptions);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For deflate\n\t\t\tif (codings === 'deflate' || codings === 'x-deflate') {\n\t\t\t\t// Handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = pump(response_, new PassThrough(), error => {\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\traw.once('data', chunk => {\n\t\t\t\t\t// See http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = pump(body, zlib.createInflate(), error => {\n\t\t\t\t\t\t\tif (error) {\n\t\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = pump(body, zlib.createInflateRaw(), error => {\n\t\t\t\t\t\t\tif (error) {\n\t\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tresponse = new Response(body, responseOptions);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\traw.once('end', () => {\n\t\t\t\t\t// Some old IIS servers return zero-length OK deflate responses, so\n\t\t\t\t\t// 'data' is never emitted. See https://github.com/node-fetch/node-fetch/pull/903\n\t\t\t\t\tif (!response) {\n\t\t\t\t\t\tresponse = new Response(body, responseOptions);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For br\n\t\t\tif (codings === 'br') {\n\t\t\t\tbody = pump(body, zlib.createBrotliDecompress(), error => {\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tresponse = new Response(body, responseOptions);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Otherwise, use response as-is\n\t\t\tresponse = new Response(body, responseOptions);\n\t\t\tresolve(response);\n\t\t});\n\n\t\t// eslint-disable-next-line promise/prefer-await-to-then\n\t\twriteToStream(request_, request).catch(reject);\n\t});\n}\n\nfunction fixResponseChunkedTransferBadEnding(request, errorCallback) {\n\tconst LAST_CHUNK = Buffer.from('0\\r\\n\\r\\n');\n\n\tlet isChunkedTransfer = false;\n\tlet properLastChunkReceived = false;\n\tlet previousChunk;\n\n\trequest.on('response', response => {\n\t\tconst {headers} = response;\n\t\tisChunkedTransfer = headers['transfer-encoding'] === 'chunked' && !headers['content-length'];\n\t});\n\n\trequest.on('socket', socket => {\n\t\tconst onSocketClose = () => {\n\t\t\tif (isChunkedTransfer && !properLastChunkReceived) {\n\t\t\t\tconst error = new Error('Premature close');\n\t\t\t\terror.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\terrorCallback(error);\n\t\t\t}\n\t\t};\n\n\t\tconst onData = buf => {\n\t\t\tproperLastChunkReceived = Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0;\n\n\t\t\t// Sometimes final 0-length chunk and end of message code are in separate packets\n\t\t\tif (!properLastChunkReceived && previousChunk) {\n\t\t\t\tproperLastChunkReceived = (\n\t\t\t\t\tBuffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 &&\n\t\t\t\t\tBuffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tpreviousChunk = buf;\n\t\t};\n\n\t\tsocket.prependListener('close', onSocketClose);\n\t\tsocket.on('data', onData);\n\n\t\trequest.on('close', () => {\n\t\t\tsocket.removeListener('close', onSocketClose);\n\t\t\tsocket.removeListener('data', onData);\n\t\t});\n\t});\n}\n"],"names":["request","Request","getNodeRequestOptions","dataUriToBuffer","response","Response","AbortError","FetchError","headers","fromRawHeaders","isRedirect","Headers","clone","isDomainOrSubdomain","isSameProtocol","parseReferrerPolicyFromHeader","body","pump","PassThrough","writeToStream","Buffer"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,mBAAmB,oBAAI,IAAI,CAAC,SAAS,SAAS,QAAQ,CAAC;AAS9C,eAAe,MAAM,KAAK,UAAU;AAClD,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AAEvC,UAAMA,YAAU,IAAIC,QAAAA,QAAQ,KAAK,QAAQ;AACzC,UAAM,EAAC,WAAW,QAAO,IAAIC,QAAqB,sBAACF,SAAO;AAC1D,QAAI,CAAC,iBAAiB,IAAI,UAAU,QAAQ,GAAG;AAC9C,YAAM,IAAI,UAAU,0BAA0B,GAAG,iBAAiB,UAAU,SAAS,QAAQ,MAAM,EAAE,CAAC,qBAAqB;AAAA,IAC3H;AAED,QAAI,UAAU,aAAa,SAAS;AACnC,YAAM,OAAOG,QAAAA,gBAAgBH,UAAQ,GAAG;AACxC,YAAMI,cAAW,IAAIC,SAAS,MAAM,EAAC,SAAS,EAAC,gBAAgB,KAAK,SAAQ,EAAC,CAAC;AAC9E,cAAQD,WAAQ;AAChB;AAAA,IACA;AAGD,UAAM,QAAQ,UAAU,aAAa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