@graphcommerce/cli 6.0.0-canary.39 → 6.0.0-canary.40
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 +6 -0
- package/dist/bin/mesh.js +1 -5
- package/package.json +5 -5
- package/src/bin/mesh.ts +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @graphcommerce/cli
|
|
2
2
|
|
|
3
|
+
## 6.0.0-canary.40
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1838](https://github.com/graphcommerce-org/graphcommerce/pull/1838) [`b8d41d4fb`](https://github.com/graphcommerce-org/graphcommerce/commit/b8d41d4fb8634e44843cf645e683a21fdbb36b5f) - Improved global regular expression replace on the Graphcommerce configuration mesh replace function, so it searches for variables in complete variable paths. ([@mikekeehnen](https://github.com/mikekeehnen))
|
|
8
|
+
|
|
3
9
|
## 6.0.0-canary.39
|
|
4
10
|
|
|
5
11
|
## 6.0.0-canary.38
|
package/dist/bin/mesh.js
CHANGED
|
@@ -88,11 +88,7 @@ const main = async () => {
|
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
];
|
|
91
|
-
const
|
|
92
|
-
let yamlString = yaml_1.default.stringify(conf);
|
|
93
|
-
Object.entries(replacers).forEach(([from, to]) => {
|
|
94
|
-
yamlString = yamlString.replace(new RegExp(`"{${from}}"`, 'g'), to);
|
|
95
|
-
});
|
|
91
|
+
const yamlString = (0, next_config_1.replaceConfigInString)(yaml_1.default.stringify(conf), (0, next_config_1.loadConfig)(root));
|
|
96
92
|
await node_fs_1.promises.writeFile(tmpMeshLocation, yamlString);
|
|
97
93
|
// Reexport the mesh to is can be used by packages
|
|
98
94
|
await node_fs_1.promises.writeFile(`${meshDir}/.mesh.ts`, `export * from '${relativePath.split(node_path_1.default.sep).join('/')}.mesh'`, { encoding: 'utf8' });
|
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": "6.0.0-canary.
|
|
5
|
+
"version": "6.0.0-canary.40",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"scripts": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"graphcommerce": "dist/bin/graphcommerce.js"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@graphcommerce/next-config": "6.0.0-canary.
|
|
27
|
+
"@graphcommerce/next-config": "6.0.0-canary.40",
|
|
28
28
|
"@graphql-codegen/cli": "3.2.2",
|
|
29
29
|
"@graphql-mesh/cli": "0.82.25",
|
|
30
30
|
"@graphql-mesh/types": "0.91.7",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"ts-node": "^10.9.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@graphcommerce/eslint-config-pwa": "6.0.0-canary.
|
|
42
|
-
"@graphcommerce/prettier-config-pwa": "6.0.0-canary.
|
|
43
|
-
"@graphcommerce/typescript-config-pwa": "6.0.0-canary.
|
|
41
|
+
"@graphcommerce/eslint-config-pwa": "6.0.0-canary.40",
|
|
42
|
+
"@graphcommerce/prettier-config-pwa": "6.0.0-canary.40",
|
|
43
|
+
"@graphcommerce/typescript-config-pwa": "6.0.0-canary.40",
|
|
44
44
|
"@types/rimraf": "^3.0.2",
|
|
45
45
|
"react": "^18.2.0",
|
|
46
46
|
"typescript": "4.9.5"
|
package/src/bin/mesh.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { promises as fs } from 'node:fs'
|
|
4
4
|
import path from 'node:path'
|
|
5
5
|
import { exit } from 'node:process'
|
|
6
|
-
import {
|
|
6
|
+
import { isMonorepo, loadConfig, replaceConfigInString } from '@graphcommerce/next-config'
|
|
7
7
|
import { graphqlMesh, DEFAULT_CLI_PARAMS, GraphQLMeshCLIParams } from '@graphql-mesh/cli'
|
|
8
8
|
import { Logger, YamlConfig } from '@graphql-mesh/types'
|
|
9
9
|
import { DefaultLogger } from '@graphql-mesh/utils'
|
|
@@ -92,12 +92,7 @@ const main = async () => {
|
|
|
92
92
|
},
|
|
93
93
|
]
|
|
94
94
|
|
|
95
|
-
const
|
|
96
|
-
let yamlString = yaml.stringify(conf)
|
|
97
|
-
Object.entries(replacers).forEach(([from, to]) => {
|
|
98
|
-
yamlString = yamlString.replace(new RegExp(`"{${from}}"`, 'g'), to)
|
|
99
|
-
})
|
|
100
|
-
|
|
95
|
+
const yamlString = replaceConfigInString(yaml.stringify(conf), loadConfig(root))
|
|
101
96
|
await fs.writeFile(tmpMeshLocation, yamlString)
|
|
102
97
|
|
|
103
98
|
// Reexport the mesh to is can be used by packages
|