@pilatos/bitbucket-cli 1.13.0 → 1.13.2
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/index.js +1055 -849
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -12239,73 +12239,6 @@ var require_form_data = __commonJS((exports, module) => {
|
|
|
12239
12239
|
module.exports = FormData2;
|
|
12240
12240
|
});
|
|
12241
12241
|
|
|
12242
|
-
// node_modules/proxy-from-env/index.js
|
|
12243
|
-
var require_proxy_from_env = __commonJS((exports) => {
|
|
12244
|
-
var parseUrl = __require("url").parse;
|
|
12245
|
-
var DEFAULT_PORTS = {
|
|
12246
|
-
ftp: 21,
|
|
12247
|
-
gopher: 70,
|
|
12248
|
-
http: 80,
|
|
12249
|
-
https: 443,
|
|
12250
|
-
ws: 80,
|
|
12251
|
-
wss: 443
|
|
12252
|
-
};
|
|
12253
|
-
var stringEndsWith = String.prototype.endsWith || function(s) {
|
|
12254
|
-
return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
|
|
12255
|
-
};
|
|
12256
|
-
function getProxyForUrl(url2) {
|
|
12257
|
-
var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
|
|
12258
|
-
var proto2 = parsedUrl.protocol;
|
|
12259
|
-
var hostname = parsedUrl.host;
|
|
12260
|
-
var port = parsedUrl.port;
|
|
12261
|
-
if (typeof hostname !== "string" || !hostname || typeof proto2 !== "string") {
|
|
12262
|
-
return "";
|
|
12263
|
-
}
|
|
12264
|
-
proto2 = proto2.split(":", 1)[0];
|
|
12265
|
-
hostname = hostname.replace(/:\d*$/, "");
|
|
12266
|
-
port = parseInt(port) || DEFAULT_PORTS[proto2] || 0;
|
|
12267
|
-
if (!shouldProxy(hostname, port)) {
|
|
12268
|
-
return "";
|
|
12269
|
-
}
|
|
12270
|
-
var proxy = getEnv("npm_config_" + proto2 + "_proxy") || getEnv(proto2 + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
|
|
12271
|
-
if (proxy && proxy.indexOf("://") === -1) {
|
|
12272
|
-
proxy = proto2 + "://" + proxy;
|
|
12273
|
-
}
|
|
12274
|
-
return proxy;
|
|
12275
|
-
}
|
|
12276
|
-
function shouldProxy(hostname, port) {
|
|
12277
|
-
var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
|
|
12278
|
-
if (!NO_PROXY) {
|
|
12279
|
-
return true;
|
|
12280
|
-
}
|
|
12281
|
-
if (NO_PROXY === "*") {
|
|
12282
|
-
return false;
|
|
12283
|
-
}
|
|
12284
|
-
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
12285
|
-
if (!proxy) {
|
|
12286
|
-
return true;
|
|
12287
|
-
}
|
|
12288
|
-
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
12289
|
-
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
12290
|
-
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
12291
|
-
if (parsedProxyPort && parsedProxyPort !== port) {
|
|
12292
|
-
return true;
|
|
12293
|
-
}
|
|
12294
|
-
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
12295
|
-
return hostname !== parsedProxyHostname;
|
|
12296
|
-
}
|
|
12297
|
-
if (parsedProxyHostname.charAt(0) === "*") {
|
|
12298
|
-
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
12299
|
-
}
|
|
12300
|
-
return !stringEndsWith.call(hostname, parsedProxyHostname);
|
|
12301
|
-
});
|
|
12302
|
-
}
|
|
12303
|
-
function getEnv(key) {
|
|
12304
|
-
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
12305
|
-
}
|
|
12306
|
-
exports.getProxyForUrl = getProxyForUrl;
|
|
12307
|
-
});
|
|
12308
|
-
|
|
12309
12242
|
// node_modules/ms/index.js
|
|
12310
12243
|
var require_ms = __commonJS((exports, module) => {
|
|
12311
12244
|
var s = 1000;
|
|
@@ -13351,7 +13284,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
|
|
|
13351
13284
|
removeMatchingHeaders(/^content-/i, this._options.headers);
|
|
13352
13285
|
}
|
|
13353
13286
|
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
|
13354
|
-
var currentUrlParts =
|
|
13287
|
+
var currentUrlParts = parseUrl2(this._currentUrl);
|
|
13355
13288
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
13356
13289
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
13357
13290
|
var redirectUrl = resolveUrl(location, currentUrl);
|
|
@@ -13390,7 +13323,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
|
|
|
13390
13323
|
if (isURL(input)) {
|
|
13391
13324
|
input = spreadUrlObject(input);
|
|
13392
13325
|
} else if (isString2(input)) {
|
|
13393
|
-
input = spreadUrlObject(
|
|
13326
|
+
input = spreadUrlObject(parseUrl2(input));
|
|
13394
13327
|
} else {
|
|
13395
13328
|
callback = options;
|
|
13396
13329
|
options = validateUrl(input);
|
|
@@ -13425,7 +13358,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
|
|
|
13425
13358
|
return exports2;
|
|
13426
13359
|
}
|
|
13427
13360
|
function noop2() {}
|
|
13428
|
-
function
|
|
13361
|
+
function parseUrl2(input) {
|
|
13429
13362
|
var parsed;
|
|
13430
13363
|
if (useNativeURL) {
|
|
13431
13364
|
parsed = new URL2(input);
|
|
@@ -13438,7 +13371,7 @@ var require_follow_redirects = __commonJS((exports, module) => {
|
|
|
13438
13371
|
return parsed;
|
|
13439
13372
|
}
|
|
13440
13373
|
function resolveUrl(relative, base) {
|
|
13441
|
-
return useNativeURL ? new URL2(relative, base) :
|
|
13374
|
+
return useNativeURL ? new URL2(relative, base) : parseUrl2(url2.resolve(base, relative));
|
|
13442
13375
|
}
|
|
13443
13376
|
function validateUrl(input) {
|
|
13444
13377
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -14257,10 +14190,10 @@ class Container {
|
|
|
14257
14190
|
}
|
|
14258
14191
|
var ServiceTokens = {
|
|
14259
14192
|
ConfigService: "ConfigService",
|
|
14193
|
+
CredentialStore: "CredentialStore",
|
|
14260
14194
|
GitService: "GitService",
|
|
14261
14195
|
ContextService: "ContextService",
|
|
14262
14196
|
OutputService: "OutputService",
|
|
14263
|
-
HttpClient: "HttpClient",
|
|
14264
14197
|
OAuthService: "OAuthService",
|
|
14265
14198
|
VersionService: "VersionService",
|
|
14266
14199
|
PullrequestsApi: "PullrequestsApi",
|
|
@@ -14321,7 +14254,7 @@ var ServiceTokens = {
|
|
|
14321
14254
|
};
|
|
14322
14255
|
|
|
14323
14256
|
// src/services/config.service.ts
|
|
14324
|
-
import {
|
|
14257
|
+
import { posix, win32 } from "path";
|
|
14325
14258
|
import { homedir } from "os";
|
|
14326
14259
|
|
|
14327
14260
|
// src/types/errors.ts
|
|
@@ -14394,14 +14327,15 @@ class ConfigService {
|
|
|
14394
14327
|
configCache = null;
|
|
14395
14328
|
constructor(configDir, options = {}) {
|
|
14396
14329
|
const platform = options.platform ?? process.platform;
|
|
14397
|
-
const joinPath = platform === "win32" ? win32.join : join;
|
|
14330
|
+
const joinPath = platform === "win32" ? win32.join : posix.join;
|
|
14398
14331
|
this.configDir = configDir ?? this.resolveDefaultConfigDir({ ...options, platform });
|
|
14399
14332
|
this.configFile = joinPath(this.configDir, "config.json");
|
|
14400
14333
|
}
|
|
14401
14334
|
resolveDefaultConfigDir(options) {
|
|
14402
14335
|
const platform = options.platform ?? process.platform;
|
|
14336
|
+
const isSimulatedPlatform = options.platform !== undefined;
|
|
14403
14337
|
if (platform === "win32") {
|
|
14404
|
-
const appDataDir = options.appData ?? process.env.APPDATA;
|
|
14338
|
+
const appDataDir = options.appData ?? (isSimulatedPlatform ? undefined : process.env.APPDATA);
|
|
14405
14339
|
if (appDataDir) {
|
|
14406
14340
|
return win32.join(appDataDir, "bb");
|
|
14407
14341
|
}
|
|
@@ -14409,7 +14343,7 @@ class ConfigService {
|
|
|
14409
14343
|
return win32.join(homeDir2, "AppData", "Roaming", "bb");
|
|
14410
14344
|
}
|
|
14411
14345
|
const homeDir = options.homeDir ?? homedir();
|
|
14412
|
-
return join(homeDir, ".config", "bb");
|
|
14346
|
+
return posix.join(homeDir, ".config", "bb");
|
|
14413
14347
|
}
|
|
14414
14348
|
async ensureConfigDir() {
|
|
14415
14349
|
try {
|
|
@@ -14636,14 +14570,14 @@ class ContextService {
|
|
|
14636
14570
|
this.configService = configService;
|
|
14637
14571
|
}
|
|
14638
14572
|
parseRemoteUrl(url) {
|
|
14639
|
-
const sshMatch =
|
|
14573
|
+
const sshMatch = /git@bitbucket\.org:([^/]+)\/([^.]+)(?:\.git)?/.exec(url);
|
|
14640
14574
|
if (sshMatch) {
|
|
14641
14575
|
return {
|
|
14642
14576
|
workspace: sshMatch[1],
|
|
14643
14577
|
repoSlug: sshMatch[2]
|
|
14644
14578
|
};
|
|
14645
14579
|
}
|
|
14646
|
-
const httpsMatch =
|
|
14580
|
+
const httpsMatch = /https?:\/\/(?:[^@]+@)?bitbucket\.org\/([^/]+)\/([^/.]+)(?:\.git)?/.exec(url);
|
|
14647
14581
|
if (httpsMatch) {
|
|
14648
14582
|
return {
|
|
14649
14583
|
workspace: httpsMatch[1],
|
|
@@ -14700,6 +14634,19 @@ class ContextService {
|
|
|
14700
14634
|
}
|
|
14701
14635
|
return context;
|
|
14702
14636
|
}
|
|
14637
|
+
async requireWorkspace(explicit) {
|
|
14638
|
+
if (explicit && explicit.length > 0) {
|
|
14639
|
+
return explicit;
|
|
14640
|
+
}
|
|
14641
|
+
const config = await this.configService.getConfig();
|
|
14642
|
+
if (config.defaultWorkspace && config.defaultWorkspace.length > 0) {
|
|
14643
|
+
return config.defaultWorkspace;
|
|
14644
|
+
}
|
|
14645
|
+
throw new BBError({
|
|
14646
|
+
code: 6002 /* CONTEXT_WORKSPACE_NOT_FOUND */,
|
|
14647
|
+
message: "No workspace specified. Use --workspace option or set a default workspace with `bb config set defaultWorkspace <name>`."
|
|
14648
|
+
});
|
|
14649
|
+
}
|
|
14703
14650
|
}
|
|
14704
14651
|
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
14705
14652
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -15585,16 +15532,40 @@ var isEmptyObject = (val) => {
|
|
|
15585
15532
|
};
|
|
15586
15533
|
var isDate = kindOfTest("Date");
|
|
15587
15534
|
var isFile = kindOfTest("File");
|
|
15535
|
+
var isReactNativeBlob = (value) => {
|
|
15536
|
+
return !!(value && typeof value.uri !== "undefined");
|
|
15537
|
+
};
|
|
15538
|
+
var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
15588
15539
|
var isBlob = kindOfTest("Blob");
|
|
15589
15540
|
var isFileList = kindOfTest("FileList");
|
|
15590
15541
|
var isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
15542
|
+
function getGlobal() {
|
|
15543
|
+
if (typeof globalThis !== "undefined")
|
|
15544
|
+
return globalThis;
|
|
15545
|
+
if (typeof self !== "undefined")
|
|
15546
|
+
return self;
|
|
15547
|
+
if (typeof window !== "undefined")
|
|
15548
|
+
return window;
|
|
15549
|
+
if (typeof global !== "undefined")
|
|
15550
|
+
return global;
|
|
15551
|
+
return {};
|
|
15552
|
+
}
|
|
15553
|
+
var G = getGlobal();
|
|
15554
|
+
var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : undefined;
|
|
15591
15555
|
var isFormData = (thing) => {
|
|
15592
15556
|
let kind;
|
|
15593
|
-
return thing && (
|
|
15557
|
+
return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
15594
15558
|
};
|
|
15595
15559
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
15596
|
-
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
15597
|
-
|
|
15560
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
15561
|
+
"ReadableStream",
|
|
15562
|
+
"Request",
|
|
15563
|
+
"Response",
|
|
15564
|
+
"Headers"
|
|
15565
|
+
].map(kindOfTest);
|
|
15566
|
+
var trim = (str) => {
|
|
15567
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
15568
|
+
};
|
|
15598
15569
|
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
15599
15570
|
if (obj === null || typeof obj === "undefined") {
|
|
15600
15571
|
return;
|
|
@@ -15647,6 +15618,9 @@ function merge() {
|
|
|
15647
15618
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
15648
15619
|
const result = {};
|
|
15649
15620
|
const assignValue = (val, key) => {
|
|
15621
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
15622
|
+
return;
|
|
15623
|
+
}
|
|
15650
15624
|
const targetKey = caseless && findKey(result, key) || key;
|
|
15651
15625
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
15652
15626
|
result[targetKey] = merge(result[targetKey], val);
|
|
@@ -15666,9 +15640,19 @@ function merge() {
|
|
|
15666
15640
|
var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
15667
15641
|
forEach(b, (val, key) => {
|
|
15668
15642
|
if (thisArg && isFunction(val)) {
|
|
15669
|
-
a
|
|
15643
|
+
Object.defineProperty(a, key, {
|
|
15644
|
+
value: bind(val, thisArg),
|
|
15645
|
+
writable: true,
|
|
15646
|
+
enumerable: true,
|
|
15647
|
+
configurable: true
|
|
15648
|
+
});
|
|
15670
15649
|
} else {
|
|
15671
|
-
a
|
|
15650
|
+
Object.defineProperty(a, key, {
|
|
15651
|
+
value: val,
|
|
15652
|
+
writable: true,
|
|
15653
|
+
enumerable: true,
|
|
15654
|
+
configurable: true
|
|
15655
|
+
});
|
|
15672
15656
|
}
|
|
15673
15657
|
}, { allOwnKeys });
|
|
15674
15658
|
return a;
|
|
@@ -15681,7 +15665,12 @@ var stripBOM = (content) => {
|
|
|
15681
15665
|
};
|
|
15682
15666
|
var inherits = (constructor, superConstructor, props, descriptors) => {
|
|
15683
15667
|
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
15684
|
-
constructor.prototype
|
|
15668
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
15669
|
+
value: constructor,
|
|
15670
|
+
writable: true,
|
|
15671
|
+
enumerable: false,
|
|
15672
|
+
configurable: true
|
|
15673
|
+
});
|
|
15685
15674
|
Object.defineProperty(constructor, "super", {
|
|
15686
15675
|
value: superConstructor.prototype
|
|
15687
15676
|
});
|
|
@@ -15874,6 +15863,8 @@ var utils_default = {
|
|
|
15874
15863
|
isUndefined,
|
|
15875
15864
|
isDate,
|
|
15876
15865
|
isFile,
|
|
15866
|
+
isReactNativeBlob,
|
|
15867
|
+
isReactNative,
|
|
15877
15868
|
isBlob,
|
|
15878
15869
|
isRegExp,
|
|
15879
15870
|
isFunction,
|
|
@@ -15916,25 +15907,36 @@ var utils_default = {
|
|
|
15916
15907
|
};
|
|
15917
15908
|
|
|
15918
15909
|
// node_modules/axios/lib/core/AxiosError.js
|
|
15919
|
-
|
|
15920
|
-
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
15928
|
-
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
|
|
15932
|
-
this
|
|
15933
|
-
|
|
15910
|
+
class AxiosError extends Error {
|
|
15911
|
+
static from(error, code, config, request, response, customProps) {
|
|
15912
|
+
const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
|
|
15913
|
+
axiosError.cause = error;
|
|
15914
|
+
axiosError.name = error.name;
|
|
15915
|
+
if (error.status != null && axiosError.status == null) {
|
|
15916
|
+
axiosError.status = error.status;
|
|
15917
|
+
}
|
|
15918
|
+
customProps && Object.assign(axiosError, customProps);
|
|
15919
|
+
return axiosError;
|
|
15920
|
+
}
|
|
15921
|
+
constructor(message, code, config, request, response) {
|
|
15922
|
+
super(message);
|
|
15923
|
+
Object.defineProperty(this, "message", {
|
|
15924
|
+
value: message,
|
|
15925
|
+
enumerable: true,
|
|
15926
|
+
writable: true,
|
|
15927
|
+
configurable: true
|
|
15928
|
+
});
|
|
15929
|
+
this.name = "AxiosError";
|
|
15930
|
+
this.isAxiosError = true;
|
|
15931
|
+
code && (this.code = code);
|
|
15932
|
+
config && (this.config = config);
|
|
15933
|
+
request && (this.request = request);
|
|
15934
|
+
if (response) {
|
|
15935
|
+
this.response = response;
|
|
15936
|
+
this.status = response.status;
|
|
15937
|
+
}
|
|
15934
15938
|
}
|
|
15935
|
-
|
|
15936
|
-
utils_default.inherits(AxiosError, Error, {
|
|
15937
|
-
toJSON: function toJSON() {
|
|
15939
|
+
toJSON() {
|
|
15938
15940
|
return {
|
|
15939
15941
|
message: this.message,
|
|
15940
15942
|
name: this.name,
|
|
@@ -15949,44 +15951,19 @@ utils_default.inherits(AxiosError, Error, {
|
|
|
15949
15951
|
status: this.status
|
|
15950
15952
|
};
|
|
15951
15953
|
}
|
|
15952
|
-
}
|
|
15953
|
-
|
|
15954
|
-
|
|
15955
|
-
|
|
15956
|
-
|
|
15957
|
-
|
|
15958
|
-
|
|
15959
|
-
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15965
|
-
"ERR_CANCELED",
|
|
15966
|
-
"ERR_NOT_SUPPORT",
|
|
15967
|
-
"ERR_INVALID_URL"
|
|
15968
|
-
].forEach((code) => {
|
|
15969
|
-
descriptors[code] = { value: code };
|
|
15970
|
-
});
|
|
15971
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
15972
|
-
Object.defineProperty(prototype, "isAxiosError", { value: true });
|
|
15973
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
15974
|
-
const axiosError = Object.create(prototype);
|
|
15975
|
-
utils_default.toFlatObject(error, axiosError, function filter(obj) {
|
|
15976
|
-
return obj !== Error.prototype;
|
|
15977
|
-
}, (prop) => {
|
|
15978
|
-
return prop !== "isAxiosError";
|
|
15979
|
-
});
|
|
15980
|
-
const msg = error && error.message ? error.message : "Error";
|
|
15981
|
-
const errCode = code == null && error ? error.code : code;
|
|
15982
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
15983
|
-
if (error && axiosError.cause == null) {
|
|
15984
|
-
Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
|
|
15985
|
-
}
|
|
15986
|
-
axiosError.name = error && error.name || "Error";
|
|
15987
|
-
customProps && Object.assign(axiosError, customProps);
|
|
15988
|
-
return axiosError;
|
|
15989
|
-
};
|
|
15954
|
+
}
|
|
15955
|
+
AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
15956
|
+
AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
15957
|
+
AxiosError.ECONNABORTED = "ECONNABORTED";
|
|
15958
|
+
AxiosError.ETIMEDOUT = "ETIMEDOUT";
|
|
15959
|
+
AxiosError.ERR_NETWORK = "ERR_NETWORK";
|
|
15960
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
15961
|
+
AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
15962
|
+
AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
15963
|
+
AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
15964
|
+
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
15965
|
+
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
15966
|
+
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
15990
15967
|
var AxiosError_default = AxiosError;
|
|
15991
15968
|
|
|
15992
15969
|
// node_modules/axios/lib/platform/node/classes/FormData.js
|
|
@@ -16054,6 +16031,10 @@ function toFormData(obj, formData, options) {
|
|
|
16054
16031
|
}
|
|
16055
16032
|
function defaultVisitor(value, key, path) {
|
|
16056
16033
|
let arr = value;
|
|
16034
|
+
if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
|
|
16035
|
+
formData.append(renderKey(path, key, dots), convertValue(value));
|
|
16036
|
+
return false;
|
|
16037
|
+
}
|
|
16057
16038
|
if (value && !path && typeof value === "object") {
|
|
16058
16039
|
if (utils_default.endsWith(key, "{}")) {
|
|
16059
16040
|
key = metaTokens ? key : key.slice(0, -2);
|
|
@@ -16120,11 +16101,11 @@ function AxiosURLSearchParams(params, options) {
|
|
|
16120
16101
|
this._pairs = [];
|
|
16121
16102
|
params && toFormData_default(params, this, options);
|
|
16122
16103
|
}
|
|
16123
|
-
var
|
|
16124
|
-
|
|
16104
|
+
var prototype = AxiosURLSearchParams.prototype;
|
|
16105
|
+
prototype.append = function append(name, value) {
|
|
16125
16106
|
this._pairs.push([name, value]);
|
|
16126
16107
|
};
|
|
16127
|
-
|
|
16108
|
+
prototype.toString = function toString2(encoder) {
|
|
16128
16109
|
const _encode = encoder ? function(value) {
|
|
16129
16110
|
return encoder.call(this, value, encode);
|
|
16130
16111
|
} : encode;
|
|
@@ -16143,17 +16124,15 @@ function buildURL(url, params, options) {
|
|
|
16143
16124
|
return url;
|
|
16144
16125
|
}
|
|
16145
16126
|
const _encode = options && options.encode || encode2;
|
|
16146
|
-
|
|
16147
|
-
options
|
|
16148
|
-
|
|
16149
|
-
|
|
16150
|
-
}
|
|
16151
|
-
const serializeFn = options && options.serialize;
|
|
16127
|
+
const _options = utils_default.isFunction(options) ? {
|
|
16128
|
+
serialize: options
|
|
16129
|
+
} : options;
|
|
16130
|
+
const serializeFn = _options && _options.serialize;
|
|
16152
16131
|
let serializedParams;
|
|
16153
16132
|
if (serializeFn) {
|
|
16154
|
-
serializedParams = serializeFn(params,
|
|
16133
|
+
serializedParams = serializeFn(params, _options);
|
|
16155
16134
|
} else {
|
|
16156
|
-
serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params,
|
|
16135
|
+
serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode);
|
|
16157
16136
|
}
|
|
16158
16137
|
if (serializedParams) {
|
|
16159
16138
|
const hashmarkIndex = url.indexOf("#");
|
|
@@ -16203,7 +16182,8 @@ var InterceptorManager_default = InterceptorManager;
|
|
|
16203
16182
|
var transitional_default = {
|
|
16204
16183
|
silentJSONParsing: true,
|
|
16205
16184
|
forcedJSONParsing: true,
|
|
16206
|
-
clarifyTimeoutError: false
|
|
16185
|
+
clarifyTimeoutError: false,
|
|
16186
|
+
legacyInterceptorReqResOrdering: true
|
|
16207
16187
|
};
|
|
16208
16188
|
|
|
16209
16189
|
// node_modules/axios/lib/platform/node/index.js
|
|
@@ -16351,66 +16331,70 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
16351
16331
|
var defaults = {
|
|
16352
16332
|
transitional: transitional_default,
|
|
16353
16333
|
adapter: ["xhr", "http", "fetch"],
|
|
16354
|
-
transformRequest: [
|
|
16355
|
-
|
|
16356
|
-
|
|
16357
|
-
|
|
16358
|
-
|
|
16359
|
-
|
|
16360
|
-
|
|
16361
|
-
|
|
16362
|
-
|
|
16363
|
-
|
|
16364
|
-
|
|
16365
|
-
|
|
16366
|
-
|
|
16367
|
-
|
|
16368
|
-
|
|
16369
|
-
|
|
16370
|
-
|
|
16371
|
-
|
|
16372
|
-
|
|
16373
|
-
|
|
16374
|
-
|
|
16375
|
-
|
|
16376
|
-
|
|
16377
|
-
if (
|
|
16378
|
-
|
|
16334
|
+
transformRequest: [
|
|
16335
|
+
function transformRequest(data, headers) {
|
|
16336
|
+
const contentType = headers.getContentType() || "";
|
|
16337
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
16338
|
+
const isObjectPayload = utils_default.isObject(data);
|
|
16339
|
+
if (isObjectPayload && utils_default.isHTMLForm(data)) {
|
|
16340
|
+
data = new FormData(data);
|
|
16341
|
+
}
|
|
16342
|
+
const isFormData2 = utils_default.isFormData(data);
|
|
16343
|
+
if (isFormData2) {
|
|
16344
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
16345
|
+
}
|
|
16346
|
+
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
|
|
16347
|
+
return data;
|
|
16348
|
+
}
|
|
16349
|
+
if (utils_default.isArrayBufferView(data)) {
|
|
16350
|
+
return data.buffer;
|
|
16351
|
+
}
|
|
16352
|
+
if (utils_default.isURLSearchParams(data)) {
|
|
16353
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
16354
|
+
return data.toString();
|
|
16355
|
+
}
|
|
16356
|
+
let isFileList2;
|
|
16357
|
+
if (isObjectPayload) {
|
|
16358
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
16359
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
16360
|
+
}
|
|
16361
|
+
if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
16362
|
+
const _FormData = this.env && this.env.FormData;
|
|
16363
|
+
return toFormData_default(isFileList2 ? { "files[]": data } : data, _FormData && new _FormData, this.formSerializer);
|
|
16364
|
+
}
|
|
16379
16365
|
}
|
|
16380
|
-
if (
|
|
16381
|
-
|
|
16382
|
-
return
|
|
16366
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
16367
|
+
headers.setContentType("application/json", false);
|
|
16368
|
+
return stringifySafely(data);
|
|
16383
16369
|
}
|
|
16384
|
-
}
|
|
16385
|
-
if (isObjectPayload || hasJSONContentType) {
|
|
16386
|
-
headers.setContentType("application/json", false);
|
|
16387
|
-
return stringifySafely(data);
|
|
16388
|
-
}
|
|
16389
|
-
return data;
|
|
16390
|
-
}],
|
|
16391
|
-
transformResponse: [function transformResponse(data) {
|
|
16392
|
-
const transitional = this.transitional || defaults.transitional;
|
|
16393
|
-
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
16394
|
-
const JSONRequested = this.responseType === "json";
|
|
16395
|
-
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
16396
16370
|
return data;
|
|
16397
16371
|
}
|
|
16398
|
-
|
|
16399
|
-
|
|
16400
|
-
|
|
16401
|
-
|
|
16402
|
-
|
|
16403
|
-
|
|
16404
|
-
|
|
16405
|
-
|
|
16406
|
-
|
|
16372
|
+
],
|
|
16373
|
+
transformResponse: [
|
|
16374
|
+
function transformResponse(data) {
|
|
16375
|
+
const transitional = this.transitional || defaults.transitional;
|
|
16376
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
16377
|
+
const JSONRequested = this.responseType === "json";
|
|
16378
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
16379
|
+
return data;
|
|
16380
|
+
}
|
|
16381
|
+
if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
|
|
16382
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
16383
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
16384
|
+
try {
|
|
16385
|
+
return JSON.parse(data, this.parseReviver);
|
|
16386
|
+
} catch (e) {
|
|
16387
|
+
if (strictJSONParsing) {
|
|
16388
|
+
if (e.name === "SyntaxError") {
|
|
16389
|
+
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
|
|
16390
|
+
}
|
|
16391
|
+
throw e;
|
|
16407
16392
|
}
|
|
16408
|
-
throw e;
|
|
16409
16393
|
}
|
|
16410
16394
|
}
|
|
16395
|
+
return data;
|
|
16411
16396
|
}
|
|
16412
|
-
|
|
16413
|
-
}],
|
|
16397
|
+
],
|
|
16414
16398
|
timeout: 0,
|
|
16415
16399
|
xsrfCookieName: "XSRF-TOKEN",
|
|
16416
16400
|
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
@@ -16483,14 +16467,38 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
16483
16467
|
|
|
16484
16468
|
// node_modules/axios/lib/core/AxiosHeaders.js
|
|
16485
16469
|
var $internals = Symbol("internals");
|
|
16470
|
+
var isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
16471
|
+
function assertValidHeaderValue(value, header) {
|
|
16472
|
+
if (value === false || value == null) {
|
|
16473
|
+
return;
|
|
16474
|
+
}
|
|
16475
|
+
if (utils_default.isArray(value)) {
|
|
16476
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
16477
|
+
return;
|
|
16478
|
+
}
|
|
16479
|
+
if (!isValidHeaderValue(String(value))) {
|
|
16480
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
16481
|
+
}
|
|
16482
|
+
}
|
|
16486
16483
|
function normalizeHeader(header) {
|
|
16487
16484
|
return header && String(header).trim().toLowerCase();
|
|
16488
16485
|
}
|
|
16486
|
+
function stripTrailingCRLF(str) {
|
|
16487
|
+
let end = str.length;
|
|
16488
|
+
while (end > 0) {
|
|
16489
|
+
const charCode = str.charCodeAt(end - 1);
|
|
16490
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
16491
|
+
break;
|
|
16492
|
+
}
|
|
16493
|
+
end -= 1;
|
|
16494
|
+
}
|
|
16495
|
+
return end === str.length ? str : str.slice(0, end);
|
|
16496
|
+
}
|
|
16489
16497
|
function normalizeValue(value) {
|
|
16490
16498
|
if (value === false || value == null) {
|
|
16491
16499
|
return value;
|
|
16492
16500
|
}
|
|
16493
|
-
return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
16501
|
+
return utils_default.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
16494
16502
|
}
|
|
16495
16503
|
function parseTokens(str) {
|
|
16496
16504
|
const tokens = Object.create(null);
|
|
@@ -16548,6 +16556,7 @@ class AxiosHeaders {
|
|
|
16548
16556
|
}
|
|
16549
16557
|
const key = utils_default.findKey(self2, lHeader);
|
|
16550
16558
|
if (!key || self2[key] === undefined || _rewrite === true || _rewrite === undefined && self2[key] !== false) {
|
|
16559
|
+
assertValidHeaderValue(_value, _header);
|
|
16551
16560
|
self2[key || _header] = normalizeValue(_value);
|
|
16552
16561
|
}
|
|
16553
16562
|
}
|
|
@@ -16688,11 +16697,11 @@ class AxiosHeaders {
|
|
|
16688
16697
|
accessors: {}
|
|
16689
16698
|
};
|
|
16690
16699
|
const accessors = internals.accessors;
|
|
16691
|
-
const
|
|
16700
|
+
const prototype2 = this.prototype;
|
|
16692
16701
|
function defineAccessor(_header) {
|
|
16693
16702
|
const lHeader = normalizeHeader(_header);
|
|
16694
16703
|
if (!accessors[lHeader]) {
|
|
16695
|
-
buildAccessors(
|
|
16704
|
+
buildAccessors(prototype2, _header);
|
|
16696
16705
|
accessors[lHeader] = true;
|
|
16697
16706
|
}
|
|
16698
16707
|
}
|
|
@@ -16700,7 +16709,14 @@ class AxiosHeaders {
|
|
|
16700
16709
|
return this;
|
|
16701
16710
|
}
|
|
16702
16711
|
}
|
|
16703
|
-
AxiosHeaders.accessor([
|
|
16712
|
+
AxiosHeaders.accessor([
|
|
16713
|
+
"Content-Type",
|
|
16714
|
+
"Content-Length",
|
|
16715
|
+
"Accept",
|
|
16716
|
+
"Accept-Encoding",
|
|
16717
|
+
"User-Agent",
|
|
16718
|
+
"Authorization"
|
|
16719
|
+
]);
|
|
16704
16720
|
utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
16705
16721
|
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
16706
16722
|
return {
|
|
@@ -16732,13 +16748,13 @@ function isCancel(value) {
|
|
|
16732
16748
|
}
|
|
16733
16749
|
|
|
16734
16750
|
// node_modules/axios/lib/cancel/CanceledError.js
|
|
16735
|
-
|
|
16736
|
-
|
|
16737
|
-
|
|
16751
|
+
class CanceledError extends AxiosError_default {
|
|
16752
|
+
constructor(message, config, request) {
|
|
16753
|
+
super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
16754
|
+
this.name = "CanceledError";
|
|
16755
|
+
this.__CANCEL__ = true;
|
|
16756
|
+
}
|
|
16738
16757
|
}
|
|
16739
|
-
utils_default.inherits(CanceledError, AxiosError_default, {
|
|
16740
|
-
__CANCEL__: true
|
|
16741
|
-
});
|
|
16742
16758
|
var CanceledError_default = CanceledError;
|
|
16743
16759
|
|
|
16744
16760
|
// node_modules/axios/lib/core/settle.js
|
|
@@ -16753,6 +16769,9 @@ function settle(resolve, reject, response) {
|
|
|
16753
16769
|
|
|
16754
16770
|
// node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
16755
16771
|
function isAbsoluteURL(url2) {
|
|
16772
|
+
if (typeof url2 !== "string") {
|
|
16773
|
+
return false;
|
|
16774
|
+
}
|
|
16756
16775
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
16757
16776
|
}
|
|
16758
16777
|
|
|
@@ -16770,8 +16789,74 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
|
16770
16789
|
return requestedURL;
|
|
16771
16790
|
}
|
|
16772
16791
|
|
|
16792
|
+
// node_modules/proxy-from-env/index.js
|
|
16793
|
+
var DEFAULT_PORTS = {
|
|
16794
|
+
ftp: 21,
|
|
16795
|
+
gopher: 70,
|
|
16796
|
+
http: 80,
|
|
16797
|
+
https: 443,
|
|
16798
|
+
ws: 80,
|
|
16799
|
+
wss: 443
|
|
16800
|
+
};
|
|
16801
|
+
function parseUrl(urlString) {
|
|
16802
|
+
try {
|
|
16803
|
+
return new URL(urlString);
|
|
16804
|
+
} catch {
|
|
16805
|
+
return null;
|
|
16806
|
+
}
|
|
16807
|
+
}
|
|
16808
|
+
function getProxyForUrl(url2) {
|
|
16809
|
+
var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {};
|
|
16810
|
+
var proto2 = parsedUrl.protocol;
|
|
16811
|
+
var hostname = parsedUrl.host;
|
|
16812
|
+
var port = parsedUrl.port;
|
|
16813
|
+
if (typeof hostname !== "string" || !hostname || typeof proto2 !== "string") {
|
|
16814
|
+
return "";
|
|
16815
|
+
}
|
|
16816
|
+
proto2 = proto2.split(":", 1)[0];
|
|
16817
|
+
hostname = hostname.replace(/:\d*$/, "");
|
|
16818
|
+
port = parseInt(port) || DEFAULT_PORTS[proto2] || 0;
|
|
16819
|
+
if (!shouldProxy(hostname, port)) {
|
|
16820
|
+
return "";
|
|
16821
|
+
}
|
|
16822
|
+
var proxy = getEnv(proto2 + "_proxy") || getEnv("all_proxy");
|
|
16823
|
+
if (proxy && proxy.indexOf("://") === -1) {
|
|
16824
|
+
proxy = proto2 + "://" + proxy;
|
|
16825
|
+
}
|
|
16826
|
+
return proxy;
|
|
16827
|
+
}
|
|
16828
|
+
function shouldProxy(hostname, port) {
|
|
16829
|
+
var NO_PROXY = getEnv("no_proxy").toLowerCase();
|
|
16830
|
+
if (!NO_PROXY) {
|
|
16831
|
+
return true;
|
|
16832
|
+
}
|
|
16833
|
+
if (NO_PROXY === "*") {
|
|
16834
|
+
return false;
|
|
16835
|
+
}
|
|
16836
|
+
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
16837
|
+
if (!proxy) {
|
|
16838
|
+
return true;
|
|
16839
|
+
}
|
|
16840
|
+
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
16841
|
+
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
16842
|
+
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
16843
|
+
if (parsedProxyPort && parsedProxyPort !== port) {
|
|
16844
|
+
return true;
|
|
16845
|
+
}
|
|
16846
|
+
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
16847
|
+
return hostname !== parsedProxyHostname;
|
|
16848
|
+
}
|
|
16849
|
+
if (parsedProxyHostname.charAt(0) === "*") {
|
|
16850
|
+
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
16851
|
+
}
|
|
16852
|
+
return !hostname.endsWith(parsedProxyHostname);
|
|
16853
|
+
});
|
|
16854
|
+
}
|
|
16855
|
+
function getEnv(key) {
|
|
16856
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
16857
|
+
}
|
|
16858
|
+
|
|
16773
16859
|
// node_modules/axios/lib/adapters/http.js
|
|
16774
|
-
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
16775
16860
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
16776
16861
|
import http from "http";
|
|
16777
16862
|
import https from "https";
|
|
@@ -16780,7 +16865,7 @@ import util2 from "util";
|
|
|
16780
16865
|
import zlib from "zlib";
|
|
16781
16866
|
|
|
16782
16867
|
// node_modules/axios/lib/env/data.js
|
|
16783
|
-
var VERSION = "1.
|
|
16868
|
+
var VERSION = "1.15.0";
|
|
16784
16869
|
|
|
16785
16870
|
// node_modules/axios/lib/helpers/parseProtocol.js
|
|
16786
16871
|
function parseProtocol(url2) {
|
|
@@ -17077,6 +17162,83 @@ var callbackify = (fn, reducer) => {
|
|
|
17077
17162
|
};
|
|
17078
17163
|
var callbackify_default = callbackify;
|
|
17079
17164
|
|
|
17165
|
+
// node_modules/axios/lib/helpers/shouldBypassProxy.js
|
|
17166
|
+
var DEFAULT_PORTS2 = {
|
|
17167
|
+
http: 80,
|
|
17168
|
+
https: 443,
|
|
17169
|
+
ws: 80,
|
|
17170
|
+
wss: 443,
|
|
17171
|
+
ftp: 21
|
|
17172
|
+
};
|
|
17173
|
+
var parseNoProxyEntry = (entry) => {
|
|
17174
|
+
let entryHost = entry;
|
|
17175
|
+
let entryPort = 0;
|
|
17176
|
+
if (entryHost.charAt(0) === "[") {
|
|
17177
|
+
const bracketIndex = entryHost.indexOf("]");
|
|
17178
|
+
if (bracketIndex !== -1) {
|
|
17179
|
+
const host = entryHost.slice(1, bracketIndex);
|
|
17180
|
+
const rest = entryHost.slice(bracketIndex + 1);
|
|
17181
|
+
if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) {
|
|
17182
|
+
entryPort = Number.parseInt(rest.slice(1), 10);
|
|
17183
|
+
}
|
|
17184
|
+
return [host, entryPort];
|
|
17185
|
+
}
|
|
17186
|
+
}
|
|
17187
|
+
const firstColon = entryHost.indexOf(":");
|
|
17188
|
+
const lastColon = entryHost.lastIndexOf(":");
|
|
17189
|
+
if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) {
|
|
17190
|
+
entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
|
|
17191
|
+
entryHost = entryHost.slice(0, lastColon);
|
|
17192
|
+
}
|
|
17193
|
+
return [entryHost, entryPort];
|
|
17194
|
+
};
|
|
17195
|
+
var normalizeNoProxyHost = (hostname) => {
|
|
17196
|
+
if (!hostname) {
|
|
17197
|
+
return hostname;
|
|
17198
|
+
}
|
|
17199
|
+
if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
|
|
17200
|
+
hostname = hostname.slice(1, -1);
|
|
17201
|
+
}
|
|
17202
|
+
return hostname.replace(/\.+$/, "");
|
|
17203
|
+
};
|
|
17204
|
+
function shouldBypassProxy(location) {
|
|
17205
|
+
let parsed;
|
|
17206
|
+
try {
|
|
17207
|
+
parsed = new URL(location);
|
|
17208
|
+
} catch (_err) {
|
|
17209
|
+
return false;
|
|
17210
|
+
}
|
|
17211
|
+
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase();
|
|
17212
|
+
if (!noProxy) {
|
|
17213
|
+
return false;
|
|
17214
|
+
}
|
|
17215
|
+
if (noProxy === "*") {
|
|
17216
|
+
return true;
|
|
17217
|
+
}
|
|
17218
|
+
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
|
|
17219
|
+
const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
17220
|
+
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
17221
|
+
if (!entry) {
|
|
17222
|
+
return false;
|
|
17223
|
+
}
|
|
17224
|
+
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
17225
|
+
entryHost = normalizeNoProxyHost(entryHost);
|
|
17226
|
+
if (!entryHost) {
|
|
17227
|
+
return false;
|
|
17228
|
+
}
|
|
17229
|
+
if (entryPort && entryPort !== port) {
|
|
17230
|
+
return false;
|
|
17231
|
+
}
|
|
17232
|
+
if (entryHost.charAt(0) === "*") {
|
|
17233
|
+
entryHost = entryHost.slice(1);
|
|
17234
|
+
}
|
|
17235
|
+
if (entryHost.charAt(0) === ".") {
|
|
17236
|
+
return hostname.endsWith(entryHost);
|
|
17237
|
+
}
|
|
17238
|
+
return hostname === entryHost;
|
|
17239
|
+
});
|
|
17240
|
+
}
|
|
17241
|
+
|
|
17080
17242
|
// node_modules/axios/lib/helpers/speedometer.js
|
|
17081
17243
|
function speedometer(samplesCount, min) {
|
|
17082
17244
|
samplesCount = samplesCount || 10;
|
|
@@ -17175,11 +17337,14 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
17175
17337
|
};
|
|
17176
17338
|
var progressEventDecorator = (total, throttled) => {
|
|
17177
17339
|
const lengthComputable = total != null;
|
|
17178
|
-
return [
|
|
17179
|
-
|
|
17180
|
-
|
|
17181
|
-
|
|
17182
|
-
|
|
17340
|
+
return [
|
|
17341
|
+
(loaded) => throttled[0]({
|
|
17342
|
+
lengthComputable,
|
|
17343
|
+
total,
|
|
17344
|
+
loaded
|
|
17345
|
+
}),
|
|
17346
|
+
throttled[1]
|
|
17347
|
+
];
|
|
17183
17348
|
};
|
|
17184
17349
|
var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
|
17185
17350
|
|
|
@@ -17288,6 +17453,9 @@ class Http2Sessions {
|
|
|
17288
17453
|
} else {
|
|
17289
17454
|
entries.splice(i, 1);
|
|
17290
17455
|
}
|
|
17456
|
+
if (!session.closed) {
|
|
17457
|
+
session.close();
|
|
17458
|
+
}
|
|
17291
17459
|
return;
|
|
17292
17460
|
}
|
|
17293
17461
|
}
|
|
@@ -17316,10 +17484,7 @@ class Http2Sessions {
|
|
|
17316
17484
|
};
|
|
17317
17485
|
}
|
|
17318
17486
|
session.once("close", removeSession);
|
|
17319
|
-
let entry = [
|
|
17320
|
-
session,
|
|
17321
|
-
options
|
|
17322
|
-
];
|
|
17487
|
+
let entry = [session, options];
|
|
17323
17488
|
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
17324
17489
|
return session;
|
|
17325
17490
|
}
|
|
@@ -17336,9 +17501,11 @@ function dispatchBeforeRedirect(options, responseDetails) {
|
|
|
17336
17501
|
function setProxy(options, configProxy, location) {
|
|
17337
17502
|
let proxy = configProxy;
|
|
17338
17503
|
if (!proxy && proxy !== false) {
|
|
17339
|
-
const proxyUrl =
|
|
17504
|
+
const proxyUrl = getProxyForUrl(location);
|
|
17340
17505
|
if (proxyUrl) {
|
|
17341
|
-
|
|
17506
|
+
if (!shouldBypassProxy(location)) {
|
|
17507
|
+
proxy = new URL(proxyUrl);
|
|
17508
|
+
}
|
|
17342
17509
|
}
|
|
17343
17510
|
}
|
|
17344
17511
|
if (proxy) {
|
|
@@ -17346,8 +17513,11 @@ function setProxy(options, configProxy, location) {
|
|
|
17346
17513
|
proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
|
|
17347
17514
|
}
|
|
17348
17515
|
if (proxy.auth) {
|
|
17349
|
-
|
|
17516
|
+
const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
|
|
17517
|
+
if (validProxyAuth) {
|
|
17350
17518
|
proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
|
|
17519
|
+
} else if (typeof proxy.auth === "object") {
|
|
17520
|
+
throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy });
|
|
17351
17521
|
}
|
|
17352
17522
|
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
17353
17523
|
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
@@ -17400,15 +17570,10 @@ var resolveFamily = ({ address, family }) => {
|
|
|
17400
17570
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
17401
17571
|
var http2Transport = {
|
|
17402
17572
|
request(options, cb) {
|
|
17403
|
-
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
17573
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
17404
17574
|
const { http2Options, headers } = options;
|
|
17405
17575
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
17406
|
-
const {
|
|
17407
|
-
HTTP2_HEADER_SCHEME,
|
|
17408
|
-
HTTP2_HEADER_METHOD,
|
|
17409
|
-
HTTP2_HEADER_PATH,
|
|
17410
|
-
HTTP2_HEADER_STATUS
|
|
17411
|
-
} = http2.constants;
|
|
17576
|
+
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants;
|
|
17412
17577
|
const http2Headers = {
|
|
17413
17578
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
17414
17579
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -17595,9 +17760,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
17595
17760
|
if (!utils_default.isStream(data)) {
|
|
17596
17761
|
data = stream3.Readable.from(data, { objectMode: false });
|
|
17597
17762
|
}
|
|
17598
|
-
data = stream3.pipeline([
|
|
17599
|
-
|
|
17600
|
-
|
|
17763
|
+
data = stream3.pipeline([
|
|
17764
|
+
data,
|
|
17765
|
+
new AxiosTransformStream_default({
|
|
17766
|
+
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
17767
|
+
})
|
|
17768
|
+
], utils_default.noop);
|
|
17601
17769
|
onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
|
|
17602
17770
|
}
|
|
17603
17771
|
let auth = undefined;
|
|
@@ -17942,7 +18110,9 @@ function mergeConfig(config1, config2) {
|
|
|
17942
18110
|
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
17943
18111
|
};
|
|
17944
18112
|
utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
17945
|
-
|
|
18113
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
|
|
18114
|
+
return;
|
|
18115
|
+
const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
17946
18116
|
const configValue = merge2(config1[prop], config2[prop], prop);
|
|
17947
18117
|
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
17948
18118
|
});
|
|
@@ -18122,7 +18292,7 @@ var composeSignals = (signals, timeout) => {
|
|
|
18122
18292
|
};
|
|
18123
18293
|
let timer = timeout && setTimeout(() => {
|
|
18124
18294
|
timer = null;
|
|
18125
|
-
onabort(new AxiosError_default(`timeout ${timeout}
|
|
18295
|
+
onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
18126
18296
|
}, timeout);
|
|
18127
18297
|
const unsubscribe = () => {
|
|
18128
18298
|
if (signals) {
|
|
@@ -18226,10 +18396,7 @@ var globalFetchAPI = (({ Request, Response: Response2 }) => ({
|
|
|
18226
18396
|
Request,
|
|
18227
18397
|
Response: Response2
|
|
18228
18398
|
}))(utils_default.global);
|
|
18229
|
-
var {
|
|
18230
|
-
ReadableStream: ReadableStream2,
|
|
18231
|
-
TextEncoder: TextEncoder2
|
|
18232
|
-
} = utils_default.global;
|
|
18399
|
+
var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global;
|
|
18233
18400
|
var test = (fn, ...args) => {
|
|
18234
18401
|
try {
|
|
18235
18402
|
return !!fn(...args);
|
|
@@ -18252,14 +18419,16 @@ var factory = (env2) => {
|
|
|
18252
18419
|
const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder2) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
18253
18420
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
18254
18421
|
let duplexAccessed = false;
|
|
18422
|
+
const body = new ReadableStream2;
|
|
18255
18423
|
const hasContentType = new Request(platform_default.origin, {
|
|
18256
|
-
body
|
|
18424
|
+
body,
|
|
18257
18425
|
method: "POST",
|
|
18258
18426
|
get duplex() {
|
|
18259
18427
|
duplexAccessed = true;
|
|
18260
18428
|
return "half";
|
|
18261
18429
|
}
|
|
18262
18430
|
}).headers.has("Content-Type");
|
|
18431
|
+
body.cancel();
|
|
18263
18432
|
return duplexAccessed && !hasContentType;
|
|
18264
18433
|
});
|
|
18265
18434
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response2("").body));
|
|
@@ -18388,11 +18557,11 @@ var factory = (env2) => {
|
|
|
18388
18557
|
} catch (err) {
|
|
18389
18558
|
unsubscribe && unsubscribe();
|
|
18390
18559
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
18391
|
-
throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request), {
|
|
18560
|
+
throw Object.assign(new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request, err && err.response), {
|
|
18392
18561
|
cause: err.cause || err
|
|
18393
18562
|
});
|
|
18394
18563
|
}
|
|
18395
|
-
throw AxiosError_default.from(err, err && err.code, config, request);
|
|
18564
|
+
throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
|
|
18396
18565
|
}
|
|
18397
18566
|
};
|
|
18398
18567
|
};
|
|
@@ -18400,11 +18569,7 @@ var seedCache = new Map;
|
|
|
18400
18569
|
var getFetch = (config) => {
|
|
18401
18570
|
let env2 = config && config.env || {};
|
|
18402
18571
|
const { fetch: fetch2, Request, Response: Response2 } = env2;
|
|
18403
|
-
const seeds = [
|
|
18404
|
-
Request,
|
|
18405
|
-
Response2,
|
|
18406
|
-
fetch2
|
|
18407
|
-
];
|
|
18572
|
+
const seeds = [Request, Response2, fetch2];
|
|
18408
18573
|
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
18409
18574
|
while (i--) {
|
|
18410
18575
|
seed = seeds[i];
|
|
@@ -18577,13 +18742,27 @@ class Axios {
|
|
|
18577
18742
|
if (err instanceof Error) {
|
|
18578
18743
|
let dummy = {};
|
|
18579
18744
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error;
|
|
18580
|
-
const stack =
|
|
18745
|
+
const stack = (() => {
|
|
18746
|
+
if (!dummy.stack) {
|
|
18747
|
+
return "";
|
|
18748
|
+
}
|
|
18749
|
+
const firstNewlineIndex = dummy.stack.indexOf(`
|
|
18750
|
+
`);
|
|
18751
|
+
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
18752
|
+
})();
|
|
18581
18753
|
try {
|
|
18582
18754
|
if (!err.stack) {
|
|
18583
18755
|
err.stack = stack;
|
|
18584
|
-
} else if (stack
|
|
18585
|
-
|
|
18756
|
+
} else if (stack) {
|
|
18757
|
+
const firstNewlineIndex = stack.indexOf(`
|
|
18758
|
+
`);
|
|
18759
|
+
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf(`
|
|
18760
|
+
`, firstNewlineIndex + 1);
|
|
18761
|
+
const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
|
|
18762
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
18763
|
+
err.stack += `
|
|
18586
18764
|
` + stack;
|
|
18765
|
+
}
|
|
18587
18766
|
}
|
|
18588
18767
|
} catch (e) {}
|
|
18589
18768
|
}
|
|
@@ -18603,7 +18782,8 @@ class Axios {
|
|
|
18603
18782
|
validator_default.assertOptions(transitional2, {
|
|
18604
18783
|
silentJSONParsing: validators2.transitional(validators2.boolean),
|
|
18605
18784
|
forcedJSONParsing: validators2.transitional(validators2.boolean),
|
|
18606
|
-
clarifyTimeoutError: validators2.transitional(validators2.boolean)
|
|
18785
|
+
clarifyTimeoutError: validators2.transitional(validators2.boolean),
|
|
18786
|
+
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
|
|
18607
18787
|
}, false);
|
|
18608
18788
|
}
|
|
18609
18789
|
if (paramsSerializer != null) {
|
|
@@ -18640,7 +18820,13 @@ class Axios {
|
|
|
18640
18820
|
return;
|
|
18641
18821
|
}
|
|
18642
18822
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
18643
|
-
|
|
18823
|
+
const transitional3 = config.transitional || transitional_default;
|
|
18824
|
+
const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
|
|
18825
|
+
if (legacyInterceptorReqResOrdering) {
|
|
18826
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
18827
|
+
} else {
|
|
18828
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
18829
|
+
}
|
|
18644
18830
|
});
|
|
18645
18831
|
const responseInterceptorChain = [];
|
|
18646
18832
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
@@ -18976,7 +19162,7 @@ function getRetryDelay(error, attempt) {
|
|
|
18976
19162
|
function sleep(ms) {
|
|
18977
19163
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
18978
19164
|
}
|
|
18979
|
-
function createApiClient(
|
|
19165
|
+
function createApiClient(credentialStore, oauthService) {
|
|
18980
19166
|
const instance = axios_default.create({
|
|
18981
19167
|
baseURL: BASE_URL,
|
|
18982
19168
|
headers: {
|
|
@@ -18988,12 +19174,12 @@ function createApiClient(configService, oauthService) {
|
|
|
18988
19174
|
if (process.env.DEBUG === "true") {
|
|
18989
19175
|
console.debug(`[HTTP] ${config.method?.toUpperCase()} ${config.url}`);
|
|
18990
19176
|
}
|
|
18991
|
-
const authMethod = await
|
|
19177
|
+
const authMethod = await credentialStore.getAuthMethod();
|
|
18992
19178
|
if (authMethod === "oauth" && oauthService) {
|
|
18993
19179
|
const accessToken = await oauthService.getValidAccessToken();
|
|
18994
19180
|
config.headers.Authorization = `Bearer ${accessToken}`;
|
|
18995
19181
|
} else {
|
|
18996
|
-
const credentials = await
|
|
19182
|
+
const credentials = await credentialStore.getCredentials();
|
|
18997
19183
|
const authString = Buffer.from(`${credentials.username}:${credentials.apiToken}`).toString("base64");
|
|
18998
19184
|
config.headers.Authorization = `Basic ${authString}`;
|
|
18999
19185
|
}
|
|
@@ -19015,7 +19201,7 @@ function createApiClient(configService, oauthService) {
|
|
|
19015
19201
|
if (error.response?.status === 401 && oauthService) {
|
|
19016
19202
|
const config = error.config;
|
|
19017
19203
|
if (config && !config.__tokenRefreshed) {
|
|
19018
|
-
const authMethod = await
|
|
19204
|
+
const authMethod = await credentialStore.getAuthMethod();
|
|
19019
19205
|
if (authMethod === "oauth") {
|
|
19020
19206
|
try {
|
|
19021
19207
|
config.__tokenRefreshed = true;
|
|
@@ -19105,8 +19291,10 @@ function generateState() {
|
|
|
19105
19291
|
|
|
19106
19292
|
class OAuthService {
|
|
19107
19293
|
configService;
|
|
19108
|
-
|
|
19294
|
+
credentialStore;
|
|
19295
|
+
constructor(configService, credentialStore) {
|
|
19109
19296
|
this.configService = configService;
|
|
19297
|
+
this.credentialStore = credentialStore;
|
|
19110
19298
|
}
|
|
19111
19299
|
async authorize(clientId, clientSecret) {
|
|
19112
19300
|
const resolvedClientId = clientId ?? await this.getClientId();
|
|
@@ -19115,7 +19303,7 @@ class OAuthService {
|
|
|
19115
19303
|
const { code } = await this.waitForCallback(authUrl, state);
|
|
19116
19304
|
const tokenResponse = await this.exchangeCode(code, resolvedClientId, clientSecret);
|
|
19117
19305
|
const expiresAt = Math.floor(Date.now() / 1000) + tokenResponse.expires_in;
|
|
19118
|
-
await this.
|
|
19306
|
+
await this.credentialStore.setOAuthCredentials({
|
|
19119
19307
|
accessToken: tokenResponse.access_token,
|
|
19120
19308
|
refreshToken: tokenResponse.refresh_token,
|
|
19121
19309
|
expiresAt
|
|
@@ -19130,7 +19318,7 @@ class OAuthService {
|
|
|
19130
19318
|
return userInfo;
|
|
19131
19319
|
}
|
|
19132
19320
|
async refreshAccessToken() {
|
|
19133
|
-
const credentials = await this.
|
|
19321
|
+
const credentials = await this.credentialStore.getOAuthCredentials();
|
|
19134
19322
|
const clientId = await this.getClientId();
|
|
19135
19323
|
const clientSecret = await this.getClientSecret();
|
|
19136
19324
|
const params = new URLSearchParams({
|
|
@@ -19155,7 +19343,7 @@ class OAuthService {
|
|
|
19155
19343
|
}
|
|
19156
19344
|
const tokenResponse = await response.json();
|
|
19157
19345
|
const expiresAt = Math.floor(Date.now() / 1000) + tokenResponse.expires_in;
|
|
19158
|
-
await this.
|
|
19346
|
+
await this.credentialStore.setOAuthCredentials({
|
|
19159
19347
|
accessToken: tokenResponse.access_token,
|
|
19160
19348
|
refreshToken: tokenResponse.refresh_token,
|
|
19161
19349
|
expiresAt
|
|
@@ -19164,7 +19352,7 @@ class OAuthService {
|
|
|
19164
19352
|
}
|
|
19165
19353
|
async revokeToken() {
|
|
19166
19354
|
try {
|
|
19167
|
-
const credentials = await this.
|
|
19355
|
+
const credentials = await this.credentialStore.getOAuthCredentials();
|
|
19168
19356
|
const clientId = await this.getClientId();
|
|
19169
19357
|
const clientSecret = await this.getClientSecret();
|
|
19170
19358
|
const params = new URLSearchParams({
|
|
@@ -19181,11 +19369,11 @@ class OAuthService {
|
|
|
19181
19369
|
} catch {}
|
|
19182
19370
|
}
|
|
19183
19371
|
async getValidAccessToken() {
|
|
19184
|
-
const isExpired = await this.
|
|
19372
|
+
const isExpired = await this.credentialStore.isOAuthTokenExpired();
|
|
19185
19373
|
if (isExpired) {
|
|
19186
19374
|
return this.refreshAccessToken();
|
|
19187
19375
|
}
|
|
19188
|
-
const credentials = await this.
|
|
19376
|
+
const credentials = await this.credentialStore.getOAuthCredentials();
|
|
19189
19377
|
return credentials.accessToken;
|
|
19190
19378
|
}
|
|
19191
19379
|
async getClientId() {
|
|
@@ -19480,21 +19668,6 @@ h1{
|
|
|
19480
19668
|
`);
|
|
19481
19669
|
}
|
|
19482
19670
|
}
|
|
19483
|
-
// src/services/workspace-resolver.ts
|
|
19484
|
-
var NO_WORKSPACE_MESSAGE = "No workspace specified. Use --workspace option or set a default workspace with `bb config set defaultWorkspace <name>`.";
|
|
19485
|
-
async function resolveWorkspace(configService, explicit) {
|
|
19486
|
-
if (explicit && explicit.length > 0) {
|
|
19487
|
-
return explicit;
|
|
19488
|
-
}
|
|
19489
|
-
const config = await configService.getConfig();
|
|
19490
|
-
if (config.defaultWorkspace && config.defaultWorkspace.length > 0) {
|
|
19491
|
-
return config.defaultWorkspace;
|
|
19492
|
-
}
|
|
19493
|
-
throw new BBError({
|
|
19494
|
-
code: 6002 /* CONTEXT_WORKSPACE_NOT_FOUND */,
|
|
19495
|
-
message: NO_WORKSPACE_MESSAGE
|
|
19496
|
-
});
|
|
19497
|
-
}
|
|
19498
19671
|
// src/services/snippet-files.service.ts
|
|
19499
19672
|
import fs6 from "fs";
|
|
19500
19673
|
import path2 from "path";
|
|
@@ -19592,7 +19765,7 @@ async function updatePullRequestReviewers(pullrequestsApi, repoContext, prId, tr
|
|
|
19592
19765
|
workspace: repoContext.workspace,
|
|
19593
19766
|
repoSlug: repoContext.repoSlug,
|
|
19594
19767
|
pullRequestId: prId,
|
|
19595
|
-
body
|
|
19768
|
+
pullrequest: body
|
|
19596
19769
|
});
|
|
19597
19770
|
return response.data;
|
|
19598
19771
|
}
|
|
@@ -19600,12 +19773,15 @@ async function updatePullRequestReviewers(pullrequestsApi, repoContext, prId, tr
|
|
|
19600
19773
|
var DEFAULT_LIMIT = 25;
|
|
19601
19774
|
var MAX_PAGE_LENGTH = 50;
|
|
19602
19775
|
function parseLimit(limit, fallback = DEFAULT_LIMIT) {
|
|
19603
|
-
if (
|
|
19776
|
+
if (limit === undefined || limit === "") {
|
|
19604
19777
|
return fallback;
|
|
19605
19778
|
}
|
|
19606
19779
|
const parsed = Number.parseInt(limit, 10);
|
|
19607
|
-
if (Number.
|
|
19608
|
-
|
|
19780
|
+
if (!Number.isFinite(parsed) || parsed < 1) {
|
|
19781
|
+
throw new BBError({
|
|
19782
|
+
code: 5002 /* VALIDATION_INVALID */,
|
|
19783
|
+
message: "--limit must be a positive integer"
|
|
19784
|
+
});
|
|
19609
19785
|
}
|
|
19610
19786
|
return parsed;
|
|
19611
19787
|
}
|
|
@@ -19852,7 +20028,7 @@ var CommitStatusesApiAxiosParamCreator = function(configuration) {
|
|
|
19852
20028
|
options: localVarRequestOptions
|
|
19853
20029
|
};
|
|
19854
20030
|
},
|
|
19855
|
-
repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut: async (commit, key, repoSlug, workspace,
|
|
20031
|
+
repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut: async (commit, key, repoSlug, workspace, commitstatus, options = {}) => {
|
|
19856
20032
|
assertParamExists("repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut", "commit", commit);
|
|
19857
20033
|
assertParamExists("repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut", "key", key);
|
|
19858
20034
|
assertParamExists("repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut", "repoSlug", repoSlug);
|
|
@@ -19874,13 +20050,13 @@ var CommitStatusesApiAxiosParamCreator = function(configuration) {
|
|
|
19874
20050
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19875
20051
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19876
20052
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
19877
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
20053
|
+
localVarRequestOptions.data = serializeDataIfNeeded(commitstatus, localVarRequestOptions, configuration);
|
|
19878
20054
|
return {
|
|
19879
20055
|
url: toPathString(localVarUrlObj),
|
|
19880
20056
|
options: localVarRequestOptions
|
|
19881
20057
|
};
|
|
19882
20058
|
},
|
|
19883
|
-
repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost: async (commit, repoSlug, workspace,
|
|
20059
|
+
repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost: async (commit, repoSlug, workspace, commitstatus, options = {}) => {
|
|
19884
20060
|
assertParamExists("repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost", "commit", commit);
|
|
19885
20061
|
assertParamExists("repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost", "repoSlug", repoSlug);
|
|
19886
20062
|
assertParamExists("repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost", "workspace", workspace);
|
|
@@ -19901,7 +20077,7 @@ var CommitStatusesApiAxiosParamCreator = function(configuration) {
|
|
|
19901
20077
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19902
20078
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19903
20079
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
19904
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
20080
|
+
localVarRequestOptions.data = serializeDataIfNeeded(commitstatus, localVarRequestOptions, configuration);
|
|
19905
20081
|
return {
|
|
19906
20082
|
url: toPathString(localVarUrlObj),
|
|
19907
20083
|
options: localVarRequestOptions
|
|
@@ -19983,14 +20159,14 @@ var CommitStatusesApiFp = function(configuration) {
|
|
|
19983
20159
|
const localVarOperationServerBasePath = operationServerMap["CommitStatusesApi.repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyGet"]?.[localVarOperationServerIndex]?.url;
|
|
19984
20160
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
19985
20161
|
},
|
|
19986
|
-
async repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut(commit, key, repoSlug, workspace,
|
|
19987
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut(commit, key, repoSlug, workspace,
|
|
20162
|
+
async repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut(commit, key, repoSlug, workspace, commitstatus, options) {
|
|
20163
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut(commit, key, repoSlug, workspace, commitstatus, options);
|
|
19988
20164
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
19989
20165
|
const localVarOperationServerBasePath = operationServerMap["CommitStatusesApi.repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut"]?.[localVarOperationServerIndex]?.url;
|
|
19990
20166
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
19991
20167
|
},
|
|
19992
|
-
async repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost(commit, repoSlug, workspace,
|
|
19993
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost(commit, repoSlug, workspace,
|
|
20168
|
+
async repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost(commit, repoSlug, workspace, commitstatus, options) {
|
|
20169
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost(commit, repoSlug, workspace, commitstatus, options);
|
|
19994
20170
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
19995
20171
|
const localVarOperationServerBasePath = operationServerMap["CommitStatusesApi.repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost"]?.[localVarOperationServerIndex]?.url;
|
|
19996
20172
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -20014,10 +20190,10 @@ class CommitStatusesApi extends BaseAPI {
|
|
|
20014
20190
|
return CommitStatusesApiFp(this.configuration).repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyGet(requestParameters.commit, requestParameters.key, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
20015
20191
|
}
|
|
20016
20192
|
repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut(requestParameters, options) {
|
|
20017
|
-
return CommitStatusesApiFp(this.configuration).repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut(requestParameters.commit, requestParameters.key, requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
20193
|
+
return CommitStatusesApiFp(this.configuration).repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildKeyPut(requestParameters.commit, requestParameters.key, requestParameters.repoSlug, requestParameters.workspace, requestParameters.commitstatus, options).then((request) => request(this.axios, this.basePath));
|
|
20018
20194
|
}
|
|
20019
20195
|
repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost(requestParameters, options) {
|
|
20020
|
-
return CommitStatusesApiFp(this.configuration).repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost(requestParameters.commit, requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
20196
|
+
return CommitStatusesApiFp(this.configuration).repositoriesWorkspaceRepoSlugCommitCommitStatusesBuildPost(requestParameters.commit, requestParameters.repoSlug, requestParameters.workspace, requestParameters.commitstatus, options).then((request) => request(this.axios, this.basePath));
|
|
20021
20197
|
}
|
|
20022
20198
|
repositoriesWorkspaceRepoSlugCommitCommitStatusesGet(requestParameters, options) {
|
|
20023
20199
|
return CommitStatusesApiFp(this.configuration).repositoriesWorkspaceRepoSlugCommitCommitStatusesGet(requestParameters.commit, requestParameters.repoSlug, requestParameters.workspace, requestParameters.refname, requestParameters.q, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -20233,7 +20409,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20233
20409
|
options: localVarRequestOptions
|
|
20234
20410
|
};
|
|
20235
20411
|
},
|
|
20236
|
-
repositoriesWorkspaceRepoSlugPullrequestsPost: async (repoSlug, workspace,
|
|
20412
|
+
repositoriesWorkspaceRepoSlugPullrequestsPost: async (repoSlug, workspace, pullrequest, options = {}) => {
|
|
20237
20413
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPost", "repoSlug", repoSlug);
|
|
20238
20414
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPost", "workspace", workspace);
|
|
20239
20415
|
const localVarPath = `/repositories/{workspace}/{repo_slug}/pullrequests`.replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
@@ -20253,7 +20429,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20253
20429
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
20254
20430
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20255
20431
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
20256
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
20432
|
+
localVarRequestOptions.data = serializeDataIfNeeded(pullrequest, localVarRequestOptions, configuration);
|
|
20257
20433
|
return {
|
|
20258
20434
|
url: toPathString(localVarUrlObj),
|
|
20259
20435
|
options: localVarRequestOptions
|
|
@@ -20386,12 +20562,12 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20386
20562
|
options: localVarRequestOptions
|
|
20387
20563
|
};
|
|
20388
20564
|
},
|
|
20389
|
-
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut: async (commentId, pullRequestId, repoSlug, workspace,
|
|
20565
|
+
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut: async (commentId, pullRequestId, repoSlug, workspace, pullrequestComment, options = {}) => {
|
|
20390
20566
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut", "commentId", commentId);
|
|
20391
20567
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut", "pullRequestId", pullRequestId);
|
|
20392
20568
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut", "repoSlug", repoSlug);
|
|
20393
20569
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut", "workspace", workspace);
|
|
20394
|
-
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut", "
|
|
20570
|
+
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut", "pullrequestComment", pullrequestComment);
|
|
20395
20571
|
const localVarPath = `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}`.replace(`{${"comment_id"}}`, encodeURIComponent(String(commentId))).replace(`{${"pull_request_id"}}`, encodeURIComponent(String(pullRequestId))).replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
20396
20572
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
20397
20573
|
let baseOptions;
|
|
@@ -20409,7 +20585,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20409
20585
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
20410
20586
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20411
20587
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
20412
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
20588
|
+
localVarRequestOptions.data = serializeDataIfNeeded(pullrequestComment, localVarRequestOptions, configuration);
|
|
20413
20589
|
return {
|
|
20414
20590
|
url: toPathString(localVarUrlObj),
|
|
20415
20591
|
options: localVarRequestOptions
|
|
@@ -20492,11 +20668,11 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20492
20668
|
options: localVarRequestOptions
|
|
20493
20669
|
};
|
|
20494
20670
|
},
|
|
20495
|
-
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost: async (pullRequestId, repoSlug, workspace,
|
|
20671
|
+
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost: async (pullRequestId, repoSlug, workspace, pullrequestComment, options = {}) => {
|
|
20496
20672
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost", "pullRequestId", pullRequestId);
|
|
20497
20673
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost", "repoSlug", repoSlug);
|
|
20498
20674
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost", "workspace", workspace);
|
|
20499
|
-
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost", "
|
|
20675
|
+
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost", "pullrequestComment", pullrequestComment);
|
|
20500
20676
|
const localVarPath = `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments`.replace(`{${"pull_request_id"}}`, encodeURIComponent(String(pullRequestId))).replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
20501
20677
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
20502
20678
|
let baseOptions;
|
|
@@ -20514,7 +20690,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20514
20690
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
20515
20691
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20516
20692
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
20517
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
20693
|
+
localVarRequestOptions.data = serializeDataIfNeeded(pullrequestComment, localVarRequestOptions, configuration);
|
|
20518
20694
|
return {
|
|
20519
20695
|
url: toPathString(localVarUrlObj),
|
|
20520
20696
|
options: localVarRequestOptions
|
|
@@ -20643,7 +20819,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20643
20819
|
options: localVarRequestOptions
|
|
20644
20820
|
};
|
|
20645
20821
|
},
|
|
20646
|
-
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost: async (pullRequestId, repoSlug, workspace, async,
|
|
20822
|
+
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost: async (pullRequestId, repoSlug, workspace, async, pullrequestMergeParameters, options = {}) => {
|
|
20647
20823
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost", "pullRequestId", pullRequestId);
|
|
20648
20824
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost", "repoSlug", repoSlug);
|
|
20649
20825
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost", "workspace", workspace);
|
|
@@ -20667,7 +20843,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20667
20843
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
20668
20844
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20669
20845
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
20670
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
20846
|
+
localVarRequestOptions.data = serializeDataIfNeeded(pullrequestMergeParameters, localVarRequestOptions, configuration);
|
|
20671
20847
|
return {
|
|
20672
20848
|
url: toPathString(localVarUrlObj),
|
|
20673
20849
|
options: localVarRequestOptions
|
|
@@ -20722,7 +20898,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20722
20898
|
options: localVarRequestOptions
|
|
20723
20899
|
};
|
|
20724
20900
|
},
|
|
20725
|
-
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut: async (pullRequestId, repoSlug, workspace,
|
|
20901
|
+
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut: async (pullRequestId, repoSlug, workspace, pullrequest, options = {}) => {
|
|
20726
20902
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut", "pullRequestId", pullRequestId);
|
|
20727
20903
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut", "repoSlug", repoSlug);
|
|
20728
20904
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut", "workspace", workspace);
|
|
@@ -20743,7 +20919,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20743
20919
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
20744
20920
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20745
20921
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
20746
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
20922
|
+
localVarRequestOptions.data = serializeDataIfNeeded(pullrequest, localVarRequestOptions, configuration);
|
|
20747
20923
|
return {
|
|
20748
20924
|
url: toPathString(localVarUrlObj),
|
|
20749
20925
|
options: localVarRequestOptions
|
|
@@ -20864,11 +21040,11 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20864
21040
|
options: localVarRequestOptions
|
|
20865
21041
|
};
|
|
20866
21042
|
},
|
|
20867
|
-
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost: async (pullRequestId, repoSlug, workspace,
|
|
21043
|
+
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost: async (pullRequestId, repoSlug, workspace, pullrequestTaskCreate, options = {}) => {
|
|
20868
21044
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost", "pullRequestId", pullRequestId);
|
|
20869
21045
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost", "repoSlug", repoSlug);
|
|
20870
21046
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost", "workspace", workspace);
|
|
20871
|
-
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost", "
|
|
21047
|
+
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost", "pullrequestTaskCreate", pullrequestTaskCreate);
|
|
20872
21048
|
const localVarPath = `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks`.replace(`{${"pull_request_id"}}`, encodeURIComponent(String(pullRequestId))).replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
20873
21049
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
20874
21050
|
let baseOptions;
|
|
@@ -20886,7 +21062,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20886
21062
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
20887
21063
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20888
21064
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
20889
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
21065
|
+
localVarRequestOptions.data = serializeDataIfNeeded(pullrequestTaskCreate, localVarRequestOptions, configuration);
|
|
20890
21066
|
return {
|
|
20891
21067
|
url: toPathString(localVarUrlObj),
|
|
20892
21068
|
options: localVarRequestOptions
|
|
@@ -20944,12 +21120,12 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20944
21120
|
options: localVarRequestOptions
|
|
20945
21121
|
};
|
|
20946
21122
|
},
|
|
20947
|
-
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut: async (pullRequestId, repoSlug, taskId, workspace,
|
|
21123
|
+
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut: async (pullRequestId, repoSlug, taskId, workspace, pullrequestTaskUpdate, options = {}) => {
|
|
20948
21124
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut", "pullRequestId", pullRequestId);
|
|
20949
21125
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut", "repoSlug", repoSlug);
|
|
20950
21126
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut", "taskId", taskId);
|
|
20951
21127
|
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut", "workspace", workspace);
|
|
20952
|
-
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut", "
|
|
21128
|
+
assertParamExists("repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut", "pullrequestTaskUpdate", pullrequestTaskUpdate);
|
|
20953
21129
|
const localVarPath = `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}`.replace(`{${"pull_request_id"}}`, encodeURIComponent(String(pullRequestId))).replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"task_id"}}`, encodeURIComponent(String(taskId))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
20954
21130
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
20955
21131
|
let baseOptions;
|
|
@@ -20967,7 +21143,7 @@ var PullrequestsApiAxiosParamCreator = function(configuration) {
|
|
|
20967
21143
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
20968
21144
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
20969
21145
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
20970
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
21146
|
+
localVarRequestOptions.data = serializeDataIfNeeded(pullrequestTaskUpdate, localVarRequestOptions, configuration);
|
|
20971
21147
|
return {
|
|
20972
21148
|
url: toPathString(localVarUrlObj),
|
|
20973
21149
|
options: localVarRequestOptions
|
|
@@ -21053,8 +21229,8 @@ var PullrequestsApiFp = function(configuration) {
|
|
|
21053
21229
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsGet"]?.[localVarOperationServerIndex]?.url;
|
|
21054
21230
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
21055
21231
|
},
|
|
21056
|
-
async repositoriesWorkspaceRepoSlugPullrequestsPost(repoSlug, workspace,
|
|
21057
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPost(repoSlug, workspace,
|
|
21232
|
+
async repositoriesWorkspaceRepoSlugPullrequestsPost(repoSlug, workspace, pullrequest, options) {
|
|
21233
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPost(repoSlug, workspace, pullrequest, options);
|
|
21058
21234
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
21059
21235
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPost"]?.[localVarOperationServerIndex]?.url;
|
|
21060
21236
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -21089,8 +21265,8 @@ var PullrequestsApiFp = function(configuration) {
|
|
|
21089
21265
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
21090
21266
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
21091
21267
|
},
|
|
21092
|
-
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(commentId, pullRequestId, repoSlug, workspace,
|
|
21093
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(commentId, pullRequestId, repoSlug, workspace,
|
|
21268
|
+
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(commentId, pullRequestId, repoSlug, workspace, pullrequestComment, options) {
|
|
21269
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(commentId, pullRequestId, repoSlug, workspace, pullrequestComment, options);
|
|
21094
21270
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
21095
21271
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
21096
21272
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -21113,8 +21289,8 @@ var PullrequestsApiFp = function(configuration) {
|
|
|
21113
21289
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet"]?.[localVarOperationServerIndex]?.url;
|
|
21114
21290
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
21115
21291
|
},
|
|
21116
|
-
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(pullRequestId, repoSlug, workspace,
|
|
21117
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(pullRequestId, repoSlug, workspace,
|
|
21292
|
+
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(pullRequestId, repoSlug, workspace, pullrequestComment, options) {
|
|
21293
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(pullRequestId, repoSlug, workspace, pullrequestComment, options);
|
|
21118
21294
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
21119
21295
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost"]?.[localVarOperationServerIndex]?.url;
|
|
21120
21296
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -21149,8 +21325,8 @@ var PullrequestsApiFp = function(configuration) {
|
|
|
21149
21325
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
21150
21326
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
21151
21327
|
},
|
|
21152
|
-
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(pullRequestId, repoSlug, workspace, async,
|
|
21153
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(pullRequestId, repoSlug, workspace, async,
|
|
21328
|
+
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(pullRequestId, repoSlug, workspace, async, pullrequestMergeParameters, options) {
|
|
21329
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(pullRequestId, repoSlug, workspace, async, pullrequestMergeParameters, options);
|
|
21154
21330
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
21155
21331
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost"]?.[localVarOperationServerIndex]?.url;
|
|
21156
21332
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -21167,8 +21343,8 @@ var PullrequestsApiFp = function(configuration) {
|
|
|
21167
21343
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPatchGet"]?.[localVarOperationServerIndex]?.url;
|
|
21168
21344
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
21169
21345
|
},
|
|
21170
|
-
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(pullRequestId, repoSlug, workspace,
|
|
21171
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(pullRequestId, repoSlug, workspace,
|
|
21346
|
+
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(pullRequestId, repoSlug, workspace, pullrequest, options) {
|
|
21347
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(pullRequestId, repoSlug, workspace, pullrequest, options);
|
|
21172
21348
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
21173
21349
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
21174
21350
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -21197,8 +21373,8 @@ var PullrequestsApiFp = function(configuration) {
|
|
|
21197
21373
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksGet"]?.[localVarOperationServerIndex]?.url;
|
|
21198
21374
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
21199
21375
|
},
|
|
21200
|
-
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost(pullRequestId, repoSlug, workspace,
|
|
21201
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost(pullRequestId, repoSlug, workspace,
|
|
21376
|
+
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost(pullRequestId, repoSlug, workspace, pullrequestTaskCreate, options) {
|
|
21377
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost(pullRequestId, repoSlug, workspace, pullrequestTaskCreate, options);
|
|
21202
21378
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
21203
21379
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost"]?.[localVarOperationServerIndex]?.url;
|
|
21204
21380
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -21215,8 +21391,8 @@ var PullrequestsApiFp = function(configuration) {
|
|
|
21215
21391
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
21216
21392
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
21217
21393
|
},
|
|
21218
|
-
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut(pullRequestId, repoSlug, taskId, workspace,
|
|
21219
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut(pullRequestId, repoSlug, taskId, workspace,
|
|
21394
|
+
async repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut(pullRequestId, repoSlug, taskId, workspace, pullrequestTaskUpdate, options) {
|
|
21395
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut(pullRequestId, repoSlug, taskId, workspace, pullrequestTaskUpdate, options);
|
|
21220
21396
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
21221
21397
|
const localVarOperationServerBasePath = operationServerMap["PullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
21222
21398
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -21255,7 +21431,7 @@ class PullrequestsApi extends BaseAPI {
|
|
|
21255
21431
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsGet(requestParameters.repoSlug, requestParameters.workspace, requestParameters.state, options).then((request) => request(this.axios, this.basePath));
|
|
21256
21432
|
}
|
|
21257
21433
|
repositoriesWorkspaceRepoSlugPullrequestsPost(requestParameters, options) {
|
|
21258
|
-
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPost(requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
21434
|
+
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPost(requestParameters.repoSlug, requestParameters.workspace, requestParameters.pullrequest, options).then((request) => request(this.axios, this.basePath));
|
|
21259
21435
|
}
|
|
21260
21436
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdActivityGet(requestParameters, options) {
|
|
21261
21437
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdActivityGet(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -21273,7 +21449,7 @@ class PullrequestsApi extends BaseAPI {
|
|
|
21273
21449
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdGet(requestParameters.commentId, requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
21274
21450
|
}
|
|
21275
21451
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(requestParameters, options) {
|
|
21276
|
-
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(requestParameters.commentId, requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
21452
|
+
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdPut(requestParameters.commentId, requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.pullrequestComment, options).then((request) => request(this.axios, this.basePath));
|
|
21277
21453
|
}
|
|
21278
21454
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolveDelete(requestParameters, options) {
|
|
21279
21455
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsCommentIdResolveDelete(requestParameters.commentId, requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -21285,7 +21461,7 @@ class PullrequestsApi extends BaseAPI {
|
|
|
21285
21461
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsGet(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
21286
21462
|
}
|
|
21287
21463
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(requestParameters, options) {
|
|
21288
|
-
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
21464
|
+
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommentsPost(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.pullrequestComment, options).then((request) => request(this.axios, this.basePath));
|
|
21289
21465
|
}
|
|
21290
21466
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet(requestParameters, options) {
|
|
21291
21467
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdCommitsGet(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -21303,7 +21479,7 @@ class PullrequestsApi extends BaseAPI {
|
|
|
21303
21479
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdGet(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
21304
21480
|
}
|
|
21305
21481
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(requestParameters, options) {
|
|
21306
|
-
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.async, requestParameters.
|
|
21482
|
+
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergePost(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.async, requestParameters.pullrequestMergeParameters, options).then((request) => request(this.axios, this.basePath));
|
|
21307
21483
|
}
|
|
21308
21484
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeTaskStatusTaskIdGet(requestParameters, options) {
|
|
21309
21485
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdMergeTaskStatusTaskIdGet(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.taskId, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -21312,7 +21488,7 @@ class PullrequestsApi extends BaseAPI {
|
|
|
21312
21488
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPatchGet(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
21313
21489
|
}
|
|
21314
21490
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(requestParameters, options) {
|
|
21315
|
-
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
21491
|
+
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdPut(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.pullrequest, options).then((request) => request(this.axios, this.basePath));
|
|
21316
21492
|
}
|
|
21317
21493
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesDelete(requestParameters, options) {
|
|
21318
21494
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdRequestChangesDelete(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -21327,7 +21503,7 @@ class PullrequestsApi extends BaseAPI {
|
|
|
21327
21503
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksGet(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.q, requestParameters.sort, requestParameters.pagelen, options).then((request) => request(this.axios, this.basePath));
|
|
21328
21504
|
}
|
|
21329
21505
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost(requestParameters, options) {
|
|
21330
|
-
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
21506
|
+
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksPost(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.workspace, requestParameters.pullrequestTaskCreate, options).then((request) => request(this.axios, this.basePath));
|
|
21331
21507
|
}
|
|
21332
21508
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdDelete(requestParameters, options) {
|
|
21333
21509
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdDelete(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.taskId, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -21336,7 +21512,7 @@ class PullrequestsApi extends BaseAPI {
|
|
|
21336
21512
|
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdGet(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.taskId, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
21337
21513
|
}
|
|
21338
21514
|
repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut(requestParameters, options) {
|
|
21339
|
-
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.taskId, requestParameters.workspace, requestParameters.
|
|
21515
|
+
return PullrequestsApiFp(this.configuration).repositoriesWorkspaceRepoSlugPullrequestsPullRequestIdTasksTaskIdPut(requestParameters.pullRequestId, requestParameters.repoSlug, requestParameters.taskId, requestParameters.workspace, requestParameters.pullrequestTaskUpdate, options).then((request) => request(this.axios, this.basePath));
|
|
21340
21516
|
}
|
|
21341
21517
|
workspacesWorkspacePullrequestsSelectedUserGet(requestParameters, options) {
|
|
21342
21518
|
return PullrequestsApiFp(this.configuration).workspacesWorkspacePullrequestsSelectedUserGet(requestParameters.selectedUser, requestParameters.workspace, requestParameters.state, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -21505,7 +21681,7 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
21505
21681
|
options: localVarRequestOptions
|
|
21506
21682
|
};
|
|
21507
21683
|
},
|
|
21508
|
-
repositoriesWorkspaceRepoSlugForksPost: async (repoSlug, workspace,
|
|
21684
|
+
repositoriesWorkspaceRepoSlugForksPost: async (repoSlug, workspace, repository, options = {}) => {
|
|
21509
21685
|
assertParamExists("repositoriesWorkspaceRepoSlugForksPost", "repoSlug", repoSlug);
|
|
21510
21686
|
assertParamExists("repositoriesWorkspaceRepoSlugForksPost", "workspace", workspace);
|
|
21511
21687
|
const localVarPath = `/repositories/{workspace}/{repo_slug}/forks`.replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
@@ -21525,7 +21701,7 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
21525
21701
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
21526
21702
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21527
21703
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
21528
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
21704
|
+
localVarRequestOptions.data = serializeDataIfNeeded(repository, localVarRequestOptions, configuration);
|
|
21529
21705
|
return {
|
|
21530
21706
|
url: toPathString(localVarUrlObj),
|
|
21531
21707
|
options: localVarRequestOptions
|
|
@@ -21800,11 +21976,11 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
21800
21976
|
options: localVarRequestOptions
|
|
21801
21977
|
};
|
|
21802
21978
|
},
|
|
21803
|
-
repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut: async (groupSlug, repoSlug, workspace,
|
|
21979
|
+
repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut: async (groupSlug, repoSlug, workspace, bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, options = {}) => {
|
|
21804
21980
|
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut", "groupSlug", groupSlug);
|
|
21805
21981
|
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut", "repoSlug", repoSlug);
|
|
21806
21982
|
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut", "workspace", workspace);
|
|
21807
|
-
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut", "
|
|
21983
|
+
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut", "bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema", bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema);
|
|
21808
21984
|
const localVarPath = `/repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}`.replace(`{${"group_slug"}}`, encodeURIComponent(String(groupSlug))).replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
21809
21985
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
21810
21986
|
let baseOptions;
|
|
@@ -21822,7 +21998,7 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
21822
21998
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
21823
21999
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21824
22000
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
21825
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
22001
|
+
localVarRequestOptions.data = serializeDataIfNeeded(bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, localVarRequestOptions, configuration);
|
|
21826
22002
|
return {
|
|
21827
22003
|
url: toPathString(localVarUrlObj),
|
|
21828
22004
|
options: localVarRequestOptions
|
|
@@ -21902,11 +22078,11 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
21902
22078
|
options: localVarRequestOptions
|
|
21903
22079
|
};
|
|
21904
22080
|
},
|
|
21905
|
-
repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut: async (repoSlug, selectedUserId, workspace,
|
|
22081
|
+
repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut: async (repoSlug, selectedUserId, workspace, bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, options = {}) => {
|
|
21906
22082
|
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut", "repoSlug", repoSlug);
|
|
21907
22083
|
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut", "selectedUserId", selectedUserId);
|
|
21908
22084
|
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut", "workspace", workspace);
|
|
21909
|
-
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut", "
|
|
22085
|
+
assertParamExists("repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut", "bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema", bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema);
|
|
21910
22086
|
const localVarPath = `/repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}`.replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"selected_user_id"}}`, encodeURIComponent(String(selectedUserId))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
21911
22087
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
21912
22088
|
let baseOptions;
|
|
@@ -21924,13 +22100,13 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
21924
22100
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
21925
22101
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21926
22102
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
21927
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
22103
|
+
localVarRequestOptions.data = serializeDataIfNeeded(bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, localVarRequestOptions, configuration);
|
|
21928
22104
|
return {
|
|
21929
22105
|
url: toPathString(localVarUrlObj),
|
|
21930
22106
|
options: localVarRequestOptions
|
|
21931
22107
|
};
|
|
21932
22108
|
},
|
|
21933
|
-
repositoriesWorkspaceRepoSlugPost: async (repoSlug, workspace,
|
|
22109
|
+
repositoriesWorkspaceRepoSlugPost: async (repoSlug, workspace, repository, options = {}) => {
|
|
21934
22110
|
assertParamExists("repositoriesWorkspaceRepoSlugPost", "repoSlug", repoSlug);
|
|
21935
22111
|
assertParamExists("repositoriesWorkspaceRepoSlugPost", "workspace", workspace);
|
|
21936
22112
|
const localVarPath = `/repositories/{workspace}/{repo_slug}`.replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
@@ -21950,13 +22126,13 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
21950
22126
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
21951
22127
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21952
22128
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
21953
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
22129
|
+
localVarRequestOptions.data = serializeDataIfNeeded(repository, localVarRequestOptions, configuration);
|
|
21954
22130
|
return {
|
|
21955
22131
|
url: toPathString(localVarUrlObj),
|
|
21956
22132
|
options: localVarRequestOptions
|
|
21957
22133
|
};
|
|
21958
22134
|
},
|
|
21959
|
-
repositoriesWorkspaceRepoSlugPut: async (repoSlug, workspace,
|
|
22135
|
+
repositoriesWorkspaceRepoSlugPut: async (repoSlug, workspace, repository, options = {}) => {
|
|
21960
22136
|
assertParamExists("repositoriesWorkspaceRepoSlugPut", "repoSlug", repoSlug);
|
|
21961
22137
|
assertParamExists("repositoriesWorkspaceRepoSlugPut", "workspace", workspace);
|
|
21962
22138
|
const localVarPath = `/repositories/{workspace}/{repo_slug}`.replace(`{${"repo_slug"}}`, encodeURIComponent(String(repoSlug))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
@@ -21976,7 +22152,7 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
21976
22152
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
21977
22153
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
21978
22154
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
21979
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
22155
|
+
localVarRequestOptions.data = serializeDataIfNeeded(repository, localVarRequestOptions, configuration);
|
|
21980
22156
|
return {
|
|
21981
22157
|
url: toPathString(localVarUrlObj),
|
|
21982
22158
|
options: localVarRequestOptions
|
|
@@ -22137,6 +22313,35 @@ var RepositoriesApiAxiosParamCreator = function(configuration) {
|
|
|
22137
22313
|
url: toPathString(localVarUrlObj),
|
|
22138
22314
|
options: localVarRequestOptions
|
|
22139
22315
|
};
|
|
22316
|
+
},
|
|
22317
|
+
userWorkspacesWorkspacePermissionsRepositoriesGet: async (workspace, q, sort, options = {}) => {
|
|
22318
|
+
assertParamExists("userWorkspacesWorkspacePermissionsRepositoriesGet", "workspace", workspace);
|
|
22319
|
+
const localVarPath = `/user/workspaces/{workspace}/permissions/repositories`.replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
22320
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
22321
|
+
let baseOptions;
|
|
22322
|
+
if (configuration) {
|
|
22323
|
+
baseOptions = configuration.baseOptions;
|
|
22324
|
+
}
|
|
22325
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
22326
|
+
const localVarHeaderParameter = {};
|
|
22327
|
+
const localVarQueryParameter = {};
|
|
22328
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
22329
|
+
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["account", "repository"], configuration);
|
|
22330
|
+
setBasicAuthToObject(localVarRequestOptions, configuration);
|
|
22331
|
+
if (q !== undefined) {
|
|
22332
|
+
localVarQueryParameter["q"] = q;
|
|
22333
|
+
}
|
|
22334
|
+
if (sort !== undefined) {
|
|
22335
|
+
localVarQueryParameter["sort"] = sort;
|
|
22336
|
+
}
|
|
22337
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
22338
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
22339
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
22340
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
22341
|
+
return {
|
|
22342
|
+
url: toPathString(localVarUrlObj),
|
|
22343
|
+
options: localVarRequestOptions
|
|
22344
|
+
};
|
|
22140
22345
|
}
|
|
22141
22346
|
};
|
|
22142
22347
|
};
|
|
@@ -22173,8 +22378,8 @@ var RepositoriesApiFp = function(configuration) {
|
|
|
22173
22378
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.repositoriesWorkspaceRepoSlugForksGet"]?.[localVarOperationServerIndex]?.url;
|
|
22174
22379
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
22175
22380
|
},
|
|
22176
|
-
async repositoriesWorkspaceRepoSlugForksPost(repoSlug, workspace,
|
|
22177
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugForksPost(repoSlug, workspace,
|
|
22381
|
+
async repositoriesWorkspaceRepoSlugForksPost(repoSlug, workspace, repository, options) {
|
|
22382
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugForksPost(repoSlug, workspace, repository, options);
|
|
22178
22383
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
22179
22384
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.repositoriesWorkspaceRepoSlugForksPost"]?.[localVarOperationServerIndex]?.url;
|
|
22180
22385
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -22245,8 +22450,8 @@ var RepositoriesApiFp = function(configuration) {
|
|
|
22245
22450
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugGet"]?.[localVarOperationServerIndex]?.url;
|
|
22246
22451
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
22247
22452
|
},
|
|
22248
|
-
async repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(groupSlug, repoSlug, workspace,
|
|
22249
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(groupSlug, repoSlug, workspace,
|
|
22453
|
+
async repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(groupSlug, repoSlug, workspace, bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, options) {
|
|
22454
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(groupSlug, repoSlug, workspace, bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, options);
|
|
22250
22455
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
22251
22456
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut"]?.[localVarOperationServerIndex]?.url;
|
|
22252
22457
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -22269,20 +22474,20 @@ var RepositoriesApiFp = function(configuration) {
|
|
|
22269
22474
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
22270
22475
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
22271
22476
|
},
|
|
22272
|
-
async repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(repoSlug, selectedUserId, workspace,
|
|
22273
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(repoSlug, selectedUserId, workspace,
|
|
22477
|
+
async repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(repoSlug, selectedUserId, workspace, bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, options) {
|
|
22478
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(repoSlug, selectedUserId, workspace, bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, options);
|
|
22274
22479
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
22275
22480
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
22276
22481
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
22277
22482
|
},
|
|
22278
|
-
async repositoriesWorkspaceRepoSlugPost(repoSlug, workspace,
|
|
22279
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPost(repoSlug, workspace,
|
|
22483
|
+
async repositoriesWorkspaceRepoSlugPost(repoSlug, workspace, repository, options) {
|
|
22484
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPost(repoSlug, workspace, repository, options);
|
|
22280
22485
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
22281
22486
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.repositoriesWorkspaceRepoSlugPost"]?.[localVarOperationServerIndex]?.url;
|
|
22282
22487
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
22283
22488
|
},
|
|
22284
|
-
async repositoriesWorkspaceRepoSlugPut(repoSlug, workspace,
|
|
22285
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPut(repoSlug, workspace,
|
|
22489
|
+
async repositoriesWorkspaceRepoSlugPut(repoSlug, workspace, repository, options) {
|
|
22490
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.repositoriesWorkspaceRepoSlugPut(repoSlug, workspace, repository, options);
|
|
22286
22491
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
22287
22492
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.repositoriesWorkspaceRepoSlugPut"]?.[localVarOperationServerIndex]?.url;
|
|
22288
22493
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -22316,6 +22521,12 @@ var RepositoriesApiFp = function(configuration) {
|
|
|
22316
22521
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
22317
22522
|
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.userPermissionsRepositoriesGet"]?.[localVarOperationServerIndex]?.url;
|
|
22318
22523
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
22524
|
+
},
|
|
22525
|
+
async userWorkspacesWorkspacePermissionsRepositoriesGet(workspace, q, sort, options) {
|
|
22526
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.userWorkspacesWorkspacePermissionsRepositoriesGet(workspace, q, sort, options);
|
|
22527
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
22528
|
+
const localVarOperationServerBasePath = operationServerMap["RepositoriesApi.userWorkspacesWorkspacePermissionsRepositoriesGet"]?.[localVarOperationServerIndex]?.url;
|
|
22529
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
22319
22530
|
}
|
|
22320
22531
|
};
|
|
22321
22532
|
};
|
|
@@ -22336,7 +22547,7 @@ class RepositoriesApi extends BaseAPI {
|
|
|
22336
22547
|
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugForksGet(requestParameters.repoSlug, requestParameters.workspace, requestParameters.role, requestParameters.q, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
|
|
22337
22548
|
}
|
|
22338
22549
|
repositoriesWorkspaceRepoSlugForksPost(requestParameters, options) {
|
|
22339
|
-
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugForksPost(requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
22550
|
+
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugForksPost(requestParameters.repoSlug, requestParameters.workspace, requestParameters.repository, options).then((request) => request(this.axios, this.basePath));
|
|
22340
22551
|
}
|
|
22341
22552
|
repositoriesWorkspaceRepoSlugGet(requestParameters, options) {
|
|
22342
22553
|
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugGet(requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -22372,7 +22583,7 @@ class RepositoriesApi extends BaseAPI {
|
|
|
22372
22583
|
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugGet(requestParameters.groupSlug, requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
22373
22584
|
}
|
|
22374
22585
|
repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(requestParameters, options) {
|
|
22375
|
-
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(requestParameters.groupSlug, requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
22586
|
+
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPermissionsConfigGroupsGroupSlugPut(requestParameters.groupSlug, requestParameters.repoSlug, requestParameters.workspace, requestParameters.bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, options).then((request) => request(this.axios, this.basePath));
|
|
22376
22587
|
}
|
|
22377
22588
|
repositoriesWorkspaceRepoSlugPermissionsConfigUsersGet(requestParameters, options) {
|
|
22378
22589
|
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPermissionsConfigUsersGet(requestParameters.repoSlug, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -22384,13 +22595,13 @@ class RepositoriesApi extends BaseAPI {
|
|
|
22384
22595
|
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdGet(requestParameters.repoSlug, requestParameters.selectedUserId, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
22385
22596
|
}
|
|
22386
22597
|
repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(requestParameters, options) {
|
|
22387
|
-
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(requestParameters.repoSlug, requestParameters.selectedUserId, requestParameters.workspace, requestParameters.
|
|
22598
|
+
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPermissionsConfigUsersSelectedUserIdPut(requestParameters.repoSlug, requestParameters.selectedUserId, requestParameters.workspace, requestParameters.bitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema, options).then((request) => request(this.axios, this.basePath));
|
|
22388
22599
|
}
|
|
22389
22600
|
repositoriesWorkspaceRepoSlugPost(requestParameters, options) {
|
|
22390
|
-
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPost(requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
22601
|
+
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPost(requestParameters.repoSlug, requestParameters.workspace, requestParameters.repository, options).then((request) => request(this.axios, this.basePath));
|
|
22391
22602
|
}
|
|
22392
22603
|
repositoriesWorkspaceRepoSlugPut(requestParameters, options) {
|
|
22393
|
-
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPut(requestParameters.repoSlug, requestParameters.workspace, requestParameters.
|
|
22604
|
+
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugPut(requestParameters.repoSlug, requestParameters.workspace, requestParameters.repository, options).then((request) => request(this.axios, this.basePath));
|
|
22394
22605
|
}
|
|
22395
22606
|
repositoriesWorkspaceRepoSlugSrcCommitPathGet(requestParameters, options) {
|
|
22396
22607
|
return RepositoriesApiFp(this.configuration).repositoriesWorkspaceRepoSlugSrcCommitPathGet(requestParameters.commit, requestParameters.path, requestParameters.repoSlug, requestParameters.workspace, requestParameters.format, requestParameters.q, requestParameters.sort, requestParameters.maxDepth, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -22407,6 +22618,9 @@ class RepositoriesApi extends BaseAPI {
|
|
|
22407
22618
|
userPermissionsRepositoriesGet(requestParameters = {}, options) {
|
|
22408
22619
|
return RepositoriesApiFp(this.configuration).userPermissionsRepositoriesGet(requestParameters.q, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
|
|
22409
22620
|
}
|
|
22621
|
+
userWorkspacesWorkspacePermissionsRepositoriesGet(requestParameters, options) {
|
|
22622
|
+
return RepositoriesApiFp(this.configuration).userWorkspacesWorkspacePermissionsRepositoriesGet(requestParameters.workspace, requestParameters.q, requestParameters.sort, options).then((request) => request(this.axios, this.basePath));
|
|
22623
|
+
}
|
|
22410
22624
|
}
|
|
22411
22625
|
var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
22412
22626
|
return {
|
|
@@ -22435,8 +22649,8 @@ var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
|
22435
22649
|
options: localVarRequestOptions
|
|
22436
22650
|
};
|
|
22437
22651
|
},
|
|
22438
|
-
snippetsPost: async (
|
|
22439
|
-
assertParamExists("snippetsPost", "
|
|
22652
|
+
snippetsPost: async (snippet, options = {}) => {
|
|
22653
|
+
assertParamExists("snippetsPost", "snippet", snippet);
|
|
22440
22654
|
const localVarPath = `/snippets`;
|
|
22441
22655
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
22442
22656
|
let baseOptions;
|
|
@@ -22454,7 +22668,7 @@ var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
|
22454
22668
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
22455
22669
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
22456
22670
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
22457
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
22671
|
+
localVarRequestOptions.data = serializeDataIfNeeded(snippet, localVarRequestOptions, configuration);
|
|
22458
22672
|
return {
|
|
22459
22673
|
url: toPathString(localVarUrlObj),
|
|
22460
22674
|
options: localVarRequestOptions
|
|
@@ -22510,11 +22724,11 @@ var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
|
22510
22724
|
options: localVarRequestOptions
|
|
22511
22725
|
};
|
|
22512
22726
|
},
|
|
22513
|
-
snippetsWorkspaceEncodedIdCommentsCommentIdPut: async (commentId, encodedId, workspace,
|
|
22727
|
+
snippetsWorkspaceEncodedIdCommentsCommentIdPut: async (commentId, encodedId, workspace, snippetComment, options = {}) => {
|
|
22514
22728
|
assertParamExists("snippetsWorkspaceEncodedIdCommentsCommentIdPut", "commentId", commentId);
|
|
22515
22729
|
assertParamExists("snippetsWorkspaceEncodedIdCommentsCommentIdPut", "encodedId", encodedId);
|
|
22516
22730
|
assertParamExists("snippetsWorkspaceEncodedIdCommentsCommentIdPut", "workspace", workspace);
|
|
22517
|
-
assertParamExists("snippetsWorkspaceEncodedIdCommentsCommentIdPut", "
|
|
22731
|
+
assertParamExists("snippetsWorkspaceEncodedIdCommentsCommentIdPut", "snippetComment", snippetComment);
|
|
22518
22732
|
const localVarPath = `/snippets/{workspace}/{encoded_id}/comments/{comment_id}`.replace(`{${"comment_id"}}`, encodeURIComponent(String(commentId))).replace(`{${"encoded_id"}}`, encodeURIComponent(String(encodedId))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
22519
22733
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
22520
22734
|
let baseOptions;
|
|
@@ -22532,7 +22746,7 @@ var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
|
22532
22746
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
22533
22747
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
22534
22748
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
22535
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
22749
|
+
localVarRequestOptions.data = serializeDataIfNeeded(snippetComment, localVarRequestOptions, configuration);
|
|
22536
22750
|
return {
|
|
22537
22751
|
url: toPathString(localVarUrlObj),
|
|
22538
22752
|
options: localVarRequestOptions
|
|
@@ -22562,10 +22776,10 @@ var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
|
22562
22776
|
options: localVarRequestOptions
|
|
22563
22777
|
};
|
|
22564
22778
|
},
|
|
22565
|
-
snippetsWorkspaceEncodedIdCommentsPost: async (encodedId, workspace,
|
|
22779
|
+
snippetsWorkspaceEncodedIdCommentsPost: async (encodedId, workspace, snippetComment, options = {}) => {
|
|
22566
22780
|
assertParamExists("snippetsWorkspaceEncodedIdCommentsPost", "encodedId", encodedId);
|
|
22567
22781
|
assertParamExists("snippetsWorkspaceEncodedIdCommentsPost", "workspace", workspace);
|
|
22568
|
-
assertParamExists("snippetsWorkspaceEncodedIdCommentsPost", "
|
|
22782
|
+
assertParamExists("snippetsWorkspaceEncodedIdCommentsPost", "snippetComment", snippetComment);
|
|
22569
22783
|
const localVarPath = `/snippets/{workspace}/{encoded_id}/comments`.replace(`{${"encoded_id"}}`, encodeURIComponent(String(encodedId))).replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
22570
22784
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
22571
22785
|
let baseOptions;
|
|
@@ -22583,7 +22797,7 @@ var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
|
22583
22797
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
22584
22798
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
22585
22799
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
22586
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
22800
|
+
localVarRequestOptions.data = serializeDataIfNeeded(snippetComment, localVarRequestOptions, configuration);
|
|
22587
22801
|
return {
|
|
22588
22802
|
url: toPathString(localVarUrlObj),
|
|
22589
22803
|
options: localVarRequestOptions
|
|
@@ -23011,9 +23225,9 @@ var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
|
23011
23225
|
options: localVarRequestOptions
|
|
23012
23226
|
};
|
|
23013
23227
|
},
|
|
23014
|
-
snippetsWorkspacePost: async (workspace,
|
|
23228
|
+
snippetsWorkspacePost: async (workspace, snippet, options = {}) => {
|
|
23015
23229
|
assertParamExists("snippetsWorkspacePost", "workspace", workspace);
|
|
23016
|
-
assertParamExists("snippetsWorkspacePost", "
|
|
23230
|
+
assertParamExists("snippetsWorkspacePost", "snippet", snippet);
|
|
23017
23231
|
const localVarPath = `/snippets/{workspace}`.replace(`{${"workspace"}}`, encodeURIComponent(String(workspace)));
|
|
23018
23232
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
23019
23233
|
let baseOptions;
|
|
@@ -23031,7 +23245,7 @@ var SnippetsApiAxiosParamCreator = function(configuration) {
|
|
|
23031
23245
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
23032
23246
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
23033
23247
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
23034
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
23248
|
+
localVarRequestOptions.data = serializeDataIfNeeded(snippet, localVarRequestOptions, configuration);
|
|
23035
23249
|
return {
|
|
23036
23250
|
url: toPathString(localVarUrlObj),
|
|
23037
23251
|
options: localVarRequestOptions
|
|
@@ -23048,8 +23262,8 @@ var SnippetsApiFp = function(configuration) {
|
|
|
23048
23262
|
const localVarOperationServerBasePath = operationServerMap["SnippetsApi.snippetsGet"]?.[localVarOperationServerIndex]?.url;
|
|
23049
23263
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
23050
23264
|
},
|
|
23051
|
-
async snippetsPost(
|
|
23052
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.snippetsPost(
|
|
23265
|
+
async snippetsPost(snippet, options) {
|
|
23266
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.snippetsPost(snippet, options);
|
|
23053
23267
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
23054
23268
|
const localVarOperationServerBasePath = operationServerMap["SnippetsApi.snippetsPost"]?.[localVarOperationServerIndex]?.url;
|
|
23055
23269
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -23066,8 +23280,8 @@ var SnippetsApiFp = function(configuration) {
|
|
|
23066
23280
|
const localVarOperationServerBasePath = operationServerMap["SnippetsApi.snippetsWorkspaceEncodedIdCommentsCommentIdGet"]?.[localVarOperationServerIndex]?.url;
|
|
23067
23281
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
23068
23282
|
},
|
|
23069
|
-
async snippetsWorkspaceEncodedIdCommentsCommentIdPut(commentId, encodedId, workspace,
|
|
23070
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.snippetsWorkspaceEncodedIdCommentsCommentIdPut(commentId, encodedId, workspace,
|
|
23283
|
+
async snippetsWorkspaceEncodedIdCommentsCommentIdPut(commentId, encodedId, workspace, snippetComment, options) {
|
|
23284
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.snippetsWorkspaceEncodedIdCommentsCommentIdPut(commentId, encodedId, workspace, snippetComment, options);
|
|
23071
23285
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
23072
23286
|
const localVarOperationServerBasePath = operationServerMap["SnippetsApi.snippetsWorkspaceEncodedIdCommentsCommentIdPut"]?.[localVarOperationServerIndex]?.url;
|
|
23073
23287
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -23078,8 +23292,8 @@ var SnippetsApiFp = function(configuration) {
|
|
|
23078
23292
|
const localVarOperationServerBasePath = operationServerMap["SnippetsApi.snippetsWorkspaceEncodedIdCommentsGet"]?.[localVarOperationServerIndex]?.url;
|
|
23079
23293
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
23080
23294
|
},
|
|
23081
|
-
async snippetsWorkspaceEncodedIdCommentsPost(encodedId, workspace,
|
|
23082
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.snippetsWorkspaceEncodedIdCommentsPost(encodedId, workspace,
|
|
23295
|
+
async snippetsWorkspaceEncodedIdCommentsPost(encodedId, workspace, snippetComment, options) {
|
|
23296
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.snippetsWorkspaceEncodedIdCommentsPost(encodedId, workspace, snippetComment, options);
|
|
23083
23297
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
23084
23298
|
const localVarOperationServerBasePath = operationServerMap["SnippetsApi.snippetsWorkspaceEncodedIdCommentsPost"]?.[localVarOperationServerIndex]?.url;
|
|
23085
23299
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -23186,8 +23400,8 @@ var SnippetsApiFp = function(configuration) {
|
|
|
23186
23400
|
const localVarOperationServerBasePath = operationServerMap["SnippetsApi.snippetsWorkspaceGet"]?.[localVarOperationServerIndex]?.url;
|
|
23187
23401
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
23188
23402
|
},
|
|
23189
|
-
async snippetsWorkspacePost(workspace,
|
|
23190
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.snippetsWorkspacePost(workspace,
|
|
23403
|
+
async snippetsWorkspacePost(workspace, snippet, options) {
|
|
23404
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.snippetsWorkspacePost(workspace, snippet, options);
|
|
23191
23405
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
23192
23406
|
const localVarOperationServerBasePath = operationServerMap["SnippetsApi.snippetsWorkspacePost"]?.[localVarOperationServerIndex]?.url;
|
|
23193
23407
|
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
@@ -23199,7 +23413,7 @@ class SnippetsApi extends BaseAPI {
|
|
|
23199
23413
|
return SnippetsApiFp(this.configuration).snippetsGet(requestParameters.role, options).then((request) => request(this.axios, this.basePath));
|
|
23200
23414
|
}
|
|
23201
23415
|
snippetsPost(requestParameters, options) {
|
|
23202
|
-
return SnippetsApiFp(this.configuration).snippetsPost(requestParameters.
|
|
23416
|
+
return SnippetsApiFp(this.configuration).snippetsPost(requestParameters.snippet, options).then((request) => request(this.axios, this.basePath));
|
|
23203
23417
|
}
|
|
23204
23418
|
snippetsWorkspaceEncodedIdCommentsCommentIdDelete(requestParameters, options) {
|
|
23205
23419
|
return SnippetsApiFp(this.configuration).snippetsWorkspaceEncodedIdCommentsCommentIdDelete(requestParameters.commentId, requestParameters.encodedId, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -23208,13 +23422,13 @@ class SnippetsApi extends BaseAPI {
|
|
|
23208
23422
|
return SnippetsApiFp(this.configuration).snippetsWorkspaceEncodedIdCommentsCommentIdGet(requestParameters.commentId, requestParameters.encodedId, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
23209
23423
|
}
|
|
23210
23424
|
snippetsWorkspaceEncodedIdCommentsCommentIdPut(requestParameters, options) {
|
|
23211
|
-
return SnippetsApiFp(this.configuration).snippetsWorkspaceEncodedIdCommentsCommentIdPut(requestParameters.commentId, requestParameters.encodedId, requestParameters.workspace, requestParameters.
|
|
23425
|
+
return SnippetsApiFp(this.configuration).snippetsWorkspaceEncodedIdCommentsCommentIdPut(requestParameters.commentId, requestParameters.encodedId, requestParameters.workspace, requestParameters.snippetComment, options).then((request) => request(this.axios, this.basePath));
|
|
23212
23426
|
}
|
|
23213
23427
|
snippetsWorkspaceEncodedIdCommentsGet(requestParameters, options) {
|
|
23214
23428
|
return SnippetsApiFp(this.configuration).snippetsWorkspaceEncodedIdCommentsGet(requestParameters.encodedId, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
23215
23429
|
}
|
|
23216
23430
|
snippetsWorkspaceEncodedIdCommentsPost(requestParameters, options) {
|
|
23217
|
-
return SnippetsApiFp(this.configuration).snippetsWorkspaceEncodedIdCommentsPost(requestParameters.encodedId, requestParameters.workspace, requestParameters.
|
|
23431
|
+
return SnippetsApiFp(this.configuration).snippetsWorkspaceEncodedIdCommentsPost(requestParameters.encodedId, requestParameters.workspace, requestParameters.snippetComment, options).then((request) => request(this.axios, this.basePath));
|
|
23218
23432
|
}
|
|
23219
23433
|
snippetsWorkspaceEncodedIdCommitsGet(requestParameters, options) {
|
|
23220
23434
|
return SnippetsApiFp(this.configuration).snippetsWorkspaceEncodedIdCommitsGet(requestParameters.encodedId, requestParameters.workspace, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -23268,7 +23482,7 @@ class SnippetsApi extends BaseAPI {
|
|
|
23268
23482
|
return SnippetsApiFp(this.configuration).snippetsWorkspaceGet(requestParameters.workspace, requestParameters.role, options).then((request) => request(this.axios, this.basePath));
|
|
23269
23483
|
}
|
|
23270
23484
|
snippetsWorkspacePost(requestParameters, options) {
|
|
23271
|
-
return SnippetsApiFp(this.configuration).snippetsWorkspacePost(requestParameters.workspace, requestParameters.
|
|
23485
|
+
return SnippetsApiFp(this.configuration).snippetsWorkspacePost(requestParameters.workspace, requestParameters.snippet, options).then((request) => request(this.axios, this.basePath));
|
|
23272
23486
|
}
|
|
23273
23487
|
}
|
|
23274
23488
|
var SnippetsWorkspaceGetRoleEnum = {
|
|
@@ -23491,14 +23705,14 @@ class BaseCommand {
|
|
|
23491
23705
|
|
|
23492
23706
|
// src/commands/auth/login.command.ts
|
|
23493
23707
|
class LoginCommand extends BaseCommand {
|
|
23494
|
-
|
|
23708
|
+
credentialStore;
|
|
23495
23709
|
usersApi;
|
|
23496
23710
|
oauthService;
|
|
23497
23711
|
name = "login";
|
|
23498
23712
|
description = "Authenticate with Bitbucket";
|
|
23499
|
-
constructor(
|
|
23713
|
+
constructor(credentialStore, usersApi, oauthService, output) {
|
|
23500
23714
|
super(output);
|
|
23501
|
-
this.
|
|
23715
|
+
this.credentialStore = credentialStore;
|
|
23502
23716
|
this.usersApi = usersApi;
|
|
23503
23717
|
this.oauthService = oauthService;
|
|
23504
23718
|
}
|
|
@@ -23527,7 +23741,7 @@ class LoginCommand extends BaseCommand {
|
|
|
23527
23741
|
}
|
|
23528
23742
|
this.output.success(`Logged in as ${userInfo.displayName} (${userInfo.username})`);
|
|
23529
23743
|
} catch (error) {
|
|
23530
|
-
await this.
|
|
23744
|
+
await this.credentialStore.clearOAuthCredentials();
|
|
23531
23745
|
throw error;
|
|
23532
23746
|
}
|
|
23533
23747
|
}
|
|
@@ -23546,8 +23760,8 @@ class LoginCommand extends BaseCommand {
|
|
|
23546
23760
|
message: "API token is required. Use --password option or set BB_API_TOKEN environment variable."
|
|
23547
23761
|
});
|
|
23548
23762
|
}
|
|
23549
|
-
await this.
|
|
23550
|
-
await this.
|
|
23763
|
+
await this.credentialStore.clearOAuthCredentials();
|
|
23764
|
+
await this.credentialStore.setCredentials({ username, apiToken });
|
|
23551
23765
|
try {
|
|
23552
23766
|
const response = await this.usersApi.userGet();
|
|
23553
23767
|
const user = response.data;
|
|
@@ -23565,7 +23779,7 @@ class LoginCommand extends BaseCommand {
|
|
|
23565
23779
|
}
|
|
23566
23780
|
this.output.success(`Logged in as ${user.display_name} (${user.username})`);
|
|
23567
23781
|
} catch (error) {
|
|
23568
|
-
await this.
|
|
23782
|
+
await this.credentialStore.clearCredentials();
|
|
23569
23783
|
throw new BBError({
|
|
23570
23784
|
code: 1002 /* AUTH_INVALID */,
|
|
23571
23785
|
message: `Authentication failed: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -23576,22 +23790,22 @@ class LoginCommand extends BaseCommand {
|
|
|
23576
23790
|
|
|
23577
23791
|
// src/commands/auth/logout.command.ts
|
|
23578
23792
|
class LogoutCommand extends BaseCommand {
|
|
23579
|
-
|
|
23793
|
+
credentialStore;
|
|
23580
23794
|
oauthService;
|
|
23581
23795
|
name = "logout";
|
|
23582
23796
|
description = "Log out of Bitbucket";
|
|
23583
|
-
constructor(
|
|
23797
|
+
constructor(credentialStore, oauthService, output) {
|
|
23584
23798
|
super(output);
|
|
23585
|
-
this.
|
|
23799
|
+
this.credentialStore = credentialStore;
|
|
23586
23800
|
this.oauthService = oauthService;
|
|
23587
23801
|
}
|
|
23588
23802
|
async execute(_options, context) {
|
|
23589
|
-
const authMethod = await this.
|
|
23803
|
+
const authMethod = await this.credentialStore.getAuthMethod();
|
|
23590
23804
|
if (authMethod === "oauth") {
|
|
23591
23805
|
await this.oauthService.revokeToken();
|
|
23592
|
-
await this.
|
|
23806
|
+
await this.credentialStore.clearOAuthCredentials();
|
|
23593
23807
|
} else {
|
|
23594
|
-
await this.
|
|
23808
|
+
await this.credentialStore.clearCredentials();
|
|
23595
23809
|
}
|
|
23596
23810
|
if (context.globalOptions.json) {
|
|
23597
23811
|
this.output.json({ authenticated: false, success: true });
|
|
@@ -23604,17 +23818,19 @@ class LogoutCommand extends BaseCommand {
|
|
|
23604
23818
|
// src/commands/auth/status.command.ts
|
|
23605
23819
|
class StatusCommand extends BaseCommand {
|
|
23606
23820
|
configService;
|
|
23821
|
+
credentialStore;
|
|
23607
23822
|
usersApi;
|
|
23608
23823
|
name = "status";
|
|
23609
23824
|
description = "Show authentication status";
|
|
23610
|
-
constructor(configService, usersApi, output) {
|
|
23825
|
+
constructor(configService, credentialStore, usersApi, output) {
|
|
23611
23826
|
super(output);
|
|
23612
23827
|
this.configService = configService;
|
|
23828
|
+
this.credentialStore = credentialStore;
|
|
23613
23829
|
this.usersApi = usersApi;
|
|
23614
23830
|
}
|
|
23615
23831
|
async execute(_options, context) {
|
|
23616
23832
|
const config = await this.configService.getConfig();
|
|
23617
|
-
const authMethod = await this.
|
|
23833
|
+
const authMethod = await this.credentialStore.getAuthMethod();
|
|
23618
23834
|
const hasBasicAuth = config.username && config.apiToken;
|
|
23619
23835
|
const hasOAuth = config.oauthAccessToken && config.oauthRefreshToken;
|
|
23620
23836
|
if (!hasBasicAuth && !hasOAuth) {
|
|
@@ -23680,17 +23896,17 @@ class StatusCommand extends BaseCommand {
|
|
|
23680
23896
|
|
|
23681
23897
|
// src/commands/auth/token.command.ts
|
|
23682
23898
|
class TokenCommand extends BaseCommand {
|
|
23683
|
-
|
|
23899
|
+
credentialStore;
|
|
23684
23900
|
oauthService;
|
|
23685
23901
|
name = "token";
|
|
23686
23902
|
description = "Print the current access token";
|
|
23687
|
-
constructor(
|
|
23903
|
+
constructor(credentialStore, oauthService, output) {
|
|
23688
23904
|
super(output);
|
|
23689
|
-
this.
|
|
23905
|
+
this.credentialStore = credentialStore;
|
|
23690
23906
|
this.oauthService = oauthService;
|
|
23691
23907
|
}
|
|
23692
23908
|
async execute(_options, context) {
|
|
23693
|
-
const authMethod = await this.
|
|
23909
|
+
const authMethod = await this.credentialStore.getAuthMethod();
|
|
23694
23910
|
if (authMethod === "oauth") {
|
|
23695
23911
|
const accessToken = await this.oauthService.getValidAccessToken();
|
|
23696
23912
|
if (context.globalOptions.json) {
|
|
@@ -23700,7 +23916,7 @@ class TokenCommand extends BaseCommand {
|
|
|
23700
23916
|
this.output.text(accessToken);
|
|
23701
23917
|
return;
|
|
23702
23918
|
}
|
|
23703
|
-
const credentials = await this.
|
|
23919
|
+
const credentials = await this.credentialStore.getCredentials();
|
|
23704
23920
|
if (!credentials.username || !credentials.apiToken) {
|
|
23705
23921
|
throw new BBError({
|
|
23706
23922
|
code: 1001 /* AUTH_REQUIRED */,
|
|
@@ -23719,13 +23935,13 @@ class TokenCommand extends BaseCommand {
|
|
|
23719
23935
|
// src/commands/repo/clone.command.ts
|
|
23720
23936
|
class CloneCommand extends BaseCommand {
|
|
23721
23937
|
gitService;
|
|
23722
|
-
|
|
23938
|
+
contextService;
|
|
23723
23939
|
name = "clone";
|
|
23724
23940
|
description = "Clone a Bitbucket repository";
|
|
23725
|
-
constructor(gitService,
|
|
23941
|
+
constructor(gitService, contextService, output) {
|
|
23726
23942
|
super(output);
|
|
23727
23943
|
this.gitService = gitService;
|
|
23728
|
-
this.
|
|
23944
|
+
this.contextService = contextService;
|
|
23729
23945
|
}
|
|
23730
23946
|
async execute(options, context) {
|
|
23731
23947
|
const { repository, directory } = options;
|
|
@@ -23751,7 +23967,7 @@ class CloneCommand extends BaseCommand {
|
|
|
23751
23967
|
let workspace;
|
|
23752
23968
|
let repoSlug;
|
|
23753
23969
|
if (parts.length === 1) {
|
|
23754
|
-
workspace = await
|
|
23970
|
+
workspace = await this.contextService.requireWorkspace();
|
|
23755
23971
|
repoSlug = parts[0];
|
|
23756
23972
|
} else if (parts.length === 2) {
|
|
23757
23973
|
workspace = parts[0];
|
|
@@ -24064,19 +24280,19 @@ function parsePullrequestActivitiesPage(data) {
|
|
|
24064
24280
|
// src/commands/repo/create.command.ts
|
|
24065
24281
|
class CreateRepoCommand extends BaseCommand {
|
|
24066
24282
|
repositoriesApi;
|
|
24067
|
-
|
|
24283
|
+
contextService;
|
|
24068
24284
|
name = "create";
|
|
24069
24285
|
description = "Create a new repository";
|
|
24070
|
-
constructor(repositoriesApi,
|
|
24286
|
+
constructor(repositoriesApi, contextService, output) {
|
|
24071
24287
|
super(output);
|
|
24072
24288
|
this.repositoriesApi = repositoriesApi;
|
|
24073
|
-
this.
|
|
24289
|
+
this.contextService = contextService;
|
|
24074
24290
|
}
|
|
24075
24291
|
async execute(options, context) {
|
|
24076
24292
|
const { description, project } = options;
|
|
24077
24293
|
const name = this.requireOption(options.name, "name");
|
|
24078
24294
|
const isPublic = options.public === true;
|
|
24079
|
-
const workspace = await
|
|
24295
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
24080
24296
|
const request = {
|
|
24081
24297
|
type: "repository",
|
|
24082
24298
|
scm: "git",
|
|
@@ -24092,7 +24308,7 @@ class CreateRepoCommand extends BaseCommand {
|
|
|
24092
24308
|
const response = await this.repositoriesApi.repositoriesWorkspaceRepoSlugPost({
|
|
24093
24309
|
workspace,
|
|
24094
24310
|
repoSlug: name,
|
|
24095
|
-
|
|
24311
|
+
repository: request
|
|
24096
24312
|
});
|
|
24097
24313
|
const repo = response.data;
|
|
24098
24314
|
if (context.globalOptions.json) {
|
|
@@ -24112,16 +24328,16 @@ class CreateRepoCommand extends BaseCommand {
|
|
|
24112
24328
|
// src/commands/repo/list.command.ts
|
|
24113
24329
|
class ListReposCommand extends BaseCommand {
|
|
24114
24330
|
repositoriesApi;
|
|
24115
|
-
|
|
24331
|
+
contextService;
|
|
24116
24332
|
name = "list";
|
|
24117
24333
|
description = "List repositories";
|
|
24118
|
-
constructor(repositoriesApi,
|
|
24334
|
+
constructor(repositoriesApi, contextService, output) {
|
|
24119
24335
|
super(output);
|
|
24120
24336
|
this.repositoriesApi = repositoriesApi;
|
|
24121
|
-
this.
|
|
24337
|
+
this.contextService = contextService;
|
|
24122
24338
|
}
|
|
24123
24339
|
async execute(options, context) {
|
|
24124
|
-
const workspace = await
|
|
24340
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
24125
24341
|
const limit = parseLimit(options.limit);
|
|
24126
24342
|
const repos = await collectPages({
|
|
24127
24343
|
limit,
|
|
@@ -24444,7 +24660,7 @@ class CreatePRCommand extends BaseCommand {
|
|
|
24444
24660
|
const response = await this.pullrequestsApi.repositoriesWorkspaceRepoSlugPullrequestsPost({
|
|
24445
24661
|
workspace: repoContext.workspace,
|
|
24446
24662
|
repoSlug: repoContext.repoSlug,
|
|
24447
|
-
|
|
24663
|
+
pullrequest: request
|
|
24448
24664
|
});
|
|
24449
24665
|
const pr = response.data;
|
|
24450
24666
|
const links = pr.links;
|
|
@@ -24518,6 +24734,9 @@ class CreatePRCommand extends BaseCommand {
|
|
|
24518
24734
|
}
|
|
24519
24735
|
}
|
|
24520
24736
|
|
|
24737
|
+
// src/types/pr.ts
|
|
24738
|
+
var PR_STATES = ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"];
|
|
24739
|
+
|
|
24521
24740
|
// src/commands/pr/list.command.ts
|
|
24522
24741
|
class ListPRsCommand extends BaseCommand {
|
|
24523
24742
|
pullrequestsApi;
|
|
@@ -24536,13 +24755,7 @@ class ListPRsCommand extends BaseCommand {
|
|
|
24536
24755
|
...context.globalOptions,
|
|
24537
24756
|
...options
|
|
24538
24757
|
});
|
|
24539
|
-
const
|
|
24540
|
-
"OPEN",
|
|
24541
|
-
"MERGED",
|
|
24542
|
-
"DECLINED",
|
|
24543
|
-
"SUPERSEDED"
|
|
24544
|
-
];
|
|
24545
|
-
const state = options.state ? this.parseEnumOption(options.state, "state", ALLOWED_STATES) : "OPEN";
|
|
24758
|
+
const state = options.state ? this.parseEnumOption(options.state, "state", PR_STATES) : "OPEN";
|
|
24546
24759
|
const limit = parseLimit(options.limit);
|
|
24547
24760
|
const reviewerQuery = options.mine ? await this.buildMineFilter() : undefined;
|
|
24548
24761
|
const values = await collectPages({
|
|
@@ -24698,7 +24911,10 @@ class ViewPRCommand extends BaseCommand {
|
|
|
24698
24911
|
this.output.text("");
|
|
24699
24912
|
this.output.text(this.output.dim("Reviewers:"));
|
|
24700
24913
|
for (const reviewer of reviewers) {
|
|
24701
|
-
const status = this.getReviewerStatus(
|
|
24914
|
+
const status = this.getReviewerStatus({
|
|
24915
|
+
approved: reviewer.approved,
|
|
24916
|
+
state: reviewer.state ?? undefined
|
|
24917
|
+
});
|
|
24702
24918
|
this.output.text(` ${status.icon} ${reviewer.user?.display_name ?? "Unknown"} ${this.output.gray(status.label)}`);
|
|
24703
24919
|
}
|
|
24704
24920
|
}
|
|
@@ -24816,7 +25032,7 @@ class EditPRCommand extends BaseCommand {
|
|
|
24816
25032
|
workspace: repoContext.workspace,
|
|
24817
25033
|
repoSlug: repoContext.repoSlug,
|
|
24818
25034
|
pullRequestId: prId,
|
|
24819
|
-
|
|
25035
|
+
pullrequest: request
|
|
24820
25036
|
});
|
|
24821
25037
|
const pr = response.data;
|
|
24822
25038
|
const links = pr.links;
|
|
@@ -24869,7 +25085,7 @@ class MergePRCommand extends BaseCommand {
|
|
|
24869
25085
|
workspace: repoContext.workspace,
|
|
24870
25086
|
repoSlug: repoContext.repoSlug,
|
|
24871
25087
|
pullRequestId: prId,
|
|
24872
|
-
|
|
25088
|
+
pullrequestMergeParameters: request
|
|
24873
25089
|
});
|
|
24874
25090
|
const pr = response.data;
|
|
24875
25091
|
if (context.globalOptions.json) {
|
|
@@ -24973,7 +25189,7 @@ class ReadyPRCommand extends BaseCommand {
|
|
|
24973
25189
|
workspace: repoContext.workspace,
|
|
24974
25190
|
repoSlug: repoContext.repoSlug,
|
|
24975
25191
|
pullRequestId: prId,
|
|
24976
|
-
|
|
25192
|
+
pullrequest: {
|
|
24977
25193
|
type: "pullrequest",
|
|
24978
25194
|
draft: false
|
|
24979
25195
|
}
|
|
@@ -25536,7 +25752,7 @@ class CommentPRCommand extends BaseCommand {
|
|
|
25536
25752
|
workspace: repoContext.workspace,
|
|
25537
25753
|
repoSlug: repoContext.repoSlug,
|
|
25538
25754
|
pullRequestId: prId,
|
|
25539
|
-
body
|
|
25755
|
+
pullrequestComment: body
|
|
25540
25756
|
});
|
|
25541
25757
|
if (context.globalOptions.json) {
|
|
25542
25758
|
const jsonOutput = {
|
|
@@ -25641,7 +25857,7 @@ class EditCommentPRCommand extends BaseCommand {
|
|
|
25641
25857
|
repoSlug: repoContext.repoSlug,
|
|
25642
25858
|
pullRequestId: prId,
|
|
25643
25859
|
commentId,
|
|
25644
|
-
|
|
25860
|
+
pullrequestComment: {
|
|
25645
25861
|
type: "pullrequest_comment",
|
|
25646
25862
|
content: {
|
|
25647
25863
|
raw: options.message
|
|
@@ -25962,16 +26178,16 @@ var VALID_ROLES = Object.values(SnippetsWorkspaceGetRoleEnum);
|
|
|
25962
26178
|
|
|
25963
26179
|
class ListSnippetsCommand extends BaseCommand {
|
|
25964
26180
|
snippetsApi;
|
|
25965
|
-
|
|
26181
|
+
contextService;
|
|
25966
26182
|
name = "list";
|
|
25967
26183
|
description = "List snippets";
|
|
25968
|
-
constructor(snippetsApi,
|
|
26184
|
+
constructor(snippetsApi, contextService, output) {
|
|
25969
26185
|
super(output);
|
|
25970
26186
|
this.snippetsApi = snippetsApi;
|
|
25971
|
-
this.
|
|
26187
|
+
this.contextService = contextService;
|
|
25972
26188
|
}
|
|
25973
26189
|
async execute(options, context) {
|
|
25974
|
-
const workspace = await
|
|
26190
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
25975
26191
|
const limit = parseLimit(options.limit);
|
|
25976
26192
|
const role = options.role ? this.parseEnumOption(options.role, "role", VALID_ROLES) : undefined;
|
|
25977
26193
|
const snippets = await collectPages({
|
|
@@ -26013,17 +26229,17 @@ class ListSnippetsCommand extends BaseCommand {
|
|
|
26013
26229
|
class ViewSnippetCommand extends BaseCommand {
|
|
26014
26230
|
snippetsApi;
|
|
26015
26231
|
snippetFilesService;
|
|
26016
|
-
|
|
26232
|
+
contextService;
|
|
26017
26233
|
name = "view";
|
|
26018
26234
|
description = "View snippet details";
|
|
26019
|
-
constructor(snippetsApi, snippetFilesService,
|
|
26235
|
+
constructor(snippetsApi, snippetFilesService, contextService, output) {
|
|
26020
26236
|
super(output);
|
|
26021
26237
|
this.snippetsApi = snippetsApi;
|
|
26022
26238
|
this.snippetFilesService = snippetFilesService;
|
|
26023
|
-
this.
|
|
26239
|
+
this.contextService = contextService;
|
|
26024
26240
|
}
|
|
26025
26241
|
async execute(options, context) {
|
|
26026
|
-
const workspace = await
|
|
26242
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26027
26243
|
const response = await this.snippetsApi.snippetsWorkspaceEncodedIdGet({
|
|
26028
26244
|
workspace,
|
|
26029
26245
|
encodedId: options.id
|
|
@@ -26059,7 +26275,7 @@ class ViewSnippetCommand extends BaseCommand {
|
|
|
26059
26275
|
for (const name of fileNames) {
|
|
26060
26276
|
this.output.text("");
|
|
26061
26277
|
this.output.text(this.output.bold(`\u2500\u2500 ${name} \u2500\u2500`));
|
|
26062
|
-
this.output.text(contents[name]);
|
|
26278
|
+
this.output.text(contents[name] ?? "");
|
|
26063
26279
|
}
|
|
26064
26280
|
return;
|
|
26065
26281
|
}
|
|
@@ -26115,16 +26331,16 @@ class ViewSnippetCommand extends BaseCommand {
|
|
|
26115
26331
|
import fs8 from "fs";
|
|
26116
26332
|
class CreateSnippetCommand extends BaseCommand {
|
|
26117
26333
|
snippetFilesService;
|
|
26118
|
-
|
|
26334
|
+
contextService;
|
|
26119
26335
|
name = "create";
|
|
26120
26336
|
description = "Create a snippet";
|
|
26121
|
-
constructor(snippetFilesService,
|
|
26337
|
+
constructor(snippetFilesService, contextService, output) {
|
|
26122
26338
|
super(output);
|
|
26123
26339
|
this.snippetFilesService = snippetFilesService;
|
|
26124
|
-
this.
|
|
26340
|
+
this.contextService = contextService;
|
|
26125
26341
|
}
|
|
26126
26342
|
async execute(options, context) {
|
|
26127
|
-
const workspace = await
|
|
26343
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26128
26344
|
const title = this.requireOption(options.title, "title", "Snippet title is required. Use --title option.");
|
|
26129
26345
|
if (!options.file || options.file.length === 0) {
|
|
26130
26346
|
throw new BBError({
|
|
@@ -26171,16 +26387,16 @@ class CreateSnippetCommand extends BaseCommand {
|
|
|
26171
26387
|
import fs9 from "fs";
|
|
26172
26388
|
class EditSnippetCommand extends BaseCommand {
|
|
26173
26389
|
snippetFilesService;
|
|
26174
|
-
|
|
26390
|
+
contextService;
|
|
26175
26391
|
name = "edit";
|
|
26176
26392
|
description = "Edit a snippet";
|
|
26177
|
-
constructor(snippetFilesService,
|
|
26393
|
+
constructor(snippetFilesService, contextService, output) {
|
|
26178
26394
|
super(output);
|
|
26179
26395
|
this.snippetFilesService = snippetFilesService;
|
|
26180
|
-
this.
|
|
26396
|
+
this.contextService = contextService;
|
|
26181
26397
|
}
|
|
26182
26398
|
async execute(options, context) {
|
|
26183
|
-
const workspace = await
|
|
26399
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26184
26400
|
const hasTitle = options.title !== undefined;
|
|
26185
26401
|
const hasVisibility = options.private !== undefined || options.public !== undefined;
|
|
26186
26402
|
const hasFiles = options.file !== undefined && options.file.length > 0;
|
|
@@ -26231,16 +26447,16 @@ class EditSnippetCommand extends BaseCommand {
|
|
|
26231
26447
|
// src/commands/snippet/delete.command.ts
|
|
26232
26448
|
class DeleteSnippetCommand extends BaseCommand {
|
|
26233
26449
|
snippetsApi;
|
|
26234
|
-
|
|
26450
|
+
contextService;
|
|
26235
26451
|
name = "delete";
|
|
26236
26452
|
description = "Delete a snippet";
|
|
26237
|
-
constructor(snippetsApi,
|
|
26453
|
+
constructor(snippetsApi, contextService, output) {
|
|
26238
26454
|
super(output);
|
|
26239
26455
|
this.snippetsApi = snippetsApi;
|
|
26240
|
-
this.
|
|
26456
|
+
this.contextService = contextService;
|
|
26241
26457
|
}
|
|
26242
26458
|
async execute(options, context) {
|
|
26243
|
-
const workspace = await
|
|
26459
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26244
26460
|
if (!options.yes) {
|
|
26245
26461
|
throw new BBError({
|
|
26246
26462
|
code: 5001 /* VALIDATION_REQUIRED */,
|
|
@@ -26267,16 +26483,16 @@ class DeleteSnippetCommand extends BaseCommand {
|
|
|
26267
26483
|
// src/commands/snippet/watch.command.ts
|
|
26268
26484
|
class WatchSnippetCommand extends BaseCommand {
|
|
26269
26485
|
snippetsApi;
|
|
26270
|
-
|
|
26486
|
+
contextService;
|
|
26271
26487
|
name = "watch";
|
|
26272
26488
|
description = "Watch a snippet";
|
|
26273
|
-
constructor(snippetsApi,
|
|
26489
|
+
constructor(snippetsApi, contextService, output) {
|
|
26274
26490
|
super(output);
|
|
26275
26491
|
this.snippetsApi = snippetsApi;
|
|
26276
|
-
this.
|
|
26492
|
+
this.contextService = contextService;
|
|
26277
26493
|
}
|
|
26278
26494
|
async execute(options, context) {
|
|
26279
|
-
const workspace = await
|
|
26495
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26280
26496
|
await this.snippetsApi.snippetsWorkspaceEncodedIdWatchPut({
|
|
26281
26497
|
workspace,
|
|
26282
26498
|
encodedId: options.id
|
|
@@ -26296,16 +26512,16 @@ class WatchSnippetCommand extends BaseCommand {
|
|
|
26296
26512
|
// src/commands/snippet/unwatch.command.ts
|
|
26297
26513
|
class UnwatchSnippetCommand extends BaseCommand {
|
|
26298
26514
|
snippetsApi;
|
|
26299
|
-
|
|
26515
|
+
contextService;
|
|
26300
26516
|
name = "unwatch";
|
|
26301
26517
|
description = "Stop watching a snippet";
|
|
26302
|
-
constructor(snippetsApi,
|
|
26518
|
+
constructor(snippetsApi, contextService, output) {
|
|
26303
26519
|
super(output);
|
|
26304
26520
|
this.snippetsApi = snippetsApi;
|
|
26305
|
-
this.
|
|
26521
|
+
this.contextService = contextService;
|
|
26306
26522
|
}
|
|
26307
26523
|
async execute(options, context) {
|
|
26308
|
-
const workspace = await
|
|
26524
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26309
26525
|
await this.snippetsApi.snippetsWorkspaceEncodedIdWatchDelete({
|
|
26310
26526
|
workspace,
|
|
26311
26527
|
encodedId: options.id
|
|
@@ -26325,16 +26541,16 @@ class UnwatchSnippetCommand extends BaseCommand {
|
|
|
26325
26541
|
// src/commands/snippet/comments.list.command.ts
|
|
26326
26542
|
class ListSnippetCommentsCommand extends BaseCommand {
|
|
26327
26543
|
snippetsApi;
|
|
26328
|
-
|
|
26544
|
+
contextService;
|
|
26329
26545
|
name = "list";
|
|
26330
26546
|
description = "List comments on a snippet";
|
|
26331
|
-
constructor(snippetsApi,
|
|
26547
|
+
constructor(snippetsApi, contextService, output) {
|
|
26332
26548
|
super(output);
|
|
26333
26549
|
this.snippetsApi = snippetsApi;
|
|
26334
|
-
this.
|
|
26550
|
+
this.contextService = contextService;
|
|
26335
26551
|
}
|
|
26336
26552
|
async execute(options, context) {
|
|
26337
|
-
const workspace = await
|
|
26553
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26338
26554
|
const limit = parseLimit(options.limit);
|
|
26339
26555
|
const comments = await collectPages({
|
|
26340
26556
|
limit,
|
|
@@ -26361,8 +26577,7 @@ class ListSnippetCommentsCommand extends BaseCommand {
|
|
|
26361
26577
|
this.output.info("No comments found on this snippet");
|
|
26362
26578
|
return;
|
|
26363
26579
|
}
|
|
26364
|
-
const
|
|
26365
|
-
const rows = record.map((comment) => {
|
|
26580
|
+
const rows = comments.map((comment) => {
|
|
26366
26581
|
const content = getRawContent(comment.content) ?? "";
|
|
26367
26582
|
return [
|
|
26368
26583
|
String(comment.id ?? ""),
|
|
@@ -26378,16 +26593,16 @@ class ListSnippetCommentsCommand extends BaseCommand {
|
|
|
26378
26593
|
// src/commands/snippet/comments.add.command.ts
|
|
26379
26594
|
class AddSnippetCommentCommand extends BaseCommand {
|
|
26380
26595
|
snippetsApi;
|
|
26381
|
-
|
|
26596
|
+
contextService;
|
|
26382
26597
|
name = "add";
|
|
26383
26598
|
description = "Add a comment to a snippet";
|
|
26384
|
-
constructor(snippetsApi,
|
|
26599
|
+
constructor(snippetsApi, contextService, output) {
|
|
26385
26600
|
super(output);
|
|
26386
26601
|
this.snippetsApi = snippetsApi;
|
|
26387
|
-
this.
|
|
26602
|
+
this.contextService = contextService;
|
|
26388
26603
|
}
|
|
26389
26604
|
async execute(options, context) {
|
|
26390
|
-
const workspace = await
|
|
26605
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26391
26606
|
const message = this.requireOption(options.message, "message", "Comment message is required. Use --message option.");
|
|
26392
26607
|
const body = {
|
|
26393
26608
|
type: "snippet_comment",
|
|
@@ -26398,7 +26613,7 @@ class AddSnippetCommentCommand extends BaseCommand {
|
|
|
26398
26613
|
const response = await this.snippetsApi.snippetsWorkspaceEncodedIdCommentsPost({
|
|
26399
26614
|
workspace,
|
|
26400
26615
|
encodedId: options.id,
|
|
26401
|
-
body
|
|
26616
|
+
snippetComment: body
|
|
26402
26617
|
});
|
|
26403
26618
|
const comment = response.data;
|
|
26404
26619
|
const commentId = comment.id;
|
|
@@ -26417,16 +26632,16 @@ class AddSnippetCommentCommand extends BaseCommand {
|
|
|
26417
26632
|
// src/commands/snippet/comments.edit.command.ts
|
|
26418
26633
|
class EditSnippetCommentCommand extends BaseCommand {
|
|
26419
26634
|
snippetsApi;
|
|
26420
|
-
|
|
26635
|
+
contextService;
|
|
26421
26636
|
name = "edit";
|
|
26422
26637
|
description = "Edit a comment on a snippet";
|
|
26423
|
-
constructor(snippetsApi,
|
|
26638
|
+
constructor(snippetsApi, contextService, output) {
|
|
26424
26639
|
super(output);
|
|
26425
26640
|
this.snippetsApi = snippetsApi;
|
|
26426
|
-
this.
|
|
26641
|
+
this.contextService = contextService;
|
|
26427
26642
|
}
|
|
26428
26643
|
async execute(options, context) {
|
|
26429
|
-
const workspace = await
|
|
26644
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26430
26645
|
const commentId = this.parseIntOption(options.commentId, "comment-id");
|
|
26431
26646
|
const body = {
|
|
26432
26647
|
type: "snippet_comment",
|
|
@@ -26438,7 +26653,7 @@ class EditSnippetCommentCommand extends BaseCommand {
|
|
|
26438
26653
|
workspace,
|
|
26439
26654
|
encodedId: options.snippetId,
|
|
26440
26655
|
commentId,
|
|
26441
|
-
body
|
|
26656
|
+
snippetComment: body
|
|
26442
26657
|
});
|
|
26443
26658
|
if (context.globalOptions.json) {
|
|
26444
26659
|
this.output.json({
|
|
@@ -26455,16 +26670,16 @@ class EditSnippetCommentCommand extends BaseCommand {
|
|
|
26455
26670
|
// src/commands/snippet/comments.delete.command.ts
|
|
26456
26671
|
class DeleteSnippetCommentCommand extends BaseCommand {
|
|
26457
26672
|
snippetsApi;
|
|
26458
|
-
|
|
26673
|
+
contextService;
|
|
26459
26674
|
name = "delete";
|
|
26460
26675
|
description = "Delete a comment on a snippet";
|
|
26461
|
-
constructor(snippetsApi,
|
|
26676
|
+
constructor(snippetsApi, contextService, output) {
|
|
26462
26677
|
super(output);
|
|
26463
26678
|
this.snippetsApi = snippetsApi;
|
|
26464
|
-
this.
|
|
26679
|
+
this.contextService = contextService;
|
|
26465
26680
|
}
|
|
26466
26681
|
async execute(options, context) {
|
|
26467
|
-
const workspace = await
|
|
26682
|
+
const workspace = await this.contextService.requireWorkspace(options.workspace ?? context.globalOptions.workspace);
|
|
26468
26683
|
const commentId = this.parseIntOption(options.commentId, "comment-id");
|
|
26469
26684
|
if (!options.yes) {
|
|
26470
26685
|
throw new BBError({
|
|
@@ -26698,350 +26913,285 @@ class UninstallCompletionCommand extends BaseCommand {
|
|
|
26698
26913
|
// src/bootstrap.ts
|
|
26699
26914
|
var require2 = createRequire(import.meta.url);
|
|
26700
26915
|
var pkg = require2("../package.json");
|
|
26916
|
+
function registerApiClient(container, token, ctor) {
|
|
26917
|
+
container.register(token, () => {
|
|
26918
|
+
const credentialStore = container.resolve(ServiceTokens.CredentialStore);
|
|
26919
|
+
const oauthService = container.resolve(ServiceTokens.OAuthService);
|
|
26920
|
+
const axiosInstance = createApiClient(credentialStore, oauthService);
|
|
26921
|
+
return new ctor(undefined, undefined, axiosInstance);
|
|
26922
|
+
});
|
|
26923
|
+
}
|
|
26924
|
+
function registerCommand(container, token, ctor, deps) {
|
|
26925
|
+
container.register(token, () => {
|
|
26926
|
+
const resolved = deps.map((dep) => container.resolve(dep));
|
|
26927
|
+
return new ctor(...resolved);
|
|
26928
|
+
});
|
|
26929
|
+
}
|
|
26701
26930
|
function bootstrap(options = {}) {
|
|
26702
26931
|
const container = Container.getInstance();
|
|
26703
26932
|
container.register(ServiceTokens.ConfigService, () => new ConfigService);
|
|
26933
|
+
container.register(ServiceTokens.CredentialStore, () => container.resolve(ServiceTokens.ConfigService));
|
|
26704
26934
|
container.register(ServiceTokens.GitService, () => new GitService);
|
|
26705
26935
|
container.register(ServiceTokens.OutputService, () => new OutputService({ noColor: options.noColor }));
|
|
26706
|
-
container
|
|
26707
|
-
|
|
26708
|
-
|
|
26709
|
-
|
|
26710
|
-
container
|
|
26711
|
-
|
|
26712
|
-
|
|
26713
|
-
|
|
26714
|
-
|
|
26715
|
-
|
|
26716
|
-
container
|
|
26717
|
-
|
|
26718
|
-
const oauthService = container.resolve(ServiceTokens.OAuthService);
|
|
26719
|
-
const axiosInstance = createApiClient(configService, oauthService);
|
|
26720
|
-
return new RepositoriesApi(undefined, undefined, axiosInstance);
|
|
26721
|
-
});
|
|
26722
|
-
container.register(ServiceTokens.UsersApi, () => {
|
|
26723
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
26724
|
-
const oauthService = container.resolve(ServiceTokens.OAuthService);
|
|
26725
|
-
const axiosInstance = createApiClient(configService, oauthService);
|
|
26726
|
-
return new UsersApi(undefined, undefined, axiosInstance);
|
|
26727
|
-
});
|
|
26728
|
-
container.register(ServiceTokens.CommitStatusesApi, () => {
|
|
26729
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
26730
|
-
const oauthService = container.resolve(ServiceTokens.OAuthService);
|
|
26731
|
-
const axiosInstance = createApiClient(configService, oauthService);
|
|
26732
|
-
return new CommitStatusesApi(undefined, undefined, axiosInstance);
|
|
26733
|
-
});
|
|
26936
|
+
registerCommand(container, ServiceTokens.OAuthService, OAuthService, [
|
|
26937
|
+
ServiceTokens.ConfigService,
|
|
26938
|
+
ServiceTokens.CredentialStore
|
|
26939
|
+
]);
|
|
26940
|
+
registerCommand(container, ServiceTokens.ContextService, ContextService, [
|
|
26941
|
+
ServiceTokens.GitService,
|
|
26942
|
+
ServiceTokens.ConfigService
|
|
26943
|
+
]);
|
|
26944
|
+
registerApiClient(container, ServiceTokens.PullrequestsApi, PullrequestsApi);
|
|
26945
|
+
registerApiClient(container, ServiceTokens.RepositoriesApi, RepositoriesApi);
|
|
26946
|
+
registerApiClient(container, ServiceTokens.UsersApi, UsersApi);
|
|
26947
|
+
registerApiClient(container, ServiceTokens.CommitStatusesApi, CommitStatusesApi);
|
|
26734
26948
|
container.register(ServiceTokens.SnippetsAxios, () => {
|
|
26735
|
-
const
|
|
26949
|
+
const credentialStore = container.resolve(ServiceTokens.CredentialStore);
|
|
26736
26950
|
const oauthService = container.resolve(ServiceTokens.OAuthService);
|
|
26737
|
-
return createApiClient(
|
|
26951
|
+
return createApiClient(credentialStore, oauthService);
|
|
26738
26952
|
});
|
|
26739
26953
|
container.register(ServiceTokens.SnippetsApi, () => {
|
|
26740
26954
|
const axiosInstance = container.resolve(ServiceTokens.SnippetsAxios);
|
|
26741
26955
|
return new SnippetsApi(undefined, undefined, axiosInstance);
|
|
26742
26956
|
});
|
|
26743
|
-
container
|
|
26744
|
-
|
|
26745
|
-
|
|
26746
|
-
|
|
26747
|
-
|
|
26748
|
-
|
|
26749
|
-
|
|
26750
|
-
|
|
26751
|
-
|
|
26752
|
-
|
|
26753
|
-
|
|
26754
|
-
|
|
26755
|
-
|
|
26756
|
-
|
|
26757
|
-
|
|
26758
|
-
|
|
26759
|
-
|
|
26760
|
-
|
|
26761
|
-
|
|
26762
|
-
|
|
26763
|
-
|
|
26764
|
-
|
|
26765
|
-
|
|
26766
|
-
|
|
26767
|
-
|
|
26768
|
-
|
|
26769
|
-
|
|
26770
|
-
|
|
26771
|
-
|
|
26772
|
-
|
|
26773
|
-
|
|
26774
|
-
|
|
26775
|
-
|
|
26776
|
-
|
|
26777
|
-
container
|
|
26778
|
-
|
|
26779
|
-
|
|
26780
|
-
|
|
26781
|
-
|
|
26782
|
-
|
|
26783
|
-
|
|
26784
|
-
|
|
26785
|
-
|
|
26786
|
-
|
|
26787
|
-
|
|
26788
|
-
|
|
26789
|
-
|
|
26790
|
-
|
|
26791
|
-
|
|
26792
|
-
|
|
26793
|
-
|
|
26794
|
-
|
|
26795
|
-
|
|
26796
|
-
|
|
26797
|
-
|
|
26798
|
-
|
|
26799
|
-
|
|
26800
|
-
|
|
26801
|
-
|
|
26802
|
-
|
|
26803
|
-
|
|
26804
|
-
|
|
26805
|
-
|
|
26806
|
-
|
|
26807
|
-
|
|
26808
|
-
|
|
26809
|
-
|
|
26810
|
-
|
|
26811
|
-
|
|
26812
|
-
|
|
26813
|
-
|
|
26814
|
-
|
|
26815
|
-
|
|
26816
|
-
|
|
26817
|
-
|
|
26818
|
-
|
|
26819
|
-
|
|
26820
|
-
|
|
26821
|
-
|
|
26822
|
-
|
|
26823
|
-
|
|
26824
|
-
container
|
|
26825
|
-
|
|
26826
|
-
|
|
26827
|
-
|
|
26828
|
-
|
|
26829
|
-
|
|
26830
|
-
|
|
26831
|
-
|
|
26832
|
-
|
|
26833
|
-
|
|
26834
|
-
|
|
26835
|
-
|
|
26836
|
-
|
|
26837
|
-
|
|
26838
|
-
|
|
26839
|
-
|
|
26840
|
-
|
|
26841
|
-
|
|
26842
|
-
|
|
26843
|
-
|
|
26844
|
-
|
|
26845
|
-
|
|
26846
|
-
|
|
26847
|
-
|
|
26848
|
-
|
|
26849
|
-
|
|
26850
|
-
|
|
26851
|
-
|
|
26852
|
-
|
|
26853
|
-
|
|
26854
|
-
|
|
26855
|
-
|
|
26856
|
-
|
|
26857
|
-
|
|
26858
|
-
|
|
26859
|
-
|
|
26860
|
-
|
|
26861
|
-
container
|
|
26862
|
-
|
|
26863
|
-
|
|
26864
|
-
|
|
26865
|
-
|
|
26866
|
-
|
|
26867
|
-
container
|
|
26868
|
-
|
|
26869
|
-
|
|
26870
|
-
|
|
26871
|
-
|
|
26872
|
-
|
|
26873
|
-
|
|
26874
|
-
|
|
26875
|
-
|
|
26876
|
-
|
|
26877
|
-
|
|
26878
|
-
|
|
26879
|
-
|
|
26880
|
-
|
|
26881
|
-
|
|
26882
|
-
|
|
26883
|
-
|
|
26884
|
-
|
|
26885
|
-
|
|
26886
|
-
|
|
26887
|
-
|
|
26888
|
-
|
|
26889
|
-
|
|
26890
|
-
|
|
26891
|
-
|
|
26892
|
-
container
|
|
26893
|
-
|
|
26894
|
-
|
|
26895
|
-
|
|
26896
|
-
|
|
26897
|
-
|
|
26898
|
-
|
|
26899
|
-
|
|
26900
|
-
|
|
26901
|
-
|
|
26902
|
-
|
|
26903
|
-
|
|
26904
|
-
|
|
26905
|
-
|
|
26906
|
-
|
|
26907
|
-
|
|
26908
|
-
|
|
26909
|
-
|
|
26910
|
-
|
|
26911
|
-
|
|
26912
|
-
|
|
26913
|
-
|
|
26914
|
-
|
|
26915
|
-
|
|
26916
|
-
|
|
26917
|
-
|
|
26918
|
-
|
|
26919
|
-
|
|
26920
|
-
|
|
26921
|
-
|
|
26922
|
-
|
|
26923
|
-
|
|
26924
|
-
|
|
26925
|
-
|
|
26926
|
-
|
|
26927
|
-
|
|
26928
|
-
|
|
26929
|
-
|
|
26930
|
-
|
|
26931
|
-
|
|
26932
|
-
|
|
26933
|
-
|
|
26934
|
-
|
|
26935
|
-
|
|
26936
|
-
|
|
26937
|
-
|
|
26938
|
-
|
|
26939
|
-
|
|
26940
|
-
|
|
26941
|
-
|
|
26942
|
-
|
|
26943
|
-
|
|
26944
|
-
|
|
26945
|
-
|
|
26946
|
-
|
|
26947
|
-
|
|
26948
|
-
|
|
26949
|
-
|
|
26950
|
-
|
|
26951
|
-
|
|
26952
|
-
|
|
26953
|
-
|
|
26954
|
-
|
|
26955
|
-
container
|
|
26956
|
-
|
|
26957
|
-
|
|
26958
|
-
|
|
26959
|
-
|
|
26960
|
-
|
|
26961
|
-
|
|
26962
|
-
|
|
26963
|
-
|
|
26964
|
-
|
|
26965
|
-
|
|
26966
|
-
|
|
26967
|
-
|
|
26968
|
-
|
|
26969
|
-
|
|
26970
|
-
|
|
26971
|
-
|
|
26972
|
-
|
|
26973
|
-
|
|
26974
|
-
container
|
|
26975
|
-
|
|
26976
|
-
|
|
26977
|
-
|
|
26978
|
-
|
|
26979
|
-
|
|
26980
|
-
container
|
|
26981
|
-
const snippetsApi = container.resolve(ServiceTokens.SnippetsApi);
|
|
26982
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
26983
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
26984
|
-
return new DeleteSnippetCommand(snippetsApi, configService, output);
|
|
26985
|
-
});
|
|
26986
|
-
container.register(ServiceTokens.WatchSnippetCommand, () => {
|
|
26987
|
-
const snippetsApi = container.resolve(ServiceTokens.SnippetsApi);
|
|
26988
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
26989
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
26990
|
-
return new WatchSnippetCommand(snippetsApi, configService, output);
|
|
26991
|
-
});
|
|
26992
|
-
container.register(ServiceTokens.UnwatchSnippetCommand, () => {
|
|
26993
|
-
const snippetsApi = container.resolve(ServiceTokens.SnippetsApi);
|
|
26994
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
26995
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
26996
|
-
return new UnwatchSnippetCommand(snippetsApi, configService, output);
|
|
26997
|
-
});
|
|
26998
|
-
container.register(ServiceTokens.ListSnippetCommentsCommand, () => {
|
|
26999
|
-
const snippetsApi = container.resolve(ServiceTokens.SnippetsApi);
|
|
27000
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
27001
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27002
|
-
return new ListSnippetCommentsCommand(snippetsApi, configService, output);
|
|
27003
|
-
});
|
|
27004
|
-
container.register(ServiceTokens.AddSnippetCommentCommand, () => {
|
|
27005
|
-
const snippetsApi = container.resolve(ServiceTokens.SnippetsApi);
|
|
27006
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
27007
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27008
|
-
return new AddSnippetCommentCommand(snippetsApi, configService, output);
|
|
27009
|
-
});
|
|
27010
|
-
container.register(ServiceTokens.EditSnippetCommentCommand, () => {
|
|
27011
|
-
const snippetsApi = container.resolve(ServiceTokens.SnippetsApi);
|
|
27012
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
27013
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27014
|
-
return new EditSnippetCommentCommand(snippetsApi, configService, output);
|
|
27015
|
-
});
|
|
27016
|
-
container.register(ServiceTokens.DeleteSnippetCommentCommand, () => {
|
|
27017
|
-
const snippetsApi = container.resolve(ServiceTokens.SnippetsApi);
|
|
27018
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
27019
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27020
|
-
return new DeleteSnippetCommentCommand(snippetsApi, configService, output);
|
|
27021
|
-
});
|
|
27022
|
-
container.register(ServiceTokens.GetConfigCommand, () => {
|
|
27023
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
27024
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27025
|
-
return new GetConfigCommand(configService, output);
|
|
27026
|
-
});
|
|
27027
|
-
container.register(ServiceTokens.SetConfigCommand, () => {
|
|
27028
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
27029
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27030
|
-
return new SetConfigCommand(configService, output);
|
|
27031
|
-
});
|
|
27032
|
-
container.register(ServiceTokens.ListConfigCommand, () => {
|
|
27033
|
-
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
27034
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27035
|
-
return new ListConfigCommand(configService, output);
|
|
27036
|
-
});
|
|
27037
|
-
container.register(ServiceTokens.InstallCompletionCommand, () => {
|
|
27038
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27039
|
-
return new InstallCompletionCommand(output);
|
|
27040
|
-
});
|
|
27041
|
-
container.register(ServiceTokens.UninstallCompletionCommand, () => {
|
|
27042
|
-
const output = container.resolve(ServiceTokens.OutputService);
|
|
27043
|
-
return new UninstallCompletionCommand(output);
|
|
27044
|
-
});
|
|
26957
|
+
registerCommand(container, ServiceTokens.SnippetFilesService, SnippetFilesService, [ServiceTokens.SnippetsAxios]);
|
|
26958
|
+
registerCommand(container, ServiceTokens.DefaultReviewerService, DefaultReviewerService, [ServiceTokens.PullrequestsApi]);
|
|
26959
|
+
registerCommand(container, ServiceTokens.LoginCommand, LoginCommand, [
|
|
26960
|
+
ServiceTokens.CredentialStore,
|
|
26961
|
+
ServiceTokens.UsersApi,
|
|
26962
|
+
ServiceTokens.OAuthService,
|
|
26963
|
+
ServiceTokens.OutputService
|
|
26964
|
+
]);
|
|
26965
|
+
registerCommand(container, ServiceTokens.LogoutCommand, LogoutCommand, [
|
|
26966
|
+
ServiceTokens.CredentialStore,
|
|
26967
|
+
ServiceTokens.OAuthService,
|
|
26968
|
+
ServiceTokens.OutputService
|
|
26969
|
+
]);
|
|
26970
|
+
registerCommand(container, ServiceTokens.StatusCommand, StatusCommand, [
|
|
26971
|
+
ServiceTokens.ConfigService,
|
|
26972
|
+
ServiceTokens.CredentialStore,
|
|
26973
|
+
ServiceTokens.UsersApi,
|
|
26974
|
+
ServiceTokens.OutputService
|
|
26975
|
+
]);
|
|
26976
|
+
registerCommand(container, ServiceTokens.TokenCommand, TokenCommand, [
|
|
26977
|
+
ServiceTokens.CredentialStore,
|
|
26978
|
+
ServiceTokens.OAuthService,
|
|
26979
|
+
ServiceTokens.OutputService
|
|
26980
|
+
]);
|
|
26981
|
+
registerCommand(container, ServiceTokens.CloneCommand, CloneCommand, [
|
|
26982
|
+
ServiceTokens.GitService,
|
|
26983
|
+
ServiceTokens.ContextService,
|
|
26984
|
+
ServiceTokens.OutputService
|
|
26985
|
+
]);
|
|
26986
|
+
registerCommand(container, ServiceTokens.CreateRepoCommand, CreateRepoCommand, [
|
|
26987
|
+
ServiceTokens.RepositoriesApi,
|
|
26988
|
+
ServiceTokens.ContextService,
|
|
26989
|
+
ServiceTokens.OutputService
|
|
26990
|
+
]);
|
|
26991
|
+
registerCommand(container, ServiceTokens.ListReposCommand, ListReposCommand, [
|
|
26992
|
+
ServiceTokens.RepositoriesApi,
|
|
26993
|
+
ServiceTokens.ContextService,
|
|
26994
|
+
ServiceTokens.OutputService
|
|
26995
|
+
]);
|
|
26996
|
+
registerCommand(container, ServiceTokens.ViewRepoCommand, ViewRepoCommand, [
|
|
26997
|
+
ServiceTokens.RepositoriesApi,
|
|
26998
|
+
ServiceTokens.ContextService,
|
|
26999
|
+
ServiceTokens.OutputService
|
|
27000
|
+
]);
|
|
27001
|
+
registerCommand(container, ServiceTokens.DeleteRepoCommand, DeleteRepoCommand, [
|
|
27002
|
+
ServiceTokens.RepositoriesApi,
|
|
27003
|
+
ServiceTokens.ContextService,
|
|
27004
|
+
ServiceTokens.OutputService
|
|
27005
|
+
]);
|
|
27006
|
+
registerCommand(container, ServiceTokens.ListDefaultReviewersCommand, ListDefaultReviewersCommand, [
|
|
27007
|
+
ServiceTokens.DefaultReviewerService,
|
|
27008
|
+
ServiceTokens.ContextService,
|
|
27009
|
+
ServiceTokens.OutputService
|
|
27010
|
+
]);
|
|
27011
|
+
registerCommand(container, ServiceTokens.AddDefaultReviewerCommand, AddDefaultReviewerCommand, [
|
|
27012
|
+
ServiceTokens.DefaultReviewerService,
|
|
27013
|
+
ServiceTokens.UsersApi,
|
|
27014
|
+
ServiceTokens.ContextService,
|
|
27015
|
+
ServiceTokens.OutputService
|
|
27016
|
+
]);
|
|
27017
|
+
registerCommand(container, ServiceTokens.RemoveDefaultReviewerCommand, RemoveDefaultReviewerCommand, [
|
|
27018
|
+
ServiceTokens.DefaultReviewerService,
|
|
27019
|
+
ServiceTokens.UsersApi,
|
|
27020
|
+
ServiceTokens.ContextService,
|
|
27021
|
+
ServiceTokens.OutputService
|
|
27022
|
+
]);
|
|
27023
|
+
registerCommand(container, ServiceTokens.CreatePRCommand, CreatePRCommand, [
|
|
27024
|
+
ServiceTokens.PullrequestsApi,
|
|
27025
|
+
ServiceTokens.UsersApi,
|
|
27026
|
+
ServiceTokens.ContextService,
|
|
27027
|
+
ServiceTokens.GitService,
|
|
27028
|
+
ServiceTokens.DefaultReviewerService,
|
|
27029
|
+
ServiceTokens.ConfigService,
|
|
27030
|
+
ServiceTokens.OutputService
|
|
27031
|
+
]);
|
|
27032
|
+
registerCommand(container, ServiceTokens.ListPRsCommand, ListPRsCommand, [
|
|
27033
|
+
ServiceTokens.PullrequestsApi,
|
|
27034
|
+
ServiceTokens.UsersApi,
|
|
27035
|
+
ServiceTokens.ContextService,
|
|
27036
|
+
ServiceTokens.OutputService
|
|
27037
|
+
]);
|
|
27038
|
+
registerCommand(container, ServiceTokens.ViewPRCommand, ViewPRCommand, [
|
|
27039
|
+
ServiceTokens.PullrequestsApi,
|
|
27040
|
+
ServiceTokens.ContextService,
|
|
27041
|
+
ServiceTokens.OutputService
|
|
27042
|
+
]);
|
|
27043
|
+
registerCommand(container, ServiceTokens.EditPRCommand, EditPRCommand, [
|
|
27044
|
+
ServiceTokens.PullrequestsApi,
|
|
27045
|
+
ServiceTokens.ContextService,
|
|
27046
|
+
ServiceTokens.GitService,
|
|
27047
|
+
ServiceTokens.OutputService
|
|
27048
|
+
]);
|
|
27049
|
+
registerCommand(container, ServiceTokens.MergePRCommand, MergePRCommand, [
|
|
27050
|
+
ServiceTokens.PullrequestsApi,
|
|
27051
|
+
ServiceTokens.ContextService,
|
|
27052
|
+
ServiceTokens.OutputService
|
|
27053
|
+
]);
|
|
27054
|
+
registerCommand(container, ServiceTokens.ApprovePRCommand, ApprovePRCommand, [
|
|
27055
|
+
ServiceTokens.PullrequestsApi,
|
|
27056
|
+
ServiceTokens.ContextService,
|
|
27057
|
+
ServiceTokens.OutputService
|
|
27058
|
+
]);
|
|
27059
|
+
registerCommand(container, ServiceTokens.DeclinePRCommand, DeclinePRCommand, [
|
|
27060
|
+
ServiceTokens.PullrequestsApi,
|
|
27061
|
+
ServiceTokens.ContextService,
|
|
27062
|
+
ServiceTokens.OutputService
|
|
27063
|
+
]);
|
|
27064
|
+
registerCommand(container, ServiceTokens.ReadyPRCommand, ReadyPRCommand, [
|
|
27065
|
+
ServiceTokens.PullrequestsApi,
|
|
27066
|
+
ServiceTokens.ContextService,
|
|
27067
|
+
ServiceTokens.OutputService
|
|
27068
|
+
]);
|
|
27069
|
+
registerCommand(container, ServiceTokens.CheckoutPRCommand, CheckoutPRCommand, [
|
|
27070
|
+
ServiceTokens.PullrequestsApi,
|
|
27071
|
+
ServiceTokens.ContextService,
|
|
27072
|
+
ServiceTokens.GitService,
|
|
27073
|
+
ServiceTokens.OutputService
|
|
27074
|
+
]);
|
|
27075
|
+
registerCommand(container, ServiceTokens.DiffPRCommand, DiffPRCommand, [
|
|
27076
|
+
ServiceTokens.PullrequestsApi,
|
|
27077
|
+
ServiceTokens.ContextService,
|
|
27078
|
+
ServiceTokens.GitService,
|
|
27079
|
+
ServiceTokens.OutputService
|
|
27080
|
+
]);
|
|
27081
|
+
registerCommand(container, ServiceTokens.ActivityPRCommand, ActivityPRCommand, [
|
|
27082
|
+
ServiceTokens.PullrequestsApi,
|
|
27083
|
+
ServiceTokens.ContextService,
|
|
27084
|
+
ServiceTokens.OutputService
|
|
27085
|
+
]);
|
|
27086
|
+
registerCommand(container, ServiceTokens.CommentPRCommand, CommentPRCommand, [
|
|
27087
|
+
ServiceTokens.PullrequestsApi,
|
|
27088
|
+
ServiceTokens.ContextService,
|
|
27089
|
+
ServiceTokens.OutputService
|
|
27090
|
+
]);
|
|
27091
|
+
registerCommand(container, ServiceTokens.ListCommentsPRCommand, ListCommentsPRCommand, [
|
|
27092
|
+
ServiceTokens.PullrequestsApi,
|
|
27093
|
+
ServiceTokens.ContextService,
|
|
27094
|
+
ServiceTokens.OutputService
|
|
27095
|
+
]);
|
|
27096
|
+
registerCommand(container, ServiceTokens.EditCommentPRCommand, EditCommentPRCommand, [
|
|
27097
|
+
ServiceTokens.PullrequestsApi,
|
|
27098
|
+
ServiceTokens.ContextService,
|
|
27099
|
+
ServiceTokens.OutputService
|
|
27100
|
+
]);
|
|
27101
|
+
registerCommand(container, ServiceTokens.DeleteCommentPRCommand, DeleteCommentPRCommand, [
|
|
27102
|
+
ServiceTokens.PullrequestsApi,
|
|
27103
|
+
ServiceTokens.ContextService,
|
|
27104
|
+
ServiceTokens.OutputService
|
|
27105
|
+
]);
|
|
27106
|
+
registerCommand(container, ServiceTokens.AddReviewerPRCommand, AddReviewerPRCommand, [
|
|
27107
|
+
ServiceTokens.PullrequestsApi,
|
|
27108
|
+
ServiceTokens.UsersApi,
|
|
27109
|
+
ServiceTokens.ContextService,
|
|
27110
|
+
ServiceTokens.OutputService
|
|
27111
|
+
]);
|
|
27112
|
+
registerCommand(container, ServiceTokens.RemoveReviewerPRCommand, RemoveReviewerPRCommand, [
|
|
27113
|
+
ServiceTokens.PullrequestsApi,
|
|
27114
|
+
ServiceTokens.UsersApi,
|
|
27115
|
+
ServiceTokens.ContextService,
|
|
27116
|
+
ServiceTokens.OutputService
|
|
27117
|
+
]);
|
|
27118
|
+
registerCommand(container, ServiceTokens.ListReviewersPRCommand, ListReviewersPRCommand, [
|
|
27119
|
+
ServiceTokens.PullrequestsApi,
|
|
27120
|
+
ServiceTokens.ContextService,
|
|
27121
|
+
ServiceTokens.OutputService
|
|
27122
|
+
]);
|
|
27123
|
+
registerCommand(container, ServiceTokens.ChecksPRCommand, ChecksPRCommand, [
|
|
27124
|
+
ServiceTokens.CommitStatusesApi,
|
|
27125
|
+
ServiceTokens.ContextService,
|
|
27126
|
+
ServiceTokens.OutputService
|
|
27127
|
+
]);
|
|
27128
|
+
registerCommand(container, ServiceTokens.ListSnippetsCommand, ListSnippetsCommand, [
|
|
27129
|
+
ServiceTokens.SnippetsApi,
|
|
27130
|
+
ServiceTokens.ContextService,
|
|
27131
|
+
ServiceTokens.OutputService
|
|
27132
|
+
]);
|
|
27133
|
+
registerCommand(container, ServiceTokens.ViewSnippetCommand, ViewSnippetCommand, [
|
|
27134
|
+
ServiceTokens.SnippetsApi,
|
|
27135
|
+
ServiceTokens.SnippetFilesService,
|
|
27136
|
+
ServiceTokens.ContextService,
|
|
27137
|
+
ServiceTokens.OutputService
|
|
27138
|
+
]);
|
|
27139
|
+
registerCommand(container, ServiceTokens.CreateSnippetCommand, CreateSnippetCommand, [
|
|
27140
|
+
ServiceTokens.SnippetFilesService,
|
|
27141
|
+
ServiceTokens.ContextService,
|
|
27142
|
+
ServiceTokens.OutputService
|
|
27143
|
+
]);
|
|
27144
|
+
registerCommand(container, ServiceTokens.EditSnippetCommand, EditSnippetCommand, [
|
|
27145
|
+
ServiceTokens.SnippetFilesService,
|
|
27146
|
+
ServiceTokens.ContextService,
|
|
27147
|
+
ServiceTokens.OutputService
|
|
27148
|
+
]);
|
|
27149
|
+
registerCommand(container, ServiceTokens.DeleteSnippetCommand, DeleteSnippetCommand, [
|
|
27150
|
+
ServiceTokens.SnippetsApi,
|
|
27151
|
+
ServiceTokens.ContextService,
|
|
27152
|
+
ServiceTokens.OutputService
|
|
27153
|
+
]);
|
|
27154
|
+
registerCommand(container, ServiceTokens.WatchSnippetCommand, WatchSnippetCommand, [
|
|
27155
|
+
ServiceTokens.SnippetsApi,
|
|
27156
|
+
ServiceTokens.ContextService,
|
|
27157
|
+
ServiceTokens.OutputService
|
|
27158
|
+
]);
|
|
27159
|
+
registerCommand(container, ServiceTokens.UnwatchSnippetCommand, UnwatchSnippetCommand, [
|
|
27160
|
+
ServiceTokens.SnippetsApi,
|
|
27161
|
+
ServiceTokens.ContextService,
|
|
27162
|
+
ServiceTokens.OutputService
|
|
27163
|
+
]);
|
|
27164
|
+
registerCommand(container, ServiceTokens.ListSnippetCommentsCommand, ListSnippetCommentsCommand, [
|
|
27165
|
+
ServiceTokens.SnippetsApi,
|
|
27166
|
+
ServiceTokens.ContextService,
|
|
27167
|
+
ServiceTokens.OutputService
|
|
27168
|
+
]);
|
|
27169
|
+
registerCommand(container, ServiceTokens.AddSnippetCommentCommand, AddSnippetCommentCommand, [
|
|
27170
|
+
ServiceTokens.SnippetsApi,
|
|
27171
|
+
ServiceTokens.ContextService,
|
|
27172
|
+
ServiceTokens.OutputService
|
|
27173
|
+
]);
|
|
27174
|
+
registerCommand(container, ServiceTokens.EditSnippetCommentCommand, EditSnippetCommentCommand, [
|
|
27175
|
+
ServiceTokens.SnippetsApi,
|
|
27176
|
+
ServiceTokens.ContextService,
|
|
27177
|
+
ServiceTokens.OutputService
|
|
27178
|
+
]);
|
|
27179
|
+
registerCommand(container, ServiceTokens.DeleteSnippetCommentCommand, DeleteSnippetCommentCommand, [
|
|
27180
|
+
ServiceTokens.SnippetsApi,
|
|
27181
|
+
ServiceTokens.ContextService,
|
|
27182
|
+
ServiceTokens.OutputService
|
|
27183
|
+
]);
|
|
27184
|
+
registerCommand(container, ServiceTokens.GetConfigCommand, GetConfigCommand, [
|
|
27185
|
+
ServiceTokens.ConfigService,
|
|
27186
|
+
ServiceTokens.OutputService
|
|
27187
|
+
]);
|
|
27188
|
+
registerCommand(container, ServiceTokens.SetConfigCommand, SetConfigCommand, [
|
|
27189
|
+
ServiceTokens.ConfigService,
|
|
27190
|
+
ServiceTokens.OutputService
|
|
27191
|
+
]);
|
|
27192
|
+
registerCommand(container, ServiceTokens.ListConfigCommand, ListConfigCommand, [ServiceTokens.ConfigService, ServiceTokens.OutputService]);
|
|
27193
|
+
registerCommand(container, ServiceTokens.InstallCompletionCommand, InstallCompletionCommand, [ServiceTokens.OutputService]);
|
|
27194
|
+
registerCommand(container, ServiceTokens.UninstallCompletionCommand, UninstallCompletionCommand, [ServiceTokens.OutputService]);
|
|
27045
27195
|
container.register(ServiceTokens.VersionService, () => {
|
|
27046
27196
|
const configService = container.resolve(ServiceTokens.ConfigService);
|
|
27047
27197
|
return new VersionService(configService, pkg.version);
|
|
@@ -27098,41 +27248,97 @@ function createHelpTextBuilder(noColor) {
|
|
|
27098
27248
|
import tabtab3 from "tabtab";
|
|
27099
27249
|
var require3 = createRequire2(import.meta.url);
|
|
27100
27250
|
var pkg2 = require3("../package.json");
|
|
27251
|
+
function getCompletionParent(line, word) {
|
|
27252
|
+
if (typeof line !== "string") {
|
|
27253
|
+
return;
|
|
27254
|
+
}
|
|
27255
|
+
const tokens = line.split(/\s+/).filter(Boolean);
|
|
27256
|
+
const idx = tokens.lastIndexOf(word);
|
|
27257
|
+
if (idx <= 0) {
|
|
27258
|
+
return;
|
|
27259
|
+
}
|
|
27260
|
+
for (let i = idx - 1;i >= 0; i--) {
|
|
27261
|
+
const token = tokens[i];
|
|
27262
|
+
if (token && !token.startsWith("-")) {
|
|
27263
|
+
return token;
|
|
27264
|
+
}
|
|
27265
|
+
}
|
|
27266
|
+
return;
|
|
27267
|
+
}
|
|
27268
|
+
var ROOT_COMPLETIONS = [
|
|
27269
|
+
"auth",
|
|
27270
|
+
"repo",
|
|
27271
|
+
"pr",
|
|
27272
|
+
"snippet",
|
|
27273
|
+
"config",
|
|
27274
|
+
"completion",
|
|
27275
|
+
"--help",
|
|
27276
|
+
"--version",
|
|
27277
|
+
"--json",
|
|
27278
|
+
"--no-color",
|
|
27279
|
+
"--workspace",
|
|
27280
|
+
"--repo"
|
|
27281
|
+
];
|
|
27282
|
+
var SUBCOMMAND_COMPLETIONS = new Map([
|
|
27283
|
+
["auth", ["login", "logout", "status", "token"]],
|
|
27284
|
+
["repo", ["clone", "create", "list", "view", "delete", "default-reviewers"]],
|
|
27285
|
+
["default-reviewers", ["list", "add", "remove"]],
|
|
27286
|
+
[
|
|
27287
|
+
"pr",
|
|
27288
|
+
[
|
|
27289
|
+
"create",
|
|
27290
|
+
"list",
|
|
27291
|
+
"view",
|
|
27292
|
+
"activity",
|
|
27293
|
+
"checks",
|
|
27294
|
+
"edit",
|
|
27295
|
+
"merge",
|
|
27296
|
+
"approve",
|
|
27297
|
+
"decline",
|
|
27298
|
+
"ready",
|
|
27299
|
+
"checkout",
|
|
27300
|
+
"diff",
|
|
27301
|
+
"comments",
|
|
27302
|
+
"reviewers"
|
|
27303
|
+
]
|
|
27304
|
+
],
|
|
27305
|
+
["reviewers", ["list", "add", "remove"]],
|
|
27306
|
+
[
|
|
27307
|
+
"snippet",
|
|
27308
|
+
[
|
|
27309
|
+
"list",
|
|
27310
|
+
"view",
|
|
27311
|
+
"create",
|
|
27312
|
+
"edit",
|
|
27313
|
+
"delete",
|
|
27314
|
+
"watch",
|
|
27315
|
+
"unwatch",
|
|
27316
|
+
"comments"
|
|
27317
|
+
]
|
|
27318
|
+
],
|
|
27319
|
+
["config", ["get", "set", "list"]],
|
|
27320
|
+
["completion", ["install", "uninstall"]]
|
|
27321
|
+
]);
|
|
27322
|
+
var COMMENTS_SUBCOMMANDS = [
|
|
27323
|
+
"list",
|
|
27324
|
+
"add",
|
|
27325
|
+
"edit",
|
|
27326
|
+
"delete"
|
|
27327
|
+
];
|
|
27101
27328
|
if (process.argv.includes("--get-yargs-completions") || process.env.COMP_LINE) {
|
|
27102
27329
|
const env2 = tabtab3.parseEnv(process.env);
|
|
27103
27330
|
if (env2.complete) {
|
|
27104
|
-
const completions = [
|
|
27105
|
-
|
|
27106
|
-
"
|
|
27107
|
-
"pr"
|
|
27108
|
-
|
|
27109
|
-
|
|
27110
|
-
|
|
27111
|
-
|
|
27112
|
-
|
|
27113
|
-
|
|
27114
|
-
|
|
27115
|
-
"--workspace",
|
|
27116
|
-
"--repo"
|
|
27117
|
-
];
|
|
27118
|
-
if (env2.prev === "auth") {
|
|
27119
|
-
completions.push("login", "logout", "status", "token");
|
|
27120
|
-
} else if (env2.prev === "repo") {
|
|
27121
|
-
completions.push("clone", "create", "list", "view", "delete", "default-reviewers");
|
|
27122
|
-
} else if (env2.prev === "default-reviewers") {
|
|
27123
|
-
completions.push("list", "add", "remove");
|
|
27124
|
-
} else if (env2.prev === "pr") {
|
|
27125
|
-
completions.push("create", "list", "view", "activity", "checks", "edit", "merge", "approve", "decline", "ready", "checkout", "diff", "comments", "reviewers");
|
|
27126
|
-
} else if (env2.prev === "reviewers") {
|
|
27127
|
-
completions.push("list", "add", "remove");
|
|
27128
|
-
} else if (env2.prev === "snippet") {
|
|
27129
|
-
completions.push("list", "view", "create", "edit", "delete", "watch", "unwatch", "comments");
|
|
27130
|
-
} else if (env2.prev === "comments" && typeof env2.line === "string" && env2.line.includes(" snippet ")) {
|
|
27131
|
-
completions.push("list", "add", "edit", "delete");
|
|
27132
|
-
} else if (env2.prev === "config") {
|
|
27133
|
-
completions.push("get", "set", "list");
|
|
27134
|
-
} else if (env2.prev === "completion") {
|
|
27135
|
-
completions.push("install", "uninstall");
|
|
27331
|
+
const completions = [...ROOT_COMPLETIONS];
|
|
27332
|
+
if (env2.prev === "comments") {
|
|
27333
|
+
const parent = getCompletionParent(env2.line, "comments");
|
|
27334
|
+
if (parent === "snippet" || parent === "pr") {
|
|
27335
|
+
completions.push(...COMMENTS_SUBCOMMANDS);
|
|
27336
|
+
}
|
|
27337
|
+
} else {
|
|
27338
|
+
const subcommands = SUBCOMMAND_COMPLETIONS.get(env2.prev);
|
|
27339
|
+
if (subcommands) {
|
|
27340
|
+
completions.push(...subcommands);
|
|
27341
|
+
}
|
|
27136
27342
|
}
|
|
27137
27343
|
tabtab3.log(completions);
|
|
27138
27344
|
process.exit(0);
|
|
@@ -27343,7 +27549,7 @@ prCmd.command("create").description("Create a pull request").option("-t, --title
|
|
|
27343
27549
|
const context = createContext(cli);
|
|
27344
27550
|
await runCommand(ServiceTokens.CreatePRCommand, withGlobalOptions(options, context), cli, context);
|
|
27345
27551
|
});
|
|
27346
|
-
prCmd.command("list").description("List pull requests").option("-s, --state <state>",
|
|
27552
|
+
prCmd.command("list").description("List pull requests").option("-s, --state <state>", `Filter by state (${PR_STATES.join(", ")})`, "OPEN").option("--limit <number>", "Maximum number of PRs to list", "25").option("--mine", "Show only PRs where you are a reviewer").addHelpText("after", buildHelpText({
|
|
27347
27553
|
examples: [
|
|
27348
27554
|
"bb pr list",
|
|
27349
27555
|
"bb pr list -s MERGED --limit 10",
|
|
@@ -27351,7 +27557,7 @@ prCmd.command("list").description("List pull requests").option("-s, --state <sta
|
|
|
27351
27557
|
"bb pr list --json"
|
|
27352
27558
|
],
|
|
27353
27559
|
validValues: {
|
|
27354
|
-
"Valid states": [
|
|
27560
|
+
"Valid states": [...PR_STATES]
|
|
27355
27561
|
},
|
|
27356
27562
|
defaults: { state: "OPEN", limit: "25" }
|
|
27357
27563
|
})).action(async (options) => {
|