@graphcommerce/cli 5.1.0-canary.1 → 5.1.0-canary.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.
- package/CHANGELOG.md +39 -0
- package/bin/mesh.ts +18 -3
- package/dist/bin/mesh.js +16 -3
- package/package.json +15 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @graphcommerce/cli
|
|
2
2
|
|
|
3
|
+
## 5.1.0-canary.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1760](https://github.com/graphcommerce-org/graphcommerce/pull/1760) [`8badc8550`](https://github.com/graphcommerce-org/graphcommerce/commit/8badc8550c402ac7b80c8d3238d313550c28a055) - Updated dependencies ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
## 5.1.0-canary.9
|
|
10
|
+
|
|
11
|
+
## 5.1.0-canary.8
|
|
12
|
+
|
|
13
|
+
## 5.1.0-canary.7
|
|
14
|
+
|
|
15
|
+
## 5.1.0-canary.6
|
|
16
|
+
|
|
17
|
+
## 5.1.0-canary.5
|
|
18
|
+
|
|
19
|
+
## 5.1.0-canary.4
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#1755](https://github.com/graphcommerce-org/graphcommerce/pull/1755) [`b34c7b43a`](https://github.com/graphcommerce-org/graphcommerce/commit/b34c7b43a6e1338152e77f6f8427c3fe559021c5) - Disabled @typescript-eslint/no-unbound-method and fixed various eslint errors ([@paales](https://github.com/paales))
|
|
24
|
+
|
|
25
|
+
- [#1755](https://github.com/graphcommerce-org/graphcommerce/pull/1755) [`053ef07d0`](https://github.com/graphcommerce-org/graphcommerce/commit/053ef07d0acf25fba840b50f3ad56746fc97d6a2) - Add [httpDetailsExtensions](https://the-guild.dev/graphql/mesh/docs/plugins/http-details-extensions) plugin to the mesh for a better debugging experience. ([@paales](https://github.com/paales))
|
|
26
|
+
|
|
27
|
+
## 5.1.0-canary.3
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`188f23452`](https://github.com/graphcommerce-org/graphcommerce/commit/188f2345255aacd7665d8e443cf42e20a3070a01) - Implement a custom fetch that has an exponential backoff so that build don’t fail as often ([@paales](https://github.com/paales))
|
|
32
|
+
|
|
33
|
+
- [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`2a6a4d9ec`](https://github.com/graphcommerce-org/graphcommerce/commit/2a6a4d9ecfa1b58a66ba9b9d00016d6feda9aa95) - Updated dependencies to latest versions, except for nextjs; Solve tons of peer dependency issues.
|
|
34
|
+
|
|
35
|
+
- Updated the @mui/material package
|
|
36
|
+
- Removed dependencies on react-hook-form-mui and @playwright/test
|
|
37
|
+
- Upgraded dependencies including type-fest and graphql-mesh
|
|
38
|
+
- Solved peer dependency issues ([@paales](https://github.com/paales))
|
|
39
|
+
|
|
40
|
+
## 5.1.0-canary.2
|
|
41
|
+
|
|
3
42
|
## 5.1.0-canary.1
|
|
4
43
|
|
|
5
44
|
## 5.1.0-canary.0
|
package/bin/mesh.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
4
3
|
import { promises as fs } from 'node:fs'
|
|
5
4
|
import path from 'node:path'
|
|
6
5
|
import { exit } from 'node:process'
|
|
@@ -47,6 +46,10 @@ async function cleanup() {
|
|
|
47
46
|
const main = async () => {
|
|
48
47
|
const conf = (await findConfig({})) as YamlConfig.Config
|
|
49
48
|
|
|
49
|
+
// We're configuring a custom fetch function
|
|
50
|
+
conf.customFetch = '@graphcommerce/graphql-mesh/customFetch'
|
|
51
|
+
conf.serve = { ...conf.serve, endpoint: '/api/graphql' }
|
|
52
|
+
|
|
50
53
|
// Rewrite additionalResolvers so we can use module resolution more easily
|
|
51
54
|
conf.additionalResolvers = conf.additionalResolvers ?? []
|
|
52
55
|
conf.additionalResolvers = conf.additionalResolvers?.map((additionalResolver) => {
|
|
@@ -62,7 +65,7 @@ const main = async () => {
|
|
|
62
65
|
conf.additionalTypeDefs = (
|
|
63
66
|
Array.isArray(conf.additionalTypeDefs) ? conf.additionalTypeDefs : [conf.additionalTypeDefs]
|
|
64
67
|
).map((additionalTypeDef) => {
|
|
65
|
-
if (additionalTypeDef.startsWith('@'))
|
|
68
|
+
if (typeof additionalTypeDef === 'string' && additionalTypeDef.startsWith('@'))
|
|
66
69
|
return path.relative(root, require.resolve(additionalTypeDef))
|
|
67
70
|
|
|
68
71
|
return additionalTypeDef
|
|
@@ -80,6 +83,15 @@ const main = async () => {
|
|
|
80
83
|
if (!conf.serve) conf.serve = {}
|
|
81
84
|
if (!conf.serve.playgroundTitle) conf.serve.playgroundTitle = 'GraphCommerce® Mesh'
|
|
82
85
|
|
|
86
|
+
conf.plugins = [
|
|
87
|
+
...(conf.plugins ?? []),
|
|
88
|
+
{
|
|
89
|
+
httpDetailsExtensions: {
|
|
90
|
+
if: "env.NODE_ENV === 'development'",
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
]
|
|
94
|
+
|
|
83
95
|
await fs.writeFile(tmpMeshLocation, yaml.stringify(conf))
|
|
84
96
|
|
|
85
97
|
// Reexport the mesh to is can be used by packages
|
|
@@ -98,6 +110,9 @@ process.on('SIGINT', cleanup)
|
|
|
98
110
|
process.on('SIGTERM', cleanup)
|
|
99
111
|
|
|
100
112
|
main().catch((e) => {
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
101
114
|
cleanup()
|
|
102
|
-
|
|
115
|
+
if (e instanceof Error) {
|
|
116
|
+
handleFatalError(e, new DefaultLogger(DEFAULT_CLI_PARAMS.initialLoggerPrefix))
|
|
117
|
+
}
|
|
103
118
|
})
|
package/dist/bin/mesh.js
CHANGED
|
@@ -6,7 +6,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.handleFatalError = void 0;
|
|
8
8
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
9
|
-
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
10
9
|
const node_fs_1 = require("node:fs");
|
|
11
10
|
const node_path_1 = __importDefault(require("node:path"));
|
|
12
11
|
const node_process_1 = require("node:process");
|
|
@@ -48,6 +47,9 @@ async function cleanup() {
|
|
|
48
47
|
}
|
|
49
48
|
const main = async () => {
|
|
50
49
|
const conf = (await (0, findConfig_1.findConfig)({}));
|
|
50
|
+
// We're configuring a custom fetch function
|
|
51
|
+
conf.customFetch = '@graphcommerce/graphql-mesh/customFetch';
|
|
52
|
+
conf.serve = { ...conf.serve, endpoint: '/api/graphql' };
|
|
51
53
|
// Rewrite additionalResolvers so we can use module resolution more easily
|
|
52
54
|
conf.additionalResolvers = conf.additionalResolvers ?? [];
|
|
53
55
|
conf.additionalResolvers = conf.additionalResolvers?.map((additionalResolver) => {
|
|
@@ -61,7 +63,7 @@ const main = async () => {
|
|
|
61
63
|
if (!conf.additionalTypeDefs)
|
|
62
64
|
conf.additionalTypeDefs = [];
|
|
63
65
|
conf.additionalTypeDefs = (Array.isArray(conf.additionalTypeDefs) ? conf.additionalTypeDefs : [conf.additionalTypeDefs]).map((additionalTypeDef) => {
|
|
64
|
-
if (additionalTypeDef.startsWith('@'))
|
|
66
|
+
if (typeof additionalTypeDef === 'string' && additionalTypeDef.startsWith('@'))
|
|
65
67
|
return node_path_1.default.relative(root, require.resolve(additionalTypeDef));
|
|
66
68
|
return additionalTypeDef;
|
|
67
69
|
});
|
|
@@ -78,6 +80,14 @@ const main = async () => {
|
|
|
78
80
|
conf.serve = {};
|
|
79
81
|
if (!conf.serve.playgroundTitle)
|
|
80
82
|
conf.serve.playgroundTitle = 'GraphCommerce® Mesh';
|
|
83
|
+
conf.plugins = [
|
|
84
|
+
...(conf.plugins ?? []),
|
|
85
|
+
{
|
|
86
|
+
httpDetailsExtensions: {
|
|
87
|
+
if: "env.NODE_ENV === 'development'",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
];
|
|
81
91
|
await node_fs_1.promises.writeFile(tmpMeshLocation, yaml_1.default.stringify(conf));
|
|
82
92
|
// Reexport the mesh to is can be used by packages
|
|
83
93
|
await node_fs_1.promises.writeFile(`${meshDir}/.mesh.ts`, `export * from '${relativePath.split(node_path_1.default.sep).join('/')}.mesh'`, { encoding: 'utf8' });
|
|
@@ -87,6 +97,9 @@ const main = async () => {
|
|
|
87
97
|
process.on('SIGINT', cleanup);
|
|
88
98
|
process.on('SIGTERM', cleanup);
|
|
89
99
|
main().catch((e) => {
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
90
101
|
cleanup();
|
|
91
|
-
|
|
102
|
+
if (e instanceof Error) {
|
|
103
|
+
handleFatalError(e, new utils_1.DefaultLogger(cli_1.DEFAULT_CLI_PARAMS.initialLoggerPrefix));
|
|
104
|
+
}
|
|
92
105
|
});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/cli",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "5.1.0-canary.
|
|
5
|
+
"version": "5.1.0-canary.10",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"scripts": {
|
|
@@ -22,22 +22,24 @@
|
|
|
22
22
|
"graphcommerce": "dist/bin/graphcommerce.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@graphcommerce/next-config": "5.1.0-canary.
|
|
26
|
-
"@graphql-codegen/cli": "2.
|
|
27
|
-
"@graphql-mesh/cli": "0.
|
|
28
|
-
"@graphql-mesh/types": "0.
|
|
29
|
-
"@graphql-mesh/utils": "0.
|
|
30
|
-
"cosmiconfig": "^
|
|
25
|
+
"@graphcommerce/next-config": "5.1.0-canary.10",
|
|
26
|
+
"@graphql-codegen/cli": "2.16.1",
|
|
27
|
+
"@graphql-mesh/cli": "0.82.5",
|
|
28
|
+
"@graphql-mesh/types": "0.89.2",
|
|
29
|
+
"@graphql-mesh/utils": "0.43.3",
|
|
30
|
+
"cosmiconfig": "^8.0.0",
|
|
31
31
|
"detect-package-manager": "^2.0.1",
|
|
32
|
-
"
|
|
32
|
+
"graphql": "16.6.0",
|
|
33
|
+
"graphql-tag": "^2.12.6",
|
|
34
|
+
"rimraf": "^3.0.2",
|
|
35
|
+
"ts-node": "^10.9.1"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@graphcommerce/eslint-config-pwa": "
|
|
36
|
-
"@graphcommerce/prettier-config-pwa": "
|
|
37
|
-
"@graphcommerce/typescript-config-pwa": "
|
|
38
|
-
"@playwright/test": "^1.21.1",
|
|
38
|
+
"@graphcommerce/eslint-config-pwa": "5.1.0-canary.10",
|
|
39
|
+
"@graphcommerce/prettier-config-pwa": "5.1.0-canary.10",
|
|
40
|
+
"@graphcommerce/typescript-config-pwa": "5.1.0-canary.10",
|
|
39
41
|
"@types/rimraf": "^3.0.2",
|
|
40
|
-
"typescript": "4.
|
|
42
|
+
"typescript": "4.9.4"
|
|
41
43
|
},
|
|
42
44
|
"sideEffects": false,
|
|
43
45
|
"prettier": "@graphcommerce/prettier-config-pwa",
|