@scrypted/server 0.1.2 → 0.1.5

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.

Potentially problematic release.


This version of @scrypted/server might be problematic. Click here for more details.

@@ -5,6 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PythonRuntimeWorker = void 0;
7
7
  const child_process_1 = __importDefault(require("child_process"));
8
+ const fs_1 = __importDefault(require("fs"));
9
+ const os_1 = __importDefault(require("os"));
8
10
  const path_1 = __importDefault(require("path"));
9
11
  const readline_1 = __importDefault(require("readline"));
10
12
  const child_process_worker_1 = require("./child-process-worker");
@@ -19,12 +21,26 @@ class PythonRuntimeWorker extends child_process_worker_1.ChildProcessWorker {
19
21
  args.push('-m', 'debugpy', '--listen', `0.0.0.0:${pluginDebug.inspectPort}`, '--wait-for-client');
20
22
  }
21
23
  args.push(path_1.default.join(__dirname, '../../../python', 'plugin-remote.py'));
24
+ const gstEnv = {};
25
+ // hack to fix gst plugin search path on mac...
26
+ if (os_1.default.platform() === 'darwin') {
27
+ const gstPaths = [
28
+ '/opt/homebrew/lib/gstreamer-1.0',
29
+ '/usr/local/lib/gstreamer-1.0',
30
+ ];
31
+ for (const gstPath of gstPaths) {
32
+ if (fs_1.default.existsSync(path_1.default.join(gstPath, 'libgstx264.dylib'))) {
33
+ gstEnv['GST_PLUGIN_PATH'] = gstPath;
34
+ break;
35
+ }
36
+ }
37
+ }
22
38
  this.worker = child_process_1.default.spawn('python3', args, {
23
39
  // stdin, stdout, stderr, peer in, peer out
24
40
  stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe'],
25
41
  env: Object.assign({
26
42
  PYTHONPATH: path_1.default.join(process.cwd(), 'node_modules/@scrypted/types'),
27
- }, process.env, env),
43
+ }, gstEnv, process.env, env),
28
44
  });
29
45
  this.setupWorker();
30
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"python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
  return new Promise((resolve, reject) => {
56
- const target = net_1.default.connect(workerInspectPort);
56
+ const target = net_1.default.connect(workerInspectPort, '127.0.0.1');
57
57
  target.once('error', reject);
58
58
  target.once('connect', () => resolve(target));
59
59
  });
@@ -345,7 +345,8 @@ async function start() {
345
345
  const login_user_token = `${username}#${timestamp}`;
346
346
  res.cookie('login_user_token', login_user_token, {
347
347
  maxAge,
348
- secure: true,
348
+ // enabling this will disable insecure http login...
349
+ // secure: true,
349
350
  signed: true,
350
351
  httpOnly: true,
351
352
  sameSite: 'none',
@@ -381,7 +382,8 @@ async function start() {
381
382
  const login_user_token = `${username}#${timestamp}`;
382
383
  res.cookie('login_user_token', login_user_token, {
383
384
  maxAge,
384
- secure: true,
385
+ // enabling this will disable insecure http login...
386
+ // secure: true,
385
387
  signed: true,
386
388
  httpOnly: true,
387
389
  sameSite: 'none',
@@ -1 +1 @@
1
- {"version":3,"file":"scrypted-server-main.js","sourceRoot":"","sources":["../src/scrypted-server-main.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AACxB,sDAA8B;AAC9B,gDAAwB;AACxB,kDAA0B;AAC1B,sDAA8B;AAC9B,8DAAqC;AACrC,8CAAsB;AACtB,uCAA4C;AAC5C,oDAA4B;AAC5B,yCAA4D;AAC5D,uDAAwH;AACxH,oDAA4B;AAC5B,kEAAyC;AACzC,kDAA0B;AAC1B,gEAA8B;AAC9B,+BAAuC;AACvC,4CAAoB;AACpB,oDAA4B;AAC5B,2DAAwE;AACxE,0DAAiC;AACjC,oDAA4B;AAC5B,0CAAuC;AACvC,mCAAgC;AAChC,iCAA8F;AAC9F,wDAAoD;AACpD,0DAA2D;AAE3D,IAAI,CAAC,gBAAM,CAAC,GAAG,CAAC,iBAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;IACxC,MAAM,IAAI,KAAK,CAAC,kEAAkE,CAAC,CAAA;CACtF;AAED,iBAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,KAAK,CAAC,EAAE;IAC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AC"}
@@ -32,6 +32,13 @@ function getIpAddress() {
32
32
  return nodeIp.address();
33
33
  }
34
34
  exports.getIpAddress = getIpAddress;
35
+ function normalizeFamilyNodeV18(family) {
36
+ if (family === 'IPv4')
37
+ return 4;
38
+ if (family === 'IPv6')
39
+ return 6;
40
+ return family;
41
+ }
35
42
  function nodeIpAddress(family) {
36
43
  // https://chromium.googlesource.com/external/webrtc/+/master/rtc_base/network.cc#236
37
44
  const costlyNetworks = ["ipsec", "tun", "utun", "tap"];
@@ -52,7 +59,7 @@ function nodeIpAddress(family) {
52
59
  };
53
60
  }
54
61
  }
55
- const addresses = interfaces[nic].filter((details) => details.family.toLowerCase() === family
62
+ const addresses = interfaces[nic].filter((details) => normalizeFamilyNodeV18(details.family) === family
56
63
  && !nodeIp.isLoopback(details.address));
57
64
  return {
58
65
  nic,
@@ -71,9 +78,9 @@ function nodeIpAddress(family) {
71
78
  function getHostAddresses(useIpv4, useIpv6) {
72
79
  const address = [];
73
80
  if (useIpv4)
74
- address.push(...nodeIpAddress("ipv4"));
81
+ address.push(...nodeIpAddress(4));
75
82
  if (useIpv6)
76
- address.push(...nodeIpAddress("ipv6"));
83
+ address.push(...nodeIpAddress(6));
77
84
  return address;
78
85
  }
79
86
  exports.getHostAddresses = getHostAddresses;
@@ -1 +1 @@
1
- {"version":3,"file":"server-settings.js","sourceRoot":"","sources":["../src/server-settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,2CAA6B;AAEhB,QAAA,sBAAsB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,KAAK,CAAC;AAC/E,QAAA,oBAAoB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,KAAK,CAAC;AAC3E,QAAA,mBAAmB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,KAAK,CAAC;AAEtF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CAAC,SAAS,CAAC;SAC/B,IAAI,EAAE,CAAC;AAChB,CAAC;AAED,SAAgB,gBAAgB,CAAC,OAAgB,EAAE,OAAgB;IAC/D,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,IAAI,OAAO;QAAE,OAAO,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,IAAI,OAAO;QAAE,OAAO,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,OAAO,OAAO,CAAC;AACnB,CAAC;AALD,4CAKC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrypted/server",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "@mapbox/node-pre-gyp": "^1.0.8",
package/python/rpc.py CHANGED
@@ -77,8 +77,8 @@ class RpcProxy(object):
77
77
  return super().__setattr__(name, value)
78
78
 
79
79
  def __call__(self, *args, **kwargs):
80
- print('call')
81
- pass
80
+ return self.__dict__['__proxy_peer'].__apply__(self.__dict__['__proxy_id'], self.__dict__['__proxy_oneway_methods'], None, args)
81
+
82
82
 
83
83
  def __apply__(self, method: str, args: list):
84
84
  return self.__dict__['__proxy_peer'].__apply__(self.__dict__['__proxy_id'], self.__dict__['__proxy_oneway_methods'], method, args)
@@ -1,13 +1,14 @@
1
- import { RuntimeWorker, RuntimeWorkerOptions as RuntimeWorkerOptions } from "./runtime-worker";
2
1
  import child_process from 'child_process';
2
+ import fs from "fs";
3
+ import os from "os";
3
4
  import path from 'path';
4
- import { EventEmitter } from "ws";
5
- import { Writable, Readable } from 'stream';
6
- import { RpcMessage, RpcPeer } from "../../rpc";
7
5
  import readline from 'readline';
6
+ import { Readable, Writable } from 'stream';
7
+ import { RpcMessage, RpcPeer } from "../../rpc";
8
8
  import { ChildProcessWorker } from "./child-process-worker";
9
+ import { RuntimeWorkerOptions } from "./runtime-worker";
9
10
 
10
- export class PythonRuntimeWorker extends ChildProcessWorker {
11
+ export class PythonRuntimeWorker extends ChildProcessWorker {
11
12
 
12
13
  constructor(pluginId: string, options: RuntimeWorkerOptions) {
13
14
  super(pluginId, options);
@@ -29,12 +30,27 @@ export class PythonRuntimeWorker extends ChildProcessWorker {
29
30
  path.join(__dirname, '../../../python', 'plugin-remote.py'),
30
31
  )
31
32
 
33
+ const gstEnv: NodeJS.ProcessEnv = {};
34
+ // hack to fix gst plugin search path on mac...
35
+ if (os.platform() === 'darwin') {
36
+ const gstPaths = [
37
+ '/opt/homebrew/lib/gstreamer-1.0',
38
+ '/usr/local/lib/gstreamer-1.0',
39
+ ];
40
+ for (const gstPath of gstPaths) {
41
+ if (fs.existsSync(path.join(gstPath, 'libgstx264.dylib'))) {
42
+ gstEnv['GST_PLUGIN_PATH'] = gstPath;
43
+ break;
44
+ }
45
+ }
46
+ }
47
+
32
48
  this.worker = child_process.spawn('python3', args, {
33
49
  // stdin, stdout, stderr, peer in, peer out
34
50
  stdio: ['pipe', 'pipe', 'pipe', 'pipe', 'pipe'],
35
51
  env: Object.assign({
36
52
  PYTHONPATH: path.join(process.cwd(), 'node_modules/@scrypted/types'),
37
- }, process.env, env),
53
+ }, gstEnv, process.env, env),
38
54
  });
39
55
 
40
56
  this.setupWorker();
@@ -58,8 +74,8 @@ export class PythonRuntimeWorker extends ChildProcessWorker {
58
74
  try {
59
75
  if (!this.worker)
60
76
  throw new Error('worked has been killed');
61
- (this.worker.stdio[3] as Writable).write(JSON.stringify(message) + '\n', e => e && reject?.(e));
62
- }
77
+ (this.worker.stdio[3] as Writable).write(JSON.stringify(message) + '\n', e => e && reject?.(e));
78
+ }
63
79
  catch (e) {
64
80
  reject?.(e);
65
81
  }
@@ -54,7 +54,7 @@ let workerInspectPort: number = undefined;
54
54
 
55
55
  async function doconnect(): Promise<net.Socket> {
56
56
  return new Promise((resolve, reject) => {
57
- const target = net.connect(workerInspectPort);
57
+ const target = net.connect(workerInspectPort, '127.0.0.1');
58
58
  target.once('error', reject)
59
59
  target.once('connect', () => resolve(target))
60
60
  })
@@ -400,7 +400,8 @@ async function start() {
400
400
  const login_user_token = `${username}#${timestamp}`;
401
401
  res.cookie('login_user_token', login_user_token, {
402
402
  maxAge,
403
- secure: true,
403
+ // enabling this will disable insecure http login...
404
+ // secure: true,
404
405
  signed: true,
405
406
  httpOnly: true,
406
407
  sameSite: 'none',
@@ -442,7 +443,8 @@ async function start() {
442
443
  const login_user_token = `${username}#${timestamp}`
443
444
  res.cookie('login_user_token', login_user_token, {
444
445
  maxAge,
445
- secure: true,
446
+ // enabling this will disable insecure http login...
447
+ // secure: true,
446
448
  signed: true,
447
449
  httpOnly: true,
448
450
  sameSite: 'none',
@@ -9,7 +9,15 @@ export function getIpAddress(): string {
9
9
  return nodeIp.address();
10
10
  }
11
11
 
12
- function nodeIpAddress(family: string): string[] {
12
+ function normalizeFamilyNodeV18(family: string|number) {
13
+ if (family === 'IPv4')
14
+ return 4;
15
+ if (family === 'IPv6')
16
+ return 6;
17
+ return family;
18
+ }
19
+
20
+ function nodeIpAddress(family: number): string[] {
13
21
  // https://chromium.googlesource.com/external/webrtc/+/master/rtc_base/network.cc#236
14
22
  const costlyNetworks = ["ipsec", "tun", "utun", "tap"];
15
23
 
@@ -35,7 +43,7 @@ function nodeIpAddress(family: string): string[] {
35
43
  }
36
44
  const addresses = interfaces[nic]!.filter(
37
45
  (details) =>
38
- details.family.toLowerCase() === family
46
+ normalizeFamilyNodeV18(details.family) === family
39
47
  && !nodeIp.isLoopback(details.address)
40
48
  );
41
49
  return {
@@ -56,7 +64,7 @@ function nodeIpAddress(family: string): string[] {
56
64
 
57
65
  export function getHostAddresses(useIpv4: boolean, useIpv6: boolean) {
58
66
  const address: string[] = [];
59
- if (useIpv4) address.push(...nodeIpAddress("ipv4"));
60
- if (useIpv6) address.push(...nodeIpAddress("ipv6"));
67
+ if (useIpv4) address.push(...nodeIpAddress(4));
68
+ if (useIpv6) address.push(...nodeIpAddress(6));
61
69
  return address;
62
70
  }