matterbridge 2.1.6-dev.6 → 2.1.6-dev.7
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 +9 -3
- package/README.md +1 -0
- package/dist/frontend.js +2 -2
- package/dist/matterbridge.js +2 -16
- package/dist/matterbridgePlatform.js +2 -6
- package/dist/pluginManager.js +0 -2
- package/dist/utils/copyDirectory.js +26 -0
- package/dist/utils/createZip.js +69 -0
- package/dist/utils/deepCopy.js +35 -0
- package/dist/utils/deepEqual.js +56 -0
- package/dist/utils/export.js +6 -1
- package/dist/utils/network.js +143 -0
- package/dist/utils/wait.js +57 -0
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.438c6c47.js → main.82e3eb54.js} +4 -4
- package/frontend/build/static/js/{main.438c6c47.js.map → main.82e3eb54.js.map} +1 -1
- package/npm-shrinkwrap.json +8 -8
- package/package.json +3 -3
- package/dist/utils/utils.js +0 -367
- /package/frontend/build/static/js/{main.438c6c47.js.LICENSE.txt → main.82e3eb54.js.LICENSE.txt} +0 -0
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "2.1.6-dev.
|
|
3
|
+
"version": "2.1.6-dev.7",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "2.1.6-dev.
|
|
9
|
+
"version": "2.1.6-dev.7",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@matter/main": "^0.12.4-alpha.0-20250217-b0bba5179",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"express": "4.21.2",
|
|
15
15
|
"glob": "11.0.1",
|
|
16
16
|
"https": "1.0.0",
|
|
17
|
-
"node-ansi-logger": "3.0.
|
|
17
|
+
"node-ansi-logger": "3.0.1",
|
|
18
18
|
"node-persist-manager": "1.0.8",
|
|
19
19
|
"ws": "8.18.0"
|
|
20
20
|
},
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"matterbridge": "dist/cli.js"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
|
-
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0
|
|
25
|
+
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
|
|
26
26
|
},
|
|
27
27
|
"funding": {
|
|
28
28
|
"type": "buymeacoffee",
|
|
@@ -1278,12 +1278,12 @@
|
|
|
1278
1278
|
}
|
|
1279
1279
|
},
|
|
1280
1280
|
"node_modules/node-ansi-logger": {
|
|
1281
|
-
"version": "3.0.
|
|
1282
|
-
"resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.0.
|
|
1283
|
-
"integrity": "sha512-
|
|
1281
|
+
"version": "3.0.1",
|
|
1282
|
+
"resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.0.1.tgz",
|
|
1283
|
+
"integrity": "sha512-Nx7nkO6Sby8Eti1UFFdff3gImEC35izuvf+aRFh3mrDZ8hgXM/cZdflkpDMnDdxnabYl91LVi4RhB/dm5Yk9iA==",
|
|
1284
1284
|
"license": "MIT",
|
|
1285
1285
|
"engines": {
|
|
1286
|
-
"node": "18.
|
|
1286
|
+
"node": ">=18.0.0"
|
|
1287
1287
|
},
|
|
1288
1288
|
"funding": {
|
|
1289
1289
|
"type": "buymeacoffee",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "2.1.6-dev.
|
|
3
|
+
"version": "2.1.6-dev.7",
|
|
4
4
|
"description": "Matterbridge plugin manager for Matter",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"matterbridge": "dist/cli.js"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
|
-
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0
|
|
48
|
+
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
|
|
49
49
|
},
|
|
50
50
|
"exports": {
|
|
51
51
|
".": {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"express": "4.21.2",
|
|
100
100
|
"glob": "11.0.1",
|
|
101
101
|
"https": "1.0.0",
|
|
102
|
-
"node-ansi-logger": "3.0.
|
|
102
|
+
"node-ansi-logger": "3.0.1",
|
|
103
103
|
"node-persist-manager": "1.0.8",
|
|
104
104
|
"ws": "8.18.0"
|
|
105
105
|
}
|
package/dist/utils/utils.js
DELETED
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
import os from 'node:os';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { AnsiLogger, idn, rs } from '../logger/export.js';
|
|
4
|
-
const log = new AnsiLogger({ logName: 'MatterbridgeUtils', logTimestampFormat: 4, logLevel: "info" });
|
|
5
|
-
export function deepEqual(a, b, excludeProperties = []) {
|
|
6
|
-
const debug = false;
|
|
7
|
-
const debugLog = (...messages) => {
|
|
8
|
-
if (debug) {
|
|
9
|
-
console.log(...messages);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
if (a === b) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
if (typeof a !== typeof b) {
|
|
16
|
-
debugLog(`deepEqual false for typeof a: ${typeof a} typeof b: ${typeof b}`);
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
if (a == null || b == null) {
|
|
20
|
-
debugLog('deepEqual false for == null');
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
24
|
-
if (a.length !== b.length) {
|
|
25
|
-
debugLog(`deepEqual false for array a.length(${a.length}) !== b.length(${b.length})`);
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
for (let i = 0; i < a.length; i++) {
|
|
29
|
-
if (!deepEqual(a[i], b[i], excludeProperties)) {
|
|
30
|
-
debugLog('deepEqual false for array !deepEqual(a[i], b[i])');
|
|
31
|
-
debugLog(`- aProps.length(${a[i]}):`, a[i]);
|
|
32
|
-
debugLog(`- bProps.length(${b[i]}):`, b[i]);
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
if (typeof a === 'object' && typeof b === 'object') {
|
|
39
|
-
const aProps = Object.getOwnPropertyNames(a).filter((prop) => !excludeProperties.includes(prop));
|
|
40
|
-
const bProps = Object.getOwnPropertyNames(b).filter((prop) => !excludeProperties.includes(prop));
|
|
41
|
-
if (aProps.length !== bProps.length) {
|
|
42
|
-
debugLog(`deepEqual false for aProps.length(${aProps.length}) !== bProps.length(${bProps.length})`);
|
|
43
|
-
debugLog(`- aProps.length(${aProps.length}):`, aProps);
|
|
44
|
-
debugLog(`- bProps.length(${bProps.length}):`, bProps);
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
for (const prop of aProps) {
|
|
48
|
-
if (!Object.prototype.hasOwnProperty.call(b, prop)) {
|
|
49
|
-
debugLog(`deepEqual false for !b.hasOwnProperty(${prop})`);
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
if (!deepEqual(a[prop], b[prop], excludeProperties)) {
|
|
53
|
-
debugLog(`deepEqual false for !deepEqual(a[${prop}], b[${prop}])`);
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
return false;
|
|
60
|
-
}
|
|
61
|
-
export function deepCopy(value) {
|
|
62
|
-
if (typeof value !== 'object' || value === null) {
|
|
63
|
-
return value;
|
|
64
|
-
}
|
|
65
|
-
else if (Array.isArray(value)) {
|
|
66
|
-
return value.map((item) => deepCopy(item));
|
|
67
|
-
}
|
|
68
|
-
else if (value instanceof Date) {
|
|
69
|
-
return new Date(value.getTime());
|
|
70
|
-
}
|
|
71
|
-
else if (value instanceof Map) {
|
|
72
|
-
const mapCopy = new Map();
|
|
73
|
-
value.forEach((val, key) => {
|
|
74
|
-
mapCopy.set(key, deepCopy(val));
|
|
75
|
-
});
|
|
76
|
-
return mapCopy;
|
|
77
|
-
}
|
|
78
|
-
else if (value instanceof Set) {
|
|
79
|
-
const setCopy = new Set();
|
|
80
|
-
value.forEach((item) => {
|
|
81
|
-
setCopy.add(deepCopy(item));
|
|
82
|
-
});
|
|
83
|
-
return setCopy;
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
const proto = Object.getPrototypeOf(value);
|
|
87
|
-
const copy = Object.create(proto);
|
|
88
|
-
for (const key in value) {
|
|
89
|
-
if (Object.prototype.hasOwnProperty.call(value, key)) {
|
|
90
|
-
copy[key] = deepCopy(value[key]);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return copy;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
export function getIpv4InterfaceAddress() {
|
|
97
|
-
let ipv4Address;
|
|
98
|
-
const networkInterfaces = os.networkInterfaces();
|
|
99
|
-
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
100
|
-
if (!interfaceDetails) {
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
for (const detail of interfaceDetails) {
|
|
104
|
-
if (detail.family === 'IPv4' && !detail.internal && ipv4Address === undefined) {
|
|
105
|
-
ipv4Address = detail.address;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (ipv4Address !== undefined) {
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return ipv4Address;
|
|
113
|
-
}
|
|
114
|
-
export function getIpv6InterfaceAddress() {
|
|
115
|
-
let ipv6Address;
|
|
116
|
-
const networkInterfaces = os.networkInterfaces();
|
|
117
|
-
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
118
|
-
if (!interfaceDetails) {
|
|
119
|
-
break;
|
|
120
|
-
}
|
|
121
|
-
for (const detail of interfaceDetails) {
|
|
122
|
-
if (detail.family === 'IPv6' && !detail.internal && ipv6Address === undefined) {
|
|
123
|
-
ipv6Address = detail.address;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (ipv6Address !== undefined) {
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return ipv6Address;
|
|
131
|
-
}
|
|
132
|
-
export function getMacAddress() {
|
|
133
|
-
let macAddress;
|
|
134
|
-
const networkInterfaces = os.networkInterfaces();
|
|
135
|
-
for (const interfaceDetails of Object.values(networkInterfaces)) {
|
|
136
|
-
if (!interfaceDetails) {
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
for (const detail of interfaceDetails) {
|
|
140
|
-
if (detail.family === 'IPv6' && !detail.internal && macAddress === undefined) {
|
|
141
|
-
macAddress = detail.mac;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
if (macAddress !== undefined) {
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return macAddress;
|
|
149
|
-
}
|
|
150
|
-
export function logInterfaces(debug = true) {
|
|
151
|
-
log.logLevel = "info";
|
|
152
|
-
log.logName = 'LogInterfaces';
|
|
153
|
-
let ipv6Address;
|
|
154
|
-
const networkInterfaces = os.networkInterfaces();
|
|
155
|
-
if (debug)
|
|
156
|
-
log.info('Available Network Interfaces:');
|
|
157
|
-
for (const [interfaceName, networkInterface] of Object.entries(networkInterfaces)) {
|
|
158
|
-
if (!networkInterface)
|
|
159
|
-
break;
|
|
160
|
-
if (debug)
|
|
161
|
-
log.info(`Interface: ${idn}${interfaceName}${rs}`);
|
|
162
|
-
for (const detail of networkInterface) {
|
|
163
|
-
if (debug)
|
|
164
|
-
log.info('Details:', detail);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return ipv6Address;
|
|
168
|
-
}
|
|
169
|
-
export async function waiter(name, check, exitWithReject = false, resolveTimeout = 5000, resolveInterval = 500, debug = false) {
|
|
170
|
-
log.logLevel = "debug";
|
|
171
|
-
log.logName = 'Waiter';
|
|
172
|
-
if (debug)
|
|
173
|
-
log.debug(`Waiter "${name}" started...`);
|
|
174
|
-
return new Promise((resolve, reject) => {
|
|
175
|
-
const timeoutId = setTimeout(() => {
|
|
176
|
-
if (debug)
|
|
177
|
-
log.debug(`Waiter "${name}" finished for timeout...`);
|
|
178
|
-
clearTimeout(timeoutId);
|
|
179
|
-
clearInterval(intervalId);
|
|
180
|
-
if (exitWithReject)
|
|
181
|
-
reject(new Error(`Waiter "${name}" finished due to timeout`));
|
|
182
|
-
else
|
|
183
|
-
resolve(false);
|
|
184
|
-
}, resolveTimeout);
|
|
185
|
-
const intervalId = setInterval(() => {
|
|
186
|
-
if (check()) {
|
|
187
|
-
if (debug)
|
|
188
|
-
log.debug(`Waiter "${name}" finished for true condition...`);
|
|
189
|
-
clearTimeout(timeoutId);
|
|
190
|
-
clearInterval(intervalId);
|
|
191
|
-
resolve(true);
|
|
192
|
-
}
|
|
193
|
-
}, resolveInterval);
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
export async function wait(timeout = 1000, name, debug = false) {
|
|
197
|
-
log.logLevel = "debug";
|
|
198
|
-
log.logName = 'Wait';
|
|
199
|
-
if (debug)
|
|
200
|
-
log.debug(`Wait "${name}" started...`);
|
|
201
|
-
return new Promise((resolve, reject) => {
|
|
202
|
-
const timeoutId = setTimeout(() => {
|
|
203
|
-
if (debug)
|
|
204
|
-
log.debug(`Wait "${name}" finished...`);
|
|
205
|
-
clearTimeout(timeoutId);
|
|
206
|
-
resolve();
|
|
207
|
-
}, timeout);
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
export async function createZip(outputPath, ...sourcePaths) {
|
|
211
|
-
const { default: archiver } = await import('archiver');
|
|
212
|
-
const { glob } = await import('glob');
|
|
213
|
-
const { createWriteStream, statSync } = await import('node:fs');
|
|
214
|
-
log.logLevel = "info";
|
|
215
|
-
log.logName = 'Archive';
|
|
216
|
-
log.debug(`creating archive ${outputPath} from ${sourcePaths.join(', ')} ...`);
|
|
217
|
-
return new Promise((resolve, reject) => {
|
|
218
|
-
const output = createWriteStream(outputPath);
|
|
219
|
-
const archive = archiver('zip', {
|
|
220
|
-
zlib: { level: 9 },
|
|
221
|
-
});
|
|
222
|
-
output.on('close', () => {
|
|
223
|
-
log.debug(`archive ${outputPath} closed with ${archive.pointer()} total bytes`);
|
|
224
|
-
resolve(archive.pointer());
|
|
225
|
-
});
|
|
226
|
-
output.on('end', () => {
|
|
227
|
-
log.debug(`archive ${outputPath} data has been drained ${archive.pointer()} total bytes`);
|
|
228
|
-
});
|
|
229
|
-
archive.on('error', (error) => {
|
|
230
|
-
log.error(`archive error: ${error.message}`);
|
|
231
|
-
reject(error);
|
|
232
|
-
});
|
|
233
|
-
archive.on('warning', (error) => {
|
|
234
|
-
if (error.code === 'ENOENT') {
|
|
235
|
-
log.warn(`archive warning: ${error.message}`);
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
log.error(`archive warning: ${error.message}`);
|
|
239
|
-
reject(error);
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
archive.on('entry', (entry) => {
|
|
243
|
-
log.debug(`- archive entry: ${entry.name}`);
|
|
244
|
-
});
|
|
245
|
-
archive.pipe(output);
|
|
246
|
-
for (const sourcePath of sourcePaths) {
|
|
247
|
-
let stats;
|
|
248
|
-
try {
|
|
249
|
-
stats = statSync(sourcePath);
|
|
250
|
-
}
|
|
251
|
-
catch (error) {
|
|
252
|
-
if (sourcePath.includes('*')) {
|
|
253
|
-
const files = glob.sync(sourcePath.replace(/\\/g, '/'));
|
|
254
|
-
log.debug(`adding files matching glob pattern: ${sourcePath}`);
|
|
255
|
-
for (const file of files) {
|
|
256
|
-
log.debug(`- glob file: ${file}`);
|
|
257
|
-
archive.file(file, { name: file });
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
log.error(`no files or directory found for pattern ${sourcePath}: ${error}`);
|
|
262
|
-
}
|
|
263
|
-
continue;
|
|
264
|
-
}
|
|
265
|
-
if (stats.isFile()) {
|
|
266
|
-
log.debug(`adding file: ${sourcePath}`);
|
|
267
|
-
archive.file(sourcePath, { name: path.basename(sourcePath) });
|
|
268
|
-
}
|
|
269
|
-
else if (stats.isDirectory()) {
|
|
270
|
-
log.debug(`adding directory: ${sourcePath}`);
|
|
271
|
-
archive.directory(sourcePath, path.basename(sourcePath));
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
log.debug(`finalizing archive ${outputPath}...`);
|
|
275
|
-
archive.finalize().catch(reject);
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
export async function copyDirectory(srcDir, destDir) {
|
|
279
|
-
const fs = await import('node:fs').then((mod) => mod.promises);
|
|
280
|
-
log.debug(`copyDirectory: copying directory from ${srcDir} to ${destDir}`);
|
|
281
|
-
try {
|
|
282
|
-
await fs.mkdir(destDir, { recursive: true });
|
|
283
|
-
const entries = await fs.readdir(srcDir, { withFileTypes: true });
|
|
284
|
-
for (const entry of entries) {
|
|
285
|
-
const srcPath = path.join(srcDir, entry.name);
|
|
286
|
-
const destPath = path.join(destDir, entry.name);
|
|
287
|
-
if (entry.isDirectory()) {
|
|
288
|
-
await copyDirectory(srcPath, destPath);
|
|
289
|
-
}
|
|
290
|
-
else if (entry.isFile()) {
|
|
291
|
-
await fs.copyFile(srcPath, destPath);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
return true;
|
|
295
|
-
}
|
|
296
|
-
catch (error) {
|
|
297
|
-
log.error(`copyDirectory error copying from ${srcDir} to ${destDir}: ${error instanceof Error ? error.message : error}`);
|
|
298
|
-
return false;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
export async function resolveHostname(hostname, family = 4) {
|
|
302
|
-
const dns = await import('node:dns');
|
|
303
|
-
try {
|
|
304
|
-
const addresses = await dns.promises.lookup(hostname.toLowerCase(), { family });
|
|
305
|
-
return addresses.address;
|
|
306
|
-
}
|
|
307
|
-
catch (error) {
|
|
308
|
-
return null;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
export async function getNpmPackageVersion(packageName, tag = 'latest', timeout = 5000) {
|
|
312
|
-
const https = await import('https');
|
|
313
|
-
return new Promise((resolve, reject) => {
|
|
314
|
-
const url = `https://registry.npmjs.org/${packageName}`;
|
|
315
|
-
const controller = new AbortController();
|
|
316
|
-
const timeoutId = setTimeout(() => {
|
|
317
|
-
controller.abort();
|
|
318
|
-
reject(new Error(`Request timed out after ${timeout / 1000} seconds`));
|
|
319
|
-
}, timeout);
|
|
320
|
-
const req = https.get(url, { signal: controller.signal }, (res) => {
|
|
321
|
-
let data = '';
|
|
322
|
-
if (res.statusCode !== 200) {
|
|
323
|
-
clearTimeout(timeoutId);
|
|
324
|
-
res.resume();
|
|
325
|
-
req.destroy();
|
|
326
|
-
reject(new Error(`Failed to fetch data. Status code: ${res.statusCode}`));
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
res.on('data', (chunk) => {
|
|
330
|
-
data += chunk;
|
|
331
|
-
});
|
|
332
|
-
res.on('end', () => {
|
|
333
|
-
clearTimeout(timeoutId);
|
|
334
|
-
try {
|
|
335
|
-
const jsonData = JSON.parse(data);
|
|
336
|
-
const version = jsonData['dist-tags']?.[tag];
|
|
337
|
-
if (version) {
|
|
338
|
-
resolve(version);
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
reject(new Error(`Tag "${tag}" not found for package "${packageName}"`));
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
catch (error) {
|
|
345
|
-
reject(new Error(`Failed to parse response JSON: ${error instanceof Error ? error.message : error}`));
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
});
|
|
349
|
-
req.on('error', (error) => {
|
|
350
|
-
clearTimeout(timeoutId);
|
|
351
|
-
reject(new Error(`Request failed: ${error instanceof Error ? error.message : error}`));
|
|
352
|
-
});
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
export async function getGlobalNodeModules() {
|
|
356
|
-
const { exec } = await import('node:child_process');
|
|
357
|
-
return new Promise((resolve, reject) => {
|
|
358
|
-
exec('npm root -g', (error, stdout) => {
|
|
359
|
-
if (error) {
|
|
360
|
-
reject(error);
|
|
361
|
-
}
|
|
362
|
-
else {
|
|
363
|
-
resolve(stdout.trim());
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
});
|
|
367
|
-
}
|
/package/frontend/build/static/js/{main.438c6c47.js.LICENSE.txt → main.82e3eb54.js.LICENSE.txt}
RENAMED
|
File without changes
|