@orbit-build/cli 1.6.4 → 1.6.5
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.js +24 -26
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -238108,7 +238108,7 @@ import picocolors36 from "picocolors";
|
|
|
238108
238108
|
// ../shared/dist/index.js
|
|
238109
238109
|
import { randomUUID } from "crypto";
|
|
238110
238110
|
import { dirname, isAbsolute, normalize, relative, resolve } from "path";
|
|
238111
|
-
import { execSync } from "child_process";
|
|
238111
|
+
import { execSync as execSync2 } from "child_process";
|
|
238112
238112
|
import { existsSync, realpathSync } from "fs";
|
|
238113
238113
|
import { readFileSync } from "fs";
|
|
238114
238114
|
import { z } from "zod";
|
|
@@ -238357,7 +238357,7 @@ function getGitBranch(cwd) {
|
|
|
238357
238357
|
return "";
|
|
238358
238358
|
}
|
|
238359
238359
|
try {
|
|
238360
|
-
const branch =
|
|
238360
|
+
const branch = execSync2("git rev-parse --abbrev-ref HEAD", {
|
|
238361
238361
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
238362
238362
|
cwd,
|
|
238363
238363
|
stdio: ["ignore", "pipe", "ignore"],
|
|
@@ -242619,7 +242619,7 @@ function runConfig(cwd) {
|
|
|
242619
242619
|
}
|
|
242620
242620
|
|
|
242621
242621
|
// src/commands/doctor.ts
|
|
242622
|
-
import { execSync as
|
|
242622
|
+
import { execSync as execSync3 } from "child_process";
|
|
242623
242623
|
import { existsSync as existsSync14 } from "fs";
|
|
242624
242624
|
import { basename as basename5, join as join12 } from "path";
|
|
242625
242625
|
import picocolors6 from "picocolors";
|
|
@@ -275367,7 +275367,7 @@ var DoctorSnapshotSchema = z48.object({
|
|
|
275367
275367
|
issues: z48.array(DoctorIssueSchema)
|
|
275368
275368
|
});
|
|
275369
275369
|
function defaultExec(command, options = {}) {
|
|
275370
|
-
return
|
|
275370
|
+
return execSync3(command, {
|
|
275371
275371
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
275372
275372
|
encoding: "utf8",
|
|
275373
275373
|
stdio: ["ignore", "pipe", "ignore"],
|
|
@@ -283193,7 +283193,7 @@ function stripQuotes(value) {
|
|
|
283193
283193
|
}
|
|
283194
283194
|
|
|
283195
283195
|
// src/runtime/CommandRouter.ts
|
|
283196
|
-
import {
|
|
283196
|
+
import { execFileSync as execFileSync8 } from "child_process";
|
|
283197
283197
|
|
|
283198
283198
|
// src/runtime/webui/WebUiRuntime.ts
|
|
283199
283199
|
import http2 from "http";
|
|
@@ -303313,7 +303313,6 @@ function normalizeCommitMessage(message2) {
|
|
|
303313
303313
|
}
|
|
303314
303314
|
|
|
303315
303315
|
// src/runtime/CommandRouter.ts
|
|
303316
|
-
var require2 = createRequire2(import.meta.url);
|
|
303317
303316
|
function stripAnsi4(value) {
|
|
303318
303317
|
return value.replace(/\u001b\[[0-9;]*m/g, "");
|
|
303319
303318
|
}
|
|
@@ -304199,16 +304198,16 @@ var CommandRouter = class {
|
|
|
304199
304198
|
if (command === "/commit") {
|
|
304200
304199
|
const commitMsg = parts.slice(1).join(" ").trim();
|
|
304201
304200
|
const isZh = config.language !== "en";
|
|
304202
|
-
const { execFileSync:
|
|
304201
|
+
const { execFileSync: execFileSync10, execSync: execSync4 } = await import("child_process");
|
|
304203
304202
|
const childEnvironment = isFullAccessEnabled(config) ? buildInheritedChildEnvironment() : buildSanitizedChildEnvironment();
|
|
304204
304203
|
try {
|
|
304205
|
-
let diff =
|
|
304204
|
+
let diff = execSync4("git diff --cached", {
|
|
304206
304205
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
304207
304206
|
cwd,
|
|
304208
304207
|
env: childEnvironment
|
|
304209
304208
|
}).toString().trim();
|
|
304210
304209
|
if (!diff) {
|
|
304211
|
-
const unstaged =
|
|
304210
|
+
const unstaged = execSync4("git status --porcelain", {
|
|
304212
304211
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
304213
304212
|
cwd,
|
|
304214
304213
|
env: childEnvironment
|
|
@@ -304235,12 +304234,12 @@ var CommandRouter = class {
|
|
|
304235
304234
|
this.printOutput(
|
|
304236
304235
|
isZh ? "\u6B63\u5728\u6682\u5B58\u6240\u6709\u53D8\u66F4..." : "Staging all changes..."
|
|
304237
304236
|
);
|
|
304238
|
-
|
|
304237
|
+
execSync4("git add -A", {
|
|
304239
304238
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
304240
304239
|
cwd,
|
|
304241
304240
|
env: childEnvironment
|
|
304242
304241
|
});
|
|
304243
|
-
diff =
|
|
304242
|
+
diff = execSync4("git diff --cached", {
|
|
304244
304243
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
304245
304244
|
cwd,
|
|
304246
304245
|
env: childEnvironment
|
|
@@ -304289,7 +304288,7 @@ ${buildCommitDiffForModel(diff)}`
|
|
|
304289
304288
|
this.printOutput(
|
|
304290
304289
|
`Committing changes with message: "${picocolors18.green(finalMsg)}"`
|
|
304291
304290
|
);
|
|
304292
|
-
|
|
304291
|
+
execFileSync10("git", ["commit", "-m", finalMsg], {
|
|
304293
304292
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
304294
304293
|
cwd,
|
|
304295
304294
|
env: childEnvironment
|
|
@@ -305334,37 +305333,36 @@ ${picocolors18.green("\u2714")} Switched security mode to: ${picocolors18.green(
|
|
|
305334
305333
|
}
|
|
305335
305334
|
}
|
|
305336
305335
|
copyToClipboard(text2) {
|
|
305337
|
-
const { execSync: execSync3 } = require2("child_process");
|
|
305338
305336
|
try {
|
|
305339
305337
|
if (process.platform === "win32") {
|
|
305340
|
-
|
|
305338
|
+
execFileSync8("clip", [], {
|
|
305341
305339
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
305342
305340
|
input: text2
|
|
305343
305341
|
});
|
|
305344
305342
|
return true;
|
|
305345
305343
|
} else if (process.platform === "darwin") {
|
|
305346
|
-
|
|
305344
|
+
execFileSync8("pbcopy", [], {
|
|
305347
305345
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
305348
305346
|
input: text2
|
|
305349
305347
|
});
|
|
305350
305348
|
return true;
|
|
305351
305349
|
} else {
|
|
305352
305350
|
try {
|
|
305353
|
-
|
|
305351
|
+
execFileSync8("xclip", ["-selection", "clipboard"], {
|
|
305354
305352
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
305355
305353
|
input: text2
|
|
305356
305354
|
});
|
|
305357
305355
|
return true;
|
|
305358
305356
|
} catch {
|
|
305359
305357
|
try {
|
|
305360
|
-
|
|
305358
|
+
execFileSync8("xsel", ["-ib"], {
|
|
305361
305359
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
305362
305360
|
input: text2
|
|
305363
305361
|
});
|
|
305364
305362
|
return true;
|
|
305365
305363
|
} catch {
|
|
305366
305364
|
try {
|
|
305367
|
-
|
|
305365
|
+
execSync("wl-copy", {
|
|
305368
305366
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
305369
305367
|
input: text2
|
|
305370
305368
|
});
|
|
@@ -314404,7 +314402,7 @@ function isRecord16(value) {
|
|
|
314404
314402
|
}
|
|
314405
314403
|
|
|
314406
314404
|
// src/commands/eval.ts
|
|
314407
|
-
import { exec as execCallback, execFileSync as
|
|
314405
|
+
import { exec as execCallback, execFileSync as execFileSync9 } from "child_process";
|
|
314408
314406
|
import {
|
|
314409
314407
|
copyFileSync,
|
|
314410
314408
|
existsSync as existsSync38,
|
|
@@ -314718,7 +314716,7 @@ ${result.stderr}`)
|
|
|
314718
314716
|
}
|
|
314719
314717
|
function readChangedFiles(cwd) {
|
|
314720
314718
|
try {
|
|
314721
|
-
const output =
|
|
314719
|
+
const output = execFileSync9(
|
|
314722
314720
|
"git",
|
|
314723
314721
|
["status", "--porcelain=v1", "-z", "--untracked-files=all"],
|
|
314724
314722
|
{
|
|
@@ -314734,7 +314732,7 @@ function readChangedFiles(cwd) {
|
|
|
314734
314732
|
}
|
|
314735
314733
|
}
|
|
314736
314734
|
function snapshotWorkspaceIntoWorktree(sourceCwd, worktreeCwd) {
|
|
314737
|
-
const patch =
|
|
314735
|
+
const patch = execFileSync9(
|
|
314738
314736
|
"git",
|
|
314739
314737
|
["diff", "HEAD", "--binary", "--no-ext-diff"],
|
|
314740
314738
|
{
|
|
@@ -314746,7 +314744,7 @@ function snapshotWorkspaceIntoWorktree(sourceCwd, worktreeCwd) {
|
|
|
314746
314744
|
}
|
|
314747
314745
|
);
|
|
314748
314746
|
if (patch.length > 0) {
|
|
314749
|
-
|
|
314747
|
+
execFileSync9("git", ["apply", "--whitespace=nowarn", "-"], {
|
|
314750
314748
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
314751
314749
|
cwd: worktreeCwd,
|
|
314752
314750
|
input: patch,
|
|
@@ -314754,7 +314752,7 @@ function snapshotWorkspaceIntoWorktree(sourceCwd, worktreeCwd) {
|
|
|
314754
314752
|
maxBuffer: 64 * 1024 * 1024
|
|
314755
314753
|
});
|
|
314756
314754
|
}
|
|
314757
|
-
const untracked =
|
|
314755
|
+
const untracked = execFileSync9(
|
|
314758
314756
|
"git",
|
|
314759
314757
|
["ls-files", "--others", "--exclude-standard", "-z"],
|
|
314760
314758
|
{
|
|
@@ -314774,19 +314772,19 @@ function snapshotWorkspaceIntoWorktree(sourceCwd, worktreeCwd) {
|
|
|
314774
314772
|
mkdirSync10(dirname16(targetPath), { recursive: true });
|
|
314775
314773
|
copyFileSync(sourcePath, targetPath);
|
|
314776
314774
|
}
|
|
314777
|
-
|
|
314775
|
+
execFileSync9("git", ["add", "-A"], {
|
|
314778
314776
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
314779
314777
|
cwd: worktreeCwd,
|
|
314780
314778
|
stdio: ["ignore", "pipe", "pipe"]
|
|
314781
314779
|
});
|
|
314782
|
-
const dirty =
|
|
314780
|
+
const dirty = execFileSync9("git", ["status", "--porcelain"], {
|
|
314783
314781
|
...HIDDEN_CHILD_PROCESS_OPTIONS,
|
|
314784
314782
|
cwd: worktreeCwd,
|
|
314785
314783
|
encoding: "utf8",
|
|
314786
314784
|
stdio: ["ignore", "pipe", "pipe"]
|
|
314787
314785
|
}).trim();
|
|
314788
314786
|
if (!dirty) return;
|
|
314789
|
-
|
|
314787
|
+
execFileSync9(
|
|
314790
314788
|
"git",
|
|
314791
314789
|
[
|
|
314792
314790
|
"-c",
|