@linkup-ai/abap-ai 2.2.1 → 2.2.2
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/activate.js +2 -1
- package/dist/cli/init.js +8 -11
- package/dist/cli/remove.js +2 -1
- package/dist/cli/status.js +5 -3
- package/dist/cli/systems.js +2 -1
- package/dist/cli.js +2 -1
- package/package.json +1 -1
package/dist/cli/activate.js
CHANGED
|
@@ -37,8 +37,9 @@ exports.readLicense = readLicense;
|
|
|
37
37
|
exports.activate = activate;
|
|
38
38
|
const crypto = __importStar(require("crypto"));
|
|
39
39
|
const fs = __importStar(require("fs"));
|
|
40
|
+
const os = __importStar(require("os"));
|
|
40
41
|
const path = __importStar(require("path"));
|
|
41
|
-
const LICENSE_DIR = path.join(
|
|
42
|
+
const LICENSE_DIR = path.join(os.homedir(), ".abap-ai");
|
|
42
43
|
const LICENSE_PATH = path.join(LICENSE_DIR, "license.json");
|
|
43
44
|
// ── Beta key validation (offline, HMAC-based) ───────────────────────
|
|
44
45
|
// Em produção será substituído por fetch ao license server (api.lkpabap.ai)
|
package/dist/cli/init.js
CHANGED
|
@@ -39,10 +39,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.init = init;
|
|
40
40
|
const prompts_1 = __importDefault(require("prompts"));
|
|
41
41
|
const fs = __importStar(require("fs"));
|
|
42
|
+
const os = __importStar(require("os"));
|
|
42
43
|
const path = __importStar(require("path"));
|
|
43
44
|
const https = __importStar(require("https"));
|
|
44
45
|
const http = __importStar(require("http"));
|
|
45
|
-
const GLOBAL_MCP_PATH = path.join(
|
|
46
|
+
const GLOBAL_MCP_PATH = path.join(os.homedir(), ".claude", "mcp.json");
|
|
46
47
|
const LOCAL_MCP_PATH = path.join(process.cwd(), ".claude", "mcp.json");
|
|
47
48
|
function getMcpPath(local) {
|
|
48
49
|
return local ? LOCAL_MCP_PATH : GLOBAL_MCP_PATH;
|
|
@@ -136,13 +137,8 @@ function writeMcpConfig(config, mcpPath) {
|
|
|
136
137
|
fs.writeFileSync(mcpPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
|
|
137
138
|
}
|
|
138
139
|
function detectServerPath() {
|
|
139
|
-
//
|
|
140
|
-
|
|
141
|
-
if (fs.existsSync(fromCli))
|
|
142
|
-
return fromCli;
|
|
143
|
-
// Fallback: path global do pacote
|
|
144
|
-
const globalPath = path.resolve(__dirname, "..", "index.js");
|
|
145
|
-
return globalPath;
|
|
140
|
+
// cli.js e index.js ficam ambos em dist/ após o build
|
|
141
|
+
return path.resolve(__dirname, "index.js");
|
|
146
142
|
}
|
|
147
143
|
function addSystemToConfig(config, system) {
|
|
148
144
|
const serverName = `abap-${system.name}`;
|
|
@@ -159,7 +155,7 @@ function addSystemToConfig(config, system) {
|
|
|
159
155
|
env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
|
160
156
|
}
|
|
161
157
|
config.mcpServers[serverName] = {
|
|
162
|
-
command:
|
|
158
|
+
command: process.execPath,
|
|
163
159
|
args: [serverPath],
|
|
164
160
|
env,
|
|
165
161
|
};
|
|
@@ -346,8 +342,9 @@ async function init(options = {}) {
|
|
|
346
342
|
console.log(`${line}${" ".repeat(Math.max(1, 48 - line.length))}│`);
|
|
347
343
|
}
|
|
348
344
|
console.log(` │${" ".repeat(46)}│
|
|
349
|
-
│ Próximo passo:${" ".repeat(
|
|
350
|
-
│
|
|
345
|
+
│ Próximo passo no VS Code:${" ".repeat(19)}│
|
|
346
|
+
│ 1. Ctrl+Shift+P → "Reload Window"${" ".repeat(8)}│
|
|
347
|
+
│ 2. Abra o Claude Code e use!${" ".repeat(13)}│
|
|
351
348
|
╰──────────────────────────────────────────────╯
|
|
352
349
|
`);
|
|
353
350
|
}
|
package/dist/cli/remove.js
CHANGED
|
@@ -39,8 +39,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.remove = remove;
|
|
40
40
|
const prompts_1 = __importDefault(require("prompts"));
|
|
41
41
|
const fs = __importStar(require("fs"));
|
|
42
|
+
const os = __importStar(require("os"));
|
|
42
43
|
const path = __importStar(require("path"));
|
|
43
|
-
const GLOBAL_MCP_PATH = path.join(
|
|
44
|
+
const GLOBAL_MCP_PATH = path.join(os.homedir(), ".claude", "mcp.json");
|
|
44
45
|
const LOCAL_MCP_PATH = path.join(process.cwd(), ".claude", "mcp.json");
|
|
45
46
|
async function remove(name, options = {}) {
|
|
46
47
|
const serverName = name.startsWith("abap-") ? name : `abap-${name}`;
|
package/dist/cli/status.js
CHANGED
|
@@ -35,13 +35,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.status = status;
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
|
+
const os = __importStar(require("os"));
|
|
38
39
|
const path = __importStar(require("path"));
|
|
39
40
|
const https = __importStar(require("https"));
|
|
40
41
|
const http = __importStar(require("http"));
|
|
41
42
|
const activate_js_1 = require("./activate.js");
|
|
42
|
-
const MCP_JSON_PATH = path.join(
|
|
43
|
-
const LOG_DIR = path.join(
|
|
44
|
-
|
|
43
|
+
const MCP_JSON_PATH = path.join(os.homedir(), ".claude", "mcp.json");
|
|
44
|
+
const LOG_DIR = path.join(os.homedir(), ".abap-ai", "logs");
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
46
|
+
const VERSION = require("../../package.json").version;
|
|
45
47
|
// ---------------------------------------------------------------------------
|
|
46
48
|
// Teste rápido de conexão (timeout 5s)
|
|
47
49
|
// ---------------------------------------------------------------------------
|
package/dist/cli/systems.js
CHANGED
|
@@ -35,8 +35,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.systems = systems;
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
|
+
const os = __importStar(require("os"));
|
|
38
39
|
const path = __importStar(require("path"));
|
|
39
|
-
const GLOBAL_MCP_PATH = path.join(
|
|
40
|
+
const GLOBAL_MCP_PATH = path.join(os.homedir(), ".claude", "mcp.json");
|
|
40
41
|
const LOCAL_MCP_PATH = path.join(process.cwd(), ".claude", "mcp.json");
|
|
41
42
|
async function systems(options = {}) {
|
|
42
43
|
const mcpPath = options.local ? LOCAL_MCP_PATH : GLOBAL_MCP_PATH;
|
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,8 @@ const activate_js_1 = require("./cli/activate.js");
|
|
|
6
6
|
const status_js_1 = require("./cli/status.js");
|
|
7
7
|
const remove_js_1 = require("./cli/remove.js");
|
|
8
8
|
const systems_js_1 = require("./cli/systems.js");
|
|
9
|
-
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
10
|
+
const VERSION = require("../package.json").version;
|
|
10
11
|
const HELP = `
|
|
11
12
|
LKPABAP.ai — AI-powered ABAP development for SAP
|
|
12
13
|
|