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

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.
Files changed (3) hide show
  1. package/README.md +44 -0
  2. package/dist/index.js +1 -1
  3. package/package.json +12 -2
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # @corpdk/codegen-cli
2
+
3
+ GraphQL Code Generator **preset** that emits resolver typings and a TypedDocumentNode SDK aligned with CorpDK data services.
4
+
5
+ Configure it in your `codegen.ts` (or `codegen.yml`) alongside `@graphql-codegen/cli`. DAL DS apps run this after `dal-codegen` schema generation.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add -D @corpdk/codegen-cli
11
+ # or
12
+ npm install --save-dev @corpdk/codegen-cli
13
+ ```
14
+
15
+ Peer dependency: `graphql` ^16.
16
+
17
+ ## Example
18
+
19
+ ```ts
20
+ import type { CodegenConfig } from "@graphql-codegen/cli";
21
+
22
+ const config: CodegenConfig = {
23
+ schema: "./src/generated/generated-schema.ts",
24
+ generates: {
25
+ "../ds-sdk/src/": {
26
+ preset: "@corpdk/codegen-cli",
27
+ // …preset options from templates/ds-sdk
28
+ },
29
+ },
30
+ };
31
+
32
+ export default config;
33
+ ```
34
+
35
+ See [`templates/ds-sdk/codegen.ts`](https://github.com/CorpDK/coding-templates/blob/main/templates/ds-sdk/codegen.ts) in the monorepo for the canonical setup.
36
+
37
+ ## Documentation
38
+
39
+ - Package source: [`libraries/codegen-cli`](https://github.com/CorpDK/coding-templates/tree/main/libraries/codegen-cli)
40
+ - [Monorepo overview](https://github.com/CorpDK/coding-templates/blob/main/docs/developer/01-monorepo-overview.md)
41
+
42
+ ## License
43
+
44
+ MIT — see the [repository LICENSE](https://github.com/CorpDK/coding-templates/blob/main/LICENSE).
package/dist/index.js CHANGED
@@ -354,7 +354,7 @@ function generateCli(ops, config) {
354
354
  "#!/usr/bin/env node",
355
355
  "// @generated \u2014 do not edit manually",
356
356
  "// Regenerate by running: pnpm codegen (in your DS package)",
357
- "// Requires Node 18+ (fetch) and Node 22+ (WebSocket)",
357
+ "// Requires Node 24+ (fetch, WebSocket)",
358
358
  "",
359
359
  'import { parseArgs } from "node:util";',
360
360
  'import { readFileSync } from "node:fs";',
package/package.json CHANGED
@@ -1,13 +1,20 @@
1
1
  {
2
2
  "name": "@corpdk/codegen-cli",
3
- "version": "2026.10.0-alpha.1",
3
+ "version": "2026.10.0-alpha.4",
4
+ "description": "GraphQL Code Generator plugin for resolver types and TypedDocumentNode SDK output",
4
5
  "type": "module",
5
6
  "publishConfig": {
6
7
  "registry": "https://registry.npmjs.org/",
7
8
  "access": "public"
8
9
  },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/CorpDK/coding-templates.git",
13
+ "directory": "libraries/codegen-cli"
14
+ },
9
15
  "files": [
10
- "dist"
16
+ "dist",
17
+ "README.md"
11
18
  ],
12
19
  "main": "./dist/index.js",
13
20
  "exports": {
@@ -23,6 +30,9 @@
23
30
  "graphql": "^16.0.0"
24
31
  },
25
32
  "license": "MIT",
33
+ "engines": {
34
+ "node": ">=24.0.0"
35
+ },
26
36
  "scripts": {
27
37
  "build": "tsup src/index.ts --format esm --dts",
28
38
  "clean": "rm -rf dist node_modules .turbo *.tsbuildinfo"