@common-stack/generate-plugin 6.0.6-alpha.6 → 6.0.6-alpha.60
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 +194 -0
- package/README.md +157 -211
- package/cde-config.json +43 -42
- package/generators.json +5 -0
- package/lib/{constants/index.cjs → common/constants.cjs} +1 -1
- package/lib/common/constants.cjs.map +1 -0
- package/lib/{constants/index.mjs → common/constants.mjs} +1 -1
- package/lib/common/constants.mjs.map +1 -0
- package/lib/generators/add-backend/files/package.json +5 -4
- package/lib/generators/add-backend/files/src/api/root-schema.graphqls +1 -7
- package/lib/generators/add-backend/generator.cjs +12 -3
- package/lib/generators/add-backend/generator.cjs.map +1 -1
- package/lib/generators/add-backend/generator.mjs +12 -3
- package/lib/generators/add-backend/generator.mjs.map +1 -1
- package/lib/generators/add-backend/schema.json +6 -1
- package/lib/generators/add-frontend/frameworks/antui/root.tsx.template +2 -2
- package/lib/generators/add-frontend/frameworks/chakraui/root.tsx.template +4 -3
- package/lib/generators/add-frontend/frameworks/tailwindui/root.tsx.template +2 -2
- package/lib/generators/add-frontend/generator.cjs +18 -14
- package/lib/generators/add-frontend/generator.cjs.map +1 -1
- package/lib/generators/add-frontend/generator.mjs +13 -9
- package/lib/generators/add-frontend/generator.mjs.map +1 -1
- package/lib/generators/add-frontend/schema.json +8 -3
- package/lib/generators/add-frontend/templates/package.json +6 -8
- package/lib/generators/add-frontend/templates/tools/checkQueryUsage.mjs +192 -0
- package/lib/generators/add-frontend/templates/tools/mergeConfig.js +3 -0
- package/lib/generators/add-frontend/templates/vite.config.ts.template +53 -32
- package/lib/generators/add-fullstack/files/Jenkinsfile +7 -7
- package/lib/generators/add-fullstack/files/package.json +19 -15
- package/lib/generators/add-fullstack/files/tools/html-plugin-template.ejs +28 -0
- package/lib/generators/add-fullstack/files/tools/update-dependencies.mjs +95 -63
- package/lib/generators/add-fullstack/files/tools/update-dependency-link.mjs +12 -10
- package/{src/generators/add-fullstack/files/tools/update-dependency-version.js → lib/generators/add-fullstack/files/tools/update-dependency-version.mjs} +57 -26
- package/lib/generators/add-fullstack/generator.cjs +39 -30
- package/lib/generators/add-fullstack/generator.cjs.map +1 -1
- package/lib/generators/add-fullstack/generator.mjs +39 -30
- package/lib/generators/add-fullstack/generator.mjs.map +1 -1
- package/lib/generators/add-fullstack/updates/htmlPluginUpdate.cjs +8 -0
- package/lib/generators/add-fullstack/updates/htmlPluginUpdate.cjs.map +1 -0
- package/lib/generators/add-fullstack/updates/htmlPluginUpdate.d.ts +2 -0
- package/lib/generators/add-fullstack/updates/htmlPluginUpdate.mjs +8 -0
- package/lib/generators/add-fullstack/updates/htmlPluginUpdate.mjs.map +1 -0
- package/lib/generators/add-fullstack/updates/ignoreUpdate.cjs +19 -0
- package/lib/generators/add-fullstack/updates/ignoreUpdate.cjs.map +1 -0
- package/lib/generators/add-fullstack/updates/ignoreUpdate.d.ts +3 -0
- package/lib/generators/add-fullstack/updates/ignoreUpdate.mjs +19 -0
- package/lib/generators/add-fullstack/updates/ignoreUpdate.mjs.map +1 -0
- package/lib/generators/add-fullstack/updates/index.d.ts +4 -0
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.cjs +5 -4
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.cjs.map +1 -1
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.d.ts +2 -1
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.mjs +5 -4
- package/lib/generators/add-fullstack/updates/jenkinsfileUpdate.mjs.map +1 -1
- package/lib/generators/add-fullstack/updates/lernaJsonUpdate.cjs +45 -0
- package/lib/generators/add-fullstack/updates/lernaJsonUpdate.cjs.map +1 -0
- package/lib/generators/add-fullstack/updates/lernaJsonUpdate.d.ts +3 -0
- package/lib/generators/add-fullstack/updates/lernaJsonUpdate.mjs +45 -0
- package/lib/generators/add-fullstack/updates/lernaJsonUpdate.mjs.map +1 -0
- package/lib/generators/add-fullstack/updates/licenseUpdate.cjs +19 -0
- package/lib/generators/add-fullstack/updates/licenseUpdate.cjs.map +1 -0
- package/lib/generators/add-fullstack/updates/licenseUpdate.d.ts +2 -0
- package/lib/generators/add-fullstack/updates/licenseUpdate.mjs +19 -0
- package/lib/generators/add-fullstack/updates/licenseUpdate.mjs.map +1 -0
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.cjs +38 -4
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.cjs.map +1 -1
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.d.ts +2 -1
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.mjs +38 -4
- package/lib/generators/add-fullstack/updates/packageJsonUpdate.mjs.map +1 -1
- package/lib/generators/add-moleculer/files/charts/chart/Chart.yaml +1 -1
- package/lib/generators/add-moleculer/files/package.json +5 -5
- package/lib/generators/add-moleculer/generator.cjs +7 -4
- package/lib/generators/add-moleculer/generator.cjs.map +1 -1
- package/lib/generators/add-moleculer/generator.mjs +7 -4
- package/lib/generators/add-moleculer/generator.mjs.map +1 -1
- package/lib/generators/add-moleculer/schema.json +9 -4
- package/lib/generators/add-package/generator.cjs +50 -0
- package/lib/generators/add-package/generator.cjs.map +1 -0
- package/lib/generators/add-package/generator.d.ts +5 -0
- package/lib/generators/add-package/generator.mjs +50 -0
- package/lib/generators/add-package/generator.mjs.map +1 -0
- package/lib/generators/add-package/schema.json +29 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -4
- package/lib/index.mjs +1 -1
- package/lib/utils/filesConfig.cjs +76 -0
- package/lib/utils/filesConfig.cjs.map +1 -0
- package/lib/utils/filesConfig.d.ts +2 -0
- package/lib/utils/filesConfig.mjs +76 -0
- package/lib/utils/filesConfig.mjs.map +1 -0
- package/lib/utils/index.cjs +28 -2
- package/lib/utils/index.cjs.map +1 -1
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.mjs +28 -2
- package/lib/utils/index.mjs.map +1 -1
- package/lib/utils/syncConfig.cjs +116 -0
- package/lib/utils/syncConfig.cjs.map +1 -0
- package/lib/utils/syncConfig.d.ts +9 -0
- package/lib/utils/syncConfig.mjs +116 -0
- package/lib/utils/syncConfig.mjs.map +1 -0
- package/package.json +3 -4
- package/rollup.config.mjs +2 -8
- package/src/generators/add-backend/generator.ts +14 -3
- package/src/generators/add-backend/schema.d.ts +1 -0
- package/src/generators/add-backend/schema.json +6 -1
- package/src/generators/add-frontend/frameworks/antui/root.tsx.template +2 -2
- package/src/generators/add-frontend/frameworks/chakraui/root.tsx.template +4 -3
- package/src/generators/add-frontend/frameworks/tailwindui/root.tsx.template +2 -2
- package/src/generators/add-frontend/generator.ts +14 -9
- package/src/generators/add-frontend/schema.d.ts +1 -0
- package/src/generators/add-frontend/schema.json +8 -3
- package/src/generators/add-fullstack/files/Jenkinsfile +7 -7
- package/src/generators/add-fullstack/files/LICENSE-IST +39 -0
- package/src/generators/add-fullstack/files/package.json +19 -15
- package/src/generators/add-fullstack/files/tools/html-plugin-template.ejs +28 -0
- package/src/generators/add-fullstack/files/tools/update-dependencies.mjs +95 -63
- package/src/generators/add-fullstack/files/tools/update-dependency-link.mjs +12 -10
- package/{lib/generators/add-fullstack/files/tools/update-dependency-version.js → src/generators/add-fullstack/files/tools/update-dependency-version.mjs} +57 -26
- package/src/generators/add-fullstack/generator.ts +64 -38
- package/src/generators/add-fullstack/updates/htmlPluginUpdate.ts +11 -0
- package/src/generators/add-fullstack/updates/ignoreUpdate.ts +23 -0
- package/src/generators/add-fullstack/updates/index.ts +4 -0
- package/src/generators/add-fullstack/updates/jenkinsfileUpdate.ts +6 -4
- package/src/generators/add-fullstack/updates/lernaJsonUpdate.ts +53 -0
- package/src/generators/add-fullstack/updates/licenseUpdate.ts +23 -0
- package/src/generators/add-fullstack/updates/packageJsonUpdate.ts +45 -4
- package/src/generators/add-moleculer/files/charts/chart/Chart.yaml +1 -1
- package/src/generators/add-moleculer/files/package.json +5 -5
- package/src/generators/add-moleculer/generator.spec.ts +1 -1
- package/src/generators/add-moleculer/generator.ts +8 -3
- package/src/generators/add-moleculer/schema.d.ts +2 -1
- package/src/generators/add-moleculer/schema.json +9 -4
- package/src/generators/{add-core-package → add-package}/generator.spec.ts +5 -5
- package/src/generators/add-package/generator.ts +62 -0
- package/src/generators/add-package/schema.d.ts +6 -0
- package/src/generators/add-package/schema.json +29 -0
- package/src/index.ts +1 -4
- package/src/utils/filesConfig.ts +84 -0
- package/src/utils/index.ts +31 -0
- package/src/utils/syncConfig.ts +128 -0
- package/lib/constants/index.cjs.map +0 -1
- package/lib/constants/index.mjs.map +0 -1
- package/lib/generators/add-browser-package/files/jest.config.js +0 -8
- package/lib/generators/add-browser-package/files/package.json +0 -49
- package/lib/generators/add-browser-package/files/rollup.config.mjs +0 -29
- package/lib/generators/add-browser-package/files/src/index.ts.template +0 -4
- package/lib/generators/add-browser-package/files/src/interfaces/index.ts.template +0 -1
- package/lib/generators/add-browser-package/files/src/interfaces/interfaces.ts.template +0 -1
- package/lib/generators/add-browser-package/files/src/module.tsx.template +0 -7
- package/lib/generators/add-browser-package/files/tsconfig.json +0 -28
- package/lib/generators/add-browser-package/files/webpack.config.js +0 -71
- package/lib/generators/add-browser-package/generator.cjs +0 -17
- package/lib/generators/add-browser-package/generator.cjs.map +0 -1
- package/lib/generators/add-browser-package/generator.d.ts +0 -5
- package/lib/generators/add-browser-package/generator.mjs +0 -17
- package/lib/generators/add-browser-package/generator.mjs.map +0 -1
- package/lib/generators/add-browser-package/schema.json +0 -19
- package/lib/generators/add-client-package/files/CHANGELOG.md +0 -807
- package/lib/generators/add-client-package/files/jest.config.js +0 -13
- package/lib/generators/add-client-package/files/package.json +0 -30
- package/lib/generators/add-client-package/files/rollup.config.mjs +0 -29
- package/lib/generators/add-client-package/files/src/components/index.tsx.template +0 -1
- package/lib/generators/add-client-package/files/src/index.ts.template +0 -1
- package/lib/generators/add-client-package/files/tsconfig.json +0 -27
- package/lib/generators/add-client-package/files/webpack.config.js +0 -72
- package/lib/generators/add-client-package/generator.cjs +0 -17
- package/lib/generators/add-client-package/generator.cjs.map +0 -1
- package/lib/generators/add-client-package/generator.d.ts +0 -5
- package/lib/generators/add-client-package/generator.mjs +0 -17
- package/lib/generators/add-client-package/generator.mjs.map +0 -1
- package/lib/generators/add-client-package/generator.spec.d.ts +0 -1
- package/lib/generators/add-client-package/schema.json +0 -19
- package/lib/generators/add-core-package/files/jest.config.js +0 -3
- package/lib/generators/add-core-package/files/package.json +0 -30
- package/lib/generators/add-core-package/files/rollup.config.mjs +0 -65
- package/lib/generators/add-core-package/files/src/constants/index.ts.template +0 -1
- package/lib/generators/add-core-package/files/src/constants/types.ts.template +0 -3
- package/lib/generators/add-core-package/files/src/index.ts.template +0 -2
- package/lib/generators/add-core-package/files/src/types/index.ts.template +0 -1
- package/lib/generators/add-core-package/files/src/types/types.ts.template +0 -17
- package/lib/generators/add-core-package/files/tsconfig.json +0 -22
- package/lib/generators/add-core-package/files/webpack.config.js +0 -53
- package/lib/generators/add-core-package/generator.cjs +0 -17
- package/lib/generators/add-core-package/generator.cjs.map +0 -1
- package/lib/generators/add-core-package/generator.d.ts +0 -5
- package/lib/generators/add-core-package/generator.mjs +0 -17
- package/lib/generators/add-core-package/generator.mjs.map +0 -1
- package/lib/generators/add-core-package/generator.spec.d.ts +0 -1
- package/lib/generators/add-core-package/schema.json +0 -19
- package/lib/generators/add-fullstack/files/CHANGELOG.md +0 -20
- package/lib/generators/add-fullstack/files/docs/Moleculer.md +0 -10
- package/lib/generators/add-fullstack/files/docs/References.md +0 -13
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Adding_New_Modules.md +0 -84
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Desktop_Setup.md +0 -12
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/DoAndDont.md +0 -35
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/GitHooks.md +0 -3
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/HowToContribute.md +0 -14
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/How_to_Run_Various_Options.md +0 -95
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Known_Issues.md +0 -19
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Lint_And_Formatter.md +0 -9
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Project_Setup.md +0 -159
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Dynamically_Render_Components.md +0 -57
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/HOC_With_Render_Props.md +0 -87
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Mongoose_Connection.md +0 -45
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/React_Componet_Extensions.md +0 -11
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/RxJS_notes.md +0 -3
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Styles_With_Type.md +0 -52
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/Tutorials.md +0 -12
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/faq.md +0 -17
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/installation_issues.md +0 -9
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/lerna-build-tools.md +0 -504
- package/lib/generators/add-fullstack/files/docs/development/CodeContribution/lerna-yarn-workspaces.md +0 -82
- package/lib/generators/add-fullstack/files/docs/development/Database/mongodb-test.md +0 -6
- package/lib/generators/add-fullstack/files/docs/development/Deployment/How_To_Setup_Jenkins.md +0 -60
- package/lib/generators/add-fullstack/files/docs/development/Deployment/JenkinsDeployment.md +0 -16
- package/lib/generators/add-fullstack/files/docs/development/Expo/expo-commands.md +0 -5
- package/lib/generators/add-fullstack/files/docs/development/Mobile/How_To_Make_Expo_Wrok_With_Monorepos.md +0 -9
- package/lib/generators/add-fullstack/files/docs/development/Mobile/React-Native-FAQ.md +0 -4
- package/lib/generators/add-fullstack/files/docs/development/Mobile/Run_mobile.md +0 -9
- package/lib/generators/add-server-package/files/CHANGELOG.md +0 -2599
- package/lib/generators/add-server-package/files/LICENSE +0 -674
- package/lib/generators/add-server-package/files/jest.config.js +0 -32
- package/lib/generators/add-server-package/files/package.json +0 -78
- package/lib/generators/add-server-package/files/rollup.config.mjs +0 -30
- package/lib/generators/add-server-package/files/src/constants/constants.ts.template +0 -62
- package/lib/generators/add-server-package/files/src/constants/index.ts.template +0 -1
- package/lib/generators/add-server-package/files/src/constants/types.ts.template +0 -21
- package/lib/generators/add-server-package/files/src/index.ts.template +0 -6
- package/lib/generators/add-server-package/files/src/module.ts.template +0 -6
- package/lib/generators/add-server-package/files/tsconfig.json +0 -27
- package/lib/generators/add-server-package/generator.cjs +0 -17
- package/lib/generators/add-server-package/generator.cjs.map +0 -1
- package/lib/generators/add-server-package/generator.d.ts +0 -5
- package/lib/generators/add-server-package/generator.mjs +0 -17
- package/lib/generators/add-server-package/generator.mjs.map +0 -1
- package/lib/generators/add-server-package/generator.spec.d.ts +0 -1
- package/lib/generators/add-server-package/schema.json +0 -19
- package/src/generators/add-browser-package/generator.spec.ts +0 -20
- package/src/generators/add-browser-package/generator.ts +0 -24
- package/src/generators/add-browser-package/schema.d.ts +0 -4
- package/src/generators/add-browser-package/schema.json +0 -19
- package/src/generators/add-client-package/generator.spec.ts +0 -20
- package/src/generators/add-client-package/generator.ts +0 -24
- package/src/generators/add-client-package/schema.d.ts +0 -4
- package/src/generators/add-client-package/schema.json +0 -19
- package/src/generators/add-core-package/generator.ts +0 -24
- package/src/generators/add-core-package/schema.d.ts +0 -4
- package/src/generators/add-core-package/schema.json +0 -19
- package/src/generators/add-fullstack/files/CHANGELOG.md +0 -28
- package/src/generators/add-fullstack/files/docs/Moleculer.md +0 -10
- package/src/generators/add-fullstack/files/docs/References.md +0 -13
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/Adding_New_Modules.md +0 -84
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/Desktop_Setup.md +0 -12
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/DoAndDont.md +0 -35
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/GitHooks.md +0 -3
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/HowToContribute.md +0 -14
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/How_to_Run_Various_Options.md +0 -95
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/Known_Issues.md +0 -19
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/Lint_And_Formatter.md +0 -9
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/Project_Setup.md +0 -159
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Dynamically_Render_Components.md +0 -57
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/HOC_With_Render_Props.md +0 -87
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Mongoose_Connection.md +0 -45
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/React_Componet_Extensions.md +0 -11
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/RxJS_notes.md +0 -3
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/React-Patterns/Styles_With_Type.md +0 -52
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/Tutorials.md +0 -12
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/faq.md +0 -17
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/installation_issues.md +0 -9
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/lerna-build-tools.md +0 -504
- package/src/generators/add-fullstack/files/docs/development/CodeContribution/lerna-yarn-workspaces.md +0 -82
- package/src/generators/add-fullstack/files/docs/development/Database/mongodb-test.md +0 -6
- package/src/generators/add-fullstack/files/docs/development/Deployment/How_To_Setup_Jenkins.md +0 -60
- package/src/generators/add-fullstack/files/docs/development/Deployment/JenkinsDeployment.md +0 -16
- package/src/generators/add-fullstack/files/docs/development/Expo/expo-commands.md +0 -5
- package/src/generators/add-fullstack/files/docs/development/Mobile/How_To_Make_Expo_Wrok_With_Monorepos.md +0 -9
- package/src/generators/add-fullstack/files/docs/development/Mobile/React-Native-FAQ.md +0 -4
- package/src/generators/add-fullstack/files/docs/development/Mobile/Run_mobile.md +0 -9
- package/src/generators/add-server-package/generator.spec.ts +0 -20
- package/src/generators/add-server-package/generator.ts +0 -24
- package/src/generators/add-server-package/schema.d.ts +0 -4
- package/src/generators/add-server-package/schema.json +0 -19
- /package/lib/{constants/index.d.ts → common/constants.d.ts} +0 -0
- /package/lib/generators/{add-browser-package/files/LICENSE → add-fullstack/files/LICENSE-GNU} +0 -0
- /package/lib/generators/{add-core-package/files/LICENSE → add-fullstack/files/LICENSE-IST} +0 -0
- /package/lib/generators/add-fullstack/files/{LICENSE → LICENSE-MIT} +0 -0
- /package/lib/generators/{add-browser-package → add-package}/generator.spec.d.ts +0 -0
- /package/src/{constants/index.ts → common/constants.ts} +0 -0
- /package/{lib/generators/add-client-package/files/LICENSE → src/generators/add-fullstack/files/LICENSE-GNU} +0 -0
- /package/src/generators/add-fullstack/files/{LICENSE → LICENSE-MIT} +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import {updateJson}from'@nx/devkit';import*as path from'path';import {parse}from'@babel/parser';import traverse from'@babel/traverse';import {set}from'lodash';import {getValid,readDir}from'./index.mjs';const DEFAULT_PACKAGE = 'core';
|
|
2
|
+
const syncConfig = (tree, projectRoot, options) => {
|
|
3
|
+
var _a, _b;
|
|
4
|
+
// synchronize package in package.json and lerna.json
|
|
5
|
+
syncPackage(tree, options);
|
|
6
|
+
const configPath = 'cde-config.json';
|
|
7
|
+
if (tree.exists(configPath)) {
|
|
8
|
+
try {
|
|
9
|
+
const directory = (_a = getValid(options.directory)) !== null && _a !== void 0 ? _a : 'packages';
|
|
10
|
+
const type = (_b = getValid(options.type)) !== null && _b !== void 0 ? _b : DEFAULT_PACKAGE;
|
|
11
|
+
const moduleName = options.name; // name should not be null
|
|
12
|
+
const envConfigContent = getEnvConfigFileContent(tree, projectRoot);
|
|
13
|
+
const localesContent = getLocalesFileContent(tree, projectRoot);
|
|
14
|
+
const packageContent = {
|
|
15
|
+
type: `packages-${type}`,
|
|
16
|
+
files: {
|
|
17
|
+
"config/env-config.ts": envConfigContent !== null && envConfigContent !== void 0 ? envConfigContent : {},
|
|
18
|
+
"cdm-locales": localesContent !== null && localesContent !== void 0 ? localesContent : {},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
updateJson(tree, configPath, (config) => {
|
|
22
|
+
set(config, [directory, 'modules', moduleName, type], packageContent);
|
|
23
|
+
return config;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
console.error('Failed to change env-config', e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
console.log('No exist env-config file at ', path.join(tree.root, configPath));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const getEnvConfigFileContent = (tree, projectRoot) => {
|
|
35
|
+
const filePath = path.join(projectRoot, 'src/config/env-config.ts');
|
|
36
|
+
if (tree.exists(filePath)) {
|
|
37
|
+
try {
|
|
38
|
+
const result = {};
|
|
39
|
+
let fileContent = tree.read(filePath).toString();
|
|
40
|
+
const ast = parse(fileContent, {
|
|
41
|
+
sourceType: 'module',
|
|
42
|
+
plugins: ['typescript', 'dynamicImport'],
|
|
43
|
+
});
|
|
44
|
+
traverse.default(ast, {
|
|
45
|
+
enter(astroPath) {
|
|
46
|
+
if (astroPath.node.type === "VariableDeclarator" && astroPath.node.id.name === "config") {
|
|
47
|
+
astroPath.node.init.arguments[1].properties.forEach(prop => {
|
|
48
|
+
const key = prop.key.name;
|
|
49
|
+
const callee = prop.value.callee.name;
|
|
50
|
+
let value;
|
|
51
|
+
if (prop.value.arguments && prop.value.arguments.length > 0) {
|
|
52
|
+
value = {};
|
|
53
|
+
prop.value.arguments[0].properties.forEach(p => {
|
|
54
|
+
if (p.value.elements && p.value.elements.length > 0) {
|
|
55
|
+
value[p.key.name] = [];
|
|
56
|
+
p.value.elements.forEach(ele => value[p.key.name].push(ele.value));
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
value[p.key.name] = callee == 'json' ? JSON.parse(p.value.value) : p.value.value;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
value = '';
|
|
65
|
+
}
|
|
66
|
+
console.log(`${key}:`, `${callee}(${JSON.stringify(value)})`);
|
|
67
|
+
result[key] = { type: callee, value: value };
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
console.error('Failed to change env-config', e);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
console.log('No exist env-config file at ', filePath);
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
};
|
|
83
|
+
const getLocalesFileContent = (tree, projectRoot) => {
|
|
84
|
+
const dirPath = path.join(projectRoot, 'src/cdm-locales');
|
|
85
|
+
if (tree.exists(dirPath)) {
|
|
86
|
+
try {
|
|
87
|
+
return readDir(tree, dirPath);
|
|
88
|
+
}
|
|
89
|
+
catch (e) {
|
|
90
|
+
console.error(e);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
console.log('No exist cdm-locales directory at ', dirPath);
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
};
|
|
98
|
+
const syncPackage = (tree, options) => {
|
|
99
|
+
var _a;
|
|
100
|
+
const directory = (_a = getValid(options.directory)) !== null && _a !== void 0 ? _a : 'packages';
|
|
101
|
+
updateJson(tree, 'package.json', (packageJson) => {
|
|
102
|
+
var _a;
|
|
103
|
+
const packages = ((_a = packageJson.workspaces) === null || _a === void 0 ? void 0 : _a.packages) || [];
|
|
104
|
+
if (!packages.includes(`${directory}/*`)) {
|
|
105
|
+
packageJson.workspaces.packages.push(`${directory}/*`);
|
|
106
|
+
}
|
|
107
|
+
return packageJson;
|
|
108
|
+
});
|
|
109
|
+
updateJson(tree, 'lerna.json', (lernaJson) => {
|
|
110
|
+
const packages = lernaJson.packages || [];
|
|
111
|
+
if (!packages.includes(`${directory}/*`)) {
|
|
112
|
+
lernaJson.packages.push(`${directory}/*`);
|
|
113
|
+
}
|
|
114
|
+
return lernaJson;
|
|
115
|
+
});
|
|
116
|
+
};export{syncConfig,syncPackage};//# sourceMappingURL=syncConfig.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncConfig.mjs","sources":["../../src/utils/syncConfig.ts"],"sourcesContent":[null],"names":[],"mappings":"0MAcA,MAAM,eAAe,GAAG,MAAM,CAAC;AAElB,MAAA,UAAU,GAAG,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA0B,KAAI;;;AAEtF,IAAA,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE3B,MAAM,UAAU,GAAG,iBAAiB,CAAC;AACrC,IAAA,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE;AACzB,QAAA,IAAI;YACA,MAAM,SAAS,GAAG,CAAA,EAAA,GAAA,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,UAAU,CAAC;YAC5D,MAAM,IAAI,GAAG,CAAA,EAAA,GAAA,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,eAAe,CAAC;AACvD,YAAA,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;YAEhC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YACpE,MAAM,cAAc,GAAG,qBAAqB,CAAC,IAAI,EAAE,WAA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.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@common-stack/generate-plugin",
|
|
3
|
-
"version": "6.0.6-alpha.
|
|
3
|
+
"version": "6.0.6-alpha.60",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./lib/index.mjs",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"watch": "yarn build:lib:watch"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@common-stack/rollup-vite-utils": "6.0.6-alpha.
|
|
21
|
-
"@nx/devkit": "19.5.1",
|
|
20
|
+
"@common-stack/rollup-vite-utils": "6.0.6-alpha.60",
|
|
22
21
|
"tslib": "^2.3.0"
|
|
23
22
|
},
|
|
24
23
|
"publishConfig": {
|
|
@@ -26,5 +25,5 @@
|
|
|
26
25
|
},
|
|
27
26
|
"executors": "./executors.json",
|
|
28
27
|
"generators": "./generators.json",
|
|
29
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "47ea459c2a0496e773163d462efda5bb08c62004"
|
|
30
29
|
}
|
package/rollup.config.mjs
CHANGED
|
@@ -33,14 +33,8 @@ const baseConfig = {
|
|
|
33
33
|
{ src: 'src/generators/add-fullstack/files/*', dest: 'lib/generators/add-fullstack/files' },
|
|
34
34
|
{ src: 'src/generators/add-moleculer/schema.json', dest: 'lib/generators/add-moleculer' },
|
|
35
35
|
{ src: 'src/generators/add-moleculer/files/*', dest: 'lib/generators/add-moleculer/files' },
|
|
36
|
-
{ src: 'src/generators/add-
|
|
37
|
-
{ src: 'src/generators/add-
|
|
38
|
-
{ src: 'src/generators/add-client-package/schema.json', dest: 'lib/generators/add-client-package' },
|
|
39
|
-
{ src: 'src/generators/add-client-package/files/*', dest: 'lib/generators/add-client-package/files' },
|
|
40
|
-
{ src: 'src/generators/add-core-package/schema.json', dest: 'lib/generators/add-core-package' },
|
|
41
|
-
{ src: 'src/generators/add-core-package/files/*', dest: 'lib/generators/add-core-package/files' },
|
|
42
|
-
{ src: 'src/generators/add-server-package/schema.json', dest: 'lib/generators/add-server-package' },
|
|
43
|
-
{ src: 'src/generators/add-server-package/files/*', dest: 'lib/generators/add-server-package/files' },
|
|
36
|
+
{ src: 'src/generators/add-package/schema.json', dest: 'lib/generators/add-package' },
|
|
37
|
+
{ src: 'src/generators/add-package/files/*', dest: 'lib/generators/add-package/files' },
|
|
44
38
|
{ src: 'src/executors/update-deploy-version/schema.json', dest: 'lib/executors/update-deploy-version' },
|
|
45
39
|
{ src: 'src/executors/sort-package-json/schema.json', dest: 'lib/executors/sort-package-json' },
|
|
46
40
|
],
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { addProjectConfiguration, formatFiles, generateFiles, Tree, updateJson } from '@nx/devkit';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
+
import { deepMerge } from '@common-stack/rollup-vite-utils/lib/utils/setupConfig.cjs';
|
|
3
4
|
import { AddBackendGeneratorSchema } from './schema';
|
|
4
5
|
import { isValid, getValid } from '../../utils';
|
|
5
6
|
|
|
7
|
+
const DEFAULT_SERVER_NAME = 'backend-server';
|
|
8
|
+
|
|
6
9
|
export async function addBackendGenerator(tree: Tree, options: AddBackendGeneratorSchema) {
|
|
7
|
-
const projectName = isValid(options.
|
|
10
|
+
const projectName = isValid(options.name) ? `backend-${getValid(options.name)}-server` : DEFAULT_SERVER_NAME;
|
|
8
11
|
const configs: any = {...options, name: projectName};
|
|
9
12
|
|
|
10
13
|
return await generateBackend(tree, configs);
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
export const generateBackend = async (tree: Tree, options: any) => {
|
|
14
|
-
|
|
17
|
+
let projectName = getValid(options.name) ?? DEFAULT_SERVER_NAME;
|
|
15
18
|
const projectRoot = isValid(options.directory) ? `${getValid(options.directory)}/${projectName}` : projectName;
|
|
19
|
+
projectName = isValid(options.ns) ? `${getValid(options.ns)}-${projectName}` : projectName;
|
|
16
20
|
// resetProject(`${basePath}/${projectRoot}`);
|
|
17
21
|
|
|
18
22
|
// addProjectConfiguration(tree, framework, {
|
|
@@ -27,7 +31,14 @@ export const generateBackend = async (tree: Tree, options: any) => {
|
|
|
27
31
|
packageJson['name'] = projectName;
|
|
28
32
|
return packageJson;
|
|
29
33
|
});
|
|
30
|
-
|
|
34
|
+
if (options['config.json']) {
|
|
35
|
+
updateJson(tree, `${projectRoot}/config.json`, (configJson) => {
|
|
36
|
+
const addtionalConfigs = options['config.json'];
|
|
37
|
+
configJson = deepMerge(configJson, addtionalConfigs);
|
|
38
|
+
|
|
39
|
+
return configJson;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
31
42
|
await formatFiles(tree);
|
|
32
43
|
}
|
|
33
44
|
|
|
@@ -7,12 +7,17 @@
|
|
|
7
7
|
"ns": {
|
|
8
8
|
"type": "string",
|
|
9
9
|
"description": "The project namespace",
|
|
10
|
-
"x-prompt": "What
|
|
10
|
+
"x-prompt": "What namespace would you like to use?"
|
|
11
11
|
},
|
|
12
12
|
"directory": {
|
|
13
13
|
"type": "string",
|
|
14
14
|
"description": "",
|
|
15
15
|
"x-prompt": "What directory would you like to create in?"
|
|
16
|
+
},
|
|
17
|
+
"name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The module name(optional)",
|
|
20
|
+
"x-prompt": "What name would you like to use for this backend server module?(optional)"
|
|
16
21
|
}
|
|
17
22
|
},
|
|
18
23
|
"required": ["ns", "directory"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Links, Meta, Outlet, Scripts, ScrollRestoration,
|
|
3
|
+
import { Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteLoaderData, useRouteError, json } from '@remix-run/react';
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
import publicEnv from '@src/config/public-config';
|
|
6
6
|
import { PluginArea } from '@common-stack/client-react';
|
|
@@ -34,7 +34,7 @@ export function shouldRevalidate(params: any) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export function Layout({ children }: { children: React.ReactNode }) {
|
|
37
|
-
const data =
|
|
37
|
+
const data = useRouteLoaderData<{ locale: any }>('root');
|
|
38
38
|
const locale = data?.locale;
|
|
39
39
|
|
|
40
40
|
const { i18n } = useTranslation();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
import { Links, Meta, Outlet, Scripts, ScrollRestoration,
|
|
4
|
+
import { Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteLoaderData } from '@remix-run/react';
|
|
5
5
|
import { json } from '@remix-run/node';
|
|
6
6
|
import { PluginArea } from '@common-stack/client-react';
|
|
7
7
|
import { subscribeReduxRouter } from '@common-stack/remix-router-redux';
|
|
@@ -79,8 +79,9 @@ export function shouldRevalidate(params: any) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export default function App() {
|
|
82
|
-
|
|
83
|
-
const locale =
|
|
82
|
+
const data = useRouteLoaderData<{ locale: any }>('root');
|
|
83
|
+
const locale = data?.locale;
|
|
84
|
+
|
|
84
85
|
useChangeLanguage(locale);
|
|
85
86
|
|
|
86
87
|
React.useEffect(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Links, Meta, Outlet, Scripts, ScrollRestoration,
|
|
3
|
+
import { Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteLoaderData, useRouteError, json } from '@remix-run/react';
|
|
4
4
|
import type { LinksFunction } from "@remix-run/node";
|
|
5
5
|
// @ts-ignore
|
|
6
6
|
import publicEnv from '@src/config/public-config';
|
|
@@ -36,7 +36,7 @@ export function shouldRevalidate(params: any) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export function Layout({ children }: { children: React.ReactNode }) {
|
|
39
|
-
const data =
|
|
39
|
+
const data = useRouteLoaderData<{ locale: any }>('root');
|
|
40
40
|
const locale = data?.locale;
|
|
41
41
|
|
|
42
42
|
const { i18n } = useTranslation();
|
|
@@ -4,20 +4,22 @@ import * as fs from 'node:fs';
|
|
|
4
4
|
import { deepMerge } from '@common-stack/rollup-vite-utils/lib/utils/setupConfig.cjs';
|
|
5
5
|
import { AddFrontendGeneratorSchema } from './schema';
|
|
6
6
|
import { isValid, getValid } from '../../utils';
|
|
7
|
-
import { FRAMEWORK_ANTUI, FRAMEWORK_CHAKRAUI, FRAMEWORK_TAILWINDUI } from '../../constants';
|
|
7
|
+
import { FRAMEWORK_ANTUI, FRAMEWORK_CHAKRAUI, FRAMEWORK_TAILWINDUI } from '../../common/constants';
|
|
8
8
|
|
|
9
9
|
const DEFAULT_FRAMEWORK = FRAMEWORK_ANTUI;
|
|
10
|
+
const DEFAULT_SERVER_NAME = 'frontend-server';
|
|
10
11
|
|
|
11
12
|
export async function addFrontendGenerator(tree: Tree, options: AddFrontendGeneratorSchema) {
|
|
12
|
-
const projectName = isValid(options.
|
|
13
|
+
const projectName = isValid(options.name) ? `frontend-${getValid(options.name)}-server` : DEFAULT_SERVER_NAME;
|
|
13
14
|
const configs: any = {...options, name: projectName};
|
|
14
15
|
|
|
15
16
|
return await generateFrontend(tree, configs);
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export const generateFrontend = async (tree: Tree, options: any) => {
|
|
19
|
-
|
|
20
|
+
let projectName = getValid(options.name) ?? DEFAULT_SERVER_NAME;
|
|
20
21
|
const projectRoot = isValid(options.directory) ? `${getValid(options.directory)}/${projectName}` : projectName;
|
|
22
|
+
projectName = isValid(options.ns) ? `${getValid(options.ns)}-${projectName}` : projectName;
|
|
21
23
|
const projectSrc = `${projectRoot}/src`;
|
|
22
24
|
|
|
23
25
|
const framework = getValid(options.framework) ?? DEFAULT_FRAMEWORK;
|
|
@@ -38,17 +40,20 @@ export const generateFrontend = async (tree: Tree, options: any) => {
|
|
|
38
40
|
packageJson['name'] = projectName;
|
|
39
41
|
if (framework === FRAMEWORK_ANTUI) {
|
|
40
42
|
packageJson['dependencies']["@admin-layout/ant-design-pro"] = "latest";
|
|
41
|
-
packageJson['dependencies']["@admin-layout/ant-ui"] = "latest";
|
|
42
|
-
packageJson['dependencies']["@adminide-stack/user-auth0-browser-ant"] = "latest";
|
|
43
|
-
packageJson['dependencies']["@ant-design/pro-layout"] = "^7.6.1";
|
|
44
43
|
packageJson['dependencies']["@ant-design/static-style-extract"] = "^1.0.2";
|
|
44
|
+
packageJson['dependencies']["@emotion/react"] = "^11.10.0";
|
|
45
|
+
packageJson['dependencies']["@emotion/server"] = "^11.10.0";
|
|
46
|
+
packageJson['dependencies']["@emotion/css"] = "^11.10.0";
|
|
47
|
+
packageJson['dependencies']["@emotion/styled"] = "^11.10.4";
|
|
45
48
|
packageJson['dependencies']["antd"] = "^5.14.0";
|
|
46
49
|
} else if (framework === FRAMEWORK_CHAKRAUI) {
|
|
47
|
-
packageJson['dependencies']["@
|
|
48
|
-
packageJson['dependencies']["
|
|
49
|
-
packageJson['dependencies']["@
|
|
50
|
+
packageJson['dependencies']["@chakra-ui/react"] = "^2.8.2";
|
|
51
|
+
packageJson['dependencies']["framer-motion"] = "^11.5.4";
|
|
52
|
+
packageJson['dependencies']["@emotion/react"] = "^11.10.0";
|
|
53
|
+
packageJson['dependencies']["@emotion/server"] = "^11.10.0";
|
|
50
54
|
packageJson['dependencies']["@emotion/css"] = "^11.10.0";
|
|
51
55
|
packageJson['dependencies']["@emotion/styled"] = "^11.10.4";
|
|
56
|
+
|
|
52
57
|
} else if (framework === FRAMEWORK_TAILWINDUI) {
|
|
53
58
|
packageJson['devDependencies']["tailwindcss"] = "^3.4.10";
|
|
54
59
|
packageJson['devDependencies']["postcss"] = "^8.4.41";
|
|
@@ -7,18 +7,23 @@
|
|
|
7
7
|
"ns": {
|
|
8
8
|
"type": "string",
|
|
9
9
|
"description": "The project namespace",
|
|
10
|
-
"x-prompt": "What
|
|
10
|
+
"x-prompt": "What namespace would you like to use?"
|
|
11
11
|
},
|
|
12
12
|
"directory": {
|
|
13
13
|
"type": "string",
|
|
14
14
|
"description": "",
|
|
15
15
|
"x-prompt": "What directory would you like to create in?"
|
|
16
16
|
},
|
|
17
|
+
"name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The module name(optional)",
|
|
20
|
+
"x-prompt": "What name would you like to use for this frontend server module?(optional)"
|
|
21
|
+
},
|
|
17
22
|
"framework": {
|
|
18
23
|
"type": "string",
|
|
19
24
|
"description": "",
|
|
20
|
-
"x-prompt": "What UI framework would you like to use in [antui, chakraui, tailwindui]?"
|
|
25
|
+
"x-prompt": "What UI framework would you like to use in [antui, chakraui, tailwindui]?(default: antui)"
|
|
21
26
|
}
|
|
22
27
|
},
|
|
23
|
-
"required": ["ns", "directory"
|
|
28
|
+
"required": ["ns", "directory"]
|
|
24
29
|
}
|
|
@@ -13,23 +13,23 @@ pipeline {
|
|
|
13
13
|
string(name: 'CONNECTION_ID', defaultValue: 'test', description: 'connection id', trim: true)
|
|
14
14
|
string(name: 'WORKSPACE_ID', defaultValue: 'fullstack-pro', description: 'workspace id', trim: true)
|
|
15
15
|
string(name: 'UNIQUE_NAME', defaultValue: 'default', description: 'chart name', trim: true)
|
|
16
|
-
string(name: 'VERSION', defaultValue: '
|
|
16
|
+
string(name: 'VERSION', defaultValue: 'v1', description: 'version of the deployment', trim: true)
|
|
17
17
|
string(name: 'HEMERA_LOG_LEVEL', defaultValue: 'info', description: 'log level for hemera')
|
|
18
18
|
string(name: 'LOG_LEVEL', defaultValue: 'info', description: 'log level')
|
|
19
19
|
string(name: 'DEPLOYMENT_PATH', defaultValue: '/servers', description: 'folder path to load helm charts')
|
|
20
|
-
string(name: 'PUBLISH_BRANCH', defaultValue: '
|
|
20
|
+
string(name: 'PUBLISH_BRANCH', defaultValue: 'devpublish', description: 'the publish branch for packages release')
|
|
21
21
|
string(name: 'EXCLUDE_SETTING_NAMESPACE_FILTER', defaultValue: 'brigade', description: 'exclude setting namespace that matches search string')
|
|
22
22
|
string(name: 'GIT_CREDENTIAL_ID', defaultValue: 'fullstack-pro-github-deploy-key', description: 'jenkins credential id of git deploy secret')
|
|
23
23
|
string(name: 'BUILD_MODULE_TO_INCLUDE', defaultValue: '@sample-stack*', description: 'build env')
|
|
24
24
|
string(name: 'REPOSITORY_SSH_URL', defaultValue: 'git@github.com:CDEBase/fullstack-pro.git', description: 'ssh url of the git repository')
|
|
25
|
-
string(name: 'REPOSITORY_BRANCH', defaultValue: '
|
|
26
|
-
string(name: 'DEVELOP_BRANCH', defaultValue: '
|
|
25
|
+
string(name: 'REPOSITORY_BRANCH', defaultValue: 'develop', description: 'the branch with changes')
|
|
26
|
+
string(name: 'DEVELOP_BRANCH', defaultValue: 'develop', description: 'the branch for the development')
|
|
27
27
|
string(name: 'MASTER_BRANCH', defaultValue: 'master', description: 'Master branch as default branch for production.')
|
|
28
28
|
|
|
29
29
|
// by default first value of the choice will be choosen
|
|
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
|
-
choice choices: ['0.7.
|
|
32
|
+
choice choices: ['0.7.11','0.7.9', '0.6.0'], description: 'Choose Idestack chart version', name: 'IDESTACK_CHART_VERSION'
|
|
33
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'
|
|
@@ -100,9 +100,9 @@ pipeline {
|
|
|
100
100
|
rm .npmrc
|
|
101
101
|
npx lerna exec --scope=*mobile-device ${params.BUILD_STRATEGY} ${env.BUILD_COMMAND}
|
|
102
102
|
git checkout -- .npmrc
|
|
103
|
+
yarn git:pull
|
|
103
104
|
yarn gitcommit
|
|
104
|
-
git
|
|
105
|
-
git push origin ${params.REPOSITORY_BRANCH}
|
|
105
|
+
yarn git:push
|
|
106
106
|
"""
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
The CDEBase Enterprise license (the “Enterprise License”)
|
|
2
|
+
Copyright (c) 2018 cdebase LLC.
|
|
3
|
+
|
|
4
|
+
With regard to the CDEBase Software:
|
|
5
|
+
|
|
6
|
+
This software and associated documentation files (the "Software") may only be
|
|
7
|
+
used in production, if you (and any entity that you represent) have agreed to,
|
|
8
|
+
and are in compliance with, the CDEBase Terms of Service, available
|
|
9
|
+
at https://about.cdebase.com/terms (the “Enterprise Terms”), or other
|
|
10
|
+
agreement governing the use of the Software, as agreed by you and CDEBase,
|
|
11
|
+
and otherwise have a valid CDEBase Enterprise subscription for the
|
|
12
|
+
correct number of user seats. Subject to the foregoing sentence, you are free to
|
|
13
|
+
modify this Software and publish patches to the Software. You agree that CDEBase
|
|
14
|
+
and/or its licensors (as applicable) retain all right, title and interest in and
|
|
15
|
+
to all such modifications and/or patches, and all such modifications and/or
|
|
16
|
+
patches may only be used, copied, modified, displayed, distributed, or otherwise
|
|
17
|
+
exploited with a valid CDEBase Enterprise subscription for the correct
|
|
18
|
+
number of user seats. Notwithstanding the foregoing, you may copy and modify
|
|
19
|
+
the Software for development and testing purposes, without requiring a
|
|
20
|
+
subscription. You agree that CDEBase and/or its licensors (as applicable) retain
|
|
21
|
+
all right, title and interest in and to all such modifications. You are not
|
|
22
|
+
granted any other rights beyond what is expressly stated herein. Subject to the
|
|
23
|
+
foregoing, it is forbidden to copy, merge, publish, distribute, sublicense,
|
|
24
|
+
and/or sell the Software.
|
|
25
|
+
|
|
26
|
+
The full text of this Enterprise License shall be included in all copies or
|
|
27
|
+
substantial portions of the Software.
|
|
28
|
+
|
|
29
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
30
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
31
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
32
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
33
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
34
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
35
|
+
SOFTWARE.
|
|
36
|
+
|
|
37
|
+
For all third party components incorporated into the CDEBase Software, those
|
|
38
|
+
components are licensed under the original license provided by the owner of the
|
|
39
|
+
applicable component.
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"db:migrate": "knex migrate:latest --cwd . --knexfile ./servers/backend-server/knexfile.js",
|
|
44
44
|
"db:migrate:rollback": "knex migrate:rollback --cwd . --knexfile ./servers/backend-server/knexfile.js",
|
|
45
45
|
"db:seed": "yarn db:migrate && knex seed:run --cwd . --knexfile ./servers/backend-server/knexfile.js",
|
|
46
|
-
"predevpublish": "if ! git show-ref --verify --quiet refs/remotes/origin/$PUBLISH_BRANCH; then git checkout -b $PUBLISH_BRANCH && git push -u origin $PUBLISH_BRANCH; fi && git fetch origin $PUBLISH_BRANCH && git checkout $PUBLISH_BRANCH && git pull origin $PUBLISH_BRANCH && git merge -s recursive -X theirs $REPOSITORY_BRANCH -m \"merge from $REPOSITORY_BRANCH\" && yarn gitcommit && node tools/update-dependency-version.
|
|
46
|
+
"predevpublish": "if ! git show-ref --verify --quiet refs/remotes/origin/$PUBLISH_BRANCH; then git checkout -b $PUBLISH_BRANCH && git push -u origin $PUBLISH_BRANCH; fi && git fetch origin $PUBLISH_BRANCH && git checkout $PUBLISH_BRANCH && git pull origin $PUBLISH_BRANCH && git merge -s recursive -X theirs $REPOSITORY_BRANCH -m \"merge from $REPOSITORY_BRANCH\" && yarn gitcommit && node tools/update-dependency-version.mjs && yarn gitcommit",
|
|
47
47
|
"devpublish": "lerna publish prerelease --ignore-scripts --exact",
|
|
48
48
|
"postdevpublish": "git checkout $REPOSITORY_BRANCH",
|
|
49
49
|
"devpublish:auto": "yarn devpublish -- --yes",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"husky-skip": "cross-env HUSKY_SKIP_HOOKS=1",
|
|
61
61
|
"jest": "./node_modules/.bin/jest",
|
|
62
62
|
"lerna": "lerna bootstrap",
|
|
63
|
-
"prelernapublish": "git checkout publish && git pull origin publish && git merge -s recursive -X theirs master -m 'merge from master' && yarn gitcommit && node tools/update-dependency-version.
|
|
64
|
-
"lernapublish": "lerna publish --ignore-scripts
|
|
65
|
-
"postlernapublish": "git checkout master",
|
|
66
|
-
"lint": "eslint --ext js --ext ts --ext md",
|
|
63
|
+
"prelernapublish": "git checkout publish && git pull origin publish && git merge -s recursive -X theirs master -m 'merge from master' && yarn gitcommit && node tools/update-dependency-version.mjs && yarn gitcommit",
|
|
64
|
+
"lernapublish": "lerna publish patch --ignore-scripts",
|
|
65
|
+
"postlernapublish": "yarn update-lerna-on-develop && git checkout master",
|
|
66
|
+
"lint": "eslint --ext js --ext ts --ext tsx --ext md",
|
|
67
67
|
"lint:ci": "yarn lint . --format junit",
|
|
68
68
|
"lint:fix": "yarn lint -- --fix",
|
|
69
69
|
"lint:md": "markdownlint",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"publish:force": "yarn publish:forceManual --yes",
|
|
76
76
|
"publish:forceManual": "yarn lernapublish --force-publish=*",
|
|
77
77
|
"publish:push": "yarn prelernapublish && git push origin publish && yarn postlernapublish",
|
|
78
|
+
"push-develop": "git push origin develop",
|
|
78
79
|
"setBranchEnv": "cross-env REPOSITORY_BRANCH=${1:-$REPOSITORY_BRANCH} PUBLISH_BRANCH=${2:-$PUBLISH_BRANCH}",
|
|
79
80
|
"sort-packages": "node tools/sortPackageJson.mjs && prettier --write package.json **/**/*/package.json **/*/package.json",
|
|
80
81
|
"start": "cross-env NODE_ENV=development ENV_FILE=../../config/development/dev.env yarn startWeb",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
"pretravis": "yarn compile",
|
|
89
90
|
"travis": "istanbul cover -x \"*.test.js\" _mocha -- --timeout 5000 --full-trace ./test/tests.js",
|
|
90
91
|
"posttravis": "yarn lint",
|
|
91
|
-
"update-lerna-on-develop": "git checkout publish && git pull && cp lerna.json ../lerna-temp.json && git checkout develop && mv ../lerna-temp.json lerna.json && git commit -am 'Update lerna.json' &&
|
|
92
|
+
"update-lerna-on-develop": "git checkout publish && git pull origin publish && cp lerna.json ../lerna-temp.json && git checkout develop && mv ../lerna-temp.json lerna.json && git commit -am 'Update lerna.json' && yarn push-develop",
|
|
92
93
|
"watch": "lerna exec --no-sort --ignore *server --ignore *device --ignore *browser-extension --stream --parallel -- webpack --watch",
|
|
93
94
|
"watch-packages": "lerna exec --no-sort --scope @sample-stack/platform* --scope @sample-stack/react-shared-components --scope @sample-stack/core --stream --parallel 'webpack --watch'",
|
|
94
95
|
"zen:build": "cross-env NODE_ENV=production zen build",
|
|
@@ -145,8 +146,8 @@
|
|
|
145
146
|
"@babel/preset-typescript": "^7.18.6",
|
|
146
147
|
"@babel/register": "^7.18.9",
|
|
147
148
|
"@babel/runtime": "^7.20.1",
|
|
148
|
-
"@common-stack/env-list-loader": "6.0.6-alpha.
|
|
149
|
-
"@common-stack/generate-plugin": "6.0.6-alpha.
|
|
149
|
+
"@common-stack/env-list-loader": "6.0.6-alpha.50",
|
|
150
|
+
"@common-stack/generate-plugin": "6.0.6-alpha.59",
|
|
150
151
|
"@emotion/babel-plugin": "^11.11.0",
|
|
151
152
|
"@graphql-codegen/add": "^5.0.2",
|
|
152
153
|
"@graphql-codegen/cli": "^5.0.2",
|
|
@@ -165,15 +166,16 @@
|
|
|
165
166
|
"@redux-devtools/core": "^3.13.1",
|
|
166
167
|
"@redux-devtools/dock-monitor": "^3.0.1",
|
|
167
168
|
"@redux-devtools/log-monitor": "^4.0.1",
|
|
168
|
-
"@
|
|
169
|
-
"@
|
|
169
|
+
"@rollup/plugin-alias": "^5.1.0",
|
|
170
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
170
171
|
"@rollup/plugin-graphql": "2.0.2",
|
|
171
172
|
"@rollup/plugin-image": "^3.0.1",
|
|
172
|
-
"@rollup/plugin-json": "^
|
|
173
|
-
"@rollup/plugin-
|
|
173
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
174
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
175
|
+
"@rollup/plugin-typescript": "^11.1.5",
|
|
174
176
|
"@shelf/jest-mongodb": "^4.1.3",
|
|
175
177
|
"@svgr/webpack": "^6.5.1",
|
|
176
|
-
"@testing-library/react": "^
|
|
178
|
+
"@testing-library/react": "^16.0.1",
|
|
177
179
|
"@testing-library/react-hooks": "^8.0.1",
|
|
178
180
|
"@types/async": "^3.2.15",
|
|
179
181
|
"@types/body-parser": "1.19.2",
|
|
@@ -192,7 +194,6 @@
|
|
|
192
194
|
"@types/react": "^18.2.20",
|
|
193
195
|
"@types/react-dom": "^18.2.7",
|
|
194
196
|
"@types/react-helmet": "^6.1.5",
|
|
195
|
-
"@types/react-redux": "^7.1.24",
|
|
196
197
|
"@types/react-test-renderer": "^18.0.0",
|
|
197
198
|
"@types/redux-logger": "^3.0.9",
|
|
198
199
|
"@types/semver": "^7.3.13",
|
|
@@ -204,6 +205,7 @@
|
|
|
204
205
|
"@typescript-eslint/parser": "^6.7.4",
|
|
205
206
|
"@web/rollup-plugin-copy": "^0.5.1",
|
|
206
207
|
"@webpack-cli/serve": "^1.7.0",
|
|
208
|
+
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
207
209
|
"autoprefixer": "^10.4.13",
|
|
208
210
|
"babel-core": "^7.0.0-bridge.0",
|
|
209
211
|
"babel-eslint": "^10.1.0",
|
|
@@ -256,6 +258,7 @@
|
|
|
256
258
|
"html-webpack-plugin": "^5.5.0",
|
|
257
259
|
"http-proxy-middleware": "^2.0.6",
|
|
258
260
|
"husky": "^9.1.5",
|
|
261
|
+
"glob": "^11.0.0",
|
|
259
262
|
"ignore-loader": "^0.1.2",
|
|
260
263
|
"ip": "^1.1.8",
|
|
261
264
|
"isomorphic-style-loader": "^5.3.2",
|
|
@@ -265,6 +268,7 @@
|
|
|
265
268
|
"jest-dom": "^4.0.0",
|
|
266
269
|
"jest-junit": "^14.0.1",
|
|
267
270
|
"jest-matcher-utils": "^29.2.2",
|
|
271
|
+
"jest-raw-loader": "^1.0.1",
|
|
268
272
|
"jest-transform-graphql": "^2.1.0",
|
|
269
273
|
"jsdom": "^20.0.2",
|
|
270
274
|
"lerna": "8",
|
|
@@ -325,7 +329,7 @@
|
|
|
325
329
|
"ts-node": "^10.9.1",
|
|
326
330
|
"tslib": "^2.4.1",
|
|
327
331
|
"typedoc": "^0.23.20",
|
|
328
|
-
"typescript": "^5.
|
|
332
|
+
"typescript": "^5.5.4",
|
|
329
333
|
"url-loader": "^4.1.1",
|
|
330
334
|
"wait-on": "^6.0.1",
|
|
331
335
|
"webpack": "^5.74.0",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<base href="/">
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<title>
|
|
8
|
+
<@= htmlWebpackPlugin.options.title @>
|
|
9
|
+
</title>
|
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
11
|
+
</head>
|
|
12
|
+
|
|
13
|
+
<body>
|
|
14
|
+
<div class="demo">
|
|
15
|
+
<div id="root">
|
|
16
|
+
Try building the demo:
|
|
17
|
+
<pre>
|
|
18
|
+
</pre> ...and refreshing this page!
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<footer class="dark">
|
|
22
|
+
<section class="container copyright">
|
|
23
|
+
CDMBase LLC
|
|
24
|
+
</section>
|
|
25
|
+
</footer>
|
|
26
|
+
</body>
|
|
27
|
+
|
|
28
|
+
</html>
|