Skip to content

Commit

Permalink
Merge branch 'feat/all_events' of https://github.com/looking-glass/br…
Browse files Browse the repository at this point in the history
…idge.js into feat/all_events
  • Loading branch information
BryanChrisBrown committed Mar 7, 2024
2 parents ca2f66d + f9e20d1 commit 433a61a
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/looking-glass-bridge.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/looking-glass-bridge.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/looking-glass-bridge.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function C(n) {
try {
t.time(n.endpoint);
let r = await fetch(`${n.baseUrl + n.endpoint}`, s);
return r.ok ? (r.status == 408 && (t.warn("%c Bridge Timeout:", "color: #ff0000", r), console.groupEnd()), e = await r.json(), e.status.value !== "Completion" && e.status.value !== "Pending" ? (console.warn("%c Bridge Failure:", "color: #ff0000", e), console.groupEnd(), { success: !0, response: e }) : (t.log("%c Response:", "color: #00aa00", e), t.timeEnd(n.endpoint), console.groupEnd(), { success: !0, response: e })) : { success: !1, response: null };
return r.ok ? (r.status == 408 && (t.warn("%c Bridge Timeout:", "color: #ff0000", r), console.groupEnd()), e = await r.json(), e.status.value !== "Completion" && e.status.value !== "Pending" ? (t.warn("%c Bridge Failure:", "color: #ff0000", e), console.groupEnd(), { success: !0, response: e }) : (t.log("%c Response:", "color: #00aa00", e), t.timeEnd(n.endpoint), console.groupEnd(), { success: !0, response: e })) : { success: !1, response: null };
} catch (r) {
return console.group("%c Bridge Error:", "color: #ff0000"), console.error("Bridge Error", r), console.groupEnd(), console.groupEnd(), { success: !1, response: null };
}
Expand Down
2 changes: 1 addition & 1 deletion dist/looking-glass-bridge.mjs.map

Large diffs are not rendered by default.

47 changes: 45 additions & 2 deletions dist/schemas/schema.events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,19 @@ export declare const newItemPlayingResponse: z.ZodObject<{
name: string;
type: "WSTRING";
}>;
tag: z.ZodObject<{
name: z.ZodString;
type: z.ZodLiteral<"WSTRING">;
value: z.ZodString;
}, "strip", z.ZodTypeAny, {
value: string;
name: string;
type: "WSTRING";
}, {
value: string;
name: string;
type: "WSTRING";
}>;
}, "strip", z.ZodTypeAny, {
index: {
value: number;
Expand All @@ -1819,6 +1832,11 @@ export declare const newItemPlayingResponse: z.ZodObject<{
name: string;
type: "WSTRING";
};
tag: {
value: string;
name: string;
type: "WSTRING";
};
}, {
index: {
value: number;
Expand All @@ -1835,6 +1853,11 @@ export declare const newItemPlayingResponse: z.ZodObject<{
name: string;
type: "WSTRING";
};
tag: {
value: string;
name: string;
type: "WSTRING";
};
}>;
}, "strip", z.ZodTypeAny, {
value: {
Expand All @@ -1853,6 +1876,11 @@ export declare const newItemPlayingResponse: z.ZodObject<{
name: string;
type: "WSTRING";
};
tag: {
value: string;
name: string;
type: "WSTRING";
};
};
name: string;
type: "VARIANT_MAP";
Expand All @@ -1873,6 +1901,11 @@ export declare const newItemPlayingResponse: z.ZodObject<{
name: string;
type: "WSTRING";
};
tag: {
value: string;
name: string;
type: "WSTRING";
};
};
name: string;
type: "VARIANT_MAP";
Expand Down Expand Up @@ -1913,6 +1946,11 @@ export declare const newItemPlayingResponse: z.ZodObject<{
name: string;
type: "WSTRING";
};
tag: {
value: string;
name: string;
type: "WSTRING";
};
};
name: string;
type: "VARIANT_MAP";
Expand Down Expand Up @@ -1946,6 +1984,11 @@ export declare const newItemPlayingResponse: z.ZodObject<{
name: string;
type: "WSTRING";
};
tag: {
value: string;
name: string;
type: "WSTRING";
};
};
name: string;
type: "VARIANT_MAP";
Expand All @@ -1957,7 +2000,7 @@ export declare const newItemPlayingResponse: z.ZodObject<{
type: "WSTRING";
};
}>;
export declare const AllEventsResponse: z.ZodObject<{
export declare const allEventsResponse: z.ZodObject<{
name: z.ZodString;
orchestration: z.ZodObject<{
name: z.ZodString;
Expand Down Expand Up @@ -2143,7 +2186,7 @@ export type BridgeEventMap = {
"Transport Control Next": z.infer<typeof transportControlResponse>;
"Transport Control Previous": z.infer<typeof transportControlResponse>;
"New Item Playing": z.infer<typeof newItemPlayingResponse>;
"All Events": z.infer<typeof AllEventsResponse>;
"All Events": z.infer<typeof allEventsResponse>;
/**CUSTOM CLIENT EVENTS BELOW THESE ARE NOT PART OF BRIDGE */
"Bridge Connected": z.infer<typeof progressUpdateResponse>;
"Bridge Disconnected": z.infer<typeof progressUpdateResponse>;
Expand Down
2 changes: 1 addition & 1 deletion dist/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

0 comments on commit 433a61a

Please sign in to comment.