@digitraffic/common 2024.7.2-1 → 2024.8.13-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.
@@ -11,10 +11,10 @@ export type AWSManagedWafRule = "CommonRuleSet" | "AmazonIpReputationList" | "Kn
11
11
  export declare class AclBuilder {
12
12
  readonly _construct: Construct;
13
13
  readonly _rules: CfnWebACL.RuleProperty[];
14
+ readonly _name: string;
14
15
  _scope: string;
15
- _name: string;
16
16
  _customResponseBodies: Record<string, CfnWebACL.CustomResponseBodyProperty>;
17
- constructor(construct: Construct);
17
+ constructor(construct: Construct, name?: string);
18
18
  isRuleDefined(rules: AWSManagedWafRule[] | "all", rule: AWSManagedWafRule): boolean;
19
19
  withAWSManagedRules(rules?: AWSManagedWafRule[] | "all"): AclBuilder;
20
20
  withIpRestrictionRule(addresses: string[]): AclBuilder;
@@ -10,11 +10,12 @@ import { logger } from "../runtime/dt-logger-default.mjs";
10
10
  export class AclBuilder {
11
11
  _construct;
12
12
  _rules = [];
13
+ _name;
13
14
  _scope = "CLOUDFRONT";
14
- _name = "WebACL";
15
15
  _customResponseBodies = {};
16
- constructor(construct) {
16
+ constructor(construct, name = "WebACL") {
17
17
  this._construct = construct;
18
+ this._name = name;
18
19
  }
19
20
  isRuleDefined(rules, rule) {
20
21
  return rules === "all" || rules.includes(rule);
@@ -82,7 +83,7 @@ export class AclBuilder {
82
83
  if (key in this._customResponseBodies) {
83
84
  logger.warn({
84
85
  method: "acl-builder.withCustomResponseBody",
85
- message: `Overriding custom response body with key ${key}`,
86
+ message: `Overriding custom response body with key ${key} for distribution ${this._name}`,
86
87
  });
87
88
  }
88
89
  this._customResponseBodies[key] = customResponseBody;
@@ -138,7 +139,7 @@ export class AclBuilder {
138
139
  _logMissingLimit(method) {
139
140
  logger.warn({
140
141
  method: `acl-builder.${method}`,
141
- message: `'limit' was not defined. Not setting a throttle rule`,
142
+ message: `'limit' was not defined. Not setting a throttle rule for ${this._name}`,
142
143
  });
143
144
  }
144
145
  build() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitraffic/common",
3
- "version": "2024.7.2-1",
3
+ "version": "2024.8.13-1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "repository": {
@@ -103,70 +103,70 @@
103
103
  "./dist/aws/runtime/digitraffic-integration-response": "./dist/aws/runtime/digitraffic-integration-response.mjs"
104
104
  },
105
105
  "peerDependencies": {
106
- "@aws-sdk/client-api-gateway": "^3.600.0",
107
- "@aws-sdk/client-s3": "^3.600.0",
108
- "@aws-sdk/client-secrets-manager": "^3.600.0",
109
- "@aws-sdk/client-sns": "^3.600.0",
110
- "@aws-sdk/lib-storage": "^3.600.0",
111
- "aws-sdk": "^2.1648.0",
112
- "aws-cdk-lib": "^2.147.1",
106
+ "@aws-sdk/client-api-gateway": "^3.624.0",
107
+ "@aws-sdk/client-s3": "^3.626.0",
108
+ "@aws-sdk/client-secrets-manager": "^3.624.0",
109
+ "@aws-sdk/client-sns": "^3.624.0",
110
+ "@aws-sdk/lib-storage": "^3.626.0",
111
+ "aws-sdk": "^2.1670.0",
112
+ "aws-cdk-lib": "^2.151.0",
113
113
  "change-case": "^5.4.4",
114
114
  "constructs": "^10.3.0",
115
115
  "date-fns": "^3.6.0",
116
116
  "date-fns-tz": "^3.1.3",
117
117
  "etag": "^1.8.1",
118
118
  "geojson-validation": "^1.0.2",
119
- "ky": "^1.3.0",
119
+ "ky": "^1.5.0",
120
120
  "lodash": "^4.17.21",
121
121
  "node-ttl": "^0.2.0",
122
122
  "pg-native": "^3.1.0",
123
- "pg-promise": "^11.8.0"
123
+ "pg-promise": "^11.9.1"
124
124
  },
125
125
  "devDependencies": {
126
- "@aws-sdk/client-api-gateway": "^3.600.0",
127
- "@aws-sdk/client-s3": "^3.600.0",
128
- "@aws-sdk/client-secrets-manager": "^3.600.0",
129
- "@aws-sdk/client-sns": "^3.600.0",
130
- "@aws-sdk/lib-storage": "^3.600.0",
131
- "aws-cdk-lib": "^2.147.1",
126
+ "@aws-sdk/client-api-gateway": "^3.624.0",
127
+ "@aws-sdk/client-s3": "^3.626.0",
128
+ "@aws-sdk/client-secrets-manager": "^3.624.0",
129
+ "@aws-sdk/client-sns": "^3.624.0",
130
+ "@aws-sdk/lib-storage": "^3.626.0",
131
+ "aws-cdk-lib": "^2.151.0",
132
132
  "change-case": "^5.4.4",
133
133
  "constructs": "^10.3.0",
134
134
  "date-fns": "^3.6.0",
135
135
  "date-fns-tz": "^3.1.3",
136
136
  "etag": "^1.8.1",
137
137
  "geojson-validation": "^1.0.2",
138
- "ky": "^1.3.0",
138
+ "ky": "^1.5.0",
139
139
  "lodash": "^4.17.21",
140
140
  "node-ttl": "^0.2.0",
141
- "pg-promise": "^11.8.0",
141
+ "pg-promise": "^11.9.1",
142
142
  "@jest/globals": "^29.7.0",
143
- "@rushstack/eslint-config": "^3.7.0",
144
- "@rushstack/heft": "^0.66.18",
145
- "@rushstack/heft-jest-plugin": "^0.12.0",
146
- "@rushstack/heft-lint-plugin": "^0.3.39",
147
- "@rushstack/heft-typescript-plugin": "^0.5.16",
148
- "@smithy/types": "^3.2.0",
149
- "@types/aws-lambda": "^8.10.140",
143
+ "@rushstack/eslint-config": "^3.7.1",
144
+ "@rushstack/heft": "^0.66.25",
145
+ "@rushstack/heft-jest-plugin": "^0.12.7",
146
+ "@rushstack/heft-lint-plugin": "^0.3.46",
147
+ "@rushstack/heft-typescript-plugin": "^0.5.23",
148
+ "@smithy/types": "^3.3.0",
149
+ "@types/aws-lambda": "^8.10.143",
150
150
  "@types/etag": "^1.8.3",
151
151
  "@types/geojson": "^7946.0.14",
152
152
  "@types/geojson-validation": "^1.0.3",
153
153
  "@types/jest": "^29.5.12",
154
- "@types/lodash": "^4.17.5",
154
+ "@types/lodash": "^4.17.7",
155
155
  "@types/madge": "^5.0.3",
156
156
  "@types/node": "^20.14.9",
157
157
  "@typescript-eslint/eslint-plugin": "^7.14.1",
158
- "@typescript-eslint/parser": "^7.14.1",
159
- "aws-sdk": "^2.1648.0",
158
+ "@typescript-eslint/parser": "^7.18.0",
159
+ "aws-sdk": "^2.1670.0",
160
160
  "eslint": "^8.57.0",
161
161
  "eslint-config-prettier": "^9.1.0",
162
162
  "eslint-plugin-deprecation": "^3.0.0",
163
163
  "jest": "^29.7.0",
164
164
  "jest-junit": "^16.0.0",
165
165
  "madge": "^7.0.0",
166
- "prettier": "^3.3.2",
167
- "rimraf": "^5.0.7",
168
- "ts-jest": "^29.1.5",
169
- "typescript": "^5.5.2",
166
+ "prettier": "^3.3.3",
167
+ "rimraf": "^6.0.1",
168
+ "ts-jest": "^29.2.4",
169
+ "typescript": "^5.5.4",
170
170
  "velocityjs": "^2.0.6"
171
171
  },
172
172
  "scripts": {