@rsdoctor/sdk 0.3.11 → 0.4.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/dist/cjs/sdk/sdk/core.js +4 -1
- package/dist/cjs/sdk/sdk/webpack.js +116 -7
- package/dist/esm/sdk/sdk/core.js +4 -1
- package/dist/esm/sdk/sdk/webpack.js +104 -7
- package/dist/type/sdk/sdk/core.d.ts.map +1 -1
- package/dist/type/sdk/sdk/types.d.ts +0 -1
- package/dist/type/sdk/sdk/types.d.ts.map +1 -1
- package/dist/type/sdk/sdk/webpack.d.ts +4 -1
- package/dist/type/sdk/sdk/webpack.d.ts.map +1 -1
- package/dist/type/sdk/server/index.d.ts +0 -1
- package/dist/type/sdk/server/index.d.ts.map +1 -1
- package/dist/type/sdk/server/router.d.ts +0 -1
- package/dist/type/sdk/server/router.d.ts.map +1 -1
- package/dist/type/sdk/server/socket/api.d.ts +1 -1
- package/dist/type/sdk/server/socket/api.d.ts.map +1 -1
- package/dist/type/sdk/server/socket/index.d.ts +0 -2
- package/dist/type/sdk/server/socket/index.d.ts.map +1 -1
- package/dist/type/sdk/utils/upload.d.ts.map +1 -1
- package/package.json +7 -5
package/dist/cjs/sdk/sdk/core.js
CHANGED
|
@@ -53,7 +53,10 @@ class SDKCore {
|
|
|
53
53
|
this._name = name;
|
|
54
54
|
this.root = root;
|
|
55
55
|
this.pid = import_process.default.pid;
|
|
56
|
-
this._outputDir = import_path.default.join(
|
|
56
|
+
this._outputDir = import_path.default.join(
|
|
57
|
+
this.outputDir || this.root,
|
|
58
|
+
import_types.Constants.RsdoctorOutputFolder
|
|
59
|
+
);
|
|
57
60
|
}
|
|
58
61
|
get outputDir() {
|
|
59
62
|
return this._outputDir;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,12 +17,23 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
18
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
30
|
var webpack_exports = {};
|
|
20
31
|
__export(webpack_exports, {
|
|
21
32
|
RsdoctorWebpackSDK: () => RsdoctorWebpackSDK
|
|
22
33
|
});
|
|
23
34
|
module.exports = __toCommonJS(webpack_exports);
|
|
35
|
+
var import_fs_extra = __toESM(require("fs-extra"));
|
|
36
|
+
var import_path = __toESM(require("path"));
|
|
24
37
|
var import_error = require("@rsdoctor/utils/error");
|
|
25
38
|
var import_types = require("@rsdoctor/types");
|
|
26
39
|
var import_build = require("@rsdoctor/utils/build");
|
|
@@ -30,6 +43,9 @@ var import_logger = require("@rsdoctor/utils/logger");
|
|
|
30
43
|
var import_server = require("../server");
|
|
31
44
|
var import_fakeServer = require("../server/fakeServer");
|
|
32
45
|
var import_core = require("./core");
|
|
46
|
+
var import_common = require("@rsdoctor/utils/common");
|
|
47
|
+
var import_lodash = require("lodash");
|
|
48
|
+
__reExport(webpack_exports, require("../utils/openBrowser"), module.exports);
|
|
33
49
|
class RsdoctorWebpackSDK extends import_core.SDKCore {
|
|
34
50
|
constructor(options) {
|
|
35
51
|
super(options);
|
|
@@ -48,7 +64,7 @@ class RsdoctorWebpackSDK extends import_core.SDKCore {
|
|
|
48
64
|
innerClientPath: options.config?.innerClientPath || "",
|
|
49
65
|
printServerUrl: options.config?.printLog?.serverUrls
|
|
50
66
|
});
|
|
51
|
-
this.type = options.type
|
|
67
|
+
this.type = (0, import_lodash.isNumber)(options.type) ? options.type : import_types.SDK.ToDataType.Normal;
|
|
52
68
|
this.extraConfig = options.config;
|
|
53
69
|
}
|
|
54
70
|
async bootstrap() {
|
|
@@ -141,6 +157,12 @@ class RsdoctorWebpackSDK extends import_core.SDKCore {
|
|
|
141
157
|
}
|
|
142
158
|
reportLoader(data) {
|
|
143
159
|
data.forEach((item) => {
|
|
160
|
+
if (this.extraConfig?.mode === import_types.SDK.IMode[import_types.SDK.IMode.brief]) {
|
|
161
|
+
item.loaders.forEach((_loader) => {
|
|
162
|
+
_loader.input = "";
|
|
163
|
+
_loader.result = "";
|
|
164
|
+
});
|
|
165
|
+
}
|
|
144
166
|
let match = this._loader.find(
|
|
145
167
|
(e) => e.resource.path === item.resource.path
|
|
146
168
|
);
|
|
@@ -262,20 +284,20 @@ class RsdoctorWebpackSDK extends import_core.SDKCore {
|
|
|
262
284
|
const pkgGraph = import_graph.PackageGraph.fromModuleGraph(
|
|
263
285
|
this._moduleGraph,
|
|
264
286
|
this.root,
|
|
265
|
-
(
|
|
287
|
+
(path2) => {
|
|
266
288
|
try {
|
|
267
|
-
const exists = import_build.File.fse.existsSync(
|
|
289
|
+
const exists = import_build.File.fse.existsSync(path2);
|
|
268
290
|
if (exists) {
|
|
269
291
|
(0, import_logger.debug)(
|
|
270
|
-
() => `sdk.PackageGraph package.json exists: ${exists}, path: ${
|
|
292
|
+
() => `sdk.PackageGraph package.json exists: ${exists}, path: ${path2}`,
|
|
271
293
|
"[SDK.createPackageGraph][load]"
|
|
272
294
|
);
|
|
273
|
-
return import_build.File.fse.readJSONSync(
|
|
295
|
+
return import_build.File.fse.readJSONSync(path2);
|
|
274
296
|
}
|
|
275
297
|
} catch (error) {
|
|
276
298
|
const { message, stack } = error;
|
|
277
299
|
(0, import_logger.debug)(
|
|
278
|
-
() => `sdk.createPackageGraph error, path: ${
|
|
300
|
+
() => `sdk.createPackageGraph error, path: ${path2}, error message: ${stack || message}`,
|
|
279
301
|
"[SDK.createPackageGraph][error]"
|
|
280
302
|
);
|
|
281
303
|
}
|
|
@@ -290,6 +312,13 @@ class RsdoctorWebpackSDK extends import_core.SDKCore {
|
|
|
290
312
|
}
|
|
291
313
|
writeStore(options) {
|
|
292
314
|
(0, import_logger.debug)(() => `sdk.writeStore has run.`, "[SDK.writeStore][end]");
|
|
315
|
+
if (this.extraConfig?.mode === import_types.SDK.IMode[import_types.SDK.IMode.brief]) {
|
|
316
|
+
const clientHtmlPath = this.extraConfig.innerClientPath ? this.extraConfig.innerClientPath : require.resolve("@rsdoctor/client");
|
|
317
|
+
if (this.extraConfig.brief?.writeDataJson) {
|
|
318
|
+
this.saveManifest(this.getStoreData(), options || {});
|
|
319
|
+
}
|
|
320
|
+
return this.inlineScriptsAndStyles(clientHtmlPath);
|
|
321
|
+
}
|
|
293
322
|
return this.saveManifest(this.getStoreData(), options || {});
|
|
294
323
|
}
|
|
295
324
|
getStoreData() {
|
|
@@ -385,8 +414,88 @@ class RsdoctorWebpackSDK extends import_core.SDKCore {
|
|
|
385
414
|
onDataReport() {
|
|
386
415
|
this.server.broadcast();
|
|
387
416
|
}
|
|
417
|
+
addRsdoctorDataToHTML(storeData, htmlContent) {
|
|
418
|
+
let compressTextScripts = `<script>window.${import_types.Constants.WINDOW_RSDOCTOR_TAG}={}</script>`;
|
|
419
|
+
for (let key of Object.keys(storeData)) {
|
|
420
|
+
const data = storeData[key];
|
|
421
|
+
const jsonstrFn = () => {
|
|
422
|
+
try {
|
|
423
|
+
return JSON.stringify(data);
|
|
424
|
+
} catch (error) {
|
|
425
|
+
console.error(error);
|
|
426
|
+
return "";
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
const compressText = import_common.Algorithm.compressText(jsonstrFn());
|
|
430
|
+
compressTextScripts = `${compressTextScripts} <script>window.${import_types.Constants.WINDOW_RSDOCTOR_TAG}.${key}=${JSON.stringify(compressText)}</script>`;
|
|
431
|
+
}
|
|
432
|
+
compressTextScripts = `${compressTextScripts} <script>window.${import_types.Constants.WINDOW_RSDOCTOR_TAG}.enableRoutes=${JSON.stringify(this.getClientRoutes())}</script>`;
|
|
433
|
+
htmlContent = htmlContent.replace("<body>", `<body>${compressTextScripts}`);
|
|
434
|
+
return htmlContent;
|
|
435
|
+
}
|
|
436
|
+
inlineScriptsAndStyles(htmlFilePath) {
|
|
437
|
+
function inlineScripts(basePath2, scripts) {
|
|
438
|
+
return scripts.map((src) => {
|
|
439
|
+
const scriptPath = import_path.default.resolve(basePath2, src);
|
|
440
|
+
try {
|
|
441
|
+
const scriptContent = import_fs_extra.default.readFileSync(scriptPath, "utf-8");
|
|
442
|
+
return `<script>${scriptContent}</script>`;
|
|
443
|
+
} catch (error) {
|
|
444
|
+
console.error(`Could not read script at ${scriptPath}:`, error);
|
|
445
|
+
return "";
|
|
446
|
+
}
|
|
447
|
+
}).join("");
|
|
448
|
+
}
|
|
449
|
+
function inlineCss(basePath2, cssFiles) {
|
|
450
|
+
return cssFiles.map((href) => {
|
|
451
|
+
const cssPath = import_path.default.resolve(basePath2, href);
|
|
452
|
+
try {
|
|
453
|
+
const cssContent = import_fs_extra.default.readFileSync(cssPath, "utf-8");
|
|
454
|
+
return `<style>${cssContent}</style>`;
|
|
455
|
+
} catch (error) {
|
|
456
|
+
console.error(`Could not read CSS at ${cssPath}:`, error);
|
|
457
|
+
return "";
|
|
458
|
+
}
|
|
459
|
+
}).join("");
|
|
460
|
+
}
|
|
461
|
+
let htmlContent = import_fs_extra.default.readFileSync(htmlFilePath, "utf-8");
|
|
462
|
+
const basePath = import_path.default.dirname(htmlFilePath);
|
|
463
|
+
const scriptSrcs = Array.from(
|
|
464
|
+
htmlContent.matchAll(
|
|
465
|
+
/<script\s+defer="defer"\s+src=["'](.+?)["']><\/script>/g
|
|
466
|
+
),
|
|
467
|
+
(m) => m[1]
|
|
468
|
+
);
|
|
469
|
+
const cssHrefs = Array.from(
|
|
470
|
+
htmlContent.matchAll(/<link\s+href=["'](.+?)["']\s+rel="stylesheet">/g),
|
|
471
|
+
(m) => m[1]
|
|
472
|
+
);
|
|
473
|
+
htmlContent = htmlContent.replace(
|
|
474
|
+
/<script\s+.*?src=["'].*?["']><\/script>/g,
|
|
475
|
+
""
|
|
476
|
+
);
|
|
477
|
+
htmlContent = htmlContent.replace(
|
|
478
|
+
/<link\s+.*?rel=["']stylesheet["'].*?>/g,
|
|
479
|
+
""
|
|
480
|
+
);
|
|
481
|
+
const inlinedScripts = inlineScripts(basePath, scriptSrcs);
|
|
482
|
+
const inlinedCss = inlineCss(basePath, cssHrefs);
|
|
483
|
+
const index = htmlContent.indexOf("</body>");
|
|
484
|
+
htmlContent = htmlContent.slice(0, index) + inlinedCss + inlinedScripts + htmlContent.slice(index);
|
|
485
|
+
htmlContent = this.addRsdoctorDataToHTML(this.getStoreData(), htmlContent);
|
|
486
|
+
const outputFilePath = import_path.default.resolve(
|
|
487
|
+
this.outputDir,
|
|
488
|
+
this.extraConfig?.brief?.reportHtmlName || "rsdoctor-report.html"
|
|
489
|
+
);
|
|
490
|
+
import_fs_extra.default.outputFileSync(outputFilePath, htmlContent, {
|
|
491
|
+
encoding: "utf-8",
|
|
492
|
+
flag: "w"
|
|
493
|
+
});
|
|
494
|
+
return outputFilePath;
|
|
495
|
+
}
|
|
388
496
|
}
|
|
389
497
|
// Annotate the CommonJS export names for ESM import in node:
|
|
390
498
|
0 && (module.exports = {
|
|
391
|
-
RsdoctorWebpackSDK
|
|
499
|
+
RsdoctorWebpackSDK,
|
|
500
|
+
...require("../utils/openBrowser")
|
|
392
501
|
});
|
package/dist/esm/sdk/sdk/core.js
CHANGED
|
@@ -20,7 +20,10 @@ class SDKCore {
|
|
|
20
20
|
this._name = name;
|
|
21
21
|
this.root = root;
|
|
22
22
|
this.pid = process.pid;
|
|
23
|
-
this._outputDir = path.join(
|
|
23
|
+
this._outputDir = path.join(
|
|
24
|
+
this.outputDir || this.root,
|
|
25
|
+
Constants.RsdoctorOutputFolder
|
|
26
|
+
);
|
|
24
27
|
}
|
|
25
28
|
get outputDir() {
|
|
26
29
|
return this._outputDir;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import fse from "fs-extra";
|
|
2
|
+
import path from "path";
|
|
1
3
|
import { DevToolError } from "@rsdoctor/utils/error";
|
|
2
|
-
import { SDK } from "@rsdoctor/types";
|
|
4
|
+
import { Constants, SDK } from "@rsdoctor/types";
|
|
3
5
|
import { File } from "@rsdoctor/utils/build";
|
|
4
6
|
import { SourceMapConsumer } from "source-map";
|
|
5
7
|
import { ModuleGraph, ChunkGraph, PackageGraph } from "@rsdoctor/graph";
|
|
@@ -7,6 +9,9 @@ import { debug } from "@rsdoctor/utils/logger";
|
|
|
7
9
|
import { RsdoctorServer } from "../server";
|
|
8
10
|
import { RsdoctorFakeServer } from "../server/fakeServer";
|
|
9
11
|
import { SDKCore } from "./core";
|
|
12
|
+
import { Algorithm } from "@rsdoctor/utils/common";
|
|
13
|
+
import { isNumber } from "lodash";
|
|
14
|
+
export * from "../utils/openBrowser";
|
|
10
15
|
class RsdoctorWebpackSDK extends SDKCore {
|
|
11
16
|
constructor(options) {
|
|
12
17
|
super(options);
|
|
@@ -25,7 +30,7 @@ class RsdoctorWebpackSDK extends SDKCore {
|
|
|
25
30
|
innerClientPath: options.config?.innerClientPath || "",
|
|
26
31
|
printServerUrl: options.config?.printLog?.serverUrls
|
|
27
32
|
});
|
|
28
|
-
this.type = options.type
|
|
33
|
+
this.type = isNumber(options.type) ? options.type : SDK.ToDataType.Normal;
|
|
29
34
|
this.extraConfig = options.config;
|
|
30
35
|
}
|
|
31
36
|
async bootstrap() {
|
|
@@ -118,6 +123,12 @@ class RsdoctorWebpackSDK extends SDKCore {
|
|
|
118
123
|
}
|
|
119
124
|
reportLoader(data) {
|
|
120
125
|
data.forEach((item) => {
|
|
126
|
+
if (this.extraConfig?.mode === SDK.IMode[SDK.IMode.brief]) {
|
|
127
|
+
item.loaders.forEach((_loader) => {
|
|
128
|
+
_loader.input = "";
|
|
129
|
+
_loader.result = "";
|
|
130
|
+
});
|
|
131
|
+
}
|
|
121
132
|
let match = this._loader.find(
|
|
122
133
|
(e) => e.resource.path === item.resource.path
|
|
123
134
|
);
|
|
@@ -239,20 +250,20 @@ class RsdoctorWebpackSDK extends SDKCore {
|
|
|
239
250
|
const pkgGraph = PackageGraph.fromModuleGraph(
|
|
240
251
|
this._moduleGraph,
|
|
241
252
|
this.root,
|
|
242
|
-
(
|
|
253
|
+
(path2) => {
|
|
243
254
|
try {
|
|
244
|
-
const exists = File.fse.existsSync(
|
|
255
|
+
const exists = File.fse.existsSync(path2);
|
|
245
256
|
if (exists) {
|
|
246
257
|
debug(
|
|
247
|
-
() => `sdk.PackageGraph package.json exists: ${exists}, path: ${
|
|
258
|
+
() => `sdk.PackageGraph package.json exists: ${exists}, path: ${path2}`,
|
|
248
259
|
"[SDK.createPackageGraph][load]"
|
|
249
260
|
);
|
|
250
|
-
return File.fse.readJSONSync(
|
|
261
|
+
return File.fse.readJSONSync(path2);
|
|
251
262
|
}
|
|
252
263
|
} catch (error) {
|
|
253
264
|
const { message, stack } = error;
|
|
254
265
|
debug(
|
|
255
|
-
() => `sdk.createPackageGraph error, path: ${
|
|
266
|
+
() => `sdk.createPackageGraph error, path: ${path2}, error message: ${stack || message}`,
|
|
256
267
|
"[SDK.createPackageGraph][error]"
|
|
257
268
|
);
|
|
258
269
|
}
|
|
@@ -267,6 +278,13 @@ class RsdoctorWebpackSDK extends SDKCore {
|
|
|
267
278
|
}
|
|
268
279
|
writeStore(options) {
|
|
269
280
|
debug(() => `sdk.writeStore has run.`, "[SDK.writeStore][end]");
|
|
281
|
+
if (this.extraConfig?.mode === SDK.IMode[SDK.IMode.brief]) {
|
|
282
|
+
const clientHtmlPath = this.extraConfig.innerClientPath ? this.extraConfig.innerClientPath : require.resolve("@rsdoctor/client");
|
|
283
|
+
if (this.extraConfig.brief?.writeDataJson) {
|
|
284
|
+
this.saveManifest(this.getStoreData(), options || {});
|
|
285
|
+
}
|
|
286
|
+
return this.inlineScriptsAndStyles(clientHtmlPath);
|
|
287
|
+
}
|
|
270
288
|
return this.saveManifest(this.getStoreData(), options || {});
|
|
271
289
|
}
|
|
272
290
|
getStoreData() {
|
|
@@ -362,6 +380,85 @@ class RsdoctorWebpackSDK extends SDKCore {
|
|
|
362
380
|
onDataReport() {
|
|
363
381
|
this.server.broadcast();
|
|
364
382
|
}
|
|
383
|
+
addRsdoctorDataToHTML(storeData, htmlContent) {
|
|
384
|
+
let compressTextScripts = `<script>window.${Constants.WINDOW_RSDOCTOR_TAG}={}</script>`;
|
|
385
|
+
for (let key of Object.keys(storeData)) {
|
|
386
|
+
const data = storeData[key];
|
|
387
|
+
const jsonstrFn = () => {
|
|
388
|
+
try {
|
|
389
|
+
return JSON.stringify(data);
|
|
390
|
+
} catch (error) {
|
|
391
|
+
console.error(error);
|
|
392
|
+
return "";
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
const compressText = Algorithm.compressText(jsonstrFn());
|
|
396
|
+
compressTextScripts = `${compressTextScripts} <script>window.${Constants.WINDOW_RSDOCTOR_TAG}.${key}=${JSON.stringify(compressText)}</script>`;
|
|
397
|
+
}
|
|
398
|
+
compressTextScripts = `${compressTextScripts} <script>window.${Constants.WINDOW_RSDOCTOR_TAG}.enableRoutes=${JSON.stringify(this.getClientRoutes())}</script>`;
|
|
399
|
+
htmlContent = htmlContent.replace("<body>", `<body>${compressTextScripts}`);
|
|
400
|
+
return htmlContent;
|
|
401
|
+
}
|
|
402
|
+
inlineScriptsAndStyles(htmlFilePath) {
|
|
403
|
+
function inlineScripts(basePath2, scripts) {
|
|
404
|
+
return scripts.map((src) => {
|
|
405
|
+
const scriptPath = path.resolve(basePath2, src);
|
|
406
|
+
try {
|
|
407
|
+
const scriptContent = fse.readFileSync(scriptPath, "utf-8");
|
|
408
|
+
return `<script>${scriptContent}</script>`;
|
|
409
|
+
} catch (error) {
|
|
410
|
+
console.error(`Could not read script at ${scriptPath}:`, error);
|
|
411
|
+
return "";
|
|
412
|
+
}
|
|
413
|
+
}).join("");
|
|
414
|
+
}
|
|
415
|
+
function inlineCss(basePath2, cssFiles) {
|
|
416
|
+
return cssFiles.map((href) => {
|
|
417
|
+
const cssPath = path.resolve(basePath2, href);
|
|
418
|
+
try {
|
|
419
|
+
const cssContent = fse.readFileSync(cssPath, "utf-8");
|
|
420
|
+
return `<style>${cssContent}</style>`;
|
|
421
|
+
} catch (error) {
|
|
422
|
+
console.error(`Could not read CSS at ${cssPath}:`, error);
|
|
423
|
+
return "";
|
|
424
|
+
}
|
|
425
|
+
}).join("");
|
|
426
|
+
}
|
|
427
|
+
let htmlContent = fse.readFileSync(htmlFilePath, "utf-8");
|
|
428
|
+
const basePath = path.dirname(htmlFilePath);
|
|
429
|
+
const scriptSrcs = Array.from(
|
|
430
|
+
htmlContent.matchAll(
|
|
431
|
+
/<script\s+defer="defer"\s+src=["'](.+?)["']><\/script>/g
|
|
432
|
+
),
|
|
433
|
+
(m) => m[1]
|
|
434
|
+
);
|
|
435
|
+
const cssHrefs = Array.from(
|
|
436
|
+
htmlContent.matchAll(/<link\s+href=["'](.+?)["']\s+rel="stylesheet">/g),
|
|
437
|
+
(m) => m[1]
|
|
438
|
+
);
|
|
439
|
+
htmlContent = htmlContent.replace(
|
|
440
|
+
/<script\s+.*?src=["'].*?["']><\/script>/g,
|
|
441
|
+
""
|
|
442
|
+
);
|
|
443
|
+
htmlContent = htmlContent.replace(
|
|
444
|
+
/<link\s+.*?rel=["']stylesheet["'].*?>/g,
|
|
445
|
+
""
|
|
446
|
+
);
|
|
447
|
+
const inlinedScripts = inlineScripts(basePath, scriptSrcs);
|
|
448
|
+
const inlinedCss = inlineCss(basePath, cssHrefs);
|
|
449
|
+
const index = htmlContent.indexOf("</body>");
|
|
450
|
+
htmlContent = htmlContent.slice(0, index) + inlinedCss + inlinedScripts + htmlContent.slice(index);
|
|
451
|
+
htmlContent = this.addRsdoctorDataToHTML(this.getStoreData(), htmlContent);
|
|
452
|
+
const outputFilePath = path.resolve(
|
|
453
|
+
this.outputDir,
|
|
454
|
+
this.extraConfig?.brief?.reportHtmlName || "rsdoctor-report.html"
|
|
455
|
+
);
|
|
456
|
+
fse.outputFileSync(outputFilePath, htmlContent, {
|
|
457
|
+
encoding: "utf-8",
|
|
458
|
+
flag: "w"
|
|
459
|
+
});
|
|
460
|
+
return outputFilePath;
|
|
461
|
+
}
|
|
365
462
|
}
|
|
366
463
|
export {
|
|
367
464
|
RsdoctorWebpackSDK
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/sdk/sdk/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,QAAQ,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AASnE,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,8BAAsB,OAAO,CAAC,CAAC,SAAS,kBAAkB,CACxD,YAAW,GAAG,CAAC,mBAAmB;IAElC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IAExB,SAAS,CAAC,IAAI,EAAG,MAAM,CAAC;IAExB,WAAW,EAAE,GAAG,CAAC,cAAc,GAAG,SAAS,CAAC;IAE5C,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,SAAgB,GAAG,EAAE,MAAM,CAAC;IAE5B,SAAgB,KAAK,EAAE,GAAG,CAAC,KAAK,CAE9B;IAEF,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAqB;IAEpD,OAAO,CAAC,aAAa,CAElB;IAEH,OAAO,CAAC,UAAU,CAAS;IAEpB,gBAAgB,SAAM;IAEtB,SAAS,CAAC,EAAE,QAAQ,CAAC,iCAAiC,CAAC;gBAElD,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../src/sdk/sdk/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,QAAQ,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AASnE,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,8BAAsB,OAAO,CAAC,CAAC,SAAS,kBAAkB,CACxD,YAAW,GAAG,CAAC,mBAAmB;IAElC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC;IAExB,SAAS,CAAC,IAAI,EAAG,MAAM,CAAC;IAExB,WAAW,EAAE,GAAG,CAAC,cAAc,GAAG,SAAS,CAAC;IAE5C,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B,SAAgB,GAAG,EAAE,MAAM,CAAC;IAE5B,SAAgB,KAAK,EAAE,GAAG,CAAC,KAAK,CAE9B;IAEF,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAqB;IAEpD,OAAO,CAAC,aAAa,CAElB;IAEH,OAAO,CAAC,UAAU,CAAS;IAEpB,gBAAgB,SAAM;IAEtB,SAAS,CAAC,EAAE,QAAQ,CAAC,iCAAiC,CAAC;gBAElD,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;IAU7B,IAAI,SAAS,WAEZ;IAED,IAAI,IAAI,WAEP;IAEK,SAAS;IAgCT,OAAO;IAEN,YAAY,CAAC,SAAS,EAAE,MAAM;IAI9B,OAAO,CAAC,IAAI,EAAE,MAAM;IAIpB,OAAO,CAAC,IAAI,EAAE,MAAM;IAIpB,OAAO;IAIP,eAAe;IAIf,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,4BAA4B,EAAE;IAOtE,kCAAkC;cAClB,WAAW,CACzB,SAAS,EAAE,MAAM,CAAC,WAAW,EAC7B,QAAQ,CAAC,EAAE,GAAG,CAAC,qBAAqB;IAuDtC,2BAA2B;cACX,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAanC,YAAY,CACvB,IAAI,EAAE,MAAM,CAAC,WAAW,EACxB,OAAO,EAAE,GAAG,CAAC,qBAAqB;IAapC,SAAS,CAAC,aAAa,CACrB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,CAAC;aAiBP,YAAY,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CACrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/sdk/sdk/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/sdk/sdk/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EACD;QACE,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,GACH,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,IAAI,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC;CAC7B;AAED,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;CAAG;AAExE,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;CAAG"}
|
|
@@ -4,6 +4,7 @@ import { ModuleGraph, ChunkGraph, PackageGraph } from '@rsdoctor/graph';
|
|
|
4
4
|
import { RsdoctorServer } from '../server';
|
|
5
5
|
import { RsdoctorWebpackSDKOptions } from './types';
|
|
6
6
|
import { SDKCore } from './core';
|
|
7
|
+
export * from '../utils/openBrowser';
|
|
7
8
|
export declare class RsdoctorWebpackSDK<T extends RsdoctorWebpackSDKOptions = RsdoctorWebpackSDKOptions> extends SDKCore<T> implements SDK.RsdoctorBuilderSDKInstance {
|
|
8
9
|
server: RsdoctorServer;
|
|
9
10
|
extraConfig: SDK.SDKOptionsType | undefined;
|
|
@@ -41,10 +42,12 @@ export declare class RsdoctorWebpackSDK<T extends RsdoctorWebpackSDKOptions = Rs
|
|
|
41
42
|
reportSummaryData(part: Partial<SDK.SummaryData>): void;
|
|
42
43
|
reportTileHtml(tileReportHtml: string): void;
|
|
43
44
|
createPackageGraph(): void;
|
|
44
|
-
writeStore(options?: SDK.WriteStoreOptionsType): Promise<string>;
|
|
45
|
+
writeStore(options?: SDK.WriteStoreOptionsType): string | Promise<string>;
|
|
45
46
|
getStoreData(): SDK.BuilderStoreData;
|
|
46
47
|
getManifestData(): Manifest.RsdoctorManifestWithShardingFiles;
|
|
47
48
|
getRuleContext(_options: SDK.RuntimeContextOptions): SDK.RuntimeContext;
|
|
48
49
|
onDataReport(): void | Promise<void>;
|
|
50
|
+
addRsdoctorDataToHTML(storeData: SDK.BuilderStoreData, htmlContent: string): string;
|
|
51
|
+
inlineScriptsAndStyles(htmlFilePath: string): string;
|
|
49
52
|
}
|
|
50
53
|
//# sourceMappingURL=webpack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../../../src/sdk/sdk/webpack.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../../../src/sdk/sdk/webpack.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,QAAQ,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAIjC,cAAc,sBAAsB,CAAC;AAErC,qBAAa,kBAAkB,CAC3B,CAAC,SAAS,yBAAyB,GAAG,yBAAyB,CAEjE,SAAQ,OAAO,CAAC,CAAC,CACjB,YAAW,GAAG,CAAC,0BAA0B;IAElC,MAAM,EAAE,cAAc,CAAC;IAEvB,WAAW,EAAE,GAAG,CAAC,cAAc,GAAG,SAAS,CAAC;IAEnD,OAAO,CAAC,IAAI,CAAiB;IAE7B,OAAO,CAAC,QAAQ,CAAkC;IAElD,OAAO,CAAC,QAAQ,CAAsB;IAEtC,OAAO,CAAC,OAAO,CAAsB;IAErC,OAAO,CAAC,OAAO,CAAsB;IAErC,OAAO,CAAC,YAAY,CAAsB;IAE1C,OAAO,CAAC,SAAS,CAAwB;IAEzC,OAAO,CAAC,OAAO,CAAsB;IAErC,OAAO,CAAC,YAAY,CAAqB;IAEzC,OAAO,CAAC,WAAW,CAAoB;IAEvC,OAAO,CAAC,kBAAkB,CAAmC;IAE7D,OAAO,CAAC,UAAU,CAAwC;IAE1D,OAAO,CAAC,aAAa,CAA4B;IAEjD,OAAO,CAAC,eAAe,CAAqB;gBAEhC,OAAO,EAAE,CAAC;IAYhB,SAAS;IAUT,OAAO;IAOP,aAAa,CAAC,EAAE,EAAE,MAAM;IA0C9B,KAAK;IASL,mBAAmB,IAAI,IAAI;IAKrB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IA6BxE,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAIzC,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;IAK7C,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE;IAW3B,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU;IA6CjC,sBAAsB,CAAC,IAAI,EAAE,GAAG,CAAC,kBAAkB;IAoBnD,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,YAAY,GAAG,IAAI;IAK5C,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU,GAAG,IAAI;IAaxC,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAW1C,kBAAkB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAY5C,gBAAgB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAOxC,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,IAAI;IA0BvD,cAAc,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI;IAI5C,kBAAkB;IA2CX,UAAU,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,qBAAqB;IAe9C,YAAY,IAAI,GAAG,CAAC,gBAAgB;IA2DpC,eAAe,IAAI,QAAQ,CAAC,iCAAiC;IAyB7D,cAAc,CACnB,QAAQ,EAAE,GAAG,CAAC,qBAAqB,GAClC,GAAG,CAAC,cAAc;IAed,YAAY,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpC,qBAAqB,CAC1B,SAAS,EAAE,GAAG,CAAC,gBAAgB,EAC/B,WAAW,EAAE,MAAM;IAyBd,sBAAsB,CAAC,YAAY,EAAE,MAAM;CAuFnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/server/index.ts"],"names":[],"mappings":"
|
|
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,qBAAa,cAAe,YAAW,GAAG,CAAC,sBAAsB;IAgB7D,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,0BAA0B;IAf/C,OAAO,CAAC,OAAO,CAAwD;IAEhE,IAAI,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,OAAO,CAAC,CAAS;IAEzB,OAAO,CAAC,QAAQ,CAAQ;IAExB,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO,CAAC,eAAe,CAAU;gBAGrB,GAAG,EAAE,GAAG,CAAC,0BAA0B,EAC7C,IAAI,SAAqB,EACzB,MAAM,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,OAAO,CAAA;KAAE;IAYjE,IAAW,GAAG,IAAI,GAAG,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAElD;IAED,IAAW,IAAI,IAAI,MAAM,CAGxB;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,SAAS,IAAI,MAAM,CAE7B;IAED,IAAW,eAAe,IAAI,MAAM,CAEnC;IAEK,SAAS;IAmCf,SAAS,CAAC,sBAAsB,CAC9B,MAAM,EAAE,KAAK,GAAG,MAAM,EACtB,EAAE,EAAE,CACF,GAAG,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,kBAAkB,CAAC,KACvD,MAAM,CAAC,WAAW,GAAG,MAAM,GAC/B,UAAU,CAAC,OAAO,CAAC,kBAAkB;IAqCjC,KAAK,CACV,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,EACtB,MAAM,EAAE,KAAK,GAAG,MAAM,EACtB,EAAE,EAAE,CACF,GAAG,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,kBAAkB,CAAC,KACvD,MAAM,CAAC,WAAW,GAAG,MAAM;IAY3B,GAAG,EAAE,GAAG,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAI3C;IAEK,IAAI,EAAE,GAAG,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAI7C;IAEK,YAAY,CACjB,KAAK,EAAE,MAAM,CAAC,oBAAoB,EAClC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB,MAAM;IAEF,YAAY,CAAC,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;IAkBvD,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../src/sdk/server/router.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../src/sdk/server/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,OAAO,OAAO,CAAC,EAAE,CAAC;IAC3C,GAAG,EAAE,GAAG,CAAC,0BAA0B,CAAC;IACpC,MAAM,EAAE,GAAG,CAAC,sBAAsB,CAAC;CACpC;AAED,qBAAa,MAAM;IAuCL,SAAS,CAAC,OAAO,EAAE,aAAa;IAtC5C,MAAM,CAAC,MAAM;QACX;;WAEG;;;MAGH;IAEF,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe;IAe7C,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe;gBAexB,OAAO,EAAE,aAAa;IAE/B,KAAK;IAyBX,eAAe,CAAC,CAAC,SAAS,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,SAIzD,UAAU,CAAC,OAAO,CAAC,eAAe,OAClC,cAAc;CAsCxB"}
|
|
@@ -10,7 +10,7 @@ export declare class SocketAPILoader implements Manifest.ManifestDataLoader {
|
|
|
10
10
|
loadManifest(): Promise<Manifest.RsdoctorManifestWithShardingFiles>;
|
|
11
11
|
loadData<T extends Manifest.RsdoctorManifestMappingKeys>(key: T): Promise<Manifest.InferManifestDataValue<T>>;
|
|
12
12
|
loadData(key: string): Promise<void>;
|
|
13
|
-
get loadAPIData(): <T extends SDK.ServerAPI.API, B extends
|
|
13
|
+
get loadAPIData(): <T extends SDK.ServerAPI.API, B extends SDK.ServerAPI.InferRequestBodyType<T> = import("@rsdoctor/types/dist/common").Get<SDK.ServerAPI.ResquestBodyTypes, T, void>, R extends SDK.ServerAPI.InferResponseType<T> = import("@rsdoctor/types/dist/common").Get<SDK.ServerAPI.ResponseTypes, T, void>>(...args: B extends void ? [api: T] : [api: T, body: B]) => Promise<SDK.ServerAPI.InferResponseType<T>>;
|
|
14
14
|
}
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/server/socket/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,sBAAsB;IAC9B,GAAG,EAAE,GAAG,CAAC,0BAA0B,CAAC;CACrC;AAED,qBAAa,eAAgB,YAAW,QAAQ,CAAC,kBAAkB;IAGrD,SAAS,CAAC,OAAO,EAAE,sBAAsB;IAFrD,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC;gBAEnB,OAAO,EAAE,sBAAsB;IAIxC,YAAY;IAIZ,QAAQ,CAAC,CAAC,SAAS,QAAQ,CAAC,2BAA2B,EAClE,GAAG,EAAE,CAAC,GACL,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAEjC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBjD,IAAI,WAAW,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/server/socket/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,sBAAsB;IAC9B,GAAG,EAAE,GAAG,CAAC,0BAA0B,CAAC;CACrC;AAED,qBAAa,eAAgB,YAAW,QAAQ,CAAC,kBAAkB;IAGrD,SAAS,CAAC,OAAO,EAAE,sBAAsB;IAFrD,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC;gBAEnB,OAAO,EAAE,sBAAsB;IAIxC,YAAY;IAIZ,QAAQ,CAAC,CAAC,SAAS,QAAQ,CAAC,2BAA2B,EAClE,GAAG,EAAE,CAAC,GACL,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAEjC,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBjD,IAAI,WAAW,gZAEd;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/server/socket/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/server/socket/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EACL,MAAM,IAAI,YAAY,EACtB,aAAa,IAAI,mBAAmB,EACpC,MAAM,IAAI,UAAU,EACrB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAExC,UAAU,aAAa;IACrB,GAAG,EAAE,GAAG,CAAC,0BAA0B,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC;AAED,qBAAa,MAAM;IAQL,SAAS,CAAC,OAAO,EAAE,aAAa;IAP5C,SAAS,CAAC,EAAE,EAAG,YAAY,CAAC;IAE5B,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC;IAElC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,CACxD;gBAEU,OAAO,EAAE,aAAa;IAIrC,SAAS;IAahB,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,UAAU;IAexC,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,GAAG,CAAC,SAAS,CAAC,GAAG,EACpD,GAAG,EAAE,CAAC,EACN,IAAI,GAAE,GAAG,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,IAAW;cAajD,cAAc,CAAC,CAAC,SAAS,GAAG,CAAC,SAAS,CAAC,GAAG,EACxD,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAgB7C,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;IAEjC,SAAS;IAoBf,WAAW,CAAC,CAAC,SAAS,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,EACvE,GAAG,EAAE,CAAC,EACN,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAKnC,OAAO;CAIf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/sdk/utils/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,eAAO,MAAM,iBAAiB,MACzB,WAAW,EAAE,KACf,
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/sdk/utils/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,eAAO,MAAM,iBAAiB,MACzB,WAAW,EAAE,KACf,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAOlC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -15,19 +15,21 @@
|
|
|
15
15
|
"static"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
+
"@types/fs-extra": "^11.0.4",
|
|
18
19
|
"body-parser": "1.20.2",
|
|
19
20
|
"cors": "2.8.5",
|
|
20
21
|
"dayjs": "1.11.12",
|
|
22
|
+
"fs-extra": "^11.1.1",
|
|
21
23
|
"lodash": "^4.17.21",
|
|
22
24
|
"open": "^8.4.2",
|
|
23
25
|
"serve-static": "1.15.0",
|
|
24
26
|
"socket.io": "4.7.2",
|
|
25
27
|
"source-map": "^0.7.4",
|
|
26
28
|
"tapable": "2.2.1",
|
|
27
|
-
"@rsdoctor/client": "0.
|
|
28
|
-
"@rsdoctor/graph": "0.
|
|
29
|
-
"@rsdoctor/types": "0.
|
|
30
|
-
"@rsdoctor/utils": "0.
|
|
29
|
+
"@rsdoctor/client": "0.4.0",
|
|
30
|
+
"@rsdoctor/graph": "0.4.0",
|
|
31
|
+
"@rsdoctor/types": "0.4.0",
|
|
32
|
+
"@rsdoctor/utils": "0.4.0"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|
|
33
35
|
"@types/body-parser": "1.19.5",
|