@rsdoctor/components 0.1.0-beta → 0.1.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.
|
@@ -135,7 +135,7 @@ const PackageRelationAlert = ({
|
|
|
135
135
|
/* @__PURE__ */ jsx(
|
|
136
136
|
Typography.Paragraph,
|
|
137
137
|
{
|
|
138
|
-
style: { marginBottom: 0, width: windowWith > 1500 ? "
|
|
138
|
+
style: { marginBottom: 0, width: windowWith > 1500 ? "40rem" : windowWith > 1200 ? "30rem" : "20rem" },
|
|
139
139
|
copyable: { text: el.root },
|
|
140
140
|
ellipsis: { rows: 1, expandable: true, symbol: /* @__PURE__ */ jsx(ExpandAltOutlined, {}), tooltip: el.root },
|
|
141
141
|
code: true,
|
|
@@ -3,7 +3,6 @@ import './tooltips.scss';
|
|
|
3
3
|
import { DurationMetric, ITraceEventData } from './types';
|
|
4
4
|
export declare function getTooltipHtmlForLoader(loader: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderChartData>[0]): string;
|
|
5
5
|
export declare function renderTotalLoadersTooltip(loaderName: string, loaders: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderChartData>, cwd: string): string;
|
|
6
|
-
export declare function replaceSlashWithNewline(input: string): string;
|
|
7
6
|
export declare function transformDurationMetric(rawData: DurationMetric[]): ITraceEventData[];
|
|
8
7
|
export declare function processTrans(rawData: DurationMetric[]): ITraceEventData[];
|
|
9
8
|
export declare function formatterForPlugins(raw: {
|
|
@@ -70,21 +70,6 @@ function renderTotalLoadersTooltip(loaderName, loaders, cwd) {
|
|
|
70
70
|
</div>
|
|
71
71
|
`.trim();
|
|
72
72
|
}
|
|
73
|
-
function replaceSlashWithNewline(input) {
|
|
74
|
-
let result = "";
|
|
75
|
-
for (let i = 0; i < input.length; i++) {
|
|
76
|
-
if (input[i] === "/") {
|
|
77
|
-
if (true) {
|
|
78
|
-
result += "/\n";
|
|
79
|
-
} else {
|
|
80
|
-
result += "/";
|
|
81
|
-
}
|
|
82
|
-
} else {
|
|
83
|
-
result += input[i];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return result;
|
|
87
|
-
}
|
|
88
73
|
function transformDurationMetric(rawData) {
|
|
89
74
|
return rawData.reduce((acc, cur) => {
|
|
90
75
|
if (cur.c) {
|
|
@@ -198,6 +183,5 @@ export {
|
|
|
198
183
|
getTooltipHtmlForLoader,
|
|
199
184
|
processTrans,
|
|
200
185
|
renderTotalLoadersTooltip,
|
|
201
|
-
replaceSlashWithNewline,
|
|
202
186
|
transformDurationMetric
|
|
203
187
|
};
|
package/dist/utils/loader.js
CHANGED
|
@@ -6,7 +6,12 @@ function flattenLoaderData(loaderData) {
|
|
|
6
6
|
}
|
|
7
7
|
function filterLoaders(loaderData, keyword, loaderNames) {
|
|
8
8
|
return loaderData.loaders.filter((item) => {
|
|
9
|
-
return filterLoader(
|
|
9
|
+
return filterLoader(
|
|
10
|
+
loaderData.resource.path,
|
|
11
|
+
item.loader,
|
|
12
|
+
keyword,
|
|
13
|
+
loaderNames
|
|
14
|
+
);
|
|
10
15
|
});
|
|
11
16
|
}
|
|
12
17
|
function filterLoader(resourcePath, loader, keyword, loaderNames) {
|
|
@@ -14,7 +19,7 @@ function filterLoader(resourcePath, loader, keyword, loaderNames) {
|
|
|
14
19
|
if (resourcePath.indexOf(keyword) === -1)
|
|
15
20
|
return false;
|
|
16
21
|
}
|
|
17
|
-
if (loaderNames
|
|
22
|
+
if (loaderNames?.length) {
|
|
18
23
|
if (!includes(loaderNames, loader))
|
|
19
24
|
return false;
|
|
20
25
|
}
|
package/dist/utils/request.js
CHANGED
|
@@ -80,7 +80,7 @@ if (process.env.NODE_ENV === "development") {
|
|
|
80
80
|
if (getAPILoaderModeFromStorage() === APILoaderMode4Dev.Local) {
|
|
81
81
|
axios.interceptors.request.use((c) => {
|
|
82
82
|
c.withCredentials = false;
|
|
83
|
-
if (c.url
|
|
83
|
+
if (c.url?.startsWith("/")) {
|
|
84
84
|
if (c.url === manifestUrlForDev) {
|
|
85
85
|
c.url = SDK.ServerAPI.API.Manifest;
|
|
86
86
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/components",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"terser": "^5.26.0",
|
|
74
74
|
"typescript": "^5.2.2",
|
|
75
75
|
"url-parse": "1.5.10",
|
|
76
|
-
"@rsdoctor/graph": "0.1.0
|
|
77
|
-
"@rsdoctor/
|
|
78
|
-
"@rsdoctor/
|
|
76
|
+
"@rsdoctor/graph": "0.1.0",
|
|
77
|
+
"@rsdoctor/types": "0.1.0",
|
|
78
|
+
"@rsdoctor/utils": "0.1.0"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public",
|