@opentabs-dev/opentabs-plugin-twitch 0.0.83 → 0.0.84
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/dist/adapter.iife.js +17 -15
- package/dist/adapter.iife.js.map +4 -4
- package/dist/twitch-api.d.ts.map +1 -1
- package/dist/twitch-api.js +17 -14
- package/dist/twitch-api.js.map +1 -1
- package/package.json +1 -1
package/dist/adapter.iife.js
CHANGED
|
@@ -414,21 +414,23 @@
|
|
|
414
414
|
if (!auth) throw ToolError.auth("Not authenticated \u2014 please log in to Twitch.");
|
|
415
415
|
const body = { query };
|
|
416
416
|
if (variables) body.variables = variables;
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
"
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
417
|
+
let response;
|
|
418
|
+
try {
|
|
419
|
+
response = await fetchFromPage(GQL_URL, {
|
|
420
|
+
method: "POST",
|
|
421
|
+
credentials: "omit",
|
|
422
|
+
headers: {
|
|
423
|
+
"Client-Id": CLIENT_ID,
|
|
424
|
+
Authorization: `OAuth ${auth.token}`,
|
|
425
|
+
"Content-Type": "application/json"
|
|
426
|
+
},
|
|
427
|
+
body: JSON.stringify(body)
|
|
428
|
+
});
|
|
429
|
+
} catch (error48) {
|
|
430
|
+
if (error48 instanceof ToolError && error48.category === "auth") {
|
|
429
431
|
clearAuthCache("twitch");
|
|
430
432
|
}
|
|
431
|
-
throw
|
|
433
|
+
throw error48;
|
|
432
434
|
}
|
|
433
435
|
const result = await response.json();
|
|
434
436
|
if (result.errors?.length && !result.data) {
|
|
@@ -14885,7 +14887,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14885
14887
|
};
|
|
14886
14888
|
var src_default = new TwitchPlugin();
|
|
14887
14889
|
|
|
14888
|
-
// dist/
|
|
14890
|
+
// dist/_adapter_entry_ca5cc22b-9109-4aa2-858d-35a90f67f2d7.ts
|
|
14889
14891
|
if (!globalThis.__openTabs) {
|
|
14890
14892
|
globalThis.__openTabs = {};
|
|
14891
14893
|
} else {
|
|
@@ -15101,5 +15103,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15101
15103
|
};
|
|
15102
15104
|
delete src_default.onDeactivate;
|
|
15103
15105
|
}
|
|
15104
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["twitch"]){var a=o.adapters["twitch"];a.__adapterHash="
|
|
15106
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["twitch"]){var a=o.adapters["twitch"];a.__adapterHash="8af1d4a903ae6f13ad52968b061af7acb37ff87120d6a65e54f1e25c72b4ebfa";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"twitch",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15105
15107
|
//# sourceMappingURL=adapter.iife.js.map
|