farseer-cli 1.1.1 → 1.1.3
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/README.md +155 -29
- package/dist/commands/checkout.js +14 -2
- package/dist/commands/checkout.js.map +2 -2
- package/dist/commands/config.js +75 -0
- package/dist/commands/config.js.map +3 -3
- package/dist/commands/dimensions.js +22 -4
- package/dist/commands/dimensions.js.map +2 -2
- package/dist/commands/install.js +5 -6
- package/dist/commands/install.js.map +2 -2
- package/dist/commands/pull.js +17 -3
- package/dist/commands/pull.js.map +2 -2
- package/dist/commands/push.js +15 -3
- package/dist/commands/push.js.map +2 -2
- package/dist/commands/sheets.js +30 -6
- package/dist/commands/sheets.js.map +2 -2
- package/dist/commands/status.js +14 -2
- package/dist/commands/status.js.map +2 -2
- package/dist/commands/variables.js +11 -2
- package/dist/commands/variables.js.map +2 -2
- package/dist/index.js +22 -0
- package/dist/index.js.map +2 -2
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/index.js.map +2 -2
- package/dist/mcp/tools/appTools.js +22 -6
- package/dist/mcp/tools/appTools.js.map +2 -2
- package/dist/mcp/tools/cellTools.js +3 -54
- package/dist/mcp/tools/cellTools.js.map +2 -2
- package/dist/mcp/tools/dataTools.js +84 -28
- package/dist/mcp/tools/dataTools.js.map +2 -2
- package/dist/mcp/tools/modelTools.js +150 -21
- package/dist/mcp/tools/modelTools.js.map +2 -2
- package/dist/mcp/tools/runTools.js +140 -3
- package/dist/mcp/tools/runTools.js.map +2 -2
- package/dist/mcp/tools/sheetTools.js +107 -11
- package/dist/mcp/tools/sheetTools.js.map +2 -2
- package/dist/mcp/tools/syncTools.js +14 -0
- package/dist/mcp/tools/syncTools.js.map +2 -2
- package/dist/services/appSyncService.js +4 -2
- package/dist/services/appSyncService.js.map +2 -2
- package/dist/services/configService.js +25 -0
- package/dist/services/configService.js.map +2 -2
- package/dist/services/farseerApi.js +63 -3
- package/dist/services/farseerApi.js.map +2 -2
- package/dist/services/farseerService.js +93 -4
- package/dist/services/farseerService.js.map +2 -2
- package/dist/services/syncService.js +48 -29
- package/dist/services/syncService.js.map +2 -2
- package/dist/utils/entityResolver.js +6 -8
- package/dist/utils/entityResolver.js.map +2 -2
- package/dist/utils/logger.js +18 -11
- package/dist/utils/logger.js.map +2 -2
- package/dist/utils/packageManager.js +78 -0
- package/dist/utils/packageManager.js.map +7 -0
- package/dist/utils/updateCheck.js +132 -0
- package/dist/utils/updateCheck.js.map +7 -0
- package/docs/cli-guide.md +2 -0
- package/docs/model-export.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var packageManager_exports = {};
|
|
30
|
+
__export(packageManager_exports, {
|
|
31
|
+
FARSEER_CLIENT_URL: () => FARSEER_CLIENT_URL,
|
|
32
|
+
ensurePackageJson: () => ensurePackageJson,
|
|
33
|
+
parsePackageSpec: () => parsePackageSpec
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(packageManager_exports);
|
|
36
|
+
var fs = __toESM(require("fs"));
|
|
37
|
+
var path = __toESM(require("path"));
|
|
38
|
+
const FARSEER_CLIENT_URL = "https://storage.googleapis.com/farseer-remote-jobs-results/farseer-client/release-1.4.5.tar";
|
|
39
|
+
function ensurePackageJson(tenantDir, tenant) {
|
|
40
|
+
const packageJsonPath = path.join(tenantDir, "package.json");
|
|
41
|
+
const addedPackages = [];
|
|
42
|
+
let pkg;
|
|
43
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
44
|
+
pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
|
|
45
|
+
} else {
|
|
46
|
+
pkg = {
|
|
47
|
+
name: `farseer-apps-${tenant}`,
|
|
48
|
+
version: "1.0.0",
|
|
49
|
+
private: true,
|
|
50
|
+
description: `Farseer scripts for tenant ${tenant}`,
|
|
51
|
+
dependencies: {}
|
|
52
|
+
};
|
|
53
|
+
addedPackages.push("package.json (created)");
|
|
54
|
+
}
|
|
55
|
+
pkg.dependencies = pkg.dependencies || {};
|
|
56
|
+
if (!pkg.dependencies["farseer-client"]) {
|
|
57
|
+
pkg.dependencies["farseer-client"] = FARSEER_CLIENT_URL;
|
|
58
|
+
addedPackages.push("farseer-client");
|
|
59
|
+
}
|
|
60
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
61
|
+
return addedPackages;
|
|
62
|
+
}
|
|
63
|
+
function parsePackageSpec(spec) {
|
|
64
|
+
const isScoped = spec.startsWith("@");
|
|
65
|
+
const lastAt = spec.lastIndexOf("@");
|
|
66
|
+
const hasVersion = lastAt > 0 && (!isScoped || lastAt > spec.indexOf("/"));
|
|
67
|
+
return {
|
|
68
|
+
name: hasVersion ? spec.substring(0, lastAt) : spec,
|
|
69
|
+
version: hasVersion ? spec.substring(lastAt + 1) : "*"
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
73
|
+
0 && (module.exports = {
|
|
74
|
+
FARSEER_CLIENT_URL,
|
|
75
|
+
ensurePackageJson,
|
|
76
|
+
parsePackageSpec
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=packageManager.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/packageManager.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Package Manager Utilities\n *\n * Shared logic for managing tenant package.json files and farseer-client dependency.\n * Used by both CLI install command and MCP farseer_install tool.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\n\n// farseer-client tarball URL \u2014 single source of truth.\n// Update this when publishing a new farseer-client version.\nexport const FARSEER_CLIENT_URL =\n 'https://storage.googleapis.com/farseer-remote-jobs-results/farseer-client/release-1.4.5.tar';\n\n/**\n * Ensure the tenant directory has a package.json with farseer-client.\n * Creates package.json if it doesn't exist, adds farseer-client if missing.\n * Returns list of packages that were added.\n */\nexport function ensurePackageJson(tenantDir: string, tenant: string): string[] {\n const packageJsonPath = path.join(tenantDir, 'package.json');\n const addedPackages: string[] = [];\n\n let pkg: any;\n if (fs.existsSync(packageJsonPath)) {\n pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));\n } else {\n pkg = {\n name: `farseer-apps-${tenant}`,\n version: '1.0.0',\n private: true,\n description: `Farseer scripts for tenant ${tenant}`,\n dependencies: {},\n };\n addedPackages.push('package.json (created)');\n }\n\n pkg.dependencies = pkg.dependencies || {};\n\n if (!pkg.dependencies['farseer-client']) {\n pkg.dependencies['farseer-client'] = FARSEER_CLIENT_URL;\n addedPackages.push('farseer-client');\n }\n\n fs.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2) + '\\n');\n return addedPackages;\n}\n\n/**\n * Parse an npm package specifier into name and version.\n * Handles scoped packages: @scope/name@version \u2192 { name: \"@scope/name\", version: \"version\" }\n */\nexport function parsePackageSpec(spec: string): { name: string; version: string } {\n const isScoped = spec.startsWith('@');\n const lastAt = spec.lastIndexOf('@');\n const hasVersion = lastAt > 0 && (!isScoped || lastAt > spec.indexOf('/'));\n\n return {\n name: hasVersion ? spec.substring(0, lastAt) : spec,\n version: hasVersion ? spec.substring(lastAt + 1) : '*',\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAoB;AACpB,WAAsB;AAIf,MAAM,qBACT;AAOG,SAAS,kBAAkB,WAAmB,QAA0B;AAC3E,QAAM,kBAAkB,KAAK,KAAK,WAAW,cAAc;AAC3D,QAAM,gBAA0B,CAAC;AAEjC,MAAI;AACJ,MAAI,GAAG,WAAW,eAAe,GAAG;AAChC,UAAM,KAAK,MAAM,GAAG,aAAa,iBAAiB,OAAO,CAAC;AAAA,EAC9D,OAAO;AACH,UAAM;AAAA,MACF,MAAM,gBAAgB,MAAM;AAAA,MAC5B,SAAS;AAAA,MACT,SAAS;AAAA,MACT,aAAa,8BAA8B,MAAM;AAAA,MACjD,cAAc,CAAC;AAAA,IACnB;AACA,kBAAc,KAAK,wBAAwB;AAAA,EAC/C;AAEA,MAAI,eAAe,IAAI,gBAAgB,CAAC;AAExC,MAAI,CAAC,IAAI,aAAa,gBAAgB,GAAG;AACrC,QAAI,aAAa,gBAAgB,IAAI;AACrC,kBAAc,KAAK,gBAAgB;AAAA,EACvC;AAEA,KAAG,cAAc,iBAAiB,KAAK,UAAU,KAAK,MAAM,CAAC,IAAI,IAAI;AACrE,SAAO;AACX;AAMO,SAAS,iBAAiB,MAAiD;AAC9E,QAAM,WAAW,KAAK,WAAW,GAAG;AACpC,QAAM,SAAS,KAAK,YAAY,GAAG;AACnC,QAAM,aAAa,SAAS,MAAM,CAAC,YAAY,SAAS,KAAK,QAAQ,GAAG;AAExE,SAAO;AAAA,IACH,MAAM,aAAa,KAAK,UAAU,GAAG,MAAM,IAAI;AAAA,IAC/C,SAAS,aAAa,KAAK,UAAU,SAAS,CAAC,IAAI;AAAA,EACvD;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var updateCheck_exports = {};
|
|
30
|
+
__export(updateCheck_exports, {
|
|
31
|
+
checkForUpdates: () => checkForUpdates
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(updateCheck_exports);
|
|
34
|
+
var https = __toESM(require("https"));
|
|
35
|
+
var fs = __toESM(require("fs"));
|
|
36
|
+
var path = __toESM(require("path"));
|
|
37
|
+
var os = __toESM(require("os"));
|
|
38
|
+
var import_chalk = __toESM(require("chalk"));
|
|
39
|
+
var import_constants = require("./constants");
|
|
40
|
+
const CONFIG_DIR = path.join(os.homedir(), ".farseer");
|
|
41
|
+
const CACHE_FILE = path.join(CONFIG_DIR, "update-check.json");
|
|
42
|
+
const CACHE_TTL_MS = 4 * 60 * 60 * 1e3;
|
|
43
|
+
const FETCH_TIMEOUT_MS = 3e3;
|
|
44
|
+
const REGISTRY_URL = "https://registry.npmjs.org/farseer-cli/latest";
|
|
45
|
+
function isNewerVersion(latest, current) {
|
|
46
|
+
const latestParts = latest.split(".").map(Number);
|
|
47
|
+
const currentParts = current.split(".").map(Number);
|
|
48
|
+
for (let i = 0; i < 3; i++) {
|
|
49
|
+
const l = latestParts[i] || 0;
|
|
50
|
+
const c = currentParts[i] || 0;
|
|
51
|
+
if (l > c) return true;
|
|
52
|
+
if (l < c) return false;
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
function readCache() {
|
|
57
|
+
try {
|
|
58
|
+
const data = JSON.parse(fs.readFileSync(CACHE_FILE, "utf-8"));
|
|
59
|
+
if (typeof data.lastCheck === "number" && typeof data.latestVersion === "string") {
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
} catch {
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
function writeCache(latestVersion) {
|
|
67
|
+
try {
|
|
68
|
+
if (!fs.existsSync(CONFIG_DIR)) {
|
|
69
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
70
|
+
}
|
|
71
|
+
const data = { lastCheck: Date.now(), latestVersion };
|
|
72
|
+
fs.writeFileSync(CACHE_FILE, JSON.stringify(data), "utf-8");
|
|
73
|
+
} catch {
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function fetchLatestVersion() {
|
|
77
|
+
return new Promise((resolve) => {
|
|
78
|
+
const req = https.get(REGISTRY_URL, { timeout: FETCH_TIMEOUT_MS }, (res) => {
|
|
79
|
+
if (res.statusCode !== 200) {
|
|
80
|
+
res.resume();
|
|
81
|
+
resolve(null);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
let body = "";
|
|
85
|
+
res.setEncoding("utf-8");
|
|
86
|
+
res.on("data", (chunk) => body += chunk);
|
|
87
|
+
res.on("end", () => {
|
|
88
|
+
try {
|
|
89
|
+
const json = JSON.parse(body);
|
|
90
|
+
resolve(typeof json.version === "string" ? json.version : null);
|
|
91
|
+
} catch {
|
|
92
|
+
resolve(null);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
req.on("error", () => resolve(null));
|
|
97
|
+
req.on("timeout", () => {
|
|
98
|
+
req.destroy();
|
|
99
|
+
resolve(null);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
async function checkForUpdates() {
|
|
104
|
+
try {
|
|
105
|
+
let latestVersion = null;
|
|
106
|
+
const cache = readCache();
|
|
107
|
+
if (cache && Date.now() - cache.lastCheck < CACHE_TTL_MS) {
|
|
108
|
+
latestVersion = cache.latestVersion;
|
|
109
|
+
} else {
|
|
110
|
+
latestVersion = await fetchLatestVersion();
|
|
111
|
+
if (latestVersion) {
|
|
112
|
+
writeCache(latestVersion);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (latestVersion && isNewerVersion(latestVersion, import_constants.CLI_VERSION)) {
|
|
116
|
+
return [
|
|
117
|
+
"",
|
|
118
|
+
import_chalk.default.yellow(` Update available: ${import_constants.CLI_VERSION} \u2192 ${import_chalk.default.green(latestVersion)}`),
|
|
119
|
+
import_chalk.default.yellow(` Run ${import_chalk.default.cyan("npm install -g farseer-cli@latest")} to update`),
|
|
120
|
+
""
|
|
121
|
+
].join("\n");
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
} catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
129
|
+
0 && (module.exports = {
|
|
130
|
+
checkForUpdates
|
|
131
|
+
});
|
|
132
|
+
//# sourceMappingURL=updateCheck.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/utils/updateCheck.ts"],
|
|
4
|
+
"sourcesContent": ["import * as https from 'https';\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as os from 'os';\nimport chalk from 'chalk';\nimport { CLI_VERSION } from './constants';\n\nconst CONFIG_DIR = path.join(os.homedir(), '.farseer');\nconst CACHE_FILE = path.join(CONFIG_DIR, 'update-check.json');\nconst CACHE_TTL_MS = 4 * 60 * 60 * 1000; // 4 hours\nconst FETCH_TIMEOUT_MS = 3000;\nconst REGISTRY_URL = 'https://registry.npmjs.org/farseer-cli/latest';\n\ninterface UpdateCache {\n lastCheck: number;\n latestVersion: string;\n}\n\nfunction isNewerVersion(latest: string, current: string): boolean {\n const latestParts = latest.split('.').map(Number);\n const currentParts = current.split('.').map(Number);\n for (let i = 0; i < 3; i++) {\n const l = latestParts[i] || 0;\n const c = currentParts[i] || 0;\n if (l > c) return true;\n if (l < c) return false;\n }\n return false;\n}\n\nfunction readCache(): UpdateCache | null {\n try {\n const data = JSON.parse(fs.readFileSync(CACHE_FILE, 'utf-8'));\n if (typeof data.lastCheck === 'number' && typeof data.latestVersion === 'string') {\n return data as UpdateCache;\n }\n } catch {\n // Cache missing or corrupt \u2014 ignore\n }\n return null;\n}\n\nfunction writeCache(latestVersion: string): void {\n try {\n if (!fs.existsSync(CONFIG_DIR)) {\n fs.mkdirSync(CONFIG_DIR, { recursive: true });\n }\n const data: UpdateCache = { lastCheck: Date.now(), latestVersion };\n fs.writeFileSync(CACHE_FILE, JSON.stringify(data), 'utf-8');\n } catch {\n // Non-critical \u2014 ignore write errors\n }\n}\n\nfunction fetchLatestVersion(): Promise<string | null> {\n return new Promise((resolve) => {\n const req = https.get(REGISTRY_URL, { timeout: FETCH_TIMEOUT_MS }, (res) => {\n if (res.statusCode !== 200) {\n res.resume(); // drain response\n resolve(null);\n return;\n }\n let body = '';\n res.setEncoding('utf-8');\n res.on('data', (chunk) => (body += chunk));\n res.on('end', () => {\n try {\n const json = JSON.parse(body);\n resolve(typeof json.version === 'string' ? json.version : null);\n } catch {\n resolve(null);\n }\n });\n });\n req.on('error', () => resolve(null));\n req.on('timeout', () => {\n req.destroy();\n resolve(null);\n });\n });\n}\n\nexport async function checkForUpdates(): Promise<string | null> {\n try {\n let latestVersion: string | null = null;\n\n const cache = readCache();\n if (cache && Date.now() - cache.lastCheck < CACHE_TTL_MS) {\n latestVersion = cache.latestVersion;\n } else {\n latestVersion = await fetchLatestVersion();\n if (latestVersion) {\n writeCache(latestVersion);\n }\n }\n\n if (latestVersion && isNewerVersion(latestVersion, CLI_VERSION)) {\n return [\n '',\n chalk.yellow(` Update available: ${CLI_VERSION} \u2192 ${chalk.green(latestVersion)}`),\n chalk.yellow(` Run ${chalk.cyan('npm install -g farseer-cli@latest')} to update`),\n '',\n ].join('\\n');\n }\n\n return null;\n } catch {\n // Graceful failure \u2014 never let update check break the CLI\n return null;\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["chalk"]
|
|
7
|
+
}
|
package/docs/cli-guide.md
CHANGED
|
@@ -49,6 +49,8 @@ farseer install
|
|
|
49
49
|
|
|
50
50
|
This runs `npm install` in the tenant directory (`farseer-apps/<tenant>/`).
|
|
51
51
|
|
|
52
|
+
> **Important:** All CLI commands must be run from the **repository root** (the directory containing `farseer-apps/`). The CLI resolves paths relative to `process.cwd()`. Running from inside `farseer-apps/<tenant>/` will fail.
|
|
53
|
+
|
|
52
54
|
### 5. Work with Files
|
|
53
55
|
|
|
54
56
|
Edit scripts in `farseer-apps/<tenant>/files/Scripts/`. Check status and push:
|
package/docs/model-export.md
CHANGED
|
@@ -15,7 +15,7 @@ farseer model --variable "Revenue" # Show dimensions for a variable
|
|
|
15
15
|
|
|
16
16
|
### Via MCP
|
|
17
17
|
|
|
18
|
-
Use `farseer_export_model` to get the full model as JSON.
|
|
18
|
+
Use `farseer_export_model` to get the full model as JSON. For large models (20KB+), the result is automatically saved to a temp file and a summary is returned — use the Read tool to inspect the file.
|
|
19
19
|
|
|
20
20
|
### Via farseer-client
|
|
21
21
|
|