@digitraffic/common 2024.1.23-1 → 2024.1.24-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.
@@ -3,7 +3,7 @@ import { ProxyHolder } from "../../runtime/secrets/proxy-holder.mjs";
3
3
  import { RdsHolder } from "../../runtime/secrets/rds-holder.mjs";
4
4
  import { getEnvVariable } from "../../../utils/utils.mjs";
5
5
  import { logger } from "../../runtime/dt-logger-default.mjs";
6
- const synthetics = await import("Synthetics");
6
+ import synthetics from "Synthetics";
7
7
  class DatabaseCheck {
8
8
  constructor(name, sql) {
9
9
  this.name = name;
@@ -2,7 +2,7 @@ import { createRequire as _createRequire } from "module";
2
2
  const __require = _createRequire(import.meta.url);
3
3
  import { Asserter } from "../../../test/asserter.mjs";
4
4
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
5
- const synthetics = await import("Synthetics");
5
+ import synthetics from "Synthetics";
6
6
  const zlib = __require("zlib");
7
7
  import { MediaType } from "../../types/mediatypes.mjs";
8
8
  import { getApiKeyFromAPIGateway } from "../../runtime/apikey.mjs";
@@ -2,9 +2,7 @@ import { getSecret } from "./secret.mjs";
2
2
  import { checkExpectedSecretKeys } from "./dbsecret.mjs";
3
3
  import { getEnvVariable } from "../../../utils/utils.mjs";
4
4
  import { logger } from "../dt-logger-default.mjs";
5
- const NodeTtlImport = await import("node-ttl");
6
- //eslint-disable-next-line
7
- const NodeTtl = NodeTtlImport.default;
5
+ import NodeTtl from "node-ttl";
8
6
  const DEFAULT_PREFIX = "";
9
7
  const DEFAULT_SECRET_KEY = "SECRET";
10
8
  const DEFAULT_CONFIGURATION = {
@@ -9,8 +9,8 @@ export var DatabaseEnvironmentKeys;
9
9
  DatabaseEnvironmentKeys["DB_RO_URI"] = "DB_RO_URI";
10
10
  DatabaseEnvironmentKeys["DB_APPLICATION"] = "DB_APPLICATION";
11
11
  })(DatabaseEnvironmentKeys || (DatabaseEnvironmentKeys = {}));
12
- const pgpImport = await import("pg-promise");
13
- const pgp = pgpImport.default();
12
+ import pgpImport from "pg-promise";
13
+ const pgp = pgpImport();
14
14
  // convert numeric types to number instead of string
15
15
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
16
16
  pgp.pg.types.setTypeParser(pgp.pg.types.builtins.INT8, (value) => {
@@ -1,4 +1,4 @@
1
- const AWS = await import("aws-sdk");
1
+ import AWS from "aws-sdk";
2
2
  import * as sinon from "sinon";
3
3
  import { EnvKeys } from "../aws/runtime/environment.mjs";
4
4
  import { setEnvVariable } from "../utils/utils.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitraffic/common",
3
- "version": "2024.1.23-1",
3
+ "version": "2024.1.24-2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "repository": {
@@ -5,7 +5,7 @@ import { getEnvVariable } from "../../../utils/utils.mjs";
5
5
  import { Countable } from "../../../database/models.mjs";
6
6
  import { logger } from "../../runtime/dt-logger-default.mjs";
7
7
 
8
- const synthetics = await import("Synthetics");
8
+ import synthetics from "Synthetics";
9
9
 
10
10
  abstract class DatabaseCheck<T> {
11
11
  readonly name: string;
@@ -2,7 +2,7 @@ import { IncomingMessage, RequestOptions } from "http";
2
2
  import { Asserter } from "../../../test/asserter.mjs";
3
3
 
4
4
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
5
- const synthetics = await import("Synthetics");
5
+ import synthetics from "Synthetics";
6
6
  import zlib = require("zlib");
7
7
  import { MediaType } from "../../types/mediatypes.mjs";
8
8
  import { getApiKeyFromAPIGateway } from "../../runtime/apikey.mjs";
@@ -3,9 +3,7 @@ import { checkExpectedSecretKeys } from "./dbsecret.mjs";
3
3
  import { getEnvVariable } from "../../../utils/utils.mjs";
4
4
  import { logger } from "../dt-logger-default.mjs";
5
5
 
6
- const NodeTtlImport = await import("node-ttl");
7
- //eslint-disable-next-line
8
- const NodeTtl = NodeTtlImport.default;
6
+ import NodeTtl from "node-ttl";
9
7
 
10
8
  const DEFAULT_PREFIX = "";
11
9
  const DEFAULT_SECRET_KEY = "SECRET";
@@ -10,9 +10,8 @@ export enum DatabaseEnvironmentKeys {
10
10
  DB_RO_URI = "DB_RO_URI",
11
11
  DB_APPLICATION = "DB_APPLICATION",
12
12
  }
13
-
14
- const pgpImport = await import("pg-promise");
15
- const pgp = pgpImport.default();
13
+ import pgpImport from "pg-promise";
14
+ const pgp = pgpImport();
16
15
 
17
16
  // convert numeric types to number instead of string
18
17
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
@@ -1,4 +1,4 @@
1
- const AWS = await import("aws-sdk");
1
+ import AWS from "aws-sdk";
2
2
  import * as sinon from "sinon";
3
3
  import { EnvKeys } from "../aws/runtime/environment.mjs";
4
4
  import { setEnvVariable } from "../utils/utils.mjs";