@common-stack/generate-plugin 8.0.2-alpha.0 → 8.2.1-alpha.0

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 (46) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/LICENSE +34 -21
  3. package/lib/generators/add-backend/files/package.json +2 -2
  4. package/lib/generators/add-backend/files/src/modules/index.ts.template +2 -0
  5. package/lib/generators/add-backend/files/src/service.ts.template +2 -2
  6. package/lib/generators/add-frontend/frameworks/antui/src/root.tsx.template +37 -2
  7. package/lib/generators/add-frontend/frameworks/chakraui/src/root.tsx.template +38 -7
  8. package/lib/generators/add-frontend/frameworks/tailwindui/src/root.tsx.template +37 -8
  9. package/lib/generators/add-frontend/templates/package.json +3 -3
  10. package/lib/generators/add-fullstack/files/Jenkinsfile +1 -1
  11. package/lib/generators/add-fullstack/files/_prettierignore +7 -0
  12. package/lib/generators/add-fullstack/files/cdecode-config.json +6 -2
  13. package/lib/generators/add-fullstack/files/package.json +8 -12
  14. package/lib/generators/add-fullstack/files/scripts/fix-enum-references.js +58 -0
  15. package/lib/generators/add-fullstack/files/tsconfig.json +20 -24
  16. package/lib/generators/add-fullstack/updates/htmlPluginUpdate.cjs +1 -0
  17. package/lib/generators/add-fullstack/updates/htmlPluginUpdate.cjs.map +1 -1
  18. package/lib/generators/add-fullstack/updates/htmlPluginUpdate.mjs +1 -0
  19. package/lib/generators/add-fullstack/updates/htmlPluginUpdate.mjs.map +1 -1
  20. package/lib/generators/add-moleculer/files/package.json +6 -6
  21. package/lib/generators/add-package/files/browser/package.json +2 -2
  22. package/lib/generators/add-package/files/client/package.json +1 -1
  23. package/lib/generators/add-package/files/core/package.json +1 -1
  24. package/lib/generators/add-package/files/server/package.json +4 -4
  25. package/package.json +3 -3
  26. package/src/generators/add-backend/files/package.json +2 -2
  27. package/src/generators/add-backend/files/src/modules/index.ts.template +2 -0
  28. package/src/generators/add-backend/files/src/service.ts.template +2 -2
  29. package/src/generators/add-frontend/frameworks/antui/src/root.tsx.template +37 -2
  30. package/src/generators/add-frontend/frameworks/chakraui/src/root.tsx.template +38 -7
  31. package/src/generators/add-frontend/frameworks/tailwindui/src/root.tsx.template +37 -8
  32. package/src/generators/add-frontend/templates/package.json +3 -3
  33. package/src/generators/add-fullstack/files/Jenkinsfile +1 -1
  34. package/src/generators/add-fullstack/files/_prettierignore +7 -0
  35. package/src/generators/add-fullstack/files/cdecode-config.json +6 -2
  36. package/src/generators/add-fullstack/files/package.json +8 -12
  37. package/src/generators/add-fullstack/files/scripts/fix-enum-references.js +58 -0
  38. package/src/generators/add-fullstack/files/tsconfig.json +20 -24
  39. package/src/generators/add-fullstack/updates/htmlPluginUpdate.ts +2 -1
  40. package/src/generators/add-moleculer/files/package.json +6 -6
  41. package/src/generators/add-package/files/browser/package.json +2 -2
  42. package/src/generators/add-package/files/client/package.json +1 -1
  43. package/src/generators/add-package/files/core/package.json +1 -1
  44. package/src/generators/add-package/files/server/package.json +4 -4
  45. package/lib/generators/add-backend/files/src/api/root-schema.graphqls +0 -109
  46. package/src/generators/add-backend/files/src/api/root-schema.graphqls +0 -109
@@ -3,7 +3,7 @@
3
3
  "version": "0.0.1",
4
4
  "private": true,
5
5
  "description": "",
6
- "license": "ISC",
6
+ "license": "UNLICENSED",
7
7
  "author": "CDMBase LLC",
8
8
  "main": "index.js",
9
9
  "scripts": {
@@ -29,11 +29,11 @@
29
29
  "common": "link:./common"
30
30
  },
31
31
  "dependencies": {
32
- "@common-stack/client-core": "8.0.1-alpha.0",
33
- "@common-stack/core": "8.0.1-alpha.0",
34
- "@common-stack/server-core": "8.0.1-alpha.0",
35
- "@common-stack/server-stack": "8.0.1-alpha.2",
36
- "@common-stack/store-mongo": "8.0.1-alpha.2",
32
+ "@common-stack/client-core": "8.0.2-alpha.0",
33
+ "@common-stack/core": "8.0.2-alpha.0",
34
+ "@common-stack/server-core": "8.0.2-alpha.0",
35
+ "@common-stack/server-stack": "8.0.2-alpha.0",
36
+ "@common-stack/store-mongo": "8.0.2-alpha.0",
37
37
  "@container-stack/mailing-api": "5.2.1-alpha.1",
38
38
  "helmet": "^3.21.2",
39
39
  "react": "18.2.0",
@@ -2,7 +2,7 @@
2
2
  "name": "browser-package",
3
3
  "version": "3.1.1-alpha.6",
4
4
  "description": "Sample core for higher packages to depend on",
5
- "license": "ISC",
5
+ "license": "UNLICENSED",
6
6
  "author": "CDMBase LLC",
7
7
  "type": "module",
8
8
  "main": "lib/index.js",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@cdm-logger/client": "*",
32
- "@common-stack/client-react": "8.0.1-alpha.2",
32
+ "@common-stack/client-react": "8.0.2-alpha.1",
33
33
  "@remix-run/react": "*",
34
34
  "antd": ">=5.1.6",
35
35
  "lodash": "*",
@@ -2,7 +2,7 @@
2
2
  "name": "client-package",
3
3
  "version": "3.1.1-alpha.4",
4
4
  "description": "Sample core for higher packages to depend on",
5
- "license": "ISC",
5
+ "license": "UNLICENSED",
6
6
  "author": "CDMBase LLC",
7
7
  "type": "module",
8
8
  "main": "lib/index.js",
@@ -2,7 +2,7 @@
2
2
  "name": "core-package",
3
3
  "version": "3.1.1-alpha.4",
4
4
  "description": "Workbench core for higher packages to depend on",
5
- "license": "ISC",
5
+ "license": "UNLICENSED",
6
6
  "author": "CDMBase LLC",
7
7
  "type": "module",
8
8
  "main": "lib/index.js",
@@ -2,7 +2,7 @@
2
2
  "name": "server-package",
3
3
  "version": "3.1.1-alpha.5",
4
4
  "description": "Sample core for higher packages to depend on",
5
- "license": "ISC",
5
+ "license": "UNLICENSED",
6
6
  "author": "CDMBase LLC",
7
7
  "type": "module",
8
8
  "main": "lib/index.js",
@@ -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": "8.0.1-alpha.0",
66
- "@common-stack/server-core": "8.0.1-alpha.0",
67
- "@common-stack/store-mongo": "8.0.1-alpha.2",
65
+ "@common-stack/core": "8.0.2-alpha.0",
66
+ "@common-stack/server-core": "8.0.2-alpha.0",
67
+ "@common-stack/store-mongo": "8.0.2-alpha.0",
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": "8.0.2-alpha.0",
3
+ "version": "8.2.1-alpha.0",
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": "8.0.2-alpha.0",
21
+ "@common-stack/rollup-vite-utils": "8.2.1-alpha.0",
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": "d45864ba7429065d7b67e573e909ecf762ffc150"
29
+ "gitHead": "b46db06f987271c3a2e050f081e266d3a01b285b"
30
30
  }
@@ -21,7 +21,7 @@
21
21
  "type": "git",
22
22
  "url": "git+https://github.com/cdmbase/fullstack-pro.git"
23
23
  },
24
- "license": "MIT",
24
+ "license": "UNLICENSED",
25
25
  "author": "CDMBase LLC",
26
26
  "main": "dist/index.js",
27
27
  "typings": "dist/main.d.ts",
@@ -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": "8.0.1-alpha.2",
67
+ "@common-stack/server-stack": "8.0.2-alpha.0",
68
68
  "@remix-run/node": "~2.15.3",
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
 
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/cdmbase/fullstack-pro.git"
13
13
  },
14
- "license": "MIT",
14
+ "license": "UNLICENSED",
15
15
  "author": "CDMBase LLC",
16
16
  "type": "module",
17
17
  "main": "index.js",
@@ -56,7 +56,7 @@
56
56
  "common": "link:./common"
57
57
  },
58
58
  "dependencies": {
59
- "@common-stack/frontend-stack-react": "8.0.1-alpha.3",
59
+ "@common-stack/frontend-stack-react": "8.0.2-alpha.1",
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": "8.0.1-alpha.4",
84
+ "@common-stack/rollup-vite-utils": "8.0.2-alpha.1",
85
85
  "@remix-run/dev": "~2.15.3",
86
86
  "@remix-run/serve": "~2.15.3",
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 {
@@ -0,0 +1,7 @@
1
+ node_modules
2
+ dist
3
+ lib
4
+
5
+ # Generated files
6
+ **/generated/**
7
+ packages/common/src/generated/**
@@ -2,10 +2,13 @@
2
2
  "servers": ["servers/frontend-server/config.json", "servers/backend-server/config.json"],
3
3
  "codegen": {
4
4
  "outputFile": "codegen.ts",
5
- "rootSchema": "servers/backend-server/src/api/root-schema.graphqls",
5
+ "rootSchema": "node_modules/@common-stack/graphql-api/root-schema.graphqls",
6
6
  "fullConfig": {
7
7
  "overwrite": true,
8
8
  "schema": ["$PRIMARY_SCHEMA_PLACEHOLDER$"],
9
+ "hooks": {
10
+ "afterAllFileWrite": ["node scripts/fix-enum-references.js"]
11
+ },
9
12
  "generates": {
10
13
  "packages/common/src/generated/generated-models.ts": {
11
14
  "schema": "%discoveredSchemas%",
@@ -37,7 +40,8 @@
37
40
  },
38
41
  "typescript",
39
42
  "typescript-operations",
40
- "typescript-resolvers"
43
+ "typescript-resolvers",
44
+ "typescript-mongodb"
41
45
  ]
42
46
  },
43
47
  "packages/common/src/generated/generated.tsx": {
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/cdmbase/fullstack-pro.git"
12
12
  },
13
- "license": "MIT",
13
+ "license": "UNLICENSED",
14
14
  "author": {
15
15
  "name": "CDMBase LLC",
16
16
  "email": "none@cdmbase.com"
@@ -96,16 +96,12 @@
96
96
  },
97
97
  "resolutions": {
98
98
  "@apollo/client": "^3.9.0",
99
- "@nx/workspace": "20.4.3",
100
99
  "@types/react": "^18.2.25",
101
100
  "@types/react-dom": "^18.2.7",
102
101
  "common": "link:packages/common",
103
102
  "html-to-text": "^8.0.0",
104
- "nx": "20.4.3",
105
- "react": "18.3.0-canary-c3048aab4-20240326",
106
- "react-dom": "18.3.0-canary-c3048aab4-20240326",
107
- "react-native": "0.72.10",
108
- "react-native-gesture-handler": "~2.12.0"
103
+ "react-native": "~0.76.3",
104
+ "react-native-safe-area-context": "4.12.0"
109
105
  },
110
106
  "dependencies": {
111
107
  "graphql": "^16.0.0",
@@ -141,8 +137,8 @@
141
137
  "@babel/register": "^7.18.9",
142
138
  "@babel/runtime": "^7.20.1",
143
139
  "@common-stack/env-list-loader": "8.0.1-alpha.0",
144
- "@common-stack/generate-plugin": "8.0.1-alpha.5",
145
- "@common-stack/rollup-vite-utils": "8.0.1-alpha.4",
140
+ "@common-stack/generate-plugin": "8.0.2-alpha.1",
141
+ "@common-stack/rollup-vite-utils": "8.0.2-alpha.1",
146
142
  "@emotion/babel-plugin": "^11.11.0",
147
143
  "@graphql-codegen/add": "^5.0.3",
148
144
  "@graphql-codegen/cli": "^5.0.4",
@@ -151,13 +147,13 @@
151
147
  "@graphql-codegen/near-operation-file-preset": "^3.0.0",
152
148
  "@graphql-codegen/typescript": "^4.1.3",
153
149
  "@graphql-codegen/typescript-graphql-files-modules": "^3.0.0",
150
+ "@graphql-codegen/typescript-mongodb": "^3.0.0",
154
151
  "@graphql-codegen/typescript-operations": "^4.4.1",
155
152
  "@graphql-codegen/typescript-react-apollo": "^4.3.2",
156
153
  "@graphql-codegen/typescript-resolvers": "^4.4.2",
157
154
  "@loadable/babel-plugin": "^5.13.2",
158
155
  "@loadable/webpack-plugin": "^5.15.2",
159
156
  "@nx-aws-plugin/nx-aws-cache": "^3.2.2",
160
- "@nx/workspace": "20.4.3",
161
157
  "@redux-devtools/core": "^3.13.1",
162
158
  "@redux-devtools/dock-monitor": "^3.0.1",
163
159
  "@redux-devtools/log-monitor": "^4.0.1",
@@ -167,7 +163,7 @@
167
163
  "@rollup/plugin-image": "^3.0.1",
168
164
  "@rollup/plugin-json": "^6.1.0",
169
165
  "@rollup/plugin-node-resolve": "^15.2.3",
170
- "@rollup/plugin-typescript": "^11.1.5",
166
+ "@rollup/plugin-typescript": "^12.1.4",
171
167
  "@shelf/jest-mongodb": "^4.1.3",
172
168
  "@svgr/webpack": "^6.5.1",
173
169
  "@testing-library/dom": "^10.4.0",
@@ -287,7 +283,7 @@
287
283
  "nock": "^13.2.9",
288
284
  "node-dev": "^7.4.3",
289
285
  "node-hmr-plugin": "^1.0.1",
290
- "nodemon": "^2.0.20",
286
+ "nodemon": "^3.1.10",
291
287
  "nodemon-webpack-plugin": "^4.8.1",
292
288
  "openurl": "^1.1.1",
293
289
  "pm2": "^5.2.2",
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ // File paths to fix
7
+ const filesToFix = [
8
+ path.join(__dirname, '../packages/common/src/generated/generated-models.ts'),
9
+ path.join(__dirname, '../packages/common/src/generated/generated.tsx'),
10
+ ];
11
+
12
+ // Enum mappings - add more mappings here if needed
13
+ const enumMappings = {
14
+ ICacheControlScope: 'CacheControlScope',
15
+ // Add more enum mappings here as needed
16
+ // 'ISomeOtherEnum': 'SomeOtherEnum'
17
+ };
18
+
19
+ function fixEnumReferences(filePath) {
20
+ if (!fs.existsSync(filePath)) {
21
+ console.log(`File not found: ${filePath}`);
22
+ return;
23
+ }
24
+
25
+ let content = fs.readFileSync(filePath, 'utf8');
26
+ let hasChanges = false;
27
+
28
+ // Apply enum reference fixes
29
+ Object.entries(enumMappings).forEach(([incorrectRef, correctRef]) => {
30
+ const regex = new RegExp(`\\b${incorrectRef}\\b`, 'g');
31
+ if (content.includes(incorrectRef)) {
32
+ content = content.replace(regex, correctRef);
33
+ hasChanges = true;
34
+ console.log(`Fixed: ${incorrectRef} -> ${correctRef} in ${path.basename(filePath)}`);
35
+ }
36
+ });
37
+
38
+ if (hasChanges) {
39
+ fs.writeFileSync(filePath, content, 'utf8');
40
+ console.log(`Updated: ${filePath}`);
41
+ } else {
42
+ console.log(`No changes needed in: ${path.basename(filePath)}`);
43
+ }
44
+ }
45
+
46
+ function main() {
47
+ console.log('🔧 Fixing enum references in generated files...');
48
+
49
+ filesToFix.forEach(fixEnumReferences);
50
+
51
+ console.log('✅ Enum reference fix completed!');
52
+ }
53
+
54
+ if (require.main === module) {
55
+ main();
56
+ }
57
+
58
+ module.exports = { fixEnumReferences, enumMappings };
@@ -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
  }
@@ -18,6 +18,7 @@ export function renameDotFiles(tree: Tree, projectRoot: string) {
18
18
  { src: '_browserslistrc', dest: '.browserslistrc' },
19
19
  { src: '_eslintignore', dest: '.eslintignore' },
20
20
  { src: '_eslintrc.js', dest: '.eslintrc.js' },
21
+ { src: '_prettierignore', dest: '.prettierignore' },
21
22
  { src: '_nxignore', dest: '.nxignore' },
22
23
  { src: '_markdownlint.json', dest: '.markdownlint.json' },
23
24
  { src: '_markdownlintignore', dest: '.markdownlintignore' },
@@ -28,7 +29,7 @@ export function renameDotFiles(tree: Tree, projectRoot: string) {
28
29
  dotFiles.forEach(({ src, dest }) => {
29
30
  const srcPath = path.join(projectRoot, src);
30
31
  const destPath = path.join(projectRoot, dest);
31
-
32
+
32
33
  // Check if the source file exists
33
34
  if (tree.exists(srcPath)) {
34
35
  // Read content and write to destination