@mtreeai/msapling-cli 2.3.6-beta.6 → 2.3.6-beta.7
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 +19 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3541,17 +3541,17 @@ async function backupFile(absPath) {
|
|
|
3541
3541
|
try {
|
|
3542
3542
|
const { readFile: readFile23, writeFile: writeFile12, mkdir: mkdir9 } = await import("fs/promises");
|
|
3543
3543
|
const { homedir: homedir17 } = await import("os");
|
|
3544
|
-
const { join:
|
|
3544
|
+
const { join: join31 } = await import("path");
|
|
3545
3545
|
const filename = absPath.split(/[\\/]/).pop() ?? "file";
|
|
3546
3546
|
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
3547
3547
|
const suffix = randomBytes5(4).toString("hex");
|
|
3548
|
-
const backupPath =
|
|
3548
|
+
const backupPath = join31(
|
|
3549
3549
|
homedir17(),
|
|
3550
3550
|
".msapling",
|
|
3551
3551
|
"backups",
|
|
3552
3552
|
`${filename}.backup-${stamp}-${suffix}.bak`
|
|
3553
3553
|
);
|
|
3554
|
-
await mkdir9(
|
|
3554
|
+
await mkdir9(join31(homedir17(), ".msapling", "backups"), { recursive: true });
|
|
3555
3555
|
const content = await readFile23(absPath, "utf8");
|
|
3556
3556
|
await writeFile12(backupPath, content, "utf8");
|
|
3557
3557
|
return backupPath;
|
|
@@ -13134,7 +13134,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
13134
13134
|
var Header = () => /* @__PURE__ */ jsxs(Box, { borderStyle: "single", borderColor: "cyan", paddingX: 1, marginBottom: 1, children: [
|
|
13135
13135
|
/* @__PURE__ */ jsxs(Text, { bold: true, color: "cyan", children: [
|
|
13136
13136
|
"\u25CF MSapling CLI v",
|
|
13137
|
-
"2.3.6-beta.
|
|
13137
|
+
"2.3.6-beta.7"
|
|
13138
13138
|
] }),
|
|
13139
13139
|
/* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Text, { color: "gray", children: "Platinum Tier Architecture" }) })
|
|
13140
13140
|
] });
|
|
@@ -13779,8 +13779,8 @@ async function initSession(ctx) {
|
|
|
13779
13779
|
}
|
|
13780
13780
|
try {
|
|
13781
13781
|
const { homedir: homedir17 } = await import("os");
|
|
13782
|
-
const { join:
|
|
13783
|
-
const userSettingsPath =
|
|
13782
|
+
const { join: join31 } = await import("path");
|
|
13783
|
+
const userSettingsPath = join31(homedir17(), ".msapling", "settings.json");
|
|
13784
13784
|
if (existsSync25(userSettingsPath)) {
|
|
13785
13785
|
const userText = await readFile22(userSettingsPath, "utf8");
|
|
13786
13786
|
let parsed;
|
|
@@ -14077,18 +14077,21 @@ var App = ({ compact: compact2 = false }) => {
|
|
|
14077
14077
|
|
|
14078
14078
|
// src/runtime/bootstrap.ts
|
|
14079
14079
|
init_esm_shims();
|
|
14080
|
-
import {
|
|
14080
|
+
import { readFileSync as readFileSync3 } from "fs";
|
|
14081
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
14082
|
+
import { dirname as dirname3, join as join30 } from "path";
|
|
14081
14083
|
function readCliVersion2() {
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
|
|
14090
|
-
|
|
14084
|
+
const here = dirname3(fileURLToPath2(import.meta.url));
|
|
14085
|
+
for (const rel of ["../package.json", "../../package.json"]) {
|
|
14086
|
+
try {
|
|
14087
|
+
const pkg = JSON.parse(readFileSync3(join30(here, rel), "utf8"));
|
|
14088
|
+
if (pkg.name && pkg.version) {
|
|
14089
|
+
return { name: pkg.name, version: pkg.version };
|
|
14090
|
+
}
|
|
14091
|
+
} catch {
|
|
14092
|
+
}
|
|
14091
14093
|
}
|
|
14094
|
+
return { name: "@mtreeai/msapling-cli", version: "unknown" };
|
|
14092
14095
|
}
|
|
14093
14096
|
var CLI_PKG = readCliVersion2();
|
|
14094
14097
|
function handleCliArgs(args2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtreeai/msapling-cli",
|
|
3
|
-
"version": "2.3.6-beta.
|
|
3
|
+
"version": "2.3.6-beta.7",
|
|
4
4
|
"description": "MSapling CLI — React/Ink terminal client for the MSapling backend (chat, projects, MDrive, agent tools). Proprietary; redistribution prohibited.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "MSapling Team",
|