shoplazza-ai-dev-cli 0.1.5 → 0.1.6
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/ThirdPartyNoticeText.txt +48 -2
- package/dist/THIRD-PARTY-LICENSES.md +584 -0
- package/dist/_chunks/libs/@clack/core.mjs +10 -5
- package/dist/_chunks/libs/@clack/prompts.mjs +4 -6
- package/dist/_chunks/libs/@kwsites/file-exists.mjs +2 -2
- package/dist/_chunks/libs/@kwsites/promise-deferred.mjs +2 -2
- package/dist/_chunks/libs/@simple-git/args-pathspec.mjs +12 -0
- package/dist/_chunks/libs/@simple-git/argv-parser.mjs +465 -0
- package/dist/_chunks/libs/core-util-is.mjs +2 -2
- package/dist/_chunks/libs/immediate.mjs +2 -2
- package/dist/_chunks/libs/inherits.mjs +2 -4
- package/dist/_chunks/libs/isarray.mjs +2 -2
- package/dist/_chunks/libs/jszip.mjs +9 -13
- package/dist/_chunks/libs/simple-git.mjs +92 -115
- package/dist/_chunks/rolldown-runtime.mjs +2 -2
- package/dist/cli.mjs +521 -37
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJSMin, __toESM } from "../../rolldown-runtime.mjs";
|
|
2
2
|
import { stdin, stdout } from "node:process";
|
|
3
3
|
import * as g from "node:readline";
|
|
4
4
|
import O from "node:readline";
|
|
@@ -637,7 +637,10 @@ let _D = class extends x {
|
|
|
637
637
|
if (u.group === !0) {
|
|
638
638
|
const t = u.value, F = this.getGroupItems(t);
|
|
639
639
|
this.isGroupSelected(t) ? this.value = this.value.filter((s) => F.findIndex((i) => i.value === s) === -1) : this.value = [...this.value, ...F.map((s) => s.value)], this.value = Array.from(new Set(this.value));
|
|
640
|
-
} else
|
|
640
|
+
} else {
|
|
641
|
+
const t = this.value.includes(u.value);
|
|
642
|
+
this.value = t ? this.value.filter((F) => F !== u.value) : [...this.value, u.value];
|
|
643
|
+
}
|
|
641
644
|
}
|
|
642
645
|
};
|
|
643
646
|
A = /* @__PURE__ */ new WeakMap();
|
|
@@ -671,10 +674,12 @@ let SD = class extends x {
|
|
|
671
674
|
return this.options[this.cursor].value;
|
|
672
675
|
}
|
|
673
676
|
toggleAll() {
|
|
674
|
-
|
|
677
|
+
const u = this.value.length === this.options.length;
|
|
678
|
+
this.value = u ? [] : this.options.map((t) => t.value);
|
|
675
679
|
}
|
|
676
680
|
toggleValue() {
|
|
677
|
-
|
|
681
|
+
const u = this.value.includes(this._value);
|
|
682
|
+
this.value = u ? this.value.filter((t) => t !== this._value) : [...this.value, this._value];
|
|
678
683
|
}
|
|
679
684
|
};
|
|
680
685
|
var TD = Object.defineProperty, jD = (e, u, t) => u in e ? TD(e, u, {
|
|
@@ -764,4 +769,4 @@ var RD = class extends x {
|
|
|
764
769
|
});
|
|
765
770
|
}
|
|
766
771
|
};
|
|
767
|
-
export {
|
|
772
|
+
export { ID, LD, MD, RD, SD, _D, dD, fD, pD, require_picocolors, require_src };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { __toESM } from "../../rolldown-runtime.mjs";
|
|
2
|
+
import { LD, SD, _D, dD, fD, require_picocolors, require_src } from "./core.mjs";
|
|
3
3
|
import { stripVTControlCharacters } from "node:util";
|
|
4
4
|
import y from "node:process";
|
|
5
5
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
@@ -7,9 +7,7 @@ var import_src = require_src();
|
|
|
7
7
|
function ce() {
|
|
8
8
|
return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
9
9
|
}
|
|
10
|
-
const V = ce(), u = (t, n) => V ? t : n, le = u("◆", "*"), L = u("■", "x"), W = u("▲", "x"), C = u("◇", "o"), ue = u("┌", "T"), o = u("│", "|"), d = u("└", "—"), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]")
|
|
11
|
-
u("▪", "•");
|
|
12
|
-
const _ = u("─", "-"), me = u("╮", "+"), de = u("├", "+"), pe = u("╯", "+"), q = u("●", "•"), D = u("◆", "*"), U = u("▲", "!"), K = u("■", "x"), b = (t) => {
|
|
10
|
+
const V = ce(), u = (t, n) => V ? t : n, le = u("◆", "*"), L = u("■", "x"), W = u("▲", "x"), C = u("◇", "o"), ue = u("┌", "T"), o = u("│", "|"), d = u("└", "—"), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), _ = u("─", "-"), me = u("╮", "+"), de = u("├", "+"), pe = u("╯", "+"), q = u("●", "•"), D = u("◆", "*"), U = u("▲", "!"), K = u("■", "x"), b = (t) => {
|
|
13
11
|
switch (t) {
|
|
14
12
|
case "initial":
|
|
15
13
|
case "active": return import_picocolors.default.cyan(le);
|
|
@@ -331,4 +329,4 @@ ${J}${i.trimStart()}`), r = 3 + stripVTControlCharacters(i.trimStart()).length);
|
|
|
331
329
|
}
|
|
332
330
|
};
|
|
333
331
|
};
|
|
334
|
-
export {
|
|
332
|
+
export { Ie, M, Me, Se, Y, be, fe, ve, xe, ye };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJSMin, __require } from "../../rolldown-runtime.mjs";
|
|
2
2
|
var require_ms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
3
|
var s = 1e3;
|
|
4
4
|
var m = s * 60;
|
|
@@ -559,4 +559,4 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
559
559
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
560
560
|
__export(require_src());
|
|
561
561
|
}));
|
|
562
|
-
export { require_src$1 as
|
|
562
|
+
export { require_dist, require_src$1 as require_src };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJSMin } from "../../rolldown-runtime.mjs";
|
|
2
2
|
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.createDeferred = exports.deferred = void 0;
|
|
@@ -34,4 +34,4 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34
34
|
exports.deferred = deferred;
|
|
35
35
|
exports.createDeferred = deferred;
|
|
36
36
|
}));
|
|
37
|
-
export { require_dist
|
|
37
|
+
export { require_dist };
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
import { o, r } from "./args-pathspec.mjs";
|
|
2
|
+
function* U(e, t) {
|
|
3
|
+
const n = t === "global";
|
|
4
|
+
for (const o of e) o.isGlobal === n && (yield o);
|
|
5
|
+
}
|
|
6
|
+
const k = /* @__PURE__ */ new Set([
|
|
7
|
+
"--add",
|
|
8
|
+
"--edit",
|
|
9
|
+
"--remove-section",
|
|
10
|
+
"--rename-section",
|
|
11
|
+
"--replace-all",
|
|
12
|
+
"--unset",
|
|
13
|
+
"--unset-all",
|
|
14
|
+
"-e"
|
|
15
|
+
]), S = /* @__PURE__ */ new Set([
|
|
16
|
+
"--get",
|
|
17
|
+
"--get-all",
|
|
18
|
+
"--get-color",
|
|
19
|
+
"--get-colorbool",
|
|
20
|
+
"--get-regexp",
|
|
21
|
+
"--get-urlmatch",
|
|
22
|
+
"--list",
|
|
23
|
+
"-l"
|
|
24
|
+
]), P = /* @__PURE__ */ new Set([
|
|
25
|
+
"edit",
|
|
26
|
+
"remove-section",
|
|
27
|
+
"rename-section",
|
|
28
|
+
"set",
|
|
29
|
+
"unset"
|
|
30
|
+
]), E = /* @__PURE__ */ new Set([
|
|
31
|
+
"get",
|
|
32
|
+
"get-color",
|
|
33
|
+
"get-colorbool",
|
|
34
|
+
"list"
|
|
35
|
+
]);
|
|
36
|
+
function F(e, t) {
|
|
37
|
+
for (const { name: o } of U(e, "task")) {
|
|
38
|
+
if (k.has(o)) return p(!0, t);
|
|
39
|
+
if (S.has(o)) return p(!1, t);
|
|
40
|
+
}
|
|
41
|
+
const n = t.at(0)?.toLowerCase();
|
|
42
|
+
return n === void 0 ? null : P.has(n) ? p(!0, t.slice(1)) : E.has(n) ? p(!1, t.slice(1)) : t.length === 1 ? p(!1, t) : p(!0, t);
|
|
43
|
+
}
|
|
44
|
+
function p(e = !1, t = []) {
|
|
45
|
+
const n = t.at(0)?.toLowerCase();
|
|
46
|
+
return n === void 0 ? null : {
|
|
47
|
+
isWrite: e,
|
|
48
|
+
isRead: !e,
|
|
49
|
+
key: n,
|
|
50
|
+
value: t.at(1)
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function A(e, t) {
|
|
54
|
+
return t.isWrite && t.value !== void 0 ? {
|
|
55
|
+
key: t.key,
|
|
56
|
+
value: t.value,
|
|
57
|
+
scope: e
|
|
58
|
+
} : {
|
|
59
|
+
key: t.key,
|
|
60
|
+
scope: e
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function M(e) {
|
|
64
|
+
const t = e?.indexOf("=") || -1;
|
|
65
|
+
return !e || t < 0 ? null : {
|
|
66
|
+
key: e.slice(0, t).trim().toLowerCase(),
|
|
67
|
+
value: e.slice(t + 1)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function N(e) {
|
|
71
|
+
for (const { name: t } of U(e, "task")) switch (t) {
|
|
72
|
+
case "--global": return "global";
|
|
73
|
+
case "--system": return "system";
|
|
74
|
+
case "--worktree": return "worktree";
|
|
75
|
+
case "--local": return "local";
|
|
76
|
+
case "--file":
|
|
77
|
+
case "-f": return "file";
|
|
78
|
+
}
|
|
79
|
+
return "local";
|
|
80
|
+
}
|
|
81
|
+
function G({ name: e }) {
|
|
82
|
+
if (e === "-c" || e === "--config") return "inline";
|
|
83
|
+
if (e === "--config-env") return "env";
|
|
84
|
+
}
|
|
85
|
+
function* O(e) {
|
|
86
|
+
for (const t of e) {
|
|
87
|
+
const n = G(t), o = n && M(t.value);
|
|
88
|
+
o && (yield {
|
|
89
|
+
...o,
|
|
90
|
+
scope: n
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function L(e, t, n) {
|
|
95
|
+
const o = {
|
|
96
|
+
read: [],
|
|
97
|
+
write: [...O(t)]
|
|
98
|
+
};
|
|
99
|
+
return e === "config" && $(o, N(t), F(t, n)), o;
|
|
100
|
+
}
|
|
101
|
+
function $(e, t, n) {
|
|
102
|
+
if (n === null) return;
|
|
103
|
+
const o = A(t, n);
|
|
104
|
+
n.isWrite ? e.write.push(o) : e.read.push(o);
|
|
105
|
+
}
|
|
106
|
+
const x = { short: /* @__PURE__ */ new Map([["c", !0]]) }, D = {
|
|
107
|
+
short: new Map([
|
|
108
|
+
["C", !0],
|
|
109
|
+
["P", !1],
|
|
110
|
+
["h", !1],
|
|
111
|
+
["p", !1],
|
|
112
|
+
["v", !1],
|
|
113
|
+
...x.short.entries()
|
|
114
|
+
]),
|
|
115
|
+
long: /* @__PURE__ */ new Set([
|
|
116
|
+
"attr-source",
|
|
117
|
+
"config-env",
|
|
118
|
+
"exec-path",
|
|
119
|
+
"git-dir",
|
|
120
|
+
"list-cmds",
|
|
121
|
+
"namespace",
|
|
122
|
+
"super-prefix",
|
|
123
|
+
"work-tree"
|
|
124
|
+
])
|
|
125
|
+
}, R = {
|
|
126
|
+
clone: {
|
|
127
|
+
short: /* @__PURE__ */ new Map([
|
|
128
|
+
["b", !0],
|
|
129
|
+
["j", !0],
|
|
130
|
+
["l", !1],
|
|
131
|
+
["n", !1],
|
|
132
|
+
["o", !0],
|
|
133
|
+
["q", !1],
|
|
134
|
+
["s", !1],
|
|
135
|
+
["u", !0]
|
|
136
|
+
]),
|
|
137
|
+
long: /* @__PURE__ */ new Set([
|
|
138
|
+
"branch",
|
|
139
|
+
"config",
|
|
140
|
+
"jobs",
|
|
141
|
+
"origin",
|
|
142
|
+
"upload-pack",
|
|
143
|
+
"u",
|
|
144
|
+
"template"
|
|
145
|
+
])
|
|
146
|
+
},
|
|
147
|
+
commit: {
|
|
148
|
+
short: /* @__PURE__ */ new Map([
|
|
149
|
+
["C", !0],
|
|
150
|
+
["F", !0],
|
|
151
|
+
["c", !0],
|
|
152
|
+
["m", !0],
|
|
153
|
+
["t", !0]
|
|
154
|
+
]),
|
|
155
|
+
long: /* @__PURE__ */ new Set([
|
|
156
|
+
"file",
|
|
157
|
+
"message",
|
|
158
|
+
"reedit-message",
|
|
159
|
+
"reuse-message",
|
|
160
|
+
"template"
|
|
161
|
+
])
|
|
162
|
+
},
|
|
163
|
+
config: {
|
|
164
|
+
short: /* @__PURE__ */ new Map([
|
|
165
|
+
["e", !1],
|
|
166
|
+
["f", !0],
|
|
167
|
+
["l", !1]
|
|
168
|
+
]),
|
|
169
|
+
long: /* @__PURE__ */ new Set([
|
|
170
|
+
"blob",
|
|
171
|
+
"comment",
|
|
172
|
+
"default",
|
|
173
|
+
"file",
|
|
174
|
+
"type",
|
|
175
|
+
"value"
|
|
176
|
+
])
|
|
177
|
+
},
|
|
178
|
+
fetch: {
|
|
179
|
+
short: /* @__PURE__ */ new Map(),
|
|
180
|
+
long: /* @__PURE__ */ new Set(["upload-pack"])
|
|
181
|
+
},
|
|
182
|
+
init: {
|
|
183
|
+
short: /* @__PURE__ */ new Map(),
|
|
184
|
+
long: /* @__PURE__ */ new Set(["template"])
|
|
185
|
+
},
|
|
186
|
+
pull: {
|
|
187
|
+
short: /* @__PURE__ */ new Map(),
|
|
188
|
+
long: /* @__PURE__ */ new Set(["upload-pack"])
|
|
189
|
+
},
|
|
190
|
+
push: {
|
|
191
|
+
short: /* @__PURE__ */ new Map(),
|
|
192
|
+
long: /* @__PURE__ */ new Set(["exec", "receive-pack"])
|
|
193
|
+
}
|
|
194
|
+
}, T = {
|
|
195
|
+
short: /* @__PURE__ */ new Map(),
|
|
196
|
+
long: /* @__PURE__ */ new Set()
|
|
197
|
+
};
|
|
198
|
+
function I(e) {
|
|
199
|
+
const t = R[e ?? ""] ?? T;
|
|
200
|
+
return {
|
|
201
|
+
short: new Map([...x.short.entries(), ...t.short.entries()]),
|
|
202
|
+
long: t.long
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function b(e, t = D) {
|
|
206
|
+
if (e.startsWith("--")) {
|
|
207
|
+
const n = e.indexOf("=");
|
|
208
|
+
if (n > 2) return [{
|
|
209
|
+
name: e.slice(0, n),
|
|
210
|
+
value: e.slice(n + 1),
|
|
211
|
+
needsNext: !1
|
|
212
|
+
}];
|
|
213
|
+
const o = e.slice(2);
|
|
214
|
+
return [{
|
|
215
|
+
name: e,
|
|
216
|
+
needsNext: t.long.has(o)
|
|
217
|
+
}];
|
|
218
|
+
}
|
|
219
|
+
if (e.length === 2) {
|
|
220
|
+
const n = e.charAt(1);
|
|
221
|
+
return [{
|
|
222
|
+
name: e,
|
|
223
|
+
needsNext: t.short.get(n) === !0
|
|
224
|
+
}];
|
|
225
|
+
}
|
|
226
|
+
return W(e, t.short);
|
|
227
|
+
}
|
|
228
|
+
function W(e, t) {
|
|
229
|
+
const n = e.slice(1).split(""), o = [];
|
|
230
|
+
for (let s = 0; s < n.length; s++) {
|
|
231
|
+
const r = n[s], l = t.get(r);
|
|
232
|
+
if (l === void 0) return [{
|
|
233
|
+
name: e,
|
|
234
|
+
needsNext: !1
|
|
235
|
+
}];
|
|
236
|
+
if (l) {
|
|
237
|
+
const a = n.slice(s + 1).join("");
|
|
238
|
+
if (a && ![...a].every((w) => t.has(w))) return o.push({
|
|
239
|
+
name: `-${r}`,
|
|
240
|
+
value: a,
|
|
241
|
+
needsNext: !1
|
|
242
|
+
}), o;
|
|
243
|
+
}
|
|
244
|
+
o.push({
|
|
245
|
+
name: `-${r}`,
|
|
246
|
+
needsNext: l
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
return o;
|
|
250
|
+
}
|
|
251
|
+
function j(e, t = []) {
|
|
252
|
+
let n = 0;
|
|
253
|
+
for (; n < e.length;) {
|
|
254
|
+
const o = String(e[n]);
|
|
255
|
+
if (!o.startsWith("-") || o.length < 2) break;
|
|
256
|
+
const s = b(o);
|
|
257
|
+
let r = n + 1;
|
|
258
|
+
for (const l of s) {
|
|
259
|
+
const a = {
|
|
260
|
+
name: l.name,
|
|
261
|
+
value: l.value,
|
|
262
|
+
absorbedNext: !1,
|
|
263
|
+
isGlobal: !0
|
|
264
|
+
};
|
|
265
|
+
l.needsNext && a.value === void 0 && r < e.length && (a.value = String(e[r]), a.absorbedNext = !0, r++), t.push(a);
|
|
266
|
+
}
|
|
267
|
+
n = r;
|
|
268
|
+
}
|
|
269
|
+
return {
|
|
270
|
+
flags: t,
|
|
271
|
+
taskIndex: n
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function B(e, t, n = []) {
|
|
275
|
+
const o$1 = I(t), s = [], r$1 = [];
|
|
276
|
+
let l = 0;
|
|
277
|
+
for (; l < e.length;) {
|
|
278
|
+
const a = e[l];
|
|
279
|
+
if (r(a)) {
|
|
280
|
+
r$1.push(...o(a)), l++;
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
const f = String(a);
|
|
284
|
+
if (f === "--") {
|
|
285
|
+
for (let g = l + 1; g < e.length; g++) {
|
|
286
|
+
const u = e[g];
|
|
287
|
+
r(u) ? r$1.push(...o(u)) : r$1.push(String(u));
|
|
288
|
+
}
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
if (!f.startsWith("-") || f.length < 2) {
|
|
292
|
+
s.push(f), l++;
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
const w = b(f, o$1);
|
|
296
|
+
let d = l + 1;
|
|
297
|
+
for (const g of w) {
|
|
298
|
+
const u = {
|
|
299
|
+
name: g.name,
|
|
300
|
+
value: g.value,
|
|
301
|
+
absorbedNext: !1,
|
|
302
|
+
isGlobal: !1
|
|
303
|
+
};
|
|
304
|
+
g.needsNext && u.value === void 0 && d < e.length && !r(e[d]) && (u.value = String(e[d]), u.absorbedNext = !0, d++), n.push(u);
|
|
305
|
+
}
|
|
306
|
+
l = d;
|
|
307
|
+
}
|
|
308
|
+
return {
|
|
309
|
+
flags: n,
|
|
310
|
+
positionals: s,
|
|
311
|
+
pathspecs: r$1
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
function* V({ write: e }) {
|
|
315
|
+
for (const t of e) for (const n of q) {
|
|
316
|
+
const o = n(t.key);
|
|
317
|
+
o && (yield o);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
function c(e, t, n = String(e)) {
|
|
321
|
+
const o = typeof e == "string" ? new RegExp(`\\s*${e.toLowerCase()}`) : e;
|
|
322
|
+
return function(r) {
|
|
323
|
+
if (o.test(r)) return {
|
|
324
|
+
category: t,
|
|
325
|
+
message: `Configuring ${n} is not permitted without enabling ${t}`
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
function i(e, t) {
|
|
330
|
+
return c(new RegExp(`\\s*${e.toLowerCase().replace(/\./g, "(..+)?.")}`), t, e);
|
|
331
|
+
}
|
|
332
|
+
const q = [
|
|
333
|
+
c("alias", "allowUnsafeAlias"),
|
|
334
|
+
c("core.askPass", "allowUnsafeAskPass"),
|
|
335
|
+
c("core.editor", "allowUnsafeEditor"),
|
|
336
|
+
c("core.fsmonitor", "allowUnsafeFsMonitor"),
|
|
337
|
+
c("core.gitProxy", "allowUnsafeGitProxy"),
|
|
338
|
+
c("core.hooksPath", "allowUnsafeHooksPath"),
|
|
339
|
+
c("core.pager", "allowUnsafePager"),
|
|
340
|
+
c("core.sshCommand", "allowUnsafeSshCommand"),
|
|
341
|
+
i("credential.helper", "allowUnsafeCredentialHelper"),
|
|
342
|
+
i("diff.command", "allowUnsafeDiffExternal"),
|
|
343
|
+
c("diff.external", "allowUnsafeDiffExternal"),
|
|
344
|
+
i("diff.textconv", "allowUnsafeDiffTextConv"),
|
|
345
|
+
i("filter.clean", "allowUnsafeFilter"),
|
|
346
|
+
i("filter.smudge", "allowUnsafeFilter"),
|
|
347
|
+
i("gpg.program", "allowUnsafeGpgProgram"),
|
|
348
|
+
c("init.templateDir", "allowUnsafeTemplateDir"),
|
|
349
|
+
i("merge.driver", "allowUnsafeMergeDriver"),
|
|
350
|
+
i("mergetool.path", "allowUnsafeMergeDriver"),
|
|
351
|
+
i("mergetool.cmd", "allowUnsafeMergeDriver"),
|
|
352
|
+
i("protocol.allow", "allowUnsafeProtocolOverride"),
|
|
353
|
+
i("remote.receivepack", "allowUnsafePack"),
|
|
354
|
+
i("remote.uploadpack", "allowUnsafePack"),
|
|
355
|
+
c("sequence.editor", "allowUnsafeEditor")
|
|
356
|
+
];
|
|
357
|
+
function* K(e, t) {
|
|
358
|
+
for (const n of t) for (const o of H) {
|
|
359
|
+
const s = o(e, n.name);
|
|
360
|
+
s && (yield s);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
function h(e, t, n, o = String(t)) {
|
|
364
|
+
const s = typeof t == "string" ? new RegExp(`\\s*${t.toLowerCase()}`) : t, r = `Use of ${e ? `${e} with option ` : ""}${o} is not permitted without enabling ${n}`;
|
|
365
|
+
return function(a, f) {
|
|
366
|
+
if ((!e || a === e) && s.test(f)) return {
|
|
367
|
+
category: n,
|
|
368
|
+
message: r
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
const H = [
|
|
373
|
+
h(null, /--(upload|receive)-pack/, "allowUnsafePack", "--upload-pack or --receive-pack"),
|
|
374
|
+
h("clone", /^-\w*u/, "allowUnsafePack"),
|
|
375
|
+
h("clone", "--u", "allowUnsafePack"),
|
|
376
|
+
h("push", "--exec", "allowUnsafePack"),
|
|
377
|
+
h(null, "--template", "allowUnsafeTemplateDir")
|
|
378
|
+
];
|
|
379
|
+
function C(e, t, n) {
|
|
380
|
+
return [...K(e, t), ...V(n)];
|
|
381
|
+
}
|
|
382
|
+
function Y(...e) {
|
|
383
|
+
const { flags: t, taskIndex: n } = j(e), o = n < e.length ? String(e[n]).toLowerCase() : null, { positionals: r, pathspecs: l } = B(o !== null ? e.slice(n + 1) : [], o, t), a = L(o, t, r);
|
|
384
|
+
return {
|
|
385
|
+
task: o,
|
|
386
|
+
flags: t.map(J),
|
|
387
|
+
paths: l,
|
|
388
|
+
config: a,
|
|
389
|
+
vulnerabilities: z(C(o, t, a))
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
function z(e) {
|
|
393
|
+
return Object.defineProperty(e, "vulnerabilities", { value: e });
|
|
394
|
+
}
|
|
395
|
+
function J({ value: e, name: t }) {
|
|
396
|
+
return e !== void 0 ? {
|
|
397
|
+
name: t,
|
|
398
|
+
value: e
|
|
399
|
+
} : { name: t };
|
|
400
|
+
}
|
|
401
|
+
const y = {
|
|
402
|
+
editor: "allowUnsafeEditor",
|
|
403
|
+
git_askpass: "allowUnsafeAskPass",
|
|
404
|
+
git_config_global: "allowUnsafeConfigPaths",
|
|
405
|
+
git_config_system: "allowUnsafeConfigPaths",
|
|
406
|
+
git_config_count: "allowUnsafeConfigEnvCount",
|
|
407
|
+
git_config: "allowUnsafeConfigPaths",
|
|
408
|
+
git_editor: "allowUnsafeEditor",
|
|
409
|
+
git_exec_path: "allowUnsafeConfigPaths",
|
|
410
|
+
git_external_diff: "allowUnsafeDiffExternal",
|
|
411
|
+
git_pager: "allowUnsafePager",
|
|
412
|
+
git_proxy_command: "allowUnsafeGitProxy",
|
|
413
|
+
git_template_dir: "allowUnsafeTemplateDir",
|
|
414
|
+
git_sequence_editor: "allowUnsafeEditor",
|
|
415
|
+
git_ssh: "allowUnsafeSshCommand",
|
|
416
|
+
git_ssh_command: "allowUnsafeSshCommand",
|
|
417
|
+
pager: "allowUnsafePager",
|
|
418
|
+
prefix: "allowUnsafeConfigPaths",
|
|
419
|
+
ssh_askpass: "allowUnsafeAskPass"
|
|
420
|
+
};
|
|
421
|
+
function* Q(e) {
|
|
422
|
+
const t = parseInt(e.git_config_count ?? "0", 10);
|
|
423
|
+
for (let n = 0; n < t; n++) {
|
|
424
|
+
const o = e[`git_config_key_${n}`], s = e[`git_config_value_${n}`];
|
|
425
|
+
o !== void 0 && (yield {
|
|
426
|
+
key: o.toLowerCase().trim(),
|
|
427
|
+
value: s,
|
|
428
|
+
scope: "env"
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
function* X(e) {
|
|
433
|
+
for (const t of Object.keys(e)) if (_(t)) {
|
|
434
|
+
const n = y[t];
|
|
435
|
+
yield {
|
|
436
|
+
category: n,
|
|
437
|
+
message: `Use of "${t.toUpperCase()}" is not permitted without enabling ${n}`
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
function _(e) {
|
|
442
|
+
return Object.hasOwn(y, e);
|
|
443
|
+
}
|
|
444
|
+
function Z(e) {
|
|
445
|
+
const t = {};
|
|
446
|
+
for (const [n, o] of Object.entries(e)) {
|
|
447
|
+
const s = n.toLowerCase().trim();
|
|
448
|
+
(_(s) || s.startsWith("git")) && (t[s] = String(o));
|
|
449
|
+
}
|
|
450
|
+
return t;
|
|
451
|
+
}
|
|
452
|
+
function ee(e) {
|
|
453
|
+
const t = Z(e), n = {
|
|
454
|
+
read: [],
|
|
455
|
+
write: [...Q(t)]
|
|
456
|
+
};
|
|
457
|
+
return {
|
|
458
|
+
config: n,
|
|
459
|
+
vulnerabilities: [...X(t), ...C(null, [], n)]
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
function ne(e, t) {
|
|
463
|
+
return [...Y(...e).vulnerabilities, ...ee(t).vulnerabilities];
|
|
464
|
+
}
|
|
465
|
+
export { ne };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJSMin, __require } from "../rolldown-runtime.mjs";
|
|
2
2
|
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3
3
|
function isArray(arg) {
|
|
4
4
|
if (Array.isArray) return Array.isArray(arg);
|
|
@@ -62,4 +62,4 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
62
62
|
return Object.prototype.toString.call(o);
|
|
63
63
|
}
|
|
64
64
|
}));
|
|
65
|
-
export { require_util
|
|
65
|
+
export { require_util };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJSMin } from "../rolldown-runtime.mjs";
|
|
2
2
|
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
3
|
var Mutation = global.MutationObserver || global.WebKitMutationObserver;
|
|
4
4
|
var scheduleDrain;
|
|
@@ -52,4 +52,4 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
52
52
|
if (queue.push(task) === 1 && !draining) scheduleDrain();
|
|
53
53
|
}
|
|
54
54
|
}));
|
|
55
|
-
export { require_lib
|
|
55
|
+
export { require_lib };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJSMin, __require } from "../rolldown-runtime.mjs";
|
|
2
2
|
var require_inherits_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
3
|
if (typeof Object.create === "function") module.exports = function inherits(ctor, superCtor) {
|
|
4
4
|
if (superCtor) {
|
|
@@ -24,12 +24,10 @@ var require_inherits_browser = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
24
24
|
var require_inherits = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
25
25
|
try {
|
|
26
26
|
var util = __require("util");
|
|
27
|
-
/* istanbul ignore next */
|
|
28
27
|
if (typeof util.inherits !== "function") throw "";
|
|
29
28
|
module.exports = util.inherits;
|
|
30
29
|
} catch (e) {
|
|
31
|
-
/* istanbul ignore next */
|
|
32
30
|
module.exports = require_inherits_browser();
|
|
33
31
|
}
|
|
34
32
|
}));
|
|
35
|
-
export { require_inherits
|
|
33
|
+
export { require_inherits };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __commonJSMin } from "../rolldown-runtime.mjs";
|
|
2
2
|
var require_isarray = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
3
|
var toString = {}.toString;
|
|
4
4
|
module.exports = Array.isArray || function(arr) {
|
|
5
5
|
return toString.call(arr) == "[object Array]";
|
|
6
6
|
};
|
|
7
7
|
}));
|
|
8
|
-
export { require_isarray
|
|
8
|
+
export { require_isarray };
|