@digipair/skill-git 0.136.0 → 0.136.3
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.esm.js +1617 -248
- package/package.json +1 -1
- package/dist/src/index.d.ts +0 -2
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/lib/skill-git.d.ts +0 -6
- package/dist/src/lib/skill-git.d.ts.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
2
1
|
import require$$0$1 from 'fs';
|
|
3
2
|
import require$$0 from 'tty';
|
|
4
3
|
import require$$1 from 'util';
|
|
5
4
|
import { spawn } from 'child_process';
|
|
5
|
+
import { normalize } from 'node:path';
|
|
6
6
|
import { EventEmitter } from 'node:events';
|
|
7
7
|
|
|
8
8
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -1119,6 +1119,29 @@ var debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
|
1119
1119
|
__export(src$1);
|
|
1120
1120
|
} (dist$1));
|
|
1121
1121
|
|
|
1122
|
+
function _instanceof$1(left, right) {
|
|
1123
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
1124
|
+
return !!right[Symbol.hasInstance](left);
|
|
1125
|
+
} else {
|
|
1126
|
+
return left instanceof right;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
var t = /* @__PURE__ */ new WeakMap();
|
|
1130
|
+
function c$1() {
|
|
1131
|
+
for(var _len = arguments.length, n = new Array(_len), _key = 0; _key < _len; _key++){
|
|
1132
|
+
n[_key] = arguments[_key];
|
|
1133
|
+
}
|
|
1134
|
+
var e = new String(n);
|
|
1135
|
+
return t.set(e, n), e;
|
|
1136
|
+
}
|
|
1137
|
+
function r(n) {
|
|
1138
|
+
return _instanceof$1(n, String) && t.has(n);
|
|
1139
|
+
}
|
|
1140
|
+
function o(n) {
|
|
1141
|
+
var _t_get;
|
|
1142
|
+
return (_t_get = t.get(n)) !== null && _t_get !== void 0 ? _t_get : [];
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1122
1145
|
var dist = {};
|
|
1123
1146
|
|
|
1124
1147
|
Object.defineProperty(dist, "__esModule", {
|
|
@@ -1140,43 +1163,1405 @@ var createDeferred = dist.createDeferred = deferred_1 = dist.deferred = void 0;
|
|
|
1140
1163
|
fail = _fail;
|
|
1141
1164
|
});
|
|
1142
1165
|
return {
|
|
1143
|
-
promise: promise,
|
|
1144
|
-
done: function done1(result) {
|
|
1145
|
-
if (status === 'pending') {
|
|
1146
|
-
status = 'resolved';
|
|
1147
|
-
done(result);
|
|
1166
|
+
promise: promise,
|
|
1167
|
+
done: function done1(result) {
|
|
1168
|
+
if (status === 'pending') {
|
|
1169
|
+
status = 'resolved';
|
|
1170
|
+
done(result);
|
|
1171
|
+
}
|
|
1172
|
+
},
|
|
1173
|
+
fail: function fail1(error) {
|
|
1174
|
+
if (status === 'pending') {
|
|
1175
|
+
status = 'rejected';
|
|
1176
|
+
fail(error);
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
get fulfilled () {
|
|
1180
|
+
return status !== 'pending';
|
|
1181
|
+
},
|
|
1182
|
+
get status () {
|
|
1183
|
+
return status;
|
|
1184
|
+
}
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
var deferred_1 = dist.deferred = deferred;
|
|
1188
|
+
/**
|
|
1189
|
+
* Alias of the exported `deferred` function, to help consumers wanting to use `deferred` as the
|
|
1190
|
+
* local variable name rather than the factory import name, without needing to rename on import.
|
|
1191
|
+
*
|
|
1192
|
+
* ```typescript
|
|
1193
|
+
import {createDeferred} from '@kwsites/promise-deferred`;
|
|
1194
|
+
```
|
|
1195
|
+
*/ createDeferred = dist.createDeferred = deferred;
|
|
1196
|
+
/**
|
|
1197
|
+
* Default export allows use as:
|
|
1198
|
+
*
|
|
1199
|
+
* ```typescript
|
|
1200
|
+
import deferred from '@kwsites/promise-deferred`;
|
|
1201
|
+
```
|
|
1202
|
+
*/ dist.default = deferred;
|
|
1203
|
+
|
|
1204
|
+
function _array_like_to_array$1(arr, len) {
|
|
1205
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1206
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1207
|
+
return arr2;
|
|
1208
|
+
}
|
|
1209
|
+
function _array_with_holes$1(arr) {
|
|
1210
|
+
if (Array.isArray(arr)) return arr;
|
|
1211
|
+
}
|
|
1212
|
+
function _array_without_holes$1(arr) {
|
|
1213
|
+
if (Array.isArray(arr)) return _array_like_to_array$1(arr);
|
|
1214
|
+
}
|
|
1215
|
+
function _define_property$1(obj, key, value) {
|
|
1216
|
+
if (key in obj) {
|
|
1217
|
+
Object.defineProperty(obj, key, {
|
|
1218
|
+
value: value,
|
|
1219
|
+
enumerable: true,
|
|
1220
|
+
configurable: true,
|
|
1221
|
+
writable: true
|
|
1222
|
+
});
|
|
1223
|
+
} else {
|
|
1224
|
+
obj[key] = value;
|
|
1225
|
+
}
|
|
1226
|
+
return obj;
|
|
1227
|
+
}
|
|
1228
|
+
function _iterable_to_array$1(iter) {
|
|
1229
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1230
|
+
}
|
|
1231
|
+
function _iterable_to_array_limit$1(arr, i) {
|
|
1232
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1233
|
+
if (_i == null) return;
|
|
1234
|
+
var _arr = [];
|
|
1235
|
+
var _n = true;
|
|
1236
|
+
var _d = false;
|
|
1237
|
+
var _s, _e;
|
|
1238
|
+
try {
|
|
1239
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
1240
|
+
_arr.push(_s.value);
|
|
1241
|
+
if (i && _arr.length === i) break;
|
|
1242
|
+
}
|
|
1243
|
+
} catch (err) {
|
|
1244
|
+
_d = true;
|
|
1245
|
+
_e = err;
|
|
1246
|
+
} finally{
|
|
1247
|
+
try {
|
|
1248
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
1249
|
+
} finally{
|
|
1250
|
+
if (_d) throw _e;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
return _arr;
|
|
1254
|
+
}
|
|
1255
|
+
function _non_iterable_rest$1() {
|
|
1256
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1257
|
+
}
|
|
1258
|
+
function _non_iterable_spread$1() {
|
|
1259
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1260
|
+
}
|
|
1261
|
+
function _object_spread$1(target) {
|
|
1262
|
+
for(var i = 1; i < arguments.length; i++){
|
|
1263
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
1264
|
+
var ownKeys = Object.keys(source);
|
|
1265
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1266
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1267
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1268
|
+
}));
|
|
1269
|
+
}
|
|
1270
|
+
ownKeys.forEach(function(key) {
|
|
1271
|
+
_define_property$1(target, key, source[key]);
|
|
1272
|
+
});
|
|
1273
|
+
}
|
|
1274
|
+
return target;
|
|
1275
|
+
}
|
|
1276
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
1277
|
+
var keys = Object.keys(object);
|
|
1278
|
+
if (Object.getOwnPropertySymbols) {
|
|
1279
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
1280
|
+
keys.push.apply(keys, symbols);
|
|
1281
|
+
}
|
|
1282
|
+
return keys;
|
|
1283
|
+
}
|
|
1284
|
+
function _object_spread_props$1(target, source) {
|
|
1285
|
+
source = source != null ? source : {};
|
|
1286
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
1287
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1288
|
+
} else {
|
|
1289
|
+
ownKeys$1(Object(source)).forEach(function(key) {
|
|
1290
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
return target;
|
|
1294
|
+
}
|
|
1295
|
+
function _sliced_to_array$1(arr, i) {
|
|
1296
|
+
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
|
|
1297
|
+
}
|
|
1298
|
+
function _to_consumable_array$1(arr) {
|
|
1299
|
+
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
|
|
1300
|
+
}
|
|
1301
|
+
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
1302
|
+
if (!o) return;
|
|
1303
|
+
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
1304
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1305
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1306
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1307
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
1308
|
+
}
|
|
1309
|
+
function _ts_generator$1(thisArg, body) {
|
|
1310
|
+
var f, y, t, g, _ = {
|
|
1311
|
+
label: 0,
|
|
1312
|
+
sent: function() {
|
|
1313
|
+
if (t[0] & 1) throw t[1];
|
|
1314
|
+
return t[1];
|
|
1315
|
+
},
|
|
1316
|
+
trys: [],
|
|
1317
|
+
ops: []
|
|
1318
|
+
};
|
|
1319
|
+
return g = {
|
|
1320
|
+
next: verb(0),
|
|
1321
|
+
"throw": verb(1),
|
|
1322
|
+
"return": verb(2)
|
|
1323
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
1324
|
+
return this;
|
|
1325
|
+
}), g;
|
|
1326
|
+
function verb(n) {
|
|
1327
|
+
return function(v) {
|
|
1328
|
+
return step([
|
|
1329
|
+
n,
|
|
1330
|
+
v
|
|
1331
|
+
]);
|
|
1332
|
+
};
|
|
1333
|
+
}
|
|
1334
|
+
function step(op) {
|
|
1335
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
1336
|
+
while(_)try {
|
|
1337
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
1338
|
+
if (y = 0, t) op = [
|
|
1339
|
+
op[0] & 2,
|
|
1340
|
+
t.value
|
|
1341
|
+
];
|
|
1342
|
+
switch(op[0]){
|
|
1343
|
+
case 0:
|
|
1344
|
+
case 1:
|
|
1345
|
+
t = op;
|
|
1346
|
+
break;
|
|
1347
|
+
case 4:
|
|
1348
|
+
_.label++;
|
|
1349
|
+
return {
|
|
1350
|
+
value: op[1],
|
|
1351
|
+
done: false
|
|
1352
|
+
};
|
|
1353
|
+
case 5:
|
|
1354
|
+
_.label++;
|
|
1355
|
+
y = op[1];
|
|
1356
|
+
op = [
|
|
1357
|
+
0
|
|
1358
|
+
];
|
|
1359
|
+
continue;
|
|
1360
|
+
case 7:
|
|
1361
|
+
op = _.ops.pop();
|
|
1362
|
+
_.trys.pop();
|
|
1363
|
+
continue;
|
|
1364
|
+
default:
|
|
1365
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
1366
|
+
_ = 0;
|
|
1367
|
+
continue;
|
|
1368
|
+
}
|
|
1369
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
1370
|
+
_.label = op[1];
|
|
1371
|
+
break;
|
|
1372
|
+
}
|
|
1373
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
1374
|
+
_.label = t[1];
|
|
1375
|
+
t = op;
|
|
1376
|
+
break;
|
|
1377
|
+
}
|
|
1378
|
+
if (t && _.label < t[2]) {
|
|
1379
|
+
_.label = t[2];
|
|
1380
|
+
_.ops.push(op);
|
|
1381
|
+
break;
|
|
1382
|
+
}
|
|
1383
|
+
if (t[2]) _.ops.pop();
|
|
1384
|
+
_.trys.pop();
|
|
1385
|
+
continue;
|
|
1386
|
+
}
|
|
1387
|
+
op = body.call(thisArg, _);
|
|
1388
|
+
} catch (e) {
|
|
1389
|
+
op = [
|
|
1390
|
+
6,
|
|
1391
|
+
e
|
|
1392
|
+
];
|
|
1393
|
+
y = 0;
|
|
1394
|
+
} finally{
|
|
1395
|
+
f = t = 0;
|
|
1396
|
+
}
|
|
1397
|
+
if (op[0] & 5) throw op[1];
|
|
1398
|
+
return {
|
|
1399
|
+
value: op[0] ? op[1] : void 0,
|
|
1400
|
+
done: true
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
function U(e, t) {
|
|
1405
|
+
var n, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, o, _tmp, err;
|
|
1406
|
+
return _ts_generator$1(this, function(_state) {
|
|
1407
|
+
switch(_state.label){
|
|
1408
|
+
case 0:
|
|
1409
|
+
n = t === "global";
|
|
1410
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1411
|
+
_state.label = 1;
|
|
1412
|
+
case 1:
|
|
1413
|
+
_state.trys.push([
|
|
1414
|
+
1,
|
|
1415
|
+
7,
|
|
1416
|
+
8,
|
|
1417
|
+
9
|
|
1418
|
+
]);
|
|
1419
|
+
_iterator = e[Symbol.iterator]();
|
|
1420
|
+
_state.label = 2;
|
|
1421
|
+
case 2:
|
|
1422
|
+
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
1423
|
+
3,
|
|
1424
|
+
6
|
|
1425
|
+
];
|
|
1426
|
+
o = _step.value;
|
|
1427
|
+
_tmp = o.isGlobal === n;
|
|
1428
|
+
if (!_tmp) return [
|
|
1429
|
+
3,
|
|
1430
|
+
4
|
|
1431
|
+
];
|
|
1432
|
+
return [
|
|
1433
|
+
4,
|
|
1434
|
+
o
|
|
1435
|
+
];
|
|
1436
|
+
case 3:
|
|
1437
|
+
_tmp = _state.sent();
|
|
1438
|
+
_state.label = 4;
|
|
1439
|
+
case 4:
|
|
1440
|
+
_state.label = 5;
|
|
1441
|
+
case 5:
|
|
1442
|
+
_iteratorNormalCompletion = true;
|
|
1443
|
+
return [
|
|
1444
|
+
3,
|
|
1445
|
+
2
|
|
1446
|
+
];
|
|
1447
|
+
case 6:
|
|
1448
|
+
return [
|
|
1449
|
+
3,
|
|
1450
|
+
9
|
|
1451
|
+
];
|
|
1452
|
+
case 7:
|
|
1453
|
+
err = _state.sent();
|
|
1454
|
+
_didIteratorError = true;
|
|
1455
|
+
_iteratorError = err;
|
|
1456
|
+
return [
|
|
1457
|
+
3,
|
|
1458
|
+
9
|
|
1459
|
+
];
|
|
1460
|
+
case 8:
|
|
1461
|
+
try {
|
|
1462
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1463
|
+
_iterator.return();
|
|
1464
|
+
}
|
|
1465
|
+
} finally{
|
|
1466
|
+
if (_didIteratorError) {
|
|
1467
|
+
throw _iteratorError;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
return [
|
|
1471
|
+
7
|
|
1472
|
+
];
|
|
1473
|
+
case 9:
|
|
1474
|
+
return [
|
|
1475
|
+
2
|
|
1476
|
+
];
|
|
1477
|
+
}
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1480
|
+
var k = /* @__PURE__ */ new Set([
|
|
1481
|
+
"--add",
|
|
1482
|
+
"--edit",
|
|
1483
|
+
"--remove-section",
|
|
1484
|
+
"--rename-section",
|
|
1485
|
+
"--replace-all",
|
|
1486
|
+
"--unset",
|
|
1487
|
+
"--unset-all",
|
|
1488
|
+
"-e"
|
|
1489
|
+
]), S = /* @__PURE__ */ new Set([
|
|
1490
|
+
"--get",
|
|
1491
|
+
"--get-all",
|
|
1492
|
+
"--get-color",
|
|
1493
|
+
"--get-colorbool",
|
|
1494
|
+
"--get-regexp",
|
|
1495
|
+
"--get-urlmatch",
|
|
1496
|
+
"--list",
|
|
1497
|
+
"-l"
|
|
1498
|
+
]), P = /* @__PURE__ */ new Set([
|
|
1499
|
+
"edit",
|
|
1500
|
+
"remove-section",
|
|
1501
|
+
"rename-section",
|
|
1502
|
+
"set",
|
|
1503
|
+
"unset"
|
|
1504
|
+
]), E = /* @__PURE__ */ new Set([
|
|
1505
|
+
"get",
|
|
1506
|
+
"get-color",
|
|
1507
|
+
"get-colorbool",
|
|
1508
|
+
"list"
|
|
1509
|
+
]);
|
|
1510
|
+
function F(e, t) {
|
|
1511
|
+
var _t_at;
|
|
1512
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1513
|
+
try {
|
|
1514
|
+
for(var _iterator = U(e, "task")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1515
|
+
var _step_value = _step.value, o = _step_value.name;
|
|
1516
|
+
if (k.has(o)) return p(!0, t);
|
|
1517
|
+
if (S.has(o)) return p(!1, t);
|
|
1518
|
+
}
|
|
1519
|
+
} catch (err) {
|
|
1520
|
+
_didIteratorError = true;
|
|
1521
|
+
_iteratorError = err;
|
|
1522
|
+
} finally{
|
|
1523
|
+
try {
|
|
1524
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1525
|
+
_iterator.return();
|
|
1526
|
+
}
|
|
1527
|
+
} finally{
|
|
1528
|
+
if (_didIteratorError) {
|
|
1529
|
+
throw _iteratorError;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
var n = (_t_at = t.at(0)) === null || _t_at === void 0 ? void 0 : _t_at.toLowerCase();
|
|
1534
|
+
return n === void 0 ? null : P.has(n) ? p(true, t.slice(1)) : E.has(n) ? p(false, t.slice(1)) : t.length === 1 ? p(false, t) : p(true, t);
|
|
1535
|
+
}
|
|
1536
|
+
function p() {
|
|
1537
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1538
|
+
var _t_at;
|
|
1539
|
+
var n = (_t_at = t.at(0)) === null || _t_at === void 0 ? void 0 : _t_at.toLowerCase();
|
|
1540
|
+
return n === void 0 ? null : {
|
|
1541
|
+
isWrite: e,
|
|
1542
|
+
isRead: !e,
|
|
1543
|
+
key: n,
|
|
1544
|
+
value: t.at(1)
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1547
|
+
function A(e, t) {
|
|
1548
|
+
return t.isWrite && t.value !== void 0 ? {
|
|
1549
|
+
key: t.key,
|
|
1550
|
+
value: t.value,
|
|
1551
|
+
scope: e
|
|
1552
|
+
} : {
|
|
1553
|
+
key: t.key,
|
|
1554
|
+
scope: e
|
|
1555
|
+
};
|
|
1556
|
+
}
|
|
1557
|
+
function M(e) {
|
|
1558
|
+
var t = (e === null || e === void 0 ? void 0 : e.indexOf("=")) || -1;
|
|
1559
|
+
return !e || t < 0 ? null : {
|
|
1560
|
+
key: e.slice(0, t).trim().toLowerCase(),
|
|
1561
|
+
value: e.slice(t + 1)
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
function N(e) {
|
|
1565
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1566
|
+
try {
|
|
1567
|
+
for(var _iterator = U(e, "task")[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1568
|
+
var _step_value = _step.value, t = _step_value.name;
|
|
1569
|
+
switch(t){
|
|
1570
|
+
case "--global":
|
|
1571
|
+
return "global";
|
|
1572
|
+
case "--system":
|
|
1573
|
+
return "system";
|
|
1574
|
+
case "--worktree":
|
|
1575
|
+
return "worktree";
|
|
1576
|
+
case "--local":
|
|
1577
|
+
return "local";
|
|
1578
|
+
case "--file":
|
|
1579
|
+
case "-f":
|
|
1580
|
+
return "file";
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
} catch (err) {
|
|
1584
|
+
_didIteratorError = true;
|
|
1585
|
+
_iteratorError = err;
|
|
1586
|
+
} finally{
|
|
1587
|
+
try {
|
|
1588
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1589
|
+
_iterator.return();
|
|
1590
|
+
}
|
|
1591
|
+
} finally{
|
|
1592
|
+
if (_didIteratorError) {
|
|
1593
|
+
throw _iteratorError;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
return "local";
|
|
1598
|
+
}
|
|
1599
|
+
function G(param) {
|
|
1600
|
+
var e = param.name;
|
|
1601
|
+
if (e === "-c" || e === "--config") return "inline";
|
|
1602
|
+
if (e === "--config-env") return "env";
|
|
1603
|
+
}
|
|
1604
|
+
function O(e) {
|
|
1605
|
+
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, t, n, o, _tmp, err;
|
|
1606
|
+
return _ts_generator$1(this, function(_state) {
|
|
1607
|
+
switch(_state.label){
|
|
1608
|
+
case 0:
|
|
1609
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1610
|
+
_state.label = 1;
|
|
1611
|
+
case 1:
|
|
1612
|
+
_state.trys.push([
|
|
1613
|
+
1,
|
|
1614
|
+
7,
|
|
1615
|
+
8,
|
|
1616
|
+
9
|
|
1617
|
+
]);
|
|
1618
|
+
_iterator = e[Symbol.iterator]();
|
|
1619
|
+
_state.label = 2;
|
|
1620
|
+
case 2:
|
|
1621
|
+
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
1622
|
+
3,
|
|
1623
|
+
6
|
|
1624
|
+
];
|
|
1625
|
+
t = _step.value;
|
|
1626
|
+
n = G(t), o = n && M(t.value);
|
|
1627
|
+
_tmp = o;
|
|
1628
|
+
if (!_tmp) return [
|
|
1629
|
+
3,
|
|
1630
|
+
4
|
|
1631
|
+
];
|
|
1632
|
+
return [
|
|
1633
|
+
4,
|
|
1634
|
+
_object_spread_props$1(_object_spread$1({}, o), {
|
|
1635
|
+
scope: n
|
|
1636
|
+
})
|
|
1637
|
+
];
|
|
1638
|
+
case 3:
|
|
1639
|
+
_tmp = _state.sent();
|
|
1640
|
+
_state.label = 4;
|
|
1641
|
+
case 4:
|
|
1642
|
+
_state.label = 5;
|
|
1643
|
+
case 5:
|
|
1644
|
+
_iteratorNormalCompletion = true;
|
|
1645
|
+
return [
|
|
1646
|
+
3,
|
|
1647
|
+
2
|
|
1648
|
+
];
|
|
1649
|
+
case 6:
|
|
1650
|
+
return [
|
|
1651
|
+
3,
|
|
1652
|
+
9
|
|
1653
|
+
];
|
|
1654
|
+
case 7:
|
|
1655
|
+
err = _state.sent();
|
|
1656
|
+
_didIteratorError = true;
|
|
1657
|
+
_iteratorError = err;
|
|
1658
|
+
return [
|
|
1659
|
+
3,
|
|
1660
|
+
9
|
|
1661
|
+
];
|
|
1662
|
+
case 8:
|
|
1663
|
+
try {
|
|
1664
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1665
|
+
_iterator.return();
|
|
1666
|
+
}
|
|
1667
|
+
} finally{
|
|
1668
|
+
if (_didIteratorError) {
|
|
1669
|
+
throw _iteratorError;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
return [
|
|
1673
|
+
7
|
|
1674
|
+
];
|
|
1675
|
+
case 9:
|
|
1676
|
+
return [
|
|
1677
|
+
2
|
|
1678
|
+
];
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
function L(e, t, n) {
|
|
1683
|
+
var o = {
|
|
1684
|
+
read: [],
|
|
1685
|
+
write: _to_consumable_array$1(O(t))
|
|
1686
|
+
};
|
|
1687
|
+
return e === "config" && $(o, N(t), F(t, n)), o;
|
|
1688
|
+
}
|
|
1689
|
+
function $(e, t, n) {
|
|
1690
|
+
if (n === null) return;
|
|
1691
|
+
var o = A(t, n);
|
|
1692
|
+
n.isWrite ? e.write.push(o) : e.read.push(o);
|
|
1693
|
+
}
|
|
1694
|
+
var x = {
|
|
1695
|
+
short: /* @__PURE__ */ new Map([
|
|
1696
|
+
[
|
|
1697
|
+
"c",
|
|
1698
|
+
true
|
|
1699
|
+
]
|
|
1700
|
+
])
|
|
1701
|
+
}, D = {
|
|
1702
|
+
short: new Map([
|
|
1703
|
+
[
|
|
1704
|
+
"C",
|
|
1705
|
+
true
|
|
1706
|
+
],
|
|
1707
|
+
// -C <path> change working directory
|
|
1708
|
+
[
|
|
1709
|
+
"P",
|
|
1710
|
+
false
|
|
1711
|
+
],
|
|
1712
|
+
// -P no pager (alias for --no-pager)
|
|
1713
|
+
[
|
|
1714
|
+
"h",
|
|
1715
|
+
false
|
|
1716
|
+
],
|
|
1717
|
+
// -h help
|
|
1718
|
+
[
|
|
1719
|
+
"p",
|
|
1720
|
+
false
|
|
1721
|
+
],
|
|
1722
|
+
// -p paginate
|
|
1723
|
+
[
|
|
1724
|
+
"v",
|
|
1725
|
+
false
|
|
1726
|
+
]
|
|
1727
|
+
].concat(// -v version
|
|
1728
|
+
_to_consumable_array$1(x.short.entries()))),
|
|
1729
|
+
long: /* @__PURE__ */ new Set([
|
|
1730
|
+
"attr-source",
|
|
1731
|
+
"config-env",
|
|
1732
|
+
"exec-path",
|
|
1733
|
+
"git-dir",
|
|
1734
|
+
"list-cmds",
|
|
1735
|
+
"namespace",
|
|
1736
|
+
"super-prefix",
|
|
1737
|
+
"work-tree"
|
|
1738
|
+
])
|
|
1739
|
+
}, R = {
|
|
1740
|
+
clone: {
|
|
1741
|
+
short: /* @__PURE__ */ new Map([
|
|
1742
|
+
[
|
|
1743
|
+
"b",
|
|
1744
|
+
true
|
|
1745
|
+
],
|
|
1746
|
+
// -b <branch>
|
|
1747
|
+
[
|
|
1748
|
+
"j",
|
|
1749
|
+
true
|
|
1750
|
+
],
|
|
1751
|
+
// -j <n> parallel jobs
|
|
1752
|
+
[
|
|
1753
|
+
"l",
|
|
1754
|
+
false
|
|
1755
|
+
],
|
|
1756
|
+
// -l local
|
|
1757
|
+
[
|
|
1758
|
+
"n",
|
|
1759
|
+
false
|
|
1760
|
+
],
|
|
1761
|
+
// -n no-checkout
|
|
1762
|
+
[
|
|
1763
|
+
"o",
|
|
1764
|
+
true
|
|
1765
|
+
],
|
|
1766
|
+
// -o <name> remote name
|
|
1767
|
+
[
|
|
1768
|
+
"q",
|
|
1769
|
+
false
|
|
1770
|
+
],
|
|
1771
|
+
// -q quiet
|
|
1772
|
+
[
|
|
1773
|
+
"s",
|
|
1774
|
+
false
|
|
1775
|
+
],
|
|
1776
|
+
// -s shared
|
|
1777
|
+
[
|
|
1778
|
+
"u",
|
|
1779
|
+
true
|
|
1780
|
+
]
|
|
1781
|
+
]),
|
|
1782
|
+
long: /* @__PURE__ */ new Set([
|
|
1783
|
+
"branch",
|
|
1784
|
+
"config",
|
|
1785
|
+
"jobs",
|
|
1786
|
+
"origin",
|
|
1787
|
+
"upload-pack",
|
|
1788
|
+
"u",
|
|
1789
|
+
"template"
|
|
1790
|
+
])
|
|
1791
|
+
},
|
|
1792
|
+
commit: {
|
|
1793
|
+
short: /* @__PURE__ */ new Map([
|
|
1794
|
+
[
|
|
1795
|
+
"C",
|
|
1796
|
+
true
|
|
1797
|
+
],
|
|
1798
|
+
// -C <commit> reuse message
|
|
1799
|
+
[
|
|
1800
|
+
"F",
|
|
1801
|
+
true
|
|
1802
|
+
],
|
|
1803
|
+
// -F <file> read message from file
|
|
1804
|
+
[
|
|
1805
|
+
"c",
|
|
1806
|
+
true
|
|
1807
|
+
],
|
|
1808
|
+
// -c <commit> reedit message
|
|
1809
|
+
[
|
|
1810
|
+
"m",
|
|
1811
|
+
true
|
|
1812
|
+
],
|
|
1813
|
+
// -m <msg>
|
|
1814
|
+
[
|
|
1815
|
+
"t",
|
|
1816
|
+
true
|
|
1817
|
+
]
|
|
1818
|
+
]),
|
|
1819
|
+
long: /* @__PURE__ */ new Set([
|
|
1820
|
+
"file",
|
|
1821
|
+
"message",
|
|
1822
|
+
"reedit-message",
|
|
1823
|
+
"reuse-message",
|
|
1824
|
+
"template"
|
|
1825
|
+
])
|
|
1826
|
+
},
|
|
1827
|
+
config: {
|
|
1828
|
+
short: /* @__PURE__ */ new Map([
|
|
1829
|
+
[
|
|
1830
|
+
"e",
|
|
1831
|
+
false
|
|
1832
|
+
],
|
|
1833
|
+
// -e open editor
|
|
1834
|
+
[
|
|
1835
|
+
"f",
|
|
1836
|
+
true
|
|
1837
|
+
],
|
|
1838
|
+
// -f <file>
|
|
1839
|
+
[
|
|
1840
|
+
"l",
|
|
1841
|
+
false
|
|
1842
|
+
]
|
|
1843
|
+
]),
|
|
1844
|
+
long: /* @__PURE__ */ new Set([
|
|
1845
|
+
"blob",
|
|
1846
|
+
"comment",
|
|
1847
|
+
"default",
|
|
1848
|
+
"file",
|
|
1849
|
+
"type",
|
|
1850
|
+
"value"
|
|
1851
|
+
])
|
|
1852
|
+
},
|
|
1853
|
+
fetch: {
|
|
1854
|
+
short: /* @__PURE__ */ new Map(),
|
|
1855
|
+
long: /* @__PURE__ */ new Set([
|
|
1856
|
+
"upload-pack"
|
|
1857
|
+
])
|
|
1858
|
+
},
|
|
1859
|
+
init: {
|
|
1860
|
+
short: /* @__PURE__ */ new Map(),
|
|
1861
|
+
long: /* @__PURE__ */ new Set([
|
|
1862
|
+
"template"
|
|
1863
|
+
])
|
|
1864
|
+
},
|
|
1865
|
+
pull: {
|
|
1866
|
+
short: /* @__PURE__ */ new Map(),
|
|
1867
|
+
long: /* @__PURE__ */ new Set([
|
|
1868
|
+
"upload-pack"
|
|
1869
|
+
])
|
|
1870
|
+
},
|
|
1871
|
+
push: {
|
|
1872
|
+
short: /* @__PURE__ */ new Map(),
|
|
1873
|
+
long: /* @__PURE__ */ new Set([
|
|
1874
|
+
"exec",
|
|
1875
|
+
"receive-pack"
|
|
1876
|
+
])
|
|
1877
|
+
}
|
|
1878
|
+
}, T = {
|
|
1879
|
+
short: /* @__PURE__ */ new Map(),
|
|
1880
|
+
long: /* @__PURE__ */ new Set()
|
|
1881
|
+
};
|
|
1882
|
+
function I(e) {
|
|
1883
|
+
var _R_;
|
|
1884
|
+
var t = (_R_ = R[e !== null && e !== void 0 ? e : ""]) !== null && _R_ !== void 0 ? _R_ : T;
|
|
1885
|
+
return {
|
|
1886
|
+
short: new Map(_to_consumable_array$1(x.short.entries()).concat(_to_consumable_array$1(t.short.entries()))),
|
|
1887
|
+
long: t.long
|
|
1888
|
+
};
|
|
1889
|
+
}
|
|
1890
|
+
function b(e) {
|
|
1891
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : D;
|
|
1892
|
+
if (e.startsWith("--")) {
|
|
1893
|
+
var n = e.indexOf("=");
|
|
1894
|
+
if (n > 2) return [
|
|
1895
|
+
{
|
|
1896
|
+
name: e.slice(0, n),
|
|
1897
|
+
value: e.slice(n + 1),
|
|
1898
|
+
needsNext: false
|
|
1899
|
+
}
|
|
1900
|
+
];
|
|
1901
|
+
var o = e.slice(2);
|
|
1902
|
+
return [
|
|
1903
|
+
{
|
|
1904
|
+
name: e,
|
|
1905
|
+
needsNext: t.long.has(o)
|
|
1906
|
+
}
|
|
1907
|
+
];
|
|
1908
|
+
}
|
|
1909
|
+
if (e.length === 2) {
|
|
1910
|
+
var n1 = e.charAt(1), o1 = t.short.get(n1);
|
|
1911
|
+
return [
|
|
1912
|
+
{
|
|
1913
|
+
name: e,
|
|
1914
|
+
needsNext: o1 === true
|
|
1915
|
+
}
|
|
1916
|
+
];
|
|
1917
|
+
}
|
|
1918
|
+
return W(e, t.short);
|
|
1919
|
+
}
|
|
1920
|
+
function W(e, t) {
|
|
1921
|
+
var n = e.slice(1).split(""), o = [];
|
|
1922
|
+
for(var s = 0; s < n.length; s++){
|
|
1923
|
+
var r = n[s], l = t.get(r);
|
|
1924
|
+
if (l === void 0) return [
|
|
1925
|
+
{
|
|
1926
|
+
name: e,
|
|
1927
|
+
needsNext: false
|
|
1928
|
+
}
|
|
1929
|
+
];
|
|
1930
|
+
if (l) {
|
|
1931
|
+
var a = n.slice(s + 1).join("");
|
|
1932
|
+
if (a && !_to_consumable_array$1(a).every(function(w) {
|
|
1933
|
+
return t.has(w);
|
|
1934
|
+
})) return o.push({
|
|
1935
|
+
name: "-".concat(r),
|
|
1936
|
+
value: a,
|
|
1937
|
+
needsNext: false
|
|
1938
|
+
}), o;
|
|
1939
|
+
}
|
|
1940
|
+
o.push({
|
|
1941
|
+
name: "-".concat(r),
|
|
1942
|
+
needsNext: l
|
|
1943
|
+
});
|
|
1944
|
+
}
|
|
1945
|
+
return o;
|
|
1946
|
+
}
|
|
1947
|
+
function j(e) {
|
|
1948
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1949
|
+
var n = 0;
|
|
1950
|
+
for(; n < e.length;){
|
|
1951
|
+
var o = String(e[n]);
|
|
1952
|
+
if (!o.startsWith("-") || o.length < 2) break;
|
|
1953
|
+
var s = b(o);
|
|
1954
|
+
var r = n + 1;
|
|
1955
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1956
|
+
try {
|
|
1957
|
+
for(var _iterator = s[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1958
|
+
var l = _step.value;
|
|
1959
|
+
var a = {
|
|
1960
|
+
name: l.name,
|
|
1961
|
+
value: l.value,
|
|
1962
|
+
absorbedNext: !1,
|
|
1963
|
+
isGlobal: !0
|
|
1964
|
+
};
|
|
1965
|
+
l.needsNext && a.value === void 0 && r < e.length && (a.value = String(e[r]), a.absorbedNext = !0, r++), t.push(a);
|
|
1966
|
+
}
|
|
1967
|
+
} catch (err) {
|
|
1968
|
+
_didIteratorError = true;
|
|
1969
|
+
_iteratorError = err;
|
|
1970
|
+
} finally{
|
|
1971
|
+
try {
|
|
1972
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1973
|
+
_iterator.return();
|
|
1974
|
+
}
|
|
1975
|
+
} finally{
|
|
1976
|
+
if (_didIteratorError) {
|
|
1977
|
+
throw _iteratorError;
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
n = r;
|
|
1982
|
+
}
|
|
1983
|
+
return {
|
|
1984
|
+
flags: t,
|
|
1985
|
+
taskIndex: n
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
function B(e, t) {
|
|
1989
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
1990
|
+
var o$1 = I(t), s = [], r$1 = [];
|
|
1991
|
+
var l = 0;
|
|
1992
|
+
for(; l < e.length;){
|
|
1993
|
+
var a = e[l];
|
|
1994
|
+
if (r(a)) {
|
|
1995
|
+
var _r;
|
|
1996
|
+
(_r = r$1).push.apply(_r, _to_consumable_array$1(o(a))), l++;
|
|
1997
|
+
continue;
|
|
1998
|
+
}
|
|
1999
|
+
var f = String(a);
|
|
2000
|
+
if (f === "--") {
|
|
2001
|
+
for(var g = l + 1; g < e.length; g++){
|
|
2002
|
+
var _r1;
|
|
2003
|
+
var u = e[g];
|
|
2004
|
+
r(u) ? (_r1 = r$1).push.apply(_r1, _to_consumable_array$1(o(u))) : r$1.push(String(u));
|
|
2005
|
+
}
|
|
2006
|
+
break;
|
|
2007
|
+
}
|
|
2008
|
+
if (!f.startsWith("-") || f.length < 2) {
|
|
2009
|
+
s.push(f), l++;
|
|
2010
|
+
continue;
|
|
2011
|
+
}
|
|
2012
|
+
var w = b(f, o$1);
|
|
2013
|
+
var d = l + 1;
|
|
2014
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
2015
|
+
try {
|
|
2016
|
+
for(var _iterator = w[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
2017
|
+
var g1 = _step.value;
|
|
2018
|
+
var u1 = {
|
|
2019
|
+
name: g1.name,
|
|
2020
|
+
value: g1.value,
|
|
2021
|
+
absorbedNext: !1,
|
|
2022
|
+
isGlobal: !1
|
|
2023
|
+
};
|
|
2024
|
+
g1.needsNext && u1.value === void 0 && d < e.length && !r(e[d]) && (u1.value = String(e[d]), u1.absorbedNext = !0, d++), n.push(u1);
|
|
2025
|
+
}
|
|
2026
|
+
} catch (err) {
|
|
2027
|
+
_didIteratorError = true;
|
|
2028
|
+
_iteratorError = err;
|
|
2029
|
+
} finally{
|
|
2030
|
+
try {
|
|
2031
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
2032
|
+
_iterator.return();
|
|
2033
|
+
}
|
|
2034
|
+
} finally{
|
|
2035
|
+
if (_didIteratorError) {
|
|
2036
|
+
throw _iteratorError;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
l = d;
|
|
2041
|
+
}
|
|
2042
|
+
return {
|
|
2043
|
+
flags: n,
|
|
2044
|
+
positionals: s,
|
|
2045
|
+
pathspecs: r$1
|
|
2046
|
+
};
|
|
2047
|
+
}
|
|
2048
|
+
function V(param) {
|
|
2049
|
+
var e, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator, _step, t, _iterator1, _step1, n, o, _tmp, err, err;
|
|
2050
|
+
return _ts_generator$1(this, function(_state) {
|
|
2051
|
+
switch(_state.label){
|
|
2052
|
+
case 0:
|
|
2053
|
+
e = param.write;
|
|
2054
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined, _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
2055
|
+
_state.label = 1;
|
|
2056
|
+
case 1:
|
|
2057
|
+
_state.trys.push([
|
|
2058
|
+
1,
|
|
2059
|
+
13,
|
|
2060
|
+
14,
|
|
2061
|
+
15
|
|
2062
|
+
]);
|
|
2063
|
+
_iterator = e[Symbol.iterator]();
|
|
2064
|
+
_state.label = 2;
|
|
2065
|
+
case 2:
|
|
2066
|
+
if (!!(_iteratorNormalCompletion1 = (_step = _iterator.next()).done)) return [
|
|
2067
|
+
3,
|
|
2068
|
+
12
|
|
2069
|
+
];
|
|
2070
|
+
t = _step.value;
|
|
2071
|
+
_state.label = 3;
|
|
2072
|
+
case 3:
|
|
2073
|
+
_state.trys.push([
|
|
2074
|
+
3,
|
|
2075
|
+
9,
|
|
2076
|
+
10,
|
|
2077
|
+
11
|
|
2078
|
+
]);
|
|
2079
|
+
_iterator1 = q[Symbol.iterator]();
|
|
2080
|
+
_state.label = 4;
|
|
2081
|
+
case 4:
|
|
2082
|
+
if (!!(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done)) return [
|
|
2083
|
+
3,
|
|
2084
|
+
8
|
|
2085
|
+
];
|
|
2086
|
+
n = _step1.value;
|
|
2087
|
+
o = n(t.key);
|
|
2088
|
+
_tmp = o;
|
|
2089
|
+
if (!_tmp) return [
|
|
2090
|
+
3,
|
|
2091
|
+
6
|
|
2092
|
+
];
|
|
2093
|
+
return [
|
|
2094
|
+
4,
|
|
2095
|
+
o
|
|
2096
|
+
];
|
|
2097
|
+
case 5:
|
|
2098
|
+
_tmp = _state.sent();
|
|
2099
|
+
_state.label = 6;
|
|
2100
|
+
case 6:
|
|
2101
|
+
_state.label = 7;
|
|
2102
|
+
case 7:
|
|
2103
|
+
_iteratorNormalCompletion = true;
|
|
2104
|
+
return [
|
|
2105
|
+
3,
|
|
2106
|
+
4
|
|
2107
|
+
];
|
|
2108
|
+
case 8:
|
|
2109
|
+
return [
|
|
2110
|
+
3,
|
|
2111
|
+
11
|
|
2112
|
+
];
|
|
2113
|
+
case 9:
|
|
2114
|
+
err = _state.sent();
|
|
2115
|
+
_didIteratorError = true;
|
|
2116
|
+
_iteratorError = err;
|
|
2117
|
+
return [
|
|
2118
|
+
3,
|
|
2119
|
+
11
|
|
2120
|
+
];
|
|
2121
|
+
case 10:
|
|
2122
|
+
try {
|
|
2123
|
+
if (!_iteratorNormalCompletion && _iterator1.return != null) {
|
|
2124
|
+
_iterator1.return();
|
|
2125
|
+
}
|
|
2126
|
+
} finally{
|
|
2127
|
+
if (_didIteratorError) {
|
|
2128
|
+
throw _iteratorError;
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
return [
|
|
2132
|
+
7
|
|
2133
|
+
];
|
|
2134
|
+
case 11:
|
|
2135
|
+
_iteratorNormalCompletion1 = true;
|
|
2136
|
+
return [
|
|
2137
|
+
3,
|
|
2138
|
+
2
|
|
2139
|
+
];
|
|
2140
|
+
case 12:
|
|
2141
|
+
return [
|
|
2142
|
+
3,
|
|
2143
|
+
15
|
|
2144
|
+
];
|
|
2145
|
+
case 13:
|
|
2146
|
+
err = _state.sent();
|
|
2147
|
+
_didIteratorError1 = true;
|
|
2148
|
+
_iteratorError1 = err;
|
|
2149
|
+
return [
|
|
2150
|
+
3,
|
|
2151
|
+
15
|
|
2152
|
+
];
|
|
2153
|
+
case 14:
|
|
2154
|
+
try {
|
|
2155
|
+
if (!_iteratorNormalCompletion1 && _iterator.return != null) {
|
|
2156
|
+
_iterator.return();
|
|
2157
|
+
}
|
|
2158
|
+
} finally{
|
|
2159
|
+
if (_didIteratorError1) {
|
|
2160
|
+
throw _iteratorError1;
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
return [
|
|
2164
|
+
7
|
|
2165
|
+
];
|
|
2166
|
+
case 15:
|
|
2167
|
+
return [
|
|
2168
|
+
2
|
|
2169
|
+
];
|
|
2170
|
+
}
|
|
2171
|
+
});
|
|
2172
|
+
}
|
|
2173
|
+
function c(e, t) {
|
|
2174
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : String(e);
|
|
2175
|
+
var o = typeof e == "string" ? new RegExp("\\s*".concat(e.toLowerCase())) : e;
|
|
2176
|
+
return function(r) {
|
|
2177
|
+
if (o.test(r)) return {
|
|
2178
|
+
category: t,
|
|
2179
|
+
message: "Configuring ".concat(n, " is not permitted without enabling ").concat(t)
|
|
2180
|
+
};
|
|
2181
|
+
};
|
|
2182
|
+
}
|
|
2183
|
+
function i(e, t) {
|
|
2184
|
+
var n = new RegExp("\\s*".concat(e.toLowerCase().replace(/\./g, "(..+)?.")));
|
|
2185
|
+
return c(n, t, e);
|
|
2186
|
+
}
|
|
2187
|
+
var q = [
|
|
2188
|
+
c("alias", "allowUnsafeAlias"),
|
|
2189
|
+
c("core.askPass", "allowUnsafeAskPass"),
|
|
2190
|
+
c("core.editor", "allowUnsafeEditor"),
|
|
2191
|
+
c("core.fsmonitor", "allowUnsafeFsMonitor"),
|
|
2192
|
+
c("core.gitProxy", "allowUnsafeGitProxy"),
|
|
2193
|
+
c("core.hooksPath", "allowUnsafeHooksPath"),
|
|
2194
|
+
c("core.pager", "allowUnsafePager"),
|
|
2195
|
+
c("core.sshCommand", "allowUnsafeSshCommand"),
|
|
2196
|
+
i("credential.helper", "allowUnsafeCredentialHelper"),
|
|
2197
|
+
i("diff.command", "allowUnsafeDiffExternal"),
|
|
2198
|
+
c("diff.external", "allowUnsafeDiffExternal"),
|
|
2199
|
+
i("diff.textconv", "allowUnsafeDiffTextConv"),
|
|
2200
|
+
i("filter.clean", "allowUnsafeFilter"),
|
|
2201
|
+
i("filter.smudge", "allowUnsafeFilter"),
|
|
2202
|
+
i("gpg.program", "allowUnsafeGpgProgram"),
|
|
2203
|
+
c("init.templateDir", "allowUnsafeTemplateDir"),
|
|
2204
|
+
i("merge.driver", "allowUnsafeMergeDriver"),
|
|
2205
|
+
i("mergetool.path", "allowUnsafeMergeDriver"),
|
|
2206
|
+
i("mergetool.cmd", "allowUnsafeMergeDriver"),
|
|
2207
|
+
i("protocol.allow", "allowUnsafeProtocolOverride"),
|
|
2208
|
+
i("remote.receivepack", "allowUnsafePack"),
|
|
2209
|
+
i("remote.uploadpack", "allowUnsafePack"),
|
|
2210
|
+
c("sequence.editor", "allowUnsafeEditor")
|
|
2211
|
+
];
|
|
2212
|
+
function K(e, t) {
|
|
2213
|
+
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator, _step, n, _iterator1, _step1, o, s, _tmp, err, err;
|
|
2214
|
+
return _ts_generator$1(this, function(_state) {
|
|
2215
|
+
switch(_state.label){
|
|
2216
|
+
case 0:
|
|
2217
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined, _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
2218
|
+
_state.label = 1;
|
|
2219
|
+
case 1:
|
|
2220
|
+
_state.trys.push([
|
|
2221
|
+
1,
|
|
2222
|
+
13,
|
|
2223
|
+
14,
|
|
2224
|
+
15
|
|
2225
|
+
]);
|
|
2226
|
+
_iterator = t[Symbol.iterator]();
|
|
2227
|
+
_state.label = 2;
|
|
2228
|
+
case 2:
|
|
2229
|
+
if (!!(_iteratorNormalCompletion1 = (_step = _iterator.next()).done)) return [
|
|
2230
|
+
3,
|
|
2231
|
+
12
|
|
2232
|
+
];
|
|
2233
|
+
n = _step.value;
|
|
2234
|
+
_state.label = 3;
|
|
2235
|
+
case 3:
|
|
2236
|
+
_state.trys.push([
|
|
2237
|
+
3,
|
|
2238
|
+
9,
|
|
2239
|
+
10,
|
|
2240
|
+
11
|
|
2241
|
+
]);
|
|
2242
|
+
_iterator1 = H[Symbol.iterator]();
|
|
2243
|
+
_state.label = 4;
|
|
2244
|
+
case 4:
|
|
2245
|
+
if (!!(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done)) return [
|
|
2246
|
+
3,
|
|
2247
|
+
8
|
|
2248
|
+
];
|
|
2249
|
+
o = _step1.value;
|
|
2250
|
+
s = o(e, n.name);
|
|
2251
|
+
_tmp = s;
|
|
2252
|
+
if (!_tmp) return [
|
|
2253
|
+
3,
|
|
2254
|
+
6
|
|
2255
|
+
];
|
|
2256
|
+
return [
|
|
2257
|
+
4,
|
|
2258
|
+
s
|
|
2259
|
+
];
|
|
2260
|
+
case 5:
|
|
2261
|
+
_tmp = _state.sent();
|
|
2262
|
+
_state.label = 6;
|
|
2263
|
+
case 6:
|
|
2264
|
+
_state.label = 7;
|
|
2265
|
+
case 7:
|
|
2266
|
+
_iteratorNormalCompletion = true;
|
|
2267
|
+
return [
|
|
2268
|
+
3,
|
|
2269
|
+
4
|
|
2270
|
+
];
|
|
2271
|
+
case 8:
|
|
2272
|
+
return [
|
|
2273
|
+
3,
|
|
2274
|
+
11
|
|
2275
|
+
];
|
|
2276
|
+
case 9:
|
|
2277
|
+
err = _state.sent();
|
|
2278
|
+
_didIteratorError = true;
|
|
2279
|
+
_iteratorError = err;
|
|
2280
|
+
return [
|
|
2281
|
+
3,
|
|
2282
|
+
11
|
|
2283
|
+
];
|
|
2284
|
+
case 10:
|
|
2285
|
+
try {
|
|
2286
|
+
if (!_iteratorNormalCompletion && _iterator1.return != null) {
|
|
2287
|
+
_iterator1.return();
|
|
2288
|
+
}
|
|
2289
|
+
} finally{
|
|
2290
|
+
if (_didIteratorError) {
|
|
2291
|
+
throw _iteratorError;
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
return [
|
|
2295
|
+
7
|
|
2296
|
+
];
|
|
2297
|
+
case 11:
|
|
2298
|
+
_iteratorNormalCompletion1 = true;
|
|
2299
|
+
return [
|
|
2300
|
+
3,
|
|
2301
|
+
2
|
|
2302
|
+
];
|
|
2303
|
+
case 12:
|
|
2304
|
+
return [
|
|
2305
|
+
3,
|
|
2306
|
+
15
|
|
2307
|
+
];
|
|
2308
|
+
case 13:
|
|
2309
|
+
err = _state.sent();
|
|
2310
|
+
_didIteratorError1 = true;
|
|
2311
|
+
_iteratorError1 = err;
|
|
2312
|
+
return [
|
|
2313
|
+
3,
|
|
2314
|
+
15
|
|
2315
|
+
];
|
|
2316
|
+
case 14:
|
|
2317
|
+
try {
|
|
2318
|
+
if (!_iteratorNormalCompletion1 && _iterator.return != null) {
|
|
2319
|
+
_iterator.return();
|
|
2320
|
+
}
|
|
2321
|
+
} finally{
|
|
2322
|
+
if (_didIteratorError1) {
|
|
2323
|
+
throw _iteratorError1;
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
return [
|
|
2327
|
+
7
|
|
2328
|
+
];
|
|
2329
|
+
case 15:
|
|
2330
|
+
return [
|
|
2331
|
+
2
|
|
2332
|
+
];
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2335
|
+
}
|
|
2336
|
+
function h(e, t, n) {
|
|
2337
|
+
var o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : String(t);
|
|
2338
|
+
var s = typeof t == "string" ? new RegExp("\\s*".concat(t.toLowerCase())) : t, r = "Use of ".concat(e ? "".concat(e, " with option ") : "").concat(o, " is not permitted without enabling ").concat(n);
|
|
2339
|
+
return function(a, f) {
|
|
2340
|
+
if ((!e || a === e) && s.test(f)) return {
|
|
2341
|
+
category: n,
|
|
2342
|
+
message: r
|
|
2343
|
+
};
|
|
2344
|
+
};
|
|
2345
|
+
}
|
|
2346
|
+
var H = [
|
|
2347
|
+
h(null, /--(upload|receive)-pack/, "allowUnsafePack", "--upload-pack or --receive-pack"),
|
|
2348
|
+
h("clone", /^-\w*u/, "allowUnsafePack"),
|
|
2349
|
+
h("clone", "--u", "allowUnsafePack"),
|
|
2350
|
+
h("push", "--exec", "allowUnsafePack"),
|
|
2351
|
+
h(null, "--template", "allowUnsafeTemplateDir")
|
|
2352
|
+
];
|
|
2353
|
+
function C(e, t, n) {
|
|
2354
|
+
return _to_consumable_array$1(K(e, t)).concat(_to_consumable_array$1(V(n)));
|
|
2355
|
+
}
|
|
2356
|
+
function Y() {
|
|
2357
|
+
for(var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++){
|
|
2358
|
+
e[_key] = arguments[_key];
|
|
2359
|
+
}
|
|
2360
|
+
var _j = j(e), t = _j.flags, n = _j.taskIndex, o = n < e.length ? String(e[n]).toLowerCase() : null, s = o !== null ? e.slice(n + 1) : [], _B = B(s, o, t), r = _B.positionals, l = _B.pathspecs, a = L(o, t, r);
|
|
2361
|
+
return {
|
|
2362
|
+
task: o,
|
|
2363
|
+
flags: t.map(J),
|
|
2364
|
+
paths: l,
|
|
2365
|
+
config: a,
|
|
2366
|
+
vulnerabilities: z(C(o, t, a))
|
|
2367
|
+
};
|
|
2368
|
+
}
|
|
2369
|
+
function z(e) {
|
|
2370
|
+
return Object.defineProperty(e, "vulnerabilities", {
|
|
2371
|
+
value: e
|
|
2372
|
+
});
|
|
2373
|
+
}
|
|
2374
|
+
function J(param) {
|
|
2375
|
+
var e = param.value, t = param.name;
|
|
2376
|
+
return e !== void 0 ? {
|
|
2377
|
+
name: t,
|
|
2378
|
+
value: e
|
|
2379
|
+
} : {
|
|
2380
|
+
name: t
|
|
2381
|
+
};
|
|
2382
|
+
}
|
|
2383
|
+
var y = {
|
|
2384
|
+
editor: "allowUnsafeEditor",
|
|
2385
|
+
git_askpass: "allowUnsafeAskPass",
|
|
2386
|
+
git_config_global: "allowUnsafeConfigPaths",
|
|
2387
|
+
git_config_system: "allowUnsafeConfigPaths",
|
|
2388
|
+
git_config_count: "allowUnsafeConfigEnvCount",
|
|
2389
|
+
git_config: "allowUnsafeConfigPaths",
|
|
2390
|
+
git_editor: "allowUnsafeEditor",
|
|
2391
|
+
git_exec_path: "allowUnsafeConfigPaths",
|
|
2392
|
+
git_external_diff: "allowUnsafeDiffExternal",
|
|
2393
|
+
git_pager: "allowUnsafePager",
|
|
2394
|
+
git_proxy_command: "allowUnsafeGitProxy",
|
|
2395
|
+
git_template_dir: "allowUnsafeTemplateDir",
|
|
2396
|
+
git_sequence_editor: "allowUnsafeEditor",
|
|
2397
|
+
git_ssh: "allowUnsafeSshCommand",
|
|
2398
|
+
git_ssh_command: "allowUnsafeSshCommand",
|
|
2399
|
+
pager: "allowUnsafePager",
|
|
2400
|
+
prefix: "allowUnsafeConfigPaths",
|
|
2401
|
+
ssh_askpass: "allowUnsafeAskPass"
|
|
2402
|
+
};
|
|
2403
|
+
function Q(e) {
|
|
2404
|
+
var _e_git_config_count, t, n, o, s, _tmp;
|
|
2405
|
+
return _ts_generator$1(this, function(_state) {
|
|
2406
|
+
switch(_state.label){
|
|
2407
|
+
case 0:
|
|
2408
|
+
t = parseInt((_e_git_config_count = e.git_config_count) !== null && _e_git_config_count !== void 0 ? _e_git_config_count : "0", 10);
|
|
2409
|
+
n = 0;
|
|
2410
|
+
_state.label = 1;
|
|
2411
|
+
case 1:
|
|
2412
|
+
if (!(n < t)) return [
|
|
2413
|
+
3,
|
|
2414
|
+
5
|
|
2415
|
+
];
|
|
2416
|
+
o = e["git_config_key_".concat(n)], s = e["git_config_value_".concat(n)];
|
|
2417
|
+
_tmp = o !== void 0;
|
|
2418
|
+
if (!_tmp) return [
|
|
2419
|
+
3,
|
|
2420
|
+
3
|
|
2421
|
+
];
|
|
2422
|
+
return [
|
|
2423
|
+
4,
|
|
2424
|
+
{
|
|
2425
|
+
key: o.toLowerCase().trim(),
|
|
2426
|
+
value: s,
|
|
2427
|
+
scope: "env"
|
|
2428
|
+
}
|
|
2429
|
+
];
|
|
2430
|
+
case 2:
|
|
2431
|
+
_tmp = _state.sent();
|
|
2432
|
+
_state.label = 3;
|
|
2433
|
+
case 3:
|
|
2434
|
+
_state.label = 4;
|
|
2435
|
+
case 4:
|
|
2436
|
+
n++;
|
|
2437
|
+
return [
|
|
2438
|
+
3,
|
|
2439
|
+
1
|
|
2440
|
+
];
|
|
2441
|
+
case 5:
|
|
2442
|
+
return [
|
|
2443
|
+
2
|
|
2444
|
+
];
|
|
2445
|
+
}
|
|
2446
|
+
});
|
|
2447
|
+
}
|
|
2448
|
+
function X(e) {
|
|
2449
|
+
var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, t, n, err;
|
|
2450
|
+
return _ts_generator$1(this, function(_state) {
|
|
2451
|
+
switch(_state.label){
|
|
2452
|
+
case 0:
|
|
2453
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
2454
|
+
_state.label = 1;
|
|
2455
|
+
case 1:
|
|
2456
|
+
_state.trys.push([
|
|
2457
|
+
1,
|
|
2458
|
+
6,
|
|
2459
|
+
7,
|
|
2460
|
+
8
|
|
2461
|
+
]);
|
|
2462
|
+
_iterator = Object.keys(e)[Symbol.iterator]();
|
|
2463
|
+
_state.label = 2;
|
|
2464
|
+
case 2:
|
|
2465
|
+
if (!!(_iteratorNormalCompletion = (_step = _iterator.next()).done)) return [
|
|
2466
|
+
3,
|
|
2467
|
+
5
|
|
2468
|
+
];
|
|
2469
|
+
t = _step.value;
|
|
2470
|
+
if (!_(t)) return [
|
|
2471
|
+
3,
|
|
2472
|
+
4
|
|
2473
|
+
];
|
|
2474
|
+
n = y[t];
|
|
2475
|
+
return [
|
|
2476
|
+
4,
|
|
2477
|
+
{
|
|
2478
|
+
category: n,
|
|
2479
|
+
message: 'Use of "'.concat(t.toUpperCase(), '" is not permitted without enabling ').concat(n)
|
|
2480
|
+
}
|
|
2481
|
+
];
|
|
2482
|
+
case 3:
|
|
2483
|
+
_state.sent();
|
|
2484
|
+
_state.label = 4;
|
|
2485
|
+
case 4:
|
|
2486
|
+
_iteratorNormalCompletion = true;
|
|
2487
|
+
return [
|
|
2488
|
+
3,
|
|
2489
|
+
2
|
|
2490
|
+
];
|
|
2491
|
+
case 5:
|
|
2492
|
+
return [
|
|
2493
|
+
3,
|
|
2494
|
+
8
|
|
2495
|
+
];
|
|
2496
|
+
case 6:
|
|
2497
|
+
err = _state.sent();
|
|
2498
|
+
_didIteratorError = true;
|
|
2499
|
+
_iteratorError = err;
|
|
2500
|
+
return [
|
|
2501
|
+
3,
|
|
2502
|
+
8
|
|
2503
|
+
];
|
|
2504
|
+
case 7:
|
|
2505
|
+
try {
|
|
2506
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
2507
|
+
_iterator.return();
|
|
2508
|
+
}
|
|
2509
|
+
} finally{
|
|
2510
|
+
if (_didIteratorError) {
|
|
2511
|
+
throw _iteratorError;
|
|
2512
|
+
}
|
|
2513
|
+
}
|
|
2514
|
+
return [
|
|
2515
|
+
7
|
|
2516
|
+
];
|
|
2517
|
+
case 8:
|
|
2518
|
+
return [
|
|
2519
|
+
2
|
|
2520
|
+
];
|
|
2521
|
+
}
|
|
2522
|
+
});
|
|
2523
|
+
}
|
|
2524
|
+
function _(e) {
|
|
2525
|
+
return Object.hasOwn(y, e);
|
|
2526
|
+
}
|
|
2527
|
+
function Z(e) {
|
|
2528
|
+
var t = {};
|
|
2529
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
2530
|
+
try {
|
|
2531
|
+
for(var _iterator = Object.entries(e)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
2532
|
+
var _step_value = _sliced_to_array$1(_step.value, 2), n = _step_value[0], o = _step_value[1];
|
|
2533
|
+
var s = n.toLowerCase().trim();
|
|
2534
|
+
(_(s) || s.startsWith("git")) && (t[s] = String(o));
|
|
2535
|
+
}
|
|
2536
|
+
} catch (err) {
|
|
2537
|
+
_didIteratorError = true;
|
|
2538
|
+
_iteratorError = err;
|
|
2539
|
+
} finally{
|
|
2540
|
+
try {
|
|
2541
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
2542
|
+
_iterator.return();
|
|
1148
2543
|
}
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
status = 'rejected';
|
|
1153
|
-
fail(error);
|
|
2544
|
+
} finally{
|
|
2545
|
+
if (_didIteratorError) {
|
|
2546
|
+
throw _iteratorError;
|
|
1154
2547
|
}
|
|
1155
|
-
},
|
|
1156
|
-
get fulfilled () {
|
|
1157
|
-
return status !== 'pending';
|
|
1158
|
-
},
|
|
1159
|
-
get status () {
|
|
1160
|
-
return status;
|
|
1161
2548
|
}
|
|
2549
|
+
}
|
|
2550
|
+
return t;
|
|
2551
|
+
}
|
|
2552
|
+
function ee(e) {
|
|
2553
|
+
var t = Z(e), n = {
|
|
2554
|
+
read: [],
|
|
2555
|
+
write: _to_consumable_array$1(Q(t))
|
|
2556
|
+
}, o = _to_consumable_array$1(X(t)).concat(_to_consumable_array$1(C(null, [], n)));
|
|
2557
|
+
return {
|
|
2558
|
+
config: n,
|
|
2559
|
+
vulnerabilities: o
|
|
1162
2560
|
};
|
|
1163
2561
|
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
* local variable name rather than the factory import name, without needing to rename on import.
|
|
1168
|
-
*
|
|
1169
|
-
* ```typescript
|
|
1170
|
-
import {createDeferred} from '@kwsites/promise-deferred`;
|
|
1171
|
-
```
|
|
1172
|
-
*/ createDeferred = dist.createDeferred = deferred;
|
|
1173
|
-
/**
|
|
1174
|
-
* Default export allows use as:
|
|
1175
|
-
*
|
|
1176
|
-
* ```typescript
|
|
1177
|
-
import deferred from '@kwsites/promise-deferred`;
|
|
1178
|
-
```
|
|
1179
|
-
*/ dist.default = deferred;
|
|
2562
|
+
function ne(e, t) {
|
|
2563
|
+
return _to_consumable_array$1(Y.apply(void 0, _to_consumable_array$1(e)).vulnerabilities).concat(_to_consumable_array$1(ee(t).vulnerabilities));
|
|
2564
|
+
}
|
|
1180
2565
|
|
|
1181
2566
|
function _array_like_to_array(arr, len) {
|
|
1182
2567
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -1626,27 +3011,6 @@ var __toCommonJS = function(mod) {
|
|
|
1626
3011
|
value: true
|
|
1627
3012
|
}), mod);
|
|
1628
3013
|
};
|
|
1629
|
-
// src/lib/args/pathspec.ts
|
|
1630
|
-
function pathspec() {
|
|
1631
|
-
for(var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++){
|
|
1632
|
-
paths[_key] = arguments[_key];
|
|
1633
|
-
}
|
|
1634
|
-
var key = new String(paths);
|
|
1635
|
-
cache.set(key, paths);
|
|
1636
|
-
return key;
|
|
1637
|
-
}
|
|
1638
|
-
function isPathSpec(path) {
|
|
1639
|
-
return _instanceof(path, String) && cache.has(path);
|
|
1640
|
-
}
|
|
1641
|
-
function toPaths(pathSpec) {
|
|
1642
|
-
return cache.get(pathSpec) || [];
|
|
1643
|
-
}
|
|
1644
|
-
var cache;
|
|
1645
|
-
var init_pathspec = __esm({
|
|
1646
|
-
"src/lib/args/pathspec.ts": function() {
|
|
1647
|
-
cache = /* @__PURE__ */ new WeakMap();
|
|
1648
|
-
}
|
|
1649
|
-
});
|
|
1650
3014
|
// src/lib/errors/git-error.ts
|
|
1651
3015
|
var GitError;
|
|
1652
3016
|
var init_git_error = __esm({
|
|
@@ -1734,7 +3098,7 @@ function last(input) {
|
|
|
1734
3098
|
}
|
|
1735
3099
|
}
|
|
1736
3100
|
function isArrayLike(input) {
|
|
1737
|
-
return
|
|
3101
|
+
return filterHasLength(input);
|
|
1738
3102
|
}
|
|
1739
3103
|
function toLinesWithContent() {
|
|
1740
3104
|
var input = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", trimmed2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true, separator = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "\n";
|
|
@@ -1792,7 +3156,9 @@ function asCamelCase(str) {
|
|
|
1792
3156
|
});
|
|
1793
3157
|
}
|
|
1794
3158
|
function asStringArray(source) {
|
|
1795
|
-
return asArray(source).map(
|
|
3159
|
+
return asArray(source).map(function(item) {
|
|
3160
|
+
return _instanceof(item, String) ? item : String(item);
|
|
3161
|
+
});
|
|
1796
3162
|
}
|
|
1797
3163
|
function asNumber(source) {
|
|
1798
3164
|
var onNaN = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
@@ -1800,7 +3166,7 @@ function asNumber(source) {
|
|
|
1800
3166
|
return onNaN;
|
|
1801
3167
|
}
|
|
1802
3168
|
var num = parseInt(source, 10);
|
|
1803
|
-
return isNaN(num) ? onNaN : num;
|
|
3169
|
+
return Number.isNaN(num) ? onNaN : num;
|
|
1804
3170
|
}
|
|
1805
3171
|
function prefixedArray(input, prefix) {
|
|
1806
3172
|
var output = [];
|
|
@@ -1810,15 +3176,16 @@ function prefixedArray(input, prefix) {
|
|
|
1810
3176
|
return output;
|
|
1811
3177
|
}
|
|
1812
3178
|
function bufferToString(input) {
|
|
1813
|
-
return (Array.isArray(input) ? Buffer
|
|
3179
|
+
return (Array.isArray(input) ? Buffer.concat(input) : input).toString("utf-8");
|
|
1814
3180
|
}
|
|
1815
3181
|
function pick(source, properties) {
|
|
1816
|
-
var
|
|
1817
|
-
|
|
1818
|
-
{
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
})
|
|
3182
|
+
var out = {};
|
|
3183
|
+
properties.forEach(function(key) {
|
|
3184
|
+
if (source[key] !== void 0) {
|
|
3185
|
+
out[key] = source[key];
|
|
3186
|
+
}
|
|
3187
|
+
});
|
|
3188
|
+
return out;
|
|
1822
3189
|
}
|
|
1823
3190
|
function delay() {
|
|
1824
3191
|
var duration = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
@@ -1835,12 +3202,12 @@ function orVoid(input) {
|
|
|
1835
3202
|
var NULL, NOOP, objectToString;
|
|
1836
3203
|
var init_util = __esm({
|
|
1837
3204
|
"src/lib/utils/util.ts": function() {
|
|
3205
|
+
init_argument_filters();
|
|
1838
3206
|
NULL = "\0";
|
|
1839
3207
|
NOOP = function() {};
|
|
1840
3208
|
objectToString = Object.prototype.toString.call.bind(Object.prototype.toString);
|
|
1841
3209
|
}
|
|
1842
3210
|
});
|
|
1843
|
-
// src/lib/utils/argument-filters.ts
|
|
1844
3211
|
function filterType(input, filter, def) {
|
|
1845
3212
|
if (filter(input)) {
|
|
1846
3213
|
return input;
|
|
@@ -1848,7 +3215,7 @@ function filterType(input, filter, def) {
|
|
|
1848
3215
|
return arguments.length > 2 ? def : void 0;
|
|
1849
3216
|
}
|
|
1850
3217
|
function filterPrimitives(input, omit) {
|
|
1851
|
-
var type =
|
|
3218
|
+
var type = r(input) ? "string" : typeof input === "undefined" ? "undefined" : _type_of(input);
|
|
1852
3219
|
return /number|string|boolean/.test(type) && (!omit || !omit.includes(type));
|
|
1853
3220
|
}
|
|
1854
3221
|
function filterPlainObject(input) {
|
|
@@ -1857,19 +3224,18 @@ function filterPlainObject(input) {
|
|
|
1857
3224
|
function filterFunction(input) {
|
|
1858
3225
|
return typeof input === "function";
|
|
1859
3226
|
}
|
|
1860
|
-
var filterArray,
|
|
3227
|
+
var filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength;
|
|
1861
3228
|
var init_argument_filters = __esm({
|
|
1862
3229
|
"src/lib/utils/argument-filters.ts": function() {
|
|
1863
3230
|
init_util();
|
|
1864
|
-
init_pathspec();
|
|
1865
3231
|
filterArray = function(input) {
|
|
1866
3232
|
return Array.isArray(input);
|
|
1867
3233
|
};
|
|
1868
|
-
|
|
1869
|
-
return typeof input === "
|
|
3234
|
+
filterNumber = function(input) {
|
|
3235
|
+
return typeof input === "number";
|
|
1870
3236
|
};
|
|
1871
|
-
|
|
1872
|
-
return
|
|
3237
|
+
filterString = function(input) {
|
|
3238
|
+
return typeof input === "string" || r(input);
|
|
1873
3239
|
};
|
|
1874
3240
|
filterStringOrStringArray = function(input) {
|
|
1875
3241
|
return filterString(input) || Array.isArray(input) && input.every(filterString);
|
|
@@ -1878,7 +3244,7 @@ var init_argument_filters = __esm({
|
|
|
1878
3244
|
if (input == null || "number|boolean|function".includes(typeof input === "undefined" ? "undefined" : _type_of(input))) {
|
|
1879
3245
|
return false;
|
|
1880
3246
|
}
|
|
1881
|
-
return
|
|
3247
|
+
return typeof input.length === "number";
|
|
1882
3248
|
};
|
|
1883
3249
|
}
|
|
1884
3250
|
});
|
|
@@ -1918,6 +3284,9 @@ var init_git_output_streams = __esm({
|
|
|
1918
3284
|
}
|
|
1919
3285
|
});
|
|
1920
3286
|
// src/lib/utils/line-parser.ts
|
|
3287
|
+
function useMatchesDefault() {
|
|
3288
|
+
throw new Error("LineParser:useMatches not implemented");
|
|
3289
|
+
}
|
|
1921
3290
|
var LineParser, RemoteLineParser;
|
|
1922
3291
|
var init_line_parser = __esm({
|
|
1923
3292
|
"src/lib/utils/line-parser.ts": function() {
|
|
@@ -1926,6 +3295,7 @@ var init_line_parser = __esm({
|
|
|
1926
3295
|
var _this = this;
|
|
1927
3296
|
_class_call_check(this, LineParser);
|
|
1928
3297
|
this.matches = [];
|
|
3298
|
+
this.useMatches = useMatchesDefault;
|
|
1929
3299
|
this.parse = function(line, target) {
|
|
1930
3300
|
_this.resetMatches();
|
|
1931
3301
|
if (!_this._regExp.every(function(reg, index) {
|
|
@@ -1943,13 +3313,6 @@ var init_line_parser = __esm({
|
|
|
1943
3313
|
}
|
|
1944
3314
|
}
|
|
1945
3315
|
_create_class(LineParser, [
|
|
1946
|
-
{
|
|
1947
|
-
// @ts-ignore
|
|
1948
|
-
key: "useMatches",
|
|
1949
|
-
value: function useMatches(target, match) {
|
|
1950
|
-
throw new Error("LineParser:useMatches not implemented");
|
|
1951
|
-
}
|
|
1952
|
-
},
|
|
1953
3316
|
{
|
|
1954
3317
|
key: "resetMatches",
|
|
1955
3318
|
value: function resetMatches() {
|
|
@@ -2038,7 +3401,6 @@ var init_simple_git_options = __esm({
|
|
|
2038
3401
|
};
|
|
2039
3402
|
}
|
|
2040
3403
|
});
|
|
2041
|
-
// src/lib/utils/task-options.ts
|
|
2042
3404
|
function appendTaskOptions(options) {
|
|
2043
3405
|
var commands = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
2044
3406
|
if (!filterPlainObject(options)) {
|
|
@@ -2046,7 +3408,7 @@ function appendTaskOptions(options) {
|
|
|
2046
3408
|
}
|
|
2047
3409
|
return Object.keys(options).reduce(function(commands2, key) {
|
|
2048
3410
|
var value = options[key];
|
|
2049
|
-
if (
|
|
3411
|
+
if (r(value)) {
|
|
2050
3412
|
commands2.push(value);
|
|
2051
3413
|
} else if (filterPrimitives(value, [
|
|
2052
3414
|
"boolean"
|
|
@@ -2101,7 +3463,7 @@ function getTrailingOptions(args) {
|
|
|
2101
3463
|
}
|
|
2102
3464
|
function trailingArrayArgument(args) {
|
|
2103
3465
|
var hasTrailingCallback = typeof last(args) === "function";
|
|
2104
|
-
return filterType(last(args, hasTrailingCallback ? 1 : 0), filterArray, []);
|
|
3466
|
+
return asStringArray(filterType(last(args, hasTrailingCallback ? 1 : 0), filterArray, []));
|
|
2105
3467
|
}
|
|
2106
3468
|
function trailingOptionsArgument(args) {
|
|
2107
3469
|
var hasTrailingCallback = filterFunction(last(args));
|
|
@@ -2116,7 +3478,6 @@ var init_task_options = __esm({
|
|
|
2116
3478
|
"src/lib/utils/task-options.ts": function() {
|
|
2117
3479
|
init_argument_filters();
|
|
2118
3480
|
init_util();
|
|
2119
|
-
init_pathspec();
|
|
2120
3481
|
}
|
|
2121
3482
|
});
|
|
2122
3483
|
// src/lib/utils/task-parser.ts
|
|
@@ -2211,6 +3572,9 @@ __export(utils_exports, {
|
|
|
2211
3572
|
filterHasLength: function() {
|
|
2212
3573
|
return filterHasLength;
|
|
2213
3574
|
},
|
|
3575
|
+
filterNumber: function() {
|
|
3576
|
+
return filterNumber;
|
|
3577
|
+
},
|
|
2214
3578
|
filterPlainObject: function() {
|
|
2215
3579
|
return filterPlainObject;
|
|
2216
3580
|
},
|
|
@@ -2220,9 +3584,6 @@ __export(utils_exports, {
|
|
|
2220
3584
|
filterString: function() {
|
|
2221
3585
|
return filterString;
|
|
2222
3586
|
},
|
|
2223
|
-
filterStringArray: function() {
|
|
2224
|
-
return filterStringArray;
|
|
2225
|
-
},
|
|
2226
3587
|
filterStringOrStringArray: function() {
|
|
2227
3588
|
return filterStringOrStringArray;
|
|
2228
3589
|
},
|
|
@@ -2744,7 +4105,7 @@ var init_ConfigList = __esm({
|
|
|
2744
4105
|
key: "addValue",
|
|
2745
4106
|
value: function addValue(file, key, value) {
|
|
2746
4107
|
var values = this.addFile(file);
|
|
2747
|
-
if (!
|
|
4108
|
+
if (!Object.hasOwn(values, key)) {
|
|
2748
4109
|
values[key] = value;
|
|
2749
4110
|
} else if (Array.isArray(values[key])) {
|
|
2750
4111
|
values[key].push(value);
|
|
@@ -2764,7 +4125,7 @@ var init_ConfigList = __esm({
|
|
|
2764
4125
|
});
|
|
2765
4126
|
// src/lib/tasks/config.ts
|
|
2766
4127
|
function asConfigScope(scope, fallback) {
|
|
2767
|
-
if (typeof scope === "string" &&
|
|
4128
|
+
if (typeof scope === "string" && Object.hasOwn(GitConfigScope, scope)) {
|
|
2768
4129
|
return scope;
|
|
2769
4130
|
}
|
|
2770
4131
|
return fallback;
|
|
@@ -3103,11 +4464,12 @@ function getResetMode(mode) {
|
|
|
3103
4464
|
return;
|
|
3104
4465
|
}
|
|
3105
4466
|
function isValidResetMode(mode) {
|
|
3106
|
-
return
|
|
4467
|
+
return typeof mode === "string" && validResetModes.includes(mode);
|
|
3107
4468
|
}
|
|
3108
|
-
var ResetMode,
|
|
4469
|
+
var ResetMode, validResetModes;
|
|
3109
4470
|
var init_reset = __esm({
|
|
3110
4471
|
"src/lib/tasks/reset.ts": function() {
|
|
4472
|
+
init_utils();
|
|
3111
4473
|
init_task();
|
|
3112
4474
|
ResetMode = /* @__PURE__ */ function(ResetMode2) {
|
|
3113
4475
|
ResetMode2["MIXED"] = "mixed";
|
|
@@ -3117,7 +4479,7 @@ var init_reset = __esm({
|
|
|
3117
4479
|
ResetMode2["KEEP"] = "keep";
|
|
3118
4480
|
return ResetMode2;
|
|
3119
4481
|
}(ResetMode || {});
|
|
3120
|
-
|
|
4482
|
+
validResetModes = asStringArray(Object.values(ResetMode));
|
|
3121
4483
|
}
|
|
3122
4484
|
});
|
|
3123
4485
|
function createLog() {
|
|
@@ -3456,7 +4818,9 @@ var init_git_executor_chain = __esm({
|
|
|
3456
4818
|
switch(_state.label){
|
|
3457
4819
|
case 0:
|
|
3458
4820
|
binary = _this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands));
|
|
3459
|
-
args = _this._plugins.exec("spawn.args", _to_consumable_array(task.commands), pluginContext(task, task.commands))
|
|
4821
|
+
args = _this._plugins.exec("spawn.args", _to_consumable_array(task.commands), _object_spread_props(_object_spread({}, pluginContext(task, task.commands)), {
|
|
4822
|
+
env: _object_spread({}, _this.env)
|
|
4823
|
+
}));
|
|
3460
4824
|
return [
|
|
3461
4825
|
4,
|
|
3462
4826
|
_this.gitResponse(task, binary, args, _this.outputHandler, logger.step("SPAWN"))
|
|
@@ -3776,7 +5140,7 @@ var init_count_objects = __esm({
|
|
|
3776
5140
|
parser2 = new LineParser(/([a-z-]+): (\d+)$/, function(result, param) {
|
|
3777
5141
|
var _param = _sliced_to_array(param, 2), key = _param[0], value = _param[1];
|
|
3778
5142
|
var property = asCamelCase(key);
|
|
3779
|
-
if (
|
|
5143
|
+
if (Object.hasOwn(result, property)) {
|
|
3780
5144
|
result[property] = asNumber(value);
|
|
3781
5145
|
}
|
|
3782
5146
|
});
|
|
@@ -3859,7 +5223,7 @@ function commit_default() {
|
|
|
3859
5223
|
rest[_key - 1] = arguments[_key];
|
|
3860
5224
|
}
|
|
3861
5225
|
var next = trailingFunctionArgument(arguments);
|
|
3862
|
-
var task = rejectDeprecatedSignatures(message) || commitTask(asArray(message), asArray(filterType(rest[0], filterStringOrStringArray, [])), _to_consumable_array(filterType(rest[1], filterArray, [])).concat(_to_consumable_array(getTrailingOptions(arguments, 0, true))));
|
|
5226
|
+
var task = rejectDeprecatedSignatures(message) || commitTask(asArray(message), asArray(filterType(rest[0], filterStringOrStringArray, [])), _to_consumable_array(asStringArray(filterType(rest[1], filterArray, []))).concat(_to_consumable_array(getTrailingOptions(arguments, 0, true))));
|
|
3863
5227
|
return this._runTask(task, next);
|
|
3864
5228
|
}
|
|
3865
5229
|
};
|
|
@@ -4196,7 +5560,6 @@ var init_diff = __esm({
|
|
|
4196
5560
|
init_task();
|
|
4197
5561
|
}
|
|
4198
5562
|
});
|
|
4199
|
-
// src/lib/tasks/log.ts
|
|
4200
5563
|
function prettyFormat(format, splitter) {
|
|
4201
5564
|
var fields = [];
|
|
4202
5565
|
var formatStr = [];
|
|
@@ -4243,7 +5606,7 @@ function parseLogOptions() {
|
|
|
4243
5606
|
suffix.push("".concat(opt.from || "").concat(rangeOperator).concat(opt.to || ""));
|
|
4244
5607
|
}
|
|
4245
5608
|
if (filterString(opt.file)) {
|
|
4246
|
-
command.push("--follow",
|
|
5609
|
+
command.push("--follow", c$1(opt.file));
|
|
4247
5610
|
}
|
|
4248
5611
|
appendTaskOptions(userOptions(opt), command);
|
|
4249
5612
|
return {
|
|
@@ -4269,7 +5632,7 @@ function log_default() {
|
|
|
4269
5632
|
rest[_key] = arguments[_key];
|
|
4270
5633
|
}
|
|
4271
5634
|
var next = trailingFunctionArgument(arguments);
|
|
4272
|
-
var options = parseLogOptions(trailingOptionsArgument(arguments), filterType(arguments[0], filterArray));
|
|
5635
|
+
var options = parseLogOptions(trailingOptionsArgument(arguments), asStringArray(filterType(arguments[0], filterArray, [])));
|
|
4273
5636
|
var task = rejectDeprecatedSignatures.apply(void 0, _to_consumable_array(rest)) || validateLogFormatConfig(options.commands) || createLogTask(options);
|
|
4274
5637
|
return this._runTask(task, next);
|
|
4275
5638
|
}
|
|
@@ -4285,7 +5648,6 @@ var excludeOptions;
|
|
|
4285
5648
|
var init_log = __esm({
|
|
4286
5649
|
"src/lib/tasks/log.ts": function() {
|
|
4287
5650
|
init_log_format();
|
|
4288
|
-
init_pathspec();
|
|
4289
5651
|
init_parse_list_log_summary();
|
|
4290
5652
|
init_utils();
|
|
4291
5653
|
init_task();
|
|
@@ -4823,7 +6185,7 @@ function conflicts(indexX) {
|
|
|
4823
6185
|
}
|
|
4824
6186
|
return indexY.map(function(y) {
|
|
4825
6187
|
return parser3(indexX, y, function(result, file) {
|
|
4826
|
-
return
|
|
6188
|
+
return result.conflicted.push(file);
|
|
4827
6189
|
});
|
|
4828
6190
|
});
|
|
4829
6191
|
}
|
|
@@ -4831,9 +6193,9 @@ function splitLine(result, lineStr) {
|
|
|
4831
6193
|
var trimmed2 = lineStr.trim();
|
|
4832
6194
|
switch(" "){
|
|
4833
6195
|
case trimmed2.charAt(2):
|
|
4834
|
-
return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.
|
|
6196
|
+
return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.slice(3));
|
|
4835
6197
|
case trimmed2.charAt(1):
|
|
4836
|
-
return data(" " /* NONE */ , trimmed2.charAt(0), trimmed2.
|
|
6198
|
+
return data(" " /* NONE */ , trimmed2.charAt(0), trimmed2.slice(2));
|
|
4837
6199
|
default:
|
|
4838
6200
|
return;
|
|
4839
6201
|
}
|
|
@@ -4876,42 +6238,48 @@ var init_StatusSummary = __esm({
|
|
|
4876
6238
|
};
|
|
4877
6239
|
parsers6 = new Map([
|
|
4878
6240
|
parser3(" " /* NONE */ , "A" /* ADDED */ , function(result, file) {
|
|
4879
|
-
return
|
|
6241
|
+
return result.created.push(file);
|
|
4880
6242
|
}),
|
|
4881
6243
|
parser3(" " /* NONE */ , "D" /* DELETED */ , function(result, file) {
|
|
4882
|
-
return
|
|
6244
|
+
return result.deleted.push(file);
|
|
4883
6245
|
}),
|
|
4884
6246
|
parser3(" " /* NONE */ , "M" /* MODIFIED */ , function(result, file) {
|
|
4885
|
-
return
|
|
6247
|
+
return result.modified.push(file);
|
|
4886
6248
|
}),
|
|
4887
6249
|
parser3("A" /* ADDED */ , " " /* NONE */ , function(result, file) {
|
|
4888
|
-
|
|
6250
|
+
result.created.push(file);
|
|
6251
|
+
result.staged.push(file);
|
|
4889
6252
|
}),
|
|
4890
6253
|
parser3("A" /* ADDED */ , "M" /* MODIFIED */ , function(result, file) {
|
|
4891
|
-
|
|
6254
|
+
result.created.push(file);
|
|
6255
|
+
result.staged.push(file);
|
|
6256
|
+
result.modified.push(file);
|
|
4892
6257
|
}),
|
|
4893
6258
|
parser3("D" /* DELETED */ , " " /* NONE */ , function(result, file) {
|
|
4894
|
-
|
|
6259
|
+
result.deleted.push(file);
|
|
6260
|
+
result.staged.push(file);
|
|
4895
6261
|
}),
|
|
4896
6262
|
parser3("M" /* MODIFIED */ , " " /* NONE */ , function(result, file) {
|
|
4897
|
-
|
|
6263
|
+
result.modified.push(file);
|
|
6264
|
+
result.staged.push(file);
|
|
4898
6265
|
}),
|
|
4899
6266
|
parser3("M" /* MODIFIED */ , "M" /* MODIFIED */ , function(result, file) {
|
|
4900
|
-
|
|
6267
|
+
result.modified.push(file);
|
|
6268
|
+
result.staged.push(file);
|
|
4901
6269
|
}),
|
|
4902
6270
|
parser3("R" /* RENAMED */ , " " /* NONE */ , function(result, file) {
|
|
4903
|
-
|
|
6271
|
+
result.renamed.push(renamedFile(file));
|
|
4904
6272
|
}),
|
|
4905
6273
|
parser3("R" /* RENAMED */ , "M" /* MODIFIED */ , function(result, file) {
|
|
4906
6274
|
var renamed = renamedFile(file);
|
|
4907
|
-
|
|
4908
|
-
|
|
6275
|
+
result.renamed.push(renamed);
|
|
6276
|
+
result.modified.push(renamed.to);
|
|
4909
6277
|
}),
|
|
4910
6278
|
parser3("!" /* IGNORED */ , "!" /* IGNORED */ , function(_result, _file) {
|
|
4911
|
-
|
|
6279
|
+
(_result.ignored = _result.ignored || []).push(_file);
|
|
4912
6280
|
}),
|
|
4913
6281
|
parser3("?" /* UNTRACKED */ , "?" /* UNTRACKED */ , function(result, file) {
|
|
4914
|
-
return
|
|
6282
|
+
return result.not_added.push(file);
|
|
4915
6283
|
})
|
|
4916
6284
|
].concat(_to_consumable_array(conflicts("A" /* ADDED */ , "A" /* ADDED */ , "U" /* UNMERGED */ )), _to_consumable_array(conflicts("D" /* DELETED */ , "D" /* DELETED */ , "U" /* UNMERGED */ )), _to_consumable_array(conflicts("U" /* UNMERGED */ , "A" /* ADDED */ , "D" /* DELETED */ , "U" /* UNMERGED */ )), [
|
|
4917
6285
|
[
|
|
@@ -4921,18 +6289,19 @@ var init_StatusSummary = __esm({
|
|
|
4921
6289
|
var behindReg = /behind (\d+)/;
|
|
4922
6290
|
var currentReg = /^(.+?(?=(?:\.{3}|\s|$)))/;
|
|
4923
6291
|
var trackingReg = /\.{3}(\S*)/;
|
|
4924
|
-
var onEmptyBranchReg = /\son\s(
|
|
4925
|
-
var regexResult;
|
|
4926
|
-
regexResult = aheadReg.exec(line);
|
|
6292
|
+
var onEmptyBranchReg = /\son\s(\S+?)(?=\.{3}|$)/;
|
|
6293
|
+
var regexResult = aheadReg.exec(line);
|
|
4927
6294
|
result.ahead = regexResult && +regexResult[1] || 0;
|
|
4928
6295
|
regexResult = behindReg.exec(line);
|
|
4929
6296
|
result.behind = regexResult && +regexResult[1] || 0;
|
|
4930
6297
|
regexResult = currentReg.exec(line);
|
|
4931
|
-
result.current = regexResult
|
|
6298
|
+
result.current = filterType(regexResult === null || regexResult === void 0 ? void 0 : regexResult[1], filterString, null);
|
|
4932
6299
|
regexResult = trackingReg.exec(line);
|
|
4933
|
-
result.tracking = regexResult
|
|
6300
|
+
result.tracking = filterType(regexResult === null || regexResult === void 0 ? void 0 : regexResult[1], filterString, null);
|
|
4934
6301
|
regexResult = onEmptyBranchReg.exec(line);
|
|
4935
|
-
|
|
6302
|
+
if (regexResult) {
|
|
6303
|
+
result.current = filterType(regexResult === null || regexResult === void 0 ? void 0 : regexResult[1], filterString, result.current);
|
|
6304
|
+
}
|
|
4936
6305
|
result.detached = /\(no branch\)/.test(line);
|
|
4937
6306
|
}
|
|
4938
6307
|
]
|
|
@@ -5045,6 +6414,58 @@ var init_version = __esm({
|
|
|
5045
6414
|
];
|
|
5046
6415
|
}
|
|
5047
6416
|
});
|
|
6417
|
+
function createCloneTask(api, task, repoPath) {
|
|
6418
|
+
for(var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++){
|
|
6419
|
+
args[_key - 3] = arguments[_key];
|
|
6420
|
+
}
|
|
6421
|
+
if (!filterString(repoPath)) {
|
|
6422
|
+
return configurationErrorTask("git.".concat(api, "() requires a string 'repoPath'"));
|
|
6423
|
+
}
|
|
6424
|
+
return task(repoPath, filterType(args[0], filterString), getTrailingOptions(arguments));
|
|
6425
|
+
}
|
|
6426
|
+
function clone_default() {
|
|
6427
|
+
return {
|
|
6428
|
+
clone: function clone(repo) {
|
|
6429
|
+
for(var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
6430
|
+
rest[_key - 1] = arguments[_key];
|
|
6431
|
+
}
|
|
6432
|
+
return this._runTask(createCloneTask.apply(void 0, [
|
|
6433
|
+
"clone",
|
|
6434
|
+
cloneTask,
|
|
6435
|
+
filterType(repo, filterString)
|
|
6436
|
+
].concat(_to_consumable_array(rest))), trailingFunctionArgument(arguments));
|
|
6437
|
+
},
|
|
6438
|
+
mirror: function mirror(repo) {
|
|
6439
|
+
for(var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
6440
|
+
rest[_key - 1] = arguments[_key];
|
|
6441
|
+
}
|
|
6442
|
+
return this._runTask(createCloneTask.apply(void 0, [
|
|
6443
|
+
"mirror",
|
|
6444
|
+
cloneMirrorTask,
|
|
6445
|
+
filterType(repo, filterString)
|
|
6446
|
+
].concat(_to_consumable_array(rest))), trailingFunctionArgument(arguments));
|
|
6447
|
+
}
|
|
6448
|
+
};
|
|
6449
|
+
}
|
|
6450
|
+
var cloneTask, cloneMirrorTask;
|
|
6451
|
+
var init_clone = __esm({
|
|
6452
|
+
"src/lib/tasks/clone.ts": function() {
|
|
6453
|
+
init_task();
|
|
6454
|
+
init_utils();
|
|
6455
|
+
cloneTask = function(repo, directory, customArgs) {
|
|
6456
|
+
var commands = [
|
|
6457
|
+
"clone"
|
|
6458
|
+
].concat(_to_consumable_array(customArgs));
|
|
6459
|
+
filterString(repo) && commands.push(c$1(repo));
|
|
6460
|
+
filterString(directory) && commands.push(c$1(directory));
|
|
6461
|
+
return straightThroughStringTask(commands);
|
|
6462
|
+
};
|
|
6463
|
+
cloneMirrorTask = function(repo, directory, customArgs) {
|
|
6464
|
+
append(customArgs, "--mirror");
|
|
6465
|
+
return cloneTask(repo, directory, customArgs);
|
|
6466
|
+
};
|
|
6467
|
+
}
|
|
6468
|
+
});
|
|
5048
6469
|
// src/lib/simple-git-api.ts
|
|
5049
6470
|
var simple_git_api_exports = {};
|
|
5050
6471
|
__export(simple_git_api_exports, {
|
|
@@ -5073,6 +6494,7 @@ var init_simple_git_api = __esm({
|
|
|
5073
6494
|
init_task();
|
|
5074
6495
|
init_version();
|
|
5075
6496
|
init_utils();
|
|
6497
|
+
init_clone();
|
|
5076
6498
|
SimpleGitApi = /*#__PURE__*/ function() {
|
|
5077
6499
|
function SimpleGitApi(_executor) {
|
|
5078
6500
|
_class_call_check(this, SimpleGitApi);
|
|
@@ -5185,7 +6607,7 @@ var init_simple_git_api = __esm({
|
|
|
5185
6607
|
]);
|
|
5186
6608
|
return SimpleGitApi;
|
|
5187
6609
|
}();
|
|
5188
|
-
Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), count_objects_default(), first_commit_default(), grep_default(), log_default(), show_default(), version_default());
|
|
6610
|
+
Object.assign(SimpleGitApi.prototype, checkout_default(), clone_default(), commit_default(), config_default(), count_objects_default(), first_commit_default(), grep_default(), log_default(), show_default(), version_default());
|
|
5189
6611
|
}
|
|
5190
6612
|
});
|
|
5191
6613
|
// src/lib/runners/scheduler.ts
|
|
@@ -5382,9 +6804,12 @@ function branchStatus(input) {
|
|
|
5382
6804
|
return input ? input.charAt(0) : "";
|
|
5383
6805
|
}
|
|
5384
6806
|
function parseBranchSummary(stdOut) {
|
|
5385
|
-
|
|
6807
|
+
var currentOnly = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
6808
|
+
return parseStringResponse(new BranchSummaryResult(), currentOnly ? [
|
|
6809
|
+
currentBranchParser
|
|
6810
|
+
] : parsers9, stdOut);
|
|
5386
6811
|
}
|
|
5387
|
-
var parsers9;
|
|
6812
|
+
var parsers9, currentBranchParser;
|
|
5388
6813
|
var init_parse_branch = __esm({
|
|
5389
6814
|
"src/lib/parsers/parse-branch.ts": function() {
|
|
5390
6815
|
init_BranchSummary();
|
|
@@ -5399,6 +6824,10 @@ var init_parse_branch = __esm({
|
|
|
5399
6824
|
result.push(branchStatus(current), false, name, commit, label);
|
|
5400
6825
|
})
|
|
5401
6826
|
];
|
|
6827
|
+
currentBranchParser = new LineParser(RegExp("^(\\S+)$", "s"), function(result, param) {
|
|
6828
|
+
var _param = _sliced_to_array(param, 1), name = _param[0];
|
|
6829
|
+
result.push("*" /* CURRENT */ , false, name, "", "");
|
|
6830
|
+
});
|
|
5402
6831
|
}
|
|
5403
6832
|
});
|
|
5404
6833
|
// src/lib/tasks/branch.ts
|
|
@@ -5432,6 +6861,7 @@ function containsDeleteBranchCommand(commands) {
|
|
|
5432
6861
|
}
|
|
5433
6862
|
function branchTask(customArgs) {
|
|
5434
6863
|
var isDelete = containsDeleteBranchCommand(customArgs);
|
|
6864
|
+
var isCurrentOnly = customArgs.includes("--show-current");
|
|
5435
6865
|
var commands = [
|
|
5436
6866
|
"branch"
|
|
5437
6867
|
].concat(_to_consumable_array(customArgs));
|
|
@@ -5448,19 +6878,20 @@ function branchTask(customArgs) {
|
|
|
5448
6878
|
if (isDelete) {
|
|
5449
6879
|
return parseBranchDeletions(stdOut, stdErr).all[0];
|
|
5450
6880
|
}
|
|
5451
|
-
return parseBranchSummary(stdOut);
|
|
6881
|
+
return parseBranchSummary(stdOut, isCurrentOnly);
|
|
5452
6882
|
}
|
|
5453
6883
|
};
|
|
5454
6884
|
}
|
|
5455
6885
|
function branchLocalTask() {
|
|
5456
|
-
var parser4 = parseBranchSummary;
|
|
5457
6886
|
return {
|
|
5458
6887
|
format: "utf-8",
|
|
5459
6888
|
commands: [
|
|
5460
6889
|
"branch",
|
|
5461
6890
|
"-v"
|
|
5462
6891
|
],
|
|
5463
|
-
parser:
|
|
6892
|
+
parser: function parser(stdOut) {
|
|
6893
|
+
return parseBranchSummary(stdOut);
|
|
6894
|
+
}
|
|
5464
6895
|
};
|
|
5465
6896
|
}
|
|
5466
6897
|
function deleteBranchesTask(branches) {
|
|
@@ -5515,16 +6946,15 @@ var init_branch = __esm({
|
|
|
5515
6946
|
init_utils();
|
|
5516
6947
|
}
|
|
5517
6948
|
});
|
|
5518
|
-
|
|
6949
|
+
function toPath(input) {
|
|
6950
|
+
var path = input.trim().replace(/^["']|["']$/g, "");
|
|
6951
|
+
return path && normalize(path);
|
|
6952
|
+
}
|
|
5519
6953
|
var parseCheckIgnore;
|
|
5520
6954
|
var init_CheckIgnore = __esm({
|
|
5521
6955
|
"src/lib/responses/CheckIgnore.ts": function() {
|
|
5522
6956
|
parseCheckIgnore = function(text) {
|
|
5523
|
-
return text.split(/\n/g).map(
|
|
5524
|
-
return line.trim();
|
|
5525
|
-
}).filter(function(file) {
|
|
5526
|
-
return !!file;
|
|
5527
|
-
});
|
|
6957
|
+
return text.split(/\n/g).map(toPath).filter(Boolean);
|
|
5528
6958
|
};
|
|
5529
6959
|
}
|
|
5530
6960
|
});
|
|
@@ -5549,41 +6979,6 @@ var init_check_ignore = __esm({
|
|
|
5549
6979
|
init_CheckIgnore();
|
|
5550
6980
|
}
|
|
5551
6981
|
});
|
|
5552
|
-
// src/lib/tasks/clone.ts
|
|
5553
|
-
var clone_exports = {};
|
|
5554
|
-
__export(clone_exports, {
|
|
5555
|
-
cloneMirrorTask: function() {
|
|
5556
|
-
return cloneMirrorTask;
|
|
5557
|
-
},
|
|
5558
|
-
cloneTask: function() {
|
|
5559
|
-
return cloneTask;
|
|
5560
|
-
}
|
|
5561
|
-
});
|
|
5562
|
-
function disallowedCommand(command) {
|
|
5563
|
-
return /^--upload-pack(=|$)/.test(command);
|
|
5564
|
-
}
|
|
5565
|
-
function cloneTask(repo, directory, customArgs) {
|
|
5566
|
-
var commands = [
|
|
5567
|
-
"clone"
|
|
5568
|
-
].concat(_to_consumable_array(customArgs));
|
|
5569
|
-
filterString(repo) && commands.push(repo);
|
|
5570
|
-
filterString(directory) && commands.push(directory);
|
|
5571
|
-
var banned = commands.find(disallowedCommand);
|
|
5572
|
-
if (banned) {
|
|
5573
|
-
return configurationErrorTask("git.fetch: potential exploit argument blocked.");
|
|
5574
|
-
}
|
|
5575
|
-
return straightThroughStringTask(commands);
|
|
5576
|
-
}
|
|
5577
|
-
function cloneMirrorTask(repo, directory, customArgs) {
|
|
5578
|
-
append(customArgs, "--mirror");
|
|
5579
|
-
return cloneTask(repo, directory, customArgs);
|
|
5580
|
-
}
|
|
5581
|
-
var init_clone = __esm({
|
|
5582
|
-
"src/lib/tasks/clone.ts": function() {
|
|
5583
|
-
init_task();
|
|
5584
|
-
init_utils();
|
|
5585
|
-
}
|
|
5586
|
-
});
|
|
5587
6982
|
// src/lib/parsers/parse-fetch.ts
|
|
5588
6983
|
function parseFetchResult(stdOut, stdErr) {
|
|
5589
6984
|
var result = {
|
|
@@ -5647,7 +7042,7 @@ __export(fetch_exports, {
|
|
|
5647
7042
|
return fetchTask;
|
|
5648
7043
|
}
|
|
5649
7044
|
});
|
|
5650
|
-
function
|
|
7045
|
+
function disallowedCommand(command) {
|
|
5651
7046
|
return /^--upload-pack(=|$)/.test(command);
|
|
5652
7047
|
}
|
|
5653
7048
|
function fetchTask(remote, branch, customArgs) {
|
|
@@ -5657,7 +7052,7 @@ function fetchTask(remote, branch, customArgs) {
|
|
|
5657
7052
|
if (remote && branch) {
|
|
5658
7053
|
commands.push(remote, branch);
|
|
5659
7054
|
}
|
|
5660
|
-
var banned = commands.find(
|
|
7055
|
+
var banned = commands.find(disallowedCommand);
|
|
5661
7056
|
if (banned) {
|
|
5662
7057
|
return configurationErrorTask("git.fetch: potential exploit argument blocked.");
|
|
5663
7058
|
}
|
|
@@ -5770,7 +7165,7 @@ function parseGetRemotesVerbose(text) {
|
|
|
5770
7165
|
var remotes = {};
|
|
5771
7166
|
forEach(text, function(param) {
|
|
5772
7167
|
var _param = _sliced_to_array(param, 3), name = _param[0], url = _param[1], purpose = _param[2];
|
|
5773
|
-
if (!
|
|
7168
|
+
if (!Object.hasOwn(remotes, name)) {
|
|
5774
7169
|
remotes[name] = {
|
|
5775
7170
|
name: name,
|
|
5776
7171
|
refs: {
|
|
@@ -5939,8 +7334,8 @@ var init_sub_module = __esm({
|
|
|
5939
7334
|
});
|
|
5940
7335
|
// src/lib/responses/TagList.ts
|
|
5941
7336
|
function singleSorted(a, b) {
|
|
5942
|
-
var aIsNum = isNaN(a);
|
|
5943
|
-
var bIsNum = isNaN(b);
|
|
7337
|
+
var aIsNum = Number.isNaN(a);
|
|
7338
|
+
var bIsNum = Number.isNaN(b);
|
|
5944
7339
|
if (aIsNum !== bIsNum) {
|
|
5945
7340
|
return aIsNum ? 1 : -1;
|
|
5946
7341
|
}
|
|
@@ -6063,25 +7458,24 @@ var require_git = __commonJS({
|
|
|
6063
7458
|
var _ref = (init_git_executor(), __toCommonJS(git_executor_exports)), GitExecutor2 = _ref.GitExecutor;
|
|
6064
7459
|
var _ref1 = (init_simple_git_api(), __toCommonJS(simple_git_api_exports)), SimpleGitApi2 = _ref1.SimpleGitApi;
|
|
6065
7460
|
var _ref2 = (init_scheduler(), __toCommonJS(scheduler_exports)), Scheduler2 = _ref2.Scheduler;
|
|
6066
|
-
var _ref3 = (init_task(), __toCommonJS(task_exports)), configurationErrorTask2 = _ref3.configurationErrorTask;
|
|
7461
|
+
var _ref3 = (init_task(), __toCommonJS(task_exports)), adhocExecTask2 = _ref3.adhocExecTask, configurationErrorTask2 = _ref3.configurationErrorTask;
|
|
6067
7462
|
var _ref4 = (init_utils(), __toCommonJS(utils_exports)), asArray2 = _ref4.asArray, filterArray2 = _ref4.filterArray, filterPrimitives2 = _ref4.filterPrimitives, filterString2 = _ref4.filterString, filterStringOrStringArray2 = _ref4.filterStringOrStringArray, filterType2 = _ref4.filterType, getTrailingOptions2 = _ref4.getTrailingOptions, trailingFunctionArgument2 = _ref4.trailingFunctionArgument, trailingOptionsArgument2 = _ref4.trailingOptionsArgument;
|
|
6068
7463
|
var _ref5 = (init_apply_patch(), __toCommonJS(apply_patch_exports)), applyPatchTask2 = _ref5.applyPatchTask;
|
|
6069
7464
|
var _ref6 = (init_branch(), __toCommonJS(branch_exports)), branchTask2 = _ref6.branchTask, branchLocalTask2 = _ref6.branchLocalTask, deleteBranchesTask2 = _ref6.deleteBranchesTask, deleteBranchTask2 = _ref6.deleteBranchTask;
|
|
6070
7465
|
var _ref7 = (init_check_ignore(), __toCommonJS(check_ignore_exports)), checkIgnoreTask2 = _ref7.checkIgnoreTask;
|
|
6071
7466
|
var _ref8 = (init_check_is_repo(), __toCommonJS(check_is_repo_exports)), checkIsRepoTask2 = _ref8.checkIsRepoTask;
|
|
6072
|
-
var _ref9 = (
|
|
6073
|
-
var _ref10 = (
|
|
6074
|
-
var _ref11 = (
|
|
6075
|
-
var _ref12 = (
|
|
6076
|
-
var _ref13 = (
|
|
6077
|
-
var _ref14 = (
|
|
6078
|
-
var _ref15 = (
|
|
6079
|
-
var _ref16 = (
|
|
6080
|
-
var _ref17 = (
|
|
6081
|
-
var _ref18 = (
|
|
6082
|
-
var _ref19 = (
|
|
6083
|
-
var _ref20 = (
|
|
6084
|
-
var _ref21 = (init_task(), __toCommonJS(task_exports)), straightThroughBufferTask2 = _ref21.straightThroughBufferTask, straightThroughStringTask2 = _ref21.straightThroughStringTask;
|
|
7467
|
+
var _ref9 = (init_clean(), __toCommonJS(clean_exports)), cleanWithOptionsTask2 = _ref9.cleanWithOptionsTask, isCleanOptionsArray2 = _ref9.isCleanOptionsArray;
|
|
7468
|
+
var _ref10 = (init_diff(), __toCommonJS(diff_exports)), diffSummaryTask2 = _ref10.diffSummaryTask;
|
|
7469
|
+
var _ref11 = (init_fetch(), __toCommonJS(fetch_exports)), fetchTask2 = _ref11.fetchTask;
|
|
7470
|
+
var _ref12 = (init_move(), __toCommonJS(move_exports)), moveTask2 = _ref12.moveTask;
|
|
7471
|
+
var _ref13 = (init_pull(), __toCommonJS(pull_exports)), pullTask2 = _ref13.pullTask;
|
|
7472
|
+
var _ref14 = (init_push(), __toCommonJS(push_exports)), pushTagsTask2 = _ref14.pushTagsTask;
|
|
7473
|
+
var _ref15 = (init_remote(), __toCommonJS(remote_exports)), addRemoteTask2 = _ref15.addRemoteTask, getRemotesTask2 = _ref15.getRemotesTask, listRemotesTask2 = _ref15.listRemotesTask, remoteTask2 = _ref15.remoteTask, removeRemoteTask2 = _ref15.removeRemoteTask;
|
|
7474
|
+
var _ref16 = (init_reset(), __toCommonJS(reset_exports)), getResetMode2 = _ref16.getResetMode, resetTask2 = _ref16.resetTask;
|
|
7475
|
+
var _ref17 = (init_stash_list(), __toCommonJS(stash_list_exports)), stashListTask2 = _ref17.stashListTask;
|
|
7476
|
+
var _ref18 = (init_sub_module(), __toCommonJS(sub_module_exports)), addSubModuleTask2 = _ref18.addSubModuleTask, initSubModuleTask2 = _ref18.initSubModuleTask, subModuleTask2 = _ref18.subModuleTask, updateSubModuleTask2 = _ref18.updateSubModuleTask;
|
|
7477
|
+
var _ref19 = (init_tag(), __toCommonJS(tag_exports)), addAnnotatedTagTask2 = _ref19.addAnnotatedTagTask, addTagTask2 = _ref19.addTagTask, tagListTask2 = _ref19.tagListTask;
|
|
7478
|
+
var _ref20 = (init_task(), __toCommonJS(task_exports)), straightThroughBufferTask2 = _ref20.straightThroughBufferTask, straightThroughStringTask2 = _ref20.straightThroughStringTask;
|
|
6085
7479
|
function Git2(options, plugins) {
|
|
6086
7480
|
this._plugins = plugins;
|
|
6087
7481
|
this._executor = new GitExecutor2(options.baseDir, new Scheduler2(options.maxConcurrentProcesses), plugins);
|
|
@@ -6103,24 +7497,6 @@ var require_git = __commonJS({
|
|
|
6103
7497
|
Git2.prototype.stashList = function(options) {
|
|
6104
7498
|
return this._runTask(stashListTask2(trailingOptionsArgument2(arguments) || {}, filterArray2(options) && options || []), trailingFunctionArgument2(arguments));
|
|
6105
7499
|
};
|
|
6106
|
-
function createCloneTask(api, task, repoPath, localPath) {
|
|
6107
|
-
if (typeof repoPath !== "string") {
|
|
6108
|
-
return configurationErrorTask2("git.".concat(api, "() requires a string 'repoPath'"));
|
|
6109
|
-
}
|
|
6110
|
-
return task(repoPath, filterType2(localPath, filterString2), getTrailingOptions2(arguments));
|
|
6111
|
-
}
|
|
6112
|
-
Git2.prototype.clone = function() {
|
|
6113
|
-
return this._runTask(createCloneTask.apply(void 0, [
|
|
6114
|
-
"clone",
|
|
6115
|
-
cloneTask2
|
|
6116
|
-
].concat(Array.prototype.slice.call(arguments))), trailingFunctionArgument2(arguments));
|
|
6117
|
-
};
|
|
6118
|
-
Git2.prototype.mirror = function() {
|
|
6119
|
-
return this._runTask(createCloneTask.apply(void 0, [
|
|
6120
|
-
"mirror",
|
|
6121
|
-
cloneMirrorTask2
|
|
6122
|
-
].concat(Array.prototype.slice.call(arguments))), trailingFunctionArgument2(arguments));
|
|
6123
|
-
};
|
|
6124
7500
|
Git2.prototype.mv = function(from, to) {
|
|
6125
7501
|
return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments));
|
|
6126
7502
|
};
|
|
@@ -6139,8 +7515,9 @@ var require_git = __commonJS({
|
|
|
6139
7515
|
return this._runTask(fetchTask2(filterType2(remote, filterString2), filterType2(branch, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
|
|
6140
7516
|
};
|
|
6141
7517
|
Git2.prototype.silent = function(silence) {
|
|
6142
|
-
|
|
6143
|
-
|
|
7518
|
+
return this._runTask(adhocExecTask2(function() {
|
|
7519
|
+
return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.");
|
|
7520
|
+
}));
|
|
6144
7521
|
};
|
|
6145
7522
|
Git2.prototype.tags = function(options, then) {
|
|
6146
7523
|
return this._runTask(tagListTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
|
|
@@ -6316,7 +7693,9 @@ var require_git = __commonJS({
|
|
|
6316
7693
|
return this._runTask(task);
|
|
6317
7694
|
};
|
|
6318
7695
|
Git2.prototype.clearQueue = function() {
|
|
6319
|
-
return this
|
|
7696
|
+
return this._runTask(adhocExecTask2(function() {
|
|
7697
|
+
return console.warn("simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.");
|
|
7698
|
+
}));
|
|
6320
7699
|
};
|
|
6321
7700
|
Git2.prototype.checkIgnore = function(pathnames, then) {
|
|
6322
7701
|
return this._runTask(checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))), trailingFunctionArgument2(arguments));
|
|
@@ -6327,8 +7706,6 @@ var require_git = __commonJS({
|
|
|
6327
7706
|
module.exports = Git2;
|
|
6328
7707
|
}
|
|
6329
7708
|
});
|
|
6330
|
-
// src/lib/api.ts
|
|
6331
|
-
init_pathspec();
|
|
6332
7709
|
// src/lib/errors/git-construct-error.ts
|
|
6333
7710
|
init_git_error();
|
|
6334
7711
|
var GitConstructError = /*#__PURE__*/ function(GitError) {
|
|
@@ -6400,40 +7777,34 @@ function abortPlugin(signal) {
|
|
|
6400
7777
|
onSpawnAfter
|
|
6401
7778
|
];
|
|
6402
7779
|
}
|
|
6403
|
-
// src/lib/plugins/block-unsafe-operations-plugin.ts
|
|
6404
|
-
function isConfigSwitch(arg) {
|
|
6405
|
-
return typeof arg === "string" && arg.trim().toLowerCase() === "-c";
|
|
6406
|
-
}
|
|
6407
|
-
function preventProtocolOverride(arg, next) {
|
|
6408
|
-
if (!isConfigSwitch(arg)) {
|
|
6409
|
-
return;
|
|
6410
|
-
}
|
|
6411
|
-
if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) {
|
|
6412
|
-
return;
|
|
6413
|
-
}
|
|
6414
|
-
throw new GitPluginError(void 0, "unsafe", "Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol");
|
|
6415
|
-
}
|
|
6416
|
-
function preventUploadPack(arg, method) {
|
|
6417
|
-
if (/^\s*--(upload|receive)-pack/.test(arg)) {
|
|
6418
|
-
throw new GitPluginError(void 0, "unsafe", "Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");
|
|
6419
|
-
}
|
|
6420
|
-
if (method === "clone" && /^\s*-u\b/.test(arg)) {
|
|
6421
|
-
throw new GitPluginError(void 0, "unsafe", "Use of clone with option -u is not permitted without enabling allowUnsafePack");
|
|
6422
|
-
}
|
|
6423
|
-
if (method === "push" && /^\s*--exec\b/.test(arg)) {
|
|
6424
|
-
throw new GitPluginError(void 0, "unsafe", "Use of push with option --exec is not permitted without enabling allowUnsafePack");
|
|
6425
|
-
}
|
|
6426
|
-
}
|
|
6427
7780
|
function blockUnsafeOperationsPlugin() {
|
|
6428
|
-
var
|
|
7781
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
6429
7782
|
return {
|
|
6430
7783
|
type: "spawn.args",
|
|
6431
|
-
action: function action(args,
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
7784
|
+
action: function action(args, param) {
|
|
7785
|
+
var env = param.env;
|
|
7786
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
7787
|
+
try {
|
|
7788
|
+
for(var _iterator = ne(args, env)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
7789
|
+
var vulnerability = _step.value;
|
|
7790
|
+
if (options[vulnerability.category] !== true) {
|
|
7791
|
+
throw new GitPluginError(void 0, "unsafe", vulnerability.message);
|
|
7792
|
+
}
|
|
7793
|
+
}
|
|
7794
|
+
} catch (err) {
|
|
7795
|
+
_didIteratorError = true;
|
|
7796
|
+
_iteratorError = err;
|
|
7797
|
+
} finally{
|
|
7798
|
+
try {
|
|
7799
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
7800
|
+
_iterator.return();
|
|
7801
|
+
}
|
|
7802
|
+
} finally{
|
|
7803
|
+
if (_didIteratorError) {
|
|
7804
|
+
throw _iteratorError;
|
|
7805
|
+
}
|
|
7806
|
+
}
|
|
7807
|
+
}
|
|
6437
7808
|
return args;
|
|
6438
7809
|
}
|
|
6439
7810
|
};
|
|
@@ -6567,7 +7938,7 @@ init_utils();
|
|
|
6567
7938
|
var WRONG_NUMBER_ERR = "Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings";
|
|
6568
7939
|
var WRONG_CHARS_ERR = "Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";
|
|
6569
7940
|
function isBadArgument(arg) {
|
|
6570
|
-
return !arg || !/^([a-z]:)?([a-z0-9/.\\_
|
|
7941
|
+
return !arg || !/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(arg);
|
|
6571
7942
|
}
|
|
6572
7943
|
function toBinaryConfig(input, allowUnsafe) {
|
|
6573
7944
|
if (input.length < 1 || input.length > 2) {
|
|
@@ -6821,8 +8192,6 @@ function timeoutPlugin(param) {
|
|
|
6821
8192
|
};
|
|
6822
8193
|
}
|
|
6823
8194
|
}
|
|
6824
|
-
// src/lib/plugins/suffix-paths.plugin.ts
|
|
6825
|
-
init_pathspec();
|
|
6826
8195
|
function suffixPathsPlugin() {
|
|
6827
8196
|
return {
|
|
6828
8197
|
type: "spawn.args",
|
|
@@ -6835,13 +8204,13 @@ function suffixPathsPlugin() {
|
|
|
6835
8204
|
}
|
|
6836
8205
|
for(var i = 0; i < data.length; i++){
|
|
6837
8206
|
var param = data[i];
|
|
6838
|
-
if (
|
|
6839
|
-
append2(
|
|
8207
|
+
if (r(param)) {
|
|
8208
|
+
append2(o(param));
|
|
6840
8209
|
continue;
|
|
6841
8210
|
}
|
|
6842
8211
|
if (param === "--") {
|
|
6843
8212
|
append2(data.slice(i + 1).flatMap(function(item) {
|
|
6844
|
-
return
|
|
8213
|
+
return r(item) && o(item) || item;
|
|
6845
8214
|
}));
|
|
6846
8215
|
break;
|
|
6847
8216
|
}
|
|
@@ -6869,12 +8238,12 @@ function gitInstanceFactory(baseDir, options) {
|
|
|
6869
8238
|
plugins.add(commandConfigPrefixingPlugin(config.config));
|
|
6870
8239
|
}
|
|
6871
8240
|
plugins.add(blockUnsafeOperationsPlugin(config.unsafe));
|
|
6872
|
-
plugins.add(suffixPathsPlugin());
|
|
6873
8241
|
plugins.add(completionDetectionPlugin(config.completion));
|
|
6874
8242
|
config.abort && plugins.add(abortPlugin(config.abort));
|
|
6875
8243
|
config.progress && plugins.add(progressMonitorPlugin(config.progress));
|
|
6876
8244
|
config.timeout && plugins.add(timeoutPlugin(config.timeout));
|
|
6877
8245
|
config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));
|
|
8246
|
+
plugins.add(suffixPathsPlugin());
|
|
6878
8247
|
plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));
|
|
6879
8248
|
config.errors && plugins.add(errorDetectionPlugin(config.errors));
|
|
6880
8249
|
customBinaryPlugin(plugins, config.binary, (_config_unsafe = config.unsafe) === null || _config_unsafe === void 0 ? void 0 : _config_unsafe.allowUnsafeCustomBinary);
|