Skip to content

Commit

Permalink
server/sdk: forks can be associated with specific device/mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Aug 27, 2024
1 parent e94cea0 commit df7deef
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions sdk/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/sdk",
"version": "0.3.57",
"version": "0.3.60",
"description": "",
"main": "dist/src/index.js",
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions sdk/types/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/types",
"version": "0.3.53",
"version": "0.3.56",
"description": "",
"main": "dist/index.js",
"author": "",
Expand Down
2 changes: 2 additions & 0 deletions sdk/types/src/types.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2583,6 +2583,8 @@ export interface ForkOptions {
name?: string;
filename?: string;
runtime?: string;
id?: string;
nativeId?: ScryptedNativeId;
}

export interface ScryptedStatic {
Expand Down
12 changes: 6 additions & 6 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@scrypted/ffmpeg-static": "^6.1.0-build1",
"@scrypted/node-pty": "^1.0.18",
"@scrypted/types": "^0.3.53",
"@scrypted/types": "^0.3.56",
"adm-zip": "^0.5.15",
"body-parser": "^1.20.2",
"cookie-parser": "^1.4.6",
Expand Down
4 changes: 3 additions & 1 deletion server/src/plugin/plugin-remote-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const serverVersion = require('../../package.json').version;
export interface StartPluginRemoteOptions {
onClusterPeer?(peer: RpcPeer): void;
sourceURL?(filename: string): string;
consoleId?: string;
}

export function startPluginRemote(mainFilename: string, pluginId: string, peerSend: (message: RpcMessage, reject?: (e: Error) => void, serializationContext?: any) => void, startPluginRemoteOptions?: StartPluginRemoteOptions) {
Expand Down Expand Up @@ -540,7 +541,8 @@ export function startPluginRemote(mainFilename: string, pluginId: string, peerSe

if (runtimeWorker instanceof ChildProcessWorker) {
nativeWorker = runtimeWorker.childProcess;
pipeWorkerConsole(nativeWorker);
const console = options?.id ? getMixinConsole(options.id, options.nativeId) : undefined;
pipeWorkerConsole(nativeWorker, console);
}
}
else {
Expand Down

0 comments on commit df7deef

Please sign in to comment.