@pi-r/aws-v3 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/download/index.js +1 -6
- package/package.json +8 -8
- package/types/index.d.ts +41 -0
- package/upload/index.js +1 -6
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright 2023
|
|
1
|
+
Copyright 2023 Haruhi Suzumiya
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
package/download/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
const util_1 = require("@e-mc/cloud/util");
|
|
4
3
|
const types_1 = require("@e-mc/types");
|
|
5
4
|
const Module = require("@e-mc/module");
|
|
@@ -32,9 +31,5 @@ function download(config, service = 'aws-v3', sdk = '@aws-sdk/client-s3') {
|
|
|
32
31
|
.catch(err => callback(err));
|
|
33
32
|
};
|
|
34
33
|
}
|
|
35
|
-
exports.default = download;
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
module.exports = exports.default;
|
|
39
|
-
module.exports.default = exports.default;
|
|
40
|
-
}
|
|
35
|
+
module.exports = download;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/aws-v3",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "AWS V3 cloud functions for E-mc.",
|
|
5
5
|
"main": "client/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/cloud": "^0.7.
|
|
24
|
-
"@e-mc/module": "^0.7.
|
|
25
|
-
"@e-mc/types": "^0.7.
|
|
26
|
-
"@pi-r/aws": "^0.5.
|
|
27
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
28
|
-
"@aws-sdk/client-s3": "^3.
|
|
29
|
-
"@aws-sdk/lib-dynamodb": "^3.
|
|
23
|
+
"@e-mc/cloud": "^0.7.3",
|
|
24
|
+
"@e-mc/module": "^0.7.3",
|
|
25
|
+
"@e-mc/types": "^0.7.3",
|
|
26
|
+
"@pi-r/aws": "^0.5.3",
|
|
27
|
+
"@aws-sdk/client-dynamodb": "^3.540.0",
|
|
28
|
+
"@aws-sdk/client-s3": "^3.540.0",
|
|
29
|
+
"@aws-sdk/lib-dynamodb": "^3.540.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CloudDatabase, CloudStorage } from '@e-mc/types/lib/cloud';
|
|
2
|
+
|
|
3
|
+
import type { AwsAuthInputConfig } from '@aws-sdk/middleware-signing';
|
|
4
|
+
import type { DynamoDBClientConfig, QueryCommandInput, ScanCommandInput } from '@aws-sdk/client-dynamodb';
|
|
5
|
+
import type { BatchGetCommandInput, TranslateConfig, UpdateCommandInput } from '@aws-sdk/lib-dynamodb';
|
|
6
|
+
import type { NativeAttributeValue } from "@aws-sdk/util-dynamodb";
|
|
7
|
+
import type { S3ClientConfig } from '@aws-sdk/client-s3';
|
|
8
|
+
|
|
9
|
+
export interface AWSBaseCredential extends AwsAuthInputConfig {
|
|
10
|
+
provider?: {
|
|
11
|
+
http?: unknown;
|
|
12
|
+
ini?: unknown;
|
|
13
|
+
cognitoIdentity?: unknown;
|
|
14
|
+
cognitoIdentityPool?: unknown;
|
|
15
|
+
temporaryCredentials?: unknown;
|
|
16
|
+
webToken?: unknown;
|
|
17
|
+
containerMetadata?: unknown;
|
|
18
|
+
instanceMetadata?: unknown;
|
|
19
|
+
process?: unknown;
|
|
20
|
+
tokenFile?: unknown;
|
|
21
|
+
sso?: unknown;
|
|
22
|
+
env?: unknown;
|
|
23
|
+
nodeProviderChain?: unknown;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type AWSStorage = CloudStorage<AWSStorageCredential, "aws-v3">;
|
|
28
|
+
|
|
29
|
+
export interface AWSStorageCredential extends S3ClientConfig, AWSBaseCredential {}
|
|
30
|
+
|
|
31
|
+
export interface AWSDatabaseQuery extends CloudDatabase<QueryCommandInput | ObjectMap<NativeAttributeValue>[], PlainObject, UpdateCommandInput, BatchGetCommandInput | ScanCommandInput> {
|
|
32
|
+
source: "cloud";
|
|
33
|
+
service: "aws-v3";
|
|
34
|
+
key?: string | AttributeKey;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface AWSDatabaseCredential extends Omit<DynamoDBClientConfig, "credentials">, AWSBaseCredential {
|
|
38
|
+
translateConfig?: TranslateConfig;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type AttributeKey = Record<string, NativeAttributeValue>;
|
package/upload/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
const path = require("path");
|
|
4
3
|
const fs = require("fs");
|
|
5
4
|
const stream = require("stream");
|
|
@@ -181,9 +180,5 @@ function upload(credential, service = 'aws-v3', sdk = '@aws-sdk/client-s3') {
|
|
|
181
180
|
}
|
|
182
181
|
};
|
|
183
182
|
}
|
|
184
|
-
exports.default = upload;
|
|
185
183
|
|
|
186
|
-
|
|
187
|
-
module.exports = exports.default;
|
|
188
|
-
module.exports.default = exports.default;
|
|
189
|
-
}
|
|
184
|
+
module.exports = upload;
|