@digitraffic/common 2026.2.17-3 → 2026.2.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.
@@ -21,6 +21,7 @@ export declare function zStringToNumber(message?: string): z.ZodPipe<z.ZodString
21
21
  */
22
22
  export declare function zStringToDate(message?: string): z.ZodPipe<z.ZodString, z.ZodTransform<Date | undefined, string>>;
23
23
  /**
24
- * Optional string. Empty strings are treated as undefined.
24
+ * A non-empty string. Empty strings produce a validation error.
25
+ * Chain with .optional() to also accept undefined.
25
26
  */
26
- export declare function zOptionalString(): z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
27
+ export declare function zNonEmptyString(message?: string): z.ZodString;
@@ -46,12 +46,12 @@ export function zStringToDate(message) {
46
46
  });
47
47
  }
48
48
  /**
49
- * Optional string. Empty strings are treated as undefined.
49
+ * A non-empty string. Empty strings produce a validation error.
50
+ * Chain with .optional() to also accept undefined.
50
51
  */
51
- export function zOptionalString() {
52
- return z
53
- .string()
54
- .optional()
55
- .transform((val) => (val === "" ? undefined : val));
52
+ export function zNonEmptyString(message) {
53
+ return z.string().refine((val) => val !== "", {
54
+ message: message ?? "String must not be empty",
55
+ });
56
56
  }
57
57
  //# sourceMappingURL=zod-utils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitraffic/common",
3
- "version": "2026.2.17-3",
3
+ "version": "2026.2.23-1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "repository": {
@@ -108,11 +108,11 @@
108
108
  "dist/**/*.d.ts"
109
109
  ],
110
110
  "devDependencies": {
111
- "@aws-sdk/client-api-gateway": "3.975.0",
112
- "@aws-sdk/client-s3": "3.975.0",
113
- "@aws-sdk/client-secrets-manager": "3.975.0",
114
- "@aws-sdk/client-sns": "3.975.0",
115
- "@aws-sdk/lib-storage": "3.975.0",
111
+ "@aws-sdk/client-api-gateway": "3.995.0",
112
+ "@aws-sdk/client-s3": "3.995.0",
113
+ "@aws-sdk/client-secrets-manager": "3.995.0",
114
+ "@aws-sdk/client-sns": "3.995.0",
115
+ "@aws-sdk/lib-storage": "3.995.0",
116
116
  "@biomejs/biome": "2.3.13",
117
117
  "@date-fns/tz": "1.4.1",
118
118
  "@jest/globals": "30.2.0",
@@ -153,11 +153,11 @@
153
153
  "zod": "4.3.6"
154
154
  },
155
155
  "peerDependencies": {
156
- "@aws-sdk/client-api-gateway": "3.975.0",
157
- "@aws-sdk/client-s3": "3.975.0",
158
- "@aws-sdk/client-secrets-manager": "3.975.0",
159
- "@aws-sdk/client-sns": "3.975.0",
160
- "@aws-sdk/lib-storage": "3.975.0",
156
+ "@aws-sdk/client-api-gateway": "3.995.0",
157
+ "@aws-sdk/client-s3": "3.995.0",
158
+ "@aws-sdk/client-secrets-manager": "3.995.0",
159
+ "@aws-sdk/client-sns": "3.995.0",
160
+ "@aws-sdk/lib-storage": "3.995.0",
161
161
  "@date-fns/tz": "1.4.1",
162
162
  "@smithy/fetch-http-handler": "5.3.9",
163
163
  "@smithy/node-http-handler": "4.4.8",