piclaw 0.0.4 → 0.0.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/.output/nitro.json +1 -1
- package/.output/public/assets/dist-D51xeTP2.js +12 -0
- package/.output/public/assets/index-B3x2_en6.css +1 -0
- package/.output/public/assets/index-SfjxJZSD.js +38 -0
- package/.output/public/assets/md4x-CNLJ57xO.wasm +0 -0
- package/.output/public/assets/md4x-CyfQToGJ.js +1 -0
- package/.output/public/assets/wasm-Cm7RZrwg.js +1 -0
- package/.output/public/icon.svg +25 -0
- package/.output/public/index.html +3 -2
- package/.output/public/manifest.json +1 -1
- package/.output/server/_chunks/bun.mjs +49 -0
- package/.output/server/_chunks/commands.mjs +280 -0
- package/.output/server/_chunks/config.mjs +2 -4
- package/.output/server/_chunks/db.mjs +11 -5
- package/.output/server/_chunks/logger.mjs +1 -1
- package/.output/server/_chunks/node.mjs +31 -0
- package/.output/server/_chunks/ntfy.mjs +45 -0
- package/.output/server/_chunks/pi.mjs +33 -1
- package/.output/server/_chunks/renderer-template.mjs +1 -1
- package/.output/server/_chunks/{bootstrap.mjs → server.mjs} +203 -205
- package/.output/server/_chunks/session.mjs +249 -40
- package/.output/server/_chunks/settings.mjs +1 -1
- package/.output/server/_chunks/terminal.mjs +35 -20
- package/.output/server/_chunks/virtual.mjs +129 -0
- package/.output/server/_jid_.delete.mjs +2 -2
- package/.output/server/_jid_.patch.mjs +30 -3
- package/.output/server/_jid_2.delete.mjs +2 -2
- package/.output/server/_libs/@aws-sdk/client-bedrock-runtime+[...].mjs +13148 -13149
- package/.output/server/_libs/@aws-sdk/credential-provider-http+[...].mjs +1 -1
- package/.output/server/_libs/@aws-sdk/credential-provider-ini+[...].mjs +2 -2
- package/.output/server/_libs/@aws-sdk/credential-provider-process+[...].mjs +1 -1
- package/.output/server/_libs/@aws-sdk/credential-provider-sso+[...].mjs +1 -1
- package/.output/server/_libs/@aws-sdk/credential-provider-web-identity+[...].mjs +1 -1
- package/.output/server/_libs/@google/genai.mjs +2 -2
- package/.output/server/_libs/@mariozechner/pi-agent-core+[...].mjs +40 -74
- package/.output/server/_libs/@mariozechner/pi-coding-agent+[...].mjs +1315 -1210
- package/.output/server/_libs/@smithy/credential-provider-imds+[...].mjs +3 -3
- package/.output/server/_libs/_.mjs +3 -2
- package/.output/server/_libs/_100.mjs +3 -0
- package/.output/server/_libs/_101.mjs +2 -0
- package/.output/server/_libs/_102.mjs +3 -0
- package/.output/server/_libs/_103.mjs +2 -0
- package/.output/server/_libs/_16.mjs +2 -5
- package/.output/server/_libs/_17.mjs +2 -3
- package/.output/server/_libs/_18.mjs +2 -3
- package/.output/server/_libs/_19.mjs +2 -4
- package/.output/server/_libs/_2.mjs +2 -3
- package/.output/server/_libs/_20.mjs +2 -2
- package/.output/server/_libs/_21.mjs +2 -0
- package/.output/server/_libs/_22.mjs +2 -0
- package/.output/server/_libs/_23.mjs +2 -0
- package/.output/server/_libs/_24.mjs +2 -0
- package/.output/server/_libs/_25.mjs +2 -0
- package/.output/server/_libs/_26.mjs +2 -0
- package/.output/server/_libs/_27.mjs +2 -0
- package/.output/server/_libs/_28.mjs +2 -0
- package/.output/server/_libs/_29.mjs +2 -0
- package/.output/server/_libs/_30.mjs +2 -0
- package/.output/server/_libs/_31.mjs +2 -0
- package/.output/server/_libs/_32.mjs +2 -0
- package/.output/server/_libs/_33.mjs +2 -0
- package/.output/server/_libs/_34.mjs +2 -0
- package/.output/server/_libs/_35.mjs +2 -0
- package/.output/server/_libs/_36.mjs +2 -0
- package/.output/server/_libs/_37.mjs +2 -0
- package/.output/server/_libs/_38.mjs +2 -0
- package/.output/server/_libs/_39.mjs +2 -0
- package/.output/server/_libs/_40.mjs +2 -0
- package/.output/server/_libs/_41.mjs +2 -0
- package/.output/server/_libs/_42.mjs +2 -0
- package/.output/server/_libs/_43.mjs +2 -0
- package/.output/server/_libs/_44.mjs +2 -0
- package/.output/server/_libs/_45.mjs +2 -0
- package/.output/server/_libs/_46.mjs +2 -0
- package/.output/server/_libs/_47.mjs +2 -0
- package/.output/server/_libs/_48.mjs +2 -0
- package/.output/server/_libs/_49.mjs +2 -0
- package/.output/server/_libs/_50.mjs +2 -0
- package/.output/server/_libs/_51.mjs +2 -0
- package/.output/server/_libs/_52.mjs +2 -0
- package/.output/server/_libs/_53.mjs +2 -0
- package/.output/server/_libs/_54.mjs +2 -0
- package/.output/server/_libs/_55.mjs +2 -0
- package/.output/server/_libs/_56.mjs +2 -0
- package/.output/server/_libs/_57.mjs +2 -0
- package/.output/server/_libs/_58.mjs +2 -0
- package/.output/server/_libs/_59.mjs +2 -0
- package/.output/server/_libs/_60.mjs +2 -0
- package/.output/server/_libs/_61.mjs +2 -0
- package/.output/server/_libs/_62.mjs +2 -0
- package/.output/server/_libs/_63.mjs +2 -0
- package/.output/server/_libs/_64.mjs +2 -0
- package/.output/server/_libs/_65.mjs +2 -0
- package/.output/server/_libs/_66.mjs +2 -0
- package/.output/server/_libs/_67.mjs +2 -0
- package/.output/server/_libs/_68.mjs +2 -0
- package/.output/server/_libs/_69.mjs +2 -0
- package/.output/server/_libs/_70.mjs +2 -0
- package/.output/server/_libs/_71.mjs +2 -0
- package/.output/server/_libs/_72.mjs +2 -0
- package/.output/server/_libs/_73.mjs +2 -0
- package/.output/server/_libs/_74.mjs +2 -0
- package/.output/server/_libs/_75.mjs +2 -0
- package/.output/server/_libs/_76.mjs +2 -0
- package/.output/server/_libs/_77.mjs +2 -0
- package/.output/server/_libs/_78.mjs +2 -0
- package/.output/server/_libs/_79.mjs +2 -0
- package/.output/server/_libs/_80.mjs +2 -0
- package/.output/server/_libs/_81.mjs +2 -0
- package/.output/server/_libs/_82.mjs +2 -0
- package/.output/server/_libs/_83.mjs +2 -0
- package/.output/server/_libs/_84.mjs +2 -0
- package/.output/server/_libs/_85.mjs +2 -0
- package/.output/server/_libs/_86.mjs +2 -0
- package/.output/server/_libs/_87.mjs +2 -0
- package/.output/server/_libs/_88.mjs +2 -0
- package/.output/server/_libs/_89.mjs +2 -0
- package/.output/server/_libs/_90.mjs +2 -0
- package/.output/server/_libs/_91.mjs +2 -0
- package/.output/server/_libs/_92.mjs +2 -0
- package/.output/server/_libs/_93.mjs +2 -0
- package/.output/server/_libs/_94.mjs +2 -0
- package/.output/server/_libs/_95.mjs +2 -0
- package/.output/server/_libs/_96.mjs +2 -0
- package/.output/server/_libs/_97.mjs +2 -0
- package/.output/server/_libs/_98.mjs +2 -0
- package/.output/server/_libs/_99.mjs +5 -0
- package/.output/server/_libs/amdefine.mjs +188 -0
- package/.output/server/_libs/aws-sdk__nested-clients.mjs +1 -1
- package/.output/server/_libs/compressjs.mjs +50 -0
- package/.output/server/_libs/diff.mjs +137 -0
- package/.output/server/_libs/get-uri.mjs +1 -1
- package/.output/server/_libs/http-proxy-agent.mjs +1 -1
- package/.output/server/_libs/https-proxy-agent.mjs +1 -1
- package/.output/server/_libs/just-bash+[...].mjs +80359 -0
- package/.output/server/_libs/md4x.mjs +73 -0
- package/.output/server/_libs/mixmark-io__domino.mjs +14801 -0
- package/.output/server/_libs/node-fetch.mjs +1 -1
- package/.output/server/_libs/node-liblzma.mjs +1107 -0
- package/.output/server/_libs/pac-proxy-agent+[...].mjs +1 -1
- package/.output/server/_libs/proxy-agent+proxy-from-env.mjs +1 -1
- package/.output/server/_libs/smithy__core.mjs +1 -1
- package/.output/server/_routes/api/files/delete.mjs +2 -2
- package/.output/server/_routes/api/files/groups.mjs +14 -0
- package/.output/server/_routes/api/files/raw.mjs +1 -1
- package/.output/server/_routes/api/files/read.mjs +1 -1
- package/.output/server/_routes/api/files/watch.mjs +1 -1
- package/.output/server/_routes/api/files/write.mjs +3 -2
- package/.output/server/_routes/api/files.mjs +1 -1
- package/.output/server/_routes/api/groups.mjs +2 -2
- package/.output/server/_routes/api/groups2.mjs +3 -2
- package/.output/server/_routes/api/health.mjs +2 -2
- package/.output/server/_routes/api/logs.mjs +4 -2
- package/.output/server/_routes/api/ntfy/setup.mjs +54 -0
- package/.output/server/_routes/api/ntfy/status.mjs +12 -0
- package/.output/server/_routes/api/pi/apikey.mjs +1 -1
- package/.output/server/_routes/api/pi/apikey_providers.mjs +1 -1
- package/.output/server/_routes/api/pi/commands.mjs +6 -0
- package/.output/server/_routes/api/pi/login/events.mjs +1 -1
- package/.output/server/_routes/api/pi/login/respond.mjs +1 -1
- package/.output/server/_routes/api/pi/login.mjs +1 -1
- package/.output/server/_routes/api/pi/logout.mjs +1 -1
- package/.output/server/_routes/api/pi/models.mjs +1 -1
- package/.output/server/_routes/api/pi/status.mjs +1 -1
- package/.output/server/_routes/api/send.mjs +22 -3
- package/.output/server/_routes/api/status.mjs +9 -7
- package/.output/server/_routes/api/tasks2.mjs +2 -2
- package/.output/server/_routes/api/telegram/setup.mjs +2 -2
- package/.output/server/_routes/api/telegram/status.mjs +2 -2
- package/.output/server/_routes/api/terminal2.mjs +3 -2
- package/.output/server/_utils.mjs +12 -4
- package/.output/server/build/md4x.wasm +0 -0
- package/.output/server/index.mjs +223 -149
- package/.output/server/node_modules/@mongodb-js/zstd/lib/index.js +55 -0
- package/.output/server/node_modules/@mongodb-js/zstd/package.json +51 -0
- package/.output/server/package.json +1 -0
- package/README.md +118 -24
- package/bin/piclaw.mjs +39 -1
- package/package.json +16 -13
- package/.output/public/assets/client-TIs-Ghqj.js +0 -9
- package/.output/public/assets/dist-BVjfG3ok.js +0 -12
- package/.output/public/assets/dist-DJh8l6yS.js +0 -1
- package/.output/public/assets/index-BNNEMkNV.js +0 -39
- package/.output/public/assets/index-CdWBxO5V.css +0 -1
- package/.output/public/assets/react-DFP7nCmh.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __require, o as __toCommonJS, t as __commonJSMin } from "../_runtime.mjs";
|
|
2
|
-
import { A as init_dist_es$
|
|
2
|
+
import { $ as require_client, A as init_dist_es$15, At as init_dist_es$17, Ct as dist_es_exports$6, D as dist_es_exports$10, Dt as dist_es_exports$18, Et as init_dist_es, G as init_dist_es$20, J as dist_es_exports$19, K as dist_es_exports$8, M as init_dist_es$21, Mt as init_dist_es$16, N as dist_es_exports$11, Nt as dist_es_exports$23, O as init_dist_es$10, Ot as init_dist_es$18, P as init_dist_es$11, Pt as init_dist_es$23, Q as init_dist_es$3, St as init_dist_es$5, Tt as dist_es_exports, W as dist_es_exports$20, X as require_dist_cjs, Y as init_dist_es$19, Z as dist_es_exports$3, _ as init_dist_es$9, _t as init_dist_es$12, at as dist_es_exports$1, ct as init_dist_es$4, d as require_protocols, dt as init_dist_es$2, f as dist_es_exports$14, ft as require_dist_cjs$1, g as dist_es_exports$9, gt as dist_es_exports$12, h as init_dist_es$13, j as dist_es_exports$21, jt as dist_es_exports$16, k as dist_es_exports$15, kt as dist_es_exports$17, l as dist_es_exports$22, m as dist_es_exports$13, ot as init_dist_es$1, p as init_dist_es$14, pt as require_schema, q as init_dist_es$8, st as dist_es_exports$4, u as init_dist_es$22, ut as dist_es_exports$2, v as dist_es_exports$7, wt as init_dist_es$6, xt as dist_es_exports$5, y as init_dist_es$7 } from "./@aws-sdk/client-bedrock-runtime+[...].mjs";
|
|
3
3
|
import { n as init_package, r as package_exports } from "./@aws-sdk/credential-provider-sso+[...].mjs";
|
|
4
4
|
var require_httpAuthSchemeProvider$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { t as __commonJSMin } from "../_runtime.mjs";
|
|
2
|
+
import { t as require_amdefine } from "./amdefine.mjs";
|
|
3
|
+
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
if (typeof define !== "function") var define = require_amdefine()(module);
|
|
5
|
+
define([
|
|
6
|
+
"./lib/freeze",
|
|
7
|
+
"./lib/BitStream",
|
|
8
|
+
"./lib/Stream",
|
|
9
|
+
"./lib/BWT",
|
|
10
|
+
"./lib/Context1Model",
|
|
11
|
+
"./lib/DefSumModel",
|
|
12
|
+
"./lib/FenwickModel",
|
|
13
|
+
"./lib/MTFModel",
|
|
14
|
+
"./lib/NoModel",
|
|
15
|
+
"./lib/Huffman",
|
|
16
|
+
"./lib/RangeCoder",
|
|
17
|
+
"./lib/BWTC",
|
|
18
|
+
"./lib/Bzip2",
|
|
19
|
+
"./lib/Dmc",
|
|
20
|
+
"./lib/Lzjb",
|
|
21
|
+
"./lib/LzjbR",
|
|
22
|
+
"./lib/Lzp3",
|
|
23
|
+
"./lib/PPM",
|
|
24
|
+
"./lib/Simple"
|
|
25
|
+
], function(freeze, BitStream, Stream, BWT, Context1Model, DefSumModel, FenwickModel, MTFModel, NoModel, Huffman, RangeCoder, BWTC, Bzip2, Dmc, Lzjb, LzjbR, Lzp3, PPM, Simple) {
|
|
26
|
+
"use strict";
|
|
27
|
+
return freeze({
|
|
28
|
+
version: "0.0.1",
|
|
29
|
+
BitStream,
|
|
30
|
+
Stream,
|
|
31
|
+
BWT,
|
|
32
|
+
Context1Model,
|
|
33
|
+
DefSumModel,
|
|
34
|
+
FenwickModel,
|
|
35
|
+
MTFModel,
|
|
36
|
+
NoModel,
|
|
37
|
+
Huffman,
|
|
38
|
+
RangeCoder,
|
|
39
|
+
BWTC,
|
|
40
|
+
Bzip2,
|
|
41
|
+
Dmc,
|
|
42
|
+
Lzjb,
|
|
43
|
+
LzjbR,
|
|
44
|
+
Lzp3,
|
|
45
|
+
PPM,
|
|
46
|
+
Simple
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}));
|
|
50
|
+
export { require_main as t };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { c as diffLines } from "./@mariozechner/pi-coding-agent+[...].mjs";
|
|
2
|
+
const INCLUDE_HEADERS = {
|
|
3
|
+
includeIndex: true,
|
|
4
|
+
includeUnderline: true,
|
|
5
|
+
includeFileHeaders: true
|
|
6
|
+
};
|
|
7
|
+
function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
8
|
+
let optionsObj;
|
|
9
|
+
if (!options) optionsObj = {};
|
|
10
|
+
else if (typeof options === "function") optionsObj = { callback: options };
|
|
11
|
+
else optionsObj = options;
|
|
12
|
+
if (typeof optionsObj.context === "undefined") optionsObj.context = 4;
|
|
13
|
+
const context = optionsObj.context;
|
|
14
|
+
if (optionsObj.newlineIsToken) throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");
|
|
15
|
+
if (!optionsObj.callback) return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj));
|
|
16
|
+
else {
|
|
17
|
+
const { callback } = optionsObj;
|
|
18
|
+
diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => {
|
|
19
|
+
callback(diffLinesResultToPatch(diff));
|
|
20
|
+
} }));
|
|
21
|
+
}
|
|
22
|
+
function diffLinesResultToPatch(diff) {
|
|
23
|
+
if (!diff) return;
|
|
24
|
+
diff.push({
|
|
25
|
+
value: "",
|
|
26
|
+
lines: []
|
|
27
|
+
});
|
|
28
|
+
function contextLines(lines) {
|
|
29
|
+
return lines.map(function(entry) {
|
|
30
|
+
return " " + entry;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const hunks = [];
|
|
34
|
+
let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;
|
|
35
|
+
for (let i = 0; i < diff.length; i++) {
|
|
36
|
+
const current = diff[i], lines = current.lines || splitLines(current.value);
|
|
37
|
+
current.lines = lines;
|
|
38
|
+
if (current.added || current.removed) {
|
|
39
|
+
if (!oldRangeStart) {
|
|
40
|
+
const prev = diff[i - 1];
|
|
41
|
+
oldRangeStart = oldLine;
|
|
42
|
+
newRangeStart = newLine;
|
|
43
|
+
if (prev) {
|
|
44
|
+
curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : [];
|
|
45
|
+
oldRangeStart -= curRange.length;
|
|
46
|
+
newRangeStart -= curRange.length;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
for (const line of lines) curRange.push((current.added ? "+" : "-") + line);
|
|
50
|
+
if (current.added) newLine += lines.length;
|
|
51
|
+
else oldLine += lines.length;
|
|
52
|
+
} else {
|
|
53
|
+
if (oldRangeStart) if (lines.length <= context * 2 && i < diff.length - 2) for (const line of contextLines(lines)) curRange.push(line);
|
|
54
|
+
else {
|
|
55
|
+
const contextSize = Math.min(lines.length, context);
|
|
56
|
+
for (const line of contextLines(lines.slice(0, contextSize))) curRange.push(line);
|
|
57
|
+
const hunk = {
|
|
58
|
+
oldStart: oldRangeStart,
|
|
59
|
+
oldLines: oldLine - oldRangeStart + contextSize,
|
|
60
|
+
newStart: newRangeStart,
|
|
61
|
+
newLines: newLine - newRangeStart + contextSize,
|
|
62
|
+
lines: curRange
|
|
63
|
+
};
|
|
64
|
+
hunks.push(hunk);
|
|
65
|
+
oldRangeStart = 0;
|
|
66
|
+
newRangeStart = 0;
|
|
67
|
+
curRange = [];
|
|
68
|
+
}
|
|
69
|
+
oldLine += lines.length;
|
|
70
|
+
newLine += lines.length;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
for (const hunk of hunks) for (let i = 0; i < hunk.lines.length; i++) if (hunk.lines[i].endsWith("\n")) hunk.lines[i] = hunk.lines[i].slice(0, -1);
|
|
74
|
+
else {
|
|
75
|
+
hunk.lines.splice(i + 1, 0, "\");
|
|
76
|
+
i++;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
oldFileName,
|
|
80
|
+
newFileName,
|
|
81
|
+
oldHeader,
|
|
82
|
+
newHeader,
|
|
83
|
+
hunks
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* creates a unified diff patch.
|
|
89
|
+
* @param patch either a single structured patch object (as returned by `structuredPatch`) or an array of them (as returned by `parsePatch`)
|
|
90
|
+
*/
|
|
91
|
+
function formatPatch(patch, headerOptions) {
|
|
92
|
+
if (!headerOptions) headerOptions = INCLUDE_HEADERS;
|
|
93
|
+
if (Array.isArray(patch)) {
|
|
94
|
+
if (patch.length > 1 && !headerOptions.includeFileHeaders) throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");
|
|
95
|
+
return patch.map((p) => formatPatch(p, headerOptions)).join("\n");
|
|
96
|
+
}
|
|
97
|
+
const ret = [];
|
|
98
|
+
if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName) ret.push("Index: " + patch.oldFileName);
|
|
99
|
+
if (headerOptions.includeUnderline) ret.push("===================================================================");
|
|
100
|
+
if (headerOptions.includeFileHeaders) {
|
|
101
|
+
ret.push("--- " + patch.oldFileName + (typeof patch.oldHeader === "undefined" ? "" : " " + patch.oldHeader));
|
|
102
|
+
ret.push("+++ " + patch.newFileName + (typeof patch.newHeader === "undefined" ? "" : " " + patch.newHeader));
|
|
103
|
+
}
|
|
104
|
+
for (let i = 0; i < patch.hunks.length; i++) {
|
|
105
|
+
const hunk = patch.hunks[i];
|
|
106
|
+
if (hunk.oldLines === 0) hunk.oldStart -= 1;
|
|
107
|
+
if (hunk.newLines === 0) hunk.newStart -= 1;
|
|
108
|
+
ret.push("@@ -" + hunk.oldStart + "," + hunk.oldLines + " +" + hunk.newStart + "," + hunk.newLines + " @@");
|
|
109
|
+
for (const line of hunk.lines) ret.push(line);
|
|
110
|
+
}
|
|
111
|
+
return ret.join("\n") + "\n";
|
|
112
|
+
}
|
|
113
|
+
function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
114
|
+
if (typeof options === "function") options = { callback: options };
|
|
115
|
+
if (!(options === null || options === void 0 ? void 0 : options.callback)) {
|
|
116
|
+
const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
117
|
+
if (!patchObj) return;
|
|
118
|
+
return formatPatch(patchObj, options === null || options === void 0 ? void 0 : options.headerOptions);
|
|
119
|
+
} else {
|
|
120
|
+
const { callback } = options;
|
|
121
|
+
structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options), { callback: (patchObj) => {
|
|
122
|
+
if (!patchObj) callback(void 0);
|
|
123
|
+
else callback(formatPatch(patchObj, options.headerOptions));
|
|
124
|
+
} }));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Split `text` into an array of lines, including the trailing newline character (where present)
|
|
129
|
+
*/
|
|
130
|
+
function splitLines(text) {
|
|
131
|
+
const hasTrailingNl = text.endsWith("\n");
|
|
132
|
+
const result = text.split("\n").map((line) => line + "\n");
|
|
133
|
+
if (hasTrailingNl) result.pop();
|
|
134
|
+
else result.push(result.pop().slice(0, -1));
|
|
135
|
+
return result;
|
|
136
|
+
}
|
|
137
|
+
export { createTwoFilesPatch as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __require, t as __commonJSMin } from "../_runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { s as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
|
|
3
3
|
import { t as require_node } from "./data-uri-to-buffer.mjs";
|
|
4
4
|
import { t as require_dist$1 } from "./basic-ftp.mjs";
|
|
5
5
|
var require_notmodified = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __require, t as __commonJSMin } from "../_runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { s as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
|
|
3
3
|
import { t as require_dist$1 } from "./agent-base.mjs";
|
|
4
4
|
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
5
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __require, t as __commonJSMin } from "../_runtime.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { s as require_src } from "./@mariozechner/pi-coding-agent+[...].mjs";
|
|
3
3
|
import { t as require_dist$1 } from "./agent-base.mjs";
|
|
4
4
|
var require_parse_proxy_response = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
5
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|