@prismicio/client 7.23.0 → 7.23.1-canary.46cd720
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/Client.cjs +7 -9
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.cts +2 -4
- package/dist/Client.d.cts.map +1 -1
- package/dist/Client.d.ts +2 -4
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +7 -9
- package/dist/Client.js.map +1 -1
- package/dist/Migration.cjs +5 -6
- package/dist/Migration.d.cts +4 -6
- package/dist/Migration.d.cts.map +1 -1
- package/dist/Migration.d.ts +4 -6
- package/dist/Migration.d.ts.map +1 -1
- package/dist/Migration.js +5 -6
- package/dist/WriteClient.cjs +3 -6
- package/dist/WriteClient.cjs.map +1 -1
- package/dist/WriteClient.d.cts +3 -7
- package/dist/WriteClient.d.cts.map +1 -1
- package/dist/WriteClient.d.ts +3 -7
- package/dist/WriteClient.d.ts.map +1 -1
- package/dist/WriteClient.js +3 -6
- package/dist/WriteClient.js.map +1 -1
- package/dist/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/buildQueryURL.cjs +1 -2
- package/dist/buildQueryURL.d.cts +0 -2
- package/dist/buildQueryURL.d.cts.map +1 -1
- package/dist/buildQueryURL.d.ts +0 -2
- package/dist/buildQueryURL.d.ts.map +1 -1
- package/dist/buildQueryURL.js +1 -2
- package/dist/cookie.cjs +1 -2
- package/dist/cookie.d.cts +0 -1
- package/dist/cookie.d.ts +0 -1
- package/dist/cookie.js +1 -2
- package/dist/createClient.cjs +2 -4
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.cts +2 -5
- package/dist/createClient.d.cts.map +1 -1
- package/dist/createClient.d.ts +2 -5
- package/dist/createClient.d.ts.map +1 -1
- package/dist/createClient.js +2 -4
- package/dist/createClient.js.map +1 -1
- package/dist/createMigration.cjs +1 -2
- package/dist/createMigration.d.cts +1 -3
- package/dist/createMigration.d.cts.map +1 -1
- package/dist/createMigration.d.ts +1 -3
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js +1 -2
- package/dist/createWriteClient.cjs +1 -2
- package/dist/createWriteClient.d.cts +0 -2
- package/dist/createWriteClient.d.cts.map +1 -1
- package/dist/createWriteClient.d.ts +0 -2
- package/dist/createWriteClient.d.ts.map +1 -1
- package/dist/createWriteClient.js +1 -2
- package/dist/errors.cjs +1 -2
- package/dist/errors.d.cts +0 -2
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.ts +0 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -2
- package/dist/filter.cjs +1 -2
- package/dist/filter.d.cts +0 -2
- package/dist/filter.d.cts.map +1 -1
- package/dist/filter.d.ts +0 -2
- package/dist/filter.d.ts.map +1 -1
- package/dist/filter.js +1 -2
- package/dist/getGraphQLEndpoint.cjs +1 -2
- package/dist/getGraphQLEndpoint.d.cts +0 -2
- package/dist/getGraphQLEndpoint.d.cts.map +1 -1
- package/dist/getGraphQLEndpoint.d.ts +0 -2
- package/dist/getGraphQLEndpoint.d.ts.map +1 -1
- package/dist/getGraphQLEndpoint.js +1 -2
- package/dist/getRepositoryEndpoint.cjs +1 -2
- package/dist/getRepositoryEndpoint.d.cts +0 -2
- package/dist/getRepositoryEndpoint.d.cts.map +1 -1
- package/dist/getRepositoryEndpoint.d.ts +0 -2
- package/dist/getRepositoryEndpoint.d.ts.map +1 -1
- package/dist/getRepositoryEndpoint.js +1 -2
- package/dist/getRepositoryName.cjs +1 -2
- package/dist/getRepositoryName.d.cts +0 -2
- package/dist/getRepositoryName.d.cts.map +1 -1
- package/dist/getRepositoryName.d.ts +0 -2
- package/dist/getRepositoryName.d.ts.map +1 -1
- package/dist/getRepositoryName.js +1 -2
- package/dist/getToolbarSrc.cjs +1 -2
- package/dist/getToolbarSrc.d.cts +0 -2
- package/dist/getToolbarSrc.d.cts.map +1 -1
- package/dist/getToolbarSrc.d.ts +0 -2
- package/dist/getToolbarSrc.d.ts.map +1 -1
- package/dist/getToolbarSrc.js +1 -2
- package/dist/helpers/asDate.cjs +1 -2
- package/dist/helpers/asDate.d.cts +0 -2
- package/dist/helpers/asDate.d.cts.map +1 -1
- package/dist/helpers/asDate.d.ts +0 -2
- package/dist/helpers/asDate.d.ts.map +1 -1
- package/dist/helpers/asDate.js +1 -2
- package/dist/helpers/asHTML.cjs +2 -3
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.cts +3 -7
- package/dist/helpers/asHTML.d.cts.map +1 -1
- package/dist/helpers/asHTML.d.ts +3 -7
- package/dist/helpers/asHTML.d.ts.map +1 -1
- package/dist/helpers/asHTML.js +2 -3
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +1 -2
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts +0 -2
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +0 -2
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.js +1 -2
- package/dist/helpers/asImageSrc.cjs +1 -2
- package/dist/helpers/asImageSrc.d.cts +0 -2
- package/dist/helpers/asImageSrc.d.cts.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +0 -2
- package/dist/helpers/asImageSrc.d.ts.map +1 -1
- package/dist/helpers/asImageSrc.js +1 -2
- package/dist/helpers/asImageWidthSrcSet.cjs +1 -2
- package/dist/helpers/asImageWidthSrcSet.d.cts +0 -2
- package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +0 -2
- package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.js +1 -2
- package/dist/helpers/asLink.cjs +1 -2
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.cts +4 -8
- package/dist/helpers/asLink.d.cts.map +1 -1
- package/dist/helpers/asLink.d.ts +4 -8
- package/dist/helpers/asLink.d.ts.map +1 -1
- package/dist/helpers/asLink.js +1 -2
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs +3 -5
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.cts +3 -6
- package/dist/helpers/asLinkAttrs.d.cts.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +3 -6
- package/dist/helpers/asLinkAttrs.d.ts.map +1 -1
- package/dist/helpers/asLinkAttrs.js +3 -5
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs +1 -2
- package/dist/helpers/asText.d.cts +0 -2
- package/dist/helpers/asText.d.cts.map +1 -1
- package/dist/helpers/asText.d.ts +0 -2
- package/dist/helpers/asText.d.ts.map +1 -1
- package/dist/helpers/asText.js +1 -2
- package/dist/helpers/documentToLinkField.cjs +1 -2
- package/dist/helpers/documentToLinkField.d.cts +0 -2
- package/dist/helpers/documentToLinkField.d.cts.map +1 -1
- package/dist/helpers/documentToLinkField.d.ts +0 -2
- package/dist/helpers/documentToLinkField.d.ts.map +1 -1
- package/dist/helpers/documentToLinkField.js +1 -2
- package/dist/helpers/isFilled.cjs +1 -2
- package/dist/helpers/isFilled.d.cts +7 -8
- package/dist/helpers/isFilled.d.ts +7 -8
- package/dist/helpers/isFilled.js +1 -2
- package/dist/helpers/mapSliceZone.cjs +1 -2
- package/dist/helpers/mapSliceZone.d.cts +0 -2
- package/dist/helpers/mapSliceZone.d.cts.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +0 -2
- package/dist/helpers/mapSliceZone.d.ts.map +1 -1
- package/dist/helpers/mapSliceZone.js +1 -2
- package/dist/index.cjs +17 -18
- package/dist/index.d.cts +62 -64
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +62 -64
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -18
- package/dist/isRepositoryEndpoint.cjs +1 -2
- package/dist/isRepositoryEndpoint.d.cts +0 -2
- package/dist/isRepositoryEndpoint.d.cts.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +0 -2
- package/dist/isRepositoryEndpoint.d.ts.map +1 -1
- package/dist/isRepositoryEndpoint.js +1 -2
- package/dist/isRepositoryName.cjs +1 -2
- package/dist/isRepositoryName.d.cts +0 -2
- package/dist/isRepositoryName.d.cts.map +1 -1
- package/dist/isRepositoryName.d.ts +0 -2
- package/dist/isRepositoryName.d.ts.map +1 -1
- package/dist/isRepositoryName.js +1 -2
- package/dist/lib/devMsg.cjs +1 -2
- package/dist/lib/devMsg.js +1 -2
- package/dist/lib/escapeHTML.cjs +1 -2
- package/dist/lib/escapeHTML.js +1 -2
- package/dist/lib/getOptionalLinkProperties.cjs +1 -2
- package/dist/lib/getOptionalLinkProperties.js +1 -2
- package/dist/lib/getPreviewCookie.cjs +1 -2
- package/dist/lib/getPreviewCookie.js +1 -2
- package/dist/lib/isInternalURL.cjs +1 -2
- package/dist/lib/isInternalURL.js +1 -2
- package/dist/lib/isMigrationValue.cjs +3 -4
- package/dist/lib/isMigrationValue.js +3 -4
- package/dist/lib/isValue.cjs +2 -3
- package/dist/lib/isValue.js +2 -3
- package/dist/lib/pLimit.cjs +4 -5
- package/dist/lib/pLimit.cjs.map +1 -1
- package/dist/lib/pLimit.js +4 -5
- package/dist/lib/pLimit.js.map +1 -1
- package/dist/lib/request.cjs +1 -2
- package/dist/lib/request.d.cts +0 -2
- package/dist/lib/request.d.cts.map +1 -1
- package/dist/lib/request.d.ts +0 -2
- package/dist/lib/request.d.ts.map +1 -1
- package/dist/lib/request.js +1 -2
- package/dist/lib/resolveMigrationDocumentData.cjs +3 -4
- package/dist/lib/resolveMigrationDocumentData.js +3 -4
- package/dist/lib/serializerHelpers.cjs +2 -3
- package/dist/lib/serializerHelpers.js +2 -3
- package/dist/lib/throttledWarn.cjs +4 -5
- package/dist/lib/throttledWarn.cjs.map +1 -1
- package/dist/lib/throttledWarn.js +4 -5
- package/dist/lib/throttledWarn.js.map +1 -1
- package/dist/lib/validateAssetMetadata.cjs +1 -2
- package/dist/lib/validateAssetMetadata.js +1 -2
- package/dist/package.cjs +2 -3
- package/dist/package.js +2 -3
- package/dist/richtext/asText.cjs +1 -2
- package/dist/richtext/asText.d.cts +0 -2
- package/dist/richtext/asText.d.cts.map +1 -1
- package/dist/richtext/asText.d.ts +0 -2
- package/dist/richtext/asText.d.ts.map +1 -1
- package/dist/richtext/asText.js +1 -2
- package/dist/richtext/asTree.cjs +1 -2
- package/dist/richtext/asTree.d.cts +0 -2
- package/dist/richtext/asTree.d.cts.map +1 -1
- package/dist/richtext/asTree.d.ts +0 -2
- package/dist/richtext/asTree.d.ts.map +1 -1
- package/dist/richtext/asTree.js +1 -2
- package/dist/richtext/composeSerializers.cjs +1 -2
- package/dist/richtext/composeSerializers.d.cts +0 -2
- package/dist/richtext/composeSerializers.d.cts.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +0 -2
- package/dist/richtext/composeSerializers.d.ts.map +1 -1
- package/dist/richtext/composeSerializers.js +1 -2
- package/dist/richtext/serialize.cjs +1 -2
- package/dist/richtext/serialize.d.cts +0 -2
- package/dist/richtext/serialize.d.cts.map +1 -1
- package/dist/richtext/serialize.d.ts +0 -2
- package/dist/richtext/serialize.d.ts.map +1 -1
- package/dist/richtext/serialize.js +1 -2
- package/dist/richtext/types.cjs +1 -2
- package/dist/richtext/types.d.cts +0 -2
- package/dist/richtext/types.d.cts.map +1 -1
- package/dist/richtext/types.d.ts +0 -2
- package/dist/richtext/types.d.ts.map +1 -1
- package/dist/richtext/types.js +1 -2
- package/dist/richtext/wrapMapSerializer.cjs +1 -2
- package/dist/richtext/wrapMapSerializer.d.cts +0 -2
- package/dist/richtext/wrapMapSerializer.d.cts.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +0 -2
- package/dist/richtext/wrapMapSerializer.d.ts.map +1 -1
- package/dist/richtext/wrapMapSerializer.js +1 -2
- package/dist/richtext.cjs +2 -2
- package/dist/richtext.d.cts +2 -2
- package/dist/richtext.d.ts +2 -2
- package/dist/richtext.js +2 -2
- package/dist/types/api/asset/asset.d.cts +0 -2
- package/dist/types/api/asset/asset.d.cts.map +1 -1
- package/dist/types/api/asset/asset.d.ts +0 -2
- package/dist/types/api/asset/asset.d.ts.map +1 -1
- package/dist/types/api/asset/tag.d.cts +0 -2
- package/dist/types/api/asset/tag.d.cts.map +1 -1
- package/dist/types/api/asset/tag.d.ts +0 -2
- package/dist/types/api/asset/tag.d.ts.map +1 -1
- package/dist/types/api/integration.d.cts +0 -2
- package/dist/types/api/integration.d.cts.map +1 -1
- package/dist/types/api/integration.d.ts +0 -2
- package/dist/types/api/integration.d.ts.map +1 -1
- package/dist/types/api/migration/release.d.cts +0 -2
- package/dist/types/api/migration/release.d.cts.map +1 -1
- package/dist/types/api/migration/release.d.ts +0 -2
- package/dist/types/api/migration/release.d.ts.map +1 -1
- package/dist/types/api/query.d.cts +0 -2
- package/dist/types/api/query.d.cts.map +1 -1
- package/dist/types/api/query.d.ts +0 -2
- package/dist/types/api/query.d.ts.map +1 -1
- package/dist/types/api/ref.d.cts +0 -2
- package/dist/types/api/ref.d.cts.map +1 -1
- package/dist/types/api/ref.d.ts +0 -2
- package/dist/types/api/ref.d.ts.map +1 -1
- package/dist/types/api/release.d.cts +0 -2
- package/dist/types/api/release.d.cts.map +1 -1
- package/dist/types/api/release.d.ts +0 -2
- package/dist/types/api/release.d.ts.map +1 -1
- package/dist/types/api/repository.d.cts +0 -2
- package/dist/types/api/repository.d.cts.map +1 -1
- package/dist/types/api/repository.d.ts +0 -2
- package/dist/types/api/repository.d.ts.map +1 -1
- package/dist/types/api/tags.d.cts +0 -2
- package/dist/types/api/tags.d.cts.map +1 -1
- package/dist/types/api/tags.d.ts +0 -2
- package/dist/types/api/tags.d.ts.map +1 -1
- package/dist/types/migration/Asset.cjs +1 -2
- package/dist/types/migration/Asset.d.cts +1 -3
- package/dist/types/migration/Asset.d.cts.map +1 -1
- package/dist/types/migration/Asset.d.ts +1 -3
- package/dist/types/migration/Asset.d.ts.map +1 -1
- package/dist/types/migration/Asset.js +1 -2
- package/dist/types/migration/ContentRelationship.d.cts +0 -2
- package/dist/types/migration/ContentRelationship.d.cts.map +1 -1
- package/dist/types/migration/ContentRelationship.d.ts +0 -2
- package/dist/types/migration/ContentRelationship.d.ts.map +1 -1
- package/dist/types/migration/Document.cjs +1 -2
- package/dist/types/migration/Document.d.cts +4 -6
- package/dist/types/migration/Document.d.cts.map +1 -1
- package/dist/types/migration/Document.d.ts +4 -6
- package/dist/types/migration/Document.d.ts.map +1 -1
- package/dist/types/migration/Document.js +1 -2
- package/dist/types/model/boolean.d.cts +0 -2
- package/dist/types/model/boolean.d.cts.map +1 -1
- package/dist/types/model/boolean.d.ts +0 -2
- package/dist/types/model/boolean.d.ts.map +1 -1
- package/dist/types/model/color.d.cts +0 -2
- package/dist/types/model/color.d.cts.map +1 -1
- package/dist/types/model/color.d.ts +0 -2
- package/dist/types/model/color.d.ts.map +1 -1
- package/dist/types/model/contentRelationship.d.cts +0 -2
- package/dist/types/model/contentRelationship.d.cts.map +1 -1
- package/dist/types/model/contentRelationship.d.ts +0 -2
- package/dist/types/model/contentRelationship.d.ts.map +1 -1
- package/dist/types/model/customType.d.cts +0 -2
- package/dist/types/model/customType.d.cts.map +1 -1
- package/dist/types/model/customType.d.ts +0 -2
- package/dist/types/model/customType.d.ts.map +1 -1
- package/dist/types/model/date.d.cts +0 -2
- package/dist/types/model/date.d.cts.map +1 -1
- package/dist/types/model/date.d.ts +0 -2
- package/dist/types/model/date.d.ts.map +1 -1
- package/dist/types/model/embed.d.cts +0 -2
- package/dist/types/model/embed.d.cts.map +1 -1
- package/dist/types/model/embed.d.ts +0 -2
- package/dist/types/model/embed.d.ts.map +1 -1
- package/dist/types/model/geoPoint.d.cts +0 -2
- package/dist/types/model/geoPoint.d.cts.map +1 -1
- package/dist/types/model/geoPoint.d.ts +0 -2
- package/dist/types/model/geoPoint.d.ts.map +1 -1
- package/dist/types/model/group.d.cts +0 -2
- package/dist/types/model/group.d.cts.map +1 -1
- package/dist/types/model/group.d.ts +0 -2
- package/dist/types/model/group.d.ts.map +1 -1
- package/dist/types/model/image.d.cts +0 -2
- package/dist/types/model/image.d.cts.map +1 -1
- package/dist/types/model/image.d.ts +0 -2
- package/dist/types/model/image.d.ts.map +1 -1
- package/dist/types/model/integration.d.cts +0 -2
- package/dist/types/model/integration.d.cts.map +1 -1
- package/dist/types/model/integration.d.ts +0 -2
- package/dist/types/model/integration.d.ts.map +1 -1
- package/dist/types/model/keyText.d.cts +0 -2
- package/dist/types/model/keyText.d.cts.map +1 -1
- package/dist/types/model/keyText.d.ts +0 -2
- package/dist/types/model/keyText.d.ts.map +1 -1
- package/dist/types/model/link.cjs +1 -2
- package/dist/types/model/link.d.cts +0 -2
- package/dist/types/model/link.d.cts.map +1 -1
- package/dist/types/model/link.d.ts +0 -2
- package/dist/types/model/link.d.ts.map +1 -1
- package/dist/types/model/link.js +1 -2
- package/dist/types/model/linkToMedia.d.cts +0 -2
- package/dist/types/model/linkToMedia.d.cts.map +1 -1
- package/dist/types/model/linkToMedia.d.ts +0 -2
- package/dist/types/model/linkToMedia.d.ts.map +1 -1
- package/dist/types/model/number.d.cts +0 -2
- package/dist/types/model/number.d.cts.map +1 -1
- package/dist/types/model/number.d.ts +0 -2
- package/dist/types/model/number.d.ts.map +1 -1
- package/dist/types/model/range.d.cts +0 -2
- package/dist/types/model/range.d.cts.map +1 -1
- package/dist/types/model/range.d.ts +0 -2
- package/dist/types/model/range.d.ts.map +1 -1
- package/dist/types/model/richText.d.cts +0 -2
- package/dist/types/model/richText.d.cts.map +1 -1
- package/dist/types/model/richText.d.ts +0 -2
- package/dist/types/model/richText.d.ts.map +1 -1
- package/dist/types/model/select.d.cts +0 -2
- package/dist/types/model/select.d.cts.map +1 -1
- package/dist/types/model/select.d.ts +0 -2
- package/dist/types/model/select.d.ts.map +1 -1
- package/dist/types/model/separator.d.cts +0 -2
- package/dist/types/model/separator.d.cts.map +1 -1
- package/dist/types/model/separator.d.ts +0 -2
- package/dist/types/model/separator.d.ts.map +1 -1
- package/dist/types/model/sharedSlice.d.cts +1 -3
- package/dist/types/model/sharedSlice.d.cts.map +1 -1
- package/dist/types/model/sharedSlice.d.ts +1 -3
- package/dist/types/model/sharedSlice.d.ts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.cts +0 -2
- package/dist/types/model/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.ts +0 -2
- package/dist/types/model/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/model/slice.cjs +1 -2
- package/dist/types/model/slice.d.cts +0 -2
- package/dist/types/model/slice.d.cts.map +1 -1
- package/dist/types/model/slice.d.ts +0 -2
- package/dist/types/model/slice.d.ts.map +1 -1
- package/dist/types/model/slice.js +1 -2
- package/dist/types/model/sliceZone.cjs +1 -2
- package/dist/types/model/sliceZone.d.cts +0 -2
- package/dist/types/model/sliceZone.d.cts.map +1 -1
- package/dist/types/model/sliceZone.d.ts +0 -2
- package/dist/types/model/sliceZone.d.ts.map +1 -1
- package/dist/types/model/sliceZone.js +1 -2
- package/dist/types/model/table.d.cts +0 -2
- package/dist/types/model/table.d.cts.map +1 -1
- package/dist/types/model/table.d.ts +0 -2
- package/dist/types/model/table.d.ts.map +1 -1
- package/dist/types/model/timestamp.d.cts +0 -2
- package/dist/types/model/timestamp.d.cts.map +1 -1
- package/dist/types/model/timestamp.d.ts +0 -2
- package/dist/types/model/timestamp.d.ts.map +1 -1
- package/dist/types/model/title.d.cts +0 -2
- package/dist/types/model/title.d.cts.map +1 -1
- package/dist/types/model/title.d.ts +0 -2
- package/dist/types/model/title.d.ts.map +1 -1
- package/dist/types/model/types.cjs +1 -2
- package/dist/types/model/types.d.cts +2 -4
- package/dist/types/model/types.d.cts.map +1 -1
- package/dist/types/model/types.d.ts +2 -4
- package/dist/types/model/types.d.ts.map +1 -1
- package/dist/types/model/types.js +1 -2
- package/dist/types/model/uid.d.cts +0 -2
- package/dist/types/model/uid.d.cts.map +1 -1
- package/dist/types/model/uid.d.ts +0 -2
- package/dist/types/model/uid.d.ts.map +1 -1
- package/dist/types/value/boolean.d.cts +0 -2
- package/dist/types/value/boolean.d.cts.map +1 -1
- package/dist/types/value/boolean.d.ts +0 -2
- package/dist/types/value/boolean.d.ts.map +1 -1
- package/dist/types/value/color.d.cts +0 -2
- package/dist/types/value/color.d.cts.map +1 -1
- package/dist/types/value/color.d.ts +0 -2
- package/dist/types/value/color.d.ts.map +1 -1
- package/dist/types/value/contentRelationship.d.cts +0 -2
- package/dist/types/value/contentRelationship.d.cts.map +1 -1
- package/dist/types/value/contentRelationship.d.ts +0 -2
- package/dist/types/value/contentRelationship.d.ts.map +1 -1
- package/dist/types/value/date.d.cts +0 -2
- package/dist/types/value/date.d.cts.map +1 -1
- package/dist/types/value/date.d.ts +0 -2
- package/dist/types/value/date.d.ts.map +1 -1
- package/dist/types/value/document.d.cts +0 -2
- package/dist/types/value/document.d.cts.map +1 -1
- package/dist/types/value/document.d.ts +0 -2
- package/dist/types/value/document.d.ts.map +1 -1
- package/dist/types/value/embed.cjs +1 -2
- package/dist/types/value/embed.d.cts +0 -2
- package/dist/types/value/embed.d.cts.map +1 -1
- package/dist/types/value/embed.d.ts +0 -2
- package/dist/types/value/embed.d.ts.map +1 -1
- package/dist/types/value/embed.js +1 -2
- package/dist/types/value/geoPoint.d.cts +0 -2
- package/dist/types/value/geoPoint.d.cts.map +1 -1
- package/dist/types/value/geoPoint.d.ts +0 -2
- package/dist/types/value/geoPoint.d.ts.map +1 -1
- package/dist/types/value/group.d.cts +0 -2
- package/dist/types/value/group.d.cts.map +1 -1
- package/dist/types/value/group.d.ts +0 -2
- package/dist/types/value/group.d.ts.map +1 -1
- package/dist/types/value/image.d.cts +0 -2
- package/dist/types/value/image.d.cts.map +1 -1
- package/dist/types/value/image.d.ts +0 -2
- package/dist/types/value/image.d.ts.map +1 -1
- package/dist/types/value/integration.d.cts +0 -2
- package/dist/types/value/integration.d.cts.map +1 -1
- package/dist/types/value/integration.d.ts +0 -2
- package/dist/types/value/integration.d.ts.map +1 -1
- package/dist/types/value/keyText.d.cts +0 -2
- package/dist/types/value/keyText.d.cts.map +1 -1
- package/dist/types/value/keyText.d.ts +0 -2
- package/dist/types/value/keyText.d.ts.map +1 -1
- package/dist/types/value/link.cjs +1 -2
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.cts +3 -6
- package/dist/types/value/link.d.cts.map +1 -1
- package/dist/types/value/link.d.ts +3 -6
- package/dist/types/value/link.d.ts.map +1 -1
- package/dist/types/value/link.js +1 -2
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.cts +0 -2
- package/dist/types/value/linkToMedia.d.cts.map +1 -1
- package/dist/types/value/linkToMedia.d.ts +0 -2
- package/dist/types/value/linkToMedia.d.ts.map +1 -1
- package/dist/types/value/number.d.cts +0 -2
- package/dist/types/value/number.d.cts.map +1 -1
- package/dist/types/value/number.d.ts +0 -2
- package/dist/types/value/number.d.ts.map +1 -1
- package/dist/types/value/richText.cjs +1 -2
- package/dist/types/value/richText.d.cts +1 -3
- package/dist/types/value/richText.d.cts.map +1 -1
- package/dist/types/value/richText.d.ts +1 -3
- package/dist/types/value/richText.d.ts.map +1 -1
- package/dist/types/value/richText.js +1 -2
- package/dist/types/value/select.d.cts +0 -2
- package/dist/types/value/select.d.cts.map +1 -1
- package/dist/types/value/select.d.ts +0 -2
- package/dist/types/value/select.d.ts.map +1 -1
- package/dist/types/value/sharedSlice.d.cts +0 -2
- package/dist/types/value/sharedSlice.d.cts.map +1 -1
- package/dist/types/value/sharedSlice.d.ts +0 -2
- package/dist/types/value/sharedSlice.d.ts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.cts +0 -2
- package/dist/types/value/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.ts +0 -2
- package/dist/types/value/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/value/slice.d.cts +0 -2
- package/dist/types/value/slice.d.cts.map +1 -1
- package/dist/types/value/slice.d.ts +0 -2
- package/dist/types/value/slice.d.ts.map +1 -1
- package/dist/types/value/sliceZone.d.cts +0 -2
- package/dist/types/value/sliceZone.d.cts.map +1 -1
- package/dist/types/value/sliceZone.d.ts +0 -2
- package/dist/types/value/sliceZone.d.ts.map +1 -1
- package/dist/types/value/table.d.cts +1 -3
- package/dist/types/value/table.d.cts.map +1 -1
- package/dist/types/value/table.d.ts +1 -3
- package/dist/types/value/table.d.ts.map +1 -1
- package/dist/types/value/timestamp.d.cts +0 -2
- package/dist/types/value/timestamp.d.cts.map +1 -1
- package/dist/types/value/timestamp.d.ts +0 -2
- package/dist/types/value/timestamp.d.ts.map +1 -1
- package/dist/types/value/title.d.cts +1 -3
- package/dist/types/value/title.d.cts.map +1 -1
- package/dist/types/value/title.d.ts +1 -3
- package/dist/types/value/title.d.ts.map +1 -1
- package/dist/types/value/types.d.cts +4 -6
- package/dist/types/value/types.d.cts.map +1 -1
- package/dist/types/value/types.d.ts +4 -6
- package/dist/types/value/types.d.ts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.cts +0 -2
- package/dist/types/webhook/apiUpdate.d.cts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.ts +0 -2
- package/dist/types/webhook/apiUpdate.d.ts.map +1 -1
- package/dist/types/webhook/testTrigger.d.cts +0 -2
- package/dist/types/webhook/testTrigger.d.cts.map +1 -1
- package/dist/types/webhook/testTrigger.d.ts +0 -2
- package/dist/types/webhook/testTrigger.d.ts.map +1 -1
- package/dist/types/webhook/types.cjs +1 -2
- package/dist/types/webhook/types.d.cts +0 -2
- package/dist/types/webhook/types.d.cts.map +1 -1
- package/dist/types/webhook/types.d.ts +0 -2
- package/dist/types/webhook/types.d.ts.map +1 -1
- package/dist/types/webhook/types.js +1 -2
- package/package.json +7 -7
- package/src/Client.ts +6 -6
- package/src/WriteClient.ts +0 -2
- package/src/createClient.ts +1 -2
- package/src/helpers/asHTML.ts +2 -4
- package/src/helpers/asLink.ts +2 -4
- package/src/helpers/asLinkAttrs.ts +1 -2
- package/src/lib/pLimit.ts +3 -3
- package/src/lib/throttledWarn.ts +3 -3
- package/src/types/value/link.ts +1 -2
package/dist/index.js
CHANGED
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
import { filter } from "./filter.js";
|
|
2
2
|
import { mapSliceZone } from "./helpers/mapSliceZone.js";
|
|
3
3
|
import { RichTextNodeType } from "./types/value/richText.js";
|
|
4
|
-
import { buildQueryURL } from "./buildQueryURL.js";
|
|
5
|
-
import { ForbiddenError, InvalidDataError, NotFoundError, ParsingError, PreviewTokenExpiredError, PrismicError, RefExpiredError, RefNotFoundError, RepositoryNotFoundError } from "./errors.js";
|
|
6
|
-
import { isRepositoryName } from "./isRepositoryName.js";
|
|
7
|
-
import { getRepositoryEndpoint } from "./getRepositoryEndpoint.js";
|
|
8
|
-
import { getRepositoryName } from "./getRepositoryName.js";
|
|
9
|
-
import { LinkType } from "./types/value/link.js";
|
|
10
|
-
import { documentToLinkField } from "./helpers/documentToLinkField.js";
|
|
11
|
-
import { asLink } from "./helpers/asLink.js";
|
|
12
|
-
import { isRepositoryEndpoint } from "./isRepositoryEndpoint.js";
|
|
13
|
-
import { cookie_exports } from "./cookie.js";
|
|
14
|
-
import { Client } from "./Client.js";
|
|
15
4
|
import { createClient } from "./createClient.js";
|
|
16
|
-
import {
|
|
17
|
-
import { PrismicMigrationAsset } from "./types/migration/Asset.js";
|
|
18
|
-
import { PrismicMigrationDocument } from "./types/migration/Document.js";
|
|
19
|
-
import { WriteClient } from "./WriteClient.js";
|
|
5
|
+
import { Client } from "./Client.js";
|
|
20
6
|
import { createWriteClient } from "./createWriteClient.js";
|
|
21
|
-
import {
|
|
7
|
+
import { WriteClient } from "./WriteClient.js";
|
|
22
8
|
import { createMigration } from "./createMigration.js";
|
|
9
|
+
import { Migration } from "./Migration.js";
|
|
10
|
+
import { getRepositoryEndpoint } from "./getRepositoryEndpoint.js";
|
|
11
|
+
import { getRepositoryName } from "./getRepositoryName.js";
|
|
23
12
|
import { getGraphQLEndpoint } from "./getGraphQLEndpoint.js";
|
|
13
|
+
import { isRepositoryName } from "./isRepositoryName.js";
|
|
14
|
+
import { isRepositoryEndpoint } from "./isRepositoryEndpoint.js";
|
|
15
|
+
import { buildQueryURL } from "./buildQueryURL.js";
|
|
24
16
|
import { getToolbarSrc } from "./getToolbarSrc.js";
|
|
17
|
+
import { cookie_exports } from "./cookie.js";
|
|
25
18
|
import { asDate } from "./helpers/asDate.js";
|
|
19
|
+
import { asLink } from "./helpers/asLink.js";
|
|
26
20
|
import { asLinkAttrs } from "./helpers/asLinkAttrs.js";
|
|
27
21
|
import { asText } from "./helpers/asText.js";
|
|
28
22
|
import { asHTML } from "./helpers/asHTML.js";
|
|
29
23
|
import { asImageSrc } from "./helpers/asImageSrc.js";
|
|
30
24
|
import { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet.js";
|
|
31
25
|
import { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet.js";
|
|
26
|
+
import { isFilled_exports } from "./helpers/isFilled.js";
|
|
27
|
+
import { documentToLinkField } from "./helpers/documentToLinkField.js";
|
|
28
|
+
import { ForbiddenError, InvalidDataError, NotFoundError, ParsingError, PreviewTokenExpiredError, PrismicError, RefExpiredError, RefNotFoundError, RepositoryNotFoundError } from "./errors.js";
|
|
29
|
+
import { LinkType } from "./types/value/link.js";
|
|
32
30
|
import { OEmbedType } from "./types/value/embed.js";
|
|
33
31
|
import { CustomTypeModelFieldType } from "./types/model/types.js";
|
|
34
32
|
import { CustomTypeModelLinkSelectType } from "./types/model/link.js";
|
|
35
33
|
import { CustomTypeModelSliceType } from "./types/model/sliceZone.js";
|
|
36
34
|
import { CustomTypeModelSliceDisplay } from "./types/model/slice.js";
|
|
35
|
+
import { PrismicMigrationDocument } from "./types/migration/Document.js";
|
|
36
|
+
import { PrismicMigrationAsset } from "./types/migration/Asset.js";
|
|
37
37
|
import { WebhookType } from "./types/webhook/types.js";
|
|
38
|
-
|
|
38
|
+
// src/index.ts
|
|
39
39
|
/** @deprecated Renamed to `filter` */
|
|
40
40
|
const predicate = filter;
|
|
41
41
|
/** @deprecated Renamed to `mapSliceZone` */
|
|
42
42
|
const unstable_mapSliceZone = mapSliceZone;
|
|
43
43
|
/** @deprecated Use {@link RichTextNodeType} instead. */
|
|
44
44
|
const Element = RichTextNodeType;
|
|
45
|
-
//#endregion
|
|
46
45
|
export { Client, CustomTypeModelFieldType, CustomTypeModelLinkSelectType, CustomTypeModelSliceDisplay, CustomTypeModelSliceType, Element, ForbiddenError, InvalidDataError, LinkType, Migration, NotFoundError, OEmbedType, ParsingError, PreviewTokenExpiredError, PrismicError, PrismicMigrationAsset, PrismicMigrationDocument, RefExpiredError, RefNotFoundError, RepositoryNotFoundError, RichTextNodeType, WebhookType, WriteClient, asDate, asHTML, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet, asLink, asLinkAttrs, asText, buildQueryURL, cookie_exports as cookie, createClient, createMigration, createWriteClient, documentToLinkField, filter, getGraphQLEndpoint, getRepositoryEndpoint, getRepositoryName, getToolbarSrc, isFilled_exports as isFilled, isRepositoryEndpoint, isRepositoryName, mapSliceZone, predicate, unstable_mapSliceZone };
|
|
47
46
|
|
|
48
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/isRepositoryEndpoint.ts
|
|
2
2
|
/**
|
|
3
3
|
* Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
|
|
4
4
|
* endpoint to support network proxies.
|
|
@@ -15,7 +15,6 @@ const isRepositoryEndpoint = (input) => {
|
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
exports.isRepositoryEndpoint = isRepositoryEndpoint;
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=isRepositoryEndpoint.cjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/isRepositoryEndpoint.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
|
|
4
3
|
* endpoint to support network proxies.
|
|
@@ -8,5 +7,4 @@
|
|
|
8
7
|
* otherwise.
|
|
9
8
|
*/
|
|
10
9
|
export declare const isRepositoryEndpoint: (input: string) => boolean;
|
|
11
|
-
//#endregion
|
|
12
10
|
//# sourceMappingURL=isRepositoryEndpoint.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.d.cts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.d.cts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;;;;;;;qBAQa,uBAAoB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/isRepositoryEndpoint.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
|
|
4
3
|
* endpoint to support network proxies.
|
|
@@ -8,5 +7,4 @@
|
|
|
8
7
|
* otherwise.
|
|
9
8
|
*/
|
|
10
9
|
export declare const isRepositoryEndpoint: (input: string) => boolean;
|
|
11
|
-
//#endregion
|
|
12
10
|
//# sourceMappingURL=isRepositoryEndpoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.d.ts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.d.ts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;;;;;;;qBAQa,uBAAoB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/isRepositoryEndpoint.ts
|
|
2
2
|
/**
|
|
3
3
|
* Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
|
|
4
4
|
* endpoint to support network proxies.
|
|
@@ -15,7 +15,6 @@ const isRepositoryEndpoint = (input) => {
|
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { isRepositoryEndpoint };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=isRepositoryEndpoint.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/isRepositoryName.ts
|
|
2
2
|
/**
|
|
3
3
|
* Determines if an input is a valid Prismic repository name.
|
|
4
4
|
*
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
const isRepositoryName = (input) => {
|
|
10
10
|
return /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
exports.isRepositoryName = isRepositoryName;
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=isRepositoryName.cjs.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/isRepositoryName.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Determines if an input is a valid Prismic repository name.
|
|
4
3
|
*
|
|
@@ -7,5 +6,4 @@
|
|
|
7
6
|
* otherwise.
|
|
8
7
|
*/
|
|
9
8
|
export declare const isRepositoryName: (input: string) => boolean;
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=isRepositoryName.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.d.cts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isRepositoryName.d.cts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;;;;;;qBAOa,mBAAgB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/isRepositoryName.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Determines if an input is a valid Prismic repository name.
|
|
4
3
|
*
|
|
@@ -7,5 +6,4 @@
|
|
|
7
6
|
* otherwise.
|
|
8
7
|
*/
|
|
9
8
|
export declare const isRepositoryName: (input: string) => boolean;
|
|
10
|
-
//#endregion
|
|
11
9
|
//# sourceMappingURL=isRepositoryName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.d.ts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isRepositoryName.d.ts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;;;;;;qBAOa,mBAAgB"}
|
package/dist/isRepositoryName.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/isRepositoryName.ts
|
|
2
2
|
/**
|
|
3
3
|
* Determines if an input is a valid Prismic repository name.
|
|
4
4
|
*
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
const isRepositoryName = (input) => {
|
|
10
10
|
return /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { isRepositoryName };
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=isRepositoryName.js.map
|
package/dist/lib/devMsg.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_package = require("../package.cjs");
|
|
2
|
-
|
|
2
|
+
// src/lib/devMsg.ts
|
|
3
3
|
/**
|
|
4
4
|
* Returns a `prismic.dev/msg` URL for a given message slug.
|
|
5
5
|
*
|
|
@@ -16,7 +16,6 @@ const require_package = require("../package.cjs");
|
|
|
16
16
|
const devMsg = (slug) => {
|
|
17
17
|
return `https://prismic.dev/msg/client/v${require_package.version}/${slug}`;
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
exports.devMsg = devMsg;
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=devMsg.cjs.map
|
package/dist/lib/devMsg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { version } from "../package.js";
|
|
2
|
-
|
|
2
|
+
// src/lib/devMsg.ts
|
|
3
3
|
/**
|
|
4
4
|
* Returns a `prismic.dev/msg` URL for a given message slug.
|
|
5
5
|
*
|
|
@@ -16,7 +16,6 @@ import { version } from "../package.js";
|
|
|
16
16
|
const devMsg = (slug) => {
|
|
17
17
|
return `https://prismic.dev/msg/client/v${version}/${slug}`;
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { devMsg };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=devMsg.js.map
|
package/dist/lib/escapeHTML.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/escapeHTML.ts
|
|
2
2
|
const matchHtmlRegExp = /["'&<>]/;
|
|
3
3
|
const escapeHTML = (string) => {
|
|
4
4
|
const str = "" + string;
|
|
@@ -33,7 +33,6 @@ const escapeHTML = (string) => {
|
|
|
33
33
|
}
|
|
34
34
|
return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
exports.escapeHTML = escapeHTML;
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=escapeHTML.cjs.map
|
package/dist/lib/escapeHTML.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/escapeHTML.ts
|
|
2
2
|
const matchHtmlRegExp = /["'&<>]/;
|
|
3
3
|
const escapeHTML = (string) => {
|
|
4
4
|
const str = "" + string;
|
|
@@ -33,7 +33,6 @@ const escapeHTML = (string) => {
|
|
|
33
33
|
}
|
|
34
34
|
return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { escapeHTML };
|
|
38
37
|
|
|
39
38
|
//# sourceMappingURL=escapeHTML.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/getOptionalLinkProperties.ts
|
|
2
2
|
/**
|
|
3
3
|
* Returns optional properties only available to link fields. Link fields can have the same shape as
|
|
4
4
|
* content relationship and link to media fields, requiring special treatment to extract
|
|
@@ -14,7 +14,6 @@ const getOptionalLinkProperties = (input) => {
|
|
|
14
14
|
if ("variant" in input) res.variant = input.variant;
|
|
15
15
|
return res;
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
exports.getOptionalLinkProperties = getOptionalLinkProperties;
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=getOptionalLinkProperties.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/getOptionalLinkProperties.ts
|
|
2
2
|
/**
|
|
3
3
|
* Returns optional properties only available to link fields. Link fields can have the same shape as
|
|
4
4
|
* content relationship and link to media fields, requiring special treatment to extract
|
|
@@ -14,7 +14,6 @@ const getOptionalLinkProperties = (input) => {
|
|
|
14
14
|
if ("variant" in input) res.variant = input.variant;
|
|
15
15
|
return res;
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { getOptionalLinkProperties };
|
|
19
18
|
|
|
20
19
|
//# sourceMappingURL=getOptionalLinkProperties.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("../cookie.cjs");
|
|
2
|
-
|
|
2
|
+
// src/lib/getPreviewCookie.ts
|
|
3
3
|
const readValue = (value) => {
|
|
4
4
|
return value.replace(/%3B/g, ";");
|
|
5
5
|
};
|
|
@@ -21,7 +21,6 @@ const getPreviewCookie = (cookieJar) => {
|
|
|
21
21
|
}
|
|
22
22
|
return value;
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
exports.getPreviewCookie = getPreviewCookie;
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=getPreviewCookie.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../cookie.js";
|
|
2
|
-
|
|
2
|
+
// src/lib/getPreviewCookie.ts
|
|
3
3
|
const readValue = (value) => {
|
|
4
4
|
return value.replace(/%3B/g, ";");
|
|
5
5
|
};
|
|
@@ -21,7 +21,6 @@ const getPreviewCookie = (cookieJar) => {
|
|
|
21
21
|
}
|
|
22
22
|
return value;
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { getPreviewCookie };
|
|
26
25
|
|
|
27
26
|
//# sourceMappingURL=getPreviewCookie.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/isInternalURL.ts
|
|
2
2
|
/**
|
|
3
3
|
* Determines if a URL is internal or external.
|
|
4
4
|
*
|
|
@@ -10,7 +10,6 @@ const isInternalURL = (url) => {
|
|
|
10
10
|
const isSpecialLink = !isInternal && !/^https?:\/\//.test(url);
|
|
11
11
|
return isInternal && !isSpecialLink;
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
exports.isInternalURL = isInternalURL;
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=isInternalURL.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/isInternalURL.ts
|
|
2
2
|
/**
|
|
3
3
|
* Determines if a URL is internal or external.
|
|
4
4
|
*
|
|
@@ -10,7 +10,6 @@ const isInternalURL = (url) => {
|
|
|
10
10
|
const isSpecialLink = !isInternal && !/^https?:\/\//.test(url);
|
|
11
11
|
return isInternal && !isSpecialLink;
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { isInternalURL };
|
|
15
14
|
|
|
16
15
|
//# sourceMappingURL=isInternalURL.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_richText = require("../types/value/richText.cjs");
|
|
2
|
-
const require_link = require("../types/value/link.cjs");
|
|
3
1
|
const require_Asset = require("../types/migration/Asset.cjs");
|
|
4
2
|
const require_Document = require("../types/migration/Document.cjs");
|
|
3
|
+
const require_link = require("../types/value/link.cjs");
|
|
4
|
+
const require_richText = require("../types/value/richText.cjs");
|
|
5
5
|
const require_isValue = require("./isValue.cjs");
|
|
6
|
-
|
|
6
|
+
// src/lib/isMigrationValue.ts
|
|
7
7
|
/**
|
|
8
8
|
* Checks if a value is a migration content relationship field.
|
|
9
9
|
*
|
|
@@ -57,7 +57,6 @@ const linkToMedia = (value) => {
|
|
|
57
57
|
const rtImageNode = (value) => {
|
|
58
58
|
return typeof value === "object" && value !== null && "id" in value && value.id instanceof require_Asset.PrismicMigrationAsset && "type" in value && value.type === require_richText.RichTextNodeType.image;
|
|
59
59
|
};
|
|
60
|
-
//#endregion
|
|
61
60
|
exports.contentRelationship = contentRelationship;
|
|
62
61
|
exports.image = image;
|
|
63
62
|
exports.linkToMedia = linkToMedia;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { RichTextNodeType } from "../types/value/richText.js";
|
|
2
|
-
import { LinkType } from "../types/value/link.js";
|
|
3
1
|
import { PrismicMigrationAsset } from "../types/migration/Asset.js";
|
|
4
2
|
import { PrismicMigrationDocument } from "../types/migration/Document.js";
|
|
3
|
+
import { LinkType } from "../types/value/link.js";
|
|
4
|
+
import { RichTextNodeType } from "../types/value/richText.js";
|
|
5
5
|
import { prismicDocument } from "./isValue.js";
|
|
6
|
-
|
|
6
|
+
// src/lib/isMigrationValue.ts
|
|
7
7
|
/**
|
|
8
8
|
* Checks if a value is a migration content relationship field.
|
|
9
9
|
*
|
|
@@ -57,7 +57,6 @@ const linkToMedia = (value) => {
|
|
|
57
57
|
const rtImageNode = (value) => {
|
|
58
58
|
return typeof value === "object" && value !== null && "id" in value && value.id instanceof PrismicMigrationAsset && "type" in value && value.type === RichTextNodeType.image;
|
|
59
59
|
};
|
|
60
|
-
//#endregion
|
|
61
60
|
export { contentRelationship, image, linkToMedia, rtImageNode };
|
|
62
61
|
|
|
63
62
|
//# sourceMappingURL=isMigrationValue.js.map
|
package/dist/lib/isValue.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_richText = require("../types/value/richText.cjs");
|
|
2
1
|
const require_link = require("../types/value/link.cjs");
|
|
3
|
-
|
|
2
|
+
const require_richText = require("../types/value/richText.cjs");
|
|
3
|
+
// src/lib/isValue.ts
|
|
4
4
|
/**
|
|
5
5
|
* Checks if a value is a link to media field.
|
|
6
6
|
*
|
|
@@ -85,7 +85,6 @@ const prismicDocument = (value) => {
|
|
|
85
85
|
return false;
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
//#endregion
|
|
89
88
|
exports.filledContentRelationship = filledContentRelationship;
|
|
90
89
|
exports.filledImage = filledImage;
|
|
91
90
|
exports.filledLinkToMedia = filledLinkToMedia;
|
package/dist/lib/isValue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RichTextNodeType } from "../types/value/richText.js";
|
|
2
1
|
import { LinkType } from "../types/value/link.js";
|
|
3
|
-
|
|
2
|
+
import { RichTextNodeType } from "../types/value/richText.js";
|
|
3
|
+
// src/lib/isValue.ts
|
|
4
4
|
/**
|
|
5
5
|
* Checks if a value is a link to media field.
|
|
6
6
|
*
|
|
@@ -85,7 +85,6 @@ const prismicDocument = (value) => {
|
|
|
85
85
|
return false;
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
//#endregion
|
|
89
88
|
export { filledContentRelationship, filledImage, filledLinkToMedia, prismicDocument, rtImageNode };
|
|
90
89
|
|
|
91
90
|
//# sourceMappingURL=isValue.js.map
|
package/dist/lib/pLimit.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/pLimit.ts
|
|
2
2
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
3
3
|
/**
|
|
4
4
|
* Creates a limiting function that will only execute one promise at a time and respect a given
|
|
@@ -11,7 +11,7 @@ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
|
11
11
|
const pLimit = ({ interval } = {}) => {
|
|
12
12
|
const queue = [];
|
|
13
13
|
let busy = false;
|
|
14
|
-
let lastCompletion =
|
|
14
|
+
let lastCompletion = -Infinity;
|
|
15
15
|
const resumeNext = () => {
|
|
16
16
|
if (!busy && queue.length > 0) {
|
|
17
17
|
queue.shift()?.();
|
|
@@ -23,14 +23,14 @@ const pLimit = ({ interval } = {}) => {
|
|
|
23
23
|
resumeNext();
|
|
24
24
|
};
|
|
25
25
|
const run = async (function_, resolve, arguments_) => {
|
|
26
|
-
const timeSinceLastCompletion =
|
|
26
|
+
const timeSinceLastCompletion = performance.now() - lastCompletion;
|
|
27
27
|
if (interval && timeSinceLastCompletion < interval) await sleep(interval - timeSinceLastCompletion);
|
|
28
28
|
const result = (async () => function_(...arguments_))();
|
|
29
29
|
resolve(result);
|
|
30
30
|
try {
|
|
31
31
|
await result;
|
|
32
32
|
} catch {}
|
|
33
|
-
lastCompletion =
|
|
33
|
+
lastCompletion = performance.now();
|
|
34
34
|
next();
|
|
35
35
|
};
|
|
36
36
|
const enqueue = (function_, resolve, arguments_) => {
|
|
@@ -46,7 +46,6 @@ const pLimit = ({ interval } = {}) => {
|
|
|
46
46
|
enqueue(function_, resolve, arguments_);
|
|
47
47
|
}));
|
|
48
48
|
};
|
|
49
|
-
//#endregion
|
|
50
49
|
exports.pLimit = pLimit;
|
|
51
50
|
|
|
52
51
|
//# sourceMappingURL=pLimit.cjs.map
|
package/dist/lib/pLimit.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pLimit.cjs","names":[],"sources":["../../src/lib/pLimit.ts"],"sourcesContent":["/*\n ** Core logic from https://github.com/sindresorhus/p-limit\n ** Many thanks to @sindresorhus\n */\n\n// oxlint-disable-next-line no-explicit-any\ntype AnyFunction = (...arguments_: readonly any[]) => unknown\n\nconst sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))\n\n/**\n * @param fn - Promise-returning/async function.\n * @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the\n * `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't\n * need this optimization unless you're pushing a lot of functions.\n * @returns The promise returned by calling `fn(...arguments)`.\n */\nexport type LimitFunction = <TArguments extends unknown[], TReturnType>(\n\tfunction_: (...arguments_: TArguments) => PromiseLike<TReturnType> | TReturnType,\n\t...arguments_: TArguments\n) => Promise<TReturnType>\n\n/**\n * Creates a limiting function that will only execute one promise at a time and respect a given\n * interval between each call.\n *\n * @param args - Options for the function, `interval` is the minimum time to wait between each\n * promise execution.\n * @returns A limiting function as per configuration, see {@link LimitFunction}.\n */\nexport const pLimit = ({ interval }: { interval?: number } = {}): LimitFunction => {\n\tconst queue: AnyFunction[] = []\n\tlet busy = false\n\tlet lastCompletion =
|
|
1
|
+
{"version":3,"file":"pLimit.cjs","names":[],"sources":["../../src/lib/pLimit.ts"],"sourcesContent":["/*\n ** Core logic from https://github.com/sindresorhus/p-limit\n ** Many thanks to @sindresorhus\n */\n\n// oxlint-disable-next-line no-explicit-any\ntype AnyFunction = (...arguments_: readonly any[]) => unknown\n\nconst sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))\n\n/**\n * @param fn - Promise-returning/async function.\n * @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the\n * `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't\n * need this optimization unless you're pushing a lot of functions.\n * @returns The promise returned by calling `fn(...arguments)`.\n */\nexport type LimitFunction = <TArguments extends unknown[], TReturnType>(\n\tfunction_: (...arguments_: TArguments) => PromiseLike<TReturnType> | TReturnType,\n\t...arguments_: TArguments\n) => Promise<TReturnType>\n\n/**\n * Creates a limiting function that will only execute one promise at a time and respect a given\n * interval between each call.\n *\n * @param args - Options for the function, `interval` is the minimum time to wait between each\n * promise execution.\n * @returns A limiting function as per configuration, see {@link LimitFunction}.\n */\nexport const pLimit = ({ interval }: { interval?: number } = {}): LimitFunction => {\n\tconst queue: AnyFunction[] = []\n\tlet busy = false\n\tlet lastCompletion = -Infinity\n\n\tconst resumeNext = () => {\n\t\tif (!busy && queue.length > 0) {\n\t\t\tqueue.shift()?.()\n\t\t\tbusy = true\n\t\t}\n\t}\n\n\tconst next = () => {\n\t\tbusy = false\n\n\t\tresumeNext()\n\t}\n\n\tconst run = async (\n\t\tfunction_: AnyFunction,\n\t\tresolve: (value: unknown) => void,\n\t\targuments_: unknown[],\n\t) => {\n\t\tconst timeSinceLastCompletion = performance.now() - lastCompletion\n\n\t\tif (interval && timeSinceLastCompletion < interval) {\n\t\t\tawait sleep(interval - timeSinceLastCompletion)\n\t\t}\n\t\tconst result = (async () => function_(...arguments_))()\n\n\t\tresolve(result)\n\n\t\ttry {\n\t\t\tawait result\n\t\t} catch {}\n\n\t\tlastCompletion = performance.now()\n\n\t\tnext()\n\t}\n\n\tconst enqueue = (\n\t\tfunction_: AnyFunction,\n\t\tresolve: (value: unknown) => void,\n\t\targuments_: unknown[],\n\t) => {\n\t\t// Queue `internalResolve` instead of the `run` function\n\t\t// to preserve asynchronous context.\n\t\tnew Promise((internalResolve) => {\n\t\t\tqueue.push(internalResolve)\n\t\t}).then(run.bind(undefined, function_, resolve, arguments_))\n\t\t;(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// after the `internalResolve` function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve()\n\n\t\t\tif (!busy) {\n\t\t\t\tresumeNext()\n\t\t\t}\n\t\t})()\n\t}\n\n\treturn ((function_: AnyFunction, ...arguments_: unknown[]) =>\n\t\tnew Promise<unknown>((resolve) => {\n\t\t\tenqueue(function_, resolve, arguments_)\n\t\t})) as LimitFunction\n}\n"],"mappings":";AAQA,MAAM,SAAS,OAAe,IAAI,SAAS,YAAY,WAAW,SAAS,EAAE,CAAC;;;;;;;;;AAsB9E,MAAa,UAAU,EAAE,aAAoC,CAAC,MAAqB;CAClF,MAAM,QAAuB,CAAC;CAC9B,IAAI,OAAO;CACX,IAAI,iBAAiB;CAErB,MAAM,mBAAmB;EACxB,IAAI,CAAC,QAAQ,MAAM,SAAS,GAAG;GAC9B,MAAM,MAAM,CAAC,GAAG;GAChB,OAAO;EACR;CACD;CAEA,MAAM,aAAa;EAClB,OAAO;EAEP,WAAW;CACZ;CAEA,MAAM,MAAM,OACX,WACA,SACA,eACI;EACJ,MAAM,0BAA0B,YAAY,IAAI,IAAI;EAEpD,IAAI,YAAY,0BAA0B,UACzC,MAAM,MAAM,WAAW,uBAAuB;EAE/C,MAAM,UAAU,YAAY,UAAU,GAAG,UAAU,EAAA,CAAG;EAEtD,QAAQ,MAAM;EAEd,IAAI;GACH,MAAM;EACP,QAAQ,CAAC;EAET,iBAAiB,YAAY,IAAI;EAEjC,KAAK;CACN;CAEA,MAAM,WACL,WACA,SACA,eACI;EAGJ,IAAI,SAAS,oBAAoB;GAChC,MAAM,KAAK,eAAe;EAC3B,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAA,GAAW,WAAW,SAAS,UAAU,CAAC;EAC1D,CAAC,YAAY;GAKb,MAAM,QAAQ,QAAQ;GAEtB,IAAI,CAAC,MACJ,WAAW;EAEb,EAAA,CAAG;CACJ;CAEA,SAAS,WAAwB,GAAG,eACnC,IAAI,SAAkB,YAAY;EACjC,QAAQ,WAAW,SAAS,UAAU;CACvC,CAAC;AACH"}
|
package/dist/lib/pLimit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/lib/pLimit.ts
|
|
2
2
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
3
3
|
/**
|
|
4
4
|
* Creates a limiting function that will only execute one promise at a time and respect a given
|
|
@@ -11,7 +11,7 @@ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
|
11
11
|
const pLimit = ({ interval } = {}) => {
|
|
12
12
|
const queue = [];
|
|
13
13
|
let busy = false;
|
|
14
|
-
let lastCompletion =
|
|
14
|
+
let lastCompletion = -Infinity;
|
|
15
15
|
const resumeNext = () => {
|
|
16
16
|
if (!busy && queue.length > 0) {
|
|
17
17
|
queue.shift()?.();
|
|
@@ -23,14 +23,14 @@ const pLimit = ({ interval } = {}) => {
|
|
|
23
23
|
resumeNext();
|
|
24
24
|
};
|
|
25
25
|
const run = async (function_, resolve, arguments_) => {
|
|
26
|
-
const timeSinceLastCompletion =
|
|
26
|
+
const timeSinceLastCompletion = performance.now() - lastCompletion;
|
|
27
27
|
if (interval && timeSinceLastCompletion < interval) await sleep(interval - timeSinceLastCompletion);
|
|
28
28
|
const result = (async () => function_(...arguments_))();
|
|
29
29
|
resolve(result);
|
|
30
30
|
try {
|
|
31
31
|
await result;
|
|
32
32
|
} catch {}
|
|
33
|
-
lastCompletion =
|
|
33
|
+
lastCompletion = performance.now();
|
|
34
34
|
next();
|
|
35
35
|
};
|
|
36
36
|
const enqueue = (function_, resolve, arguments_) => {
|
|
@@ -46,7 +46,6 @@ const pLimit = ({ interval } = {}) => {
|
|
|
46
46
|
enqueue(function_, resolve, arguments_);
|
|
47
47
|
}));
|
|
48
48
|
};
|
|
49
|
-
//#endregion
|
|
50
49
|
export { pLimit };
|
|
51
50
|
|
|
52
51
|
//# sourceMappingURL=pLimit.js.map
|
package/dist/lib/pLimit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pLimit.js","names":[],"sources":["../../src/lib/pLimit.ts"],"sourcesContent":["/*\n ** Core logic from https://github.com/sindresorhus/p-limit\n ** Many thanks to @sindresorhus\n */\n\n// oxlint-disable-next-line no-explicit-any\ntype AnyFunction = (...arguments_: readonly any[]) => unknown\n\nconst sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))\n\n/**\n * @param fn - Promise-returning/async function.\n * @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the\n * `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't\n * need this optimization unless you're pushing a lot of functions.\n * @returns The promise returned by calling `fn(...arguments)`.\n */\nexport type LimitFunction = <TArguments extends unknown[], TReturnType>(\n\tfunction_: (...arguments_: TArguments) => PromiseLike<TReturnType> | TReturnType,\n\t...arguments_: TArguments\n) => Promise<TReturnType>\n\n/**\n * Creates a limiting function that will only execute one promise at a time and respect a given\n * interval between each call.\n *\n * @param args - Options for the function, `interval` is the minimum time to wait between each\n * promise execution.\n * @returns A limiting function as per configuration, see {@link LimitFunction}.\n */\nexport const pLimit = ({ interval }: { interval?: number } = {}): LimitFunction => {\n\tconst queue: AnyFunction[] = []\n\tlet busy = false\n\tlet lastCompletion =
|
|
1
|
+
{"version":3,"file":"pLimit.js","names":[],"sources":["../../src/lib/pLimit.ts"],"sourcesContent":["/*\n ** Core logic from https://github.com/sindresorhus/p-limit\n ** Many thanks to @sindresorhus\n */\n\n// oxlint-disable-next-line no-explicit-any\ntype AnyFunction = (...arguments_: readonly any[]) => unknown\n\nconst sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))\n\n/**\n * @param fn - Promise-returning/async function.\n * @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the\n * `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't\n * need this optimization unless you're pushing a lot of functions.\n * @returns The promise returned by calling `fn(...arguments)`.\n */\nexport type LimitFunction = <TArguments extends unknown[], TReturnType>(\n\tfunction_: (...arguments_: TArguments) => PromiseLike<TReturnType> | TReturnType,\n\t...arguments_: TArguments\n) => Promise<TReturnType>\n\n/**\n * Creates a limiting function that will only execute one promise at a time and respect a given\n * interval between each call.\n *\n * @param args - Options for the function, `interval` is the minimum time to wait between each\n * promise execution.\n * @returns A limiting function as per configuration, see {@link LimitFunction}.\n */\nexport const pLimit = ({ interval }: { interval?: number } = {}): LimitFunction => {\n\tconst queue: AnyFunction[] = []\n\tlet busy = false\n\tlet lastCompletion = -Infinity\n\n\tconst resumeNext = () => {\n\t\tif (!busy && queue.length > 0) {\n\t\t\tqueue.shift()?.()\n\t\t\tbusy = true\n\t\t}\n\t}\n\n\tconst next = () => {\n\t\tbusy = false\n\n\t\tresumeNext()\n\t}\n\n\tconst run = async (\n\t\tfunction_: AnyFunction,\n\t\tresolve: (value: unknown) => void,\n\t\targuments_: unknown[],\n\t) => {\n\t\tconst timeSinceLastCompletion = performance.now() - lastCompletion\n\n\t\tif (interval && timeSinceLastCompletion < interval) {\n\t\t\tawait sleep(interval - timeSinceLastCompletion)\n\t\t}\n\t\tconst result = (async () => function_(...arguments_))()\n\n\t\tresolve(result)\n\n\t\ttry {\n\t\t\tawait result\n\t\t} catch {}\n\n\t\tlastCompletion = performance.now()\n\n\t\tnext()\n\t}\n\n\tconst enqueue = (\n\t\tfunction_: AnyFunction,\n\t\tresolve: (value: unknown) => void,\n\t\targuments_: unknown[],\n\t) => {\n\t\t// Queue `internalResolve` instead of the `run` function\n\t\t// to preserve asynchronous context.\n\t\tnew Promise((internalResolve) => {\n\t\t\tqueue.push(internalResolve)\n\t\t}).then(run.bind(undefined, function_, resolve, arguments_))\n\t\t;(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// after the `internalResolve` function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve()\n\n\t\t\tif (!busy) {\n\t\t\t\tresumeNext()\n\t\t\t}\n\t\t})()\n\t}\n\n\treturn ((function_: AnyFunction, ...arguments_: unknown[]) =>\n\t\tnew Promise<unknown>((resolve) => {\n\t\t\tenqueue(function_, resolve, arguments_)\n\t\t})) as LimitFunction\n}\n"],"mappings":";AAQA,MAAM,SAAS,OAAe,IAAI,SAAS,YAAY,WAAW,SAAS,EAAE,CAAC;;;;;;;;;AAsB9E,MAAa,UAAU,EAAE,aAAoC,CAAC,MAAqB;CAClF,MAAM,QAAuB,CAAC;CAC9B,IAAI,OAAO;CACX,IAAI,iBAAiB;CAErB,MAAM,mBAAmB;EACxB,IAAI,CAAC,QAAQ,MAAM,SAAS,GAAG;GAC9B,MAAM,MAAM,CAAC,GAAG;GAChB,OAAO;EACR;CACD;CAEA,MAAM,aAAa;EAClB,OAAO;EAEP,WAAW;CACZ;CAEA,MAAM,MAAM,OACX,WACA,SACA,eACI;EACJ,MAAM,0BAA0B,YAAY,IAAI,IAAI;EAEpD,IAAI,YAAY,0BAA0B,UACzC,MAAM,MAAM,WAAW,uBAAuB;EAE/C,MAAM,UAAU,YAAY,UAAU,GAAG,UAAU,EAAA,CAAG;EAEtD,QAAQ,MAAM;EAEd,IAAI;GACH,MAAM;EACP,QAAQ,CAAC;EAET,iBAAiB,YAAY,IAAI;EAEjC,KAAK;CACN;CAEA,MAAM,WACL,WACA,SACA,eACI;EAGJ,IAAI,SAAS,oBAAoB;GAChC,MAAM,KAAK,eAAe;EAC3B,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAA,GAAW,WAAW,SAAS,UAAU,CAAC;EAC1D,CAAC,YAAY;GAKb,MAAM,QAAQ,QAAQ;GAEtB,IAAI,CAAC,MACJ,WAAW;EAEb,EAAA,CAAG;CACJ;CAEA,SAAS,WAAwB,GAAG,eACnC,IAAI,SAAkB,YAAY;EACjC,QAAQ,WAAW,SAAS,UAAU;CACvC,CAAC;AACH"}
|
package/dist/lib/request.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_pLimit = require("./pLimit.cjs");
|
|
2
|
-
|
|
2
|
+
// src/lib/request.ts
|
|
3
3
|
/**
|
|
4
4
|
* The default number of milliseconds to wait before retrying a rate-limited `fetch()` request (429
|
|
5
5
|
* response code). The default value is only used if the response does not include a `retry-after`
|
|
@@ -57,7 +57,6 @@ async function request(url, init, fetchFn) {
|
|
|
57
57
|
}
|
|
58
58
|
return response;
|
|
59
59
|
}
|
|
60
|
-
//#endregion
|
|
61
60
|
exports.DEFAULT_RETRY_AFTER = DEFAULT_RETRY_AFTER;
|
|
62
61
|
exports.request = request;
|
|
63
62
|
|
package/dist/lib/request.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/request.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* A universal API to make network requests. A subset of the `fetch()` API.
|
|
4
3
|
*
|
|
@@ -43,5 +42,4 @@ export interface ResponseLike {
|
|
|
43
42
|
export interface HeadersLike {
|
|
44
43
|
get(name: string): string | null;
|
|
45
44
|
}
|
|
46
|
-
//#endregion
|
|
47
45
|
//# sourceMappingURL=request.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.cts","names":[],"sources":["../../src/lib/request.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.cts","names":[],"sources":["../../src/lib/request.ts"],"mappings":";;;;;YAsBY,aAAa,eAAe,OAAO,oBAAoB,QAAQ;;;;;;YAY/D;;iBAQK,wBAAwB,KAAK;;EAE7C;;EAMA,aAAa;;EAGb,UAAU;;;;;;;EAWV,SAAS;;;iBAIO;EAChB;EACA;EACA,SAAS;EACT;EAEA,QAAQ;EACR,QAAQ;EACR,eAAe,QAAQ;EACvB,QAAQ,QAAQ;EAChB,SAAS;;;iBAIO;EAChB,IAAI"}
|
package/dist/lib/request.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/lib/request.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* A universal API to make network requests. A subset of the `fetch()` API.
|
|
4
3
|
*
|
|
@@ -43,5 +42,4 @@ export interface ResponseLike {
|
|
|
43
42
|
export interface HeadersLike {
|
|
44
43
|
get(name: string): string | null;
|
|
45
44
|
}
|
|
46
|
-
//#endregion
|
|
47
45
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","names":[],"sources":["../../src/lib/request.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"request.d.ts","names":[],"sources":["../../src/lib/request.ts"],"mappings":";;;;;YAsBY,aAAa,eAAe,OAAO,oBAAoB,QAAQ;;;;;;YAY/D;;iBAQK,wBAAwB,KAAK;;EAE7C;;EAMA,aAAa;;EAGb,UAAU;;;;;;;EAWV,SAAS;;;iBAIO;EAChB;EACA;EACA,SAAS;EACT;EAEA,QAAQ;EACR,QAAQ;EACR,eAAe,QAAQ;EACvB,QAAQ,QAAQ;EAChB,SAAS;;;iBAIO;EAChB,IAAI"}
|
package/dist/lib/request.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pLimit } from "./pLimit.js";
|
|
2
|
-
|
|
2
|
+
// src/lib/request.ts
|
|
3
3
|
/**
|
|
4
4
|
* The default number of milliseconds to wait before retrying a rate-limited `fetch()` request (429
|
|
5
5
|
* response code). The default value is only used if the response does not include a `retry-after`
|
|
@@ -57,7 +57,6 @@ async function request(url, init, fetchFn) {
|
|
|
57
57
|
}
|
|
58
58
|
return response;
|
|
59
59
|
}
|
|
60
|
-
//#endregion
|
|
61
60
|
export { DEFAULT_RETRY_AFTER, request };
|
|
62
61
|
|
|
63
62
|
//# sourceMappingURL=request.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_richText = require("../types/value/richText.cjs");
|
|
2
|
-
const require_link = require("../types/value/link.cjs");
|
|
3
1
|
const require_isFilled = require("../helpers/isFilled.cjs");
|
|
4
2
|
const require_Asset = require("../types/migration/Asset.cjs");
|
|
5
3
|
const require_Document = require("../types/migration/Document.cjs");
|
|
4
|
+
const require_link = require("../types/value/link.cjs");
|
|
5
|
+
const require_richText = require("../types/value/richText.cjs");
|
|
6
6
|
const require_getOptionalLinkProperties = require("./getOptionalLinkProperties.cjs");
|
|
7
7
|
const require_isMigrationValue = require("./isMigrationValue.cjs");
|
|
8
|
-
|
|
8
|
+
// src/lib/resolveMigrationDocumentData.ts
|
|
9
9
|
/**
|
|
10
10
|
* Resolves a migration content relationship to a content relationship field.
|
|
11
11
|
*
|
|
@@ -140,7 +140,6 @@ async function resolveMigrationDocumentData(input, migration) {
|
|
|
140
140
|
}
|
|
141
141
|
return input;
|
|
142
142
|
}
|
|
143
|
-
//#endregion
|
|
144
143
|
exports.resolveMigrationContentRelationship = resolveMigrationContentRelationship;
|
|
145
144
|
exports.resolveMigrationDocumentData = resolveMigrationDocumentData;
|
|
146
145
|
exports.resolveMigrationImage = resolveMigrationImage;
|