@morphllm/morphsdk 0.2.163 → 0.2.165
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/{chunk-HBH56DLN.js → chunk-4ABH26W7.js} +2 -2
- package/dist/{chunk-NNATBEOF.js → chunk-5BGGKSPF.js} +2 -2
- package/dist/{chunk-EJBWDGTH.js → chunk-5LCF4UCM.js} +2 -2
- package/dist/{chunk-5FYJMU6H.js → chunk-5O2JC4WX.js} +3 -3
- package/dist/{chunk-LST7MZOZ.js → chunk-7BW626SW.js} +3 -2
- package/dist/{chunk-LST7MZOZ.js.map → chunk-7BW626SW.js.map} +1 -1
- package/dist/{chunk-2KDJKRZG.js → chunk-7V3HFHHS.js} +3 -3
- package/dist/{chunk-6YTCBLRI.js → chunk-EGIH5363.js} +3 -3
- package/dist/{chunk-5BMWOPYW.js → chunk-J5X5Z7VF.js} +2 -2
- package/dist/{chunk-OKFW4KGU.js → chunk-LFZF75DO.js} +2 -2
- package/dist/{chunk-LSHQISAX.js → chunk-MKBPVZ7E.js} +3 -3
- package/dist/{chunk-KHR4CZMX.js → chunk-N556UPMO.js} +18 -18
- package/dist/{chunk-WM6SBI4B.js → chunk-NDV2PDJE.js} +3 -3
- package/dist/chunk-NSBPE2FW.js +17 -0
- package/dist/{chunk-CUMC7Z5R.js → chunk-ORIM3RNW.js} +3 -3
- package/dist/{chunk-5AM23TC7.js → chunk-OZ3U2ADR.js} +20 -5
- package/dist/chunk-OZ3U2ADR.js.map +1 -0
- package/dist/{chunk-LW5EAPZ6.js → chunk-RCMWD2VQ.js} +2 -2
- package/dist/{chunk-FNCPPCPV.js → chunk-SEKCPQVL.js} +2 -2
- package/dist/{chunk-COUYHTIO.js → chunk-TGB5DIWR.js} +3 -3
- package/dist/{chunk-HMGC7FLZ.js → chunk-TLWOF3J2.js} +2 -2
- package/dist/{chunk-QXGOEDZD.js → chunk-TNZ6T6PY.js} +2 -2
- package/dist/{chunk-6PFGM4CM.js → chunk-TVHJNV5A.js} +3 -3
- package/dist/{chunk-ZMCDGAGF.js → chunk-UHECPHVN.js} +3 -3
- package/dist/{chunk-SELI567A.js → chunk-UR3BLPYP.js} +4 -4
- package/dist/{chunk-6YOSNPHS.js → chunk-VYQL4P46.js} +3 -3
- package/dist/{chunk-FQXUOZBX.js → chunk-X3JN6E2X.js} +3 -3
- package/dist/{chunk-HFN3YCF4.js → chunk-Y5FJYF2A.js} +2 -2
- package/dist/{chunk-VMNEYCFP.js → chunk-YY3ALQ2D.js} +2 -2
- package/dist/client.cjs +46 -34
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +24 -24
- package/dist/edge.cjs +17 -5
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.js +6 -6
- package/dist/git/client.js +1 -1
- package/dist/git/config.js +1 -1
- package/dist/git/index.js +1 -1
- package/dist/index.cjs +46 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -24
- package/dist/modelrouter/core.cjs +17 -5
- package/dist/modelrouter/core.cjs.map +1 -1
- package/dist/modelrouter/core.js +5 -5
- package/dist/modelrouter/index.cjs +17 -5
- package/dist/modelrouter/index.cjs.map +1 -1
- package/dist/modelrouter/index.js +5 -5
- package/dist/subagents/anthropic.cjs +24 -12
- package/dist/subagents/anthropic.cjs.map +1 -1
- package/dist/subagents/anthropic.js +6 -6
- package/dist/subagents/index.js +1 -1
- package/dist/subagents/prompts.js +1 -1
- package/dist/subagents/vercel.cjs +24 -12
- package/dist/subagents/vercel.cjs.map +1 -1
- package/dist/subagents/vercel.js +6 -6
- package/dist/tools/browser/anthropic.cjs +17 -5
- package/dist/tools/browser/anthropic.cjs.map +1 -1
- package/dist/tools/browser/anthropic.js +7 -7
- package/dist/tools/browser/core.cjs +17 -5
- package/dist/tools/browser/core.cjs.map +1 -1
- package/dist/tools/browser/core.js +6 -6
- package/dist/tools/browser/errors.js +1 -1
- package/dist/tools/browser/index.cjs +17 -5
- package/dist/tools/browser/index.cjs.map +1 -1
- package/dist/tools/browser/index.js +9 -9
- package/dist/tools/browser/live.js +1 -1
- package/dist/tools/browser/openai.cjs +17 -5
- package/dist/tools/browser/openai.cjs.map +1 -1
- package/dist/tools/browser/openai.js +7 -7
- package/dist/tools/browser/profiles/core.cjs +2 -1
- package/dist/tools/browser/profiles/core.cjs.map +1 -1
- package/dist/tools/browser/profiles/core.js +4 -4
- package/dist/tools/browser/profiles/index.cjs +2 -1
- package/dist/tools/browser/profiles/index.cjs.map +1 -1
- package/dist/tools/browser/profiles/index.js +4 -4
- package/dist/tools/browser/profiles/types.js +1 -1
- package/dist/tools/browser/prompts.js +1 -1
- package/dist/tools/browser/vercel.cjs +17 -5
- package/dist/tools/browser/vercel.cjs.map +1 -1
- package/dist/tools/browser/vercel.js +7 -7
- package/dist/tools/codebase_search/anthropic.cjs +17 -5
- package/dist/tools/codebase_search/anthropic.cjs.map +1 -1
- package/dist/tools/codebase_search/anthropic.js +6 -6
- package/dist/tools/codebase_search/core.cjs +17 -5
- package/dist/tools/codebase_search/core.cjs.map +1 -1
- package/dist/tools/codebase_search/core.js +5 -5
- package/dist/tools/codebase_search/index.cjs +17 -5
- package/dist/tools/codebase_search/index.cjs.map +1 -1
- package/dist/tools/codebase_search/index.js +8 -8
- package/dist/tools/codebase_search/openai.cjs +17 -5
- package/dist/tools/codebase_search/openai.cjs.map +1 -1
- package/dist/tools/codebase_search/openai.js +6 -6
- package/dist/tools/codebase_search/prompts.js +1 -1
- package/dist/tools/codebase_search/vercel.cjs +17 -5
- package/dist/tools/codebase_search/vercel.cjs.map +1 -1
- package/dist/tools/codebase_search/vercel.js +6 -6
- package/dist/tools/compact/core.js +1 -1
- package/dist/tools/compact/index.js +1 -1
- package/dist/tools/fastapply/anthropic.cjs +18 -6
- package/dist/tools/fastapply/anthropic.cjs.map +1 -1
- package/dist/tools/fastapply/anthropic.js +6 -6
- package/dist/tools/fastapply/apply.cjs +17 -5
- package/dist/tools/fastapply/apply.cjs.map +1 -1
- package/dist/tools/fastapply/apply.js +4 -4
- package/dist/tools/fastapply/core.cjs +18 -6
- package/dist/tools/fastapply/core.cjs.map +1 -1
- package/dist/tools/fastapply/core.js +5 -5
- package/dist/tools/fastapply/index.cjs +18 -6
- package/dist/tools/fastapply/index.cjs.map +1 -1
- package/dist/tools/fastapply/index.js +8 -8
- package/dist/tools/fastapply/openai.cjs +18 -6
- package/dist/tools/fastapply/openai.cjs.map +1 -1
- package/dist/tools/fastapply/openai.js +6 -6
- package/dist/tools/fastapply/prompts.js +1 -1
- package/dist/tools/fastapply/vercel.cjs +18 -6
- package/dist/tools/fastapply/vercel.cjs.map +1 -1
- package/dist/tools/fastapply/vercel.js +6 -6
- package/dist/tools/index.cjs +18 -6
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.js +8 -8
- package/dist/tools/utils/resilience.cjs +2 -1
- package/dist/tools/utils/resilience.cjs.map +1 -1
- package/dist/tools/utils/resilience.js +3 -3
- package/dist/tools/warp_grep/agent/config.js +1 -1
- package/dist/tools/warp_grep/agent/formatter.js +1 -1
- package/dist/tools/warp_grep/agent/parser.js +1 -1
- package/dist/tools/warp_grep/agent/runner.cjs +17 -5
- package/dist/tools/warp_grep/agent/runner.cjs.map +1 -1
- package/dist/tools/warp_grep/agent/runner.js +4 -4
- package/dist/tools/warp_grep/anthropic.cjs +24 -12
- package/dist/tools/warp_grep/anthropic.cjs.map +1 -1
- package/dist/tools/warp_grep/anthropic.js +6 -6
- package/dist/tools/warp_grep/client.cjs +24 -12
- package/dist/tools/warp_grep/client.cjs.map +1 -1
- package/dist/tools/warp_grep/client.js +5 -5
- package/dist/tools/warp_grep/gemini.cjs +24 -12
- package/dist/tools/warp_grep/gemini.cjs.map +1 -1
- package/dist/tools/warp_grep/gemini.js +5 -5
- package/dist/tools/warp_grep/harness.js +1 -1
- package/dist/tools/warp_grep/index.cjs +24 -12
- package/dist/tools/warp_grep/index.cjs.map +1 -1
- package/dist/tools/warp_grep/index.js +5 -5
- package/dist/tools/warp_grep/openai.cjs +24 -12
- package/dist/tools/warp_grep/openai.cjs.map +1 -1
- package/dist/tools/warp_grep/openai.js +6 -6
- package/dist/tools/warp_grep/providers/code_storage_http.js +1 -1
- package/dist/tools/warp_grep/providers/local.js +1 -1
- package/dist/tools/warp_grep/providers/remote.js +1 -1
- package/dist/tools/warp_grep/utils/files.js +1 -1
- package/dist/tools/warp_grep/utils/github.js +1 -1
- package/dist/tools/warp_grep/utils/paths.js +1 -1
- package/dist/tools/warp_grep/utils/ripgrep.js +1 -1
- package/dist/tools/warp_grep/vercel.cjs +24 -12
- package/dist/tools/warp_grep/vercel.cjs.map +1 -1
- package/dist/tools/warp_grep/vercel.js +6 -6
- package/dist/version.cjs +2 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.js +2 -2
- package/package.json +2 -1
- package/dist/chunk-5AM23TC7.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- /package/dist/{chunk-HBH56DLN.js.map → chunk-4ABH26W7.js.map} +0 -0
- /package/dist/{chunk-NNATBEOF.js.map → chunk-5BGGKSPF.js.map} +0 -0
- /package/dist/{chunk-EJBWDGTH.js.map → chunk-5LCF4UCM.js.map} +0 -0
- /package/dist/{chunk-5FYJMU6H.js.map → chunk-5O2JC4WX.js.map} +0 -0
- /package/dist/{chunk-2KDJKRZG.js.map → chunk-7V3HFHHS.js.map} +0 -0
- /package/dist/{chunk-6YTCBLRI.js.map → chunk-EGIH5363.js.map} +0 -0
- /package/dist/{chunk-5BMWOPYW.js.map → chunk-J5X5Z7VF.js.map} +0 -0
- /package/dist/{chunk-OKFW4KGU.js.map → chunk-LFZF75DO.js.map} +0 -0
- /package/dist/{chunk-LSHQISAX.js.map → chunk-MKBPVZ7E.js.map} +0 -0
- /package/dist/{chunk-KHR4CZMX.js.map → chunk-N556UPMO.js.map} +0 -0
- /package/dist/{chunk-WM6SBI4B.js.map → chunk-NDV2PDJE.js.map} +0 -0
- /package/dist/{chunk-PZ5AY32C.js.map → chunk-NSBPE2FW.js.map} +0 -0
- /package/dist/{chunk-CUMC7Z5R.js.map → chunk-ORIM3RNW.js.map} +0 -0
- /package/dist/{chunk-LW5EAPZ6.js.map → chunk-RCMWD2VQ.js.map} +0 -0
- /package/dist/{chunk-FNCPPCPV.js.map → chunk-SEKCPQVL.js.map} +0 -0
- /package/dist/{chunk-COUYHTIO.js.map → chunk-TGB5DIWR.js.map} +0 -0
- /package/dist/{chunk-HMGC7FLZ.js.map → chunk-TLWOF3J2.js.map} +0 -0
- /package/dist/{chunk-QXGOEDZD.js.map → chunk-TNZ6T6PY.js.map} +0 -0
- /package/dist/{chunk-6PFGM4CM.js.map → chunk-TVHJNV5A.js.map} +0 -0
- /package/dist/{chunk-ZMCDGAGF.js.map → chunk-UHECPHVN.js.map} +0 -0
- /package/dist/{chunk-SELI567A.js.map → chunk-UR3BLPYP.js.map} +0 -0
- /package/dist/{chunk-6YOSNPHS.js.map → chunk-VYQL4P46.js.map} +0 -0
- /package/dist/{chunk-FQXUOZBX.js.map → chunk-X3JN6E2X.js.map} +0 -0
- /package/dist/{chunk-HFN3YCF4.js.map → chunk-Y5FJYF2A.js.map} +0 -0
- /package/dist/{chunk-VMNEYCFP.js.map → chunk-YY3ALQ2D.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchWithRetry,
|
|
3
3
|
withTimeout
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SEKCPQVL.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-OZ3U2ADR.js";
|
|
8
8
|
|
|
9
9
|
// tools/codebase_search/core.ts
|
|
10
10
|
var CodebaseSearchClient = class {
|
|
@@ -99,4 +99,4 @@ export {
|
|
|
99
99
|
CodebaseSearchClient,
|
|
100
100
|
executeCodebaseSearch
|
|
101
101
|
};
|
|
102
|
-
//# sourceMappingURL=chunk-
|
|
102
|
+
//# sourceMappingURL=chunk-X3JN6E2X.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
executeGitHubReadFile,
|
|
9
9
|
executeToolCall,
|
|
10
10
|
executeToolCallStreaming
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MKBPVZ7E.js";
|
|
12
12
|
|
|
13
13
|
// tools/warp_grep/vercel.ts
|
|
14
14
|
import { tool } from "ai";
|
|
@@ -115,4 +115,4 @@ export {
|
|
|
115
115
|
createGitHubReadFileTool,
|
|
116
116
|
vercel_default
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-Y5FJYF2A.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
logger
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OZ3U2ADR.js";
|
|
4
4
|
|
|
5
5
|
// tools/fastapply/core.ts
|
|
6
6
|
import { join, resolve, relative } from "path";
|
|
@@ -124,4 +124,4 @@ export {
|
|
|
124
124
|
FastApplyClient,
|
|
125
125
|
executeEditFile
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-YY3ALQ2D.js.map
|
package/dist/client.cjs
CHANGED
|
@@ -31,18 +31,29 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
33
|
// logger.ts
|
|
34
|
-
var
|
|
34
|
+
var MorphLogger, logger;
|
|
35
35
|
var init_logger = __esm({
|
|
36
36
|
"logger.ts"() {
|
|
37
37
|
"use strict";
|
|
38
|
-
import_fs = require("fs");
|
|
39
38
|
MorphLogger = class {
|
|
40
39
|
enabled;
|
|
41
|
-
fileStream;
|
|
40
|
+
fileStream = null;
|
|
41
|
+
fileStreamReady = false;
|
|
42
42
|
constructor() {
|
|
43
43
|
this.enabled = process.env.MORPH_DEBUG === "1" || !!process.env.MORPH_LOG_FILE;
|
|
44
|
+
}
|
|
45
|
+
getFileStream() {
|
|
46
|
+
if (this.fileStreamReady) return this.fileStream;
|
|
47
|
+
this.fileStreamReady = true;
|
|
44
48
|
const f = process.env.MORPH_LOG_FILE;
|
|
45
|
-
|
|
49
|
+
if (f) {
|
|
50
|
+
try {
|
|
51
|
+
const { createWriteStream } = require("fs");
|
|
52
|
+
this.fileStream = createWriteStream(f, { flags: "a" });
|
|
53
|
+
} catch {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return this.fileStream;
|
|
46
57
|
}
|
|
47
58
|
debug(component, msg, data) {
|
|
48
59
|
this._log("debug", component, msg, data);
|
|
@@ -67,7 +78,7 @@ var init_logger = __esm({
|
|
|
67
78
|
const ts = (/* @__PURE__ */ new Date()).toISOString();
|
|
68
79
|
const prefix = `[${ts}] [${level.toUpperCase()}] [${component}]`;
|
|
69
80
|
console.error(data ? `${prefix} ${msg} ${JSON.stringify(data)}` : `${prefix} ${msg}`);
|
|
70
|
-
this.
|
|
81
|
+
this.getFileStream()?.write(JSON.stringify({ ts, level, component, msg, ...data && { data } }) + "\n");
|
|
71
82
|
}
|
|
72
83
|
};
|
|
73
84
|
logger = new MorphLogger();
|
|
@@ -80,7 +91,7 @@ var init_package = __esm({
|
|
|
80
91
|
"package.json"() {
|
|
81
92
|
package_default = {
|
|
82
93
|
name: "@morphllm/morphsdk",
|
|
83
|
-
version: "0.2.
|
|
94
|
+
version: "0.2.165",
|
|
84
95
|
description: "TypeScript SDK and CLI for Morph Fast Apply integration",
|
|
85
96
|
type: "module",
|
|
86
97
|
main: "./dist/index.cjs",
|
|
@@ -255,6 +266,7 @@ var init_package = __esm({
|
|
|
255
266
|
"test:browser": "vitest run browser",
|
|
256
267
|
"test:agent": "npx tsx tests/fullAgentTest.ts",
|
|
257
268
|
"test:integration": "npx tsx tests/fullIntegrationTest.ts",
|
|
269
|
+
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
258
270
|
"release:patch": "npm version patch && npm publish",
|
|
259
271
|
"release:minor": "npm version minor && npm publish",
|
|
260
272
|
"release:major": "npm version major && npm publish"
|
|
@@ -656,7 +668,7 @@ function toRepoRelative(repoRoot, absPath) {
|
|
|
656
668
|
}
|
|
657
669
|
function isSymlink(p) {
|
|
658
670
|
try {
|
|
659
|
-
const st =
|
|
671
|
+
const st = import_fs.default.lstatSync(p);
|
|
660
672
|
return st.isSymbolicLink();
|
|
661
673
|
} catch {
|
|
662
674
|
return false;
|
|
@@ -679,13 +691,13 @@ function fixPathRepetition(fullPath) {
|
|
|
679
691
|
}
|
|
680
692
|
function isTextualFile(filePath, maxBytes = 2e6) {
|
|
681
693
|
try {
|
|
682
|
-
const st =
|
|
694
|
+
const st = import_fs.default.statSync(filePath);
|
|
683
695
|
if (!st.isFile()) return false;
|
|
684
696
|
if (st.size > maxBytes) return false;
|
|
685
|
-
const fd =
|
|
697
|
+
const fd = import_fs.default.openSync(filePath, "r");
|
|
686
698
|
const buf = Buffer.alloc(512);
|
|
687
|
-
const read =
|
|
688
|
-
|
|
699
|
+
const read = import_fs.default.readSync(fd, buf, 0, buf.length, 0);
|
|
700
|
+
import_fs.default.closeSync(fd);
|
|
689
701
|
for (let i = 0; i < read; i++) {
|
|
690
702
|
const c = buf[i];
|
|
691
703
|
if (c === 0) return false;
|
|
@@ -695,11 +707,11 @@ function isTextualFile(filePath, maxBytes = 2e6) {
|
|
|
695
707
|
return false;
|
|
696
708
|
}
|
|
697
709
|
}
|
|
698
|
-
var
|
|
710
|
+
var import_fs, import_path5;
|
|
699
711
|
var init_paths = __esm({
|
|
700
712
|
"tools/warp_grep/utils/paths.ts"() {
|
|
701
713
|
"use strict";
|
|
702
|
-
|
|
714
|
+
import_fs = __toESM(require("fs"), 1);
|
|
703
715
|
import_path5 = __toESM(require("path"), 1);
|
|
704
716
|
}
|
|
705
717
|
});
|
|
@@ -4281,7 +4293,7 @@ var GitHubClient = class {
|
|
|
4281
4293
|
// git/client.ts
|
|
4282
4294
|
var import_isomorphic_git = __toESM(require("isomorphic-git"), 1);
|
|
4283
4295
|
var import_node = __toESM(require("isomorphic-git/http/node"), 1);
|
|
4284
|
-
var
|
|
4296
|
+
var import_fs2 = __toESM(require("fs"), 1);
|
|
4285
4297
|
var DEFAULT_PROXY_URL = "https://repos.morphllm.com";
|
|
4286
4298
|
var MorphGit = class {
|
|
4287
4299
|
apiKey;
|
|
@@ -4338,12 +4350,12 @@ var MorphGit = class {
|
|
|
4338
4350
|
throw new Error(`Failed to create repository: ${error}`);
|
|
4339
4351
|
}
|
|
4340
4352
|
await import_isomorphic_git.default.init({
|
|
4341
|
-
fs:
|
|
4353
|
+
fs: import_fs2.default,
|
|
4342
4354
|
dir,
|
|
4343
4355
|
defaultBranch
|
|
4344
4356
|
});
|
|
4345
4357
|
await import_isomorphic_git.default.addRemote({
|
|
4346
|
-
fs:
|
|
4358
|
+
fs: import_fs2.default,
|
|
4347
4359
|
dir,
|
|
4348
4360
|
remote: "origin",
|
|
4349
4361
|
url: `${this.proxyUrl}/v1/repos/${repoId}`
|
|
@@ -4364,7 +4376,7 @@ var MorphGit = class {
|
|
|
4364
4376
|
async clone(options) {
|
|
4365
4377
|
const { repoId, dir, branch = "main", depth, singleBranch = true } = options;
|
|
4366
4378
|
await import_isomorphic_git.default.clone({
|
|
4367
|
-
fs:
|
|
4379
|
+
fs: import_fs2.default,
|
|
4368
4380
|
http: import_node.default,
|
|
4369
4381
|
dir,
|
|
4370
4382
|
url: `${this.proxyUrl}/v1/repos/${repoId}`,
|
|
@@ -4393,9 +4405,9 @@ var MorphGit = class {
|
|
|
4393
4405
|
'branch is required for push operations. Specify the branch explicitly: { dir: "./my-project", branch: "main" }'
|
|
4394
4406
|
);
|
|
4395
4407
|
}
|
|
4396
|
-
const commitHash = await import_isomorphic_git.default.resolveRef({ fs:
|
|
4408
|
+
const commitHash = await import_isomorphic_git.default.resolveRef({ fs: import_fs2.default, dir, ref: "HEAD" });
|
|
4397
4409
|
let repoId;
|
|
4398
|
-
const remotes = await import_isomorphic_git.default.listRemotes({ fs:
|
|
4410
|
+
const remotes = await import_isomorphic_git.default.listRemotes({ fs: import_fs2.default, dir });
|
|
4399
4411
|
const originRemote = remotes.find((r) => r.remote === remote);
|
|
4400
4412
|
if (originRemote) {
|
|
4401
4413
|
const match = originRemote.url.match(/\/repos\/([^\/]+)$/);
|
|
@@ -4404,7 +4416,7 @@ var MorphGit = class {
|
|
|
4404
4416
|
}
|
|
4405
4417
|
}
|
|
4406
4418
|
await import_isomorphic_git.default.push({
|
|
4407
|
-
fs:
|
|
4419
|
+
fs: import_fs2.default,
|
|
4408
4420
|
http: import_node.default,
|
|
4409
4421
|
dir,
|
|
4410
4422
|
remote,
|
|
@@ -4459,7 +4471,7 @@ var MorphGit = class {
|
|
|
4459
4471
|
);
|
|
4460
4472
|
}
|
|
4461
4473
|
await import_isomorphic_git.default.pull({
|
|
4462
|
-
fs:
|
|
4474
|
+
fs: import_fs2.default,
|
|
4463
4475
|
http: import_node.default,
|
|
4464
4476
|
dir,
|
|
4465
4477
|
remote,
|
|
@@ -4528,7 +4540,7 @@ var MorphGit = class {
|
|
|
4528
4540
|
async add(options) {
|
|
4529
4541
|
const { dir, filepath } = options;
|
|
4530
4542
|
await import_isomorphic_git.default.add({
|
|
4531
|
-
fs:
|
|
4543
|
+
fs: import_fs2.default,
|
|
4532
4544
|
dir,
|
|
4533
4545
|
filepath
|
|
4534
4546
|
});
|
|
@@ -4547,7 +4559,7 @@ var MorphGit = class {
|
|
|
4547
4559
|
async remove(options) {
|
|
4548
4560
|
const { dir, filepath } = options;
|
|
4549
4561
|
await import_isomorphic_git.default.remove({
|
|
4550
|
-
fs:
|
|
4562
|
+
fs: import_fs2.default,
|
|
4551
4563
|
dir,
|
|
4552
4564
|
filepath
|
|
4553
4565
|
});
|
|
@@ -4580,7 +4592,7 @@ var MorphGit = class {
|
|
|
4580
4592
|
email: "sdk@morphllm.com"
|
|
4581
4593
|
};
|
|
4582
4594
|
const sha = await import_isomorphic_git.default.commit({
|
|
4583
|
-
fs:
|
|
4595
|
+
fs: import_fs2.default,
|
|
4584
4596
|
dir,
|
|
4585
4597
|
message,
|
|
4586
4598
|
author: commitAuthor
|
|
@@ -4593,7 +4605,7 @@ var MorphGit = class {
|
|
|
4593
4605
|
_version: 1
|
|
4594
4606
|
};
|
|
4595
4607
|
await import_isomorphic_git.default.addNote({
|
|
4596
|
-
fs:
|
|
4608
|
+
fs: import_fs2.default,
|
|
4597
4609
|
dir,
|
|
4598
4610
|
ref: "refs/notes/morph-metadata",
|
|
4599
4611
|
oid: sha,
|
|
@@ -4621,7 +4633,7 @@ var MorphGit = class {
|
|
|
4621
4633
|
throw new Error("filepath is required for status check");
|
|
4622
4634
|
}
|
|
4623
4635
|
const status = await import_isomorphic_git.default.status({
|
|
4624
|
-
fs:
|
|
4636
|
+
fs: import_fs2.default,
|
|
4625
4637
|
dir,
|
|
4626
4638
|
filepath
|
|
4627
4639
|
});
|
|
@@ -4641,7 +4653,7 @@ var MorphGit = class {
|
|
|
4641
4653
|
async log(options) {
|
|
4642
4654
|
const { dir, depth, ref } = options;
|
|
4643
4655
|
const commits = await import_isomorphic_git.default.log({
|
|
4644
|
-
fs:
|
|
4656
|
+
fs: import_fs2.default,
|
|
4645
4657
|
dir,
|
|
4646
4658
|
depth,
|
|
4647
4659
|
ref
|
|
@@ -4662,7 +4674,7 @@ var MorphGit = class {
|
|
|
4662
4674
|
async checkout(options) {
|
|
4663
4675
|
const { dir, ref } = options;
|
|
4664
4676
|
await import_isomorphic_git.default.checkout({
|
|
4665
|
-
fs:
|
|
4677
|
+
fs: import_fs2.default,
|
|
4666
4678
|
dir,
|
|
4667
4679
|
ref
|
|
4668
4680
|
});
|
|
@@ -4682,7 +4694,7 @@ var MorphGit = class {
|
|
|
4682
4694
|
async branch(options) {
|
|
4683
4695
|
const { dir, name, checkout = false } = options;
|
|
4684
4696
|
await import_isomorphic_git.default.branch({
|
|
4685
|
-
fs:
|
|
4697
|
+
fs: import_fs2.default,
|
|
4686
4698
|
dir,
|
|
4687
4699
|
ref: name,
|
|
4688
4700
|
checkout
|
|
@@ -4701,7 +4713,7 @@ var MorphGit = class {
|
|
|
4701
4713
|
async listBranches(options) {
|
|
4702
4714
|
const { dir } = options;
|
|
4703
4715
|
const branches = await import_isomorphic_git.default.listBranches({
|
|
4704
|
-
fs:
|
|
4716
|
+
fs: import_fs2.default,
|
|
4705
4717
|
dir
|
|
4706
4718
|
});
|
|
4707
4719
|
return branches;
|
|
@@ -4719,7 +4731,7 @@ var MorphGit = class {
|
|
|
4719
4731
|
async currentBranch(options) {
|
|
4720
4732
|
const { dir } = options;
|
|
4721
4733
|
const branch = await import_isomorphic_git.default.currentBranch({
|
|
4722
|
-
fs:
|
|
4734
|
+
fs: import_fs2.default,
|
|
4723
4735
|
dir
|
|
4724
4736
|
});
|
|
4725
4737
|
return branch || void 0;
|
|
@@ -4737,7 +4749,7 @@ var MorphGit = class {
|
|
|
4737
4749
|
async statusMatrix(options) {
|
|
4738
4750
|
const { dir } = options;
|
|
4739
4751
|
const matrix = await import_isomorphic_git.default.statusMatrix({
|
|
4740
|
-
fs:
|
|
4752
|
+
fs: import_fs2.default,
|
|
4741
4753
|
dir
|
|
4742
4754
|
});
|
|
4743
4755
|
return matrix.map(([filepath, HEADStatus, workdirStatus, stageStatus]) => {
|
|
@@ -4779,7 +4791,7 @@ var MorphGit = class {
|
|
|
4779
4791
|
async resolveRef(options) {
|
|
4780
4792
|
const { dir, ref } = options;
|
|
4781
4793
|
const oid = await import_isomorphic_git.default.resolveRef({
|
|
4782
|
-
fs:
|
|
4794
|
+
fs: import_fs2.default,
|
|
4783
4795
|
dir,
|
|
4784
4796
|
ref
|
|
4785
4797
|
});
|
|
@@ -4805,7 +4817,7 @@ var MorphGit = class {
|
|
|
4805
4817
|
async getCommitMetadata(options) {
|
|
4806
4818
|
try {
|
|
4807
4819
|
const note = await import_isomorphic_git.default.readNote({
|
|
4808
|
-
fs:
|
|
4820
|
+
fs: import_fs2.default,
|
|
4809
4821
|
dir: options.dir,
|
|
4810
4822
|
ref: "refs/notes/morph-metadata",
|
|
4811
4823
|
oid: options.commitSha
|