@corpdk/codegen-cli 2026.10.0-alpha.1 → 2026.10.0-alpha.3
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/README.md +44 -0
- package/package.json +9 -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/package.json
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corpdk/codegen-cli",
|
|
3
|
-
"version": "2026.10.0-alpha.
|
|
3
|
+
"version": "2026.10.0-alpha.3",
|
|
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": {
|