@digitraffic/common 2025.9.12-3 → 2025.9.22-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.
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  export const serverObject = z.object({
3
3
  url: z.string(),
4
4
  description: z.string().optional(),
5
- variables: z.record(z.unknown()).optional(),
5
+ variables: z.record(z.string(), z.unknown()).optional(),
6
6
  });
7
7
  export const parameterObject = z.object({
8
8
  name: z.string(),
@@ -26,8 +26,8 @@ export const parameterObject = z.object({
26
26
  allowReserved: z.boolean().optional(),
27
27
  schema: z.unknown().optional(),
28
28
  example: z.unknown().optional(),
29
- examples: z.record(z.unknown()).optional(),
30
- content: z.record(z.unknown()).optional(),
29
+ examples: z.record(z.string(), z.unknown()).optional(),
30
+ content: z.record(z.string(), z.unknown()).optional(),
31
31
  });
32
32
  export const referenceObject = z.object({
33
33
  $ref: z.string(),
@@ -46,7 +46,7 @@ export const openapiOperation = z
46
46
  responses: z.unknown(),
47
47
  callbacks: z.unknown(),
48
48
  deprecated: z.boolean(),
49
- security: z.array(z.record(z.array(z.string()))),
49
+ security: z.array(z.record(z.string(), z.array(z.string()))),
50
50
  servers: z.array(z.unknown()),
51
51
  })
52
52
  .partial();
@@ -80,7 +80,7 @@ export const openapiSchema = z
80
80
  .object({
81
81
  name: z.string().optional(),
82
82
  url: z.string().optional(),
83
- email: z.string().email().optional(),
83
+ email: z.email().optional(),
84
84
  })
85
85
  .strict()
86
86
  .optional(),
@@ -99,7 +99,7 @@ export const openapiSchema = z
99
99
  url: z.string(),
100
100
  description: z.string().optional(),
101
101
  variables: z
102
- .record(z
102
+ .record(z.string(), z
103
103
  .object({
104
104
  enum: z.array(z.string()).optional(),
105
105
  default: z.string(),
@@ -110,7 +110,7 @@ export const openapiSchema = z
110
110
  })
111
111
  .strict())
112
112
  .optional(),
113
- security: z.array(z.record(z.array(z.string()))).optional(),
113
+ security: z.array(z.record(z.string(), z.array(z.string()))).optional(),
114
114
  tags: z
115
115
  .array(z
116
116
  .object({
@@ -126,18 +126,18 @@ export const openapiSchema = z
126
126
  })
127
127
  .strict())
128
128
  .optional(),
129
- paths: z.record(openapiPathItem),
129
+ paths: z.record(z.string(), openapiPathItem),
130
130
  components: z
131
131
  .object({
132
- schemas: z.record(z.any()).optional(),
133
- responses: z.record(z.any()).optional(),
134
- parameters: z.record(z.any()).optional(),
135
- examples: z.record(z.any()).optional(),
136
- requestBodies: z.record(z.any()).optional(),
137
- headers: z.record(z.any()).optional(),
138
- securitySchemes: z.record(z.any()).optional(),
139
- links: z.record(z.any()).optional(),
140
- callbacks: z.record(z.any()).optional(),
132
+ schemas: z.record(z.string(), z.any()).optional(),
133
+ responses: z.record(z.string(), z.any()).optional(),
134
+ parameters: z.record(z.string(), z.any()).optional(),
135
+ examples: z.record(z.string(), z.any()).optional(),
136
+ requestBodies: z.record(z.string(), z.any()).optional(),
137
+ headers: z.record(z.string(), z.any()).optional(),
138
+ securitySchemes: z.record(z.string(), z.any()).optional(),
139
+ links: z.record(z.string(), z.any()).optional(),
140
+ callbacks: z.record(z.string(), z.any()).optional(),
141
141
  })
142
142
  .strict()
143
143
  .optional(),
@@ -47,8 +47,9 @@ function coordinatePair(coordinate) {
47
47
  * @param features List of Features
48
48
  * @param lastUpdated Last updated date
49
49
  */
50
+ export function createFeatureCollection(features,
50
51
  // eslint-disable-next-line @rushstack/no-new-null
51
- export function createFeatureCollection(features, lastUpdated) {
52
+ lastUpdated) {
52
53
  return {
53
54
  type: "FeatureCollection",
54
55
  lastUpdated: lastUpdated,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitraffic/common",
3
- "version": "2025.9.12-3",
3
+ "version": "2025.9.22-1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "repository": {
@@ -10,22 +10,6 @@
10
10
  "engines": {
11
11
  "node": ">=22 <23"
12
12
  },
13
- "scripts": {
14
- "build": "heft build --clean",
15
- "build:watch": "heft build-watch",
16
- "lint": "eslint --cache .",
17
- "eslint-report": "eslint . --format html",
18
- "ci:eslint-report": "eslint . --format html -o report.html || true",
19
- "test": "NODE_OPTIONS='--experimental-vm-modules' heft test --clean --max-workers=1",
20
- "test:jest": "node --trace-warnings --experimental-vm-modules --max-old-space-size=1536 --expose-gc ./node_modules/jest/bin/jest.js --detectOpenHandles --forceExit --coverage --coverageDirectory=output/coverage/jest --logHeapUsage --runInBand --verbose",
21
- "test:inspect": "node --inspect-brk --expose-gc ./node_modules/jest/bin/jest.js --detectOpenHandles --forceExit --coverage --coverageDirectory=output/coverage/jest --logHeapUsage --runInBand",
22
- "test:watch": "NODE_OPTIONS='--experimental-vm-modules' heft test-watch --max-workers=1",
23
- "test:watch:no-coverage": "NODE_OPTIONS='--experimental-vm-modules' heft test-watch --disable-code-coverage --max-workers=1",
24
- "prepublishOnly": "pnpm build && pnpm test",
25
- "run:format-changed": "lefthook run pre-commit",
26
- "run:format": "deno fmt",
27
- "prepare": "lefthook install"
28
- },
29
13
  "license": "EUPL-1.2",
30
14
  "private": false,
31
15
  "files": [
@@ -122,52 +106,52 @@
122
106
  "./dist/aws/runtime/digitraffic-integration-response": "./dist/aws/runtime/digitraffic-integration-response.js"
123
107
  },
124
108
  "peerDependencies": {
125
- "@aws-sdk/client-api-gateway": "^3.864.0",
126
- "@aws-sdk/client-s3": "^3.864.0",
127
- "@aws-sdk/client-secrets-manager": "^3.864.0",
128
- "@aws-sdk/client-sns": "^3.864.0",
129
- "@aws-sdk/lib-storage": "^3.864.0",
109
+ "@aws-sdk/client-api-gateway": "^3.887.0",
110
+ "@aws-sdk/client-s3": "^3.887.0",
111
+ "@aws-sdk/client-secrets-manager": "^3.887.0",
112
+ "@aws-sdk/client-sns": "^3.887.0",
113
+ "@aws-sdk/lib-storage": "^3.887.0",
130
114
  "@date-fns/tz": "^1.4.1",
131
- "@smithy/fetch-http-handler": "^5.1.1",
132
- "@smithy/node-http-handler": "^4.1.1",
133
- "aws-cdk-lib": "^2.211.0",
115
+ "@smithy/fetch-http-handler": "^5.2.1",
116
+ "@smithy/node-http-handler": "^4.2.1",
117
+ "aws-cdk-lib": "^2.214.0",
134
118
  "change-case": "^5.4.4",
135
119
  "constructs": "^10.4.2",
136
120
  "date-fns": "^4.1.0",
137
121
  "geojson-validation": "^1.0.2",
138
- "ky": "^1.8.2",
122
+ "ky": "^1.10.0",
139
123
  "lodash-es": "^4.17.21",
140
124
  "pg-native": "^3.5.2",
141
- "pg-promise": "^11.15.0",
142
- "pg-query-stream": "4.10.3",
125
+ "pg-promise": "^12.1.3",
126
+ "pg-query-stream": "^4.10.3",
143
127
  "zod": "^3.25.76"
144
128
  },
145
129
  "devDependencies": {
146
- "@aws-sdk/client-api-gateway": "^3.882.0",
147
- "@aws-sdk/client-s3": "^3.882.0",
148
- "@aws-sdk/client-secrets-manager": "^3.882.0",
149
- "@aws-sdk/client-sns": "^3.882.0",
150
- "@aws-sdk/lib-storage": "^3.882.0",
130
+ "@aws-sdk/client-api-gateway": "^3.887.0",
131
+ "@aws-sdk/client-s3": "^3.887.0",
132
+ "@aws-sdk/client-secrets-manager": "^3.887.0",
133
+ "@aws-sdk/client-sns": "^3.887.0",
134
+ "@aws-sdk/lib-storage": "^3.887.0",
151
135
  "@date-fns/tz": "^1.4.1",
152
- "@digitraffic/eslint-config": "^3.1.1",
136
+ "@digitraffic/eslint-config": "^3.2.5",
153
137
  "@jest/globals": "^30.1.2",
154
- "@rushstack/eslint-config": "^3.7.1",
155
- "@rushstack/heft": "^0.74.3",
156
- "@rushstack/heft-jest-plugin": "^0.16.12",
157
- "@rushstack/heft-lint-plugin": "^0.5.38",
158
- "@rushstack/heft-typescript-plugin": "^0.9.12",
159
- "@smithy/fetch-http-handler": "5.1.1",
160
- "@smithy/types": "^4.4.0",
138
+ "@rushstack/eslint-config": "^4.4.0",
139
+ "@rushstack/heft": "^0.74.4",
140
+ "@rushstack/heft-jest-plugin": "^0.16.13",
141
+ "@rushstack/heft-lint-plugin": "^0.7.5",
142
+ "@rushstack/heft-typescript-plugin": "^0.9.13",
143
+ "@smithy/fetch-http-handler": "^5.2.1",
144
+ "@smithy/types": "^4.5.0",
161
145
  "@types/aws-lambda": "8.10.152",
162
- "@types/etag": "^1.8.4",
146
+ "@types/etag": "1.8.4",
163
147
  "@types/geojson": "7946.0.16",
164
- "@types/geojson-validation": "^1.0.3",
148
+ "@types/geojson-validation": "1.0.3",
165
149
  "@types/jest": "30.0.0",
166
150
  "@types/lodash-es": "4.17.12",
167
151
  "@types/madge": "5.0.3",
168
- "@types/node": "22.15.23",
169
- "@typescript-eslint/eslint-plugin": "^7.18.0",
170
- "@typescript-eslint/parser": "^7.18.0",
152
+ "@types/node": "22.18.1",
153
+ "@typescript-eslint/eslint-plugin": "^8.43.0",
154
+ "@typescript-eslint/parser": "^8.43.0",
171
155
  "aws-cdk-lib": "^2.214.0",
172
156
  "aws-sdk": "^2.1692.0",
173
157
  "change-case": "^5.4.4",
@@ -181,16 +165,31 @@
181
165
  "jest": "^30.1.3",
182
166
  "jest-junit": "^16.0.0",
183
167
  "ky": "^1.10.0",
184
- "lefthook": "^1.12.3",
168
+ "lefthook": "^1.13.0",
185
169
  "lodash": "^4.17.21",
186
170
  "lodash-es": "^4.17.21",
187
171
  "madge": "^8.0.0",
188
172
  "pg-native": "^3.5.2",
189
- "pg-promise": "^11.15.0",
173
+ "pg-promise": "^12.1.3",
174
+ "pg-query-stream": "^4.10.3",
190
175
  "rimraf": "^6.0.1",
191
176
  "ts-jest": "^29.4.1",
192
177
  "typescript": "^5.9.2",
193
178
  "velocityjs": "^2.1.5",
194
- "zod": "^3.25.76"
179
+ "zod": "^4.1.8"
180
+ },
181
+ "scripts": {
182
+ "build": "heft build --clean",
183
+ "build:watch": "heft build-watch",
184
+ "lint": "eslint --cache .",
185
+ "eslint-report": "eslint . --format html",
186
+ "ci:eslint-report": "eslint . --format html -o report.html || true",
187
+ "test": "NODE_OPTIONS='--experimental-vm-modules' heft test --clean --max-workers=1",
188
+ "test:jest": "node --trace-warnings --experimental-vm-modules --max-old-space-size=1536 --expose-gc ./node_modules/jest/bin/jest.js --detectOpenHandles --forceExit --coverage --coverageDirectory=output/coverage/jest --logHeapUsage --runInBand --verbose",
189
+ "test:inspect": "node --inspect-brk --expose-gc ./node_modules/jest/bin/jest.js --detectOpenHandles --forceExit --coverage --coverageDirectory=output/coverage/jest --logHeapUsage --runInBand",
190
+ "test:watch": "NODE_OPTIONS='--experimental-vm-modules' heft test-watch --max-workers=1",
191
+ "test:watch:no-coverage": "NODE_OPTIONS='--experimental-vm-modules' heft test-watch --disable-code-coverage --max-workers=1",
192
+ "run:format-changed": "lefthook run pre-commit",
193
+ "run:format": "deno fmt"
195
194
  }
196
- }
195
+ }