@common-stack/generate-plugin 6.0.2-alpha.1 → 6.0.2-alpha.10
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 +36 -0
- package/lib/generators/add-backend/files/config.json +0 -1
- package/lib/generators/add-backend/files/package.json +79 -114
- package/lib/generators/add-backend/files/src/api/root-schema.graphqls +9 -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-browser-package/files/package.json +47 -47
- package/lib/generators/add-client-package/files/package.json +28 -28
- package/lib/generators/add-core-package/files/package.json +28 -28
- package/lib/generators/add-frontend/frameworks/chakraui/entry.client.tsx.template +30 -24
- package/lib/generators/add-frontend/frameworks/chakraui/entry.server.tsx.template +5 -8
- package/lib/generators/add-frontend/frameworks/chakraui/root.tsx.template +3 -3
- package/lib/generators/add-frontend/templates/Dockerfile +1 -1
- package/lib/generators/add-frontend/templates/package.json +4 -22
- package/lib/generators/add-frontend/templates/src/config/public-config.ts.template +6 -0
- package/lib/generators/add-fullstack/files/Jenkinsfile +4 -7
- package/lib/generators/add-fullstack/files/package.json +346 -358
- package/lib/generators/add-fullstack/files/tools/deploy-cli/updateYamlSettings.js +14 -15
- package/lib/generators/add-fullstack/files/tools/sortPackageJson.mjs +8 -1
- package/lib/generators/add-fullstack/generator.cjs +22 -25
- package/lib/generators/add-fullstack/generator.cjs.map +1 -1
- package/lib/generators/add-fullstack/generator.mjs +20 -23
- package/lib/generators/add-fullstack/generator.mjs.map +1 -1
- package/lib/generators/add-fullstack/schema.json +5 -0
- package/lib/generators/add-fullstack/updates/index.d.ts +2 -0
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.cjs +36 -0
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.cjs.map +1 -0
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.d.ts +1 -0
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.mjs +36 -0
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.mjs.map +1 -0
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.cjs +8 -0
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.cjs.map +1 -0
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.d.ts +2 -0
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.mjs +8 -0
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.mjs.map +1 -0
- package/lib/generators/add-moleculer/files/Dockerfile +1 -1
- package/lib/generators/add-moleculer/files/package.json +6 -25
- package/lib/generators/add-server-package/files/package.json +3 -3
- package/package.json +3 -3
- package/src/generators/add-frontend/frameworks/chakraui/entry.client.tsx.template +30 -24
- package/src/generators/add-frontend/frameworks/chakraui/entry.server.tsx.template +5 -8
- package/src/generators/add-frontend/frameworks/chakraui/root.tsx.template +3 -3
- package/src/generators/add-fullstack/files/Jenkinsfile +4 -7
- package/src/generators/add-fullstack/files/package.json +6 -18
- package/src/generators/add-fullstack/files/tools/deploy-cli/updateYamlSettings.js +14 -15
- package/src/generators/add-fullstack/files/tools/sortPackageJson.mjs +8 -1
- package/src/generators/add-fullstack/generator.ts +41 -35
- package/src/generators/add-fullstack/schema.d.ts +2 -1
- package/src/generators/add-fullstack/schema.json +5 -0
- package/src/generators/add-fullstack/updates/index.ts +2 -0
- package/src/generators/add-fullstack/updates/jenkinsfileUpdate.ts +47 -0
- package/src/generators/add-fullstack/updates/packageJsonUpdate.ts +11 -0
- package/src/generators/add-moleculer/files/Dockerfile +1 -1
- package/src/generators/add-moleculer/files/package.json +6 -25
- package/lib/generators/add-backend/files/generated-schema.graphql +0 -235
- package/lib/generators/add-frontend/templates/public/css/dashboard.css +0 -491
- package/lib/generators/add-fullstack/files/jest.config copy.js +0 -27
- package/lib/generators/add-fullstack/files/tools/html-plugin-template.ejs +0 -28
- package/src/generators/add-fullstack/files/jest.config copy.js +0 -27
- package/src/generators/add-fullstack/files/tools/html-plugin-template.ejs +0 -28
|
@@ -36,8 +36,10 @@ import config from '@app/cde-webconfig.json';
|
|
|
36
36
|
|
|
37
37
|
import { Head } from './root';
|
|
38
38
|
import type { IAppLoadContext } from '@common-stack/client-core';
|
|
39
|
-
import { ServerStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
|
|
39
|
+
// import { ServerStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
|
|
40
|
+
import { ServerStyleContext } from './context';
|
|
40
41
|
import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
|
|
42
|
+
|
|
41
43
|
const { extractCriticalToChunks } = createEmotionServer(defaultCache);
|
|
42
44
|
|
|
43
45
|
const ABORT_DELAY = 5000;
|
|
@@ -124,12 +126,7 @@ async function handleBrowserRequest(
|
|
|
124
126
|
// And here we detect what namespaces the routes about to render want to use
|
|
125
127
|
const ns = i18next.getRouteNamespaces(remixContext);
|
|
126
128
|
const slotFillContext = { fills: {} };
|
|
127
|
-
const {
|
|
128
|
-
modules: clientModules,
|
|
129
|
-
container,
|
|
130
|
-
apolloClient: client,
|
|
131
|
-
store,
|
|
132
|
-
}: IAppLoadContext = loadContext;
|
|
129
|
+
const { modules: clientModules, container, apolloClient: client, store }: IAppLoadContext = loadContext;
|
|
133
130
|
|
|
134
131
|
// First, we create a new instance of i18next so every request will have a
|
|
135
132
|
// completely unique instance and not share any state.
|
|
@@ -145,7 +142,7 @@ async function handleBrowserRequest(
|
|
|
145
142
|
lng, // The locale we detected above
|
|
146
143
|
ns, // The namespaces the routes about to render want to use
|
|
147
144
|
backend: {
|
|
148
|
-
loadPath:
|
|
145
|
+
loadPath: config.i18n.backend.loadServerPath,
|
|
149
146
|
},
|
|
150
147
|
});
|
|
151
148
|
}
|
|
@@ -79,8 +79,8 @@ export function shouldRevalidate(params: any) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export default function App() {
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
// const { locale } = useLoaderData();
|
|
83
|
+
const locale = 'en';
|
|
84
84
|
useChangeLanguage(locale);
|
|
85
85
|
|
|
86
86
|
React.useEffect(() => {
|
|
@@ -94,4 +94,4 @@ export default function App() {
|
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export { ErrorBoundary };
|
|
97
|
+
export { ErrorBoundary };
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"main": "index.js",
|
|
18
18
|
"scripts": {
|
|
19
19
|
"prebuild": "yarn build:clean && yarn genconfig",
|
|
20
|
-
"build": "cross-env SSR=true NODE_OPTIONS='--max_old_space_size=
|
|
20
|
+
"build": "cross-env SSR=true NODE_OPTIONS='--max_old_space_size=4096' NODE_ENV=production remix vite:build",
|
|
21
21
|
"build:SSR": "cross-env SSR=true NODE_ENV=production remix vite:build",
|
|
22
22
|
"build:clean": "rimraf dist build node_modules/.vite",
|
|
23
23
|
"build:debug": "cross-env DEBUGGING=true NODE_ENV=production remix vite:build",
|
|
24
24
|
"build:debug:verbose": "yarn build:debug -- -v",
|
|
25
25
|
"build:dev": "cross-env ENV_FILE=../../config/development/dev.env yarn build",
|
|
26
|
-
"build:devSSR": "cross-env SSR=true NODE_ENV=development ENV_FILE=../../config/development/dev.env
|
|
26
|
+
"build:devSSR": "cross-env SSR=true NODE_ENV=development ENV_FILE=../../config/development/dev.env yarn build",
|
|
27
27
|
"build:stats": "cross-env BUNDLE_STATS=true yarn build:debug",
|
|
28
28
|
"dev:vite:ssr": "cross-env SSR=true NODE_ENV=development ENV_FILE=../../config/development/dev.env node ./server.js",
|
|
29
29
|
"docker:build": "cross-env yarn build && docker build . -t $npm_package_name:$npm_package_version",
|
|
@@ -52,23 +52,6 @@
|
|
|
52
52
|
"watch:test": "cross-env ENV_FILE=../../config/test/test.env node ./server.js"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@admin-layout/assets": "8.5.3-alpha.0",
|
|
56
|
-
"@admin-layout/icons": "8.5.3-alpha.0",
|
|
57
|
-
"@adminide-stack/account-api-browser": "8.5.2-alpha.0",
|
|
58
|
-
"@adminide-stack/billing-api-browser": "8.5.2-alpha.0",
|
|
59
|
-
"@adminide-stack/core": "8.5.2-alpha.0",
|
|
60
|
-
"@adminide-stack/extension-api": "8.5.2-alpha.0",
|
|
61
|
-
"@adminide-stack/extension-module-browser": "8.5.2-alpha.0",
|
|
62
|
-
"@adminide-stack/git-api-browser": "8.5.2-alpha.0",
|
|
63
|
-
"@adminide-stack/integration-api-client": "8.5.2-alpha.0",
|
|
64
|
-
"@adminide-stack/marketplace-module-browser": "8.5.2-alpha.0",
|
|
65
|
-
"@adminide-stack/platform-browser": "8.5.2-alpha.0",
|
|
66
|
-
"@adminide-stack/project-mgmt-browser": "8.5.2-alpha.0",
|
|
67
|
-
"@adminide-stack/react-shared-components": "8.5.2-alpha.0",
|
|
68
|
-
"@adminide-stack/registry-api-browser": "8.5.2-alpha.0",
|
|
69
|
-
"@adminide-stack/user-auth0-browser": "8.5.2-alpha.0",
|
|
70
|
-
"@adminide-stack/user-auth0-server": "8.5.2-alpha.0",
|
|
71
|
-
"@container-stack/territory": "5.1.2",
|
|
72
55
|
"@emotion/react": "^11.10.4",
|
|
73
56
|
"@emotion/server": "^11.10.0",
|
|
74
57
|
"@files-stack/core": "3.0.2",
|
|
@@ -81,7 +64,6 @@
|
|
|
81
64
|
"isomorphic-fetch": "^2.2.1",
|
|
82
65
|
"lodash": "^4.17.15",
|
|
83
66
|
"lodash-es": "^4.17.21",
|
|
84
|
-
"minimatch": "^5.0.0",
|
|
85
67
|
"moment": "2.29.1",
|
|
86
68
|
"ramda": "^0.29.1",
|
|
87
69
|
"react-ga4": "^2.1.0",
|
|
@@ -99,8 +81,8 @@
|
|
|
99
81
|
},
|
|
100
82
|
"devDependencies": {
|
|
101
83
|
"@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
|
|
102
|
-
"@common-stack/frontend-stack-react": "6.0.
|
|
103
|
-
"@common-stack/rollup-vite-utils": "6.0.
|
|
84
|
+
"@common-stack/frontend-stack-react": "6.0.2-alpha.2",
|
|
85
|
+
"@common-stack/rollup-vite-utils": "6.0.2-alpha.2",
|
|
104
86
|
"@remix-run/dev": "^2.8.1",
|
|
105
87
|
"@remix-run/serve": "^2.8.1",
|
|
106
88
|
"cross-env": "^7.0.3",
|
|
@@ -63,12 +63,18 @@ if (isBrowser) {
|
|
|
63
63
|
process[lowerCase('env')] = env; // to avoid webpack to replace `process` with actual value.
|
|
64
64
|
process.APP_ENV = env;
|
|
65
65
|
window.process = process;
|
|
66
|
+
// @ts-ignore
|
|
66
67
|
window.__CLIENT__ = true;
|
|
68
|
+
// @ts-ignore
|
|
67
69
|
window.__SERVER__ = false;
|
|
68
70
|
} else {
|
|
71
|
+
// @ts-ignore
|
|
69
72
|
global.__CLIENT__ = false;
|
|
73
|
+
// @ts-ignore
|
|
70
74
|
global.__SERVER__ = true;
|
|
75
|
+
// @ts-ignore
|
|
71
76
|
__CLIENT__ = false;
|
|
77
|
+
// @ts-ignore
|
|
72
78
|
__SERVER__ = true;
|
|
73
79
|
}
|
|
74
80
|
try {
|
|
@@ -30,7 +30,7 @@ pipeline {
|
|
|
30
30
|
choice choices: ['auto', 'force'], description: 'Choose merge strategy', name: 'NPM_PUBLISH_STRATEGY'
|
|
31
31
|
choice choices: ['yarn', 'npm'], description: 'Choose build strategy', name: 'BUILD_STRATEGY'
|
|
32
32
|
choice choices: ['0.7.9','0.7.7', '0.6.0'], description: 'Choose Idestack chart version', name: 'IDESTACK_CHART_VERSION'
|
|
33
|
-
choice choices: ['
|
|
33
|
+
choice choices: ['nodejs20', 'nodejs18', 'nodejs22'], description: 'Choose NodeJS version', name: 'NODEJS_TOOL_VERSION'
|
|
34
34
|
choice choices: ['buildOnly', 'buildAndTest', 'buildAndPublish', 'mobileBuild', 'mobilePreview', 'mobilePreviewLocal', 'mobilePreviewSubmit', 'mobileProd', 'mobileProdSubmit', 'devDeployOnly', 'stageDeploy', 'stageDeployOnly', 'prodDeploy', 'prodDeployOnly', 'allenv'], description: 'Where to deploy micro services?', name: 'ENV_CHOICE'
|
|
35
35
|
choice choices: ['all', 'ios', 'android' ], description: 'Mobile type if it is mobile build?', name: 'MOBILE_CHOICE'
|
|
36
36
|
booleanParam (defaultValue: false, description: 'Skip production release approval', name: 'SKIP_RELEASE_APPROVAL')
|
|
@@ -38,7 +38,7 @@ pipeline {
|
|
|
38
38
|
string(name: 'BUILD_TIME_OUT', defaultValue: '120', description: 'Build timeout in minutes', trim: true)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
// Setup common + secret key variables for pipeline.
|
|
42
42
|
environment {
|
|
43
43
|
BUILD_COMMAND = getBuildCommand()
|
|
44
44
|
NAMESPACE = "${params.BASE_NAMESPACE}-${params.VERSION}"
|
|
@@ -86,7 +86,6 @@ pipeline {
|
|
|
86
86
|
sh """
|
|
87
87
|
echo "what is docker git version $GIT_BRANCH_NAME -- ${params.ENV_CHOICE}"
|
|
88
88
|
${params.BUILD_STRATEGY} install
|
|
89
|
-
${params.BUILD_STRATEGY} run lerna
|
|
90
89
|
"""
|
|
91
90
|
}
|
|
92
91
|
}
|
|
@@ -99,7 +98,7 @@ pipeline {
|
|
|
99
98
|
sshagent(credentials: [params.GIT_CREDENTIAL_ID]) {
|
|
100
99
|
sh """
|
|
101
100
|
rm .npmrc
|
|
102
|
-
lerna exec --scope=*mobile-device ${params.BUILD_STRATEGY} ${env.BUILD_COMMAND}
|
|
101
|
+
npx lerna exec --scope=*mobile-device ${params.BUILD_STRATEGY} ${env.BUILD_COMMAND}
|
|
103
102
|
git checkout -- .npmrc
|
|
104
103
|
yarn gitcommit
|
|
105
104
|
git pull origin ${params.REPOSITORY_BRANCH}
|
|
@@ -145,7 +144,6 @@ pipeline {
|
|
|
145
144
|
git merge ${env.GIT_PR_BRANCH_NAME} -m 'auto merging ${params.GIT_PR_BRANCH_NAME} \r\n[skip ci]'
|
|
146
145
|
git push origin ${params.DEVELOP_BRANCH}
|
|
147
146
|
${params.BUILD_STRATEGY} install
|
|
148
|
-
${params.BUILD_STRATEGY} run lerna
|
|
149
147
|
${params.BUILD_STRATEGY} run build
|
|
150
148
|
"""
|
|
151
149
|
script {
|
|
@@ -278,7 +276,6 @@ pipeline {
|
|
|
278
276
|
git checkout ${params.REPOSITORY_BRANCH}
|
|
279
277
|
git merge origin/${params.DEVELOP_BRANCH} -m 'auto merging ${params.DEVELOP_BRANCH} \r\n[skip ci]'
|
|
280
278
|
${params.BUILD_STRATEGY} install
|
|
281
|
-
${params.BUILD_STRATEGY} run lerna
|
|
282
279
|
"""
|
|
283
280
|
script {
|
|
284
281
|
GIT_BRANCH_NAME = params.REPOSITORY_BRANCH
|
|
@@ -648,7 +645,7 @@ def buildAndPushDockerImage(server, name, version) {
|
|
|
648
645
|
echo "Docker image ${REPOSITORY_SERVER}/${name}:${version} already exists. Skipping build."
|
|
649
646
|
} else {
|
|
650
647
|
sh """
|
|
651
|
-
lerna exec --scope=*${server} ${params.BUILD_STRATEGY} run docker:${env.BUILD_COMMAND};
|
|
648
|
+
npx lerna exec --scope=*${server} ${params.BUILD_STRATEGY} run docker:${env.BUILD_COMMAND};
|
|
652
649
|
docker tag ${name}:${version} ${REPOSITORY_SERVER}/${name}:${version}
|
|
653
650
|
docker push ${REPOSITORY_SERVER}/${name}:${version}
|
|
654
651
|
docker rmi ${REPOSITORY_SERVER}/${name}:${version}
|