[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
0

Configure Feed

Select the types of activity you want to include in your feed.

refactor(chrome): Proper package patch for optional/nullish validation fixes

https://github.com/dantaylor3/chromecast-client/pull/14

FoxxMD (Jan 12, 2024, 10:14 AM EST) f47a6606 8929a630

+93 -16
+93 -16
patches/chromecast-client+1.0.1.patch
··· 1 + diff --git a/node_modules/chromecast-client/dist/cjs/src/apps/application.js b/node_modules/chromecast-client/dist/cjs/src/apps/application.js 2 + index d91a6ff..dfc417e 100644 3 + --- a/node_modules/chromecast-client/dist/cjs/src/apps/application.js 4 + +++ b/node_modules/chromecast-client/dist/cjs/src/apps/application.js 5 + @@ -4,7 +4,9 @@ exports.join = exports.launchAndJoin = void 0; 6 + const receiver_1 = require("../controllers/receiver"); 7 + const utils_1 = require("../utils"); 8 + const _getJoinableTransportId = (status) => { 9 + - const app = status.applications.find(a => a.namespaces.map(e => e.name).includes('urn:x-cast:com.google.cast.media')); 10 + + const app = status.applications === undefined 11 + + ? undefined 12 + + : status.applications.find(a => a.namespaces.map(e => e.name).includes('urn:x-cast:com.google.cast.media')); 13 + return app === undefined ? utils_1.Result.Err(new Error('failed to find joinable application')) : utils_1.Result.Ok(app.transportId); 14 + }; 15 + const _join = async (status, factory) => { 1 16 diff --git a/node_modules/chromecast-client/dist/cjs/src/cast-types/index.d.ts b/node_modules/chromecast-client/dist/cjs/src/cast-types/index.d.ts 2 - index cbc2af8..adc5e3d 100644 17 + index cbc2af8..e0f60dc 100644 3 18 --- a/node_modules/chromecast-client/dist/cjs/src/cast-types/index.d.ts 4 19 +++ b/node_modules/chromecast-client/dist/cjs/src/cast-types/index.d.ts 5 20 @@ -63,7 +63,7 @@ export declare const Application$: z.ZodObject<{ ··· 7 22 export type Application = z.infer<typeof Application$>; 8 23 export declare const ReceiverStatus$: z.ZodObject<{ 9 24 - applications: z.ZodArray<z.ZodObject<{ 10 - + applications: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{ 25 + + applications: z.ZodOptional<z.ZodArray<z.ZodObject<{ 11 26 appId: z.ZodString; 12 27 displayName: z.ZodString; 13 28 iconUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>; ··· 16 31 sessionId: string; 17 32 transportId: string; 18 33 - }>, "many">; 19 - + }>, "many">>>; 34 + + }>, "many">>; 20 35 volume: z.ZodObject<{ 21 36 controlType: z.ZodEffects<z.ZodEnum<["ATTENUATION", "FIXED", "MASTER"]>, "ATTENUATION" | "FIXED" | "MASTER", unknown>; 22 37 level: z.ZodNullable<z.ZodOptional<z.ZodNumber>>; 23 - @@ -127,7 +127,7 @@ export declare const ReceiverStatus$: z.ZodObject<{ 24 - controlType: "ATTENUATION" | "FIXED" | "MASTER"; 38 + @@ -121,13 +121,7 @@ export declare const ReceiverStatus$: z.ZodObject<{ 25 39 stepInterval: number; 26 - }; 40 + }>; 41 + }, "strip", z.ZodTypeAny, { 42 + - volume: { 43 + - level?: number | null | undefined; 44 + - muted?: boolean | null | undefined; 45 + - controlType: "ATTENUATION" | "FIXED" | "MASTER"; 46 + - stepInterval: number; 47 + - }; 27 48 - applications: { 28 49 + applications?: { 29 50 iconUrl?: string | null | undefined; 30 51 isIdleScreen?: boolean | null | undefined; 31 52 launchedFromCloud?: boolean | null | undefined; 32 - @@ -147,7 +147,7 @@ export declare const ReceiverStatus$: z.ZodObject<{ 33 - controlType?: unknown; 53 + @@ -139,15 +133,15 @@ export declare const ReceiverStatus$: z.ZodObject<{ 54 + }[]; 55 + sessionId: string; 56 + transportId: string; 57 + - }[]; 58 + -}, { 59 + + }[] | undefined; 60 + volume: { 61 + level?: number | null | undefined; 62 + muted?: boolean | null | undefined; 63 + - controlType?: unknown; 64 + + controlType: "ATTENUATION" | "FIXED" | "MASTER"; 34 65 stepInterval: number; 35 66 }; 36 67 - applications: { 68 + +}, { 37 69 + applications?: { 38 70 iconUrl?: string | null | undefined; 39 71 isIdleScreen?: boolean | null | undefined; 40 72 launchedFromCloud?: boolean | null | undefined; 73 + @@ -159,6 +153,12 @@ export declare const ReceiverStatus$: z.ZodObject<{ 74 + }[]; 75 + sessionId: string; 76 + transportId: string; 77 + - }[]; 78 + + }[] | undefined; 79 + + volume: { 80 + + level?: number | null | undefined; 81 + + muted?: boolean | null | undefined; 82 + + controlType?: unknown; 83 + + stepInterval: number; 84 + + }; 85 + }>; 86 + export type ReceiverStatus = z.infer<typeof ReceiverStatus$>; 41 87 diff --git a/node_modules/chromecast-client/dist/cjs/src/cast-types/index.js b/node_modules/chromecast-client/dist/cjs/src/cast-types/index.js 42 - index 33bfb4b..b33cb22 100644 88 + index 33bfb4b..29e79fe 100644 43 89 --- a/node_modules/chromecast-client/dist/cjs/src/cast-types/index.js 44 90 +++ b/node_modules/chromecast-client/dist/cjs/src/cast-types/index.js 45 91 @@ -51,7 +51,7 @@ exports.Application$ = zod_1.z.object({ ··· 47 93 }); 48 94 exports.ReceiverStatus$ = zod_1.z.object({ 49 95 - applications: zod_1.z.array(exports.Application$), 50 - + applications: zod_1.z.array(exports.Application$).nullish(), 96 + + applications: zod_1.z.array(exports.Application$).optional(), 51 97 volume: exports.Volume$, 52 98 }); 53 99 //# sourceMappingURL=index.js.map 100 + \ No newline at end of file 54 101 diff --git a/node_modules/chromecast-client/dist/cjs/src/cast-types/media.types.d.ts b/node_modules/chromecast-client/dist/cjs/src/cast-types/media.types.d.ts 55 - index 53e42b2..6d7518b 100644 102 + index 53e42b2..0d77bb2 100644 56 103 --- a/node_modules/chromecast-client/dist/cjs/src/cast-types/media.types.d.ts 57 104 +++ b/node_modules/chromecast-client/dist/cjs/src/cast-types/media.types.d.ts 58 105 @@ -80,7 +80,7 @@ export declare const MediaStatus$: z.ZodObject<{ ··· 73 120 }, "strip", z.ZodTypeAny, { 74 121 media?: { 75 122 metadata?: Record<string, unknown> | null | undefined; 76 - @@ -128,7 +128,7 @@ export declare const MediaStatus$: z.ZodObject<{ 123 + @@ -102,15 +102,15 @@ export declare const MediaStatus$: z.ZodObject<{ 124 + } | null | undefined; 125 + customData?: Record<string, unknown> | null | undefined; 126 + idleReason?: "CANCELLED" | "INTERRUPTED" | "FINISHED" | "ERROR" | null | undefined; 127 + + volume?: { 128 + + level?: number | null | undefined; 129 + + muted?: boolean | null | undefined; 130 + + } | null | undefined; 131 + currentTime: number; 77 132 mediaSessionId: number; 78 133 playbackRate: number; 134 + playerState: "IDLE" | "PLAYING" | "BUFFERING" | "PAUSED"; 79 135 supportedMediaCommands: number; 80 136 - volume: { 137 + - level?: number | null | undefined; 138 + - muted?: boolean | null | undefined; 139 + - }; 140 + }, { 141 + media?: { 142 + metadata?: Record<string, unknown> | null | undefined; 143 + @@ -124,13 +124,13 @@ export declare const MediaStatus$: z.ZodObject<{ 144 + customData?: Record<string, unknown> | null | undefined; 145 + idleReason?: unknown; 146 + playerState?: unknown; 81 147 + volume?: { 82 - level?: number | null | undefined; 83 - muted?: boolean | null | undefined; 84 - }; 148 + + level?: number | null | undefined; 149 + + muted?: boolean | null | undefined; 150 + + } | null | undefined; 151 + currentTime: number; 152 + mediaSessionId: number; 153 + playbackRate: number; 154 + supportedMediaCommands: number; 155 + - volume: { 156 + - level?: number | null | undefined; 157 + - muted?: boolean | null | undefined; 158 + - }; 159 + }>; 160 + export type MediaStatus = z.infer<typeof MediaStatus$>; 85 161 diff --git a/node_modules/chromecast-client/dist/cjs/src/cast-types/media.types.js b/node_modules/chromecast-client/dist/cjs/src/cast-types/media.types.js 86 - index 2af6558..c85464c 100644 162 + index 2af6558..138f550 100644 87 163 --- a/node_modules/chromecast-client/dist/cjs/src/cast-types/media.types.js 88 164 +++ b/node_modules/chromecast-client/dist/cjs/src/cast-types/media.types.js 89 165 @@ -28,6 +28,6 @@ exports.MediaStatus$ = zod_1.z.object({ ··· 94 170 + volume: exports.Volume$.nullish(), 95 171 }); 96 172 //# sourceMappingURL=media.types.js.map 173 + \ No newline at end of file 97 174 diff --git a/node_modules/chromecast-client/dist/cjs/src/platform.d.ts b/node_modules/chromecast-client/dist/cjs/src/platform.d.ts 98 175 index 2f9770b..1247d8a 100644 99 176 --- a/node_modules/chromecast-client/dist/cjs/src/platform.d.ts