mirror of
https://github.com/koush/scrypted.git
synced 2026-03-24 10:20:25 +00:00
core/common: dont crash on script parse failure, add more node types
This commit is contained in:
@@ -114,8 +114,12 @@ export function createMonacoEvalDefaults(extraLibs: { [lib: string]: string }) {
|
||||
for (const safeLib of [
|
||||
'@types/node/globals.d.ts',
|
||||
'@types/node/buffer.d.ts',
|
||||
'@types/node/process.d.ts',
|
||||
'@types/node/events.d.ts',
|
||||
'@types/node/stream.d.ts',
|
||||
'@types/node/fs.d.ts',
|
||||
'@types/node/net.d.ts',
|
||||
'@types/node/child_process.d.ts',
|
||||
]) {
|
||||
safeLibs[`node_modules/${safeLib}`] = readFileAsString(safeLib)
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ export class ScriptCore extends ScryptedDeviceBase implements DeviceProvider, De
|
||||
}
|
||||
catch (e) {
|
||||
worker.terminate();
|
||||
throw e;
|
||||
// throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user