diff --git a/packages/auth/__tests__/providers/cognito/credentialsProvider/IdentityIdStore.test.ts b/packages/auth/__tests__/providers/cognito/credentialsProvider/IdentityIdStore.test.ts new file mode 100644 index 00000000000..94475367ec3 --- /dev/null +++ b/packages/auth/__tests__/providers/cognito/credentialsProvider/IdentityIdStore.test.ts @@ -0,0 +1,125 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import { Identity, ResourcesConfig } from '@aws-amplify/core'; + +import { DefaultIdentityIdStore } from '../../../../src/providers/cognito/credentialsProvider/IdentityIdStore'; + +const mockKeyValueStorage = { + setItem: jest.fn(), + getItem: jest.fn(), + removeItem: jest.fn(), + clear: jest.fn(), +}; + +const validAuthConfig: ResourcesConfig = { + Auth: { + Cognito: { + userPoolId: 'us-east-1_test-id', + identityPoolId: 'us-east-1:test-id', + userPoolClientId: 'test-id', + allowGuestAccess: true, + }, + }, +}; +const validAuthKey = { + identityId: `com.amplify.Cognito.${ + validAuthConfig.Auth!.Cognito!.identityPoolId + }.identityId`, +}; +const validGuestIdentityId: Identity = { type: 'guest', id: 'guest-id' }; +const validPrimaryIdentityId: Identity = { type: 'primary', id: 'primary-id' }; + +const noIdentityPoolIdAuthConfig: ResourcesConfig = { + Auth: { + Cognito: { + userPoolId: 'us-east-1_test-id', + userPoolClientId: 'test-id', + }, + }, +}; + +describe('DefaultIdentityIdStore', () => { + const defaultIdStore = new DefaultIdentityIdStore(mockKeyValueStorage); + beforeAll(() => { + defaultIdStore.setAuthConfig(validAuthConfig.Auth!); + }); + + afterEach(() => { + mockKeyValueStorage.setItem.mockClear(); + mockKeyValueStorage.getItem.mockClear(); + mockKeyValueStorage.removeItem.mockClear(); + mockKeyValueStorage.clear.mockClear(); + }); + + it('should set the Auth config required to form the storage keys', async () => { + expect(defaultIdStore._authKeys).toEqual(validAuthKey); + }); + + it('should store guest identityId in keyValueStorage', async () => { + defaultIdStore.storeIdentityId(validGuestIdentityId); + expect(mockKeyValueStorage.setItem).toHaveBeenCalledWith( + validAuthKey.identityId, + validGuestIdentityId.id, + ); + expect(defaultIdStore._primaryIdentityId).toBeUndefined(); + expect(defaultIdStore._hasGuestIdentityId).toBe(true); + }); + + it('should load guest identityId from keyValueStorage', async () => { + mockKeyValueStorage.getItem.mockReturnValue(validGuestIdentityId.id); + + expect(await defaultIdStore.loadIdentityId()).toEqual(validGuestIdentityId); + }); + + it('should store primary identityId in keyValueStorage', async () => { + defaultIdStore.storeIdentityId(validPrimaryIdentityId); + expect(mockKeyValueStorage.removeItem).toHaveBeenCalledWith( + validAuthKey.identityId, + ); + expect(defaultIdStore._primaryIdentityId).toEqual( + validPrimaryIdentityId.id, + ); + expect(defaultIdStore._hasGuestIdentityId).toBe(false); + }); + + it('should load primary identityId from keyValueStorage', async () => { + expect(await defaultIdStore.loadIdentityId()).toEqual( + validPrimaryIdentityId, + ); + }); + + it('should clear the cached identityId', async () => { + defaultIdStore.clearIdentityId(); + expect(mockKeyValueStorage.removeItem).toHaveBeenCalledWith( + validAuthKey.identityId, + ); + expect(defaultIdStore._primaryIdentityId).toBeUndefined(); + }); + + it('should throw when identityPoolId is not present while setting the auth config', async () => { + expect(() => { + defaultIdStore.setAuthConfig(noIdentityPoolIdAuthConfig.Auth!); + }).toThrow('Invalid identity pool id provided.'); + }); + + it('should return null when the underlying keyValueStorage method returns null', async () => { + mockKeyValueStorage.getItem.mockReturnValue(null); + expect(await defaultIdStore.loadIdentityId()).toBeNull(); + }); + + it('should return null when the underlying keyValueStorage method throws', async () => { + mockKeyValueStorage.getItem.mockRejectedValue(new Error('Error')); + expect(await defaultIdStore.loadIdentityId()).toBeNull(); + }); + + it('should not call keyValueStorage.removeItem when there is no guest identityId to clear', async () => { + const refreshIdentityIdStore = new DefaultIdentityIdStore( + mockKeyValueStorage, + ); + refreshIdentityIdStore.setAuthConfig(validAuthConfig.Auth!); + + refreshIdentityIdStore.storeIdentityId(validPrimaryIdentityId); + expect(mockKeyValueStorage.removeItem).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/auth/__tests__/providers/cognito/identityIdStore.test.ts b/packages/auth/__tests__/providers/cognito/identityIdStore.test.ts deleted file mode 100644 index 8eeb1fef5e3..00000000000 --- a/packages/auth/__tests__/providers/cognito/identityIdStore.test.ts +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -import { Identity, ResourcesConfig } from '@aws-amplify/core'; - -import { DefaultIdentityIdStore } from '../../../src/providers/cognito'; - -const mockKeyValueStorage = { - setItem: jest.fn(), - getItem: jest.fn(), - removeItem: jest.fn(), - clear: jest.fn(), -}; - -const validAuthConfig: ResourcesConfig = { - Auth: { - Cognito: { - userPoolId: 'us-east-1_test-id', - identityPoolId: 'us-east-1:test-id', - userPoolClientId: 'test-id', - allowGuestAccess: true, - }, - }, -}; -const validAuthKey = { - identityId: `com.amplify.Cognito.${ - validAuthConfig.Auth!.Cognito!.identityPoolId - }.identityId`, -}; -const validGuestIdentityId: Identity = { type: 'guest', id: 'guest-id' }; -const validPrimaryIdentityId: Identity = { type: 'primary', id: 'primary-id' }; - -const noIdentityPoolIdAuthConfig: ResourcesConfig = { - Auth: { - Cognito: { - userPoolId: 'us-east-1_test-id', - userPoolClientId: 'test-id', - }, - }, -}; - -describe('DefaultIdentityIdStore', () => { - const defaultIdStore = new DefaultIdentityIdStore(mockKeyValueStorage); - describe('Happy Path Cases:', () => { - beforeAll(() => { - defaultIdStore.setAuthConfig(validAuthConfig.Auth!); - }); - it('Should set the Auth config required to form the storage keys', async () => { - expect(defaultIdStore._authKeys).toEqual(validAuthKey); - }); - it('Should store guest identityId in keyValueStorage', async () => { - defaultIdStore.storeIdentityId(validGuestIdentityId); - expect(mockKeyValueStorage.setItem).toHaveBeenCalledWith( - validAuthKey.identityId, - validGuestIdentityId.id, - ); - expect(defaultIdStore._primaryIdentityId).toBeUndefined(); - }); - it('Should load guest identityId from keyValueStorage', async () => { - mockKeyValueStorage.getItem.mockReturnValue(validGuestIdentityId.id); - - expect(await defaultIdStore.loadIdentityId()).toEqual( - validGuestIdentityId, - ); - }); - it('Should store primary identityId in keyValueStorage', async () => { - defaultIdStore.storeIdentityId(validPrimaryIdentityId); - expect(mockKeyValueStorage.removeItem).toHaveBeenCalledWith( - validAuthKey.identityId, - ); - expect(defaultIdStore._primaryIdentityId).toEqual( - validPrimaryIdentityId.id, - ); - }); - it('Should load primary identityId from keyValueStorage', async () => { - expect(await defaultIdStore.loadIdentityId()).toEqual( - validPrimaryIdentityId, - ); - }); - it('Should clear the cached identityId', async () => { - defaultIdStore.clearIdentityId(); - expect(mockKeyValueStorage.removeItem).toHaveBeenCalledWith( - validAuthKey.identityId, - ); - expect(defaultIdStore._primaryIdentityId).toBeUndefined(); - }); - }); - describe('Error Path Cases:', () => { - it('Should assert when identityPoolId is not present while setting the auth config', async () => { - try { - defaultIdStore.setAuthConfig(noIdentityPoolIdAuthConfig.Auth!); - } catch (e: any) { - expect(e.name).toEqual('InvalidIdentityPoolIdException'); - } - }); - }); -}); diff --git a/packages/auth/src/providers/cognito/credentialsProvider/IdentityIdStore.ts b/packages/auth/src/providers/cognito/credentialsProvider/IdentityIdStore.ts index ec4bc9ef6b4..283b0e9cd3f 100644 --- a/packages/auth/src/providers/cognito/credentialsProvider/IdentityIdStore.ts +++ b/packages/auth/src/providers/cognito/credentialsProvider/IdentityIdStore.ts @@ -23,6 +23,8 @@ export class DefaultIdentityIdStore implements IdentityIdStore { // Used as in-memory storage _primaryIdentityId: string | undefined; _authKeys: AuthKeys = {}; + _hasGuestIdentityId = false; + setAuthConfig(authConfigParam: AuthConfig) { assertIdentityPoolIdConfig(authConfigParam.Cognito); this.authConfig = authConfigParam; @@ -48,7 +50,10 @@ export class DefaultIdentityIdStore implements IdentityIdStore { const storedIdentityId = await this.keyValueStorage.getItem( this._authKeys.identityId, ); + if (storedIdentityId) { + this._hasGuestIdentityId = true; + return { id: storedIdentityId, type: 'guest', @@ -71,10 +76,14 @@ export class DefaultIdentityIdStore implements IdentityIdStore { this.keyValueStorage.setItem(this._authKeys.identityId, identity.id); // Clear in-memory storage of primary identityId this._primaryIdentityId = undefined; + this._hasGuestIdentityId = true; } else { this._primaryIdentityId = identity.id; // Clear locally stored guest id - this.keyValueStorage.removeItem(this._authKeys.identityId); + if (this._hasGuestIdentityId) { + this.keyValueStorage.removeItem(this._authKeys.identityId); + this._hasGuestIdentityId = false; + } } } diff --git a/packages/rtn-web-browser/android/src/main/kotlin/com/amazonaws/amplify/rtnwebbrowser/WebBrowserModule.kt b/packages/rtn-web-browser/android/src/main/kotlin/com/amazonaws/amplify/rtnwebbrowser/WebBrowserModule.kt index eaa7fe5eaba..e883b90a20b 100644 --- a/packages/rtn-web-browser/android/src/main/kotlin/com/amazonaws/amplify/rtnwebbrowser/WebBrowserModule.kt +++ b/packages/rtn-web-browser/android/src/main/kotlin/com/amazonaws/amplify/rtnwebbrowser/WebBrowserModule.kt @@ -44,6 +44,7 @@ class WebBrowserModule( getCustomTabsPackageName(reactApplicationContext)?.let { val customTabsIntent = CustomTabsIntent.Builder(connection?.getSession()).build() customTabsIntent.intent.setPackage(it).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + customTabsIntent.intent.setPackage(it).addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) customTabsIntent.launchUrl(reactApplicationContext, Uri.parse(uriStr)) } ?: run { promise.reject(Throwable("No eligible browser found on device")) diff --git a/packages/storage/__tests__/providers/s3/apis/uploadData/byteLength.test.ts b/packages/storage/__tests__/providers/s3/apis/uploadData/byteLength.test.ts new file mode 100644 index 00000000000..24b46ac4f0d --- /dev/null +++ b/packages/storage/__tests__/providers/s3/apis/uploadData/byteLength.test.ts @@ -0,0 +1,39 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import { byteLength } from '../../../../../src/providers/s3/apis/uploadData/byteLength'; + +describe('byteLength', () => { + it('returns 0 for null or undefined', () => { + expect(byteLength(undefined)).toBe(0); + expect(byteLength(null)).toBe(0); + }); + + it('calculates byte length correctly for ASCII strings', () => { + expect(byteLength('hello')).toBe(5); + }); + + it('calculates byte length correctly for multi-byte characters', () => { + expect(byteLength('èちは')).toBe(8); + }); + + it('handles Uint8Array correctly', () => { + const input = new Uint8Array([1, 2, 3]); + expect(byteLength(input)).toBe(3); + }); + + it('handles ArrayBuffer correctly', () => { + const buffer = new ArrayBuffer(8); + expect(byteLength(buffer)).toBe(8); + }); + + it('handles File object correctly', () => { + const file = new Blob(['hello']); + expect(byteLength(file)).toBe(5); + }); + + it('returns undefined for unsupported types', () => { + const input = { unsupportedType: true }; + expect(byteLength(input)).toBeUndefined(); + }); +}); diff --git a/packages/storage/__tests__/providers/s3/utils/md5.native.test.ts b/packages/storage/__tests__/providers/s3/utils/md5.native.test.ts index aea1eab7743..ec70d0a8e14 100644 --- a/packages/storage/__tests__/providers/s3/utils/md5.native.test.ts +++ b/packages/storage/__tests__/providers/s3/utils/md5.native.test.ts @@ -69,23 +69,23 @@ describe('calculateContentMd5 (native)', () => { mockMd5.mockReset(); }); - it('calculates MD5 for content type: string', async () => { - await calculateContentMd5(stringContent); - const [mockMd5Instance] = mockMd5.mock.instances; - expect(mockMd5Instance.update.mock.calls[0][0]).toBe(stringContent); - expect(mockToBase64).toHaveBeenCalled(); - }); - it.each([ + { type: 'string', content: stringContent }, { type: 'ArrayBuffer view', content: new Uint8Array() }, { type: 'ArrayBuffer', content: new ArrayBuffer(8) }, - { type: 'Blob', content: new Blob([stringContent]) }, ])('calculates MD5 for content type: $type', async ({ content }) => { + await calculateContentMd5(content); + const [mockMd5Instance] = mockMd5.mock.instances; + expect(mockMd5Instance.update.mock.calls[0][0]).toBe(content); + expect(mockToBase64).toHaveBeenCalled(); + }); + + it('calculates MD5 for content type: blob', async () => { Object.defineProperty(global, 'FileReader', { writable: true, value: jest.fn(() => mockSuccessfulFileReader), }); - await calculateContentMd5(content); + await calculateContentMd5(new Blob([stringContent])); const [mockMd5Instance] = mockMd5.mock.instances; expect(mockMd5Instance.update.mock.calls[0][0]).toBe(fileReaderResult); expect(mockSuccessfulFileReader.readAsArrayBuffer).toHaveBeenCalled(); diff --git a/packages/storage/__tests__/providers/s3/utils/md5.test.ts b/packages/storage/__tests__/providers/s3/utils/md5.test.ts index 2de7f7dfd0e..7412d58e571 100644 --- a/packages/storage/__tests__/providers/s3/utils/md5.test.ts +++ b/packages/storage/__tests__/providers/s3/utils/md5.test.ts @@ -46,23 +46,23 @@ describe('calculateContentMd5', () => { mockMd5.mockReset(); }); - it('calculates MD5 for content type: string', async () => { - await calculateContentMd5(stringContent); - const [mockMd5Instance] = mockMd5.mock.instances; - expect(mockMd5Instance.update.mock.calls[0][0]).toBe(stringContent); - expect(mockToBase64).toHaveBeenCalled(); - }); - it.each([ + { type: 'string', content: stringContent }, { type: 'ArrayBuffer view', content: new Uint8Array() }, { type: 'ArrayBuffer', content: new ArrayBuffer(8) }, - { type: 'Blob', content: new Blob([stringContent]) }, ])('calculates MD5 for content type: $type', async ({ content }) => { + await calculateContentMd5(content); + const [mockMd5Instance] = mockMd5.mock.instances; + expect(mockMd5Instance.update.mock.calls[0][0]).toBe(content); + expect(mockToBase64).toHaveBeenCalled(); + }); + + it('calculates MD5 for content type: blob', async () => { Object.defineProperty(global, 'FileReader', { writable: true, value: jest.fn(() => mockSuccessfulFileReader), }); - await calculateContentMd5(content); + await calculateContentMd5(new Blob([stringContent])); const [mockMd5Instance] = mockMd5.mock.instances; expect(mockMd5Instance.update.mock.calls[0][0]).toBe(fileReaderResult); expect(mockSuccessfulFileReader.readAsArrayBuffer).toHaveBeenCalled(); diff --git a/packages/storage/src/providers/s3/apis/internal/list.ts b/packages/storage/src/providers/s3/apis/internal/list.ts index 7fe8ccf1ed0..bbcb342a603 100644 --- a/packages/storage/src/providers/s3/apis/internal/list.ts +++ b/packages/storage/src/providers/s3/apis/internal/list.ts @@ -21,8 +21,8 @@ import { validateStorageOperationInputWithPrefix, } from '../../utils'; import { - ListAllOptionsWithPath, - ListPaginateOptionsWithPath, + ListAllWithPathOptions, + ListPaginateWithPathOptions, ResolvedS3Config, } from '../../types/options'; import { @@ -267,7 +267,7 @@ const mapCommonPrefixesToExcludedSubpaths = ( }; const getDelimiter = ( - options?: ListAllOptionsWithPath | ListPaginateOptionsWithPath, + options?: ListAllWithPathOptions | ListPaginateWithPathOptions, ): string | undefined => { if (options?.subpathStrategy?.strategy === 'exclude') { return options?.subpathStrategy?.delimiter ?? DEFAULT_DELIMITER; diff --git a/packages/storage/src/providers/s3/apis/uploadData/multipart/uploadHandlers.ts b/packages/storage/src/providers/s3/apis/uploadData/multipart/uploadHandlers.ts index e216feeede7..8d002df37db 100644 --- a/packages/storage/src/providers/s3/apis/uploadData/multipart/uploadHandlers.ts +++ b/packages/storage/src/providers/s3/apis/uploadData/multipart/uploadHandlers.ts @@ -17,7 +17,7 @@ import { } from '../../../utils/constants'; import { ResolvedS3Config, - UploadDataOptionsWithKey, + UploadDataWithKeyOptions, } from '../../../types/options'; import { StorageError } from '../../../../../errors/StorageError'; import { CanceledError } from '../../../../../errors/CanceledError'; @@ -99,7 +99,7 @@ export const getMultipartUploadHandlers = ( // Resolve "key" specific options if (inputType === STORAGE_INPUT_KEY) { - const accessLevel = (uploadDataOptions as UploadDataOptionsWithKey) + const accessLevel = (uploadDataOptions as UploadDataWithKeyOptions) ?.accessLevel; resolvedKeyPrefix = resolvedS3Options.keyPrefix; diff --git a/packages/storage/src/providers/s3/types/errors.ts b/packages/storage/src/providers/s3/types/errors.ts deleted file mode 100644 index 9d757af7b6f..00000000000 --- a/packages/storage/src/providers/s3/types/errors.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -export enum S3Exception { - NotFoundException = 'NotFoundException', - ForbiddenException = 'ForbiddenException', - BadRequestException = 'BadRequestException', -} diff --git a/packages/storage/src/providers/s3/types/index.ts b/packages/storage/src/providers/s3/types/index.ts index 4efd666fb33..d38e3b8b523 100644 --- a/packages/storage/src/providers/s3/types/index.ts +++ b/packages/storage/src/providers/s3/types/index.ts @@ -2,23 +2,21 @@ // SPDX-License-Identifier: Apache-2.0 export { - GetUrlOptionsWithKey, - GetUrlOptionsWithPath, - UploadDataOptionsWithPath, - UploadDataOptionsWithKey, - GetPropertiesOptionsWithKey, - GetPropertiesOptionsWithPath, - ListAllOptionsWithPrefix, - ListPaginateOptionsWithPrefix, - ListAllOptionsWithPath, - ListPaginateOptionsWithPath, + GetUrlWithKeyOptions, + GetUrlWithPathOptions, + UploadDataWithPathOptions, + UploadDataWithKeyOptions, + GetPropertiesWithKeyOptions, + GetPropertiesWithPathOptions, + ListAllWithPrefixOptions, + ListPaginateWithPrefixOptions, + ListAllWithPathOptions, + ListPaginateWithPathOptions, RemoveOptions, - DownloadDataOptionsWithPath, - DownloadDataOptionsWithKey, - CopyDestinationOptionsWithKey, - CopySourceOptionsWithKey, - CopyWithPathSourceOptions, - CopyWithPathDestinationOptions, + DownloadDataWithPathOptions, + DownloadDataWithKeyOptions, + CopyDestinationWithKeyOptions, + CopySourceWithKeyOptions, } from './options'; export { UploadDataOutput, @@ -58,4 +56,3 @@ export { ListAllWithPathInput, ListPaginateWithPathInput, } from './inputs'; -export { S3Exception } from './errors'; diff --git a/packages/storage/src/providers/s3/types/inputs.ts b/packages/storage/src/providers/s3/types/inputs.ts index f7bd6c5db44..7b405964fb6 100644 --- a/packages/storage/src/providers/s3/types/inputs.ts +++ b/packages/storage/src/providers/s3/types/inputs.ts @@ -18,21 +18,21 @@ import { StorageUploadDataInputWithPath, } from '../../../types'; import { - CopyDestinationOptionsWithKey, - CopySourceOptionsWithKey, - DownloadDataOptionsWithKey, - DownloadDataOptionsWithPath, - GetPropertiesOptionsWithKey, - GetPropertiesOptionsWithPath, - GetUrlOptionsWithKey, - GetUrlOptionsWithPath, - ListAllOptionsWithPath, - ListAllOptionsWithPrefix, - ListPaginateOptionsWithPath, - ListPaginateOptionsWithPrefix, + CopyDestinationWithKeyOptions, + CopySourceWithKeyOptions, + DownloadDataWithKeyOptions, + DownloadDataWithPathOptions, + GetPropertiesWithKeyOptions, + GetPropertiesWithPathOptions, + GetUrlWithKeyOptions, + GetUrlWithPathOptions, + ListAllWithPathOptions, + ListAllWithPrefixOptions, + ListPaginateWithPathOptions, + ListPaginateWithPrefixOptions, RemoveOptions, - UploadDataOptionsWithKey, - UploadDataOptionsWithPath, + UploadDataWithKeyOptions, + UploadDataWithPathOptions, } from '../types'; // TODO: support use accelerate endpoint option @@ -41,8 +41,8 @@ import { * Input type for S3 copy API. */ export type CopyInput = StorageCopyInputWithKey< - CopySourceOptionsWithKey, - CopyDestinationOptionsWithKey + CopySourceWithKeyOptions, + CopyDestinationWithKeyOptions >; /** * Input type with path for S3 copy API. @@ -54,48 +54,48 @@ export type CopyWithPathInput = StorageCopyInputWithPath; * Input type for S3 getProperties API. */ export type GetPropertiesInput = - StorageGetPropertiesInputWithKey; + StorageGetPropertiesInputWithKey; /** * Input type with for S3 getProperties API. */ export type GetPropertiesWithPathInput = - StorageGetPropertiesInputWithPath; + StorageGetPropertiesInputWithPath; /** * @deprecated Use {@link GetUrlWithPathInput} instead. * Input type for S3 getUrl API. */ -export type GetUrlInput = StorageGetUrlInputWithKey; +export type GetUrlInput = StorageGetUrlInputWithKey; /** * Input type with path for S3 getUrl API. */ export type GetUrlWithPathInput = - StorageGetUrlInputWithPath; + StorageGetUrlInputWithPath; /** * Input type with path for S3 list API. Lists all bucket objects. */ export type ListAllWithPathInput = - StorageListInputWithPath; + StorageListInputWithPath; /** * Input type with path for S3 list API. Lists bucket objects with pagination. */ export type ListPaginateWithPathInput = - StorageListInputWithPath; + StorageListInputWithPath; /** * @deprecated Use {@link ListAllWithPathInput} instead. * Input type for S3 list API. Lists all bucket objects. */ -export type ListAllInput = StorageListInputWithPrefix; +export type ListAllInput = StorageListInputWithPrefix; /** * @deprecated Use {@link ListPaginateWithPathInput} instead. * Input type for S3 list API. Lists bucket objects with pagination. */ export type ListPaginateInput = - StorageListInputWithPrefix; + StorageListInputWithPrefix; /** * @deprecated Use {@link RemoveWithPathInput} instead. @@ -115,23 +115,23 @@ export type RemoveWithPathInput = StorageRemoveInputWithPath< * Input type for S3 downloadData API. */ export type DownloadDataInput = - StorageDownloadDataInputWithKey; + StorageDownloadDataInputWithKey; /** * Input type with path for S3 downloadData API. */ export type DownloadDataWithPathInput = - StorageDownloadDataInputWithPath; + StorageDownloadDataInputWithPath; /** * @deprecated Use {@link UploadDataWithPathInput} instead. * Input type for S3 uploadData API. */ export type UploadDataInput = - StorageUploadDataInputWithKey; + StorageUploadDataInputWithKey; /** * Input type with path for S3 uploadData API. */ export type UploadDataWithPathInput = - StorageUploadDataInputWithPath; + StorageUploadDataInputWithPath; diff --git a/packages/storage/src/providers/s3/types/options.ts b/packages/storage/src/providers/s3/types/options.ts index c9948eabe3b..9a608c6dd2b 100644 --- a/packages/storage/src/providers/s3/types/options.ts +++ b/packages/storage/src/providers/s3/types/options.ts @@ -74,9 +74,9 @@ interface TransferOptions { /** * Input options type for S3 getProperties API. */ -/** @deprecated Use {@link GetPropertiesOptionsWithPath} instead. */ -export type GetPropertiesOptionsWithKey = ReadOptions & CommonOptions; -export type GetPropertiesOptionsWithPath = CommonOptions; +/** @deprecated Use {@link GetPropertiesWithPathOptions} instead. */ +export type GetPropertiesWithKeyOptions = ReadOptions & CommonOptions; +export type GetPropertiesWithPathOptions = CommonOptions; /** * Input options type for S3 getProperties API. @@ -84,25 +84,25 @@ export type GetPropertiesOptionsWithPath = CommonOptions; export type RemoveOptions = WriteOptions & CommonOptions; /** - * @deprecated Use {@link ListAllOptionsWithPath} instead. + * @deprecated Use {@link ListAllWithPathOptions} instead. * Input options type with prefix for S3 list all API. */ -export type ListAllOptionsWithPrefix = StorageListAllOptions & +export type ListAllWithPrefixOptions = StorageListAllOptions & ReadOptions & CommonOptions; /** - * @deprecated Use {@link ListPaginateOptionsWithPath} instead. + * @deprecated Use {@link ListPaginateWithPathOptions} instead. * Input options type with prefix for S3 list API to paginate items. */ -export type ListPaginateOptionsWithPrefix = StorageListPaginateOptions & +export type ListPaginateWithPrefixOptions = StorageListPaginateOptions & ReadOptions & CommonOptions; /** * Input options type with path for S3 list all API. */ -export type ListAllOptionsWithPath = Omit< +export type ListAllWithPathOptions = Omit< StorageListAllOptions, 'accessLevel' > & @@ -113,7 +113,7 @@ export type ListAllOptionsWithPath = Omit< /** * Input options type with path for S3 list API to paginate items. */ -export type ListPaginateOptionsWithPath = Omit< +export type ListPaginateWithPathOptions = Omit< StorageListPaginateOptions, 'accessLevel' > & @@ -150,9 +150,9 @@ export type GetUrlOptions = CommonOptions & { contentType?: string; }; -/** @deprecated Use {@link GetUrlOptionsWithPath} instead. */ -export type GetUrlOptionsWithKey = ReadOptions & GetUrlOptions; -export type GetUrlOptionsWithPath = GetUrlOptions; +/** @deprecated Use {@link GetUrlWithPathOptions} instead. */ +export type GetUrlWithKeyOptions = ReadOptions & GetUrlOptions; +export type GetUrlWithPathOptions = GetUrlOptions; /** * Input options type for S3 downloadData API. @@ -161,9 +161,9 @@ export type DownloadDataOptions = CommonOptions & TransferOptions & BytesRangeOptions; -/** @deprecated Use {@link DownloadDataOptionsWithPath} instead. */ -export type DownloadDataOptionsWithKey = ReadOptions & DownloadDataOptions; -export type DownloadDataOptionsWithPath = DownloadDataOptions; +/** @deprecated Use {@link DownloadDataWithPathOptions} instead. */ +export type DownloadDataWithKeyOptions = ReadOptions & DownloadDataOptions; +export type DownloadDataWithPathOptions = DownloadDataOptions; export type UploadDataOptions = CommonOptions & TransferOptions & { @@ -192,19 +192,19 @@ export type UploadDataOptions = CommonOptions & metadata?: Record; }; -/** @deprecated Use {@link UploadDataOptionsWithPath} instead. */ -export type UploadDataOptionsWithKey = WriteOptions & UploadDataOptions; -export type UploadDataOptionsWithPath = UploadDataOptions; +/** @deprecated Use {@link UploadDataWithPathOptions} instead. */ +export type UploadDataWithKeyOptions = WriteOptions & UploadDataOptions; +export type UploadDataWithPathOptions = UploadDataOptions; /** @deprecated This may be removed in the next major version. */ -export type CopySourceOptionsWithKey = ReadOptions & { +export type CopySourceWithKeyOptions = ReadOptions & { /** @deprecated This may be removed in the next major version. */ key: string; bucket?: StorageBucket; }; /** @deprecated This may be removed in the next major version. */ -export type CopyDestinationOptionsWithKey = WriteOptions & { +export type CopyDestinationWithKeyOptions = WriteOptions & { /** @deprecated This may be removed in the next major version. */ key: string; bucket?: StorageBucket; diff --git a/packages/storage/src/providers/s3/utils/md5.native.ts b/packages/storage/src/providers/s3/utils/md5.native.ts index 6c43cad24b0..a0c5a2365d8 100644 --- a/packages/storage/src/providers/s3/utils/md5.native.ts +++ b/packages/storage/src/providers/s3/utils/md5.native.ts @@ -14,16 +14,8 @@ export const calculateContentMd5 = async ( content: Blob | string | ArrayBuffer | ArrayBufferView, ): Promise => { const hasher = new Md5(); - if (typeof content === 'string') { - hasher.update(content); - } else if (ArrayBuffer.isView(content) || content instanceof ArrayBuffer) { - const blob = new Blob([content]); - const buffer = await readFile(blob); - hasher.update(buffer); - } else { - const buffer = await readFile(content); - hasher.update(buffer); - } + const buffer = content instanceof Blob ? await readFile(content) : content; + hasher.update(buffer); const digest = await hasher.digest(); return toBase64(digest); diff --git a/packages/storage/src/providers/s3/utils/md5.ts b/packages/storage/src/providers/s3/utils/md5.ts index 80292d95eea..98e04fdaf99 100644 --- a/packages/storage/src/providers/s3/utils/md5.ts +++ b/packages/storage/src/providers/s3/utils/md5.ts @@ -9,16 +9,8 @@ export const calculateContentMd5 = async ( content: Blob | string | ArrayBuffer | ArrayBufferView, ): Promise => { const hasher = new Md5(); - if (typeof content === 'string') { - hasher.update(content); - } else if (ArrayBuffer.isView(content) || content instanceof ArrayBuffer) { - const blob = new Blob([content]); - const buffer = await readFile(blob); - hasher.update(buffer); - } else { - const buffer = await readFile(content); - hasher.update(buffer); - } + const buffer = content instanceof Blob ? await readFile(content) : content; + hasher.update(buffer); const digest = await hasher.digest(); return toBase64(digest); diff --git a/yarn.lock b/yarn.lock index 68e83991cff..7c8955dfc37 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2861,55 +2861,55 @@ write-pkg "4.0.0" yargs "16.2.0" -"@next/env@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.6.tgz#4f8ab1ca549a90bf0c83454b798b0ebae7098b15" - integrity sha512-bs5DFKV+08EjWrl8EB+KKqev1ZTNONH1vFCaHh911aaB362NnP32UDTbE9VQhyiAgbFqJsfDkSxFERNDDb3j0g== - -"@next/swc-darwin-arm64@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.6.tgz#38dfd8716e52dd1f52cfd3e461721d3e984887c6" - integrity sha512-BtJZb+hYXGaVJJivpnDoi3JFVn80SHKCiiRUW3kk1SY6UCUy5dWFFSbh+tGi5lHAughzeduMyxbLt3pspvXNSg== - -"@next/swc-darwin-x64@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.6.tgz#605a6fafbdd672d72728db86aae0fea67e3338f9" - integrity sha512-ZHRbGpH6KHarzm6qEeXKSElSXh8dS2DtDPjQt3IMwY8QVk7GbdDYjvV4NgSnDA9huGpGgnyy3tH8i5yHCqVkiQ== - -"@next/swc-linux-arm64-gnu@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.6.tgz#2a4d3c6d159c70ded6b415cbf6d7082bd823e37d" - integrity sha512-O4HqUEe3ZvKshXHcDUXn1OybN4cSZg7ZdwHJMGCXSUEVUqGTJVsOh17smqilIjooP/sIJksgl+1kcf2IWMZWHg== - -"@next/swc-linux-arm64-musl@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.6.tgz#db4850182cef343a6539d646d613f2f0333a4dc1" - integrity sha512-xUcdhr2hfalG8RDDGSFxQ75yOG894UlmFS4K2M0jLrUhauRBGOtUOxoDVwiIIuZQwZ3Y5hDsazNjdYGB0cQ9yQ== - -"@next/swc-linux-x64-gnu@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.6.tgz#dbd75f0c3b3b3fb5c4ace0b5b52b050409701b3e" - integrity sha512-InosKxw8UMcA/wEib5n2QttwHSKHZHNSbGcMepBM0CTcNwpxWzX32KETmwbhKod3zrS8n1vJ+DuJKbL9ZAB0Ag== - -"@next/swc-linux-x64-musl@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.6.tgz#b045235257e78c87878b3651cb9c7b553a20005b" - integrity sha512-d4QXfJmt5pGJ7cG8qwxKSBnO5AXuKAFYxV7qyDRHnUNvY/dgDh+oX292gATpB2AAHgjdHd5ks1wXxIEj6muLUQ== - -"@next/swc-win32-arm64-msvc@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.6.tgz#be6ec8b97db574d9c2625fd181b6fa3e4625c29d" - integrity sha512-AlgIhk4/G+PzOG1qdF1b05uKTMsuRatFlFzAi5G8RZ9h67CVSSuZSbqGHbJDlcV1tZPxq/d4G0q6qcHDKWf4aQ== - -"@next/swc-win32-ia32-msvc@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.6.tgz#bc215a8488f10042c21890a83e79eee9e84cff6d" - integrity sha512-hNukAxq7hu4o5/UjPp5jqoBEtrpCbOmnUqZSKNJG8GrUVzfq0ucdhQFVrHcLRMvQcwqqDh1a5AJN9ORnNDpgBQ== - -"@next/swc-win32-x64-msvc@14.2.6": - version "14.2.6" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.6.tgz#6b63a7b4ff3b7b410a038e3ee839c951a3136dc9" - integrity sha512-NANtw+ead1rSDK1jxmzq3TYkl03UNK2KHqUYf1nIhNci6NkeqBD4s1njSzYGIlSHxCK+wSaL8RXZm4v+NF/pMw== +"@next/env@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.10.tgz#1d3178340028ced2d679f84140877db4f420333c" + integrity sha512-dZIu93Bf5LUtluBXIv4woQw2cZVZ2DJTjax5/5DOs3lzEOeKLy7GxRSr4caK9/SCPdaW6bCgpye6+n4Dh9oJPw== + +"@next/swc-darwin-arm64@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.10.tgz#49d10ca4086fbd59ee68e204f75d7136eda2aa80" + integrity sha512-V3z10NV+cvMAfxQUMhKgfQnPbjw+Ew3cnr64b0lr8MDiBJs3eLnM6RpGC46nhfMZsiXgQngCJKWGTC/yDcgrDQ== + +"@next/swc-darwin-x64@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.10.tgz#0ebeae3afb8eac433882b79543295ab83624a1a8" + integrity sha512-Y0TC+FXbFUQ2MQgimJ/7Ina2mXIKhE7F+GUe1SgnzRmwFY3hX2z8nyVCxE82I2RicspdkZnSWMn4oTjIKz4uzA== + +"@next/swc-linux-arm64-gnu@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.10.tgz#7e602916d2fb55a3c532f74bed926a0137c16f20" + integrity sha512-ZfQ7yOy5zyskSj9rFpa0Yd7gkrBnJTkYVSya95hX3zeBG9E55Z6OTNPn1j2BTFWvOVVj65C3T+qsjOyVI9DQpA== + +"@next/swc-linux-arm64-musl@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.10.tgz#6b143f628ccee490b527562e934f8de578d4be47" + integrity sha512-n2i5o3y2jpBfXFRxDREr342BGIQCJbdAUi/K4q6Env3aSx8erM9VuKXHw5KNROK9ejFSPf0LhoSkU/ZiNdacpQ== + +"@next/swc-linux-x64-gnu@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.10.tgz#086f2f16a0678890a1eb46518c4dda381b046082" + integrity sha512-GXvajAWh2woTT0GKEDlkVhFNxhJS/XdDmrVHrPOA83pLzlGPQnixqxD8u3bBB9oATBKB//5e4vpACnx5Vaxdqg== + +"@next/swc-linux-x64-musl@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.10.tgz#1befef10ed8dbcc5047b5d637a25ae3c30a0bfc3" + integrity sha512-opFFN5B0SnO+HTz4Wq4HaylXGFV+iHrVxd3YvREUX9K+xfc4ePbRrxqOuPOFjtSuiVouwe6uLeDtabjEIbkmDA== + +"@next/swc-win32-arm64-msvc@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.10.tgz#731f52c3ae3c56a26cf21d474b11ae1529531209" + integrity sha512-9NUzZuR8WiXTvv+EiU/MXdcQ1XUvFixbLIMNQiVHuzs7ZIFrJDLJDaOF1KaqttoTujpcxljM/RNAOmw1GhPPQQ== + +"@next/swc-win32-ia32-msvc@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.10.tgz#32723ef7f04e25be12af357cc72ddfdd42fd1041" + integrity sha512-fr3aEbSd1GeW3YUMBkWAu4hcdjZ6g4NBl1uku4gAn661tcxd1bHs1THWYzdsbTRLcCKLjrDZlNp6j2HTfrw+Bg== + +"@next/swc-win32-x64-msvc@14.2.10": + version "14.2.10" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.10.tgz#ee1d036cb5ec871816f96baee7991035bb242455" + integrity sha512-UjeVoRGKNL2zfbcQ6fscmgjBAS/inHBh63mjIlfPg/NG8Yn2ztqylXt5qilYb6hoHIwaU2ogHknHWWmahJjgZQ== "@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3": version "2.1.8-no-fsevents.3" @@ -4104,85 +4104,85 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@rollup/rollup-android-arm-eabi@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.1.tgz#c3a7938551273a2b72820cf5d22e54cf41dc206e" - integrity sha512-2thheikVEuU7ZxFXubPDOtspKn1x0yqaYQwvALVtEcvFhMifPADBrgRPyHV0TF3b+9BgvgjgagVyvA/UqPZHmg== - -"@rollup/rollup-android-arm64@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.1.tgz#fa3693e4674027702c42fcbbb86bbd0c635fd3b9" - integrity sha512-t1lLYn4V9WgnIFHXy1d2Di/7gyzBWS8G5pQSXdZqfrdCGTwi1VasRMSS81DTYb+avDs/Zz4A6dzERki5oRYz1g== - -"@rollup/rollup-darwin-arm64@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.1.tgz#e19922f4ac1e4552a230ff8f49d5688c5c07d284" - integrity sha512-AH/wNWSEEHvs6t4iJ3RANxW5ZCK3fUnmf0gyMxWCesY1AlUj8jY7GC+rQE4wd3gwmZ9XDOpL0kcFnCjtN7FXlA== - -"@rollup/rollup-darwin-x64@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.1.tgz#897f8d47b115ea84692a29cf2366899499d4d915" - integrity sha512-dO0BIz/+5ZdkLZrVgQrDdW7m2RkrLwYTh2YMFG9IpBtlC1x1NPNSXkfczhZieOlOLEqgXOFH3wYHB7PmBtf+Bg== - -"@rollup/rollup-linux-arm-gnueabihf@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.1.tgz#7d1e2a542f3a5744f5c24320067bd5af99ec9d62" - integrity sha512-sWWgdQ1fq+XKrlda8PsMCfut8caFwZBmhYeoehJ05FdI0YZXk6ZyUjWLrIgbR/VgiGycrFKMMgp7eJ69HOF2pQ== - -"@rollup/rollup-linux-arm-musleabihf@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.1.tgz#88bec1c9df85fc5e24d49f783e19934717dd69b5" - integrity sha512-9OIiSuj5EsYQlmwhmFRA0LRO0dRRjdCVZA3hnmZe1rEwRk11Jy3ECGGq3a7RrVEZ0/pCsYWx8jG3IvcrJ6RCew== - -"@rollup/rollup-linux-arm64-gnu@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.1.tgz#6dc60f0fe7bd49ed07a2d4d9eab15e671b3bd59d" - integrity sha512-0kuAkRK4MeIUbzQYu63NrJmfoUVicajoRAL1bpwdYIYRcs57iyIV9NLcuyDyDXE2GiZCL4uhKSYAnyWpjZkWow== - -"@rollup/rollup-linux-arm64-musl@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.1.tgz#a03b78775c129e8333aca9e1e420e8e217ee99b9" - integrity sha512-/6dYC9fZtfEY0vozpc5bx1RP4VrtEOhNQGb0HwvYNwXD1BBbwQ5cKIbUVVU7G2d5WRE90NfB922elN8ASXAJEA== - -"@rollup/rollup-linux-powerpc64le-gnu@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.1.tgz#ee3810647faf2c105a5a4e71260bb90b96bf87bc" - integrity sha512-ltUWy+sHeAh3YZ91NUsV4Xg3uBXAlscQe8ZOXRCVAKLsivGuJsrkawYPUEyCV3DYa9urgJugMLn8Z3Z/6CeyRQ== - -"@rollup/rollup-linux-riscv64-gnu@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.1.tgz#385d76a088c27db8054d9f3f28d64d89294f838e" - integrity sha512-BggMndzI7Tlv4/abrgLwa/dxNEMn2gC61DCLrTzw8LkpSKel4o+O+gtjbnkevZ18SKkeN3ihRGPuBxjaetWzWg== - -"@rollup/rollup-linux-s390x-gnu@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.1.tgz#daa2b62a6e6f737ebef6700a12a93c9764e18583" - integrity sha512-z/9rtlGd/OMv+gb1mNSjElasMf9yXusAxnRDrBaYB+eS1shFm6/4/xDH1SAISO5729fFKUkJ88TkGPRUh8WSAA== - -"@rollup/rollup-linux-x64-gnu@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.1.tgz#790ae96118cc892464e9f10da358c0c8a6b9acdd" - integrity sha512-kXQVcWqDcDKw0S2E0TmhlTLlUgAmMVqPrJZR+KpH/1ZaZhLSl23GZpQVmawBQGVhyP5WXIsIQ/zqbDBBYmxm5w== - -"@rollup/rollup-linux-x64-musl@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.1.tgz#d613147f7ac15fafe2a0b6249e8484e161ca2847" - integrity sha512-CbFv/WMQsSdl+bpX6rVbzR4kAjSSBuDgCqb1l4J68UYsQNalz5wOqLGYj4ZI0thGpyX5kc+LLZ9CL+kpqDovZA== - -"@rollup/rollup-win32-arm64-msvc@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.1.tgz#18349db8250559a5460d59eb3575f9781be4ab98" - integrity sha512-3Q3brDgA86gHXWHklrwdREKIrIbxC0ZgU8lwpj0eEKGBQH+31uPqr0P2v11pn0tSIxHvcdOWxa4j+YvLNx1i6g== - -"@rollup/rollup-win32-ia32-msvc@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.1.tgz#199648b68271f7ab9d023f5c077725d51d12d466" - integrity sha512-tNg+jJcKR3Uwe4L0/wY3Ro0H+u3nrb04+tcq1GSYzBEmKLeOQF2emk1whxlzNqb6MMrQ2JOcQEpuuiPLyRcSIw== - -"@rollup/rollup-win32-x64-msvc@4.21.1": - version "4.21.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.1.tgz#4d3ec02dbf280c20bfeac7e50cd5669b66f9108f" - integrity sha512-xGiIH95H1zU7naUyTKEyOA/I0aexNMUdO9qRv0bLKN3qu25bBdrxZHqA3PTJ24YNN/GdMzG4xkDcd/GvjuhfLg== +"@rollup/rollup-android-arm-eabi@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz#8b613b9725e8f9479d142970b106b6ae878610d5" + integrity sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w== + +"@rollup/rollup-android-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz#654ca1049189132ff602bfcf8df14c18da1f15fb" + integrity sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA== + +"@rollup/rollup-darwin-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz#6d241d099d1518ef0c2205d96b3fa52e0fe1954b" + integrity sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q== + +"@rollup/rollup-darwin-x64@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz#42bd19d292a57ee11734c980c4650de26b457791" + integrity sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw== + +"@rollup/rollup-linux-arm-gnueabihf@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz#f23555ee3d8fe941c5c5fd458cd22b65eb1c2232" + integrity sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ== + +"@rollup/rollup-linux-arm-musleabihf@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz#f3bbd1ae2420f5539d40ac1fde2b38da67779baa" + integrity sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg== + +"@rollup/rollup-linux-arm64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz#7abe900120113e08a1f90afb84c7c28774054d15" + integrity sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw== + +"@rollup/rollup-linux-arm64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz#9e655285c8175cd44f57d6a1e8e5dedfbba1d820" + integrity sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz#9a79ae6c9e9d8fe83d49e2712ecf4302db5bef5e" + integrity sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg== + +"@rollup/rollup-linux-riscv64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz#67ac70eca4ace8e2942fabca95164e8874ab8128" + integrity sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA== + +"@rollup/rollup-linux-s390x-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz#9f883a7440f51a22ed7f99e1d070bd84ea5005fc" + integrity sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q== + +"@rollup/rollup-linux-x64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz#70116ae6c577fe367f58559e2cffb5641a1dd9d0" + integrity sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg== + +"@rollup/rollup-linux-x64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz#f473f88219feb07b0b98b53a7923be716d1d182f" + integrity sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g== + +"@rollup/rollup-win32-arm64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz#4349482d17f5d1c58604d1c8900540d676f420e0" + integrity sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw== + +"@rollup/rollup-win32-ia32-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz#a6fc39a15db618040ec3c2a24c1e26cb5f4d7422" + integrity sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g== + +"@rollup/rollup-win32-x64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz#3dd5d53e900df2a40841882c02e56f866c04d202" + integrity sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q== "@semantic-ui-react/event-stack@^3.1.0": version "3.1.3" @@ -12098,11 +12098,11 @@ neo-async@^2.5.0, neo-async@^2.6.2: integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== "next@>= 13.5.0 < 15.0.0": - version "14.2.6" - resolved "https://registry.yarnpkg.com/next/-/next-14.2.6.tgz#2d294fe1ac806231cffd52ae2cf2e469b940536d" - integrity sha512-57Su7RqXs5CBKKKOagt8gPhMM3CpjgbeQhrtei2KLAA1vTNm7jfKS+uDARkSW8ZETUflDCBIsUKGSyQdRs4U4g== + version "14.2.10" + resolved "https://registry.yarnpkg.com/next/-/next-14.2.10.tgz#331981a4fecb1ae8af1817d4db98fc9687ee1cb6" + integrity sha512-sDDExXnh33cY3RkS9JuFEKaS4HmlWmDKP1VJioucCG6z5KuA008DPsDZOzi8UfqEk3Ii+2NCQSJrfbEWtZZfww== dependencies: - "@next/env" "14.2.6" + "@next/env" "14.2.10" "@swc/helpers" "0.5.5" busboy "1.6.0" caniuse-lite "^1.0.30001579" @@ -12110,15 +12110,15 @@ neo-async@^2.5.0, neo-async@^2.6.2: postcss "8.4.31" styled-jsx "5.1.1" optionalDependencies: - "@next/swc-darwin-arm64" "14.2.6" - "@next/swc-darwin-x64" "14.2.6" - "@next/swc-linux-arm64-gnu" "14.2.6" - "@next/swc-linux-arm64-musl" "14.2.6" - "@next/swc-linux-x64-gnu" "14.2.6" - "@next/swc-linux-x64-musl" "14.2.6" - "@next/swc-win32-arm64-msvc" "14.2.6" - "@next/swc-win32-ia32-msvc" "14.2.6" - "@next/swc-win32-x64-msvc" "14.2.6" + "@next/swc-darwin-arm64" "14.2.10" + "@next/swc-darwin-x64" "14.2.10" + "@next/swc-linux-arm64-gnu" "14.2.10" + "@next/swc-linux-arm64-musl" "14.2.10" + "@next/swc-linux-x64-gnu" "14.2.10" + "@next/swc-linux-x64-musl" "14.2.10" + "@next/swc-win32-arm64-msvc" "14.2.10" + "@next/swc-win32-ia32-msvc" "14.2.10" + "@next/swc-win32-x64-msvc" "14.2.10" nice-try@^1.0.4: version "1.0.5" @@ -13868,28 +13868,28 @@ rimraf@~2.6.2: glob "^7.1.3" rollup@^4.9.6: - version "4.21.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.21.1.tgz#65b9b9e9de9a64604fab083fb127f3e9eac2935d" - integrity sha512-ZnYyKvscThhgd3M5+Qt3pmhO4jIRR5RGzaSovB6Q7rGNrK5cUncrtLmcTTJVSdcKXyZjW8X8MB0JMSuH9bcAJg== + version "4.22.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.4.tgz#4135a6446671cd2a2453e1ad42a45d5973ec3a0f" + integrity sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A== dependencies: "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.21.1" - "@rollup/rollup-android-arm64" "4.21.1" - "@rollup/rollup-darwin-arm64" "4.21.1" - "@rollup/rollup-darwin-x64" "4.21.1" - "@rollup/rollup-linux-arm-gnueabihf" "4.21.1" - "@rollup/rollup-linux-arm-musleabihf" "4.21.1" - "@rollup/rollup-linux-arm64-gnu" "4.21.1" - "@rollup/rollup-linux-arm64-musl" "4.21.1" - "@rollup/rollup-linux-powerpc64le-gnu" "4.21.1" - "@rollup/rollup-linux-riscv64-gnu" "4.21.1" - "@rollup/rollup-linux-s390x-gnu" "4.21.1" - "@rollup/rollup-linux-x64-gnu" "4.21.1" - "@rollup/rollup-linux-x64-musl" "4.21.1" - "@rollup/rollup-win32-arm64-msvc" "4.21.1" - "@rollup/rollup-win32-ia32-msvc" "4.21.1" - "@rollup/rollup-win32-x64-msvc" "4.21.1" + "@rollup/rollup-android-arm-eabi" "4.22.4" + "@rollup/rollup-android-arm64" "4.22.4" + "@rollup/rollup-darwin-arm64" "4.22.4" + "@rollup/rollup-darwin-x64" "4.22.4" + "@rollup/rollup-linux-arm-gnueabihf" "4.22.4" + "@rollup/rollup-linux-arm-musleabihf" "4.22.4" + "@rollup/rollup-linux-arm64-gnu" "4.22.4" + "@rollup/rollup-linux-arm64-musl" "4.22.4" + "@rollup/rollup-linux-powerpc64le-gnu" "4.22.4" + "@rollup/rollup-linux-riscv64-gnu" "4.22.4" + "@rollup/rollup-linux-s390x-gnu" "4.22.4" + "@rollup/rollup-linux-x64-gnu" "4.22.4" + "@rollup/rollup-linux-x64-musl" "4.22.4" + "@rollup/rollup-win32-arm64-msvc" "4.22.4" + "@rollup/rollup-win32-ia32-msvc" "4.22.4" + "@rollup/rollup-win32-x64-msvc" "4.22.4" fsevents "~2.3.2" run-async@^2.4.0: