github-issue-tower-defence-management 1.101.8 → 1.102.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/CHANGELOG.md +7 -0
- package/bin/adapter/entry-points/console/ui-dist/assets/index-CFGeqgfE.js +101 -0
- package/bin/adapter/entry-points/console/ui-dist/index.html +1 -1
- package/jest.config.js +15 -1
- package/package.json +3 -1
- package/src/adapter/entry-points/console/ui/src/features/console/lib/markdown.test.ts +10 -0
- package/src/adapter/entry-points/console/ui/src/features/console/lib/markdown.ts +9 -0
- package/src/adapter/entry-points/console/ui-dist/assets/index-CFGeqgfE.js +101 -0
- package/src/adapter/entry-points/console/ui-dist/index.html +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/index-_g2CqG11.js +0 -101
- package/src/adapter/entry-points/console/ui-dist/assets/index-_g2CqG11.js +0 -101
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>TDPM Console</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CFGeqgfE.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-ES6SLB1Y.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/jest.config.js
CHANGED
|
@@ -57,8 +57,22 @@ module.exports = {
|
|
|
57
57
|
},
|
|
58
58
|
},
|
|
59
59
|
],
|
|
60
|
+
'^.+\\.js$': [
|
|
61
|
+
'ts-jest',
|
|
62
|
+
{
|
|
63
|
+
tsconfig: {
|
|
64
|
+
allowJs: true,
|
|
65
|
+
esModuleInterop: true,
|
|
66
|
+
module: 'CommonJS',
|
|
67
|
+
moduleResolution: 'Node',
|
|
68
|
+
verbatimModuleSyntax: false,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
],
|
|
60
72
|
},
|
|
61
|
-
transformIgnorePatterns: [
|
|
73
|
+
transformIgnorePatterns: [
|
|
74
|
+
'/node_modules/(?!(marked|marked-emoji|gemoji)/)',
|
|
75
|
+
],
|
|
62
76
|
moduleNameMapper: {
|
|
63
77
|
'\\.(css|less|scss)$': '<rootDir>/jest.styleMock.js',
|
|
64
78
|
'^@/(.*)$': '<rootDir>/src/$1',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-issue-tower-defence-management",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.102.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -101,9 +101,11 @@
|
|
|
101
101
|
"commander": "^14.0.0",
|
|
102
102
|
"dompurify": "3.4.11",
|
|
103
103
|
"dotenv": "^17.0.0",
|
|
104
|
+
"gemoji": "8.1.0",
|
|
104
105
|
"googleapis": "^171.4.0",
|
|
105
106
|
"ky": "^2.0.0",
|
|
106
107
|
"marked": "12.0.2",
|
|
108
|
+
"marked-emoji": "2.0.3",
|
|
107
109
|
"typia": "^12.0.0",
|
|
108
110
|
"yaml": "^2.6.0"
|
|
109
111
|
}
|
|
@@ -44,6 +44,16 @@ describe('renderMarkdownToSafeHtml', () => {
|
|
|
44
44
|
it('returns an empty string for blank input', () => {
|
|
45
45
|
expect(renderMarkdownToSafeHtml(' ')).toBe('');
|
|
46
46
|
});
|
|
47
|
+
|
|
48
|
+
it('renders GitHub emoji shortcodes as Unicode emoji glyphs', () => {
|
|
49
|
+
const html = renderMarkdownToSafeHtml(':magic_wand: :sparkles: :rocket:');
|
|
50
|
+
expect(html).toContain('🪄');
|
|
51
|
+
expect(html).toContain('✨');
|
|
52
|
+
expect(html).toContain('🚀');
|
|
53
|
+
expect(html).not.toContain(':magic_wand:');
|
|
54
|
+
expect(html).not.toContain(':sparkles:');
|
|
55
|
+
expect(html).not.toContain(':rocket:');
|
|
56
|
+
});
|
|
47
57
|
});
|
|
48
58
|
|
|
49
59
|
describe('splitMarkdownSegments', () => {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import DOMPurify from 'dompurify';
|
|
2
|
+
import { nameToEmoji } from 'gemoji';
|
|
2
3
|
import { marked } from 'marked';
|
|
4
|
+
import { markedEmoji } from 'marked-emoji';
|
|
5
|
+
|
|
6
|
+
marked.use(
|
|
7
|
+
markedEmoji({
|
|
8
|
+
emojis: nameToEmoji,
|
|
9
|
+
renderer: (token) => token.emoji,
|
|
10
|
+
}),
|
|
11
|
+
);
|
|
3
12
|
|
|
4
13
|
export const renderMarkdownToSafeHtml = (source: string): string => {
|
|
5
14
|
const trimmed = source.trim();
|