@common-stack/generate-plugin 6.0.8-alpha.31 → 6.0.8-alpha.32
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 +4 -0
- package/docker-releases/backend/package.json +6 -6
- package/docker-releases/frontend/antd/package.json +7 -7
- package/lib/generators/add-backend/files/Dockerfile +2 -0
- package/lib/generators/add-backend/files/package.json +2 -1
- package/lib/generators/add-frontend/templates/Dockerfile +4 -0
- package/lib/generators/add-frontend/templates/package.json +5 -2
- package/lib/generators/add-fullstack/files/package.json +6 -4
- package/lib/generators/add-fullstack/files/tools/codegenGenerator.mjs +36 -0
- package/lib/generators/add-moleculer/files/Dockerfile +2 -0
- package/lib/generators/add-moleculer/files/package.json +8 -5
- package/package.json +2 -2
- package/src/generators/add-fullstack/files/package.json +6 -4
- package/src/generators/add-fullstack/files/tools/codegenGenerator.mjs +36 -0
- package/src/generators/add-moleculer/files/.dockerignore +2 -1
- package/src/generators/add-moleculer/files/Dockerfile +2 -0
- package/src/generators/add-moleculer/files/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.32](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.31...v6.0.8-alpha.32) (2025-01-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
9
|
+
|
|
6
10
|
## [6.0.8-alpha.31](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.30...v6.0.8-alpha.31) (2025-01-27)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
@@ -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.31",
|
|
74
|
+
"@common-stack/client-core": "6.0.8-alpha.31",
|
|
75
|
+
"@common-stack/core": "6.0.8-alpha.31",
|
|
76
|
+
"@common-stack/server-core": "6.0.8-alpha.31",
|
|
77
|
+
"@common-stack/server-stack": "6.0.8-alpha.31",
|
|
78
|
+
"@common-stack/store-mongo": "6.0.8-alpha.31",
|
|
79
79
|
"@graphql-tools/links": "~9.0.1",
|
|
80
80
|
"@graphql-tools/schema": "~10.0.6",
|
|
81
81
|
"@graphql-tools/stitch": "~9.2.10",
|
|
@@ -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.31",
|
|
67
|
+
"@common-stack/client-core": "6.0.8-alpha.31",
|
|
68
|
+
"@common-stack/client-react": "6.0.8-alpha.31",
|
|
69
|
+
"@common-stack/components-pro": "6.0.8-alpha.31",
|
|
70
|
+
"@common-stack/core": "6.0.8-alpha.31",
|
|
71
|
+
"@common-stack/remix-router-redux": "6.0.8-alpha.31",
|
|
72
|
+
"@common-stack/server-core": "6.0.8-alpha.31",
|
|
73
73
|
"@reduxjs/toolkit": "^2.2.6",
|
|
74
74
|
"@remix-run/express": "~2.10.1",
|
|
75
75
|
"@remix-run/node": "~2.10.1",
|
|
@@ -4,6 +4,7 @@ FROM node:20.16-bullseye
|
|
|
4
4
|
ENV PYTHON=/usr/bin/python
|
|
5
5
|
|
|
6
6
|
COPY .npmrc package.json /tmp/
|
|
7
|
+
COPY common /tmp/common
|
|
7
8
|
|
|
8
9
|
RUN set -ex \
|
|
9
10
|
&& cd /tmp \
|
|
@@ -13,6 +14,7 @@ RUN set -ex \
|
|
|
13
14
|
&& rm -f /tmp/.npmrc \
|
|
14
15
|
&& mkdir -p /home/app \
|
|
15
16
|
&& cp -a /tmp/node_modules /home/app/ \
|
|
17
|
+
&& cp -a /tmp/common /home/app/common \
|
|
16
18
|
&& rm -Rf /tmp/*
|
|
17
19
|
|
|
18
20
|
WORKDIR /home/app
|
|
@@ -57,12 +57,13 @@
|
|
|
57
57
|
"watch:test": "cross-env NODE_ENV=test ENV_FILE=../../config/test/test.env yarn build:test && yarn start:test"
|
|
58
58
|
},
|
|
59
59
|
"resolutions": {
|
|
60
|
+
"common": "link:./common",
|
|
60
61
|
"html-to-text": "^8.0.0"
|
|
61
62
|
},
|
|
62
63
|
"dependencies": {
|
|
63
64
|
"@apollo/client": "^3.9.0",
|
|
64
65
|
"@babel/runtime": "^7.20.1",
|
|
65
|
-
"@common-stack/server-stack": "6.0.8-alpha.
|
|
66
|
+
"@common-stack/server-stack": "6.0.8-alpha.31",
|
|
66
67
|
"@remix-run/node": "~2.10.1",
|
|
67
68
|
"lodash": "^4.17.15",
|
|
68
69
|
"react": "18.2.0"
|
|
@@ -5,6 +5,9 @@ ENV PYTHON=/usr/bin/python
|
|
|
5
5
|
|
|
6
6
|
COPY .npmrc package.json /tmp/
|
|
7
7
|
|
|
8
|
+
# Copy the common package to the temporary directory
|
|
9
|
+
COPY common /tmp/common
|
|
10
|
+
|
|
8
11
|
RUN set -ex \
|
|
9
12
|
&& cd /tmp \
|
|
10
13
|
&& npm install -g node-gyp \
|
|
@@ -13,6 +16,7 @@ RUN set -ex \
|
|
|
13
16
|
&& rm -f /tmp/.npmrc \
|
|
14
17
|
&& mkdir -p /home/app \
|
|
15
18
|
&& cp -a /tmp/node_modules /home/app/ \
|
|
19
|
+
&& cp -a /tmp/common /home/app/common \
|
|
16
20
|
&& rm -Rf /tmp/*
|
|
17
21
|
|
|
18
22
|
|
|
@@ -51,8 +51,11 @@
|
|
|
51
51
|
"watch:staging": "cross-env ENV_FILE=../../config/staging/staging.env node ./server.js",
|
|
52
52
|
"watch:test": "cross-env ENV_FILE=../../config/test/test.env node ./server.js"
|
|
53
53
|
},
|
|
54
|
+
"resolutions": {
|
|
55
|
+
"common": "link:./common"
|
|
56
|
+
},
|
|
54
57
|
"dependencies": {
|
|
55
|
-
"@common-stack/frontend-stack-react": "6.0.8-alpha.
|
|
58
|
+
"@common-stack/frontend-stack-react": "6.0.8-alpha.31",
|
|
56
59
|
"@react-icons/all-files": "^4.1.0",
|
|
57
60
|
"classnames": "^2.2.6",
|
|
58
61
|
"compression": "^1.7.4",
|
|
@@ -77,7 +80,7 @@
|
|
|
77
80
|
},
|
|
78
81
|
"devDependencies": {
|
|
79
82
|
"@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
|
|
80
|
-
"@common-stack/rollup-vite-utils": "6.0.8-alpha.
|
|
83
|
+
"@common-stack/rollup-vite-utils": "6.0.8-alpha.31",
|
|
81
84
|
"@remix-run/dev": "~2.10.1",
|
|
82
85
|
"@remix-run/serve": "~2.10.1",
|
|
83
86
|
"cross-env": "^7.0.3",
|
|
@@ -52,7 +52,9 @@
|
|
|
52
52
|
"devpublish:push": "yarn predevpublish && git push origin $PUBLISH_BRANCH && yarn postdevpublish",
|
|
53
53
|
"format": "yarn lint --fix",
|
|
54
54
|
"format:md": "yarn lint:md --fix",
|
|
55
|
-
"
|
|
55
|
+
"pregenerateGraphql": " node --experimental-modules tools/codegenGenerator.mjs",
|
|
56
|
+
"generateGraphql": "graphql-codegen-esm",
|
|
57
|
+
"postgenerateGraphql": "lerna run watch --scope=common",
|
|
56
58
|
"generateGraphql:watch": "yarn generateGraphql -- --watch",
|
|
57
59
|
"git:pull": "git pull origin $(git rev-parse --abbrev-ref HEAD)",
|
|
58
60
|
"git:push": "git push origin $(git rev-parse --abbrev-ref HEAD)",
|
|
@@ -146,9 +148,9 @@
|
|
|
146
148
|
"@babel/preset-typescript": "^7.18.6",
|
|
147
149
|
"@babel/register": "^7.18.9",
|
|
148
150
|
"@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.
|
|
151
|
+
"@common-stack/env-list-loader": "6.0.8-alpha.31",
|
|
152
|
+
"@common-stack/generate-plugin": "6.0.8-alpha.31",
|
|
153
|
+
"@common-stack/rollup-vite-utils": "6.0.8-alpha.31",
|
|
152
154
|
"@emotion/babel-plugin": "^11.11.0",
|
|
153
155
|
"@graphql-codegen/add": "^5.0.2",
|
|
154
156
|
"@graphql-codegen/cli": "^5.0.2",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
import { runCodegenTasks } from '@common-stack/rollup-vite-utils/lib/tools/codegen/index.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This main script orchestrates your codegen steps, using cdecode-config.json.
|
|
9
|
+
* Usage:
|
|
10
|
+
* node tools/mainScript.mjs
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// ESM housekeeping
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = path.dirname(__filename);
|
|
16
|
+
|
|
17
|
+
(async function main() {
|
|
18
|
+
try {
|
|
19
|
+
// 1) Locate and parse cdecode-config.json
|
|
20
|
+
const configPath = path.join(__dirname, '../cdecode-config.json');
|
|
21
|
+
if (!fs.existsSync(configPath)) {
|
|
22
|
+
console.error(`cdecode-config.json not found at: ${configPath}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
const rawConfig = fs.readFileSync(configPath, 'utf-8');
|
|
26
|
+
const cdecodeConfig = JSON.parse(rawConfig);
|
|
27
|
+
|
|
28
|
+
// 2) Run the orchestrated tasks
|
|
29
|
+
await runCodegenTasks(cdecodeConfig);
|
|
30
|
+
|
|
31
|
+
console.log('mainScript completed successfully!');
|
|
32
|
+
} catch (err) {
|
|
33
|
+
console.error('Error running mainScript:', err);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
FROM node:20.16-alpine
|
|
2
2
|
|
|
3
3
|
COPY .npmrc package.json /tmp/
|
|
4
|
+
COPY common /tmp/common
|
|
4
5
|
|
|
5
6
|
RUN set -ex \
|
|
6
7
|
&& apk add --no-cache \
|
|
@@ -13,6 +14,7 @@ RUN set -ex \
|
|
|
13
14
|
&& rm -f /tmp/.npmrc \
|
|
14
15
|
&& mkdir -p /home/app \
|
|
15
16
|
&& cp -a /tmp/node_modules /home/app/ \
|
|
17
|
+
&& cp -a /tmp/common /home/app/common \
|
|
16
18
|
&& rm -Rf /tmp/*
|
|
17
19
|
|
|
18
20
|
WORKDIR /home/app
|
|
@@ -24,12 +24,15 @@
|
|
|
24
24
|
"test:watch": "npm test -- --watch",
|
|
25
25
|
"watch": "npm run start:dev"
|
|
26
26
|
},
|
|
27
|
+
"resolutions": {
|
|
28
|
+
"common": "link:./common"
|
|
29
|
+
},
|
|
27
30
|
"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.
|
|
31
|
+
"@common-stack/client-core": "6.0.8-alpha.31",
|
|
32
|
+
"@common-stack/core": "6.0.8-alpha.31",
|
|
33
|
+
"@common-stack/server-core": "6.0.8-alpha.31",
|
|
34
|
+
"@common-stack/server-stack": "6.0.8-alpha.31",
|
|
35
|
+
"@common-stack/store-mongo": "6.0.8-alpha.31",
|
|
33
36
|
"@container-stack/mailing-api": "5.2.1-alpha.1",
|
|
34
37
|
"helmet": "^3.21.2",
|
|
35
38
|
"react": "18.2.0",
|
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.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.mjs",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
},
|
|
26
26
|
"executors": "./executors.json",
|
|
27
27
|
"generators": "./generators.json",
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "cc43472b14fd4266f6df999a9102434b52e0f568"
|
|
29
29
|
}
|
|
@@ -52,7 +52,9 @@
|
|
|
52
52
|
"devpublish:push": "yarn predevpublish && git push origin $PUBLISH_BRANCH && yarn postdevpublish",
|
|
53
53
|
"format": "yarn lint --fix",
|
|
54
54
|
"format:md": "yarn lint:md --fix",
|
|
55
|
-
"
|
|
55
|
+
"pregenerateGraphql": " node --experimental-modules tools/codegenGenerator.mjs",
|
|
56
|
+
"generateGraphql": "graphql-codegen-esm",
|
|
57
|
+
"postgenerateGraphql": "lerna run watch --scope=common",
|
|
56
58
|
"generateGraphql:watch": "yarn generateGraphql -- --watch",
|
|
57
59
|
"git:pull": "git pull origin $(git rev-parse --abbrev-ref HEAD)",
|
|
58
60
|
"git:push": "git push origin $(git rev-parse --abbrev-ref HEAD)",
|
|
@@ -146,9 +148,9 @@
|
|
|
146
148
|
"@babel/preset-typescript": "^7.18.6",
|
|
147
149
|
"@babel/register": "^7.18.9",
|
|
148
150
|
"@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.
|
|
151
|
+
"@common-stack/env-list-loader": "6.0.8-alpha.31",
|
|
152
|
+
"@common-stack/generate-plugin": "6.0.8-alpha.31",
|
|
153
|
+
"@common-stack/rollup-vite-utils": "6.0.8-alpha.31",
|
|
152
154
|
"@emotion/babel-plugin": "^11.11.0",
|
|
153
155
|
"@graphql-codegen/add": "^5.0.2",
|
|
154
156
|
"@graphql-codegen/cli": "^5.0.2",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
import { runCodegenTasks } from '@common-stack/rollup-vite-utils/lib/tools/codegen/index.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* This main script orchestrates your codegen steps, using cdecode-config.json.
|
|
9
|
+
* Usage:
|
|
10
|
+
* node tools/mainScript.mjs
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// ESM housekeeping
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = path.dirname(__filename);
|
|
16
|
+
|
|
17
|
+
(async function main() {
|
|
18
|
+
try {
|
|
19
|
+
// 1) Locate and parse cdecode-config.json
|
|
20
|
+
const configPath = path.join(__dirname, '../cdecode-config.json');
|
|
21
|
+
if (!fs.existsSync(configPath)) {
|
|
22
|
+
console.error(`cdecode-config.json not found at: ${configPath}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
const rawConfig = fs.readFileSync(configPath, 'utf-8');
|
|
26
|
+
const cdecodeConfig = JSON.parse(rawConfig);
|
|
27
|
+
|
|
28
|
+
// 2) Run the orchestrated tasks
|
|
29
|
+
await runCodegenTasks(cdecodeConfig);
|
|
30
|
+
|
|
31
|
+
console.log('mainScript completed successfully!');
|
|
32
|
+
} catch (err) {
|
|
33
|
+
console.error('Error running mainScript:', err);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
FROM node:20.16-alpine
|
|
2
2
|
|
|
3
3
|
COPY .npmrc package.json /tmp/
|
|
4
|
+
COPY common /tmp/common
|
|
4
5
|
|
|
5
6
|
RUN set -ex \
|
|
6
7
|
&& apk add --no-cache \
|
|
@@ -13,6 +14,7 @@ RUN set -ex \
|
|
|
13
14
|
&& rm -f /tmp/.npmrc \
|
|
14
15
|
&& mkdir -p /home/app \
|
|
15
16
|
&& cp -a /tmp/node_modules /home/app/ \
|
|
17
|
+
&& cp -a /tmp/common /home/app/common \
|
|
16
18
|
&& rm -Rf /tmp/*
|
|
17
19
|
|
|
18
20
|
WORKDIR /home/app
|
|
@@ -24,12 +24,15 @@
|
|
|
24
24
|
"test:watch": "npm test -- --watch",
|
|
25
25
|
"watch": "npm run start:dev"
|
|
26
26
|
},
|
|
27
|
+
"resolutions": {
|
|
28
|
+
"common": "link:./common"
|
|
29
|
+
},
|
|
27
30
|
"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.
|
|
31
|
+
"@common-stack/client-core": "6.0.8-alpha.31",
|
|
32
|
+
"@common-stack/core": "6.0.8-alpha.31",
|
|
33
|
+
"@common-stack/server-core": "6.0.8-alpha.31",
|
|
34
|
+
"@common-stack/server-stack": "6.0.8-alpha.31",
|
|
35
|
+
"@common-stack/store-mongo": "6.0.8-alpha.31",
|
|
33
36
|
"@container-stack/mailing-api": "5.2.1-alpha.1",
|
|
34
37
|
"helmet": "^3.21.2",
|
|
35
38
|
"react": "18.2.0",
|