@common-stack/generate-plugin 8.0.1-alpha.0 → 8.0.1-alpha.2
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 +8 -0
- package/lib/common/package-releases/package.json +26 -0
- package/lib/common/package-releases/package.json.cjs +33 -0
- package/lib/common/package-releases/package.json.cjs.map +1 -0
- package/lib/common/package-releases/package.json.mjs +33 -0
- package/lib/common/package-releases/package.json.mjs.map +1 -0
- package/lib/generators/add-backend/files/package.json +2 -2
- package/{src/generators/add-frontend/frameworks/antui → lib/generators/add-frontend/frameworks/antui/src}/entry.client.tsx.template +0 -3
- package/{src/generators/add-frontend/frameworks/antui → lib/generators/add-frontend/frameworks/antui/src}/entry.server.tsx.template +1 -0
- package/lib/generators/add-frontend/frameworks/antui/{root.tsx.template → src/root.tsx.template} +1 -11
- package/lib/generators/add-frontend/frameworks/tailwindui/postcss.config.js +6 -0
- package/lib/generators/add-frontend/generator.cjs +83 -36
- package/lib/generators/add-frontend/generator.cjs.map +1 -1
- package/lib/generators/add-frontend/generator.mjs +83 -36
- package/lib/generators/add-frontend/generator.mjs.map +1 -1
- package/lib/generators/add-frontend/templates/package.json +4 -4
- package/lib/generators/add-fullstack/files/cdecode-config.json +17 -0
- package/lib/generators/add-fullstack/files/package.json +10 -10
- package/lib/generators/add-fullstack/generator.cjs +8 -4
- package/lib/generators/add-fullstack/generator.cjs.map +1 -1
- package/lib/generators/add-fullstack/generator.mjs +8 -4
- package/lib/generators/add-fullstack/generator.mjs.map +1 -1
- package/lib/generators/add-fullstack/schema.json +1 -1
- package/lib/generators/add-moleculer/files/package.json +5 -5
- package/package.json +4 -3
- package/rollup.config.mjs +3 -0
- package/src/common/package-releases/package.json +26 -0
- package/src/generators/add-frontend/__snapshots__/generator.test.ts.snap +33 -0
- package/{lib/generators/add-frontend/frameworks/antui → src/generators/add-frontend/frameworks/antui/src}/entry.client.tsx.template +0 -3
- package/{lib/generators/add-frontend/frameworks/antui → src/generators/add-frontend/frameworks/antui/src}/entry.server.tsx.template +1 -0
- package/src/generators/add-frontend/frameworks/antui/{root.tsx.template → src/root.tsx.template} +1 -11
- package/src/generators/add-frontend/frameworks/tailwindui/postcss.config.js +6 -0
- package/src/generators/add-frontend/frameworks/tailwindui/tailwind.config.ts.template +12 -0
- package/src/generators/add-frontend/generator.test.ts +79 -0
- package/src/generators/add-frontend/generator.ts +109 -44
- package/src/generators/add-fullstack/files/cdecode-config.json +17 -0
- package/src/generators/add-fullstack/files/package.json +10 -10
- package/src/generators/add-fullstack/generator.ts +10 -11
- package/src/generators/add-fullstack/schema.json +1 -1
- package/src/generators/add-moleculer/files/package.json +5 -5
- package/tsconfig.spec.json +9 -0
- package/docker-releases/backend/package.json +0 -134
- package/docker-releases/frontend/antd/package.json +0 -121
- package/lib/generators/add-frontend/templates/postcss.config.js +0 -6
- package/src/generators/add-frontend/generator.spec.ts +0 -20
- /package/lib/generators/add-frontend/frameworks/antui/{context.tsx.template → src/context.tsx.template} +0 -0
- /package/lib/generators/add-frontend/frameworks/chakraui/{context.tsx.template → src/context.tsx.template} +0 -0
- /package/lib/generators/add-frontend/frameworks/chakraui/{entry.client.tsx.template → src/entry.client.tsx.template} +0 -0
- /package/lib/generators/add-frontend/frameworks/chakraui/{entry.server.tsx.template → src/entry.server.tsx.template} +0 -0
- /package/lib/generators/add-frontend/frameworks/chakraui/{root.tsx.template → src/root.tsx.template} +0 -0
- /package/lib/generators/add-frontend/frameworks/tailwindui/{entry.client.tsx.template → src/entry.client.tsx.template} +0 -0
- /package/lib/generators/add-frontend/frameworks/tailwindui/{entry.server.tsx.template → src/entry.server.tsx.template} +0 -0
- /package/lib/generators/add-frontend/frameworks/tailwindui/{root.tsx.template → src/root.tsx.template} +0 -0
- /package/lib/generators/add-frontend/frameworks/tailwindui/{tailwind.css → src/tailwind.css} +0 -0
- /package/lib/generators/add-frontend/{templates → frameworks/tailwindui}/tailwind.config.ts.template +0 -0
- /package/lib/generators/add-frontend/{generator.spec.d.ts → generator.test.d.ts} +0 -0
- /package/src/generators/add-frontend/frameworks/antui/{context.tsx.template → src/context.tsx.template} +0 -0
- /package/src/generators/add-frontend/frameworks/chakraui/{context.tsx.template → src/context.tsx.template} +0 -0
- /package/src/generators/add-frontend/frameworks/chakraui/{entry.client.tsx.template → src/entry.client.tsx.template} +0 -0
- /package/src/generators/add-frontend/frameworks/chakraui/{entry.server.tsx.template → src/entry.server.tsx.template} +0 -0
- /package/src/generators/add-frontend/frameworks/chakraui/{root.tsx.template → src/root.tsx.template} +0 -0
- /package/src/generators/add-frontend/frameworks/tailwindui/{entry.client.tsx.template → src/entry.client.tsx.template} +0 -0
- /package/src/generators/add-frontend/frameworks/tailwindui/{entry.server.tsx.template → src/entry.server.tsx.template} +0 -0
- /package/src/generators/add-frontend/frameworks/tailwindui/{root.tsx.template → src/root.tsx.template} +0 -0
- /package/src/generators/add-frontend/frameworks/tailwindui/{tailwind.css → src/tailwind.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
## [8.0.1-alpha.2](https://github.com/cdmbase/common-stack/compare/v8.0.1-alpha.1...v8.0.1-alpha.2) (2025-02-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
9
|
+
|
|
10
|
+
## [8.0.1-alpha.1](https://github.com/cdmbase/common-stack/compare/v8.0.1-alpha.0...v8.0.1-alpha.1) (2025-02-07)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
13
|
+
|
|
6
14
|
## [8.0.1-alpha.0](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.0...v8.0.1-alpha.0) (2025-02-07)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @common-stack/generate-plugin
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sample-stack-frontend-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"resolutions": {
|
|
6
|
+
"common": "link:./common"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@admin-layout/ant-design-pro": "10.0.2-alpha.4",
|
|
10
|
+
"@ant-design/static-style-extract": "^1.0.3",
|
|
11
|
+
"@chakra-ui/react": "^2.8.0",
|
|
12
|
+
"@emotion/css": "^11.13.5",
|
|
13
|
+
"@emotion/react": "^11.14.0",
|
|
14
|
+
"@emotion/server": "^11.11.0",
|
|
15
|
+
"@emotion/styled": "^11.14.0",
|
|
16
|
+
"antd": "^5.23.4",
|
|
17
|
+
"autoprefixer": "^10.4.20",
|
|
18
|
+
"framer-motion": "^12.4.1",
|
|
19
|
+
"postcss": "^8.5.1",
|
|
20
|
+
"tailwindcss": "^4.0.4"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"body-parser": "*"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var name = "sample-stack-frontend-server";
|
|
2
|
+
var version = "1.0.0";
|
|
3
|
+
var resolutions = {
|
|
4
|
+
common: "link:./common"
|
|
5
|
+
};
|
|
6
|
+
var dependencies = {
|
|
7
|
+
"@admin-layout/ant-design-pro": "10.0.2-alpha.4",
|
|
8
|
+
"@ant-design/static-style-extract": "^1.0.3",
|
|
9
|
+
"@chakra-ui/react": "^2.8.0",
|
|
10
|
+
"@emotion/css": "^11.13.5",
|
|
11
|
+
"@emotion/react": "^11.14.0",
|
|
12
|
+
"@emotion/server": "^11.11.0",
|
|
13
|
+
"@emotion/styled": "^11.14.0",
|
|
14
|
+
antd: "^5.23.4",
|
|
15
|
+
autoprefixer: "^10.4.20",
|
|
16
|
+
"framer-motion": "^12.4.1",
|
|
17
|
+
postcss: "^8.5.1",
|
|
18
|
+
tailwindcss: "^4.0.4"
|
|
19
|
+
};
|
|
20
|
+
var devDependencies = {
|
|
21
|
+
};
|
|
22
|
+
var peerDependencies = {
|
|
23
|
+
"body-parser": "*"
|
|
24
|
+
};
|
|
25
|
+
var pluginPkg = {
|
|
26
|
+
name: name,
|
|
27
|
+
version: version,
|
|
28
|
+
"private": true,
|
|
29
|
+
resolutions: resolutions,
|
|
30
|
+
dependencies: dependencies,
|
|
31
|
+
devDependencies: devDependencies,
|
|
32
|
+
peerDependencies: peerDependencies
|
|
33
|
+
};exports.default=pluginPkg;exports.dependencies=dependencies;exports.devDependencies=devDependencies;exports.name=name;exports.peerDependencies=peerDependencies;exports.resolutions=resolutions;exports.version=version;//# sourceMappingURL=package.json.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var name = "sample-stack-frontend-server";
|
|
2
|
+
var version = "1.0.0";
|
|
3
|
+
var resolutions = {
|
|
4
|
+
common: "link:./common"
|
|
5
|
+
};
|
|
6
|
+
var dependencies = {
|
|
7
|
+
"@admin-layout/ant-design-pro": "10.0.2-alpha.4",
|
|
8
|
+
"@ant-design/static-style-extract": "^1.0.3",
|
|
9
|
+
"@chakra-ui/react": "^2.8.0",
|
|
10
|
+
"@emotion/css": "^11.13.5",
|
|
11
|
+
"@emotion/react": "^11.14.0",
|
|
12
|
+
"@emotion/server": "^11.11.0",
|
|
13
|
+
"@emotion/styled": "^11.14.0",
|
|
14
|
+
antd: "^5.23.4",
|
|
15
|
+
autoprefixer: "^10.4.20",
|
|
16
|
+
"framer-motion": "^12.4.1",
|
|
17
|
+
postcss: "^8.5.1",
|
|
18
|
+
tailwindcss: "^4.0.4"
|
|
19
|
+
};
|
|
20
|
+
var devDependencies = {
|
|
21
|
+
};
|
|
22
|
+
var peerDependencies = {
|
|
23
|
+
"body-parser": "*"
|
|
24
|
+
};
|
|
25
|
+
var pluginPkg = {
|
|
26
|
+
name: name,
|
|
27
|
+
version: version,
|
|
28
|
+
"private": true,
|
|
29
|
+
resolutions: resolutions,
|
|
30
|
+
dependencies: dependencies,
|
|
31
|
+
devDependencies: devDependencies,
|
|
32
|
+
peerDependencies: peerDependencies
|
|
33
|
+
};export{pluginPkg as default,dependencies,devDependencies,name,peerDependencies,resolutions,version};//# sourceMappingURL=package.json.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@apollo/client": "^3.9.0",
|
|
66
66
|
"@babel/runtime": "^7.20.1",
|
|
67
|
-
"@common-stack/server-stack": "
|
|
68
|
-
"@remix-run/node": "~2.
|
|
67
|
+
"@common-stack/server-stack": "8.0.1-alpha.0",
|
|
68
|
+
"@remix-run/node": "~2.15.3",
|
|
69
69
|
"lodash": "^4.17.15",
|
|
70
70
|
"react": "18.2.0"
|
|
71
71
|
},
|
|
@@ -13,8 +13,6 @@ import { ApolloProvider } from '@apollo/client/index.js';
|
|
|
13
13
|
import { SlotFillProvider, removeUniversalPortals } from '@common-stack/components-pro';
|
|
14
14
|
import { InversifyProvider } from '@common-stack/client-react';
|
|
15
15
|
import { Provider as ReduxProvider } from 'react-redux';
|
|
16
|
-
// import { PersistGate } from 'redux-persist/integration/react';
|
|
17
|
-
// import { persistStore } from 'redux-persist';
|
|
18
16
|
import { CacheProvider } from '@emotion/react';
|
|
19
17
|
import i18next from 'i18next';
|
|
20
18
|
import { I18nextProvider, initReactI18next } from 'react-i18next';
|
|
@@ -36,7 +34,6 @@ import { LocaleContext } from './context';
|
|
|
36
34
|
|
|
37
35
|
const { apolloClient: client, container, serviceFunc } = createClientContainer();
|
|
38
36
|
const { store } = createReduxStore(client, serviceFunc(), container);
|
|
39
|
-
// const persistor = persistStore(store);
|
|
40
37
|
const antCache = createCache();
|
|
41
38
|
const cache = createEmotionCache();
|
|
42
39
|
|
|
@@ -27,6 +27,7 @@ import Backend from 'i18next-fs-backend';
|
|
|
27
27
|
import { resolve } from 'node:path';
|
|
28
28
|
// @ts-ignore
|
|
29
29
|
import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
|
|
30
|
+
// @ts-ignore
|
|
30
31
|
import config from '@app/cde-webconfig.json';
|
|
31
32
|
// @ts-ignore
|
|
32
33
|
import createEmotionCache from '@app/frontend-stack-react/entries/common/createEmotionCache';
|
package/lib/generators/add-frontend/frameworks/antui/{root.tsx.template → src/root.tsx.template}
RENAMED
|
@@ -11,19 +11,9 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
|
|
|
11
11
|
import { useChangeLanguage } from 'remix-i18next/react';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
13
|
// @ts-ignore
|
|
14
|
-
import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
|
|
15
|
-
// @ts-ignore
|
|
16
14
|
import { ErrorBoundary } from '@app/frontend-stack-react/entries/antui/components/ErrorBoundary';
|
|
17
15
|
import { LocaleContext } from './context';
|
|
18
|
-
|
|
19
|
-
export const loader = async ({ request }) => {
|
|
20
|
-
const locale = await i18next.getLocale(request);
|
|
21
|
-
return json({
|
|
22
|
-
__ENV__: publicEnv,
|
|
23
|
-
locale,
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
*/
|
|
16
|
+
|
|
27
17
|
export const handle = {
|
|
28
18
|
i18n: 'common',
|
|
29
19
|
};
|
|
@@ -1,5 +1,61 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var tslib=require('tslib'),devkit=require('@nx/devkit'),path=require('path'),setupConfig_cjs=require('@common-stack/rollup-vite-utils/lib/utils/setupConfig.cjs'),index=require('../../utils/index.cjs'),constants=require('../../common/constants.cjs');function _interopNamespaceDefault(e){var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var path__namespace=/*#__PURE__*/_interopNamespaceDefault(path);const DEFAULT_FRAMEWORK = constants.FRAMEWORK_ANTUI;
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var tslib=require('tslib'),devkit=require('@nx/devkit'),path=require('path'),setupConfig_cjs=require('@common-stack/rollup-vite-utils/lib/utils/setupConfig.cjs'),index=require('../../utils/index.cjs'),constants=require('../../common/constants.cjs'),_package=require('../../common/package-releases/package.json.cjs');function _interopNamespaceDefault(e){var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var path__namespace=/*#__PURE__*/_interopNamespaceDefault(path);const DEFAULT_FRAMEWORK = constants.FRAMEWORK_ANTUI;
|
|
2
2
|
const DEFAULT_SERVER_NAME = 'frontend-server';
|
|
3
|
+
/**
|
|
4
|
+
* Helper to retrieve a package version from pluginPkg.
|
|
5
|
+
* Throws an error if a version for packageName is not defined.
|
|
6
|
+
*/
|
|
7
|
+
function getPackageVersion(packageName) {
|
|
8
|
+
// Read the generator's package.json. This file is updated using ncu,
|
|
9
|
+
// so the generator always picks up the latest dependency versions.
|
|
10
|
+
// const pluginPkgPath = path.resolve(__dirname, '../../common/package-releases/package.json');
|
|
11
|
+
// const pluginPkg = JSON.parse(fs.readFileSync(pluginPkgPath, 'utf-8'));
|
|
12
|
+
const version = (_package.default.dependencies && _package.default.dependencies[packageName]) ||
|
|
13
|
+
(_package.default.devDependencies && _package.default.devDependencies[packageName]);
|
|
14
|
+
if (!version) {
|
|
15
|
+
throw new Error(`Version for package "${packageName}" not found in plugin package.json.`);
|
|
16
|
+
}
|
|
17
|
+
return version;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Helper to map an array of dependency names to an object where each key is a dependency
|
|
21
|
+
* and its value is obtained via getPackageVersion().
|
|
22
|
+
*/
|
|
23
|
+
function mapDependencies(depNames) {
|
|
24
|
+
return depNames.reduce((acc, name) => {
|
|
25
|
+
acc[name] = getPackageVersion(name);
|
|
26
|
+
return acc;
|
|
27
|
+
}, {});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A mapping of frameworks to dependency definitions.
|
|
31
|
+
* Each dependency's version is obtained dynamically from pluginPkg using a helper.
|
|
32
|
+
*/
|
|
33
|
+
const frameworkDependencyMap = {
|
|
34
|
+
[constants.FRAMEWORK_ANTUI]: {
|
|
35
|
+
dependencies: mapDependencies([
|
|
36
|
+
'@admin-layout/ant-design-pro',
|
|
37
|
+
'@ant-design/static-style-extract',
|
|
38
|
+
'@emotion/react',
|
|
39
|
+
'@emotion/server',
|
|
40
|
+
'@emotion/css',
|
|
41
|
+
'@emotion/styled',
|
|
42
|
+
'antd',
|
|
43
|
+
]),
|
|
44
|
+
},
|
|
45
|
+
[constants.FRAMEWORK_CHAKRAUI]: {
|
|
46
|
+
dependencies: mapDependencies([
|
|
47
|
+
'@chakra-ui/react',
|
|
48
|
+
'framer-motion',
|
|
49
|
+
'@emotion/react',
|
|
50
|
+
'@emotion/server',
|
|
51
|
+
'@emotion/css',
|
|
52
|
+
'@emotion/styled',
|
|
53
|
+
]),
|
|
54
|
+
},
|
|
55
|
+
[constants.FRAMEWORK_TAILWINDUI]: {
|
|
56
|
+
devDependencies: mapDependencies(['tailwindcss', 'postcss', 'autoprefixer']),
|
|
57
|
+
},
|
|
58
|
+
};
|
|
3
59
|
function addFrontendGenerator(tree, options) {
|
|
4
60
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
5
61
|
const projectName = index.isValid(options.name) ? `frontend-${index.getValid(options.name)}-server` : DEFAULT_SERVER_NAME;
|
|
@@ -12,55 +68,46 @@ const generateFrontend = (tree, options) => tslib.__awaiter(void 0, void 0, void
|
|
|
12
68
|
let projectName = (_a = index.getValid(options.name)) !== null && _a !== void 0 ? _a : DEFAULT_SERVER_NAME;
|
|
13
69
|
const projectRoot = index.isValid(options.directory) ? `${index.getValid(options.directory)}/${projectName}` : projectName;
|
|
14
70
|
projectName = index.isValid(options.ns) ? `${index.getValid(options.ns)}-${projectName}` : projectName;
|
|
15
|
-
const projectSrc = `${projectRoot}/src`;
|
|
16
71
|
const framework = (_b = index.getValid(options.framework)) !== null && _b !== void 0 ? _b : DEFAULT_FRAMEWORK;
|
|
17
72
|
console.log('UI framework specified: ', framework);
|
|
18
|
-
// resetProject(`${basePath}/${projectRoot}`);
|
|
19
|
-
// addProjectConfiguration(tree, framework, {
|
|
20
|
-
// root: projectRoot,
|
|
21
|
-
// projectType: 'library',
|
|
22
|
-
// sourceRoot: projectSrc,
|
|
23
|
-
// targets: {},
|
|
24
|
-
// });
|
|
25
73
|
devkit.generateFiles(tree, path__namespace.join(__dirname, 'templates'), projectRoot, {});
|
|
26
|
-
devkit.generateFiles(tree, path__namespace.join(__dirname, 'frameworks', framework),
|
|
74
|
+
devkit.generateFiles(tree, path__namespace.join(__dirname, 'frameworks', framework), projectRoot, options);
|
|
27
75
|
devkit.updateJson(tree, `${projectRoot}/package.json`, (packageJson) => {
|
|
28
|
-
packageJson
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
else if (framework === constants.FRAMEWORK_CHAKRAUI) {
|
|
39
|
-
packageJson['dependencies']["@chakra-ui/react"] = "^2.8.2";
|
|
40
|
-
packageJson['dependencies']["framer-motion"] = "^11.5.4";
|
|
41
|
-
packageJson['dependencies']["@emotion/react"] = "^11.10.0";
|
|
42
|
-
packageJson['dependencies']["@emotion/server"] = "^11.10.0";
|
|
43
|
-
packageJson['dependencies']["@emotion/css"] = "^11.10.0";
|
|
44
|
-
packageJson['dependencies']["@emotion/styled"] = "^11.10.4";
|
|
76
|
+
packageJson.name = projectName;
|
|
77
|
+
packageJson.dependencies = packageJson.dependencies || {};
|
|
78
|
+
packageJson.devDependencies = packageJson.devDependencies || {};
|
|
79
|
+
const dependencyOverrides = frameworkDependencyMap[framework] || {};
|
|
80
|
+
if (dependencyOverrides.dependencies) {
|
|
81
|
+
Object.entries(dependencyOverrides.dependencies).forEach(([pkg, version]) => {
|
|
82
|
+
if (!packageJson.dependencies[pkg]) {
|
|
83
|
+
packageJson.dependencies[pkg] = version;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
45
86
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
87
|
+
if (dependencyOverrides.devDependencies) {
|
|
88
|
+
Object.entries(dependencyOverrides.devDependencies).forEach(([pkg, version]) => {
|
|
89
|
+
if (!packageJson.devDependencies[pkg]) {
|
|
90
|
+
packageJson.devDependencies[pkg] = version;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
50
93
|
}
|
|
51
94
|
return packageJson;
|
|
52
95
|
});
|
|
53
96
|
devkit.updateJson(tree, `${projectRoot}/config.json`, (configJson) => {
|
|
54
|
-
configJson
|
|
97
|
+
configJson.uiFramework = framework;
|
|
55
98
|
if (framework === constants.FRAMEWORK_ANTUI) {
|
|
56
|
-
configJson
|
|
99
|
+
if (!configJson.modules.includes('@admin-layout/ant-design-pro')) {
|
|
100
|
+
configJson.modules.push('@admin-layout/ant-design-pro');
|
|
101
|
+
}
|
|
57
102
|
}
|
|
58
103
|
else if (framework === constants.FRAMEWORK_CHAKRAUI) {
|
|
59
|
-
configJson
|
|
104
|
+
if (!configJson.modules.includes('@admin-layout/chakra-design-pro')) {
|
|
105
|
+
configJson.modules.push('@admin-layout/chakra-design-pro');
|
|
106
|
+
}
|
|
60
107
|
}
|
|
61
108
|
if (options['config.json']) {
|
|
62
|
-
const
|
|
63
|
-
configJson = setupConfig_cjs.deepMerge(configJson,
|
|
109
|
+
const additionalConfigs = options['config.json'];
|
|
110
|
+
configJson = setupConfig_cjs.deepMerge(configJson, additionalConfigs);
|
|
64
111
|
}
|
|
65
112
|
return configJson;
|
|
66
113
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.cjs","sources":["../../../src/generators/add-frontend/generator.ts"],"sourcesContent":[null],"names":["FRAMEWORK_ANTUI","isValid","getValid","__awaiter","generateFiles","path","updateJson","
|
|
1
|
+
{"version":3,"file":"generator.cjs","sources":["../../../src/generators/add-frontend/generator.ts"],"sourcesContent":[null],"names":["FRAMEWORK_ANTUI","pluginPkg","FRAMEWORK_CHAKRAUI","FRAMEWORK_TAILWINDUI","isValid","getValid","__awaiter","generateFiles","path","updateJson","deepMerge","formatFiles"],"mappings":"guBAYA,MAAM,iBAAiB,GAAGA,yBAAe,CAAC;AAC1C,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAE9C;;;AAGG;AACH,SAAS,iBAAiB,CAAC,WAAmB,EAAA;;;;;AAM1C,IAAA,MAAM,OAAO,GACT,CAACC,gBAAS,CAAC,YAAY,IAAIA,gBAAS,CAAC,YAAY,CAAC,WAAW,CAAC;SAC7DA,gBAAS,CAAC,eAAe,IAAIA,gBAAS,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;IAE1E,IAAI,CAAC,OAAO,EAAE;AACV,QAAA,MAAM,IAAI,KAAK,CAAC,wBAAwB,WAAW,CAAA,mCAAA,CAAqC,CAAC,CAAC;KAC7F;AACD,IAAA,OAAO,OAAO,CAAC;AACnB,CAAC;AAED;;;AAGG;AACH,SAAS,eAAe,CAAC,QAAkB,EAAA;IACvC,OAAO,QAAQ,CAAC,MAAM,CAClB,CAA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C,iCAAiC,CAAC,CAAC;aAC9D;SACJ;AAED,QAAA,IAAI,OAAO,CAAC,aAAa,CAAC,EAAE;AACxB,YAAA,MAAM,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACjD,YAAA,UAAU,GAAGQ,yBAAS,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;SACzD;AAED,QAAA,OAAO,UAAU,CAAC;AACtB,KAAC,CAAC,CAAC;AAEH,IAAA,MAAMC,kBAAW,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1,5 +1,61 @@
|
|
|
1
|
-
import {__awaiter}from'tslib';import {generateFiles,updateJson,formatFiles}from'@nx/devkit';import*as path from'path';import {deepMerge}from'@common-stack/rollup-vite-utils/lib/utils/setupConfig.cjs';import {isValid,getValid}from'../../utils/index.mjs';import {FRAMEWORK_ANTUI,FRAMEWORK_CHAKRAUI,FRAMEWORK_TAILWINDUI}from'../../common/constants.mjs';const DEFAULT_FRAMEWORK = FRAMEWORK_ANTUI;
|
|
1
|
+
import {__awaiter}from'tslib';import {generateFiles,updateJson,formatFiles}from'@nx/devkit';import*as path from'path';import {deepMerge}from'@common-stack/rollup-vite-utils/lib/utils/setupConfig.cjs';import {isValid,getValid}from'../../utils/index.mjs';import {FRAMEWORK_ANTUI,FRAMEWORK_CHAKRAUI,FRAMEWORK_TAILWINDUI}from'../../common/constants.mjs';import pluginPkg from'../../common/package-releases/package.json.mjs';const DEFAULT_FRAMEWORK = FRAMEWORK_ANTUI;
|
|
2
2
|
const DEFAULT_SERVER_NAME = 'frontend-server';
|
|
3
|
+
/**
|
|
4
|
+
* Helper to retrieve a package version from pluginPkg.
|
|
5
|
+
* Throws an error if a version for packageName is not defined.
|
|
6
|
+
*/
|
|
7
|
+
function getPackageVersion(packageName) {
|
|
8
|
+
// Read the generator's package.json. This file is updated using ncu,
|
|
9
|
+
// so the generator always picks up the latest dependency versions.
|
|
10
|
+
// const pluginPkgPath = path.resolve(__dirname, '../../common/package-releases/package.json');
|
|
11
|
+
// const pluginPkg = JSON.parse(fs.readFileSync(pluginPkgPath, 'utf-8'));
|
|
12
|
+
const version = (pluginPkg.dependencies && pluginPkg.dependencies[packageName]) ||
|
|
13
|
+
(pluginPkg.devDependencies && pluginPkg.devDependencies[packageName]);
|
|
14
|
+
if (!version) {
|
|
15
|
+
throw new Error(`Version for package "${packageName}" not found in plugin package.json.`);
|
|
16
|
+
}
|
|
17
|
+
return version;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Helper to map an array of dependency names to an object where each key is a dependency
|
|
21
|
+
* and its value is obtained via getPackageVersion().
|
|
22
|
+
*/
|
|
23
|
+
function mapDependencies(depNames) {
|
|
24
|
+
return depNames.reduce((acc, name) => {
|
|
25
|
+
acc[name] = getPackageVersion(name);
|
|
26
|
+
return acc;
|
|
27
|
+
}, {});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A mapping of frameworks to dependency definitions.
|
|
31
|
+
* Each dependency's version is obtained dynamically from pluginPkg using a helper.
|
|
32
|
+
*/
|
|
33
|
+
const frameworkDependencyMap = {
|
|
34
|
+
[FRAMEWORK_ANTUI]: {
|
|
35
|
+
dependencies: mapDependencies([
|
|
36
|
+
'@admin-layout/ant-design-pro',
|
|
37
|
+
'@ant-design/static-style-extract',
|
|
38
|
+
'@emotion/react',
|
|
39
|
+
'@emotion/server',
|
|
40
|
+
'@emotion/css',
|
|
41
|
+
'@emotion/styled',
|
|
42
|
+
'antd',
|
|
43
|
+
]),
|
|
44
|
+
},
|
|
45
|
+
[FRAMEWORK_CHAKRAUI]: {
|
|
46
|
+
dependencies: mapDependencies([
|
|
47
|
+
'@chakra-ui/react',
|
|
48
|
+
'framer-motion',
|
|
49
|
+
'@emotion/react',
|
|
50
|
+
'@emotion/server',
|
|
51
|
+
'@emotion/css',
|
|
52
|
+
'@emotion/styled',
|
|
53
|
+
]),
|
|
54
|
+
},
|
|
55
|
+
[FRAMEWORK_TAILWINDUI]: {
|
|
56
|
+
devDependencies: mapDependencies(['tailwindcss', 'postcss', 'autoprefixer']),
|
|
57
|
+
},
|
|
58
|
+
};
|
|
3
59
|
function addFrontendGenerator(tree, options) {
|
|
4
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5
61
|
const projectName = isValid(options.name) ? `frontend-${getValid(options.name)}-server` : DEFAULT_SERVER_NAME;
|
|
@@ -12,55 +68,46 @@ const generateFrontend = (tree, options) => __awaiter(void 0, void 0, void 0, fu
|
|
|
12
68
|
let projectName = (_a = getValid(options.name)) !== null && _a !== void 0 ? _a : DEFAULT_SERVER_NAME;
|
|
13
69
|
const projectRoot = isValid(options.directory) ? `${getValid(options.directory)}/${projectName}` : projectName;
|
|
14
70
|
projectName = isValid(options.ns) ? `${getValid(options.ns)}-${projectName}` : projectName;
|
|
15
|
-
const projectSrc = `${projectRoot}/src`;
|
|
16
71
|
const framework = (_b = getValid(options.framework)) !== null && _b !== void 0 ? _b : DEFAULT_FRAMEWORK;
|
|
17
72
|
console.log('UI framework specified: ', framework);
|
|
18
|
-
// resetProject(`${basePath}/${projectRoot}`);
|
|
19
|
-
// addProjectConfiguration(tree, framework, {
|
|
20
|
-
// root: projectRoot,
|
|
21
|
-
// projectType: 'library',
|
|
22
|
-
// sourceRoot: projectSrc,
|
|
23
|
-
// targets: {},
|
|
24
|
-
// });
|
|
25
73
|
generateFiles(tree, path.join(__dirname, 'templates'), projectRoot, {});
|
|
26
|
-
generateFiles(tree, path.join(__dirname, 'frameworks', framework),
|
|
74
|
+
generateFiles(tree, path.join(__dirname, 'frameworks', framework), projectRoot, options);
|
|
27
75
|
updateJson(tree, `${projectRoot}/package.json`, (packageJson) => {
|
|
28
|
-
packageJson
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
else if (framework === FRAMEWORK_CHAKRAUI) {
|
|
39
|
-
packageJson['dependencies']["@chakra-ui/react"] = "^2.8.2";
|
|
40
|
-
packageJson['dependencies']["framer-motion"] = "^11.5.4";
|
|
41
|
-
packageJson['dependencies']["@emotion/react"] = "^11.10.0";
|
|
42
|
-
packageJson['dependencies']["@emotion/server"] = "^11.10.0";
|
|
43
|
-
packageJson['dependencies']["@emotion/css"] = "^11.10.0";
|
|
44
|
-
packageJson['dependencies']["@emotion/styled"] = "^11.10.4";
|
|
76
|
+
packageJson.name = projectName;
|
|
77
|
+
packageJson.dependencies = packageJson.dependencies || {};
|
|
78
|
+
packageJson.devDependencies = packageJson.devDependencies || {};
|
|
79
|
+
const dependencyOverrides = frameworkDependencyMap[framework] || {};
|
|
80
|
+
if (dependencyOverrides.dependencies) {
|
|
81
|
+
Object.entries(dependencyOverrides.dependencies).forEach(([pkg, version]) => {
|
|
82
|
+
if (!packageJson.dependencies[pkg]) {
|
|
83
|
+
packageJson.dependencies[pkg] = version;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
45
86
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
87
|
+
if (dependencyOverrides.devDependencies) {
|
|
88
|
+
Object.entries(dependencyOverrides.devDependencies).forEach(([pkg, version]) => {
|
|
89
|
+
if (!packageJson.devDependencies[pkg]) {
|
|
90
|
+
packageJson.devDependencies[pkg] = version;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
50
93
|
}
|
|
51
94
|
return packageJson;
|
|
52
95
|
});
|
|
53
96
|
updateJson(tree, `${projectRoot}/config.json`, (configJson) => {
|
|
54
|
-
configJson
|
|
97
|
+
configJson.uiFramework = framework;
|
|
55
98
|
if (framework === FRAMEWORK_ANTUI) {
|
|
56
|
-
configJson
|
|
99
|
+
if (!configJson.modules.includes('@admin-layout/ant-design-pro')) {
|
|
100
|
+
configJson.modules.push('@admin-layout/ant-design-pro');
|
|
101
|
+
}
|
|
57
102
|
}
|
|
58
103
|
else if (framework === FRAMEWORK_CHAKRAUI) {
|
|
59
|
-
configJson
|
|
104
|
+
if (!configJson.modules.includes('@admin-layout/chakra-design-pro')) {
|
|
105
|
+
configJson.modules.push('@admin-layout/chakra-design-pro');
|
|
106
|
+
}
|
|
60
107
|
}
|
|
61
108
|
if (options['config.json']) {
|
|
62
|
-
const
|
|
63
|
-
configJson = deepMerge(configJson,
|
|
109
|
+
const additionalConfigs = options['config.json'];
|
|
110
|
+
configJson = deepMerge(configJson, additionalConfigs);
|
|
64
111
|
}
|
|
65
112
|
return configJson;
|
|
66
113
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.mjs","sources":["../../../src/generators/add-frontend/generator.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.mjs","sources":["../../../src/generators/add-frontend/generator.ts"],"sourcesContent":[null],"names":[],"mappings":"oaAYA,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAC1C,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAE9C;;;AAGG;AACH,SAAS,iBAAiB,CAAC,WAAmB,EAAA;;;;;AAM1C,IAAA,MAAM,OAAO,GACT,CAAC,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,YAAY,CAAC,WAAW,CAAC;SAC7D,SAAS,CAAC,eAAe,IAAI,SAAS,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;IAE1E,IAAI,CAAC,OAAO,EAAE;AACV,QAAA,MAAM,IAAI,KAAK,CAAC,wBAAwB,WAAW,CAAA,mCAAA,CAAqC,CAAC,CAAC;KAC7F;AACD,IAAA,OAAO,OAAO,CAAC;AACnB,CAAC;AAED;;;AAGG;AACH,SAAS,eAAe,CAAC,QAAkB,EAAA;IACvC,OAAO,QAAQ,CAAC,MAAM,CAClB,CAAC,GAAG,EAAE,IAAI,KAAI;QACV,GAAG,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACpC,QAAA,OAAO,GAAG,CAAC;KACd,EACD,EAA4B,CA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AAS,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;SACzD;AAED,QAAA,OAAO,UAAU,CAAC;AACtB,KAAC,CAAC,CAAC;AAEH,IAAA,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"common": "link:./common"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@common-stack/frontend-stack-react": "
|
|
59
|
+
"@common-stack/frontend-stack-react": "8.0.1-alpha.0",
|
|
60
60
|
"@react-icons/all-files": "^4.1.0",
|
|
61
61
|
"classnames": "^2.2.6",
|
|
62
62
|
"compression": "^1.7.4",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
|
|
84
|
-
"@common-stack/rollup-vite-utils": "
|
|
85
|
-
"@remix-run/dev": "~2.
|
|
86
|
-
"@remix-run/serve": "~2.
|
|
84
|
+
"@common-stack/rollup-vite-utils": "8.0.1-alpha.1",
|
|
85
|
+
"@remix-run/dev": "~2.15.3",
|
|
86
|
+
"@remix-run/serve": "~2.15.3",
|
|
87
87
|
"cross-env": "^7.0.3",
|
|
88
88
|
"dotenv-esm": "^16.0.3-4",
|
|
89
89
|
"pm2": "^5.2.2",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"URI": "URI",
|
|
16
16
|
"URIInput": "URI | UriComponents"
|
|
17
17
|
},
|
|
18
|
+
"enumPrefix": false,
|
|
18
19
|
"enumValues": {
|
|
19
20
|
"ConfigurationScope": "@workbench-stack/core/lib/interfaces/configuration/configuration.js#ConfigurationScope",
|
|
20
21
|
"ConfigurationTarget": "../configuration#ConfigurationTarget"
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"URI": "URI",
|
|
48
49
|
"URIInput": "URI | UriComponents"
|
|
49
50
|
},
|
|
51
|
+
"enumPrefix": false,
|
|
50
52
|
"withHooks": true,
|
|
51
53
|
"typesPrefix": "I",
|
|
52
54
|
"noNamespaces": true,
|
|
@@ -67,6 +69,21 @@
|
|
|
67
69
|
},
|
|
68
70
|
"typescript-react-apollo"
|
|
69
71
|
]
|
|
72
|
+
},
|
|
73
|
+
"packages/common/src/generated/introspection-result.ts": {
|
|
74
|
+
"schema": "%discoveredSchemas%",
|
|
75
|
+
"documents": "%discoveredDocuments%",
|
|
76
|
+
"config": {
|
|
77
|
+
"typesPrefix": "I"
|
|
78
|
+
},
|
|
79
|
+
"plugins": [
|
|
80
|
+
{
|
|
81
|
+
"add": {
|
|
82
|
+
"content": ["/* tslint:disable */"]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"fragment-matcher"
|
|
86
|
+
]
|
|
70
87
|
}
|
|
71
88
|
}
|
|
72
89
|
}
|
|
@@ -149,20 +149,20 @@
|
|
|
149
149
|
"@babel/preset-typescript": "^7.18.6",
|
|
150
150
|
"@babel/register": "^7.18.9",
|
|
151
151
|
"@babel/runtime": "^7.20.1",
|
|
152
|
-
"@common-stack/env-list-loader": "
|
|
153
|
-
"@common-stack/generate-plugin": "
|
|
154
|
-
"@common-stack/rollup-vite-utils": "
|
|
152
|
+
"@common-stack/env-list-loader": "8.0.1-alpha.0",
|
|
153
|
+
"@common-stack/generate-plugin": "8.0.1-alpha.1",
|
|
154
|
+
"@common-stack/rollup-vite-utils": "8.0.1-alpha.1",
|
|
155
155
|
"@emotion/babel-plugin": "^11.11.0",
|
|
156
|
-
"@graphql-codegen/add": "^5.0.
|
|
157
|
-
"@graphql-codegen/cli": "^5.0.
|
|
158
|
-
"@graphql-codegen/fragment-matcher": "^5.0
|
|
156
|
+
"@graphql-codegen/add": "^5.0.3",
|
|
157
|
+
"@graphql-codegen/cli": "^5.0.4",
|
|
158
|
+
"@graphql-codegen/fragment-matcher": "^5.1.0",
|
|
159
159
|
"@graphql-codegen/import-types-preset": "^3.0.0",
|
|
160
160
|
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
|
|
161
|
-
"@graphql-codegen/typescript": "^4.
|
|
161
|
+
"@graphql-codegen/typescript": "^4.1.3",
|
|
162
162
|
"@graphql-codegen/typescript-graphql-files-modules": "^3.0.0",
|
|
163
|
-
"@graphql-codegen/typescript-operations": "^4.
|
|
164
|
-
"@graphql-codegen/typescript-react-apollo": "^4.3.
|
|
165
|
-
"@graphql-codegen/typescript-resolvers": "^4.
|
|
163
|
+
"@graphql-codegen/typescript-operations": "^4.4.1",
|
|
164
|
+
"@graphql-codegen/typescript-react-apollo": "^4.3.2",
|
|
165
|
+
"@graphql-codegen/typescript-resolvers": "^4.4.2",
|
|
166
166
|
"@loadable/babel-plugin": "^5.13.2",
|
|
167
167
|
"@loadable/webpack-plugin": "^5.15.2",
|
|
168
168
|
"@nx-aws-plugin/nx-aws-cache": "^3.2.2",
|