@4players/odin-common 1.2.1 → 1.2.3

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
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.3
4
+
5
+ - Fixed build errors due to missing WebSocket package types
6
+ - Updated dependencies
7
+
8
+ ## 1.2.2
9
+
10
+ - Added optional internal field to token claims schema
11
+
3
12
  ## 1.2.1
4
13
 
5
14
  - Updated npm ignore patterns
@@ -14,6 +14,9 @@ exports.TokenClaimsSchema = zod_1.z.object({
14
14
  aud: zod_1.z.optional(oneOrMany(exports.TokenAudienceSchema)),
15
15
  exp: zod_1.z.optional(zod_1.z.number()),
16
16
  nbf: zod_1.z.optional(zod_1.z.number()),
17
+ internal: zod_1.z.optional(zod_1.z.object({
18
+ server: zod_1.z.optional(zod_1.z.string()),
19
+ })),
17
20
  });
18
21
  function oneOrMany(type) {
19
22
  return zod_1.z.union([type, zod_1.z.array(type)]);
@@ -11,6 +11,9 @@ export const TokenClaimsSchema = z.object({
11
11
  aud: z.optional(oneOrMany(TokenAudienceSchema)),
12
12
  exp: z.optional(z.number()),
13
13
  nbf: z.optional(z.number()),
14
+ internal: z.optional(z.object({
15
+ server: z.optional(z.string()),
16
+ })),
14
17
  });
15
18
  export function oneOrMany(type) {
16
19
  return z.union([type, z.array(type)]);
@@ -11,6 +11,13 @@ export declare const TokenClaimsSchema: z.ZodObject<{
11
11
  aud: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["sfu", "gateway"]>, z.ZodArray<z.ZodEnum<["sfu", "gateway"]>, "many">]>>;
12
12
  exp: z.ZodOptional<z.ZodNumber>;
13
13
  nbf: z.ZodOptional<z.ZodNumber>;
14
+ internal: z.ZodOptional<z.ZodObject<{
15
+ server: z.ZodOptional<z.ZodString>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ server?: string | undefined;
18
+ }, {
19
+ server?: string | undefined;
20
+ }>>;
14
21
  }, "strip", z.ZodTypeAny, {
15
22
  uid: string;
16
23
  rid: (string | string[]) & (string | string[] | undefined);
@@ -21,6 +28,9 @@ export declare const TokenClaimsSchema: z.ZodObject<{
21
28
  aud?: "sfu" | "gateway" | ("sfu" | "gateway")[] | undefined;
22
29
  exp?: number | undefined;
23
30
  nbf?: number | undefined;
31
+ internal?: {
32
+ server?: string | undefined;
33
+ } | undefined;
24
34
  }, {
25
35
  uid: string;
26
36
  rid: (string | string[]) & (string | string[] | undefined);
@@ -31,6 +41,9 @@ export declare const TokenClaimsSchema: z.ZodObject<{
31
41
  aud?: "sfu" | "gateway" | ("sfu" | "gateway")[] | undefined;
32
42
  exp?: number | undefined;
33
43
  nbf?: number | undefined;
44
+ internal?: {
45
+ server?: string | undefined;
46
+ } | undefined;
34
47
  }>;
35
48
  export type TokenClaims = z.infer<typeof TokenClaimsSchema>;
36
49
  export declare function oneOrMany<T extends z.ZodTypeAny>(type: T): z.ZodUnion<[T, z.ZodArray<T, "many">]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4players/odin-common",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "A collection of commonly used type definitions and utility functions across ODIN web projects",
5
5
  "author": "Josho Bleicker <josho.bleicker@4players.io> (https://www.4players.io)",
6
6
  "homepage": "https://www.4players.io",
@@ -29,20 +29,20 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@msgpack/msgpack": "~3.0.0-beta2",
32
- "ws": "~8.15.0",
32
+ "@types/ws": "~8.5.0",
33
+ "ws": "~8.16.0",
33
34
  "zod": "~3.22.0"
34
35
  },
35
36
  "devDependencies": {
36
- "@typescript-eslint/eslint-plugin": "~6.14.0",
37
- "@typescript-eslint/parser": "~6.14.0",
38
- "@types/ws": "~8.5.0",
39
- "eslint": "~8.55.0",
37
+ "@typescript-eslint/eslint-plugin": "~6.18.0",
38
+ "@typescript-eslint/parser": "~6.18.0",
39
+ "eslint": "~8.56.0",
40
40
  "eslint-config-semistandard": "~17.0.0",
41
41
  "eslint-plugin-import": "~2.29.0",
42
42
  "eslint-plugin-node": "~11.1.0",
43
43
  "eslint-plugin-promise": "~6.1.0",
44
44
  "prettier": "~3.1.0",
45
45
  "testyts": "~1.5.0",
46
- "typescript": "~5.2.0"
46
+ "typescript": "~5.3.0"
47
47
  }
48
48
  }