@rsdoctor/components 1.5.2-beta.0 → 1.5.3-alpha.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/components/Alerts/bundle-alert.mjs +12 -0
- package/dist/components/Alerts/bundle-alert.mjs.map +1 -1
- package/dist/components/Alerts/collapse-module-mixed-chunks.d.ts +6 -0
- package/dist/components/Alerts/collapse-module-mixed-chunks.mjs +171 -0
- package/dist/components/Alerts/collapse-module-mixed-chunks.mjs.map +1 -0
- package/dist/components/Charts/TreeMap.d.ts +1 -2
- package/dist/components/Charts/TreeMap.mjs +1 -14
- package/dist/components/Charts/TreeMap.mjs.map +1 -1
- package/dist/components/Loader/executions.mjs +138 -118
- package/dist/components/Loader/executions.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index.mjs +390 -399
- package/dist/pages/BundleSize/components/index.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index.module.mjs +0 -4
- package/dist/pages/BundleSize/components/index.module.mjs.map +1 -1
- package/dist/pages/BundleSize/components/index_module.css +0 -4
- package/dist/pages/BundleSize/components/index_module.css.map +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ClockCircleTwoTone } from "@ant-design/icons";
|
|
3
|
+
import { SDK } from "@rsdoctor/types";
|
|
3
4
|
import { Col, Divider, Empty, List, Row, Space, Tabs, Tag, Timeline, Tooltip, Typography } from "antd";
|
|
4
5
|
import dayjs from "dayjs";
|
|
5
6
|
import { useCallback, useState } from "react";
|
|
@@ -12,6 +13,7 @@ import { CodeViewer, DiffViewer } from "../base/index.mjs";
|
|
|
12
13
|
import { Card } from "../Card/index.mjs";
|
|
13
14
|
import { CodeOpener } from "../Opener/index.mjs";
|
|
14
15
|
import { Title } from "../Title/index.mjs";
|
|
16
|
+
import { ServerAPIProvider } from "../Manifest/index.mjs";
|
|
15
17
|
import style_module from "./Analysis/style.module.mjs";
|
|
16
18
|
const LoaderPropsItem = ({ loader, resource, cwd })=>/*#__PURE__*/ jsx(Card, {
|
|
17
19
|
title: 'Loader Details',
|
|
@@ -153,15 +155,135 @@ const LoaderPropsItem = ({ loader, resource, cwd })=>/*#__PURE__*/ jsx(Card, {
|
|
|
153
155
|
]
|
|
154
156
|
})
|
|
155
157
|
});
|
|
158
|
+
const LoaderDetailsContent = ({ loader, resource, isLight, codeData })=>{
|
|
159
|
+
const hasError = loader.errors && loader.errors.length;
|
|
160
|
+
const before = codeData?.input || '';
|
|
161
|
+
const loaderResult = codeData?.output || '';
|
|
162
|
+
return /*#__PURE__*/ jsx("div", {
|
|
163
|
+
style: {
|
|
164
|
+
height: '100%'
|
|
165
|
+
},
|
|
166
|
+
children: hasError ? /*#__PURE__*/ jsxs(Col, {
|
|
167
|
+
span: 24,
|
|
168
|
+
style: {
|
|
169
|
+
height: '53%',
|
|
170
|
+
minHeight: 400
|
|
171
|
+
},
|
|
172
|
+
children: [
|
|
173
|
+
/*#__PURE__*/ jsx("div", {
|
|
174
|
+
style: {
|
|
175
|
+
padding: Size.BasePadding,
|
|
176
|
+
borderTop: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`,
|
|
177
|
+
borderBottom: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`
|
|
178
|
+
},
|
|
179
|
+
children: /*#__PURE__*/ jsx(Title, {
|
|
180
|
+
text: `the error stack of [${loader.loader}] ${loader.isPitch ? 'pitch' : ''}`
|
|
181
|
+
})
|
|
182
|
+
}),
|
|
183
|
+
/*#__PURE__*/ jsx("div", {
|
|
184
|
+
style: {
|
|
185
|
+
height: '90%'
|
|
186
|
+
},
|
|
187
|
+
children: /*#__PURE__*/ jsx(CodeViewer, {
|
|
188
|
+
code: loader.errors[0].message,
|
|
189
|
+
lang: "javascript"
|
|
190
|
+
})
|
|
191
|
+
})
|
|
192
|
+
]
|
|
193
|
+
}) : /*#__PURE__*/ jsxs(Col, {
|
|
194
|
+
span: 24,
|
|
195
|
+
style: {
|
|
196
|
+
height: '53%',
|
|
197
|
+
minHeight: 400
|
|
198
|
+
},
|
|
199
|
+
children: [
|
|
200
|
+
/*#__PURE__*/ jsxs("div", {
|
|
201
|
+
style: {
|
|
202
|
+
display: 'flex',
|
|
203
|
+
alignItems: 'center',
|
|
204
|
+
padding: Size.BasePadding,
|
|
205
|
+
borderBottom: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`
|
|
206
|
+
},
|
|
207
|
+
children: [
|
|
208
|
+
/*#__PURE__*/ jsx(Title, {
|
|
209
|
+
text: /*#__PURE__*/ jsxs(Fragment, {
|
|
210
|
+
children: [
|
|
211
|
+
`the result of [${loader.loader}] ${loader.isPitch ? 'pitch' : ''}`,
|
|
212
|
+
!loader.isPitch && /*#__PURE__*/ jsxs("span", {
|
|
213
|
+
style: {
|
|
214
|
+
fontWeight: 400
|
|
215
|
+
},
|
|
216
|
+
children: [
|
|
217
|
+
"(",
|
|
218
|
+
/*#__PURE__*/ jsx(input, {
|
|
219
|
+
style: {
|
|
220
|
+
verticalAlign: 'middle',
|
|
221
|
+
margin: '0 2px'
|
|
222
|
+
}
|
|
223
|
+
}),
|
|
224
|
+
"Input ⟷",
|
|
225
|
+
/*#__PURE__*/ jsx(output, {
|
|
226
|
+
style: {
|
|
227
|
+
verticalAlign: 'middle',
|
|
228
|
+
position: 'relative',
|
|
229
|
+
top: -2
|
|
230
|
+
}
|
|
231
|
+
}),
|
|
232
|
+
"Output)"
|
|
233
|
+
]
|
|
234
|
+
})
|
|
235
|
+
]
|
|
236
|
+
})
|
|
237
|
+
}),
|
|
238
|
+
/*#__PURE__*/ jsx("div", {
|
|
239
|
+
style: {
|
|
240
|
+
flex: 1
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
}),
|
|
245
|
+
loader.isPitch ? loaderResult ? /*#__PURE__*/ jsx("div", {
|
|
246
|
+
style: {
|
|
247
|
+
height: '90%'
|
|
248
|
+
},
|
|
249
|
+
children: /*#__PURE__*/ jsx(CodeViewer, {
|
|
250
|
+
isEmbed: true,
|
|
251
|
+
code: loaderResult,
|
|
252
|
+
filePath: resource.path
|
|
253
|
+
})
|
|
254
|
+
}) : /*#__PURE__*/ jsx(Empty, {
|
|
255
|
+
description: 'No loader result. If you use the Brief Mode, there will not have loader results.'
|
|
256
|
+
}) : /*#__PURE__*/ jsx("div", {
|
|
257
|
+
style: {
|
|
258
|
+
minHeight: '700px'
|
|
259
|
+
},
|
|
260
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
261
|
+
style: {
|
|
262
|
+
height: '40rem',
|
|
263
|
+
overflow: 'hidden'
|
|
264
|
+
},
|
|
265
|
+
children: loaderResult || before ? /*#__PURE__*/ jsx(DiffViewer, {
|
|
266
|
+
isEmbed: true,
|
|
267
|
+
original: before,
|
|
268
|
+
modified: loaderResult || '',
|
|
269
|
+
originalFilePath: resource.path,
|
|
270
|
+
modifiedFilePath: resource.path
|
|
271
|
+
}) : /*#__PURE__*/ jsx(Empty, {
|
|
272
|
+
description: 'No loader result. If you use the Brief Mode, there will not have loader results.'
|
|
273
|
+
})
|
|
274
|
+
})
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
})
|
|
278
|
+
});
|
|
279
|
+
};
|
|
156
280
|
const LoaderExecutions = ({ data, cwd, index })=>{
|
|
157
281
|
const { loaders, resource } = data;
|
|
158
282
|
const [currentIndex, setCurrentIndex] = useState(index || 0);
|
|
159
283
|
const { theme } = useTheme();
|
|
160
284
|
const isLight = 'light' === theme;
|
|
161
285
|
const loader = loaders[currentIndex];
|
|
162
|
-
const before = loader.input || '';
|
|
163
286
|
const leftSpan = 5;
|
|
164
|
-
const hasError = loader.errors && loader.errors.length;
|
|
165
287
|
const [activeKey, setActiveKey] = useState('loaderDetails');
|
|
166
288
|
const onChange = useCallback((key)=>{
|
|
167
289
|
setActiveKey(key);
|
|
@@ -294,123 +416,21 @@ const LoaderExecutions = ({ data, cwd, index })=>{
|
|
|
294
416
|
{
|
|
295
417
|
label: 'Loader Details',
|
|
296
418
|
key: 'loaderDetails',
|
|
297
|
-
children: /*#__PURE__*/ jsx(
|
|
298
|
-
|
|
299
|
-
|
|
419
|
+
children: 'loaderDetails' === activeKey ? /*#__PURE__*/ jsx(ServerAPIProvider, {
|
|
420
|
+
api: SDK.ServerAPI.API.GetLoaderFileInputAndOutput,
|
|
421
|
+
body: {
|
|
422
|
+
file: resource.path,
|
|
423
|
+
loader: loader.loader,
|
|
424
|
+
loaderIndex: loader.loaderIndex
|
|
300
425
|
},
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
style: {
|
|
310
|
-
padding: Size.BasePadding,
|
|
311
|
-
borderTop: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`,
|
|
312
|
-
borderBottom: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`
|
|
313
|
-
},
|
|
314
|
-
children: /*#__PURE__*/ jsx(Title, {
|
|
315
|
-
text: `the error stack of [${loader.loader}] ${loader.isPitch ? 'pitch' : ''}`
|
|
316
|
-
})
|
|
317
|
-
}),
|
|
318
|
-
/*#__PURE__*/ jsx("div", {
|
|
319
|
-
style: {
|
|
320
|
-
height: '90%'
|
|
321
|
-
},
|
|
322
|
-
children: /*#__PURE__*/ jsx(CodeViewer, {
|
|
323
|
-
code: loader.errors[0].message,
|
|
324
|
-
lang: "javascript"
|
|
325
|
-
})
|
|
326
|
-
})
|
|
327
|
-
]
|
|
328
|
-
}) : /*#__PURE__*/ jsxs(Col, {
|
|
329
|
-
span: 24,
|
|
330
|
-
style: {
|
|
331
|
-
height: '53%',
|
|
332
|
-
minHeight: 400
|
|
333
|
-
},
|
|
334
|
-
children: [
|
|
335
|
-
/*#__PURE__*/ jsxs("div", {
|
|
336
|
-
style: {
|
|
337
|
-
display: 'flex',
|
|
338
|
-
alignItems: 'center',
|
|
339
|
-
padding: Size.BasePadding,
|
|
340
|
-
borderBottom: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`
|
|
341
|
-
},
|
|
342
|
-
children: [
|
|
343
|
-
/*#__PURE__*/ jsx(Title, {
|
|
344
|
-
text: /*#__PURE__*/ jsxs(Fragment, {
|
|
345
|
-
children: [
|
|
346
|
-
`the result of [${loader.loader}] ${loader.isPitch ? 'pitch' : ''}`,
|
|
347
|
-
!loader.isPitch && /*#__PURE__*/ jsxs("span", {
|
|
348
|
-
style: {
|
|
349
|
-
fontWeight: 400
|
|
350
|
-
},
|
|
351
|
-
children: [
|
|
352
|
-
"(",
|
|
353
|
-
/*#__PURE__*/ jsx(input, {
|
|
354
|
-
style: {
|
|
355
|
-
verticalAlign: 'middle',
|
|
356
|
-
margin: '0 2px'
|
|
357
|
-
}
|
|
358
|
-
}),
|
|
359
|
-
"Input ⟷",
|
|
360
|
-
/*#__PURE__*/ jsx(output, {
|
|
361
|
-
style: {
|
|
362
|
-
verticalAlign: 'middle',
|
|
363
|
-
position: 'relative',
|
|
364
|
-
top: -2
|
|
365
|
-
}
|
|
366
|
-
}),
|
|
367
|
-
"Output)"
|
|
368
|
-
]
|
|
369
|
-
})
|
|
370
|
-
]
|
|
371
|
-
})
|
|
372
|
-
}),
|
|
373
|
-
/*#__PURE__*/ jsx("div", {
|
|
374
|
-
style: {
|
|
375
|
-
flex: 1
|
|
376
|
-
}
|
|
377
|
-
})
|
|
378
|
-
]
|
|
379
|
-
}),
|
|
380
|
-
loader.isPitch ? loader.result ? /*#__PURE__*/ jsx("div", {
|
|
381
|
-
style: {
|
|
382
|
-
height: '90%'
|
|
383
|
-
},
|
|
384
|
-
children: /*#__PURE__*/ jsx(CodeViewer, {
|
|
385
|
-
isEmbed: true,
|
|
386
|
-
code: loader.result,
|
|
387
|
-
filePath: resource.path
|
|
388
|
-
})
|
|
389
|
-
}) : /*#__PURE__*/ jsx(Empty, {
|
|
390
|
-
description: 'No loader result. If you use the Brief Mode, there will not have loader results.'
|
|
391
|
-
}) : /*#__PURE__*/ jsx("div", {
|
|
392
|
-
style: {
|
|
393
|
-
minHeight: '700px'
|
|
394
|
-
},
|
|
395
|
-
children: /*#__PURE__*/ jsx("div", {
|
|
396
|
-
style: {
|
|
397
|
-
height: '40rem',
|
|
398
|
-
overflow: 'hidden'
|
|
399
|
-
},
|
|
400
|
-
children: loader.result || before ? /*#__PURE__*/ jsx(DiffViewer, {
|
|
401
|
-
isEmbed: true,
|
|
402
|
-
original: before,
|
|
403
|
-
modified: loader.result || '',
|
|
404
|
-
originalFilePath: resource.path,
|
|
405
|
-
modifiedFilePath: resource.path
|
|
406
|
-
}) : /*#__PURE__*/ jsx(Empty, {
|
|
407
|
-
description: 'No loader result. If you use the Brief Mode, there will not have loader results.'
|
|
408
|
-
})
|
|
409
|
-
})
|
|
410
|
-
})
|
|
411
|
-
]
|
|
412
|
-
})
|
|
413
|
-
})
|
|
426
|
+
showSkeleton: false,
|
|
427
|
+
children: (codeData)=>/*#__PURE__*/ jsx(LoaderDetailsContent, {
|
|
428
|
+
loader: loader,
|
|
429
|
+
resource: resource,
|
|
430
|
+
isLight: isLight,
|
|
431
|
+
codeData: codeData
|
|
432
|
+
})
|
|
433
|
+
}) : null
|
|
414
434
|
}
|
|
415
435
|
],
|
|
416
436
|
onChange: onChange
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Loader/executions.mjs","sources":["../../../src/components/Loader/executions.tsx"],"sourcesContent":["import { ClockCircleTwoTone } from '@ant-design/icons';\nimport { SDK } from '@rsdoctor/types';\nimport {\n Col,\n Divider,\n Empty,\n List,\n Row,\n Space,\n Tabs,\n Tag,\n Timeline,\n Tooltip,\n Typography,\n} from 'antd';\nimport dayjs from 'dayjs';\nimport { PropsWithChildren, useCallback, useState } from 'react';\nimport InputIcon from 'src/common/svg/loader/input.svg';\nimport OutputIcon from 'src/common/svg/loader/output.svg';\nimport StepIcon from 'src/common/svg/loader/step.svg';\nimport { Size } from '../../constants';\nimport { beautifyPath, formatCosts, useTheme } from '../../utils';\nimport { CodeViewer, DiffViewer } from '../base';\nimport { Card } from '../Card';\nimport { CodeOpener } from '../Opener';\nimport { Title } from '../Title';\nimport styles from './Analysis/style.module.scss';\n\ninterface LoaderExecutionsProps {\n cwd: string;\n data: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileDetails>;\n index?: number;\n}\n\nconst LoaderPropsItem = ({\n loader,\n resource,\n cwd,\n}: {\n loader: SDK.LoaderTransformData & {\n costs: number;\n };\n resource: SDK.ResourceData;\n cwd: string;\n}): JSX.Element => {\n return (\n <Card\n title={'Loader Details'}\n style={{ border: 'none' }}\n extra={\n <Tag icon={<ClockCircleTwoTone />} color=\"default\">\n {dayjs(loader.startAt).format('YYYY-MM-DD HH:mm:ss')}\n </Tag>\n }\n >\n <Space direction=\"vertical\" style={{ width: '100%' }}>\n {loader.isPitch ? <Typography.Text code>pitch</Typography.Text> : null}\n <List size=\"large\" bordered>\n <List.Item>\n <Typography.Text strong>{'File Path'}</Typography.Text>\n <div>{beautifyPath(resource.path, cwd)}</div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Resource Path'}</Typography.Text>\n <CodeOpener cwd={cwd} url={resource.path} loc=\"\" disabled />\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Resource Query'}</Typography.Text>\n <div>{resource.queryRaw || '-'}</div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Duration'}</Typography.Text>\n <div>{formatCosts(loader.costs)}</div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Loader'}</Typography.Text>\n <div>\n <Typography.Text code>{loader.loader}</Typography.Text>\n </div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Loader Index'}</Typography.Text>\n <div>{`${loader.loaderIndex}`}</div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Loader Path'}</Typography.Text>\n <CodeOpener cwd={cwd} url={loader.path} loc=\"\" disabled />\n </List.Item>\n <List.Item>\n <div style={{ width: 180 }}>\n <Typography.Text strong>{'Options'}</Typography.Text>\n </div>\n <Divider type=\"vertical\" />\n <Typography.Paragraph\n ellipsis={{\n rows: 2,\n expandable: true,\n symbol: 'more',\n }}\n copyable\n >\n {JSON.stringify(loader.options || '-')}\n </Typography.Paragraph>\n </List.Item>\n </List>\n </Space>\n </Card>\n );\n};\n\nexport const LoaderExecutions = ({\n data,\n cwd,\n index,\n}: PropsWithChildren<LoaderExecutionsProps>): JSX.Element => {\n const { loaders, resource } = data;\n const [currentIndex, setCurrentIndex] = useState(index || 0);\n const { theme } = useTheme();\n const isLight = theme === 'light';\n const loader = loaders[currentIndex];\n const before = loader.input || '';\n const leftSpan = 5;\n const hasError = loader.errors && loader.errors.length;\n const [activeKey, setActiveKey] = useState('loaderDetails');\n const onChange = useCallback((key: string) => {\n setActiveKey(key);\n }, []);\n\n return (\n <Row className={styles.executions} style={{ height: '100%' }}>\n <Col\n span={leftSpan}\n style={{\n borderRight: isLight ? `1px solid #f0f0f0` : undefined,\n padding: Size.BasePadding,\n }}\n >\n <Space direction=\"vertical\" style={{ width: '100%' }}>\n <Title text=\"Executions\" />\n <Timeline mode=\"left\" style={{ marginTop: Size.BasePadding }}>\n {loaders.map((e, i, arr) => {\n const { loader, isPitch } = e;\n const costs = formatCosts(e.costs);\n return (\n <Timeline.Item\n dot={\n isPitch ? (\n <Tag style={{ marginLeft: 1, fontWeight: 500 }}>\n pitch\n </Tag>\n ) : (\n <ClockCircleTwoTone />\n )\n }\n style={{ paddingBottom: 10, textAlign: 'center' }}\n key={i}\n >\n <Row align=\"middle\" justify=\"space-between\" gutter={[0, 10]}>\n <Col span={24} className={styles.timeline}>\n <Tooltip title={loader} trigger=\"hover\">\n <div\n className={`${styles.box} ${currentIndex === i ? styles.selected : ''}`}\n onClick={() => {\n setCurrentIndex(i);\n }}\n style={{ textAlign: 'left' }}\n >\n <div>\n <Typography.Text style={{ color: '#000' }}>\n {costs.match(/[0-9]*\\.?[0-9]+/g)?.[0]}\n </Typography.Text>\n {` `}\n <Typography.Text\n style={{ color: 'rgba(0,0,0,0.45)' }}\n >\n {costs.match(/[a-zA-Z]+/g)}\n </Typography.Text>\n </div>\n <Typography.Text\n style={{ color: 'rgba(0,0,0,0.65)' }}\n className={styles.loader}\n >\n {loader}\n </Typography.Text>\n </div>\n </Tooltip>\n </Col>\n </Row>\n {i === arr.length - 1 ? null : (\n <div style={{ paddingTop: 10 }}>\n <StepIcon />\n </div>\n )}\n </Timeline.Item>\n );\n })}\n </Timeline>\n </Space>\n </Col>\n <Col span={24 - leftSpan} style={{ height: '100%' }}>\n <Tabs\n type=\"card\"\n defaultActiveKey=\"loaderDetails\"\n activeKey={activeKey}\n items={[\n {\n label: 'Loader Props',\n key: 'loaderProps',\n children: (\n <LoaderPropsItem\n loader={loader}\n resource={resource}\n cwd={cwd}\n />\n ),\n },\n {\n label: 'Loader Details',\n key: 'loaderDetails',\n children: (\n <div style={{ height: '100%' }}>\n {hasError ? (\n <Col span={24} style={{ height: '53%', minHeight: 400 }}>\n <div\n style={{\n padding: Size.BasePadding,\n borderTop: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`,\n borderBottom: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`,\n }}\n >\n <Title\n text={`the error stack of [${loader.loader}] ${loader.isPitch ? 'pitch' : ''}`}\n />\n </div>\n <div style={{ height: '90%' }}>\n <CodeViewer\n code={loader.errors[0].message}\n lang=\"javascript\"\n />\n </div>\n </Col>\n ) : (\n <Col span={24} style={{ height: '53%', minHeight: 400 }}>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n padding: Size.BasePadding,\n borderBottom: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`,\n }}\n >\n <Title\n text={\n <>\n {`the result of [${loader.loader}] ${loader.isPitch ? 'pitch' : ''}`}\n {!loader.isPitch && (\n <span style={{ fontWeight: 400 }}>\n (\n <InputIcon\n style={{\n verticalAlign: 'middle',\n margin: '0 2px',\n }}\n />\n Input ⟷\n <OutputIcon\n style={{\n verticalAlign: 'middle',\n position: 'relative',\n top: -2,\n }}\n />\n Output)\n </span>\n )}\n </>\n }\n />\n <div style={{ flex: 1 }} />\n </div>\n {loader.isPitch ? (\n loader.result ? (\n <div style={{ height: '90%' }}>\n <CodeViewer\n isEmbed\n code={loader.result}\n filePath={resource.path}\n />\n </div>\n ) : (\n <Empty\n description={\n 'No loader result. If you use the Brief Mode, there will not have loader results.'\n }\n />\n )\n ) : (\n <div style={{ minHeight: '700px' }}>\n <div style={{ height: '40rem', overflow: 'hidden' }}>\n {!loader.result && !before ? (\n <Empty\n description={\n 'No loader result. If you use the Brief Mode, there will not have loader results.'\n }\n />\n ) : (\n <DiffViewer\n isEmbed\n original={before}\n modified={loader.result || ''}\n originalFilePath={resource.path}\n modifiedFilePath={resource.path}\n />\n )}\n </div>\n </div>\n )}\n </Col>\n )}\n </div>\n ),\n },\n ]}\n onChange={onChange}\n />\n </Col>\n </Row>\n );\n};\n"],"names":["LoaderPropsItem","loader","resource","cwd","Card","Tag","ClockCircleTwoTone","dayjs","Space","Typography","List","beautifyPath","CodeOpener","formatCosts","Divider","JSON","LoaderExecutions","data","index","loaders","currentIndex","setCurrentIndex","useState","theme","useTheme","isLight","before","leftSpan","hasError","activeKey","setActiveKey","onChange","useCallback","key","Row","styles","Col","undefined","Size","Title","Timeline","e","i","arr","isPitch","costs","Tooltip","StepIcon","Tabs","CodeViewer","InputIcon","OutputIcon","Empty","DiffViewer"],"mappings":";;;;;;;;;;;;;;;AAkCA,MAAMA,kBAAkB,CAAC,EACvBC,MAAM,EACNC,QAAQ,EACRC,GAAG,EAOJ,GACQ,WAAP,GACE,IAACC,MAAIA;QACH,OAAO;QACP,OAAO;YAA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;oDACJ,oBACE;;4DACG,CAAC,eAAe,EAAEtC,OAAO,MAAM,CAAC,EAAE,EAAEA,OAAO,OAAO,GAAG,UAAU,IAAI;4DACnE,CAACA,OAAO,OAAO,IAAI,WAAJ,GACd,KAAC;gEAAK,OAAO;oEAAE,YAAY;gEAAI;;oEAAG;kFAEhC,IAACiD,OAASA;wEACR,OAAO;4EACL,eAAe;4EACf,QAAQ;wEACV;;oEACA;kFAEF,IAACC,QAAUA;wEACT,OAAO;4EACL,eAAe;4EACf,UAAU;4EACV,KAAK;wEACP;;oEACA;;;;;;8DAOZ,IAAC;oDAAI,OAAO;wDAAE,MAAM;oDAAE;;;;wCAEvBlD,OAAO,OAAO,GACbA,OAAO,MAAM,GAAG,WAAH,GACX,IAAC;4CAAI,OAAO;gDAAE,QAAQ;4CAAM;sDAC1B,kBAACgD,YAAUA;gDACT,SAAO;gDACP,MAAMhD,OAAO,MAAM;gDACnB,UAAUC,SAAS,IAAI;;2DAI3B,IAACkD,OAAKA;4CACJ,aACE;2DAKN,IAAC;4CAAI,OAAO;gDAAE,WAAW;4CAAQ;sDAC/B,kBAAC;gDAAI,OAAO;oDAAE,QAAQ;oDAAS,UAAU;gDAAS;0DAC/C,AAACnD,OAAO,MAAM,IAAKyB,S,cAOlB,IAAC2B,YAAUA;oDACT,SAAO;oDACP,UAAU3B;oDACV,UAAUzB,OAAO,MAAM,IAAI;oDAC3B,kBAAkBC,SAAS,IAAI;oDAC/B,kBAAkBA,SAAS,IAAI;qDAZN,WAATwB,GAClB,IAAC0B,OAAKA;oDACJ,aACE;;;;;;;wBAmBtB;qBACD;oBACD,UAAUrB;;;;;AAKpB"}
|
|
1
|
+
{"version":3,"file":"components/Loader/executions.mjs","sources":["../../../src/components/Loader/executions.tsx"],"sourcesContent":["import { ClockCircleTwoTone } from '@ant-design/icons';\nimport { SDK } from '@rsdoctor/types';\nimport {\n Col,\n Divider,\n Empty,\n List,\n Row,\n Space,\n Tabs,\n Tag,\n Timeline,\n Tooltip,\n Typography,\n} from 'antd';\nimport dayjs from 'dayjs';\nimport { PropsWithChildren, useCallback, useState } from 'react';\nimport InputIcon from 'src/common/svg/loader/input.svg';\nimport OutputIcon from 'src/common/svg/loader/output.svg';\nimport StepIcon from 'src/common/svg/loader/step.svg';\nimport { Size } from '../../constants';\nimport { beautifyPath, formatCosts, useTheme } from '../../utils';\nimport { CodeViewer, DiffViewer } from '../base';\nimport { Card } from '../Card';\nimport { CodeOpener } from '../Opener';\nimport { Title } from '../Title';\nimport { ServerAPIProvider } from '../Manifest';\nimport styles from './Analysis/style.module.scss';\n\ninterface LoaderExecutionsProps {\n cwd: string;\n data: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileDetails>;\n index?: number;\n}\n\nconst LoaderPropsItem = ({\n loader,\n resource,\n cwd,\n}: {\n loader: Omit<SDK.LoaderTransformData, 'input' | 'result'> & {\n costs: number;\n };\n resource: SDK.ResourceData;\n cwd: string;\n}): JSX.Element => {\n return (\n <Card\n title={'Loader Details'}\n style={{ border: 'none' }}\n extra={\n <Tag icon={<ClockCircleTwoTone />} color=\"default\">\n {dayjs(loader.startAt).format('YYYY-MM-DD HH:mm:ss')}\n </Tag>\n }\n >\n <Space direction=\"vertical\" style={{ width: '100%' }}>\n {loader.isPitch ? <Typography.Text code>pitch</Typography.Text> : null}\n <List size=\"large\" bordered>\n <List.Item>\n <Typography.Text strong>{'File Path'}</Typography.Text>\n <div>{beautifyPath(resource.path, cwd)}</div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Resource Path'}</Typography.Text>\n <CodeOpener cwd={cwd} url={resource.path} loc=\"\" disabled />\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Resource Query'}</Typography.Text>\n <div>{resource.queryRaw || '-'}</div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Duration'}</Typography.Text>\n <div>{formatCosts(loader.costs)}</div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Loader'}</Typography.Text>\n <div>\n <Typography.Text code>{loader.loader}</Typography.Text>\n </div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Loader Index'}</Typography.Text>\n <div>{`${loader.loaderIndex}`}</div>\n </List.Item>\n <List.Item>\n <Typography.Text strong>{'Loader Path'}</Typography.Text>\n <CodeOpener cwd={cwd} url={loader.path} loc=\"\" disabled />\n </List.Item>\n <List.Item>\n <div style={{ width: 180 }}>\n <Typography.Text strong>{'Options'}</Typography.Text>\n </div>\n <Divider type=\"vertical\" />\n <Typography.Paragraph\n ellipsis={{\n rows: 2,\n expandable: true,\n symbol: 'more',\n }}\n copyable\n >\n {JSON.stringify(loader.options || '-')}\n </Typography.Paragraph>\n </List.Item>\n </List>\n </Space>\n </Card>\n );\n};\n\n// Component to render Loader Details content with lazy-loaded code\nconst LoaderDetailsContent = ({\n loader,\n resource,\n isLight,\n codeData,\n}: {\n loader: Omit<SDK.LoaderTransformData, 'input' | 'result'> & { costs: number };\n resource: SDK.ResourceData;\n isLight: boolean;\n codeData: SDK.ServerAPI.InferResponseType<SDK.ServerAPI.API.GetLoaderFileInputAndOutput>;\n}): JSX.Element => {\n const hasError = loader.errors && loader.errors.length;\n const before = codeData?.input || '';\n const loaderResult = codeData?.output || '';\n\n return (\n <div style={{ height: '100%' }}>\n {hasError ? (\n <Col span={24} style={{ height: '53%', minHeight: 400 }}>\n <div\n style={{\n padding: Size.BasePadding,\n borderTop: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`,\n borderBottom: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`,\n }}\n >\n <Title\n text={`the error stack of [${loader.loader}] ${loader.isPitch ? 'pitch' : ''}`}\n />\n </div>\n <div style={{ height: '90%' }}>\n <CodeViewer code={loader.errors[0].message} lang=\"javascript\" />\n </div>\n </Col>\n ) : (\n <Col span={24} style={{ height: '53%', minHeight: 400 }}>\n <div\n style={{\n display: 'flex',\n alignItems: 'center',\n padding: Size.BasePadding,\n borderBottom: `1px solid ${isLight ? '#f0f0f0' : 'rgba(253, 253, 253, 0.12)'}`,\n }}\n >\n <Title\n text={\n <>\n {`the result of [${loader.loader}] ${loader.isPitch ? 'pitch' : ''}`}\n {!loader.isPitch && (\n <span style={{ fontWeight: 400 }}>\n (\n <InputIcon\n style={{\n verticalAlign: 'middle',\n margin: '0 2px',\n }}\n />\n Input ⟷\n <OutputIcon\n style={{\n verticalAlign: 'middle',\n position: 'relative',\n top: -2,\n }}\n />\n Output)\n </span>\n )}\n </>\n }\n />\n <div style={{ flex: 1 }} />\n </div>\n {loader.isPitch ? (\n loaderResult ? (\n <div style={{ height: '90%' }}>\n <CodeViewer\n isEmbed\n code={loaderResult}\n filePath={resource.path}\n />\n </div>\n ) : (\n <Empty\n description={\n 'No loader result. If you use the Brief Mode, there will not have loader results.'\n }\n />\n )\n ) : (\n <div style={{ minHeight: '700px' }}>\n <div style={{ height: '40rem', overflow: 'hidden' }}>\n {!loaderResult && !before ? (\n <Empty\n description={\n 'No loader result. If you use the Brief Mode, there will not have loader results.'\n }\n />\n ) : (\n <DiffViewer\n isEmbed\n original={before}\n modified={loaderResult || ''}\n originalFilePath={resource.path}\n modifiedFilePath={resource.path}\n />\n )}\n </div>\n </div>\n )}\n </Col>\n )}\n </div>\n );\n};\n\nexport const LoaderExecutions = ({\n data,\n cwd,\n index,\n}: PropsWithChildren<LoaderExecutionsProps>): JSX.Element => {\n const { loaders, resource } = data;\n const [currentIndex, setCurrentIndex] = useState(index || 0);\n const { theme } = useTheme();\n const isLight = theme === 'light';\n const loader = loaders[currentIndex];\n const leftSpan = 5;\n const [activeKey, setActiveKey] = useState('loaderDetails');\n const onChange = useCallback((key: string) => {\n setActiveKey(key);\n }, []);\n\n return (\n <Row className={styles.executions} style={{ height: '100%' }}>\n <Col\n span={leftSpan}\n style={{\n borderRight: isLight ? `1px solid #f0f0f0` : undefined,\n padding: Size.BasePadding,\n }}\n >\n <Space direction=\"vertical\" style={{ width: '100%' }}>\n <Title text=\"Executions\" />\n <Timeline mode=\"left\" style={{ marginTop: Size.BasePadding }}>\n {loaders.map((e, i, arr) => {\n const { loader, isPitch } = e;\n const costs = formatCosts(e.costs);\n return (\n <Timeline.Item\n dot={\n isPitch ? (\n <Tag style={{ marginLeft: 1, fontWeight: 500 }}>\n pitch\n </Tag>\n ) : (\n <ClockCircleTwoTone />\n )\n }\n style={{ paddingBottom: 10, textAlign: 'center' }}\n key={i}\n >\n <Row align=\"middle\" justify=\"space-between\" gutter={[0, 10]}>\n <Col span={24} className={styles.timeline}>\n <Tooltip title={loader} trigger=\"hover\">\n <div\n className={`${styles.box} ${currentIndex === i ? styles.selected : ''}`}\n onClick={() => {\n setCurrentIndex(i);\n }}\n style={{ textAlign: 'left' }}\n >\n <div>\n <Typography.Text style={{ color: '#000' }}>\n {costs.match(/[0-9]*\\.?[0-9]+/g)?.[0]}\n </Typography.Text>\n {` `}\n <Typography.Text\n style={{ color: 'rgba(0,0,0,0.45)' }}\n >\n {costs.match(/[a-zA-Z]+/g)}\n </Typography.Text>\n </div>\n <Typography.Text\n style={{ color: 'rgba(0,0,0,0.65)' }}\n className={styles.loader}\n >\n {loader}\n </Typography.Text>\n </div>\n </Tooltip>\n </Col>\n </Row>\n {i === arr.length - 1 ? null : (\n <div style={{ paddingTop: 10 }}>\n <StepIcon />\n </div>\n )}\n </Timeline.Item>\n );\n })}\n </Timeline>\n </Space>\n </Col>\n <Col span={24 - leftSpan} style={{ height: '100%' }}>\n <Tabs\n type=\"card\"\n defaultActiveKey=\"loaderDetails\"\n activeKey={activeKey}\n items={[\n {\n label: 'Loader Props',\n key: 'loaderProps',\n children: (\n <LoaderPropsItem\n loader={loader}\n resource={resource}\n cwd={cwd}\n />\n ),\n },\n {\n label: 'Loader Details',\n key: 'loaderDetails',\n children:\n activeKey === 'loaderDetails' ? (\n <ServerAPIProvider\n api={SDK.ServerAPI.API.GetLoaderFileInputAndOutput}\n body={{\n file: resource.path,\n loader: loader.loader,\n loaderIndex: loader.loaderIndex,\n }}\n showSkeleton={false}\n >\n {(codeData) => (\n <LoaderDetailsContent\n loader={loader}\n resource={resource}\n isLight={isLight}\n codeData={codeData}\n />\n )}\n </ServerAPIProvider>\n ) : null,\n },\n ]}\n onChange={onChange}\n />\n </Col>\n </Row>\n );\n};\n"],"names":["LoaderPropsItem","loader","resource","cwd","Card","Tag","ClockCircleTwoTone","dayjs","Space","Typography","List","beautifyPath","CodeOpener","formatCosts","Divider","JSON","LoaderDetailsContent","isLight","codeData","hasError","before","loaderResult","Col","Size","Title","CodeViewer","InputIcon","OutputIcon","Empty","DiffViewer","LoaderExecutions","data","index","loaders","currentIndex","setCurrentIndex","useState","theme","useTheme","leftSpan","activeKey","setActiveKey","onChange","useCallback","key","Row","styles","undefined","Timeline","e","i","arr","isPitch","costs","Tooltip","StepIcon","Tabs","ServerAPIProvider","SDK"],"mappings":";;;;;;;;;;;;;;;;;AAmCA,MAAMA,kBAAkB,CAAC,EACvBC,MAAM,EACNC,QAAQ,EACRC,GAAG,EAOJ,GACQ,WAAP,GACE,IAACC,MAAIA;QACH,OAAO;QACP,OAAO;YAAE,QAAQ;QAAO;QACxB,qBACE,IAACC,KAAGA;YAAC,oBAAM,IAACC,oBAAkBA,CAAAA;YAAK,OAAM;sBACtCC,MAAMN,OAAO,OAAO,EAAE,MAAM,CAAC;;kBAIlC,mBAACO,OAAKA;YAAC,WAAU;YAAW,OAAO;gBAAE,OAAO;YAAO;;gBAChDP,OAAO,OAAO,GAAG,WAAH,GAAG,IAACQ,WAAW,IAAI;oBAAC,MAAI;8BAAC;qBAA0B;8BAClE,KAACC,MAAIA;oBAAC,MAAK;oBAAQ,UAAQ;;sCACzB,KAACA,KAAK,IAAI;;8CACR,IAACD,WAAW,IAAI;oCAAC,QAAM;8CAAE;;8CACzB,IAAC;8CAAKE,aAAaT,SAAS,IAAI,EAAEC;;;;sCAEpC,KAACO,KAAK,IAAI;;8CACR,IAACD,WAAW,IAAI;oCAAC,QAAM;8CAAE;;8CACz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