@loaders.gl/worker-utils 4.0.0-alpha.4 → 4.0.0-alpha.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.
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/lib/async-queue/async-queue.d.ts +32 -0
- package/dist/lib/async-queue/async-queue.d.ts.map +1 -0
- package/dist/lib/env-utils/assert.d.ts +3 -0
- package/dist/lib/env-utils/assert.d.ts.map +1 -0
- package/dist/lib/env-utils/globals.d.ts +22 -0
- package/dist/lib/env-utils/globals.d.ts.map +1 -0
- package/dist/lib/env-utils/version.d.ts +2 -0
- package/dist/lib/env-utils/version.d.ts.map +1 -0
- package/dist/lib/env-utils/version.js +2 -2
- package/dist/lib/library-utils/library-utils.d.ts +18 -0
- package/dist/lib/library-utils/library-utils.d.ts.map +1 -0
- package/dist/lib/library-utils/library-utils.js +6 -2
- package/dist/lib/library-utils/library-utils.js.map +1 -1
- package/dist/lib/node/require-utils.node.d.ts +6 -0
- package/dist/lib/node/require-utils.node.d.ts.map +1 -0
- package/dist/lib/process-utils/child-process-proxy.d.ts +43 -0
- package/dist/lib/process-utils/child-process-proxy.d.ts.map +1 -0
- package/dist/lib/process-utils/process-utils.d.ts +2 -0
- package/dist/lib/process-utils/process-utils.d.ts.map +1 -0
- package/dist/lib/worker-api/create-worker.d.ts +9 -0
- package/dist/lib/worker-api/create-worker.d.ts.map +1 -0
- package/dist/lib/worker-api/get-worker-url.d.ts +14 -0
- package/dist/lib/worker-api/get-worker-url.d.ts.map +1 -0
- package/dist/lib/worker-api/get-worker-url.js +5 -1
- package/dist/lib/worker-api/get-worker-url.js.map +1 -1
- package/dist/lib/worker-api/process-on-worker.d.ts +20 -0
- package/dist/lib/worker-api/process-on-worker.d.ts.map +1 -0
- package/dist/lib/worker-api/validate-worker-version.d.ts +9 -0
- package/dist/lib/worker-api/validate-worker-version.d.ts.map +1 -0
- package/dist/lib/worker-farm/worker-body.d.ts +16 -0
- package/dist/lib/worker-farm/worker-body.d.ts.map +1 -0
- package/dist/lib/worker-farm/worker-farm.d.ts +55 -0
- package/dist/lib/worker-farm/worker-farm.d.ts.map +1 -0
- package/dist/lib/worker-farm/worker-job.d.ts +29 -0
- package/dist/lib/worker-farm/worker-job.d.ts.map +1 -0
- package/dist/lib/worker-farm/worker-pool.d.ts +75 -0
- package/dist/lib/worker-farm/worker-pool.d.ts.map +1 -0
- package/dist/lib/worker-farm/worker-thread.d.ts +42 -0
- package/dist/lib/worker-farm/worker-thread.d.ts.map +1 -0
- package/dist/lib/worker-utils/get-loadable-worker-url.d.ts +14 -0
- package/dist/lib/worker-utils/get-loadable-worker-url.d.ts.map +1 -0
- package/dist/lib/worker-utils/get-transfer-list.d.ts +10 -0
- package/dist/lib/worker-utils/get-transfer-list.d.ts.map +1 -0
- package/dist/lib/worker-utils/remove-nontransferable-options.d.ts +6 -0
- package/dist/lib/worker-utils/remove-nontransferable-options.d.ts.map +1 -0
- package/dist/null-worker.js +189 -550
- package/dist/null-worker.js.map +7 -1
- package/dist/types.d.ts +57 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/workers/null-worker.d.ts +2 -0
- package/dist/workers/null-worker.d.ts.map +1 -0
- package/package.json +7 -5
- package/src/lib/library-utils/library-utils.ts +5 -1
- package/src/lib/worker-api/get-worker-url.ts +10 -0
- package/src/types.ts +1 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkerObject } from './types';
|
|
2
|
+
export type { WorkerObject, WorkerOptions, WorkerMessage, WorkerMessageType, WorkerMessageData, WorkerMessagePayload } from './types';
|
|
3
|
+
export { assert } from './lib/env-utils/assert';
|
|
4
|
+
export { isBrowser, isWorker } from './lib/env-utils/globals';
|
|
5
|
+
export { default as WorkerJob } from './lib/worker-farm/worker-job';
|
|
6
|
+
export { default as WorkerThread } from './lib/worker-farm/worker-thread';
|
|
7
|
+
export { default as WorkerFarm } from './lib/worker-farm/worker-farm';
|
|
8
|
+
export { default as WorkerPool } from './lib/worker-farm/worker-pool';
|
|
9
|
+
export { default as WorkerBody } from './lib/worker-farm/worker-body';
|
|
10
|
+
export { processOnWorker, canProcessOnWorker } from './lib/worker-api/process-on-worker';
|
|
11
|
+
export { createWorker } from './lib/worker-api/create-worker';
|
|
12
|
+
export { getWorkerURL } from './lib/worker-api/get-worker-url';
|
|
13
|
+
export { validateWorkerVersion } from './lib/worker-api/validate-worker-version';
|
|
14
|
+
export { getTransferList } from './lib/worker-utils/get-transfer-list';
|
|
15
|
+
export { getLibraryUrl, loadLibrary } from './lib/library-utils/library-utils';
|
|
16
|
+
export { default as AsyncQueue } from './lib/async-queue/async-queue';
|
|
17
|
+
export { default as ChildProcessProxy } from './lib/process-utils/child-process-proxy';
|
|
18
|
+
/** A null worker to test that worker processing is functional */
|
|
19
|
+
export declare const NullWorker: WorkerObject;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAI1C,YAAY,EACV,YAAY,EACZ,aAAa,EAEb,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAC,MAAM,EAAC,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,yBAAyB,CAAC;AAG5D,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAGxE,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EAAC,eAAe,EAAE,kBAAkB,EAAC,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAC;AAG5D,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAC,qBAAqB,EAAC,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAC,eAAe,EAAC,MAAM,sCAAsC,CAAC;AAGrE,OAAO,EAAC,aAAa,EAAE,WAAW,EAAC,MAAM,mCAAmC,CAAC;AAG7E,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,+BAA+B,CAAC;AAGpE,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,yCAAyC,CAAC;AAIrF,iEAAiE;AACjE,eAAO,MAAM,UAAU,EAAE,YAQxB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Async Queue
|
|
3
|
+
* - AsyncIterable: An async iterator can be
|
|
4
|
+
* - Values can be pushed onto the queue
|
|
5
|
+
* @example
|
|
6
|
+
* const asyncQueue = new AsyncQueue();
|
|
7
|
+
* setTimeout(() => asyncQueue.enqueue('tick'), 1000);
|
|
8
|
+
* setTimeout(() => asyncQueue.enqueue(new Error('done')), 10000);
|
|
9
|
+
* for await (const value of asyncQueue) {
|
|
10
|
+
* console.log(value); // tick
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export default class AsyncQueue<T> {
|
|
14
|
+
private _values;
|
|
15
|
+
private _settlers;
|
|
16
|
+
private _closed;
|
|
17
|
+
constructor();
|
|
18
|
+
/** Return an async iterator for this queue */
|
|
19
|
+
[Symbol.asyncIterator](): AsyncIterator<T>;
|
|
20
|
+
/** Push a new value - the async iterator will yield a promise resolved to this value */
|
|
21
|
+
push(value: T): void;
|
|
22
|
+
/**
|
|
23
|
+
* Push a new value - the async iterator will yield a promise resolved to this value
|
|
24
|
+
* Add an error - the async iterator will yield a promise rejected with this value
|
|
25
|
+
*/
|
|
26
|
+
enqueue(value: T | Error): void;
|
|
27
|
+
/** Indicate that we not waiting for more values - The async iterator will be done */
|
|
28
|
+
close(): void;
|
|
29
|
+
/** @returns a Promise for an IteratorResult */
|
|
30
|
+
next(): Promise<IteratorResult<T, any>>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=async-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-queue.d.ts","sourceRoot":"","sources":["../../../src/lib/async-queue/async-queue.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU,CAAC,CAAC;IAC/B,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,OAAO,CAAU;;IAQzB,8CAA8C;IAC9C,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC;IAI1C,wFAAwF;IACxF,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAIpB;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,IAAI;IAoB/B,qFAAqF;IACrF,KAAK,IAAI,IAAI;IAUb,+CAA+C;IAC/C,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;CAuBxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../src/lib/env-utils/assert.ts"],"names":[],"mappings":"AAIA,4EAA4E;AAC5E,wBAAgB,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAI7D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const self_: {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
};
|
|
4
|
+
declare const window_: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
declare const global_: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
declare const document_: {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
export { self_ as self, window_ as window, global_ as global, document_ as document };
|
|
14
|
+
/** true if running in the browser, false if running in Node.js */
|
|
15
|
+
export declare const isBrowser: boolean;
|
|
16
|
+
/** true if running on a worker thread */
|
|
17
|
+
export declare const isWorker: boolean;
|
|
18
|
+
/** true if running on a mobile device */
|
|
19
|
+
export declare const isMobile: boolean;
|
|
20
|
+
/** Version of Node.js if running under Node, otherwise 0 */
|
|
21
|
+
export declare const nodeVersion: number;
|
|
22
|
+
//# sourceMappingURL=globals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/lib/env-utils/globals.ts"],"names":[],"mappings":"AAWA,QAAA,MAAM,KAAK,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAA0D,CAAC;AAC3F,QAAA,MAAM,OAAO,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAA0D,CAAC;AAC7F,QAAA,MAAM,OAAO,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAA0D,CAAC;AAC7F,QAAA,MAAM,SAAS,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAA0B,CAAC;AAE/D,OAAO,EAAC,KAAK,IAAI,IAAI,EAAE,OAAO,IAAI,MAAM,EAAE,OAAO,IAAI,MAAM,EAAE,SAAS,IAAI,QAAQ,EAAC,CAAC;AAEpF,kEAAkE;AAClE,eAAO,MAAM,SAAS,EAAE,OAEkE,CAAC;AAE3F,yCAAyC;AACzC,eAAO,MAAM,QAAQ,EAAE,OAA6C,CAAC;AAErE,yCAAyC;AACzC,eAAO,MAAM,QAAQ,EAAE,OACqD,CAAC;AAM7E,4DAA4D;AAC5D,eAAO,MAAM,WAAW,EAAE,MAAiD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/lib/env-utils/version.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,QAAqE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const DEFAULT_VERSION = 'beta';
|
|
2
|
-
export const VERSION = typeof "4.0.0-alpha.
|
|
2
|
+
export const VERSION = typeof "4.0.0-alpha.5" !== 'undefined' ? "4.0.0-alpha.5" : DEFAULT_VERSION;
|
|
3
3
|
|
|
4
|
-
if (typeof "4.0.0-alpha.
|
|
4
|
+
if (typeof "4.0.0-alpha.5" === 'undefined') {
|
|
5
5
|
console.error('loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.');
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamically loads a library ("module")
|
|
3
|
+
*
|
|
4
|
+
* - wasm library: Array buffer is returned
|
|
5
|
+
* - js library: Parse JS is returned
|
|
6
|
+
*
|
|
7
|
+
* Method depends on environment
|
|
8
|
+
* - browser - script element is created and installed on document
|
|
9
|
+
* - worker - eval is called on global context
|
|
10
|
+
* - node - file is required
|
|
11
|
+
*
|
|
12
|
+
* @param libraryUrl
|
|
13
|
+
* @param moduleName
|
|
14
|
+
* @param options
|
|
15
|
+
*/
|
|
16
|
+
export declare function loadLibrary(libraryUrl: string, moduleName?: string | null, options?: object): Promise<any>;
|
|
17
|
+
export declare function getLibraryUrl(library: string, moduleName?: string, options?: any): string;
|
|
18
|
+
//# sourceMappingURL=library-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/library-utils/library-utils.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,WAAW,CAC/B,UAAU,EAAE,MAAM,EAClB,UAAU,GAAE,MAAM,GAAG,IAAW,EAChC,OAAO,GAAE,MAAW,GACnB,OAAO,CAAC,GAAG,CAAC,CAWd;AAGD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,MAAM,CA8BzF"}
|
|
@@ -3,7 +3,7 @@ import * as node from '../node/require-utils.node';
|
|
|
3
3
|
import { assert } from '../env-utils/assert';
|
|
4
4
|
import { VERSION as __VERSION__ } from '../env-utils/version';
|
|
5
5
|
const LATEST = 'beta';
|
|
6
|
-
const VERSION = typeof "4.0.0-alpha.
|
|
6
|
+
const VERSION = typeof "4.0.0-alpha.5" !== 'undefined' ? "4.0.0-alpha.5" : LATEST;
|
|
7
7
|
const loadLibraryPromises = {};
|
|
8
8
|
export async function loadLibrary(libraryUrl, moduleName = null, options = {}) {
|
|
9
9
|
if (moduleName) {
|
|
@@ -47,7 +47,11 @@ async function loadLibraryFromFile(libraryUrl) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (!isBrowser) {
|
|
50
|
-
|
|
50
|
+
try {
|
|
51
|
+
return node && node.requireFromFile && (await node.requireFromFile(libraryUrl));
|
|
52
|
+
} catch {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
if (isWorker) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/library-utils/library-utils.ts"],"names":["global","isBrowser","isWorker","node","assert","VERSION","__VERSION__","LATEST","loadLibraryPromises","loadLibrary","libraryUrl","moduleName","options","getLibraryUrl","loadLibraryFromFile","library","startsWith","modules","CDN","endsWith","response","fetch","arrayBuffer","requireFromFile","importScripts","scriptSource","text","loadLibraryFromString","id","requireFromString","eval","call","script","document","createElement","appendChild","createTextNode","e","body"],"mappings":"AACA,SAAQA,MAAR,EAAgBC,SAAhB,EAA2BC,QAA3B,QAA0C,sBAA1C;AACA,OAAO,KAAKC,IAAZ,MAAsB,4BAAtB;AACA,SAAQC,MAAR,QAAqB,qBAArB;AACA,SAAQC,OAAO,IAAIC,WAAnB,QAAqC,sBAArC;AAGA,MAAMC,MAAM,GAAG,MAAf;AACA,MAAMF,OAAO,GAAG,2BAAuB,WAAvB,qBAAmDE,MAAnE;AAEA,MAAMC,mBAAiD,GAAG,EAA1D;AAiBA,OAAO,eAAeC,WAAf,CACLC,UADK,EAELC,UAAyB,GAAG,IAFvB,EAGLC,OAAe,GAAG,EAHb,EAIS;AACd,MAAID,UAAJ,EAAgB;AACdD,IAAAA,UAAU,GAAGG,aAAa,CAACH,UAAD,EAAaC,UAAb,EAAyBC,OAAzB,CAA1B;AACD;;AAIDJ,EAAAA,mBAAmB,CAACE,UAAD,CAAnB,GAEEF,mBAAmB,CAACE,UAAD,CAAnB,IAAmCI,mBAAmB,CAACJ,UAAD,CAFxD;AAGA,SAAO,MAAMF,mBAAmB,CAACE,UAAD,CAAhC;AACD;AAGD,OAAO,SAASG,aAAT,CAAuBE,OAAvB,EAAwCJ,UAAxC,EAA6DC,OAA7D,EAAoF;AAEzF,MAAIG,OAAO,CAACC,UAAR,CAAmB,MAAnB,CAAJ,EAAgC;AAC9B,WAAOD,OAAP;AACD;;AAGD,QAAME,OAAO,GAAGL,OAAO,CAACK,OAAR,IAAmB,EAAnC;;AACA,MAAIA,OAAO,CAACF,OAAD,CAAX,EAAsB;AACpB,WAAOE,OAAO,CAACF,OAAD,CAAd;AACD;;AAID,MAAI,CAACd,SAAL,EAAgB;AACd,6BAAkBU,UAAlB,wBAA0CI,OAA1C;AACD;;AAGD,MAAIH,OAAO,CAACM,GAAZ,EAAiB;AACfd,IAAAA,MAAM,CAACQ,OAAO,CAACM,GAAR,CAAYF,UAAZ,CAAuB,MAAvB,CAAD,CAAN;AACA,qBAAUJ,OAAO,CAACM,GAAlB,cAAyBP,UAAzB,cAAuCN,OAAvC,wBAA4DU,OAA5D;AACD;;AAGD,MAAIb,QAAJ,EAAc;AACZ,iCAAsBa,OAAtB;AACD;;AAED,2BAAkBJ,UAAlB,uBAAyCI,OAAzC;AACD;;AAED,eAAeD,mBAAf,CAAmCJ,UAAnC,EAAqE;AACnE,MAAIA,UAAU,CAACS,QAAX,CAAoB,MAApB,CAAJ,EAAiC;AAC/B,UAAMC,QAAQ,GAAG,MAAMC,KAAK,CAACX,UAAD,CAA5B;AACA,WAAO,MAAMU,QAAQ,CAACE,WAAT,EAAb;AACD;;AAED,MAAI,CAACrB,SAAL,EAAgB;AACd,
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/library-utils/library-utils.ts"],"names":["global","isBrowser","isWorker","node","assert","VERSION","__VERSION__","LATEST","loadLibraryPromises","loadLibrary","libraryUrl","moduleName","options","getLibraryUrl","loadLibraryFromFile","library","startsWith","modules","CDN","endsWith","response","fetch","arrayBuffer","requireFromFile","importScripts","scriptSource","text","loadLibraryFromString","id","requireFromString","eval","call","script","document","createElement","appendChild","createTextNode","e","body"],"mappings":"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","sourcesContent":["/* global importScripts */\nimport {global, isBrowser, isWorker} from '../env-utils/globals';\nimport * as node from '../node/require-utils.node';\nimport {assert} from '../env-utils/assert';\nimport {VERSION as __VERSION__} from '../env-utils/version';\n\n// TODO - unpkg.com doesn't seem to have a `latest` specifier for alpha releases...\nconst LATEST = 'beta';\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : LATEST;\n\nconst loadLibraryPromises: Record<string, Promise<any>> = {}; // promises\n\n/**\n * Dynamically loads a library (\"module\")\n *\n * - wasm library: Array buffer is returned\n * - js library: Parse JS is returned\n *\n * Method depends on environment\n * - browser - script element is created and installed on document\n * - worker - eval is called on global context\n * - node - file is required\n *\n * @param libraryUrl\n * @param moduleName\n * @param options\n */\nexport async function loadLibrary(\n libraryUrl: string,\n moduleName: string | null = null,\n options: object = {}\n): Promise<any> {\n if (moduleName) {\n libraryUrl = getLibraryUrl(libraryUrl, moduleName, options);\n }\n\n // Ensure libraries are only loaded once\n\n loadLibraryPromises[libraryUrl] =\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n loadLibraryPromises[libraryUrl] || loadLibraryFromFile(libraryUrl);\n return await loadLibraryPromises[libraryUrl];\n}\n\n// TODO - sort out how to resolve paths for main/worker and dev/prod\nexport function getLibraryUrl(library: string, moduleName?: string, options?: any): string {\n // Check if already a URL\n if (library.startsWith('http')) {\n return library;\n }\n\n // Allow application to import and supply libraries through `options.modules`\n const modules = options.modules || {};\n if (modules[library]) {\n return modules[library];\n }\n\n // Load from local files, not from CDN scripts in Node.js\n // TODO - needs to locate the modules directory when installed!\n if (!isBrowser) {\n return `modules/${moduleName}/dist/libs/${library}`;\n }\n\n // In browser, load from external scripts\n if (options.CDN) {\n assert(options.CDN.startsWith('http'));\n return `${options.CDN}/${moduleName}@${VERSION}/dist/libs/${library}`;\n }\n\n // TODO - loading inside workers requires paths relative to worker script location...\n if (isWorker) {\n return `../src/libs/${library}`;\n }\n\n return `modules/${moduleName}/src/libs/${library}`;\n}\n\nasync function loadLibraryFromFile(libraryUrl: string): Promise<any> {\n if (libraryUrl.endsWith('wasm')) {\n const response = await fetch(libraryUrl);\n return await response.arrayBuffer();\n }\n\n if (!isBrowser) {\n try {\n return node && node.requireFromFile && (await node.requireFromFile(libraryUrl));\n } catch {\n return null;\n }\n }\n if (isWorker) {\n return importScripts(libraryUrl);\n }\n // TODO - fix - should be more secure than string parsing since observes CORS\n // if (isBrowser) {\n // return await loadScriptFromFile(libraryUrl);\n // }\n\n const response = await fetch(libraryUrl);\n const scriptSource = await response.text();\n return loadLibraryFromString(scriptSource, libraryUrl);\n}\n\n/*\nasync function loadScriptFromFile(libraryUrl) {\n const script = document.createElement('script');\n script.src = libraryUrl;\n return await new Promise((resolve, reject) => {\n script.onload = data => {\n resolve(data);\n };\n script.onerror = reject;\n });\n}\n*/\n\n// TODO - Needs security audit...\n// - Raw eval call\n// - Potentially bypasses CORS\n// Upside is that this separates fetching and parsing\n// we could create a`LibraryLoader` or`ModuleLoader`\nfunction loadLibraryFromString(scriptSource: string, id: string): null | any {\n if (!isBrowser) {\n return node.requireFromString && node.requireFromString(scriptSource, id);\n }\n\n if (isWorker) {\n // Use lvalue trick to make eval run in global scope\n eval.call(global, scriptSource); // eslint-disable-line no-eval\n // https://stackoverflow.com/questions/9107240/1-evalthis-vs-evalthis-in-javascript\n // http://perfectionkills.com/global-eval-what-are-the-options/\n return null;\n }\n\n const script = document.createElement('script');\n script.id = id;\n // most browsers like a separate text node but some throw an error. The second method covers those.\n try {\n script.appendChild(document.createTextNode(scriptSource));\n } catch (e) {\n script.text = scriptSource;\n }\n document.body.appendChild(script);\n return null;\n}\n\n// TODO - technique for module injection into worker, from THREE.DracoLoader...\n/*\nfunction combineWorkerWithLibrary(worker, jsContent) {\n var fn = wWorker.toString();\n var body = [\n '// injected',\n jsContent,\n '',\n '// worker',\n fn.substring(fn.indexOf('{') + 1, fn.lastIndexOf('}'))\n ].join('\\n');\n this.workerSourceURL = URL.createObjectURL(new Blob([body]));\n}\n*/\n"],"file":"library-utils.js"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function requireFromFile(filename: string): Promise<any>;
|
|
2
|
+
export declare function requireFromString(code: string, filename?: string, options?: {
|
|
3
|
+
prependPaths?: string[];
|
|
4
|
+
appendPaths?: string[];
|
|
5
|
+
}): any;
|
|
6
|
+
//# sourceMappingURL=require-utils.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require-utils.node.d.ts","sourceRoot":"","sources":["../../../src/lib/node/require-utils.node.ts"],"names":[],"mappings":"AAaA,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAWpE;AAQD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,SAAK,EACb,OAAO,CAAC,EAAE;IACR,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,GACA,GAAG,CA6BL"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as ChildProcess from 'child_process';
|
|
3
|
+
export declare type ChildProcessProxyProps = {
|
|
4
|
+
command: string;
|
|
5
|
+
arguments: string[];
|
|
6
|
+
/** Whether to add a port specified arg */
|
|
7
|
+
portArg?: string;
|
|
8
|
+
/** Base port number */
|
|
9
|
+
port?: number;
|
|
10
|
+
/** Whether to search for an available port if the base port is occupied */
|
|
11
|
+
autoPort?: boolean;
|
|
12
|
+
/** Number of milliseconds to wait until concluding success */
|
|
13
|
+
/** wait: 0 - infinity */
|
|
14
|
+
wait?: number;
|
|
15
|
+
/** Options passed on to Node'.js `spawn` */
|
|
16
|
+
spawn?: ChildProcess.SpawnOptionsWithoutStdio;
|
|
17
|
+
/** Callback when the */
|
|
18
|
+
onStart?: (proxy: ChildProcessProxy) => void;
|
|
19
|
+
onSuccess?: (proxy: ChildProcessProxy) => void;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Manager for a Node.js child process
|
|
23
|
+
* Prepares arguments, starts, stops and tracks output
|
|
24
|
+
*/
|
|
25
|
+
export default class ChildProcessProxy {
|
|
26
|
+
id: string;
|
|
27
|
+
props: ChildProcessProxyProps;
|
|
28
|
+
private childProcess;
|
|
29
|
+
private port;
|
|
30
|
+
private successTimer?;
|
|
31
|
+
constructor({ id }?: {
|
|
32
|
+
id?: string | undefined;
|
|
33
|
+
});
|
|
34
|
+
/** Starts a child process with the provided props */
|
|
35
|
+
start(props: ChildProcessProxyProps): Promise<object>;
|
|
36
|
+
/** Stops a running child process */
|
|
37
|
+
stop(): Promise<void>;
|
|
38
|
+
/** Exits this process */
|
|
39
|
+
exit(statusCode?: number): Promise<void>;
|
|
40
|
+
_setTimeout(callback: (...args: any[]) => void): void;
|
|
41
|
+
_clearTimeout(): void;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=child-process-proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child-process-proxy.d.ts","sourceRoot":"","sources":["../../../src/lib/process-utils/child-process-proxy.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAG9C,oBAAY,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,KAAK,CAAC,EAAE,YAAY,CAAC,wBAAwB,CAAC;IAC9C,yBAAyB;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAChD,CAAC;AAaF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,sBAAsB,CAAsB;IACnD,OAAO,CAAC,YAAY,CAA0C;IAC9D,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,YAAY,CAAC,CAAM;gBAGf,EAAC,EAAqB,EAAC;;KAAK;IAIxC,qDAAqD;IAC/C,KAAK,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAsD3D,oCAAoC;IAC9B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,yBAAyB;IACnB,IAAI,CAAC,UAAU,GAAE,MAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAYjD,WAAW,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;IAM9C,aAAa;CAKd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/process-utils/process-utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,WAAW,GAAE,MAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAyB5E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WorkerContext, Process, ProcessInBatches } from '../../types';
|
|
2
|
+
export declare type ProcessOnMainThread = (data: any, options?: {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}, context?: WorkerContext) => any;
|
|
5
|
+
/**
|
|
6
|
+
* Set up a WebWorkerGlobalScope to talk with the main thread
|
|
7
|
+
*/
|
|
8
|
+
export declare function createWorker(process: Process, processInBatches?: ProcessInBatches): void;
|
|
9
|
+
//# sourceMappingURL=create-worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-worker.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-api/create-worker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,aAAa,EACb,OAAO,EACP,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAUrB,oBAAY,mBAAmB,GAAG,CAChC,IAAI,EAAE,GAAG,EACT,OAAO,CAAC,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,EAC9B,OAAO,CAAC,EAAE,aAAa,KACpB,GAAG,CAAC;AAET;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAkDxF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkerObject, WorkerOptions } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Gets worker object's name (for debugging in Chrome thread inspector window)
|
|
4
|
+
*/
|
|
5
|
+
export declare function getWorkerName(worker: WorkerObject): string;
|
|
6
|
+
/**
|
|
7
|
+
* Generate a worker URL based on worker object and options
|
|
8
|
+
* @returns A URL to one of the following:
|
|
9
|
+
* - a published worker on unpkg CDN
|
|
10
|
+
* - a local test worker
|
|
11
|
+
* - a URL provided by the user in options
|
|
12
|
+
*/
|
|
13
|
+
export declare function getWorkerURL(worker: WorkerObject, options?: WorkerOptions): string;
|
|
14
|
+
//# sourceMappingURL=get-worker-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-worker-url.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-api/get-worker-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,aAAa,EAAC,MAAM,aAAa,CAAC;AAO7D;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAG1D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAwCtF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assert } from '../env-utils/assert';
|
|
2
2
|
import { VERSION as __VERSION__ } from '../env-utils/version';
|
|
3
3
|
const NPM_TAG = 'beta';
|
|
4
|
-
const VERSION = typeof "4.0.0-alpha.
|
|
4
|
+
const VERSION = typeof "4.0.0-alpha.5" !== 'undefined' ? "4.0.0-alpha.5" : NPM_TAG;
|
|
5
5
|
export function getWorkerName(worker) {
|
|
6
6
|
const warning = worker.version !== VERSION ? " (worker-utils@".concat(VERSION, ")") : '';
|
|
7
7
|
return "".concat(worker.name, "@").concat(worker.version).concat(warning);
|
|
@@ -11,6 +11,10 @@ export function getWorkerURL(worker, options = {}) {
|
|
|
11
11
|
const workerFile = "".concat(worker.id, "-worker.js");
|
|
12
12
|
let url = workerOptions.workerUrl;
|
|
13
13
|
|
|
14
|
+
if (!url && worker.id === 'compression') {
|
|
15
|
+
url = options.workerUrl;
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
if (options._workerType === 'test') {
|
|
15
19
|
url = "modules/".concat(worker.module, "/dist/").concat(workerFile);
|
|
16
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/worker-api/get-worker-url.ts"],"names":["assert","VERSION","__VERSION__","NPM_TAG","getWorkerName","worker","warning","version","name","getWorkerURL","options","workerOptions","id","workerFile","url","workerUrl","_workerType","module","versionTag"],"mappings":"AACA,SAAQA,MAAR,QAAqB,qBAArB;AACA,SAAQC,OAAO,IAAIC,WAAnB,QAAqC,sBAArC;AAEA,MAAMC,OAAO,GAAG,MAAhB;AACA,MAAMF,OAAO,GAAG,2BAAuB,WAAvB,qBAAmDE,OAAnE;AAKA,OAAO,SAASC,aAAT,CAAuBC,MAAvB,EAAqD;AAC1D,QAAMC,OAAO,GAAGD,MAAM,CAACE,OAAP,KAAmBN,OAAnB,4BAA+CA,OAA/C,SAA4D,EAA5E;AACA,mBAAUI,MAAM,CAACG,IAAjB,cAAyBH,MAAM,CAACE,OAAhC,SAA0CD,OAA1C;AACD;AASD,OAAO,SAASG,YAAT,CAAsBJ,MAAtB,EAA4CK,OAAsB,GAAG,EAArE,EAAiF;AACtF,QAAMC,aAAa,GAAGD,OAAO,CAACL,MAAM,CAACO,EAAR,CAAP,IAAsB,EAA5C;AAEA,QAAMC,UAAU,aAAMR,MAAM,CAACO,EAAb,eAAhB;AAEA,MAAIE,GAAG,GAAGH,aAAa,CAACI,SAAxB;;
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/worker-api/get-worker-url.ts"],"names":["assert","VERSION","__VERSION__","NPM_TAG","getWorkerName","worker","warning","version","name","getWorkerURL","options","workerOptions","id","workerFile","url","workerUrl","_workerType","module","versionTag"],"mappings":"AACA,SAAQA,MAAR,QAAqB,qBAArB;AACA,SAAQC,OAAO,IAAIC,WAAnB,QAAqC,sBAArC;AAEA,MAAMC,OAAO,GAAG,MAAhB;AACA,MAAMF,OAAO,GAAG,2BAAuB,WAAvB,qBAAmDE,OAAnE;AAKA,OAAO,SAASC,aAAT,CAAuBC,MAAvB,EAAqD;AAC1D,QAAMC,OAAO,GAAGD,MAAM,CAACE,OAAP,KAAmBN,OAAnB,4BAA+CA,OAA/C,SAA4D,EAA5E;AACA,mBAAUI,MAAM,CAACG,IAAjB,cAAyBH,MAAM,CAACE,OAAhC,SAA0CD,OAA1C;AACD;AASD,OAAO,SAASG,YAAT,CAAsBJ,MAAtB,EAA4CK,OAAsB,GAAG,EAArE,EAAiF;AACtF,QAAMC,aAAa,GAAGD,OAAO,CAACL,MAAM,CAACO,EAAR,CAAP,IAAsB,EAA5C;AAEA,QAAMC,UAAU,aAAMR,MAAM,CAACO,EAAb,eAAhB;AAEA,MAAIE,GAAG,GAAGH,aAAa,CAACI,SAAxB;;AAQA,MAAI,CAACD,GAAD,IAAQT,MAAM,CAACO,EAAP,KAAc,aAA1B,EAAyC;AACvCE,IAAAA,GAAG,GAAGJ,OAAO,CAACK,SAAd;AACD;;AAID,MAAIL,OAAO,CAACM,WAAR,KAAwB,MAA5B,EAAoC;AAClCF,IAAAA,GAAG,qBAAcT,MAAM,CAACY,MAArB,mBAAoCJ,UAApC,CAAH;AACD;;AAGD,MAAI,CAACC,GAAL,EAAU;AAER,QAAIP,OAAO,GAAGF,MAAM,CAACE,OAArB;;AAEA,QAAIA,OAAO,KAAK,QAAhB,EAA0B;AAExBA,MAAAA,OAAO,GAAGJ,OAAV;AACD;;AACD,UAAMe,UAAU,GAAGX,OAAO,cAAOA,OAAP,IAAmB,EAA7C;AACAO,IAAAA,GAAG,2CAAoCT,MAAM,CAACY,MAA3C,SAAoDC,UAApD,mBAAuEL,UAAvE,CAAH;AACD;;AAEDb,EAAAA,MAAM,CAACc,GAAD,CAAN;AAGA,SAAOA,GAAP;AACD","sourcesContent":["import type {WorkerObject, WorkerOptions} from '../../types';\nimport {assert} from '../env-utils/assert';\nimport {VERSION as __VERSION__} from '../env-utils/version';\n\nconst NPM_TAG = 'beta'; // Change to 'latest' on release-branch\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : NPM_TAG;\n\n/**\n * Gets worker object's name (for debugging in Chrome thread inspector window)\n */\nexport function getWorkerName(worker: WorkerObject): string {\n const warning = worker.version !== VERSION ? ` (worker-utils@${VERSION})` : '';\n return `${worker.name}@${worker.version}${warning}`;\n}\n\n/**\n * Generate a worker URL based on worker object and options\n * @returns A URL to one of the following:\n * - a published worker on unpkg CDN\n * - a local test worker\n * - a URL provided by the user in options\n */\nexport function getWorkerURL(worker: WorkerObject, options: WorkerOptions = {}): string {\n const workerOptions = options[worker.id] || {};\n\n const workerFile = `${worker.id}-worker.js`;\n\n let url = workerOptions.workerUrl;\n\n // HACK: Allow for non-nested workerUrl for the CompressionWorker.\n // For the compression worker, workerOptions is currently not nested correctly. For most loaders,\n // you'd have options within an object, i.e. `{mvt: {coordinates: ...}}` but the CompressionWorker\n // puts options at the top level, not within a `compression` key (its `id`). For this reason, the\n // above `workerOptions` will always be a string (i.e. `'gzip'`) for the CompressionWorker. To not\n // break backwards compatibility, we allow the CompressionWorker to have options at the top level.\n if (!url && worker.id === 'compression') {\n url = options.workerUrl;\n }\n\n // If URL is test, generate local loaders.gl url\n // @ts-ignore _workerType\n if (options._workerType === 'test') {\n url = `modules/${worker.module}/dist/${workerFile}`;\n }\n\n // If url override is not provided, generate a URL to published version on npm CDN unpkg.com\n if (!url) {\n // GENERATE\n let version = worker.version;\n // On master we need to load npm alpha releases published with the `beta` tag\n if (version === 'latest') {\n // throw new Error('latest worker version specified');\n version = NPM_TAG;\n }\n const versionTag = version ? `@${version}` : '';\n url = `https://unpkg.com/@loaders.gl/${worker.module}${versionTag}/dist/${workerFile}`;\n }\n\n assert(url);\n\n // Allow user to override location\n return url;\n}\n"],"file":"get-worker-url.js"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { WorkerObject, WorkerOptions, WorkerContext } from '../../types';
|
|
2
|
+
declare type ProcessOnWorkerOptions = WorkerOptions & {
|
|
3
|
+
jobName?: string;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Determines if we can parse with worker
|
|
8
|
+
* @param loader
|
|
9
|
+
* @param data
|
|
10
|
+
* @param options
|
|
11
|
+
*/
|
|
12
|
+
export declare function canProcessOnWorker(worker: WorkerObject, options?: WorkerOptions): boolean | "" | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* This function expects that the worker thread sends certain messages,
|
|
15
|
+
* Creating such a worker can be automated if the worker is wrapper by a call to
|
|
16
|
+
* createWorker in @loaders.gl/worker-utils.
|
|
17
|
+
*/
|
|
18
|
+
export declare function processOnWorker(worker: WorkerObject, data: any, options?: ProcessOnWorkerOptions, context?: WorkerContext): Promise<any>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=process-on-worker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-on-worker.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-api/process-on-worker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,aAAa,EAGd,MAAM,aAAa,CAAC;AAMrB,aAAK,sBAAsB,GAAG,aAAa,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa,4BAM/E;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,GAAG,EACT,OAAO,GAAE,sBAA2B,EACpC,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,GAAG,CAAC,CAoBd"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WorkerObject } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Check if worker is compatible with this library version
|
|
4
|
+
* @param worker
|
|
5
|
+
* @param libVersion
|
|
6
|
+
* @returns `true` if the two versions are compatible
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateWorkerVersion(worker: WorkerObject, coreVersion?: string): boolean;
|
|
9
|
+
//# sourceMappingURL=validate-worker-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-worker-version.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-api/validate-worker-version.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAI9C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,WAAW,GAAE,MAAgB,GAC5B,OAAO,CAmBT"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { WorkerMessageType, WorkerMessagePayload } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Type safe wrapper for worker code
|
|
4
|
+
*/
|
|
5
|
+
export default class WorkerBody {
|
|
6
|
+
static set onmessage(onMessage: (type: WorkerMessageType, payload: WorkerMessagePayload) => any);
|
|
7
|
+
static addEventListener(onMessage: (type: WorkerMessageType, payload: WorkerMessagePayload) => any): void;
|
|
8
|
+
static removeEventListener(onMessage: (type: WorkerMessageType, payload: WorkerMessagePayload) => any): void;
|
|
9
|
+
/**
|
|
10
|
+
* Send a message from a worker to creating thread (main thread)
|
|
11
|
+
* @param type
|
|
12
|
+
* @param payload
|
|
13
|
+
*/
|
|
14
|
+
static postMessage(type: WorkerMessageType, payload: WorkerMessagePayload): void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=worker-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-body.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-farm/worker-body.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAK5F;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAI7B,MAAM,KAAK,SAAS,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB,KAAK,GAAG,EAW9F;IAED,MAAM,CAAC,gBAAgB,CACrB,SAAS,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB,KAAK,GAAG;IAoB5E,MAAM,CAAC,mBAAmB,CACxB,SAAS,EAAE,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB,KAAK,GAAG;IAQ5E;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB,GAAG,IAAI;CASjF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import WorkerPool from './worker-pool';
|
|
2
|
+
/**
|
|
3
|
+
* @param maxConcurrency {number} - max count of workers
|
|
4
|
+
*/
|
|
5
|
+
export declare type WorkerFarmProps = {
|
|
6
|
+
maxConcurrency?: number;
|
|
7
|
+
maxMobileConcurrency?: number;
|
|
8
|
+
reuseWorkers?: boolean;
|
|
9
|
+
onDebug?: () => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Process multiple jobs with a "farm" of different workers in worker pools.
|
|
13
|
+
*/
|
|
14
|
+
export default class WorkerFarm {
|
|
15
|
+
private props;
|
|
16
|
+
private workerPools;
|
|
17
|
+
private static _workerFarm?;
|
|
18
|
+
/** Check if Workers are supported */
|
|
19
|
+
static isSupported(): boolean;
|
|
20
|
+
/** Get the singleton instance of the global worker farm */
|
|
21
|
+
static getWorkerFarm(props?: WorkerFarmProps): WorkerFarm;
|
|
22
|
+
/** get global instance with WorkerFarm.getWorkerFarm() */
|
|
23
|
+
private constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Terminate all workers in the farm
|
|
26
|
+
* @note Can free up significant memory
|
|
27
|
+
*/
|
|
28
|
+
destroy(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Set props used when initializing worker pools
|
|
31
|
+
* @param props
|
|
32
|
+
*/
|
|
33
|
+
setProps(props: WorkerFarmProps): void;
|
|
34
|
+
/**
|
|
35
|
+
* Returns a worker pool for the specified worker
|
|
36
|
+
* @param options - only used first time for a specific worker name
|
|
37
|
+
* @param options.name - the name of the worker - used to identify worker pool
|
|
38
|
+
* @param options.url -
|
|
39
|
+
* @param options.source -
|
|
40
|
+
* @example
|
|
41
|
+
* const job = WorkerFarm.getWorkerFarm().getWorkerPool({name, url}).startJob(...);
|
|
42
|
+
*/
|
|
43
|
+
getWorkerPool(options: {
|
|
44
|
+
name: string;
|
|
45
|
+
source?: string;
|
|
46
|
+
url?: string;
|
|
47
|
+
}): WorkerPool;
|
|
48
|
+
_getWorkerPoolProps(): {
|
|
49
|
+
maxConcurrency: number | undefined;
|
|
50
|
+
maxMobileConcurrency: number | undefined;
|
|
51
|
+
reuseWorkers: boolean | undefined;
|
|
52
|
+
onDebug: (() => void) | undefined;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=worker-farm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-farm.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-farm/worker-farm.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,eAAe,CAAC;AAGvC;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AASF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,WAAW,CAAiC;IAEpD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAa;IAExC,qCAAqC;IACrC,MAAM,CAAC,WAAW,IAAI,OAAO;IAI7B,2DAA2D;IAC3D,MAAM,CAAC,aAAa,CAAC,KAAK,GAAE,eAAoB,GAAG,UAAU;IAM7D,0DAA0D;IAC1D,OAAO;IAOP;;;OAGG;IACH,OAAO,IAAI,IAAI;IAMf;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI;IAQtC;;;;;;;;OAQG;IACH,aAAa,CAAC,OAAO,EAAE;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,UAAU;IAejF,mBAAmB;;;;;;CAQpB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { WorkerMessageType, WorkerMessagePayload } from '../../types';
|
|
2
|
+
import WorkerThread from './worker-thread';
|
|
3
|
+
/**
|
|
4
|
+
* Represents one Job handled by a WorkerPool or WorkerFarm
|
|
5
|
+
*/
|
|
6
|
+
export default class WorkerJob {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly workerThread: WorkerThread;
|
|
9
|
+
isRunning: boolean;
|
|
10
|
+
/** Promise that resolves when Job is done */
|
|
11
|
+
readonly result: Promise<any>;
|
|
12
|
+
private _resolve;
|
|
13
|
+
private _reject;
|
|
14
|
+
constructor(jobName: string, workerThread: WorkerThread);
|
|
15
|
+
/**
|
|
16
|
+
* Send a message to the job's worker thread
|
|
17
|
+
* @param data any data structure, ideally consisting mostly of transferrable objects
|
|
18
|
+
*/
|
|
19
|
+
postMessage(type: WorkerMessageType, payload: WorkerMessagePayload): void;
|
|
20
|
+
/**
|
|
21
|
+
* Call to resolve the `result` Promise with the supplied value
|
|
22
|
+
*/
|
|
23
|
+
done(value: any): void;
|
|
24
|
+
/**
|
|
25
|
+
* Call to reject the `result` Promise with the supplied error
|
|
26
|
+
*/
|
|
27
|
+
error(error: Error): void;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=worker-job.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-job.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-farm/worker-job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,aAAa,CAAC;AACzE,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAG3C;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAE9B,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,OAAO,CAAyB;gBAE5B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY;IAYvD;;;OAGG;IACH,WAAW,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAQzE;;OAEG;IACH,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAMtB;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAK1B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { WorkerMessageType, WorkerMessagePayload } from '../../types';
|
|
2
|
+
import WorkerThread from './worker-thread';
|
|
3
|
+
import WorkerJob from './worker-job';
|
|
4
|
+
/** WorkerPool onDebug Callback Parameters */
|
|
5
|
+
declare type OnDebugParameters = {
|
|
6
|
+
message: string;
|
|
7
|
+
worker: string;
|
|
8
|
+
name: string;
|
|
9
|
+
job: string;
|
|
10
|
+
backlog: number;
|
|
11
|
+
workerThread: WorkerThread;
|
|
12
|
+
};
|
|
13
|
+
/** WorkerPool Properties */
|
|
14
|
+
export declare type WorkerPoolProps = {
|
|
15
|
+
name?: string;
|
|
16
|
+
source?: string;
|
|
17
|
+
url?: string;
|
|
18
|
+
maxConcurrency?: number;
|
|
19
|
+
maxMobileConcurrency?: number;
|
|
20
|
+
onDebug?: (options: OnDebugParameters) => any;
|
|
21
|
+
reuseWorkers?: boolean;
|
|
22
|
+
};
|
|
23
|
+
/** Private helper types */
|
|
24
|
+
declare type OnMessage = (job: WorkerJob, type: WorkerMessageType, payload: WorkerMessagePayload) => void;
|
|
25
|
+
declare type OnError = (job: WorkerJob, error: Error) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Process multiple data messages with small pool of identical workers
|
|
28
|
+
*/
|
|
29
|
+
export default class WorkerPool {
|
|
30
|
+
name: string;
|
|
31
|
+
source?: string;
|
|
32
|
+
url?: string;
|
|
33
|
+
maxConcurrency: number;
|
|
34
|
+
maxMobileConcurrency: number;
|
|
35
|
+
onDebug: (options: OnDebugParameters) => any;
|
|
36
|
+
reuseWorkers: boolean;
|
|
37
|
+
private props;
|
|
38
|
+
private jobQueue;
|
|
39
|
+
private idleQueue;
|
|
40
|
+
private count;
|
|
41
|
+
private isDestroyed;
|
|
42
|
+
/**
|
|
43
|
+
* @param processor - worker function
|
|
44
|
+
* @param maxConcurrency - max count of workers
|
|
45
|
+
*/
|
|
46
|
+
constructor(props: WorkerPoolProps);
|
|
47
|
+
/**
|
|
48
|
+
* Terminates all workers in the pool
|
|
49
|
+
* @note Can free up significant memory
|
|
50
|
+
*/
|
|
51
|
+
destroy(): void;
|
|
52
|
+
setProps(props: WorkerPoolProps): void;
|
|
53
|
+
startJob(name: string, onMessage?: OnMessage, onError?: OnError): Promise<WorkerJob>;
|
|
54
|
+
/**
|
|
55
|
+
* Starts first queued job if worker is available or can be created
|
|
56
|
+
* Called when job is started and whenever a worker returns to the idleQueue
|
|
57
|
+
*/
|
|
58
|
+
_startQueuedJob(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Returns a worker to the idle queue
|
|
61
|
+
* Destroys the worker if
|
|
62
|
+
* - pool is destroyed
|
|
63
|
+
* - if this pool doesn't reuse workers
|
|
64
|
+
* - if maxConcurrency has been lowered
|
|
65
|
+
* @param worker
|
|
66
|
+
*/
|
|
67
|
+
returnWorkerToQueue(worker: WorkerThread): void;
|
|
68
|
+
/**
|
|
69
|
+
* Returns idle worker or creates new worker if maxConcurrency has not been reached
|
|
70
|
+
*/
|
|
71
|
+
_getAvailableWorker(): WorkerThread | null;
|
|
72
|
+
_getMaxConcurrency(): number;
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=worker-pool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-pool.d.ts","sourceRoot":"","sources":["../../../src/lib/worker-farm/worker-pool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,oBAAoB,EAAC,MAAM,aAAa,CAAC;AAEzE,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,6CAA6C;AAC7C,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF,4BAA4B;AAC5B,oBAAY,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,GAAG,CAAC;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,2BAA2B;AAC3B,aAAK,SAAS,GAAG,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;AAClG,aAAK,OAAO,GAAG,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAStD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,UAAU;IAC7B,IAAI,EAAE,MAAM,CAAa;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAK;IAC3B,oBAAoB,EAAE,MAAM,CAAK;IACjC,OAAO,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,GAAG,CAAY;IACxD,YAAY,EAAE,OAAO,CAAQ;IAE7B,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,QAAQ,CAAmB;IACnC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,WAAW,CAAS;IAE5B;;;OAGG;gBACS,KAAK,EAAE,eAAe;IAMlC;;;OAGG;IACH,OAAO,IAAI,IAAI;IAMf,QAAQ,CAAC,KAAK,EAAE,eAAe;IAoBzB,QAAQ,CACZ,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,SAA+C,EAC1D,OAAO,GAAE,OAA0C,GAClD,OAAO,CAAC,SAAS,CAAC;IAarB;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAyCtC;;;;;;;OAOG;IACH,mBAAmB,CAAC,MAAM,EAAE,YAAY;IAgBxC;;OAEG;IACH,mBAAmB,IAAI,YAAY,GAAG,IAAI;IAiB1C,kBAAkB;CAGnB"}
|