draftgo-cli 4.0.23 → 4.0.25
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 +3 -1
- package/bin/draftgo.js +8 -8
- package/package.json +72 -72
- package/resources/custom-service-sdk/auth_test.go +1 -1
- package/resources/custom-service-sdk/manifest.json +11 -11
- package/resources/custom-service-sdk/platform.go +10 -3
- package/resources/custom-service-sdk/resources.go +1 -0
- package/resources/custom-service-sdk/resources_scope_test.go +10 -5
- package/resources/custom-service-sdk/sdk.go +4 -3
- package/resources/skill/SKILL.md +1 -1
- package/resources/skill/manifest.json +1 -1
- package/resources/skill/references/aihub.md +74 -74
- package/resources/skill/references/app-api.md +78 -78
- package/resources/skill/references/architecture.md +40 -40
- package/resources/skill/references/checkout.md +105 -105
- package/resources/skill/references/custom-services.md +4 -4
- package/resources/skill/references/data.md +168 -168
- package/resources/skill/references/methods.md +3 -0
- package/resources/skill/references/modules.md +47 -47
- package/resources/skill/references/runtime.md +95 -96
- package/resources/skill/story/SKILL.md +264 -264
- package/src/commands/help.js +72 -71
- package/src/commands/listTargets.js +12 -12
- package/src/commands/status.js +2 -2
- package/src/commands/uninstall.js +45 -45
- package/src/commands/update.js +24 -30
- package/src/customServices.js +5 -4
- package/src/detect.js +14 -14
- package/src/fsx.js +67 -67
- package/src/index.js +25 -25
- package/src/localRuntime/detect.js +76 -76
- package/src/localRuntime/mysqlClient.js +138 -138
- package/src/logger.js +37 -37
- package/src/mcp/client.js +586 -595
- package/src/mcp/hosts.js +520 -520
- package/src/mcp/protocol.js +167 -167
- package/src/prompt.js +94 -94
- package/src/updateCheck.js +16 -16
package/src/logger.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// Minimal ANSI color helpers - no external deps.
|
|
4
|
-
const isTTY = process.stdout && process.stdout.isTTY;
|
|
5
|
-
const supportsColor = isTTY && !process.env.NO_COLOR;
|
|
6
|
-
const isWindows = process.platform === 'win32';
|
|
7
|
-
const wantsUnicode = process.env.DRAFTGO_UNICODE === '1';
|
|
8
|
-
const useUnicode = wantsUnicode || !isWindows || process.env.TERM_PROGRAM === 'vscode' || process.env.WT_SESSION;
|
|
9
|
-
const sym = useUnicode
|
|
10
|
-
? { info: '\u2139', ok: '\u2713', err: '\u2717', step: '\u2192' }
|
|
11
|
-
: { info: 'i', ok: 'OK', err: 'x', step: '>' };
|
|
12
|
-
|
|
13
|
-
const wrap = (code) => (s) => supportsColor ? `\x1b[${code}m${s}\x1b[0m` : String(s);
|
|
14
|
-
|
|
15
|
-
const c = {
|
|
16
|
-
bold: wrap(1),
|
|
17
|
-
dim: wrap(2),
|
|
18
|
-
red: wrap(31),
|
|
19
|
-
green: wrap(32),
|
|
20
|
-
yellow: wrap(33),
|
|
21
|
-
blue: wrap(34),
|
|
22
|
-
magenta: wrap(35),
|
|
23
|
-
cyan: wrap(36),
|
|
24
|
-
gray: wrap(90),
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
function info(msg) { console.log(`${c.cyan(sym.info)} ${msg}`); }
|
|
28
|
-
function ok(msg) { console.log(`${c.green(sym.ok)} ${msg}`); }
|
|
29
|
-
function warn(msg) { console.warn(`${c.yellow('!')} ${msg}`); }
|
|
30
|
-
function err(msg) { console.error(`${c.red(sym.err)} ${msg}`); }
|
|
31
|
-
function step(msg) { console.log(`${c.blue(sym.step)} ${msg}`); }
|
|
32
|
-
function title(msg) { console.log(`
|
|
33
|
-
${c.bold(c.magenta(msg))}`); }
|
|
34
|
-
function plain(msg) { console.log(msg); }
|
|
35
|
-
function dim(msg) { console.log(c.dim(msg)); }
|
|
36
|
-
|
|
37
|
-
module.exports = { c, info, ok, warn, err, step, title, plain, dim };
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Minimal ANSI color helpers - no external deps.
|
|
4
|
+
const isTTY = process.stdout && process.stdout.isTTY;
|
|
5
|
+
const supportsColor = isTTY && !process.env.NO_COLOR;
|
|
6
|
+
const isWindows = process.platform === 'win32';
|
|
7
|
+
const wantsUnicode = process.env.DRAFTGO_UNICODE === '1';
|
|
8
|
+
const useUnicode = wantsUnicode || !isWindows || process.env.TERM_PROGRAM === 'vscode' || process.env.WT_SESSION;
|
|
9
|
+
const sym = useUnicode
|
|
10
|
+
? { info: '\u2139', ok: '\u2713', err: '\u2717', step: '\u2192' }
|
|
11
|
+
: { info: 'i', ok: 'OK', err: 'x', step: '>' };
|
|
12
|
+
|
|
13
|
+
const wrap = (code) => (s) => supportsColor ? `\x1b[${code}m${s}\x1b[0m` : String(s);
|
|
14
|
+
|
|
15
|
+
const c = {
|
|
16
|
+
bold: wrap(1),
|
|
17
|
+
dim: wrap(2),
|
|
18
|
+
red: wrap(31),
|
|
19
|
+
green: wrap(32),
|
|
20
|
+
yellow: wrap(33),
|
|
21
|
+
blue: wrap(34),
|
|
22
|
+
magenta: wrap(35),
|
|
23
|
+
cyan: wrap(36),
|
|
24
|
+
gray: wrap(90),
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function info(msg) { console.log(`${c.cyan(sym.info)} ${msg}`); }
|
|
28
|
+
function ok(msg) { console.log(`${c.green(sym.ok)} ${msg}`); }
|
|
29
|
+
function warn(msg) { console.warn(`${c.yellow('!')} ${msg}`); }
|
|
30
|
+
function err(msg) { console.error(`${c.red(sym.err)} ${msg}`); }
|
|
31
|
+
function step(msg) { console.log(`${c.blue(sym.step)} ${msg}`); }
|
|
32
|
+
function title(msg) { console.log(`
|
|
33
|
+
${c.bold(c.magenta(msg))}`); }
|
|
34
|
+
function plain(msg) { console.log(msg); }
|
|
35
|
+
function dim(msg) { console.log(c.dim(msg)); }
|
|
36
|
+
|
|
37
|
+
module.exports = { c, info, ok, warn, err, step, title, plain, dim };
|