web/satellite: upgraded aws-sdk dependencies to resolve vulnerabilities

Upgraded package-lock version to correspond to node v18+.
Upgraded aws-sdk dependencies to resolve vulnerabilities.
Also, fixed typing errors in object browser pinia module.

Change-Id: I35e6e219e66f98ca167ccb4ac57ad07ac99efff1
This commit is contained in:
Vitalii 2023-08-01 14:04:07 +03:00 committed by Vitalii Shpital
parent d40091a3cb
commit 59034ca094
4 changed files with 1302 additions and 10110 deletions

File diff suppressed because it is too large Load Diff

View File

@ -17,10 +17,10 @@
},
"dependencies": {
"@apollo/client": "3.7.14",
"@aws-sdk/client-s3": "3.338.0",
"@aws-sdk/lib-storage": "3.338.0",
"@aws-sdk/s3-request-presigner": "3.338.0",
"@aws-sdk/signature-v4": "3.338.0",
"@aws-sdk/client-s3": "3.379.1",
"@aws-sdk/lib-storage": "3.379.1",
"@aws-sdk/s3-request-presigner": "3.379.1",
"@smithy/signature-v4": "2.0.1",
"@hcaptcha/vue3-hcaptcha": "1.2.1",
"@mdi/font": "7.0.96",
"bip39-english": "2.5.0",
@ -39,7 +39,7 @@
},
"devDependencies": {
"@types/filesystem": "0.0.32",
"@types/node": "16.18.14",
"@types/node": "18.17.1",
"@types/qrcode": "1.5.0",
"@typescript-eslint/eslint-plugin": "5.59.5",
"@typescript-eslint/parser": "5.59.5",

View File

@ -10,7 +10,7 @@ import {
DeleteBucketCommand,
ListObjectsV2Command,
} from '@aws-sdk/client-s3';
import { SignatureV4 } from '@aws-sdk/signature-v4';
import { SignatureV4 } from '@smithy/signature-v4';
import { Bucket, BucketCursor, BucketPage, BucketsApi } from '@/types/buckets';
import { BucketsApiGql } from '@/api/buckets';
@ -88,8 +88,8 @@ export const useBucketsStore = defineStore('buckets', () => {
const s3Config: S3ClientConfig = {
credentials: {
accessKeyId: state.edgeCredentialsForDelete.accessKeyId,
secretAccessKey: state.edgeCredentialsForDelete.secretKey,
accessKeyId: state.edgeCredentialsForDelete.accessKeyId || '',
secretAccessKey: state.edgeCredentialsForDelete.secretKey || '',
},
endpoint: state.edgeCredentialsForDelete.endpoint,
forcePathStyle: true,
@ -105,8 +105,8 @@ export const useBucketsStore = defineStore('buckets', () => {
const s3Config: S3ClientConfig = {
credentials: {
accessKeyId: state.edgeCredentialsForCreate.accessKeyId,
secretAccessKey: state.edgeCredentialsForCreate.secretKey,
accessKeyId: state.edgeCredentialsForCreate.accessKeyId || '',
secretAccessKey: state.edgeCredentialsForCreate.secretKey || '',
},
endpoint: state.edgeCredentialsForCreate.endpoint,
forcePathStyle: true,
@ -182,8 +182,8 @@ export const useBucketsStore = defineStore('buckets', () => {
const s3Config: S3ClientConfig = {
credentials: {
accessKeyId: state.edgeCredentials.accessKeyId,
secretAccessKey: state.edgeCredentials.secretKey,
accessKeyId: state.edgeCredentials.accessKeyId || '',
secretAccessKey: state.edgeCredentials.secretKey || '',
},
endpoint: state.edgeCredentials.endpoint,
forcePathStyle: true,

View File

@ -1,7 +1,7 @@
// Copyright (C) 2023 Storj Labs, Inc.
// See LICENSE for copying information.
import { computed, reactive } from 'vue';
import { computed, reactive, UnwrapNestedRefs } from 'vue';
import { defineStore } from 'pinia';
import {
S3Client,
@ -16,7 +16,7 @@ import {
} from '@aws-sdk/client-s3';
import { getSignedUrl } from '@aws-sdk/s3-request-presigner';
import { Progress, Upload } from '@aws-sdk/lib-storage';
import { SignatureV4 } from '@aws-sdk/signature-v4';
import { SignatureV4 } from '@smithy/signature-v4';
import { AnalyticsErrorEventSource } from '@/utils/constants/analyticsEventNames';
import { MODALS } from '@/utils/constants/appStatePopUps';
@ -26,8 +26,6 @@ import { useConfigStore } from '@/store/modules/configStore';
const listCache = new Map();
type Promisable<T> = T | PromiseLike<T>;
export type BrowserObject = {
Key: string;
Size: number;
@ -54,6 +52,7 @@ export enum UploadingStatus {
export type UploadingBrowserObject = BrowserObject & {
status: UploadingStatus;
Bucket: string;
Body: File;
failedMessage?: FailedUploadMessage;
}
@ -91,7 +90,7 @@ type InitializedFilesState = FilesState & {
};
function assertIsInitialized(
state: FilesState,
state: UnwrapNestedRefs<FilesState>,
): asserts state is InitializedFilesState {
if (state.s3 === null) {
throw new Error(