@common-stack/generate-plugin 6.0.8-alpha.2 → 6.0.8-alpha.20
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/CHANGELOG.md +76 -4
- package/docker-releases/backend/package.json +6 -7
- package/docker-releases/frontend/antd/package.json +7 -7
- package/lib/generators/add-backend/files/package.json +1 -1
- package/lib/generators/add-backend/files/webpack.config.js +3 -1
- package/lib/generators/add-frontend/templates/package.json +2 -2
- package/lib/generators/add-fullstack/files/package.json +4 -4
- package/lib/generators/add-moleculer/files/config.json +5 -0
- package/lib/generators/add-moleculer/files/package.json +5 -5
- package/lib/generators/add-moleculer/files/rollup.config.mjs +14 -1
- package/package.json +3 -3
- package/src/generators/add-fullstack/files/package.json +4 -4
- package/src/generators/add-moleculer/files/config.json +5 -0
- package/src/generators/add-moleculer/files/package.json +5 -5
- package/src/generators/add-moleculer/files/rollup.config.mjs +14 -1
- package/lib/generators/add-moleculer/files/src/modules/module.ts.template +0 -31
- package/src/generators/add-moleculer/files/src/modules/module.ts.template +0 -31
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,78 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.0.8-alpha.20](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.19...v6.0.8-alpha.20) (2025-01-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
9
|
+
|
|
10
|
+
## [6.0.8-alpha.19](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.18...v6.0.8-alpha.19) (2025-01-14)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
13
|
+
|
|
14
|
+
## [6.0.8-alpha.18](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.17...v6.0.8-alpha.18) (2025-01-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
17
|
+
|
|
18
|
+
## [6.0.8-alpha.17](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.16...v6.0.8-alpha.17) (2025-01-08)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
21
|
+
|
|
22
|
+
## [6.0.8-alpha.16](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.15...v6.0.8-alpha.16) (2025-01-08)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
25
|
+
|
|
26
|
+
## [6.0.8-alpha.15](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.14...v6.0.8-alpha.15) (2025-01-03)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
29
|
+
|
|
30
|
+
## [6.0.8-alpha.14](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.13...v6.0.8-alpha.14) (2024-12-30)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
33
|
+
|
|
34
|
+
## [6.0.8-alpha.13](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.12...v6.0.8-alpha.13) (2024-12-30)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
37
|
+
|
|
38
|
+
## [6.0.8-alpha.12](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.11...v6.0.8-alpha.12) (2024-12-29)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
41
|
+
|
|
42
|
+
## [6.0.8-alpha.11](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.10...v6.0.8-alpha.11) (2024-12-29)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
45
|
+
|
|
46
|
+
## [6.0.8-alpha.10](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.9...v6.0.8-alpha.10) (2024-12-20)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
49
|
+
|
|
50
|
+
## [6.0.8-alpha.9](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.8...v6.0.8-alpha.9) (2024-12-20)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
53
|
+
|
|
54
|
+
## [6.0.8-alpha.8](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.7...v6.0.8-alpha.8) (2024-12-19)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
57
|
+
|
|
58
|
+
## [6.0.8-alpha.7](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.6...v6.0.8-alpha.7) (2024-12-19)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
61
|
+
|
|
62
|
+
## [6.0.8-alpha.6](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.5...v6.0.8-alpha.6) (2024-12-19)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
65
|
+
|
|
66
|
+
## [6.0.8-alpha.5](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.4...v6.0.8-alpha.5) (2024-12-19)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
69
|
+
|
|
70
|
+
## [6.0.8-alpha.4](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.3...v6.0.8-alpha.4) (2024-12-19)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
73
|
+
|
|
74
|
+
## [6.0.8-alpha.3](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.2...v6.0.8-alpha.3) (2024-12-19)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
77
|
+
|
|
6
78
|
## [6.0.8-alpha.2](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.1...v6.0.8-alpha.2) (2024-12-19)
|
|
7
79
|
|
|
8
80
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
@@ -249,18 +321,18 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
249
321
|
|
|
250
322
|
### Bug Fixes
|
|
251
323
|
|
|
252
|
-
-
|
|
324
|
+
- **server-stack:** apollo server redis cache ([2ef1df3](https://github.com/cdmbase/common-stack/commit/2ef1df30176616baf9816c47168687577f7aa8ff))
|
|
253
325
|
|
|
254
326
|
### Features
|
|
255
327
|
|
|
256
|
-
-
|
|
328
|
+
- enable docker layer caching ([ce2c742](https://github.com/cdmbase/common-stack/commit/ce2c74271a107d5c73580523a4e1822b80e04c8d))
|
|
257
329
|
|
|
258
330
|
## [6.0.6-alpha.0](https://github.com/cdmbase/common-stack/compare/v0.0.251...v6.0.6-alpha.0) (2024-12-16)
|
|
259
331
|
|
|
260
332
|
### Bug Fixes
|
|
261
333
|
|
|
262
|
-
-
|
|
334
|
+
- **server-stack:** apollo server redis cache ([2ef1df3](https://github.com/cdmbase/common-stack/commit/2ef1df30176616baf9816c47168687577f7aa8ff))
|
|
263
335
|
|
|
264
336
|
### Features
|
|
265
337
|
|
|
266
|
-
-
|
|
338
|
+
- enable docker layer caching ([ce2c742](https://github.com/cdmbase/common-stack/commit/ce2c74271a107d5c73580523a4e1822b80e04c8d))
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"@cdm-logger/client": "^9.0.3",
|
|
71
71
|
"@cdm-logger/server": "^9.0.3",
|
|
72
72
|
"@cdmbase/graphql-type-uri": "^4.0.0",
|
|
73
|
-
"@common-stack/cache-api-server": "6.0.8-alpha.
|
|
74
|
-
"@common-stack/client-core": "6.0.8-alpha.
|
|
75
|
-
"@common-stack/core": "6.0.8-alpha.
|
|
76
|
-
"@common-stack/server-core": "6.0.8-alpha.
|
|
77
|
-
"@common-stack/server-stack": "6.0.8-alpha.
|
|
78
|
-
"@common-stack/store-mongo": "6.0.8-alpha.
|
|
73
|
+
"@common-stack/cache-api-server": "6.0.8-alpha.19",
|
|
74
|
+
"@common-stack/client-core": "6.0.8-alpha.19",
|
|
75
|
+
"@common-stack/core": "6.0.8-alpha.19",
|
|
76
|
+
"@common-stack/server-core": "6.0.8-alpha.19",
|
|
77
|
+
"@common-stack/server-stack": "6.0.8-alpha.19",
|
|
78
|
+
"@common-stack/store-mongo": "6.0.8-alpha.19",
|
|
79
79
|
"@graphql-tools/links": "~9.0.1",
|
|
80
80
|
"@graphql-tools/schema": "~10.0.6",
|
|
81
81
|
"@graphql-tools/stitch": "~9.2.10",
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
"express": "^4.17.1",
|
|
96
96
|
"graphql": "^16.0.0",
|
|
97
97
|
"graphql-bigint": "^1.0.0",
|
|
98
|
-
"graphql-iso-date": "^3.6.1",
|
|
99
98
|
"graphql-middleware": "^6.1.33",
|
|
100
99
|
"graphql-nats-subscriptions": "^1.5.0",
|
|
101
100
|
"graphql-playground-middleware-express": "^1.7.3",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"@apollo/client": "^3.9.0",
|
|
64
64
|
"@cdm-logger/client": "^9.0.3",
|
|
65
65
|
"@cdm-logger/server": "^9.0.3",
|
|
66
|
-
"@common-stack/cache-api-server": "6.0.8-alpha.
|
|
67
|
-
"@common-stack/client-core": "6.0.8-alpha.
|
|
68
|
-
"@common-stack/client-react": "6.0.8-alpha.
|
|
69
|
-
"@common-stack/components-pro": "6.0.8-alpha.
|
|
70
|
-
"@common-stack/core": "6.0.8-alpha.
|
|
71
|
-
"@common-stack/remix-router-redux": "6.0.8-alpha.
|
|
72
|
-
"@common-stack/server-core": "6.0.8-alpha.
|
|
66
|
+
"@common-stack/cache-api-server": "6.0.8-alpha.19",
|
|
67
|
+
"@common-stack/client-core": "6.0.8-alpha.19",
|
|
68
|
+
"@common-stack/client-react": "6.0.8-alpha.19",
|
|
69
|
+
"@common-stack/components-pro": "6.0.8-alpha.7",
|
|
70
|
+
"@common-stack/core": "6.0.8-alpha.19",
|
|
71
|
+
"@common-stack/remix-router-redux": "6.0.8-alpha.7",
|
|
72
|
+
"@common-stack/server-core": "6.0.8-alpha.19",
|
|
73
73
|
"@reduxjs/toolkit": "^2.2.6",
|
|
74
74
|
"@remix-run/express": "~2.10.1",
|
|
75
75
|
"@remix-run/node": "~2.10.1",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@apollo/client": "^3.9.0",
|
|
64
64
|
"@babel/runtime": "^7.20.1",
|
|
65
|
-
"@common-stack/server-stack": "6.0.8-alpha.
|
|
65
|
+
"@common-stack/server-stack": "6.0.8-alpha.19",
|
|
66
66
|
"@remix-run/node": "~2.10.1",
|
|
67
67
|
"lodash": "^4.17.15",
|
|
68
68
|
"react": "18.2.0"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
if (process.env.ENV_FILE) {
|
|
2
|
+
require('dotenv').config({ path: process.env.ENV_FILE });
|
|
3
|
+
}
|
|
2
4
|
const webpack = require('webpack');
|
|
3
5
|
const path = require('path');
|
|
4
6
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"watch:test": "cross-env ENV_FILE=../../config/test/test.env node ./server.js"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@common-stack/frontend-stack-react": "6.0.8-alpha.
|
|
55
|
+
"@common-stack/frontend-stack-react": "6.0.8-alpha.19",
|
|
56
56
|
"@react-icons/all-files": "^4.1.0",
|
|
57
57
|
"classnames": "^2.2.6",
|
|
58
58
|
"compression": "^1.7.4",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
|
|
80
|
-
"@common-stack/rollup-vite-utils": "6.0.8-alpha.
|
|
80
|
+
"@common-stack/rollup-vite-utils": "6.0.8-alpha.19",
|
|
81
81
|
"@remix-run/dev": "~2.10.1",
|
|
82
82
|
"@remix-run/serve": "~2.10.1",
|
|
83
83
|
"cross-env": "^7.0.3",
|
|
@@ -146,9 +146,9 @@
|
|
|
146
146
|
"@babel/preset-typescript": "^7.18.6",
|
|
147
147
|
"@babel/register": "^7.18.9",
|
|
148
148
|
"@babel/runtime": "^7.20.1",
|
|
149
|
-
"@common-stack/env-list-loader": "6.0.8-alpha.
|
|
150
|
-
"@common-stack/generate-plugin": "6.0.8-alpha.
|
|
151
|
-
"@common-stack/rollup-vite-utils": "6.0.8-alpha.
|
|
149
|
+
"@common-stack/env-list-loader": "6.0.8-alpha.7",
|
|
150
|
+
"@common-stack/generate-plugin": "6.0.8-alpha.19",
|
|
151
|
+
"@common-stack/rollup-vite-utils": "6.0.8-alpha.19",
|
|
152
152
|
"@emotion/babel-plugin": "^11.11.0",
|
|
153
153
|
"@graphql-codegen/add": "^5.0.2",
|
|
154
154
|
"@graphql-codegen/cli": "^5.0.2",
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
"jest-raw-loader": "^1.0.1",
|
|
273
273
|
"jest-transform-graphql": "^2.1.0",
|
|
274
274
|
"jsdom": "^20.0.2",
|
|
275
|
-
"lerna": "8",
|
|
275
|
+
"lerna": "8.1.8",
|
|
276
276
|
"less": "^4.1.3",
|
|
277
277
|
"less-loader": "^11.0.0",
|
|
278
278
|
"lint-staged": "^15.2.7",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"watch": "npm run start:dev"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@common-stack/client-core": "6.0.8-alpha.
|
|
29
|
-
"@common-stack/core": "6.0.8-alpha.
|
|
30
|
-
"@common-stack/server-core": "6.0.8-alpha.
|
|
31
|
-
"@common-stack/server-stack": "6.0.8-alpha.
|
|
32
|
-
"@common-stack/store-mongo": "6.0.8-alpha.
|
|
28
|
+
"@common-stack/client-core": "6.0.8-alpha.19",
|
|
29
|
+
"@common-stack/core": "6.0.8-alpha.19",
|
|
30
|
+
"@common-stack/server-core": "6.0.8-alpha.19",
|
|
31
|
+
"@common-stack/server-stack": "6.0.8-alpha.19",
|
|
32
|
+
"@common-stack/store-mongo": "6.0.8-alpha.19",
|
|
33
33
|
"@container-stack/mailing-api": "5.2.1-alpha.1",
|
|
34
34
|
"helmet": "^3.21.2",
|
|
35
35
|
"react": "18.2.0",
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import graphql from '@rollup/plugin-graphql';
|
|
2
2
|
import typescript from '@rollup/plugin-typescript';
|
|
3
3
|
import { string } from 'rollup-plugin-string';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { writeBackendModuleFile } from '@common-stack/rollup-vite-utils';
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
|
|
11
|
+
// Write backend module file before bundling
|
|
12
|
+
try {
|
|
13
|
+
const packageConfig = await import('./config.json', { assert: { type: 'json' } });
|
|
14
|
+
await writeBackendModuleFile(path.join(__dirname, 'src/modules'), packageConfig.default);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
console.error('Error writing backend module file:', e);
|
|
17
|
+
}
|
|
4
18
|
|
|
5
19
|
const bundle = (config) => ({
|
|
6
20
|
...config,
|
|
7
21
|
input: 'src/index.ts',
|
|
8
|
-
// marking all node modules as external
|
|
9
22
|
external: (id) => !/^[./]/.test(id),
|
|
10
23
|
});
|
|
11
24
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@common-stack/generate-plugin",
|
|
3
|
-
"version": "6.0.8-alpha.
|
|
3
|
+
"version": "6.0.8-alpha.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.mjs",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"watch": "yarn build:lib:watch"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@common-stack/rollup-vite-utils": "6.0.8-alpha.
|
|
20
|
+
"@common-stack/rollup-vite-utils": "6.0.8-alpha.20",
|
|
21
21
|
"tslib": "^2.3.0"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
},
|
|
26
26
|
"executors": "./executors.json",
|
|
27
27
|
"generators": "./generators.json",
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "636eb68d91e0a1cd0cd5c150f3c806df7ac68fcb"
|
|
29
29
|
}
|
|
@@ -146,9 +146,9 @@
|
|
|
146
146
|
"@babel/preset-typescript": "^7.18.6",
|
|
147
147
|
"@babel/register": "^7.18.9",
|
|
148
148
|
"@babel/runtime": "^7.20.1",
|
|
149
|
-
"@common-stack/env-list-loader": "6.0.8-alpha.
|
|
150
|
-
"@common-stack/generate-plugin": "6.0.8-alpha.
|
|
151
|
-
"@common-stack/rollup-vite-utils": "6.0.8-alpha.
|
|
149
|
+
"@common-stack/env-list-loader": "6.0.8-alpha.7",
|
|
150
|
+
"@common-stack/generate-plugin": "6.0.8-alpha.19",
|
|
151
|
+
"@common-stack/rollup-vite-utils": "6.0.8-alpha.19",
|
|
152
152
|
"@emotion/babel-plugin": "^11.11.0",
|
|
153
153
|
"@graphql-codegen/add": "^5.0.2",
|
|
154
154
|
"@graphql-codegen/cli": "^5.0.2",
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
"jest-raw-loader": "^1.0.1",
|
|
273
273
|
"jest-transform-graphql": "^2.1.0",
|
|
274
274
|
"jsdom": "^20.0.2",
|
|
275
|
-
"lerna": "8",
|
|
275
|
+
"lerna": "8.1.8",
|
|
276
276
|
"less": "^4.1.3",
|
|
277
277
|
"less-loader": "^11.0.0",
|
|
278
278
|
"lint-staged": "^15.2.7",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"watch": "npm run start:dev"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@common-stack/client-core": "6.0.8-alpha.
|
|
29
|
-
"@common-stack/core": "6.0.8-alpha.
|
|
30
|
-
"@common-stack/server-core": "6.0.8-alpha.
|
|
31
|
-
"@common-stack/server-stack": "6.0.8-alpha.
|
|
32
|
-
"@common-stack/store-mongo": "6.0.8-alpha.
|
|
28
|
+
"@common-stack/client-core": "6.0.8-alpha.19",
|
|
29
|
+
"@common-stack/core": "6.0.8-alpha.19",
|
|
30
|
+
"@common-stack/server-core": "6.0.8-alpha.19",
|
|
31
|
+
"@common-stack/server-stack": "6.0.8-alpha.19",
|
|
32
|
+
"@common-stack/store-mongo": "6.0.8-alpha.19",
|
|
33
33
|
"@container-stack/mailing-api": "5.2.1-alpha.1",
|
|
34
34
|
"helmet": "^3.21.2",
|
|
35
35
|
"react": "18.2.0",
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import graphql from '@rollup/plugin-graphql';
|
|
2
2
|
import typescript from '@rollup/plugin-typescript';
|
|
3
3
|
import { string } from 'rollup-plugin-string';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { writeBackendModuleFile } from '@common-stack/rollup-vite-utils';
|
|
7
|
+
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
10
|
+
|
|
11
|
+
// Write backend module file before bundling
|
|
12
|
+
try {
|
|
13
|
+
const packageConfig = await import('./config.json', { assert: { type: 'json' } });
|
|
14
|
+
await writeBackendModuleFile(path.join(__dirname, 'src/modules'), packageConfig.default);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
console.error('Error writing backend module file:', e);
|
|
17
|
+
}
|
|
4
18
|
|
|
5
19
|
const bundle = (config) => ({
|
|
6
20
|
...config,
|
|
7
21
|
input: 'src/index.ts',
|
|
8
|
-
// marking all node modules as external
|
|
9
22
|
external: (id) => !/^[./]/.test(id),
|
|
10
23
|
});
|
|
11
24
|
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ContainerModule, interfaces } from 'inversify';
|
|
2
|
-
import { Feature } from '@common-stack/server-core';
|
|
3
|
-
import { TaggedType } from '@common-stack/core';
|
|
4
|
-
import { config } from '../config';
|
|
5
|
-
|
|
6
|
-
const subTopic = config.CONNECTION_ID;
|
|
7
|
-
export const settings: any = {
|
|
8
|
-
connectionId: config.CONNECTION_ID,
|
|
9
|
-
namespace: config.NAMESPACE,
|
|
10
|
-
subTopic,
|
|
11
|
-
logger: config.LOG_LEVEL,
|
|
12
|
-
workspaceId: config.CONNECTION_ID || 'DEFAULT',
|
|
13
|
-
configPath: process.env.CONFIG_PATH,
|
|
14
|
-
adminApiNamespace: 'api-admin',
|
|
15
|
-
apiNamespace: 'api-admin',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const defaultModule = () =>
|
|
19
|
-
new ContainerModule((bind: interfaces.Bind) => {
|
|
20
|
-
bind('Settings').toConstantValue(settings).whenTargetTagged('default', true);
|
|
21
|
-
bind('Settings').toConstantValue(settings).whenTargetTagged('microservice', true);
|
|
22
|
-
bind('Settings').toConstantValue(settings).whenTargetTagged(TaggedType.MICROSERVICE, true);
|
|
23
|
-
bind('MongoOptions').toConstantValue({});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const DefaultFeature = new Feature({
|
|
27
|
-
createContainerFunc: [defaultModule],
|
|
28
|
-
createHemeraContainerFunc: [defaultModule],
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export default new Feature<any>(DefaultFeature);
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ContainerModule, interfaces } from 'inversify';
|
|
2
|
-
import { Feature } from '@common-stack/server-core';
|
|
3
|
-
import { TaggedType } from '@common-stack/core';
|
|
4
|
-
import { config } from '../config';
|
|
5
|
-
|
|
6
|
-
const subTopic = config.CONNECTION_ID;
|
|
7
|
-
export const settings: any = {
|
|
8
|
-
connectionId: config.CONNECTION_ID,
|
|
9
|
-
namespace: config.NAMESPACE,
|
|
10
|
-
subTopic,
|
|
11
|
-
logger: config.LOG_LEVEL,
|
|
12
|
-
workspaceId: config.CONNECTION_ID || 'DEFAULT',
|
|
13
|
-
configPath: process.env.CONFIG_PATH,
|
|
14
|
-
adminApiNamespace: 'api-admin',
|
|
15
|
-
apiNamespace: 'api-admin',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const defaultModule = () =>
|
|
19
|
-
new ContainerModule((bind: interfaces.Bind) => {
|
|
20
|
-
bind('Settings').toConstantValue(settings).whenTargetTagged('default', true);
|
|
21
|
-
bind('Settings').toConstantValue(settings).whenTargetTagged('microservice', true);
|
|
22
|
-
bind('Settings').toConstantValue(settings).whenTargetTagged(TaggedType.MICROSERVICE, true);
|
|
23
|
-
bind('MongoOptions').toConstantValue({});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const DefaultFeature = new Feature({
|
|
27
|
-
createContainerFunc: [defaultModule],
|
|
28
|
-
createHemeraContainerFunc: [defaultModule],
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export default new Feature<any>(DefaultFeature);
|