@builder.io/buildercode 0.1.0 → 0.3.0
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 +11 -14
- package/package.json +1 -2
package/dist/cli.mjs
CHANGED
|
@@ -198373,10 +198373,7 @@ const LIB_CACHE = /* @__PURE__ */ new Map();
|
|
|
198373
198373
|
const PENDING_LIB_CACHE = /* @__PURE__ */ new Map();
|
|
198374
198374
|
const NODE_MODULE_CACHE = /* @__PURE__ */ new Map();
|
|
198375
198375
|
const TSCONFIG_CACHE = /* @__PURE__ */ new Map();
|
|
198376
|
-
|
|
198377
|
-
//#region ../dev-tools/cli/version.ts
|
|
198378
|
-
const builderVersion = typeof DEV_TOOLS_VERSION === "string" ? DEV_TOOLS_VERSION : "0.0.0";
|
|
198379
|
-
const pkgVersion = process.env.OVERRIDE_VERSION ?? builderVersion;
|
|
198376
|
+
const pkgVersion = process.env.OVERRIDE_VERSION ?? "0.3.0";
|
|
198380
198377
|
//#endregion
|
|
198381
198378
|
//#region ../dev-tools/core/detect-frameworks.ts
|
|
198382
198379
|
async function detectFrameworks$1(sys) {
|
|
@@ -537994,7 +537991,7 @@ const FooterSection = (0, import_react.memo)(() => {
|
|
|
537994
537991
|
children: [
|
|
537995
537992
|
"•",
|
|
537996
537993
|
" Fusion ",
|
|
537997
|
-
|
|
537994
|
+
"0.3.0"
|
|
537998
537995
|
]
|
|
537999
537996
|
});
|
|
538000
537997
|
$[4] = t4;
|
|
@@ -599914,7 +599911,7 @@ function _temp() {
|
|
|
599914
599911
|
//#region src/updater.ts
|
|
599915
599912
|
const REGISTRY_BASE = "https://registry.npmjs.org/@builder.io";
|
|
599916
599913
|
const CHECK_INTERVAL_MS = 1440 * 60 * 1e3;
|
|
599917
|
-
const CONFIG_DIR = path$6.join(os$11.homedir(), ".
|
|
599914
|
+
const CONFIG_DIR = path$6.join(os$11.homedir(), ".builder", "buildercode");
|
|
599918
599915
|
const UPDATE_CHECK_FILE = path$6.join(CONFIG_DIR, "update-check.json");
|
|
599919
599916
|
/**
|
|
599920
599917
|
* Returns true when running as a standalone pkg binary (not via `node` or `npx`).
|
|
@@ -599924,11 +599921,11 @@ function isStandaloneBinary() {
|
|
|
599924
599921
|
return !path$6.basename(process.execPath, ".exe").startsWith("node");
|
|
599925
599922
|
}
|
|
599926
599923
|
function getCurrentVersion() {
|
|
599927
|
-
return
|
|
599924
|
+
return "0.3.0";
|
|
599928
599925
|
}
|
|
599929
599926
|
async function fetchLatestVersion() {
|
|
599930
599927
|
return new Promise((resolve, reject) => {
|
|
599931
|
-
const url = `${REGISTRY_BASE}/
|
|
599928
|
+
const url = `${REGISTRY_BASE}/buildercode/latest`;
|
|
599932
599929
|
https$4.get(url, { headers: { Accept: "application/json" } }, (res) => {
|
|
599933
599930
|
if (res.statusCode !== 200) {
|
|
599934
599931
|
res.resume();
|
|
@@ -599989,7 +599986,7 @@ async function runUpdateCheck() {
|
|
|
599989
599986
|
});
|
|
599990
599987
|
}
|
|
599991
599988
|
const current = getCurrentVersion();
|
|
599992
|
-
if (isNewerVersion(latestVersion, current)) return `Update available: ${current} → ${latestVersion}\nRun \`
|
|
599989
|
+
if (isNewerVersion(latestVersion, current)) return `Update available: ${current} → ${latestVersion}\nRun \`builder update\` to install.`;
|
|
599993
599990
|
} catch {}
|
|
599994
599991
|
return null;
|
|
599995
599992
|
}
|
|
@@ -600033,7 +600030,7 @@ async function selfUpdate(onProgress) {
|
|
|
600033
600030
|
checkedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
600034
600031
|
latestVersion
|
|
600035
600032
|
});
|
|
600036
|
-
onProgress(`Updated to ${latestVersion}. Restart
|
|
600033
|
+
onProgress(`Updated to ${latestVersion}. Restart builder to apply.`);
|
|
600037
600034
|
} finally {
|
|
600038
600035
|
fs$20.rmSync(tmpDir, {
|
|
600039
600036
|
recursive: true,
|
|
@@ -600043,12 +600040,12 @@ async function selfUpdate(onProgress) {
|
|
|
600043
600040
|
}
|
|
600044
600041
|
function createTempDir(preferredDir) {
|
|
600045
600042
|
try {
|
|
600046
|
-
const probe = path$6.join(preferredDir, ".
|
|
600043
|
+
const probe = path$6.join(preferredDir, ".buildercode-write-test");
|
|
600047
600044
|
fs$20.writeFileSync(probe, "");
|
|
600048
600045
|
fs$20.unlinkSync(probe);
|
|
600049
|
-
return fs$20.mkdtempSync(path$6.join(preferredDir, ".
|
|
600046
|
+
return fs$20.mkdtempSync(path$6.join(preferredDir, ".buildercode-update-"));
|
|
600050
600047
|
} catch {
|
|
600051
|
-
return fs$20.mkdtempSync(path$6.join(os$11.tmpdir(), "
|
|
600048
|
+
return fs$20.mkdtempSync(path$6.join(os$11.tmpdir(), "buildercode-update-"));
|
|
600052
600049
|
}
|
|
600053
600050
|
}
|
|
600054
600051
|
function atomicReplace(source, dest) {
|
|
@@ -600099,7 +600096,7 @@ async function downloadFile(url, dest) {
|
|
|
600099
600096
|
}
|
|
600100
600097
|
//#endregion
|
|
600101
600098
|
//#region src/cli.tsx
|
|
600102
|
-
const VERSION =
|
|
600099
|
+
const VERSION = "0.3.0";
|
|
600103
600100
|
async function startInk(command, options) {
|
|
600104
600101
|
return render(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(App, {
|
|
600105
600102
|
command,
|