diff --git a/package-lock.json b/package-lock.json index 08d2f1656..a46023031 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45,7 +45,7 @@ "ts-jest": "29.0.5", "ts-node": "^10.9.1", "tslib": "^2.4.0", - "typedoc": "^0.23.28", + "typedoc": "^0.24.6", "typescript": "^5.0.2" }, "engines": { @@ -11433,14 +11433,14 @@ } }, "node_modules/typedoc": { - "version": "0.23.28", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", - "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", + "version": "0.24.6", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.6.tgz", + "integrity": "sha512-c3y3h45xJv3qYwKDAwU6Cl+26CjT0ZvblHzfHJ+SjQDM4p1mZxtgHky4lhmG0+nNarRht8kADfZlbspJWdZarQ==", "dev": true, "dependencies": { "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", + "marked": "^4.3.0", + "minimatch": "^9.0.0", "shiki": "^0.14.1" }, "bin": { @@ -11463,15 +11463,15 @@ } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.2.tgz", - "integrity": "sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", + "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -20891,14 +20891,14 @@ } }, "typedoc": { - "version": "0.23.28", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", - "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", + "version": "0.24.6", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.24.6.tgz", + "integrity": "sha512-c3y3h45xJv3qYwKDAwU6Cl+26CjT0ZvblHzfHJ+SjQDM4p1mZxtgHky4lhmG0+nNarRht8kADfZlbspJWdZarQ==", "dev": true, "requires": { "lunr": "^2.3.9", - "marked": "^4.2.12", - "minimatch": "^7.1.3", + "marked": "^4.3.0", + "minimatch": "^9.0.0", "shiki": "^0.14.1" }, "dependencies": { @@ -20912,9 +20912,9 @@ } }, "minimatch": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.2.tgz", - "integrity": "sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", + "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==", "dev": true, "requires": { "brace-expansion": "^2.0.1" diff --git a/package.json b/package.json index 2930951be..902b72904 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "ts-jest": "29.0.5", "ts-node": "^10.9.1", "tslib": "^2.4.0", - "typedoc": "^0.23.28", + "typedoc": "^0.24.6", "typescript": "^5.0.2" } } diff --git a/packages/api-client-utils/src/index.ts b/packages/api-client-utils/src/index.ts index 1207ab85f..9615590fd 100644 --- a/packages/api-client-utils/src/index.ts +++ b/packages/api-client-utils/src/index.ts @@ -15,6 +15,7 @@ export { ContentInfo } from './types/ContentInfo' export { ImageInfo } from './types/ImageInfo' export { Metadata } from './types/Metadata' export { VideoInfo } from './types/VideoInfo' +export { StoreValue } from './types/StoreValue' export { onCancel } from './onCancel' export { CancelError } from './CancelError' export { poll } from './poll' diff --git a/packages/api-client-utils/src/types/StoreValue.ts b/packages/api-client-utils/src/types/StoreValue.ts new file mode 100644 index 000000000..8b455fc34 --- /dev/null +++ b/packages/api-client-utils/src/types/StoreValue.ts @@ -0,0 +1 @@ +export type StoreValue = 'auto' | boolean diff --git a/packages/rest-client/src/index.ts b/packages/rest-client/src/index.ts index 4df05e9f0..9c10c1cae 100644 --- a/packages/rest-client/src/index.ts +++ b/packages/rest-client/src/index.ts @@ -27,7 +27,7 @@ export { Problems } from './types/Problems' export { ServerErrorResponse } from './types/ServerErrorResponse' export { Webhook } from './types/Webhook' export { WebhookEvent } from './types/WebhookEvent' -export { StoreValue } from './types/StoreValue' +export { StoreValue } from '@uploadcare/api-client-utils' export { Paginatable } from './types/Paginatable' export { Md5Function } from './lib/md5/Md5Function' export { ConversionOptions } from './types/ConversionOptions' diff --git a/packages/rest-client/src/tools/storeValueToString.ts b/packages/rest-client/src/tools/storeValueToString.ts index 4b1be6fd5..9c2439df4 100644 --- a/packages/rest-client/src/tools/storeValueToString.ts +++ b/packages/rest-client/src/tools/storeValueToString.ts @@ -1,4 +1,4 @@ -import { StoreValue } from '../types/StoreValue' +import { StoreValue } from '@uploadcare/api-client-utils' import { RestClientError } from './RestClientError' export const storeValueToString = (store?: StoreValue): string | undefined => { diff --git a/packages/rest-client/src/types/ConversionOptions.ts b/packages/rest-client/src/types/ConversionOptions.ts index e7d556fce..45d27b39f 100644 --- a/packages/rest-client/src/types/ConversionOptions.ts +++ b/packages/rest-client/src/types/ConversionOptions.ts @@ -1,5 +1,5 @@ import { ConversionType } from './ConversionType' -import { StoreValue } from './StoreValue' +import { StoreValue } from '@uploadcare/api-client-utils' import { ValueOf } from './ValueOf' export type ConversionOptions> = { diff --git a/packages/rest-client/src/types/StoreValue.ts b/packages/rest-client/src/types/StoreValue.ts deleted file mode 100644 index 6cfccbdd9..000000000 --- a/packages/rest-client/src/types/StoreValue.ts +++ /dev/null @@ -1 +0,0 @@ -export type StoreValue = boolean | 'auto' diff --git a/packages/upload-client/src/api/base.ts b/packages/upload-client/src/api/base.ts index e68d01312..84f23e6e5 100644 --- a/packages/upload-client/src/api/base.ts +++ b/packages/upload-client/src/api/base.ts @@ -1,7 +1,8 @@ import { camelizeKeys, CustomUserAgent, - Metadata + Metadata, + StoreValue } from '@uploadcare/api-client-utils' import { defaultSettings } from '../defaultSettings' import request from '../request/request.node' @@ -16,7 +17,7 @@ import { FailedResponse } from '../request/types' import { getContentType } from '../tools/getContentType' import { getFileName } from '../tools/getFileName' import { getStoreValue } from '../tools/getStoreValue' -import { StoreValue, SupportedFileInput } from '../types' +import { SupportedFileInput } from '../types' import { ProgressCallback, Uuid } from './types' export type BaseResponse = { diff --git a/packages/upload-client/src/api/fromUrl.ts b/packages/upload-client/src/api/fromUrl.ts index cdd543dfe..6f1777d71 100644 --- a/packages/upload-client/src/api/fromUrl.ts +++ b/packages/upload-client/src/api/fromUrl.ts @@ -3,7 +3,8 @@ import { FailedResponse } from '../request/types' import { CustomUserAgent, camelizeKeys, - Metadata + Metadata, + StoreValue } from '@uploadcare/api-client-utils' import request from '../request/request.node' @@ -14,7 +15,6 @@ import { getUserAgent } from '../tools/getUserAgent' import { UploadClientError } from '../tools/errors' import { retryIfFailed } from '../tools/retryIfFailed' import { getStoreValue } from '../tools/getStoreValue' -import { StoreValue } from '../types' export enum TypeEnum { Token = 'token', diff --git a/packages/upload-client/src/api/multipartStart.ts b/packages/upload-client/src/api/multipartStart.ts index b7e493a37..4db02eb34 100644 --- a/packages/upload-client/src/api/multipartStart.ts +++ b/packages/upload-client/src/api/multipartStart.ts @@ -3,7 +3,8 @@ import { Uuid } from './types' import { CustomUserAgent, camelizeKeys, - Metadata + Metadata, + StoreValue } from '@uploadcare/api-client-utils' import request from '../request/request.node' @@ -18,7 +19,6 @@ import { getUserAgent } from '../tools/getUserAgent' import { retryIfFailed } from '../tools/retryIfFailed' import { UploadClientError } from '../tools/errors' import { getStoreValue } from '../tools/getStoreValue' -import { StoreValue } from '../types' export type MultipartStartOptions = { publicKey: string diff --git a/packages/upload-client/src/index.ts b/packages/upload-client/src/index.ts index 2dd00a534..8288b42c7 100644 --- a/packages/upload-client/src/index.ts +++ b/packages/upload-client/src/index.ts @@ -87,7 +87,8 @@ export { Settings, SupportedFileInput as SupportedFileInput } from './types' export { NodeFile as NodeFile, BrowserFile as BrowserFile, - ReactNativeAsset + ReactNativeAsset, + Sliceable } from './types' export { FileInfo, diff --git a/packages/upload-client/src/tools/getStoreValue.ts b/packages/upload-client/src/tools/getStoreValue.ts index 82c41a8e8..7a0a727cf 100644 --- a/packages/upload-client/src/tools/getStoreValue.ts +++ b/packages/upload-client/src/tools/getStoreValue.ts @@ -1,4 +1,4 @@ -import { StoreValue } from '../types' +import { StoreValue } from '@uploadcare/api-client-utils' export function getStoreValue(store?: StoreValue): 'auto' | '0' | '1' { if (typeof store === 'undefined' || store === 'auto') { diff --git a/packages/upload-client/src/types.ts b/packages/upload-client/src/types.ts index 969a9cf08..66fdcf30d 100644 --- a/packages/upload-client/src/types.ts +++ b/packages/upload-client/src/types.ts @@ -1,6 +1,4 @@ -import { CustomUserAgent } from '@uploadcare/api-client-utils' - -export type StoreValue = 'auto' | boolean +import { CustomUserAgent, StoreValue } from '@uploadcare/api-client-utils' export interface DefaultSettings { baseCDN: string diff --git a/packages/upload-client/src/uploadFile/uploadDirect.ts b/packages/upload-client/src/uploadFile/uploadDirect.ts index 61008c172..5ac08ccaf 100644 --- a/packages/upload-client/src/uploadFile/uploadDirect.ts +++ b/packages/upload-client/src/uploadFile/uploadDirect.ts @@ -2,9 +2,13 @@ import base from '../api/base' import { isReadyPoll } from '../tools/isReadyPoll' import { UploadcareFile } from '../tools/UploadcareFile' -import { CustomUserAgent, Metadata } from '@uploadcare/api-client-utils' +import { + CustomUserAgent, + Metadata, + StoreValue +} from '@uploadcare/api-client-utils' import { ProgressCallback } from '../api/types' -import { StoreValue, SupportedFileInput } from '../types' +import { SupportedFileInput } from '../types' export type DirectOptions = { publicKey: string diff --git a/packages/upload-client/src/uploadFile/uploadFile.ts b/packages/upload-client/src/uploadFile/uploadFile.ts index d6fcdeba8..a56985d7e 100644 --- a/packages/upload-client/src/uploadFile/uploadFile.ts +++ b/packages/upload-client/src/uploadFile/uploadFile.ts @@ -10,9 +10,10 @@ import { getFileSize } from '../tools/getFileSize' import { isFileData } from '../tools/isFileData' import { isMultipart } from '../tools/isMultipart' import { UploadcareFile } from '../tools/UploadcareFile' -import { StoreValue, SupportedFileInput } from '../types' +import { SupportedFileInput } from '../types' import { isUrl, isUuid } from './types' import { uploadMultipart } from './uploadMultipart' +import { StoreValue } from '@uploadcare/api-client-utils' export type FileFromOptions = { publicKey: string diff --git a/packages/upload-client/src/uploadFile/uploadMultipart.ts b/packages/upload-client/src/uploadFile/uploadMultipart.ts index b3845412c..03d1ec06e 100644 --- a/packages/upload-client/src/uploadFile/uploadMultipart.ts +++ b/packages/upload-client/src/uploadFile/uploadMultipart.ts @@ -1,4 +1,8 @@ -import { CustomUserAgent, Metadata } from '@uploadcare/api-client-utils' +import { + CustomUserAgent, + Metadata, + StoreValue +} from '@uploadcare/api-client-utils' import multipartComplete from '../api/multipartComplete' import multipartStart from '../api/multipartStart' import multipartUpload, { @@ -19,7 +23,7 @@ import { import { getContentType } from '../tools/getContentType' import { getFileName } from '../tools/getFileName' import { getFileSize } from '../tools/getFileSize' -import { StoreValue, SupportedFileInput } from '../types' +import { SupportedFileInput } from '../types' export type MultipartOptions = { publicKey: string diff --git a/tsconfig.typedoc.json b/tsconfig.typedoc.json index 2bf6509af..02d5ff261 100644 --- a/tsconfig.typedoc.json +++ b/tsconfig.typedoc.json @@ -1,4 +1,4 @@ { "extends": "./tsconfig.json", - "exclude": ["node_modules", "**/*.test.ts"], + "exclude": ["node_modules", "**/*.test.ts", "**/test/_**"], }