@digitraffic/common 2024.8.16-1 → 2024.8.27-1
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/{test/asserter.mjs → __test__/asserter.js} +3 -3
- package/dist/{test/db-testutils.d.mts → __test__/db-testutils.d.ts} +1 -1
- package/dist/{test/db-testutils.mjs → __test__/db-testutils.js} +4 -3
- package/dist/__test__/{dependencies.test.mjs → dependencies.test.js} +1 -1
- package/dist/__test__/{imports.test.mjs → imports.test.js} +79 -79
- package/dist/__test__/infra/{acl-builder.test.mjs → acl-builder.test.js} +4 -4
- package/dist/__test__/infra/api/{handler-factory.test.mjs → handler-factory.test.js} +3 -4
- package/dist/__test__/infra/api/{response.test.mjs → response.test.js} +3 -11
- package/dist/__test__/infra/api/{static-integration.test.mjs → static-integration.test.js} +3 -3
- package/dist/__test__/infra/{documentation.test.mjs → documentation.test.js} +2 -2
- package/dist/__test__/infra/{scheduler.test.mjs → scheduler.test.js} +2 -2
- package/dist/__test__/infra/{security-rule.test.mjs → security-rule.test.js} +2 -2
- package/dist/__test__/marine/{id_utils.test.mjs → id_utils.test.js} +3 -3
- package/dist/{test/mock-ky.mjs → __test__/mock-ky.js} +1 -1
- package/dist/__test__/promise/{promise.test.mjs → promise.test.js} +9 -13
- package/dist/__test__/runtime/{dt-logger.test.mjs → dt-logger.test.js} +7 -7
- package/dist/__test__/secrets/{secret-holder.test.mjs → secret-holder.test.js} +6 -4
- package/dist/__test__/secrets/{secret.test.mjs → secret.test.js} +4 -2
- package/dist/__test__/stack/{rest-apis.test.mjs → rest-apis.test.js} +4 -4
- package/dist/__test__/test/{mock-ky.test.mjs → mock-ky.test.js} +3 -3
- package/dist/{test/testutils.mjs → __test__/testutils.js} +1 -2
- package/dist/__test__/types/{lambda-response.test.mjs → lambda-response.test.js} +2 -2
- package/dist/__test__/utils/{date-utils.test.mjs → date-utils.test.js} +3 -3
- package/dist/__test__/utils/{geometry.test.mjs → geometry.test.js} +3 -3
- package/dist/__test__/utils/{logging.test.mjs → logging.test.js} +4 -4
- package/dist/__test__/utils/{utils.test.mjs → utils.test.js} +2 -3
- package/dist/aws/infra/{acl-builder.d.mts → acl-builder.d.ts} +15 -8
- package/dist/aws/infra/{acl-builder.mjs → acl-builder.js} +77 -55
- package/dist/aws/infra/api/{handler-factory.d.mts → handler-factory.d.ts} +4 -4
- package/dist/aws/infra/api/{handler-factory.mjs → handler-factory.js} +7 -5
- package/dist/aws/infra/api/{integration.d.mts → integration.d.ts} +3 -1
- package/dist/aws/infra/api/{integration.mjs → integration.js} +34 -13
- package/dist/aws/infra/api/{response.d.mts → response.d.ts} +2 -2
- package/dist/aws/infra/api/{response.mjs → response.js} +4 -4
- package/dist/aws/infra/api/{responses.d.mts → responses.d.ts} +3 -3
- package/dist/aws/infra/api/{responses.mjs → responses.js} +4 -6
- package/dist/aws/infra/api/{static-integration.d.mts → static-integration.d.ts} +2 -2
- package/dist/aws/infra/api/{static-integration.mjs → static-integration.js} +3 -3
- package/dist/aws/infra/canaries/canary-alarm.d.ts +6 -0
- package/dist/aws/infra/canaries/{canary-alarm.mjs → canary-alarm.js} +1 -3
- package/dist/aws/infra/canaries/{canary-keys.mjs → canary-keys.js} +1 -1
- package/dist/aws/infra/canaries/{canary-parameters.d.mts → canary-parameters.d.ts} +1 -1
- package/dist/aws/infra/canaries/canary-parameters.js +2 -0
- package/dist/aws/infra/canaries/{canary-role.d.mts → canary-role.d.ts} +1 -1
- package/dist/aws/infra/canaries/{canary-role.mjs → canary-role.js} +2 -5
- package/dist/aws/infra/canaries/{canary.d.mts → canary.d.ts} +4 -4
- package/dist/aws/infra/canaries/{canary.mjs → canary.js} +3 -4
- package/dist/aws/infra/canaries/{database-canary.d.mts → database-canary.d.ts} +4 -5
- package/dist/aws/infra/canaries/{database-canary.mjs → database-canary.js} +4 -11
- package/dist/aws/infra/canaries/{database-checker.d.mts → database-checker.d.ts} +5 -5
- package/dist/aws/infra/canaries/{database-checker.mjs → database-checker.js} +15 -12
- package/dist/aws/infra/canaries/{url-canary.d.mts → url-canary.d.ts} +5 -5
- package/dist/aws/infra/canaries/{url-canary.mjs → url-canary.js} +7 -12
- package/dist/aws/infra/canaries/{url-checker.d.mts → url-checker.d.ts} +2 -2
- package/dist/aws/infra/canaries/{url-checker.mjs → url-checker.js} +12 -21
- package/dist/aws/infra/{documentation.d.mts → documentation.d.ts} +2 -2
- package/dist/aws/infra/{documentation.mjs → documentation.js} +4 -3
- package/dist/aws/infra/{import-util.d.mts → import-util.d.ts} +2 -2
- package/dist/aws/infra/{import-util.mjs → import-util.js} +3 -3
- package/dist/aws/infra/{scheduler.d.mts → scheduler.d.ts} +2 -2
- package/dist/aws/infra/{scheduler.mjs → scheduler.js} +1 -3
- package/dist/aws/infra/{security-rule.d.mts → security-rule.d.ts} +1 -1
- package/dist/aws/infra/{security-rule.mjs → security-rule.js} +1 -2
- package/dist/aws/infra/{sqs-integration.d.mts → sqs-integration.d.ts} +3 -3
- package/dist/aws/infra/{sqs-integration.mjs → sqs-integration.js} +3 -7
- package/dist/aws/infra/{sqs-queue.d.mts → sqs-queue.d.ts} +1 -1
- package/dist/aws/infra/{sqs-queue.mjs → sqs-queue.js} +19 -19
- package/dist/aws/infra/stack/{lambda-configs.d.mts → lambda-configs.d.ts} +4 -4
- package/dist/aws/infra/stack/{lambda-configs.mjs → lambda-configs.js} +3 -7
- package/dist/aws/infra/stack/{monitoredfunction.d.mts → monitoredfunction.d.ts} +15 -15
- package/dist/aws/infra/stack/{monitoredfunction.mjs → monitoredfunction.js} +42 -43
- package/dist/aws/infra/stack/{parameters.mjs → parameters.js} +1 -1
- package/dist/aws/infra/stack/{rest_apis.d.mts → rest_apis.d.ts} +12 -6
- package/dist/aws/infra/stack/{rest_apis.mjs → rest_apis.js} +26 -24
- package/dist/aws/infra/stack/{stack-checking-aspect.mjs → stack-checking-aspect.js} +7 -2
- package/dist/aws/infra/stack/{stack.d.mts → stack.d.ts} +4 -4
- package/dist/aws/infra/stack/{stack.mjs → stack.js} +2 -5
- package/dist/aws/infra/stack/{subscription.d.mts → subscription.d.ts} +4 -4
- package/dist/aws/infra/stack/{subscription.mjs → subscription.js} +2 -6
- package/dist/aws/infra/stacks/{db-dns-stack.d.mts → db-dns-stack.d.ts} +1 -1
- package/dist/aws/infra/stacks/{db-dns-stack.mjs → db-dns-stack.js} +4 -4
- package/dist/aws/infra/stacks/{db-proxy-stack.d.mts → db-proxy-stack.d.ts} +2 -2
- package/dist/aws/infra/stacks/{db-proxy-stack.mjs → db-proxy-stack.js} +5 -6
- package/dist/aws/infra/stacks/{db-stack.d.mts → db-stack.d.ts} +4 -4
- package/dist/aws/infra/stacks/{db-stack.mjs → db-stack.js} +7 -10
- package/dist/aws/infra/stacks/intra-stack-configuration.js +2 -0
- package/dist/aws/infra/stacks/{network-stack.d.mts → network-stack.d.ts} +2 -2
- package/dist/aws/infra/stacks/{network-stack.mjs → network-stack.js} +4 -7
- package/dist/aws/infra/{usage-plans.d.mts → usage-plans.d.ts} +1 -1
- package/dist/aws/infra/{usage-plans.mjs → usage-plans.js} +1 -2
- package/dist/aws/runtime/{apikey.mjs → apikey.js} +1 -1
- package/dist/aws/runtime/{digitraffic-integration-response.d.mts → digitraffic-integration-response.d.ts} +1 -1
- package/dist/aws/runtime/{digitraffic-integration-response.mjs → digitraffic-integration-response.js} +4 -6
- package/dist/aws/runtime/{dt-logger-default.d.mts → dt-logger-default.d.ts} +2 -2
- package/dist/aws/runtime/{dt-logger-default.mjs → dt-logger-default.js} +2 -2
- package/dist/aws/runtime/{dt-logger.mjs → dt-logger.js} +9 -4
- package/dist/aws/runtime/{environment.mjs → environment.js} +2 -2
- package/dist/aws/runtime/{s3.d.mts → s3.d.ts} +1 -1
- package/dist/aws/runtime/{s3.mjs → s3.js} +3 -3
- package/dist/aws/runtime/secrets/{dbsecret.d.mts → dbsecret.d.ts} +1 -1
- package/dist/aws/runtime/secrets/{dbsecret.mjs → dbsecret.js} +6 -2
- package/dist/aws/runtime/secrets/proxy-holder.js +25 -0
- package/dist/aws/runtime/secrets/rds-holder.js +25 -0
- package/dist/aws/runtime/secrets/{secret-holder.d.mts → secret-holder.d.ts} +6 -5
- package/dist/aws/runtime/secrets/{secret-holder.mjs → secret-holder.js} +11 -12
- package/dist/aws/runtime/secrets/{secret.mjs → secret.js} +7 -3
- package/dist/aws/types/{errors.mjs → errors.js} +1 -1
- package/dist/aws/types/{lambda-response.mjs → lambda-response.js} +1 -1
- package/dist/aws/types/{mediatypes.mjs → mediatypes.js} +1 -1
- package/dist/aws/types/{model-with-reference.d.mts → model-with-reference.d.ts} +1 -1
- package/dist/aws/types/model-with-reference.js +2 -0
- package/dist/aws/types/proxytypes.js +2 -0
- package/dist/aws/types/tags.js +4 -0
- package/dist/database/{cached.d.mts → cached.d.ts} +1 -1
- package/dist/database/{cached.mjs → cached.js} +2 -4
- package/dist/database/{database.mjs → database.js} +4 -8
- package/dist/database/{last-updated.d.mts → last-updated.d.ts} +1 -1
- package/dist/database/{last-updated.mjs → last-updated.js} +3 -1
- package/dist/database/models.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/marine/{id_utils.mjs → id_utils.js} +2 -2
- package/dist/marine/rtz.js +2 -0
- package/dist/types/{async-timeout-error.mjs → async-timeout-error.js} +1 -1
- package/dist/types/aws-env.js +2 -0
- package/dist/types/either.js +2 -0
- package/dist/types/{http-error.mjs → http-error.js} +1 -1
- package/dist/types/{input-error.mjs → input-error.js} +1 -1
- package/dist/types/{language.mjs → language.js} +1 -1
- package/dist/types/{nullable.d.mts → nullable.d.ts} +1 -1
- package/dist/types/nullable.js +2 -0
- package/dist/types/{traffictype.mjs → traffictype.js} +1 -1
- package/dist/types/urn.js +2 -0
- package/dist/types/util-types.js +2 -0
- package/dist/types/{validator.mjs → validator.js} +1 -1
- package/dist/utils/{api-model.d.mts → api-model.d.ts} +6 -5
- package/dist/utils/{api-model.mjs → api-model.js} +14 -15
- package/dist/utils/{base64.mjs → base64.js} +3 -3
- package/dist/utils/{date-utils.mjs → date-utils.js} +1 -1
- package/dist/utils/{geojson-types.d.mts → geojson-types.d.ts} +2 -2
- package/dist/utils/{geojson-types.mjs → geojson-types.js} +1 -1
- package/dist/utils/{geometry.d.mts → geometry.d.ts} +4 -3
- package/dist/utils/{geometry.mjs → geometry.js} +7 -4
- package/dist/utils/{logging.d.mts → logging.d.ts} +1 -1
- package/dist/utils/{logging.mjs → logging.js} +5 -8
- package/dist/utils/{retry.mjs → retry.js} +6 -8
- package/dist/utils/{slack.mjs → slack.js} +3 -3
- package/dist/utils/{utils.d.mts → utils.d.ts} +2 -3
- package/dist/utils/{utils.mjs → utils.js} +9 -5
- package/package.json +132 -129
- package/dist/aws/infra/canaries/canary-alarm.d.mts +0 -6
- package/dist/aws/infra/canaries/canary-parameters.mjs +0 -2
- package/dist/aws/infra/stacks/intra-stack-configuration.mjs +0 -2
- package/dist/aws/runtime/secrets/proxy-holder.mjs +0 -25
- package/dist/aws/runtime/secrets/rds-holder.mjs +0 -25
- package/dist/aws/types/model-with-reference.mjs +0 -2
- package/dist/aws/types/proxytypes.mjs +0 -2
- package/dist/aws/types/tags.mjs +0 -4
- package/dist/database/models.mjs +0 -2
- package/dist/index.d.mts +0 -1
- package/dist/index.mjs +0 -2
- package/dist/marine/rtz.mjs +0 -2
- package/dist/types/aws-env.mjs +0 -2
- package/dist/types/either.mjs +0 -2
- package/dist/types/nullable.mjs +0 -2
- package/dist/types/urn.mjs +0 -2
- package/dist/types/util-types.mjs +0 -2
- /package/dist/{test/asserter.d.mts → __test__/asserter.d.ts} +0 -0
- /package/dist/__test__/{dependencies.test.d.mts → dependencies.test.d.ts} +0 -0
- /package/dist/__test__/{imports.test.d.mts → imports.test.d.ts} +0 -0
- /package/dist/__test__/infra/{acl-builder.test.d.mts → acl-builder.test.d.ts} +0 -0
- /package/dist/__test__/infra/api/{handler-factory.test.d.mts → handler-factory.test.d.ts} +0 -0
- /package/dist/__test__/infra/api/{response.test.d.mts → response.test.d.ts} +0 -0
- /package/dist/__test__/infra/api/{static-integration.test.d.mts → static-integration.test.d.ts} +0 -0
- /package/dist/__test__/infra/{documentation.test.d.mts → documentation.test.d.ts} +0 -0
- /package/dist/__test__/infra/{scheduler.test.d.mts → scheduler.test.d.ts} +0 -0
- /package/dist/__test__/infra/{security-rule.test.d.mts → security-rule.test.d.ts} +0 -0
- /package/dist/__test__/marine/{id_utils.test.d.mts → id_utils.test.d.ts} +0 -0
- /package/dist/{test/mock-ky.d.mts → __test__/mock-ky.d.ts} +0 -0
- /package/dist/__test__/promise/{promise.test.d.mts → promise.test.d.ts} +0 -0
- /package/dist/__test__/runtime/{dt-logger.test.d.mts → dt-logger.test.d.ts} +0 -0
- /package/dist/__test__/secrets/{secret-holder.test.d.mts → secret-holder.test.d.ts} +0 -0
- /package/dist/__test__/secrets/{secret.test.d.mts → secret.test.d.ts} +0 -0
- /package/dist/__test__/stack/{rest-apis.test.d.mts → rest-apis.test.d.ts} +0 -0
- /package/dist/__test__/test/{mock-ky.test.d.mts → mock-ky.test.d.ts} +0 -0
- /package/dist/{test/testutils.d.mts → __test__/testutils.d.ts} +0 -0
- /package/dist/__test__/types/{lambda-response.test.d.mts → lambda-response.test.d.ts} +0 -0
- /package/dist/__test__/utils/{date-utils.test.d.mts → date-utils.test.d.ts} +0 -0
- /package/dist/__test__/utils/{geometry.test.d.mts → geometry.test.d.ts} +0 -0
- /package/dist/__test__/utils/{logging.test.d.mts → logging.test.d.ts} +0 -0
- /package/dist/__test__/utils/{utils.test.d.mts → utils.test.d.ts} +0 -0
- /package/dist/aws/infra/canaries/{canary-keys.d.mts → canary-keys.d.ts} +0 -0
- /package/dist/aws/infra/stack/{parameters.d.mts → parameters.d.ts} +0 -0
- /package/dist/aws/infra/stack/{stack-checking-aspect.d.mts → stack-checking-aspect.d.ts} +0 -0
- /package/dist/aws/infra/stacks/{intra-stack-configuration.d.mts → intra-stack-configuration.d.ts} +0 -0
- /package/dist/aws/runtime/{apikey.d.mts → apikey.d.ts} +0 -0
- /package/dist/aws/runtime/{dt-logger.d.mts → dt-logger.d.ts} +0 -0
- /package/dist/aws/runtime/{environment.d.mts → environment.d.ts} +0 -0
- /package/dist/aws/runtime/secrets/{proxy-holder.d.mts → proxy-holder.d.ts} +0 -0
- /package/dist/aws/runtime/secrets/{rds-holder.d.mts → rds-holder.d.ts} +0 -0
- /package/dist/aws/runtime/secrets/{secret.d.mts → secret.d.ts} +0 -0
- /package/dist/aws/types/{errors.d.mts → errors.d.ts} +0 -0
- /package/dist/aws/types/{lambda-response.d.mts → lambda-response.d.ts} +0 -0
- /package/dist/aws/types/{mediatypes.d.mts → mediatypes.d.ts} +0 -0
- /package/dist/aws/types/{proxytypes.d.mts → proxytypes.d.ts} +0 -0
- /package/dist/aws/types/{tags.d.mts → tags.d.ts} +0 -0
- /package/dist/database/{database.d.mts → database.d.ts} +0 -0
- /package/dist/database/{models.d.mts → models.d.ts} +0 -0
- /package/dist/marine/{id_utils.d.mts → id_utils.d.ts} +0 -0
- /package/dist/marine/{rtz.d.mts → rtz.d.ts} +0 -0
- /package/dist/types/{async-timeout-error.d.mts → async-timeout-error.d.ts} +0 -0
- /package/dist/types/{aws-env.d.mts → aws-env.d.ts} +0 -0
- /package/dist/types/{either.d.mts → either.d.ts} +0 -0
- /package/dist/types/{http-error.d.mts → http-error.d.ts} +0 -0
- /package/dist/types/{input-error.d.mts → input-error.d.ts} +0 -0
- /package/dist/types/{language.d.mts → language.d.ts} +0 -0
- /package/dist/types/{traffictype.d.mts → traffictype.d.ts} +0 -0
- /package/dist/types/{urn.d.mts → urn.d.ts} +0 -0
- /package/dist/types/{util-types.d.mts → util-types.d.ts} +0 -0
- /package/dist/types/{validator.d.mts → validator.d.ts} +0 -0
- /package/dist/utils/{base64.d.mts → base64.d.ts} +0 -0
- /package/dist/utils/{date-utils.d.mts → date-utils.d.ts} +0 -0
- /package/dist/utils/{retry.d.mts → retry.d.ts} +0 -0
- /package/dist/utils/{slack.d.mts → slack.d.ts} +0 -0
@@ -3,7 +3,7 @@
|
|
3
3
|
*/
|
4
4
|
export class Asserter {
|
5
5
|
static assertEquals(value, expected) {
|
6
|
-
if (value
|
6
|
+
if (value !== expected) {
|
7
7
|
throw new Error(`Given value ${value} was not expected ${expected}`);
|
8
8
|
}
|
9
9
|
}
|
@@ -16,7 +16,7 @@ export class Asserter {
|
|
16
16
|
if (!data) {
|
17
17
|
throw new Error("Given array was not defined");
|
18
18
|
}
|
19
|
-
if (data.length
|
19
|
+
if (data.length !== expected) {
|
20
20
|
throw new Error(`Given array length ${data.length} was not expected ${expected}`);
|
21
21
|
}
|
22
22
|
}
|
@@ -38,4 +38,4 @@ export class Asserter {
|
|
38
38
|
expect(expected - value).toBeLessThanOrEqual(delta);
|
39
39
|
}
|
40
40
|
}
|
41
|
-
//# sourceMappingURL=asserter.
|
41
|
+
//# sourceMappingURL=asserter.js.map
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import { type DTDatabase } from "../database/database.
|
1
|
+
import { type DTDatabase } from "../database/database.js";
|
2
2
|
export declare function assertCount(db: DTDatabase, sql: string, count: number): Promise<void>;
|
3
3
|
export declare function dbTestBase(fn: (db: DTDatabase) => void, truncateFn: (db: DTDatabase) => Promise<void>, dbUser: string, dbPass: string, dbUri: string): () => void;
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import { DatabaseEnvironmentKeys, initDbConnection } from "../database/database.
|
1
|
+
import { DatabaseEnvironmentKeys, initDbConnection } from "../database/database.js";
|
2
|
+
import { getEnvVariableOrElse } from "../utils/utils.js";
|
2
3
|
export async function assertCount(db, sql, count) {
|
3
4
|
await db.one(sql).then((x) => expect(x.count).toEqual(count));
|
4
5
|
}
|
5
6
|
export function dbTestBase(fn, truncateFn, dbUser, dbPass, dbUri) {
|
6
|
-
const theDbUri =
|
7
|
+
const theDbUri = getEnvVariableOrElse("DB_URI", dbUri);
|
7
8
|
console.log(`Test database URI: ${theDbUri}`);
|
8
9
|
return () => {
|
9
10
|
const db = initDbConnection(dbUser, dbPass, "test", theDbUri, {
|
@@ -33,4 +34,4 @@ export function dbTestBase(fn, truncateFn, dbUser, dbPass, dbUri) {
|
|
33
34
|
fn(db);
|
34
35
|
};
|
35
36
|
}
|
36
|
-
//# sourceMappingURL=db-testutils.
|
37
|
+
//# sourceMappingURL=db-testutils.js.map
|
@@ -1,316 +1,316 @@
|
|
1
1
|
import { expect } from "@jest/globals";
|
2
2
|
test("index import ok?", () => {
|
3
|
-
const index = import("../index.
|
3
|
+
const index = import("../index.js");
|
4
4
|
return expect(index).resolves.toBeDefined();
|
5
5
|
});
|
6
6
|
test("database import ok?", () => {
|
7
|
-
const database = import("../database/database.
|
7
|
+
const database = import("../database/database.js");
|
8
8
|
return expect(database).resolves.toBeDefined();
|
9
9
|
});
|
10
10
|
test("cached import ok?", () => {
|
11
|
-
const cached = import("../database/cached.
|
11
|
+
const cached = import("../database/cached.js");
|
12
12
|
return expect(cached).resolves.toBeDefined();
|
13
13
|
});
|
14
14
|
test("models import ok?", () => {
|
15
|
-
const models = import("../database/models.
|
15
|
+
const models = import("../database/models.js");
|
16
16
|
return expect(models).resolves.toBeDefined();
|
17
17
|
});
|
18
18
|
test("lastUpdated import ok?", () => {
|
19
|
-
const lastUpdated = import("../database/last-updated.
|
19
|
+
const lastUpdated = import("../database/last-updated.js");
|
20
20
|
return expect(lastUpdated).resolves.toBeDefined();
|
21
21
|
});
|
22
22
|
test("urn import ok?", () => {
|
23
|
-
const urn = import("../types/urn.
|
23
|
+
const urn = import("../types/urn.js");
|
24
24
|
return expect(urn).resolves.toBeDefined();
|
25
25
|
});
|
26
26
|
test("utilTypes import ok?", () => {
|
27
|
-
const utilTypes = import("../types/util-types.
|
27
|
+
const utilTypes = import("../types/util-types.js");
|
28
28
|
return expect(utilTypes).resolves.toBeDefined();
|
29
29
|
});
|
30
30
|
test("either import ok?", () => {
|
31
|
-
const either = import("../types/either.
|
31
|
+
const either = import("../types/either.js");
|
32
32
|
return expect(either).resolves.toBeDefined();
|
33
33
|
});
|
34
34
|
test("validator import ok?", () => {
|
35
|
-
const validator = import("../types/validator.
|
35
|
+
const validator = import("../types/validator.js");
|
36
36
|
return expect(validator).resolves.toBeDefined();
|
37
37
|
});
|
38
38
|
test("nullable import ok?", () => {
|
39
|
-
const nullable = import("../types/nullable.
|
39
|
+
const nullable = import("../types/nullable.js");
|
40
40
|
return expect(nullable).resolves.toBeDefined();
|
41
41
|
});
|
42
42
|
test("awsEnv import ok?", () => {
|
43
|
-
const awsEnv = import("../types/aws-env.
|
43
|
+
const awsEnv = import("../types/aws-env.js");
|
44
44
|
return expect(awsEnv).resolves.toBeDefined();
|
45
45
|
});
|
46
46
|
test("asyncTimeoutError import ok?", () => {
|
47
|
-
const asyncTimeoutError = import("../types/async-timeout-error.
|
47
|
+
const asyncTimeoutError = import("../types/async-timeout-error.js");
|
48
48
|
return expect(asyncTimeoutError).resolves.toBeDefined();
|
49
49
|
});
|
50
50
|
test("inputError import ok?", () => {
|
51
|
-
const inputError = import("../types/input-error.
|
51
|
+
const inputError = import("../types/input-error.js");
|
52
52
|
return expect(inputError).resolves.toBeDefined();
|
53
53
|
});
|
54
54
|
test("httpError import ok?", () => {
|
55
|
-
const httpError = import("../types/http-error.
|
55
|
+
const httpError = import("../types/http-error.js");
|
56
56
|
return expect(httpError).resolves.toBeDefined();
|
57
57
|
});
|
58
58
|
test("language import ok?", () => {
|
59
|
-
const language = import("../types/language.
|
59
|
+
const language = import("../types/language.js");
|
60
60
|
return expect(language).resolves.toBeDefined();
|
61
61
|
});
|
62
62
|
test("traffictype import ok?", () => {
|
63
|
-
const traffictype = import("../types/traffictype.
|
63
|
+
const traffictype = import("../types/traffictype.js");
|
64
64
|
return expect(traffictype).resolves.toBeDefined();
|
65
65
|
});
|
66
66
|
test("testutils import ok?", () => {
|
67
|
-
const testutils = import("../
|
67
|
+
const testutils = import("../__test__/testutils.js");
|
68
68
|
return expect(testutils).resolves.toBeDefined();
|
69
69
|
});
|
70
70
|
test("dbTestutils import ok?", () => {
|
71
|
-
const dbTestutils = import("../
|
71
|
+
const dbTestutils = import("../__test__/db-testutils.js");
|
72
72
|
return expect(dbTestutils).resolves.toBeDefined();
|
73
73
|
});
|
74
74
|
test("asserter import ok?", () => {
|
75
|
-
const asserter = import("../
|
75
|
+
const asserter = import("../__test__/asserter.js");
|
76
76
|
return expect(asserter).resolves.toBeDefined();
|
77
77
|
});
|
78
78
|
test("rtz import ok?", () => {
|
79
|
-
const rtz = import("../marine/rtz.
|
79
|
+
const rtz = import("../marine/rtz.js");
|
80
80
|
return expect(rtz).resolves.toBeDefined();
|
81
81
|
});
|
82
82
|
test("idUtils import ok?", () => {
|
83
|
-
const idUtils = import("../marine/id_utils.
|
83
|
+
const idUtils = import("../marine/id_utils.js");
|
84
84
|
return expect(idUtils).resolves.toBeDefined();
|
85
85
|
});
|
86
86
|
test("apiModel import ok?", () => {
|
87
|
-
const apiModel = import("../utils/api-model.
|
87
|
+
const apiModel = import("../utils/api-model.js");
|
88
88
|
return expect(apiModel).resolves.toBeDefined();
|
89
89
|
});
|
90
90
|
test("logging import ok?", () => {
|
91
|
-
const logging = import("../utils/logging.
|
91
|
+
const logging = import("../utils/logging.js");
|
92
92
|
return expect(logging).resolves.toBeDefined();
|
93
93
|
});
|
94
94
|
test("base64 import ok?", () => {
|
95
|
-
const base64 = import("../utils/base64.
|
95
|
+
const base64 = import("../utils/base64.js");
|
96
96
|
return expect(base64).resolves.toBeDefined();
|
97
97
|
});
|
98
98
|
test("dateUtils import ok?", () => {
|
99
|
-
const dateUtils = import("../utils/date-utils.
|
99
|
+
const dateUtils = import("../utils/date-utils.js");
|
100
100
|
return expect(dateUtils).resolves.toBeDefined();
|
101
101
|
});
|
102
102
|
test("geojsonTypes import ok?", () => {
|
103
|
-
const geojsonTypes = import("../utils/geojson-types.
|
103
|
+
const geojsonTypes = import("../utils/geojson-types.js");
|
104
104
|
return expect(geojsonTypes).resolves.toBeDefined();
|
105
105
|
});
|
106
106
|
test("slack import ok?", () => {
|
107
|
-
const slack = import("../utils/slack.
|
107
|
+
const slack = import("../utils/slack.js");
|
108
108
|
return expect(slack).resolves.toBeDefined();
|
109
109
|
});
|
110
110
|
test("utils import ok?", () => {
|
111
|
-
const utils = import("../utils/utils.
|
111
|
+
const utils = import("../utils/utils.js");
|
112
112
|
return expect(utils).resolves.toBeDefined();
|
113
113
|
});
|
114
114
|
test("retry import ok?", () => {
|
115
|
-
const retry = import("../utils/retry.
|
115
|
+
const retry = import("../utils/retry.js");
|
116
116
|
return expect(retry).resolves.toBeDefined();
|
117
117
|
});
|
118
118
|
test("geometry import ok?", () => {
|
119
|
-
const geometry = import("../utils/geometry.
|
119
|
+
const geometry = import("../utils/geometry.js");
|
120
120
|
return expect(geometry).resolves.toBeDefined();
|
121
121
|
});
|
122
122
|
test("sqsIntegration import ok?", () => {
|
123
|
-
const sqsIntegration = import("../aws/infra/sqs-integration.
|
123
|
+
const sqsIntegration = import("../aws/infra/sqs-integration.js");
|
124
124
|
return expect(sqsIntegration).resolves.toBeDefined();
|
125
125
|
});
|
126
126
|
test("networkStack import ok?", () => {
|
127
|
-
const networkStack = import("../aws/infra/stacks/network-stack.
|
127
|
+
const networkStack = import("../aws/infra/stacks/network-stack.js");
|
128
128
|
return expect(networkStack).resolves.toBeDefined();
|
129
129
|
});
|
130
130
|
test("dbStack import ok?", () => {
|
131
|
-
const dbStack = import("../aws/infra/stacks/db-stack.
|
131
|
+
const dbStack = import("../aws/infra/stacks/db-stack.js");
|
132
132
|
return expect(dbStack).resolves.toBeDefined();
|
133
133
|
});
|
134
134
|
test("dbProxyStack import ok?", () => {
|
135
|
-
const dbProxyStack = import("../aws/infra/stacks/db-proxy-stack.
|
135
|
+
const dbProxyStack = import("../aws/infra/stacks/db-proxy-stack.js");
|
136
136
|
return expect(dbProxyStack).resolves.toBeDefined();
|
137
137
|
});
|
138
138
|
test("intraStackConfiguration import ok?", () => {
|
139
|
-
const intraStackConfiguration = import("../aws/infra/stacks/intra-stack-configuration.
|
139
|
+
const intraStackConfiguration = import("../aws/infra/stacks/intra-stack-configuration.js");
|
140
140
|
return expect(intraStackConfiguration).resolves.toBeDefined();
|
141
141
|
});
|
142
142
|
test("dbDnsStack import ok?", () => {
|
143
|
-
const dbDnsStack = import("../aws/infra/stacks/db-dns-stack.
|
143
|
+
const dbDnsStack = import("../aws/infra/stacks/db-dns-stack.js");
|
144
144
|
return expect(dbDnsStack).resolves.toBeDefined();
|
145
145
|
});
|
146
146
|
test("documentation import ok?", () => {
|
147
|
-
const documentation = import("../aws/infra/documentation.
|
147
|
+
const documentation = import("../aws/infra/documentation.js");
|
148
148
|
return expect(documentation).resolves.toBeDefined();
|
149
149
|
});
|
150
150
|
test("usagePlans import ok?", () => {
|
151
|
-
const usagePlans = import("../aws/infra/usage-plans.
|
151
|
+
const usagePlans = import("../aws/infra/usage-plans.js");
|
152
152
|
return expect(usagePlans).resolves.toBeDefined();
|
153
153
|
});
|
154
154
|
test("scheduler import ok?", () => {
|
155
|
-
const scheduler = import("../aws/infra/scheduler.
|
155
|
+
const scheduler = import("../aws/infra/scheduler.js");
|
156
156
|
return expect(scheduler).resolves.toBeDefined();
|
157
157
|
});
|
158
158
|
test("importUtil import ok?", () => {
|
159
|
-
const importUtil = import("../aws/infra/import-util.
|
159
|
+
const importUtil = import("../aws/infra/import-util.js");
|
160
160
|
return expect(importUtil).resolves.toBeDefined();
|
161
161
|
});
|
162
162
|
test("sqsQueue import ok?", () => {
|
163
|
-
const sqsQueue = import("../aws/infra/sqs-queue.
|
163
|
+
const sqsQueue = import("../aws/infra/sqs-queue.js");
|
164
164
|
return expect(sqsQueue).resolves.toBeDefined();
|
165
165
|
});
|
166
166
|
test("response import ok?", () => {
|
167
|
-
const response = import("../aws/infra/api/response.
|
167
|
+
const response = import("../aws/infra/api/response.js");
|
168
168
|
return expect(response).resolves.toBeDefined();
|
169
169
|
});
|
170
170
|
test("staticIntegration import ok?", () => {
|
171
|
-
const staticIntegration = import("../aws/infra/api/static-integration.
|
171
|
+
const staticIntegration = import("../aws/infra/api/static-integration.js");
|
172
172
|
return expect(staticIntegration).resolves.toBeDefined();
|
173
173
|
});
|
174
174
|
test("responses import ok?", () => {
|
175
|
-
const responses = import("../aws/infra/api/responses.
|
175
|
+
const responses = import("../aws/infra/api/responses.js");
|
176
176
|
return expect(responses).resolves.toBeDefined();
|
177
177
|
});
|
178
178
|
test("handlerFactory import ok?", () => {
|
179
|
-
const handlerFactory = import("../aws/infra/api/handler-factory.
|
179
|
+
const handlerFactory = import("../aws/infra/api/handler-factory.js");
|
180
180
|
return expect(handlerFactory).resolves.toBeDefined();
|
181
181
|
});
|
182
182
|
test("integration import ok?", () => {
|
183
|
-
const integration = import("../aws/infra/api/integration.
|
183
|
+
const integration = import("../aws/infra/api/integration.js");
|
184
184
|
return expect(integration).resolves.toBeDefined();
|
185
185
|
});
|
186
186
|
test("stackCheckingAspect import ok?", () => {
|
187
|
-
const stackCheckingAspect = import("../aws/infra/stack/stack-checking-aspect.
|
187
|
+
const stackCheckingAspect = import("../aws/infra/stack/stack-checking-aspect.js");
|
188
188
|
return expect(stackCheckingAspect).resolves.toBeDefined();
|
189
189
|
});
|
190
190
|
test("restApis import ok?", () => {
|
191
|
-
const restApis = import("../aws/infra/stack/rest_apis.
|
191
|
+
const restApis = import("../aws/infra/stack/rest_apis.js");
|
192
192
|
return expect(restApis).resolves.toBeDefined();
|
193
193
|
});
|
194
194
|
test("lambdaConfigs import ok?", () => {
|
195
|
-
const lambdaConfigs = import("../aws/infra/stack/lambda-configs.
|
195
|
+
const lambdaConfigs = import("../aws/infra/stack/lambda-configs.js");
|
196
196
|
return expect(lambdaConfigs).resolves.toBeDefined();
|
197
197
|
});
|
198
198
|
test("monitoredfunction import ok?", () => {
|
199
|
-
const monitoredfunction = import("../aws/infra/stack/monitoredfunction.
|
199
|
+
const monitoredfunction = import("../aws/infra/stack/monitoredfunction.js");
|
200
200
|
return expect(monitoredfunction).resolves.toBeDefined();
|
201
201
|
});
|
202
202
|
test("subscription import ok?", () => {
|
203
|
-
const subscription = import("../aws/infra/stack/subscription.
|
203
|
+
const subscription = import("../aws/infra/stack/subscription.js");
|
204
204
|
return expect(subscription).resolves.toBeDefined();
|
205
205
|
});
|
206
206
|
test("parameters import ok?", () => {
|
207
|
-
const parameters = import("../aws/infra/stack/parameters.
|
207
|
+
const parameters = import("../aws/infra/stack/parameters.js");
|
208
208
|
return expect(parameters).resolves.toBeDefined();
|
209
209
|
});
|
210
210
|
test("stack import ok?", () => {
|
211
|
-
const stack = import("../aws/infra/stack/stack.
|
211
|
+
const stack = import("../aws/infra/stack/stack.js");
|
212
212
|
return expect(stack).resolves.toBeDefined();
|
213
213
|
});
|
214
214
|
test("securityRule import ok?", () => {
|
215
|
-
const securityRule = import("../aws/infra/security-rule.
|
215
|
+
const securityRule = import("../aws/infra/security-rule.js");
|
216
216
|
return expect(securityRule).resolves.toBeDefined();
|
217
217
|
});
|
218
218
|
test("canary import ok?", () => {
|
219
|
-
const canary = import("../aws/infra/canaries/canary.
|
219
|
+
const canary = import("../aws/infra/canaries/canary.js");
|
220
220
|
return expect(canary).resolves.toBeDefined();
|
221
221
|
});
|
222
222
|
test("databaseCanary import ok?", () => {
|
223
|
-
const databaseCanary = import("../aws/infra/canaries/database-canary.
|
223
|
+
const databaseCanary = import("../aws/infra/canaries/database-canary.js");
|
224
224
|
return expect(databaseCanary).resolves.toBeDefined();
|
225
225
|
});
|
226
226
|
test("canaryAlarm import ok?", () => {
|
227
|
-
const canaryAlarm = import("../aws/infra/canaries/canary-alarm.
|
227
|
+
const canaryAlarm = import("../aws/infra/canaries/canary-alarm.js");
|
228
228
|
return expect(canaryAlarm).resolves.toBeDefined();
|
229
229
|
});
|
230
230
|
test("canaryRole import ok?", () => {
|
231
|
-
const canaryRole = import("../aws/infra/canaries/canary-role.
|
231
|
+
const canaryRole = import("../aws/infra/canaries/canary-role.js");
|
232
232
|
return expect(canaryRole).resolves.toBeDefined();
|
233
233
|
});
|
234
234
|
test("urlCanary import ok?", () => {
|
235
|
-
const urlCanary = import("../aws/infra/canaries/url-canary.
|
235
|
+
const urlCanary = import("../aws/infra/canaries/url-canary.js");
|
236
236
|
return expect(urlCanary).resolves.toBeDefined();
|
237
237
|
});
|
238
238
|
test("canaryParameters import ok?", () => {
|
239
|
-
const canaryParameters = import("../aws/infra/canaries/canary-parameters.
|
239
|
+
const canaryParameters = import("../aws/infra/canaries/canary-parameters.js");
|
240
240
|
return expect(canaryParameters).resolves.toBeDefined();
|
241
241
|
});
|
242
242
|
test("canaryKeys import ok?", () => {
|
243
|
-
const canaryKeys = import("../aws/infra/canaries/canary-keys.
|
243
|
+
const canaryKeys = import("../aws/infra/canaries/canary-keys.js");
|
244
244
|
return expect(canaryKeys).resolves.toBeDefined();
|
245
245
|
});
|
246
246
|
test("proxytypes import ok?", () => {
|
247
|
-
const proxytypes = import("../aws/types/proxytypes.
|
247
|
+
const proxytypes = import("../aws/types/proxytypes.js");
|
248
248
|
return expect(proxytypes).resolves.toBeDefined();
|
249
249
|
});
|
250
250
|
test("tags import ok?", () => {
|
251
|
-
const tags = import("../aws/types/tags.
|
251
|
+
const tags = import("../aws/types/tags.js");
|
252
252
|
return expect(tags).resolves.toBeDefined();
|
253
253
|
});
|
254
254
|
test("mediatypes import ok?", () => {
|
255
|
-
const mediatypes = import("../aws/types/mediatypes.
|
255
|
+
const mediatypes = import("../aws/types/mediatypes.js");
|
256
256
|
return expect(mediatypes).resolves.toBeDefined();
|
257
257
|
});
|
258
258
|
test("modelWithReference import ok?", () => {
|
259
|
-
const modelWithReference = import("../aws/types/model-with-reference.
|
259
|
+
const modelWithReference = import("../aws/types/model-with-reference.js");
|
260
260
|
return expect(modelWithReference).resolves.toBeDefined();
|
261
261
|
});
|
262
262
|
test("errors import ok?", () => {
|
263
|
-
const errors = import("../aws/types/errors.
|
263
|
+
const errors = import("../aws/types/errors.js");
|
264
264
|
return expect(errors).resolves.toBeDefined();
|
265
265
|
});
|
266
266
|
test("lambdaResponse import ok?", () => {
|
267
|
-
const lambdaResponse = import("../aws/types/lambda-response.
|
267
|
+
const lambdaResponse = import("../aws/types/lambda-response.js");
|
268
268
|
return expect(lambdaResponse).resolves.toBeDefined();
|
269
269
|
});
|
270
270
|
test("dtLoggerDefault import ok?", () => {
|
271
|
-
const dtLoggerDefault = import("../aws/runtime/dt-logger-default.
|
271
|
+
const dtLoggerDefault = import("../aws/runtime/dt-logger-default.js");
|
272
272
|
return expect(dtLoggerDefault).resolves.toBeDefined();
|
273
273
|
});
|
274
274
|
test("secret import ok?", () => {
|
275
|
-
const secret = import("../aws/runtime/secrets/secret.
|
275
|
+
const secret = import("../aws/runtime/secrets/secret.js");
|
276
276
|
return expect(secret).resolves.toBeDefined();
|
277
277
|
});
|
278
278
|
test("proxyHolder import ok?", () => {
|
279
|
-
const proxyHolder = import("../aws/runtime/secrets/proxy-holder.
|
279
|
+
const proxyHolder = import("../aws/runtime/secrets/proxy-holder.js");
|
280
280
|
return expect(proxyHolder).resolves.toBeDefined();
|
281
281
|
});
|
282
282
|
test("dbsecret import ok?", () => {
|
283
|
-
const dbsecret = import("../aws/runtime/secrets/dbsecret.
|
283
|
+
const dbsecret = import("../aws/runtime/secrets/dbsecret.js");
|
284
284
|
return expect(dbsecret).resolves.toBeDefined();
|
285
285
|
});
|
286
286
|
test("rdsHolder import ok?", () => {
|
287
|
-
const rdsHolder = import("../aws/runtime/secrets/rds-holder.
|
287
|
+
const rdsHolder = import("../aws/runtime/secrets/rds-holder.js");
|
288
288
|
return expect(rdsHolder).resolves.toBeDefined();
|
289
289
|
});
|
290
290
|
test("secretHolder import ok?", () => {
|
291
|
-
const secretHolder = import("../aws/runtime/secrets/secret-holder.
|
291
|
+
const secretHolder = import("../aws/runtime/secrets/secret-holder.js");
|
292
292
|
return expect(secretHolder).resolves.toBeDefined();
|
293
293
|
});
|
294
294
|
test("dtLogger import ok?", () => {
|
295
|
-
const dtLogger = import("../aws/runtime/dt-logger.
|
295
|
+
const dtLogger = import("../aws/runtime/dt-logger.js");
|
296
296
|
return expect(dtLogger).resolves.toBeDefined();
|
297
297
|
});
|
298
298
|
test("s3 import ok?", () => {
|
299
|
-
const s3 = import("../aws/runtime/s3.
|
299
|
+
const s3 = import("../aws/runtime/s3.js");
|
300
300
|
return expect(s3).resolves.toBeDefined();
|
301
301
|
});
|
302
302
|
/*
|
303
303
|
temporary disable, enable after sdk v2 is kicked out
|
304
304
|
test('apikey import ok?', () => {
|
305
|
-
const apikey = import("../aws/runtime/apikey.
|
305
|
+
const apikey = import("../aws/runtime/apikey.js");
|
306
306
|
return expect(apikey).resolves.toBeDefined();
|
307
307
|
});*/
|
308
308
|
test("environment import ok?", () => {
|
309
|
-
const environment = import("../aws/runtime/environment.
|
309
|
+
const environment = import("../aws/runtime/environment.js");
|
310
310
|
return expect(environment).resolves.toBeDefined();
|
311
311
|
});
|
312
312
|
test("digitrafficIntegrationResponse import ok?", () => {
|
313
|
-
const digitrafficIntegrationResponse = import("../aws/runtime/digitraffic-integration-response.
|
313
|
+
const digitrafficIntegrationResponse = import("../aws/runtime/digitraffic-integration-response.js");
|
314
314
|
return expect(digitrafficIntegrationResponse).resolves.toBeDefined();
|
315
315
|
});
|
316
316
|
/*
|
@@ -319,4 +319,4 @@ test("digitrafficIntegrationResponse import ok?", () => {
|
|
319
319
|
*/
|
320
320
|
//const databaseChecker = import("../aws/infra/canaries/database-checker.mjs");
|
321
321
|
//const urlChecker = import("../aws/infra/canaries/url-checker.mjs");
|
322
|
-
//# sourceMappingURL=imports.test.
|
322
|
+
//# sourceMappingURL=imports.test.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AclBuilder } from "../../aws/infra/acl-builder.
|
1
|
+
import { AclBuilder } from "../../aws/infra/acl-builder.js";
|
2
2
|
import { App, Stack } from "aws-cdk-lib";
|
3
3
|
import { expect } from "@jest/globals";
|
4
4
|
describe("acl-builder tests", () => {
|
@@ -46,11 +46,11 @@ describe("acl-builder tests", () => {
|
|
46
46
|
for (const aclBuilder of [
|
47
47
|
createBuilder().withThrottleDigitrafficUserIp(undefined),
|
48
48
|
createBuilder().withThrottleDigitrafficUserIpAndUriPath(undefined),
|
49
|
-
createBuilder().withThrottleAnonymousUserIp(
|
50
|
-
createBuilder().withThrottleAnonymousUserIpAndUriPath(
|
49
|
+
createBuilder().withThrottleAnonymousUserIp(undefined),
|
50
|
+
createBuilder().withThrottleAnonymousUserIpAndUriPath(undefined),
|
51
51
|
]) {
|
52
52
|
expect(() => aclBuilder.build()).toThrowError("No rules");
|
53
53
|
}
|
54
54
|
});
|
55
55
|
});
|
56
|
-
//# sourceMappingURL=acl-builder.test.
|
56
|
+
//# sourceMappingURL=acl-builder.test.js.map
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { HandlerFactory } from "../../../aws/infra/api/handler-factory.
|
2
|
-
import { DtLogger } from "../../../aws/runtime/dt-logger.
|
3
|
-
import { LambdaResponse } from "../../../aws/types/lambda-response.mjs";
|
1
|
+
import { HandlerFactory } from "../../../aws/infra/api/handler-factory.js";
|
2
|
+
import { DtLogger } from "../../../aws/runtime/dt-logger.js";
|
4
3
|
import { jest } from "@jest/globals";
|
5
4
|
const logger = new DtLogger();
|
6
5
|
describe("handler-factory tests", () => {
|
@@ -40,4 +39,4 @@ describe("handler-factory tests", () => {
|
|
40
39
|
expect(eh).toHaveBeenCalledTimes(1);
|
41
40
|
});
|
42
41
|
});
|
43
|
-
//# sourceMappingURL=handler-factory.test.
|
42
|
+
//# sourceMappingURL=handler-factory.test.js.map
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { RESPONSE_DEFAULT_LAMBDA } from "../../../aws/infra/api/response.
|
1
|
+
import { RESPONSE_DEFAULT_LAMBDA } from "../../../aws/infra/api/response.js";
|
2
2
|
import etag from "etag";
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
4
3
|
//const velocity = require("velocityjs");
|
5
4
|
import velocity from "velocityjs";
|
6
5
|
const TEST_BODY = "Hello world!";
|
@@ -12,11 +11,7 @@ describe("response tests", () => {
|
|
12
11
|
return etag(bodyBase64);
|
13
12
|
}
|
14
13
|
function generateResponse(status, fileName, timestamp) {
|
15
|
-
|
16
|
-
const compile = new velocity.Compile(
|
17
|
-
// eslint-disable-next-line
|
18
|
-
velocity.parse(RESPONSE_DEFAULT_LAMBDA));
|
19
|
-
// eslint-disable-next-line
|
14
|
+
const compile = new velocity.Compile(velocity.parse(RESPONSE_DEFAULT_LAMBDA));
|
20
15
|
const output = compile.render({
|
21
16
|
input: {
|
22
17
|
path: () => ({
|
@@ -67,20 +62,17 @@ describe("response tests", () => {
|
|
67
62
|
assertOutputAndContext(output, context);
|
68
63
|
});
|
69
64
|
test("test 200 - filename", () => {
|
70
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
71
65
|
const [output, context] = generateResponse(200, "test.txt");
|
72
66
|
assertOutputAndContext(output, context, undefined, undefined, 'attachment; filename="test.txt"');
|
73
67
|
});
|
74
68
|
test("test 200 - filename and timestamp", () => {
|
75
69
|
const now = new Date();
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
77
70
|
const [output, context] = generateResponse(200, "test.txt", now);
|
78
71
|
assertOutputAndContext(output, context, undefined, undefined, 'attachment; filename="test.txt"', now);
|
79
72
|
});
|
80
73
|
test("test 204", () => {
|
81
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
82
74
|
const [output, context] = generateResponse(204);
|
83
75
|
assertOutputAndContext(output, context, 204, "text/plain");
|
84
76
|
});
|
85
77
|
});
|
86
|
-
//# sourceMappingURL=response.test.
|
78
|
+
//# sourceMappingURL=response.test.js.map
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { DigitrafficStaticIntegration } from "../../../aws/infra/api/static-integration.
|
2
|
-
import { MediaType } from "../../../aws/types/mediatypes.
|
1
|
+
import { DigitrafficStaticIntegration } from "../../../aws/infra/api/static-integration.js";
|
2
|
+
import { MediaType } from "../../../aws/types/mediatypes.js";
|
3
3
|
describe("response tests", () => {
|
4
4
|
it("createIntegrationResponse works", () => {
|
5
5
|
const integrationResponse = DigitrafficStaticIntegration.createIntegrationResponse("FakeResource", MediaType.APPLICATION_JSON, { "test-header": "test-value" });
|
@@ -25,4 +25,4 @@ describe("response tests", () => {
|
|
25
25
|
});
|
26
26
|
});
|
27
27
|
});
|
28
|
-
//# sourceMappingURL=static-integration.test.
|
28
|
+
//# sourceMappingURL=static-integration.test.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { DocumentationPart } from "../../aws/infra/documentation.
|
1
|
+
import { DocumentationPart } from "../../aws/infra/documentation.js";
|
2
2
|
const METHOD_NAME = "test";
|
3
3
|
const SUMMARY = "summary";
|
4
4
|
const PARAMETER_NAME = "parameter";
|
@@ -34,4 +34,4 @@ describe("DocumentationPart tests", () => {
|
|
34
34
|
expect(part.documentationProperties.deprecated).toBeFalsy();
|
35
35
|
});
|
36
36
|
});
|
37
|
-
//# sourceMappingURL=documentation.test.
|
37
|
+
//# sourceMappingURL=documentation.test.js.map
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { App, Stack } from "aws-cdk-lib";
|
2
|
-
import { Scheduler } from "../../aws/infra/scheduler.
|
2
|
+
import { Scheduler } from "../../aws/infra/scheduler.js";
|
3
3
|
import { Template } from "aws-cdk-lib/assertions";
|
4
4
|
describe("scheduler tests", () => {
|
5
5
|
function expectRate(createScheduler, expectedRate) {
|
@@ -19,4 +19,4 @@ describe("scheduler tests", () => {
|
|
19
19
|
test("everyHour", () => expectRate((stack) => Scheduler.everyHour(stack, "test"), "rate(1 hour)"));
|
20
20
|
test("everyDay", () => expectRate((stack) => Scheduler.everyDay(stack, "test"), "rate(1 day)"));
|
21
21
|
});
|
22
|
-
//# sourceMappingURL=scheduler.test.
|
22
|
+
//# sourceMappingURL=scheduler.test.js.map
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { App, Stack } from "aws-cdk-lib";
|
2
2
|
import { Template } from "aws-cdk-lib/assertions";
|
3
|
-
import { DigitrafficSecurityRule } from "../../aws/infra/security-rule.
|
3
|
+
import { DigitrafficSecurityRule } from "../../aws/infra/security-rule.js";
|
4
4
|
import { Topic } from "aws-cdk-lib/aws-sns";
|
5
5
|
describe("security-rule tests", () => {
|
6
6
|
test("create", () => {
|
@@ -17,4 +17,4 @@ describe("security-rule tests", () => {
|
|
17
17
|
});
|
18
18
|
});
|
19
19
|
});
|
20
|
-
//# sourceMappingURL=security-rule.test.
|
20
|
+
//# sourceMappingURL=security-rule.test.js.map
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as IdUtils from "../../marine/id_utils.
|
2
|
-
import { getRandomNumber } from "../../
|
1
|
+
import * as IdUtils from "../../marine/id_utils.js";
|
2
|
+
import { getRandomNumber } from "../../__test__/testutils.js";
|
3
3
|
describe("IdUtils tests", () => {
|
4
4
|
test("isValidLOCODE - success", () => {
|
5
5
|
expect(IdUtils.isValidLOCODE("FILOL")).toBe(true);
|
@@ -41,4 +41,4 @@ describe("IdUtils tests", () => {
|
|
41
41
|
expect(IdUtils.isValidMMSI(getRandomNumber(999999999 + 1, 9999999999))).toBe(false);
|
42
42
|
});
|
43
43
|
});
|
44
|
-
//# sourceMappingURL=id_utils.test.
|
44
|
+
//# sourceMappingURL=id_utils.test.js.map
|