Skip to content

Commit f1b000f

Browse files
committed
Bump package.json to 1.0.5
Issue: CLDSRVCLT-10
1 parent 5d01ad3 commit f1b000f

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scality/cloudserverclient",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"engines": {
55
"node": ">=20"
66
},

src/commands/s3Extended/getObjectAttributes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
GetObjectAttributesCommand,
33
GetObjectAttributesCommandInput,
44
GetObjectAttributesCommandOutput,
5+
ObjectAttributes,
56
} from '@aws-sdk/client-s3';
67
import {
78
overrideObjectAttributesHeaderMiddleware,
@@ -10,7 +11,7 @@ import {
1011
} from './utils';
1112

1213
export interface GetObjectAttributesExtendedInput extends Omit<GetObjectAttributesCommandInput, 'ObjectAttributes'> {
13-
ObjectAttributes: string[];
14+
ObjectAttributes: (ObjectAttributes | `x-amz-meta-${string}`)[];
1415
}
1516

1617
export interface GetObjectAttributesExtendedOutput extends GetObjectAttributesCommandOutput {

src/commands/s3Extended/listObjectsV2.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
ListObjectsV2Command,
33
ListObjectsV2CommandInput,
44
ListObjectsV2CommandOutput,
5+
OptionalObjectAttributes,
56
_Object,
67
} from '@aws-sdk/client-s3';
78
import {
@@ -13,7 +14,7 @@ import {
1314

1415
export interface ListObjectsV2ExtendedInput extends ListObjectsV2CommandInput {
1516
Query?: string;
16-
ObjectAttributes?: string[];
17+
ObjectAttributes?: (OptionalObjectAttributes | `x-amz-meta-${string}`)[];
1718
}
1819

1920
export interface ListObjectsV2ExtendedContentEntry extends _Object {

tests/commands/s3Extended/listObjectsV2.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,29 +127,31 @@ describeForMongoBackend('ListObjectsV2Extended', () => {
127127
assert.strictEqual(obj1['x-amz-meta-nonexistent'], undefined);
128128
});
129129

130-
it('should list objects with standard attribute combined with user metadata', async () => {
130+
it('should list objects with RestoreStatus combined with user metadata', async () => {
131131
const result = await s3client.send(new ListObjectsV2ExtendedCommand({
132132
Bucket: testConfig.bucketName,
133-
ObjectAttributes: ['ETag', 'x-amz-meta-foo'],
133+
ObjectAttributes: ['RestoreStatus', 'x-amz-meta-foo'],
134134
})) as ListObjectsV2ExtendedOutput;
135135

136136
const obj1 = result.Contents!.find(content => content.Key === metaKey1)!;
137137

138138
assert.strictEqual(result.$metadata.httpStatusCode, 200);
139139
assert.strictEqual(obj1['x-amz-meta-foo'], 'bar');
140+
assert.deepStrictEqual(obj1.RestoreStatus, { IsRestoreInProgress: false });
140141
});
141142

142-
it('should list objects with standard attribute combined with non-existing user metadata', async () => {
143+
it('should list objects with RestoreStatus combined with non-existing user metadata', async () => {
143144
const result = await s3client.send(new ListObjectsV2ExtendedCommand({
144145
Bucket: testConfig.bucketName,
145-
ObjectAttributes: ['ETag', 'x-amz-meta-nonexistent'],
146+
ObjectAttributes: ['RestoreStatus', 'x-amz-meta-nonexistent'],
146147
})) as ListObjectsV2ExtendedOutput;
147148

148149
const obj1 = result.Contents!.find(content => content.Key === metaKey1)!;
149150

150151
assert.strictEqual(result.$metadata.httpStatusCode, 200);
151152
assert.strictEqual(result.Contents?.length, 2);
152153
assert.strictEqual(obj1['x-amz-meta-nonexistent'], undefined);
154+
assert.deepStrictEqual(obj1.RestoreStatus, { IsRestoreInProgress: false });
153155
});
154156
});
155157
});

0 commit comments

Comments
 (0)