@scrypted/server 0.50.0 → 0.52.0

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.

@@ -1,4 +1,16 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { RequestOptions } from 'http';
2
4
  export declare function getNpmPackageInfo(pkg: string): Promise<any>;
3
- export declare function fetchJSON(url: string, init?: RequestInit): Promise<any>;
4
- export declare function fetchBuffer(url: string, init?: RequestInit): Promise<Buffer>;
5
+ export declare function fetchJSON(url: string, init?: RequestOptions): Promise<{
6
+ json: any;
7
+ headers: import("http").IncomingHttpHeaders;
8
+ }>;
9
+ export declare function fetchPostJSON(url: string, postBody: any, init?: RequestOptions): Promise<{
10
+ json: any;
11
+ headers: import("http").IncomingHttpHeaders;
12
+ }>;
13
+ export declare function fetchBuffer(url: string, init?: RequestOptions, body?: Buffer): Promise<{
14
+ headers: import("http").IncomingHttpHeaders;
15
+ body: Buffer;
16
+ }>;
@@ -1,16 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchBuffer = exports.fetchJSON = exports.getNpmPackageInfo = void 0;
3
+ exports.fetchBuffer = exports.fetchPostJSON = exports.fetchJSON = exports.getNpmPackageInfo = void 0;
4
+ const events_1 = require("events");
5
+ const follow_redirects_1 = require("follow-redirects");
4
6
  async function getNpmPackageInfo(pkg) {
5
- return fetchJSON(`https://registry.npmjs.org/${pkg}`);
7
+ const { json } = await fetchJSON(`https://registry.npmjs.org/${pkg}`, {
8
+ // force ipv4 in case of busted ipv6.
9
+ family: 4,
10
+ });
11
+ return json;
6
12
  }
7
13
  exports.getNpmPackageInfo = getNpmPackageInfo;
8
14
  async function fetchJSON(url, init) {
9
- return await (await fetch(url, init)).json();
15
+ init ||= {};
16
+ init.headers = {
17
+ ...init.headers,
18
+ Accept: 'application/json',
19
+ };
20
+ const { body, headers } = await fetchBuffer(url, init);
21
+ return {
22
+ json: JSON.parse(body.toString()),
23
+ headers,
24
+ };
10
25
  }
11
26
  exports.fetchJSON = fetchJSON;
12
- async function fetchBuffer(url, init) {
13
- return Buffer.from(await (await fetch(url, init)).arrayBuffer());
27
+ async function fetchPostJSON(url, postBody, init) {
28
+ init ||= {};
29
+ init.method = 'POST';
30
+ init.headers = {
31
+ ...init.headers,
32
+ Accept: 'application/json',
33
+ 'Content-Type': 'application/json',
34
+ };
35
+ const { body, headers } = await fetchBuffer(url, init, Buffer.from(JSON.stringify(postBody)));
36
+ return {
37
+ json: JSON.parse(body.toString()),
38
+ headers,
39
+ };
40
+ }
41
+ exports.fetchPostJSON = fetchPostJSON;
42
+ async function fetchBuffer(url, init, body) {
43
+ const proto = url.startsWith('https:') ? follow_redirects_1.https : follow_redirects_1.http;
44
+ const request = proto.request(url, {
45
+ ...init,
46
+ });
47
+ if (body)
48
+ request.write(body);
49
+ request.end();
50
+ const [response] = await (0, events_1.once)(request, 'response');
51
+ const buffers = [];
52
+ response.on('data', buffer => buffers.push(buffer));
53
+ await (0, events_1.once)(response, 'end');
54
+ return {
55
+ headers: response.headers,
56
+ body: Buffer.concat(buffers),
57
+ };
14
58
  }
15
59
  exports.fetchBuffer = fetchBuffer;
16
60
  //# sourceMappingURL=fetch-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-helpers.js","sourceRoot":"","sources":["../src/fetch-helpers.ts"],"names":[],"mappings":";;;AAAO,KAAK,UAAU,iBAAiB,CAAC,GAAW;IAC/C,OAAO,SAAS,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;AAC1D,CAAC;AAFD,8CAEC;AAEM,KAAK,UAAU,SAAS,CAAC,GAAW,EAAE,IAAkB;IAC3D,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACjD,CAAC;AAFD,8BAEC;AAEM,KAAK,UAAU,W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M,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9F,OAAO;QACH,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACjC,OAAO;KACV,CAAA;AACL,CAAC;AAdD,sCAcC;AAEM,KAAK,UAAU,WAAW,CAAC,GAAW,EAAE,IAAqB,EAAE,IAAa;IAC/E,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,wBAAK,CAAC,CAAC,CAAC,uBAAI,CAAC;IAEtD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QAC/B,GAAG,IAAI;KACV,CAAC,CAAC;IACH,IAAI,IAAI;QACJ,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,IAAA,aAAI,EAAC,OAAO,EAAE,UAAU,CAAsB,CAAC;IAExE,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACpD,MAAM,IAAA,aAAI,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAE5B,OAAO;QACH,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;KAC/B,CAAC;AACN,CAAC;AAnBD,kCAmBC"}
package/dist/runtime.js CHANGED
@@ -458,7 +458,10 @@ class ScryptedRuntime extends plugin_http_1.PluginHttp {
458
458
  version = registry['dist-tags'].latest;
459
459
  }
460
460
  console.log('installing package', pkg, version);
461
- const tarball = await (0, fetch_helpers_1.fetchBuffer)(`${registry.versions[version].dist.tarball}`);
461
+ const { body: tarball } = await (0, fetch_helpers_1.fetchBuffer)(`${registry.versions[version].dist.tarball}`, {
462
+ // force ipv4 in case of busted ipv6.
463
+ family: 4,
464
+ });
462
465
  console.log('downloaded tarball', tarball?.length);
463
466
  const parse = new tar_1.default.Parse();
464
467
  const files = {};
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA2P;AAC3P,sDAA6B;AAC7B,oDAA4B;AAC5B,8CAAgC;AAChC,mCAA8B;AAG9B,4CAAoB;AAIpB,gDAAwB;AAExB,oDAA4B;AAC5B,mCAAqC;AACrC,8CAAsB;AACtB,6BAA0B;AAC1B,2BAA0D;AAC1D,yCAA+E;AAC/E,mDAAiE;AACjE,uDAA4D;AAC5D,qDAAgK;AAGhK,qCAAyD;AACzD,qDAA+D;AAC/D,sCAA8C;AAE9C,0DAAkE;AAClE,sDAAkD;AAClD,sDAAuE;AACvE,8EAAuE;AACvE,0DAAyD;AACzD,wEAAmE;AACnE,kEAAqE;AAErE,uDAA+F;AAC/F,oDAAuD;AACvD,8CAA2C;AAC3C,0CAA8C;AAC9C,0CAAuC;AACvC,8CAAoD;AACpD,gEAA4D;AAC5D,4CAAgD;AAChD,mCAAmE;AAOnE,MAAM,yBAAyB,GAAG,SAAS,CAAC;AAC5C,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAStC,MAAa,eAAgB,SAAQ,wBAA0B;IAgCxC;IA/BnB,SAAS,GAAG,gBAAM,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,aAAa,GAAG,gBAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACvD,SAAS,CAAQ;IACjB,OAAO,GAAiC,EAAE,CAAC;IAC3C,a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C,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,EAAE;YACpH,IAAI;gBACA,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;aAC9D;YACD,OAAO,CAAC,EAAE;gBACN,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;aACvF;SACJ;IACL,CAAC;CACJ;AA92BD,0CA82BC"}
@@ -562,7 +562,9 @@ async function start(mainFilename, options) {
562
562
  user.token = crypto_1.default.randomBytes(16).toString('hex');
563
563
  await db.upsert(user);
564
564
  }
565
+ const userToken = new usertoken_1.UserToken(res.locals.username, res.locals.aclId, Date.now());
565
566
  res.send({
567
+ ...createTokens(userToken),
566
568
  username,
567
569
  token: user.token,
568
570
  addresses,
@@ -1 +1 @@
1
- {"version":3,"file":"scrypted-server-main.js","sourceRoot":"","sources":["../src/scrypted-server-main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,8DAAqC;AACrC,kEAAyC;AACzC,oDAA4B;AAC5B,sDAA2C;AAC3C,4CAAoB;AACpB,gDAAwB;AACxB,0DAAiC;AACjC,kDAA0B;AAC1B,8CAAsB;AACtB,4CAAoB;AACpB,gDAAwB;AACxB,sDAA8B;AAC9B,oDAA4B;AAC5B,2DAAwE;AACxE,iCAA8F;AAC9F,yCAA4D;AAC5D,oDAA4B;AAC5B,wDAAoD;AACpD,0DAA2D;AAC3D,+BAAuC;AACvC,uCAA4C;AAC5C,uDAAwH;AAExH,4CAA2D;AAC3D,mCAAgC;AAChC,2CAA8D;AAC9D,mCAA8B;AAE9B,mDAAoD;AAIpD,IAAI,CAAC,gBAAM,CAAC,GAAG,CAAC,iBAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE;IACxC,MAAM,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,CAAC,QAAQ,CAAC,mCAAmC,CAAC,CAAC,CAAC;IAE/E,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,kBAAe,KAAK,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  import { ScryptedRuntime } from "../runtime";
2
3
  export declare class ServiceControl {
3
4
  scrypted: ScryptedRuntime;
@@ -5,5 +6,8 @@ export declare class ServiceControl {
5
6
  exit(): Promise<void>;
6
7
  restart(): Promise<void>;
7
8
  getUpdateAvailable(): Promise<string>;
8
- update(): Promise<any>;
9
+ update(): Promise<{
10
+ json: any;
11
+ headers: import("http").IncomingHttpHeaders;
12
+ }>;
9
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scrypted/server",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
4
4
  "description": "",
5
5
  "dependencies": {
6
6
  "@mapbox/node-pre-gyp": "^1.0.11",
@@ -12,14 +12,15 @@
12
12
  "engine.io": "^6.5.2",
13
13
  "express": "^4.18.2",
14
14
  "ffmpeg-static": "^5.2.0",
15
+ "follow-redirects": "^1.15.3",
15
16
  "http-auth": "^4.2.0",
16
17
  "ip": "^1.1.8",
17
18
  "level": "^8.0.0",
18
19
  "linkfs": "^2.1.0",
19
20
  "lodash": "^4.17.21",
20
- "memfs": "^4.2.1",
21
+ "memfs": "^4.3.0",
21
22
  "mime": "^3.0.0",
22
- "nan": "^2.17.0",
23
+ "nan": "^2.18.0",
23
24
  "node-dijkstra": "^2.5.0",
24
25
  "node-forge": "^1.3.1",
25
26
  "node-gyp": "^9.4.0",
@@ -30,23 +31,24 @@
30
31
  "tslib": "^2.6.2",
31
32
  "typescript": "^5.2.2",
32
33
  "whatwg-mimetype": "^3.0.0",
33
- "ws": "^8.14.1"
34
+ "ws": "^8.14.2"
34
35
  },
35
36
  "devDependencies": {
36
- "@types/adm-zip": "^0.5.0",
37
+ "@types/adm-zip": "^0.5.1",
37
38
  "@types/cookie-parser": "^1.4.4",
38
39
  "@types/debug": "^4.1.8",
39
40
  "@types/express": "^4.17.17",
40
- "@types/http-auth": "^4.1.1",
41
+ "@types/follow-redirects": "^1.14.2",
42
+ "@types/http-auth": "^4.1.2",
41
43
  "@types/ip": "^1.1.0",
42
44
  "@types/lodash": "^4.14.198",
43
45
  "@types/mime": "^3.0.1",
44
46
  "@types/node-dijkstra": "^2.5.3",
45
47
  "@types/node-forge": "^1.3.5",
46
- "@types/pem": "^1.14.0",
47
- "@types/semver": "^7.5.1",
48
+ "@types/pem": "^1.14.1",
49
+ "@types/semver": "^7.5.2",
48
50
  "@types/source-map-support": "^0.5.7",
49
- "@types/tar": "^6.1.5",
51
+ "@types/tar": "^6.1.6",
50
52
  "@types/whatwg-mimetype": "^3.0.0",
51
53
  "@types/ws": "^8.5.5"
52
54
  },
@@ -1,11 +1,61 @@
1
+ import { once } from 'events';
2
+ import { http, https } from 'follow-redirects';
3
+ import { RequestOptions, IncomingMessage } from 'http';
4
+
1
5
  export async function getNpmPackageInfo(pkg: string) {
2
- return fetchJSON(`https://registry.npmjs.org/${pkg}`);
6
+ const { json } = await fetchJSON(`https://registry.npmjs.org/${pkg}`, {
7
+ // force ipv4 in case of busted ipv6.
8
+ family: 4,
9
+ });
10
+ return json;
11
+ }
12
+
13
+ export async function fetchJSON(url: string, init?: RequestOptions) {
14
+ init ||= {};
15
+ init.headers = {
16
+ ...init.headers,
17
+ Accept: 'application/json',
18
+ };
19
+ const { body, headers } = await fetchBuffer(url, init);
20
+ return {
21
+ json: JSON.parse(body.toString()),
22
+ headers,
23
+ }
3
24
  }
4
25
 
5
- export async function fetchJSON(url: string, init?: RequestInit) {
6
- return await (await fetch(url, init)).json();
26
+ export async function fetchPostJSON(url: string, postBody: any, init?: RequestOptions) {
27
+ init ||= {};
28
+ init.method = 'POST';
29
+ init.headers = {
30
+ ...init.headers,
31
+ Accept: 'application/json',
32
+ 'Content-Type': 'application/json',
33
+ };
34
+
35
+ const { body, headers } = await fetchBuffer(url, init, Buffer.from(JSON.stringify(postBody)));
36
+ return {
37
+ json: JSON.parse(body.toString()),
38
+ headers,
39
+ }
7
40
  }
8
41
 
9
- export async function fetchBuffer(url: string, init?: RequestInit) {
10
- return Buffer.from(await (await fetch(url, init)).arrayBuffer());
42
+ export async function fetchBuffer(url: string, init?: RequestOptions, body?: Buffer) {
43
+ const proto = url.startsWith('https:') ? https : http;
44
+
45
+ const request = proto.request(url, {
46
+ ...init,
47
+ });
48
+ if (body)
49
+ request.write(body);
50
+ request.end();
51
+ const [response] = await once(request, 'response') as IncomingMessage[];
52
+
53
+ const buffers: Buffer[] = [];
54
+ response.on('data', buffer => buffers.push(buffer));
55
+ await once(response, 'end');
56
+
57
+ return {
58
+ headers: response.headers,
59
+ body: Buffer.concat(buffers),
60
+ };
11
61
  }
package/src/runtime.ts CHANGED
@@ -510,7 +510,10 @@ export class ScryptedRuntime extends PluginHttp<HttpPluginData> {
510
510
  }
511
511
  console.log('installing package', pkg, version);
512
512
 
513
- const tarball = await fetchBuffer(`${registry.versions[version].dist.tarball}`);
513
+ const { body: tarball } = await fetchBuffer(`${registry.versions[version].dist.tarball}`, {
514
+ // force ipv4 in case of busted ipv6.
515
+ family: 4,
516
+ });
514
517
  console.log('downloaded tarball', tarball?.length);
515
518
  const parse = new (tar.Parse as any)();
516
519
  const files: { [name: string]: Buffer } = {};
@@ -627,7 +627,11 @@ async function start(mainFilename: string, options?: {
627
627
  user.token = crypto.randomBytes(16).toString('hex');
628
628
  await db.upsert(user);
629
629
  }
630
+
631
+ const userToken = new UserToken(res.locals.username, res.locals.aclId, Date.now());
632
+
630
633
  res.send({
634
+ ...createTokens(userToken),
631
635
  username,
632
636
  token: user.token,
633
637
  addresses,