@teambit/worker 0.0.1164 → 0.0.1166
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 +33 -11
- package/dist/expose.d.ts +2 -0
- package/dist/harmony-worker.d.ts +34 -0
- package/dist/index.d.ts +6 -0
- package/dist/node-endpoint.d.ts +7 -0
- package/dist/{preview-1712719054377.js → preview-1712822929999.js} +2 -2
- package/dist/worker-manifest.d.ts +6 -0
- package/dist/worker.aspect.d.ts +2 -0
- package/dist/worker.composition.d.ts +1 -0
- package/dist/worker.main.runtime.d.ts +19 -0
- package/package.json +4 -4
- package/tsconfig.json +1 -7
|
@@ -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.1166" 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={58103:(e,t,o)=>{var r={id:"teambit.harmony/worker@0.0.1166",homepage:"https://bit.cloud/teambit/harmony/worker",exported:!0};function n(){const e=i(o(41594));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},41594: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={};return(()=>{o.r(r),o.d(r,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(58103);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var a=["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)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},p.apply(this,arguments)}var c={},s="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,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,a);return(0,n.mdx)(s,p({},c,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
"line": 11,
|
|
75
75
|
"character": 35
|
|
76
76
|
},
|
|
77
|
-
"name": "WorkerSlot"
|
|
77
|
+
"name": "WorkerSlot",
|
|
78
|
+
"internalFilePath": "worker.main.runtime.ts"
|
|
78
79
|
},
|
|
79
80
|
"isOptional": false,
|
|
80
81
|
"isSpread": false
|
|
@@ -94,7 +95,8 @@
|
|
|
94
95
|
"line": 11,
|
|
95
96
|
"character": 71
|
|
96
97
|
},
|
|
97
|
-
"name": "WorkerNameSlot"
|
|
98
|
+
"name": "WorkerNameSlot",
|
|
99
|
+
"internalFilePath": "worker.main.runtime.ts"
|
|
98
100
|
},
|
|
99
101
|
"isOptional": false,
|
|
100
102
|
"isSpread": false
|
|
@@ -429,7 +431,8 @@
|
|
|
429
431
|
"line": 57,
|
|
430
432
|
"character": 72
|
|
431
433
|
},
|
|
432
|
-
"name": "WorkerSlot"
|
|
434
|
+
"name": "WorkerSlot",
|
|
435
|
+
"internalFilePath": "worker.main.runtime.ts"
|
|
433
436
|
},
|
|
434
437
|
{
|
|
435
438
|
"__schema": "TypeRefSchema",
|
|
@@ -438,7 +441,8 @@
|
|
|
438
441
|
"line": 57,
|
|
439
442
|
"character": 84
|
|
440
443
|
},
|
|
441
|
-
"name": "WorkerNameSlot"
|
|
444
|
+
"name": "WorkerNameSlot",
|
|
445
|
+
"internalFilePath": "worker.main.runtime.ts"
|
|
442
446
|
}
|
|
443
447
|
]
|
|
444
448
|
},
|
|
@@ -627,7 +631,8 @@
|
|
|
627
631
|
"line": 56,
|
|
628
632
|
"character": 29
|
|
629
633
|
},
|
|
630
|
-
"name": "InitOptions"
|
|
634
|
+
"name": "InitOptions",
|
|
635
|
+
"internalFilePath": "harmony-worker.ts"
|
|
631
636
|
}
|
|
632
637
|
]
|
|
633
638
|
},
|
|
@@ -643,6 +648,7 @@
|
|
|
643
648
|
"character": 44
|
|
644
649
|
},
|
|
645
650
|
"name": "Remote",
|
|
651
|
+
"packageName": "comlink",
|
|
646
652
|
"typeArgs": [
|
|
647
653
|
{
|
|
648
654
|
"__schema": "TypeRefSchema",
|
|
@@ -839,6 +845,11 @@
|
|
|
839
845
|
"character": 26
|
|
840
846
|
},
|
|
841
847
|
"name": "SlotRegistry",
|
|
848
|
+
"componentId": {
|
|
849
|
+
"scope": "teambit.harmony",
|
|
850
|
+
"name": "harmony",
|
|
851
|
+
"version": "0.4.6"
|
|
852
|
+
},
|
|
842
853
|
"typeArgs": [
|
|
843
854
|
{
|
|
844
855
|
"__schema": "TypeRefSchema",
|
|
@@ -880,6 +891,11 @@
|
|
|
880
891
|
"character": 30
|
|
881
892
|
},
|
|
882
893
|
"name": "SlotRegistry",
|
|
894
|
+
"componentId": {
|
|
895
|
+
"scope": "teambit.harmony",
|
|
896
|
+
"name": "harmony",
|
|
897
|
+
"version": "0.4.6"
|
|
898
|
+
},
|
|
883
899
|
"typeArgs": [
|
|
884
900
|
{
|
|
885
901
|
"__schema": "KeywordTypeSchema",
|
|
@@ -928,7 +944,8 @@
|
|
|
928
944
|
"line": 11,
|
|
929
945
|
"character": 35
|
|
930
946
|
},
|
|
931
|
-
"name": "WorkerSlot"
|
|
947
|
+
"name": "WorkerSlot",
|
|
948
|
+
"internalFilePath": "worker.main.runtime.ts"
|
|
932
949
|
},
|
|
933
950
|
"isOptional": false,
|
|
934
951
|
"isSpread": false
|
|
@@ -948,7 +965,8 @@
|
|
|
948
965
|
"line": 11,
|
|
949
966
|
"character": 71
|
|
950
967
|
},
|
|
951
|
-
"name": "WorkerNameSlot"
|
|
968
|
+
"name": "WorkerNameSlot",
|
|
969
|
+
"internalFilePath": "worker.main.runtime.ts"
|
|
952
970
|
},
|
|
953
971
|
"isOptional": false,
|
|
954
972
|
"isSpread": false
|
|
@@ -1283,7 +1301,8 @@
|
|
|
1283
1301
|
"line": 57,
|
|
1284
1302
|
"character": 72
|
|
1285
1303
|
},
|
|
1286
|
-
"name": "WorkerSlot"
|
|
1304
|
+
"name": "WorkerSlot",
|
|
1305
|
+
"internalFilePath": "worker.main.runtime.ts"
|
|
1287
1306
|
},
|
|
1288
1307
|
{
|
|
1289
1308
|
"__schema": "TypeRefSchema",
|
|
@@ -1292,7 +1311,8 @@
|
|
|
1292
1311
|
"line": 57,
|
|
1293
1312
|
"character": 84
|
|
1294
1313
|
},
|
|
1295
|
-
"name": "WorkerNameSlot"
|
|
1314
|
+
"name": "WorkerNameSlot",
|
|
1315
|
+
"internalFilePath": "worker.main.runtime.ts"
|
|
1296
1316
|
}
|
|
1297
1317
|
]
|
|
1298
1318
|
},
|
|
@@ -1613,7 +1633,8 @@
|
|
|
1613
1633
|
"line": 56,
|
|
1614
1634
|
"character": 29
|
|
1615
1635
|
},
|
|
1616
|
-
"name": "InitOptions"
|
|
1636
|
+
"name": "InitOptions",
|
|
1637
|
+
"internalFilePath": "harmony-worker.ts"
|
|
1617
1638
|
}
|
|
1618
1639
|
]
|
|
1619
1640
|
},
|
|
@@ -1629,6 +1650,7 @@
|
|
|
1629
1650
|
"character": 44
|
|
1630
1651
|
},
|
|
1631
1652
|
"name": "Remote",
|
|
1653
|
+
"packageName": "comlink",
|
|
1632
1654
|
"typeArgs": [
|
|
1633
1655
|
{
|
|
1634
1656
|
"__schema": "TypeRefSchema",
|
|
@@ -1701,7 +1723,7 @@
|
|
|
1701
1723
|
"componentId": {
|
|
1702
1724
|
"scope": "teambit.harmony",
|
|
1703
1725
|
"name": "worker",
|
|
1704
|
-
"version": "0.0.
|
|
1726
|
+
"version": "0.0.1166"
|
|
1705
1727
|
},
|
|
1706
1728
|
"taggedModuleExports": []
|
|
1707
1729
|
}
|
package/dist/expose.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Remote } from 'comlink';
|
|
3
|
+
export type InitOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Determines whether stdout should be piped into the parent process.
|
|
6
|
+
* If this is set to true, then worker.stdout is NOT automatically piped through to process.stdout in the parent.
|
|
7
|
+
*/
|
|
8
|
+
stdout: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Determines whether stderr should be piped into the parent process.
|
|
11
|
+
* If this is set to true, then worker.stderr is NOT automatically piped through to process.stderr in the parent.
|
|
12
|
+
*/
|
|
13
|
+
stderr: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Determines whether stdin should be piped into the parent process.
|
|
16
|
+
* If this is set to true, then worker.stdin provides a writable stream whose contents appear as process.stdin inside
|
|
17
|
+
* the Worker. By default, no data is provided.
|
|
18
|
+
*/
|
|
19
|
+
stdin: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare class HarmonyWorker<T> {
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly workerPath: string;
|
|
24
|
+
constructor(name: string, workerPath: string);
|
|
25
|
+
private remoteWorker;
|
|
26
|
+
private worker;
|
|
27
|
+
get stdout(): import("stream").Readable | undefined;
|
|
28
|
+
get stderr(): import("stream").Readable | undefined;
|
|
29
|
+
get stdin(): import("stream").Writable | null | undefined;
|
|
30
|
+
private getOptions;
|
|
31
|
+
initiate(options: Partial<InitOptions>): Remote<T>;
|
|
32
|
+
get(): Remote<T> | undefined;
|
|
33
|
+
terminate(): Promise<void>;
|
|
34
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_worker@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_worker@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_worker@0.0.1166/dist/worker.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_worker@0.0.1166/dist/worker.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Logo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SlotRegistry } from '@teambit/harmony';
|
|
2
|
+
import { HarmonyWorker } from './harmony-worker';
|
|
3
|
+
export type WorkerSlot = SlotRegistry<HarmonyWorker<unknown>>;
|
|
4
|
+
export type WorkerNameSlot = SlotRegistry<string>;
|
|
5
|
+
export declare class WorkerMain {
|
|
6
|
+
private workerSlot;
|
|
7
|
+
private workerNameSlot;
|
|
8
|
+
constructor(workerSlot: WorkerSlot, workerNameSlot: WorkerNameSlot);
|
|
9
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
10
|
+
listWorkers(): HarmonyWorker<any>[];
|
|
11
|
+
/**
|
|
12
|
+
* create a new worker.
|
|
13
|
+
*/
|
|
14
|
+
declareWorker<T>(name: string, path: string): HarmonyWorker<T>;
|
|
15
|
+
getWorker<T>(id: string): HarmonyWorker<T>;
|
|
16
|
+
static slots: (((registerFn: () => string) => SlotRegistry<HarmonyWorker<unknown>>) | ((registerFn: () => string) => SlotRegistry<string>))[];
|
|
17
|
+
static dependencies: never[];
|
|
18
|
+
static provider(_deps: any, _config: any, [workerSlot, workerNameSlot]: [WorkerSlot, WorkerNameSlot]): Promise<WorkerMain>;
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/worker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1166",
|
|
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.1166"
|
|
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.862"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/mocha": "9.1.0",
|
|
18
18
|
"chai": "4.3.0",
|
|
19
|
-
"@teambit/harmony.envs.core-aspect-env": "0.0.
|
|
19
|
+
"@teambit/harmony.envs.core-aspect-env": "0.0.33"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": "^17.0.0 || ^18.0.0",
|
package/tsconfig.json
CHANGED
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"emitDeclarationOnly": true,
|
|
21
21
|
"strict": true,
|
|
22
22
|
"strictPropertyInitialization": false,
|
|
23
|
-
"noImplicitAny": false
|
|
24
|
-
"composite": true
|
|
23
|
+
"noImplicitAny": false
|
|
25
24
|
},
|
|
26
25
|
"exclude": [
|
|
27
26
|
"artifacts",
|
|
@@ -36,10 +35,5 @@
|
|
|
36
35
|
"include": [
|
|
37
36
|
"**/*",
|
|
38
37
|
"**/*.json"
|
|
39
|
-
],
|
|
40
|
-
"references": [
|
|
41
|
-
{
|
|
42
|
-
"path": "/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.harmony_cli@0.0.860"
|
|
43
|
-
}
|
|
44
38
|
]
|
|
45
39
|
}
|