@twin.org/engine 0.0.1-next.36 → 0.0.1-next.37
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/cjs/index.cjs
CHANGED
|
@@ -183,6 +183,21 @@ function configureEntityStorageConnectors(coreConfig, envVars) {
|
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
+
if (core.Is.stringValue(envVars.mySqlHost)) {
|
|
187
|
+
coreConfig.types.entityStorageConnector.push({
|
|
188
|
+
type: engineTypes.EntityStorageConnectorType.MySqlDb,
|
|
189
|
+
options: {
|
|
190
|
+
config: {
|
|
191
|
+
host: envVars.mySqlHost,
|
|
192
|
+
port: envVars.mySqlPort ?? 3306,
|
|
193
|
+
user: envVars.mySqlUser ?? "",
|
|
194
|
+
password: envVars.mySqlPassword ?? "",
|
|
195
|
+
database: envVars.mySqlDatabase ?? ""
|
|
196
|
+
},
|
|
197
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
186
201
|
const defaultStorageConnector = envVars.entityStorageConnectorType;
|
|
187
202
|
if (core.Is.stringValue(defaultStorageConnector)) {
|
|
188
203
|
for (const config of coreConfig.types.entityStorageConnector) {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -181,6 +181,21 @@ function configureEntityStorageConnectors(coreConfig, envVars) {
|
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
+
if (Is.stringValue(envVars.mySqlHost)) {
|
|
185
|
+
coreConfig.types.entityStorageConnector.push({
|
|
186
|
+
type: EntityStorageConnectorType.MySqlDb,
|
|
187
|
+
options: {
|
|
188
|
+
config: {
|
|
189
|
+
host: envVars.mySqlHost,
|
|
190
|
+
port: envVars.mySqlPort ?? 3306,
|
|
191
|
+
user: envVars.mySqlUser ?? "",
|
|
192
|
+
password: envVars.mySqlPassword ?? "",
|
|
193
|
+
database: envVars.mySqlDatabase ?? ""
|
|
194
|
+
},
|
|
195
|
+
tablePrefix: envVars.entityStorageTablePrefix
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
184
199
|
const defaultStorageConnector = envVars.entityStorageConnectorType;
|
|
185
200
|
if (Is.stringValue(defaultStorageConnector)) {
|
|
186
201
|
for (const config of coreConfig.types.entityStorageConnector) {
|
|
@@ -15,7 +15,7 @@ export interface IEngineEnvironmentVariables {
|
|
|
15
15
|
*/
|
|
16
16
|
stateFilename?: string;
|
|
17
17
|
/**
|
|
18
|
-
* The type of the default entity storage: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb.
|
|
18
|
+
* The type of the default entity storage: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql.
|
|
19
19
|
*/
|
|
20
20
|
entityStorageConnectorType?: string;
|
|
21
21
|
/**
|
|
@@ -94,6 +94,26 @@ export interface IEngineEnvironmentVariables {
|
|
|
94
94
|
* ScyllaDB local data center.
|
|
95
95
|
*/
|
|
96
96
|
scylladbLocalDataCenter?: string;
|
|
97
|
+
/**
|
|
98
|
+
* MySQL host.
|
|
99
|
+
*/
|
|
100
|
+
mySqlHost?: string;
|
|
101
|
+
/**
|
|
102
|
+
* MySQL port.
|
|
103
|
+
*/
|
|
104
|
+
mySqlPort?: number;
|
|
105
|
+
/**
|
|
106
|
+
* MySQL username.
|
|
107
|
+
*/
|
|
108
|
+
mySqlUser?: string;
|
|
109
|
+
/**
|
|
110
|
+
* MySQL password.
|
|
111
|
+
*/
|
|
112
|
+
mySqlPassword?: string;
|
|
113
|
+
/**
|
|
114
|
+
* MySQL Database.
|
|
115
|
+
*/
|
|
116
|
+
mySqlDatabase?: string;
|
|
97
117
|
/**
|
|
98
118
|
* The security token for accessing IPFS API.
|
|
99
119
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -32,7 +32,7 @@ The name of the state file.
|
|
|
32
32
|
|
|
33
33
|
> `optional` **entityStorageConnectorType**: `string`
|
|
34
34
|
|
|
35
|
-
The type of the default entity storage: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb.
|
|
35
|
+
The type of the default entity storage: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql.
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
@@ -188,6 +188,46 @@ ScyllaDB local data center.
|
|
|
188
188
|
|
|
189
189
|
***
|
|
190
190
|
|
|
191
|
+
### mySqlHost?
|
|
192
|
+
|
|
193
|
+
> `optional` **mySqlHost**: `string`
|
|
194
|
+
|
|
195
|
+
MySQL host.
|
|
196
|
+
|
|
197
|
+
***
|
|
198
|
+
|
|
199
|
+
### mySqlPort?
|
|
200
|
+
|
|
201
|
+
> `optional` **mySqlPort**: `number`
|
|
202
|
+
|
|
203
|
+
MySQL port.
|
|
204
|
+
|
|
205
|
+
***
|
|
206
|
+
|
|
207
|
+
### mySqlUser?
|
|
208
|
+
|
|
209
|
+
> `optional` **mySqlUser**: `string`
|
|
210
|
+
|
|
211
|
+
MySQL username.
|
|
212
|
+
|
|
213
|
+
***
|
|
214
|
+
|
|
215
|
+
### mySqlPassword?
|
|
216
|
+
|
|
217
|
+
> `optional` **mySqlPassword**: `string`
|
|
218
|
+
|
|
219
|
+
MySQL password.
|
|
220
|
+
|
|
221
|
+
***
|
|
222
|
+
|
|
223
|
+
### mySqlDatabase?
|
|
224
|
+
|
|
225
|
+
> `optional` **mySqlDatabase**: `string`
|
|
226
|
+
|
|
227
|
+
MySQL Database.
|
|
228
|
+
|
|
229
|
+
***
|
|
230
|
+
|
|
191
231
|
### ipfsBearerToken?
|
|
192
232
|
|
|
193
233
|
> `optional` **ipfsBearerToken**: `string`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/engine",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.37",
|
|
4
4
|
"description": "Engine implementation.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
|
-
"@twin.org/engine-core": "0.0.1-next.
|
|
19
|
-
"@twin.org/engine-types": "0.0.1-next.
|
|
18
|
+
"@twin.org/engine-core": "0.0.1-next.37",
|
|
19
|
+
"@twin.org/engine-types": "0.0.1-next.37"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/cjs/index.cjs",
|
|
22
22
|
"module": "./dist/esm/index.mjs",
|