@ant-design/cli 6.5.3 → 6.6.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.
- package/data/v6.5.4.json.gz +0 -0
- package/data/v6.6.0.json.gz +0 -0
- package/data/v6.json.gz +0 -0
- package/data/versions.json +2 -1
- package/dist/index.js +25 -19
- package/package.json +2 -2
- package/data/v6.5.3.json.gz +0 -0
|
Binary file
|
|
Binary file
|
package/data/v6.json.gz
CHANGED
|
Binary file
|
package/data/versions.json
CHANGED
package/dist/index.js
CHANGED
|
@@ -19551,7 +19551,7 @@ function collectAntdEnv(cwd, versionOverride) {
|
|
|
19551
19551
|
function collectCliEnv() {
|
|
19552
19552
|
let cliVersion;
|
|
19553
19553
|
try {
|
|
19554
|
-
cliVersion = "6.
|
|
19554
|
+
cliVersion = "6.6.0";
|
|
19555
19555
|
} catch (err) {
|
|
19556
19556
|
console.error("Failed to get CLI version:", err);
|
|
19557
19557
|
cliVersion = "unknown";
|
|
@@ -21764,7 +21764,7 @@ function printUpdateNotice(currentVersion, latestVersion) {
|
|
|
21764
21764
|
}
|
|
21765
21765
|
async function checkForUpdate() {
|
|
21766
21766
|
if (process.env.CI || process.env.NO_UPDATE_CHECK) return;
|
|
21767
|
-
const currentVersion = "6.
|
|
21767
|
+
const currentVersion = "6.6.0";
|
|
21768
21768
|
if (!valid(currentVersion)) return;
|
|
21769
21769
|
const now = Date.now();
|
|
21770
21770
|
const cache = cacheStore.get("updateCache") ?? null;
|
|
@@ -21817,7 +21817,7 @@ function runUpgrade(cmd, args) {
|
|
|
21817
21817
|
function registerUpgradeCommand(program2) {
|
|
21818
21818
|
program2.command("upgrade").description("Upgrade the CLI to the latest version").action(async () => {
|
|
21819
21819
|
const opts = program2.opts();
|
|
21820
|
-
const currentVersion = "6.
|
|
21820
|
+
const currentVersion = "6.6.0";
|
|
21821
21821
|
let latestVersion;
|
|
21822
21822
|
try {
|
|
21823
21823
|
latestVersion = await fetchLatestVersion();
|
|
@@ -35599,16 +35599,7 @@ var Server = class extends Protocol {
|
|
|
35599
35599
|
if (!methodSchema) {
|
|
35600
35600
|
throw new Error("Schema is missing a method literal");
|
|
35601
35601
|
}
|
|
35602
|
-
|
|
35603
|
-
if (isZ4Schema(methodSchema)) {
|
|
35604
|
-
const v4Schema = methodSchema;
|
|
35605
|
-
const v4Def = v4Schema._zod?.def;
|
|
35606
|
-
methodValue = v4Def?.value ?? v4Schema.value;
|
|
35607
|
-
} else {
|
|
35608
|
-
const v3Schema = methodSchema;
|
|
35609
|
-
const legacyDef = v3Schema._def;
|
|
35610
|
-
methodValue = legacyDef?.value ?? v3Schema.value;
|
|
35611
|
-
}
|
|
35602
|
+
const methodValue = getLiteralValue(methodSchema);
|
|
35612
35603
|
if (typeof methodValue !== "string") {
|
|
35613
35604
|
throw new Error("Schema method literal must be a string");
|
|
35614
35605
|
}
|
|
@@ -35917,8 +35908,17 @@ var Server = class extends Protocol {
|
|
|
35917
35908
|
import process11 from "process";
|
|
35918
35909
|
|
|
35919
35910
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
35911
|
+
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
35920
35912
|
var ReadBuffer = class {
|
|
35913
|
+
constructor(options) {
|
|
35914
|
+
this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
|
|
35915
|
+
}
|
|
35921
35916
|
append(chunk) {
|
|
35917
|
+
const newSize = (this._buffer?.length ?? 0) + chunk.length;
|
|
35918
|
+
if (newSize > this._maxBufferSize) {
|
|
35919
|
+
this.clear();
|
|
35920
|
+
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
35921
|
+
}
|
|
35922
35922
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
35923
35923
|
}
|
|
35924
35924
|
readMessage() {
|
|
@@ -35946,18 +35946,24 @@ function serializeMessage(message) {
|
|
|
35946
35946
|
|
|
35947
35947
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
35948
35948
|
var StdioServerTransport = class {
|
|
35949
|
-
constructor(_stdin = process11.stdin, _stdout = process11.stdout) {
|
|
35949
|
+
constructor(_stdin = process11.stdin, _stdout = process11.stdout, options) {
|
|
35950
35950
|
this._stdin = _stdin;
|
|
35951
35951
|
this._stdout = _stdout;
|
|
35952
|
-
this._readBuffer = new ReadBuffer();
|
|
35953
35952
|
this._started = false;
|
|
35954
35953
|
this._ondata = (chunk) => {
|
|
35955
|
-
|
|
35956
|
-
|
|
35954
|
+
try {
|
|
35955
|
+
this._readBuffer.append(chunk);
|
|
35956
|
+
this.processReadBuffer();
|
|
35957
|
+
} catch (error2) {
|
|
35958
|
+
this.onerror?.(error2);
|
|
35959
|
+
this.close().catch(() => {
|
|
35960
|
+
});
|
|
35961
|
+
}
|
|
35957
35962
|
};
|
|
35958
35963
|
this._onerror = (error2) => {
|
|
35959
35964
|
this.onerror?.(error2);
|
|
35960
35965
|
};
|
|
35966
|
+
this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
|
|
35961
35967
|
}
|
|
35962
35968
|
/**
|
|
35963
35969
|
* Starts listening for messages on stdin.
|
|
@@ -36264,7 +36270,7 @@ function registerMcpCommand(program2) {
|
|
|
36264
36270
|
const opts = program2.opts();
|
|
36265
36271
|
const versionInfo = detectVersion(opts.version);
|
|
36266
36272
|
const server = new Server(
|
|
36267
|
-
{ name: "antd", version: "6.
|
|
36273
|
+
{ name: "antd", version: "6.6.0" },
|
|
36268
36274
|
{ capabilities: { tools: {}, prompts: {} } }
|
|
36269
36275
|
);
|
|
36270
36276
|
const handleTool = createToolHandler({
|
|
@@ -36943,7 +36949,7 @@ ${wordmarkLines.join("\n")}`;
|
|
|
36943
36949
|
}
|
|
36944
36950
|
|
|
36945
36951
|
// src/index.ts
|
|
36946
|
-
var CLI_VERSION = "6.
|
|
36952
|
+
var CLI_VERSION = "6.6.0";
|
|
36947
36953
|
function createProgram() {
|
|
36948
36954
|
const program2 = new Command();
|
|
36949
36955
|
let displayedRootHelp = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "CLI tool for querying antd knowledge and analyzing antd usage in projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"string-width": "^8.2.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
59
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
60
60
|
"@types/fast-levenshtein": "^0.0.4",
|
|
61
61
|
"@types/node": "^26.0.0",
|
|
62
62
|
"@types/semver": "^7.7.1",
|
package/data/v6.5.3.json.gz
DELETED
|
Binary file
|