@common-stack/generate-plugin 6.0.2-alpha.9 → 6.0.6-alpha.1
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 +80 -20
- package/lib/generators/add-backend/files/config.json +0 -1
- package/lib/generators/add-backend/files/package.json +2 -35
- package/lib/generators/add-backend/files/src/api/root-schema.graphqls +19 -0
- package/lib/generators/add-backend/files/src/config/env-config.ts.template +2 -24
- package/lib/generators/add-backend/files/src/service.ts.template +4 -5
- package/lib/generators/add-backend/files/tsconfig.json +6 -12
- package/lib/generators/add-backend/files/webpack.config.js +8 -0
- package/lib/generators/add-backend/files/webpack.config.mjs +7 -0
- package/lib/generators/add-browser-package/files/package.json +1 -1
- package/lib/generators/add-frontend/templates/Dockerfile +1 -1
- package/lib/generators/add-frontend/templates/package.json +2 -2
- package/lib/generators/add-frontend/templates/vite.config.ts.template +2 -2
- package/lib/generators/add-fullstack/files/lint-staged.config.js +0 -2
- package/lib/generators/add-fullstack/files/package.json +5 -6
- package/lib/generators/add-fullstack/files/rollup.config.base.mjs +7 -2
- package/lib/generators/add-fullstack/files/tools/deploy-cli/updateLernaVersion.js +24 -5
- package/lib/generators/add-fullstack/files/tsconfig.json +2 -2
- package/lib/generators/add-moleculer/files/Dockerfile +1 -1
- package/lib/generators/add-moleculer/files/package.json +5 -5
- package/lib/generators/add-server-package/files/package.json +3 -3
- package/package.json +3 -3
- package/src/generators/add-fullstack/files/.husky/pre-commit +1 -0
- package/src/generators/add-fullstack/files/CHANGELOG.md +18 -10
- package/src/generators/add-fullstack/files/lint-staged.config.js +0 -2
- package/src/generators/add-fullstack/files/package.json +6 -7
- package/src/generators/add-fullstack/files/rollup.config.base.mjs +7 -2
- package/src/generators/add-fullstack/files/tools/deploy-cli/updateLernaVersion.js +24 -5
- package/src/generators/add-fullstack/files/tsconfig.json +2 -2
- package/src/generators/add-moleculer/files/CHANGELOG.md +4 -0
- package/src/generators/add-moleculer/files/Dockerfile +1 -1
- package/src/generators/add-moleculer/files/package.json +6 -6
- package/lib/generators/add-backend/files/CHANGELOG.md +0 -196
- package/lib/generators/add-backend/files/generated-schema.graphql +0 -235
- package/lib/generators/add-browser-package/files/CHANGELOG.md +0 -3119
- package/lib/generators/add-core-package/files/CHANGELOG.md +0 -1076
- package/lib/generators/add-fullstack/files/tools/rollup/rollupPluginGenerateJson.mjs +0 -48
- package/lib/generators/add-fullstack/files/tools/rollup/rollupPluginModifyLibFiles.mjs +0 -410
- package/lib/generators/add-fullstack/files/typings/graphql.d.ts.template +0 -72
- package/lib/generators/add-moleculer/files/draft.toml +0 -61
- package/src/generators/add-fullstack/files/tools/rollup/rollupPluginGenerateJson.mjs +0 -48
- package/src/generators/add-fullstack/files/tools/rollup/rollupPluginModifyLibFiles.mjs +0 -410
- package/src/generators/add-fullstack/files/typings/graphql.d.ts.template +0 -72
- package/src/generators/add-moleculer/files/.draft-tasks.toml +0 -0
- package/src/generators/add-moleculer/files/draft.toml +0 -61
package/CHANGELOG.md
CHANGED
|
@@ -3,82 +3,142 @@
|
|
|
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.
|
|
6
|
+
## [6.0.6-alpha.1](https://github.com/cdmbase/common-stack/compare/v6.0.6-alpha.0...v6.0.6-alpha.1) (2024-08-26)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
9
9
|
|
|
10
|
-
## [6.0.
|
|
10
|
+
## [6.0.6-alpha.0](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.8...v6.0.6-alpha.0) (2024-08-26)
|
|
11
11
|
|
|
12
12
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
13
13
|
|
|
14
|
-
## [6.0.
|
|
14
|
+
## [6.0.1-alpha.0](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.8...v6.0.1-alpha.0) (2024-08-26)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
17
17
|
|
|
18
|
-
## [
|
|
18
|
+
## [5.0.6-alpha.8](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.7...v5.0.6-alpha.8) (2024-08-23)
|
|
19
19
|
|
|
20
20
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
21
21
|
|
|
22
|
-
## [
|
|
22
|
+
## [5.0.6-alpha.7](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.6...v5.0.6-alpha.7) (2024-08-22)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
25
25
|
|
|
26
|
-
## [
|
|
26
|
+
## [5.0.6-alpha.5](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.4...v5.0.6-alpha.5) (2024-08-18)
|
|
27
27
|
|
|
28
28
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
29
29
|
|
|
30
|
-
## [
|
|
30
|
+
## [5.0.6-alpha.4](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.3...v5.0.6-alpha.4) (2024-08-18)
|
|
31
31
|
|
|
32
32
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
33
33
|
|
|
34
|
-
## [
|
|
34
|
+
## [5.0.6-alpha.3](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.2...v5.0.6-alpha.3) (2024-08-16)
|
|
35
35
|
|
|
36
36
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
37
37
|
|
|
38
|
-
## [
|
|
38
|
+
## [5.0.6-alpha.2](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.1...v5.0.6-alpha.2) (2024-08-16)
|
|
39
39
|
|
|
40
40
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
41
41
|
|
|
42
|
-
## [
|
|
42
|
+
## [5.0.6-alpha.1](https://github.com/cdmbase/common-stack/compare/v5.0.6-alpha.0...v5.0.6-alpha.1) (2024-08-15)
|
|
43
43
|
|
|
44
44
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
45
45
|
|
|
46
|
-
## [
|
|
46
|
+
## [5.0.6-alpha.0](https://github.com/cdmbase/common-stack/compare/v5.0.5-alpha.10...v5.0.6-alpha.0) (2024-08-15)
|
|
47
47
|
|
|
48
48
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
49
49
|
|
|
50
|
-
## [
|
|
50
|
+
## [5.0.5-alpha.0](https://github.com/cdmbase/common-stack/compare/v5.0.5-alpha.10...v5.0.5-alpha.0) (2024-08-15)
|
|
51
51
|
|
|
52
52
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
53
53
|
|
|
54
|
-
## [
|
|
54
|
+
## [5.0.5-alpha.10](https://github.com/cdmbase/common-stack/compare/v5.0.5-alpha.9...v5.0.5-alpha.10) (2024-08-15)
|
|
55
55
|
|
|
56
56
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
57
57
|
|
|
58
|
-
## [
|
|
58
|
+
## [5.0.5-alpha.9](https://github.com/cdmbase/common-stack/compare/v5.0.5-alpha.8...v5.0.5-alpha.9) (2024-08-13)
|
|
59
59
|
|
|
60
60
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
61
61
|
|
|
62
|
-
## [
|
|
62
|
+
## [5.0.5-alpha.7](https://github.com/cdmbase/common-stack/compare/v5.0.5-alpha.6...v5.0.5-alpha.7) (2024-08-12)
|
|
63
63
|
|
|
64
64
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
65
65
|
|
|
66
|
-
## [
|
|
66
|
+
## [5.0.5-alpha.1](https://github.com/cdmbase/common-stack/compare/v5.0.5-alpha.0...v5.0.5-alpha.1) (2024-08-11)
|
|
67
67
|
|
|
68
68
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
69
69
|
|
|
70
|
-
## [
|
|
70
|
+
## [5.0.5-alpha.0](https://github.com/cdmbase/common-stack/compare/v0.0.251...v5.0.5-alpha.0) (2024-08-11)
|
|
71
71
|
|
|
72
72
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
73
73
|
|
|
74
|
-
## [
|
|
74
|
+
## [5.0.4-alpha.21](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.20...v5.0.4-alpha.21) (2024-08-11)
|
|
75
75
|
|
|
76
76
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
77
77
|
|
|
78
|
-
## [
|
|
78
|
+
## [5.0.4-alpha.19](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.18...v5.0.4-alpha.19) (2024-08-10)
|
|
79
79
|
|
|
80
80
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
81
81
|
|
|
82
|
-
## [
|
|
82
|
+
## [5.0.4-alpha.18](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.17...v5.0.4-alpha.18) (2024-08-10)
|
|
83
83
|
|
|
84
84
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
85
|
+
|
|
86
|
+
## [5.0.4-alpha.17](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.16...v5.0.4-alpha.17) (2024-08-10)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
89
|
+
|
|
90
|
+
## [5.0.4-alpha.16](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.15...v5.0.4-alpha.16) (2024-08-10)
|
|
91
|
+
|
|
92
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
93
|
+
|
|
94
|
+
## [5.0.4-alpha.15](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.14...v5.0.4-alpha.15) (2024-08-10)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
97
|
+
|
|
98
|
+
## [5.0.4-alpha.14](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.13...v5.0.4-alpha.14) (2024-08-10)
|
|
99
|
+
|
|
100
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
101
|
+
|
|
102
|
+
## [5.0.4-alpha.13](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.12...v5.0.4-alpha.13) (2024-08-10)
|
|
103
|
+
|
|
104
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
105
|
+
|
|
106
|
+
## [5.0.4-alpha.12](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.11...v5.0.4-alpha.12) (2024-08-10)
|
|
107
|
+
|
|
108
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
109
|
+
|
|
110
|
+
## [5.0.4-alpha.11](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.10...v5.0.4-alpha.11) (2024-08-08)
|
|
111
|
+
|
|
112
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
113
|
+
|
|
114
|
+
## [5.0.4-alpha.10](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.9...v5.0.4-alpha.10) (2024-08-07)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
117
|
+
|
|
118
|
+
## [5.0.4-alpha.9](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.8...v5.0.4-alpha.9) (2024-08-07)
|
|
119
|
+
|
|
120
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
121
|
+
|
|
122
|
+
## [5.0.4-alpha.5](https://github.com/cdmbase/common-stack/compare/v5.0.4-alpha.4...v5.0.4-alpha.5) (2024-08-01)
|
|
123
|
+
|
|
124
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
125
|
+
|
|
126
|
+
## [5.0.4-alpha.0](https://github.com/cdmbase/common-stack/compare/v0.0.251...v5.0.4-alpha.0) (2024-07-24)
|
|
127
|
+
|
|
128
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
129
|
+
|
|
130
|
+
## [5.0.3-alpha.0](https://github.com/cdmbase/common-stack/compare/v0.0.251...v5.0.3-alpha.0) (2024-07-24)
|
|
131
|
+
|
|
132
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
133
|
+
|
|
134
|
+
## [5.0.2-alpha.4](https://github.com/cdmbase/common-stack/compare/v5.0.2-alpha.3...v5.0.2-alpha.4) (2024-07-23)
|
|
135
|
+
|
|
136
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
137
|
+
|
|
138
|
+
## [5.0.2-alpha.3](https://github.com/cdmbase/common-stack/compare/v5.0.2-alpha.2...v5.0.2-alpha.3) (2024-07-23)
|
|
139
|
+
|
|
140
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
141
|
+
|
|
142
|
+
## [5.0.2-alpha.2](https://github.com/cdmbase/common-stack/compare/v5.0.2-alpha.1...v5.0.2-alpha.2) (2024-07-20)
|
|
143
|
+
|
|
144
|
+
**Note:** Version bump only for package modal-ui
|
|
@@ -58,44 +58,13 @@
|
|
|
58
58
|
"zen:watch": "zen watch -x"
|
|
59
59
|
},
|
|
60
60
|
"resolutions": {
|
|
61
|
-
"apollo-upload-client": "^16.0.0",
|
|
62
|
-
"extract-files": "^10.0.0",
|
|
63
61
|
"html-to-text": "^8.0.0"
|
|
64
62
|
},
|
|
65
63
|
"dependencies": {
|
|
66
|
-
"@adminide-stack/account-api-server": "7.2.6-alpha.13",
|
|
67
|
-
"@adminide-stack/billing-api-server": "7.2.6-alpha.13",
|
|
68
|
-
"@adminide-stack/core": "7.2.6-alpha.13",
|
|
69
|
-
"@adminide-stack/extension-module-server": "7.2.6-alpha.13",
|
|
70
|
-
"@adminide-stack/git-api-server": "7.2.6-alpha.13",
|
|
71
|
-
"@adminide-stack/integration-api-server": "7.2.6-alpha.13",
|
|
72
|
-
"@adminide-stack/marketplace-module-server": "7.2.6-alpha.13",
|
|
73
|
-
"@adminide-stack/platform-server": "7.2.6-alpha.13",
|
|
74
|
-
"@adminide-stack/project-mgmt-server": "7.2.6-alpha.13",
|
|
75
|
-
"@adminide-stack/registry-api-server": "7.2.6-alpha.13",
|
|
76
|
-
"@adminide-stack/user-auth0-server": "7.2.6-alpha.13",
|
|
77
64
|
"@apollo/client": "^3.9.0",
|
|
78
65
|
"@babel/runtime": "^7.20.1",
|
|
79
|
-
"@
|
|
80
|
-
"@container-stack/mailing-api": "5.1.2",
|
|
81
|
-
"@container-stack/notification-api-core": "5.1.2",
|
|
82
|
-
"@container-stack/notification-api-server": "5.1.2",
|
|
83
|
-
"@container-stack/territory": "5.1.2",
|
|
66
|
+
"@common-stack/server-stack": "6.0.6-alpha.0",
|
|
84
67
|
"@remix-run/node": "^2.8.1",
|
|
85
|
-
"@sentry/node": "~7.24.2",
|
|
86
|
-
"app-root-path": "^3.0.0",
|
|
87
|
-
"body-parser": "^1.19.0",
|
|
88
|
-
"cors": "^2.8.5",
|
|
89
|
-
"dataloader": "^2.0.0",
|
|
90
|
-
"dotenv": "^8.2.0",
|
|
91
|
-
"dotenv-esm": "^16.0.3-4",
|
|
92
|
-
"envalid": "~7.2.2",
|
|
93
|
-
"esm": "^3.2.25",
|
|
94
|
-
"express": "^4.17.1",
|
|
95
|
-
"graphql-tools": "^9.0.0",
|
|
96
|
-
"inversify": "^6.0.2",
|
|
97
|
-
"ioredis": "^5.4.1",
|
|
98
|
-
"isomorphic-fetch": "^2.2.1",
|
|
99
68
|
"lodash": "^4.17.15",
|
|
100
69
|
"react": "18.2.0",
|
|
101
70
|
"rxjs": "^6.5.3",
|
|
@@ -103,13 +72,11 @@
|
|
|
103
72
|
},
|
|
104
73
|
"devDependencies": {
|
|
105
74
|
"cross-env": "^7.0.3",
|
|
75
|
+
"esbuild-loader": "^4.2.2",
|
|
106
76
|
"pm2": "^5.2.2",
|
|
107
77
|
"rimraf": "^3.0.2",
|
|
108
78
|
"tsx": "^4.7.0"
|
|
109
79
|
},
|
|
110
|
-
"engines": {
|
|
111
|
-
"vscode": "^1.52.1"
|
|
112
|
-
},
|
|
113
80
|
"typescript": {
|
|
114
81
|
"definition": "dist/main.d.ts"
|
|
115
82
|
}
|
|
@@ -2,6 +2,7 @@ scalar AnyObject
|
|
|
2
2
|
scalar Date
|
|
3
3
|
scalar Time
|
|
4
4
|
scalar DateTime
|
|
5
|
+
scalar Timestamp
|
|
5
6
|
scalar URI
|
|
6
7
|
scalar URIInput
|
|
7
8
|
scalar Observable
|
|
@@ -83,11 +84,29 @@ interface IResourceUtilizationSettings {
|
|
|
83
84
|
adminApiNamespace: String
|
|
84
85
|
}
|
|
85
86
|
|
|
87
|
+
"""
|
|
88
|
+
Input geometry of the location.
|
|
89
|
+
List the `longitude` first and then `latitude`
|
|
90
|
+
- Validate longitude values are between `-180` and `180`
|
|
91
|
+
- Validate latitude values are between `-90` and `90`
|
|
92
|
+
"""
|
|
93
|
+
input GeoLocation_Input {
|
|
94
|
+
type: String = "Point"
|
|
95
|
+
coordinates: [Float]
|
|
96
|
+
}
|
|
86
97
|
|
|
87
98
|
type GeoLocation {
|
|
88
99
|
coordinates: [Float]
|
|
89
100
|
}
|
|
90
101
|
|
|
102
|
+
enum MailTemplateId {
|
|
103
|
+
dummy
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
enum MoleculerCronServiceName {
|
|
107
|
+
dummy
|
|
108
|
+
}
|
|
109
|
+
|
|
91
110
|
schema {
|
|
92
111
|
query: Query
|
|
93
112
|
mutation: Mutation
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
/// <reference path='../../../../typings/index.d.ts' />
|
|
2
|
-
import { str,
|
|
2
|
+
import { str, cleanEnv } from 'envalid';
|
|
3
3
|
|
|
4
4
|
export const config = cleanEnv(process.env, {
|
|
5
5
|
NODE_ENV: str({ default: 'production', choices: ['production', 'staging', 'development', 'test'] }),
|
|
6
|
-
NATS_URL: str({ devDefault: 'nats://localhost:4222/' }),
|
|
7
|
-
NATS_USER: str({ devDefault: 'test' }),
|
|
8
|
-
NATS_PW: str({ devDefault: 'test' }),
|
|
9
|
-
MONGO_URL: str({ devDefault: 'mongodb://localhost:27017/sample-stack' }),
|
|
10
|
-
MONGO_OPTIONS: str({ default: '{}' }),
|
|
11
|
-
LOG_LEVEL: str({ default: 'info', devDefault: 'trace', choices: ['info', 'debug', 'trace'] }),
|
|
12
|
-
REDIS_CLUSTER_URL: json({
|
|
13
|
-
devDefault: '[{"port":6379,"host":"localhost"}]',
|
|
14
|
-
example: '[{"port":6379,"host":"localhost"}]',
|
|
15
|
-
}),
|
|
16
|
-
REDIS_URL: str({ devDefault: 'localhost' }),
|
|
17
|
-
REDIS_CLUSTER_ENABLED: bool({ devDefault: false }),
|
|
18
|
-
REDIS_SENTINEL_ENABLED: bool({ devDefault: true }),
|
|
19
|
-
HEMERA_LOG_LEVEL: str({
|
|
20
|
-
default: 'info',
|
|
21
|
-
devDefault: 'info',
|
|
22
|
-
choices: ['fatal', 'error', 'warn', 'info', 'debug', 'trace'],
|
|
23
|
-
}),
|
|
24
|
-
BACKEND_URL: str({ devDefault: __BACKEND_URL__ }),
|
|
25
|
-
GRAPHQL_URL: str({ devDefault: __GRAPHQL_URL__ }),
|
|
26
|
-
CLIENT_URL: str({ devDefault: __BACKEND_URL__ }),
|
|
27
6
|
CONNECTION_ID: str({ devDefault: 'CONNECTION_ID' }),
|
|
28
|
-
MAILGUN_KEY: str(),
|
|
29
|
-
MAILGUN_DOMAIN: str(),
|
|
30
7
|
NAMESPACE: str({ default: 'default' }),
|
|
31
8
|
ACTIVITY_NAMESPACE: str({ devDefault: 'default' }),
|
|
32
9
|
API_NAMESPACE: str({ devDefault: 'default' }),
|
|
33
10
|
ADMIN_API_NAMESPACE: str({ devDefault: 'default' }),
|
|
11
|
+
BACKEND_URL: str({ devDefault: __BACKEND_URL__ }),
|
|
34
12
|
});
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { logger } from '@cdm-logger/server';
|
|
2
2
|
import * as url from 'url';
|
|
3
|
-
import {
|
|
3
|
+
import modules, { settings } from './modules';
|
|
4
|
+
import { MainStackServer } from '@common-stack/server-stack';
|
|
4
5
|
import { config } from './config';
|
|
5
6
|
|
|
6
7
|
const { port: serverPort, pathname, hostname } = url.parse(config.BACKEND_URL);
|
|
7
8
|
|
|
8
9
|
export class Service {
|
|
9
|
-
|
|
10
|
-
private app: StackServer;
|
|
10
|
+
private app: MainStackServer;
|
|
11
11
|
|
|
12
12
|
public async initialize() {
|
|
13
|
-
|
|
14
|
-
this.app = new StackServer();
|
|
13
|
+
this.app = new MainStackServer(modules, settings);
|
|
15
14
|
await this.app.initialize();
|
|
16
15
|
}
|
|
17
16
|
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
2
|
"compilerOptions": {
|
|
3
|
+
"baseUrl": ".",
|
|
4
|
+
"paths": {
|
|
5
|
+
"@src/*": ["src/*"]
|
|
6
|
+
},
|
|
4
7
|
"sourceMap": true,
|
|
5
8
|
"declaration": false,
|
|
6
9
|
"allowSyntheticDefaultImports": true,
|
|
7
|
-
"rootDirs": ["./src"],
|
|
10
|
+
"rootDirs": ["./src", "../knexfile.ts"],
|
|
8
11
|
"outDir": "./dist"
|
|
9
|
-
|
|
10
|
-
"include": [
|
|
11
|
-
"../../typings/*.d.ts",
|
|
12
|
-
],
|
|
13
|
-
"exclude": [
|
|
14
|
-
"node_modules",
|
|
15
|
-
"lib",
|
|
16
|
-
"dist",
|
|
17
|
-
"webpack.config.js"
|
|
18
|
-
]
|
|
12
|
+
},
|
|
19
13
|
}
|
|
@@ -5,6 +5,8 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
5
5
|
const nodeExternals = require('webpack-node-externals');
|
|
6
6
|
const NodemonPlugin = require('nodemon-webpack-plugin'); // Ding
|
|
7
7
|
const EnvListPlugin = require('@common-stack/env-list-loader');
|
|
8
|
+
const { writeBackendModuleFile } = require('@common-stack/rollup-vite-utils/lib/utils/utils.cjs');
|
|
9
|
+
const packageConfig = require('./config.json');
|
|
8
10
|
const buildConfig = require('./build.config');
|
|
9
11
|
|
|
10
12
|
const modulenameExtra = process.env.BUILD_MODULE_TO_INCLUDE ? `${process.env.BUILD_MODULE_TO_INCLUDE}|` : '';
|
|
@@ -25,6 +27,12 @@ if (process.env.BUILD_MODULE_TO_INCLUDE) {
|
|
|
25
27
|
console.log('BUILD_MODULE_TO_INCLUDE is not set.');
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
try {
|
|
31
|
+
writeBackendModuleFile(path.join(__dirname, 'src/modules'), packageConfig);
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error(e);
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
const config = {
|
|
29
37
|
entry: {
|
|
30
38
|
index: (process.env.NODE_ENV !== 'production' ? ['webpack/hot/poll?200'] : []).concat([
|
|
@@ -8,6 +8,7 @@ import nodeExternals from 'webpack-node-externals';
|
|
|
8
8
|
import Dotenv from 'dotenv-webpack';
|
|
9
9
|
import NodemonPlugin from 'nodemon-webpack-plugin';
|
|
10
10
|
import EnvListPlugin from '@common-stack/env-list-loader';
|
|
11
|
+
import { writeBackendModuleFile } from '@common-stack/rollup-vite-utils/lib/utils/utils.cjs';
|
|
11
12
|
import buildConfig from './build.config.mjs';
|
|
12
13
|
|
|
13
14
|
const modulenameExtra = process.env.BUILD_MODULE_TO_INCLUDE ? `${process.env.BUILD_MODULE_TO_INCLUDE}|` : '';
|
|
@@ -32,6 +33,12 @@ if (process.env.BUILD_MODULE_TO_INCLUDE) {
|
|
|
32
33
|
console.log('BUILD_MODULE_TO_INCLUDE is not set.');
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
try {
|
|
37
|
+
writeBackendModuleFile(path.join(__dirname, 'src/modules'), packageConfig);
|
|
38
|
+
} catch (e) {
|
|
39
|
+
console.error(e);
|
|
40
|
+
}
|
|
41
|
+
|
|
35
42
|
const config = {
|
|
36
43
|
entry: {
|
|
37
44
|
// index: (process.env.NODE_ENV !== 'production' ? ['webpack/hot/poll?200'] : []).concat([
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
|
|
84
|
-
"@common-stack/frontend-stack-react": "6.0.
|
|
85
|
-
"@common-stack/rollup-vite-utils": "6.0.
|
|
84
|
+
"@common-stack/frontend-stack-react": "6.0.6-alpha.0",
|
|
85
|
+
"@common-stack/rollup-vite-utils": "6.0.6-alpha.0",
|
|
86
86
|
"@remix-run/dev": "^2.8.1",
|
|
87
87
|
"@remix-run/serve": "^2.8.1",
|
|
88
88
|
"cross-env": "^7.0.3",
|
|
@@ -9,7 +9,7 @@ import { i18nInternationalizationPlugin } from '@common-stack/rollup-vite-utils/
|
|
|
9
9
|
import { performCopyOperations } from '@common-stack/rollup-vite-utils/lib/preStartup/configLoader/configLoader.js';
|
|
10
10
|
import { loadEnvConfig } from '@common-stack/rollup-vite-utils/lib/preStartup/configLoader/envLoader.js';
|
|
11
11
|
import { cjsInterop } from 'vite-plugin-cjs-interop';
|
|
12
|
-
import {
|
|
12
|
+
import { mergeWith } from 'lodash-es';
|
|
13
13
|
import config from './app/cde-webconfig.json' assert { type: 'json' };
|
|
14
14
|
|
|
15
15
|
// This installs globals such as "fetch", "Response", "Request" and "Headers".
|
|
@@ -73,5 +73,5 @@ export default defineConfig(({ isSsrBuild }) => {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
// Deep merge custom Vite config from config.json
|
|
76
|
-
return
|
|
76
|
+
return mergeWith(viteConfig, config.viteConfig);
|
|
77
77
|
});
|
|
@@ -2,6 +2,4 @@ module.exports = {
|
|
|
2
2
|
'*.{js,jsx,ts,tsx,json,md}': ['prettier --write', 'git add'],
|
|
3
3
|
// '*.{ts,tsx}': ['eslint --fix'], // this can be tested
|
|
4
4
|
'package.json': ['sort-package-json', 'prettier --write'],
|
|
5
|
-
'*/**/package.json': ['sort-package-json', 'prettier --write'],
|
|
6
|
-
'**/**/*/package.json': ['sort-package-json', 'prettier --write'],
|
|
7
5
|
};
|
|
@@ -113,8 +113,6 @@
|
|
|
113
113
|
"react-native-gesture-handler": "~2.12.0"
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
|
-
"dataloader": "^2.1.0",
|
|
117
|
-
"framer-motion": "^6.2.6",
|
|
118
116
|
"graphql": "^16.0.0",
|
|
119
117
|
"graphql-tag": "^2.12.6"
|
|
120
118
|
},
|
|
@@ -147,7 +145,8 @@
|
|
|
147
145
|
"@babel/preset-typescript": "^7.18.6",
|
|
148
146
|
"@babel/register": "^7.18.9",
|
|
149
147
|
"@babel/runtime": "^7.20.1",
|
|
150
|
-
"@common-stack/env-list-loader": "
|
|
148
|
+
"@common-stack/env-list-loader": "5.0.6-alpha.3",
|
|
149
|
+
"@common-stack/generate-plugin": "6.0.6-alpha.0",
|
|
151
150
|
"@emotion/babel-plugin": "^11.11.0",
|
|
152
151
|
"@graphql-codegen/add": "^5.0.2",
|
|
153
152
|
"@graphql-codegen/cli": "^5.0.2",
|
|
@@ -161,8 +160,8 @@
|
|
|
161
160
|
"@graphql-codegen/typescript-resolvers": "^4.0.6",
|
|
162
161
|
"@loadable/babel-plugin": "^5.13.2",
|
|
163
162
|
"@loadable/webpack-plugin": "^5.15.2",
|
|
164
|
-
"@
|
|
165
|
-
"@
|
|
163
|
+
"@nx-aws-plugin/nx-aws-cache": "^3.2.2",
|
|
164
|
+
"@nx/workspace": "^19.5.1",
|
|
166
165
|
"@redux-devtools/core": "^3.13.1",
|
|
167
166
|
"@redux-devtools/dock-monitor": "^3.0.1",
|
|
168
167
|
"@redux-devtools/log-monitor": "^4.0.1",
|
|
@@ -256,7 +255,7 @@
|
|
|
256
255
|
"html-loader": "^4.2.0",
|
|
257
256
|
"html-webpack-plugin": "^5.5.0",
|
|
258
257
|
"http-proxy-middleware": "^2.0.6",
|
|
259
|
-
"husky": "^
|
|
258
|
+
"husky": "^9.1.5",
|
|
260
259
|
"ignore-loader": "^0.1.2",
|
|
261
260
|
"ip": "^1.1.8",
|
|
262
261
|
"isomorphic-style-loader": "^5.3.2",
|
|
@@ -7,8 +7,12 @@ import { copy } from '@web/rollup-plugin-copy';
|
|
|
7
7
|
import modifyLibFilesPlugin from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginModifyLibFiles.js';
|
|
8
8
|
import generateJsonFromObject from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginGenerateJson.js';
|
|
9
9
|
import addJsExtensionToImportsPlugin from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginAddJsExtension.js';
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
import { ignoreCssUrlPlugin } from '@common-stack/rollup-vite-utils/lib/rollup/pluginIgnore.js';
|
|
11
|
+
|
|
12
|
+
// Define any additional plugins specific to this bundle
|
|
13
|
+
const additionalPlugins = [
|
|
14
|
+
copy({ patterns: ['**/cdm-locales/**/*', '**/styles/**/*'], rootDir: './src' }),
|
|
15
|
+
];
|
|
12
16
|
|
|
13
17
|
function deepMergeConfigs(baseConfig, specificConfig) {
|
|
14
18
|
const mergedConfig = { ...baseConfig, ...specificConfig };
|
|
@@ -35,6 +39,7 @@ const baseConfig = {
|
|
|
35
39
|
excludeImports: ['@emotion/react/jsx-runtime'],
|
|
36
40
|
}),
|
|
37
41
|
typescript(), // TypeScript at the top as per best practices
|
|
42
|
+
ignoreCssUrlPlugin(),
|
|
38
43
|
modifyLibFilesPlugin({
|
|
39
44
|
include: ['**/**/compute.js'], // Adjust to target specific files or patterns
|
|
40
45
|
outputDir: 'lib', // Ensure this matches your actual output directory
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const { exec } = require('child_process');
|
|
2
3
|
|
|
3
4
|
function updateLernaJson(filePath, versionArg) {
|
|
4
5
|
// Read the existing lerna.json file
|
|
@@ -23,18 +24,36 @@ function updateLernaJson(filePath, versionArg) {
|
|
|
23
24
|
const minorVersion = versionComponents.length > 1 ? versionComponents[1] : '0';
|
|
24
25
|
lernaConfig.version = `${majorVersion}.${minorVersion}.0`;
|
|
25
26
|
|
|
26
|
-
// Update the allowBranch fields
|
|
27
|
-
const branchName = `devpublish${majorVersion}${minorVersion !== '0' ? '
|
|
27
|
+
// Update the allowBranch fields with dash instead of dot
|
|
28
|
+
const branchName = `devpublish${majorVersion}${minorVersion !== '0' ? '-' + minorVersion : ''}`;
|
|
29
|
+
const branchDevelopName = `develop${majorVersion}${minorVersion !== '0' ? '-' + minorVersion : ''}`;
|
|
30
|
+
|
|
28
31
|
lernaConfig.command.publish.allowBranch.push(branchName);
|
|
29
32
|
lernaConfig.command.version.allowBranch.push(branchName);
|
|
33
|
+
lernaConfig.command.version.allowBranch.push(branchDevelopName);
|
|
30
34
|
|
|
31
35
|
// Write the updated lerna.json file
|
|
32
|
-
fs.writeFile(filePath, JSON.stringify(lernaConfig, null, 2), 'utf8', writeErr => {
|
|
36
|
+
fs.writeFile(filePath, JSON.stringify(lernaConfig, null, 2), 'utf8', (writeErr) => {
|
|
33
37
|
if (writeErr) {
|
|
34
38
|
console.error(`Error writing file: ${writeErr}`);
|
|
35
39
|
return;
|
|
36
40
|
}
|
|
37
|
-
console.log(
|
|
41
|
+
console.log(
|
|
42
|
+
`lerna.json updated successfully to version ${lernaConfig.version} with branches ${branchName} and ${branchDevelopName}`,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// Run prettier to format the updated lerna.json file
|
|
46
|
+
exec(`npx prettier --write ${filePath}`, (execErr, stdout, stderr) => {
|
|
47
|
+
if (execErr) {
|
|
48
|
+
console.error(`Error running prettier: ${execErr}`);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (stderr) {
|
|
52
|
+
console.error(`Prettier stderr: ${stderr}`);
|
|
53
|
+
}
|
|
54
|
+
console.log(`Prettier stdout: ${stdout}`);
|
|
55
|
+
console.log('lerna.json formatted successfully.');
|
|
56
|
+
});
|
|
38
57
|
});
|
|
39
58
|
});
|
|
40
59
|
}
|
|
@@ -48,4 +67,4 @@ if (!filePath || !versionArg || !versionArg.match(/^v\d+(\.\d+)?$/)) {
|
|
|
48
67
|
process.exit(1);
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
updateLernaJson(filePath, versionArg);
|
|
70
|
+
updateLernaJson(filePath, versionArg);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "ES2022",
|
|
4
4
|
"module": "ES2022",
|
|
5
5
|
"moduleResolution": "node",
|
|
6
6
|
"esModuleInterop": true,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"pretty": true,
|
|
17
17
|
"removeComments": false,
|
|
18
18
|
"lib": [
|
|
19
|
-
"
|
|
19
|
+
"ES2022",
|
|
20
20
|
"dom",
|
|
21
21
|
"esnext.asynciterable"
|
|
22
22
|
]
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"watch": "npm run start:dev"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@common-stack/client-core": "
|
|
29
|
-
"@common-stack/core": "
|
|
30
|
-
"@common-stack/server-core": "6.0.
|
|
31
|
-
"@common-stack/server-stack": "6.0.
|
|
32
|
-
"@common-stack/store-mongo": "
|
|
28
|
+
"@common-stack/client-core": "5.0.6-alpha.3",
|
|
29
|
+
"@common-stack/core": "5.0.6-alpha.3",
|
|
30
|
+
"@common-stack/server-core": "6.0.6-alpha.0",
|
|
31
|
+
"@common-stack/server-stack": "6.0.6-alpha.0",
|
|
32
|
+
"@common-stack/store-mongo": "5.0.6-alpha.3",
|
|
33
33
|
"@container-stack/mailing-api": "5.2.1-alpha.1",
|
|
34
34
|
"helmet": "^3.21.2",
|
|
35
35
|
"react": "18.2.0",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@apollo/client": ">=3.0.0",
|
|
64
64
|
"@cdm-logger/server": ">=9.0.3",
|
|
65
|
-
"@common-stack/core": "
|
|
66
|
-
"@common-stack/server-core": "6.0.
|
|
67
|
-
"@common-stack/store-mongo": "
|
|
65
|
+
"@common-stack/core": "5.0.6-alpha.3",
|
|
66
|
+
"@common-stack/server-core": "6.0.6-alpha.0",
|
|
67
|
+
"@common-stack/store-mongo": "5.0.6-alpha.3",
|
|
68
68
|
"@container-stack/mailing-api": ">=0.0.35-alpha.1",
|
|
69
69
|
"@vscode-alt/monaco-editor": "^0.21.4",
|
|
70
70
|
"inversify": "^5.0.1",
|