@drayman/core 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const saveComponent: ({ script, outputFile }: {
|
|
|
27
27
|
script: any;
|
|
28
28
|
outputFile: any;
|
|
29
29
|
}) => Promise<void>;
|
|
30
|
-
export declare const onInitializeComponentInstance: ({ namespaceId, extensionsPath, extensionsOptions, componentNamePrefix, componentName, componentRootDir, componentInstanceId, componentOptions, connectionId, emit, onComponentInstanceConsole, browserCommands, serverCommands, }: {
|
|
30
|
+
export declare const onInitializeComponentInstance: ({ namespaceId, extensionsPath, extensionsOptions, componentNamePrefix, componentName, componentRootDir, componentInstanceId, componentOptions, connectionId, emit, onComponentInstanceConsole, browserCommands, serverCommands, onEventHubEvent, }: {
|
|
31
31
|
namespaceId?: any;
|
|
32
32
|
extensionsPath?: any;
|
|
33
33
|
extensionsOptions?: any;
|
|
@@ -41,6 +41,7 @@ export declare const onInitializeComponentInstance: ({ namespaceId, extensionsPa
|
|
|
41
41
|
onComponentInstanceConsole: any;
|
|
42
42
|
browserCommands: any;
|
|
43
43
|
serverCommands: any;
|
|
44
|
+
onEventHubEvent?: any;
|
|
44
45
|
}) => Promise<void>;
|
|
45
46
|
export declare const onDisconnect: ({ connectionId }: {
|
|
46
47
|
connectionId: any;
|
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ const saveComponent = async ({ script, outputFile }) => {
|
|
|
74
74
|
await fs_extra_1.default.outputFile(outputFile, transpiledComponentScript.outputText);
|
|
75
75
|
};
|
|
76
76
|
exports.saveComponent = saveComponent;
|
|
77
|
-
const onInitializeComponentInstance = async ({ namespaceId = null, extensionsPath = null, extensionsOptions = null, componentNamePrefix = '', componentName, componentRootDir, componentInstanceId, componentOptions, connectionId, emit, onComponentInstanceConsole, browserCommands, serverCommands, }) => {
|
|
77
|
+
const onInitializeComponentInstance = async ({ namespaceId = null, extensionsPath = null, extensionsOptions = null, componentNamePrefix = '', componentName, componentRootDir, componentInstanceId, componentOptions, connectionId, emit, onComponentInstanceConsole, browserCommands, serverCommands, onEventHubEvent = null, }) => {
|
|
78
78
|
if (componentOptions && typeof componentOptions === 'string') {
|
|
79
79
|
componentOptions = JSON.parse(componentOptions);
|
|
80
80
|
}
|
|
@@ -110,6 +110,7 @@ const onInitializeComponentInstance = async ({ namespaceId = null, extensionsPat
|
|
|
110
110
|
else if (type === 'eventHubEvent') {
|
|
111
111
|
const { eventPayload, groupId, type } = payload;
|
|
112
112
|
exports.handleEventHubEvent({ data: eventPayload, groupId, type, namespaceId });
|
|
113
|
+
onEventHubEvent?.({ data: eventPayload, groupId, type, namespaceId });
|
|
113
114
|
}
|
|
114
115
|
else if (type === 'console') {
|
|
115
116
|
const { text } = payload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drayman/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"ts-node": "^9.1.1",
|
|
40
40
|
"typescript": "~4.1.5"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "828de3167180b8e7920b86c9d44da55a7577961c"
|
|
43
43
|
}
|