@common-stack/generate-plugin 7.0.4-alpha.9 → 7.1.1-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.
Files changed (30) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/lib/generators/add-backend/files/package.json +1 -1
  3. package/lib/generators/add-backend/files/src/modules/index.ts.template +2 -0
  4. package/lib/generators/add-backend/files/src/service.ts.template +2 -2
  5. package/lib/generators/add-frontend/frameworks/antui/src/root.tsx.template +37 -2
  6. package/lib/generators/add-frontend/frameworks/chakraui/src/root.tsx.template +38 -7
  7. package/lib/generators/add-frontend/frameworks/tailwindui/src/root.tsx.template +37 -8
  8. package/lib/generators/add-frontend/templates/package.json +2 -2
  9. package/lib/generators/add-fullstack/files/Jenkinsfile +1 -1
  10. package/lib/generators/add-fullstack/files/cdecode-config.json +2 -1
  11. package/lib/generators/add-fullstack/files/package.json +4 -7
  12. package/lib/generators/add-fullstack/files/tsconfig.json +20 -24
  13. package/lib/generators/add-moleculer/files/package.json +5 -5
  14. package/lib/generators/add-package/files/browser/package.json +1 -1
  15. package/lib/generators/add-package/files/server/package.json +3 -3
  16. package/package.json +3 -3
  17. package/src/generators/add-backend/files/package.json +1 -1
  18. package/src/generators/add-backend/files/src/modules/index.ts.template +2 -0
  19. package/src/generators/add-backend/files/src/service.ts.template +2 -2
  20. package/src/generators/add-frontend/frameworks/antui/src/root.tsx.template +37 -2
  21. package/src/generators/add-frontend/frameworks/chakraui/src/root.tsx.template +38 -7
  22. package/src/generators/add-frontend/frameworks/tailwindui/src/root.tsx.template +37 -8
  23. package/src/generators/add-frontend/templates/package.json +2 -2
  24. package/src/generators/add-fullstack/files/Jenkinsfile +1 -1
  25. package/src/generators/add-fullstack/files/cdecode-config.json +2 -1
  26. package/src/generators/add-fullstack/files/package.json +4 -7
  27. package/src/generators/add-fullstack/files/tsconfig.json +20 -24
  28. package/src/generators/add-moleculer/files/package.json +5 -5
  29. package/src/generators/add-package/files/browser/package.json +1 -1
  30. package/src/generators/add-package/files/server/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,128 @@
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
+ ## [7.1.1-alpha.10](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.9...v7.1.1-alpha.10) (2025-04-17)
7
+
8
+ **Note:** Version bump only for package @common-stack/generate-plugin
9
+
10
+ ## [7.1.1-alpha.9](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.8...v7.1.1-alpha.9) (2025-04-17)
11
+
12
+ **Note:** Version bump only for package @common-stack/generate-plugin
13
+
14
+ ## [7.1.1-alpha.8](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.7...v7.1.1-alpha.8) (2025-04-17)
15
+
16
+ **Note:** Version bump only for package @common-stack/generate-plugin
17
+
18
+ ## [7.1.1-alpha.7](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.6...v7.1.1-alpha.7) (2025-04-15)
19
+
20
+ **Note:** Version bump only for package @common-stack/generate-plugin
21
+
22
+ ## [7.1.1-alpha.6](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.5...v7.1.1-alpha.6) (2025-04-15)
23
+
24
+ **Note:** Version bump only for package @common-stack/generate-plugin
25
+
26
+ ## [7.1.1-alpha.5](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.4...v7.1.1-alpha.5) (2025-04-14)
27
+
28
+ **Note:** Version bump only for package @common-stack/generate-plugin
29
+
30
+ ## [7.1.1-alpha.4](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.3...v7.1.1-alpha.4) (2025-04-14)
31
+
32
+ **Note:** Version bump only for package @common-stack/generate-plugin
33
+
34
+ ## [7.1.1-alpha.3](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.2...v7.1.1-alpha.3) (2025-04-13)
35
+
36
+ ### Features
37
+
38
+ - **server-stack:** add subGraph support ([6e5a232](https://github.com/cdmbase/common-stack/commit/6e5a232191b87065d197f090e923218eaa3deb95))
39
+
40
+ ## [7.1.1-alpha.2](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.1...v7.1.1-alpha.2) (2025-04-11)
41
+
42
+ **Note:** Version bump only for package @common-stack/generate-plugin
43
+
44
+ ## [7.1.1-alpha.1](https://github.com/cdmbase/common-stack/compare/v7.1.1-alpha.0...v7.1.1-alpha.1) (2025-04-11)
45
+
46
+ **Note:** Version bump only for package @common-stack/generate-plugin
47
+
48
+ ## [7.1.1-alpha.0](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.28...v7.1.1-alpha.0) (2025-03-31)
49
+
50
+ **Note:** Version bump only for package @common-stack/generate-plugin
51
+
52
+ ## [7.0.4-alpha.28](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.27...v7.0.4-alpha.28) (2025-03-28)
53
+
54
+ **Note:** Version bump only for package @common-stack/generate-plugin
55
+
56
+ ## [7.0.4-alpha.27](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.26...v7.0.4-alpha.27) (2025-03-27)
57
+
58
+ **Note:** Version bump only for package @common-stack/generate-plugin
59
+
60
+ ## [7.0.4-alpha.26](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.25...v7.0.4-alpha.26) (2025-03-25)
61
+
62
+ **Note:** Version bump only for package @common-stack/generate-plugin
63
+
64
+ ## [7.0.4-alpha.25](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.24...v7.0.4-alpha.25) (2025-03-25)
65
+
66
+ **Note:** Version bump only for package @common-stack/generate-plugin
67
+
68
+ ## [7.0.4-alpha.24](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.23...v7.0.4-alpha.24) (2025-03-25)
69
+
70
+ **Note:** Version bump only for package @common-stack/generate-plugin
71
+
72
+ ## [7.0.4-alpha.23](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.22...v7.0.4-alpha.23) (2025-03-24)
73
+
74
+ **Note:** Version bump only for package @common-stack/generate-plugin
75
+
76
+ ## [7.0.4-alpha.22](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.21...v7.0.4-alpha.22) (2025-03-20)
77
+
78
+ **Note:** Version bump only for package @common-stack/generate-plugin
79
+
80
+ ## [7.0.4-alpha.21](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.20...v7.0.4-alpha.21) (2025-03-19)
81
+
82
+ **Note:** Version bump only for package @common-stack/generate-plugin
83
+
84
+ ## [7.0.4-alpha.20](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.19...v7.0.4-alpha.20) (2025-03-15)
85
+
86
+ **Note:** Version bump only for package @common-stack/generate-plugin
87
+
88
+ ## [7.0.4-alpha.19](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.18...v7.0.4-alpha.19) (2025-03-13)
89
+
90
+ **Note:** Version bump only for package @common-stack/generate-plugin
91
+
92
+ ## [7.0.4-alpha.18](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.17...v7.0.4-alpha.18) (2025-03-12)
93
+
94
+ **Note:** Version bump only for package @common-stack/generate-plugin
95
+
96
+ ## [7.0.4-alpha.17](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.16...v7.0.4-alpha.17) (2025-03-12)
97
+
98
+ **Note:** Version bump only for package @common-stack/generate-plugin
99
+
100
+ ## [7.0.4-alpha.16](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.15...v7.0.4-alpha.16) (2025-03-11)
101
+
102
+ **Note:** Version bump only for package @common-stack/generate-plugin
103
+
104
+ ## [7.0.4-alpha.15](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.14...v7.0.4-alpha.15) (2025-03-10)
105
+
106
+ **Note:** Version bump only for package @common-stack/generate-plugin
107
+
108
+ ## [7.0.4-alpha.14](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.13...v7.0.4-alpha.14) (2025-03-10)
109
+
110
+ **Note:** Version bump only for package @common-stack/generate-plugin
111
+
112
+ ## [7.0.4-alpha.13](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.12...v7.0.4-alpha.13) (2025-03-10)
113
+
114
+ **Note:** Version bump only for package @common-stack/generate-plugin
115
+
116
+ ## [7.0.4-alpha.12](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.11...v7.0.4-alpha.12) (2025-03-10)
117
+
118
+ **Note:** Version bump only for package @common-stack/generate-plugin
119
+
120
+ ## [7.0.4-alpha.11](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.10...v7.0.4-alpha.11) (2025-03-09)
121
+
122
+ **Note:** Version bump only for package @common-stack/generate-plugin
123
+
124
+ ## [7.0.4-alpha.10](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.9...v7.0.4-alpha.10) (2025-03-08)
125
+
126
+ **Note:** Version bump only for package @common-stack/generate-plugin
127
+
6
128
  ## [7.0.4-alpha.9](https://github.com/cdmbase/common-stack/compare/v7.0.4-alpha.8...v7.0.4-alpha.9) (2025-03-07)
7
129
 
8
130
  **Note:** Version bump only for package @common-stack/generate-plugin
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "@apollo/client": "^3.9.0",
66
66
  "@babel/runtime": "^7.20.1",
67
- "@common-stack/server-stack": "7.0.4-alpha.7",
67
+ "@common-stack/server-stack": "7.1.1-alpha.9",
68
68
  "@remix-run/node": "~2.10.1",
69
69
  "lodash": "^4.17.15",
70
70
  "react": "18.2.0"
@@ -3,6 +3,8 @@ import modules, { settings } from './module';
3
3
  export default modules;
4
4
  export { settings };
5
5
 
6
+ export const serverConfigurations = {};
7
+
6
8
  // export const updateContainers = (options) => {
7
9
  // if (process.env.NODE_ENV !== 'development') {
8
10
  // options.forEach(el => {
@@ -1,6 +1,6 @@
1
1
  import { logger } from '@cdm-logger/server';
2
2
  import * as url from 'url';
3
- import modules, { settings } from './modules';
3
+ import modules, { settings, serverConfigurations } from './modules';
4
4
  import { MainStackServer } from '@common-stack/server-stack';
5
5
  import { config } from './config';
6
6
 
@@ -10,7 +10,7 @@ export class Service {
10
10
  private app: MainStackServer;
11
11
 
12
12
  public async initialize() {
13
- this.app = new MainStackServer(modules, settings);
13
+ this.app = new MainStackServer(modules, settings, serverConfigurations);
14
14
  await this.app.initialize();
15
15
  }
16
16
 
@@ -1,6 +1,7 @@
1
1
  import 'reflect-metadata';
2
2
  import * as React from 'react';
3
3
  import { Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteLoaderData, useRouteError } from '@remix-run/react';
4
+ import { json } from '@remix-run/node';
4
5
  import { PluginArea } from '@common-stack/client-react';
5
6
  import { subscribeReduxRouter } from '@common-stack/remix-router-redux';
6
7
  import { ApplicationErrorHandler } from '@admin-layout/ant-ui';
@@ -10,10 +11,40 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
10
11
  // @ts-ignore
11
12
  import { useChangeLanguage } from 'remix-i18next/react';
12
13
  import { useTranslation } from 'react-i18next';
14
+ import { LayoutCookieProvider } from '@admin-layout/client';
15
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
16
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
17
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
13
18
  // @ts-ignore
14
19
  import { ErrorBoundary } from '@app/frontend-stack-react/entries/antui/components/ErrorBoundary';
15
20
  import { LocaleContext } from './context';
16
21
 
22
+ export const loader = async ({
23
+ request,
24
+ context,
25
+ params,
26
+ }: {
27
+ request: Request;
28
+ context: IAppLoadContext;
29
+ params: IResourceParams;
30
+ }) => {
31
+ const settingsResponse = await settingsLoaderUtil({ request });
32
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
33
+
34
+ return json(
35
+ {
36
+ settings: settingsResponse?.settings,
37
+ loadedPlugins,
38
+ },
39
+ {
40
+ headers: [
41
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
42
+ ['Set-Cookie', settingsResponse?.setCookie],
43
+ ],
44
+ },
45
+ );
46
+ };
47
+
17
48
  export const handle = {
18
49
  i18n: 'common',
19
50
  };
@@ -77,7 +108,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
77
108
  </head>
78
109
  <body>
79
110
  <PluginArea />
80
- {clientModules.getWrappedRoot(children)}
111
+ <FillRenderProvider>
112
+ {clientModules.getWrappedRoot(children)}
113
+ </FillRenderProvider>
81
114
  <ScrollRestoration />
82
115
  <Scripts />
83
116
  {getConstants()}
@@ -90,7 +123,9 @@ export default function App() {
90
123
  return (
91
124
  <ApplicationErrorHandler plugins={plugins}>
92
125
  <ConfigProvider>
93
- <Outlet />
126
+ <LayoutCookieProvider>
127
+ <Outlet />
128
+ </LayoutCookieProvider>
94
129
  </ConfigProvider>
95
130
  </ApplicationErrorHandler>
96
131
  );
@@ -14,9 +14,41 @@ import { useContext } from 'react';
14
14
  import { ServerStyleContext, ClientStyleContext, LocaleContext } from './context';
15
15
  import { withEmotionCache } from '@emotion/react';
16
16
  import { useChangeLanguage } from 'remix-i18next/react';
17
+ import { LayoutCookieProvider } from '@admin-layout/client';
18
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
19
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
20
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
21
+ // @ts-ignore
17
22
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
23
+ // @ts-ignore
18
24
  import { ErrorBoundary } from '@app/frontend-stack-react/entries/chakraui/components/ErrorBoundary.js';
19
25
 
26
+ export const loader = async ({
27
+ request,
28
+ context,
29
+ params,
30
+ }: {
31
+ request: Request;
32
+ context: IAppLoadContext;
33
+ params: IResourceParams;
34
+ }) => {
35
+ const settingsResponse = await settingsLoaderUtil({ request });
36
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
37
+
38
+ return json(
39
+ {
40
+ settings: settingsResponse?.settings,
41
+ loadedPlugins,
42
+ },
43
+ {
44
+ headers: [
45
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
46
+ ['Set-Cookie', settingsResponse?.setCookie],
47
+ ],
48
+ },
49
+ );
50
+ };
51
+
20
52
  interface DocumentProps {
21
53
  children: React.ReactNode;
22
54
  }
@@ -67,12 +99,7 @@ export const Document = withEmotionCache(({ children }: DocumentProps, emotionCa
67
99
  </>
68
100
  );
69
101
  });
70
- /*
71
- export let loader = async ({ request }) => {
72
- let locale = await i18next.getLocale(request);
73
- return json({ locale });
74
- };
75
- */
102
+
76
103
  export let handle = {
77
104
  i18n: 'common',
78
105
  };
@@ -94,7 +121,11 @@ export default function App() {
94
121
 
95
122
  return (
96
123
  <ApplicationErrorHandler plugins={plugins}>
97
- <Document>{clientModules.getWrappedRoot(<Outlet />)}</Document>
124
+ <Document>
125
+ <FillRenderProvider>
126
+ {clientModules.getWrappedRoot(<LayoutCookieProvider><Outlet /></LayoutCookieProvider>)}
127
+ </FillRenderProvider>
128
+ </Document>
98
129
  </ApplicationErrorHandler>
99
130
  );
100
131
  }
@@ -11,6 +11,10 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
11
11
  // @ts-ignore
12
12
  import { useChangeLanguage } from 'remix-i18next/react';
13
13
  import { useTranslation } from 'react-i18next';
14
+ import { LayoutCookieProvider } from '@admin-layout/client';
15
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
16
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
17
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
14
18
  // @ts-ignore
15
19
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
16
20
  import stylesheet from "./tailwind.css?url";
@@ -19,12 +23,33 @@ export const links: LinksFunction = () => [
19
23
  { rel: "stylesheet", href: stylesheet },
20
24
  ];
21
25
 
22
- export const loader = async ({ request }) => {
26
+ export const loader = async ({
27
+ request,
28
+ context,
29
+ params,
30
+ }: {
31
+ request: Request;
32
+ context: IAppLoadContext;
33
+ params: IResourceParams;
34
+ }) => {
23
35
  const locale = await i18next.getLocale(request);
24
- return json({
25
- __ENV__: publicEnv,
26
- locale,
27
- });
36
+ const settingsResponse = await settingsLoaderUtil({ request });
37
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
38
+
39
+ return json(
40
+ {
41
+ __ENV__: publicEnv,
42
+ locale,
43
+ settings: settingsResponse?.settings,
44
+ loadedPlugins,
45
+ },
46
+ {
47
+ headers: [
48
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
49
+ ['Set-Cookie', settingsResponse?.setCookie],
50
+ ],
51
+ },
52
+ );
28
53
  };
29
54
 
30
55
  export const handle = {
@@ -87,7 +112,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
87
112
  </head>
88
113
  <body>
89
114
  <PluginArea />
90
- {clientModules.getWrappedRoot(children)}
115
+ <FillRenderProvider>
116
+ {clientModules.getWrappedRoot(children)}
117
+ </FillRenderProvider>
91
118
  <ScrollRestoration />
92
119
  <Scripts />
93
120
  {getConstants()}
@@ -109,8 +136,10 @@ const TestComponent = () => {
109
136
 
110
137
  export default function App() {
111
138
  return (
112
- // <Outlet />
113
- <TestComponent />
139
+ <LayoutCookieProvider>
140
+ {/* <Outlet /> */}
141
+ <TestComponent />
142
+ </LayoutCookieProvider>
114
143
  );
115
144
  }
116
145
 
@@ -56,7 +56,7 @@
56
56
  "common": "link:./common"
57
57
  },
58
58
  "dependencies": {
59
- "@common-stack/frontend-stack-react": "7.0.4-alpha.7",
59
+ "@common-stack/frontend-stack-react": "7.1.1-alpha.8",
60
60
  "@react-icons/all-files": "^4.1.0",
61
61
  "classnames": "^2.2.6",
62
62
  "compression": "^1.7.4",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
84
- "@common-stack/rollup-vite-utils": "7.0.4-alpha.8",
84
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.3",
85
85
  "@remix-run/dev": "~2.10.1",
86
86
  "@remix-run/serve": "~2.10.1",
87
87
  "cross-env": "^7.0.3",
@@ -4,7 +4,7 @@ def GIT_BRANCH_NAME=getGitBranchName()
4
4
  pipeline {
5
5
  agent {
6
6
  kubernetes{
7
- label 'new-slave-2cpu-8gb'
7
+ label 'slave-2cpu-8gb'
8
8
  }
9
9
  }
10
10
  parameters {
@@ -37,7 +37,8 @@
37
37
  },
38
38
  "typescript",
39
39
  "typescript-operations",
40
- "typescript-resolvers"
40
+ "typescript-resolvers",
41
+ "typescript-mongodb"
41
42
  ]
42
43
  },
43
44
  "packages/common/src/generated/generated.tsx": {
@@ -92,11 +92,7 @@
92
92
  "posttravis": "yarn lint",
93
93
  "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",
94
94
  "watch": "lerna exec --no-sort --ignore *server --ignore *device --ignore *browser-extension --stream --parallel -- webpack --watch",
95
- "watch-packages": "lerna exec --no-sort --scope @sample-stack/platform* --scope @sample-stack/react-shared-components --scope @sample-stack/core --stream --parallel 'webpack --watch'",
96
- "zen:build": "cross-env NODE_ENV=production zen build",
97
- "zen:exp": "zen exp",
98
- "zen:watch": "zen watch -x",
99
- "zen:watch:debug": "yarn zen:watch -- -v"
95
+ "watch-packages": "lerna exec --no-sort --scope @sample-stack/platform* --scope @sample-stack/react-shared-components --scope @sample-stack/core --stream --parallel 'webpack --watch'"
100
96
  },
101
97
  "resolutions": {
102
98
  "@apollo/client": "^3.9.0",
@@ -145,8 +141,8 @@
145
141
  "@babel/register": "^7.18.9",
146
142
  "@babel/runtime": "^7.20.1",
147
143
  "@common-stack/env-list-loader": "7.0.4-alpha.0",
148
- "@common-stack/generate-plugin": "7.0.4-alpha.8",
149
- "@common-stack/rollup-vite-utils": "7.0.4-alpha.8",
144
+ "@common-stack/generate-plugin": "7.1.1-alpha.9",
145
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.3",
150
146
  "@emotion/babel-plugin": "^11.11.0",
151
147
  "@graphql-codegen/add": "^5.0.3",
152
148
  "@graphql-codegen/cli": "^5.0.4",
@@ -155,6 +151,7 @@
155
151
  "@graphql-codegen/near-operation-file-preset": "^3.0.0",
156
152
  "@graphql-codegen/typescript": "^4.1.3",
157
153
  "@graphql-codegen/typescript-graphql-files-modules": "^3.0.0",
154
+ "@graphql-codegen/typescript-mongodb": "^3.0.0",
158
155
  "@graphql-codegen/typescript-operations": "^4.4.1",
159
156
  "@graphql-codegen/typescript-react-apollo": "^4.3.2",
160
157
  "@graphql-codegen/typescript-resolvers": "^4.4.2",
@@ -1,26 +1,22 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ES2022",
5
- "moduleResolution": "node",
6
- "esModuleInterop": true,
7
- "jsx": "react",
8
- "skipLibCheck": true,
9
- "declaration": true,
10
- "experimentalDecorators": true,
11
- "emitDecoratorMetadata": true,
12
- "preserveConstEnums": true,
13
- "sourceMap": true,
14
- "noImplicitAny": false,
15
- "allowSyntheticDefaultImports": true,
16
- "pretty": true,
17
- "removeComments": false,
18
- "lib": [
19
- "ES2022",
20
- "dom",
21
- "esnext.asynciterable"
22
- ]
23
- },
24
- "include": ["src", "typings/*.d.ts"],
25
- "exclude": ["node_modules"]
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ES2022",
5
+ "moduleResolution": "bundler",
6
+ "esModuleInterop": true,
7
+ "jsx": "react",
8
+ "skipLibCheck": true,
9
+ "declaration": true,
10
+ "experimentalDecorators": true,
11
+ "emitDecoratorMetadata": true,
12
+ "preserveConstEnums": true,
13
+ "sourceMap": true,
14
+ "noImplicitAny": false,
15
+ "allowSyntheticDefaultImports": true,
16
+ "pretty": true,
17
+ "removeComments": false,
18
+ "lib": ["ES2022", "dom", "esnext.asynciterable"]
19
+ },
20
+ "include": ["src", "typings/*.d.ts"],
21
+ "exclude": ["node_modules"]
26
22
  }
@@ -29,11 +29,11 @@
29
29
  "common": "link:./common"
30
30
  },
31
31
  "dependencies": {
32
- "@common-stack/client-core": "7.0.4-alpha.6",
33
- "@common-stack/core": "7.0.4-alpha.6",
34
- "@common-stack/server-core": "7.0.4-alpha.7",
35
- "@common-stack/server-stack": "7.0.4-alpha.7",
36
- "@common-stack/store-mongo": "7.0.4-alpha.6",
32
+ "@common-stack/client-core": "7.1.1-alpha.3",
33
+ "@common-stack/core": "7.0.4-alpha.17",
34
+ "@common-stack/server-core": "7.0.4-alpha.17",
35
+ "@common-stack/server-stack": "7.1.1-alpha.9",
36
+ "@common-stack/store-mongo": "7.1.1-alpha.9",
37
37
  "@container-stack/mailing-api": "5.2.1-alpha.1",
38
38
  "helmet": "^3.21.2",
39
39
  "react": "18.2.0",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@cdm-logger/client": "*",
32
- "@common-stack/client-react": "7.0.4-alpha.6",
32
+ "@common-stack/client-react": "7.1.1-alpha.3",
33
33
  "@remix-run/react": "*",
34
34
  "antd": ">=5.1.6",
35
35
  "lodash": "*",
@@ -62,9 +62,9 @@
62
62
  "peerDependencies": {
63
63
  "@apollo/client": ">=3.0.0",
64
64
  "@cdm-logger/server": ">=9.0.3",
65
- "@common-stack/core": "7.0.4-alpha.6",
66
- "@common-stack/server-core": "7.0.4-alpha.7",
67
- "@common-stack/store-mongo": "7.0.4-alpha.6",
65
+ "@common-stack/core": "7.0.4-alpha.17",
66
+ "@common-stack/server-core": "7.0.4-alpha.17",
67
+ "@common-stack/store-mongo": "7.1.1-alpha.9",
68
68
  "@container-stack/mailing-api": ">=0.0.35-alpha.1",
69
69
  "@vscode-alt/monaco-editor": "^0.21.4",
70
70
  "inversify": "^5.0.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/generate-plugin",
3
- "version": "7.0.4-alpha.9",
3
+ "version": "7.1.1-alpha.10",
4
4
  "type": "module",
5
5
  "main": "./lib/index.mjs",
6
6
  "typings": "./lib/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "watch": "yarn build:lib:watch"
19
19
  },
20
20
  "dependencies": {
21
- "@common-stack/rollup-vite-utils": "7.0.4-alpha.8",
21
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.10",
22
22
  "tslib": "^2.3.0"
23
23
  },
24
24
  "publishConfig": {
@@ -26,5 +26,5 @@
26
26
  },
27
27
  "executors": "./executors.json",
28
28
  "generators": "./generators.json",
29
- "gitHead": "84a0d19ce739995bb9b7073086c89768b0bccc56"
29
+ "gitHead": "d2bc820b7d0f17208bee1e0c90e611b89e5bba10"
30
30
  }
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "@apollo/client": "^3.9.0",
66
66
  "@babel/runtime": "^7.20.1",
67
- "@common-stack/server-stack": "7.0.4-alpha.7",
67
+ "@common-stack/server-stack": "7.1.1-alpha.9",
68
68
  "@remix-run/node": "~2.10.1",
69
69
  "lodash": "^4.17.15",
70
70
  "react": "18.2.0"
@@ -3,6 +3,8 @@ import modules, { settings } from './module';
3
3
  export default modules;
4
4
  export { settings };
5
5
 
6
+ export const serverConfigurations = {};
7
+
6
8
  // export const updateContainers = (options) => {
7
9
  // if (process.env.NODE_ENV !== 'development') {
8
10
  // options.forEach(el => {
@@ -1,6 +1,6 @@
1
1
  import { logger } from '@cdm-logger/server';
2
2
  import * as url from 'url';
3
- import modules, { settings } from './modules';
3
+ import modules, { settings, serverConfigurations } from './modules';
4
4
  import { MainStackServer } from '@common-stack/server-stack';
5
5
  import { config } from './config';
6
6
 
@@ -10,7 +10,7 @@ export class Service {
10
10
  private app: MainStackServer;
11
11
 
12
12
  public async initialize() {
13
- this.app = new MainStackServer(modules, settings);
13
+ this.app = new MainStackServer(modules, settings, serverConfigurations);
14
14
  await this.app.initialize();
15
15
  }
16
16
 
@@ -1,6 +1,7 @@
1
1
  import 'reflect-metadata';
2
2
  import * as React from 'react';
3
3
  import { Links, Meta, Outlet, Scripts, ScrollRestoration, useRouteLoaderData, useRouteError } from '@remix-run/react';
4
+ import { json } from '@remix-run/node';
4
5
  import { PluginArea } from '@common-stack/client-react';
5
6
  import { subscribeReduxRouter } from '@common-stack/remix-router-redux';
6
7
  import { ApplicationErrorHandler } from '@admin-layout/ant-ui';
@@ -10,10 +11,40 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
10
11
  // @ts-ignore
11
12
  import { useChangeLanguage } from 'remix-i18next/react';
12
13
  import { useTranslation } from 'react-i18next';
14
+ import { LayoutCookieProvider } from '@admin-layout/client';
15
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
16
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
17
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
13
18
  // @ts-ignore
14
19
  import { ErrorBoundary } from '@app/frontend-stack-react/entries/antui/components/ErrorBoundary';
15
20
  import { LocaleContext } from './context';
16
21
 
22
+ export const loader = async ({
23
+ request,
24
+ context,
25
+ params,
26
+ }: {
27
+ request: Request;
28
+ context: IAppLoadContext;
29
+ params: IResourceParams;
30
+ }) => {
31
+ const settingsResponse = await settingsLoaderUtil({ request });
32
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
33
+
34
+ return json(
35
+ {
36
+ settings: settingsResponse?.settings,
37
+ loadedPlugins,
38
+ },
39
+ {
40
+ headers: [
41
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
42
+ ['Set-Cookie', settingsResponse?.setCookie],
43
+ ],
44
+ },
45
+ );
46
+ };
47
+
17
48
  export const handle = {
18
49
  i18n: 'common',
19
50
  };
@@ -77,7 +108,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
77
108
  </head>
78
109
  <body>
79
110
  <PluginArea />
80
- {clientModules.getWrappedRoot(children)}
111
+ <FillRenderProvider>
112
+ {clientModules.getWrappedRoot(children)}
113
+ </FillRenderProvider>
81
114
  <ScrollRestoration />
82
115
  <Scripts />
83
116
  {getConstants()}
@@ -90,7 +123,9 @@ export default function App() {
90
123
  return (
91
124
  <ApplicationErrorHandler plugins={plugins}>
92
125
  <ConfigProvider>
93
- <Outlet />
126
+ <LayoutCookieProvider>
127
+ <Outlet />
128
+ </LayoutCookieProvider>
94
129
  </ConfigProvider>
95
130
  </ApplicationErrorHandler>
96
131
  );
@@ -14,9 +14,41 @@ import { useContext } from 'react';
14
14
  import { ServerStyleContext, ClientStyleContext, LocaleContext } from './context';
15
15
  import { withEmotionCache } from '@emotion/react';
16
16
  import { useChangeLanguage } from 'remix-i18next/react';
17
+ import { LayoutCookieProvider } from '@admin-layout/client';
18
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
19
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
20
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
21
+ // @ts-ignore
17
22
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
23
+ // @ts-ignore
18
24
  import { ErrorBoundary } from '@app/frontend-stack-react/entries/chakraui/components/ErrorBoundary.js';
19
25
 
26
+ export const loader = async ({
27
+ request,
28
+ context,
29
+ params,
30
+ }: {
31
+ request: Request;
32
+ context: IAppLoadContext;
33
+ params: IResourceParams;
34
+ }) => {
35
+ const settingsResponse = await settingsLoaderUtil({ request });
36
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
37
+
38
+ return json(
39
+ {
40
+ settings: settingsResponse?.settings,
41
+ loadedPlugins,
42
+ },
43
+ {
44
+ headers: [
45
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
46
+ ['Set-Cookie', settingsResponse?.setCookie],
47
+ ],
48
+ },
49
+ );
50
+ };
51
+
20
52
  interface DocumentProps {
21
53
  children: React.ReactNode;
22
54
  }
@@ -67,12 +99,7 @@ export const Document = withEmotionCache(({ children }: DocumentProps, emotionCa
67
99
  </>
68
100
  );
69
101
  });
70
- /*
71
- export let loader = async ({ request }) => {
72
- let locale = await i18next.getLocale(request);
73
- return json({ locale });
74
- };
75
- */
102
+
76
103
  export let handle = {
77
104
  i18n: 'common',
78
105
  };
@@ -94,7 +121,11 @@ export default function App() {
94
121
 
95
122
  return (
96
123
  <ApplicationErrorHandler plugins={plugins}>
97
- <Document>{clientModules.getWrappedRoot(<Outlet />)}</Document>
124
+ <Document>
125
+ <FillRenderProvider>
126
+ {clientModules.getWrappedRoot(<LayoutCookieProvider><Outlet /></LayoutCookieProvider>)}
127
+ </FillRenderProvider>
128
+ </Document>
98
129
  </ApplicationErrorHandler>
99
130
  );
100
131
  }
@@ -11,6 +11,10 @@ import clientModules, { plugins } from '@app/frontend-stack-react/modules.js';
11
11
  // @ts-ignore
12
12
  import { useChangeLanguage } from 'remix-i18next/react';
13
13
  import { useTranslation } from 'react-i18next';
14
+ import { LayoutCookieProvider } from '@admin-layout/client';
15
+ import { settingsLoaderUtil } from '@admin-layout/client/lib/components/UpdateSettings/UpdateSettings.server';
16
+ import { IAppLoadContext, IResourceParams } from '@common-stack/client-core';
17
+ import { FillRenderProvider, PluginsLoader } from '@common-stack/components-pro';
14
18
  // @ts-ignore
15
19
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
16
20
  import stylesheet from "./tailwind.css?url";
@@ -19,12 +23,33 @@ export const links: LinksFunction = () => [
19
23
  { rel: "stylesheet", href: stylesheet },
20
24
  ];
21
25
 
22
- export const loader = async ({ request }) => {
26
+ export const loader = async ({
27
+ request,
28
+ context,
29
+ params,
30
+ }: {
31
+ request: Request;
32
+ context: IAppLoadContext;
33
+ params: IResourceParams;
34
+ }) => {
23
35
  const locale = await i18next.getLocale(request);
24
- return json({
25
- __ENV__: publicEnv,
26
- locale,
27
- });
36
+ const settingsResponse = await settingsLoaderUtil({ request });
37
+ const loadedPlugins = await PluginsLoader(plugins, { request, context, params });
38
+
39
+ return json(
40
+ {
41
+ __ENV__: publicEnv,
42
+ locale,
43
+ settings: settingsResponse?.settings,
44
+ loadedPlugins,
45
+ },
46
+ {
47
+ headers: [
48
+ ['Cache-Control', 'max-age=300, s-maxage=600'],
49
+ ['Set-Cookie', settingsResponse?.setCookie],
50
+ ],
51
+ },
52
+ );
28
53
  };
29
54
 
30
55
  export const handle = {
@@ -87,7 +112,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
87
112
  </head>
88
113
  <body>
89
114
  <PluginArea />
90
- {clientModules.getWrappedRoot(children)}
115
+ <FillRenderProvider>
116
+ {clientModules.getWrappedRoot(children)}
117
+ </FillRenderProvider>
91
118
  <ScrollRestoration />
92
119
  <Scripts />
93
120
  {getConstants()}
@@ -109,8 +136,10 @@ const TestComponent = () => {
109
136
 
110
137
  export default function App() {
111
138
  return (
112
- // <Outlet />
113
- <TestComponent />
139
+ <LayoutCookieProvider>
140
+ {/* <Outlet /> */}
141
+ <TestComponent />
142
+ </LayoutCookieProvider>
114
143
  );
115
144
  }
116
145
 
@@ -56,7 +56,7 @@
56
56
  "common": "link:./common"
57
57
  },
58
58
  "dependencies": {
59
- "@common-stack/frontend-stack-react": "7.0.4-alpha.7",
59
+ "@common-stack/frontend-stack-react": "7.1.1-alpha.8",
60
60
  "@react-icons/all-files": "^4.1.0",
61
61
  "classnames": "^2.2.6",
62
62
  "compression": "^1.7.4",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
84
- "@common-stack/rollup-vite-utils": "7.0.4-alpha.8",
84
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.3",
85
85
  "@remix-run/dev": "~2.10.1",
86
86
  "@remix-run/serve": "~2.10.1",
87
87
  "cross-env": "^7.0.3",
@@ -4,7 +4,7 @@ def GIT_BRANCH_NAME=getGitBranchName()
4
4
  pipeline {
5
5
  agent {
6
6
  kubernetes{
7
- label 'new-slave-2cpu-8gb'
7
+ label 'slave-2cpu-8gb'
8
8
  }
9
9
  }
10
10
  parameters {
@@ -37,7 +37,8 @@
37
37
  },
38
38
  "typescript",
39
39
  "typescript-operations",
40
- "typescript-resolvers"
40
+ "typescript-resolvers",
41
+ "typescript-mongodb"
41
42
  ]
42
43
  },
43
44
  "packages/common/src/generated/generated.tsx": {
@@ -92,11 +92,7 @@
92
92
  "posttravis": "yarn lint",
93
93
  "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",
94
94
  "watch": "lerna exec --no-sort --ignore *server --ignore *device --ignore *browser-extension --stream --parallel -- webpack --watch",
95
- "watch-packages": "lerna exec --no-sort --scope @sample-stack/platform* --scope @sample-stack/react-shared-components --scope @sample-stack/core --stream --parallel 'webpack --watch'",
96
- "zen:build": "cross-env NODE_ENV=production zen build",
97
- "zen:exp": "zen exp",
98
- "zen:watch": "zen watch -x",
99
- "zen:watch:debug": "yarn zen:watch -- -v"
95
+ "watch-packages": "lerna exec --no-sort --scope @sample-stack/platform* --scope @sample-stack/react-shared-components --scope @sample-stack/core --stream --parallel 'webpack --watch'"
100
96
  },
101
97
  "resolutions": {
102
98
  "@apollo/client": "^3.9.0",
@@ -145,8 +141,8 @@
145
141
  "@babel/register": "^7.18.9",
146
142
  "@babel/runtime": "^7.20.1",
147
143
  "@common-stack/env-list-loader": "7.0.4-alpha.0",
148
- "@common-stack/generate-plugin": "7.0.4-alpha.8",
149
- "@common-stack/rollup-vite-utils": "7.0.4-alpha.8",
144
+ "@common-stack/generate-plugin": "7.1.1-alpha.9",
145
+ "@common-stack/rollup-vite-utils": "7.1.1-alpha.3",
150
146
  "@emotion/babel-plugin": "^11.11.0",
151
147
  "@graphql-codegen/add": "^5.0.3",
152
148
  "@graphql-codegen/cli": "^5.0.4",
@@ -155,6 +151,7 @@
155
151
  "@graphql-codegen/near-operation-file-preset": "^3.0.0",
156
152
  "@graphql-codegen/typescript": "^4.1.3",
157
153
  "@graphql-codegen/typescript-graphql-files-modules": "^3.0.0",
154
+ "@graphql-codegen/typescript-mongodb": "^3.0.0",
158
155
  "@graphql-codegen/typescript-operations": "^4.4.1",
159
156
  "@graphql-codegen/typescript-react-apollo": "^4.3.2",
160
157
  "@graphql-codegen/typescript-resolvers": "^4.4.2",
@@ -1,26 +1,22 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ES2022",
5
- "moduleResolution": "node",
6
- "esModuleInterop": true,
7
- "jsx": "react",
8
- "skipLibCheck": true,
9
- "declaration": true,
10
- "experimentalDecorators": true,
11
- "emitDecoratorMetadata": true,
12
- "preserveConstEnums": true,
13
- "sourceMap": true,
14
- "noImplicitAny": false,
15
- "allowSyntheticDefaultImports": true,
16
- "pretty": true,
17
- "removeComments": false,
18
- "lib": [
19
- "ES2022",
20
- "dom",
21
- "esnext.asynciterable"
22
- ]
23
- },
24
- "include": ["src", "typings/*.d.ts"],
25
- "exclude": ["node_modules"]
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ES2022",
5
+ "moduleResolution": "bundler",
6
+ "esModuleInterop": true,
7
+ "jsx": "react",
8
+ "skipLibCheck": true,
9
+ "declaration": true,
10
+ "experimentalDecorators": true,
11
+ "emitDecoratorMetadata": true,
12
+ "preserveConstEnums": true,
13
+ "sourceMap": true,
14
+ "noImplicitAny": false,
15
+ "allowSyntheticDefaultImports": true,
16
+ "pretty": true,
17
+ "removeComments": false,
18
+ "lib": ["ES2022", "dom", "esnext.asynciterable"]
19
+ },
20
+ "include": ["src", "typings/*.d.ts"],
21
+ "exclude": ["node_modules"]
26
22
  }
@@ -29,11 +29,11 @@
29
29
  "common": "link:./common"
30
30
  },
31
31
  "dependencies": {
32
- "@common-stack/client-core": "7.0.4-alpha.6",
33
- "@common-stack/core": "7.0.4-alpha.6",
34
- "@common-stack/server-core": "7.0.4-alpha.7",
35
- "@common-stack/server-stack": "7.0.4-alpha.7",
36
- "@common-stack/store-mongo": "7.0.4-alpha.6",
32
+ "@common-stack/client-core": "7.1.1-alpha.3",
33
+ "@common-stack/core": "7.0.4-alpha.17",
34
+ "@common-stack/server-core": "7.0.4-alpha.17",
35
+ "@common-stack/server-stack": "7.1.1-alpha.9",
36
+ "@common-stack/store-mongo": "7.1.1-alpha.9",
37
37
  "@container-stack/mailing-api": "5.2.1-alpha.1",
38
38
  "helmet": "^3.21.2",
39
39
  "react": "18.2.0",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@cdm-logger/client": "*",
32
- "@common-stack/client-react": "7.0.4-alpha.6",
32
+ "@common-stack/client-react": "7.1.1-alpha.3",
33
33
  "@remix-run/react": "*",
34
34
  "antd": ">=5.1.6",
35
35
  "lodash": "*",
@@ -62,9 +62,9 @@
62
62
  "peerDependencies": {
63
63
  "@apollo/client": ">=3.0.0",
64
64
  "@cdm-logger/server": ">=9.0.3",
65
- "@common-stack/core": "7.0.4-alpha.6",
66
- "@common-stack/server-core": "7.0.4-alpha.7",
67
- "@common-stack/store-mongo": "7.0.4-alpha.6",
65
+ "@common-stack/core": "7.0.4-alpha.17",
66
+ "@common-stack/server-core": "7.0.4-alpha.17",
67
+ "@common-stack/store-mongo": "7.1.1-alpha.9",
68
68
  "@container-stack/mailing-api": ">=0.0.35-alpha.1",
69
69
  "@vscode-alt/monaco-editor": "^0.21.4",
70
70
  "inversify": "^5.0.1",