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,149 +0,0 @@
|
|
|
1
|
-
import { isIP } from "node:net";
|
|
2
|
-
function stripURLForUseAsAReferrer(url, originOnly = false) {
|
|
3
|
-
if (url == null) {
|
|
4
|
-
return "no-referrer";
|
|
5
|
-
}
|
|
6
|
-
url = new URL(url);
|
|
7
|
-
if (/^(about|blob|data):$/.test(url.protocol)) {
|
|
8
|
-
return "no-referrer";
|
|
9
|
-
}
|
|
10
|
-
url.username = "";
|
|
11
|
-
url.password = "";
|
|
12
|
-
url.hash = "";
|
|
13
|
-
if (originOnly) {
|
|
14
|
-
url.pathname = "";
|
|
15
|
-
url.search = "";
|
|
16
|
-
}
|
|
17
|
-
return url;
|
|
18
|
-
}
|
|
19
|
-
const ReferrerPolicy = /* @__PURE__ */ new Set([
|
|
20
|
-
"",
|
|
21
|
-
"no-referrer",
|
|
22
|
-
"no-referrer-when-downgrade",
|
|
23
|
-
"same-origin",
|
|
24
|
-
"origin",
|
|
25
|
-
"strict-origin",
|
|
26
|
-
"origin-when-cross-origin",
|
|
27
|
-
"strict-origin-when-cross-origin",
|
|
28
|
-
"unsafe-url"
|
|
29
|
-
]);
|
|
30
|
-
const DEFAULT_REFERRER_POLICY = "strict-origin-when-cross-origin";
|
|
31
|
-
function validateReferrerPolicy(referrerPolicy) {
|
|
32
|
-
if (!ReferrerPolicy.has(referrerPolicy)) {
|
|
33
|
-
throw new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);
|
|
34
|
-
}
|
|
35
|
-
return referrerPolicy;
|
|
36
|
-
}
|
|
37
|
-
function isOriginPotentiallyTrustworthy(url) {
|
|
38
|
-
if (/^(http|ws)s:$/.test(url.protocol)) {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
const hostIp = url.host.replace(/(^\[)|(]$)/g, "");
|
|
42
|
-
const hostIPVersion = isIP(hostIp);
|
|
43
|
-
if (hostIPVersion === 4 && /^127\./.test(hostIp)) {
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
if (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
if (url.host === "localhost" || url.host.endsWith(".localhost")) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
if (url.protocol === "file:") {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
function isUrlPotentiallyTrustworthy(url) {
|
|
58
|
-
if (/^about:(blank|srcdoc)$/.test(url)) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
if (url.protocol === "data:") {
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
if (/^(blob|filesystem):$/.test(url.protocol)) {
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
return isOriginPotentiallyTrustworthy(url);
|
|
68
|
-
}
|
|
69
|
-
function determineRequestsReferrer(request, { referrerURLCallback, referrerOriginCallback } = {}) {
|
|
70
|
-
if (request.referrer === "no-referrer" || request.referrerPolicy === "") {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
const policy = request.referrerPolicy;
|
|
74
|
-
if (request.referrer === "about:client") {
|
|
75
|
-
return "no-referrer";
|
|
76
|
-
}
|
|
77
|
-
const referrerSource = request.referrer;
|
|
78
|
-
let referrerURL = stripURLForUseAsAReferrer(referrerSource);
|
|
79
|
-
let referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);
|
|
80
|
-
if (referrerURL.toString().length > 4096) {
|
|
81
|
-
referrerURL = referrerOrigin;
|
|
82
|
-
}
|
|
83
|
-
if (referrerURLCallback) {
|
|
84
|
-
referrerURL = referrerURLCallback(referrerURL);
|
|
85
|
-
}
|
|
86
|
-
if (referrerOriginCallback) {
|
|
87
|
-
referrerOrigin = referrerOriginCallback(referrerOrigin);
|
|
88
|
-
}
|
|
89
|
-
const currentURL = new URL(request.url);
|
|
90
|
-
switch (policy) {
|
|
91
|
-
case "no-referrer":
|
|
92
|
-
return "no-referrer";
|
|
93
|
-
case "origin":
|
|
94
|
-
return referrerOrigin;
|
|
95
|
-
case "unsafe-url":
|
|
96
|
-
return referrerURL;
|
|
97
|
-
case "strict-origin":
|
|
98
|
-
if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
|
|
99
|
-
return "no-referrer";
|
|
100
|
-
}
|
|
101
|
-
return referrerOrigin.toString();
|
|
102
|
-
case "strict-origin-when-cross-origin":
|
|
103
|
-
if (referrerURL.origin === currentURL.origin) {
|
|
104
|
-
return referrerURL;
|
|
105
|
-
}
|
|
106
|
-
if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
|
|
107
|
-
return "no-referrer";
|
|
108
|
-
}
|
|
109
|
-
return referrerOrigin;
|
|
110
|
-
case "same-origin":
|
|
111
|
-
if (referrerURL.origin === currentURL.origin) {
|
|
112
|
-
return referrerURL;
|
|
113
|
-
}
|
|
114
|
-
return "no-referrer";
|
|
115
|
-
case "origin-when-cross-origin":
|
|
116
|
-
if (referrerURL.origin === currentURL.origin) {
|
|
117
|
-
return referrerURL;
|
|
118
|
-
}
|
|
119
|
-
return referrerOrigin;
|
|
120
|
-
case "no-referrer-when-downgrade":
|
|
121
|
-
if (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {
|
|
122
|
-
return "no-referrer";
|
|
123
|
-
}
|
|
124
|
-
return referrerURL;
|
|
125
|
-
default:
|
|
126
|
-
throw new TypeError(`Invalid referrerPolicy: ${policy}`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
function parseReferrerPolicyFromHeader(headers) {
|
|
130
|
-
const policyTokens = (headers.get("referrer-policy") || "").split(/[,\s]+/);
|
|
131
|
-
let policy = "";
|
|
132
|
-
for (const token of policyTokens) {
|
|
133
|
-
if (token && ReferrerPolicy.has(token)) {
|
|
134
|
-
policy = token;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return policy;
|
|
138
|
-
}
|
|
139
|
-
export {
|
|
140
|
-
DEFAULT_REFERRER_POLICY,
|
|
141
|
-
ReferrerPolicy,
|
|
142
|
-
determineRequestsReferrer,
|
|
143
|
-
isOriginPotentiallyTrustworthy,
|
|
144
|
-
isUrlPotentiallyTrustworthy,
|
|
145
|
-
parseReferrerPolicyFromHeader,
|
|
146
|
-
stripURLForUseAsAReferrer,
|
|
147
|
-
validateReferrerPolicy
|
|
148
|
-
};
|
|
149
|
-
//# sourceMappingURL=referrer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"referrer.js","sources":["../../../../../node_modules/node-fetch/src/utils/referrer.js"],"sourcesContent":["import {isIP} from 'node:net';\n\n/**\n * @external URL\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL|URL}\n */\n\n/**\n * @module utils/referrer\n * @private\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#strip-url|Referrer Policy §8.4. Strip url for use as a referrer}\n * @param {string} URL\n * @param {boolean} [originOnly=false]\n */\nexport function stripURLForUseAsAReferrer(url, originOnly = false) {\n\t// 1. If url is null, return no referrer.\n\tif (url == null) { // eslint-disable-line no-eq-null, eqeqeq\n\t\treturn 'no-referrer';\n\t}\n\n\turl = new URL(url);\n\n\t// 2. If url's scheme is a local scheme, then return no referrer.\n\tif (/^(about|blob|data):$/.test(url.protocol)) {\n\t\treturn 'no-referrer';\n\t}\n\n\t// 3. Set url's username to the empty string.\n\turl.username = '';\n\n\t// 4. Set url's password to null.\n\t// Note: `null` appears to be a mistake as this actually results in the password being `\"null\"`.\n\turl.password = '';\n\n\t// 5. Set url's fragment to null.\n\t// Note: `null` appears to be a mistake as this actually results in the fragment being `\"#null\"`.\n\turl.hash = '';\n\n\t// 6. If the origin-only flag is true, then:\n\tif (originOnly) {\n\t\t// 6.1. Set url's path to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the path being `\"/null\"`.\n\t\turl.pathname = '';\n\n\t\t// 6.2. Set url's query to null.\n\t\t// Note: `null` appears to be a mistake as this actually results in the query being `\"?null\"`.\n\t\turl.search = '';\n\t}\n\n\t// 7. Return url.\n\treturn url;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#enumdef-referrerpolicy|enum ReferrerPolicy}\n */\nexport const ReferrerPolicy = new Set([\n\t'',\n\t'no-referrer',\n\t'no-referrer-when-downgrade',\n\t'same-origin',\n\t'origin',\n\t'strict-origin',\n\t'origin-when-cross-origin',\n\t'strict-origin-when-cross-origin',\n\t'unsafe-url'\n]);\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#default-referrer-policy|default referrer policy}\n */\nexport const DEFAULT_REFERRER_POLICY = 'strict-origin-when-cross-origin';\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#referrer-policies|Referrer Policy §3. Referrer Policies}\n * @param {string} referrerPolicy\n * @returns {string} referrerPolicy\n */\nexport function validateReferrerPolicy(referrerPolicy) {\n\tif (!ReferrerPolicy.has(referrerPolicy)) {\n\t\tthrow new TypeError(`Invalid referrerPolicy: ${referrerPolicy}`);\n\t}\n\n\treturn referrerPolicy;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy|Referrer Policy §3.2. Is origin potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isOriginPotentiallyTrustworthy(url) {\n\t// 1. If origin is an opaque origin, return \"Not Trustworthy\".\n\t// Not applicable\n\n\t// 2. Assert: origin is a tuple origin.\n\t// Not for implementations\n\n\t// 3. If origin's scheme is either \"https\" or \"wss\", return \"Potentially Trustworthy\".\n\tif (/^(http|ws)s:$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 4. If origin's host component matches one of the CIDR notations 127.0.0.0/8 or ::1/128 [RFC4632], return \"Potentially Trustworthy\".\n\tconst hostIp = url.host.replace(/(^\\[)|(]$)/g, '');\n\tconst hostIPVersion = isIP(hostIp);\n\n\tif (hostIPVersion === 4 && /^127\\./.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\tif (hostIPVersion === 6 && /^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(hostIp)) {\n\t\treturn true;\n\t}\n\n\t// 5. If origin's host component is \"localhost\" or falls within \".localhost\", and the user agent conforms to the name resolution rules in [let-localhost-be-localhost], return \"Potentially Trustworthy\".\n\t// We are returning FALSE here because we cannot ensure conformance to\n\t// let-localhost-be-loalhost (https://tools.ietf.org/html/draft-west-let-localhost-be-localhost)\n\tif (url.host === 'localhost' || url.host.endsWith('.localhost')) {\n\t\treturn false;\n\t}\n\n\t// 6. If origin's scheme component is file, return \"Potentially Trustworthy\".\n\tif (url.protocol === 'file:') {\n\t\treturn true;\n\t}\n\n\t// 7. If origin's scheme component is one which the user agent considers to be authenticated, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 8. If origin has been configured as a trustworthy origin, return \"Potentially Trustworthy\".\n\t// Not supported\n\n\t// 9. Return \"Not Trustworthy\".\n\treturn false;\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-secure-contexts/#is-url-trustworthy|Referrer Policy §3.3. Is url potentially trustworthy?}\n * @param {external:URL} url\n * @returns `true`: \"Potentially Trustworthy\", `false`: \"Not Trustworthy\"\n */\nexport function isUrlPotentiallyTrustworthy(url) {\n\t// 1. If url is \"about:blank\" or \"about:srcdoc\", return \"Potentially Trustworthy\".\n\tif (/^about:(blank|srcdoc)$/.test(url)) {\n\t\treturn true;\n\t}\n\n\t// 2. If url's scheme is \"data\", return \"Potentially Trustworthy\".\n\tif (url.protocol === 'data:') {\n\t\treturn true;\n\t}\n\n\t// Note: The origin of blob: and filesystem: URLs is the origin of the context in which they were\n\t// created. Therefore, blobs created in a trustworthy origin will themselves be potentially\n\t// trustworthy.\n\tif (/^(blob|filesystem):$/.test(url.protocol)) {\n\t\treturn true;\n\t}\n\n\t// 3. Return the result of executing §3.2 Is origin potentially trustworthy? on url's origin.\n\treturn isOriginPotentiallyTrustworthy(url);\n}\n\n/**\n * Modifies the referrerURL to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerURLCallback\n * @param {external:URL} referrerURL\n * @returns {external:URL} modified referrerURL\n */\n\n/**\n * Modifies the referrerOrigin to enforce any extra security policy considerations.\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}, step 7\n * @callback module:utils/referrer~referrerOriginCallback\n * @param {external:URL} referrerOrigin\n * @returns {external:URL} modified referrerOrigin\n */\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer|Referrer Policy §8.3. Determine request's Referrer}\n * @param {Request} request\n * @param {object} o\n * @param {module:utils/referrer~referrerURLCallback} o.referrerURLCallback\n * @param {module:utils/referrer~referrerOriginCallback} o.referrerOriginCallback\n * @returns {external:URL} Request's referrer\n */\nexport function determineRequestsReferrer(request, {referrerURLCallback, referrerOriginCallback} = {}) {\n\t// There are 2 notes in the specification about invalid pre-conditions. We return null, here, for\n\t// these cases:\n\t// > Note: If request's referrer is \"no-referrer\", Fetch will not call into this algorithm.\n\t// > Note: If request's referrer policy is the empty string, Fetch will not call into this\n\t// > algorithm.\n\tif (request.referrer === 'no-referrer' || request.referrerPolicy === '') {\n\t\treturn null;\n\t}\n\n\t// 1. Let policy be request's associated referrer policy.\n\tconst policy = request.referrerPolicy;\n\n\t// 2. Let environment be request's client.\n\t// not applicable to node.js\n\n\t// 3. Switch on request's referrer:\n\tif (request.referrer === 'about:client') {\n\t\treturn 'no-referrer';\n\t}\n\n\t// \"a URL\": Let referrerSource be request's referrer.\n\tconst referrerSource = request.referrer;\n\n\t// 4. Let request's referrerURL be the result of stripping referrerSource for use as a referrer.\n\tlet referrerURL = stripURLForUseAsAReferrer(referrerSource);\n\n\t// 5. Let referrerOrigin be the result of stripping referrerSource for use as a referrer, with the\n\t// origin-only flag set to true.\n\tlet referrerOrigin = stripURLForUseAsAReferrer(referrerSource, true);\n\n\t// 6. If the result of serializing referrerURL is a string whose length is greater than 4096, set\n\t// referrerURL to referrerOrigin.\n\tif (referrerURL.toString().length > 4096) {\n\t\treferrerURL = referrerOrigin;\n\t}\n\n\t// 7. The user agent MAY alter referrerURL or referrerOrigin at this point to enforce arbitrary\n\t// policy considerations in the interests of minimizing data leakage. For example, the user\n\t// agent could strip the URL down to an origin, modify its host, replace it with an empty\n\t// string, etc.\n\tif (referrerURLCallback) {\n\t\treferrerURL = referrerURLCallback(referrerURL);\n\t}\n\n\tif (referrerOriginCallback) {\n\t\treferrerOrigin = referrerOriginCallback(referrerOrigin);\n\t}\n\n\t// 8.Execute the statements corresponding to the value of policy:\n\tconst currentURL = new URL(request.url);\n\n\tswitch (policy) {\n\t\tcase 'no-referrer':\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin':\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'unsafe-url':\n\t\t\treturn referrerURL;\n\n\t\tcase 'strict-origin':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerOrigin.\n\t\t\treturn referrerOrigin.toString();\n\n\t\tcase 'strict-origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 3. Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'same-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// 2. Return no referrer.\n\t\t\treturn 'no-referrer';\n\n\t\tcase 'origin-when-cross-origin':\n\t\t\t// 1. If the origin of referrerURL and the origin of request's current URL are the same, then\n\t\t\t// return referrerURL.\n\t\t\tif (referrerURL.origin === currentURL.origin) {\n\t\t\t\treturn referrerURL;\n\t\t\t}\n\n\t\t\t// Return referrerOrigin.\n\t\t\treturn referrerOrigin;\n\n\t\tcase 'no-referrer-when-downgrade':\n\t\t\t// 1. If referrerURL is a potentially trustworthy URL and request's current URL is not a\n\t\t\t// potentially trustworthy URL, then return no referrer.\n\t\t\tif (isUrlPotentiallyTrustworthy(referrerURL) && !isUrlPotentiallyTrustworthy(currentURL)) {\n\t\t\t\treturn 'no-referrer';\n\t\t\t}\n\n\t\t\t// 2. Return referrerURL.\n\t\t\treturn referrerURL;\n\n\t\tdefault:\n\t\t\tthrow new TypeError(`Invalid referrerPolicy: ${policy}`);\n\t}\n}\n\n/**\n * @see {@link https://w3c.github.io/webappsec-referrer-policy/#parse-referrer-policy-from-header|Referrer Policy §8.1. Parse a referrer policy from a Referrer-Policy header}\n * @param {Headers} headers Response headers\n * @returns {string} policy\n */\nexport function parseReferrerPolicyFromHeader(headers) {\n\t// 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy`\n\t// and response’s header list.\n\tconst policyTokens = (headers.get('referrer-policy') || '').split(/[,\\s]+/);\n\n\t// 2. Let policy be the empty string.\n\tlet policy = '';\n\n\t// 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty\n\t// string, then set policy to token.\n\t// Note: This algorithm loops over multiple policy values to allow deployment of new policy\n\t// values with fallbacks for older user agents, as described in § 11.1 Unknown Policy Values.\n\tfor (const token of policyTokens) {\n\t\tif (token && ReferrerPolicy.has(token)) {\n\t\t\tpolicy = token;\n\t\t}\n\t}\n\n\t// 4. Return policy.\n\treturn policy;\n}\n"],"names":[],"mappings":";AAiBO,SAAS,0BAA0B,KAAK,aAAa,OAAO;AAElE,MAAI,OAAO,MAAM;AAChB,WAAO;AAAA,EACP;AAED,QAAM,IAAI,IAAI,GAAG;AAGjB,MAAI,uBAAuB,KAAK,IAAI,QAAQ,GAAG;AAC9C,WAAO;AAAA,EACP;AAGD,MAAI,WAAW;AAIf,MAAI,WAAW;AAIf,MAAI,OAAO;AAGX,MAAI,YAAY;AAGf,QAAI,WAAW;AAIf,QAAI,SAAS;AAAA,EACb;AAGD,SAAO;AACR;AAKY,MAAC,iBAAiB,oBAAI,IAAI;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAKW,MAAC,0BAA0B;AAOhC,SAAS,uBAAuB,gBAAgB;AACtD,MAAI,CAAC,eAAe,IAAI,cAAc,GAAG;AACxC,UAAM,IAAI,UAAU,2BAA2B,cAAc,EAAE;AAAA,EAC/D;AAED,SAAO;AACR;AAOO,SAAS,+BAA+B,KAAK;AAQnD,MAAI,gBAAgB,KAAK,IAAI,QAAQ,GAAG;AACvC,WAAO;AAAA,EACP;AAGD,QAAM,SAAS,IAAI,KAAK,QAAQ,eAAe,EAAE;AACjD,QAAM,gBAAgB,KAAK,MAAM;AAEjC,MAAI,kBAAkB,KAAK,SAAS,KAAK,MAAM,GAAG;AACjD,WAAO;AAAA,EACP;AAED,MAAI,kBAAkB,KAAK,mCAAmC,KAAK,MAAM,GAAG;AAC3E,WAAO;AAAA,EACP;AAKD,MAAI,IAAI,SAAS,eAAe,IAAI,KAAK,SAAS,YAAY,GAAG;AAChE,WAAO;AAAA,EACP;AAGD,MAAI,IAAI,aAAa,SAAS;AAC7B,WAAO;AAAA,EACP;AASD,SAAO;AACR;AAOO,SAAS,4BAA4B,KAAK;AAEhD,MAAI,yBAAyB,KAAK,GAAG,GAAG;AACvC,WAAO;AAAA,EACP;AAGD,MAAI,IAAI,aAAa,SAAS;AAC7B,WAAO;AAAA,EACP;AAKD,MAAI,uBAAuB,KAAK,IAAI,QAAQ,GAAG;AAC9C,WAAO;AAAA,EACP;AAGD,SAAO,+BAA+B,GAAG;AAC1C;AA0BO,SAAS,0BAA0B,SAAS,EAAC,qBAAqB,uBAAsB,IAAI,CAAA,GAAI;AAMtG,MAAI,QAAQ,aAAa,iBAAiB,QAAQ,mBAAmB,IAAI;AACxE,WAAO;AAAA,EACP;AAGD,QAAM,SAAS,QAAQ;AAMvB,MAAI,QAAQ,aAAa,gBAAgB;AACxC,WAAO;AAAA,EACP;AAGD,QAAM,iBAAiB,QAAQ;AAG/B,MAAI,cAAc,0BAA0B,cAAc;AAI1D,MAAI,iBAAiB,0BAA0B,gBAAgB,IAAI;AAInE,MAAI,YAAY,WAAW,SAAS,MAAM;AACzC,kBAAc;AAAA,EACd;AAMD,MAAI,qBAAqB;AACxB,kBAAc,oBAAoB,WAAW;AAAA,EAC7C;AAED,MAAI,wBAAwB;AAC3B,qBAAiB,uBAAuB,cAAc;AAAA,EACtD;AAGD,QAAM,aAAa,IAAI,IAAI,QAAQ,GAAG;AAEtC,UAAQ,QAAM;AAAA,IACb,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AACJ,aAAO;AAAA,IAER,KAAK;AAGJ,UAAI,4BAA4B,WAAW,KAAK,CAAC,4BAA4B,UAAU,GAAG;AACzF,eAAO;AAAA,MACP;AAGD,aAAO,eAAe;IAEvB,KAAK;AAGJ,UAAI,YAAY,WAAW,WAAW,QAAQ;AAC7C,eAAO;AAAA,MACP;AAID,UAAI,4BAA4B,WAAW,KAAK,CAAC,4BAA4B,UAAU,GAAG;AACzF,eAAO;AAAA,MACP;AAGD,aAAO;AAAA,IAER,KAAK;AAGJ,UAAI,YAAY,WAAW,WAAW,QAAQ;AAC7C,eAAO;AAAA,MACP;AAGD,aAAO;AAAA,IAER,KAAK;AAGJ,UAAI,YAAY,WAAW,WAAW,QAAQ;AAC7C,eAAO;AAAA,MACP;AAGD,aAAO;AAAA,IAER,KAAK;AAGJ,UAAI,4BAA4B,WAAW,KAAK,CAAC,4BAA4B,UAAU,GAAG;AACzF,eAAO;AAAA,MACP;AAGD,aAAO;AAAA,IAER;AACC,YAAM,IAAI,UAAU,2BAA2B,MAAM,EAAE;AAAA,EACxD;AACF;AAOO,SAAS,8BAA8B,SAAS;AAGtD,QAAM,gBAAgB,QAAQ,IAAI,iBAAiB,KAAK,IAAI,MAAM,QAAQ;AAG1E,MAAI,SAAS;AAMb,aAAW,SAAS,cAAc;AACjC,QAAI,SAAS,eAAe,IAAI,KAAK,GAAG;AACvC,eAAS;AAAA,IACT;AAAA,EACD;AAGD,SAAO;AACR;","x_google_ignoreList":[0]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
var extract_description = extractDescription;
|
|
4
|
-
function extractDescription(d) {
|
|
5
|
-
if (!d) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
if (d === "ERROR: No README data found!") {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
d = d.trim().split("\n");
|
|
12
|
-
let s = 0;
|
|
13
|
-
while (d[s] && d[s].trim().match(/^(#|$)/)) {
|
|
14
|
-
s++;
|
|
15
|
-
}
|
|
16
|
-
const l = d.length;
|
|
17
|
-
let e = s + 1;
|
|
18
|
-
while (e < l && d[e].trim()) {
|
|
19
|
-
e++;
|
|
20
|
-
}
|
|
21
|
-
return d.slice(s, e).join(" ").trim();
|
|
22
|
-
}
|
|
23
|
-
exports.extract_description = extract_description;
|
|
24
|
-
//# sourceMappingURL=extract_description.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extract_description.cjs","sources":["../../../../node_modules/normalize-package-data/lib/extract_description.js"],"sourcesContent":["module.exports = extractDescription\n\n// Extracts description from contents of a readme file in markdown format\nfunction extractDescription (d) {\n if (!d) {\n return\n }\n if (d === 'ERROR: No README data found!') {\n return\n }\n // the first block of text before the first heading\n // that isn't the first line heading\n d = d.trim().split('\\n')\n let s = 0\n while (d[s] && d[s].trim().match(/^(#|$)/)) {\n s++\n }\n const l = d.length\n let e = s + 1\n while (e < l && d[e].trim()) {\n e++\n }\n return d.slice(s, e).join(' ').trim()\n}\n"],"names":[],"mappings":";;AAAA,IAAA,sBAAiB;AAGjB,SAAS,mBAAoB,GAAG;AAC9B,MAAI,CAAC,GAAG;AACN;AAAA,EACD;AACD,MAAI,MAAM,gCAAgC;AACxC;AAAA,EACD;AAGD,MAAI,EAAE,OAAO,MAAM,IAAI;AACvB,MAAI,IAAI;AACR,SAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAM,EAAC,MAAM,QAAQ,GAAG;AAC1C;AAAA,EACD;AACD,QAAM,IAAI,EAAE;AACZ,MAAI,IAAI,IAAI;AACZ,SAAO,IAAI,KAAK,EAAE,CAAC,EAAE,KAAI,GAAI;AAC3B;AAAA,EACD;AACD,SAAO,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM;AACvC;;","x_google_ignoreList":[0]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var extract_description = extractDescription;
|
|
2
|
-
function extractDescription(d) {
|
|
3
|
-
if (!d) {
|
|
4
|
-
return;
|
|
5
|
-
}
|
|
6
|
-
if (d === "ERROR: No README data found!") {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
d = d.trim().split("\n");
|
|
10
|
-
let s = 0;
|
|
11
|
-
while (d[s] && d[s].trim().match(/^(#|$)/)) {
|
|
12
|
-
s++;
|
|
13
|
-
}
|
|
14
|
-
const l = d.length;
|
|
15
|
-
let e = s + 1;
|
|
16
|
-
while (e < l && d[e].trim()) {
|
|
17
|
-
e++;
|
|
18
|
-
}
|
|
19
|
-
return d.slice(s, e).join(" ").trim();
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
extract_description as e
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=extract_description.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extract_description.js","sources":["../../../../node_modules/normalize-package-data/lib/extract_description.js"],"sourcesContent":["module.exports = extractDescription\n\n// Extracts description from contents of a readme file in markdown format\nfunction extractDescription (d) {\n if (!d) {\n return\n }\n if (d === 'ERROR: No README data found!') {\n return\n }\n // the first block of text before the first heading\n // that isn't the first line heading\n d = d.trim().split('\\n')\n let s = 0\n while (d[s] && d[s].trim().match(/^(#|$)/)) {\n s++\n }\n const l = d.length\n let e = s + 1\n while (e < l && d[e].trim()) {\n e++\n }\n return d.slice(s, e).join(' ').trim()\n}\n"],"names":[],"mappings":"AAAA,IAAA,sBAAiB;AAGjB,SAAS,mBAAoB,GAAG;AAC9B,MAAI,CAAC,GAAG;AACN;AAAA,EACD;AACD,MAAI,MAAM,gCAAgC;AACxC;AAAA,EACD;AAGD,MAAI,EAAE,OAAO,MAAM,IAAI;AACvB,MAAI,IAAI;AACR,SAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAM,EAAC,MAAM,QAAQ,GAAG;AAC1C;AAAA,EACD;AACD,QAAM,IAAI,EAAE;AACZ,MAAI,IAAI,IAAI;AACZ,SAAO,IAAI,KAAK,EAAE,CAAC,EAAE,KAAI,GAAI;AAC3B;AAAA,EACD;AACD,SAAO,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM;AACvC;","x_google_ignoreList":[0]}
|
|
@@ -1,438 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const valid = require("../../semver/functions/valid.cjs");
|
|
4
|
-
const clean = require("../../semver/functions/clean.cjs");
|
|
5
|
-
const index = require("../../validate-npm-package-license/index.cjs");
|
|
6
|
-
const index$1 = require("../../hosted-git-info/lib/index.cjs");
|
|
7
|
-
const index$2 = require("../../is-core-module/index.cjs");
|
|
8
|
-
const extract_description = require("./extract_description.cjs");
|
|
9
|
-
const require$$0 = require("url");
|
|
10
|
-
const typos$1 = require("./typos.json.cjs");
|
|
11
|
-
var isValidSemver = valid.valid_1;
|
|
12
|
-
var cleanSemver = clean.clean_1;
|
|
13
|
-
var validateLicense = index.validateNpmPackageLicense;
|
|
14
|
-
var hostedGitInfo = index$1.lib;
|
|
15
|
-
var isBuiltinModule = index$2.isCoreModule;
|
|
16
|
-
var depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
|
|
17
|
-
var extractDescription = extract_description.extract_description;
|
|
18
|
-
var url = require$$0;
|
|
19
|
-
var typos = typos$1.default;
|
|
20
|
-
var isEmail = (str) => str.includes("@") && str.indexOf("@") < str.lastIndexOf(".");
|
|
21
|
-
var fixer = {
|
|
22
|
-
// default warning function
|
|
23
|
-
warn: function() {
|
|
24
|
-
},
|
|
25
|
-
fixRepositoryField: function(data) {
|
|
26
|
-
if (data.repositories) {
|
|
27
|
-
this.warn("repositories");
|
|
28
|
-
data.repository = data.repositories[0];
|
|
29
|
-
}
|
|
30
|
-
if (!data.repository) {
|
|
31
|
-
return this.warn("missingRepository");
|
|
32
|
-
}
|
|
33
|
-
if (typeof data.repository === "string") {
|
|
34
|
-
data.repository = {
|
|
35
|
-
type: "git",
|
|
36
|
-
url: data.repository
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
var r = data.repository.url || "";
|
|
40
|
-
if (r) {
|
|
41
|
-
var hosted = hostedGitInfo.fromUrl(r);
|
|
42
|
-
if (hosted) {
|
|
43
|
-
r = data.repository.url = hosted.getDefaultRepresentation() === "shortcut" ? hosted.https() : hosted.toString();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if (r.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)) {
|
|
47
|
-
this.warn("brokenGitUrl", r);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
fixTypos: function(data) {
|
|
51
|
-
Object.keys(typos.topLevel).forEach(function(d) {
|
|
52
|
-
if (Object.prototype.hasOwnProperty.call(data, d)) {
|
|
53
|
-
this.warn("typo", d, typos.topLevel[d]);
|
|
54
|
-
}
|
|
55
|
-
}, this);
|
|
56
|
-
},
|
|
57
|
-
fixScriptsField: function(data) {
|
|
58
|
-
if (!data.scripts) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
if (typeof data.scripts !== "object") {
|
|
62
|
-
this.warn("nonObjectScripts");
|
|
63
|
-
delete data.scripts;
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
Object.keys(data.scripts).forEach(function(k) {
|
|
67
|
-
if (typeof data.scripts[k] !== "string") {
|
|
68
|
-
this.warn("nonStringScript");
|
|
69
|
-
delete data.scripts[k];
|
|
70
|
-
} else if (typos.script[k] && !data.scripts[typos.script[k]]) {
|
|
71
|
-
this.warn("typo", k, typos.script[k], "scripts");
|
|
72
|
-
}
|
|
73
|
-
}, this);
|
|
74
|
-
},
|
|
75
|
-
fixFilesField: function(data) {
|
|
76
|
-
var files = data.files;
|
|
77
|
-
if (files && !Array.isArray(files)) {
|
|
78
|
-
this.warn("nonArrayFiles");
|
|
79
|
-
delete data.files;
|
|
80
|
-
} else if (data.files) {
|
|
81
|
-
data.files = data.files.filter(function(file) {
|
|
82
|
-
if (!file || typeof file !== "string") {
|
|
83
|
-
this.warn("invalidFilename", file);
|
|
84
|
-
return false;
|
|
85
|
-
} else {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
}, this);
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
fixBinField: function(data) {
|
|
92
|
-
if (!data.bin) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
if (typeof data.bin === "string") {
|
|
96
|
-
var b = {};
|
|
97
|
-
var match;
|
|
98
|
-
if (match = data.name.match(/^@[^/]+[/](.*)$/)) {
|
|
99
|
-
b[match[1]] = data.bin;
|
|
100
|
-
} else {
|
|
101
|
-
b[data.name] = data.bin;
|
|
102
|
-
}
|
|
103
|
-
data.bin = b;
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
fixManField: function(data) {
|
|
107
|
-
if (!data.man) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
if (typeof data.man === "string") {
|
|
111
|
-
data.man = [data.man];
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
fixBundleDependenciesField: function(data) {
|
|
115
|
-
var bdd = "bundledDependencies";
|
|
116
|
-
var bd = "bundleDependencies";
|
|
117
|
-
if (data[bdd] && !data[bd]) {
|
|
118
|
-
data[bd] = data[bdd];
|
|
119
|
-
delete data[bdd];
|
|
120
|
-
}
|
|
121
|
-
if (data[bd] && !Array.isArray(data[bd])) {
|
|
122
|
-
this.warn("nonArrayBundleDependencies");
|
|
123
|
-
delete data[bd];
|
|
124
|
-
} else if (data[bd]) {
|
|
125
|
-
data[bd] = data[bd].filter(function(filtered) {
|
|
126
|
-
if (!filtered || typeof filtered !== "string") {
|
|
127
|
-
this.warn("nonStringBundleDependency", filtered);
|
|
128
|
-
return false;
|
|
129
|
-
} else {
|
|
130
|
-
if (!data.dependencies) {
|
|
131
|
-
data.dependencies = {};
|
|
132
|
-
}
|
|
133
|
-
if (!Object.prototype.hasOwnProperty.call(data.dependencies, filtered)) {
|
|
134
|
-
this.warn("nonDependencyBundleDependency", filtered);
|
|
135
|
-
data.dependencies[filtered] = "*";
|
|
136
|
-
}
|
|
137
|
-
return true;
|
|
138
|
-
}
|
|
139
|
-
}, this);
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
fixDependencies: function(data, strict) {
|
|
143
|
-
objectifyDeps(data, this.warn);
|
|
144
|
-
addOptionalDepsToDeps(data, this.warn);
|
|
145
|
-
this.fixBundleDependenciesField(data);
|
|
146
|
-
["dependencies", "devDependencies"].forEach(function(deps) {
|
|
147
|
-
if (!(deps in data)) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
if (!data[deps] || typeof data[deps] !== "object") {
|
|
151
|
-
this.warn("nonObjectDependencies", deps);
|
|
152
|
-
delete data[deps];
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
Object.keys(data[deps]).forEach(function(d) {
|
|
156
|
-
var r = data[deps][d];
|
|
157
|
-
if (typeof r !== "string") {
|
|
158
|
-
this.warn("nonStringDependency", d, JSON.stringify(r));
|
|
159
|
-
delete data[deps][d];
|
|
160
|
-
}
|
|
161
|
-
var hosted = hostedGitInfo.fromUrl(data[deps][d]);
|
|
162
|
-
if (hosted) {
|
|
163
|
-
data[deps][d] = hosted.toString();
|
|
164
|
-
}
|
|
165
|
-
}, this);
|
|
166
|
-
}, this);
|
|
167
|
-
},
|
|
168
|
-
fixModulesField: function(data) {
|
|
169
|
-
if (data.modules) {
|
|
170
|
-
this.warn("deprecatedModules");
|
|
171
|
-
delete data.modules;
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
fixKeywordsField: function(data) {
|
|
175
|
-
if (typeof data.keywords === "string") {
|
|
176
|
-
data.keywords = data.keywords.split(/,\s+/);
|
|
177
|
-
}
|
|
178
|
-
if (data.keywords && !Array.isArray(data.keywords)) {
|
|
179
|
-
delete data.keywords;
|
|
180
|
-
this.warn("nonArrayKeywords");
|
|
181
|
-
} else if (data.keywords) {
|
|
182
|
-
data.keywords = data.keywords.filter(function(kw) {
|
|
183
|
-
if (typeof kw !== "string" || !kw) {
|
|
184
|
-
this.warn("nonStringKeyword");
|
|
185
|
-
return false;
|
|
186
|
-
} else {
|
|
187
|
-
return true;
|
|
188
|
-
}
|
|
189
|
-
}, this);
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
fixVersionField: function(data, strict) {
|
|
193
|
-
var loose = !strict;
|
|
194
|
-
if (!data.version) {
|
|
195
|
-
data.version = "";
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
if (!isValidSemver(data.version, loose)) {
|
|
199
|
-
throw new Error('Invalid version: "' + data.version + '"');
|
|
200
|
-
}
|
|
201
|
-
data.version = cleanSemver(data.version, loose);
|
|
202
|
-
return true;
|
|
203
|
-
},
|
|
204
|
-
fixPeople: function(data) {
|
|
205
|
-
modifyPeople(data, unParsePerson);
|
|
206
|
-
modifyPeople(data, parsePerson);
|
|
207
|
-
},
|
|
208
|
-
fixNameField: function(data, options) {
|
|
209
|
-
if (typeof options === "boolean") {
|
|
210
|
-
options = { strict: options };
|
|
211
|
-
} else if (typeof options === "undefined") {
|
|
212
|
-
options = {};
|
|
213
|
-
}
|
|
214
|
-
var strict = options.strict;
|
|
215
|
-
if (!data.name && !strict) {
|
|
216
|
-
data.name = "";
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
if (typeof data.name !== "string") {
|
|
220
|
-
throw new Error("name field must be a string.");
|
|
221
|
-
}
|
|
222
|
-
if (!strict) {
|
|
223
|
-
data.name = data.name.trim();
|
|
224
|
-
}
|
|
225
|
-
ensureValidName(data.name, strict, options.allowLegacyCase);
|
|
226
|
-
if (isBuiltinModule(data.name)) {
|
|
227
|
-
this.warn("conflictingName", data.name);
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
fixDescriptionField: function(data) {
|
|
231
|
-
if (data.description && typeof data.description !== "string") {
|
|
232
|
-
this.warn("nonStringDescription");
|
|
233
|
-
delete data.description;
|
|
234
|
-
}
|
|
235
|
-
if (data.readme && !data.description) {
|
|
236
|
-
data.description = extractDescription(data.readme);
|
|
237
|
-
}
|
|
238
|
-
if (data.description === void 0) {
|
|
239
|
-
delete data.description;
|
|
240
|
-
}
|
|
241
|
-
if (!data.description) {
|
|
242
|
-
this.warn("missingDescription");
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
fixReadmeField: function(data) {
|
|
246
|
-
if (!data.readme) {
|
|
247
|
-
this.warn("missingReadme");
|
|
248
|
-
data.readme = "ERROR: No README data found!";
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
fixBugsField: function(data) {
|
|
252
|
-
if (!data.bugs && data.repository && data.repository.url) {
|
|
253
|
-
var hosted = hostedGitInfo.fromUrl(data.repository.url);
|
|
254
|
-
if (hosted && hosted.bugs()) {
|
|
255
|
-
data.bugs = { url: hosted.bugs() };
|
|
256
|
-
}
|
|
257
|
-
} else if (data.bugs) {
|
|
258
|
-
if (typeof data.bugs === "string") {
|
|
259
|
-
if (isEmail(data.bugs)) {
|
|
260
|
-
data.bugs = { email: data.bugs };
|
|
261
|
-
} else if (url.parse(data.bugs).protocol) {
|
|
262
|
-
data.bugs = { url: data.bugs };
|
|
263
|
-
} else {
|
|
264
|
-
this.warn("nonEmailUrlBugsString");
|
|
265
|
-
}
|
|
266
|
-
} else {
|
|
267
|
-
bugsTypos(data.bugs, this.warn);
|
|
268
|
-
var oldBugs = data.bugs;
|
|
269
|
-
data.bugs = {};
|
|
270
|
-
if (oldBugs.url) {
|
|
271
|
-
if (typeof oldBugs.url === "string" && url.parse(oldBugs.url).protocol) {
|
|
272
|
-
data.bugs.url = oldBugs.url;
|
|
273
|
-
} else {
|
|
274
|
-
this.warn("nonUrlBugsUrlField");
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
if (oldBugs.email) {
|
|
278
|
-
if (typeof oldBugs.email === "string" && isEmail(oldBugs.email)) {
|
|
279
|
-
data.bugs.email = oldBugs.email;
|
|
280
|
-
} else {
|
|
281
|
-
this.warn("nonEmailBugsEmailField");
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
if (!data.bugs.email && !data.bugs.url) {
|
|
286
|
-
delete data.bugs;
|
|
287
|
-
this.warn("emptyNormalizedBugs");
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
fixHomepageField: function(data) {
|
|
292
|
-
if (!data.homepage && data.repository && data.repository.url) {
|
|
293
|
-
var hosted = hostedGitInfo.fromUrl(data.repository.url);
|
|
294
|
-
if (hosted && hosted.docs()) {
|
|
295
|
-
data.homepage = hosted.docs();
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
if (!data.homepage) {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
if (typeof data.homepage !== "string") {
|
|
302
|
-
this.warn("nonUrlHomepage");
|
|
303
|
-
return delete data.homepage;
|
|
304
|
-
}
|
|
305
|
-
if (!url.parse(data.homepage).protocol) {
|
|
306
|
-
data.homepage = "http://" + data.homepage;
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
fixLicenseField: function(data) {
|
|
310
|
-
const license = data.license || data.licence;
|
|
311
|
-
if (!license) {
|
|
312
|
-
return this.warn("missingLicense");
|
|
313
|
-
}
|
|
314
|
-
if (typeof license !== "string" || license.length < 1 || license.trim() === "") {
|
|
315
|
-
return this.warn("invalidLicense");
|
|
316
|
-
}
|
|
317
|
-
if (!validateLicense(license).validForNewPackages) {
|
|
318
|
-
return this.warn("invalidLicense");
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
function isValidScopedPackageName(spec) {
|
|
323
|
-
if (spec.charAt(0) !== "@") {
|
|
324
|
-
return false;
|
|
325
|
-
}
|
|
326
|
-
var rest = spec.slice(1).split("/");
|
|
327
|
-
if (rest.length !== 2) {
|
|
328
|
-
return false;
|
|
329
|
-
}
|
|
330
|
-
return rest[0] && rest[1] && rest[0] === encodeURIComponent(rest[0]) && rest[1] === encodeURIComponent(rest[1]);
|
|
331
|
-
}
|
|
332
|
-
function isCorrectlyEncodedName(spec) {
|
|
333
|
-
return !spec.match(/[/@\s+%:]/) && spec === encodeURIComponent(spec);
|
|
334
|
-
}
|
|
335
|
-
function ensureValidName(name, strict, allowLegacyCase) {
|
|
336
|
-
if (name.charAt(0) === "." || !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) || strict && !allowLegacyCase && name !== name.toLowerCase() || name.toLowerCase() === "node_modules" || name.toLowerCase() === "favicon.ico") {
|
|
337
|
-
throw new Error("Invalid name: " + JSON.stringify(name));
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
function modifyPeople(data, fn) {
|
|
341
|
-
if (data.author) {
|
|
342
|
-
data.author = fn(data.author);
|
|
343
|
-
}
|
|
344
|
-
["maintainers", "contributors"].forEach(function(set) {
|
|
345
|
-
if (!Array.isArray(data[set])) {
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
data[set] = data[set].map(fn);
|
|
349
|
-
});
|
|
350
|
-
return data;
|
|
351
|
-
}
|
|
352
|
-
function unParsePerson(person) {
|
|
353
|
-
if (typeof person === "string") {
|
|
354
|
-
return person;
|
|
355
|
-
}
|
|
356
|
-
var name = person.name || "";
|
|
357
|
-
var u = person.url || person.web;
|
|
358
|
-
var wrappedUrl = u ? " (" + u + ")" : "";
|
|
359
|
-
var e = person.email || person.mail;
|
|
360
|
-
var wrappedEmail = e ? " <" + e + ">" : "";
|
|
361
|
-
return name + wrappedEmail + wrappedUrl;
|
|
362
|
-
}
|
|
363
|
-
function parsePerson(person) {
|
|
364
|
-
if (typeof person !== "string") {
|
|
365
|
-
return person;
|
|
366
|
-
}
|
|
367
|
-
var matchedName = person.match(/^([^(<]+)/);
|
|
368
|
-
var matchedUrl = person.match(/\(([^()]+)\)/);
|
|
369
|
-
var matchedEmail = person.match(/<([^<>]+)>/);
|
|
370
|
-
var obj = {};
|
|
371
|
-
if (matchedName && matchedName[0].trim()) {
|
|
372
|
-
obj.name = matchedName[0].trim();
|
|
373
|
-
}
|
|
374
|
-
if (matchedEmail) {
|
|
375
|
-
obj.email = matchedEmail[1];
|
|
376
|
-
}
|
|
377
|
-
if (matchedUrl) {
|
|
378
|
-
obj.url = matchedUrl[1];
|
|
379
|
-
}
|
|
380
|
-
return obj;
|
|
381
|
-
}
|
|
382
|
-
function addOptionalDepsToDeps(data, warn) {
|
|
383
|
-
var o = data.optionalDependencies;
|
|
384
|
-
if (!o) {
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
var d = data.dependencies || {};
|
|
388
|
-
Object.keys(o).forEach(function(k) {
|
|
389
|
-
d[k] = o[k];
|
|
390
|
-
});
|
|
391
|
-
data.dependencies = d;
|
|
392
|
-
}
|
|
393
|
-
function depObjectify(deps, type, warn) {
|
|
394
|
-
if (!deps) {
|
|
395
|
-
return {};
|
|
396
|
-
}
|
|
397
|
-
if (typeof deps === "string") {
|
|
398
|
-
deps = deps.trim().split(/[\n\r\s\t ,]+/);
|
|
399
|
-
}
|
|
400
|
-
if (!Array.isArray(deps)) {
|
|
401
|
-
return deps;
|
|
402
|
-
}
|
|
403
|
-
warn("deprecatedArrayDependencies", type);
|
|
404
|
-
var o = {};
|
|
405
|
-
deps.filter(function(d) {
|
|
406
|
-
return typeof d === "string";
|
|
407
|
-
}).forEach(function(d) {
|
|
408
|
-
d = d.trim().split(/(:?[@\s><=])/);
|
|
409
|
-
var dn = d.shift();
|
|
410
|
-
var dv = d.join("");
|
|
411
|
-
dv = dv.trim();
|
|
412
|
-
dv = dv.replace(/^@/, "");
|
|
413
|
-
o[dn] = dv;
|
|
414
|
-
});
|
|
415
|
-
return o;
|
|
416
|
-
}
|
|
417
|
-
function objectifyDeps(data, warn) {
|
|
418
|
-
depTypes.forEach(function(type) {
|
|
419
|
-
if (!data[type]) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
data[type] = depObjectify(data[type], type, warn);
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
function bugsTypos(bugs, warn) {
|
|
426
|
-
if (!bugs) {
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
Object.keys(bugs).forEach(function(k) {
|
|
430
|
-
if (typos.bugs[k]) {
|
|
431
|
-
warn("typo", k, typos.bugs[k], "bugs");
|
|
432
|
-
bugs[typos.bugs[k]] = bugs[k];
|
|
433
|
-
delete bugs[k];
|
|
434
|
-
}
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
exports.fixer = fixer;
|
|
438
|
-
//# sourceMappingURL=fixer.cjs.map
|