@opentabs-dev/opentabs-plugin-gitlab 0.0.82 → 0.0.83
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 +15 -4
- package/dist/adapter.iife.js.map +4 -4
- package/dist/gitlab-api.d.ts.map +1 -1
- package/dist/gitlab-api.js +8 -3
- package/dist/gitlab-api.js.map +1 -1
- package/dist/tools.json +1 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -255,6 +255,13 @@
|
|
|
255
255
|
ot._setLogTransport = _setLogTransport;
|
|
256
256
|
ot.log = log;
|
|
257
257
|
|
|
258
|
+
// node_modules/@opentabs-dev/plugin-sdk/dist/config.js
|
|
259
|
+
var getConfig = (key) => {
|
|
260
|
+
const ot3 = globalThis.__openTabs;
|
|
261
|
+
const config2 = ot3?.pluginConfig;
|
|
262
|
+
return config2?.[key];
|
|
263
|
+
};
|
|
264
|
+
|
|
258
265
|
// node_modules/@opentabs-dev/plugin-sdk/dist/page-state.js
|
|
259
266
|
var BLOCKED_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
260
267
|
var getPageGlobal = (path) => {
|
|
@@ -297,7 +304,11 @@
|
|
|
297
304
|
};
|
|
298
305
|
|
|
299
306
|
// src/gitlab-api.ts
|
|
300
|
-
var
|
|
307
|
+
var getApiBase = () => {
|
|
308
|
+
const instanceUrl = getConfig("instanceUrl");
|
|
309
|
+
if (instanceUrl) return `${instanceUrl.replace(/\/+$/, "")}/api/v4`;
|
|
310
|
+
return "https://gitlab.com/api/v4";
|
|
311
|
+
};
|
|
301
312
|
var getAuth = () => {
|
|
302
313
|
const username = getPageGlobal("gon.current_username");
|
|
303
314
|
if (typeof username !== "string" || !username) return null;
|
|
@@ -315,7 +326,7 @@
|
|
|
315
326
|
};
|
|
316
327
|
var getCsrfToken = () => getMetaContent("csrf-token");
|
|
317
328
|
var buildUrl = (endpoint, query) => {
|
|
318
|
-
let url2 = `${
|
|
329
|
+
let url2 = `${getApiBase()}${endpoint}`;
|
|
319
330
|
if (query) {
|
|
320
331
|
const params = new URLSearchParams();
|
|
321
332
|
for (const [key, value] of Object.entries(query)) {
|
|
@@ -15158,7 +15169,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15158
15169
|
};
|
|
15159
15170
|
var src_default = new GitLabPlugin();
|
|
15160
15171
|
|
|
15161
|
-
// dist/
|
|
15172
|
+
// dist/_adapter_entry_154814c8-b4a8-45ab-a732-d82256414b70.ts
|
|
15162
15173
|
if (!globalThis.__openTabs) {
|
|
15163
15174
|
globalThis.__openTabs = {};
|
|
15164
15175
|
} else {
|
|
@@ -15374,5 +15385,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15374
15385
|
};
|
|
15375
15386
|
delete src_default.onDeactivate;
|
|
15376
15387
|
}
|
|
15377
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["gitlab"]){var a=o.adapters["gitlab"];a.__adapterHash="
|
|
15388
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["gitlab"]){var a=o.adapters["gitlab"];a.__adapterHash="838b2f2207d1f2155bc3d53e7b5080ecc594833131c17e71ba5f6e8e27a1ac87";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,"gitlab",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15378
15389
|
//# sourceMappingURL=adapter.iife.js.map
|