@teambit/worker 0.0.1305 → 0.0.1307
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_harmony_worker-preview.js +1 -1
- package/artifacts/schema.json +150 -150
- package/dist/harmony-worker.js.map +1 -1
- package/dist/{preview-1728098619529.js → preview-1728236174539.js} +2 -2
- package/dist/worker.main.runtime.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.harmony/worker@0.0.
|
|
3
|
+
<testsuite name="teambit.harmony/worker@0.0.1307" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/worker-preview"]=t():e["teambit.harmony/worker-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.harmony/worker-preview"]=t():e["teambit.harmony/worker-preview"]=t()}(self,(()=>(()=>{"use strict";var e={7201:(e,t,o)=>{var r={id:"teambit.harmony/worker@0.0.1307",homepage:"https://bit.cloud/teambit/harmony/worker",exported:!0};function n(){const e=i(o(1594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const a=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/worker.svg"}));a.__bit_component=r,t.Logo=a},1594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};o.r(r),o.d(r,{compositions:()=>f,compositions_metadata:()=>y,overview:()=>m});var n={};o.r(n),o.d(n,{default:()=>d});var i=o(7201);o(1594);const a=MdxJsReact,c=TeambitMdxUiMdxScopeContext;var s=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},p.apply(null,arguments)}var u={},l="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;o[r]=e[r]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,s);return(0,a.mdx)(l,p({},u,o,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)(c.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const f=[i],m=[n],y={compositions:[{displayName:"Logo",identifier:"Logo"}]};return r})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -82,16 +82,16 @@
|
|
|
82
82
|
"__schema": "ParameterSchema",
|
|
83
83
|
"location": {
|
|
84
84
|
"filePath": "worker.main.runtime.ts",
|
|
85
|
-
"line":
|
|
86
|
-
"character":
|
|
85
|
+
"line": 12,
|
|
86
|
+
"character": 5
|
|
87
87
|
},
|
|
88
88
|
"name": "workerSlot",
|
|
89
89
|
"type": {
|
|
90
90
|
"__schema": "TypeRefSchema",
|
|
91
91
|
"location": {
|
|
92
92
|
"filePath": "worker.main.runtime.ts",
|
|
93
|
-
"line":
|
|
94
|
-
"character":
|
|
93
|
+
"line": 12,
|
|
94
|
+
"character": 25
|
|
95
95
|
},
|
|
96
96
|
"name": "WorkerSlot",
|
|
97
97
|
"internalFilePath": "worker.main.runtime.ts"
|
|
@@ -103,16 +103,16 @@
|
|
|
103
103
|
"__schema": "ParameterSchema",
|
|
104
104
|
"location": {
|
|
105
105
|
"filePath": "worker.main.runtime.ts",
|
|
106
|
-
"line":
|
|
107
|
-
"character":
|
|
106
|
+
"line": 13,
|
|
107
|
+
"character": 5
|
|
108
108
|
},
|
|
109
109
|
"name": "workerNameSlot",
|
|
110
110
|
"type": {
|
|
111
111
|
"__schema": "TypeRefSchema",
|
|
112
112
|
"location": {
|
|
113
113
|
"filePath": "worker.main.runtime.ts",
|
|
114
|
-
"line":
|
|
115
|
-
"character":
|
|
114
|
+
"line": 13,
|
|
115
|
+
"character": 29
|
|
116
116
|
},
|
|
117
117
|
"name": "WorkerNameSlot",
|
|
118
118
|
"internalFilePath": "worker.main.runtime.ts"
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"__schema": "VariableLikeSchema",
|
|
137
137
|
"location": {
|
|
138
138
|
"filePath": "worker.main.runtime.ts",
|
|
139
|
-
"line":
|
|
139
|
+
"line": 16,
|
|
140
140
|
"character": 3
|
|
141
141
|
},
|
|
142
142
|
"signature": "(property) WorkerMain.runtime: RuntimeDefinition",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"__schema": "InferenceTypeSchema",
|
|
146
146
|
"location": {
|
|
147
147
|
"filePath": "worker.main.runtime.ts",
|
|
148
|
-
"line":
|
|
148
|
+
"line": 16,
|
|
149
149
|
"character": 3
|
|
150
150
|
},
|
|
151
151
|
"type": "RuntimeDefinition"
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"__schema": "FunctionLikeSchema",
|
|
158
158
|
"location": {
|
|
159
159
|
"filePath": "worker.main.runtime.ts",
|
|
160
|
-
"line":
|
|
160
|
+
"line": 18,
|
|
161
161
|
"character": 3
|
|
162
162
|
},
|
|
163
163
|
"signature": "(method) WorkerMain.listWorkers(): HarmonyWorker<any>[]",
|
|
@@ -167,14 +167,14 @@
|
|
|
167
167
|
"__schema": "TypeArraySchema",
|
|
168
168
|
"location": {
|
|
169
169
|
"filePath": "worker.main.runtime.ts",
|
|
170
|
-
"line":
|
|
170
|
+
"line": 18,
|
|
171
171
|
"character": 18
|
|
172
172
|
},
|
|
173
173
|
"type": {
|
|
174
174
|
"__schema": "TypeRefSchema",
|
|
175
175
|
"location": {
|
|
176
176
|
"filePath": "worker.main.runtime.ts",
|
|
177
|
-
"line":
|
|
177
|
+
"line": 18,
|
|
178
178
|
"character": 18
|
|
179
179
|
},
|
|
180
180
|
"name": "HarmonyWorker",
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"__schema": "KeywordTypeSchema",
|
|
184
184
|
"location": {
|
|
185
185
|
"filePath": "worker.main.runtime.ts",
|
|
186
|
-
"line":
|
|
186
|
+
"line": 18,
|
|
187
187
|
"character": 32
|
|
188
188
|
},
|
|
189
189
|
"name": "any"
|
|
@@ -197,14 +197,14 @@
|
|
|
197
197
|
"__schema": "FunctionLikeSchema",
|
|
198
198
|
"location": {
|
|
199
199
|
"filePath": "worker.main.runtime.ts",
|
|
200
|
-
"line":
|
|
200
|
+
"line": 25,
|
|
201
201
|
"character": 3
|
|
202
202
|
},
|
|
203
203
|
"doc": {
|
|
204
204
|
"__schema": "DocSchema",
|
|
205
205
|
"location": {
|
|
206
206
|
"filePath": "worker.main.runtime.ts",
|
|
207
|
-
"line":
|
|
207
|
+
"line": 22,
|
|
208
208
|
"character": 3
|
|
209
209
|
},
|
|
210
210
|
"raw": "/**\n * create a new worker.\n */",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"__schema": "ParameterSchema",
|
|
219
219
|
"location": {
|
|
220
220
|
"filePath": "worker.main.runtime.ts",
|
|
221
|
-
"line":
|
|
221
|
+
"line": 25,
|
|
222
222
|
"character": 20
|
|
223
223
|
},
|
|
224
224
|
"name": "name",
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"__schema": "KeywordTypeSchema",
|
|
227
227
|
"location": {
|
|
228
228
|
"filePath": "worker.main.runtime.ts",
|
|
229
|
-
"line":
|
|
229
|
+
"line": 25,
|
|
230
230
|
"character": 26
|
|
231
231
|
},
|
|
232
232
|
"name": "string"
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
"__schema": "ParameterSchema",
|
|
239
239
|
"location": {
|
|
240
240
|
"filePath": "worker.main.runtime.ts",
|
|
241
|
-
"line":
|
|
241
|
+
"line": 25,
|
|
242
242
|
"character": 34
|
|
243
243
|
},
|
|
244
244
|
"name": "path",
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
"__schema": "KeywordTypeSchema",
|
|
247
247
|
"location": {
|
|
248
248
|
"filePath": "worker.main.runtime.ts",
|
|
249
|
-
"line":
|
|
249
|
+
"line": 25,
|
|
250
250
|
"character": 40
|
|
251
251
|
},
|
|
252
252
|
"name": "string"
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"__schema": "TypeRefSchema",
|
|
260
260
|
"location": {
|
|
261
261
|
"filePath": "worker.main.runtime.ts",
|
|
262
|
-
"line":
|
|
262
|
+
"line": 25,
|
|
263
263
|
"character": 49
|
|
264
264
|
},
|
|
265
265
|
"name": "HarmonyWorker",
|
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
"__schema": "TypeRefSchema",
|
|
269
269
|
"location": {
|
|
270
270
|
"filePath": "worker.main.runtime.ts",
|
|
271
|
-
"line":
|
|
271
|
+
"line": 25,
|
|
272
272
|
"character": 63
|
|
273
273
|
},
|
|
274
274
|
"name": "T"
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
"__schema": "FunctionLikeSchema",
|
|
285
285
|
"location": {
|
|
286
286
|
"filePath": "worker.main.runtime.ts",
|
|
287
|
-
"line":
|
|
287
|
+
"line": 52,
|
|
288
288
|
"character": 3
|
|
289
289
|
},
|
|
290
290
|
"signature": "(method) WorkerMain.getWorker<T>(id: string): HarmonyWorker<T>",
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
"__schema": "ParameterSchema",
|
|
295
295
|
"location": {
|
|
296
296
|
"filePath": "worker.main.runtime.ts",
|
|
297
|
-
"line":
|
|
297
|
+
"line": 52,
|
|
298
298
|
"character": 16
|
|
299
299
|
},
|
|
300
300
|
"name": "id",
|
|
@@ -302,7 +302,7 @@
|
|
|
302
302
|
"__schema": "KeywordTypeSchema",
|
|
303
303
|
"location": {
|
|
304
304
|
"filePath": "worker.main.runtime.ts",
|
|
305
|
-
"line":
|
|
305
|
+
"line": 52,
|
|
306
306
|
"character": 20
|
|
307
307
|
},
|
|
308
308
|
"name": "string"
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
"__schema": "TypeRefSchema",
|
|
316
316
|
"location": {
|
|
317
317
|
"filePath": "worker.main.runtime.ts",
|
|
318
|
-
"line":
|
|
318
|
+
"line": 52,
|
|
319
319
|
"character": 29
|
|
320
320
|
},
|
|
321
321
|
"name": "HarmonyWorker",
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
"__schema": "TypeRefSchema",
|
|
325
325
|
"location": {
|
|
326
326
|
"filePath": "worker.main.runtime.ts",
|
|
327
|
-
"line":
|
|
327
|
+
"line": 52,
|
|
328
328
|
"character": 43
|
|
329
329
|
},
|
|
330
330
|
"name": "T"
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
"__schema": "VariableLikeSchema",
|
|
341
341
|
"location": {
|
|
342
342
|
"filePath": "worker.main.runtime.ts",
|
|
343
|
-
"line":
|
|
343
|
+
"line": 56,
|
|
344
344
|
"character": 3
|
|
345
345
|
},
|
|
346
346
|
"signature": "(property) WorkerMain.slots: (((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>) | ((registerFn: () => string) => SlotRegistry<string>))[]",
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
"__schema": "InferenceTypeSchema",
|
|
350
350
|
"location": {
|
|
351
351
|
"filePath": "worker.main.runtime.ts",
|
|
352
|
-
"line":
|
|
352
|
+
"line": 56,
|
|
353
353
|
"character": 3
|
|
354
354
|
},
|
|
355
355
|
"type": "(((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>) | ((registerFn: () => string) => SlotRegistry<string>))[]"
|
|
@@ -361,7 +361,7 @@
|
|
|
361
361
|
"__schema": "VariableLikeSchema",
|
|
362
362
|
"location": {
|
|
363
363
|
"filePath": "worker.main.runtime.ts",
|
|
364
|
-
"line":
|
|
364
|
+
"line": 58,
|
|
365
365
|
"character": 3
|
|
366
366
|
},
|
|
367
367
|
"signature": "(property) WorkerMain.dependencies: never[]",
|
|
@@ -370,7 +370,7 @@
|
|
|
370
370
|
"__schema": "InferenceTypeSchema",
|
|
371
371
|
"location": {
|
|
372
372
|
"filePath": "worker.main.runtime.ts",
|
|
373
|
-
"line":
|
|
373
|
+
"line": 58,
|
|
374
374
|
"character": 3
|
|
375
375
|
},
|
|
376
376
|
"type": "never[]"
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
"__schema": "FunctionLikeSchema",
|
|
383
383
|
"location": {
|
|
384
384
|
"filePath": "worker.main.runtime.ts",
|
|
385
|
-
"line":
|
|
385
|
+
"line": 60,
|
|
386
386
|
"character": 3
|
|
387
387
|
},
|
|
388
388
|
"signature": "(method) WorkerMain.provider(_deps: any, _config: any, [workerSlot, workerNameSlot]: [WorkerSlot, WorkerNameSlot]): Promise<WorkerMain>",
|
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
"__schema": "ParameterSchema",
|
|
393
393
|
"location": {
|
|
394
394
|
"filePath": "worker.main.runtime.ts",
|
|
395
|
-
"line":
|
|
395
|
+
"line": 60,
|
|
396
396
|
"character": 25
|
|
397
397
|
},
|
|
398
398
|
"name": "_deps",
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
"__schema": "InferenceTypeSchema",
|
|
401
401
|
"location": {
|
|
402
402
|
"filePath": "worker.main.runtime.ts",
|
|
403
|
-
"line":
|
|
403
|
+
"line": 60,
|
|
404
404
|
"character": 25
|
|
405
405
|
},
|
|
406
406
|
"type": "any"
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
"__schema": "ParameterSchema",
|
|
413
413
|
"location": {
|
|
414
414
|
"filePath": "worker.main.runtime.ts",
|
|
415
|
-
"line":
|
|
415
|
+
"line": 60,
|
|
416
416
|
"character": 32
|
|
417
417
|
},
|
|
418
418
|
"name": "_config",
|
|
@@ -420,7 +420,7 @@
|
|
|
420
420
|
"__schema": "InferenceTypeSchema",
|
|
421
421
|
"location": {
|
|
422
422
|
"filePath": "worker.main.runtime.ts",
|
|
423
|
-
"line":
|
|
423
|
+
"line": 60,
|
|
424
424
|
"character": 32
|
|
425
425
|
},
|
|
426
426
|
"type": "any"
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
"__schema": "ParameterSchema",
|
|
433
433
|
"location": {
|
|
434
434
|
"filePath": "worker.main.runtime.ts",
|
|
435
|
-
"line":
|
|
435
|
+
"line": 60,
|
|
436
436
|
"character": 41
|
|
437
437
|
},
|
|
438
438
|
"name": "[ workerSlot, workerNameSlot ]",
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
"__schema": "TupleTypeSchema",
|
|
441
441
|
"location": {
|
|
442
442
|
"filePath": "worker.main.runtime.ts",
|
|
443
|
-
"line":
|
|
443
|
+
"line": 60,
|
|
444
444
|
"character": 71
|
|
445
445
|
},
|
|
446
446
|
"elements": [
|
|
@@ -448,7 +448,7 @@
|
|
|
448
448
|
"__schema": "TypeRefSchema",
|
|
449
449
|
"location": {
|
|
450
450
|
"filePath": "worker.main.runtime.ts",
|
|
451
|
-
"line":
|
|
451
|
+
"line": 60,
|
|
452
452
|
"character": 72
|
|
453
453
|
},
|
|
454
454
|
"name": "WorkerSlot",
|
|
@@ -458,7 +458,7 @@
|
|
|
458
458
|
"__schema": "TypeRefSchema",
|
|
459
459
|
"location": {
|
|
460
460
|
"filePath": "worker.main.runtime.ts",
|
|
461
|
-
"line":
|
|
461
|
+
"line": 60,
|
|
462
462
|
"character": 84
|
|
463
463
|
},
|
|
464
464
|
"name": "WorkerNameSlot",
|
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
"__schema": "InferenceTypeSchema",
|
|
475
475
|
"location": {
|
|
476
476
|
"filePath": "worker.main.runtime.ts",
|
|
477
|
-
"line":
|
|
477
|
+
"line": 60,
|
|
478
478
|
"character": 3
|
|
479
479
|
},
|
|
480
480
|
"type": "Promise<WorkerMain>"
|
|
@@ -522,16 +522,16 @@
|
|
|
522
522
|
"__schema": "ParameterSchema",
|
|
523
523
|
"location": {
|
|
524
524
|
"filePath": "harmony-worker.ts",
|
|
525
|
-
"line":
|
|
526
|
-
"character":
|
|
525
|
+
"line": 29,
|
|
526
|
+
"character": 5
|
|
527
527
|
},
|
|
528
528
|
"name": "name",
|
|
529
529
|
"type": {
|
|
530
530
|
"__schema": "KeywordTypeSchema",
|
|
531
531
|
"location": {
|
|
532
532
|
"filePath": "harmony-worker.ts",
|
|
533
|
-
"line":
|
|
534
|
-
"character":
|
|
533
|
+
"line": 29,
|
|
534
|
+
"character": 20
|
|
535
535
|
},
|
|
536
536
|
"name": "string"
|
|
537
537
|
},
|
|
@@ -542,16 +542,16 @@
|
|
|
542
542
|
"__schema": "ParameterSchema",
|
|
543
543
|
"location": {
|
|
544
544
|
"filePath": "harmony-worker.ts",
|
|
545
|
-
"line":
|
|
546
|
-
"character":
|
|
545
|
+
"line": 30,
|
|
546
|
+
"character": 5
|
|
547
547
|
},
|
|
548
548
|
"name": "workerPath",
|
|
549
549
|
"type": {
|
|
550
550
|
"__schema": "KeywordTypeSchema",
|
|
551
551
|
"location": {
|
|
552
552
|
"filePath": "harmony-worker.ts",
|
|
553
|
-
"line":
|
|
554
|
-
"character":
|
|
553
|
+
"line": 30,
|
|
554
|
+
"character": 26
|
|
555
555
|
},
|
|
556
556
|
"name": "string"
|
|
557
557
|
},
|
|
@@ -574,7 +574,7 @@
|
|
|
574
574
|
"__schema": "VariableLikeSchema",
|
|
575
575
|
"location": {
|
|
576
576
|
"filePath": "harmony-worker.ts",
|
|
577
|
-
"line":
|
|
577
|
+
"line": 33,
|
|
578
578
|
"character": 3
|
|
579
579
|
},
|
|
580
580
|
"signature": "(property) HarmonyWorker<T>.remoteWorker: Remote<T> | undefined",
|
|
@@ -583,7 +583,7 @@
|
|
|
583
583
|
"__schema": "TypeUnionSchema",
|
|
584
584
|
"location": {
|
|
585
585
|
"filePath": "harmony-worker.ts",
|
|
586
|
-
"line":
|
|
586
|
+
"line": 33,
|
|
587
587
|
"character": 27
|
|
588
588
|
},
|
|
589
589
|
"types": [
|
|
@@ -591,7 +591,7 @@
|
|
|
591
591
|
"__schema": "KeywordTypeSchema",
|
|
592
592
|
"location": {
|
|
593
593
|
"filePath": "harmony-worker.ts",
|
|
594
|
-
"line":
|
|
594
|
+
"line": 33,
|
|
595
595
|
"character": 27
|
|
596
596
|
},
|
|
597
597
|
"name": "undefined"
|
|
@@ -600,7 +600,7 @@
|
|
|
600
600
|
"__schema": "TypeRefSchema",
|
|
601
601
|
"location": {
|
|
602
602
|
"filePath": "harmony-worker.ts",
|
|
603
|
-
"line":
|
|
603
|
+
"line": 33,
|
|
604
604
|
"character": 39
|
|
605
605
|
},
|
|
606
606
|
"name": "Remote",
|
|
@@ -610,7 +610,7 @@
|
|
|
610
610
|
"__schema": "TypeRefSchema",
|
|
611
611
|
"location": {
|
|
612
612
|
"filePath": "harmony-worker.ts",
|
|
613
|
-
"line":
|
|
613
|
+
"line": 33,
|
|
614
614
|
"character": 46
|
|
615
615
|
},
|
|
616
616
|
"name": "T"
|
|
@@ -625,7 +625,7 @@
|
|
|
625
625
|
"__schema": "VariableLikeSchema",
|
|
626
626
|
"location": {
|
|
627
627
|
"filePath": "harmony-worker.ts",
|
|
628
|
-
"line":
|
|
628
|
+
"line": 35,
|
|
629
629
|
"character": 3
|
|
630
630
|
},
|
|
631
631
|
"signature": "(property) HarmonyWorker<T>.worker: Worker | undefined",
|
|
@@ -634,7 +634,7 @@
|
|
|
634
634
|
"__schema": "TypeUnionSchema",
|
|
635
635
|
"location": {
|
|
636
636
|
"filePath": "harmony-worker.ts",
|
|
637
|
-
"line":
|
|
637
|
+
"line": 35,
|
|
638
638
|
"character": 21
|
|
639
639
|
},
|
|
640
640
|
"types": [
|
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
"__schema": "TypeRefSchema",
|
|
643
643
|
"location": {
|
|
644
644
|
"filePath": "harmony-worker.ts",
|
|
645
|
-
"line":
|
|
645
|
+
"line": 35,
|
|
646
646
|
"character": 21
|
|
647
647
|
},
|
|
648
648
|
"name": "Worker",
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
"__schema": "KeywordTypeSchema",
|
|
653
653
|
"location": {
|
|
654
654
|
"filePath": "harmony-worker.ts",
|
|
655
|
-
"line":
|
|
655
|
+
"line": 35,
|
|
656
656
|
"character": 30
|
|
657
657
|
},
|
|
658
658
|
"name": "undefined"
|
|
@@ -665,7 +665,7 @@
|
|
|
665
665
|
"__schema": "GetAccessorSchema",
|
|
666
666
|
"location": {
|
|
667
667
|
"filePath": "harmony-worker.ts",
|
|
668
|
-
"line":
|
|
668
|
+
"line": 37,
|
|
669
669
|
"character": 3
|
|
670
670
|
},
|
|
671
671
|
"signature": "(getter) HarmonyWorker<T>.stdout: internal.Readable | undefined",
|
|
@@ -674,7 +674,7 @@
|
|
|
674
674
|
"__schema": "InferenceTypeSchema",
|
|
675
675
|
"location": {
|
|
676
676
|
"filePath": "harmony-worker.ts",
|
|
677
|
-
"line":
|
|
677
|
+
"line": 37,
|
|
678
678
|
"character": 3
|
|
679
679
|
},
|
|
680
680
|
"type": "internal.Readable | undefined"
|
|
@@ -684,7 +684,7 @@
|
|
|
684
684
|
"__schema": "GetAccessorSchema",
|
|
685
685
|
"location": {
|
|
686
686
|
"filePath": "harmony-worker.ts",
|
|
687
|
-
"line":
|
|
687
|
+
"line": 41,
|
|
688
688
|
"character": 3
|
|
689
689
|
},
|
|
690
690
|
"signature": "(getter) HarmonyWorker<T>.stderr: internal.Readable | undefined",
|
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
"__schema": "InferenceTypeSchema",
|
|
694
694
|
"location": {
|
|
695
695
|
"filePath": "harmony-worker.ts",
|
|
696
|
-
"line":
|
|
696
|
+
"line": 41,
|
|
697
697
|
"character": 3
|
|
698
698
|
},
|
|
699
699
|
"type": "internal.Readable | undefined"
|
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
"__schema": "GetAccessorSchema",
|
|
704
704
|
"location": {
|
|
705
705
|
"filePath": "harmony-worker.ts",
|
|
706
|
-
"line":
|
|
706
|
+
"line": 45,
|
|
707
707
|
"character": 3
|
|
708
708
|
},
|
|
709
709
|
"signature": "(getter) HarmonyWorker<T>.stdin: internal.Writable | null | undefined",
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
"__schema": "InferenceTypeSchema",
|
|
713
713
|
"location": {
|
|
714
714
|
"filePath": "harmony-worker.ts",
|
|
715
|
-
"line":
|
|
715
|
+
"line": 45,
|
|
716
716
|
"character": 3
|
|
717
717
|
},
|
|
718
718
|
"type": "internal.Writable | null | undefined"
|
|
@@ -722,7 +722,7 @@
|
|
|
722
722
|
"__schema": "FunctionLikeSchema",
|
|
723
723
|
"location": {
|
|
724
724
|
"filePath": "harmony-worker.ts",
|
|
725
|
-
"line":
|
|
725
|
+
"line": 59,
|
|
726
726
|
"character": 3
|
|
727
727
|
},
|
|
728
728
|
"signature": "(method) HarmonyWorker<T>.initiate(options: Partial<InitOptions>): Remote<T>",
|
|
@@ -732,7 +732,7 @@
|
|
|
732
732
|
"__schema": "ParameterSchema",
|
|
733
733
|
"location": {
|
|
734
734
|
"filePath": "harmony-worker.ts",
|
|
735
|
-
"line":
|
|
735
|
+
"line": 59,
|
|
736
736
|
"character": 12
|
|
737
737
|
},
|
|
738
738
|
"name": "options",
|
|
@@ -740,7 +740,7 @@
|
|
|
740
740
|
"__schema": "TypeRefSchema",
|
|
741
741
|
"location": {
|
|
742
742
|
"filePath": "harmony-worker.ts",
|
|
743
|
-
"line":
|
|
743
|
+
"line": 59,
|
|
744
744
|
"character": 21
|
|
745
745
|
},
|
|
746
746
|
"name": "Partial",
|
|
@@ -749,7 +749,7 @@
|
|
|
749
749
|
"__schema": "TypeRefSchema",
|
|
750
750
|
"location": {
|
|
751
751
|
"filePath": "harmony-worker.ts",
|
|
752
|
-
"line":
|
|
752
|
+
"line": 59,
|
|
753
753
|
"character": 29
|
|
754
754
|
},
|
|
755
755
|
"name": "InitOptions",
|
|
@@ -765,7 +765,7 @@
|
|
|
765
765
|
"__schema": "TypeRefSchema",
|
|
766
766
|
"location": {
|
|
767
767
|
"filePath": "harmony-worker.ts",
|
|
768
|
-
"line":
|
|
768
|
+
"line": 59,
|
|
769
769
|
"character": 44
|
|
770
770
|
},
|
|
771
771
|
"name": "Remote",
|
|
@@ -775,7 +775,7 @@
|
|
|
775
775
|
"__schema": "TypeRefSchema",
|
|
776
776
|
"location": {
|
|
777
777
|
"filePath": "harmony-worker.ts",
|
|
778
|
-
"line":
|
|
778
|
+
"line": 59,
|
|
779
779
|
"character": 51
|
|
780
780
|
},
|
|
781
781
|
"name": "T"
|
|
@@ -788,7 +788,7 @@
|
|
|
788
788
|
"__schema": "FunctionLikeSchema",
|
|
789
789
|
"location": {
|
|
790
790
|
"filePath": "harmony-worker.ts",
|
|
791
|
-
"line":
|
|
791
|
+
"line": 67,
|
|
792
792
|
"character": 3
|
|
793
793
|
},
|
|
794
794
|
"signature": "(method) HarmonyWorker<T>.get(): Remote<T> | undefined",
|
|
@@ -798,7 +798,7 @@
|
|
|
798
798
|
"__schema": "InferenceTypeSchema",
|
|
799
799
|
"location": {
|
|
800
800
|
"filePath": "harmony-worker.ts",
|
|
801
|
-
"line":
|
|
801
|
+
"line": 67,
|
|
802
802
|
"character": 3
|
|
803
803
|
},
|
|
804
804
|
"type": "Remote<T> | undefined"
|
|
@@ -809,7 +809,7 @@
|
|
|
809
809
|
"__schema": "FunctionLikeSchema",
|
|
810
810
|
"location": {
|
|
811
811
|
"filePath": "harmony-worker.ts",
|
|
812
|
-
"line":
|
|
812
|
+
"line": 71,
|
|
813
813
|
"character": 3
|
|
814
814
|
},
|
|
815
815
|
"signature": "(method) HarmonyWorker<T>.terminate(): Promise<void>",
|
|
@@ -819,7 +819,7 @@
|
|
|
819
819
|
"__schema": "InferenceTypeSchema",
|
|
820
820
|
"location": {
|
|
821
821
|
"filePath": "harmony-worker.ts",
|
|
822
|
-
"line":
|
|
822
|
+
"line": 71,
|
|
823
823
|
"character": 3
|
|
824
824
|
},
|
|
825
825
|
"type": "Promise<void>"
|
|
@@ -1065,16 +1065,16 @@
|
|
|
1065
1065
|
"__schema": "ParameterSchema",
|
|
1066
1066
|
"location": {
|
|
1067
1067
|
"filePath": "worker.main.runtime.ts",
|
|
1068
|
-
"line":
|
|
1069
|
-
"character":
|
|
1068
|
+
"line": 12,
|
|
1069
|
+
"character": 5
|
|
1070
1070
|
},
|
|
1071
1071
|
"name": "workerSlot",
|
|
1072
1072
|
"type": {
|
|
1073
1073
|
"__schema": "TypeRefSchema",
|
|
1074
1074
|
"location": {
|
|
1075
1075
|
"filePath": "worker.main.runtime.ts",
|
|
1076
|
-
"line":
|
|
1077
|
-
"character":
|
|
1076
|
+
"line": 12,
|
|
1077
|
+
"character": 25
|
|
1078
1078
|
},
|
|
1079
1079
|
"name": "WorkerSlot",
|
|
1080
1080
|
"internalFilePath": "worker.main.runtime.ts"
|
|
@@ -1086,16 +1086,16 @@
|
|
|
1086
1086
|
"__schema": "ParameterSchema",
|
|
1087
1087
|
"location": {
|
|
1088
1088
|
"filePath": "worker.main.runtime.ts",
|
|
1089
|
-
"line":
|
|
1090
|
-
"character":
|
|
1089
|
+
"line": 13,
|
|
1090
|
+
"character": 5
|
|
1091
1091
|
},
|
|
1092
1092
|
"name": "workerNameSlot",
|
|
1093
1093
|
"type": {
|
|
1094
1094
|
"__schema": "TypeRefSchema",
|
|
1095
1095
|
"location": {
|
|
1096
1096
|
"filePath": "worker.main.runtime.ts",
|
|
1097
|
-
"line":
|
|
1098
|
-
"character":
|
|
1097
|
+
"line": 13,
|
|
1098
|
+
"character": 29
|
|
1099
1099
|
},
|
|
1100
1100
|
"name": "WorkerNameSlot",
|
|
1101
1101
|
"internalFilePath": "worker.main.runtime.ts"
|
|
@@ -1119,7 +1119,7 @@
|
|
|
1119
1119
|
"__schema": "VariableLikeSchema",
|
|
1120
1120
|
"location": {
|
|
1121
1121
|
"filePath": "worker.main.runtime.ts",
|
|
1122
|
-
"line":
|
|
1122
|
+
"line": 16,
|
|
1123
1123
|
"character": 3
|
|
1124
1124
|
},
|
|
1125
1125
|
"signature": "(property) WorkerMain.runtime: RuntimeDefinition",
|
|
@@ -1128,7 +1128,7 @@
|
|
|
1128
1128
|
"__schema": "InferenceTypeSchema",
|
|
1129
1129
|
"location": {
|
|
1130
1130
|
"filePath": "worker.main.runtime.ts",
|
|
1131
|
-
"line":
|
|
1131
|
+
"line": 16,
|
|
1132
1132
|
"character": 3
|
|
1133
1133
|
},
|
|
1134
1134
|
"type": "RuntimeDefinition"
|
|
@@ -1140,7 +1140,7 @@
|
|
|
1140
1140
|
"__schema": "FunctionLikeSchema",
|
|
1141
1141
|
"location": {
|
|
1142
1142
|
"filePath": "worker.main.runtime.ts",
|
|
1143
|
-
"line":
|
|
1143
|
+
"line": 18,
|
|
1144
1144
|
"character": 3
|
|
1145
1145
|
},
|
|
1146
1146
|
"signature": "(method) WorkerMain.listWorkers(): HarmonyWorker<any>[]",
|
|
@@ -1150,14 +1150,14 @@
|
|
|
1150
1150
|
"__schema": "TypeArraySchema",
|
|
1151
1151
|
"location": {
|
|
1152
1152
|
"filePath": "worker.main.runtime.ts",
|
|
1153
|
-
"line":
|
|
1153
|
+
"line": 18,
|
|
1154
1154
|
"character": 18
|
|
1155
1155
|
},
|
|
1156
1156
|
"type": {
|
|
1157
1157
|
"__schema": "TypeRefSchema",
|
|
1158
1158
|
"location": {
|
|
1159
1159
|
"filePath": "worker.main.runtime.ts",
|
|
1160
|
-
"line":
|
|
1160
|
+
"line": 18,
|
|
1161
1161
|
"character": 18
|
|
1162
1162
|
},
|
|
1163
1163
|
"name": "HarmonyWorker",
|
|
@@ -1166,7 +1166,7 @@
|
|
|
1166
1166
|
"__schema": "KeywordTypeSchema",
|
|
1167
1167
|
"location": {
|
|
1168
1168
|
"filePath": "worker.main.runtime.ts",
|
|
1169
|
-
"line":
|
|
1169
|
+
"line": 18,
|
|
1170
1170
|
"character": 32
|
|
1171
1171
|
},
|
|
1172
1172
|
"name": "any"
|
|
@@ -1180,14 +1180,14 @@
|
|
|
1180
1180
|
"__schema": "FunctionLikeSchema",
|
|
1181
1181
|
"location": {
|
|
1182
1182
|
"filePath": "worker.main.runtime.ts",
|
|
1183
|
-
"line":
|
|
1183
|
+
"line": 25,
|
|
1184
1184
|
"character": 3
|
|
1185
1185
|
},
|
|
1186
1186
|
"doc": {
|
|
1187
1187
|
"__schema": "DocSchema",
|
|
1188
1188
|
"location": {
|
|
1189
1189
|
"filePath": "worker.main.runtime.ts",
|
|
1190
|
-
"line":
|
|
1190
|
+
"line": 22,
|
|
1191
1191
|
"character": 3
|
|
1192
1192
|
},
|
|
1193
1193
|
"raw": "/**\n * create a new worker.\n */",
|
|
@@ -1201,7 +1201,7 @@
|
|
|
1201
1201
|
"__schema": "ParameterSchema",
|
|
1202
1202
|
"location": {
|
|
1203
1203
|
"filePath": "worker.main.runtime.ts",
|
|
1204
|
-
"line":
|
|
1204
|
+
"line": 25,
|
|
1205
1205
|
"character": 20
|
|
1206
1206
|
},
|
|
1207
1207
|
"name": "name",
|
|
@@ -1209,7 +1209,7 @@
|
|
|
1209
1209
|
"__schema": "KeywordTypeSchema",
|
|
1210
1210
|
"location": {
|
|
1211
1211
|
"filePath": "worker.main.runtime.ts",
|
|
1212
|
-
"line":
|
|
1212
|
+
"line": 25,
|
|
1213
1213
|
"character": 26
|
|
1214
1214
|
},
|
|
1215
1215
|
"name": "string"
|
|
@@ -1221,7 +1221,7 @@
|
|
|
1221
1221
|
"__schema": "ParameterSchema",
|
|
1222
1222
|
"location": {
|
|
1223
1223
|
"filePath": "worker.main.runtime.ts",
|
|
1224
|
-
"line":
|
|
1224
|
+
"line": 25,
|
|
1225
1225
|
"character": 34
|
|
1226
1226
|
},
|
|
1227
1227
|
"name": "path",
|
|
@@ -1229,7 +1229,7 @@
|
|
|
1229
1229
|
"__schema": "KeywordTypeSchema",
|
|
1230
1230
|
"location": {
|
|
1231
1231
|
"filePath": "worker.main.runtime.ts",
|
|
1232
|
-
"line":
|
|
1232
|
+
"line": 25,
|
|
1233
1233
|
"character": 40
|
|
1234
1234
|
},
|
|
1235
1235
|
"name": "string"
|
|
@@ -1242,7 +1242,7 @@
|
|
|
1242
1242
|
"__schema": "TypeRefSchema",
|
|
1243
1243
|
"location": {
|
|
1244
1244
|
"filePath": "worker.main.runtime.ts",
|
|
1245
|
-
"line":
|
|
1245
|
+
"line": 25,
|
|
1246
1246
|
"character": 49
|
|
1247
1247
|
},
|
|
1248
1248
|
"name": "HarmonyWorker",
|
|
@@ -1251,7 +1251,7 @@
|
|
|
1251
1251
|
"__schema": "TypeRefSchema",
|
|
1252
1252
|
"location": {
|
|
1253
1253
|
"filePath": "worker.main.runtime.ts",
|
|
1254
|
-
"line":
|
|
1254
|
+
"line": 25,
|
|
1255
1255
|
"character": 63
|
|
1256
1256
|
},
|
|
1257
1257
|
"name": "T"
|
|
@@ -1267,7 +1267,7 @@
|
|
|
1267
1267
|
"__schema": "FunctionLikeSchema",
|
|
1268
1268
|
"location": {
|
|
1269
1269
|
"filePath": "worker.main.runtime.ts",
|
|
1270
|
-
"line":
|
|
1270
|
+
"line": 52,
|
|
1271
1271
|
"character": 3
|
|
1272
1272
|
},
|
|
1273
1273
|
"signature": "(method) WorkerMain.getWorker<T>(id: string): HarmonyWorker<T>",
|
|
@@ -1277,7 +1277,7 @@
|
|
|
1277
1277
|
"__schema": "ParameterSchema",
|
|
1278
1278
|
"location": {
|
|
1279
1279
|
"filePath": "worker.main.runtime.ts",
|
|
1280
|
-
"line":
|
|
1280
|
+
"line": 52,
|
|
1281
1281
|
"character": 16
|
|
1282
1282
|
},
|
|
1283
1283
|
"name": "id",
|
|
@@ -1285,7 +1285,7 @@
|
|
|
1285
1285
|
"__schema": "KeywordTypeSchema",
|
|
1286
1286
|
"location": {
|
|
1287
1287
|
"filePath": "worker.main.runtime.ts",
|
|
1288
|
-
"line":
|
|
1288
|
+
"line": 52,
|
|
1289
1289
|
"character": 20
|
|
1290
1290
|
},
|
|
1291
1291
|
"name": "string"
|
|
@@ -1298,7 +1298,7 @@
|
|
|
1298
1298
|
"__schema": "TypeRefSchema",
|
|
1299
1299
|
"location": {
|
|
1300
1300
|
"filePath": "worker.main.runtime.ts",
|
|
1301
|
-
"line":
|
|
1301
|
+
"line": 52,
|
|
1302
1302
|
"character": 29
|
|
1303
1303
|
},
|
|
1304
1304
|
"name": "HarmonyWorker",
|
|
@@ -1307,7 +1307,7 @@
|
|
|
1307
1307
|
"__schema": "TypeRefSchema",
|
|
1308
1308
|
"location": {
|
|
1309
1309
|
"filePath": "worker.main.runtime.ts",
|
|
1310
|
-
"line":
|
|
1310
|
+
"line": 52,
|
|
1311
1311
|
"character": 43
|
|
1312
1312
|
},
|
|
1313
1313
|
"name": "T"
|
|
@@ -1323,7 +1323,7 @@
|
|
|
1323
1323
|
"__schema": "VariableLikeSchema",
|
|
1324
1324
|
"location": {
|
|
1325
1325
|
"filePath": "worker.main.runtime.ts",
|
|
1326
|
-
"line":
|
|
1326
|
+
"line": 56,
|
|
1327
1327
|
"character": 3
|
|
1328
1328
|
},
|
|
1329
1329
|
"signature": "(property) WorkerMain.slots: (((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>) | ((registerFn: () => string) => SlotRegistry<string>))[]",
|
|
@@ -1332,7 +1332,7 @@
|
|
|
1332
1332
|
"__schema": "InferenceTypeSchema",
|
|
1333
1333
|
"location": {
|
|
1334
1334
|
"filePath": "worker.main.runtime.ts",
|
|
1335
|
-
"line":
|
|
1335
|
+
"line": 56,
|
|
1336
1336
|
"character": 3
|
|
1337
1337
|
},
|
|
1338
1338
|
"type": "(((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>) | ((registerFn: () => string) => SlotRegistry<string>))[]"
|
|
@@ -1344,7 +1344,7 @@
|
|
|
1344
1344
|
"__schema": "VariableLikeSchema",
|
|
1345
1345
|
"location": {
|
|
1346
1346
|
"filePath": "worker.main.runtime.ts",
|
|
1347
|
-
"line":
|
|
1347
|
+
"line": 58,
|
|
1348
1348
|
"character": 3
|
|
1349
1349
|
},
|
|
1350
1350
|
"signature": "(property) WorkerMain.dependencies: never[]",
|
|
@@ -1353,7 +1353,7 @@
|
|
|
1353
1353
|
"__schema": "InferenceTypeSchema",
|
|
1354
1354
|
"location": {
|
|
1355
1355
|
"filePath": "worker.main.runtime.ts",
|
|
1356
|
-
"line":
|
|
1356
|
+
"line": 58,
|
|
1357
1357
|
"character": 3
|
|
1358
1358
|
},
|
|
1359
1359
|
"type": "never[]"
|
|
@@ -1365,7 +1365,7 @@
|
|
|
1365
1365
|
"__schema": "FunctionLikeSchema",
|
|
1366
1366
|
"location": {
|
|
1367
1367
|
"filePath": "worker.main.runtime.ts",
|
|
1368
|
-
"line":
|
|
1368
|
+
"line": 60,
|
|
1369
1369
|
"character": 3
|
|
1370
1370
|
},
|
|
1371
1371
|
"signature": "(method) WorkerMain.provider(_deps: any, _config: any, [workerSlot, workerNameSlot]: [WorkerSlot, WorkerNameSlot]): Promise<WorkerMain>",
|
|
@@ -1375,7 +1375,7 @@
|
|
|
1375
1375
|
"__schema": "ParameterSchema",
|
|
1376
1376
|
"location": {
|
|
1377
1377
|
"filePath": "worker.main.runtime.ts",
|
|
1378
|
-
"line":
|
|
1378
|
+
"line": 60,
|
|
1379
1379
|
"character": 25
|
|
1380
1380
|
},
|
|
1381
1381
|
"name": "_deps",
|
|
@@ -1383,7 +1383,7 @@
|
|
|
1383
1383
|
"__schema": "InferenceTypeSchema",
|
|
1384
1384
|
"location": {
|
|
1385
1385
|
"filePath": "worker.main.runtime.ts",
|
|
1386
|
-
"line":
|
|
1386
|
+
"line": 60,
|
|
1387
1387
|
"character": 25
|
|
1388
1388
|
},
|
|
1389
1389
|
"type": "any"
|
|
@@ -1395,7 +1395,7 @@
|
|
|
1395
1395
|
"__schema": "ParameterSchema",
|
|
1396
1396
|
"location": {
|
|
1397
1397
|
"filePath": "worker.main.runtime.ts",
|
|
1398
|
-
"line":
|
|
1398
|
+
"line": 60,
|
|
1399
1399
|
"character": 32
|
|
1400
1400
|
},
|
|
1401
1401
|
"name": "_config",
|
|
@@ -1403,7 +1403,7 @@
|
|
|
1403
1403
|
"__schema": "InferenceTypeSchema",
|
|
1404
1404
|
"location": {
|
|
1405
1405
|
"filePath": "worker.main.runtime.ts",
|
|
1406
|
-
"line":
|
|
1406
|
+
"line": 60,
|
|
1407
1407
|
"character": 32
|
|
1408
1408
|
},
|
|
1409
1409
|
"type": "any"
|
|
@@ -1415,7 +1415,7 @@
|
|
|
1415
1415
|
"__schema": "ParameterSchema",
|
|
1416
1416
|
"location": {
|
|
1417
1417
|
"filePath": "worker.main.runtime.ts",
|
|
1418
|
-
"line":
|
|
1418
|
+
"line": 60,
|
|
1419
1419
|
"character": 41
|
|
1420
1420
|
},
|
|
1421
1421
|
"name": "[ workerSlot, workerNameSlot ]",
|
|
@@ -1423,7 +1423,7 @@
|
|
|
1423
1423
|
"__schema": "TupleTypeSchema",
|
|
1424
1424
|
"location": {
|
|
1425
1425
|
"filePath": "worker.main.runtime.ts",
|
|
1426
|
-
"line":
|
|
1426
|
+
"line": 60,
|
|
1427
1427
|
"character": 71
|
|
1428
1428
|
},
|
|
1429
1429
|
"elements": [
|
|
@@ -1431,7 +1431,7 @@
|
|
|
1431
1431
|
"__schema": "TypeRefSchema",
|
|
1432
1432
|
"location": {
|
|
1433
1433
|
"filePath": "worker.main.runtime.ts",
|
|
1434
|
-
"line":
|
|
1434
|
+
"line": 60,
|
|
1435
1435
|
"character": 72
|
|
1436
1436
|
},
|
|
1437
1437
|
"name": "WorkerSlot",
|
|
@@ -1441,7 +1441,7 @@
|
|
|
1441
1441
|
"__schema": "TypeRefSchema",
|
|
1442
1442
|
"location": {
|
|
1443
1443
|
"filePath": "worker.main.runtime.ts",
|
|
1444
|
-
"line":
|
|
1444
|
+
"line": 60,
|
|
1445
1445
|
"character": 84
|
|
1446
1446
|
},
|
|
1447
1447
|
"name": "WorkerNameSlot",
|
|
@@ -1457,7 +1457,7 @@
|
|
|
1457
1457
|
"__schema": "InferenceTypeSchema",
|
|
1458
1458
|
"location": {
|
|
1459
1459
|
"filePath": "worker.main.runtime.ts",
|
|
1460
|
-
"line":
|
|
1460
|
+
"line": 60,
|
|
1461
1461
|
"character": 3
|
|
1462
1462
|
},
|
|
1463
1463
|
"type": "Promise<WorkerMain>"
|
|
@@ -1477,7 +1477,7 @@
|
|
|
1477
1477
|
"__schema": "UnImplementedSchema",
|
|
1478
1478
|
"location": {
|
|
1479
1479
|
"filePath": "worker.main.runtime.ts",
|
|
1480
|
-
"line":
|
|
1480
|
+
"line": 65,
|
|
1481
1481
|
"character": 1
|
|
1482
1482
|
},
|
|
1483
1483
|
"name": "WorkerAspect.addRuntime(WorkerMain);",
|
|
@@ -1630,16 +1630,16 @@
|
|
|
1630
1630
|
"__schema": "ParameterSchema",
|
|
1631
1631
|
"location": {
|
|
1632
1632
|
"filePath": "harmony-worker.ts",
|
|
1633
|
-
"line":
|
|
1634
|
-
"character":
|
|
1633
|
+
"line": 29,
|
|
1634
|
+
"character": 5
|
|
1635
1635
|
},
|
|
1636
1636
|
"name": "name",
|
|
1637
1637
|
"type": {
|
|
1638
1638
|
"__schema": "KeywordTypeSchema",
|
|
1639
1639
|
"location": {
|
|
1640
1640
|
"filePath": "harmony-worker.ts",
|
|
1641
|
-
"line":
|
|
1642
|
-
"character":
|
|
1641
|
+
"line": 29,
|
|
1642
|
+
"character": 20
|
|
1643
1643
|
},
|
|
1644
1644
|
"name": "string"
|
|
1645
1645
|
},
|
|
@@ -1650,16 +1650,16 @@
|
|
|
1650
1650
|
"__schema": "ParameterSchema",
|
|
1651
1651
|
"location": {
|
|
1652
1652
|
"filePath": "harmony-worker.ts",
|
|
1653
|
-
"line":
|
|
1654
|
-
"character":
|
|
1653
|
+
"line": 30,
|
|
1654
|
+
"character": 5
|
|
1655
1655
|
},
|
|
1656
1656
|
"name": "workerPath",
|
|
1657
1657
|
"type": {
|
|
1658
1658
|
"__schema": "KeywordTypeSchema",
|
|
1659
1659
|
"location": {
|
|
1660
1660
|
"filePath": "harmony-worker.ts",
|
|
1661
|
-
"line":
|
|
1662
|
-
"character":
|
|
1661
|
+
"line": 30,
|
|
1662
|
+
"character": 26
|
|
1663
1663
|
},
|
|
1664
1664
|
"name": "string"
|
|
1665
1665
|
},
|
|
@@ -1682,7 +1682,7 @@
|
|
|
1682
1682
|
"__schema": "VariableLikeSchema",
|
|
1683
1683
|
"location": {
|
|
1684
1684
|
"filePath": "harmony-worker.ts",
|
|
1685
|
-
"line":
|
|
1685
|
+
"line": 33,
|
|
1686
1686
|
"character": 3
|
|
1687
1687
|
},
|
|
1688
1688
|
"signature": "(property) HarmonyWorker<T>.remoteWorker: Remote<T> | undefined",
|
|
@@ -1691,7 +1691,7 @@
|
|
|
1691
1691
|
"__schema": "TypeUnionSchema",
|
|
1692
1692
|
"location": {
|
|
1693
1693
|
"filePath": "harmony-worker.ts",
|
|
1694
|
-
"line":
|
|
1694
|
+
"line": 33,
|
|
1695
1695
|
"character": 27
|
|
1696
1696
|
},
|
|
1697
1697
|
"types": [
|
|
@@ -1699,7 +1699,7 @@
|
|
|
1699
1699
|
"__schema": "KeywordTypeSchema",
|
|
1700
1700
|
"location": {
|
|
1701
1701
|
"filePath": "harmony-worker.ts",
|
|
1702
|
-
"line":
|
|
1702
|
+
"line": 33,
|
|
1703
1703
|
"character": 27
|
|
1704
1704
|
},
|
|
1705
1705
|
"name": "undefined"
|
|
@@ -1708,7 +1708,7 @@
|
|
|
1708
1708
|
"__schema": "TypeRefSchema",
|
|
1709
1709
|
"location": {
|
|
1710
1710
|
"filePath": "harmony-worker.ts",
|
|
1711
|
-
"line":
|
|
1711
|
+
"line": 33,
|
|
1712
1712
|
"character": 39
|
|
1713
1713
|
},
|
|
1714
1714
|
"name": "Remote",
|
|
@@ -1718,7 +1718,7 @@
|
|
|
1718
1718
|
"__schema": "TypeRefSchema",
|
|
1719
1719
|
"location": {
|
|
1720
1720
|
"filePath": "harmony-worker.ts",
|
|
1721
|
-
"line":
|
|
1721
|
+
"line": 33,
|
|
1722
1722
|
"character": 46
|
|
1723
1723
|
},
|
|
1724
1724
|
"name": "T"
|
|
@@ -1733,7 +1733,7 @@
|
|
|
1733
1733
|
"__schema": "VariableLikeSchema",
|
|
1734
1734
|
"location": {
|
|
1735
1735
|
"filePath": "harmony-worker.ts",
|
|
1736
|
-
"line":
|
|
1736
|
+
"line": 35,
|
|
1737
1737
|
"character": 3
|
|
1738
1738
|
},
|
|
1739
1739
|
"signature": "(property) HarmonyWorker<T>.worker: Worker | undefined",
|
|
@@ -1742,7 +1742,7 @@
|
|
|
1742
1742
|
"__schema": "TypeUnionSchema",
|
|
1743
1743
|
"location": {
|
|
1744
1744
|
"filePath": "harmony-worker.ts",
|
|
1745
|
-
"line":
|
|
1745
|
+
"line": 35,
|
|
1746
1746
|
"character": 21
|
|
1747
1747
|
},
|
|
1748
1748
|
"types": [
|
|
@@ -1750,7 +1750,7 @@
|
|
|
1750
1750
|
"__schema": "TypeRefSchema",
|
|
1751
1751
|
"location": {
|
|
1752
1752
|
"filePath": "harmony-worker.ts",
|
|
1753
|
-
"line":
|
|
1753
|
+
"line": 35,
|
|
1754
1754
|
"character": 21
|
|
1755
1755
|
},
|
|
1756
1756
|
"name": "Worker",
|
|
@@ -1760,7 +1760,7 @@
|
|
|
1760
1760
|
"__schema": "KeywordTypeSchema",
|
|
1761
1761
|
"location": {
|
|
1762
1762
|
"filePath": "harmony-worker.ts",
|
|
1763
|
-
"line":
|
|
1763
|
+
"line": 35,
|
|
1764
1764
|
"character": 30
|
|
1765
1765
|
},
|
|
1766
1766
|
"name": "undefined"
|
|
@@ -1773,7 +1773,7 @@
|
|
|
1773
1773
|
"__schema": "GetAccessorSchema",
|
|
1774
1774
|
"location": {
|
|
1775
1775
|
"filePath": "harmony-worker.ts",
|
|
1776
|
-
"line":
|
|
1776
|
+
"line": 37,
|
|
1777
1777
|
"character": 3
|
|
1778
1778
|
},
|
|
1779
1779
|
"signature": "(getter) HarmonyWorker<T>.stdout: internal.Readable | undefined",
|
|
@@ -1782,7 +1782,7 @@
|
|
|
1782
1782
|
"__schema": "InferenceTypeSchema",
|
|
1783
1783
|
"location": {
|
|
1784
1784
|
"filePath": "harmony-worker.ts",
|
|
1785
|
-
"line":
|
|
1785
|
+
"line": 37,
|
|
1786
1786
|
"character": 3
|
|
1787
1787
|
},
|
|
1788
1788
|
"type": "internal.Readable | undefined"
|
|
@@ -1792,7 +1792,7 @@
|
|
|
1792
1792
|
"__schema": "GetAccessorSchema",
|
|
1793
1793
|
"location": {
|
|
1794
1794
|
"filePath": "harmony-worker.ts",
|
|
1795
|
-
"line":
|
|
1795
|
+
"line": 41,
|
|
1796
1796
|
"character": 3
|
|
1797
1797
|
},
|
|
1798
1798
|
"signature": "(getter) HarmonyWorker<T>.stderr: internal.Readable | undefined",
|
|
@@ -1801,7 +1801,7 @@
|
|
|
1801
1801
|
"__schema": "InferenceTypeSchema",
|
|
1802
1802
|
"location": {
|
|
1803
1803
|
"filePath": "harmony-worker.ts",
|
|
1804
|
-
"line":
|
|
1804
|
+
"line": 41,
|
|
1805
1805
|
"character": 3
|
|
1806
1806
|
},
|
|
1807
1807
|
"type": "internal.Readable | undefined"
|
|
@@ -1811,7 +1811,7 @@
|
|
|
1811
1811
|
"__schema": "GetAccessorSchema",
|
|
1812
1812
|
"location": {
|
|
1813
1813
|
"filePath": "harmony-worker.ts",
|
|
1814
|
-
"line":
|
|
1814
|
+
"line": 45,
|
|
1815
1815
|
"character": 3
|
|
1816
1816
|
},
|
|
1817
1817
|
"signature": "(getter) HarmonyWorker<T>.stdin: internal.Writable | null | undefined",
|
|
@@ -1820,7 +1820,7 @@
|
|
|
1820
1820
|
"__schema": "InferenceTypeSchema",
|
|
1821
1821
|
"location": {
|
|
1822
1822
|
"filePath": "harmony-worker.ts",
|
|
1823
|
-
"line":
|
|
1823
|
+
"line": 45,
|
|
1824
1824
|
"character": 3
|
|
1825
1825
|
},
|
|
1826
1826
|
"type": "internal.Writable | null | undefined"
|
|
@@ -1830,7 +1830,7 @@
|
|
|
1830
1830
|
"__schema": "FunctionLikeSchema",
|
|
1831
1831
|
"location": {
|
|
1832
1832
|
"filePath": "harmony-worker.ts",
|
|
1833
|
-
"line":
|
|
1833
|
+
"line": 59,
|
|
1834
1834
|
"character": 3
|
|
1835
1835
|
},
|
|
1836
1836
|
"signature": "(method) HarmonyWorker<T>.initiate(options: Partial<InitOptions>): Remote<T>",
|
|
@@ -1840,7 +1840,7 @@
|
|
|
1840
1840
|
"__schema": "ParameterSchema",
|
|
1841
1841
|
"location": {
|
|
1842
1842
|
"filePath": "harmony-worker.ts",
|
|
1843
|
-
"line":
|
|
1843
|
+
"line": 59,
|
|
1844
1844
|
"character": 12
|
|
1845
1845
|
},
|
|
1846
1846
|
"name": "options",
|
|
@@ -1848,7 +1848,7 @@
|
|
|
1848
1848
|
"__schema": "TypeRefSchema",
|
|
1849
1849
|
"location": {
|
|
1850
1850
|
"filePath": "harmony-worker.ts",
|
|
1851
|
-
"line":
|
|
1851
|
+
"line": 59,
|
|
1852
1852
|
"character": 21
|
|
1853
1853
|
},
|
|
1854
1854
|
"name": "Partial",
|
|
@@ -1857,7 +1857,7 @@
|
|
|
1857
1857
|
"__schema": "TypeRefSchema",
|
|
1858
1858
|
"location": {
|
|
1859
1859
|
"filePath": "harmony-worker.ts",
|
|
1860
|
-
"line":
|
|
1860
|
+
"line": 59,
|
|
1861
1861
|
"character": 29
|
|
1862
1862
|
},
|
|
1863
1863
|
"name": "InitOptions",
|
|
@@ -1873,7 +1873,7 @@
|
|
|
1873
1873
|
"__schema": "TypeRefSchema",
|
|
1874
1874
|
"location": {
|
|
1875
1875
|
"filePath": "harmony-worker.ts",
|
|
1876
|
-
"line":
|
|
1876
|
+
"line": 59,
|
|
1877
1877
|
"character": 44
|
|
1878
1878
|
},
|
|
1879
1879
|
"name": "Remote",
|
|
@@ -1883,7 +1883,7 @@
|
|
|
1883
1883
|
"__schema": "TypeRefSchema",
|
|
1884
1884
|
"location": {
|
|
1885
1885
|
"filePath": "harmony-worker.ts",
|
|
1886
|
-
"line":
|
|
1886
|
+
"line": 59,
|
|
1887
1887
|
"character": 51
|
|
1888
1888
|
},
|
|
1889
1889
|
"name": "T"
|
|
@@ -1896,7 +1896,7 @@
|
|
|
1896
1896
|
"__schema": "FunctionLikeSchema",
|
|
1897
1897
|
"location": {
|
|
1898
1898
|
"filePath": "harmony-worker.ts",
|
|
1899
|
-
"line":
|
|
1899
|
+
"line": 67,
|
|
1900
1900
|
"character": 3
|
|
1901
1901
|
},
|
|
1902
1902
|
"signature": "(method) HarmonyWorker<T>.get(): Remote<T> | undefined",
|
|
@@ -1906,7 +1906,7 @@
|
|
|
1906
1906
|
"__schema": "InferenceTypeSchema",
|
|
1907
1907
|
"location": {
|
|
1908
1908
|
"filePath": "harmony-worker.ts",
|
|
1909
|
-
"line":
|
|
1909
|
+
"line": 67,
|
|
1910
1910
|
"character": 3
|
|
1911
1911
|
},
|
|
1912
1912
|
"type": "Remote<T> | undefined"
|
|
@@ -1917,7 +1917,7 @@
|
|
|
1917
1917
|
"__schema": "FunctionLikeSchema",
|
|
1918
1918
|
"location": {
|
|
1919
1919
|
"filePath": "harmony-worker.ts",
|
|
1920
|
-
"line":
|
|
1920
|
+
"line": 71,
|
|
1921
1921
|
"character": 3
|
|
1922
1922
|
},
|
|
1923
1923
|
"signature": "(method) HarmonyWorker<T>.terminate(): Promise<void>",
|
|
@@ -1927,7 +1927,7 @@
|
|
|
1927
1927
|
"__schema": "InferenceTypeSchema",
|
|
1928
1928
|
"location": {
|
|
1929
1929
|
"filePath": "harmony-worker.ts",
|
|
1930
|
-
"line":
|
|
1930
|
+
"line": 71,
|
|
1931
1931
|
"character": 3
|
|
1932
1932
|
},
|
|
1933
1933
|
"type": "Promise<void>"
|
|
@@ -1950,7 +1950,7 @@
|
|
|
1950
1950
|
"componentId": {
|
|
1951
1951
|
"scope": "teambit.harmony",
|
|
1952
1952
|
"name": "worker",
|
|
1953
|
-
"version": "0.0.
|
|
1953
|
+
"version": "0.0.1307"
|
|
1954
1954
|
},
|
|
1955
1955
|
"taggedModuleExports": []
|
|
1956
1956
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_worker_threads","data","require","_comlink","_nodeEndpoint","_interopRequireDefault","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HarmonyWorker","constructor","name","workerPath","stdout","worker","stderr","stdin","getOptions","targetOptions","defaultOptions","assign","initiate","options","Worker","remoteWorker","wrap","nodeEndpoint","get","terminate","exports"],"sources":["harmony-worker.ts"],"sourcesContent":["// eslint-disable-next-line import/no-unresolved\nimport { Worker } from 'worker_threads';\nimport { wrap, Remote } from 'comlink';\nimport nodeEndpoint from './node-endpoint';\n\nexport type InitOptions = {\n /**\n * Determines whether stdout should be piped into the parent process.\n * If this is set to true, then worker.stdout is NOT automatically piped through to process.stdout in the parent.\n */\n stdout: boolean;\n\n /**\n * Determines whether stderr should be piped into the parent process.\n * If this is set to true, then worker.stderr is NOT automatically piped through to process.stderr in the parent.\n */\n stderr: boolean;\n\n /**\n * Determines whether stdin should be piped into the parent process.\n * If this is set to true, then worker.stdin provides a writable stream whose contents appear as process.stdin inside\n * the Worker. By default, no data is provided.\n */\n stdin: boolean;\n};\n\nexport class HarmonyWorker<T> {\n constructor(readonly name: string
|
|
1
|
+
{"version":3,"names":["_worker_threads","data","require","_comlink","_nodeEndpoint","_interopRequireDefault","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HarmonyWorker","constructor","name","workerPath","stdout","worker","stderr","stdin","getOptions","targetOptions","defaultOptions","assign","initiate","options","Worker","remoteWorker","wrap","nodeEndpoint","get","terminate","exports"],"sources":["harmony-worker.ts"],"sourcesContent":["// eslint-disable-next-line import/no-unresolved\nimport { Worker } from 'worker_threads';\nimport { wrap, Remote } from 'comlink';\nimport nodeEndpoint from './node-endpoint';\n\nexport type InitOptions = {\n /**\n * Determines whether stdout should be piped into the parent process.\n * If this is set to true, then worker.stdout is NOT automatically piped through to process.stdout in the parent.\n */\n stdout: boolean;\n\n /**\n * Determines whether stderr should be piped into the parent process.\n * If this is set to true, then worker.stderr is NOT automatically piped through to process.stderr in the parent.\n */\n stderr: boolean;\n\n /**\n * Determines whether stdin should be piped into the parent process.\n * If this is set to true, then worker.stdin provides a writable stream whose contents appear as process.stdin inside\n * the Worker. By default, no data is provided.\n */\n stdin: boolean;\n};\n\nexport class HarmonyWorker<T> {\n constructor(\n readonly name: string,\n readonly workerPath: string\n ) {}\n\n protected remoteWorker: undefined | Remote<T>;\n\n protected worker: Worker | undefined;\n\n get stdout() {\n return this.worker?.stdout;\n }\n\n get stderr() {\n return this.worker?.stderr;\n }\n\n get stdin() {\n return this.worker?.stdin;\n }\n\n private getOptions(targetOptions: Partial<InitOptions>) {\n const defaultOptions = {\n stdout: true,\n stderr: true,\n stdin: true,\n };\n\n return Object.assign(defaultOptions, targetOptions);\n }\n\n initiate(options: Partial<InitOptions>): Remote<T> {\n const worker = new Worker(this.workerPath, this.getOptions(options));\n this.worker = worker;\n const remoteWorker = wrap<T>(nodeEndpoint(worker));\n this.remoteWorker = remoteWorker;\n return remoteWorker;\n }\n\n get() {\n return this.remoteWorker;\n }\n\n async terminate() {\n if (!this.worker) return;\n await this.worker.terminate();\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_worker@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_worker@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_worker@0.0.1307/dist/worker.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.harmony_worker@0.0.1307/dist/worker.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_cli","data","require","_harmony","_worker","_harmonyWorker","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","WorkerMain","constructor","workerSlot","workerNameSlot","listWorkers","values","declareWorker","name","path","register","maybeAspectId","toArray","find","workerName","Error","scriptPath","systemWorker","HarmonyWorker","getWorker","id","get","provider","_deps","_config","exports","MainRuntime","Slot","withType","WorkerAspect","addRuntime"],"sources":["worker.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { WorkerAspect } from './worker.aspect';\nimport { HarmonyWorker } from './harmony-worker';\n\nexport type WorkerSlot = SlotRegistry<HarmonyWorker<unknown>>;\n\nexport type WorkerNameSlot = SlotRegistry<string>;\n\nexport class WorkerMain {\n constructor(private workerSlot: WorkerSlot
|
|
1
|
+
{"version":3,"names":["_cli","data","require","_harmony","_worker","_harmonyWorker","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","WorkerMain","constructor","workerSlot","workerNameSlot","listWorkers","values","declareWorker","name","path","register","maybeAspectId","toArray","find","workerName","Error","scriptPath","systemWorker","HarmonyWorker","getWorker","id","get","provider","_deps","_config","exports","MainRuntime","Slot","withType","WorkerAspect","addRuntime"],"sources":["worker.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport { WorkerAspect } from './worker.aspect';\nimport { HarmonyWorker } from './harmony-worker';\n\nexport type WorkerSlot = SlotRegistry<HarmonyWorker<unknown>>;\n\nexport type WorkerNameSlot = SlotRegistry<string>;\n\nexport class WorkerMain {\n constructor(\n private workerSlot: WorkerSlot,\n private workerNameSlot: WorkerNameSlot\n ) {}\n\n static runtime = MainRuntime;\n\n listWorkers(): HarmonyWorker<any>[] {\n return this.workerSlot.values();\n }\n\n /**\n * create a new worker.\n */\n declareWorker<T>(name: string, path: string): HarmonyWorker<T> {\n this.workerNameSlot.register(name);\n\n const maybeAspectId = this.workerNameSlot.toArray().find(([, workerName]) => {\n return workerName === name;\n });\n\n if (!maybeAspectId) throw new Error(`could not create a worker ${name}`);\n // const scriptPath = path || await this.resolveWorkerScript(name, aspectId);\n const scriptPath = path;\n const systemWorker = new HarmonyWorker<T>(name, scriptPath);\n this.workerSlot.register(systemWorker);\n\n return systemWorker;\n }\n\n // private async resolveWorkerScript(name: string, aspectId: string): Promise<string> {\n // const host = this.componentAspect.getHost();\n // const id = await host.resolveComponentId(aspectId);\n // const component = await host.get(id);\n // if (!component) throw new Error(`[worker] could not resolve component for aspect ID: ${aspectId}`);\n // const packageName = this.pkg.getPackageName(component);\n // // const workerFile = component.state.filesystem.files.find((file) => file.relative.includes(`${name}.worker`));\n // // if (!workerFile) throw new Error(`[worker] aspect declaring a worker must contain a ${name}.worker. file`);\n // return require.resolve(join(packageName, 'dist', `${name}.worker.js`));\n // }\n\n getWorker<T>(id: string): HarmonyWorker<T> {\n return this.workerSlot.get(id) as HarmonyWorker<T>;\n }\n\n static slots = [Slot.withType<HarmonyWorker<unknown>>(), Slot.withType<string>()];\n\n static dependencies = [];\n\n static async provider(_deps, _config, [workerSlot, workerNameSlot]: [WorkerSlot, WorkerNameSlot]) {\n return new WorkerMain(workerSlot, workerNameSlot);\n }\n}\n\nWorkerAspect.addRuntime(WorkerMain);\n"],"mappings":"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","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/worker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1307",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/harmony/worker",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.harmony",
|
|
8
8
|
"name": "worker",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.1307"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"comlink": "4.3.0",
|
|
13
13
|
"@teambit/harmony": "0.4.6",
|
|
14
|
-
"@teambit/cli": "0.0.
|
|
14
|
+
"@teambit/cli": "0.0.1003"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/mocha": "9.1.0",
|