@graphql-codegen/cli 7.4.1 → 7.4.2-alpha-20260919064524-22fffd3785c4bac19c8ec02437ec1b118ac7b71f
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 +15 -5
- package/cjs/version.js +1 -1
- package/esm/codegen.js +15 -5
- package/esm/version.js +1 -1
- package/package.json +2 -2
package/cjs/codegen.js
CHANGED
|
@@ -177,11 +177,21 @@ async function executeCodegen(input) {
|
|
|
177
177
|
const outputSpecificSchemas = (0, plugin_helpers_1.normalizeInstanceOrArray)(outputConfig.schema);
|
|
178
178
|
let outputSpecificDocuments = (0, plugin_helpers_1.normalizeInstanceOrArray)(outputConfig.documents);
|
|
179
179
|
let outputSpecificExternalDocuments = (0, plugin_helpers_1.normalizeInstanceOrArray)(outputConfig.externalDocuments);
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
180
|
+
let preset;
|
|
181
|
+
try {
|
|
182
|
+
preset = hasPreset
|
|
183
|
+
? typeof outputConfig.preset === 'string'
|
|
184
|
+
? await (0, presets_js_1.getPresetByName)(outputConfig.preset, makeDefaultLoader(context.cwd))
|
|
185
|
+
: outputConfig.preset
|
|
186
|
+
: null;
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
// ctx.errors is what determines CLI success/failure, so it must be pushed here
|
|
190
|
+
// before rethrowing — otherwise the CLI reports success even though the
|
|
191
|
+
// terminal printed this error.
|
|
192
|
+
ctx.errors.push(error);
|
|
193
|
+
throw error;
|
|
194
|
+
}
|
|
185
195
|
if (preset?.prepareDocuments) {
|
|
186
196
|
outputSpecificDocuments = await preset.prepareDocuments(filename, outputSpecificDocuments);
|
|
187
197
|
outputSpecificExternalDocuments = await preset.prepareDocuments(filename, outputSpecificExternalDocuments);
|
package/cjs/version.js
CHANGED
package/esm/codegen.js
CHANGED
|
@@ -173,11 +173,21 @@ export async function executeCodegen(input) {
|
|
|
173
173
|
const outputSpecificSchemas = normalizeInstanceOrArray(outputConfig.schema);
|
|
174
174
|
let outputSpecificDocuments = normalizeInstanceOrArray(outputConfig.documents);
|
|
175
175
|
let outputSpecificExternalDocuments = normalizeInstanceOrArray(outputConfig.externalDocuments);
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
176
|
+
let preset;
|
|
177
|
+
try {
|
|
178
|
+
preset = hasPreset
|
|
179
|
+
? typeof outputConfig.preset === 'string'
|
|
180
|
+
? await getPresetByName(outputConfig.preset, makeDefaultLoader(context.cwd))
|
|
181
|
+
: outputConfig.preset
|
|
182
|
+
: null;
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
// ctx.errors is what determines CLI success/failure, so it must be pushed here
|
|
186
|
+
// before rethrowing — otherwise the CLI reports success even though the
|
|
187
|
+
// terminal printed this error.
|
|
188
|
+
ctx.errors.push(error);
|
|
189
|
+
throw error;
|
|
190
|
+
}
|
|
181
191
|
if (preset?.prepareDocuments) {
|
|
182
192
|
outputSpecificDocuments = await preset.prepareDocuments(filename, outputSpecificDocuments);
|
|
183
193
|
outputSpecificExternalDocuments = await preset.prepareDocuments(filename, outputSpecificExternalDocuments);
|
package/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '7.4.
|
|
1
|
+
export const version = '7.4.2-alpha-20260919064524-22fffd3785c4bac19c8ec02437ec1b118ac7b71f';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/cli",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.2-alpha-20260919064524-22fffd3785c4bac19c8ec02437ec1b118ac7b71f",
|
|
4
4
|
"peerDependenciesMeta": {
|
|
5
5
|
"@parcel/watcher": {
|
|
6
6
|
"optional": true
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@babel/generator": "^7.18.13",
|
|
15
15
|
"@babel/template": "^7.18.10",
|
|
16
16
|
"@babel/types": "^7.18.13",
|
|
17
|
-
"@graphql-codegen/client-preset": "^6.
|
|
17
|
+
"@graphql-codegen/client-preset": "^6.2.0",
|
|
18
18
|
"@graphql-codegen/core": "^6.2.0",
|
|
19
19
|
"@graphql-codegen/plugin-helpers": "^7.3.0",
|
|
20
20
|
"@graphql-tools/apollo-engine-loader": "^8.0.28",
|