@rsdoctor/sdk 1.1.0 → 1.1.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.
|
@@ -112,6 +112,10 @@ class RsdoctorServer {
|
|
|
112
112
|
port: this.port
|
|
113
113
|
});
|
|
114
114
|
await this._socket.bootstrap();
|
|
115
|
+
import_common.GlobalConfig.writeMcpPort(this.port, this.sdk.name);
|
|
116
|
+
(0, import_logger.debug)(
|
|
117
|
+
() => `Successfully wrote mcp.json for ${import_logger.chalk.cyan(this.sdk.name)} builder`
|
|
118
|
+
);
|
|
115
119
|
this.disposed = false;
|
|
116
120
|
this.app.use((0, import_cors.default)());
|
|
117
121
|
this.app.use(import_body_parser.default.json({ limit: "500mb" }));
|
|
@@ -194,9 +198,8 @@ class RsdoctorServer {
|
|
|
194
198
|
const localhostUrl = `http://localhost:${this.port}${relativeUrl}`;
|
|
195
199
|
await (0, import_openBrowser.openBrowser)(localhostUrl, !needEncodeURI);
|
|
196
200
|
if (this._printServerUrl) {
|
|
197
|
-
import_logger.logger.info(`Rsdoctor analyze server running on: ${import_logger.chalk.cyan(url)}`);
|
|
198
201
|
import_logger.logger.info(
|
|
199
|
-
`
|
|
202
|
+
`${import_logger.chalk.green(`${this.sdk.name} compiler's`)} analyzer running on: ${import_logger.chalk.cyan(url)}`
|
|
200
203
|
);
|
|
201
204
|
}
|
|
202
205
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SDK, Client } from "@rsdoctor/types";
|
|
2
2
|
import { Server } from "@rsdoctor/utils/build";
|
|
3
3
|
import serve from "sirv";
|
|
4
|
-
import { Bundle } from "@rsdoctor/utils/common";
|
|
4
|
+
import { Bundle, GlobalConfig } from "@rsdoctor/utils/common";
|
|
5
5
|
import assert from "assert";
|
|
6
6
|
import bodyParser from "body-parser";
|
|
7
7
|
import cors from "cors";
|
|
@@ -9,7 +9,7 @@ import { PassThrough } from "stream";
|
|
|
9
9
|
import { Socket } from "./socket";
|
|
10
10
|
import { Router } from "./router";
|
|
11
11
|
import * as APIs from "./apis";
|
|
12
|
-
import { chalk, logger } from "@rsdoctor/utils/logger";
|
|
12
|
+
import { chalk, debug, logger } from "@rsdoctor/utils/logger";
|
|
13
13
|
import { openBrowser } from "../utils/openBrowser";
|
|
14
14
|
import path from "path";
|
|
15
15
|
import { getLocalIpAddress } from "./utils";
|
|
@@ -78,6 +78,10 @@ class RsdoctorServer {
|
|
|
78
78
|
port: this.port
|
|
79
79
|
});
|
|
80
80
|
await this._socket.bootstrap();
|
|
81
|
+
GlobalConfig.writeMcpPort(this.port, this.sdk.name);
|
|
82
|
+
debug(
|
|
83
|
+
() => `Successfully wrote mcp.json for ${chalk.cyan(this.sdk.name)} builder`
|
|
84
|
+
);
|
|
81
85
|
this.disposed = false;
|
|
82
86
|
this.app.use(cors());
|
|
83
87
|
this.app.use(bodyParser.json({ limit: "500mb" }));
|
|
@@ -160,9 +164,8 @@ class RsdoctorServer {
|
|
|
160
164
|
const localhostUrl = `http://localhost:${this.port}${relativeUrl}`;
|
|
161
165
|
await openBrowser(localhostUrl, !needEncodeURI);
|
|
162
166
|
if (this._printServerUrl) {
|
|
163
|
-
logger.info(`Rsdoctor analyze server running on: ${chalk.cyan(url)}`);
|
|
164
167
|
logger.info(
|
|
165
|
-
`
|
|
168
|
+
`${chalk.green(`${this.sdk.name} compiler's`)} analyzer running on: ${chalk.cyan(url)}`
|
|
166
169
|
);
|
|
167
170
|
}
|
|
168
171
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAgBlE,cAAc,SAAS,CAAC;AAExB,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,C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AAC,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM;IAgBlC,cAAc,CACzB,KAAK,EAAE,MAAM,CAAC,oBAAoB,EAClC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC;IAEH,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBvD,mBAAmB,CACxB,CAAC,SAAS,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,EACtD,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAIrC,SAAS;IAItB,OAAO,sBAYL;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"socket.io": "4.8.1",
|
|
28
28
|
"source-map": "^0.7.4",
|
|
29
29
|
"tapable": "2.2.1",
|
|
30
|
-
"@rsdoctor/
|
|
31
|
-
"@rsdoctor/
|
|
32
|
-
"@rsdoctor/
|
|
33
|
-
"@rsdoctor/
|
|
30
|
+
"@rsdoctor/types": "1.1.2",
|
|
31
|
+
"@rsdoctor/utils": "1.1.2",
|
|
32
|
+
"@rsdoctor/graph": "1.1.2",
|
|
33
|
+
"@rsdoctor/client": "1.1.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/body-parser": "1.19.5",
|