@bit-blazer/libsquoosh 0.5.0 → 0.5.3

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.
@@ -1,24 +1,24 @@
1
- /// <reference types="node" />
2
- import { Worker } from 'worker_threads';
3
- import { TransformStream } from 'web-streams-polyfill';
4
- interface Job<I> {
5
- msg: I;
6
- resolve: Function;
7
- reject: Function;
8
- }
9
- export default class WorkerPool<I, O> {
10
- numWorkers: number;
11
- jobQueue: TransformStream<Job<I>, Job<I>>;
12
- workerQueue: TransformStream<Worker, Worker>;
13
- done: Promise<void>;
14
- constructor(numWorkers: number, workerFile: string);
15
- _readLoop(): Promise<void>;
16
- _nextWorker(): Promise<Worker>;
17
- _terminateAll(): Promise<void>;
18
- join(): Promise<void>;
19
- dispatchJob(msg: I): Promise<O>;
20
- private jobPromise;
21
- static useThisThreadAsWorker<I, O>(cb: (msg: I) => O): void;
22
- }
23
- export {};
1
+ /// <reference types="node" />
2
+ import { Worker } from 'worker_threads';
3
+ import { TransformStream } from 'web-streams-polyfill';
4
+ interface Job<I> {
5
+ msg: I;
6
+ resolve: Function;
7
+ reject: Function;
8
+ }
9
+ export default class WorkerPool<I, O> {
10
+ numWorkers: number;
11
+ jobQueue: TransformStream<Job<I>, Job<I>>;
12
+ workerQueue: TransformStream<Worker, Worker>;
13
+ done: Promise<void>;
14
+ constructor(numWorkers: number, workerFile: string);
15
+ _readLoop(): Promise<void>;
16
+ _nextWorker(): Promise<Worker>;
17
+ _terminateAll(): Promise<void>;
18
+ join(): Promise<void>;
19
+ dispatchJob(msg: I): Promise<O>;
20
+ private jobPromise;
21
+ static useThisThreadAsWorker<I, O>(cb: (msg: I) => O): void;
22
+ }
23
+ export {};
24
24
  //# sourceMappingURL=worker_pool.d.ts.map
package/package.json CHANGED
@@ -1,42 +1,44 @@
1
- {
2
- "name": "@bit-blazer/libsquoosh",
3
- "version": "0.5.0",
4
- "description": "A Node library for Squoosh",
5
- "public": true,
6
- "main": "./build/index.js",
7
- "types": "./build/index.d.ts",
8
- "files": [
9
- "/build/*"
10
- ],
11
- "scripts": {
12
- "build": "rollup -c && node lib/move-d-ts.js"
13
- },
14
- "keywords": [],
15
- "author": "Google Chrome Developers <chromium-dev@google.com>",
16
- "homepage": "https://github.com/bit-blazer/squoosh",
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/bit-blazer/squoosh.git"
20
- },
21
- "license": "Apache-2.0",
22
- "engines": {
23
- "node": ">=16.0.0"
24
- },
25
- "dependencies": {
26
- "wasm-feature-detect": "^1.2.11",
27
- "web-streams-polyfill": "^3.0.3",
28
- "json5": "2.2.0"
29
- },
30
- "devDependencies": {
31
- "@babel/core": "^7.14.0",
32
- "@babel/preset-env": "^7.14.0",
33
- "@rollup/plugin-babel": "^5.3.0",
34
- "@rollup/plugin-commonjs": "^18.0.0",
35
- "@rollup/plugin-node-resolve": "^11.2.1",
36
- "@types/node": "^15.6.1",
37
- "rollup": "^2.46.0",
38
- "rollup-plugin-terser": "^7.0.2",
39
- "typescript": "^4.1.3",
40
- "which": "^2.0.2"
41
- }
42
- }
1
+ {
2
+ "name": "@bit-blazer/libsquoosh",
3
+ "version": "0.5.3",
4
+ "description": "A Node library for Squoosh",
5
+ "public": true,
6
+ "main": "./build/index.js",
7
+ "types": "./build/index.d.ts",
8
+ "files": [
9
+ "/build/*"
10
+ ],
11
+ "scripts": {
12
+ "build": "rollup -c && node lib/move-d-ts.js"
13
+ },
14
+ "keywords": [],
15
+ "author": "Google Chrome Developers <chromium-dev@google.com>",
16
+ "homepage": "https://github.com/Bit-Blazer/squoosh",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/Bit-Blazer/squoosh.git",
20
+ "directory": "libsquoosh"
21
+ },
22
+ "license": "Apache-2.0",
23
+ "engines": {
24
+ "node": ">=16.0.0"
25
+ },
26
+ "dependencies": {
27
+ "json5": "2.2.0",
28
+ "wasm-feature-detect": "^1.2.11",
29
+ "web-streams-polyfill": "^3.0.3"
30
+ },
31
+ "devDependencies": {
32
+ "@babel/core": "^7.14.0",
33
+ "@babel/preset-env": "^7.14.0",
34
+ "@rollup/plugin-babel": "^5.3.0",
35
+ "@rollup/plugin-commonjs": "^18.0.0",
36
+ "@rollup/plugin-node-resolve": "^11.2.1",
37
+ "@types/node": "^15.6.1",
38
+ "del": "^5.1.0",
39
+ "rollup": "^2.46.0",
40
+ "rollup-plugin-terser": "^7.0.2",
41
+ "typescript": "^4.1.3",
42
+ "which": "^2.0.2"
43
+ }
44
+ }