diff --git a/packages/api-client-utils/package.json b/packages/api-client-utils/package.json index 8e7b9c158..35f11b635 100644 --- a/packages/api-client-utils/package.json +++ b/packages/api-client-utils/package.json @@ -5,7 +5,7 @@ "main": "dist/index.browser.js", "module": "dist/index.browser.js", "browser": "dist/index.browser.js", - "types": "dist/types.d.ts", + "types": "dist/index.d.ts", "sideEffects": false, "files": [ "dist/*" @@ -15,7 +15,7 @@ "test": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js", "prebuild": "npm run clean", "build": "npm run build:types && npm run build:compile", - "build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/types.d.ts src/index.ts", + "build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/index.d.ts src/index.ts", "build:compile": "rollup -c" }, "repository": { diff --git a/packages/rest-client/package.json b/packages/rest-client/package.json index 573aa6b63..fa8149c7a 100644 --- a/packages/rest-client/package.json +++ b/packages/rest-client/package.json @@ -5,20 +5,20 @@ "type": "module", "module": "./dist/index.node.js", "browser": "./dist/index.browser.js", - "types": "./dist/types.d.ts", + "types": "./dist/index.d.ts", "exports": { ".": { - "types": "./dist/types.d.ts", + "types": "./dist/index.d.ts", "node": "./dist/index.node.js", "browser": "./dist/index.browser.js", "default": "./dist/index.browser.js" }, "./browser": { - "types": "./dist/types.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.browser.js" }, "./node": { - "types": "./dist/types.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.node.js" } }, @@ -30,7 +30,7 @@ "test:production": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js", "prebuild": "npm run clean", "build": "npm run build:types && npm run build:compile", - "build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/types.d.ts src/index.ts", + "build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/index.d.ts src/index.ts", "build:compile": "rollup -c" }, "repository": { diff --git a/packages/rest-client/src/api/addons/addonExecutionStatus.test.ts b/packages/rest-client/src/api/addons/addonExecutionStatus.test.ts index 220943f88..9b7e2bfca 100644 --- a/packages/rest-client/src/api/addons/addonExecutionStatus.test.ts +++ b/packages/rest-client/src/api/addons/addonExecutionStatus.test.ts @@ -6,6 +6,7 @@ import { AddonName } from '../../types/AddonName' import { executeAddon } from './executeAddon' import { ADDONS_UUID } from '../../../test/fixtures' import { copyFileToLocalStorage } from '../file/copyFileToLocalStorage' +import { delay } from '@uploadcare/api-client-utils' describe('addonExecutionStatus', () => { it('should work', async () => { @@ -13,7 +14,7 @@ describe('addonExecutionStatus', () => { { source: ADDONS_UUID, store: false }, testSettings ) - + await delay(1000) const { requestId } = await executeAddon( { addonName: AddonName.AWS_REKOGNITION_DETECT_LABELS, @@ -21,7 +22,7 @@ describe('addonExecutionStatus', () => { }, testSettings ) - + await delay(1000) const response = await addonExecutionStatus( { addonName: AddonName.AWS_REKOGNITION_DETECT_LABELS, diff --git a/packages/rest-client/src/api/conversion/documentConversionJobStatus.test.ts b/packages/rest-client/src/api/conversion/documentConversionJobStatus.test.ts index 4dfe4089d..8c0e38ad9 100644 --- a/packages/rest-client/src/api/conversion/documentConversionJobStatus.test.ts +++ b/packages/rest-client/src/api/conversion/documentConversionJobStatus.test.ts @@ -31,13 +31,11 @@ describe('documentConversionJobStatus', () => { }, testSettings ) - expect( - [ - ConversionStatus.PENDING, - ConversionStatus.PROCESSING, - ConversionStatus.FINISHED - ].includes(response.status) - ).toBeTruthy() + expect([ + ConversionStatus.PENDING, + ConversionStatus.PROCESSING, + ConversionStatus.FINISHED + ]).toContain(response.status) }) it('should throw error if non-200 status received', async () => { diff --git a/packages/upload-client/package.json b/packages/upload-client/package.json index 212d87a75..14abe396b 100644 --- a/packages/upload-client/package.json +++ b/packages/upload-client/package.json @@ -5,24 +5,25 @@ "type": "module", "module": "./dist/index.node.js", "browser": "./dist/index.browser.js", - "types": "./dist/types.d.ts", + "react-native": "./dist/index.react-native.js", + "types": "./dist/index.d.ts", "exports": { ".": { - "types": "./dist/types.d.ts", + "types": "./dist/index.d.ts", "node": "./dist/index.node.js", "browser": "./dist/index.browser.js", "default": "./dist/index.browser.js" }, "./browser": { - "types": "./dist/types.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.browser.js" }, "./node": { - "types": "./dist/types.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.node.js" }, "./react-native": { - "types": "./dist/types.d.ts", + "types": "./dist/index.d.ts", "default": "./dist/index.react-native.js" } }, @@ -40,7 +41,7 @@ "test:jest": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js", "prebuild": "npm run clean", "build": "npm run build:types && npm run build:compile", - "build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/types.d.ts src/index.ts", + "build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/index.d.ts src/index.ts", "build:compile": "rollup -c" }, "repository": {