poe-code 3.0.128 → 3.0.129
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/cli/commands/pipeline.js +53 -5
- package/dist/cli/commands/pipeline.js.map +1 -1
- package/dist/cli/program.js +42 -0
- package/dist/cli/program.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6265 -2815
- package/dist/index.js.map +4 -4
- package/dist/prompts/fix-vulnerabilities.md +18 -0
- package/dist/prompts/github-issue-comment-created.md +16 -0
- package/dist/prompts/github-issue-opened.md +9 -0
- package/dist/prompts/github-pull-request-opened.md +10 -0
- package/dist/prompts/github-pull-request-synchronized.md +8 -0
- package/dist/prompts/update-dependencies.md +4 -0
- package/dist/prompts/update-documentation.md +4 -0
- package/dist/providers/claude-code.js +320 -67
- package/dist/providers/claude-code.js.map +4 -4
- package/dist/providers/codex.js +320 -67
- package/dist/providers/codex.js.map +4 -4
- package/dist/providers/kimi.js +320 -67
- package/dist/providers/kimi.js.map +4 -4
- package/dist/providers/opencode.js +320 -67
- package/dist/providers/opencode.js.map +4 -4
- package/dist/sdk/pipeline.d.ts +1 -1
- package/dist/sdk/pipeline.js.map +1 -1
- package/dist/templates/pipeline/SKILL_plan.md +33 -17
- package/dist/templates/pipeline/steps.yaml.hbs +16 -4
- package/package.json +16 -8
package/dist/providers/kimi.js
CHANGED
|
@@ -24,6 +24,62 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
mod
|
|
25
25
|
));
|
|
26
26
|
|
|
27
|
+
// node_modules/sisteransi/src/index.js
|
|
28
|
+
var require_src = __commonJS({
|
|
29
|
+
"node_modules/sisteransi/src/index.js"(exports, module) {
|
|
30
|
+
"use strict";
|
|
31
|
+
var ESC = "\x1B";
|
|
32
|
+
var CSI = `${ESC}[`;
|
|
33
|
+
var beep = "\x07";
|
|
34
|
+
var cursor = {
|
|
35
|
+
to(x, y) {
|
|
36
|
+
if (!y) return `${CSI}${x + 1}G`;
|
|
37
|
+
return `${CSI}${y + 1};${x + 1}H`;
|
|
38
|
+
},
|
|
39
|
+
move(x, y) {
|
|
40
|
+
let ret = "";
|
|
41
|
+
if (x < 0) ret += `${CSI}${-x}D`;
|
|
42
|
+
else if (x > 0) ret += `${CSI}${x}C`;
|
|
43
|
+
if (y < 0) ret += `${CSI}${-y}A`;
|
|
44
|
+
else if (y > 0) ret += `${CSI}${y}B`;
|
|
45
|
+
return ret;
|
|
46
|
+
},
|
|
47
|
+
up: (count = 1) => `${CSI}${count}A`,
|
|
48
|
+
down: (count = 1) => `${CSI}${count}B`,
|
|
49
|
+
forward: (count = 1) => `${CSI}${count}C`,
|
|
50
|
+
backward: (count = 1) => `${CSI}${count}D`,
|
|
51
|
+
nextLine: (count = 1) => `${CSI}E`.repeat(count),
|
|
52
|
+
prevLine: (count = 1) => `${CSI}F`.repeat(count),
|
|
53
|
+
left: `${CSI}G`,
|
|
54
|
+
hide: `${CSI}?25l`,
|
|
55
|
+
show: `${CSI}?25h`,
|
|
56
|
+
save: `${ESC}7`,
|
|
57
|
+
restore: `${ESC}8`
|
|
58
|
+
};
|
|
59
|
+
var scroll = {
|
|
60
|
+
up: (count = 1) => `${CSI}S`.repeat(count),
|
|
61
|
+
down: (count = 1) => `${CSI}T`.repeat(count)
|
|
62
|
+
};
|
|
63
|
+
var erase = {
|
|
64
|
+
screen: `${CSI}2J`,
|
|
65
|
+
up: (count = 1) => `${CSI}1J`.repeat(count),
|
|
66
|
+
down: (count = 1) => `${CSI}J`.repeat(count),
|
|
67
|
+
line: `${CSI}2K`,
|
|
68
|
+
lineEnd: `${CSI}K`,
|
|
69
|
+
lineStart: `${CSI}1K`,
|
|
70
|
+
lines(count) {
|
|
71
|
+
let clear = "";
|
|
72
|
+
for (let i = 0; i < count; i++)
|
|
73
|
+
clear += this.line + (i < count - 1 ? cursor.up() : "");
|
|
74
|
+
if (count)
|
|
75
|
+
clear += cursor.left;
|
|
76
|
+
return clear;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
module.exports = { cursor, scroll, erase, beep };
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
27
83
|
// src/templates/python/env.hbs
|
|
28
84
|
var require_env = __commonJS({
|
|
29
85
|
"src/templates/python/env.hbs"(exports, module) {
|
|
@@ -510,6 +566,24 @@ import chalk2 from "chalk";
|
|
|
510
566
|
// packages/design-system/src/components/text.ts
|
|
511
567
|
import chalk3 from "chalk";
|
|
512
568
|
|
|
569
|
+
// packages/design-system/src/internal/output-format.ts
|
|
570
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
571
|
+
var VALID_FORMATS = /* @__PURE__ */ new Set(["terminal", "markdown", "json"]);
|
|
572
|
+
var formatStorage = new AsyncLocalStorage();
|
|
573
|
+
var cached;
|
|
574
|
+
function resolveOutputFormat(env = process.env) {
|
|
575
|
+
const scoped = formatStorage.getStore();
|
|
576
|
+
if (scoped) {
|
|
577
|
+
return scoped;
|
|
578
|
+
}
|
|
579
|
+
if (cached) {
|
|
580
|
+
return cached;
|
|
581
|
+
}
|
|
582
|
+
const raw = env.OUTPUT_FORMAT?.toLowerCase();
|
|
583
|
+
cached = VALID_FORMATS.has(raw) ? raw : "terminal";
|
|
584
|
+
return cached;
|
|
585
|
+
}
|
|
586
|
+
|
|
513
587
|
// packages/design-system/src/internal/theme-detect.ts
|
|
514
588
|
function detectThemeFromEnv(env) {
|
|
515
589
|
const apple = env.APPLE_INTERFACE_STYLE;
|
|
@@ -561,80 +635,225 @@ function getTheme(env) {
|
|
|
561
635
|
import chalk4 from "chalk";
|
|
562
636
|
var symbols = {
|
|
563
637
|
get info() {
|
|
638
|
+
const format = resolveOutputFormat();
|
|
639
|
+
if (format === "json") return "info";
|
|
640
|
+
if (format === "markdown") return "(i)";
|
|
564
641
|
return chalk4.magenta("\u25CF");
|
|
565
642
|
},
|
|
566
643
|
get success() {
|
|
644
|
+
const format = resolveOutputFormat();
|
|
645
|
+
if (format === "json") return "success";
|
|
646
|
+
if (format === "markdown") return "[ok]";
|
|
567
647
|
return chalk4.magenta("\u25C6");
|
|
568
648
|
},
|
|
569
649
|
get resolved() {
|
|
570
|
-
const
|
|
571
|
-
return
|
|
650
|
+
const format = resolveOutputFormat();
|
|
651
|
+
if (format === "json") return "resolved";
|
|
652
|
+
if (format === "markdown") return ">";
|
|
653
|
+
return getTheme().resolvedSymbol;
|
|
572
654
|
},
|
|
573
655
|
get errorResolved() {
|
|
574
|
-
const
|
|
575
|
-
return
|
|
656
|
+
const format = resolveOutputFormat();
|
|
657
|
+
if (format === "json") return "error";
|
|
658
|
+
if (format === "markdown") return "[!]";
|
|
659
|
+
return getTheme().errorSymbol;
|
|
660
|
+
},
|
|
661
|
+
get bar() {
|
|
662
|
+
const format = resolveOutputFormat();
|
|
663
|
+
if (format === "json") return "";
|
|
664
|
+
if (format === "markdown") return "|";
|
|
665
|
+
return "\u2502";
|
|
576
666
|
},
|
|
577
|
-
bar: "\u2502",
|
|
578
667
|
cornerTopRight: "\u256E",
|
|
579
668
|
cornerBottomRight: "\u256F",
|
|
580
|
-
warning
|
|
581
|
-
|
|
582
|
-
|
|
669
|
+
get warning() {
|
|
670
|
+
const format = resolveOutputFormat();
|
|
671
|
+
if (format === "json") return "warning";
|
|
672
|
+
if (format === "markdown") return "[!]";
|
|
673
|
+
return "\u25B2";
|
|
674
|
+
},
|
|
675
|
+
get active() {
|
|
676
|
+
const format = resolveOutputFormat();
|
|
677
|
+
if (format === "json") return "active";
|
|
678
|
+
if (format === "markdown") return "[x]";
|
|
679
|
+
return "\u25C6";
|
|
680
|
+
},
|
|
681
|
+
get inactive() {
|
|
682
|
+
const format = resolveOutputFormat();
|
|
683
|
+
if (format === "json") return "inactive";
|
|
684
|
+
if (format === "markdown") return "[ ]";
|
|
685
|
+
return "\u25CB";
|
|
686
|
+
}
|
|
583
687
|
};
|
|
584
688
|
|
|
585
689
|
// packages/design-system/src/components/logger.ts
|
|
586
|
-
import
|
|
690
|
+
import chalk6 from "chalk";
|
|
691
|
+
|
|
692
|
+
// packages/design-system/src/prompts/primitives/log.ts
|
|
587
693
|
import chalk5 from "chalk";
|
|
588
694
|
|
|
589
|
-
// packages/design-system/src/internal/
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
695
|
+
// packages/design-system/src/internal/strip-ansi.ts
|
|
696
|
+
function stripAnsi(value) {
|
|
697
|
+
return value.replace(/\u001b\[[0-9;]*m/g, "");
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// packages/design-system/src/prompts/primitives/log.ts
|
|
701
|
+
function writeTerminalMessage(msg, {
|
|
702
|
+
symbol = chalk5.gray("\u2502"),
|
|
703
|
+
secondarySymbol = chalk5.gray("\u2502"),
|
|
704
|
+
spacing: spacing2 = 1,
|
|
705
|
+
withGuide = true
|
|
706
|
+
} = {}) {
|
|
707
|
+
const lines = [];
|
|
708
|
+
const showGuide = withGuide !== false;
|
|
709
|
+
const contentLines = msg.split("\n");
|
|
710
|
+
const prefix = showGuide ? `${symbol} ` : "";
|
|
711
|
+
const continuationPrefix = showGuide ? `${secondarySymbol} ` : "";
|
|
712
|
+
const emptyGuide = showGuide ? secondarySymbol : "";
|
|
713
|
+
for (let index = 0; index < spacing2; index += 1) {
|
|
714
|
+
lines.push(emptyGuide);
|
|
715
|
+
}
|
|
716
|
+
if (contentLines.length === 0) {
|
|
717
|
+
process.stdout.write("\n");
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
const [firstLine = "", ...continuationLines] = contentLines;
|
|
721
|
+
if (firstLine.length > 0) {
|
|
722
|
+
lines.push(`${prefix}${firstLine}`);
|
|
723
|
+
} else {
|
|
724
|
+
lines.push(showGuide ? symbol : "");
|
|
595
725
|
}
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
|
|
726
|
+
for (const line of continuationLines) {
|
|
727
|
+
if (line.length > 0) {
|
|
728
|
+
lines.push(`${continuationPrefix}${line}`);
|
|
729
|
+
continue;
|
|
730
|
+
}
|
|
731
|
+
lines.push(emptyGuide);
|
|
732
|
+
}
|
|
733
|
+
process.stdout.write(`${lines.join("\n")}
|
|
734
|
+
`);
|
|
735
|
+
}
|
|
736
|
+
function message(msg, options) {
|
|
737
|
+
const format = resolveOutputFormat();
|
|
738
|
+
if (format === "markdown") {
|
|
739
|
+
process.stdout.write(`- ${stripAnsi(msg)}
|
|
740
|
+
`);
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
if (format === "json") {
|
|
744
|
+
process.stdout.write(
|
|
745
|
+
`${JSON.stringify({ level: "message", message: stripAnsi(msg) })}
|
|
746
|
+
`
|
|
747
|
+
);
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
writeTerminalMessage(msg, options);
|
|
751
|
+
}
|
|
752
|
+
function info(msg) {
|
|
753
|
+
const format = resolveOutputFormat();
|
|
754
|
+
if (format === "markdown") {
|
|
755
|
+
process.stdout.write(`- **info:** ${stripAnsi(msg)}
|
|
756
|
+
`);
|
|
757
|
+
return;
|
|
758
|
+
}
|
|
759
|
+
if (format === "json") {
|
|
760
|
+
process.stdout.write(
|
|
761
|
+
`${JSON.stringify({ level: "info", message: stripAnsi(msg) })}
|
|
762
|
+
`
|
|
763
|
+
);
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
message(msg, { symbol: symbols.info });
|
|
767
|
+
}
|
|
768
|
+
function success(msg) {
|
|
769
|
+
const format = resolveOutputFormat();
|
|
770
|
+
if (format === "markdown") {
|
|
771
|
+
process.stdout.write(`- **success:** ${stripAnsi(msg)}
|
|
772
|
+
`);
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
if (format === "json") {
|
|
776
|
+
process.stdout.write(
|
|
777
|
+
`${JSON.stringify({ level: "success", message: stripAnsi(msg) })}
|
|
778
|
+
`
|
|
779
|
+
);
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
message(msg, { symbol: symbols.success });
|
|
783
|
+
}
|
|
784
|
+
function warn(msg) {
|
|
785
|
+
const format = resolveOutputFormat();
|
|
786
|
+
if (format === "markdown") {
|
|
787
|
+
process.stdout.write(`- **warning:** ${stripAnsi(msg)}
|
|
788
|
+
`);
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
if (format === "json") {
|
|
792
|
+
process.stdout.write(
|
|
793
|
+
`${JSON.stringify({ level: "warn", message: stripAnsi(msg) })}
|
|
794
|
+
`
|
|
795
|
+
);
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
message(msg, { symbol: chalk5.yellow("\u25B2") });
|
|
599
799
|
}
|
|
800
|
+
function error(msg) {
|
|
801
|
+
const format = resolveOutputFormat();
|
|
802
|
+
if (format === "markdown") {
|
|
803
|
+
process.stdout.write(`- **error:** ${stripAnsi(msg)}
|
|
804
|
+
`);
|
|
805
|
+
return;
|
|
806
|
+
}
|
|
807
|
+
if (format === "json") {
|
|
808
|
+
process.stdout.write(
|
|
809
|
+
`${JSON.stringify({ level: "error", message: stripAnsi(msg) })}
|
|
810
|
+
`
|
|
811
|
+
);
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
message(msg, { symbol: chalk5.red("\u25A0") });
|
|
815
|
+
}
|
|
816
|
+
var log = {
|
|
817
|
+
info,
|
|
818
|
+
success,
|
|
819
|
+
message,
|
|
820
|
+
warn,
|
|
821
|
+
error
|
|
822
|
+
};
|
|
600
823
|
|
|
601
824
|
// packages/design-system/src/components/logger.ts
|
|
602
825
|
function createLogger(emitter) {
|
|
603
|
-
const emit = (level,
|
|
826
|
+
const emit = (level, message2) => {
|
|
604
827
|
if (emitter) {
|
|
605
|
-
emitter(
|
|
606
|
-
return;
|
|
607
|
-
}
|
|
608
|
-
if (resolveOutputFormat() !== "terminal") {
|
|
609
|
-
process.stdout.write(message + "\n");
|
|
828
|
+
emitter(message2);
|
|
610
829
|
return;
|
|
611
830
|
}
|
|
612
831
|
if (level === "success") {
|
|
613
|
-
log.
|
|
832
|
+
log.success(message2);
|
|
614
833
|
return;
|
|
615
834
|
}
|
|
616
835
|
if (level === "warn") {
|
|
617
|
-
log.warn(
|
|
836
|
+
log.warn(message2);
|
|
618
837
|
return;
|
|
619
838
|
}
|
|
620
839
|
if (level === "error") {
|
|
621
|
-
log.error(
|
|
840
|
+
log.error(message2);
|
|
622
841
|
return;
|
|
623
842
|
}
|
|
624
|
-
log.
|
|
843
|
+
log.info(message2);
|
|
625
844
|
};
|
|
626
845
|
return {
|
|
627
|
-
info(
|
|
628
|
-
emit("info",
|
|
846
|
+
info(message2) {
|
|
847
|
+
emit("info", message2);
|
|
629
848
|
},
|
|
630
|
-
success(
|
|
631
|
-
emit("success",
|
|
849
|
+
success(message2) {
|
|
850
|
+
emit("success", message2);
|
|
632
851
|
},
|
|
633
|
-
warn(
|
|
634
|
-
emit("warn",
|
|
852
|
+
warn(message2) {
|
|
853
|
+
emit("warn", message2);
|
|
635
854
|
},
|
|
636
|
-
error(
|
|
637
|
-
emit("error",
|
|
855
|
+
error(message2) {
|
|
856
|
+
emit("error", message2);
|
|
638
857
|
},
|
|
639
858
|
resolved(label, value) {
|
|
640
859
|
if (emitter) {
|
|
@@ -652,12 +871,12 @@ function createLogger(emitter) {
|
|
|
652
871
|
log.message(`${label}
|
|
653
872
|
${value}`, { symbol: symbols.errorResolved });
|
|
654
873
|
},
|
|
655
|
-
message(
|
|
874
|
+
message(message2, symbol) {
|
|
656
875
|
if (emitter) {
|
|
657
|
-
emitter(
|
|
876
|
+
emitter(message2);
|
|
658
877
|
return;
|
|
659
878
|
}
|
|
660
|
-
log.message(
|
|
879
|
+
log.message(message2, { symbol: symbol ?? chalk6.gray("\u2502") });
|
|
661
880
|
}
|
|
662
881
|
};
|
|
663
882
|
}
|
|
@@ -667,18 +886,52 @@ var logger = createLogger();
|
|
|
667
886
|
import { Table } from "console-table-printer";
|
|
668
887
|
|
|
669
888
|
// packages/design-system/src/acp/components.ts
|
|
670
|
-
import
|
|
671
|
-
var AGENT_PREFIX = `${
|
|
889
|
+
import chalk7 from "chalk";
|
|
890
|
+
var AGENT_PREFIX = `${chalk7.green.bold("\u2713")} agent: `;
|
|
672
891
|
|
|
673
892
|
// packages/design-system/src/prompts/index.ts
|
|
893
|
+
import chalk14 from "chalk";
|
|
674
894
|
import * as clack from "@clack/prompts";
|
|
675
|
-
|
|
895
|
+
|
|
896
|
+
// packages/design-system/src/prompts/primitives/cancel.ts
|
|
897
|
+
import chalk8 from "chalk";
|
|
898
|
+
|
|
899
|
+
// node_modules/@clack/core/dist/index.mjs
|
|
900
|
+
var import_sisteransi = __toESM(require_src(), 1);
|
|
901
|
+
import { stdout as R, stdin as q } from "node:process";
|
|
902
|
+
import * as k from "node:readline";
|
|
903
|
+
import ot from "node:readline";
|
|
904
|
+
import { ReadStream as J } from "node:tty";
|
|
905
|
+
var P = new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*", "yu");
|
|
906
|
+
var ct = new RegExp("\\p{M}+", "gu");
|
|
907
|
+
var pt = { limit: 1 / 0, ellipsis: "" };
|
|
908
|
+
var ft = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
|
|
909
|
+
var j = "\x07";
|
|
910
|
+
var Q = "[";
|
|
911
|
+
var dt = "]";
|
|
912
|
+
var U = `${dt}8;;`;
|
|
913
|
+
var et = new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${U}(?<uri>.*)${j})`, "y");
|
|
914
|
+
var At = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
915
|
+
var _ = { actions: new Set(At), aliases: /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"], ["", "cancel"], ["escape", "cancel"]]), messages: { cancel: "Canceled", error: "Something went wrong" }, withGuide: true };
|
|
916
|
+
var bt = globalThis.process.platform.startsWith("win");
|
|
917
|
+
|
|
918
|
+
// packages/design-system/src/prompts/primitives/intro.ts
|
|
919
|
+
import chalk9 from "chalk";
|
|
920
|
+
|
|
921
|
+
// packages/design-system/src/prompts/primitives/note.ts
|
|
922
|
+
import chalk10 from "chalk";
|
|
923
|
+
|
|
924
|
+
// packages/design-system/src/prompts/primitives/outro.ts
|
|
925
|
+
import chalk11 from "chalk";
|
|
926
|
+
|
|
927
|
+
// packages/design-system/src/prompts/primitives/spinner.ts
|
|
928
|
+
import chalk13 from "chalk";
|
|
676
929
|
|
|
677
930
|
// packages/design-system/src/static/spinner.ts
|
|
678
|
-
import
|
|
931
|
+
import chalk12 from "chalk";
|
|
679
932
|
|
|
680
933
|
// packages/design-system/src/static/menu.ts
|
|
681
|
-
import
|
|
934
|
+
import chalk15 from "chalk";
|
|
682
935
|
|
|
683
936
|
// packages/agent-spawn/src/acp/spawn.ts
|
|
684
937
|
import { spawn as spawnChildProcess3 } from "node:child_process";
|
|
@@ -1098,28 +1351,28 @@ function resolvePath(rawPath, homeDir, pathMapper) {
|
|
|
1098
1351
|
}
|
|
1099
1352
|
|
|
1100
1353
|
// packages/config-mutations/src/fs-utils.ts
|
|
1101
|
-
function isNotFound(
|
|
1102
|
-
return typeof
|
|
1354
|
+
function isNotFound(error2) {
|
|
1355
|
+
return typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "ENOENT";
|
|
1103
1356
|
}
|
|
1104
1357
|
async function readFileIfExists(fs, target) {
|
|
1105
1358
|
try {
|
|
1106
1359
|
return await fs.readFile(target, "utf8");
|
|
1107
|
-
} catch (
|
|
1108
|
-
if (isNotFound(
|
|
1360
|
+
} catch (error2) {
|
|
1361
|
+
if (isNotFound(error2)) {
|
|
1109
1362
|
return null;
|
|
1110
1363
|
}
|
|
1111
|
-
throw
|
|
1364
|
+
throw error2;
|
|
1112
1365
|
}
|
|
1113
1366
|
}
|
|
1114
1367
|
async function pathExists(fs, target) {
|
|
1115
1368
|
try {
|
|
1116
1369
|
await fs.stat(target);
|
|
1117
1370
|
return true;
|
|
1118
|
-
} catch (
|
|
1119
|
-
if (isNotFound(
|
|
1371
|
+
} catch (error2) {
|
|
1372
|
+
if (isNotFound(error2)) {
|
|
1120
1373
|
return false;
|
|
1121
1374
|
}
|
|
1122
|
-
throw
|
|
1375
|
+
throw error2;
|
|
1123
1376
|
}
|
|
1124
1377
|
}
|
|
1125
1378
|
function createTimestamp() {
|
|
@@ -1327,14 +1580,14 @@ async function applyRemoveFile(mutation, context, options) {
|
|
|
1327
1580
|
outcome: { changed: true, effect: "delete", detail: "delete" },
|
|
1328
1581
|
details
|
|
1329
1582
|
};
|
|
1330
|
-
} catch (
|
|
1331
|
-
if (isNotFound(
|
|
1583
|
+
} catch (error2) {
|
|
1584
|
+
if (isNotFound(error2)) {
|
|
1332
1585
|
return {
|
|
1333
1586
|
outcome: { changed: false, effect: "none", detail: "noop" },
|
|
1334
1587
|
details
|
|
1335
1588
|
};
|
|
1336
1589
|
}
|
|
1337
|
-
throw
|
|
1590
|
+
throw error2;
|
|
1338
1591
|
}
|
|
1339
1592
|
}
|
|
1340
1593
|
async function applyChmod(mutation, context, options) {
|
|
@@ -1367,14 +1620,14 @@ async function applyChmod(mutation, context, options) {
|
|
|
1367
1620
|
outcome: { changed: true, effect: "chmod", detail: "update" },
|
|
1368
1621
|
details
|
|
1369
1622
|
};
|
|
1370
|
-
} catch (
|
|
1371
|
-
if (isNotFound(
|
|
1623
|
+
} catch (error2) {
|
|
1624
|
+
if (isNotFound(error2)) {
|
|
1372
1625
|
return {
|
|
1373
1626
|
outcome: { changed: false, effect: "none", detail: "noop" },
|
|
1374
1627
|
details
|
|
1375
1628
|
};
|
|
1376
1629
|
}
|
|
1377
|
-
throw
|
|
1630
|
+
throw error2;
|
|
1378
1631
|
}
|
|
1379
1632
|
}
|
|
1380
1633
|
async function applyBackup(mutation, context, options) {
|
|
@@ -1619,10 +1872,10 @@ async function applyTemplateMerge(mutation, context, options, formatName) {
|
|
|
1619
1872
|
let templateDoc;
|
|
1620
1873
|
try {
|
|
1621
1874
|
templateDoc = format.parse(rendered);
|
|
1622
|
-
} catch (
|
|
1875
|
+
} catch (error2) {
|
|
1623
1876
|
throw new Error(
|
|
1624
|
-
`Failed to parse rendered template "${mutation.templateId}" as ${formatName.toUpperCase()}: ${
|
|
1625
|
-
{ cause:
|
|
1877
|
+
`Failed to parse rendered template "${mutation.templateId}" as ${formatName.toUpperCase()}: ${error2}`,
|
|
1878
|
+
{ cause: error2 }
|
|
1626
1879
|
);
|
|
1627
1880
|
}
|
|
1628
1881
|
const rawContent = await readFileIfExists(context.fs, targetPath);
|
|
@@ -1683,16 +1936,16 @@ async function executeMutation(mutation, context, options) {
|
|
|
1683
1936
|
const { outcome, details } = await applyMutation(mutation, context, options);
|
|
1684
1937
|
context.observers?.onComplete?.(details, outcome);
|
|
1685
1938
|
return { outcome, details };
|
|
1686
|
-
} catch (
|
|
1939
|
+
} catch (error2) {
|
|
1687
1940
|
context.observers?.onError?.(
|
|
1688
1941
|
{
|
|
1689
1942
|
kind: mutation.kind,
|
|
1690
1943
|
label: mutation.label ?? mutation.kind,
|
|
1691
1944
|
targetPath: void 0
|
|
1692
1945
|
},
|
|
1693
|
-
|
|
1946
|
+
error2
|
|
1694
1947
|
);
|
|
1695
|
-
throw
|
|
1948
|
+
throw error2;
|
|
1696
1949
|
}
|
|
1697
1950
|
}
|
|
1698
1951
|
|
|
@@ -1743,8 +1996,8 @@ async function runServiceInstall(definition, context) {
|
|
|
1743
1996
|
try {
|
|
1744
1997
|
await definition.check.run(checkContext);
|
|
1745
1998
|
context.logger(`${definition.summary} already installed.`);
|
|
1746
|
-
} catch (
|
|
1747
|
-
const detail =
|
|
1999
|
+
} catch (error2) {
|
|
2000
|
+
const detail = error2 instanceof Error ? error2.message : String(error2);
|
|
1748
2001
|
context.logger(`${definition.summary} not detected: ${detail}`);
|
|
1749
2002
|
needsInstall = true;
|
|
1750
2003
|
}
|
|
@@ -1879,7 +2132,7 @@ function createInstallRunner(definition) {
|
|
|
1879
2132
|
await runServiceInstall(definition, {
|
|
1880
2133
|
isDryRun: context.logger.context.dryRun,
|
|
1881
2134
|
runCommand: context.command.runCommand,
|
|
1882
|
-
logger: (
|
|
2135
|
+
logger: (message2) => context.logger.verbose(message2),
|
|
1883
2136
|
platform: context.env.platform
|
|
1884
2137
|
});
|
|
1885
2138
|
};
|