@corpdk/codegen-cli 2026.10.0-alpha.4 → 2026.10.0-alpha.5

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.
@@ -0,0 +1,3 @@
1
+ import type { OperationDescriptor } from "./schema-utils.js";
2
+ import type { Config } from "./index.js";
3
+ export declare function generateCli(ops: OperationDescriptor[], config: Config): string;
@@ -0,0 +1,2 @@
1
+ import type { OperationDescriptor } from "./schema-utils.js";
2
+ export declare function generateInfo(ops: OperationDescriptor[]): string;
@@ -0,0 +1,2 @@
1
+ import type { OperationDescriptor } from "./schema-utils.js";
2
+ export declare function generateMan(ops: OperationDescriptor[]): string;
package/dist/index.d.ts CHANGED
@@ -1,11 +1,8 @@
1
- import { Types } from '@graphql-codegen/plugin-helpers';
2
-
3
- interface Config {
1
+ import type { Types } from "@graphql-codegen/plugin-helpers";
2
+ export interface Config {
4
3
  /** Name of the env var that holds the HTTP endpoint. Default: DS_HTTP_URL */
5
4
  httpUrlEnvVar?: string;
6
5
  /** Name of the env var that holds the WebSocket endpoint. Default: DS_WS_URL */
7
6
  wsUrlEnvVar?: string;
8
7
  }
9
- declare const preset: Types.OutputPreset<Config>;
10
-
11
- export { type Config, preset };
8
+ export declare const preset: Types.OutputPreset<Config>;
@@ -0,0 +1,24 @@
1
+ import { type GraphQLSchema } from "graphql";
2
+ export type OperationType = "query" | "mutation" | "subscription";
3
+ export interface ArgDescriptor {
4
+ name: string;
5
+ /** Full GraphQL type string, e.g. "ID!", "String", "[Item!]!" */
6
+ graphqlType: string;
7
+ /** Type for node:util parseArgs — scalars other than Boolean become "string" */
8
+ parseType: "string" | "boolean";
9
+ description: string;
10
+ required: boolean;
11
+ }
12
+ export interface OperationDescriptor {
13
+ operationType: OperationType;
14
+ /** camelCase field name from the schema, e.g. "createItem" */
15
+ fieldName: string;
16
+ /** kebab-case command name for the CLI, e.g. "create-item" */
17
+ commandName: string;
18
+ description: string;
19
+ args: ArgDescriptor[];
20
+ /** Ready-to-execute GraphQL document string */
21
+ document: string;
22
+ }
23
+ /** Extract all query/mutation/subscription operations from a GraphQLSchema. */
24
+ export declare function extractOperations(schema: GraphQLSchema): OperationDescriptor[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corpdk/codegen-cli",
3
- "version": "2026.10.0-alpha.4",
3
+ "version": "2026.10.0-alpha.5",
4
4
  "description": "GraphQL Code Generator plugin for resolver types and TypedDocumentNode SDK output",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -16,9 +16,13 @@
16
16
  "dist",
17
17
  "README.md"
18
18
  ],
19
+ "types": "./dist/index.d.ts",
19
20
  "main": "./dist/index.js",
20
21
  "exports": {
21
- ".": "./dist/index.js"
22
+ ".": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/index.js"
25
+ }
22
26
  },
23
27
  "devDependencies": {
24
28
  "@graphql-codegen/plugin-helpers": "^6.2.0",
@@ -34,7 +38,7 @@
34
38
  "node": ">=24.0.0"
35
39
  },
36
40
  "scripts": {
37
- "build": "tsup src/index.ts --format esm --dts",
41
+ "build": "tsup src/index.ts --format esm && pnpm exec tsc -p tsconfig.json --emitDeclarationOnly",
38
42
  "clean": "rm -rf dist node_modules .turbo *.tsbuildinfo"
39
43
  }
40
44
  }