@cumulus/db 18.0.0 → 18.1.0
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/migrations/20230915150154_add_max_download_time_providers.d.ts +4 -0
- package/dist/migrations/20230915150154_add_max_download_time_providers.js +18 -0
- package/dist/provider.js +1 -0
- package/dist/translate/collections.d.ts +1 -1
- package/dist/translate/collections.js +1 -1
- package/dist/translate/providers.js +2 -0
- package/dist/translate/rules.js +1 -1
- package/dist/types/provider.d.ts +1 -0
- package/dist/types/rule.d.ts +2 -1
- package/package.json +8 -8
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.down = exports.up = void 0;
|
|
4
|
+
const up = async (knex) => await knex.schema.table('providers', (table) => {
|
|
5
|
+
table
|
|
6
|
+
.integer('max_download_time')
|
|
7
|
+
.comment('Maximum download time in seconds for all granule files on a sync granule task');
|
|
8
|
+
});
|
|
9
|
+
exports.up = up;
|
|
10
|
+
const down = async (knex) => {
|
|
11
|
+
if (await knex.schema.hasColumn('providers', 'max_download_time')) {
|
|
12
|
+
await knex.schema.table('providers', (table) => {
|
|
13
|
+
table.dropColumn('max_download_time');
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.down = down;
|
|
18
|
+
//# sourceMappingURL=20230915150154_add_max_download_time_providers.js.map
|
package/dist/provider.js
CHANGED
|
@@ -9,7 +9,7 @@ export declare const translatePostgresCollectionToApiCollection: (collectionReco
|
|
|
9
9
|
/**
|
|
10
10
|
* Translates a NewCollectionRecord API collection object to a `PostgresCollectionRecord` object
|
|
11
11
|
* @param {NewCollectionRecord} record - API collection record to translate
|
|
12
|
-
* @returns {
|
|
12
|
+
* @returns {PostgresCollection} - Translated record
|
|
13
13
|
*/
|
|
14
14
|
export declare const translateApiCollectionToPostgresCollection: (record: NewCollectionRecord) => PostgresCollection;
|
|
15
15
|
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -28,7 +28,7 @@ exports.translatePostgresCollectionToApiCollection = translatePostgresCollection
|
|
|
28
28
|
/**
|
|
29
29
|
* Translates a NewCollectionRecord API collection object to a `PostgresCollectionRecord` object
|
|
30
30
|
* @param {NewCollectionRecord} record - API collection record to translate
|
|
31
|
-
* @returns {
|
|
31
|
+
* @returns {PostgresCollection} - Translated record
|
|
32
32
|
*/
|
|
33
33
|
const translateApiCollectionToPostgresCollection = (record) => {
|
|
34
34
|
// Map old record to new schema.
|
|
@@ -16,6 +16,7 @@ const translatePostgresProviderToApiProvider = (record) => {
|
|
|
16
16
|
certificateUri: record.certificate_uri,
|
|
17
17
|
privateKey: record.private_key,
|
|
18
18
|
globalConnectionLimit: record.global_connection_limit,
|
|
19
|
+
maxDownloadTime: record.max_download_time,
|
|
19
20
|
port: record.port,
|
|
20
21
|
host: record.host,
|
|
21
22
|
protocol: record.protocol,
|
|
@@ -55,6 +56,7 @@ const translateApiProviderToPostgresProvider = async (record, encryptMethod = ex
|
|
|
55
56
|
certificate_uri: record.certificateUri,
|
|
56
57
|
private_key: record.privateKey,
|
|
57
58
|
global_connection_limit: record.globalConnectionLimit,
|
|
59
|
+
max_download_time: record.maxDownloadTime,
|
|
58
60
|
port: record.port,
|
|
59
61
|
host: record.host,
|
|
60
62
|
protocol: record.protocol,
|
package/dist/translate/rules.js
CHANGED
|
@@ -30,7 +30,7 @@ const translatePostgresRuleToApiRule = async (pgRule, knex, collectionPgModel =
|
|
|
30
30
|
payload: pgRule.payload,
|
|
31
31
|
executionNamePrefix: pgRule.execution_name_prefix,
|
|
32
32
|
queueUrl: pgRule.queue_url,
|
|
33
|
-
tags: pgRule.tags
|
|
33
|
+
tags: pgRule.tags,
|
|
34
34
|
createdAt: pgRule.created_at.getTime(),
|
|
35
35
|
updatedAt: pgRule.updated_at.getTime(),
|
|
36
36
|
};
|
package/dist/types/provider.d.ts
CHANGED
package/dist/types/rule.d.ts
CHANGED
|
@@ -17,9 +17,10 @@ export interface PostgresRule {
|
|
|
17
17
|
created_at: Date | undefined;
|
|
18
18
|
updated_at: Date | undefined;
|
|
19
19
|
}
|
|
20
|
-
export interface PostgresRuleRecord extends PostgresRule {
|
|
20
|
+
export interface PostgresRuleRecord extends Omit<PostgresRule, 'tags'> {
|
|
21
21
|
cumulus_id: number;
|
|
22
22
|
created_at: Date;
|
|
23
23
|
updated_at: Date;
|
|
24
|
+
tags: string[];
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=rule.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cumulus/db",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.1.0",
|
|
4
4
|
"description": "Utilities for working with the Cumulus DB",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"node": ">=16.19.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@cumulus/aws-client": "18.
|
|
34
|
-
"@cumulus/common": "18.
|
|
35
|
-
"@cumulus/errors": "18.
|
|
36
|
-
"@cumulus/logger": "18.
|
|
37
|
-
"@cumulus/message": "18.
|
|
38
|
-
"@cumulus/types": "18.
|
|
33
|
+
"@cumulus/aws-client": "18.1.0",
|
|
34
|
+
"@cumulus/common": "18.1.0",
|
|
35
|
+
"@cumulus/errors": "18.1.0",
|
|
36
|
+
"@cumulus/logger": "18.1.0",
|
|
37
|
+
"@cumulus/message": "18.1.0",
|
|
38
|
+
"@cumulus/types": "18.1.0",
|
|
39
39
|
"crypto-random-string": "^3.2.0",
|
|
40
40
|
"is-valid-hostname": "1.0.2",
|
|
41
41
|
"knex": "2.4.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/uuid": "^8.0.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8428a02e0903d8d303c7dd36215aa6a24906e07b"
|
|
51
51
|
}
|