@goshenkata/dryscan-cli 1.3.0 → 1.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/templates/report.hbs +38 -5
- package/package.json +2 -2
|
@@ -5,7 +5,24 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>DryScan Duplicates</title>
|
|
7
7
|
<link id="hljs-theme" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
|
|
8
|
-
<
|
|
8
|
+
<style>
|
|
9
|
+
/* Minimal line numbers styling */
|
|
10
|
+
.hljs.line-numbers {
|
|
11
|
+
padding-left: 3em;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
.hljs.line-numbers::before {
|
|
15
|
+
content: attr(data-line-numbers);
|
|
16
|
+
position: absolute;
|
|
17
|
+
left: 0;
|
|
18
|
+
top: 0;
|
|
19
|
+
color: var(--muted);
|
|
20
|
+
font-size: 0.85em;
|
|
21
|
+
line-height: inherit;
|
|
22
|
+
padding-right: 0.5em;
|
|
23
|
+
border-right: 1px solid var(--border);
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
9
26
|
<style>
|
|
10
27
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');
|
|
11
28
|
:root {
|
|
@@ -223,7 +240,6 @@
|
|
|
223
240
|
<script id="dup-data" type="application/json">{{{duplicatesJson}}}</script>
|
|
224
241
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
|
225
242
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/java.min.js"></script>
|
|
226
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>
|
|
227
243
|
<div id="loading-indicator" style="display: none; text-align: center; padding: 20px; color: var(--muted);">Loading more...</div>
|
|
228
244
|
<script type="module">
|
|
229
245
|
const dataEl = document.getElementById('dup-data');
|
|
@@ -285,7 +301,13 @@
|
|
|
285
301
|
container.appendChild(renderGroup(group, idx));
|
|
286
302
|
});
|
|
287
303
|
hljs.highlightAll();
|
|
288
|
-
document.querySelectorAll('code.
|
|
304
|
+
document.querySelectorAll('pre > code.line-numbers').forEach(el => {
|
|
305
|
+
try {
|
|
306
|
+
hljs.lineNumbersBlock(el);
|
|
307
|
+
} catch (err) {
|
|
308
|
+
console.warn('Could not apply line numbers to code block:', err);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
289
311
|
};
|
|
290
312
|
|
|
291
313
|
const loadMore = async () => {
|
|
@@ -320,7 +342,14 @@
|
|
|
320
342
|
});
|
|
321
343
|
|
|
322
344
|
hljs.highlightAll();
|
|
323
|
-
|
|
345
|
+
// Only apply line numbers to code elements that have line-numbers class and are in pre tags
|
|
346
|
+
document.querySelectorAll('pre > code.line-numbers').forEach(el => {
|
|
347
|
+
try {
|
|
348
|
+
hljs.lineNumbersBlock(el);
|
|
349
|
+
} catch (err) {
|
|
350
|
+
console.warn('Could not apply line numbers to code block:', err);
|
|
351
|
+
}
|
|
352
|
+
});
|
|
324
353
|
} catch (err) {
|
|
325
354
|
console.error('Error loading more duplicates:', err);
|
|
326
355
|
toast('Failed to load more duplicates');
|
|
@@ -457,7 +486,11 @@
|
|
|
457
486
|
modal.classList.add('active');
|
|
458
487
|
return;
|
|
459
488
|
}
|
|
460
|
-
|
|
489
|
+
try {
|
|
490
|
+
hljs.lineNumbersBlock(modalCode);
|
|
491
|
+
} catch (err) {
|
|
492
|
+
console.warn('Could not apply line numbers to modal code block:', err);
|
|
493
|
+
}
|
|
461
494
|
modalTitle.textContent = data.path;
|
|
462
495
|
modalCode.textContent = data.content;
|
|
463
496
|
modalCode.className = languageClass(data.path) + ' hljs line-numbers';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goshenkata/dryscan-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "CLI tool for DryScan - semantic code duplication analyzer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"url": "https://github.com/Goshenkata/DryScan.git"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@goshenkata/dryscan-core": "^1.
|
|
33
|
+
"@goshenkata/dryscan-core": "^1.4.0",
|
|
34
34
|
"commander": "^14.0.2",
|
|
35
35
|
"handlebars": "^4.7.8"
|
|
36
36
|
},
|