@xylabs/threads 4.6.3 → 4.7.0-rc.1
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/browser/master/implementation.browser.mjs +89 -0
- package/dist/browser/master/implementation.browser.mjs.map +1 -0
- package/dist/browser/worker/worker.browser.mjs +291 -0
- package/dist/browser/worker/worker.browser.mjs.map +1 -0
- package/dist/neutral/index.mjs +1022 -0
- package/dist/neutral/index.mjs.map +1 -0
- package/dist/neutral/master/implementation.mjs +264 -0
- package/dist/neutral/master/implementation.mjs.map +1 -0
- package/dist/neutral/master/index.mjs +988 -0
- package/dist/neutral/master/index.mjs.map +1 -0
- package/dist/neutral/master/pool.mjs +579 -0
- package/dist/neutral/master/pool.mjs.map +1 -0
- package/dist/neutral/master/register.mjs +272 -0
- package/dist/neutral/master/register.mjs.map +1 -0
- package/dist/neutral/master/spawn.mjs +412 -0
- package/dist/neutral/master/spawn.mjs.map +1 -0
- package/dist/neutral/master/thread.mjs +29 -0
- package/dist/neutral/master/thread.mjs.map +1 -0
- package/dist/neutral/observable-promise.mjs +132 -0
- package/dist/neutral/observable-promise.mjs.map +1 -0
- package/dist/neutral/observable.mjs +31 -0
- package/dist/neutral/observable.mjs.map +1 -0
- package/dist/node/master/implementation.node.mjs +154 -0
- package/dist/node/master/implementation.node.mjs.map +1 -0
- package/dist/node/worker/worker.node.mjs +304 -0
- package/dist/node/worker/worker.node.mjs.map +1 -0
- package/dist/{common.d.ts → types/common.d.ts} +5 -1
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{master → types/master}/get-bundle-url.browser.d.ts +1 -0
- package/dist/types/master/get-bundle-url.browser.d.ts.map +1 -0
- package/dist/{master → types/master}/implementation.browser.d.ts +2 -1
- package/dist/types/master/implementation.browser.d.ts.map +1 -0
- package/dist/{master → types/master}/implementation.d.ts +4 -1
- package/dist/types/master/implementation.d.ts.map +1 -0
- package/dist/{master → types/master}/implementation.node.d.ts +2 -1
- package/dist/types/master/implementation.node.d.ts.map +1 -0
- package/dist/types/master/index.d.ts +13 -0
- package/dist/types/master/index.d.ts.map +1 -0
- package/dist/{master → types/master}/invocation-proxy.d.ts +2 -1
- package/dist/types/master/invocation-proxy.d.ts.map +1 -0
- package/dist/{master → types/master}/pool-types.d.ts +16 -1
- package/dist/types/master/pool-types.d.ts.map +1 -0
- package/dist/types/master/pool.d.ts +93 -0
- package/dist/types/master/pool.d.ts.map +1 -0
- package/dist/types/master/register.d.ts +2 -0
- package/dist/types/master/register.d.ts.map +1 -0
- package/dist/{master → types/master}/spawn.d.ts +12 -2
- package/dist/types/master/spawn.d.ts.map +1 -0
- package/dist/types/master/thread.d.ts +13 -0
- package/dist/types/master/thread.d.ts.map +1 -0
- package/dist/{observable-promise.d.ts → types/observable-promise.d.ts} +14 -0
- package/dist/types/observable-promise.d.ts.map +1 -0
- package/dist/types/observable.d.ts +21 -0
- package/dist/types/observable.d.ts.map +1 -0
- package/dist/{ponyfills.d.ts → types/ponyfills.d.ts} +1 -0
- package/dist/types/ponyfills.d.ts.map +1 -0
- package/dist/types/promise.d.ts +6 -0
- package/dist/types/promise.d.ts.map +1 -0
- package/dist/{serializers.d.ts → types/serializers.d.ts} +1 -0
- package/dist/types/serializers.d.ts.map +1 -0
- package/dist/{symbols.d.ts → types/symbols.d.ts} +1 -0
- package/dist/types/symbols.d.ts.map +1 -0
- package/{src/transferable.ts → dist/types/transferable.d.ts} +8 -33
- package/dist/types/transferable.d.ts.map +1 -0
- package/dist/types/{master.d.ts → types/master.d.ts} +17 -3
- package/dist/types/types/master.d.ts.map +1 -0
- package/dist/types/{messages.d.ts → types/messages.d.ts} +1 -0
- package/dist/types/types/messages.d.ts.map +1 -0
- package/dist/types/{worker.d.ts → types/worker.d.ts} +1 -0
- package/dist/types/types/worker.d.ts.map +1 -0
- package/dist/types/worker/WorkerGlobalScope.d.ts +6 -0
- package/dist/types/worker/WorkerGlobalScope.d.ts.map +1 -0
- package/dist/types/worker/expose.d.ts +4 -0
- package/dist/types/worker/expose.d.ts.map +1 -0
- package/dist/types/worker/worker.browser.d.ts +14 -0
- package/dist/types/worker/worker.browser.d.ts.map +1 -0
- package/dist/types/worker/worker.node.d.ts +25 -0
- package/dist/types/worker/worker.node.d.ts.map +1 -0
- package/package.json +53 -93
- package/dist/common.js +0 -16
- package/dist/esm/common.js +0 -16
- package/dist/esm/index.js +0 -26
- package/dist/esm/master/get-bundle-url.browser.js +0 -25
- package/dist/esm/master/implementation.browser.js +0 -65
- package/dist/esm/master/implementation.js +0 -43
- package/dist/esm/master/implementation.node.js +0 -205
- package/dist/esm/master/index.js +0 -14
- package/dist/esm/master/invocation-proxy.js +0 -121
- package/dist/esm/master/pool-types.js +0 -14
- package/dist/esm/master/pool.js +0 -262
- package/dist/esm/master/register.js +0 -11
- package/dist/esm/master/spawn.js +0 -114
- package/dist/esm/master/thread.js +0 -18
- package/dist/esm/observable-promise.js +0 -132
- package/dist/esm/observable.js +0 -33
- package/dist/esm/ponyfills.js +0 -20
- package/dist/esm/promise.js +0 -23
- package/dist/esm/serializers.js +0 -41
- package/dist/esm/symbols.js +0 -8
- package/dist/esm/transferable.js +0 -25
- package/dist/esm/types/master.js +0 -9
- package/dist/esm/types/messages.js +0 -16
- package/dist/esm/types/worker.js +0 -2
- package/dist/esm/worker/bundle-entry.js +0 -26
- package/dist/esm/worker/implementation.browser.js +0 -24
- package/dist/esm/worker/implementation.js +0 -19
- package/dist/esm/worker/implementation.tiny-worker.js +0 -37
- package/dist/esm/worker/implementation.worker_threads.js +0 -41
- package/dist/esm/worker/index.js +0 -174
- package/dist/esm/worker_threads.js +0 -13
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -26
- package/dist/master/get-bundle-url.browser.js +0 -25
- package/dist/master/implementation.browser.js +0 -65
- package/dist/master/implementation.js +0 -43
- package/dist/master/implementation.node.js +0 -205
- package/dist/master/index.d.ts +0 -10
- package/dist/master/index.js +0 -14
- package/dist/master/invocation-proxy.js +0 -121
- package/dist/master/pool-types.js +0 -14
- package/dist/master/pool.d.ts +0 -50
- package/dist/master/pool.js +0 -262
- package/dist/master/register.d.ts +0 -1
- package/dist/master/register.js +0 -11
- package/dist/master/spawn.js +0 -114
- package/dist/master/thread.d.ts +0 -8
- package/dist/master/thread.js +0 -18
- package/dist/observable-promise.js +0 -132
- package/dist/observable.d.ts +0 -11
- package/dist/observable.js +0 -33
- package/dist/ponyfills.js +0 -20
- package/dist/promise.d.ts +0 -1
- package/dist/promise.js +0 -23
- package/dist/serializers.js +0 -41
- package/dist/symbols.js +0 -8
- package/dist/transferable.d.ts +0 -9
- package/dist/transferable.js +0 -25
- package/dist/types/master.js +0 -9
- package/dist/types/messages.js +0 -16
- package/dist/types/worker.js +0 -2
- package/dist/worker/bundle-entry.d.ts +0 -1
- package/dist/worker/bundle-entry.js +0 -26
- package/dist/worker/implementation.browser.d.ts +0 -6
- package/dist/worker/implementation.browser.js +0 -24
- package/dist/worker/implementation.d.ts +0 -3
- package/dist/worker/implementation.js +0 -19
- package/dist/worker/implementation.tiny-worker.d.ts +0 -6
- package/dist/worker/implementation.tiny-worker.js +0 -37
- package/dist/worker/implementation.worker_threads.d.ts +0 -8
- package/dist/worker/implementation.worker_threads.js +0 -41
- package/dist/worker/index.d.ts +0 -5
- package/dist/worker/index.js +0 -174
- package/dist/worker_threads.d.ts +0 -8
- package/dist/worker_threads.js +0 -13
- package/eslint.config.mjs +0 -35
- package/index.mjs +0 -10
- package/observable.d.ts +0 -2
- package/observable.js +0 -2
- package/observable.mjs +0 -4
- package/register.d.ts +0 -2
- package/register.js +0 -2
- package/register.mjs +0 -1
- package/rollup.config.js +0 -16
- package/src/common.ts +0 -19
- package/src/index.ts +0 -10
- package/src/master/get-bundle-url.browser.ts +0 -31
- package/src/master/implementation.browser.ts +0 -82
- package/src/master/implementation.node.ts +0 -285
- package/src/master/implementation.ts +0 -21
- package/src/master/index.ts +0 -19
- package/src/master/invocation-proxy.ts +0 -151
- package/src/master/pool-types.ts +0 -83
- package/src/master/pool.ts +0 -399
- package/src/master/register.ts +0 -10
- package/src/master/spawn.ts +0 -172
- package/src/master/thread.ts +0 -29
- package/src/observable-promise.ts +0 -183
- package/src/observable.ts +0 -44
- package/src/ponyfills.ts +0 -31
- package/src/promise.ts +0 -26
- package/src/serializers.ts +0 -68
- package/src/symbols.ts +0 -5
- package/src/types/master.ts +0 -132
- package/src/types/messages.ts +0 -72
- package/src/types/worker.ts +0 -14
- package/src/worker/bundle-entry.ts +0 -10
- package/src/worker/implementation.browser.ts +0 -40
- package/src/worker/implementation.tiny-worker.ts +0 -55
- package/src/worker/implementation.ts +0 -23
- package/src/worker/implementation.worker_threads.ts +0 -50
- package/src/worker/index.ts +0 -230
- package/src/worker_threads.ts +0 -27
- package/test/lib/index.ts +0 -1
- package/test/lib/serialization.ts +0 -38
- package/test/observable-promise.test.ts +0 -205
- package/test/observable.test.ts +0 -87
- package/test/pool.test.ts +0 -183
- package/test/serialization.test.ts +0 -23
- package/test/spawn.chromium.mocha.ts +0 -53
- package/test/spawn.test.ts +0 -87
- package/test/streaming.test.ts +0 -29
- package/test/transferables.test.ts +0 -71
- package/test/workers/arraybuffer-xor.ts +0 -10
- package/test/workers/count-to-five.ts +0 -12
- package/test/workers/counter.ts +0 -19
- package/test/workers/faulty-function.ts +0 -5
- package/test/workers/hello-world.ts +0 -5
- package/test/workers/increment.ts +0 -8
- package/test/workers/minmax.ts +0 -25
- package/test/workers/serialization.ts +0 -13
- package/test/workers/top-level-throw.ts +0 -1
- package/test-tooling/rollup/app.js +0 -21
- package/test-tooling/rollup/rollup.config.ts +0 -14
- package/test-tooling/rollup/worker.js +0 -7
- package/test-tooling/tsconfig/minimal.ts +0 -12
- package/test-tooling/webpack/addition-worker.ts +0 -9
- package/test-tooling/webpack/app-with-inlined-worker.ts +0 -28
- package/test-tooling/webpack/app.ts +0 -61
- package/test-tooling/webpack/pool-worker.ts +0 -5
- package/test-tooling/webpack/raw-loader.d.ts +0 -4
- package/test-tooling/webpack/webpack.chromium.mocha.ts +0 -21
- package/test-tooling/webpack/webpack.node.config.js +0 -29
- package/test-tooling/webpack/webpack.web.config.js +0 -28
- package/types/is-observable.d.ts +0 -7
- package/types/tiny-worker.d.ts +0 -4
- package/types/webworker.d.ts +0 -9
- package/worker.d.ts +0 -2
- package/worker.js +0 -2
- package/worker.mjs +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/threads",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0-rc.1",
|
|
4
4
|
"description": "Web workers & worker threads as simple as a function call",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"thread",
|
|
@@ -29,128 +29,88 @@
|
|
|
29
29
|
"./register.*js",
|
|
30
30
|
"./worker.*js"
|
|
31
31
|
],
|
|
32
|
+
"type": "module",
|
|
32
33
|
"exports": {
|
|
33
34
|
".": {
|
|
34
|
-
"types": "./dist/index.d.ts",
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
"types": "./dist/types/index.d.ts",
|
|
36
|
+
"import": "./dist/neutral/index.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./implementation": {
|
|
39
|
+
"browser": {
|
|
40
|
+
"types": "./dist/types/master/implementation.browser.d.ts",
|
|
41
|
+
"import": "./dist/browser/master/implementation.browser.mjs"
|
|
42
|
+
},
|
|
43
|
+
"node": {
|
|
44
|
+
"types": "./dist/types/master/implementation.node.d.ts",
|
|
45
|
+
"import": "./dist/node/master/implementation.node.mjs"
|
|
46
|
+
},
|
|
47
|
+
"types": "./dist/types/master/implementation.d.ts",
|
|
48
|
+
"import": "./dist/neutral/master/implementation.mjs"
|
|
38
49
|
},
|
|
39
50
|
"./master": {
|
|
40
|
-
"types": "./dist/types/master.d.ts",
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
"types": "./dist/types/master/index.d.ts",
|
|
52
|
+
"import": "./dist/neutral/master/index.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./spawn": {
|
|
55
|
+
"types": "./dist/types/master/spawn.d.ts",
|
|
56
|
+
"import": "./dist/neutral/master/spawn.mjs"
|
|
57
|
+
},
|
|
58
|
+
"./thread": {
|
|
59
|
+
"types": "./dist/types/master/thread.d.ts",
|
|
60
|
+
"import": "./dist/neutral/master/thread.mjs"
|
|
44
61
|
},
|
|
45
62
|
"./messenger": {
|
|
46
|
-
"types": "./dist/types/
|
|
63
|
+
"types": "./dist/types/types/messages.d.ts"
|
|
47
64
|
},
|
|
48
65
|
"./observable": {
|
|
49
|
-
"types": "./dist/observable.d.ts",
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
"types": "./dist/types/observable.d.ts",
|
|
67
|
+
"import": "./dist/neutral/observable.mjs"
|
|
68
|
+
},
|
|
69
|
+
"./pool": {
|
|
70
|
+
"types": "./dist/types/master/pool.d.ts",
|
|
71
|
+
"import": "./dist/neutral/master/pool.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./observable-promise": {
|
|
74
|
+
"types": "./dist/types/observable-promise.d.ts",
|
|
75
|
+
"import": "./dist/neutral/observable-promise.mjs"
|
|
53
76
|
},
|
|
54
77
|
"./register": {
|
|
55
|
-
"types": "./dist/master/register.d.ts",
|
|
56
|
-
"
|
|
57
|
-
"import": "./dist/esm/master/register/index.js",
|
|
58
|
-
"default": "./dist/esm/master/register/index.js"
|
|
78
|
+
"types": "./dist/types/master/register.d.ts",
|
|
79
|
+
"import": "./dist/neutral/master/register.mjs"
|
|
59
80
|
},
|
|
60
81
|
"./worker": {
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
82
|
+
"browser": {
|
|
83
|
+
"types": "./dist/types/worker/worker.browser.d.ts",
|
|
84
|
+
"import": "./dist/browser/worker/worker.browser.mjs"
|
|
85
|
+
},
|
|
86
|
+
"node": {
|
|
87
|
+
"types": "./dist/types/worker/worker.node.d.ts",
|
|
88
|
+
"import": "./dist/node/worker/worker.node.mjs"
|
|
89
|
+
}
|
|
65
90
|
}
|
|
66
91
|
},
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"browser": {
|
|
70
|
-
"./dist/esm/master/implementation.js": "./dist/esm/master/implementation.browser.js",
|
|
71
|
-
"./dist/esm/master/implementation.node.js": false,
|
|
72
|
-
"./dist/esm/worker/implementation.js": "./dist/esm/worker/implementation.browser.js",
|
|
73
|
-
"./dist/esm/worker/implementation.tiny-worker.js": false,
|
|
74
|
-
"./dist/esm/worker/implementation.worker_threads.js": false,
|
|
75
|
-
"./dist/master/implementation.js": "./dist/master/implementation.browser.js",
|
|
76
|
-
"./dist/master/implementation.node.js": false,
|
|
77
|
-
"./dist/worker/implementation.js": "./dist/worker/implementation.browser.js",
|
|
78
|
-
"./dist/worker/implementation.tiny-worker.js": false,
|
|
79
|
-
"./dist/worker/implementation.worker_threads.js": false,
|
|
80
|
-
"callsites": false,
|
|
81
|
-
"tiny-worker": false,
|
|
82
|
-
"ts-node": false,
|
|
83
|
-
"ts-node/register": false,
|
|
84
|
-
"worker_threads": false
|
|
85
|
-
},
|
|
86
|
-
"types": "dist/index.d.ts",
|
|
92
|
+
"module": "dist/neutral/index.mjs",
|
|
93
|
+
"types": "dist/types/index.d.ts",
|
|
87
94
|
"files": [
|
|
88
|
-
"dist
|
|
89
|
-
"*.js",
|
|
90
|
-
"*.mjs",
|
|
91
|
-
"*.ts"
|
|
95
|
+
"dist"
|
|
92
96
|
],
|
|
93
|
-
"scripts": {
|
|
94
|
-
"build-threads": "yarn clean && yarn build:cjs && yarn build:es",
|
|
95
|
-
"build:cjs": "tsc -p tsconfig.json",
|
|
96
|
-
"build:es": "tsc -p tsconfig-esm.json",
|
|
97
|
-
"bundle": "rollup -c -f umd --file=bundle/worker.js --name=threads --silent -- dist/esm/worker/bundle-entry.js",
|
|
98
|
-
"clean": "rimraf ./dist ./dist-esm",
|
|
99
|
-
"dev": "yarn clean && tsc -p tsconfig.json --watch",
|
|
100
|
-
"package-build": "echo BUILD && yarn build-threads && echo BUILD_DONE",
|
|
101
|
-
"package-compile": "echo COMPILE && yarn build-threads && echo COMPILE_DONE",
|
|
102
|
-
"package-publint": "echo Skipping Publint - @xylabs/threads",
|
|
103
|
-
"postbuild": "yarn bundle",
|
|
104
|
-
"prepare": "yarn build-threads",
|
|
105
|
-
"test": "yarn test:library && yarn test:tooling && yarn test:puppeteer:basic && yarn test:puppeteer:webpack",
|
|
106
|
-
"test:library": "cross-env TS_NODE_FILES=true vitest ./test/**/*.test.ts",
|
|
107
|
-
"test:puppeteer:basic": "puppet-run --plugin=mocha --bundle=./test/workers/:workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts",
|
|
108
|
-
"test:puppeteer:webpack": "puppet-run --serve ./test-tooling/webpack/dist/app.web/0.worker.js --serve ./test-tooling/webpack/dist/app.web/1.worker.js --plugin=mocha ./test-tooling/webpack/webpack.chromium.mocha.ts",
|
|
109
|
-
"test:tooling": "cross-env TS_NODE_FILES=true vitest ./test-tooling/**/*.test.ts"
|
|
110
|
-
},
|
|
111
|
-
"ava": {
|
|
112
|
-
"extensions": [
|
|
113
|
-
"ts"
|
|
114
|
-
],
|
|
115
|
-
"files": [
|
|
116
|
-
"./test/**/*.test.ts",
|
|
117
|
-
"./test-tooling/**/*.test.ts"
|
|
118
|
-
],
|
|
119
|
-
"require": [
|
|
120
|
-
"ts-node/register"
|
|
121
|
-
],
|
|
122
|
-
"serial": true
|
|
123
|
-
},
|
|
124
97
|
"dependencies": {
|
|
125
|
-
"callsites-3-1-0": "npm:callsites@3.1.0",
|
|
126
98
|
"debug": "^4.4.0",
|
|
127
99
|
"is-observable-2-1-0": "npm:is-observable@2.1.0",
|
|
128
100
|
"observable-fns": "^0.6.1"
|
|
129
101
|
},
|
|
130
102
|
"devDependencies": {
|
|
131
|
-
"@babel/types": "^7.26.10",
|
|
132
|
-
"@rollup/plugin-commonjs": "^28.0.3",
|
|
133
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
134
103
|
"@types/debug": "^4.1.12",
|
|
135
104
|
"@types/node": "^22.13.10",
|
|
136
105
|
"@xylabs/eslint-config-flat": "^6.1.3",
|
|
137
106
|
"@xylabs/ts-scripts-yarn3": "^6.1.3",
|
|
138
|
-
"
|
|
139
|
-
"puppet-run": "^0.11.4",
|
|
140
|
-
"raw-loader": "^4.0.2",
|
|
141
|
-
"rimraf": "^6.0.1",
|
|
142
|
-
"rollup": "^4.36.0",
|
|
143
|
-
"threads-plugin": "^1.4.0",
|
|
144
|
-
"tiny-worker": "^2.3.0",
|
|
145
|
-
"tslib": "^2.8.1",
|
|
146
|
-
"typescript": "^5.8.2",
|
|
147
|
-
"vitest": "^3.0.9",
|
|
148
|
-
"webpack": "^5.98.0"
|
|
107
|
+
"typescript": "^5.8.2"
|
|
149
108
|
},
|
|
150
109
|
"optionalDependencies": {
|
|
151
110
|
"tiny-worker": "^2.3.0"
|
|
152
111
|
},
|
|
153
112
|
"publishConfig": {
|
|
154
113
|
"access": "public"
|
|
155
|
-
}
|
|
114
|
+
},
|
|
115
|
+
"stableVersion": "4.6.4"
|
|
156
116
|
}
|
package/dist/common.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerSerializer = registerSerializer;
|
|
4
|
-
exports.deserialize = deserialize;
|
|
5
|
-
exports.serialize = serialize;
|
|
6
|
-
const serializers_1 = require("./serializers");
|
|
7
|
-
let registeredSerializer = serializers_1.DefaultSerializer;
|
|
8
|
-
function registerSerializer(serializer) {
|
|
9
|
-
registeredSerializer = (0, serializers_1.extendSerializer)(registeredSerializer, serializer);
|
|
10
|
-
}
|
|
11
|
-
function deserialize(message) {
|
|
12
|
-
return registeredSerializer.deserialize(message);
|
|
13
|
-
}
|
|
14
|
-
function serialize(input) {
|
|
15
|
-
return registeredSerializer.serialize(input);
|
|
16
|
-
}
|
package/dist/esm/common.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerSerializer = registerSerializer;
|
|
4
|
-
exports.deserialize = deserialize;
|
|
5
|
-
exports.serialize = serialize;
|
|
6
|
-
const serializers_1 = require("./serializers");
|
|
7
|
-
let registeredSerializer = serializers_1.DefaultSerializer;
|
|
8
|
-
function registerSerializer(serializer) {
|
|
9
|
-
registeredSerializer = (0, serializers_1.extendSerializer)(registeredSerializer, serializer);
|
|
10
|
-
}
|
|
11
|
-
function deserialize(message) {
|
|
12
|
-
return registeredSerializer.deserialize(message);
|
|
13
|
-
}
|
|
14
|
-
function serialize(input) {
|
|
15
|
-
return registeredSerializer.serialize(input);
|
|
16
|
-
}
|
package/dist/esm/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.expose = exports.Transfer = exports.DefaultSerializer = exports.registerSerializer = void 0;
|
|
18
|
-
var common_1 = require("./common");
|
|
19
|
-
Object.defineProperty(exports, "registerSerializer", { enumerable: true, get: function () { return common_1.registerSerializer; } });
|
|
20
|
-
__exportStar(require("./master/index"), exports);
|
|
21
|
-
var serializers_1 = require("./serializers");
|
|
22
|
-
Object.defineProperty(exports, "DefaultSerializer", { enumerable: true, get: function () { return serializers_1.DefaultSerializer; } });
|
|
23
|
-
var transferable_1 = require("./transferable");
|
|
24
|
-
Object.defineProperty(exports, "Transfer", { enumerable: true, get: function () { return transferable_1.Transfer; } });
|
|
25
|
-
var index_1 = require("./worker/index");
|
|
26
|
-
Object.defineProperty(exports, "expose", { enumerable: true, get: function () { return index_1.expose; } });
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBundleURL = getBundleURLCached;
|
|
4
|
-
let bundleURL;
|
|
5
|
-
function getBundleURLCached() {
|
|
6
|
-
if (!bundleURL) {
|
|
7
|
-
bundleURL = getBundleURL();
|
|
8
|
-
}
|
|
9
|
-
return bundleURL;
|
|
10
|
-
}
|
|
11
|
-
function getBundleURL() {
|
|
12
|
-
try {
|
|
13
|
-
throw new Error('getBundleURL failed');
|
|
14
|
-
}
|
|
15
|
-
catch (err) {
|
|
16
|
-
const matches = ('' + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^\n)]+/g);
|
|
17
|
-
if (matches) {
|
|
18
|
-
return getBaseURL(matches[0]);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return '/';
|
|
22
|
-
}
|
|
23
|
-
function getBaseURL(url) {
|
|
24
|
-
return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/, '$1') + '/';
|
|
25
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultPoolSize = void 0;
|
|
4
|
-
exports.getWorkerImplementation = getWorkerImplementation;
|
|
5
|
-
exports.isWorkerRuntime = isWorkerRuntime;
|
|
6
|
-
const get_bundle_url_browser_1 = require("./get-bundle-url.browser");
|
|
7
|
-
exports.defaultPoolSize = typeof navigator !== 'undefined' && navigator.hardwareConcurrency ? navigator.hardwareConcurrency : 4;
|
|
8
|
-
const isAbsoluteURL = (value) => /^[A-Za-z][\d+.A-Za-z\-]*:/.test(value);
|
|
9
|
-
function createSourceBlobURL(code) {
|
|
10
|
-
const blob = new Blob([code], { type: 'application/javascript' });
|
|
11
|
-
return URL.createObjectURL(blob);
|
|
12
|
-
}
|
|
13
|
-
function selectWorkerImplementation() {
|
|
14
|
-
if (typeof Worker === 'undefined') {
|
|
15
|
-
return class NoWebWorker {
|
|
16
|
-
constructor() {
|
|
17
|
-
throw new Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.");
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
class WebWorker extends Worker {
|
|
22
|
-
constructor(url, options) {
|
|
23
|
-
if (typeof url === 'string' && options && options._baseURL) {
|
|
24
|
-
url = new URL(url, options._baseURL);
|
|
25
|
-
}
|
|
26
|
-
else if (typeof url === 'string' && !isAbsoluteURL(url) && /^file:\/\//i.test((0, get_bundle_url_browser_1.getBundleURL)())) {
|
|
27
|
-
url = new URL(url, (0, get_bundle_url_browser_1.getBundleURL)().replace(/\/[^/]+$/, '/'));
|
|
28
|
-
if (options?.CORSWorkaround ?? true) {
|
|
29
|
-
url = createSourceBlobURL(`importScripts(${JSON.stringify(url)});`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (typeof url === 'string'
|
|
33
|
-
&& isAbsoluteURL(url)
|
|
34
|
-
&& (options?.CORSWorkaround ?? true)) {
|
|
35
|
-
url = createSourceBlobURL(`importScripts(${JSON.stringify(url)});`);
|
|
36
|
-
}
|
|
37
|
-
super(url, options);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
class BlobWorker extends WebWorker {
|
|
41
|
-
constructor(blob, options) {
|
|
42
|
-
const url = globalThis.URL.createObjectURL(blob);
|
|
43
|
-
super(url, options);
|
|
44
|
-
}
|
|
45
|
-
static fromText(source, options) {
|
|
46
|
-
const blob = new globalThis.Blob([source], { type: 'text/javascript' });
|
|
47
|
-
return new BlobWorker(blob, options);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
blob: BlobWorker,
|
|
52
|
-
default: WebWorker,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
let implementation;
|
|
56
|
-
function getWorkerImplementation() {
|
|
57
|
-
if (!implementation) {
|
|
58
|
-
implementation = selectWorkerImplementation();
|
|
59
|
-
}
|
|
60
|
-
return implementation;
|
|
61
|
-
}
|
|
62
|
-
function isWorkerRuntime() {
|
|
63
|
-
const isWindowContext = typeof globalThis !== 'undefined' && typeof Window !== 'undefined' && globalThis instanceof Window;
|
|
64
|
-
return typeof globalThis !== 'undefined' && self['postMessage'] && !isWindowContext ? true : false;
|
|
65
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.isWorkerRuntime = exports.getWorkerImplementation = exports.defaultPoolSize = void 0;
|
|
37
|
-
const BrowserImplementation = __importStar(require("./implementation.browser"));
|
|
38
|
-
const NodeImplementation = __importStar(require("./implementation.node"));
|
|
39
|
-
const runningInNode = typeof process !== 'undefined' && process.arch !== 'browser' && 'pid' in process;
|
|
40
|
-
const implementation = runningInNode ? NodeImplementation : BrowserImplementation;
|
|
41
|
-
exports.defaultPoolSize = implementation.defaultPoolSize;
|
|
42
|
-
exports.getWorkerImplementation = implementation.getWorkerImplementation;
|
|
43
|
-
exports.isWorkerRuntime = implementation.isWorkerRuntime;
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.defaultPoolSize = void 0;
|
|
7
|
-
exports.getWorkerImplementation = getWorkerImplementation;
|
|
8
|
-
exports.isWorkerRuntime = isWorkerRuntime;
|
|
9
|
-
const node_events_1 = require("node:events");
|
|
10
|
-
const node_os_1 = require("node:os");
|
|
11
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
-
const node_url_1 = require("node:url");
|
|
13
|
-
const callsites_3_1_0_1 = __importDefault(require("callsites-3-1-0"));
|
|
14
|
-
let tsNodeAvailable;
|
|
15
|
-
exports.defaultPoolSize = (0, node_os_1.cpus)().length;
|
|
16
|
-
function detectTsNode() {
|
|
17
|
-
if (typeof __non_webpack_require__ === 'function') {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
if (tsNodeAvailable) {
|
|
21
|
-
return tsNodeAvailable;
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
eval('require').resolve('ts-node');
|
|
25
|
-
tsNodeAvailable = true;
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
if (error && error.code === 'MODULE_NOT_FOUND') {
|
|
29
|
-
tsNodeAvailable = false;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
throw error;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return tsNodeAvailable;
|
|
36
|
-
}
|
|
37
|
-
function createTsNodeModule(scriptPath) {
|
|
38
|
-
return `
|
|
39
|
-
require("ts-node/register/transpile-only");
|
|
40
|
-
require(${JSON.stringify(scriptPath)});
|
|
41
|
-
`;
|
|
42
|
-
}
|
|
43
|
-
function rebaseScriptPath(scriptPath, ignoreRegex) {
|
|
44
|
-
const parentCallSite = (0, callsites_3_1_0_1.default)().find((callsite) => {
|
|
45
|
-
const filename = callsite.getFileName();
|
|
46
|
-
return Boolean(filename && !filename.match(ignoreRegex) && !/[/\\]master[/\\]implementation/.test(filename) && !/^internal\/process/.test(filename));
|
|
47
|
-
});
|
|
48
|
-
const rawCallerPath = parentCallSite ? parentCallSite.getFileName() : null;
|
|
49
|
-
let callerPath = rawCallerPath ? rawCallerPath : null;
|
|
50
|
-
if (callerPath && callerPath.startsWith('file:')) {
|
|
51
|
-
callerPath = (0, node_url_1.fileURLToPath)(callerPath);
|
|
52
|
-
}
|
|
53
|
-
return callerPath ? node_path_1.default.join(node_path_1.default.dirname(callerPath), scriptPath) : scriptPath;
|
|
54
|
-
}
|
|
55
|
-
function resolveScriptPath(scriptPath, baseURL) {
|
|
56
|
-
const makeRelative = (filePath) => {
|
|
57
|
-
return node_path_1.default.isAbsolute(filePath) ? filePath : node_path_1.default.join(baseURL || eval('__dirname'), filePath);
|
|
58
|
-
};
|
|
59
|
-
return typeof __non_webpack_require__ === 'function'
|
|
60
|
-
? __non_webpack_require__.resolve(makeRelative(scriptPath))
|
|
61
|
-
: eval('require').resolve(makeRelative(rebaseScriptPath(scriptPath, /[/\\]worker_threads[/\\]/)));
|
|
62
|
-
}
|
|
63
|
-
function initWorkerThreadsWorker() {
|
|
64
|
-
const NativeWorker = typeof __non_webpack_require__ === 'function' ? __non_webpack_require__('worker_threads').Worker : eval('require')('worker_threads').Worker;
|
|
65
|
-
let allWorkers = [];
|
|
66
|
-
class Worker extends NativeWorker {
|
|
67
|
-
mappedEventListeners;
|
|
68
|
-
constructor(scriptPath, options) {
|
|
69
|
-
const resolvedScriptPath = options && options.fromSource ? null : resolveScriptPath(scriptPath, (options || {})._baseURL);
|
|
70
|
-
if (!resolvedScriptPath) {
|
|
71
|
-
const sourceCode = scriptPath;
|
|
72
|
-
super(sourceCode, { ...options, eval: true });
|
|
73
|
-
}
|
|
74
|
-
else if (/\.tsx?$/i.test(resolvedScriptPath) && detectTsNode()) {
|
|
75
|
-
super(createTsNodeModule(resolvedScriptPath), { ...options, eval: true });
|
|
76
|
-
}
|
|
77
|
-
else if (/\.asar[/\\]/.test(resolvedScriptPath)) {
|
|
78
|
-
super(resolvedScriptPath.replace(/\.asar([/\\])/, '.asar.unpacked$1'), options);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
super(resolvedScriptPath, options);
|
|
82
|
-
}
|
|
83
|
-
this.mappedEventListeners = new WeakMap();
|
|
84
|
-
allWorkers.push(this);
|
|
85
|
-
}
|
|
86
|
-
addEventListener(eventName, rawListener) {
|
|
87
|
-
const listener = (message) => {
|
|
88
|
-
rawListener({ data: message });
|
|
89
|
-
};
|
|
90
|
-
this.mappedEventListeners.set(rawListener, listener);
|
|
91
|
-
this.on(eventName, listener);
|
|
92
|
-
}
|
|
93
|
-
removeEventListener(eventName, rawListener) {
|
|
94
|
-
const listener = this.mappedEventListeners.get(rawListener) || rawListener;
|
|
95
|
-
this.off(eventName, listener);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
const terminateWorkersAndMaster = () => {
|
|
99
|
-
Promise.all(allWorkers.map(worker => worker.terminate())).then(() => process.exit(0), () => process.exit(1));
|
|
100
|
-
allWorkers = [];
|
|
101
|
-
};
|
|
102
|
-
process.on('SIGINT', () => terminateWorkersAndMaster());
|
|
103
|
-
process.on('SIGTERM', () => terminateWorkersAndMaster());
|
|
104
|
-
class BlobWorker extends Worker {
|
|
105
|
-
constructor(blob, options) {
|
|
106
|
-
super(Buffer.from(blob).toString('utf-8'), { ...options, fromSource: true });
|
|
107
|
-
}
|
|
108
|
-
static fromText(source, options) {
|
|
109
|
-
return new Worker(source, { ...options, fromSource: true });
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return {
|
|
113
|
-
blob: BlobWorker,
|
|
114
|
-
default: Worker,
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
function initTinyWorker() {
|
|
118
|
-
const TinyWorker = require('tiny-worker');
|
|
119
|
-
let allWorkers = [];
|
|
120
|
-
class Worker extends TinyWorker {
|
|
121
|
-
emitter;
|
|
122
|
-
constructor(scriptPath, options) {
|
|
123
|
-
const resolvedScriptPath = options && options.fromSource
|
|
124
|
-
? null
|
|
125
|
-
: process.platform === 'win32'
|
|
126
|
-
? `file:///${resolveScriptPath(scriptPath).replaceAll('\\', '/')}`
|
|
127
|
-
: resolveScriptPath(scriptPath);
|
|
128
|
-
if (!resolvedScriptPath) {
|
|
129
|
-
const sourceCode = scriptPath;
|
|
130
|
-
super(new Function(sourceCode), [], { esm: true });
|
|
131
|
-
}
|
|
132
|
-
else if (/\.tsx?$/i.test(resolvedScriptPath) && detectTsNode()) {
|
|
133
|
-
super(new Function(createTsNodeModule(resolveScriptPath(scriptPath))), [], { esm: true });
|
|
134
|
-
}
|
|
135
|
-
else if (/\.asar[/\\]/.test(resolvedScriptPath)) {
|
|
136
|
-
super(resolvedScriptPath.replace(/\.asar([/\\])/, '.asar.unpacked$1'), [], { esm: true });
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
super(resolvedScriptPath, [], { esm: true });
|
|
140
|
-
}
|
|
141
|
-
allWorkers.push(this);
|
|
142
|
-
this.emitter = new node_events_1.EventEmitter();
|
|
143
|
-
this.onerror = (error) => this.emitter.emit('error', error);
|
|
144
|
-
this.onmessage = (message) => this.emitter.emit('message', message);
|
|
145
|
-
}
|
|
146
|
-
addEventListener(eventName, listener) {
|
|
147
|
-
this.emitter.addListener(eventName, listener);
|
|
148
|
-
}
|
|
149
|
-
removeEventListener(eventName, listener) {
|
|
150
|
-
this.emitter.removeListener(eventName, listener);
|
|
151
|
-
}
|
|
152
|
-
terminate() {
|
|
153
|
-
allWorkers = allWorkers.filter(worker => worker !== this);
|
|
154
|
-
return super.terminate();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const terminateWorkersAndMaster = () => {
|
|
158
|
-
Promise.all(allWorkers.map(worker => worker.terminate())).then(() => process.exit(0), () => process.exit(1));
|
|
159
|
-
allWorkers = [];
|
|
160
|
-
};
|
|
161
|
-
process.on('SIGINT', () => terminateWorkersAndMaster());
|
|
162
|
-
process.on('SIGTERM', () => terminateWorkersAndMaster());
|
|
163
|
-
class BlobWorker extends Worker {
|
|
164
|
-
constructor(blob, options) {
|
|
165
|
-
super(Buffer.from(blob).toString('utf-8'), { ...options, fromSource: true });
|
|
166
|
-
}
|
|
167
|
-
static fromText(source, options) {
|
|
168
|
-
return new Worker(source, { ...options, fromSource: true });
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return {
|
|
172
|
-
blob: BlobWorker,
|
|
173
|
-
default: Worker,
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
let implementation;
|
|
177
|
-
let isTinyWorker;
|
|
178
|
-
function selectWorkerImplementation() {
|
|
179
|
-
try {
|
|
180
|
-
isTinyWorker = false;
|
|
181
|
-
return initWorkerThreadsWorker();
|
|
182
|
-
}
|
|
183
|
-
catch {
|
|
184
|
-
console.debug('Node worker_threads not available. Trying to fall back to tiny-worker polyfill...');
|
|
185
|
-
isTinyWorker = true;
|
|
186
|
-
return initTinyWorker();
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
function getWorkerImplementation() {
|
|
190
|
-
if (!implementation) {
|
|
191
|
-
implementation = selectWorkerImplementation();
|
|
192
|
-
}
|
|
193
|
-
return implementation;
|
|
194
|
-
}
|
|
195
|
-
function isWorkerRuntime() {
|
|
196
|
-
if (isTinyWorker) {
|
|
197
|
-
return self !== undefined && self['postMessage'] ? true : false;
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
const isMainThread = typeof __non_webpack_require__ === 'function'
|
|
201
|
-
? __non_webpack_require__('worker_threads').isMainThread
|
|
202
|
-
: eval('require')('worker_threads').isMainThread;
|
|
203
|
-
return !isMainThread;
|
|
204
|
-
}
|
|
205
|
-
}
|
package/dist/esm/master/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isWorkerRuntime = exports.Worker = exports.BlobWorker = exports.Thread = exports.spawn = exports.Pool = void 0;
|
|
4
|
-
const implementation_1 = require("./implementation");
|
|
5
|
-
var pool_1 = require("./pool");
|
|
6
|
-
Object.defineProperty(exports, "Pool", { enumerable: true, get: function () { return pool_1.Pool; } });
|
|
7
|
-
var spawn_1 = require("./spawn");
|
|
8
|
-
Object.defineProperty(exports, "spawn", { enumerable: true, get: function () { return spawn_1.spawn; } });
|
|
9
|
-
var thread_1 = require("./thread");
|
|
10
|
-
Object.defineProperty(exports, "Thread", { enumerable: true, get: function () { return thread_1.Thread; } });
|
|
11
|
-
exports.BlobWorker = (0, implementation_1.getWorkerImplementation)().blob;
|
|
12
|
-
exports.Worker = (0, implementation_1.getWorkerImplementation)().default;
|
|
13
|
-
var implementation_2 = require("./implementation");
|
|
14
|
-
Object.defineProperty(exports, "isWorkerRuntime", { enumerable: true, get: function () { return implementation_2.isWorkerRuntime; } });
|