@exodus/errors 3.6.0 → 3.7.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.7.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/errors@3.6.0...@exodus/errors@3.7.0) (2026-02-12)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- feat(errors): validate traceId with TraceId.isTraceId() in context schema (#15183)
|
|
11
|
+
|
|
6
12
|
## [3.6.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/errors@3.5.0...@exodus/errors@3.6.0) (2026-02-02)
|
|
7
13
|
|
|
8
14
|
### Features
|
|
@@ -12,25 +12,28 @@ export declare const SafeContext: {
|
|
|
12
12
|
currentRouteName: string;
|
|
13
13
|
previousRouteName?: string | null | undefined;
|
|
14
14
|
}>>>;
|
|
15
|
-
traceId: import("@exodus/zod").ZodOptional<import("@exodus/zod").ZodNullable<import("@exodus/zod").
|
|
15
|
+
traceId: import("@exodus/zod").ZodOptional<import("@exodus/zod").ZodNullable<import("@exodus/zod").ZodType<import("libraries/traceparent/lib/trace-id.js").TraceId, import("@exodus/zod").ZodTypeDef, import("libraries/traceparent/lib/trace-id.js").TraceId>>>;
|
|
16
16
|
reason: import("@exodus/zod").ZodOptional<import("@exodus/zod").ZodNullable<import("@exodus/zod").ZodEffects<import("@exodus/zod").ZodString, string, string>>>;
|
|
17
17
|
type: import("@exodus/zod").ZodOptional<import("@exodus/zod").ZodNullable<import("@exodus/zod").ZodEffects<import("@exodus/zod").ZodString, string, string>>>;
|
|
18
|
+
baseAssetName: import("@exodus/zod").ZodOptional<import("@exodus/zod").ZodNullable<import("@exodus/zod").ZodEffects<import("@exodus/zod").ZodString, string, string>>>;
|
|
18
19
|
}, "strict", import("@exodus/zod").ZodTypeAny, {
|
|
19
20
|
type?: string | null | undefined;
|
|
20
21
|
navigation?: {
|
|
21
22
|
currentRouteName: string;
|
|
22
23
|
previousRouteName?: string | null | undefined;
|
|
23
24
|
} | null | undefined;
|
|
24
|
-
traceId?:
|
|
25
|
+
traceId?: import("libraries/traceparent/lib/trace-id.js").TraceId | null | undefined;
|
|
25
26
|
reason?: string | null | undefined;
|
|
27
|
+
baseAssetName?: string | null | undefined;
|
|
26
28
|
}, {
|
|
27
29
|
type?: string | null | undefined;
|
|
28
30
|
navigation?: {
|
|
29
31
|
currentRouteName: string;
|
|
30
32
|
previousRouteName?: string | null | undefined;
|
|
31
33
|
} | null | undefined;
|
|
32
|
-
traceId?:
|
|
34
|
+
traceId?: import("libraries/traceparent/lib/trace-id.js").TraceId | null | undefined;
|
|
33
35
|
reason?: string | null | undefined;
|
|
36
|
+
baseAssetName?: string | null | undefined;
|
|
34
37
|
}>>>>;
|
|
35
38
|
};
|
|
36
39
|
export type { SafeContextType } from './schemas.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from '@exodus/zod';
|
|
2
|
+
import { TraceId } from '@exodus/traceparent';
|
|
2
3
|
declare const createContextSchema: () => z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
3
4
|
navigation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
4
5
|
currentRouteName: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -10,25 +11,28 @@ declare const createContextSchema: () => z.ZodOptional<z.ZodNullable<z.ZodObject
|
|
|
10
11
|
currentRouteName: string;
|
|
11
12
|
previousRouteName?: string | null | undefined;
|
|
12
13
|
}>>>;
|
|
13
|
-
traceId: z.ZodOptional<z.ZodNullable<z.
|
|
14
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodType<TraceId, z.ZodTypeDef, TraceId>>>;
|
|
14
15
|
reason: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
15
16
|
type: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
17
|
+
baseAssetName: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
16
18
|
}, "strict", z.ZodTypeAny, {
|
|
17
19
|
type?: string | null | undefined;
|
|
18
20
|
navigation?: {
|
|
19
21
|
currentRouteName: string;
|
|
20
22
|
previousRouteName?: string | null | undefined;
|
|
21
23
|
} | null | undefined;
|
|
22
|
-
traceId?:
|
|
24
|
+
traceId?: TraceId | null | undefined;
|
|
23
25
|
reason?: string | null | undefined;
|
|
26
|
+
baseAssetName?: string | null | undefined;
|
|
24
27
|
}, {
|
|
25
28
|
type?: string | null | undefined;
|
|
26
29
|
navigation?: {
|
|
27
30
|
currentRouteName: string;
|
|
28
31
|
previousRouteName?: string | null | undefined;
|
|
29
32
|
} | null | undefined;
|
|
30
|
-
traceId?:
|
|
33
|
+
traceId?: TraceId | null | undefined;
|
|
31
34
|
reason?: string | null | undefined;
|
|
35
|
+
baseAssetName?: string | null | undefined;
|
|
32
36
|
}>>>;
|
|
33
37
|
declare const getContextSchema: () => ReturnType<typeof createContextSchema>;
|
|
34
38
|
export type SafeContextType = z.infer<ReturnType<typeof createContextSchema>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from '@exodus/zod';
|
|
2
2
|
import { isSafe } from '@exodus/safe-string';
|
|
3
3
|
import { memoize } from '@exodus/basic-utils';
|
|
4
|
+
import { TraceId } from '@exodus/traceparent';
|
|
4
5
|
const createContextSchema = () => z
|
|
5
6
|
.object({
|
|
6
7
|
navigation: z
|
|
@@ -10,9 +11,10 @@ const createContextSchema = () => z
|
|
|
10
11
|
})
|
|
11
12
|
.strict()
|
|
12
13
|
.nullish(),
|
|
13
|
-
traceId: z.
|
|
14
|
+
traceId: z.custom((val) => val instanceof TraceId).nullish(),
|
|
14
15
|
reason: z.string().refine(isSafe).nullish(),
|
|
15
16
|
type: z.string().refine(isSafe).nullish(),
|
|
17
|
+
baseAssetName: z.string().refine(isSafe).nullish(),
|
|
16
18
|
})
|
|
17
19
|
.strict()
|
|
18
20
|
.nullish();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/errors",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.7.0",
|
|
5
5
|
"description": "Utilities for error handling in client code, such as sanitization",
|
|
6
6
|
"author": "Exodus Movement, Inc.",
|
|
7
7
|
"repository": {
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@exodus/basic-utils": "^3.0.1",
|
|
38
|
-
"@exodus/safe-string": "^1.
|
|
38
|
+
"@exodus/safe-string": "^1.4.0",
|
|
39
|
+
"@exodus/traceparent": "^2.0.0",
|
|
39
40
|
"@exodus/zod": "^3.24.2",
|
|
40
41
|
"minimalistic-assert": "^1.0.1"
|
|
41
42
|
},
|
|
@@ -47,5 +48,5 @@
|
|
|
47
48
|
"access": "public",
|
|
48
49
|
"provenance": false
|
|
49
50
|
},
|
|
50
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "fe153ece541b24d322016b462ea1331a11811ed2"
|
|
51
52
|
}
|