@theokit/sdk-tools 0.24.0 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -865,9 +865,7 @@ function createGitStatusTool(opts) {
|
|
|
865
865
|
}
|
|
866
866
|
const scopeCheck = checkPathScope(path$1, projectRoot);
|
|
867
867
|
if (scopeCheck !== null) return scopeCheck;
|
|
868
|
-
const args =
|
|
869
|
-
if (opts.includeBranch !== false) args.push("-b");
|
|
870
|
-
if (path$1 !== void 0 && path$1 !== "") args.push("--", path$1);
|
|
868
|
+
const args = montarArgs(path$1, opts.includeBranch !== false);
|
|
871
869
|
if (opts.sandbox !== void 0) {
|
|
872
870
|
return statusViaSandbox(opts.sandbox, ctx, args, timeoutMs);
|
|
873
871
|
}
|
|
@@ -876,6 +874,12 @@ function createGitStatusTool(opts) {
|
|
|
876
874
|
}
|
|
877
875
|
});
|
|
878
876
|
}
|
|
877
|
+
function montarArgs(path, comBranch) {
|
|
878
|
+
const args = ["status", "--porcelain=v1"];
|
|
879
|
+
if (comBranch) args.push("-b");
|
|
880
|
+
if (path !== void 0 && path !== "") args.push("--", path);
|
|
881
|
+
return args;
|
|
882
|
+
}
|
|
879
883
|
async function statusViaSandbox(sandbox$1, ctx, args, timeoutMs) {
|
|
880
884
|
const command = ["git", ...args].map(shq).join(" ");
|
|
881
885
|
const backend = await sandbox.resolveSandbox(sandbox$1, ctx ?? {});
|