@scrypted/server 0.30.0 → 0.32.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.
- package/dist/level.d.ts +13 -101
- package/dist/level.js +56 -95
- package/dist/level.js.map +1 -1
- package/dist/plugin/media.js +3 -2
- package/dist/plugin/media.js.map +1 -1
- package/dist/plugin/plugin-host-api.d.ts +1 -1
- package/dist/plugin/plugin-host.d.ts +1 -1
- package/dist/plugin/plugin-host.js +4 -3
- package/dist/plugin/plugin-host.js.map +1 -1
- package/dist/plugin/plugin-http.d.ts +1 -1
- package/dist/plugin/plugin-npm-dependencies.js +3 -2
- package/dist/plugin/plugin-npm-dependencies.js.map +1 -1
- package/dist/plugin/plugin-volume.js +4 -2
- package/dist/plugin/plugin-volume.js.map +1 -1
- package/dist/runtime.d.ts +4 -4
- package/dist/scrypted-server-main.js +4 -9
- package/dist/scrypted-server-main.js.map +1 -1
- package/package.json +2 -4
- package/src/level.ts +46 -227
- package/src/plugin/media.ts +4 -3
- package/src/plugin/plugin-host.ts +4 -3
- package/src/plugin/plugin-npm-dependencies.ts +3 -2
- package/src/plugin/plugin-volume.ts +4 -2
- package/src/runtime.ts +1 -1
- package/src/scrypted-server-main.ts +5 -10
- package/dist/asynciterable-utils.d.ts +0 -2
- package/dist/asynciterable-utils.js +0 -24
- package/dist/asynciterable-utils.js.map +0 -1
- package/dist/collection.d.ts +0 -1
- package/dist/collection.js +0 -16
- package/dist/collection.js.map +0 -1
- package/src/asynciterable-utils.ts +0 -19
- package/src/collection.ts +0 -12
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.asyncFind = exports.asyncFilter = void 0;
|
4
|
-
function asyncFilter(asyncIterable, predicate) {
|
5
|
-
return {
|
6
|
-
async *[Symbol.asyncIterator]() {
|
7
|
-
for await (const value of asyncIterable) {
|
8
|
-
if (await predicate(value)) {
|
9
|
-
yield value;
|
10
|
-
}
|
11
|
-
}
|
12
|
-
}
|
13
|
-
};
|
14
|
-
}
|
15
|
-
exports.asyncFilter = asyncFilter;
|
16
|
-
async function asyncFind(asyncIterable, predicate) {
|
17
|
-
for await (const value of asyncIterable) {
|
18
|
-
if (await predicate(value)) {
|
19
|
-
return value;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
}
|
23
|
-
exports.asyncFind = asyncFind;
|
24
|
-
//# sourceMappingURL=asynciterable-utils.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"asynciterable-utils.js","sourceRoot":"","sources":["../src/asynciterable-utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAI,aAA+B,EAAE,SAAqC;IACjG,OAAO;QACH,KAAK,CAAA,CAAE,CAAC,MAAM,CAAC,aAAa,CAAC;YACzB,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,aAAa,EAAE;gBACrC,IAAI,MAAM,SAAS,CAAC,KAAK,CAAC,EAAE;oBACxB,MAAM,KAAK,CAAC;iBACf;aACJ;QACL,CAAC;KACJ,CAAA;AACL,CAAC;AAVD,kCAUC;AAEM,KAAK,UAAU,SAAS,CAAI,aAA+B,EAAE,SAAqC;IACrG,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,aAAa,EAAE;QACrC,IAAI,MAAM,SAAS,CAAC,KAAK,CAAC,EAAE;YACxB,OAAO,KAAK,CAAC;SAChB;KACJ;AACL,CAAC;AAND,8BAMC"}
|
package/dist/collection.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export declare function hasSameElements<T>(a: T[], b: T[]): boolean;
|
package/dist/collection.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.hasSameElements = void 0;
|
4
|
-
function hasSameElements(a, b) {
|
5
|
-
const s1 = new Set(a);
|
6
|
-
const s2 = new Set(b);
|
7
|
-
if (s1.size != s2.size)
|
8
|
-
return false;
|
9
|
-
for (const e of s1) {
|
10
|
-
if (!s2.has(e))
|
11
|
-
return false;
|
12
|
-
}
|
13
|
-
return true;
|
14
|
-
}
|
15
|
-
exports.hasSameElements = hasSameElements;
|
16
|
-
//# sourceMappingURL=collection.js.map
|
package/dist/collection.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"collection.js","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAI,CAAM,EAAE,CAAM;IAC7C,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;IACtB,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,IAAI;QAClB,OAAO,KAAK,CAAC;IACjB,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE;QAChB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YACV,OAAO,KAAK,CAAC;KACpB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAXD,0CAWC"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
export function asyncFilter<T>(asyncIterable: AsyncIterable<T>, predicate: (t: T) => Promise<boolean>): AsyncIterable<T> {
|
2
|
-
return {
|
3
|
-
async* [Symbol.asyncIterator]() {
|
4
|
-
for await (const value of asyncIterable) {
|
5
|
-
if (await predicate(value)) {
|
6
|
-
yield value;
|
7
|
-
}
|
8
|
-
}
|
9
|
-
}
|
10
|
-
}
|
11
|
-
}
|
12
|
-
|
13
|
-
export async function asyncFind<T>(asyncIterable: AsyncIterable<T>, predicate: (t: T) => Promise<boolean>): Promise<T> {
|
14
|
-
for await (const value of asyncIterable) {
|
15
|
-
if (await predicate(value)) {
|
16
|
-
return value;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}
|
package/src/collection.ts
DELETED