@common-stack/generate-plugin 6.0.2-alpha.7 → 6.0.2-alpha.9

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 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
+ ## [6.0.2-alpha.9](https://github.com/cdmbase/common-stack/compare/v6.0.2-alpha.8...v6.0.2-alpha.9) (2024-08-23)
7
+
8
+ **Note:** Version bump only for package @common-stack/generate-plugin
9
+
10
+ ## [6.0.2-alpha.8](https://github.com/cdmbase/common-stack/compare/v6.0.2-alpha.7...v6.0.2-alpha.8) (2024-08-23)
11
+
12
+ **Note:** Version bump only for package @common-stack/generate-plugin
13
+
6
14
  ## [6.0.2-alpha.7](https://github.com/cdmbase/common-stack/compare/v6.0.2-alpha.6...v6.0.2-alpha.7) (2024-08-23)
7
15
 
8
16
  **Note:** Version bump only for package @common-stack/generate-plugin
@@ -1,4 +1,4 @@
1
- import React, { useState, startTransition, StrictMode } from 'react';
1
+ import React, { useState, startTransition, StrictMode, useMemo, createContext, useContext } from 'react';
2
2
  import 'reflect-metadata';
3
3
  import { RemixBrowser } from '@remix-run/react';
4
4
  import { hydrateRoot } from 'react-dom/client';
@@ -27,7 +27,8 @@ import Backend from 'i18next-http-backend';
27
27
  import { getInitialNamespaces } from 'remix-i18next/client';
28
28
  import config from '@app/cde-webconfig.json';
29
29
  // @ts-ignore
30
- import { ClientStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
30
+ // import { ClientStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
31
+ import { ClientStyleContext } from './context';
31
32
 
32
33
  const { apolloClient: client, container, serviceFunc } = createClientContainer();
33
34
  const { store } = createReduxStore(client, serviceFunc(), container);
@@ -40,16 +41,21 @@ interface ClientCacheProviderProps {
40
41
  children: React.ReactNode;
41
42
  }
42
43
 
44
+ export function useClientStyleContext() {
45
+ return useContext(ClientStyleContext);
46
+ }
47
+
43
48
  function ClientCacheProvider({ children }: ClientCacheProviderProps) {
44
- const [cache, setCache] = useState(defaultCache);
49
+ const [count, setCount] = useState(0);
50
+ const defaultCache = useMemo(() => createEmotionCache(), [count]);
45
51
 
46
- function reset() {
47
- setCache(createEmotionCache());
48
- }
52
+ const reset = () => {
53
+ setCount((prev) => prev + 1);
54
+ };
49
55
 
50
56
  return (
51
57
  <ClientStyleContext.Provider value={{ reset }}>
52
- <CacheProvider value={cache}>{children}</CacheProvider>
58
+ <CacheProvider value={defaultCache}>{children}</CacheProvider>
53
59
  </ClientStyleContext.Provider>
54
60
  );
55
61
  }
@@ -75,23 +81,23 @@ async function hydrate() {
75
81
  }
76
82
  hydrateRoot(
77
83
  document.getElementById('root')!,
78
- <StrictMode>
79
- <I18nextProvider i18n={i18next}>
80
- <ClientCacheProvider>
81
- <ApolloProvider client={client}>
82
- <ReduxProvider store={store}>
83
- <SlotFillProvider>
84
- <InversifyProvider container={container} modules={clientModules}>
85
- <PersistGate loading={null} persistor={persistor}>
86
- {() => <RemixBrowser />}
87
- </PersistGate>
88
- </InversifyProvider>
89
- </SlotFillProvider>
90
- </ReduxProvider>
91
- </ApolloProvider>
92
- </ClientCacheProvider>
93
- </I18nextProvider>
94
- </StrictMode>,
84
+ // <StrictMode>
85
+ <I18nextProvider i18n={i18next}>
86
+ <ClientCacheProvider>
87
+ <ApolloProvider client={client}>
88
+ <ReduxProvider store={store}>
89
+ <SlotFillProvider>
90
+ <InversifyProvider container={container} modules={clientModules}>
91
+ <PersistGate loading={null} persistor={persistor}>
92
+ {() => <RemixBrowser />}
93
+ </PersistGate>
94
+ </InversifyProvider>
95
+ </SlotFillProvider>
96
+ </ReduxProvider>
97
+ </ApolloProvider>
98
+ </ClientCacheProvider>
99
+ </I18nextProvider>,
100
+ // </StrictMode>,
95
101
  );
96
102
  // });
97
103
  }
@@ -36,8 +36,10 @@ import config from '@app/cde-webconfig.json';
36
36
 
37
37
  import { Head } from './root';
38
38
  import type { IAppLoadContext } from '@common-stack/client-core';
39
- import { ServerStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
39
+ // import { ServerStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
40
+ import { ServerStyleContext } from './context';
40
41
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
42
+
41
43
  const { extractCriticalToChunks } = createEmotionServer(defaultCache);
42
44
 
43
45
  const ABORT_DELAY = 5000;
@@ -124,12 +126,7 @@ async function handleBrowserRequest(
124
126
  // And here we detect what namespaces the routes about to render want to use
125
127
  const ns = i18next.getRouteNamespaces(remixContext);
126
128
  const slotFillContext = { fills: {} };
127
- const {
128
- modules: clientModules,
129
- container,
130
- apolloClient: client,
131
- store,
132
- }: IAppLoadContext = loadContext;
129
+ const { modules: clientModules, container, apolloClient: client, store }: IAppLoadContext = loadContext;
133
130
 
134
131
  // First, we create a new instance of i18next so every request will have a
135
132
  // completely unique instance and not share any state.
@@ -145,7 +142,7 @@ async function handleBrowserRequest(
145
142
  lng, // The locale we detected above
146
143
  ns, // The namespaces the routes about to render want to use
147
144
  backend: {
148
- loadPath: resolve(config.i18n.backend.loadServerPath),
145
+ loadPath: config.i18n.backend.loadServerPath,
149
146
  },
150
147
  });
151
148
  }
@@ -79,8 +79,8 @@ export function shouldRevalidate(params: any) {
79
79
  }
80
80
 
81
81
  export default function App() {
82
- let { locale } = useLoaderData();
83
-
82
+ // const { locale } = useLoaderData();
83
+ const locale = 'en';
84
84
  useChangeLanguage(locale);
85
85
 
86
86
  React.useEffect(() => {
@@ -94,4 +94,4 @@ export default function App() {
94
94
  );
95
95
  }
96
96
 
97
- export { ErrorBoundary };
97
+ export { ErrorBoundary };
@@ -1,5 +1,5 @@
1
1
  # The official nodejs docker image
2
- FROM node:18.20-bullseye
2
+ FROM node:20:16-bullseye
3
3
  ENV PYTHON /usr/bin/python
4
4
 
5
5
  # Copy package.json only to temp folder, install its dependencies,
@@ -17,13 +17,13 @@
17
17
  "main": "index.js",
18
18
  "scripts": {
19
19
  "prebuild": "yarn build:clean && yarn genconfig",
20
- "build": "cross-env SSR=true NODE_OPTIONS='--max_old_space_size=6096' NODE_ENV=production remix vite:build",
20
+ "build": "cross-env SSR=true NODE_OPTIONS='--max_old_space_size=4096' NODE_ENV=production remix vite:build",
21
21
  "build:SSR": "cross-env SSR=true NODE_ENV=production remix vite:build",
22
22
  "build:clean": "rimraf dist build node_modules/.vite",
23
23
  "build:debug": "cross-env DEBUGGING=true NODE_ENV=production remix vite:build",
24
24
  "build:debug:verbose": "yarn build:debug -- -v",
25
25
  "build:dev": "cross-env ENV_FILE=../../config/development/dev.env yarn build",
26
- "build:devSSR": "cross-env SSR=true NODE_ENV=development ENV_FILE=../../config/development/dev.env NODE_OPTIONS='--max_old_space_size=6096' remix vite:build",
26
+ "build:devSSR": "cross-env SSR=true NODE_ENV=development ENV_FILE=../../config/development/dev.env yarn build",
27
27
  "build:stats": "cross-env BUNDLE_STATS=true yarn build:debug",
28
28
  "dev:vite:ssr": "cross-env SSR=true NODE_ENV=development ENV_FILE=../../config/development/dev.env node ./server.js",
29
29
  "docker:build": "cross-env yarn build && docker build . -t $npm_package_name:$npm_package_version",
@@ -52,23 +52,6 @@
52
52
  "watch:test": "cross-env ENV_FILE=../../config/test/test.env node ./server.js"
53
53
  },
54
54
  "dependencies": {
55
- "@admin-layout/assets": "8.5.3-alpha.0",
56
- "@admin-layout/icons": "8.5.3-alpha.0",
57
- "@adminide-stack/account-api-browser": "8.5.2-alpha.0",
58
- "@adminide-stack/billing-api-browser": "8.5.2-alpha.0",
59
- "@adminide-stack/core": "8.5.2-alpha.0",
60
- "@adminide-stack/extension-api": "8.5.2-alpha.0",
61
- "@adminide-stack/extension-module-browser": "8.5.2-alpha.0",
62
- "@adminide-stack/git-api-browser": "8.5.2-alpha.0",
63
- "@adminide-stack/integration-api-client": "8.5.2-alpha.0",
64
- "@adminide-stack/marketplace-module-browser": "8.5.2-alpha.0",
65
- "@adminide-stack/platform-browser": "8.5.2-alpha.0",
66
- "@adminide-stack/project-mgmt-browser": "8.5.2-alpha.0",
67
- "@adminide-stack/react-shared-components": "8.5.2-alpha.0",
68
- "@adminide-stack/registry-api-browser": "8.5.2-alpha.0",
69
- "@adminide-stack/user-auth0-browser": "8.5.2-alpha.0",
70
- "@adminide-stack/user-auth0-server": "8.5.2-alpha.0",
71
- "@container-stack/territory": "5.1.2",
72
55
  "@emotion/react": "^11.10.4",
73
56
  "@emotion/server": "^11.10.0",
74
57
  "@files-stack/core": "3.0.2",
@@ -81,7 +64,6 @@
81
64
  "isomorphic-fetch": "^2.2.1",
82
65
  "lodash": "^4.17.15",
83
66
  "lodash-es": "^4.17.21",
84
- "minimatch": "^5.0.0",
85
67
  "moment": "2.29.1",
86
68
  "ramda": "^0.29.1",
87
69
  "react-ga4": "^2.1.0",
@@ -63,12 +63,18 @@ if (isBrowser) {
63
63
  process[lowerCase('env')] = env; // to avoid webpack to replace `process` with actual value.
64
64
  process.APP_ENV = env;
65
65
  window.process = process;
66
+ // @ts-ignore
66
67
  window.__CLIENT__ = true;
68
+ // @ts-ignore
67
69
  window.__SERVER__ = false;
68
70
  } else {
71
+ // @ts-ignore
69
72
  global.__CLIENT__ = false;
73
+ // @ts-ignore
70
74
  global.__SERVER__ = true;
75
+ // @ts-ignore
71
76
  __CLIENT__ = false;
77
+ // @ts-ignore
72
78
  __SERVER__ = true;
73
79
  }
74
80
  try {
@@ -30,7 +30,7 @@ pipeline {
30
30
  choice choices: ['auto', 'force'], description: 'Choose merge strategy', name: 'NPM_PUBLISH_STRATEGY'
31
31
  choice choices: ['yarn', 'npm'], description: 'Choose build strategy', name: 'BUILD_STRATEGY'
32
32
  choice choices: ['0.7.9','0.7.7', '0.6.0'], description: 'Choose Idestack chart version', name: 'IDESTACK_CHART_VERSION'
33
- choice choices: ['nodejs18', 'nodejs16', 'nodejs14'], description: 'Choose NodeJS version', name: 'NODEJS_TOOL_VERSION'
33
+ choice choices: ['nodejs20', 'nodejs18', 'nodejs22'], description: 'Choose NodeJS version', name: 'NODEJS_TOOL_VERSION'
34
34
  choice choices: ['buildOnly', 'buildAndTest', 'buildAndPublish', 'mobileBuild', 'mobilePreview', 'mobilePreviewLocal', 'mobilePreviewSubmit', 'mobileProd', 'mobileProdSubmit', 'devDeployOnly', 'stageDeploy', 'stageDeployOnly', 'prodDeploy', 'prodDeployOnly', 'allenv'], description: 'Where to deploy micro services?', name: 'ENV_CHOICE'
35
35
  choice choices: ['all', 'ios', 'android' ], description: 'Mobile type if it is mobile build?', name: 'MOBILE_CHOICE'
36
36
  booleanParam (defaultValue: false, description: 'Skip production release approval', name: 'SKIP_RELEASE_APPROVAL')
@@ -76,7 +76,7 @@
76
76
  "publish:forceManual": "yarn lernapublish --force-publish=*",
77
77
  "publish:push": "yarn prelernapublish && git push origin publish && yarn postlernapublish",
78
78
  "setBranchEnv": "cross-env REPOSITORY_BRANCH=${1:-$REPOSITORY_BRANCH} PUBLISH_BRANCH=${2:-$PUBLISH_BRANCH}",
79
- "sort-packages": "node tools/sortPackageJson.mjs",
79
+ "sort-packages": "node tools/sortPackageJson.mjs && prettier --write package.json **/**/*/package.json **/*/package.json",
80
80
  "start": "cross-env NODE_ENV=development ENV_FILE=../../config/development/dev.env yarn startWeb",
81
81
  "start:SSR": "concurrently --names \"BACKEND,FRONTEND\" -c \"bgBlue.bold,bgMagenta.bold\" \"lerna run --scope='*backend-server' start\" \"lerna run --scope='*frontend-server' start:SSR\"",
82
82
  "start:devSSR": "concurrently --names \"BACKEND,FRONTEND\" -c \"bgBlue.bold,bgMagenta.bold\" \"lerna run --scope='*backend-server' watch\" \"lerna run --scope='*frontend-server' start:devSSR\"",
@@ -1,4 +1,4 @@
1
- FROM node:18.20-alpine
1
+ FROM node:20:16-alpine
2
2
 
3
3
  # Copy package.json only to temp folder, install its dependencies,
4
4
  # set workdir and copy the dependnecies there
@@ -25,33 +25,14 @@
25
25
  "watch": "npm run start:dev"
26
26
  },
27
27
  "dependencies": {
28
- "@casl/ability": "^4.1.5",
29
- "@cdm-logger/client": "^9.0.3",
30
- "@cdm-logger/server": "^9.0.3",
31
28
  "@common-stack/client-core": "6.0.2-alpha.2",
32
29
  "@common-stack/core": "6.0.2-alpha.2",
33
30
  "@common-stack/server-core": "6.0.2-alpha.2",
34
31
  "@common-stack/server-stack": "6.0.2-alpha.2",
35
32
  "@common-stack/store-mongo": "6.0.2-alpha.2",
36
33
  "@container-stack/mailing-api": "5.2.1-alpha.1",
37
- "app-root-path": "^3.0.0",
38
- "body-parser": "^1.19.0",
39
- "cors": "^2.8.5",
40
- "dataloader": "^2.0.0",
41
- "dotenv": "^7.0.0",
42
- "envalid": "~7.2.2",
43
- "esm": "^3.2.25",
44
- "graphql-tools": "^9.0.0",
45
34
  "helmet": "^3.21.2",
46
- "inversify": "^6.0.2",
47
- "ioredis": "^4.14.1",
48
- "lodash": "^4.17.15",
49
- "moleculer": "^0.14.2",
50
- "mongoose": "^6.3.3",
51
- "mongoose-execution-time": "^1.1.0",
52
- "react": "18.0.0",
53
- "redux": "^4.0.1",
54
- "reflect-metadata": "^0.1.13",
35
+ "react": "18.2.0",
55
36
  "rxjs": "^6.5.3",
56
37
  "rxjs-compat": "^6.5.3"
57
38
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/generate-plugin",
3
- "version": "6.0.2-alpha.7",
3
+ "version": "6.0.2-alpha.9",
4
4
  "type": "module",
5
5
  "main": "./lib/index.mjs",
6
6
  "typings": "./lib/index.d.ts",
@@ -26,5 +26,5 @@
26
26
  },
27
27
  "executors": "./executors.json",
28
28
  "generators": "./generators.json",
29
- "gitHead": "38f2f3a7c7ea7574e36d31ce9e4cb71920cfb520"
29
+ "gitHead": "7133e6ce9730e46da43dec91af9691bfa4c4b630"
30
30
  }
@@ -1,4 +1,4 @@
1
- import React, { useState, startTransition, StrictMode } from 'react';
1
+ import React, { useState, startTransition, StrictMode, useMemo, createContext, useContext } from 'react';
2
2
  import 'reflect-metadata';
3
3
  import { RemixBrowser } from '@remix-run/react';
4
4
  import { hydrateRoot } from 'react-dom/client';
@@ -27,7 +27,8 @@ import Backend from 'i18next-http-backend';
27
27
  import { getInitialNamespaces } from 'remix-i18next/client';
28
28
  import config from '@app/cde-webconfig.json';
29
29
  // @ts-ignore
30
- import { ClientStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
30
+ // import { ClientStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
31
+ import { ClientStyleContext } from './context';
31
32
 
32
33
  const { apolloClient: client, container, serviceFunc } = createClientContainer();
33
34
  const { store } = createReduxStore(client, serviceFunc(), container);
@@ -40,16 +41,21 @@ interface ClientCacheProviderProps {
40
41
  children: React.ReactNode;
41
42
  }
42
43
 
44
+ export function useClientStyleContext() {
45
+ return useContext(ClientStyleContext);
46
+ }
47
+
43
48
  function ClientCacheProvider({ children }: ClientCacheProviderProps) {
44
- const [cache, setCache] = useState(defaultCache);
49
+ const [count, setCount] = useState(0);
50
+ const defaultCache = useMemo(() => createEmotionCache(), [count]);
45
51
 
46
- function reset() {
47
- setCache(createEmotionCache());
48
- }
52
+ const reset = () => {
53
+ setCount((prev) => prev + 1);
54
+ };
49
55
 
50
56
  return (
51
57
  <ClientStyleContext.Provider value={{ reset }}>
52
- <CacheProvider value={cache}>{children}</CacheProvider>
58
+ <CacheProvider value={defaultCache}>{children}</CacheProvider>
53
59
  </ClientStyleContext.Provider>
54
60
  );
55
61
  }
@@ -75,23 +81,23 @@ async function hydrate() {
75
81
  }
76
82
  hydrateRoot(
77
83
  document.getElementById('root')!,
78
- <StrictMode>
79
- <I18nextProvider i18n={i18next}>
80
- <ClientCacheProvider>
81
- <ApolloProvider client={client}>
82
- <ReduxProvider store={store}>
83
- <SlotFillProvider>
84
- <InversifyProvider container={container} modules={clientModules}>
85
- <PersistGate loading={null} persistor={persistor}>
86
- {() => <RemixBrowser />}
87
- </PersistGate>
88
- </InversifyProvider>
89
- </SlotFillProvider>
90
- </ReduxProvider>
91
- </ApolloProvider>
92
- </ClientCacheProvider>
93
- </I18nextProvider>
94
- </StrictMode>,
84
+ // <StrictMode>
85
+ <I18nextProvider i18n={i18next}>
86
+ <ClientCacheProvider>
87
+ <ApolloProvider client={client}>
88
+ <ReduxProvider store={store}>
89
+ <SlotFillProvider>
90
+ <InversifyProvider container={container} modules={clientModules}>
91
+ <PersistGate loading={null} persistor={persistor}>
92
+ {() => <RemixBrowser />}
93
+ </PersistGate>
94
+ </InversifyProvider>
95
+ </SlotFillProvider>
96
+ </ReduxProvider>
97
+ </ApolloProvider>
98
+ </ClientCacheProvider>
99
+ </I18nextProvider>,
100
+ // </StrictMode>,
95
101
  );
96
102
  // });
97
103
  }
@@ -36,8 +36,10 @@ import config from '@app/cde-webconfig.json';
36
36
 
37
37
  import { Head } from './root';
38
38
  import type { IAppLoadContext } from '@common-stack/client-core';
39
- import { ServerStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
39
+ // import { ServerStyleContext } from '@app/frontend-stack-react/entries/chakraui/context.js';
40
+ import { ServerStyleContext } from './context';
40
41
  import { i18nextInstance as i18next } from '@app/frontend-stack-react/i18n-localization/i18next.server.js';
42
+
41
43
  const { extractCriticalToChunks } = createEmotionServer(defaultCache);
42
44
 
43
45
  const ABORT_DELAY = 5000;
@@ -124,12 +126,7 @@ async function handleBrowserRequest(
124
126
  // And here we detect what namespaces the routes about to render want to use
125
127
  const ns = i18next.getRouteNamespaces(remixContext);
126
128
  const slotFillContext = { fills: {} };
127
- const {
128
- modules: clientModules,
129
- container,
130
- apolloClient: client,
131
- store,
132
- }: IAppLoadContext = loadContext;
129
+ const { modules: clientModules, container, apolloClient: client, store }: IAppLoadContext = loadContext;
133
130
 
134
131
  // First, we create a new instance of i18next so every request will have a
135
132
  // completely unique instance and not share any state.
@@ -145,7 +142,7 @@ async function handleBrowserRequest(
145
142
  lng, // The locale we detected above
146
143
  ns, // The namespaces the routes about to render want to use
147
144
  backend: {
148
- loadPath: resolve(config.i18n.backend.loadServerPath),
145
+ loadPath: config.i18n.backend.loadServerPath,
149
146
  },
150
147
  });
151
148
  }
@@ -79,8 +79,8 @@ export function shouldRevalidate(params: any) {
79
79
  }
80
80
 
81
81
  export default function App() {
82
- let { locale } = useLoaderData();
83
-
82
+ // const { locale } = useLoaderData();
83
+ const locale = 'en';
84
84
  useChangeLanguage(locale);
85
85
 
86
86
  React.useEffect(() => {
@@ -94,4 +94,4 @@ export default function App() {
94
94
  );
95
95
  }
96
96
 
97
- export { ErrorBoundary };
97
+ export { ErrorBoundary };
@@ -30,7 +30,7 @@ pipeline {
30
30
  choice choices: ['auto', 'force'], description: 'Choose merge strategy', name: 'NPM_PUBLISH_STRATEGY'
31
31
  choice choices: ['yarn', 'npm'], description: 'Choose build strategy', name: 'BUILD_STRATEGY'
32
32
  choice choices: ['0.7.9','0.7.7', '0.6.0'], description: 'Choose Idestack chart version', name: 'IDESTACK_CHART_VERSION'
33
- choice choices: ['nodejs18', 'nodejs16', 'nodejs14'], description: 'Choose NodeJS version', name: 'NODEJS_TOOL_VERSION'
33
+ choice choices: ['nodejs20', 'nodejs18', 'nodejs22'], description: 'Choose NodeJS version', name: 'NODEJS_TOOL_VERSION'
34
34
  choice choices: ['buildOnly', 'buildAndTest', 'buildAndPublish', 'mobileBuild', 'mobilePreview', 'mobilePreviewLocal', 'mobilePreviewSubmit', 'mobileProd', 'mobileProdSubmit', 'devDeployOnly', 'stageDeploy', 'stageDeployOnly', 'prodDeploy', 'prodDeployOnly', 'allenv'], description: 'Where to deploy micro services?', name: 'ENV_CHOICE'
35
35
  choice choices: ['all', 'ios', 'android' ], description: 'Mobile type if it is mobile build?', name: 'MOBILE_CHOICE'
36
36
  booleanParam (defaultValue: false, description: 'Skip production release approval', name: 'SKIP_RELEASE_APPROVAL')
@@ -76,7 +76,7 @@
76
76
  "publish:forceManual": "yarn lernapublish --force-publish=*",
77
77
  "publish:push": "yarn prelernapublish && git push origin publish && yarn postlernapublish",
78
78
  "setBranchEnv": "cross-env REPOSITORY_BRANCH=${1:-$REPOSITORY_BRANCH} PUBLISH_BRANCH=${2:-$PUBLISH_BRANCH}",
79
- "sort-packages": "node tools/sortPackageJson.mjs",
79
+ "sort-packages": "node tools/sortPackageJson.mjs && prettier --write package.json **/**/*/package.json **/*/package.json",
80
80
  "start": "cross-env NODE_ENV=development ENV_FILE=../../config/development/dev.env yarn startWeb",
81
81
  "start:SSR": "concurrently --names \"BACKEND,FRONTEND\" -c \"bgBlue.bold,bgMagenta.bold\" \"lerna run --scope='*backend-server' start\" \"lerna run --scope='*frontend-server' start:SSR\"",
82
82
  "start:devSSR": "concurrently --names \"BACKEND,FRONTEND\" -c \"bgBlue.bold,bgMagenta.bold\" \"lerna run --scope='*backend-server' watch\" \"lerna run --scope='*frontend-server' start:devSSR\"",
@@ -1,4 +1,4 @@
1
- FROM node:18.20-alpine
1
+ FROM node:20:16-alpine
2
2
 
3
3
  # Copy package.json only to temp folder, install its dependencies,
4
4
  # set workdir and copy the dependnecies there
@@ -25,33 +25,14 @@
25
25
  "watch": "npm run start:dev"
26
26
  },
27
27
  "dependencies": {
28
- "@casl/ability": "^4.1.5",
29
- "@cdm-logger/client": "^9.0.3",
30
- "@cdm-logger/server": "^9.0.3",
31
28
  "@common-stack/client-core": "6.0.2-alpha.2",
32
29
  "@common-stack/core": "6.0.2-alpha.2",
33
30
  "@common-stack/server-core": "6.0.2-alpha.2",
34
31
  "@common-stack/server-stack": "6.0.2-alpha.2",
35
32
  "@common-stack/store-mongo": "6.0.2-alpha.2",
36
33
  "@container-stack/mailing-api": "5.2.1-alpha.1",
37
- "app-root-path": "^3.0.0",
38
- "body-parser": "^1.19.0",
39
- "cors": "^2.8.5",
40
- "dataloader": "^2.0.0",
41
- "dotenv": "^7.0.0",
42
- "envalid": "~7.2.2",
43
- "esm": "^3.2.25",
44
- "graphql-tools": "^9.0.0",
45
34
  "helmet": "^3.21.2",
46
- "inversify": "^6.0.2",
47
- "ioredis": "^4.14.1",
48
- "lodash": "^4.17.15",
49
- "moleculer": "^0.14.2",
50
- "mongoose": "^6.3.3",
51
- "mongoose-execution-time": "^1.1.0",
52
- "react": "18.0.0",
53
- "redux": "^4.0.1",
54
- "reflect-metadata": "^0.1.13",
35
+ "react": "18.2.0",
55
36
  "rxjs": "^6.5.3",
56
37
  "rxjs-compat": "^6.5.3"
57
38
  },
@@ -1,491 +0,0 @@
1
- table {
2
- background-color: transparent;
3
- }
4
- caption {
5
- padding-top: 8px;
6
- padding-bottom: 8px;
7
- color: #777777;
8
- text-align: left;
9
- }
10
- th {
11
- text-align: left;
12
- }
13
- .table {
14
- width: 100%;
15
- max-width: 100%;
16
- margin-bottom: 20px;
17
- }
18
- .table > thead > tr > th,
19
- .table > tbody > tr > th,
20
- .table > tfoot > tr > th,
21
- .table > thead > tr > td,
22
- .table > tbody > tr > td,
23
- .table > tfoot > tr > td {
24
- padding: 8px;
25
- line-height: 1.42857143;
26
- vertical-align: top;
27
- border-top: 1px solid #dddddd;
28
- }
29
- .table > thead > tr > th {
30
- vertical-align: bottom;
31
- border-bottom: 2px solid #dddddd;
32
- }
33
- .table > caption + thead > tr:first-child > th,
34
- .table > colgroup + thead > tr:first-child > th,
35
- .table > thead:first-child > tr:first-child > th,
36
- .table > caption + thead > tr:first-child > td,
37
- .table > colgroup + thead > tr:first-child > td,
38
- .table > thead:first-child > tr:first-child > td {
39
- border-top: 0;
40
- }
41
- .table > tbody + tbody {
42
- border-top: 2px solid #dddddd;
43
- }
44
- .table .table {
45
- background-color: #ffffff;
46
- }
47
- .table-condensed > thead > tr > th,
48
- .table-condensed > tbody > tr > th,
49
- .table-condensed > tfoot > tr > th,
50
- .table-condensed > thead > tr > td,
51
- .table-condensed > tbody > tr > td,
52
- .table-condensed > tfoot > tr > td {
53
- padding: 5px;
54
- }
55
- .table-bordered {
56
- border: 1px solid #dddddd;
57
- }
58
- .table-bordered > thead > tr > th,
59
- .table-bordered > tbody > tr > th,
60
- .table-bordered > tfoot > tr > th,
61
- .table-bordered > thead > tr > td,
62
- .table-bordered > tbody > tr > td,
63
- .table-bordered > tfoot > tr > td {
64
- border: 1px solid #dddddd;
65
- }
66
- .table-bordered > thead > tr > th,
67
- .table-bordered > thead > tr > td {
68
- border-bottom-width: 2px;
69
- }
70
- .table-striped > tbody > tr:nth-of-type(odd) {
71
- background-color: #f9f9f9;
72
- }
73
- .table-hover > tbody > tr:hover {
74
- background-color: #f5f5f5;
75
- }
76
- table col[class*="col-"] {
77
- position: static;
78
- float: none;
79
- display: table-column;
80
- }
81
- table td[class*="col-"],
82
- table th[class*="col-"] {
83
- position: static;
84
- float: none;
85
- display: table-cell;
86
- }
87
- .table > thead > tr > td.active,
88
- .table > tbody > tr > td.active,
89
- .table > tfoot > tr > td.active,
90
- .table > thead > tr > th.active,
91
- .table > tbody > tr > th.active,
92
- .table > tfoot > tr > th.active,
93
- .table > thead > tr.active > td,
94
- .table > tbody > tr.active > td,
95
- .table > tfoot > tr.active > td,
96
- .table > thead > tr.active > th,
97
- .table > tbody > tr.active > th,
98
- .table > tfoot > tr.active > th {
99
- background-color: #f5f5f5;
100
- }
101
- .table-hover > tbody > tr > td.active:hover,
102
- .table-hover > tbody > tr > th.active:hover,
103
- .table-hover > tbody > tr.active:hover > td,
104
- .table-hover > tbody > tr:hover > .active,
105
- .table-hover > tbody > tr.active:hover > th {
106
- background-color: #e8e8e8;
107
- }
108
- .table > thead > tr > td.success,
109
- .table > tbody > tr > td.success,
110
- .table > tfoot > tr > td.success,
111
- .table > thead > tr > th.success,
112
- .table > tbody > tr > th.success,
113
- .table > tfoot > tr > th.success,
114
- .table > thead > tr.success > td,
115
- .table > tbody > tr.success > td,
116
- .table > tfoot > tr.success > td,
117
- .table > thead > tr.success > th,
118
- .table > tbody > tr.success > th,
119
- .table > tfoot > tr.success > th {
120
- background-color: #dff0d8;
121
- }
122
- .table-hover > tbody > tr > td.success:hover,
123
- .table-hover > tbody > tr > th.success:hover,
124
- .table-hover > tbody > tr.success:hover > td,
125
- .table-hover > tbody > tr:hover > .success,
126
- .table-hover > tbody > tr.success:hover > th {
127
- background-color: #d0e9c6;
128
- }
129
- .table > thead > tr > td.info,
130
- .table > tbody > tr > td.info,
131
- .table > tfoot > tr > td.info,
132
- .table > thead > tr > th.info,
133
- .table > tbody > tr > th.info,
134
- .table > tfoot > tr > th.info,
135
- .table > thead > tr.info > td,
136
- .table > tbody > tr.info > td,
137
- .table > tfoot > tr.info > td,
138
- .table > thead > tr.info > th,
139
- .table > tbody > tr.info > th,
140
- .table > tfoot > tr.info > th {
141
- background-color: #d9edf7;
142
- }
143
- .table-hover > tbody > tr > td.info:hover,
144
- .table-hover > tbody > tr > th.info:hover,
145
- .table-hover > tbody > tr.info:hover > td,
146
- .table-hover > tbody > tr:hover > .info,
147
- .table-hover > tbody > tr.info:hover > th {
148
- background-color: #c4e3f3;
149
- }
150
- .table > thead > tr > td.warning,
151
- .table > tbody > tr > td.warning,
152
- .table > tfoot > tr > td.warning,
153
- .table > thead > tr > th.warning,
154
- .table > tbody > tr > th.warning,
155
- .table > tfoot > tr > th.warning,
156
- .table > thead > tr.warning > td,
157
- .table > tbody > tr.warning > td,
158
- .table > tfoot > tr.warning > td,
159
- .table > thead > tr.warning > th,
160
- .table > tbody > tr.warning > th,
161
- .table > tfoot > tr.warning > th {
162
- background-color: #fcf8e3;
163
- }
164
- .table-hover > tbody > tr > td.warning:hover,
165
- .table-hover > tbody > tr > th.warning:hover,
166
- .table-hover > tbody > tr.warning:hover > td,
167
- .table-hover > tbody > tr:hover > .warning,
168
- .table-hover > tbody > tr.warning:hover > th {
169
- background-color: #faf2cc;
170
- }
171
- .table > thead > tr > td.danger,
172
- .table > tbody > tr > td.danger,
173
- .table > tfoot > tr > td.danger,
174
- .table > thead > tr > th.danger,
175
- .table > tbody > tr > th.danger,
176
- .table > tfoot > tr > th.danger,
177
- .table > thead > tr.danger > td,
178
- .table > tbody > tr.danger > td,
179
- .table > tfoot > tr.danger > td,
180
- .table > thead > tr.danger > th,
181
- .table > tbody > tr.danger > th,
182
- .table > tfoot > tr.danger > th {
183
- background-color: #f2dede;
184
- }
185
- .table-hover > tbody > tr > td.danger:hover,
186
- .table-hover > tbody > tr > th.danger:hover,
187
- .table-hover > tbody > tr.danger:hover > td,
188
- .table-hover > tbody > tr:hover > .danger,
189
- .table-hover > tbody > tr.danger:hover > th {
190
- background-color: #ebcccc;
191
- }
192
- .table-responsive {
193
- overflow-x: auto;
194
- min-height: 0.01%;
195
- }
196
- @media screen and (max-width: 767px) {
197
- .table-responsive {
198
- width: 100%;
199
- margin-bottom: 15px;
200
- overflow-y: hidden;
201
- -ms-overflow-style: -ms-autohiding-scrollbar;
202
- border: 1px solid #dddddd;
203
- }
204
- .table-responsive > .table {
205
- margin-bottom: 0;
206
- }
207
- .table-responsive > .table > thead > tr > th,
208
- .table-responsive > .table > tbody > tr > th,
209
- .table-responsive > .table > tfoot > tr > th,
210
- .table-responsive > .table > thead > tr > td,
211
- .table-responsive > .table > tbody > tr > td,
212
- .table-responsive > .table > tfoot > tr > td {
213
- white-space: nowrap;
214
- }
215
- .table-responsive > .table-bordered {
216
- border: 0;
217
- }
218
- .table-responsive > .table-bordered > thead > tr > th:first-child,
219
- .table-responsive > .table-bordered > tbody > tr > th:first-child,
220
- .table-responsive > .table-bordered > tfoot > tr > th:first-child,
221
- .table-responsive > .table-bordered > thead > tr > td:first-child,
222
- .table-responsive > .table-bordered > tbody > tr > td:first-child,
223
- .table-responsive > .table-bordered > tfoot > tr > td:first-child {
224
- border-left: 0;
225
- }
226
- .table-responsive > .table-bordered > thead > tr > th:last-child,
227
- .table-responsive > .table-bordered > tbody > tr > th:last-child,
228
- .table-responsive > .table-bordered > tfoot > tr > th:last-child,
229
- .table-responsive > .table-bordered > thead > tr > td:last-child,
230
- .table-responsive > .table-bordered > tbody > tr > td:last-child,
231
- .table-responsive > .table-bordered > tfoot > tr > td:last-child {
232
- border-right: 0;
233
- }
234
- .table-responsive > .table-bordered > tbody > tr:last-child > th,
235
- .table-responsive > .table-bordered > tfoot > tr:last-child > th,
236
- .table-responsive > .table-bordered > tbody > tr:last-child > td,
237
- .table-responsive > .table-bordered > tfoot > tr:last-child > td {
238
- border-bottom: 0;
239
- }
240
- }
241
- .clearfix:before,
242
- .clearfix:after {
243
- content: " ";
244
- display: table;
245
- }
246
- .clearfix:after {
247
- clear: both;
248
- }
249
- .center-block {
250
- display: block;
251
- margin-left: auto;
252
- margin-right: auto;
253
- }
254
- .pull-right {
255
- float: right !important;
256
- }
257
- .pull-left {
258
- float: left !important;
259
- }
260
- .hide {
261
- display: none !important;
262
- }
263
- .show {
264
- display: block !important;
265
- }
266
- .invisible {
267
- visibility: hidden;
268
- }
269
- .text-hide {
270
- font: 0/0 a;
271
- color: transparent;
272
- text-shadow: none;
273
- background-color: transparent;
274
- border: 0;
275
- }
276
- .hidden {
277
- display: none !important;
278
- }
279
- .affix {
280
- position: fixed;
281
- }
282
- @-ms-viewport {
283
- width: device-width;
284
- }
285
- .visible-xs,
286
- .visible-sm,
287
- .visible-md,
288
- .visible-lg {
289
- display: none !important;
290
- }
291
- .visible-xs-block,
292
- .visible-xs-inline,
293
- .visible-xs-inline-block,
294
- .visible-sm-block,
295
- .visible-sm-inline,
296
- .visible-sm-inline-block,
297
- .visible-md-block,
298
- .visible-md-inline,
299
- .visible-md-inline-block,
300
- .visible-lg-block,
301
- .visible-lg-inline,
302
- .visible-lg-inline-block {
303
- display: none !important;
304
- }
305
- @media (max-width: 767px) {
306
- .visible-xs {
307
- display: block !important;
308
- }
309
- table.visible-xs {
310
- display: table !important;
311
- }
312
- tr.visible-xs {
313
- display: table-row !important;
314
- }
315
- th.visible-xs,
316
- td.visible-xs {
317
- display: table-cell !important;
318
- }
319
- }
320
- @media (max-width: 767px) {
321
- .visible-xs-block {
322
- display: block !important;
323
- }
324
- }
325
- @media (max-width: 767px) {
326
- .visible-xs-inline {
327
- display: inline !important;
328
- }
329
- }
330
- @media (max-width: 767px) {
331
- .visible-xs-inline-block {
332
- display: inline-block !important;
333
- }
334
- }
335
- @media (min-width: 768px) and (max-width: 991px) {
336
- .visible-sm {
337
- display: block !important;
338
- }
339
- table.visible-sm {
340
- display: table !important;
341
- }
342
- tr.visible-sm {
343
- display: table-row !important;
344
- }
345
- th.visible-sm,
346
- td.visible-sm {
347
- display: table-cell !important;
348
- }
349
- }
350
- @media (min-width: 768px) and (max-width: 991px) {
351
- .visible-sm-block {
352
- display: block !important;
353
- }
354
- }
355
- @media (min-width: 768px) and (max-width: 991px) {
356
- .visible-sm-inline {
357
- display: inline !important;
358
- }
359
- }
360
- @media (min-width: 768px) and (max-width: 991px) {
361
- .visible-sm-inline-block {
362
- display: inline-block !important;
363
- }
364
- }
365
- @media (min-width: 992px) and (max-width: 1199px) {
366
- .visible-md {
367
- display: block !important;
368
- }
369
- table.visible-md {
370
- display: table !important;
371
- }
372
- tr.visible-md {
373
- display: table-row !important;
374
- }
375
- th.visible-md,
376
- td.visible-md {
377
- display: table-cell !important;
378
- }
379
- }
380
- @media (min-width: 992px) and (max-width: 1199px) {
381
- .visible-md-block {
382
- display: block !important;
383
- }
384
- }
385
- @media (min-width: 992px) and (max-width: 1199px) {
386
- .visible-md-inline {
387
- display: inline !important;
388
- }
389
- }
390
- @media (min-width: 992px) and (max-width: 1199px) {
391
- .visible-md-inline-block {
392
- display: inline-block !important;
393
- }
394
- }
395
- @media (min-width: 1200px) {
396
- .visible-lg {
397
- display: block !important;
398
- }
399
- table.visible-lg {
400
- display: table !important;
401
- }
402
- tr.visible-lg {
403
- display: table-row !important;
404
- }
405
- th.visible-lg,
406
- td.visible-lg {
407
- display: table-cell !important;
408
- }
409
- }
410
- @media (min-width: 1200px) {
411
- .visible-lg-block {
412
- display: block !important;
413
- }
414
- }
415
- @media (min-width: 1200px) {
416
- .visible-lg-inline {
417
- display: inline !important;
418
- }
419
- }
420
- @media (min-width: 1200px) {
421
- .visible-lg-inline-block {
422
- display: inline-block !important;
423
- }
424
- }
425
- @media (max-width: 767px) {
426
- .hidden-xs {
427
- display: none !important;
428
- }
429
- }
430
- @media (min-width: 768px) and (max-width: 991px) {
431
- .hidden-sm {
432
- display: none !important;
433
- }
434
- }
435
- @media (min-width: 992px) and (max-width: 1199px) {
436
- .hidden-md {
437
- display: none !important;
438
- }
439
- }
440
- @media (min-width: 1200px) {
441
- .hidden-lg {
442
- display: none !important;
443
- }
444
- }
445
- .visible-print {
446
- display: none !important;
447
- }
448
- @media print {
449
- .visible-print {
450
- display: block !important;
451
- }
452
- table.visible-print {
453
- display: table !important;
454
- }
455
- tr.visible-print {
456
- display: table-row !important;
457
- }
458
- th.visible-print,
459
- td.visible-print {
460
- display: table-cell !important;
461
- }
462
- }
463
- .visible-print-block {
464
- display: none !important;
465
- }
466
- @media print {
467
- .visible-print-block {
468
- display: block !important;
469
- }
470
- }
471
- .visible-print-inline {
472
- display: none !important;
473
- }
474
- @media print {
475
- .visible-print-inline {
476
- display: inline !important;
477
- }
478
- }
479
- .visible-print-inline-block {
480
- display: none !important;
481
- }
482
- @media print {
483
- .visible-print-inline-block {
484
- display: inline-block !important;
485
- }
486
- }
487
- @media print {
488
- .hidden-print {
489
- display: none !important;
490
- }
491
- }
@@ -1,27 +0,0 @@
1
- const merge = require('merge')
2
- const baseConfig = require('./jest.config.base');
3
- const mongodbConfig = require('./jest.config.mongodb')
4
- module.exports = merge.recursive(
5
- baseConfig,
6
- mongodbConfig,
7
- {
8
- globals: {
9
-
10
- }
11
- }, {
12
- moduleDirectories: [
13
- "node_modules",
14
- "packages/adminide-core",
15
- ],
16
- }
17
- // https://baltuta.eu/posts/typescript-lerna-monorepo-more-tools
18
- // {
19
- // roots: ['<rootDir>'],
20
- // projects: [
21
- // '<rootDir>/packages/ui',
22
- // '<rootDir>/packages/api',
23
- // '<rootDir>/packages/diceroll'
24
- // ],
25
- // }
26
-
27
- );