bfi-cli 0.1.92 → 0.1.93
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/_chunks/skills.mjs +3 -2
- package/dist/cli.mjs +214 -21
- package/dist/mcp-codesearch/main.mjs +2 -2
- package/package.json +2 -2
package/dist/_chunks/skills.mjs
CHANGED
|
@@ -322,13 +322,14 @@ async function parseSkillMd(skillMdPath, options) {
|
|
|
322
322
|
const { data } = parseFrontmatter(content);
|
|
323
323
|
if (!data.name || !data.description) return null;
|
|
324
324
|
if (typeof data.name !== "string" || typeof data.description !== "string") return null;
|
|
325
|
-
|
|
325
|
+
const metadata = data.metadata;
|
|
326
|
+
if (metadata?.internal === true && !shouldInstallInternalSkills() && !options?.includeInternal) return null;
|
|
326
327
|
return {
|
|
327
328
|
name: sanitizeMetadata(data.name),
|
|
328
329
|
description: sanitizeMetadata(data.description),
|
|
329
330
|
path: dirname(skillMdPath),
|
|
330
331
|
rawContent: content,
|
|
331
|
-
metadata
|
|
332
|
+
metadata
|
|
332
333
|
};
|
|
333
334
|
} catch {
|
|
334
335
|
return null;
|
package/dist/cli.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { cancel, confirm, groupMultiselect, intro, log, multiselect as multisele
|
|
|
5
5
|
import { require_picocolors } from "./_chunks/libs/picocolors.mjs";
|
|
6
6
|
import { addSkillToLocalLock, addSkillToLock, computeSkillFolderHash, discoverSkills, dismissPrompt, filterSkills, getAllLockedSkills, getGitHubToken, getLastSelectedAgents, getSkillDisplayName, getSkillFromLock, isPromptDismissed, parseFrontmatter, parseSkillMd, readLocalLock, readSkillLock, removeSkillFromLock, sanitizeMetadata, saveSelectedAgents, stripTerminalEscapes } from "./_chunks/skills.mjs";
|
|
7
7
|
import { PluginRegistryClient } from "./_chunks/registry-client.mjs";
|
|
8
|
-
import { loadGlobalConfig, loadLockfile, loadProjectConfig, resolveConfig, saveGlobalConfig
|
|
8
|
+
import { loadGlobalConfig, loadLockfile, loadProjectConfig, resolveConfig, saveGlobalConfig, saveLockfile, setConfigValue } from "./_chunks/config.mjs";
|
|
9
9
|
import { esm_default } from "./_chunks/libs/simple-git.mjs";
|
|
10
10
|
import { EVE_SUBAGENTS_DIR, agents, detectInstalledAgents, getEveSubagents, getNonUniversalAgents, getUniversalAgents, getVisibleUniversalAgents, isUniversalAgent } from "./_chunks/agents.mjs";
|
|
11
11
|
import { packageSkillName } from "./_chunks/package-skill-identity.mjs";
|
|
@@ -170,7 +170,7 @@ function parseSource(input) {
|
|
|
170
170
|
const [, owner, repo, ref, subpath] = githubTreeWithPathMatch;
|
|
171
171
|
return {
|
|
172
172
|
type: "github",
|
|
173
|
-
url:
|
|
173
|
+
url: `https://github.com/${owner}/${repo}.git`,
|
|
174
174
|
ref: ref || fragmentRef,
|
|
175
175
|
subpath: subpath ? sanitizeSubpath(subpath) : subpath
|
|
176
176
|
};
|
|
@@ -180,7 +180,7 @@ function parseSource(input) {
|
|
|
180
180
|
const [, owner, repo, ref] = githubTreeMatch;
|
|
181
181
|
return {
|
|
182
182
|
type: "github",
|
|
183
|
-
url:
|
|
183
|
+
url: `https://github.com/${owner}/${repo}.git`,
|
|
184
184
|
ref: ref || fragmentRef
|
|
185
185
|
};
|
|
186
186
|
}
|
|
@@ -928,7 +928,9 @@ async function extractZip(zipPath, targetDir) {
|
|
|
928
928
|
return new Promise((resolve, reject) => {
|
|
929
929
|
const chunks = [];
|
|
930
930
|
const readStream = fs.createReadStream(zipPath);
|
|
931
|
-
readStream.on("data", (chunk) =>
|
|
931
|
+
readStream.on("data", (chunk) => {
|
|
932
|
+
chunks.push(chunk);
|
|
933
|
+
});
|
|
932
934
|
readStream.on("end", () => {
|
|
933
935
|
const buffer = Buffer.concat(chunks);
|
|
934
936
|
try {
|
|
@@ -1153,14 +1155,15 @@ function isAuthFailure(message) {
|
|
|
1153
1155
|
return message.includes("Authentication failed") || message.includes("could not read Username") || message.includes("Permission denied") || message.includes("Repository not found") || message.includes("requested URL returned error: 403") || isGitHubSsoAuthError(message);
|
|
1154
1156
|
}
|
|
1155
1157
|
function createGitClient(extraEnv) {
|
|
1158
|
+
const env = {};
|
|
1159
|
+
for (const [k, v] of Object.entries({
|
|
1160
|
+
...process.env,
|
|
1161
|
+
GIT_TERMINAL_PROMPT: "0",
|
|
1162
|
+
GIT_LFS_SKIP_SMUDGE: "1",
|
|
1163
|
+
...extraEnv
|
|
1164
|
+
})) if (v !== void 0) env[k] = v;
|
|
1156
1165
|
return esm_default({
|
|
1157
1166
|
timeout: { block: CLONE_TIMEOUT_MS },
|
|
1158
|
-
env: {
|
|
1159
|
-
...process.env,
|
|
1160
|
-
GIT_TERMINAL_PROMPT: "0",
|
|
1161
|
-
GIT_LFS_SKIP_SMUDGE: "1",
|
|
1162
|
-
...extraEnv
|
|
1163
|
-
},
|
|
1164
1167
|
config: [
|
|
1165
1168
|
"filter.lfs.required=false",
|
|
1166
1169
|
"filter.lfs.smudge=",
|
|
@@ -1168,7 +1171,7 @@ function createGitClient(extraEnv) {
|
|
|
1168
1171
|
"filter.lfs.process="
|
|
1169
1172
|
],
|
|
1170
1173
|
unsafe: { allowUnsafeFilter: true }
|
|
1171
|
-
});
|
|
1174
|
+
}).env(env);
|
|
1172
1175
|
}
|
|
1173
1176
|
async function resetTempDir(dir) {
|
|
1174
1177
|
await rm(dir, {
|
|
@@ -4008,7 +4011,7 @@ async function runAdd(args, options = {}) {
|
|
|
4008
4011
|
if (successful.length > 0 && installGlobally && (normalizedSource || parsed.type === "skillhub")) {
|
|
4009
4012
|
const successfulSkillNames = new Set(successful.map((r) => r.skill));
|
|
4010
4013
|
let cachedTree;
|
|
4011
|
-
if (parsed.type === "github" && !blobResult) cachedTree = await fetchRepoTree(normalizedSource, parsed.ref, getGitHubToken);
|
|
4014
|
+
if (parsed.type === "github" && !blobResult && normalizedSource) cachedTree = await fetchRepoTree(normalizedSource, parsed.ref, getGitHubToken);
|
|
4012
4015
|
for (const skill of selectedSkills) {
|
|
4013
4016
|
const skillDisplayName = getSkillDisplayName(skill);
|
|
4014
4017
|
if (successfulSkillNames.has(skillDisplayName)) try {
|
|
@@ -5825,7 +5828,7 @@ async function runLogin(args, globalOpts) {
|
|
|
5825
5828
|
name: String(userInfo.displayName || userInfo.name || ""),
|
|
5826
5829
|
handle: String(userInfo.handle || "")
|
|
5827
5830
|
};
|
|
5828
|
-
saveGlobalConfig
|
|
5831
|
+
saveGlobalConfig(config);
|
|
5829
5832
|
console.log(`✓ 已登录为 ${userInfo.displayName || userInfo.name || "Unknown"}`);
|
|
5830
5833
|
console.log(` 注册中心:${registry}`);
|
|
5831
5834
|
} catch (error) {
|
|
@@ -5838,7 +5841,7 @@ async function runLogout() {
|
|
|
5838
5841
|
if (config?.token) {
|
|
5839
5842
|
delete config.token;
|
|
5840
5843
|
delete config.user;
|
|
5841
|
-
saveGlobalConfig
|
|
5844
|
+
saveGlobalConfig(config);
|
|
5842
5845
|
console.log("✓ 已登出");
|
|
5843
5846
|
} else console.log("未登录。");
|
|
5844
5847
|
}
|
|
@@ -7957,11 +7960,15 @@ var YmcApi = class {
|
|
|
7957
7960
|
};
|
|
7958
7961
|
}
|
|
7959
7962
|
};
|
|
7963
|
+
function flagNameOf(token) {
|
|
7964
|
+
const eq = token.indexOf("=");
|
|
7965
|
+
return eq === -1 ? token : token.slice(0, eq);
|
|
7966
|
+
}
|
|
7960
7967
|
function opt(args, ...names) {
|
|
7961
7968
|
for (const name of names) {
|
|
7962
7969
|
const idx = args.indexOf(name);
|
|
7963
7970
|
if (idx !== -1 && idx + 1 < args.length) return args[idx + 1];
|
|
7964
|
-
const eq = args.find((a) => a.
|
|
7971
|
+
const eq = args.find((a) => a.includes("=") && flagNameOf(a) === name);
|
|
7965
7972
|
if (eq) return eq.slice(name.length + 1);
|
|
7966
7973
|
}
|
|
7967
7974
|
}
|
|
@@ -8015,6 +8022,180 @@ function timeError(t) {
|
|
|
8015
8022
|
if (!TIME_RE.test(t)) return `时间简写无效:收到 '${t}'\n合法格式:<N><单位>,单位 m(分)/h(时)/d(天)/w(周),如 10m/2h/3d/4w\n精确窗口:--start-time "yyyy-MM-dd HH:mm:ss" --end-time 同格式(北京时间)`;
|
|
8016
8023
|
return null;
|
|
8017
8024
|
}
|
|
8025
|
+
const COMMON_FLAGS = [
|
|
8026
|
+
"--json",
|
|
8027
|
+
"--dry-run",
|
|
8028
|
+
"--help",
|
|
8029
|
+
"-h",
|
|
8030
|
+
"--token",
|
|
8031
|
+
"--registry",
|
|
8032
|
+
"--namespace"
|
|
8033
|
+
];
|
|
8034
|
+
const F_ENV = [
|
|
8035
|
+
"-e",
|
|
8036
|
+
"--env",
|
|
8037
|
+
"--env-name"
|
|
8038
|
+
];
|
|
8039
|
+
const F_TIME = ["-t", "--time"];
|
|
8040
|
+
const F_RANGE = [
|
|
8041
|
+
"-t",
|
|
8042
|
+
"--time",
|
|
8043
|
+
"--start-time",
|
|
8044
|
+
"--end-time"
|
|
8045
|
+
];
|
|
8046
|
+
const ALLOWED_FLAGS = {
|
|
8047
|
+
status: [],
|
|
8048
|
+
trace: [...F_ENV, "--ts"],
|
|
8049
|
+
chain: [...F_ENV, "--ts"],
|
|
8050
|
+
"sls-raw": [
|
|
8051
|
+
...F_ENV,
|
|
8052
|
+
...F_RANGE,
|
|
8053
|
+
"--days",
|
|
8054
|
+
"--line",
|
|
8055
|
+
"--offset"
|
|
8056
|
+
],
|
|
8057
|
+
"sls-grep": [
|
|
8058
|
+
...F_ENV,
|
|
8059
|
+
...F_TIME,
|
|
8060
|
+
"--group-by",
|
|
8061
|
+
"--line",
|
|
8062
|
+
"--app"
|
|
8063
|
+
],
|
|
8064
|
+
"sls-logs": [...F_ENV, "--ts"],
|
|
8065
|
+
slowsql: [
|
|
8066
|
+
...F_ENV,
|
|
8067
|
+
...F_RANGE,
|
|
8068
|
+
"--sql-str",
|
|
8069
|
+
"--md5",
|
|
8070
|
+
"--trace-id",
|
|
8071
|
+
"--app",
|
|
8072
|
+
"--no-profiler",
|
|
8073
|
+
"--page",
|
|
8074
|
+
"--page-size"
|
|
8075
|
+
],
|
|
8076
|
+
slowcall: [
|
|
8077
|
+
...F_ENV,
|
|
8078
|
+
...F_RANGE,
|
|
8079
|
+
"--trace-id",
|
|
8080
|
+
"--app",
|
|
8081
|
+
"--method",
|
|
8082
|
+
"--profiler",
|
|
8083
|
+
"--min-cost",
|
|
8084
|
+
"--page",
|
|
8085
|
+
"--page-size"
|
|
8086
|
+
],
|
|
8087
|
+
exceptions: [
|
|
8088
|
+
...F_ENV,
|
|
8089
|
+
...F_RANGE,
|
|
8090
|
+
"--app"
|
|
8091
|
+
],
|
|
8092
|
+
alerts: [
|
|
8093
|
+
...F_ENV,
|
|
8094
|
+
...F_RANGE,
|
|
8095
|
+
"--level",
|
|
8096
|
+
"--page-size"
|
|
8097
|
+
],
|
|
8098
|
+
"url-stats": [
|
|
8099
|
+
...F_ENV,
|
|
8100
|
+
...F_RANGE,
|
|
8101
|
+
"--app"
|
|
8102
|
+
],
|
|
8103
|
+
ingress: [
|
|
8104
|
+
...F_ENV,
|
|
8105
|
+
...F_RANGE,
|
|
8106
|
+
"--app",
|
|
8107
|
+
"--exact",
|
|
8108
|
+
"--size",
|
|
8109
|
+
"--trace-id",
|
|
8110
|
+
"--uri"
|
|
8111
|
+
],
|
|
8112
|
+
"dump-list": [
|
|
8113
|
+
...F_ENV,
|
|
8114
|
+
...F_RANGE,
|
|
8115
|
+
"--app",
|
|
8116
|
+
"--type"
|
|
8117
|
+
],
|
|
8118
|
+
cases: [
|
|
8119
|
+
"--type",
|
|
8120
|
+
"--finger",
|
|
8121
|
+
"--service",
|
|
8122
|
+
"--kw",
|
|
8123
|
+
"--limit",
|
|
8124
|
+
"--file",
|
|
8125
|
+
"--env",
|
|
8126
|
+
"--confidence",
|
|
8127
|
+
"--title"
|
|
8128
|
+
],
|
|
8129
|
+
wiki: [
|
|
8130
|
+
"--limit",
|
|
8131
|
+
"--source",
|
|
8132
|
+
"--titles"
|
|
8133
|
+
],
|
|
8134
|
+
callstat: [
|
|
8135
|
+
...F_ENV,
|
|
8136
|
+
...F_RANGE,
|
|
8137
|
+
"--page",
|
|
8138
|
+
"--page-size"
|
|
8139
|
+
],
|
|
8140
|
+
sqlstat: [
|
|
8141
|
+
...F_ENV,
|
|
8142
|
+
...F_RANGE,
|
|
8143
|
+
"--page",
|
|
8144
|
+
"--page-size"
|
|
8145
|
+
],
|
|
8146
|
+
events: [
|
|
8147
|
+
...F_ENV,
|
|
8148
|
+
"--app",
|
|
8149
|
+
"--start-time",
|
|
8150
|
+
"--end-time",
|
|
8151
|
+
"--histogram",
|
|
8152
|
+
"--page",
|
|
8153
|
+
"--page-size",
|
|
8154
|
+
"--pipeline",
|
|
8155
|
+
"--type"
|
|
8156
|
+
],
|
|
8157
|
+
"log-url": [
|
|
8158
|
+
...F_ENV,
|
|
8159
|
+
"--app",
|
|
8160
|
+
"--filter-app",
|
|
8161
|
+
"--type"
|
|
8162
|
+
],
|
|
8163
|
+
"sample-list": [...F_ENV, ...F_RANGE],
|
|
8164
|
+
rca: [
|
|
8165
|
+
...F_ENV,
|
|
8166
|
+
...F_RANGE,
|
|
8167
|
+
"--app",
|
|
8168
|
+
"--app-code"
|
|
8169
|
+
],
|
|
8170
|
+
"bpr-download": [
|
|
8171
|
+
...F_ENV,
|
|
8172
|
+
"--out",
|
|
8173
|
+
"-o"
|
|
8174
|
+
],
|
|
8175
|
+
"tool-download": [
|
|
8176
|
+
...F_ENV,
|
|
8177
|
+
"--out",
|
|
8178
|
+
"-o"
|
|
8179
|
+
],
|
|
8180
|
+
call: [
|
|
8181
|
+
...F_ENV,
|
|
8182
|
+
...F_RANGE,
|
|
8183
|
+
"--data",
|
|
8184
|
+
"--timeout"
|
|
8185
|
+
]
|
|
8186
|
+
};
|
|
8187
|
+
function assertKnownFlags(sub, rest) {
|
|
8188
|
+
const allowed = /* @__PURE__ */ new Set([...COMMON_FLAGS, ...ALLOWED_FLAGS[sub] ?? []]);
|
|
8189
|
+
for (const a of rest) {
|
|
8190
|
+
if (!a.startsWith("-")) continue;
|
|
8191
|
+
const key = flagNameOf(a);
|
|
8192
|
+
if (allowed.has(key)) continue;
|
|
8193
|
+
console.error(`未知参数:${key}(bfi ymc ${sub} 不支持)`);
|
|
8194
|
+
console.error(`本命令支持:${[...allowed].join(" / ")}`);
|
|
8195
|
+
console.error(`查看用法:bfi ymc help ${sub}`);
|
|
8196
|
+
process.exit(1);
|
|
8197
|
+
}
|
|
8198
|
+
}
|
|
8018
8199
|
function requireEnv(args) {
|
|
8019
8200
|
const env = opt(args, "-e", "--env", "--env-name");
|
|
8020
8201
|
const err = envError(env);
|
|
@@ -8086,6 +8267,7 @@ async function runYmc(args, globalOpts) {
|
|
|
8086
8267
|
printCommandHelp(sub);
|
|
8087
8268
|
return;
|
|
8088
8269
|
}
|
|
8270
|
+
if (ALLOWED_FLAGS[sub]) assertKnownFlags(sub, rest);
|
|
8089
8271
|
if (!dryRun) requireToken(api);
|
|
8090
8272
|
switch (sub) {
|
|
8091
8273
|
case "status":
|
|
@@ -8194,14 +8376,18 @@ async function runYmc(args, globalOpts) {
|
|
|
8194
8376
|
case "sls-grep": {
|
|
8195
8377
|
const kw = positionals(rest)[0];
|
|
8196
8378
|
if (!kw) {
|
|
8197
|
-
console.error("用法:bfi ymc sls-grep \"<关键词>\" -e <env> [-t time] [--group-by applicationName|message|requestURL]");
|
|
8379
|
+
console.error("用法:bfi ymc sls-grep \"<关键词>\" -e <env> [-t time] [--app <appCode>] [--group-by applicationName|message|requestURL]");
|
|
8198
8380
|
console.error("例:bfi ymc sls-grep \"ClassCastException\" -e daily -t 3d");
|
|
8381
|
+
console.error("⚠️ 关键词按「整值」匹配:类名/全限定异常名必须整串加引号");
|
|
8382
|
+
console.error(" (\"java.lang.OutOfMemoryError\" 命中;简写 \"OutOfMemoryError\" 恒 0 且不报错)——sls-discipline §3");
|
|
8199
8383
|
console.error("⚠️ 输出为聚合统计行(每组计数,计数上限 100,可能被封顶)——非明细。");
|
|
8200
8384
|
console.error(" 需要真实条数/明细/精确时间窗时改用 sls-raw + GROUP BY + --start-time/--end-time");
|
|
8201
8385
|
process.exit(1);
|
|
8202
8386
|
}
|
|
8203
8387
|
const groupBy = opt(rest, "--group-by") || "applicationName";
|
|
8204
|
-
const
|
|
8388
|
+
const safe = kw.replace(/"/g, "");
|
|
8389
|
+
const app = opt(rest, "--app");
|
|
8390
|
+
const query = `${app ? `applicationname: ${app} AND "${safe}"` : `"${safe}"`} | SELECT ${groupBy}, count(*) AS count GROUP BY ${groupBy} ORDER BY count DESC`;
|
|
8205
8391
|
emit(await api.call("sls/raw", {
|
|
8206
8392
|
query,
|
|
8207
8393
|
...requireEnv(rest),
|
|
@@ -8689,8 +8875,11 @@ const HELP = {
|
|
|
8689
8875
|
bfi ymc sls-raw 'applicationname: yonbip-scm-scmmp AND "unaudit" | SELECT traceid, time LIMIT 10' -e core3 -t 1d
|
|
8690
8876
|
注意:业务关键词检索必须 applicationname: 限定目标服务(共享路径 URL 全平台都有);
|
|
8691
8877
|
traceid/spanid 检索例外(全局唯一)。非索引字段(logger/requesturl)不能进检索语法,只能在 SELECT 里引用。`,
|
|
8692
|
-
"sls-grep": `bfi ymc sls-grep "<关键词>" -e <env> -t <time> [--json]
|
|
8693
|
-
SLS 全文检索聚合(每组计数精确不封顶;组数上限 500——实测 2026-09-17:计数不受限,仅组数受 SLS 默认 LIMIT
|
|
8878
|
+
"sls-grep": `bfi ymc sls-grep "<关键词>" -e <env> -t <time> [--app <appCode>] [--group-by <字段>] [--json]
|
|
8879
|
+
SLS 全文检索聚合(每组计数精确不封顶;组数上限 500——实测 2026-09-17:计数不受限,仅组数受 SLS 默认 LIMIT 约束,服务端已放宽)。
|
|
8880
|
+
⚠️ 关键词按「整值」匹配:类名/全限定异常名必须整串加引号
|
|
8881
|
+
("java.lang.OutOfMemoryError" 命中;简写 "OutOfMemoryError" 恒 0 命中且不报错)——sls-discipline §3
|
|
8882
|
+
--app <appCode> 裸微服务名,前置 applicationname 限定(不限服务的检索会命中不相干服务)`,
|
|
8694
8883
|
slowsql: `bfi ymc slowsql -t <time> -e <env> [--sql-str <表名或片段>] [--md5 <指纹>] [--trace-id <id>] [--app <appCode>] [--no-profiler] [--page N] [--page-size N] [--json]
|
|
8695
8884
|
慢 SQL 告警明细(耗时降序;摘要含 服务/耗时/行数/SQL 前段/指纹/调用栈首帧)。
|
|
8696
8885
|
参数:
|
|
@@ -8775,8 +8964,12 @@ const HELP = {
|
|
|
8775
8964
|
完整清单与参数声明:curl https://bfi.yyuap.com/bfi-api/openapi.json 或 /docs(Swagger UI)。
|
|
8776
8965
|
时间参数(-t/--start-time/--end-time)由服务端按端点 time_fields 展开为 beginTs/endTs 等——
|
|
8777
8966
|
禁止在 --data JSON 里手传 start/end/start_time(数字 422、字符串被忽略返回空)。
|
|
8778
|
-
⚠️ app/history、jvm/history 等资源端点的 appId 必须带环境前缀(如 stage-dc-core1-<appCode
|
|
8779
|
-
|
|
8967
|
+
⚠️ app/history、jvm/history 等资源端点的 appId 必须带环境前缀(如 stage-dc-core1-<appCode>)
|
|
8968
|
+
—— 由环境别名**直接推导**:appId = <env 对应的前缀>-<appCode>(core1→stage-dc-core1-、
|
|
8969
|
+
core4→online-dc-core4-),无需查接口。
|
|
8970
|
+
⛔ 不要用 bfi ymc call app/list 查 appCode:该端点无查询参数、不支持 keyword 过滤
|
|
8971
|
+
(传了被上游静默忽略,只返回本用户可访问的应用,非全量目录)。
|
|
8972
|
+
CLI 的 --app 参数则传裸 appCode。
|
|
8780
8973
|
数据可能为空(覆盖不全)——一次空即换通道,不做参数变体重试。
|
|
8781
8974
|
示例:
|
|
8782
8975
|
bfi ymc call warningCallstat --data '{"curAppCode":"yonbip-scm-scmmp","page":1,"pageSize":10}' -e core3 -t 1h
|
|
@@ -54,9 +54,9 @@ var BcsRemote = class {
|
|
|
54
54
|
name: "bfi-codesearch-mcp",
|
|
55
55
|
version: "0.1.0"
|
|
56
56
|
});
|
|
57
|
-
const transport = new StreamableHTTPClientTransport(this.url, {
|
|
57
|
+
const transport = new StreamableHTTPClientTransport(new URL(this.url), {
|
|
58
58
|
requestInit: { headers: { Authorization: `Bearer ${token}` } },
|
|
59
|
-
fetchImpl: this.fetchImpl
|
|
59
|
+
...this.fetchImpl ? { fetch: this.fetchImpl } : {}
|
|
60
60
|
});
|
|
61
61
|
try {
|
|
62
62
|
await client.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfi-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.93",
|
|
4
4
|
"description": "用友大业财BFI统一命令行工具,支持技能,技能包,元数据,UI元数据等",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build": "obuild",
|
|
19
19
|
"dev": "node src/cli.ts",
|
|
20
20
|
"test": "vitest",
|
|
21
|
-
"type-check": "tsc
|
|
21
|
+
"type-check": "tsc -p tsconfig.check.json",
|
|
22
22
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
23
23
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
24
24
|
"prepublishOnly": "npm run build"
|