@things-factory/shell 6.0.0-alpha.0 → 6.0.0-alpha.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "6.0.0-alpha.0",
3
+ "version": "6.0.0-alpha.6",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -52,10 +52,10 @@
52
52
  "@operato/layout": "^1.0.1",
53
53
  "@operato/shell": "^1.0.1",
54
54
  "@operato/utils": "^1.0.1",
55
- "@things-factory/ejs-remote": "^6.0.0-alpha.0",
56
- "@things-factory/env": "^6.0.0-alpha.0",
57
- "@things-factory/styles": "^6.0.0-alpha.0",
58
- "@things-factory/utils": "^6.0.0-alpha.0",
55
+ "@things-factory/ejs-remote": "^6.0.0-alpha.6",
56
+ "@things-factory/env": "^6.0.0-alpha.6",
57
+ "@things-factory/styles": "^6.0.0-alpha.6",
58
+ "@things-factory/utils": "^6.0.0-alpha.6",
59
59
  "@webcomponents/webcomponentsjs": "^2.6.0",
60
60
  "@webpack-contrib/schema-utils": "^1.0.0-beta.0",
61
61
  "apollo-server-core": "^3.10.0",
@@ -132,5 +132,5 @@
132
132
  "pg": "^8.7.3",
133
133
  "sqlite3": "^5.0.8"
134
134
  },
135
- "gitHead": "e5b9823ab3ebc5d6ae5bcb4b5aa60c1306e4dd7e"
135
+ "gitHead": "633ba4d4b8dafbe71ff34a96c46a0db53867c4a2"
136
136
  }
@@ -35,16 +35,18 @@ export function getRepository<X>(target: EntityTarget<X>): Repository<X> {
35
35
 
36
36
  export const databaseInitializer = async () => {
37
37
  try {
38
+ const readConnectionConfig = config.get('ormconfig')
39
+
38
40
  const dataSource = await createConnection({
39
41
  ...ormconfig,
40
- ...config.get('ormconfig')
42
+ ...readConnectionConfig
41
43
  })
42
44
 
43
45
  addDataSource('default', dataSource)
44
46
 
45
47
  logger.info('Default DataSource established')
46
48
 
47
- if (ormconfig.type == 'sqlite' && ormconfig.synchronize == false) {
49
+ if (readConnectionConfig.type == 'sqlite' && readConnectionConfig.synchronize == false) {
48
50
  await dataSource.query('PRAGMA foreign_keys=OFF')
49
51
  await dataSource.synchronize()
50
52
  await dataSource.query('PRAGMA foreign_keys=ON')