@cumulus/db 16.1.1 → 16.1.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.
@@ -0,0 +1,4 @@
1
+ import { Knex } from 'knex';
2
+ export declare const up: (knex: Knex) => Promise<void>;
3
+ export declare const down: (knex: Knex) => Promise<void>;
4
+ //# sourceMappingURL=20230915150154_add_max_download_time_providers.d.ts.map
@@ -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
@@ -23,6 +23,7 @@ const nullifyUndefinedProviderValues = (data) => {
23
23
  'username',
24
24
  'password',
25
25
  'global_connection_limit',
26
+ 'max_download_time',
26
27
  'private_key',
27
28
  'cm_key_id',
28
29
  'certificate_uri',
@@ -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,
@@ -11,6 +11,7 @@ export interface PostgresProvider {
11
11
  cumulus_id?: number | null;
12
12
  global_connection_limit?: number | null;
13
13
  host: string;
14
+ max_download_time?: number | null;
14
15
  name: string;
15
16
  password?: string;
16
17
  port?: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/db",
3
- "version": "16.1.1",
3
+ "version": "16.1.3",
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": "16.1.1",
34
- "@cumulus/common": "16.1.1",
35
- "@cumulus/errors": "16.1.1",
36
- "@cumulus/logger": "16.1.1",
37
- "@cumulus/message": "16.1.1",
38
- "@cumulus/types": "16.1.1",
33
+ "@cumulus/aws-client": "16.1.3",
34
+ "@cumulus/common": "16.1.3",
35
+ "@cumulus/errors": "16.1.3",
36
+ "@cumulus/logger": "16.1.3",
37
+ "@cumulus/message": "16.1.3",
38
+ "@cumulus/types": "16.1.3",
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": "e96bba50ad45d146eeb548818c74737521a00175"
50
+ "gitHead": "2cadd0bf948a60b9b291dceccf5d31c5f7bca24a"
51
51
  }