@things-factory/integration-base 6.2.162 → 6.2.163
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-server/engine/connection-manager.js +2 -1
- package/dist-server/engine/connection-manager.js.map +1 -1
- package/dist-server/service/scenario/scenario.js +8 -4
- package/dist-server/service/scenario/scenario.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/server/engine/connection-manager.ts +2 -0
- package/server/service/scenario/scenario.ts +19 -4
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/integration-base",
|
3
|
-
"version": "6.2.
|
3
|
+
"version": "6.2.163",
|
4
4
|
"main": "dist-server/index.js",
|
5
5
|
"browser": "client/index.js",
|
6
6
|
"things-factory": true,
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"devDependencies": {
|
48
48
|
"@types/cron": "^2.0.1"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "9709a69dcd717d56fb6d84d0f2c6a92c22d09f0c"
|
51
51
|
}
|
@@ -121,8 +121,10 @@ export class ConnectionManager {
|
|
121
121
|
|
122
122
|
static getConnectionInstances(domain: Domain): { [connectionName: string]: any } {
|
123
123
|
const connections = ConnectionManager.connections[domain.id]
|
124
|
+
const parentConnections = domain.parentId && ConnectionManager.connections[domain.parentId]
|
124
125
|
|
125
126
|
return {
|
127
|
+
...parentConnections,
|
126
128
|
...connections
|
127
129
|
}
|
128
130
|
}
|
@@ -94,15 +94,30 @@ export class Scenario {
|
|
94
94
|
@RelationId((scenario: Scenario) => scenario.updater)
|
95
95
|
updaterId?: string
|
96
96
|
|
97
|
-
async start(
|
97
|
+
async start(options?: {
|
98
|
+
instanceName?: string;
|
99
|
+
domain?: Domain;
|
100
|
+
user?: User;
|
101
|
+
variables?: any;
|
102
|
+
}) {
|
98
103
|
try {
|
99
|
-
await ScenarioEngine.load(instanceName || this.name,
|
104
|
+
await ScenarioEngine.load(options?.instanceName || this.name,
|
105
|
+
this,
|
106
|
+
{
|
107
|
+
domain: options?.domain || this.domain,
|
108
|
+
user: options?.user || this.updater,
|
109
|
+
variables: options?.variables
|
110
|
+
})
|
100
111
|
} catch (ex) {}
|
101
112
|
}
|
102
113
|
|
103
|
-
async stop(
|
114
|
+
async stop(options?: {
|
115
|
+
instanceName?: string;
|
116
|
+
domain?: Domain,
|
117
|
+
user?: User
|
118
|
+
}) {
|
104
119
|
try {
|
105
|
-
await ScenarioEngine.unload(this.domain, instanceName || this.name)
|
120
|
+
await ScenarioEngine.unload(options?.domain || this.domain, options?.instanceName || this.name)
|
106
121
|
} finally {
|
107
122
|
}
|
108
123
|
}
|