@soda-gql/codegen 0.11.14 → 0.11.16
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/dist/{generator-zDqfCrtX.cjs → generator-C2MtTgWe.cjs} +1 -1
- package/dist/generator-CYmwRpiW.mjs +3 -0
- package/dist/{generator-Bnw2f2xB.cjs → generator-D2oKkScM.cjs} +3 -2
- package/dist/{generator-Bnw2f2xB.cjs.map → generator-D2oKkScM.cjs.map} +1 -1
- package/dist/{generator-DfM1bY76.mjs → generator-sluQYSXu.mjs} +3 -2
- package/dist/{generator-DfM1bY76.mjs.map → generator-sluQYSXu.mjs.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
- package/dist/generator-BFy7SgOY.mjs +0 -3
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_generator = require('./generator-
|
|
1
|
+
const require_generator = require('./generator-D2oKkScM.cjs');
|
|
2
2
|
let neverthrow = require("neverthrow");
|
|
3
3
|
let graphql = require("graphql");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
@@ -1076,7 +1076,7 @@ const runCodegen = async (options) => {
|
|
|
1076
1076
|
export * from "./_internal";
|
|
1077
1077
|
`;
|
|
1078
1078
|
for (const [name, document] of schemas.entries()) {
|
|
1079
|
-
const schemaIndex = (await Promise.resolve().then(() => require("./generator-
|
|
1079
|
+
const schemaIndex = (await Promise.resolve().then(() => require("./generator-C2MtTgWe.cjs"))).createSchemaIndex(document);
|
|
1080
1080
|
const objects = Array.from(schemaIndex.objects.keys()).filter((n) => !n.startsWith("__")).length;
|
|
1081
1081
|
const enums = Array.from(schemaIndex.enums.keys()).filter((n) => !n.startsWith("__")).length;
|
|
1082
1082
|
const inputs = Array.from(schemaIndex.inputs.keys()).filter((n) => !n.startsWith("__")).length;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as neverthrow0 from "neverthrow";
|
|
2
2
|
import { Result } from "neverthrow";
|
|
3
3
|
import { DocumentNode, TypeNode } from "graphql";
|
|
4
4
|
import { TypeFilterConfig } from "@soda-gql/config";
|
|
@@ -358,7 +358,7 @@ type CodegenSuccess = {
|
|
|
358
358
|
type CodegenResult = Result<CodegenSuccess, CodegenError>;
|
|
359
359
|
//#endregion
|
|
360
360
|
//#region packages/codegen/src/inject-template.d.ts
|
|
361
|
-
declare const writeInjectTemplate: (outPath: string) =>
|
|
361
|
+
declare const writeInjectTemplate: (outPath: string) => neverthrow0.Err<void, CodegenError> | neverthrow0.Ok<void, CodegenError>;
|
|
362
362
|
declare const getInjectTemplate: () => string;
|
|
363
363
|
//#endregion
|
|
364
364
|
//#region packages/codegen/src/runner.d.ts
|
|
@@ -369,12 +369,12 @@ declare const runCodegen: (options: CodegenOptions) => Promise<CodegenResult>;
|
|
|
369
369
|
* Load a single schema file.
|
|
370
370
|
* @internal Use loadSchema for public API.
|
|
371
371
|
*/
|
|
372
|
-
declare const loadSingleSchema: (schemaPath: string) =>
|
|
372
|
+
declare const loadSingleSchema: (schemaPath: string) => neverthrow0.Err<DocumentNode, CodegenError> | neverthrow0.Ok<DocumentNode, CodegenError>;
|
|
373
373
|
/**
|
|
374
374
|
* Load and merge multiple schema files into a single DocumentNode.
|
|
375
375
|
* Uses GraphQL's concatAST to combine definitions from all files.
|
|
376
376
|
*/
|
|
377
|
-
declare const loadSchema: (schemaPaths: readonly string[]) =>
|
|
377
|
+
declare const loadSchema: (schemaPaths: readonly string[]) => neverthrow0.Err<DocumentNode, CodegenError> | neverthrow0.Ok<DocumentNode, CodegenError>;
|
|
378
378
|
declare const hashSchema: (document: DocumentNode) => string;
|
|
379
379
|
//#endregion
|
|
380
380
|
export { type CodegenCliCommand, type CodegenError, type CodegenFormat, type CodegenInjectConfig, type CodegenOptions, type CodegenResult, type CodegenSchemaConfig, type CodegenSuccess, EmitOptions, EnrichedFragment, EnrichedOperation, EnrichedVariable, GeneratedFile, GraphqlCompatError, GraphqlCompatOptions, ParseResult, ParsedArgument, ParsedFieldSelection, ParsedFragment, ParsedFragmentSpread, ParsedInlineFragment, ParsedObjectField, ParsedOperation, ParsedSelection, ParsedValue, ParsedVariable, TransformOptions, TransformResult, emitFragment, emitOperation, hashSchema, loadSchema, parseGraphqlFile, parseGraphqlSource, parseTypeNode, runCodegen, transformParsedGraphql, writeInjectTemplate };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as generateMultiSchemaModule, t as createSchemaIndex } from "./generator-
|
|
1
|
+
import { n as generateMultiSchemaModule, t as createSchemaIndex } from "./generator-sluQYSXu.mjs";
|
|
2
2
|
import { err, ok } from "neverthrow";
|
|
3
3
|
import { Kind, concatAST, parse, print } from "graphql";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1076,7 +1076,7 @@ const runCodegen = async (options) => {
|
|
|
1076
1076
|
export * from "./_internal";
|
|
1077
1077
|
`;
|
|
1078
1078
|
for (const [name, document] of schemas.entries()) {
|
|
1079
|
-
const schemaIndex = (await import("./generator-
|
|
1079
|
+
const schemaIndex = (await import("./generator-CYmwRpiW.mjs")).createSchemaIndex(document);
|
|
1080
1080
|
const objects = Array.from(schemaIndex.objects.keys()).filter((n) => !n.startsWith("__")).length;
|
|
1081
1081
|
const enums = Array.from(schemaIndex.enums.keys()).filter((n) => !n.startsWith("__")).length;
|
|
1082
1082
|
const inputs = Array.from(schemaIndex.inputs.keys()).filter((n) => !n.startsWith("__")).length;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soda-gql/codegen",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.16",
|
|
4
4
|
"description": "GraphQL schema code generation for soda-gql",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"./package.json": "./package.json"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@soda-gql/core": "0.11.
|
|
52
|
-
"@soda-gql/runtime": "0.11.
|
|
51
|
+
"@soda-gql/core": "0.11.16",
|
|
52
|
+
"@soda-gql/runtime": "0.11.16",
|
|
53
53
|
"esbuild": "^0.24.0",
|
|
54
54
|
"graphql": "^16.8.1",
|
|
55
55
|
"neverthrow": "^8.1.1",
|