pruff-skills 1.0.1 → 1.1.0
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 +2 -2
- package/dist/_chunks/libs/@clack/core.mjs +5 -10
- package/dist/_chunks/libs/@clack/prompts.mjs +3 -3
- package/dist/_chunks/libs/@kwsites/file-exists.mjs +2 -2
- package/dist/_chunks/libs/@kwsites/promise-deferred.mjs +2 -2
- package/dist/_chunks/libs/@vercel/detect-agent.mjs +2 -6
- package/dist/_chunks/libs/simple-git.mjs +115 -92
- package/dist/_chunks/libs/xdg-basedir.mjs +1 -1
- package/dist/_chunks/rolldown-runtime.mjs +2 -2
- package/dist/cli.mjs +15 -10
- package/package.json +1 -1
- package/dist/THIRD-PARTY-LICENSES.md +0 -442
- package/dist/_chunks/libs/@simple-git/args-pathspec.mjs +0 -12
- package/dist/_chunks/libs/@simple-git/argv-parser.mjs +0 -465
package/ThirdPartyNoticeText.txt
CHANGED
|
@@ -66,7 +66,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
================================================================================
|
|
69
|
-
Package: simple-git@3.
|
|
69
|
+
Package: simple-git@3.30.0
|
|
70
70
|
License: MIT
|
|
71
71
|
Repository: https://github.com/steveukx/git-js
|
|
72
72
|
--------------------------------------------------------------------------------
|
|
@@ -139,7 +139,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
139
139
|
|
|
140
140
|
|
|
141
141
|
================================================================================
|
|
142
|
-
Package: yaml@2.
|
|
142
|
+
Package: yaml@2.8.3
|
|
143
143
|
License: ISC
|
|
144
144
|
Repository: https://github.com/eemeli/yaml
|
|
145
145
|
--------------------------------------------------------------------------------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as __toESM, t as __commonJSMin } 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,10 +637,7 @@ 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
|
|
641
|
-
const t = this.value.includes(u.value);
|
|
642
|
-
this.value = t ? this.value.filter((F) => F !== u.value) : [...this.value, u.value];
|
|
643
|
-
}
|
|
640
|
+
} else this.value = this.value.includes(u.value) ? this.value.filter((F) => F !== u.value) : [...this.value, u.value];
|
|
644
641
|
}
|
|
645
642
|
};
|
|
646
643
|
A = /* @__PURE__ */ new WeakMap();
|
|
@@ -674,12 +671,10 @@ let SD = class extends x {
|
|
|
674
671
|
return this.options[this.cursor].value;
|
|
675
672
|
}
|
|
676
673
|
toggleAll() {
|
|
677
|
-
|
|
678
|
-
this.value = u ? [] : this.options.map((t) => t.value);
|
|
674
|
+
this.value = this.value.length === this.options.length ? [] : this.options.map((t) => t.value);
|
|
679
675
|
}
|
|
680
676
|
toggleValue() {
|
|
681
|
-
|
|
682
|
-
this.value = u ? this.value.filter((t) => t !== this._value) : [...this.value, this._value];
|
|
677
|
+
this.value = this.value.includes(this._value) ? this.value.filter((t) => t !== this._value) : [...this.value, this._value];
|
|
683
678
|
}
|
|
684
679
|
};
|
|
685
680
|
var TD = Object.defineProperty, jD = (e, u, t) => u in e ? TD(e, u, {
|
|
@@ -769,4 +764,4 @@ var RD = class extends x {
|
|
|
769
764
|
});
|
|
770
765
|
}
|
|
771
766
|
};
|
|
772
|
-
export {
|
|
767
|
+
export { SD as a, fD as c, require_src as d, RD as i, pD as l, LD as n, _D as o, MD as r, dD as s, ID as t, require_picocolors as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __toESM } from "../../rolldown-runtime.mjs";
|
|
2
|
-
import {
|
|
1
|
+
import { r as __toESM } from "../../rolldown-runtime.mjs";
|
|
2
|
+
import { a as SD, c as fD, d as require_src, i as RD, l as pD, n as LD, o as _D, r as MD, s as dD, t as ID, u as require_picocolors } 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);
|
|
@@ -371,4 +371,4 @@ ${J}${i.trimStart()}`), r = 3 + stripVTControlCharacters(i.trimStart()).length);
|
|
|
371
371
|
}
|
|
372
372
|
};
|
|
373
373
|
};
|
|
374
|
-
export {
|
|
374
|
+
export { Y as a, ge as c, xe as d, ye as f, Se as i, he as l, M as n, be as o, Me as r, fe as s, Ie as t, ve as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __require, t as __commonJSMin } 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 {
|
|
562
|
+
export { require_src$1 as n, require_dist as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../rolldown-runtime.mjs";
|
|
1
|
+
import { t as __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 as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as __require, t as __commonJSMin } from "../../rolldown-runtime.mjs";
|
|
2
2
|
var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -134,9 +134,5 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
134
134
|
agent: void 0
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
-
0 && (module.exports = {
|
|
138
|
-
KNOWN_AGENTS,
|
|
139
|
-
determineAgent
|
|
140
|
-
});
|
|
141
137
|
}));
|
|
142
|
-
export { require_dist };
|
|
138
|
+
export { require_dist as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { __toESM } from "../rolldown-runtime.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ne } from "./@simple-git/argv-parser.mjs";
|
|
1
|
+
import { r as __toESM } from "../rolldown-runtime.mjs";
|
|
2
|
+
import { n as require_src, t as require_dist } from "./@kwsites/file-exists.mjs";
|
|
3
|
+
import { t as require_dist$1 } from "./@kwsites/promise-deferred.mjs";
|
|
4
|
+
import { Buffer as Buffer$1 } from "node:buffer";
|
|
6
5
|
import { spawn } from "child_process";
|
|
7
6
|
import { normalize } from "node:path";
|
|
8
7
|
import { EventEmitter } from "node:events";
|
|
@@ -35,6 +34,22 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
35
34
|
return to;
|
|
36
35
|
};
|
|
37
36
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
function pathspec(...paths) {
|
|
38
|
+
const key = new String(paths);
|
|
39
|
+
cache.set(key, paths);
|
|
40
|
+
return key;
|
|
41
|
+
}
|
|
42
|
+
function isPathSpec(path) {
|
|
43
|
+
return path instanceof String && cache.has(path);
|
|
44
|
+
}
|
|
45
|
+
function toPaths(pathSpec) {
|
|
46
|
+
return cache.get(pathSpec) || [];
|
|
47
|
+
}
|
|
48
|
+
var cache;
|
|
49
|
+
var init_pathspec = __esm({ "src/lib/args/pathspec.ts"() {
|
|
50
|
+
"use strict";
|
|
51
|
+
cache = /* @__PURE__ */ new WeakMap();
|
|
52
|
+
} });
|
|
38
53
|
var GitError;
|
|
39
54
|
var init_git_error = __esm({ "src/lib/errors/git-error.ts"() {
|
|
40
55
|
"use strict";
|
|
@@ -142,7 +157,7 @@ function prefixedArray(input, prefix) {
|
|
|
142
157
|
return output;
|
|
143
158
|
}
|
|
144
159
|
function bufferToString(input) {
|
|
145
|
-
return (Array.isArray(input) ? Buffer.concat(input) : input).toString("utf-8");
|
|
160
|
+
return (Array.isArray(input) ? Buffer$1.concat(input) : input).toString("utf-8");
|
|
146
161
|
}
|
|
147
162
|
function pick(source, properties) {
|
|
148
163
|
const out = {};
|
|
@@ -171,7 +186,7 @@ function filterType(input, filter, def) {
|
|
|
171
186
|
return arguments.length > 2 ? def : void 0;
|
|
172
187
|
}
|
|
173
188
|
function filterPrimitives(input, omit) {
|
|
174
|
-
const type =
|
|
189
|
+
const type = isPathSpec(input) ? "string" : typeof input;
|
|
175
190
|
return /number|string|boolean/.test(type) && (!omit || !omit.includes(type));
|
|
176
191
|
}
|
|
177
192
|
function filterPlainObject(input) {
|
|
@@ -183,6 +198,7 @@ function filterFunction(input) {
|
|
|
183
198
|
var filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength;
|
|
184
199
|
var init_argument_filters = __esm({ "src/lib/utils/argument-filters.ts"() {
|
|
185
200
|
"use strict";
|
|
201
|
+
init_pathspec();
|
|
186
202
|
init_util();
|
|
187
203
|
filterArray = (input) => {
|
|
188
204
|
return Array.isArray(input);
|
|
@@ -191,7 +207,7 @@ var init_argument_filters = __esm({ "src/lib/utils/argument-filters.ts"() {
|
|
|
191
207
|
return typeof input === "number";
|
|
192
208
|
};
|
|
193
209
|
filterString = (input) => {
|
|
194
|
-
return typeof input === "string"
|
|
210
|
+
return typeof input === "string";
|
|
195
211
|
};
|
|
196
212
|
filterStringOrStringArray = (input) => {
|
|
197
213
|
return filterString(input) || Array.isArray(input) && input.every(filterString);
|
|
@@ -291,7 +307,7 @@ function appendTaskOptions(options, commands = []) {
|
|
|
291
307
|
if (!filterPlainObject(options)) return commands;
|
|
292
308
|
return Object.keys(options).reduce((commands2, key) => {
|
|
293
309
|
const value = options[key];
|
|
294
|
-
if (
|
|
310
|
+
if (isPathSpec(value)) commands2.push(value);
|
|
295
311
|
else if (filterPrimitives(value, ["boolean"])) commands2.push(key + "=" + value);
|
|
296
312
|
else if (Array.isArray(value)) {
|
|
297
313
|
for (const v of value) if (!filterPrimitives(v, ["string", "number"])) commands2.push(key + "=" + v);
|
|
@@ -320,6 +336,7 @@ var init_task_options = __esm({ "src/lib/utils/task-options.ts"() {
|
|
|
320
336
|
"use strict";
|
|
321
337
|
init_argument_filters();
|
|
322
338
|
init_util();
|
|
339
|
+
init_pathspec();
|
|
323
340
|
} });
|
|
324
341
|
function callTaskParser(parser4, streams) {
|
|
325
342
|
return parser4(streams.stdOut, streams.stdErr);
|
|
@@ -1073,10 +1090,7 @@ var init_git_executor_chain = __esm({ "src/lib/runners/git-executor-chain.ts"()
|
|
|
1073
1090
|
}
|
|
1074
1091
|
async attemptRemoteTask(task, logger) {
|
|
1075
1092
|
const binary = this._plugins.exec("spawn.binary", "", pluginContext(task, task.commands));
|
|
1076
|
-
const args = this._plugins.exec("spawn.args", [...task.commands],
|
|
1077
|
-
...pluginContext(task, task.commands),
|
|
1078
|
-
env: { ...this.env }
|
|
1079
|
-
});
|
|
1093
|
+
const args = this._plugins.exec("spawn.args", [...task.commands], pluginContext(task, task.commands));
|
|
1080
1094
|
const raw = await this.gitResponse(task, binary, args, this.outputHandler, logger.step("SPAWN"));
|
|
1081
1095
|
const outputStreams = await this.handleTaskData(task, args, raw, logger.step("HANDLE"));
|
|
1082
1096
|
logger(`passing response to task's parser as a %s`, task.format);
|
|
@@ -1670,7 +1684,7 @@ function parseLogOptions(opt = {}, customArgs = []) {
|
|
|
1670
1684
|
const rangeOperator = opt.symmetric !== false ? "..." : "..";
|
|
1671
1685
|
suffix.push(`${opt.from || ""}${rangeOperator}${opt.to || ""}`);
|
|
1672
1686
|
}
|
|
1673
|
-
if (filterString(opt.file)) command.push("--follow",
|
|
1687
|
+
if (filterString(opt.file)) command.push("--follow", pathspec(opt.file));
|
|
1674
1688
|
appendTaskOptions(userOptions(opt), command);
|
|
1675
1689
|
return {
|
|
1676
1690
|
fields,
|
|
@@ -1704,6 +1718,7 @@ var excludeOptions;
|
|
|
1704
1718
|
var init_log = __esm({ "src/lib/tasks/log.ts"() {
|
|
1705
1719
|
"use strict";
|
|
1706
1720
|
init_log_format();
|
|
1721
|
+
init_pathspec();
|
|
1707
1722
|
init_parse_list_log_summary();
|
|
1708
1723
|
init_utils();
|
|
1709
1724
|
init_task();
|
|
@@ -2110,13 +2125,13 @@ function parser3(indexX, indexY, handler) {
|
|
|
2110
2125
|
return [`${indexX}${indexY}`, handler];
|
|
2111
2126
|
}
|
|
2112
2127
|
function conflicts(indexX, ...indexY) {
|
|
2113
|
-
return indexY.map((y) => parser3(indexX, y, (result, file) => result.conflicted
|
|
2128
|
+
return indexY.map((y) => parser3(indexX, y, (result, file) => append(result.conflicted, file)));
|
|
2114
2129
|
}
|
|
2115
2130
|
function splitLine(result, lineStr) {
|
|
2116
2131
|
const trimmed2 = lineStr.trim();
|
|
2117
2132
|
switch (" ") {
|
|
2118
|
-
case trimmed2.charAt(2): return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.
|
|
2119
|
-
case trimmed2.charAt(1): return data(" ", trimmed2.charAt(0), trimmed2.
|
|
2133
|
+
case trimmed2.charAt(2): return data(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.substr(3));
|
|
2134
|
+
case trimmed2.charAt(1): return data(" ", trimmed2.charAt(0), trimmed2.substr(2));
|
|
2120
2135
|
default: return;
|
|
2121
2136
|
}
|
|
2122
2137
|
function data(index, workingDir, path) {
|
|
@@ -2153,42 +2168,26 @@ var init_StatusSummary = __esm({ "src/lib/responses/StatusSummary.ts"() {
|
|
|
2153
2168
|
}
|
|
2154
2169
|
};
|
|
2155
2170
|
parsers6 = new Map([
|
|
2156
|
-
parser3(" ", "A", (result, file) => result.created
|
|
2157
|
-
parser3(" ", "D", (result, file) => result.deleted
|
|
2158
|
-
parser3(" ", "M", (result, file) => result.modified
|
|
2159
|
-
parser3("A", " ", (result, file) =>
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
parser3("
|
|
2164
|
-
result.created.push(file);
|
|
2165
|
-
result.staged.push(file);
|
|
2166
|
-
result.modified.push(file);
|
|
2167
|
-
}),
|
|
2168
|
-
parser3("D", " ", (result, file) => {
|
|
2169
|
-
result.deleted.push(file);
|
|
2170
|
-
result.staged.push(file);
|
|
2171
|
-
}),
|
|
2172
|
-
parser3("M", " ", (result, file) => {
|
|
2173
|
-
result.modified.push(file);
|
|
2174
|
-
result.staged.push(file);
|
|
2175
|
-
}),
|
|
2176
|
-
parser3("M", "M", (result, file) => {
|
|
2177
|
-
result.modified.push(file);
|
|
2178
|
-
result.staged.push(file);
|
|
2179
|
-
}),
|
|
2171
|
+
parser3(" ", "A", (result, file) => append(result.created, file)),
|
|
2172
|
+
parser3(" ", "D", (result, file) => append(result.deleted, file)),
|
|
2173
|
+
parser3(" ", "M", (result, file) => append(result.modified, file)),
|
|
2174
|
+
parser3("A", " ", (result, file) => append(result.created, file) && append(result.staged, file)),
|
|
2175
|
+
parser3("A", "M", (result, file) => append(result.created, file) && append(result.staged, file) && append(result.modified, file)),
|
|
2176
|
+
parser3("D", " ", (result, file) => append(result.deleted, file) && append(result.staged, file)),
|
|
2177
|
+
parser3("M", " ", (result, file) => append(result.modified, file) && append(result.staged, file)),
|
|
2178
|
+
parser3("M", "M", (result, file) => append(result.modified, file) && append(result.staged, file)),
|
|
2180
2179
|
parser3("R", " ", (result, file) => {
|
|
2181
|
-
result.renamed
|
|
2180
|
+
append(result.renamed, renamedFile(file));
|
|
2182
2181
|
}),
|
|
2183
2182
|
parser3("R", "M", (result, file) => {
|
|
2184
2183
|
const renamed = renamedFile(file);
|
|
2185
|
-
result.renamed
|
|
2186
|
-
result.modified
|
|
2184
|
+
append(result.renamed, renamed);
|
|
2185
|
+
append(result.modified, renamed.to);
|
|
2187
2186
|
}),
|
|
2188
2187
|
parser3("!", "!", (_result, _file) => {
|
|
2189
|
-
(_result.ignored = _result.ignored || []
|
|
2188
|
+
append(_result.ignored = _result.ignored || [], _file);
|
|
2190
2189
|
}),
|
|
2191
|
-
parser3("?", "?", (result, file) => result.not_added
|
|
2190
|
+
parser3("?", "?", (result, file) => append(result.not_added, file)),
|
|
2192
2191
|
...conflicts("A", "A", "U"),
|
|
2193
2192
|
...conflicts("D", "D", "U"),
|
|
2194
2193
|
...conflicts("U", "A", "D", "U"),
|
|
@@ -2291,36 +2290,6 @@ var init_version = __esm({ "src/lib/tasks/version.ts"() {
|
|
|
2291
2290
|
Object.assign(result, versionResponse(asNumber(major), asNumber(minor), patch, agent));
|
|
2292
2291
|
})];
|
|
2293
2292
|
} });
|
|
2294
|
-
function createCloneTask(api, task, repoPath, ...args) {
|
|
2295
|
-
if (!filterString(repoPath)) return configurationErrorTask(`git.${api}() requires a string 'repoPath'`);
|
|
2296
|
-
return task(repoPath, filterType(args[0], filterString), getTrailingOptions(arguments));
|
|
2297
|
-
}
|
|
2298
|
-
function clone_default() {
|
|
2299
|
-
return {
|
|
2300
|
-
clone(repo, ...rest) {
|
|
2301
|
-
return this._runTask(createCloneTask("clone", cloneTask, filterType(repo, filterString), ...rest), trailingFunctionArgument(arguments));
|
|
2302
|
-
},
|
|
2303
|
-
mirror(repo, ...rest) {
|
|
2304
|
-
return this._runTask(createCloneTask("mirror", cloneMirrorTask, filterType(repo, filterString), ...rest), trailingFunctionArgument(arguments));
|
|
2305
|
-
}
|
|
2306
|
-
};
|
|
2307
|
-
}
|
|
2308
|
-
var cloneTask, cloneMirrorTask;
|
|
2309
|
-
var init_clone = __esm({ "src/lib/tasks/clone.ts"() {
|
|
2310
|
-
"use strict";
|
|
2311
|
-
init_task();
|
|
2312
|
-
init_utils();
|
|
2313
|
-
cloneTask = (repo, directory, customArgs) => {
|
|
2314
|
-
const commands = ["clone", ...customArgs];
|
|
2315
|
-
filterString(repo) && commands.push(c(repo));
|
|
2316
|
-
filterString(directory) && commands.push(c(directory));
|
|
2317
|
-
return straightThroughStringTask(commands);
|
|
2318
|
-
};
|
|
2319
|
-
cloneMirrorTask = (repo, directory, customArgs) => {
|
|
2320
|
-
append(customArgs, "--mirror");
|
|
2321
|
-
return cloneTask(repo, directory, customArgs);
|
|
2322
|
-
};
|
|
2323
|
-
} });
|
|
2324
2293
|
var simple_git_api_exports = {};
|
|
2325
2294
|
__export(simple_git_api_exports, { SimpleGitApi: () => SimpleGitApi });
|
|
2326
2295
|
var SimpleGitApi;
|
|
@@ -2344,7 +2313,6 @@ var init_simple_git_api = __esm({ "src/lib/simple-git-api.ts"() {
|
|
|
2344
2313
|
init_task();
|
|
2345
2314
|
init_version();
|
|
2346
2315
|
init_utils();
|
|
2347
|
-
init_clone();
|
|
2348
2316
|
SimpleGitApi = class {
|
|
2349
2317
|
constructor(_executor) {
|
|
2350
2318
|
this._executor = _executor;
|
|
@@ -2403,7 +2371,7 @@ var init_simple_git_api = __esm({ "src/lib/simple-git-api.ts"() {
|
|
|
2403
2371
|
return this._runTask(statusTask(getTrailingOptions(arguments)), trailingFunctionArgument(arguments));
|
|
2404
2372
|
}
|
|
2405
2373
|
};
|
|
2406
|
-
Object.assign(SimpleGitApi.prototype, checkout_default(),
|
|
2374
|
+
Object.assign(SimpleGitApi.prototype, checkout_default(), commit_default(), config_default(), count_objects_default(), first_commit_default(), grep_default(), log_default(), show_default(), version_default());
|
|
2407
2375
|
} });
|
|
2408
2376
|
var scheduler_exports = {};
|
|
2409
2377
|
__export(scheduler_exports, { Scheduler: () => Scheduler });
|
|
@@ -2672,6 +2640,30 @@ var init_check_ignore = __esm({ "src/lib/tasks/check-ignore.ts"() {
|
|
|
2672
2640
|
"use strict";
|
|
2673
2641
|
init_CheckIgnore();
|
|
2674
2642
|
} });
|
|
2643
|
+
var clone_exports = {};
|
|
2644
|
+
__export(clone_exports, {
|
|
2645
|
+
cloneMirrorTask: () => cloneMirrorTask,
|
|
2646
|
+
cloneTask: () => cloneTask
|
|
2647
|
+
});
|
|
2648
|
+
function disallowedCommand(command) {
|
|
2649
|
+
return /^--upload-pack(=|$)/.test(command);
|
|
2650
|
+
}
|
|
2651
|
+
function cloneTask(repo, directory, customArgs) {
|
|
2652
|
+
const commands = ["clone", ...customArgs];
|
|
2653
|
+
filterString(repo) && commands.push(repo);
|
|
2654
|
+
filterString(directory) && commands.push(directory);
|
|
2655
|
+
if (commands.find(disallowedCommand)) return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);
|
|
2656
|
+
return straightThroughStringTask(commands);
|
|
2657
|
+
}
|
|
2658
|
+
function cloneMirrorTask(repo, directory, customArgs) {
|
|
2659
|
+
append(customArgs, "--mirror");
|
|
2660
|
+
return cloneTask(repo, directory, customArgs);
|
|
2661
|
+
}
|
|
2662
|
+
var init_clone = __esm({ "src/lib/tasks/clone.ts"() {
|
|
2663
|
+
"use strict";
|
|
2664
|
+
init_task();
|
|
2665
|
+
init_utils();
|
|
2666
|
+
} });
|
|
2675
2667
|
function parseFetchResult(stdOut, stdErr) {
|
|
2676
2668
|
return parseStringResponse({
|
|
2677
2669
|
raw: stdOut,
|
|
@@ -2717,13 +2709,13 @@ var init_parse_fetch = __esm({ "src/lib/parsers/parse-fetch.ts"() {
|
|
|
2717
2709
|
} });
|
|
2718
2710
|
var fetch_exports = {};
|
|
2719
2711
|
__export(fetch_exports, { fetchTask: () => fetchTask });
|
|
2720
|
-
function
|
|
2712
|
+
function disallowedCommand2(command) {
|
|
2721
2713
|
return /^--upload-pack(=|$)/.test(command);
|
|
2722
2714
|
}
|
|
2723
2715
|
function fetchTask(remote, branch, customArgs) {
|
|
2724
2716
|
const commands = ["fetch", ...customArgs];
|
|
2725
2717
|
if (remote && branch) commands.push(remote, branch);
|
|
2726
|
-
if (commands.find(
|
|
2718
|
+
if (commands.find(disallowedCommand2)) return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);
|
|
2727
2719
|
return {
|
|
2728
2720
|
commands,
|
|
2729
2721
|
format: "utf-8",
|
|
@@ -3012,12 +3004,13 @@ var require_git = __commonJS({ "src/git.js"(exports, module) {
|
|
|
3012
3004
|
var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS(git_executor_exports));
|
|
3013
3005
|
var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS(simple_git_api_exports));
|
|
3014
3006
|
var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS(scheduler_exports));
|
|
3015
|
-
var {
|
|
3007
|
+
var { configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS(task_exports));
|
|
3016
3008
|
var { asArray: asArray2, filterArray: filterArray2, filterPrimitives: filterPrimitives2, filterString: filterString2, filterStringOrStringArray: filterStringOrStringArray2, filterType: filterType2, getTrailingOptions: getTrailingOptions2, trailingFunctionArgument: trailingFunctionArgument2, trailingOptionsArgument: trailingOptionsArgument2 } = (init_utils(), __toCommonJS(utils_exports));
|
|
3017
3009
|
var { applyPatchTask: applyPatchTask2 } = (init_apply_patch(), __toCommonJS(apply_patch_exports));
|
|
3018
3010
|
var { branchTask: branchTask2, branchLocalTask: branchLocalTask2, deleteBranchesTask: deleteBranchesTask2, deleteBranchTask: deleteBranchTask2 } = (init_branch(), __toCommonJS(branch_exports));
|
|
3019
3011
|
var { checkIgnoreTask: checkIgnoreTask2 } = (init_check_ignore(), __toCommonJS(check_ignore_exports));
|
|
3020
3012
|
var { checkIsRepoTask: checkIsRepoTask2 } = (init_check_is_repo(), __toCommonJS(check_is_repo_exports));
|
|
3013
|
+
var { cloneTask: cloneTask2, cloneMirrorTask: cloneMirrorTask2 } = (init_clone(), __toCommonJS(clone_exports));
|
|
3021
3014
|
var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS(clean_exports));
|
|
3022
3015
|
var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS(diff_exports));
|
|
3023
3016
|
var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS(fetch_exports));
|
|
@@ -3048,6 +3041,16 @@ var require_git = __commonJS({ "src/git.js"(exports, module) {
|
|
|
3048
3041
|
Git2.prototype.stashList = function(options) {
|
|
3049
3042
|
return this._runTask(stashListTask2(trailingOptionsArgument2(arguments) || {}, filterArray2(options) && options || []), trailingFunctionArgument2(arguments));
|
|
3050
3043
|
};
|
|
3044
|
+
function createCloneTask(api, task, repoPath, localPath) {
|
|
3045
|
+
if (typeof repoPath !== "string") return configurationErrorTask2(`git.${api}() requires a string 'repoPath'`);
|
|
3046
|
+
return task(repoPath, filterType2(localPath, filterString2), getTrailingOptions2(arguments));
|
|
3047
|
+
}
|
|
3048
|
+
Git2.prototype.clone = function() {
|
|
3049
|
+
return this._runTask(createCloneTask("clone", cloneTask2, ...arguments), trailingFunctionArgument2(arguments));
|
|
3050
|
+
};
|
|
3051
|
+
Git2.prototype.mirror = function() {
|
|
3052
|
+
return this._runTask(createCloneTask("mirror", cloneMirrorTask2, ...arguments), trailingFunctionArgument2(arguments));
|
|
3053
|
+
};
|
|
3051
3054
|
Git2.prototype.mv = function(from, to) {
|
|
3052
3055
|
return this._runTask(moveTask2(from, to), trailingFunctionArgument2(arguments));
|
|
3053
3056
|
};
|
|
@@ -3066,7 +3069,8 @@ var require_git = __commonJS({ "src/git.js"(exports, module) {
|
|
|
3066
3069
|
return this._runTask(fetchTask2(filterType2(remote, filterString2), filterType2(branch, filterString2), getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
|
|
3067
3070
|
};
|
|
3068
3071
|
Git2.prototype.silent = function(silence) {
|
|
3069
|
-
|
|
3072
|
+
console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3");
|
|
3073
|
+
return this;
|
|
3070
3074
|
};
|
|
3071
3075
|
Git2.prototype.tags = function(options, then) {
|
|
3072
3076
|
return this._runTask(tagListTask2(getTrailingOptions2(arguments)), trailingFunctionArgument2(arguments));
|
|
@@ -3216,7 +3220,7 @@ var require_git = __commonJS({ "src/git.js"(exports, module) {
|
|
|
3216
3220
|
});
|
|
3217
3221
|
};
|
|
3218
3222
|
Git2.prototype.clearQueue = function() {
|
|
3219
|
-
return this
|
|
3223
|
+
return this;
|
|
3220
3224
|
};
|
|
3221
3225
|
Git2.prototype.checkIgnore = function(pathnames, then) {
|
|
3222
3226
|
return this._runTask(checkIgnoreTask2(asArray2(filterType2(pathnames, filterStringOrStringArray2, []))), trailingFunctionArgument2(arguments));
|
|
@@ -3226,6 +3230,7 @@ var require_git = __commonJS({ "src/git.js"(exports, module) {
|
|
|
3226
3230
|
};
|
|
3227
3231
|
module.exports = Git2;
|
|
3228
3232
|
} });
|
|
3233
|
+
init_pathspec();
|
|
3229
3234
|
init_git_error();
|
|
3230
3235
|
var GitConstructError = class extends GitError {
|
|
3231
3236
|
constructor(config, message) {
|
|
@@ -3269,11 +3274,28 @@ function abortPlugin(signal) {
|
|
|
3269
3274
|
}
|
|
3270
3275
|
}];
|
|
3271
3276
|
}
|
|
3272
|
-
function
|
|
3277
|
+
function isConfigSwitch(arg) {
|
|
3278
|
+
return typeof arg === "string" && arg.trim().toLowerCase() === "-c";
|
|
3279
|
+
}
|
|
3280
|
+
function preventProtocolOverride(arg, next) {
|
|
3281
|
+
if (!isConfigSwitch(arg)) return;
|
|
3282
|
+
if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) return;
|
|
3283
|
+
throw new GitPluginError(void 0, "unsafe", "Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol");
|
|
3284
|
+
}
|
|
3285
|
+
function preventUploadPack(arg, method) {
|
|
3286
|
+
if (/^\s*--(upload|receive)-pack/.test(arg)) throw new GitPluginError(void 0, "unsafe", `Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack`);
|
|
3287
|
+
if (method === "clone" && /^\s*-u\b/.test(arg)) throw new GitPluginError(void 0, "unsafe", `Use of clone with option -u is not permitted without enabling allowUnsafePack`);
|
|
3288
|
+
if (method === "push" && /^\s*--exec\b/.test(arg)) throw new GitPluginError(void 0, "unsafe", `Use of push with option --exec is not permitted without enabling allowUnsafePack`);
|
|
3289
|
+
}
|
|
3290
|
+
function blockUnsafeOperationsPlugin({ allowUnsafeProtocolOverride = false, allowUnsafePack = false } = {}) {
|
|
3273
3291
|
return {
|
|
3274
3292
|
type: "spawn.args",
|
|
3275
|
-
action(args,
|
|
3276
|
-
|
|
3293
|
+
action(args, context) {
|
|
3294
|
+
args.forEach((current, index) => {
|
|
3295
|
+
const next = index < args.length ? args[index + 1] : "";
|
|
3296
|
+
allowUnsafeProtocolOverride || preventProtocolOverride(current, next);
|
|
3297
|
+
allowUnsafePack || preventUploadPack(current, context.method);
|
|
3298
|
+
});
|
|
3277
3299
|
return args;
|
|
3278
3300
|
}
|
|
3279
3301
|
};
|
|
@@ -3346,7 +3368,7 @@ init_utils();
|
|
|
3346
3368
|
var WRONG_NUMBER_ERR = `Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings`;
|
|
3347
3369
|
var WRONG_CHARS_ERR = `Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option`;
|
|
3348
3370
|
function isBadArgument(arg) {
|
|
3349
|
-
return !arg || !/^([a-z]:)?([a-z0-9/.\\_
|
|
3371
|
+
return !arg || !/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(arg);
|
|
3350
3372
|
}
|
|
3351
3373
|
function toBinaryConfig(input, allowUnsafe) {
|
|
3352
3374
|
if (input.length < 1 || input.length > 2) throw new GitPluginError(void 0, "binary", WRONG_NUMBER_ERR);
|
|
@@ -3508,6 +3530,7 @@ function timeoutPlugin({ block, stdErr = true, stdOut = true }) {
|
|
|
3508
3530
|
}
|
|
3509
3531
|
};
|
|
3510
3532
|
}
|
|
3533
|
+
init_pathspec();
|
|
3511
3534
|
function suffixPathsPlugin() {
|
|
3512
3535
|
return {
|
|
3513
3536
|
type: "spawn.args",
|
|
@@ -3519,12 +3542,12 @@ function suffixPathsPlugin() {
|
|
|
3519
3542
|
}
|
|
3520
3543
|
for (let i = 0; i < data.length; i++) {
|
|
3521
3544
|
const param = data[i];
|
|
3522
|
-
if (
|
|
3523
|
-
append2(
|
|
3545
|
+
if (isPathSpec(param)) {
|
|
3546
|
+
append2(toPaths(param));
|
|
3524
3547
|
continue;
|
|
3525
3548
|
}
|
|
3526
3549
|
if (param === "--") {
|
|
3527
|
-
append2(data.slice(i + 1).flatMap((item) =>
|
|
3550
|
+
append2(data.slice(i + 1).flatMap((item) => isPathSpec(item) && toPaths(item) || item));
|
|
3528
3551
|
break;
|
|
3529
3552
|
}
|
|
3530
3553
|
prefix.push(param);
|
|
@@ -3545,12 +3568,12 @@ function gitInstanceFactory(baseDir, options) {
|
|
|
3545
3568
|
if (!folderExists(config.baseDir)) throw new GitConstructError(config, `Cannot use simple-git on a directory that does not exist`);
|
|
3546
3569
|
if (Array.isArray(config.config)) plugins.add(commandConfigPrefixingPlugin(config.config));
|
|
3547
3570
|
plugins.add(blockUnsafeOperationsPlugin(config.unsafe));
|
|
3571
|
+
plugins.add(suffixPathsPlugin());
|
|
3548
3572
|
plugins.add(completionDetectionPlugin(config.completion));
|
|
3549
3573
|
config.abort && plugins.add(abortPlugin(config.abort));
|
|
3550
3574
|
config.progress && plugins.add(progressMonitorPlugin(config.progress));
|
|
3551
3575
|
config.timeout && plugins.add(timeoutPlugin(config.timeout));
|
|
3552
3576
|
config.spawnOptions && plugins.add(spawnOptionsPlugin(config.spawnOptions));
|
|
3553
|
-
plugins.add(suffixPathsPlugin());
|
|
3554
3577
|
plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));
|
|
3555
3578
|
config.errors && plugins.add(errorDetectionPlugin(config.errors));
|
|
3556
3579
|
customBinaryPlugin(plugins, config.binary, config.unsafe?.allowUnsafeCustomBinary);
|
|
@@ -3558,4 +3581,4 @@ function gitInstanceFactory(baseDir, options) {
|
|
|
3558
3581
|
}
|
|
3559
3582
|
init_git_response_error();
|
|
3560
3583
|
var esm_default = gitInstanceFactory;
|
|
3561
|
-
export { esm_default };
|
|
3584
|
+
export { esm_default as t };
|
|
@@ -11,4 +11,4 @@ const xdgDataDirectories = (env.XDG_DATA_DIRS || "/usr/local/share/:/usr/share/"
|
|
|
11
11
|
if (xdgData) xdgDataDirectories.unshift(xdgData);
|
|
12
12
|
const xdgConfigDirectories = (env.XDG_CONFIG_DIRS || "/etc/xdg").split(":");
|
|
13
13
|
if (xdgConfig) xdgConfigDirectories.unshift(xdgConfig);
|
|
14
|
-
export { xdgConfig };
|
|
14
|
+
export { xdgConfig as t };
|
|
@@ -5,7 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJSMin = (cb, mod) => () => (mod ||
|
|
8
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
9
9
|
var __copyProps = (to, from, except, desc) => {
|
|
10
10
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
11
|
key = keys[i];
|
|
@@ -21,4 +21,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
24
|
-
export {
|
|
24
|
+
export { __require as n, __toESM as r, __commonJSMin as t };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { __toESM } from "./_chunks/rolldown-runtime.mjs";
|
|
3
|
-
import { pD, require_picocolors } from "./_chunks/libs/@clack/core.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
2
|
+
import { r as __toESM } from "./_chunks/rolldown-runtime.mjs";
|
|
3
|
+
import { l as pD, u as require_picocolors } from "./_chunks/libs/@clack/core.mjs";
|
|
4
|
+
import { a as Y, c as ge, d as xe, f as ye, i as Se, l as he, n as M, o as be, r as Me, s as fe, t as Ie, u as ve } from "./_chunks/libs/@clack/prompts.mjs";
|
|
5
|
+
import "./_chunks/libs/@kwsites/file-exists.mjs";
|
|
6
|
+
import "./_chunks/libs/@kwsites/promise-deferred.mjs";
|
|
7
|
+
import { t as esm_default } from "./_chunks/libs/simple-git.mjs";
|
|
8
|
+
import { t as xdgConfig } from "./_chunks/libs/xdg-basedir.mjs";
|
|
9
|
+
import { t as require_dist } from "./_chunks/libs/@vercel/detect-agent.mjs";
|
|
8
10
|
import { copyFileSync, cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "fs";
|
|
9
11
|
import { basename, dirname, isAbsolute, join, normalize, relative, resolve, sep } from "path";
|
|
10
12
|
import { fileURLToPath } from "url";
|
|
@@ -2135,6 +2137,7 @@ const PRUFF_CATALOG = process.env.PRUFF_SKILLS_CATALOG || "Pruff-Tech/pruff-skil
|
|
|
2135
2137
|
function isBareSkillName(value) {
|
|
2136
2138
|
return !!value && /^[a-z0-9][a-z0-9-]*$/.test(value) && !value.includes("/") && !value.includes(".") && !value.includes(":");
|
|
2137
2139
|
}
|
|
2140
|
+
const CATALOG_SCHEMA_VERSION = 1;
|
|
2138
2141
|
var CatalogSchemaError = class extends UserFacingError {};
|
|
2139
2142
|
function parseCatalogIndex(raw, sourceLabel) {
|
|
2140
2143
|
let parsed;
|
|
@@ -2144,7 +2147,7 @@ function parseCatalogIndex(raw, sourceLabel) {
|
|
|
2144
2147
|
throw new CatalogSchemaError(`Could not parse the catalog index from ${sourceLabel}: ${error.message}`);
|
|
2145
2148
|
}
|
|
2146
2149
|
const declared = parsed?.schemaVersion;
|
|
2147
|
-
if (typeof declared === "number" && declared >
|
|
2150
|
+
if (typeof declared === "number" && declared > CATALOG_SCHEMA_VERSION) throw new CatalogSchemaError(`The catalog at ${sourceLabel} declares index schema v${declared}, but this pruff-skills understands up to v${CATALOG_SCHEMA_VERSION}.\n Upgrade with: npm i -g pruff-skills@latest`);
|
|
2148
2151
|
return parsed ?? {};
|
|
2149
2152
|
}
|
|
2150
2153
|
var import_dist = require_dist();
|
|
@@ -2998,6 +3001,7 @@ async function isSourcePrivate(source) {
|
|
|
2998
3001
|
function getLockSource(parsedUrl, normalizedSource) {
|
|
2999
3002
|
return parsedUrl.startsWith("git@") || parsedUrl.startsWith("ssh://") ? parsedUrl : normalizedSource;
|
|
3000
3003
|
}
|
|
3004
|
+
function initTelemetry(version) {}
|
|
3001
3005
|
const DEFAULT_AGENTS = ["claude-code", "cursor"];
|
|
3002
3006
|
function riskLabel(risk) {
|
|
3003
3007
|
switch (risk) {
|
|
@@ -6316,7 +6320,7 @@ async function sweepLine(text, { slow = false, indent = " " } = {}) {
|
|
|
6316
6320
|
process.stdout.write("\x1B[?25l");
|
|
6317
6321
|
try {
|
|
6318
6322
|
let first = true;
|
|
6319
|
-
for (let pos = -
|
|
6323
|
+
for (let pos = -band; pos <= width; pos += step) {
|
|
6320
6324
|
if (!first) process.stdout.write("\x1B[1A");
|
|
6321
6325
|
process.stdout.write("\r" + renderSweepLine(chars, indent, pos, band) + "\n");
|
|
6322
6326
|
first = false;
|
|
@@ -6377,7 +6381,7 @@ async function showBlockLogo(lines, letterCuts, { slow = false, palette = BLUES
|
|
|
6377
6381
|
first = false;
|
|
6378
6382
|
await sleep(revealMs);
|
|
6379
6383
|
}
|
|
6380
|
-
for (let pos = -
|
|
6384
|
+
for (let pos = -band; pos <= width; pos += step) {
|
|
6381
6385
|
process.stdout.write(`\x1b[${rows}A`);
|
|
6382
6386
|
process.stdout.write("\r" + renderBlockLogoFrame(lines, palette, pos, band) + "\n");
|
|
6383
6387
|
await sleep(sweepMs);
|
|
@@ -7772,7 +7776,7 @@ function setupLocalDatabase(serverPath, env) {
|
|
|
7772
7776
|
const tenantName = `tenant-${clientId}`;
|
|
7773
7777
|
const tenantUrl = swapDbName(controlPlaneUrl, tenantName);
|
|
7774
7778
|
const adminEmail = `admin@${clientId}.com`;
|
|
7775
|
-
if (controlPlaneName !==
|
|
7779
|
+
if (controlPlaneName !== CONTROL_PLANE_DB) {
|
|
7776
7780
|
note(`Local database not set up — DATABASE_URL must point at "${CONTROL_PLANE_DB}".`);
|
|
7777
7781
|
M.warn(`DATABASE_URL points at ${import_picocolors.default.cyan(controlPlaneName)}, but Pruff-server hardcodes the local control plane as ${import_picocolors.default.cyan(CONTROL_PLANE_DB)}.\n Company/user seeds would silently write to the wrong database — fix local.env and re-run with --db.`);
|
|
7778
7782
|
return;
|
|
@@ -8776,6 +8780,7 @@ function getVersion() {
|
|
|
8776
8780
|
}
|
|
8777
8781
|
}
|
|
8778
8782
|
const VERSION = getVersion();
|
|
8783
|
+
initTelemetry(VERSION);
|
|
8779
8784
|
const BOLD = "\x1B[1m";
|
|
8780
8785
|
const TEXT = "\x1B[38;5;145m";
|
|
8781
8786
|
const BLUE = "\x1B[38;2;110;139;255m";
|