@cumulus/db 21.3.2-testlerna.0 → 21.3.2

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.
@@ -53,11 +53,11 @@ export declare const executionArnsFromGranuleIdsAndWorkflowNames: (knex: Knex, g
53
53
  *
54
54
  * @param {string} granuleId - granuleIds
55
55
  * @param {string} workflowName - workflow name
56
- * @param {Knex} testKnex - knex for testing
56
+ * @param {Knex} knex - DB Client
57
57
  * @returns {Promise<string>} - most recent exectutionArn for input parameters.
58
58
  * @throws {RecordNotFound}
59
59
  */
60
- export declare const newestExecutionArnFromGranuleIdWorkflowName: (granuleId: string, workflowName: string, testKnex: Knex | undefined) => Promise<string>;
60
+ export declare const newestExecutionArnFromGranuleIdWorkflowName: (granuleId: string, workflowName: string, knex: Knex) => Promise<string>;
61
61
  /**
62
62
  * Returns the intersect of workflow names that exist for all granule ids that are passed in
63
63
  * When a single granule is passed in, workflow names are sorted by most recent first
@@ -6,7 +6,6 @@ const execution_1 = require("../models/execution");
6
6
  const granules_executions_1 = require("../models/granules-executions");
7
7
  const tables_1 = require("../tables");
8
8
  const Logger = require('@cumulus/logger');
9
- const { getKnexClient } = require('../connection');
10
9
  const log = new Logger({ sender: '@cumulus/db/lib/execution' });
11
10
  /**
12
11
  * Returns execution records sorted by most recent first for an input
@@ -77,13 +76,12 @@ exports.executionArnsFromGranuleIdsAndWorkflowNames = executionArnsFromGranuleId
77
76
  *
78
77
  * @param {string} granuleId - granuleIds
79
78
  * @param {string} workflowName - workflow name
80
- * @param {Knex} testKnex - knex for testing
79
+ * @param {Knex} knex - DB Client
81
80
  * @returns {Promise<string>} - most recent exectutionArn for input parameters.
82
81
  * @throws {RecordNotFound}
83
82
  */
84
- const newestExecutionArnFromGranuleIdWorkflowName = async (granuleId, workflowName, testKnex) => {
83
+ const newestExecutionArnFromGranuleIdWorkflowName = async (granuleId, workflowName, knex) => {
85
84
  try {
86
- const knex = testKnex ?? await getKnexClient({ env: process.env });
87
85
  const executions = await (0, exports.executionArnsFromGranuleIdsAndWorkflowNames)(knex, [granuleId], [workflowName]);
88
86
  if (executions.length === 0) {
89
87
  throw new errors_1.RecordDoesNotExist(`No executionArns found for granuleId:${granuleId} running workflow:${workflowName}`);
@@ -40,6 +40,7 @@ export declare const translatePostgresGranuleToApiGranuleWithoutDbQuery: ({ gran
40
40
  * @param {PostgresCollectionRecord} [params.collectionPgRecord] - Optional Collection from Postgres
41
41
  * @param {Knex | Knex.Transaction} params.knexOrTransaction
42
42
  * Knex client for reading from RDS database
43
+ * @param {Object} [params.providerPgRecord] - Optional Provider from Postgres
43
44
  * @param {Object} [params.collectionPgModel] - Instance of the collection database model
44
45
  * @param {Object} [params.pdrPgModel] - Instance of the pdr database model
45
46
  * @param {Object} [params.providerPgModel] - Instance of the provider database model
@@ -70,6 +70,7 @@ exports.translatePostgresGranuleToApiGranuleWithoutDbQuery = translatePostgresGr
70
70
  * @param {PostgresCollectionRecord} [params.collectionPgRecord] - Optional Collection from Postgres
71
71
  * @param {Knex | Knex.Transaction} params.knexOrTransaction
72
72
  * Knex client for reading from RDS database
73
+ * @param {Object} [params.providerPgRecord] - Optional Provider from Postgres
73
74
  * @param {Object} [params.collectionPgModel] - Instance of the collection database model
74
75
  * @param {Object} [params.pdrPgModel] - Instance of the pdr database model
75
76
  * @param {Object} [params.providerPgModel] - Instance of the provider database model
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/db",
3
- "version": "21.3.2-testlerna.0",
3
+ "version": "21.3.2",
4
4
  "description": "Utilities for working with the Cumulus DB",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -33,12 +33,12 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@aws-sdk/client-secrets-manager": "^3.993.0",
36
- "@cumulus/aws-client": "21.3.2-testlerna.0",
37
- "@cumulus/common": "21.3.2-testlerna.0",
38
- "@cumulus/errors": "21.3.2-testlerna.0",
39
- "@cumulus/logger": "21.3.2-testlerna.0",
40
- "@cumulus/message": "21.3.2-testlerna.0",
41
- "@cumulus/types": "21.3.2-testlerna.0",
36
+ "@cumulus/aws-client": "21.3.2",
37
+ "@cumulus/common": "21.3.2",
38
+ "@cumulus/errors": "21.3.2",
39
+ "@cumulus/logger": "21.3.2",
40
+ "@cumulus/message": "21.3.2",
41
+ "@cumulus/types": "21.3.2",
42
42
  "@duckdb/node-api": "^1.4.4-r.1",
43
43
  "crypto-random-string": "^3.2.0",
44
44
  "is-valid-hostname": "1.0.2",
@@ -51,5 +51,5 @@
51
51
  "devDependencies": {
52
52
  "@types/uuid": "^8.0.0"
53
53
  },
54
- "gitHead": "ef6577b6caec96a20df8ccff293a9436db32a482"
54
+ "gitHead": "2c77ecb6c0ac426d885bddf637484e438e2b2903"
55
55
  }