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,847 +0,0 @@
|
|
|
1
|
-
import { tokenizeArgString } from "./tokenize-arg-string.js";
|
|
2
|
-
import { DefaultValuesForTypeKey } from "./yargs-parser-types.js";
|
|
3
|
-
import { camelCase, looksLikeNumber, decamelize } from "./string-utils.js";
|
|
4
|
-
/**
|
|
5
|
-
* @license
|
|
6
|
-
* Copyright (c) 2016, Contributors
|
|
7
|
-
* SPDX-License-Identifier: ISC
|
|
8
|
-
*/
|
|
9
|
-
let mixin;
|
|
10
|
-
class YargsParser {
|
|
11
|
-
constructor(_mixin) {
|
|
12
|
-
mixin = _mixin;
|
|
13
|
-
}
|
|
14
|
-
parse(argsInput, options) {
|
|
15
|
-
const opts = Object.assign({
|
|
16
|
-
alias: void 0,
|
|
17
|
-
array: void 0,
|
|
18
|
-
boolean: void 0,
|
|
19
|
-
config: void 0,
|
|
20
|
-
configObjects: void 0,
|
|
21
|
-
configuration: void 0,
|
|
22
|
-
coerce: void 0,
|
|
23
|
-
count: void 0,
|
|
24
|
-
default: void 0,
|
|
25
|
-
envPrefix: void 0,
|
|
26
|
-
narg: void 0,
|
|
27
|
-
normalize: void 0,
|
|
28
|
-
string: void 0,
|
|
29
|
-
number: void 0,
|
|
30
|
-
__: void 0,
|
|
31
|
-
key: void 0
|
|
32
|
-
}, options);
|
|
33
|
-
const args = tokenizeArgString(argsInput);
|
|
34
|
-
const inputIsString = typeof argsInput === "string";
|
|
35
|
-
const aliases = combineAliases(Object.assign(/* @__PURE__ */ Object.create(null), opts.alias));
|
|
36
|
-
const configuration = Object.assign({
|
|
37
|
-
"boolean-negation": true,
|
|
38
|
-
"camel-case-expansion": true,
|
|
39
|
-
"combine-arrays": false,
|
|
40
|
-
"dot-notation": true,
|
|
41
|
-
"duplicate-arguments-array": true,
|
|
42
|
-
"flatten-duplicate-arrays": true,
|
|
43
|
-
"greedy-arrays": true,
|
|
44
|
-
"halt-at-non-option": false,
|
|
45
|
-
"nargs-eats-options": false,
|
|
46
|
-
"negation-prefix": "no-",
|
|
47
|
-
"parse-numbers": true,
|
|
48
|
-
"parse-positional-numbers": true,
|
|
49
|
-
"populate--": false,
|
|
50
|
-
"set-placeholder-key": false,
|
|
51
|
-
"short-option-groups": true,
|
|
52
|
-
"strip-aliased": false,
|
|
53
|
-
"strip-dashed": false,
|
|
54
|
-
"unknown-options-as-args": false
|
|
55
|
-
}, opts.configuration);
|
|
56
|
-
const defaults = Object.assign(/* @__PURE__ */ Object.create(null), opts.default);
|
|
57
|
-
const configObjects = opts.configObjects || [];
|
|
58
|
-
const envPrefix = opts.envPrefix;
|
|
59
|
-
const notFlagsOption = configuration["populate--"];
|
|
60
|
-
const notFlagsArgv = notFlagsOption ? "--" : "_";
|
|
61
|
-
const newAliases = /* @__PURE__ */ Object.create(null);
|
|
62
|
-
const defaulted = /* @__PURE__ */ Object.create(null);
|
|
63
|
-
const __ = opts.__ || mixin.format;
|
|
64
|
-
const flags = {
|
|
65
|
-
aliases: /* @__PURE__ */ Object.create(null),
|
|
66
|
-
arrays: /* @__PURE__ */ Object.create(null),
|
|
67
|
-
bools: /* @__PURE__ */ Object.create(null),
|
|
68
|
-
strings: /* @__PURE__ */ Object.create(null),
|
|
69
|
-
numbers: /* @__PURE__ */ Object.create(null),
|
|
70
|
-
counts: /* @__PURE__ */ Object.create(null),
|
|
71
|
-
normalize: /* @__PURE__ */ Object.create(null),
|
|
72
|
-
configs: /* @__PURE__ */ Object.create(null),
|
|
73
|
-
nargs: /* @__PURE__ */ Object.create(null),
|
|
74
|
-
coercions: /* @__PURE__ */ Object.create(null),
|
|
75
|
-
keys: []
|
|
76
|
-
};
|
|
77
|
-
const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/;
|
|
78
|
-
const negatedBoolean = new RegExp("^--" + configuration["negation-prefix"] + "(.+)");
|
|
79
|
-
[].concat(opts.array || []).filter(Boolean).forEach(function(opt) {
|
|
80
|
-
const key = typeof opt === "object" ? opt.key : opt;
|
|
81
|
-
const assignment = Object.keys(opt).map(function(key2) {
|
|
82
|
-
const arrayFlagKeys = {
|
|
83
|
-
boolean: "bools",
|
|
84
|
-
string: "strings",
|
|
85
|
-
number: "numbers"
|
|
86
|
-
};
|
|
87
|
-
return arrayFlagKeys[key2];
|
|
88
|
-
}).filter(Boolean).pop();
|
|
89
|
-
if (assignment) {
|
|
90
|
-
flags[assignment][key] = true;
|
|
91
|
-
}
|
|
92
|
-
flags.arrays[key] = true;
|
|
93
|
-
flags.keys.push(key);
|
|
94
|
-
});
|
|
95
|
-
[].concat(opts.boolean || []).filter(Boolean).forEach(function(key) {
|
|
96
|
-
flags.bools[key] = true;
|
|
97
|
-
flags.keys.push(key);
|
|
98
|
-
});
|
|
99
|
-
[].concat(opts.string || []).filter(Boolean).forEach(function(key) {
|
|
100
|
-
flags.strings[key] = true;
|
|
101
|
-
flags.keys.push(key);
|
|
102
|
-
});
|
|
103
|
-
[].concat(opts.number || []).filter(Boolean).forEach(function(key) {
|
|
104
|
-
flags.numbers[key] = true;
|
|
105
|
-
flags.keys.push(key);
|
|
106
|
-
});
|
|
107
|
-
[].concat(opts.count || []).filter(Boolean).forEach(function(key) {
|
|
108
|
-
flags.counts[key] = true;
|
|
109
|
-
flags.keys.push(key);
|
|
110
|
-
});
|
|
111
|
-
[].concat(opts.normalize || []).filter(Boolean).forEach(function(key) {
|
|
112
|
-
flags.normalize[key] = true;
|
|
113
|
-
flags.keys.push(key);
|
|
114
|
-
});
|
|
115
|
-
if (typeof opts.narg === "object") {
|
|
116
|
-
Object.entries(opts.narg).forEach(([key, value]) => {
|
|
117
|
-
if (typeof value === "number") {
|
|
118
|
-
flags.nargs[key] = value;
|
|
119
|
-
flags.keys.push(key);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
if (typeof opts.coerce === "object") {
|
|
124
|
-
Object.entries(opts.coerce).forEach(([key, value]) => {
|
|
125
|
-
if (typeof value === "function") {
|
|
126
|
-
flags.coercions[key] = value;
|
|
127
|
-
flags.keys.push(key);
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
if (typeof opts.config !== "undefined") {
|
|
132
|
-
if (Array.isArray(opts.config) || typeof opts.config === "string") {
|
|
133
|
-
[].concat(opts.config).filter(Boolean).forEach(function(key) {
|
|
134
|
-
flags.configs[key] = true;
|
|
135
|
-
});
|
|
136
|
-
} else if (typeof opts.config === "object") {
|
|
137
|
-
Object.entries(opts.config).forEach(([key, value]) => {
|
|
138
|
-
if (typeof value === "boolean" || typeof value === "function") {
|
|
139
|
-
flags.configs[key] = value;
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
extendAliases(opts.key, aliases, opts.default, flags.arrays);
|
|
145
|
-
Object.keys(defaults).forEach(function(key) {
|
|
146
|
-
(flags.aliases[key] || []).forEach(function(alias) {
|
|
147
|
-
defaults[alias] = defaults[key];
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
let error = null;
|
|
151
|
-
checkConfiguration();
|
|
152
|
-
let notFlags = [];
|
|
153
|
-
const argv = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] });
|
|
154
|
-
const argvReturn = {};
|
|
155
|
-
for (let i = 0; i < args.length; i++) {
|
|
156
|
-
const arg = args[i];
|
|
157
|
-
const truncatedArg = arg.replace(/^-{3,}/, "---");
|
|
158
|
-
let broken;
|
|
159
|
-
let key;
|
|
160
|
-
let letters;
|
|
161
|
-
let m;
|
|
162
|
-
let next;
|
|
163
|
-
let value;
|
|
164
|
-
if (arg !== "--" && /^-/.test(arg) && isUnknownOptionAsArg(arg)) {
|
|
165
|
-
pushPositional(arg);
|
|
166
|
-
} else if (truncatedArg.match(/^---+(=|$)/)) {
|
|
167
|
-
pushPositional(arg);
|
|
168
|
-
continue;
|
|
169
|
-
} else if (arg.match(/^--.+=/) || !configuration["short-option-groups"] && arg.match(/^-.+=/)) {
|
|
170
|
-
m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
|
|
171
|
-
if (m !== null && Array.isArray(m) && m.length >= 3) {
|
|
172
|
-
if (checkAllAliases(m[1], flags.arrays)) {
|
|
173
|
-
i = eatArray(i, m[1], args, m[2]);
|
|
174
|
-
} else if (checkAllAliases(m[1], flags.nargs) !== false) {
|
|
175
|
-
i = eatNargs(i, m[1], args, m[2]);
|
|
176
|
-
} else {
|
|
177
|
-
setArg(m[1], m[2], true);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
} else if (arg.match(negatedBoolean) && configuration["boolean-negation"]) {
|
|
181
|
-
m = arg.match(negatedBoolean);
|
|
182
|
-
if (m !== null && Array.isArray(m) && m.length >= 2) {
|
|
183
|
-
key = m[1];
|
|
184
|
-
setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false);
|
|
185
|
-
}
|
|
186
|
-
} else if (arg.match(/^--.+/) || !configuration["short-option-groups"] && arg.match(/^-[^-]+/)) {
|
|
187
|
-
m = arg.match(/^--?(.+)/);
|
|
188
|
-
if (m !== null && Array.isArray(m) && m.length >= 2) {
|
|
189
|
-
key = m[1];
|
|
190
|
-
if (checkAllAliases(key, flags.arrays)) {
|
|
191
|
-
i = eatArray(i, key, args);
|
|
192
|
-
} else if (checkAllAliases(key, flags.nargs) !== false) {
|
|
193
|
-
i = eatNargs(i, key, args);
|
|
194
|
-
} else {
|
|
195
|
-
next = args[i + 1];
|
|
196
|
-
if (next !== void 0 && (!next.match(/^-/) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
|
|
197
|
-
setArg(key, next);
|
|
198
|
-
i++;
|
|
199
|
-
} else if (/^(true|false)$/.test(next)) {
|
|
200
|
-
setArg(key, next);
|
|
201
|
-
i++;
|
|
202
|
-
} else {
|
|
203
|
-
setArg(key, defaultValue(key));
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
} else if (arg.match(/^-.\..+=/)) {
|
|
208
|
-
m = arg.match(/^-([^=]+)=([\s\S]*)$/);
|
|
209
|
-
if (m !== null && Array.isArray(m) && m.length >= 3) {
|
|
210
|
-
setArg(m[1], m[2]);
|
|
211
|
-
}
|
|
212
|
-
} else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
|
|
213
|
-
next = args[i + 1];
|
|
214
|
-
m = arg.match(/^-(.\..+)/);
|
|
215
|
-
if (m !== null && Array.isArray(m) && m.length >= 2) {
|
|
216
|
-
key = m[1];
|
|
217
|
-
if (next !== void 0 && !next.match(/^-/) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
|
|
218
|
-
setArg(key, next);
|
|
219
|
-
i++;
|
|
220
|
-
} else {
|
|
221
|
-
setArg(key, defaultValue(key));
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
} else if (arg.match(/^-[^-]+/) && !arg.match(negative)) {
|
|
225
|
-
letters = arg.slice(1, -1).split("");
|
|
226
|
-
broken = false;
|
|
227
|
-
for (let j = 0; j < letters.length; j++) {
|
|
228
|
-
next = arg.slice(j + 2);
|
|
229
|
-
if (letters[j + 1] && letters[j + 1] === "=") {
|
|
230
|
-
value = arg.slice(j + 3);
|
|
231
|
-
key = letters[j];
|
|
232
|
-
if (checkAllAliases(key, flags.arrays)) {
|
|
233
|
-
i = eatArray(i, key, args, value);
|
|
234
|
-
} else if (checkAllAliases(key, flags.nargs) !== false) {
|
|
235
|
-
i = eatNargs(i, key, args, value);
|
|
236
|
-
} else {
|
|
237
|
-
setArg(key, value);
|
|
238
|
-
}
|
|
239
|
-
broken = true;
|
|
240
|
-
break;
|
|
241
|
-
}
|
|
242
|
-
if (next === "-") {
|
|
243
|
-
setArg(letters[j], next);
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
if (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && checkAllAliases(next, flags.bools) === false) {
|
|
247
|
-
setArg(letters[j], next);
|
|
248
|
-
broken = true;
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
|
|
252
|
-
setArg(letters[j], next);
|
|
253
|
-
broken = true;
|
|
254
|
-
break;
|
|
255
|
-
} else {
|
|
256
|
-
setArg(letters[j], defaultValue(letters[j]));
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
key = arg.slice(-1)[0];
|
|
260
|
-
if (!broken && key !== "-") {
|
|
261
|
-
if (checkAllAliases(key, flags.arrays)) {
|
|
262
|
-
i = eatArray(i, key, args);
|
|
263
|
-
} else if (checkAllAliases(key, flags.nargs) !== false) {
|
|
264
|
-
i = eatNargs(i, key, args);
|
|
265
|
-
} else {
|
|
266
|
-
next = args[i + 1];
|
|
267
|
-
if (next !== void 0 && (!/^(-|--)[^-]/.test(next) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
|
|
268
|
-
setArg(key, next);
|
|
269
|
-
i++;
|
|
270
|
-
} else if (/^(true|false)$/.test(next)) {
|
|
271
|
-
setArg(key, next);
|
|
272
|
-
i++;
|
|
273
|
-
} else {
|
|
274
|
-
setArg(key, defaultValue(key));
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
} else if (arg.match(/^-[0-9]$/) && arg.match(negative) && checkAllAliases(arg.slice(1), flags.bools)) {
|
|
279
|
-
key = arg.slice(1);
|
|
280
|
-
setArg(key, defaultValue(key));
|
|
281
|
-
} else if (arg === "--") {
|
|
282
|
-
notFlags = args.slice(i + 1);
|
|
283
|
-
break;
|
|
284
|
-
} else if (configuration["halt-at-non-option"]) {
|
|
285
|
-
notFlags = args.slice(i);
|
|
286
|
-
break;
|
|
287
|
-
} else {
|
|
288
|
-
pushPositional(arg);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
applyEnvVars(argv, true);
|
|
292
|
-
applyEnvVars(argv, false);
|
|
293
|
-
setConfig(argv);
|
|
294
|
-
setConfigObjects();
|
|
295
|
-
applyDefaultsAndAliases(argv, flags.aliases, defaults, true);
|
|
296
|
-
applyCoercions(argv);
|
|
297
|
-
if (configuration["set-placeholder-key"])
|
|
298
|
-
setPlaceholderKeys(argv);
|
|
299
|
-
Object.keys(flags.counts).forEach(function(key) {
|
|
300
|
-
if (!hasKey(argv, key.split(".")))
|
|
301
|
-
setArg(key, 0);
|
|
302
|
-
});
|
|
303
|
-
if (notFlagsOption && notFlags.length)
|
|
304
|
-
argv[notFlagsArgv] = [];
|
|
305
|
-
notFlags.forEach(function(key) {
|
|
306
|
-
argv[notFlagsArgv].push(key);
|
|
307
|
-
});
|
|
308
|
-
if (configuration["camel-case-expansion"] && configuration["strip-dashed"]) {
|
|
309
|
-
Object.keys(argv).filter((key) => key !== "--" && key.includes("-")).forEach((key) => {
|
|
310
|
-
delete argv[key];
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
if (configuration["strip-aliased"]) {
|
|
314
|
-
[].concat(...Object.keys(aliases).map((k) => aliases[k])).forEach((alias) => {
|
|
315
|
-
if (configuration["camel-case-expansion"] && alias.includes("-")) {
|
|
316
|
-
delete argv[alias.split(".").map((prop) => camelCase(prop)).join(".")];
|
|
317
|
-
}
|
|
318
|
-
delete argv[alias];
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
function pushPositional(arg) {
|
|
322
|
-
const maybeCoercedNumber = maybeCoerceNumber("_", arg);
|
|
323
|
-
if (typeof maybeCoercedNumber === "string" || typeof maybeCoercedNumber === "number") {
|
|
324
|
-
argv._.push(maybeCoercedNumber);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
function eatNargs(i, key, args2, argAfterEqualSign) {
|
|
328
|
-
let ii;
|
|
329
|
-
let toEat = checkAllAliases(key, flags.nargs);
|
|
330
|
-
toEat = typeof toEat !== "number" || isNaN(toEat) ? 1 : toEat;
|
|
331
|
-
if (toEat === 0) {
|
|
332
|
-
if (!isUndefined(argAfterEqualSign)) {
|
|
333
|
-
error = Error(__("Argument unexpected for: %s", key));
|
|
334
|
-
}
|
|
335
|
-
setArg(key, defaultValue(key));
|
|
336
|
-
return i;
|
|
337
|
-
}
|
|
338
|
-
let available = isUndefined(argAfterEqualSign) ? 0 : 1;
|
|
339
|
-
if (configuration["nargs-eats-options"]) {
|
|
340
|
-
if (args2.length - (i + 1) + available < toEat) {
|
|
341
|
-
error = Error(__("Not enough arguments following: %s", key));
|
|
342
|
-
}
|
|
343
|
-
available = toEat;
|
|
344
|
-
} else {
|
|
345
|
-
for (ii = i + 1; ii < args2.length; ii++) {
|
|
346
|
-
if (!args2[ii].match(/^-[^0-9]/) || args2[ii].match(negative) || isUnknownOptionAsArg(args2[ii]))
|
|
347
|
-
available++;
|
|
348
|
-
else
|
|
349
|
-
break;
|
|
350
|
-
}
|
|
351
|
-
if (available < toEat)
|
|
352
|
-
error = Error(__("Not enough arguments following: %s", key));
|
|
353
|
-
}
|
|
354
|
-
let consumed = Math.min(available, toEat);
|
|
355
|
-
if (!isUndefined(argAfterEqualSign) && consumed > 0) {
|
|
356
|
-
setArg(key, argAfterEqualSign);
|
|
357
|
-
consumed--;
|
|
358
|
-
}
|
|
359
|
-
for (ii = i + 1; ii < consumed + i + 1; ii++) {
|
|
360
|
-
setArg(key, args2[ii]);
|
|
361
|
-
}
|
|
362
|
-
return i + consumed;
|
|
363
|
-
}
|
|
364
|
-
function eatArray(i, key, args2, argAfterEqualSign) {
|
|
365
|
-
let argsToSet = [];
|
|
366
|
-
let next = argAfterEqualSign || args2[i + 1];
|
|
367
|
-
const nargsCount = checkAllAliases(key, flags.nargs);
|
|
368
|
-
if (checkAllAliases(key, flags.bools) && !/^(true|false)$/.test(next)) {
|
|
369
|
-
argsToSet.push(true);
|
|
370
|
-
} else if (isUndefined(next) || isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) {
|
|
371
|
-
if (defaults[key] !== void 0) {
|
|
372
|
-
const defVal = defaults[key];
|
|
373
|
-
argsToSet = Array.isArray(defVal) ? defVal : [defVal];
|
|
374
|
-
}
|
|
375
|
-
} else {
|
|
376
|
-
if (!isUndefined(argAfterEqualSign)) {
|
|
377
|
-
argsToSet.push(processValue(key, argAfterEqualSign, true));
|
|
378
|
-
}
|
|
379
|
-
for (let ii = i + 1; ii < args2.length; ii++) {
|
|
380
|
-
if (!configuration["greedy-arrays"] && argsToSet.length > 0 || nargsCount && typeof nargsCount === "number" && argsToSet.length >= nargsCount)
|
|
381
|
-
break;
|
|
382
|
-
next = args2[ii];
|
|
383
|
-
if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))
|
|
384
|
-
break;
|
|
385
|
-
i = ii;
|
|
386
|
-
argsToSet.push(processValue(key, next, inputIsString));
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
if (typeof nargsCount === "number" && (nargsCount && argsToSet.length < nargsCount || isNaN(nargsCount) && argsToSet.length === 0)) {
|
|
390
|
-
error = Error(__("Not enough arguments following: %s", key));
|
|
391
|
-
}
|
|
392
|
-
setArg(key, argsToSet);
|
|
393
|
-
return i;
|
|
394
|
-
}
|
|
395
|
-
function setArg(key, val, shouldStripQuotes = inputIsString) {
|
|
396
|
-
if (/-/.test(key) && configuration["camel-case-expansion"]) {
|
|
397
|
-
const alias = key.split(".").map(function(prop) {
|
|
398
|
-
return camelCase(prop);
|
|
399
|
-
}).join(".");
|
|
400
|
-
addNewAlias(key, alias);
|
|
401
|
-
}
|
|
402
|
-
const value = processValue(key, val, shouldStripQuotes);
|
|
403
|
-
const splitKey = key.split(".");
|
|
404
|
-
setKey(argv, splitKey, value);
|
|
405
|
-
if (flags.aliases[key]) {
|
|
406
|
-
flags.aliases[key].forEach(function(x) {
|
|
407
|
-
const keyProperties = x.split(".");
|
|
408
|
-
setKey(argv, keyProperties, value);
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
if (splitKey.length > 1 && configuration["dot-notation"]) {
|
|
412
|
-
(flags.aliases[splitKey[0]] || []).forEach(function(x) {
|
|
413
|
-
let keyProperties = x.split(".");
|
|
414
|
-
const a = [].concat(splitKey);
|
|
415
|
-
a.shift();
|
|
416
|
-
keyProperties = keyProperties.concat(a);
|
|
417
|
-
if (!(flags.aliases[key] || []).includes(keyProperties.join("."))) {
|
|
418
|
-
setKey(argv, keyProperties, value);
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) {
|
|
423
|
-
const keys = [key].concat(flags.aliases[key] || []);
|
|
424
|
-
keys.forEach(function(key2) {
|
|
425
|
-
Object.defineProperty(argvReturn, key2, {
|
|
426
|
-
enumerable: true,
|
|
427
|
-
get() {
|
|
428
|
-
return val;
|
|
429
|
-
},
|
|
430
|
-
set(value2) {
|
|
431
|
-
val = typeof value2 === "string" ? mixin.normalize(value2) : value2;
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
function addNewAlias(key, alias) {
|
|
438
|
-
if (!(flags.aliases[key] && flags.aliases[key].length)) {
|
|
439
|
-
flags.aliases[key] = [alias];
|
|
440
|
-
newAliases[alias] = true;
|
|
441
|
-
}
|
|
442
|
-
if (!(flags.aliases[alias] && flags.aliases[alias].length)) {
|
|
443
|
-
addNewAlias(alias, key);
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
function processValue(key, val, shouldStripQuotes) {
|
|
447
|
-
if (shouldStripQuotes) {
|
|
448
|
-
val = stripQuotes(val);
|
|
449
|
-
}
|
|
450
|
-
if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) {
|
|
451
|
-
if (typeof val === "string")
|
|
452
|
-
val = val === "true";
|
|
453
|
-
}
|
|
454
|
-
let value = Array.isArray(val) ? val.map(function(v) {
|
|
455
|
-
return maybeCoerceNumber(key, v);
|
|
456
|
-
}) : maybeCoerceNumber(key, val);
|
|
457
|
-
if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === "boolean")) {
|
|
458
|
-
value = increment();
|
|
459
|
-
}
|
|
460
|
-
if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) {
|
|
461
|
-
if (Array.isArray(val))
|
|
462
|
-
value = val.map((val2) => {
|
|
463
|
-
return mixin.normalize(val2);
|
|
464
|
-
});
|
|
465
|
-
else
|
|
466
|
-
value = mixin.normalize(val);
|
|
467
|
-
}
|
|
468
|
-
return value;
|
|
469
|
-
}
|
|
470
|
-
function maybeCoerceNumber(key, value) {
|
|
471
|
-
if (!configuration["parse-positional-numbers"] && key === "_")
|
|
472
|
-
return value;
|
|
473
|
-
if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) {
|
|
474
|
-
const shouldCoerceNumber = looksLikeNumber(value) && configuration["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${value}`)));
|
|
475
|
-
if (shouldCoerceNumber || !isUndefined(value) && checkAllAliases(key, flags.numbers)) {
|
|
476
|
-
value = Number(value);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
return value;
|
|
480
|
-
}
|
|
481
|
-
function setConfig(argv2) {
|
|
482
|
-
const configLookup = /* @__PURE__ */ Object.create(null);
|
|
483
|
-
applyDefaultsAndAliases(configLookup, flags.aliases, defaults);
|
|
484
|
-
Object.keys(flags.configs).forEach(function(configKey) {
|
|
485
|
-
const configPath = argv2[configKey] || configLookup[configKey];
|
|
486
|
-
if (configPath) {
|
|
487
|
-
try {
|
|
488
|
-
let config = null;
|
|
489
|
-
const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath);
|
|
490
|
-
const resolveConfig = flags.configs[configKey];
|
|
491
|
-
if (typeof resolveConfig === "function") {
|
|
492
|
-
try {
|
|
493
|
-
config = resolveConfig(resolvedConfigPath);
|
|
494
|
-
} catch (e) {
|
|
495
|
-
config = e;
|
|
496
|
-
}
|
|
497
|
-
if (config instanceof Error) {
|
|
498
|
-
error = config;
|
|
499
|
-
return;
|
|
500
|
-
}
|
|
501
|
-
} else {
|
|
502
|
-
config = mixin.require(resolvedConfigPath);
|
|
503
|
-
}
|
|
504
|
-
setConfigObject(config);
|
|
505
|
-
} catch (ex) {
|
|
506
|
-
if (ex.name === "PermissionDenied")
|
|
507
|
-
error = ex;
|
|
508
|
-
else if (argv2[configKey])
|
|
509
|
-
error = Error(__("Invalid JSON config file: %s", configPath));
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
});
|
|
513
|
-
}
|
|
514
|
-
function setConfigObject(config, prev) {
|
|
515
|
-
Object.keys(config).forEach(function(key) {
|
|
516
|
-
const value = config[key];
|
|
517
|
-
const fullKey = prev ? prev + "." + key : key;
|
|
518
|
-
if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) {
|
|
519
|
-
setConfigObject(value, fullKey);
|
|
520
|
-
} else {
|
|
521
|
-
if (!hasKey(argv, fullKey.split(".")) || checkAllAliases(fullKey, flags.arrays) && configuration["combine-arrays"]) {
|
|
522
|
-
setArg(fullKey, value);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
function setConfigObjects() {
|
|
528
|
-
if (typeof configObjects !== "undefined") {
|
|
529
|
-
configObjects.forEach(function(configObject) {
|
|
530
|
-
setConfigObject(configObject);
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
function applyEnvVars(argv2, configOnly) {
|
|
535
|
-
if (typeof envPrefix === "undefined")
|
|
536
|
-
return;
|
|
537
|
-
const prefix = typeof envPrefix === "string" ? envPrefix : "";
|
|
538
|
-
const env = mixin.env();
|
|
539
|
-
Object.keys(env).forEach(function(envVar) {
|
|
540
|
-
if (prefix === "" || envVar.lastIndexOf(prefix, 0) === 0) {
|
|
541
|
-
const keys = envVar.split("__").map(function(key, i) {
|
|
542
|
-
if (i === 0) {
|
|
543
|
-
key = key.substring(prefix.length);
|
|
544
|
-
}
|
|
545
|
-
return camelCase(key);
|
|
546
|
-
});
|
|
547
|
-
if ((configOnly && flags.configs[keys.join(".")] || !configOnly) && !hasKey(argv2, keys)) {
|
|
548
|
-
setArg(keys.join("."), env[envVar]);
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
function applyCoercions(argv2) {
|
|
554
|
-
let coerce;
|
|
555
|
-
const applied = /* @__PURE__ */ new Set();
|
|
556
|
-
Object.keys(argv2).forEach(function(key) {
|
|
557
|
-
if (!applied.has(key)) {
|
|
558
|
-
coerce = checkAllAliases(key, flags.coercions);
|
|
559
|
-
if (typeof coerce === "function") {
|
|
560
|
-
try {
|
|
561
|
-
const value = maybeCoerceNumber(key, coerce(argv2[key]));
|
|
562
|
-
[].concat(flags.aliases[key] || [], key).forEach((ali) => {
|
|
563
|
-
applied.add(ali);
|
|
564
|
-
argv2[ali] = value;
|
|
565
|
-
});
|
|
566
|
-
} catch (err) {
|
|
567
|
-
error = err;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
function setPlaceholderKeys(argv2) {
|
|
574
|
-
flags.keys.forEach((key) => {
|
|
575
|
-
if (~key.indexOf("."))
|
|
576
|
-
return;
|
|
577
|
-
if (typeof argv2[key] === "undefined")
|
|
578
|
-
argv2[key] = void 0;
|
|
579
|
-
});
|
|
580
|
-
return argv2;
|
|
581
|
-
}
|
|
582
|
-
function applyDefaultsAndAliases(obj, aliases2, defaults2, canLog = false) {
|
|
583
|
-
Object.keys(defaults2).forEach(function(key) {
|
|
584
|
-
if (!hasKey(obj, key.split("."))) {
|
|
585
|
-
setKey(obj, key.split("."), defaults2[key]);
|
|
586
|
-
if (canLog)
|
|
587
|
-
defaulted[key] = true;
|
|
588
|
-
(aliases2[key] || []).forEach(function(x) {
|
|
589
|
-
if (hasKey(obj, x.split(".")))
|
|
590
|
-
return;
|
|
591
|
-
setKey(obj, x.split("."), defaults2[key]);
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
function hasKey(obj, keys) {
|
|
597
|
-
let o = obj;
|
|
598
|
-
if (!configuration["dot-notation"])
|
|
599
|
-
keys = [keys.join(".")];
|
|
600
|
-
keys.slice(0, -1).forEach(function(key2) {
|
|
601
|
-
o = o[key2] || {};
|
|
602
|
-
});
|
|
603
|
-
const key = keys[keys.length - 1];
|
|
604
|
-
if (typeof o !== "object")
|
|
605
|
-
return false;
|
|
606
|
-
else
|
|
607
|
-
return key in o;
|
|
608
|
-
}
|
|
609
|
-
function setKey(obj, keys, value) {
|
|
610
|
-
let o = obj;
|
|
611
|
-
if (!configuration["dot-notation"])
|
|
612
|
-
keys = [keys.join(".")];
|
|
613
|
-
keys.slice(0, -1).forEach(function(key2) {
|
|
614
|
-
key2 = sanitizeKey(key2);
|
|
615
|
-
if (typeof o === "object" && o[key2] === void 0) {
|
|
616
|
-
o[key2] = {};
|
|
617
|
-
}
|
|
618
|
-
if (typeof o[key2] !== "object" || Array.isArray(o[key2])) {
|
|
619
|
-
if (Array.isArray(o[key2])) {
|
|
620
|
-
o[key2].push({});
|
|
621
|
-
} else {
|
|
622
|
-
o[key2] = [o[key2], {}];
|
|
623
|
-
}
|
|
624
|
-
o = o[key2][o[key2].length - 1];
|
|
625
|
-
} else {
|
|
626
|
-
o = o[key2];
|
|
627
|
-
}
|
|
628
|
-
});
|
|
629
|
-
const key = sanitizeKey(keys[keys.length - 1]);
|
|
630
|
-
const isTypeArray = checkAllAliases(keys.join("."), flags.arrays);
|
|
631
|
-
const isValueArray = Array.isArray(value);
|
|
632
|
-
let duplicate = configuration["duplicate-arguments-array"];
|
|
633
|
-
if (!duplicate && checkAllAliases(key, flags.nargs)) {
|
|
634
|
-
duplicate = true;
|
|
635
|
-
if (!isUndefined(o[key]) && flags.nargs[key] === 1 || Array.isArray(o[key]) && o[key].length === flags.nargs[key]) {
|
|
636
|
-
o[key] = void 0;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
if (value === increment()) {
|
|
640
|
-
o[key] = increment(o[key]);
|
|
641
|
-
} else if (Array.isArray(o[key])) {
|
|
642
|
-
if (duplicate && isTypeArray && isValueArray) {
|
|
643
|
-
o[key] = configuration["flatten-duplicate-arrays"] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]);
|
|
644
|
-
} else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) {
|
|
645
|
-
o[key] = value;
|
|
646
|
-
} else {
|
|
647
|
-
o[key] = o[key].concat([value]);
|
|
648
|
-
}
|
|
649
|
-
} else if (o[key] === void 0 && isTypeArray) {
|
|
650
|
-
o[key] = isValueArray ? value : [value];
|
|
651
|
-
} else if (duplicate && !(o[key] === void 0 || checkAllAliases(key, flags.counts) || checkAllAliases(key, flags.bools))) {
|
|
652
|
-
o[key] = [o[key], value];
|
|
653
|
-
} else {
|
|
654
|
-
o[key] = value;
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
function extendAliases(...args2) {
|
|
658
|
-
args2.forEach(function(obj) {
|
|
659
|
-
Object.keys(obj || {}).forEach(function(key) {
|
|
660
|
-
if (flags.aliases[key])
|
|
661
|
-
return;
|
|
662
|
-
flags.aliases[key] = [].concat(aliases[key] || []);
|
|
663
|
-
flags.aliases[key].concat(key).forEach(function(x) {
|
|
664
|
-
if (/-/.test(x) && configuration["camel-case-expansion"]) {
|
|
665
|
-
const c = camelCase(x);
|
|
666
|
-
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
|
|
667
|
-
flags.aliases[key].push(c);
|
|
668
|
-
newAliases[c] = true;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
});
|
|
672
|
-
flags.aliases[key].concat(key).forEach(function(x) {
|
|
673
|
-
if (x.length > 1 && /[A-Z]/.test(x) && configuration["camel-case-expansion"]) {
|
|
674
|
-
const c = decamelize(x, "-");
|
|
675
|
-
if (c !== key && flags.aliases[key].indexOf(c) === -1) {
|
|
676
|
-
flags.aliases[key].push(c);
|
|
677
|
-
newAliases[c] = true;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
});
|
|
681
|
-
flags.aliases[key].forEach(function(x) {
|
|
682
|
-
flags.aliases[x] = [key].concat(flags.aliases[key].filter(function(y) {
|
|
683
|
-
return x !== y;
|
|
684
|
-
}));
|
|
685
|
-
});
|
|
686
|
-
});
|
|
687
|
-
});
|
|
688
|
-
}
|
|
689
|
-
function checkAllAliases(key, flag) {
|
|
690
|
-
const toCheck = [].concat(flags.aliases[key] || [], key);
|
|
691
|
-
const keys = Object.keys(flag);
|
|
692
|
-
const setAlias = toCheck.find((key2) => keys.includes(key2));
|
|
693
|
-
return setAlias ? flag[setAlias] : false;
|
|
694
|
-
}
|
|
695
|
-
function hasAnyFlag(key) {
|
|
696
|
-
const flagsKeys = Object.keys(flags);
|
|
697
|
-
const toCheck = [].concat(flagsKeys.map((k) => flags[k]));
|
|
698
|
-
return toCheck.some(function(flag) {
|
|
699
|
-
return Array.isArray(flag) ? flag.includes(key) : flag[key];
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
function hasFlagsMatching(arg, ...patterns) {
|
|
703
|
-
const toCheck = [].concat(...patterns);
|
|
704
|
-
return toCheck.some(function(pattern) {
|
|
705
|
-
const match = arg.match(pattern);
|
|
706
|
-
return match && hasAnyFlag(match[1]);
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
function hasAllShortFlags(arg) {
|
|
710
|
-
if (arg.match(negative) || !arg.match(/^-[^-]+/)) {
|
|
711
|
-
return false;
|
|
712
|
-
}
|
|
713
|
-
let hasAllFlags = true;
|
|
714
|
-
let next;
|
|
715
|
-
const letters = arg.slice(1).split("");
|
|
716
|
-
for (let j = 0; j < letters.length; j++) {
|
|
717
|
-
next = arg.slice(j + 2);
|
|
718
|
-
if (!hasAnyFlag(letters[j])) {
|
|
719
|
-
hasAllFlags = false;
|
|
720
|
-
break;
|
|
721
|
-
}
|
|
722
|
-
if (letters[j + 1] && letters[j + 1] === "=" || next === "-" || /[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) || letters[j + 1] && letters[j + 1].match(/\W/)) {
|
|
723
|
-
break;
|
|
724
|
-
}
|
|
725
|
-
}
|
|
726
|
-
return hasAllFlags;
|
|
727
|
-
}
|
|
728
|
-
function isUnknownOptionAsArg(arg) {
|
|
729
|
-
return configuration["unknown-options-as-args"] && isUnknownOption(arg);
|
|
730
|
-
}
|
|
731
|
-
function isUnknownOption(arg) {
|
|
732
|
-
arg = arg.replace(/^-{3,}/, "--");
|
|
733
|
-
if (arg.match(negative)) {
|
|
734
|
-
return false;
|
|
735
|
-
}
|
|
736
|
-
if (hasAllShortFlags(arg)) {
|
|
737
|
-
return false;
|
|
738
|
-
}
|
|
739
|
-
const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/;
|
|
740
|
-
const normalFlag = /^-+([^=]+?)$/;
|
|
741
|
-
const flagEndingInHyphen = /^-+([^=]+?)-$/;
|
|
742
|
-
const flagEndingInDigits = /^-+([^=]+?\d+)$/;
|
|
743
|
-
const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/;
|
|
744
|
-
return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters);
|
|
745
|
-
}
|
|
746
|
-
function defaultValue(key) {
|
|
747
|
-
if (!checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts) && `${key}` in defaults) {
|
|
748
|
-
return defaults[key];
|
|
749
|
-
} else {
|
|
750
|
-
return defaultForType(guessType(key));
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
function defaultForType(type) {
|
|
754
|
-
const def = {
|
|
755
|
-
[DefaultValuesForTypeKey.BOOLEAN]: true,
|
|
756
|
-
[DefaultValuesForTypeKey.STRING]: "",
|
|
757
|
-
[DefaultValuesForTypeKey.NUMBER]: void 0,
|
|
758
|
-
[DefaultValuesForTypeKey.ARRAY]: []
|
|
759
|
-
};
|
|
760
|
-
return def[type];
|
|
761
|
-
}
|
|
762
|
-
function guessType(key) {
|
|
763
|
-
let type = DefaultValuesForTypeKey.BOOLEAN;
|
|
764
|
-
if (checkAllAliases(key, flags.strings))
|
|
765
|
-
type = DefaultValuesForTypeKey.STRING;
|
|
766
|
-
else if (checkAllAliases(key, flags.numbers))
|
|
767
|
-
type = DefaultValuesForTypeKey.NUMBER;
|
|
768
|
-
else if (checkAllAliases(key, flags.bools))
|
|
769
|
-
type = DefaultValuesForTypeKey.BOOLEAN;
|
|
770
|
-
else if (checkAllAliases(key, flags.arrays))
|
|
771
|
-
type = DefaultValuesForTypeKey.ARRAY;
|
|
772
|
-
return type;
|
|
773
|
-
}
|
|
774
|
-
function isUndefined(num) {
|
|
775
|
-
return num === void 0;
|
|
776
|
-
}
|
|
777
|
-
function checkConfiguration() {
|
|
778
|
-
Object.keys(flags.counts).find((key) => {
|
|
779
|
-
if (checkAllAliases(key, flags.arrays)) {
|
|
780
|
-
error = Error(__("Invalid configuration: %s, opts.count excludes opts.array.", key));
|
|
781
|
-
return true;
|
|
782
|
-
} else if (checkAllAliases(key, flags.nargs)) {
|
|
783
|
-
error = Error(__("Invalid configuration: %s, opts.count excludes opts.narg.", key));
|
|
784
|
-
return true;
|
|
785
|
-
}
|
|
786
|
-
return false;
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
return {
|
|
790
|
-
aliases: Object.assign({}, flags.aliases),
|
|
791
|
-
argv: Object.assign(argvReturn, argv),
|
|
792
|
-
configuration,
|
|
793
|
-
defaulted: Object.assign({}, defaulted),
|
|
794
|
-
error,
|
|
795
|
-
newAliases: Object.assign({}, newAliases)
|
|
796
|
-
};
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
function combineAliases(aliases) {
|
|
800
|
-
const aliasArrays = [];
|
|
801
|
-
const combined = /* @__PURE__ */ Object.create(null);
|
|
802
|
-
let change = true;
|
|
803
|
-
Object.keys(aliases).forEach(function(key) {
|
|
804
|
-
aliasArrays.push([].concat(aliases[key], key));
|
|
805
|
-
});
|
|
806
|
-
while (change) {
|
|
807
|
-
change = false;
|
|
808
|
-
for (let i = 0; i < aliasArrays.length; i++) {
|
|
809
|
-
for (let ii = i + 1; ii < aliasArrays.length; ii++) {
|
|
810
|
-
const intersect = aliasArrays[i].filter(function(v) {
|
|
811
|
-
return aliasArrays[ii].indexOf(v) !== -1;
|
|
812
|
-
});
|
|
813
|
-
if (intersect.length) {
|
|
814
|
-
aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]);
|
|
815
|
-
aliasArrays.splice(ii, 1);
|
|
816
|
-
change = true;
|
|
817
|
-
break;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
aliasArrays.forEach(function(aliasArray) {
|
|
823
|
-
aliasArray = aliasArray.filter(function(v, i, self) {
|
|
824
|
-
return self.indexOf(v) === i;
|
|
825
|
-
});
|
|
826
|
-
const lastAlias = aliasArray.pop();
|
|
827
|
-
if (lastAlias !== void 0 && typeof lastAlias === "string") {
|
|
828
|
-
combined[lastAlias] = aliasArray;
|
|
829
|
-
}
|
|
830
|
-
});
|
|
831
|
-
return combined;
|
|
832
|
-
}
|
|
833
|
-
function increment(orig) {
|
|
834
|
-
return orig !== void 0 ? orig + 1 : 1;
|
|
835
|
-
}
|
|
836
|
-
function sanitizeKey(key) {
|
|
837
|
-
if (key === "__proto__")
|
|
838
|
-
return "___proto___";
|
|
839
|
-
return key;
|
|
840
|
-
}
|
|
841
|
-
function stripQuotes(val) {
|
|
842
|
-
return typeof val === "string" && (val[0] === "'" || val[0] === '"') && val[val.length - 1] === val[0] ? val.substring(1, val.length - 1) : val;
|
|
843
|
-
}
|
|
844
|
-
export {
|
|
845
|
-
YargsParser
|
|
846
|
-
};
|
|
847
|
-
//# sourceMappingURL=yargs-parser.js.map
|