@corpdk/dal-codegen 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 +31 -0
- package/package.json +10 -3
- package/dist/generated/entity-records.d.ts +0 -25
- package/dist/generated/entity-records.js +0 -2
- package/dist/generated/entity-records.js.map +0 -1
- package/dist/generated/graphql-codegen.mappers.d.ts +0 -6
- package/dist/generated/graphql-codegen.mappers.js +0 -8
- package/dist/generated/graphql-codegen.mappers.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @corpdk/dal-codegen
|
|
2
|
+
|
|
3
|
+
CLI that generates GraphQL SDL, repositories, resolvers, and pub/sub wiring from Drizzle schema files (`dal-codegen`, `dal-entity-lint`).
|
|
4
|
+
|
|
5
|
+
Typical pipeline in a DAL DS package:
|
|
6
|
+
|
|
7
|
+
1. `dal-codegen --mode=schema` — emit GraphQL schema and DAL stubs
|
|
8
|
+
2. `graphql-codegen` — SDK + resolver types (`@corpdk/codegen-cli`)
|
|
9
|
+
3. `dal-codegen --mode=impl` — emit repository and resolver implementations
|
|
10
|
+
|
|
11
|
+
Depends on `@corpdk/dal-core`.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add -D @corpdk/dal-codegen
|
|
17
|
+
# or
|
|
18
|
+
npm install --save-dev @corpdk/dal-codegen
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Binaries: `dal-codegen`, `dal-entity-lint`.
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
- [DAL automation upgrades (`create-ds`)](https://github.com/CorpDK/coding-templates/blob/main/docs/developer/ds-automation-upgrades.md)
|
|
26
|
+
- Reference DS template: [`templates/ds`](https://github.com/CorpDK/coding-templates/tree/main/templates/ds)
|
|
27
|
+
- Package source: [`libraries/dal-codegen`](https://github.com/CorpDK/coding-templates/tree/main/libraries/dal-codegen)
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
MIT — see the [repository LICENSE](https://github.com/CorpDK/coding-templates/blob/main/LICENSE).
|
package/package.json
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corpdk/dal-codegen",
|
|
3
|
-
"version": "2026.10.0-alpha.
|
|
3
|
+
"version": "2026.10.0-alpha.3",
|
|
4
|
+
"description": "Codegen CLI: Drizzle schema to GraphQL SDL, repositories, and resolvers",
|
|
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/dal-codegen"
|
|
14
|
+
},
|
|
9
15
|
"bin": {
|
|
10
16
|
"dal-codegen": "./dist/cli.js",
|
|
11
17
|
"dal-entity-lint": "./dist/lint-cli.js"
|
|
12
18
|
},
|
|
13
19
|
"files": [
|
|
14
|
-
"dist"
|
|
20
|
+
"dist",
|
|
21
|
+
"README.md"
|
|
15
22
|
],
|
|
16
23
|
"exports": {
|
|
17
24
|
".": {
|
|
@@ -24,7 +31,7 @@
|
|
|
24
31
|
"graphql": "^16.13.2",
|
|
25
32
|
"tsx": "^4.21.0",
|
|
26
33
|
"yaml": "^2.8.3",
|
|
27
|
-
"@corpdk/dal-core": "2026.10.0-alpha.
|
|
34
|
+
"@corpdk/dal-core": "2026.10.0-alpha.3"
|
|
28
35
|
},
|
|
29
36
|
"devDependencies": {
|
|
30
37
|
"@types/node": "^20.19.37",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type LabelRecord = {
|
|
2
|
-
id: string;
|
|
3
|
-
label: string;
|
|
4
|
-
createdAt: string;
|
|
5
|
-
updatedAt: string;
|
|
6
|
-
createdBy: string;
|
|
7
|
-
updatedBy: string;
|
|
8
|
-
};
|
|
9
|
-
export type UserLabelRecord = {
|
|
10
|
-
id: string;
|
|
11
|
-
userId: string;
|
|
12
|
-
labelId: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
createdBy: string;
|
|
16
|
-
updatedBy: string;
|
|
17
|
-
};
|
|
18
|
-
export type UserRecord = {
|
|
19
|
-
id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
createdAt: string;
|
|
22
|
-
updatedAt: string;
|
|
23
|
-
createdBy: string;
|
|
24
|
-
updatedBy: string;
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entity-records.js","sourceRoot":"","sources":["../../src/generated/entity-records.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/** Passed to graphql-codegen typescript-resolvers `mappers`. */
|
|
2
|
-
export declare const graphqlCodegenMappers: {
|
|
3
|
-
readonly Label: "../entity-records.js#LabelRecord";
|
|
4
|
-
readonly UserLabel: "../entity-records.js#UserLabelRecord";
|
|
5
|
-
readonly User: "../entity-records.js#UserRecord";
|
|
6
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// AUTO-GENERATED by @corpdk/dal-codegen — do not edit
|
|
2
|
-
/** Passed to graphql-codegen typescript-resolvers `mappers`. */
|
|
3
|
-
export const graphqlCodegenMappers = {
|
|
4
|
-
Label: "../entity-records.js#LabelRecord",
|
|
5
|
-
UserLabel: "../entity-records.js#UserLabelRecord",
|
|
6
|
-
User: "../entity-records.js#UserRecord",
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=graphql-codegen.mappers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-codegen.mappers.js","sourceRoot":"","sources":["../../src/generated/graphql-codegen.mappers.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,gEAAgE;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,kCAAkC;IACzC,SAAS,EAAE,sCAAsC;IACjD,IAAI,EAAE,iCAAiC;CACE,CAAC"}
|