@common-stack/generate-plugin 6.0.8-alpha.32 → 6.0.8-alpha.34

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.8-alpha.34](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.33...v6.0.8-alpha.34) (2025-01-31)
7
+
8
+ **Note:** Version bump only for package @common-stack/generate-plugin
9
+
10
+ ## [6.0.8-alpha.33](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.32...v6.0.8-alpha.33) (2025-01-31)
11
+
12
+ **Note:** Version bump only for package @common-stack/generate-plugin
13
+
6
14
  ## [6.0.8-alpha.32](https://github.com/cdmbase/common-stack/compare/v6.0.8-alpha.31...v6.0.8-alpha.32) (2025-01-31)
7
15
 
8
16
  **Note:** Version bump only for package @common-stack/generate-plugin
@@ -74,7 +74,7 @@
74
74
  "@common-stack/client-core": "6.0.8-alpha.31",
75
75
  "@common-stack/core": "6.0.8-alpha.31",
76
76
  "@common-stack/server-core": "6.0.8-alpha.31",
77
- "@common-stack/server-stack": "6.0.8-alpha.31",
77
+ "@common-stack/server-stack": "6.0.8-alpha.32",
78
78
  "@common-stack/store-mongo": "6.0.8-alpha.31",
79
79
  "@graphql-tools/links": "~9.0.1",
80
80
  "@graphql-tools/schema": "~10.0.6",
@@ -63,7 +63,7 @@
63
63
  "dependencies": {
64
64
  "@apollo/client": "^3.9.0",
65
65
  "@babel/runtime": "^7.20.1",
66
- "@common-stack/server-stack": "6.0.8-alpha.31",
66
+ "@common-stack/server-stack": "6.0.8-alpha.32",
67
67
  "@remix-run/node": "~2.10.1",
68
68
  "lodash": "^4.17.15",
69
69
  "react": "18.2.0"
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "devDependencies": {
82
82
  "@cdmbase/vite-plugin-i18next-loader": "^2.0.12",
83
- "@common-stack/rollup-vite-utils": "6.0.8-alpha.31",
83
+ "@common-stack/rollup-vite-utils": "6.0.8-alpha.33",
84
84
  "@remix-run/dev": "~2.10.1",
85
85
  "@remix-run/serve": "~2.10.1",
86
86
  "cross-env": "^7.0.3",
@@ -0,0 +1,109 @@
1
+ {
2
+ "servers": ["servers/frontend-server/config.json", "servers/backend-server/config.json"],
3
+ "codegen": {
4
+ "outputFile": "codegen.ts",
5
+ "rootSchema": "servers/backend-server/src/api/root-schema.graphqls",
6
+ "fullConfig": {
7
+ "overwrite": true,
8
+ "schema": ["$PRIMARY_SCHEMA_PLACEHOLDER$"],
9
+ "generates": {
10
+ "packages/common/src/generated/generated-models.ts": {
11
+ "schema": "%discoveredSchemas%",
12
+ "documents": "%discoveredDocuments%",
13
+ "config": {
14
+ "scalars": {
15
+ "URI": "URI",
16
+ "URIInput": "URI | UriComponents"
17
+ },
18
+ "enumValues": {
19
+ "ConfigurationScope": "@workbench-stack/core/lib/interfaces/configuration/configuration.js#ConfigurationScope",
20
+ "ConfigurationTarget": "../configuration#ConfigurationTarget"
21
+ },
22
+ "constEnums": false,
23
+ "contextType": "../apollo-context#MyContext",
24
+ "withHooks": true,
25
+ "typesPrefix": "I",
26
+ "noNamespaces": true,
27
+ "noGraphQLTag": true
28
+ },
29
+ "plugins": [
30
+ {
31
+ "add": {
32
+ "content": [
33
+ "import { URI, UriComponents } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';"
34
+ ]
35
+ }
36
+ },
37
+ "typescript",
38
+ "typescript-operations",
39
+ "typescript-resolvers"
40
+ ]
41
+ },
42
+ "packages/common/src/generated/generated.tsx": {
43
+ "schema": "%discoveredSchemas%",
44
+ "documents": "%discoveredDocuments%",
45
+ "config": {
46
+ "scalars": {
47
+ "URI": "URI",
48
+ "URIInput": "URI | UriComponents"
49
+ },
50
+ "withHooks": true,
51
+ "typesPrefix": "I",
52
+ "noNamespaces": true,
53
+ "noGraphQLTag": true
54
+ },
55
+ "preset": "import-types-preset",
56
+ "presetConfig": {
57
+ "typesPath": "./generated-models",
58
+ "importTypesNamespace": "SchemaTypes"
59
+ },
60
+ "plugins": [
61
+ {
62
+ "add": {
63
+ "content": [
64
+ "import { URI, UriComponents } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';"
65
+ ]
66
+ }
67
+ },
68
+ "typescript-react-apollo"
69
+ ]
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "updateDependencies": {
75
+ "packagesToCheck": [
76
+ "@common-stack/server-stack",
77
+ "@common-stack/frontend-stack-react",
78
+ "@common-stack/mobile-stack-react"
79
+ ],
80
+ "packagePaths": {
81
+ "backend": ["servers/backend-server/package.json"],
82
+ "frontend": ["servers/frontend-server/package.json"],
83
+ "mobile": ["portable-devices/mobile/package.json"]
84
+ }
85
+ },
86
+ "updateDependencyVersion": {
87
+ "roots": ["servers", "portable-devices", "packages", "packages-modules"],
88
+ "ignorePattern": "**/node_modules/**",
89
+ "jsonSpacing": 4,
90
+ "addEndNewLine": true,
91
+ "commitMessage": "Updated packages to use correct versions"
92
+ },
93
+ "sortPackageJson": {
94
+ "directories": [".", "packages", "packages-modules", "servers", "portable-devices"],
95
+ "skipNodeModules": true
96
+ },
97
+ "deployVersionUpdate": {
98
+ "lernaJsonPath": "lerna.json",
99
+ "jenkinsfilePath": "Jenkinsfile",
100
+ "valuesDevYamlPath": "values-dev.yaml",
101
+ "valuesProdYamlPath": "values-prod.yaml"
102
+ },
103
+ "projectPaths": {
104
+ "packages": "packages",
105
+ "packagesModules": "packages-modules",
106
+ "servers": "servers",
107
+ "portableDevices": "portable-devices"
108
+ }
109
+ }
@@ -107,9 +107,11 @@
107
107
  },
108
108
  "resolutions": {
109
109
  "@apollo/client": "^3.9.0",
110
- "@types/react": "^18.0.25",
111
- "@types/react-dom": "^18.0.8",
110
+ "@types/react": "^18.2.25",
111
+ "@types/react-dom": "^18.2.7",
112
+ "common": "link:packages/common",
112
113
  "html-to-text": "^8.0.0",
114
+ "lerna": "8.1.8",
113
115
  "react": "18.3.0-canary-c3048aab4-20240326",
114
116
  "react-dom": "18.3.0-canary-c3048aab4-20240326",
115
117
  "react-native": "0.72.10",
@@ -149,8 +151,8 @@
149
151
  "@babel/register": "^7.18.9",
150
152
  "@babel/runtime": "^7.20.1",
151
153
  "@common-stack/env-list-loader": "6.0.8-alpha.31",
152
- "@common-stack/generate-plugin": "6.0.8-alpha.31",
153
- "@common-stack/rollup-vite-utils": "6.0.8-alpha.31",
154
+ "@common-stack/generate-plugin": "6.0.8-alpha.33",
155
+ "@common-stack/rollup-vite-utils": "6.0.8-alpha.33",
154
156
  "@emotion/babel-plugin": "^11.11.0",
155
157
  "@graphql-codegen/add": "^5.0.2",
156
158
  "@graphql-codegen/cli": "^5.0.2",
@@ -314,6 +316,7 @@
314
316
  "rollup": "^4.13.0",
315
317
  "rollup-plugin-esbuild": "^6.1.1",
316
318
  "rollup-plugin-string": "^3.0.0",
319
+ "rollup-plugin-svg": "^2.0.0",
317
320
  "sass-loader": "^13.1.0",
318
321
  "shelljs": "^0.8.5",
319
322
  "simple-git": "^3.14.1",
@@ -334,6 +337,10 @@
334
337
  "typedoc": "^0.23.20",
335
338
  "typescript": "^5.5.4",
336
339
  "url-loader": "^4.1.1",
340
+ "vite": "^5.1.1",
341
+ "vite-plugin-babel-macros": "^1.0.6",
342
+ "vite-plugin-cjs-interop": "^2.0.6",
343
+ "vite-plugin-compression": "^0.5.1",
337
344
  "wait-on": "^6.0.1",
338
345
  "webpack": "^5.74.0",
339
346
  "webpack-bundle-analyzer": "^4.7.0",
@@ -3,15 +3,16 @@ import graphql from '@rollup/plugin-graphql';
3
3
  import image from '@rollup/plugin-image';
4
4
  import typescript from '@rollup/plugin-typescript';
5
5
  import { string } from 'rollup-plugin-string';
6
+ import svg from 'rollup-plugin-svg';
6
7
  import { copy } from '@web/rollup-plugin-copy';
7
8
  import modifyLibFilesPlugin from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginModifyLibFiles.js';
8
9
  import generateJsonFromObject from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginGenerateJson.js';
9
10
  import addJsExtensionToImportsPlugin from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginAddJsExtension.js';
10
11
  import { ignoreCssUrlPlugin } from '@common-stack/rollup-vite-utils/lib/rollup/pluginIgnore.js';
11
12
 
12
- // Define any additional plugins specific to this bundle
13
+ // Define any additional plugins specific to this bundle
13
14
  const additionalPlugins = [
14
- copy({ patterns: ['**/cdm-locales/**/*', '**/styles/**/*'], rootDir: './src' }),
15
+ copy({ patterns: ['**/cdm-locales/**/*', '**/*.gql', '**/**/*.graphql', '**/styles/**/*', '**/css/**/*'], rootDir: './src' }),
15
16
  ];
16
17
 
17
18
  function deepMergeConfigs(baseConfig, specificConfig) {
@@ -28,7 +29,8 @@ function deepMergeConfigs(baseConfig, specificConfig) {
28
29
  // Base configuration
29
30
  const baseConfig = {
30
31
  plugins: [
31
- image(),
32
+ image({ exclude: '**/*.svg' }),
33
+ svg({ include: '**/*.svg' }),
32
34
  graphql({ include: '**/*.gql' }),
33
35
  string({
34
36
  include: ['**/*.ejs', '**/*.graphql'],
@@ -31,7 +31,7 @@
31
31
  "@common-stack/client-core": "6.0.8-alpha.31",
32
32
  "@common-stack/core": "6.0.8-alpha.31",
33
33
  "@common-stack/server-core": "6.0.8-alpha.31",
34
- "@common-stack/server-stack": "6.0.8-alpha.31",
34
+ "@common-stack/server-stack": "6.0.8-alpha.32",
35
35
  "@common-stack/store-mongo": "6.0.8-alpha.31",
36
36
  "@container-stack/mailing-api": "5.2.1-alpha.1",
37
37
  "helmet": "^3.21.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/generate-plugin",
3
- "version": "6.0.8-alpha.32",
3
+ "version": "6.0.8-alpha.34",
4
4
  "type": "module",
5
5
  "main": "./lib/index.mjs",
6
6
  "typings": "./lib/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "watch": "yarn build:lib:watch"
18
18
  },
19
19
  "dependencies": {
20
- "@common-stack/rollup-vite-utils": "6.0.8-alpha.31",
20
+ "@common-stack/rollup-vite-utils": "6.0.8-alpha.33",
21
21
  "tslib": "^2.3.0"
22
22
  },
23
23
  "publishConfig": {
@@ -25,5 +25,5 @@
25
25
  },
26
26
  "executors": "./executors.json",
27
27
  "generators": "./generators.json",
28
- "gitHead": "cc43472b14fd4266f6df999a9102434b52e0f568"
28
+ "gitHead": "c1014fd75fa6a6015a3d0025cf87b028c9d50ec9"
29
29
  }
@@ -0,0 +1,109 @@
1
+ {
2
+ "servers": ["servers/frontend-server/config.json", "servers/backend-server/config.json"],
3
+ "codegen": {
4
+ "outputFile": "codegen.ts",
5
+ "rootSchema": "servers/backend-server/src/api/root-schema.graphqls",
6
+ "fullConfig": {
7
+ "overwrite": true,
8
+ "schema": ["$PRIMARY_SCHEMA_PLACEHOLDER$"],
9
+ "generates": {
10
+ "packages/common/src/generated/generated-models.ts": {
11
+ "schema": "%discoveredSchemas%",
12
+ "documents": "%discoveredDocuments%",
13
+ "config": {
14
+ "scalars": {
15
+ "URI": "URI",
16
+ "URIInput": "URI | UriComponents"
17
+ },
18
+ "enumValues": {
19
+ "ConfigurationScope": "@workbench-stack/core/lib/interfaces/configuration/configuration.js#ConfigurationScope",
20
+ "ConfigurationTarget": "../configuration#ConfigurationTarget"
21
+ },
22
+ "constEnums": false,
23
+ "contextType": "../apollo-context#MyContext",
24
+ "withHooks": true,
25
+ "typesPrefix": "I",
26
+ "noNamespaces": true,
27
+ "noGraphQLTag": true
28
+ },
29
+ "plugins": [
30
+ {
31
+ "add": {
32
+ "content": [
33
+ "import { URI, UriComponents } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';"
34
+ ]
35
+ }
36
+ },
37
+ "typescript",
38
+ "typescript-operations",
39
+ "typescript-resolvers"
40
+ ]
41
+ },
42
+ "packages/common/src/generated/generated.tsx": {
43
+ "schema": "%discoveredSchemas%",
44
+ "documents": "%discoveredDocuments%",
45
+ "config": {
46
+ "scalars": {
47
+ "URI": "URI",
48
+ "URIInput": "URI | UriComponents"
49
+ },
50
+ "withHooks": true,
51
+ "typesPrefix": "I",
52
+ "noNamespaces": true,
53
+ "noGraphQLTag": true
54
+ },
55
+ "preset": "import-types-preset",
56
+ "presetConfig": {
57
+ "typesPath": "./generated-models",
58
+ "importTypesNamespace": "SchemaTypes"
59
+ },
60
+ "plugins": [
61
+ {
62
+ "add": {
63
+ "content": [
64
+ "import { URI, UriComponents } from '@vscode-alt/monaco-editor/esm/vs/base/common/uri.js';"
65
+ ]
66
+ }
67
+ },
68
+ "typescript-react-apollo"
69
+ ]
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "updateDependencies": {
75
+ "packagesToCheck": [
76
+ "@common-stack/server-stack",
77
+ "@common-stack/frontend-stack-react",
78
+ "@common-stack/mobile-stack-react"
79
+ ],
80
+ "packagePaths": {
81
+ "backend": ["servers/backend-server/package.json"],
82
+ "frontend": ["servers/frontend-server/package.json"],
83
+ "mobile": ["portable-devices/mobile/package.json"]
84
+ }
85
+ },
86
+ "updateDependencyVersion": {
87
+ "roots": ["servers", "portable-devices", "packages", "packages-modules"],
88
+ "ignorePattern": "**/node_modules/**",
89
+ "jsonSpacing": 4,
90
+ "addEndNewLine": true,
91
+ "commitMessage": "Updated packages to use correct versions"
92
+ },
93
+ "sortPackageJson": {
94
+ "directories": [".", "packages", "packages-modules", "servers", "portable-devices"],
95
+ "skipNodeModules": true
96
+ },
97
+ "deployVersionUpdate": {
98
+ "lernaJsonPath": "lerna.json",
99
+ "jenkinsfilePath": "Jenkinsfile",
100
+ "valuesDevYamlPath": "values-dev.yaml",
101
+ "valuesProdYamlPath": "values-prod.yaml"
102
+ },
103
+ "projectPaths": {
104
+ "packages": "packages",
105
+ "packagesModules": "packages-modules",
106
+ "servers": "servers",
107
+ "portableDevices": "portable-devices"
108
+ }
109
+ }
@@ -107,9 +107,11 @@
107
107
  },
108
108
  "resolutions": {
109
109
  "@apollo/client": "^3.9.0",
110
- "@types/react": "^18.0.25",
111
- "@types/react-dom": "^18.0.8",
110
+ "@types/react": "^18.2.25",
111
+ "@types/react-dom": "^18.2.7",
112
+ "common": "link:packages/common",
112
113
  "html-to-text": "^8.0.0",
114
+ "lerna": "8.1.8",
113
115
  "react": "18.3.0-canary-c3048aab4-20240326",
114
116
  "react-dom": "18.3.0-canary-c3048aab4-20240326",
115
117
  "react-native": "0.72.10",
@@ -149,8 +151,8 @@
149
151
  "@babel/register": "^7.18.9",
150
152
  "@babel/runtime": "^7.20.1",
151
153
  "@common-stack/env-list-loader": "6.0.8-alpha.31",
152
- "@common-stack/generate-plugin": "6.0.8-alpha.31",
153
- "@common-stack/rollup-vite-utils": "6.0.8-alpha.31",
154
+ "@common-stack/generate-plugin": "6.0.8-alpha.33",
155
+ "@common-stack/rollup-vite-utils": "6.0.8-alpha.33",
154
156
  "@emotion/babel-plugin": "^11.11.0",
155
157
  "@graphql-codegen/add": "^5.0.2",
156
158
  "@graphql-codegen/cli": "^5.0.2",
@@ -314,6 +316,7 @@
314
316
  "rollup": "^4.13.0",
315
317
  "rollup-plugin-esbuild": "^6.1.1",
316
318
  "rollup-plugin-string": "^3.0.0",
319
+ "rollup-plugin-svg": "^2.0.0",
317
320
  "sass-loader": "^13.1.0",
318
321
  "shelljs": "^0.8.5",
319
322
  "simple-git": "^3.14.1",
@@ -334,6 +337,10 @@
334
337
  "typedoc": "^0.23.20",
335
338
  "typescript": "^5.5.4",
336
339
  "url-loader": "^4.1.1",
340
+ "vite": "^5.1.1",
341
+ "vite-plugin-babel-macros": "^1.0.6",
342
+ "vite-plugin-cjs-interop": "^2.0.6",
343
+ "vite-plugin-compression": "^0.5.1",
337
344
  "wait-on": "^6.0.1",
338
345
  "webpack": "^5.74.0",
339
346
  "webpack-bundle-analyzer": "^4.7.0",
@@ -3,15 +3,16 @@ import graphql from '@rollup/plugin-graphql';
3
3
  import image from '@rollup/plugin-image';
4
4
  import typescript from '@rollup/plugin-typescript';
5
5
  import { string } from 'rollup-plugin-string';
6
+ import svg from 'rollup-plugin-svg';
6
7
  import { copy } from '@web/rollup-plugin-copy';
7
8
  import modifyLibFilesPlugin from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginModifyLibFiles.js';
8
9
  import generateJsonFromObject from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginGenerateJson.js';
9
10
  import addJsExtensionToImportsPlugin from '@common-stack/rollup-vite-utils/lib/rollup/rollupPluginAddJsExtension.js';
10
11
  import { ignoreCssUrlPlugin } from '@common-stack/rollup-vite-utils/lib/rollup/pluginIgnore.js';
11
12
 
12
- // Define any additional plugins specific to this bundle
13
+ // Define any additional plugins specific to this bundle
13
14
  const additionalPlugins = [
14
- copy({ patterns: ['**/cdm-locales/**/*', '**/styles/**/*'], rootDir: './src' }),
15
+ copy({ patterns: ['**/cdm-locales/**/*', '**/*.gql', '**/**/*.graphql', '**/styles/**/*', '**/css/**/*'], rootDir: './src' }),
15
16
  ];
16
17
 
17
18
  function deepMergeConfigs(baseConfig, specificConfig) {
@@ -28,7 +29,8 @@ function deepMergeConfigs(baseConfig, specificConfig) {
28
29
  // Base configuration
29
30
  const baseConfig = {
30
31
  plugins: [
31
- image(),
32
+ image({ exclude: '**/*.svg' }),
33
+ svg({ include: '**/*.svg' }),
32
34
  graphql({ include: '**/*.gql' }),
33
35
  string({
34
36
  include: ['**/*.ejs', '**/*.graphql'],
@@ -31,7 +31,7 @@
31
31
  "@common-stack/client-core": "6.0.8-alpha.31",
32
32
  "@common-stack/core": "6.0.8-alpha.31",
33
33
  "@common-stack/server-core": "6.0.8-alpha.31",
34
- "@common-stack/server-stack": "6.0.8-alpha.31",
34
+ "@common-stack/server-stack": "6.0.8-alpha.32",
35
35
  "@common-stack/store-mongo": "6.0.8-alpha.31",
36
36
  "@container-stack/mailing-api": "5.2.1-alpha.1",
37
37
  "helmet": "^3.21.2",