@graphcommerce/cli 9.0.0-canary.104 → 9.0.0-canary.106
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 +4 -0
- package/dist/bin/graphcommerce.js +2 -0
- package/dist/bin/mesh.js +12 -6
- package/package.json +9 -9
- package/src/bin/graphcommerce.ts +2 -0
- package/src/bin/mesh.ts +18 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const commands = {
|
|
3
|
+
codegen: () => import('@graphcommerce/next-config').then((m) => m.codegen),
|
|
3
4
|
"codegen-config": () => import('@graphcommerce/next-config').then((m) => m.generateConfig),
|
|
5
|
+
"copy-routes": () => import('@graphcommerce/next-config').then((m) => m.copyFiles),
|
|
4
6
|
"codegen-interceptors": () => import('@graphcommerce/next-config').then((m) => m.codegenInterceptors),
|
|
5
7
|
"export-config": () => import('@graphcommerce/next-config').then((m) => m.exportConfig),
|
|
6
8
|
"hygraph-migrate": () => import('@graphcommerce/hygraph-cli').then((m) => m.migrateHygraph)
|
package/dist/bin/mesh.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { loadConfig, resolveDependenciesSync, packageRoots, replaceConfigInString } from '@graphcommerce/next-config';
|
|
3
|
-
import { DEFAULT_CLI_PARAMS, graphqlMesh } from '@graphql-mesh/cli';
|
|
4
|
-
import { DefaultLogger, defaultImportFn, loadYaml, fileURLToPath } from '@graphql-mesh/utils';
|
|
5
|
-
import dotenv from 'dotenv';
|
|
6
2
|
import { promises } from 'node:fs';
|
|
7
3
|
import path$1 from 'node:path';
|
|
8
4
|
import { exit } from 'node:process';
|
|
5
|
+
import { loadConfig, resolveDependenciesSync, sig, packageRoots, replaceConfigInString } from '@graphcommerce/next-config';
|
|
6
|
+
import { DEFAULT_CLI_PARAMS, graphqlMesh } from '@graphql-mesh/cli';
|
|
7
|
+
import { DefaultLogger, defaultImportFn, loadYaml, fileURLToPath } from '@graphql-mesh/utils';
|
|
8
|
+
import dotenv from 'dotenv';
|
|
9
9
|
import 'tsx/cjs';
|
|
10
10
|
import 'tsx/esm';
|
|
11
11
|
import yaml from 'yaml';
|
|
@@ -144,10 +144,16 @@ const main = async () => {
|
|
|
144
144
|
const deps = resolveDependenciesSync();
|
|
145
145
|
const packages = [...deps.values()].filter((p) => p !== ".");
|
|
146
146
|
const mV = graphCommerce.magentoVersion ?? 246;
|
|
147
|
+
sig();
|
|
147
148
|
packageRoots(packages).forEach((r) => {
|
|
148
|
-
const alsoScan = [245, 246, 247, 248, 249, 250, 251, 252, 253, 254].filter((v) => v > mV).map((v) => `${r}/*/schema-${v}/**/*.graphqls`);
|
|
149
149
|
conf.additionalTypeDefs.push(`${r}/*/schema/**/*.graphqls`);
|
|
150
|
-
|
|
150
|
+
const scanVersions = [245, 246, 247, 248, 249, 250, 251, 252, 253, 254].filter((v) => v > mV).map((v) => `${r}/*/schema-${v}/**/*.graphqls`);
|
|
151
|
+
conf.additionalTypeDefs.push(...scanVersions);
|
|
152
|
+
if (globalThis.gcl?.includes(atob("QGdyYXBoY29tbWVyY2UvYWRvYmUtY29tbWVyY2U="))) {
|
|
153
|
+
conf.additionalTypeDefs.push(`${r}/*/schema-ac/**/*.graphqls`);
|
|
154
|
+
const scanVersionAC = [245, 246, 247, 248, 249, 250, 251, 252, 253, 254].filter((v) => v > mV).map((v) => `${r}/*/schema-ac-${v}/**/*.graphqls`);
|
|
155
|
+
conf.additionalTypeDefs.push(...scanVersionAC);
|
|
156
|
+
}
|
|
151
157
|
});
|
|
152
158
|
if (!conf.serve) conf.serve = {};
|
|
153
159
|
if (!conf.serve.playgroundTitle) conf.serve.playgroundTitle = "GraphCommerce\xAE Mesh";
|
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": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.106",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "pkgroll --watch",
|
|
8
8
|
"build": "pkgroll",
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"mesh": "dist/bin/mesh.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@graphql-codegen/cli": "5.0.
|
|
23
|
+
"@graphql-codegen/cli": "5.0.3",
|
|
24
24
|
"@graphql-mesh/cli": "latest",
|
|
25
25
|
"@graphql-mesh/cross-helpers": "latest",
|
|
26
26
|
"@graphql-mesh/runtime": "latest",
|
|
27
27
|
"@graphql-mesh/store": "latest",
|
|
28
28
|
"@graphql-mesh/types": "latest",
|
|
29
29
|
"@graphql-mesh/utils": "latest",
|
|
30
|
-
"@graphql-tools/utils": "^10.
|
|
30
|
+
"@graphql-tools/utils": "^10.6.0",
|
|
31
31
|
"cosmiconfig": "^8.3.6",
|
|
32
32
|
"detect-package-manager": "^3.0.2",
|
|
33
33
|
"dotenv": "16.4.5",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"yaml": "2.5.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.
|
|
44
|
-
"@graphcommerce/graphql-mesh": "^9.0.0-canary.
|
|
45
|
-
"@graphcommerce/hygraph-cli": "^9.0.0-canary.
|
|
46
|
-
"@graphcommerce/next-config": "^9.0.0-canary.
|
|
47
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.
|
|
48
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.
|
|
43
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.106",
|
|
44
|
+
"@graphcommerce/graphql-mesh": "^9.0.0-canary.106",
|
|
45
|
+
"@graphcommerce/hygraph-cli": "^9.0.0-canary.106",
|
|
46
|
+
"@graphcommerce/next-config": "^9.0.0-canary.106",
|
|
47
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.106",
|
|
48
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.106",
|
|
49
49
|
"react": "^18.2.0"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false,
|
package/src/bin/graphcommerce.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const commands = {
|
|
4
|
+
codegen: () => import('@graphcommerce/next-config').then((m) => m.codegen),
|
|
4
5
|
'codegen-config': () => import('@graphcommerce/next-config').then((m) => m.generateConfig),
|
|
6
|
+
'copy-routes': () => import('@graphcommerce/next-config').then((m) => m.copyFiles),
|
|
5
7
|
'codegen-interceptors': () =>
|
|
6
8
|
import('@graphcommerce/next-config').then((m) => m.codegenInterceptors),
|
|
7
9
|
'export-config': () => import('@graphcommerce/next-config').then((m) => m.exportConfig),
|
package/src/bin/mesh.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
import { promises as fs } from 'node:fs'
|
|
3
|
+
import path from 'node:path'
|
|
4
|
+
import { exit } from 'node:process'
|
|
2
5
|
import type { meshConfig as meshConfigBase } from '@graphcommerce/graphql-mesh/meshConfig'
|
|
3
6
|
import {
|
|
4
7
|
loadConfig,
|
|
5
8
|
packageRoots,
|
|
6
9
|
replaceConfigInString,
|
|
7
10
|
resolveDependenciesSync,
|
|
11
|
+
sig,
|
|
8
12
|
} from '@graphcommerce/next-config'
|
|
9
13
|
import type { GraphQLMeshCLIParams } from '@graphql-mesh/cli'
|
|
10
14
|
import { DEFAULT_CLI_PARAMS, graphqlMesh } from '@graphql-mesh/cli'
|
|
11
15
|
import type { Logger, YamlConfig } from '@graphql-mesh/types'
|
|
12
16
|
import { DefaultLogger, fileURLToPath } from '@graphql-mesh/utils'
|
|
13
17
|
import dotenv from 'dotenv'
|
|
14
|
-
import { promises as fs } from 'node:fs'
|
|
15
|
-
import path from 'node:path'
|
|
16
|
-
import { exit } from 'node:process'
|
|
17
18
|
import 'tsx/cjs'
|
|
18
19
|
import 'tsx/esm'
|
|
19
20
|
import type { Entries, OmitIndexSignature } from 'type-fest'
|
|
@@ -126,13 +127,24 @@ const main = async () => {
|
|
|
126
127
|
const packages = [...deps.values()].filter((p) => p !== '.')
|
|
127
128
|
|
|
128
129
|
const mV = graphCommerce.magentoVersion ?? 246
|
|
130
|
+
sig()
|
|
131
|
+
|
|
129
132
|
packageRoots(packages).forEach((r) => {
|
|
130
|
-
|
|
133
|
+
conf.additionalTypeDefs.push(`${r}/*/schema/**/*.graphqls`)
|
|
134
|
+
|
|
135
|
+
const scanVersions = [245, 246, 247, 248, 249, 250, 251, 252, 253, 254]
|
|
131
136
|
.filter((v) => v > mV)
|
|
132
137
|
.map((v) => `${r}/*/schema-${v}/**/*.graphqls`)
|
|
133
138
|
|
|
134
|
-
conf.additionalTypeDefs.push(
|
|
135
|
-
|
|
139
|
+
conf.additionalTypeDefs.push(...scanVersions)
|
|
140
|
+
|
|
141
|
+
if (globalThis.gcl?.includes(atob('QGdyYXBoY29tbWVyY2UvYWRvYmUtY29tbWVyY2U='))) {
|
|
142
|
+
conf.additionalTypeDefs.push(`${r}/*/schema-ac/**/*.graphqls`)
|
|
143
|
+
const scanVersionAC = [245, 246, 247, 248, 249, 250, 251, 252, 253, 254]
|
|
144
|
+
.filter((v) => v > mV)
|
|
145
|
+
.map((v) => `${r}/*/schema-ac-${v}/**/*.graphqls`)
|
|
146
|
+
conf.additionalTypeDefs.push(...scanVersionAC)
|
|
147
|
+
}
|
|
136
148
|
})
|
|
137
149
|
|
|
138
150
|
if (!conf.serve) conf.serve = {}
|