@golemio/core 1.2.2-dev.482630459 → 1.2.2-dev.486117229
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/README.md
CHANGED
|
@@ -6,3 +6,96 @@
|
|
|
6
6
|
Core module of the Golemio data platform
|
|
7
7
|
|
|
8
8
|
Developed by http://operatorict.cz
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
- node.js (https://nodejs.org)
|
|
13
|
+
- RabbitMQ (https://www.rabbitmq.com/)
|
|
14
|
+
- Mongo (https://www.mongodb.com)
|
|
15
|
+
- Postgres (https://www.postgresql.org/)
|
|
16
|
+
- Redis (https://redis.io/)
|
|
17
|
+
- yarn (https://yarnpkg.com)
|
|
18
|
+
- TypeScript (https://www.typescriptlang.org/)
|
|
19
|
+
- Golemio Schema Definitions
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
Install all prerequisites
|
|
24
|
+
|
|
25
|
+
Install all dependencies using command:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
yarn install
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
from the application's root directory.
|
|
32
|
+
|
|
33
|
+
## Compilation of typescript code
|
|
34
|
+
|
|
35
|
+
To compile typescript code into js one-time
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
yarn run build
|
|
39
|
+
```
|
|
40
|
+
or run this, to watch all changes
|
|
41
|
+
```bash
|
|
42
|
+
yarn run build-watch
|
|
43
|
+
```
|
|
44
|
+
from the application's root directory.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
In your project's `package.json` set dependency to @golemio/core
|
|
50
|
+
```bash
|
|
51
|
+
yarn add @golemio/core --save
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then import module, e.g.
|
|
55
|
+
```ts
|
|
56
|
+
import * as core from "@golemio/core";
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Local development
|
|
60
|
+
|
|
61
|
+
For the local development use the [yarn link]() to link the @golemio/core with other service e.g. `@golemio/integration-engine` or module e.g. `@golemio/pid`.
|
|
62
|
+
|
|
63
|
+
At the @golemio/core root directory:
|
|
64
|
+
```bash
|
|
65
|
+
yarn link
|
|
66
|
+
yarn build-watch
|
|
67
|
+
```
|
|
68
|
+
At the @golemio/pid root directory:
|
|
69
|
+
```bash
|
|
70
|
+
yarn link "@golemio/core"
|
|
71
|
+
yarn link
|
|
72
|
+
yarn build-watch
|
|
73
|
+
```
|
|
74
|
+
At the @golemio/integration-engine root directory:
|
|
75
|
+
```bash
|
|
76
|
+
yarn link "@golemio/core"
|
|
77
|
+
yarn link "@golemio/pid"
|
|
78
|
+
yarn dev-start
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Now you can change code and immediately see the results.
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## Tests
|
|
85
|
+
|
|
86
|
+
To run all test defined in /test directory simply run this command:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
yarn test
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
from the application's root directory. All tests should pass.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## Contribution guidelines
|
|
96
|
+
|
|
97
|
+
Please read `CONTRIBUTING.md`.
|
|
98
|
+
|
|
99
|
+
## Troubleshooting
|
|
100
|
+
|
|
101
|
+
Contact vyvoj@operatorict.cz
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SequelizeModel = void 0;
|
|
4
|
-
const
|
|
4
|
+
const PostgreDatabase_1 = require("../database/PostgreDatabase");
|
|
5
5
|
const models_1 = require("./");
|
|
6
6
|
/**
|
|
7
7
|
* General model for data stored in PostgreSQL.
|
|
@@ -19,7 +19,7 @@ class SequelizeModel extends models_1.BaseModel {
|
|
|
19
19
|
return;
|
|
20
20
|
};
|
|
21
21
|
// @ts-ignore
|
|
22
|
-
this.sequelizeModel =
|
|
22
|
+
this.sequelizeModel = PostgreDatabase_1.sequelizeConnection.define(tableName, attributes, Object.assign({
|
|
23
23
|
// Remove all audit fields in the default scope: they will be automatically excluded,
|
|
24
24
|
// as they're not needed in the output view, but are present in the table/data
|
|
25
25
|
defaultScope: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SequelizeModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/SequelizeModel.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"SequelizeModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/SequelizeModel.ts"],"names":[],"mappings":";;;AACA,iEAAmE;AACnE,+BAAuC;AAEvC;;;;;GAKG;AACH,MAAsB,cAAe,SAAQ,kBAAS;IAOlD,YAAsB,IAAY,EAAE,SAAiB,EAAE,UAAgC,EAAE,OAA2B;QAChH,KAAK,CAAC,IAAI,CAAC,CAAC;QAchB;;WAEG;QACI,cAAS,GAAG,CAAC,MAAW,EAAQ,EAAE;YACrC,OAAO;QACX,CAAC,CAAC;QAlBE,aAAa;QACb,IAAI,CAAC,cAAc,GAAG,qCAAmB,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU;YAClE,qFAAqF;YACrF,8EAA8E;YAC9E,YAAY,EAAE;gBACV,UAAU,EAAE;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;iBAC1G;aACJ,IACE,OAAO,EACZ,CAAC;IACP,CAAC;CAQJ;AA5BD,wCA4BC"}
|