matterbridge 3.4.2-dev-20251206-00998e1 → 3.4.3-dev-20251206-06686b7
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 +22 -0
- package/README-SERVICE-LOCAL.md +3 -3
- package/README-SERVICE-OPT.md +3 -5
- package/README.md +8 -14
- package/dist/cli.js +2 -0
- package/dist/matterbridge.js +8 -8
- package/frontend/build/assets/index.js +4 -4
- package/frontend/build/assets/vendor_mui.js +1 -1
- package/frontend/package.json +1 -1
- package/npm-shrinkwrap.json +8 -7
- package/package.json +3 -3
- package/scripts/marked.mjs +132 -0
- package/scripts/markedFooter.html +42 -0
- package/scripts/markedHeader.html +78 -0
package/frontend/package.json
CHANGED
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3-dev-20251206-06686b7",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "3.4.
|
|
9
|
+
"version": "3.4.3-dev-20251206-06686b7",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@matter/main": "0.15.6",
|
|
13
13
|
"archiver": "7.0.1",
|
|
14
|
-
"express": "5.1
|
|
14
|
+
"express": "5.2.1",
|
|
15
15
|
"glob": "13.0.0",
|
|
16
16
|
"multer": "2.0.2",
|
|
17
17
|
"node-ansi-logger": "3.1.1",
|
|
@@ -870,18 +870,19 @@
|
|
|
870
870
|
}
|
|
871
871
|
},
|
|
872
872
|
"node_modules/express": {
|
|
873
|
-
"version": "5.1
|
|
874
|
-
"resolved": "https://registry.npmjs.org/express/-/express-5.1.
|
|
875
|
-
"integrity": "sha512-
|
|
873
|
+
"version": "5.2.1",
|
|
874
|
+
"resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
|
|
875
|
+
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
|
|
876
876
|
"license": "MIT",
|
|
877
877
|
"dependencies": {
|
|
878
878
|
"accepts": "^2.0.0",
|
|
879
|
-
"body-parser": "^2.2.
|
|
879
|
+
"body-parser": "^2.2.1",
|
|
880
880
|
"content-disposition": "^1.0.0",
|
|
881
881
|
"content-type": "^1.0.5",
|
|
882
882
|
"cookie": "^0.7.1",
|
|
883
883
|
"cookie-signature": "^1.2.1",
|
|
884
884
|
"debug": "^4.4.0",
|
|
885
|
+
"depd": "^2.0.0",
|
|
885
886
|
"encodeurl": "^2.0.0",
|
|
886
887
|
"escape-html": "^1.0.3",
|
|
887
888
|
"etag": "^1.8.1",
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3-dev-20251206-06686b7",
|
|
4
4
|
"description": "Matterbridge plugin manager for Matter",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
-
"homepage": "https://
|
|
7
|
+
"homepage": "https://matterbridge.io/",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/Luligu/matterbridge.git"
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"@matter/main": "0.15.6",
|
|
107
107
|
"archiver": "7.0.1",
|
|
108
|
-
"express": "5.1
|
|
108
|
+
"express": "5.2.1",
|
|
109
109
|
"glob": "13.0.0",
|
|
110
110
|
"multer": "2.0.2",
|
|
111
111
|
"node-ansi-logger": "3.1.1",
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
import { Marked, TextRenderer } from 'marked';
|
|
7
|
+
|
|
8
|
+
const ROOT_DIR = fileURLToPath(new URL('.', import.meta.url));
|
|
9
|
+
const MD_DIR = join(ROOT_DIR, '..');
|
|
10
|
+
console.log(`Generating marked HTML files from ${MD_DIR}`);
|
|
11
|
+
const DOCS_DIR = join(ROOT_DIR, '..', 'docs');
|
|
12
|
+
console.log(`Generating marked HTML files in ${DOCS_DIR}`);
|
|
13
|
+
const HEADER_PATH = join(ROOT_DIR, 'markedHeader.html');
|
|
14
|
+
const FOOTER_PATH = join(ROOT_DIR, 'markedFooter.html');
|
|
15
|
+
|
|
16
|
+
const HEADING_FALLBACK_PREFIX = 'heading';
|
|
17
|
+
|
|
18
|
+
const slugifyHeading = (text) => {
|
|
19
|
+
const normalized = text
|
|
20
|
+
.normalize('NFKD')
|
|
21
|
+
.replace(/[\u0300-\u036f]/gu, '')
|
|
22
|
+
.toLowerCase();
|
|
23
|
+
|
|
24
|
+
return normalized
|
|
25
|
+
.replace(/[^a-z0-9\s-]/g, '')
|
|
26
|
+
.trim()
|
|
27
|
+
.replace(/[\s_-]+/g, '-')
|
|
28
|
+
.replace(/^-+|-+$/g, '');
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const createSlugGenerator = () => {
|
|
32
|
+
const counts = new Map();
|
|
33
|
+
|
|
34
|
+
return (rawText) => {
|
|
35
|
+
const base = slugifyHeading(rawText) || HEADING_FALLBACK_PREFIX;
|
|
36
|
+
const usage = counts.get(base) ?? 0;
|
|
37
|
+
counts.set(base, usage + 1);
|
|
38
|
+
return usage > 0 ? `${base}-${usage}` : base;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const createMarkdownParser = () => {
|
|
43
|
+
const textRenderer = new TextRenderer();
|
|
44
|
+
const nextSlug = createSlugGenerator();
|
|
45
|
+
|
|
46
|
+
return new Marked({
|
|
47
|
+
gfm: true,
|
|
48
|
+
mangle: false,
|
|
49
|
+
renderer: {
|
|
50
|
+
heading(token) {
|
|
51
|
+
const inlineHtml = this.parser.parseInline(token.tokens);
|
|
52
|
+
const plainText = this.parser.parseInline(token.tokens, textRenderer).trim();
|
|
53
|
+
const slug = nextSlug(plainText);
|
|
54
|
+
return `<h${token.depth} id="${slug}">${inlineHtml}</h${token.depth}>\n`;
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// Replicates marked.ps1 targets for cross-platform doc generation.
|
|
61
|
+
const FILES_TO_RENDER = [
|
|
62
|
+
{ source: 'README-DEV.md', target: 'README-DEV.html' },
|
|
63
|
+
{ source: 'README-DOCKER.md', target: 'README-DOCKER.html' },
|
|
64
|
+
{ source: 'README-MACOS-PLIST.md', target: 'README-MACOS-PLIST.html' },
|
|
65
|
+
{ source: 'README-NGINX.md', target: 'README-NGINX.html' },
|
|
66
|
+
{ source: 'README-PODMAN.md', target: 'README-PODMAN.html' },
|
|
67
|
+
{ source: 'README-SERVICE-LOCAL.md', target: 'README-SERVICE-LOCAL.html' },
|
|
68
|
+
{ source: 'README-SERVICE-OPT.md', target: 'README-SERVICE-OPT.html' },
|
|
69
|
+
{ source: 'README-SERVICE.md', target: 'README-SERVICE.html' },
|
|
70
|
+
{ source: 'README.md', target: 'README.html' },
|
|
71
|
+
{ source: 'CHANGELOG.md', target: 'CHANGELOG.html' },
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Render configured markdown documents with the shared header and footer.
|
|
76
|
+
*
|
|
77
|
+
* @param {string} header HTML header template.
|
|
78
|
+
* @param {string} footer HTML footer template.
|
|
79
|
+
* @returns {Promise<void>} Resolves once all files are written.
|
|
80
|
+
*/
|
|
81
|
+
async function renderMarkdownFiles(header, footer) {
|
|
82
|
+
for (const { source, target } of FILES_TO_RENDER) {
|
|
83
|
+
const markdownPath = join(MD_DIR, source);
|
|
84
|
+
const targetPath = join(DOCS_DIR, target);
|
|
85
|
+
const markdown = await readFile(markdownPath, 'utf8');
|
|
86
|
+
const parser = createMarkdownParser();
|
|
87
|
+
const body = await parser.parse(markdown);
|
|
88
|
+
|
|
89
|
+
await writeFile(targetPath, `${header}${body}${footer}`, 'utf8');
|
|
90
|
+
console.log(`Rendered ${source} to ${target}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Apply post-processing replacements to generated HTML files.
|
|
96
|
+
*
|
|
97
|
+
* @param {string[]} htmlFiles HTML files to update.
|
|
98
|
+
* @returns {Promise<void>} Resolves when replacements are applied.
|
|
99
|
+
*/
|
|
100
|
+
async function applyReplacements(htmlFiles) {
|
|
101
|
+
for (const filePath of htmlFiles) {
|
|
102
|
+
const originalContent = await readFile(filePath, 'utf8');
|
|
103
|
+
let updatedContent = originalContent.replace(/\.md/g, '.html');
|
|
104
|
+
updatedContent = updatedContent.replace(/→/g, '->');
|
|
105
|
+
updatedContent = updatedContent.replace(/Γ£à/g, '✔');
|
|
106
|
+
|
|
107
|
+
if (updatedContent !== originalContent) {
|
|
108
|
+
await writeFile(filePath, updatedContent, 'utf8');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Build HTML documentation mirroring the original PowerShell workflow.
|
|
115
|
+
*
|
|
116
|
+
* @returns {Promise<void>} Resolves on success.
|
|
117
|
+
*/
|
|
118
|
+
async function main() {
|
|
119
|
+
const header = await readFile(HEADER_PATH, 'utf8');
|
|
120
|
+
const footer = await readFile(FOOTER_PATH, 'utf8');
|
|
121
|
+
|
|
122
|
+
await renderMarkdownFiles(header, footer);
|
|
123
|
+
|
|
124
|
+
const htmlFiles = FILES_TO_RENDER.map(({ target }) => join(DOCS_DIR, target));
|
|
125
|
+
await applyReplacements(htmlFiles);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
main().catch((error) => {
|
|
129
|
+
const message = error instanceof Error ? (error.stack ?? error.message) : String(error);
|
|
130
|
+
process.stderr.write(`Failed to generate marked HTML files: ${message}\n`);
|
|
131
|
+
process.exitCode = 1;
|
|
132
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
const copyIcon = '<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M11 1H3c-.6 0-1 .4-1 1v10h2V3h7V1zm2 3H6c-.6 0-1 .4-1 1v10c0 .6.4 1 1 1h7c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1zm-1 10H7V6h5v8z"></path></svg>';
|
|
3
|
+
const successIcon = '<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path d="M6.5 10.7L4.3 8.5 3 9.8l3.5 3.5 6.5-6.5-1.3-1.3z"></path></svg>';
|
|
4
|
+
|
|
5
|
+
document.querySelectorAll('pre').forEach(block => {
|
|
6
|
+
const button = document.createElement('button');
|
|
7
|
+
button.type = 'button';
|
|
8
|
+
button.className = 'copy-btn';
|
|
9
|
+
button.setAttribute('aria-label', 'Copy code snippet');
|
|
10
|
+
button.innerHTML = copyIcon;
|
|
11
|
+
|
|
12
|
+
let resetTimer;
|
|
13
|
+
button.addEventListener('click', async () => {
|
|
14
|
+
const code = block.querySelector('code')?.innerText ?? '';
|
|
15
|
+
try {
|
|
16
|
+
await navigator.clipboard.writeText(code);
|
|
17
|
+
} catch {
|
|
18
|
+
const textarea = document.createElement('textarea');
|
|
19
|
+
textarea.value = code;
|
|
20
|
+
textarea.style.position = 'fixed';
|
|
21
|
+
textarea.style.opacity = '0';
|
|
22
|
+
document.body.appendChild(textarea);
|
|
23
|
+
textarea.focus();
|
|
24
|
+
textarea.select();
|
|
25
|
+
document.execCommand('copy');
|
|
26
|
+
textarea.remove();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
clearTimeout(resetTimer);
|
|
30
|
+
button.innerHTML = successIcon;
|
|
31
|
+
button.classList.add('copied');
|
|
32
|
+
resetTimer = setTimeout(() => {
|
|
33
|
+
button.innerHTML = copyIcon;
|
|
34
|
+
button.classList.remove('copied');
|
|
35
|
+
}, 2000);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
block.appendChild(button);
|
|
39
|
+
});
|
|
40
|
+
</script>
|
|
41
|
+
</body>
|
|
42
|
+
</html>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Matterbridge</title>
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="matterbridge.svg">
|
|
7
|
+
<style>
|
|
8
|
+
body {
|
|
9
|
+
font-family: Roboto, Arial, 'Helvetica Neue', sans-serif;
|
|
10
|
+
line-height: 1.6;
|
|
11
|
+
margin: 40px;
|
|
12
|
+
}
|
|
13
|
+
h1, h2, h3 {
|
|
14
|
+
font-family: 'Roboto Slab', Roboto, Arial, 'Helvetica Neue', sans-serif;
|
|
15
|
+
color: #263238;
|
|
16
|
+
scroll-margin-top: 90px;
|
|
17
|
+
margin-top: 2.5rem;
|
|
18
|
+
margin-bottom: 1rem;
|
|
19
|
+
}
|
|
20
|
+
h1 {
|
|
21
|
+
font-size: 2.4rem;
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
letter-spacing: -0.01em;
|
|
24
|
+
position: relative;
|
|
25
|
+
padding-bottom: 1.1rem;
|
|
26
|
+
}
|
|
27
|
+
h2 {
|
|
28
|
+
font-size: 1.8rem;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
border-bottom: 2px solid #e0e0e0;
|
|
31
|
+
padding-bottom: 0.35rem;
|
|
32
|
+
color: #41535b;
|
|
33
|
+
}
|
|
34
|
+
h3 {
|
|
35
|
+
font-size: 1.10rem;
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
text-transform: uppercase;
|
|
38
|
+
letter-spacing: 0.06em;
|
|
39
|
+
color: #455a64;
|
|
40
|
+
}
|
|
41
|
+
pre {
|
|
42
|
+
background: #e4e7ec;
|
|
43
|
+
color: #000000;
|
|
44
|
+
padding: 10px 56px 10px 10px;
|
|
45
|
+
border-radius: 0.5rem;
|
|
46
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
47
|
+
font-size: 0.875rem;
|
|
48
|
+
margin: 10px 20px 10px 0px;
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
.copy-btn {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
width: 24px;
|
|
56
|
+
height: 24px;
|
|
57
|
+
padding: 0;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
border: none;
|
|
60
|
+
border-radius: 4px;
|
|
61
|
+
background: #eee;
|
|
62
|
+
color: #333;
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 8px;
|
|
65
|
+
right: 8px;
|
|
66
|
+
transition: color 0.2s ease;
|
|
67
|
+
}
|
|
68
|
+
.copy-btn svg {
|
|
69
|
+
width: 16px;
|
|
70
|
+
height: 16px;
|
|
71
|
+
fill: currentColor;
|
|
72
|
+
}
|
|
73
|
+
.copy-btn.copied {
|
|
74
|
+
color: #1b5e20;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
77
|
+
</head>
|
|
78
|
+
<body>
|