triangle-utils 1.4.118 → 1.4.120
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/dist/src/UtilsS3.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export declare class UtilsS3 {
|
|
|
68
68
|
}): Promise<import("@aws-sdk/client-s3").PutObjectCommandOutput | undefined>;
|
|
69
69
|
upload(s3_id: string, content: string | Buffer | Readable, options?: {
|
|
70
70
|
content_type_id?: string;
|
|
71
|
+
part_size?: number;
|
|
71
72
|
}): Promise<void>;
|
|
72
73
|
delete(s3_id: string): Promise<void>;
|
|
73
74
|
get_download_url(s3_id: string): Promise<string | undefined>;
|
package/dist/src/UtilsS3.js
CHANGED
|
@@ -152,6 +152,7 @@ export class UtilsS3 {
|
|
|
152
152
|
}
|
|
153
153
|
async upload(s3_id, content, options = {}) {
|
|
154
154
|
const content_type_id = options.content_type_id !== undefined ? options.content_type_id : undefined;
|
|
155
|
+
const part_size = options.part_size !== undefined ? options.part_size : undefined;
|
|
155
156
|
const s3_input = this.get_s3_input(s3_id);
|
|
156
157
|
if (s3_input === undefined) {
|
|
157
158
|
return undefined;
|
|
@@ -162,7 +163,8 @@ export class UtilsS3 {
|
|
|
162
163
|
...s3_input,
|
|
163
164
|
Body: content,
|
|
164
165
|
ContentType: content_type_id
|
|
165
|
-
}
|
|
166
|
+
},
|
|
167
|
+
partSize: part_size
|
|
166
168
|
});
|
|
167
169
|
await upload.done();
|
|
168
170
|
}
|
|
@@ -10,6 +10,7 @@ export declare class GlobalConfig {
|
|
|
10
10
|
readonly s3_triage: string;
|
|
11
11
|
readonly super_federal_gov_api_keys: string;
|
|
12
12
|
readonly federal_gov_api_keys: string;
|
|
13
|
+
readonly federal_census_api_key: string;
|
|
13
14
|
readonly federal_lobby_api_key: string;
|
|
14
15
|
readonly scraping_bee_api_key: string;
|
|
15
16
|
readonly twitter_api_key: string;
|
|
@@ -10,6 +10,7 @@ export class GlobalConfig {
|
|
|
10
10
|
s3_triage;
|
|
11
11
|
super_federal_gov_api_keys;
|
|
12
12
|
federal_gov_api_keys;
|
|
13
|
+
federal_census_api_key;
|
|
13
14
|
federal_lobby_api_key;
|
|
14
15
|
scraping_bee_api_key;
|
|
15
16
|
twitter_api_key;
|
|
@@ -30,6 +31,7 @@ export class GlobalConfig {
|
|
|
30
31
|
this.s3_triage = global_config.s3_triage;
|
|
31
32
|
this.super_federal_gov_api_keys = global_config.super_federal_gov_api_keys;
|
|
32
33
|
this.federal_gov_api_keys = global_config.federal_gov_api_keys;
|
|
34
|
+
this.federal_census_api_key = global_config.federal_census_api_key;
|
|
33
35
|
this.federal_lobby_api_key = global_config.federal_lobby_api_key;
|
|
34
36
|
this.scraping_bee_api_key = global_config.scraping_bee_api_key;
|
|
35
37
|
this.twitter_api_key = global_config.twitter_api_key;
|
|
@@ -49,6 +51,7 @@ export class GlobalConfig {
|
|
|
49
51
|
typeof global_config.s3_triage === "string" &&
|
|
50
52
|
typeof global_config.super_federal_gov_api_keys === "string" &&
|
|
51
53
|
typeof global_config.federal_gov_api_keys === "string" &&
|
|
54
|
+
typeof global_config.federal_census_api_key === "string" &&
|
|
52
55
|
typeof global_config.federal_lobby_api_key === "string" &&
|
|
53
56
|
typeof global_config.scraping_bee_api_key === "string" &&
|
|
54
57
|
typeof global_config.twitter_api_key === "string" &&
|
package/package.json
CHANGED
package/src/UtilsS3.ts
CHANGED
|
@@ -167,9 +167,11 @@ export class UtilsS3 {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
async upload(s3_id : string, content : string | Buffer | Readable, options : {
|
|
170
|
-
content_type_id? : string
|
|
170
|
+
content_type_id? : string,
|
|
171
|
+
part_size? : number
|
|
171
172
|
} = {}) : Promise<void> {
|
|
172
173
|
const content_type_id = options.content_type_id !== undefined ? options.content_type_id : undefined
|
|
174
|
+
const part_size = options.part_size !== undefined ? options.part_size : undefined
|
|
173
175
|
const s3_input = this.get_s3_input(s3_id)
|
|
174
176
|
if (s3_input === undefined) {
|
|
175
177
|
return undefined
|
|
@@ -180,7 +182,8 @@ export class UtilsS3 {
|
|
|
180
182
|
...s3_input,
|
|
181
183
|
Body : content,
|
|
182
184
|
ContentType : content_type_id
|
|
183
|
-
}
|
|
185
|
+
},
|
|
186
|
+
partSize : part_size
|
|
184
187
|
})
|
|
185
188
|
await upload.done()
|
|
186
189
|
}
|
|
@@ -10,6 +10,7 @@ export class GlobalConfig {
|
|
|
10
10
|
readonly s3_triage : string
|
|
11
11
|
readonly super_federal_gov_api_keys : string
|
|
12
12
|
readonly federal_gov_api_keys : string
|
|
13
|
+
readonly federal_census_api_key : string
|
|
13
14
|
readonly federal_lobby_api_key : string
|
|
14
15
|
readonly scraping_bee_api_key : string
|
|
15
16
|
readonly twitter_api_key : string
|
|
@@ -32,6 +33,7 @@ export class GlobalConfig {
|
|
|
32
33
|
this.s3_triage = global_config.s3_triage
|
|
33
34
|
this.super_federal_gov_api_keys = global_config.super_federal_gov_api_keys
|
|
34
35
|
this.federal_gov_api_keys = global_config.federal_gov_api_keys
|
|
36
|
+
this.federal_census_api_key = global_config.federal_census_api_key
|
|
35
37
|
this.federal_lobby_api_key = global_config.federal_lobby_api_key
|
|
36
38
|
this.scraping_bee_api_key = global_config.scraping_bee_api_key
|
|
37
39
|
this.twitter_api_key = global_config.twitter_api_key
|
|
@@ -53,6 +55,7 @@ export class GlobalConfig {
|
|
|
53
55
|
typeof global_config.s3_triage === "string" &&
|
|
54
56
|
typeof global_config.super_federal_gov_api_keys === "string" &&
|
|
55
57
|
typeof global_config.federal_gov_api_keys === "string" &&
|
|
58
|
+
typeof global_config.federal_census_api_key === "string" &&
|
|
56
59
|
typeof global_config.federal_lobby_api_key === "string" &&
|
|
57
60
|
typeof global_config.scraping_bee_api_key === "string" &&
|
|
58
61
|
typeof global_config.twitter_api_key === "string" &&
|