@builder.io/buildercode 0.4.0 → 0.4.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/cli.mjs +34 -53
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -245033,7 +245033,7 @@ const LIB_CACHE = /* @__PURE__ */ new Map();
|
|
|
245033
245033
|
const PENDING_LIB_CACHE = /* @__PURE__ */ new Map();
|
|
245034
245034
|
const NODE_MODULE_CACHE = /* @__PURE__ */ new Map();
|
|
245035
245035
|
const TSCONFIG_CACHE = /* @__PURE__ */ new Map();
|
|
245036
|
-
const pkgVersion = process.env.OVERRIDE_VERSION ?? "0.4.
|
|
245036
|
+
const pkgVersion = process.env.OVERRIDE_VERSION ?? "0.4.1";
|
|
245037
245037
|
//#endregion
|
|
245038
245038
|
//#region ../dev-tools/core/detect-frameworks.ts
|
|
245039
245039
|
async function detectFrameworks$1(sys) {
|
|
@@ -537983,34 +537983,35 @@ const AskUserQuestionDisplay = (0, import_react.memo)(({ onSubmit, onAbort, isTa
|
|
|
537983
537983
|
};
|
|
537984
537984
|
useInput((input, key) => {
|
|
537985
537985
|
const { selectedIndex: selectedIndex_0, activeTabIndex: activeTabIndex_0, question: question_0, allOptions: allOptions_0, questions: questions_0, isConfirmTab: isConfirmTab_0, customMode: customMode_0, customText: customText_0, answers: answers_0 } = latestRef.current;
|
|
537986
|
+
function submitAnswer(rawAnswer) {
|
|
537987
|
+
if (!question_0) return;
|
|
537988
|
+
const nextAnswer = rawAnswer.trim() || "Other";
|
|
537989
|
+
const newAnswers = {
|
|
537990
|
+
...answers_0,
|
|
537991
|
+
[question_0.question]: nextAnswer
|
|
537992
|
+
};
|
|
537993
|
+
setAnswers(newAnswers);
|
|
537994
|
+
setSelectedIndices((prev) => ({
|
|
537995
|
+
...prev,
|
|
537996
|
+
[question_0.question]: getSelectedIndexForAnswer(question_0, nextAnswer)
|
|
537997
|
+
}));
|
|
537998
|
+
setCustomMode(false);
|
|
537999
|
+
setCustomText("");
|
|
538000
|
+
const nextUnanswered = findNextUnansweredIndex(questions_0, newAnswers, activeTabIndex_0 + 1);
|
|
538001
|
+
if (nextUnanswered >= 0) {
|
|
538002
|
+
setActiveTabIndex(nextUnanswered);
|
|
538003
|
+
return;
|
|
538004
|
+
}
|
|
538005
|
+
const firstUnanswered = findFirstUnansweredIndex(questions_0, newAnswers);
|
|
538006
|
+
setActiveTabIndex(firstUnanswered >= 0 ? firstUnanswered : questions_0.length);
|
|
538007
|
+
}
|
|
537986
538008
|
if (input === "c" && key.ctrl) {
|
|
537987
538009
|
onAbort?.();
|
|
537988
538010
|
return;
|
|
537989
538011
|
}
|
|
537990
538012
|
if (customMode_0) {
|
|
537991
|
-
if (key.return)
|
|
537992
|
-
|
|
537993
|
-
const nextAnswer = (customText_0 || "Other").trim() || "Other";
|
|
537994
|
-
const newAnswers = {
|
|
537995
|
-
...answers_0,
|
|
537996
|
-
[question_0.question]: nextAnswer
|
|
537997
|
-
};
|
|
537998
|
-
setAnswers(newAnswers);
|
|
537999
|
-
setSelectedIndices((prev) => ({
|
|
538000
|
-
...prev,
|
|
538001
|
-
[question_0.question]: getSelectedIndexForAnswer(question_0, nextAnswer)
|
|
538002
|
-
}));
|
|
538003
|
-
setCustomMode(false);
|
|
538004
|
-
setCustomText("");
|
|
538005
|
-
const nextUnanswered = findNextUnansweredIndex(questions_0, newAnswers, activeTabIndex_0 + 1);
|
|
538006
|
-
if (nextUnanswered >= 0) {
|
|
538007
|
-
setActiveTabIndex(nextUnanswered);
|
|
538008
|
-
return;
|
|
538009
|
-
}
|
|
538010
|
-
const firstUnanswered = findFirstUnansweredIndex(questions_0, newAnswers);
|
|
538011
|
-
setActiveTabIndex(firstUnanswered >= 0 ? firstUnanswered : questions_0.length);
|
|
538012
|
-
}
|
|
538013
|
-
} else if (key.escape) {
|
|
538013
|
+
if (key.return) submitAnswer(customText_0 || "Other");
|
|
538014
|
+
else if (key.escape) {
|
|
538014
538015
|
setCustomMode(false);
|
|
538015
538016
|
setCustomText("");
|
|
538016
538017
|
} else if (key.backspace || key.delete) setCustomText((text) => text.slice(0, -1));
|
|
@@ -538044,27 +538045,7 @@ const AskUserQuestionDisplay = (0, import_react.memo)(({ onSubmit, onAbort, isTa
|
|
|
538044
538045
|
else if (key.return || input === " ") if (selectedIndex_0 === allOptions_0.length - 1) {
|
|
538045
538046
|
setCustomMode(true);
|
|
538046
538047
|
setCustomText(answers_0[question_0.question] ?? "");
|
|
538047
|
-
} else
|
|
538048
|
-
const nextAnswer_0 = allOptions_0[selectedIndex_0].label.trim() || "Other";
|
|
538049
|
-
const newAnswers_0 = {
|
|
538050
|
-
...answers_0,
|
|
538051
|
-
[question_0.question]: nextAnswer_0
|
|
538052
|
-
};
|
|
538053
|
-
setAnswers(newAnswers_0);
|
|
538054
|
-
setSelectedIndices((prev_2) => ({
|
|
538055
|
-
...prev_2,
|
|
538056
|
-
[question_0.question]: getSelectedIndexForAnswer(question_0, nextAnswer_0)
|
|
538057
|
-
}));
|
|
538058
|
-
setCustomMode(false);
|
|
538059
|
-
setCustomText("");
|
|
538060
|
-
const nextUnanswered_0 = findNextUnansweredIndex(questions_0, newAnswers_0, activeTabIndex_0 + 1);
|
|
538061
|
-
if (nextUnanswered_0 >= 0) {
|
|
538062
|
-
setActiveTabIndex(nextUnanswered_0);
|
|
538063
|
-
return;
|
|
538064
|
-
}
|
|
538065
|
-
const firstUnanswered_0 = findFirstUnansweredIndex(questions_0, newAnswers_0);
|
|
538066
|
-
setActiveTabIndex(firstUnanswered_0 >= 0 ? firstUnanswered_0 : questions_0.length);
|
|
538067
|
-
}
|
|
538048
|
+
} else submitAnswer(allOptions_0[selectedIndex_0].label);
|
|
538068
538049
|
}, { isActive: questions.length > 0 && isTabActive });
|
|
538069
538050
|
const confirmItems = (0, import_react.useMemo)(() => questions.map((item_0, index) => ({
|
|
538070
538051
|
key: item_0.question,
|
|
@@ -538106,17 +538087,17 @@ const AskUserQuestionDisplay = (0, import_react.memo)(({ onSubmit, onAbort, isTa
|
|
|
538106
538087
|
questions.map((item_1, index_0) => {
|
|
538107
538088
|
const isActive = index_0 === activeTabIndex;
|
|
538108
538089
|
const isAnswered = !!answers[item_1.question];
|
|
538109
|
-
const
|
|
538090
|
+
const label = getQuestionTabLabel(item_1, index_0);
|
|
538110
538091
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box, {
|
|
538111
538092
|
"aria-role": "tab",
|
|
538112
538093
|
"aria-state": { selected: isActive },
|
|
538113
|
-
"aria-label": `${
|
|
538094
|
+
"aria-label": `${label} ${isAnswered ? "(answered)" : "(unanswered)"}`,
|
|
538114
538095
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, {
|
|
538115
538096
|
backgroundColor: isActive ? accentColor : void 0,
|
|
538116
538097
|
color: isActive ? "black" : isAnswered ? "green" : void 0,
|
|
538117
538098
|
bold: isActive,
|
|
538118
538099
|
dimColor: !isActive && !isAnswered,
|
|
538119
|
-
children: ` ${isAnswered ? "✓" : index_0 + 1} ${
|
|
538100
|
+
children: ` ${isAnswered ? "✓" : index_0 + 1} ${label} `
|
|
538120
538101
|
})
|
|
538121
538102
|
}, item_1.question);
|
|
538122
538103
|
}),
|
|
@@ -541793,7 +541774,7 @@ const FooterSection = (0, import_react.memo)(() => {
|
|
|
541793
541774
|
children: [
|
|
541794
541775
|
"•",
|
|
541795
541776
|
" Fusion ",
|
|
541796
|
-
"0.4.
|
|
541777
|
+
"0.4.1"
|
|
541797
541778
|
]
|
|
541798
541779
|
});
|
|
541799
541780
|
$[10] = t7;
|
|
@@ -604375,7 +604356,7 @@ const ClawSession = (0, import_react.memo)(({ credentials, isActive, onNewMessag
|
|
|
604375
604356
|
});
|
|
604376
604357
|
});
|
|
604377
604358
|
//#endregion
|
|
604378
|
-
//#region ../../node_modules/ink-scroll-
|
|
604359
|
+
//#region ../../node_modules/ink-scroll-view/dist/index.js
|
|
604379
604360
|
var MeasurableItem = ({ children, onMeasure, index, width, measureKey }) => {
|
|
604380
604361
|
const ref = (0, import_react.useRef)(null);
|
|
604381
604362
|
(0, import_react.useLayoutEffect)(() => {
|
|
@@ -606145,7 +606126,7 @@ function initSentry() {
|
|
|
606145
606126
|
init({
|
|
606146
606127
|
dsn: "https://1c5033d697e0271ebe53773bff826de0@o117565.ingest.us.sentry.io/4511107776905216",
|
|
606147
606128
|
tracesSampleRate: 0,
|
|
606148
|
-
release: "0.4.
|
|
606129
|
+
release: "0.4.1",
|
|
606149
606130
|
environment: process.env.NODE_ENV ?? "development",
|
|
606150
606131
|
enabled: false,
|
|
606151
606132
|
registerEsmLoaderHooks: false,
|
|
@@ -606169,7 +606150,7 @@ function isStandaloneBinary() {
|
|
|
606169
606150
|
return !path$6.basename(process.execPath, ".exe").startsWith("node");
|
|
606170
606151
|
}
|
|
606171
606152
|
function getCurrentVersion() {
|
|
606172
|
-
return "0.4.
|
|
606153
|
+
return "0.4.1";
|
|
606173
606154
|
}
|
|
606174
606155
|
async function fetchLatestVersion() {
|
|
606175
606156
|
return new Promise((resolve, reject) => {
|
|
@@ -606378,7 +606359,7 @@ async function downloadFile(url, dest, onRequest) {
|
|
|
606378
606359
|
}
|
|
606379
606360
|
//#endregion
|
|
606380
606361
|
//#region src/cli.tsx
|
|
606381
|
-
const VERSION = "0.4.
|
|
606362
|
+
const VERSION = "0.4.1";
|
|
606382
606363
|
async function startInk(command, options) {
|
|
606383
606364
|
await render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
|
|
606384
606365
|
command,
|