@graphcommerce/cli 9.0.0-canary.103 → 9.0.0-canary.105
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/codegen.js +2 -2
- package/dist/bin/is-monorepo.js +1 -1
- package/dist/bin/mesh.js +6 -6
- package/package.json +7 -7
- package/src/bin/codegen.ts +4 -3
- package/src/bin/is-monorepo.ts +2 -3
- package/src/bin/mesh.ts +7 -7
- package/src/utils/findConfig.ts +2 -2
package/CHANGELOG.md
CHANGED
package/dist/bin/codegen.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
2
|
import { resolveDependenciesSync, packageRoots } from '@graphcommerce/next-config';
|
|
5
3
|
import { cliError, loadCodegenConfig, runCli } from '@graphql-codegen/cli';
|
|
6
4
|
import dotenv from 'dotenv';
|
|
5
|
+
import fs from 'node:fs/promises';
|
|
6
|
+
import path from 'node:path';
|
|
7
7
|
import { rimraf } from 'rimraf';
|
|
8
8
|
import yaml from 'yaml';
|
|
9
9
|
|
package/dist/bin/is-monorepo.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { spawn } from 'node:child_process';
|
|
3
2
|
import { isMonorepo } from '@graphcommerce/next-config';
|
|
4
3
|
import { detect } from 'detect-package-manager';
|
|
4
|
+
import { spawn } from 'node:child_process';
|
|
5
5
|
|
|
6
6
|
async function main() {
|
|
7
7
|
const isMono = isMonorepo();
|
package/dist/bin/mesh.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { promises } from 'node:fs';
|
|
3
|
-
import path$1 from 'node:path';
|
|
4
|
-
import { exit } from 'node:process';
|
|
5
2
|
import { loadConfig, resolveDependenciesSync, packageRoots, replaceConfigInString } from '@graphcommerce/next-config';
|
|
6
3
|
import { DEFAULT_CLI_PARAMS, graphqlMesh } from '@graphql-mesh/cli';
|
|
7
4
|
import { DefaultLogger, defaultImportFn, loadYaml, fileURLToPath } from '@graphql-mesh/utils';
|
|
8
5
|
import dotenv from 'dotenv';
|
|
9
|
-
import
|
|
10
|
-
import path from 'path';
|
|
11
|
-
import {
|
|
6
|
+
import { promises } from 'node:fs';
|
|
7
|
+
import path$1 from 'node:path';
|
|
8
|
+
import { exit } from 'node:process';
|
|
12
9
|
import 'tsx/cjs';
|
|
13
10
|
import 'tsx/esm';
|
|
11
|
+
import yaml from 'yaml';
|
|
12
|
+
import { cosmiconfig, defaultLoaders } from 'cosmiconfig';
|
|
13
|
+
import path from 'path';
|
|
14
14
|
|
|
15
15
|
function customLoader(ext, importFn = defaultImportFn, initialLoggerPrefix = "\u{1F578}\uFE0F Mesh") {
|
|
16
16
|
const logger = new DefaultLogger(initialLoggerPrefix).child("config");
|
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.105",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "pkgroll --watch",
|
|
8
8
|
"build": "pkgroll",
|
|
@@ -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.105",
|
|
44
|
+
"@graphcommerce/graphql-mesh": "^9.0.0-canary.105",
|
|
45
|
+
"@graphcommerce/hygraph-cli": "^9.0.0-canary.105",
|
|
46
|
+
"@graphcommerce/next-config": "^9.0.0-canary.105",
|
|
47
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.105",
|
|
48
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.105",
|
|
49
49
|
"react": "^18.2.0"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false,
|
package/src/bin/codegen.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
|
|
2
3
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
|
-
import fs from 'node:fs/promises'
|
|
4
|
-
import path from 'node:path'
|
|
5
4
|
import { packageRoots, resolveDependenciesSync } from '@graphcommerce/next-config'
|
|
6
|
-
import {
|
|
5
|
+
import { cliError, loadCodegenConfig, runCli } from '@graphql-codegen/cli'
|
|
7
6
|
import type { Types } from '@graphql-codegen/plugin-helpers'
|
|
8
7
|
import dotenv from 'dotenv'
|
|
8
|
+
import fs from 'node:fs/promises'
|
|
9
|
+
import path from 'node:path'
|
|
9
10
|
import { rimraf } from 'rimraf'
|
|
10
11
|
import yaml from 'yaml'
|
|
11
12
|
|
package/src/bin/is-monorepo.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import type { ChildProcess } from 'node:child_process'
|
|
4
|
-
import { spawn } from 'node:child_process'
|
|
5
2
|
import { isMonorepo } from '@graphcommerce/next-config'
|
|
6
3
|
import { detect } from 'detect-package-manager'
|
|
4
|
+
import type { ChildProcess } from 'node:child_process'
|
|
5
|
+
import { spawn } from 'node:child_process'
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* Executes a command dependening if we're running in a monorepo or not Usage:
|
package/src/bin/mesh.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
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'
|
|
5
2
|
import type { meshConfig as meshConfigBase } from '@graphcommerce/graphql-mesh/meshConfig'
|
|
6
3
|
import {
|
|
7
4
|
loadConfig,
|
|
@@ -10,15 +7,18 @@ import {
|
|
|
10
7
|
resolveDependenciesSync,
|
|
11
8
|
} from '@graphcommerce/next-config'
|
|
12
9
|
import type { GraphQLMeshCLIParams } from '@graphql-mesh/cli'
|
|
13
|
-
import {
|
|
10
|
+
import { DEFAULT_CLI_PARAMS, graphqlMesh } from '@graphql-mesh/cli'
|
|
14
11
|
import type { Logger, YamlConfig } from '@graphql-mesh/types'
|
|
15
12
|
import { DefaultLogger, fileURLToPath } from '@graphql-mesh/utils'
|
|
16
13
|
import dotenv from 'dotenv'
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
14
|
+
import { promises as fs } from 'node:fs'
|
|
15
|
+
import path from 'node:path'
|
|
16
|
+
import { exit } from 'node:process'
|
|
20
17
|
import 'tsx/cjs'
|
|
21
18
|
import 'tsx/esm'
|
|
19
|
+
import type { Entries, OmitIndexSignature } from 'type-fest'
|
|
20
|
+
import yaml from 'yaml'
|
|
21
|
+
import { findConfig } from '../utils/findConfig'
|
|
22
22
|
|
|
23
23
|
dotenv.config()
|
|
24
24
|
|
package/src/utils/findConfig.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
-
import path from 'path'
|
|
3
2
|
import type { ConfigProcessOptions } from '@graphql-mesh/config'
|
|
4
|
-
import { defaultImportFn, loadYaml
|
|
3
|
+
import { DefaultLogger, defaultImportFn, loadYaml } from '@graphql-mesh/utils'
|
|
5
4
|
import { cosmiconfig, defaultLoaders } from 'cosmiconfig'
|
|
5
|
+
import path from 'path'
|
|
6
6
|
|
|
7
7
|
function customLoader(
|
|
8
8
|
ext: 'json' | 'yaml' | 'js',
|