@digitraffic/common 2024.1.19-1 → 2024.1.23-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/aws/infra/api/{handler-factory.d.ts → handler-factory.d.mts} +2 -2
- package/dist/aws/infra/api/{handler-factory.js → handler-factory.mjs} +2 -2
- package/dist/aws/infra/api/{integration.d.ts → integration.d.mts} +1 -1
- package/dist/aws/infra/api/{integration.js → integration.mjs} +3 -3
- package/dist/aws/infra/api/{response.d.ts → response.d.mts} +1 -1
- package/dist/aws/infra/api/{response.js → response.mjs} +3 -3
- package/dist/aws/infra/api/{responses.d.ts → responses.d.mts} +1 -1
- package/dist/aws/infra/api/{responses.js → responses.mjs} +3 -3
- package/dist/aws/infra/api/{static-integration.d.ts → static-integration.d.mts} +1 -1
- package/dist/aws/infra/api/{static-integration.js → static-integration.mjs} +3 -3
- package/dist/aws/infra/canaries/{canary-alarm.d.ts → canary-alarm.d.mts} +1 -1
- package/dist/aws/infra/canaries/{canary-alarm.js → canary-alarm.mjs} +1 -1
- package/dist/aws/infra/canaries/{canary-keys.js → canary-keys.mjs} +1 -1
- package/dist/aws/infra/canaries/canary-parameters.mjs +2 -0
- package/dist/aws/infra/canaries/{canary-role.js → canary-role.mjs} +1 -1
- package/dist/aws/infra/canaries/{canary.d.ts → canary.d.mts} +2 -2
- package/dist/aws/infra/canaries/{canary.js → canary.mjs} +2 -2
- package/dist/aws/infra/canaries/{database-canary.d.ts → database-canary.d.mts} +3 -3
- package/dist/aws/infra/canaries/{database-canary.js → database-canary.mjs} +2 -2
- package/dist/aws/infra/canaries/{database-checker.d.ts → database-checker.d.mts} +1 -1
- package/dist/aws/infra/canaries/{database-checker.js → database-checker.mjs} +7 -9
- package/dist/aws/infra/canaries/{url-canary.d.ts → url-canary.d.mts} +4 -4
- package/dist/aws/infra/canaries/{url-canary.js → url-canary.mjs} +3 -3
- package/dist/aws/infra/canaries/{url-checker.d.ts → url-checker.d.mts} +1 -1
- package/dist/aws/infra/canaries/{url-checker.js → url-checker.mjs} +10 -10
- package/dist/aws/infra/{documentation.js → documentation.mjs} +1 -1
- package/dist/aws/infra/{import-util.js → import-util.mjs} +1 -1
- package/dist/aws/infra/{scheduler.js → scheduler.mjs} +1 -1
- package/dist/aws/infra/{security-rule.js → security-rule.mjs} +1 -1
- package/dist/aws/infra/{sqs-integration.js → sqs-integration.mjs} +1 -1
- package/dist/aws/infra/{sqs-queue.d.ts → sqs-queue.d.mts} +1 -1
- package/dist/aws/infra/{sqs-queue.js → sqs-queue.mjs} +4 -7
- package/dist/aws/infra/stack/{lambda-configs.d.ts → lambda-configs.d.mts} +2 -2
- package/dist/aws/infra/stack/{lambda-configs.js → lambda-configs.mjs} +1 -1
- package/dist/aws/infra/stack/{monitoredfunction.d.ts → monitoredfunction.d.mts} +3 -3
- package/dist/aws/infra/stack/{monitoredfunction.js → monitoredfunction.mjs} +3 -3
- package/dist/aws/infra/stack/{parameters.js → parameters.mjs} +1 -1
- package/dist/aws/infra/stack/{rest_apis.d.ts → rest_apis.d.mts} +3 -3
- package/dist/aws/infra/stack/{rest_apis.js → rest_apis.mjs} +4 -4
- package/dist/aws/infra/stack/{stack-checking-aspect.d.ts → stack-checking-aspect.d.mts} +1 -1
- package/dist/aws/infra/stack/{stack-checking-aspect.js → stack-checking-aspect.mjs} +2 -2
- package/dist/aws/infra/stack/{stack.d.ts → stack.d.mts} +2 -2
- package/dist/aws/infra/stack/{stack.js → stack.mjs} +2 -2
- package/dist/aws/infra/stack/{subscription.d.ts → subscription.d.mts} +2 -2
- package/dist/aws/infra/stack/{subscription.js → subscription.mjs} +1 -1
- package/dist/aws/infra/stacks/{db-dns-stack.d.ts → db-dns-stack.d.mts} +1 -1
- package/dist/aws/infra/stacks/{db-dns-stack.js → db-dns-stack.mjs} +3 -3
- package/dist/aws/infra/stacks/{db-proxy-stack.d.ts → db-proxy-stack.d.mts} +1 -1
- package/dist/aws/infra/stacks/{db-proxy-stack.js → db-proxy-stack.mjs} +4 -4
- package/dist/aws/infra/stacks/{db-stack.d.ts → db-stack.d.mts} +1 -1
- package/dist/aws/infra/stacks/{db-stack.js → db-stack.mjs} +3 -3
- package/dist/aws/infra/stacks/intra-stack-configuration.mjs +2 -0
- package/dist/aws/infra/stacks/{network-stack.d.ts → network-stack.d.mts} +1 -1
- package/dist/aws/infra/stacks/{network-stack.js → network-stack.mjs} +2 -2
- package/dist/aws/infra/{usage-plans.js → usage-plans.mjs} +1 -1
- package/dist/aws/runtime/{apikey.js → apikey.mjs} +1 -1
- package/dist/aws/runtime/{digitraffic-integration-response.d.ts → digitraffic-integration-response.d.mts} +1 -1
- package/dist/aws/runtime/{digitraffic-integration-response.js → digitraffic-integration-response.mjs} +3 -3
- package/dist/aws/runtime/{dt-logger-default.d.ts → dt-logger-default.d.mts} +2 -2
- package/dist/aws/runtime/{dt-logger-default.js → dt-logger-default.mjs} +2 -2
- package/dist/aws/runtime/{dt-logger.js → dt-logger.mjs} +1 -1
- package/dist/aws/runtime/{environment.js → environment.mjs} +1 -1
- package/dist/aws/runtime/{messaging.js → messaging.mjs} +1 -1
- package/dist/aws/runtime/{s3.js → s3.mjs} +1 -1
- package/dist/aws/runtime/secrets/{dbsecret.d.ts → dbsecret.d.mts} +1 -1
- package/dist/aws/runtime/secrets/{dbsecret.js → dbsecret.mjs} +1 -1
- package/dist/aws/runtime/secrets/{proxy-holder.js → proxy-holder.mjs} +5 -5
- package/dist/aws/runtime/secrets/{rds-holder.js → rds-holder.mjs} +5 -5
- package/dist/aws/runtime/secrets/{secret-holder.d.ts → secret-holder.d.mts} +1 -1
- package/dist/aws/runtime/secrets/{secret-holder.js → secret-holder.mjs} +9 -10
- package/dist/aws/runtime/secrets/{secret.js → secret.mjs} +3 -3
- package/dist/aws/types/{errors.js → errors.mjs} +1 -1
- package/dist/aws/types/{lambda-response.js → lambda-response.mjs} +1 -1
- package/dist/aws/types/{mediatypes.js → mediatypes.mjs} +1 -1
- package/dist/aws/types/model-with-reference.mjs +2 -0
- package/dist/aws/types/proxytypes.mjs +2 -0
- package/dist/aws/types/{tags.js → tags.mjs} +1 -1
- package/dist/database/{cached.d.ts → cached.d.mts} +1 -1
- package/dist/database/{cached.js → cached.mjs} +3 -2
- package/dist/database/{database.d.ts → database.d.mts} +1 -1
- package/dist/database/{database.js → database.mjs} +6 -6
- package/dist/database/{last-updated.d.ts → last-updated.d.mts} +1 -1
- package/dist/database/{last-updated.js → last-updated.mjs} +1 -1
- package/dist/database/models.mjs +2 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +2 -0
- package/dist/marine/{id_utils.js → id_utils.mjs} +1 -1
- package/dist/marine/rtz.mjs +2 -0
- package/dist/test/{asserter.js → asserter.mjs} +1 -1
- package/dist/test/{db-testutils.d.ts → db-testutils.d.mts} +1 -1
- package/dist/test/{db-testutils.js → db-testutils.mjs} +2 -2
- package/dist/test/{httpserver.js → httpserver.mjs} +1 -1
- package/dist/test/{secrets-manager.js → secrets-manager.mjs} +4 -6
- package/dist/test/{testutils.js → testutils.mjs} +1 -1
- package/dist/types/{async-timeout-error.js → async-timeout-error.mjs} +1 -1
- package/dist/types/aws-env.mjs +2 -0
- package/dist/types/either.mjs +2 -0
- package/dist/types/{http-error.js → http-error.mjs} +1 -1
- package/dist/types/{input-error.js → input-error.mjs} +1 -1
- package/dist/types/{language.js → language.mjs} +1 -1
- package/dist/types/{nullable.d.ts → nullable.d.mts} +1 -1
- package/dist/types/nullable.mjs +2 -0
- package/dist/types/{traffictype.js → traffictype.mjs} +1 -1
- package/dist/types/urn.mjs +2 -0
- package/dist/types/util-types.mjs +2 -0
- package/dist/types/{validator.js → validator.mjs} +1 -1
- package/dist/utils/{api-model.d.ts → api-model.d.mts} +1 -1
- package/dist/utils/{api-model.js → api-model.mjs} +1 -1
- package/dist/utils/{base64.js → base64.mjs} +1 -1
- package/dist/utils/{date-utils.js → date-utils.mjs} +1 -1
- package/dist/utils/{geojson-types.js → geojson-types.mjs} +1 -1
- package/dist/utils/{geometry.js → geometry.mjs} +2 -2
- package/dist/utils/{logging.d.ts → logging.d.mts} +1 -1
- package/dist/utils/{logging.js → logging.mjs} +3 -3
- package/dist/utils/{retry.js → retry.mjs} +4 -4
- package/dist/utils/{slack.js → slack.mjs} +3 -3
- package/dist/utils/{utils.d.ts → utils.d.mts} +2 -2
- package/dist/utils/{utils.js → utils.mjs} +2 -2
- package/package.json +105 -105
- package/src/aws/infra/api/{handler-factory.ts → handler-factory.mts} +3 -3
- package/src/aws/infra/api/{integration.ts → integration.mts} +2 -2
- package/src/aws/infra/api/{response.ts → response.mts} +2 -2
- package/src/aws/infra/api/{responses.ts → responses.mts} +3 -3
- package/src/aws/infra/api/{static-integration.ts → static-integration.mts} +2 -2
- package/src/aws/infra/canaries/Synthetics.d.mts +21 -0
- package/src/aws/infra/canaries/{canary-alarm.ts → canary-alarm.mts} +1 -1
- package/src/aws/infra/canaries/{canary.ts → canary.mts} +3 -3
- package/src/aws/infra/canaries/{database-canary.ts → database-canary.mts} +3 -3
- package/src/aws/infra/canaries/{database-checker.ts → database-checker.mts} +7 -10
- package/src/aws/infra/canaries/{url-canary.ts → url-canary.mts} +6 -6
- package/src/aws/infra/canaries/{url-checker.ts → url-checker.mts} +9 -29
- package/src/aws/infra/{sqs-queue.ts → sqs-queue.mts} +3 -6
- package/src/aws/infra/stack/{lambda-configs.ts → lambda-configs.mts} +2 -2
- package/src/aws/infra/stack/{monitoredfunction.ts → monitoredfunction.mts} +4 -4
- package/src/aws/infra/stack/{rest_apis.ts → rest_apis.mts} +6 -6
- package/src/aws/infra/stack/{stack-checking-aspect.ts → stack-checking-aspect.mts} +1 -1
- package/src/aws/infra/stack/{stack.ts → stack.mts} +3 -3
- package/src/aws/infra/stack/{subscription.ts → subscription.mts} +2 -2
- package/src/aws/infra/stacks/{db-dns-stack.ts → db-dns-stack.mts} +3 -3
- package/src/aws/infra/stacks/{db-proxy-stack.ts → db-proxy-stack.mts} +4 -4
- package/src/aws/infra/stacks/{db-stack.ts → db-stack.mts} +3 -3
- package/src/aws/infra/stacks/{network-stack.ts → network-stack.mts} +2 -2
- package/src/aws/runtime/{digitraffic-integration-response.ts → digitraffic-integration-response.mts} +2 -2
- package/src/aws/runtime/{dt-logger-default.ts → dt-logger-default.mts} +2 -2
- package/src/aws/runtime/secrets/{dbsecret.ts → dbsecret.mts} +1 -1
- package/src/aws/runtime/secrets/node-ttl.d.mts +12 -0
- package/src/aws/runtime/secrets/{proxy-holder.ts → proxy-holder.mts} +4 -4
- package/src/aws/runtime/secrets/{rds-holder.ts → rds-holder.mts} +4 -4
- package/src/aws/runtime/secrets/{secret-holder.ts → secret-holder.mts} +8 -9
- package/src/aws/runtime/secrets/{secret.ts → secret.mts} +2 -2
- package/src/database/{cached.ts → cached.mts} +4 -2
- package/src/database/{database.ts → database.mts} +6 -6
- package/src/database/{last-updated.ts → last-updated.mts} +1 -1
- package/src/index.mts +2 -0
- package/src/test/{db-testutils.ts → db-testutils.mts} +2 -2
- package/src/test/{secrets-manager.ts → secrets-manager.mts} +3 -3
- package/src/types/{nullable.ts → nullable.mts} +1 -1
- package/src/utils/{api-model.ts → api-model.mts} +1 -1
- package/src/utils/{geometry.ts → geometry.mts} +1 -1
- package/src/utils/{logging.ts → logging.mts} +2 -2
- package/src/utils/{retry.ts → retry.mts} +3 -3
- package/src/utils/{slack.ts → slack.mts} +2 -2
- package/src/utils/{utils.ts → utils.mts} +3 -3
- package/dist/aws/infra/canaries/canary-parameters.js +0 -2
- package/dist/aws/infra/stacks/intra-stack-configuration.js +0 -2
- package/dist/aws/types/model-with-reference.js +0 -2
- package/dist/aws/types/proxytypes.js +0 -2
- package/dist/database/models.js +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/marine/rtz.js +0 -2
- package/dist/types/aws-env.js +0 -2
- package/dist/types/either.js +0 -2
- package/dist/types/nullable.js +0 -2
- package/dist/types/urn.js +0 -2
- package/dist/types/util-types.js +0 -2
- package/src/index.ts +0 -2
- /package/dist/aws/infra/canaries/{canary-keys.d.ts → canary-keys.d.mts} +0 -0
- /package/dist/aws/infra/canaries/{canary-parameters.d.ts → canary-parameters.d.mts} +0 -0
- /package/dist/aws/infra/canaries/{canary-role.d.ts → canary-role.d.mts} +0 -0
- /package/dist/aws/infra/{documentation.d.ts → documentation.d.mts} +0 -0
- /package/dist/aws/infra/{import-util.d.ts → import-util.d.mts} +0 -0
- /package/dist/aws/infra/{scheduler.d.ts → scheduler.d.mts} +0 -0
- /package/dist/aws/infra/{security-rule.d.ts → security-rule.d.mts} +0 -0
- /package/dist/aws/infra/{sqs-integration.d.ts → sqs-integration.d.mts} +0 -0
- /package/dist/aws/infra/stack/{parameters.d.ts → parameters.d.mts} +0 -0
- /package/dist/aws/infra/stacks/{intra-stack-configuration.d.ts → intra-stack-configuration.d.mts} +0 -0
- /package/dist/aws/infra/{usage-plans.d.ts → usage-plans.d.mts} +0 -0
- /package/dist/aws/runtime/{apikey.d.ts → apikey.d.mts} +0 -0
- /package/dist/aws/runtime/{dt-logger.d.ts → dt-logger.d.mts} +0 -0
- /package/dist/aws/runtime/{environment.d.ts → environment.d.mts} +0 -0
- /package/dist/aws/runtime/{messaging.d.ts → messaging.d.mts} +0 -0
- /package/dist/aws/runtime/{s3.d.ts → s3.d.mts} +0 -0
- /package/dist/aws/runtime/secrets/{proxy-holder.d.ts → proxy-holder.d.mts} +0 -0
- /package/dist/aws/runtime/secrets/{rds-holder.d.ts → rds-holder.d.mts} +0 -0
- /package/dist/aws/runtime/secrets/{secret.d.ts → secret.d.mts} +0 -0
- /package/dist/aws/types/{errors.d.ts → errors.d.mts} +0 -0
- /package/dist/aws/types/{lambda-response.d.ts → lambda-response.d.mts} +0 -0
- /package/dist/aws/types/{mediatypes.d.ts → mediatypes.d.mts} +0 -0
- /package/dist/aws/types/{model-with-reference.d.ts → model-with-reference.d.mts} +0 -0
- /package/dist/aws/types/{proxytypes.d.ts → proxytypes.d.mts} +0 -0
- /package/dist/aws/types/{tags.d.ts → tags.d.mts} +0 -0
- /package/dist/database/{models.d.ts → models.d.mts} +0 -0
- /package/dist/marine/{id_utils.d.ts → id_utils.d.mts} +0 -0
- /package/dist/marine/{rtz.d.ts → rtz.d.mts} +0 -0
- /package/dist/test/{asserter.d.ts → asserter.d.mts} +0 -0
- /package/dist/test/{httpserver.d.ts → httpserver.d.mts} +0 -0
- /package/dist/test/{secrets-manager.d.ts → secrets-manager.d.mts} +0 -0
- /package/dist/test/{testutils.d.ts → testutils.d.mts} +0 -0
- /package/dist/types/{async-timeout-error.d.ts → async-timeout-error.d.mts} +0 -0
- /package/dist/types/{aws-env.d.ts → aws-env.d.mts} +0 -0
- /package/dist/types/{either.d.ts → either.d.mts} +0 -0
- /package/dist/types/{http-error.d.ts → http-error.d.mts} +0 -0
- /package/dist/types/{input-error.d.ts → input-error.d.mts} +0 -0
- /package/dist/types/{language.d.ts → language.d.mts} +0 -0
- /package/dist/types/{traffictype.d.ts → traffictype.d.mts} +0 -0
- /package/dist/types/{urn.d.ts → urn.d.mts} +0 -0
- /package/dist/types/{util-types.d.ts → util-types.d.mts} +0 -0
- /package/dist/types/{validator.d.ts → validator.d.mts} +0 -0
- /package/dist/utils/{base64.d.ts → base64.d.mts} +0 -0
- /package/dist/utils/{date-utils.d.ts → date-utils.d.mts} +0 -0
- /package/dist/utils/{geojson-types.d.ts → geojson-types.d.mts} +0 -0
- /package/dist/utils/{geometry.d.ts → geometry.d.mts} +0 -0
- /package/dist/utils/{retry.d.ts → retry.d.mts} +0 -0
- /package/dist/utils/{slack.d.ts → slack.d.mts} +0 -0
- /package/src/@types/geojson-validation/{index.d.ts → index.d.mts} +0 -0
- /package/src/aws/infra/canaries/{canary-keys.ts → canary-keys.mts} +0 -0
- /package/src/aws/infra/canaries/{canary-parameters.ts → canary-parameters.mts} +0 -0
- /package/src/aws/infra/canaries/{canary-role.ts → canary-role.mts} +0 -0
- /package/src/aws/infra/{documentation.ts → documentation.mts} +0 -0
- /package/src/aws/infra/{import-util.ts → import-util.mts} +0 -0
- /package/src/aws/infra/{scheduler.ts → scheduler.mts} +0 -0
- /package/src/aws/infra/{security-rule.ts → security-rule.mts} +0 -0
- /package/src/aws/infra/{sqs-integration.ts → sqs-integration.mts} +0 -0
- /package/src/aws/infra/stack/{parameters.ts → parameters.mts} +0 -0
- /package/src/aws/infra/stacks/{intra-stack-configuration.ts → intra-stack-configuration.mts} +0 -0
- /package/src/aws/infra/{usage-plans.ts → usage-plans.mts} +0 -0
- /package/src/aws/runtime/{apikey.ts → apikey.mts} +0 -0
- /package/src/aws/runtime/{dt-logger.ts → dt-logger.mts} +0 -0
- /package/src/aws/runtime/{environment.ts → environment.mts} +0 -0
- /package/src/aws/runtime/{messaging.ts → messaging.mts} +0 -0
- /package/src/aws/runtime/{s3.ts → s3.mts} +0 -0
- /package/src/aws/types/{errors.ts → errors.mts} +0 -0
- /package/src/aws/types/{lambda-response.ts → lambda-response.mts} +0 -0
- /package/src/aws/types/{mediatypes.ts → mediatypes.mts} +0 -0
- /package/src/aws/types/{model-with-reference.ts → model-with-reference.mts} +0 -0
- /package/src/aws/types/{proxytypes.ts → proxytypes.mts} +0 -0
- /package/src/aws/types/{tags.ts → tags.mts} +0 -0
- /package/src/database/{models.ts → models.mts} +0 -0
- /package/src/marine/{id_utils.ts → id_utils.mts} +0 -0
- /package/src/marine/{rtz.ts → rtz.mts} +0 -0
- /package/src/test/{asserter.ts → asserter.mts} +0 -0
- /package/src/test/{httpserver.ts → httpserver.mts} +0 -0
- /package/src/test/{testutils.ts → testutils.mts} +0 -0
- /package/src/types/{async-timeout-error.ts → async-timeout-error.mts} +0 -0
- /package/src/types/{aws-env.ts → aws-env.mts} +0 -0
- /package/src/types/{either.ts → either.mts} +0 -0
- /package/src/types/{http-error.ts → http-error.mts} +0 -0
- /package/src/types/{input-error.ts → input-error.mts} +0 -0
- /package/src/types/{language.ts → language.mts} +0 -0
- /package/src/types/{traffictype.ts → traffictype.mts} +0 -0
- /package/src/types/{urn.ts → urn.mts} +0 -0
- /package/src/types/{util-types.ts → util-types.mts} +0 -0
- /package/src/types/{validator.ts → validator.mts} +0 -0
- /package/src/utils/{base64.ts → base64.mts} +0 -0
- /package/src/utils/{date-utils.ts → date-utils.mts} +0 -0
- /package/src/utils/{geojson-types.ts → geojson-types.mts} +0 -0
@@ -2,15 +2,15 @@ import { Function, FunctionProps } from "aws-cdk-lib/aws-lambda";
|
|
2
2
|
import { Stack } from "aws-cdk-lib";
|
3
3
|
import { SnsAction } from "aws-cdk-lib/aws-cloudwatch-actions";
|
4
4
|
import { ComparisonOperator, Metric } from "aws-cdk-lib/aws-cloudwatch";
|
5
|
-
import { DigitrafficStack } from "./stack.
|
5
|
+
import { DigitrafficStack } from "./stack.mjs";
|
6
6
|
import { ITopic } from "aws-cdk-lib/aws-sns";
|
7
7
|
import {
|
8
8
|
databaseFunctionProps,
|
9
9
|
LambdaEnvironment,
|
10
10
|
MonitoredFunctionParameters,
|
11
|
-
} from "./lambda-configs.
|
12
|
-
import { DigitrafficLogSubscriptions } from "./subscription.
|
13
|
-
import { TrafficType } from "../../../types/traffictype.
|
11
|
+
} from "./lambda-configs.mjs";
|
12
|
+
import { DigitrafficLogSubscriptions } from "./subscription.mjs";
|
13
|
+
import { TrafficType } from "../../../types/traffictype.mjs";
|
14
14
|
|
15
15
|
import _ from "lodash";
|
16
16
|
|
@@ -19,12 +19,12 @@ import {
|
|
19
19
|
PolicyStatement,
|
20
20
|
} from "aws-cdk-lib/aws-iam";
|
21
21
|
import { Construct } from "constructs";
|
22
|
-
import { getModelReference } from "../../../utils/api-model.
|
23
|
-
import { MediaType } from "../../types/mediatypes.
|
24
|
-
import { ModelWithReference } from "../../types/model-with-reference.
|
25
|
-
import { DocumentationPart, DocumentationProperties } from "../documentation.
|
26
|
-
import { createDefaultUsagePlan, createUsagePlan } from "../usage-plans.
|
27
|
-
import { DigitrafficStack } from "./stack.
|
22
|
+
import { getModelReference } from "../../../utils/api-model.mjs";
|
23
|
+
import { MediaType } from "../../types/mediatypes.mjs";
|
24
|
+
import { ModelWithReference } from "../../types/model-with-reference.mjs";
|
25
|
+
import { DocumentationPart, DocumentationProperties } from "../documentation.mjs";
|
26
|
+
import { createDefaultUsagePlan, createUsagePlan } from "../usage-plans.mjs";
|
27
|
+
import { DigitrafficStack } from "./stack.mjs";
|
28
28
|
|
29
29
|
import _ from "lodash";
|
30
30
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Annotations, IAspect, Stack } from "aws-cdk-lib";
|
2
2
|
import { CfnFunction, Runtime } from "aws-cdk-lib/aws-lambda";
|
3
3
|
import { CfnBucket } from "aws-cdk-lib/aws-s3";
|
4
|
-
import { DigitrafficStack, SOLUTION_KEY } from "./stack.
|
4
|
+
import { DigitrafficStack, SOLUTION_KEY } from "./stack.mjs";
|
5
5
|
import { IConstruct } from "constructs";
|
6
6
|
import { CfnMethod, CfnResource } from "aws-cdk-lib/aws-apigateway";
|
7
7
|
import { CfnQueue } from "aws-cdk-lib/aws-sqs";
|
@@ -5,10 +5,10 @@ import { StringParameter } from "aws-cdk-lib/aws-ssm";
|
|
5
5
|
import { ISecret, Secret } from "aws-cdk-lib/aws-secretsmanager";
|
6
6
|
import { Function as AWSFunction } from "aws-cdk-lib/aws-lambda";
|
7
7
|
|
8
|
-
import { StackCheckingAspect } from "./stack-checking-aspect.
|
8
|
+
import { StackCheckingAspect } from "./stack-checking-aspect.mjs";
|
9
9
|
import { Construct } from "constructs";
|
10
|
-
import { TrafficType } from "../../../types/traffictype.
|
11
|
-
import { DBLambdaEnvironment } from "./lambda-configs.
|
10
|
+
import { TrafficType } from "../../../types/traffictype.mjs";
|
11
|
+
import { DBLambdaEnvironment } from "./lambda-configs.mjs";
|
12
12
|
|
13
13
|
const SSM_ROOT = "/digitraffic";
|
14
14
|
export const SOLUTION_KEY = "Solution";
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { CfnSubscriptionFilter } from "aws-cdk-lib/aws-logs";
|
2
2
|
import { Function as AWSFunction } from "aws-cdk-lib/aws-lambda";
|
3
|
-
import { DigitrafficStack } from "./stack.
|
3
|
+
import { DigitrafficStack } from "./stack.mjs";
|
4
4
|
import { Construct } from "constructs";
|
5
|
-
import { MonitoredFunction } from "./monitoredfunction.
|
5
|
+
import { MonitoredFunction } from "./monitoredfunction.mjs";
|
6
6
|
|
7
7
|
/**
|
8
8
|
* Creates a subscription filter that subscribes to a Lambda Log Group and delivers the logs to another destination.
|
@@ -6,9 +6,9 @@ import {
|
|
6
6
|
RecordTarget,
|
7
7
|
RecordType,
|
8
8
|
} from "aws-cdk-lib/aws-route53";
|
9
|
-
import { InfraStackConfiguration } from "./intra-stack-configuration.
|
10
|
-
import { importVpc } from "../import-util.
|
11
|
-
import { getParameterValue } from "../stack/parameters.
|
9
|
+
import { InfraStackConfiguration } from "./intra-stack-configuration.mjs";
|
10
|
+
import { importVpc } from "../import-util.mjs";
|
11
|
+
import { getParameterValue } from "../stack/parameters.mjs";
|
12
12
|
|
13
13
|
const DEFAULT_RECORD_TTL = Duration.seconds(30);
|
14
14
|
|
@@ -7,10 +7,10 @@ import {
|
|
7
7
|
} from "aws-cdk-lib/aws-rds";
|
8
8
|
import { ISecret, Secret } from "aws-cdk-lib/aws-secretsmanager";
|
9
9
|
import { IVpc, SecurityGroup } from "aws-cdk-lib/aws-ec2";
|
10
|
-
import { InfraStackConfiguration } from "./intra-stack-configuration.
|
11
|
-
import { DbStack } from "./db-stack.
|
12
|
-
import { exportValue, importVpc } from "../import-util.
|
13
|
-
import { createParameter } from "../stack/parameters.
|
10
|
+
import { InfraStackConfiguration } from "./intra-stack-configuration.mjs";
|
11
|
+
import { DbStack } from "./db-stack.mjs";
|
12
|
+
import { exportValue, importVpc } from "../import-util.mjs";
|
13
|
+
import { createParameter } from "../stack/parameters.mjs";
|
14
14
|
import { Stack, Duration } from "aws-cdk-lib/core";
|
15
15
|
import { Construct } from "constructs/lib/construct.js";
|
16
16
|
|
@@ -19,10 +19,10 @@ import {
|
|
19
19
|
} from "aws-cdk-lib/aws-rds";
|
20
20
|
import { Construct } from "constructs/lib/construct.js";
|
21
21
|
import { Secret } from "aws-cdk-lib/aws-secretsmanager";
|
22
|
-
import { InfraStackConfiguration } from "./intra-stack-configuration.
|
23
|
-
import { exportValue, importVpc } from "../import-util.
|
22
|
+
import { InfraStackConfiguration } from "./intra-stack-configuration.mjs";
|
23
|
+
import { exportValue, importVpc } from "../import-util.mjs";
|
24
24
|
import { Duration, RemovalPolicy, Stack } from "aws-cdk-lib/core";
|
25
|
-
import { createParameter } from "../stack/parameters.
|
25
|
+
import { createParameter } from "../stack/parameters.mjs";
|
26
26
|
|
27
27
|
export interface DbConfiguration {
|
28
28
|
readonly cluster?: ClusterConfiguration;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { IpAddresses, IVpc, SubnetType, Vpc } from "aws-cdk-lib/aws-ec2";
|
2
|
-
import { InfraStackConfiguration } from "./intra-stack-configuration.
|
3
|
-
import { exportValue } from "../import-util.
|
2
|
+
import { InfraStackConfiguration } from "./intra-stack-configuration.mjs";
|
3
|
+
import { exportValue } from "../import-util.mjs";
|
4
4
|
import { Stack } from "aws-cdk-lib/core";
|
5
5
|
import { Construct } from "constructs/lib/construct.js";
|
6
6
|
|
package/src/aws/runtime/{digitraffic-integration-response.ts → digitraffic-integration-response.mts}
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { IntegrationResponse } from "aws-cdk-lib/aws-apigateway";
|
2
|
-
import { MediaType } from "../types/mediatypes.
|
2
|
+
import { MediaType } from "../types/mediatypes.mjs";
|
3
3
|
import {
|
4
4
|
getDeprecatedDefaultLambdaResponse,
|
5
5
|
RESPONSE_DEFAULT_LAMBDA,
|
6
|
-
} from "../infra/api/response.
|
6
|
+
} from "../infra/api/response.mjs";
|
7
7
|
|
8
8
|
export abstract class DigitrafficIntegrationResponse {
|
9
9
|
static ok(mediaType: MediaType, sunset?: string): IntegrationResponse {
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { DtLogger } from "./dt-logger.
|
1
|
+
import { DtLogger } from "./dt-logger.mjs";
|
2
2
|
|
3
3
|
/**
|
4
4
|
* You can use this for method name definition to match DtLogger LoggableType.method parameter.
|
5
5
|
*/
|
6
|
-
export type { LoggerMethodType } from "./dt-logger.
|
6
|
+
export type { LoggerMethodType } from "./dt-logger.mjs";
|
7
7
|
|
8
8
|
/**
|
9
9
|
* You can use this for your logging needs or create one locally and configure it as you wish.
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { SecretHolder } from "./secret-holder.
|
2
|
-
import { RdsProxySecretKey, RdsProxySecret } from "./dbsecret.
|
3
|
-
import { getEnvVariable } from "../../../utils/utils.
|
4
|
-
import { DatabaseEnvironmentKeys } from "../../../database/database.
|
1
|
+
import { SecretHolder } from "./secret-holder.mjs";
|
2
|
+
import { RdsProxySecretKey, RdsProxySecret } from "./dbsecret.mjs";
|
3
|
+
import { getEnvVariable } from "../../../utils/utils.mjs";
|
4
|
+
import { DatabaseEnvironmentKeys } from "../../../database/database.mjs";
|
5
5
|
|
6
6
|
const RDS_PROXY_SECRET_KEYS = Object.values(RdsProxySecretKey);
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { SecretHolder } from "./secret-holder.
|
2
|
-
import { RdsSecret, RdsSecretKey } from "./dbsecret.
|
3
|
-
import { getEnvVariable } from "../../../utils/utils.
|
4
|
-
import { DatabaseEnvironmentKeys } from "../../../database/database.
|
1
|
+
import { SecretHolder } from "./secret-holder.mjs";
|
2
|
+
import { RdsSecret, RdsSecretKey } from "./dbsecret.mjs";
|
3
|
+
import { getEnvVariable } from "../../../utils/utils.mjs";
|
4
|
+
import { DatabaseEnvironmentKeys } from "../../../database/database.mjs";
|
5
5
|
|
6
6
|
const RDS_SECRET_KEYS = Object.values(RdsSecretKey);
|
7
7
|
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import { GenericSecret, getSecret } from "./secret.
|
2
|
-
import { checkExpectedSecretKeys } from "./dbsecret.
|
3
|
-
import { getEnvVariable } from "../../../utils/utils.
|
4
|
-
import { logger } from "../dt-logger-default.
|
1
|
+
import { GenericSecret, getSecret } from "./secret.mjs";
|
2
|
+
import { checkExpectedSecretKeys } from "./dbsecret.mjs";
|
3
|
+
import { getEnvVariable } from "../../../utils/utils.mjs";
|
4
|
+
import { logger } from "../dt-logger-default.mjs";
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
const NodeTtlImport = await import("node-ttl");
|
7
|
+
//eslint-disable-next-line
|
8
|
+
const NodeTtl = NodeTtlImport.default;
|
8
9
|
|
9
10
|
const DEFAULT_PREFIX = "";
|
10
11
|
const DEFAULT_SECRET_KEY = "SECRET";
|
@@ -96,14 +97,12 @@ export class SecretHolder<Secret extends GenericSecret> {
|
|
96
97
|
}
|
97
98
|
|
98
99
|
private async getSecret<S>(): Promise<S> {
|
99
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
100
100
|
const secret: S | undefined = this.secretCache.get(DEFAULT_SECRET_KEY);
|
101
101
|
|
102
102
|
if (!secret) {
|
103
103
|
await this.initSecret();
|
104
104
|
}
|
105
105
|
|
106
|
-
|
107
|
-
return secret ?? (this.secretCache.get(DEFAULT_SECRET_KEY) as S);
|
106
|
+
return secret ?? (this.secretCache.get(DEFAULT_SECRET_KEY));
|
108
107
|
}
|
109
108
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { SecretsManager } from "aws-sdk";
|
2
|
-
import { getEnvVariable, getEnvVariableOrElse } from "../../../utils/utils.
|
3
|
-
import { EnvKeys } from "../environment.
|
2
|
+
import { getEnvVariable, getEnvVariableOrElse } from "../../../utils/utils.mjs";
|
3
|
+
import { EnvKeys } from "../environment.mjs";
|
4
4
|
|
5
5
|
// SECRET_OVERRIDE_AWS_REGION might not have been set before import of
|
6
6
|
// secret, so we need to lazy initialize SecretsManager
|
@@ -1,5 +1,7 @@
|
|
1
|
-
import
|
2
|
-
import { DTDatabase, DTTransaction } from "./database.
|
1
|
+
import pg from "pg-promise";
|
2
|
+
import { DTDatabase, DTTransaction } from "./database.mjs";
|
3
|
+
|
4
|
+
const { PreparedStatement } = pg;
|
3
5
|
|
4
6
|
export interface CachedValue<T> {
|
5
7
|
content: T;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { IDatabase, ITask } from "pg-promise";
|
2
|
-
import { getEnvVariable, getEnvVariableOrElse } from "../utils/utils.
|
3
|
-
import { logger } from "../aws/runtime/dt-logger-default.
|
4
|
-
import { logException } from "../utils/logging.
|
1
|
+
import { type IDatabase, type ITask } from "pg-promise";
|
2
|
+
import { getEnvVariable, getEnvVariableOrElse } from "../utils/utils.mjs";
|
3
|
+
import { logger } from "../aws/runtime/dt-logger-default.mjs";
|
4
|
+
import { logException } from "../utils/logging.mjs";
|
5
5
|
|
6
6
|
export enum DatabaseEnvironmentKeys {
|
7
7
|
DB_USER = "DB_USER",
|
@@ -11,8 +11,8 @@ export enum DatabaseEnvironmentKeys {
|
|
11
11
|
DB_APPLICATION = "DB_APPLICATION",
|
12
12
|
}
|
13
13
|
|
14
|
-
|
15
|
-
const pgp =
|
14
|
+
const pgpImport = await import("pg-promise");
|
15
|
+
const pgp = pgpImport.default();
|
16
16
|
|
17
17
|
// convert numeric types to number instead of string
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
package/src/index.mts
ADDED
@@ -2,8 +2,8 @@ import {
|
|
2
2
|
DatabaseEnvironmentKeys,
|
3
3
|
DTDatabase,
|
4
4
|
initDbConnection,
|
5
|
-
} from "../database/database.
|
6
|
-
import { Countable } from "../database/models.
|
5
|
+
} from "../database/database.mjs";
|
6
|
+
import { Countable } from "../database/models.mjs";
|
7
7
|
|
8
8
|
export async function assertCount(db: DTDatabase, sql: string, count: number) {
|
9
9
|
await db.one(sql).then((x: Countable) => expect(x.count).toEqual(count));
|
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
const AWS = await import("aws-sdk");
|
2
2
|
import * as sinon from "sinon";
|
3
|
-
import { EnvKeys } from "../aws/runtime/environment.
|
4
|
-
import { setEnvVariable } from "../utils/utils.
|
3
|
+
import { EnvKeys } from "../aws/runtime/environment.mjs";
|
4
|
+
import { setEnvVariable } from "../utils/utils.mjs";
|
5
5
|
|
6
6
|
setEnvVariable(EnvKeys.AWS_REGION, "eu-west-1");
|
7
7
|
const secretValue = sinon.stub();
|
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
JsonSchemaType,
|
7
7
|
JsonSchemaVersion,
|
8
8
|
} from 'aws-cdk-lib/aws-apigateway';
|
9
|
-
import {ModelWithReference} from "../aws/types/model-with-reference.
|
9
|
+
import {ModelWithReference} from "../aws/types/model-with-reference.mjs";
|
10
10
|
|
11
11
|
/**
|
12
12
|
* Get a reference to an OpenAPI model object in a REST API.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
*/
|
4
4
|
import { Feature, FeatureCollection, Geometry, Position } from "geojson";
|
5
5
|
import * as geoJsonValidator from "geojson-validation";
|
6
|
-
import { logger } from "../aws/runtime/dt-logger-default.
|
6
|
+
import { logger } from "../aws/runtime/dt-logger-default.mjs";
|
7
7
|
|
8
8
|
export const SRID_WGS84 = 4326;
|
9
9
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AxiosError } from "axios";
|
2
|
-
import { DtLogger } from "../aws/runtime/dt-logger.
|
3
|
-
import { getEnvVariableOrElse } from "./utils.
|
2
|
+
import { DtLogger } from "../aws/runtime/dt-logger.mjs";
|
3
|
+
import { getEnvVariableOrElse } from "./utils.mjs";
|
4
4
|
|
5
5
|
const functionName = getEnvVariableOrElse("AWS_LAMBDA_FUNCTION_NAME", "test");
|
6
6
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { HttpError } from "../types/http-error.
|
2
|
-
import { AsyncTimeoutError } from "../types/async-timeout-error.
|
3
|
-
import { logger } from "../aws/runtime/dt-logger-default.
|
1
|
+
import { HttpError } from "../types/http-error.mjs";
|
2
|
+
import { AsyncTimeoutError } from "../types/async-timeout-error.mjs";
|
3
|
+
import { logger } from "../aws/runtime/dt-logger-default.mjs";
|
4
4
|
|
5
5
|
export enum RetryLogError {
|
6
6
|
LOG_ALL_AS_ERRORS,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import axios from "axios";
|
2
|
-
import { logger } from "../aws/runtime/dt-logger-default.
|
3
|
-
import { logException } from "./logging.
|
2
|
+
import { logger } from "../aws/runtime/dt-logger-default.mjs";
|
3
|
+
import { logException } from "./logging.mjs";
|
4
4
|
|
5
5
|
export class SlackApi {
|
6
6
|
private readonly url: string;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { AwsEnv } from "../types/aws-env.
|
2
|
-
import { Either } from "../types/either.
|
3
|
-
import { EnvKeys } from "../aws/runtime/environment.
|
1
|
+
import { AwsEnv } from "../types/aws-env.mjs";
|
2
|
+
import { Either } from "../types/either.mjs";
|
3
|
+
import { EnvKeys } from "../aws/runtime/environment.mjs";
|
4
4
|
|
5
5
|
/**
|
6
6
|
* Check if arrays have only elements that also exists also in other array.
|
package/dist/database/models.js
DELETED
package/dist/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export { DigitrafficStack } from "./aws/infra/stack/stack.js";
|
package/dist/index.js
DELETED
package/dist/marine/rtz.js
DELETED
package/dist/types/aws-env.js
DELETED
package/dist/types/either.js
DELETED
package/dist/types/nullable.js
DELETED
package/dist/types/urn.js
DELETED
package/dist/types/util-types.js
DELETED
package/src/index.ts
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/package/dist/aws/infra/stacks/{intra-stack-configuration.d.ts → intra-stack-configuration.d.mts}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/package/src/aws/infra/stacks/{intra-stack-configuration.ts → intra-stack-configuration.mts}
RENAMED
File without changes
|