farseer-cli 1.1.3 → 1.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.
@@ -0,0 +1,225 @@
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 fileLogger_exports = {};
30
+ __export(fileLogger_exports, {
31
+ fileLogger: () => fileLogger
32
+ });
33
+ module.exports = __toCommonJS(fileLogger_exports);
34
+ var fs = __toESM(require("fs"));
35
+ var path = __toESM(require("path"));
36
+ var os = __toESM(require("os"));
37
+ var import_constants = require("./constants");
38
+ const LOG_DIR = path.join(os.homedir(), ".farseer", "logs");
39
+ const MAX_LOG_FILES = 10;
40
+ let logFilePath = null;
41
+ let logStream = null;
42
+ function createLogPath() {
43
+ const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
44
+ return path.join(LOG_DIR, `farseer-${ts}.log`);
45
+ }
46
+ function rotateLogFiles() {
47
+ try {
48
+ const files = fs.readdirSync(LOG_DIR).filter((f) => f.startsWith("farseer-") && f.endsWith(".log")).sort().reverse();
49
+ for (const file of files.slice(MAX_LOG_FILES)) {
50
+ try {
51
+ fs.unlinkSync(path.join(LOG_DIR, file));
52
+ } catch {
53
+ }
54
+ }
55
+ } catch {
56
+ }
57
+ }
58
+ function writeEntry(level, category, data) {
59
+ if (!logStream) return;
60
+ try {
61
+ const entry = {
62
+ ts: (/* @__PURE__ */ new Date()).toISOString(),
63
+ level,
64
+ cat: category,
65
+ ...data !== void 0 ? { data } : {}
66
+ };
67
+ logStream.write(JSON.stringify(entry) + "\n");
68
+ } catch {
69
+ }
70
+ }
71
+ function writeSyncEntry(level, category, data) {
72
+ if (!logFilePath) return;
73
+ try {
74
+ const entry = {
75
+ ts: (/* @__PURE__ */ new Date()).toISOString(),
76
+ level,
77
+ cat: category,
78
+ ...data !== void 0 ? { data } : {}
79
+ };
80
+ fs.appendFileSync(logFilePath, JSON.stringify(entry) + "\n");
81
+ } catch {
82
+ }
83
+ }
84
+ function serializeError(error) {
85
+ if (error instanceof Error) {
86
+ const result = {
87
+ name: error.name,
88
+ message: error.message,
89
+ stack: error.stack
90
+ };
91
+ if ("response" in error) {
92
+ const e = error;
93
+ result.status = e.response?.status;
94
+ result.statusText = e.response?.statusText;
95
+ result.responseData = e.response?.data;
96
+ result.url = e.config?.url;
97
+ result.method = e.config?.method;
98
+ }
99
+ return result;
100
+ }
101
+ if (typeof error === "object" && error !== null) {
102
+ try {
103
+ return JSON.parse(JSON.stringify(error));
104
+ } catch {
105
+ return { raw: String(error) };
106
+ }
107
+ }
108
+ return { raw: String(error) };
109
+ }
110
+ let initialized = false;
111
+ let crashHandlersInstalled = false;
112
+ const fileLogger = {
113
+ /**
114
+ * Initialize the file logger. Idempotent — safe to call multiple times.
115
+ * Creates the log directory and file, writes session header.
116
+ */
117
+ init() {
118
+ if (initialized) return;
119
+ initialized = true;
120
+ try {
121
+ fs.mkdirSync(LOG_DIR, { recursive: true });
122
+ rotateLogFiles();
123
+ logFilePath = createLogPath();
124
+ logStream = fs.createWriteStream(logFilePath, { flags: "a" });
125
+ writeEntry("info", "session", {
126
+ version: import_constants.CLI_VERSION,
127
+ node: process.version,
128
+ platform: os.platform(),
129
+ arch: os.arch(),
130
+ argv: process.argv.slice(2),
131
+ cwd: process.cwd(),
132
+ pid: process.pid
133
+ });
134
+ } catch {
135
+ logFilePath = null;
136
+ logStream = null;
137
+ }
138
+ },
139
+ /**
140
+ * Log an informational entry.
141
+ */
142
+ log(category, data) {
143
+ writeEntry("info", category, data);
144
+ },
145
+ /**
146
+ * Log a warning.
147
+ */
148
+ warn(category, data) {
149
+ writeEntry("warn", category, data);
150
+ },
151
+ /**
152
+ * Log an error with full details.
153
+ * Uses async stream write (same as other entries) for correct ordering.
154
+ * Only crash handlers use writeSyncEntry where process.exit follows immediately.
155
+ */
156
+ error(category, error, context) {
157
+ writeEntry("error", category, {
158
+ ...serializeError(error),
159
+ ...context || {}
160
+ });
161
+ },
162
+ /**
163
+ * Log an HTTP request/response (for debug).
164
+ */
165
+ http(method, url, status, durationMs, error) {
166
+ const data = { method, url };
167
+ if (status !== void 0) data.status = status;
168
+ if (durationMs !== void 0) data.durationMs = durationMs;
169
+ if (error) data.error = serializeError(error);
170
+ writeEntry(error ? "error" : "info", "http", data);
171
+ },
172
+ /**
173
+ * Log an MCP tool call.
174
+ */
175
+ toolCall(toolName, params, success, durationMs, error) {
176
+ const data = { tool: toolName, params, success };
177
+ if (durationMs !== void 0) data.durationMs = durationMs;
178
+ if (error) data.error = serializeError(error);
179
+ writeEntry(success ? "info" : "error", "mcp-tool", data);
180
+ },
181
+ /**
182
+ * Get the current log file path (to tell user where to find it).
183
+ */
184
+ getLogPath() {
185
+ return logFilePath;
186
+ },
187
+ /**
188
+ * Close the log stream. Call on process exit.
189
+ */
190
+ close() {
191
+ if (logStream) {
192
+ logStream.end();
193
+ logStream = null;
194
+ }
195
+ },
196
+ /**
197
+ * Install crash handlers that write to the log before exit. Idempotent.
198
+ */
199
+ installCrashHandlers() {
200
+ if (crashHandlersInstalled) return;
201
+ crashHandlersInstalled = true;
202
+ process.on("uncaughtException", (err) => {
203
+ writeSyncEntry("fatal", "crash", {
204
+ source: "uncaughtException",
205
+ ...serializeError(err)
206
+ });
207
+ if (logFilePath) {
208
+ console.error(`
209
+ Crash log written to: ${logFilePath}`);
210
+ }
211
+ process.exit(1);
212
+ });
213
+ process.on("unhandledRejection", (reason) => {
214
+ writeSyncEntry("fatal", "crash", {
215
+ source: "unhandledRejection",
216
+ ...serializeError(reason)
217
+ });
218
+ });
219
+ }
220
+ };
221
+ // Annotate the CommonJS export names for ESM import in node:
222
+ 0 && (module.exports = {
223
+ fileLogger
224
+ });
225
+ //# sourceMappingURL=fileLogger.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/fileLogger.ts"],
4
+ "sourcesContent": ["/**\n * File Logger\n *\n * Writes debug logs to ~/.farseer/logs/ for diagnostics.\n * On error, prints the log path so users can share the file for support.\n *\n * Log rotation: keeps last 10 log files, deletes oldest on startup.\n * Format: one JSON line per entry (JSONL) for easy parsing.\n *\n * Usage:\n * import { fileLogger } from './utils/fileLogger';\n * fileLogger.init(); // Call once at startup\n * fileLogger.log('http', { method: 'GET', url: '...' });\n * fileLogger.error('push', error);\n * fileLogger.getLogPath(); // Returns current log file path\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as os from 'os';\nimport { CLI_VERSION } from './constants';\n\nconst LOG_DIR = path.join(os.homedir(), '.farseer', 'logs');\nconst MAX_LOG_FILES = 10;\n\nlet logFilePath: string | null = null;\nlet logStream: fs.WriteStream | null = null;\n\n/**\n * Create a timestamped log file path.\n */\nfunction createLogPath(): string {\n const ts = new Date().toISOString().replace(/[:.]/g, '-');\n return path.join(LOG_DIR, `farseer-${ts}.log`);\n}\n\n/**\n * Remove old log files, keeping only the newest MAX_LOG_FILES.\n */\nfunction rotateLogFiles(): void {\n try {\n const files = fs\n .readdirSync(LOG_DIR)\n .filter((f) => f.startsWith('farseer-') && f.endsWith('.log'))\n .sort()\n .reverse();\n\n for (const file of files.slice(MAX_LOG_FILES)) {\n try {\n fs.unlinkSync(path.join(LOG_DIR, file));\n } catch {\n // Ignore deletion errors\n }\n }\n } catch {\n // Log dir might not exist yet\n }\n}\n\n/**\n * Write a structured log entry.\n */\nfunction writeEntry(level: string, category: string, data?: unknown): void {\n if (!logStream) return;\n try {\n const entry = {\n ts: new Date().toISOString(),\n level,\n cat: category,\n ...(data !== undefined ? { data } : {}),\n };\n logStream.write(JSON.stringify(entry) + '\\n');\n } catch {\n // Never throw from logger\n }\n}\n\n/**\n * Write a log entry synchronously (bypasses stream buffering).\n * Used in crash handlers where process.exit follows immediately.\n */\nfunction writeSyncEntry(level: string, category: string, data?: unknown): void {\n if (!logFilePath) return;\n try {\n const entry = {\n ts: new Date().toISOString(),\n level,\n cat: category,\n ...(data !== undefined ? { data } : {}),\n };\n fs.appendFileSync(logFilePath, JSON.stringify(entry) + '\\n');\n } catch {\n // Never throw from logger\n }\n}\n\n/**\n * Extract error details for logging.\n */\nfunction serializeError(error: unknown): Record<string, unknown> {\n if (error instanceof Error) {\n const result: Record<string, unknown> = {\n name: error.name,\n message: error.message,\n stack: error.stack,\n };\n // Axios errors\n if ('response' in error) {\n const e = error as any;\n result.status = e.response?.status;\n result.statusText = e.response?.statusText;\n result.responseData = e.response?.data;\n result.url = e.config?.url;\n result.method = e.config?.method;\n }\n return result;\n }\n if (typeof error === 'object' && error !== null) {\n try {\n return JSON.parse(JSON.stringify(error));\n } catch {\n return { raw: String(error) };\n }\n }\n return { raw: String(error) };\n}\n\nlet initialized = false;\nlet crashHandlersInstalled = false;\n\nexport const fileLogger = {\n /**\n * Initialize the file logger. Idempotent \u2014 safe to call multiple times.\n * Creates the log directory and file, writes session header.\n */\n init(): void {\n if (initialized) return;\n initialized = true;\n try {\n fs.mkdirSync(LOG_DIR, { recursive: true });\n rotateLogFiles();\n logFilePath = createLogPath();\n logStream = fs.createWriteStream(logFilePath, { flags: 'a' });\n\n // Write session header\n writeEntry('info', 'session', {\n version: CLI_VERSION,\n node: process.version,\n platform: os.platform(),\n arch: os.arch(),\n argv: process.argv.slice(2),\n cwd: process.cwd(),\n pid: process.pid,\n });\n } catch {\n // If we can't create logs, continue without file logging\n logFilePath = null;\n logStream = null;\n }\n },\n\n /**\n * Log an informational entry.\n */\n log(category: string, data?: unknown): void {\n writeEntry('info', category, data);\n },\n\n /**\n * Log a warning.\n */\n warn(category: string, data?: unknown): void {\n writeEntry('warn', category, data);\n },\n\n /**\n * Log an error with full details.\n * Uses async stream write (same as other entries) for correct ordering.\n * Only crash handlers use writeSyncEntry where process.exit follows immediately.\n */\n error(category: string, error: unknown, context?: Record<string, unknown>): void {\n writeEntry('error', category, {\n ...serializeError(error),\n ...(context || {}),\n });\n },\n\n /**\n * Log an HTTP request/response (for debug).\n */\n http(method: string, url: string, status?: number, durationMs?: number, error?: unknown): void {\n const data: Record<string, unknown> = { method, url };\n if (status !== undefined) data.status = status;\n if (durationMs !== undefined) data.durationMs = durationMs;\n if (error) data.error = serializeError(error);\n writeEntry(error ? 'error' : 'info', 'http', data);\n },\n\n /**\n * Log an MCP tool call.\n */\n toolCall(toolName: string, params: unknown, success: boolean, durationMs?: number, error?: unknown): void {\n const data: Record<string, unknown> = { tool: toolName, params, success };\n if (durationMs !== undefined) data.durationMs = durationMs;\n if (error) data.error = serializeError(error);\n writeEntry(success ? 'info' : 'error', 'mcp-tool', data);\n },\n\n /**\n * Get the current log file path (to tell user where to find it).\n */\n getLogPath(): string | null {\n return logFilePath;\n },\n\n /**\n * Close the log stream. Call on process exit.\n */\n close(): void {\n if (logStream) {\n logStream.end();\n logStream = null;\n }\n },\n\n /**\n * Install crash handlers that write to the log before exit. Idempotent.\n */\n installCrashHandlers(): void {\n if (crashHandlersInstalled) return;\n crashHandlersInstalled = true;\n process.on('uncaughtException', (err) => {\n // Use sync write \u2014 stream may not flush before process.exit\n writeSyncEntry('fatal', 'crash', {\n source: 'uncaughtException',\n ...serializeError(err),\n });\n if (logFilePath) {\n console.error(`\\nCrash log written to: ${logFilePath}`);\n }\n process.exit(1);\n });\n\n process.on('unhandledRejection', (reason) => {\n // Pass reason directly \u2014 serializeError handles Error, objects, and primitives.\n // Wrapping in new Error(String(reason)) would lose structured fields on plain objects.\n writeSyncEntry('fatal', 'crash', {\n source: 'unhandledRejection',\n ...serializeError(reason),\n });\n // Don't exit \u2014 unhandled rejections are warnings in newer Node\n });\n },\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA,SAAoB;AACpB,WAAsB;AACtB,SAAoB;AACpB,uBAA4B;AAE5B,MAAM,UAAU,KAAK,KAAK,GAAG,QAAQ,GAAG,YAAY,MAAM;AAC1D,MAAM,gBAAgB;AAEtB,IAAI,cAA6B;AACjC,IAAI,YAAmC;AAKvC,SAAS,gBAAwB;AAC7B,QAAM,MAAK,oBAAI,KAAK,GAAE,YAAY,EAAE,QAAQ,SAAS,GAAG;AACxD,SAAO,KAAK,KAAK,SAAS,WAAW,EAAE,MAAM;AACjD;AAKA,SAAS,iBAAuB;AAC5B,MAAI;AACA,UAAM,QAAQ,GACT,YAAY,OAAO,EACnB,OAAO,CAAC,MAAM,EAAE,WAAW,UAAU,KAAK,EAAE,SAAS,MAAM,CAAC,EAC5D,KAAK,EACL,QAAQ;AAEb,eAAW,QAAQ,MAAM,MAAM,aAAa,GAAG;AAC3C,UAAI;AACA,WAAG,WAAW,KAAK,KAAK,SAAS,IAAI,CAAC;AAAA,MAC1C,QAAQ;AAAA,MAER;AAAA,IACJ;AAAA,EACJ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AAe,KAAK;AAC5C,eAAW,QAAQ,UAAU,QAAQ,QAAQ,IAAI;AAAA,EACrD;AAAA;AAAA;AAAA;AAAA,EAKA,SAAS,UAAkB,QAAiB,SAAkB,YAAqB,OAAuB;AACtG,UAAM,OAAgC,EAAE,MAAM,UAAU,QAAQ,QAAQ;AACxE,QAAI,eAAe,OAAW,MAAK,aAAa;AAChD,QAAI,MAAO,MAAK,QAAQ,eAAe,KAAK;AAC5C,eAAW,UAAU,SAAS,SAAS,YAAY,IAAI;AAAA,EAC3D;AAAA;AAAA;AAAA;AAAA,EAKA,aAA4B;AACxB,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAKA,QAAc;AACV,QAAI,WAAW;AACX,gBAAU,IAAI;AACd,kBAAY;AAAA,IAChB;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA,EAKA,uBAA6B;AACzB,QAAI,uBAAwB;AAC5B,6BAAyB;AACzB,YAAQ,GAAG,qBAAqB,CAAC,QAAQ;AAErC,qBAAe,SAAS,SAAS;AAAA,QAC7B,QAAQ;AAAA,QACR,GAAG,eAAe,GAAG;AAAA,MACzB,CAAC;AACD,UAAI,aAAa;AACb,gBAAQ,MAAM;AAAA,wBAA2B,WAAW,EAAE;AAAA,MAC1D;AACA,cAAQ,KAAK,CAAC;AAAA,IAClB,CAAC;AAED,YAAQ,GAAG,sBAAsB,CAAC,WAAW;AAGzC,qBAAe,SAAS,SAAS;AAAA,QAC7B,QAAQ;AAAA,QACR,GAAG,eAAe,MAAM;AAAA,MAC5B,CAAC;AAAA,IAEL,CAAC;AAAA,EACL;AACJ;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "farseer-cli",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "description": "CLI tool for syncing Farseer App scripts between local folder and Farseer instances",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -20,7 +20,9 @@
20
20
  "format:check": "prettier --check src",
21
21
  "format": "prettier --write src",
22
22
  "dev": "ts-node src/index.ts",
23
- "start": "node dist/index.js"
23
+ "start": "node dist/index.js",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest"
24
26
  },
25
27
  "keywords": [
26
28
  "farseer",
@@ -42,7 +44,7 @@
42
44
  "url": "https://github.com/farseerdev/farseer/issues"
43
45
  },
44
46
  "engines": {
45
- "node": ">=18.0.0"
47
+ "node": ">=20.0.0"
46
48
  },
47
49
  "dependencies": {
48
50
  "@modelcontextprotocol/sdk": "^1.0.0",
@@ -65,6 +67,7 @@
65
67
  "prettier": "^3.3.0",
66
68
  "ts-node": "^10.9.2",
67
69
  "tsx": "^4.21.0",
68
- "typescript": "^5.3.2"
70
+ "typescript": "^5.3.2",
71
+ "vitest": "^4.1.0"
69
72
  }
70
73
  }