@graphql-codegen/cli 2.9.1-alpha-fca07d28c.0 → 2.10.0
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/cjs/codegen.js +1 -0
- package/cjs/hooks.js +1 -0
- package/cjs/utils/get-latest-version.js +2 -2
- package/esm/codegen.js +2 -1
- package/esm/hooks.js +1 -0
- package/esm/utils/get-latest-version.js +1 -1
- package/package.json +2 -2
package/cjs/codegen.js
CHANGED
|
@@ -318,6 +318,7 @@ async function executeCodegen(input) {
|
|
|
318
318
|
newErr.stack = `${newErr.stack}\n\n${executedContext.errors.map(subErr => subErr.stack).join('\n\n')}`;
|
|
319
319
|
throw newErr;
|
|
320
320
|
}
|
|
321
|
+
(0, debugging_js_1.printLogs)();
|
|
321
322
|
return result;
|
|
322
323
|
}
|
|
323
324
|
exports.executeCodegen = executeCodegen;
|
package/cjs/hooks.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLatestVersion = void 0;
|
|
4
|
-
const
|
|
4
|
+
const fetch_1 = require("@whatwg-node/fetch");
|
|
5
5
|
/**
|
|
6
6
|
* Fetches the version directly from the registry instead of depending on
|
|
7
7
|
* an ESM only module as latest-version does.
|
|
8
8
|
* @param packageName
|
|
9
9
|
*/
|
|
10
10
|
async function getLatestVersion(packageName) {
|
|
11
|
-
return (0,
|
|
11
|
+
return (0, fetch_1.fetch)(`https://unpkg.com/${packageName}/package.json`)
|
|
12
12
|
.then(res => res.json())
|
|
13
13
|
.then(pkg => pkg.version);
|
|
14
14
|
}
|
package/esm/codegen.js
CHANGED
|
@@ -4,7 +4,7 @@ import { AggregateError } from '@graphql-tools/utils';
|
|
|
4
4
|
import { GraphQLError } from 'graphql';
|
|
5
5
|
import { getPluginByName } from './plugins.js';
|
|
6
6
|
import { getPresetByName } from './presets.js';
|
|
7
|
-
import { debugLog } from './utils/debugging.js';
|
|
7
|
+
import { debugLog, printLogs } from './utils/debugging.js';
|
|
8
8
|
import { ensureContext, shouldEmitLegacyCommonJSImports } from './config.js';
|
|
9
9
|
import fs from 'fs';
|
|
10
10
|
import path from 'path';
|
|
@@ -314,5 +314,6 @@ export async function executeCodegen(input) {
|
|
|
314
314
|
newErr.stack = `${newErr.stack}\n\n${executedContext.errors.map(subErr => subErr.stack).join('\n\n')}`;
|
|
315
315
|
throw newErr;
|
|
316
316
|
}
|
|
317
|
+
printLogs();
|
|
317
318
|
return result;
|
|
318
319
|
}
|
package/esm/hooks.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
6
6
|
},
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"@graphql-tools/prisma-loader": "^7.2.2",
|
|
18
18
|
"@graphql-tools/url-loader": "^7.12.1",
|
|
19
19
|
"@graphql-tools/utils": "^8.8.0",
|
|
20
|
+
"@whatwg-node/fetch": "^0.0.2",
|
|
20
21
|
"ansi-escapes": "^4.3.1",
|
|
21
22
|
"chalk": "^4.1.0",
|
|
22
23
|
"chokidar": "^3.5.2",
|
|
23
24
|
"cosmiconfig": "^7.0.0",
|
|
24
|
-
"cross-undici-fetch": "^0.4.11",
|
|
25
25
|
"debounce": "^1.2.0",
|
|
26
26
|
"detect-indent": "^6.0.0",
|
|
27
27
|
"graphql-config": "^4.3.1",
|