@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
@@ -1,9 +1,9 @@
|
|
1
1
|
import { CfnDBProxyEndpoint, DatabaseCluster, DatabaseClusterEngine, DatabaseProxy, ProxyTarget, } from "aws-cdk-lib/aws-rds";
|
2
2
|
import { Secret } from "aws-cdk-lib/aws-secretsmanager";
|
3
3
|
import { SecurityGroup } from "aws-cdk-lib/aws-ec2";
|
4
|
-
import { DbStack } from "./db-stack.
|
5
|
-
import { exportValue, importVpc } from "../import-util.
|
6
|
-
import { createParameter } from "../stack/parameters.
|
4
|
+
import { DbStack } from "./db-stack.mjs";
|
5
|
+
import { exportValue, importVpc } from "../import-util.mjs";
|
6
|
+
import { createParameter } from "../stack/parameters.mjs";
|
7
7
|
import { Stack, Duration } from "aws-cdk-lib/core";
|
8
8
|
/**
|
9
9
|
* A stack that creates a Database proxy.
|
@@ -70,4 +70,4 @@ export class DbProxyStack extends Stack {
|
|
70
70
|
}
|
71
71
|
DbProxyStack.PROXY_READER_EXPORT_NAME = "db-reader-endpoint";
|
72
72
|
DbProxyStack.PROXY_WRITER_EXPORT_NAME = "db-writer-endpoint";
|
73
|
-
//# sourceMappingURL=db-proxy-stack.
|
73
|
+
//# sourceMappingURL=db-proxy-stack.mjs.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { InstanceType, IVpc, type ISecurityGroup } from "aws-cdk-lib/aws-ec2";
|
2
2
|
import { AuroraPostgresEngineVersion, DatabaseCluster, DatabaseClusterProps, IParameterGroup } from "aws-cdk-lib/aws-rds";
|
3
3
|
import { Construct } from "constructs/lib/construct.js";
|
4
|
-
import { InfraStackConfiguration } from "./intra-stack-configuration.
|
4
|
+
import { InfraStackConfiguration } from "./intra-stack-configuration.mjs";
|
5
5
|
import { Stack } from "aws-cdk-lib/core";
|
6
6
|
export interface DbConfiguration {
|
7
7
|
readonly cluster?: ClusterConfiguration;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { SecurityGroup, SubnetType, } from "aws-cdk-lib/aws-ec2";
|
2
2
|
import { CfnDBInstance, Credentials, DatabaseCluster, DatabaseClusterEngine, DatabaseClusterFromSnapshot, InstanceUpdateBehaviour, ParameterGroup, } from "aws-cdk-lib/aws-rds";
|
3
3
|
import { Secret } from "aws-cdk-lib/aws-secretsmanager";
|
4
|
-
import { exportValue, importVpc } from "../import-util.
|
4
|
+
import { exportValue, importVpc } from "../import-util.mjs";
|
5
5
|
import { Duration, RemovalPolicy, Stack } from "aws-cdk-lib/core";
|
6
|
-
import { createParameter } from "../stack/parameters.
|
6
|
+
import { createParameter } from "../stack/parameters.mjs";
|
7
7
|
/**
|
8
8
|
* Stack that creates DatabaseCluster.
|
9
9
|
*
|
@@ -123,4 +123,4 @@ DbStack.CLUSTER_PORT = 5432;
|
|
123
123
|
DbStack.CLUSTER_IDENTIFIER_EXPORT_NAME = "db-cluster";
|
124
124
|
DbStack.CLUSTER_READ_ENDPOINT_EXPORT_NAME = "db-cluster-reader-endpoint";
|
125
125
|
DbStack.CLUSTER_WRITE_ENDPOINT_EXPORT_NAME = "db-cluster-writer-endpoint";
|
126
|
-
//# sourceMappingURL=db-stack.
|
126
|
+
//# sourceMappingURL=db-stack.mjs.map
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IVpc, Vpc } from "aws-cdk-lib/aws-ec2";
|
2
|
-
import { InfraStackConfiguration } from "./intra-stack-configuration.
|
2
|
+
import { InfraStackConfiguration } from "./intra-stack-configuration.mjs";
|
3
3
|
import { Stack } from "aws-cdk-lib/core";
|
4
4
|
import { Construct } from "constructs/lib/construct.js";
|
5
5
|
export interface NetworkConfiguration {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IpAddresses, SubnetType, Vpc } from "aws-cdk-lib/aws-ec2";
|
2
|
-
import { exportValue } from "../import-util.
|
2
|
+
import { exportValue } from "../import-util.mjs";
|
3
3
|
import { Stack } from "aws-cdk-lib/core";
|
4
4
|
export class NetworkStack extends Stack {
|
5
5
|
constructor(scope, id, isc, configuration) {
|
@@ -37,4 +37,4 @@ export class NetworkStack extends Stack {
|
|
37
37
|
});
|
38
38
|
}
|
39
39
|
}
|
40
|
-
//# sourceMappingURL=network-stack.
|
40
|
+
//# sourceMappingURL=network-stack.mjs.map
|
@@ -1,5 +1,5 @@
|
|
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
|
export declare abstract class DigitrafficIntegrationResponse {
|
4
4
|
static ok(mediaType: MediaType, sunset?: string): IntegrationResponse;
|
5
5
|
static badRequest(mediaType?: MediaType): IntegrationResponse;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { MediaType } from "../types/mediatypes.
|
2
|
-
import { getDeprecatedDefaultLambdaResponse, RESPONSE_DEFAULT_LAMBDA, } from "../infra/api/response.
|
1
|
+
import { MediaType } from "../types/mediatypes.mjs";
|
2
|
+
import { getDeprecatedDefaultLambdaResponse, RESPONSE_DEFAULT_LAMBDA, } from "../infra/api/response.mjs";
|
3
3
|
export class DigitrafficIntegrationResponse {
|
4
4
|
static ok(mediaType, sunset) {
|
5
5
|
return this.create("200", mediaType, sunset);
|
@@ -21,4 +21,4 @@ export class DigitrafficIntegrationResponse {
|
|
21
21
|
};
|
22
22
|
}
|
23
23
|
}
|
24
|
-
//# sourceMappingURL=digitraffic-integration-response.
|
24
|
+
//# sourceMappingURL=digitraffic-integration-response.mjs.map
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { DtLogger } from "./dt-logger.
|
1
|
+
import { DtLogger } from "./dt-logger.mjs";
|
2
2
|
/**
|
3
3
|
* You can use this for method name definition to match DtLogger LoggableType.method parameter.
|
4
4
|
*/
|
5
|
-
export type { LoggerMethodType } from "./dt-logger.
|
5
|
+
export type { LoggerMethodType } from "./dt-logger.mjs";
|
6
6
|
/**
|
7
7
|
* You can use this for your logging needs or create one locally and configure it as you wish.
|
8
8
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { DtLogger } from "./dt-logger.
|
1
|
+
import { DtLogger } from "./dt-logger.mjs";
|
2
2
|
/**
|
3
3
|
* You can use this for your logging needs or create one locally and configure it as you wish.
|
4
4
|
*/
|
5
5
|
export const logger = new DtLogger();
|
6
|
-
//# sourceMappingURL=dt-logger-default.
|
6
|
+
//# sourceMappingURL=dt-logger-default.mjs.map
|
@@ -97,4 +97,4 @@ export class DtLogger {
|
|
97
97
|
function removePrefix(prefix, loggable) {
|
98
98
|
return _.mapKeys(loggable, (_index, key) => key.startsWith(prefix) ? _.lowerFirst(key.replace(prefix, "")) : key);
|
99
99
|
}
|
100
|
-
//# sourceMappingURL=dt-logger.
|
100
|
+
//# sourceMappingURL=dt-logger.mjs.map
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { SecretHolder } from "./secret-holder.
|
2
|
-
import { RdsProxySecretKey } from "./dbsecret.
|
3
|
-
import { getEnvVariable } from "../../../utils/utils.
|
4
|
-
import { DatabaseEnvironmentKeys } from "../../../database/database.
|
1
|
+
import { SecretHolder } from "./secret-holder.mjs";
|
2
|
+
import { RdsProxySecretKey } from "./dbsecret.mjs";
|
3
|
+
import { getEnvVariable } from "../../../utils/utils.mjs";
|
4
|
+
import { DatabaseEnvironmentKeys } from "../../../database/database.mjs";
|
5
5
|
const RDS_PROXY_SECRET_KEYS = Object.values(RdsProxySecretKey);
|
6
6
|
/**
|
7
7
|
* Holds credentials for RDS Proxy access.
|
@@ -21,4 +21,4 @@ export class ProxyHolder {
|
|
21
21
|
process.env[DatabaseEnvironmentKeys.DB_RO_URI] = secret.proxy_ro_host;
|
22
22
|
}
|
23
23
|
}
|
24
|
-
//# sourceMappingURL=proxy-holder.
|
24
|
+
//# sourceMappingURL=proxy-holder.mjs.map
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { SecretHolder } from "./secret-holder.
|
2
|
-
import { RdsSecretKey } from "./dbsecret.
|
3
|
-
import { getEnvVariable } from "../../../utils/utils.
|
4
|
-
import { DatabaseEnvironmentKeys } from "../../../database/database.
|
1
|
+
import { SecretHolder } from "./secret-holder.mjs";
|
2
|
+
import { RdsSecretKey } from "./dbsecret.mjs";
|
3
|
+
import { getEnvVariable } from "../../../utils/utils.mjs";
|
4
|
+
import { DatabaseEnvironmentKeys } from "../../../database/database.mjs";
|
5
5
|
const RDS_SECRET_KEYS = Object.values(RdsSecretKey);
|
6
6
|
/**
|
7
7
|
* Holds credentials for RDS access.
|
@@ -21,4 +21,4 @@ export class RdsHolder {
|
|
21
21
|
process.env[DatabaseEnvironmentKeys.DB_RO_URI] = secret.ro_host;
|
22
22
|
}
|
23
23
|
}
|
24
|
-
//# sourceMappingURL=rds-holder.
|
24
|
+
//# sourceMappingURL=rds-holder.mjs.map
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import { getSecret } from "./secret.
|
2
|
-
import { checkExpectedSecretKeys } from "./dbsecret.
|
3
|
-
import { getEnvVariable } from "../../../utils/utils.
|
4
|
-
import { logger } from "../dt-logger-default.
|
5
|
-
|
6
|
-
|
1
|
+
import { 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
|
+
const NodeTtlImport = await import("node-ttl");
|
6
|
+
//eslint-disable-next-line
|
7
|
+
const NodeTtl = NodeTtlImport.default;
|
7
8
|
const DEFAULT_PREFIX = "";
|
8
9
|
const DEFAULT_SECRET_KEY = "SECRET";
|
9
10
|
const DEFAULT_CONFIGURATION = {
|
@@ -62,13 +63,11 @@ export class SecretHolder {
|
|
62
63
|
return parsed;
|
63
64
|
}
|
64
65
|
async getSecret() {
|
65
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
66
66
|
const secret = this.secretCache.get(DEFAULT_SECRET_KEY);
|
67
67
|
if (!secret) {
|
68
68
|
await this.initSecret();
|
69
69
|
}
|
70
|
-
|
71
|
-
return secret ?? this.secretCache.get(DEFAULT_SECRET_KEY);
|
70
|
+
return secret ?? (this.secretCache.get(DEFAULT_SECRET_KEY));
|
72
71
|
}
|
73
72
|
}
|
74
|
-
//# sourceMappingURL=secret-holder.
|
73
|
+
//# sourceMappingURL=secret-holder.mjs.map
|
@@ -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
|
// SECRET_OVERRIDE_AWS_REGION might not have been set before import of
|
5
5
|
// secret, so we need to lazy initialize SecretsManager
|
6
6
|
let smClient;
|
@@ -38,4 +38,4 @@ function parseSecret(secret, prefix) {
|
|
38
38
|
}
|
39
39
|
return parsed;
|
40
40
|
}
|
41
|
-
//# sourceMappingURL=secret.
|
41
|
+
//# sourceMappingURL=secret.mjs.map
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import
|
1
|
+
import pg from "pg-promise";
|
2
|
+
const { PreparedStatement } = pg;
|
2
3
|
const PS_UPDATE_CACHE_VALUE = new PreparedStatement({
|
3
4
|
name: "update-cache-value",
|
4
5
|
text: `insert into cached_json(cache_id, content, last_updated)
|
@@ -37,4 +38,4 @@ export async function getFromCache(db, cacheKey) {
|
|
37
38
|
return result ?? undefined;
|
38
39
|
});
|
39
40
|
}
|
40
|
-
//# sourceMappingURL=cached.
|
41
|
+
//# sourceMappingURL=cached.mjs.map
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { getEnvVariable, getEnvVariableOrElse } from "../utils/utils.
|
2
|
-
import { logger } from "../aws/runtime/dt-logger-default.
|
3
|
-
import { logException } from "../utils/logging.
|
1
|
+
import { getEnvVariable, getEnvVariableOrElse } from "../utils/utils.mjs";
|
2
|
+
import { logger } from "../aws/runtime/dt-logger-default.mjs";
|
3
|
+
import { logException } from "../utils/logging.mjs";
|
4
4
|
export var DatabaseEnvironmentKeys;
|
5
5
|
(function (DatabaseEnvironmentKeys) {
|
6
6
|
DatabaseEnvironmentKeys["DB_USER"] = "DB_USER";
|
@@ -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
|
-
|
13
|
-
const pgp =
|
12
|
+
const pgpImport = await import("pg-promise");
|
13
|
+
const pgp = pgpImport.default();
|
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) => {
|
@@ -70,4 +70,4 @@ async function doInDatabase(readonly, fn) {
|
|
70
70
|
await db.$pool.end();
|
71
71
|
}
|
72
72
|
}
|
73
|
-
//# sourceMappingURL=database.
|
73
|
+
//# sourceMappingURL=database.mjs.map
|
package/dist/index.d.mts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { DigitrafficStack } from "./aws/infra/stack/stack.mjs";
|
package/dist/index.mjs
ADDED
@@ -1,3 +1,3 @@
|
|
1
|
-
import { DTDatabase } from "../database/database.
|
1
|
+
import { DTDatabase } from "../database/database.mjs";
|
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,4 +1,4 @@
|
|
1
|
-
import { DatabaseEnvironmentKeys, initDbConnection, } from "../database/database.
|
1
|
+
import { DatabaseEnvironmentKeys, initDbConnection, } from "../database/database.mjs";
|
2
2
|
export async function assertCount(db, sql, count) {
|
3
3
|
await db.one(sql).then((x) => expect(x.count).toEqual(count));
|
4
4
|
}
|
@@ -26,4 +26,4 @@ export function dbTestBase(fn, truncateFn, dbUser, dbPass, dbUri) {
|
|
26
26
|
fn(db);
|
27
27
|
};
|
28
28
|
}
|
29
|
-
//# sourceMappingURL=db-testutils.
|
29
|
+
//# sourceMappingURL=db-testutils.mjs.map
|
@@ -1,9 +1,7 @@
|
|
1
|
-
|
2
|
-
const __require = _createRequire(import.meta.url);
|
3
|
-
const AWS = __require("aws-sdk");
|
1
|
+
const AWS = await import("aws-sdk");
|
4
2
|
import * as sinon from "sinon";
|
5
|
-
import { EnvKeys } from "../aws/runtime/environment.
|
6
|
-
import { setEnvVariable } from "../utils/utils.
|
3
|
+
import { EnvKeys } from "../aws/runtime/environment.mjs";
|
4
|
+
import { setEnvVariable } from "../utils/utils.mjs";
|
7
5
|
setEnvVariable(EnvKeys.AWS_REGION, "eu-west-1");
|
8
6
|
const secretValue = sinon.stub();
|
9
7
|
/**
|
@@ -33,4 +31,4 @@ export function mockSecret(secret) {
|
|
33
31
|
});
|
34
32
|
}
|
35
33
|
}
|
36
|
-
//# sourceMappingURL=secrets-manager.
|
34
|
+
//# sourceMappingURL=secrets-manager.mjs.map
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { RestApi, Model, JsonSchema, RequestValidator, JsonSchemaType, JsonSchemaVersion } from 'aws-cdk-lib/aws-apigateway';
|
2
|
-
import { ModelWithReference } from "../aws/types/model-with-reference.
|
2
|
+
import { ModelWithReference } from "../aws/types/model-with-reference.mjs";
|
3
3
|
/**
|
4
4
|
* Get a reference to an OpenAPI model object in a REST API.
|
5
5
|
* Can be used to supply a reference to properties of a GeoJSON feature.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as geoJsonValidator from "geojson-validation";
|
2
|
-
import { logger } from "../aws/runtime/dt-logger-default.
|
2
|
+
import { logger } from "../aws/runtime/dt-logger-default.mjs";
|
3
3
|
export const SRID_WGS84 = 4326;
|
4
4
|
/**
|
5
5
|
* Creates WKT geometry from GeoJSON geometry
|
@@ -132,4 +132,4 @@ export function positionToList(position, precision = 8) {
|
|
132
132
|
function toRadians(angdeg) {
|
133
133
|
return angdeg * DEGREES_TO_RADIANS;
|
134
134
|
}
|
135
|
-
//# sourceMappingURL=geometry.
|
135
|
+
//# sourceMappingURL=geometry.mjs.map
|
@@ -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
|
const functionName = getEnvVariableOrElse("AWS_LAMBDA_FUNCTION_NAME", "test");
|
5
5
|
/**
|
6
6
|
* Curried version of logException.
|
@@ -58,4 +58,4 @@ export function logException(logger, error, includeStack = false) {
|
|
58
58
|
stack,
|
59
59
|
});
|
60
60
|
}
|
61
|
-
//# sourceMappingURL=logging.
|
61
|
+
//# sourceMappingURL=logging.mjs.map
|