Skip to content

Commit 6c48e89

Browse files
committed
fix: use HTML comments for @generated markers in markdown, rename 'Generated SDK'
1 parent 69227ad commit 6c48e89

8 files changed

Lines changed: 43 additions & 43 deletions

File tree

graphql/codegen/src/__tests__/codegen/__snapshots__/cli-generator.test.ts.snap

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`cli docs generator generates CLI AGENTS.md 1`] = `
44
"# myapp CLI - Agent Reference
55

6-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
6+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
77
> This document is structured for LLM/agent consumption.
88

99
## OVERVIEW
@@ -218,7 +218,7 @@ exports[`cli docs generator generates CLI README 1`] = `
218218
<img height="120" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
219219
</p>
220220

221-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
221+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
222222

223223
## Setup
224224

@@ -364,7 +364,7 @@ No developer or entity involved in creating this software will be liable for any
364364
exports[`cli docs generator generates CLI skill files 1`] = `
365365
"# myapp-context
366366

367-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
367+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
368368

369369
Manage API endpoint contexts for myapp
370370

@@ -398,7 +398,7 @@ myapp context list
398398
exports[`cli docs generator generates CLI skill files 2`] = `
399399
"# myapp-auth
400400

401-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
401+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
402402

403403
Manage authentication tokens for myapp
404404

@@ -429,7 +429,7 @@ myapp auth status
429429
exports[`cli docs generator generates CLI skill files 3`] = `
430430
"# myapp-car
431431

432-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
432+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
433433

434434
CRUD operations for Car records via myapp CLI
435435

@@ -480,7 +480,7 @@ myapp car delete --id <value>
480480
exports[`cli docs generator generates CLI skill files 4`] = `
481481
"# myapp-driver
482482

483-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
483+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
484484

485485
CRUD operations for Driver records via myapp CLI
486486

@@ -531,7 +531,7 @@ myapp driver delete --id <value>
531531
exports[`cli docs generator generates CLI skill files 5`] = `
532532
"# myapp-current-user
533533

534-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
534+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
535535

536536
Get the currently authenticated user
537537

@@ -554,7 +554,7 @@ myapp current-user
554554
exports[`cli docs generator generates CLI skill files 6`] = `
555555
"# myapp-login
556556

557-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
557+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
558558

559559
Authenticate a user
560560

@@ -1455,7 +1455,7 @@ export function getClient(contextName?: string) {
14551455
exports[`hooks docs generator generates hooks AGENTS.md 1`] = `
14561456
"# React Query Hooks - Agent Reference
14571457

1458-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
1458+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
14591459
> This document is structured for LLM/agent consumption.
14601460

14611461
## OVERVIEW
@@ -1662,7 +1662,7 @@ exports[`hooks docs generator generates hooks README 1`] = `
16621662
<img height="120" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
16631663
</p>
16641664

1665-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
1665+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
16661666

16671667
## Setup
16681668

@@ -1783,7 +1783,7 @@ No developer or entity involved in creating this software will be liable for any
17831783
exports[`hooks docs generator generates hooks skill files 1`] = `
17841784
"# hooks-car
17851785

1786-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
1786+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
17871787

17881788
React Query hooks for Car data operations
17891789

@@ -1821,7 +1821,7 @@ mutate({ make: '<value>', model: '<value>', year: '<value>', isElectric: '<value
18211821
exports[`hooks docs generator generates hooks skill files 2`] = `
18221822
"# hooks-driver
18231823

1824-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
1824+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
18251825

18261826
React Query hooks for Driver data operations
18271827

@@ -1859,7 +1859,7 @@ mutate({ name: '<value>', licenseNumber: '<value>' });
18591859
exports[`hooks docs generator generates hooks skill files 3`] = `
18601860
"# hooks-currentUser
18611861

1862-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
1862+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
18631863

18641864
Get the currently authenticated user
18651865

@@ -1882,7 +1882,7 @@ const { data, isLoading } = useCurrentUserQuery();
18821882
exports[`hooks docs generator generates hooks skill files 4`] = `
18831883
"# hooks-login
18841884

1885-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
1885+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
18861886

18871887
Authenticate a user
18881888

@@ -1906,7 +1906,7 @@ mutate({ email: '<value>', password: '<value>' });
19061906
exports[`multi-target cli docs generates multi-target AGENTS.md 1`] = `
19071907
"# myapp CLI - Agent Reference
19081908

1909-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
1909+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
19101910
> This document is structured for LLM/agent consumption.
19111911

19121912
## OVERVIEW
@@ -2680,7 +2680,7 @@ exports[`multi-target cli docs generates multi-target README 1`] = `
26802680
<img height="120" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
26812681
</p>
26822682

2683-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
2683+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
26842684

26852685
## Setup
26862686

@@ -2907,7 +2907,7 @@ exports[`multi-target cli docs generates multi-target skills 1`] = `
29072907
{
29082908
"content": "# myapp-context
29092909

2910-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
2910+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
29112911

29122912
Manage API endpoint contexts for myapp (multi-target: auth, members, app)
29132913

@@ -2949,7 +2949,7 @@ myapp context use staging
29492949
{
29502950
"content": "# myapp-credentials
29512951

2952-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
2952+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
29532953

29542954
Manage authentication tokens for myapp (shared across all targets)
29552955

@@ -2980,7 +2980,7 @@ myapp credentials status
29802980
{
29812981
"content": "# myapp-auth:user
29822982

2983-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
2983+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
29842984

29852985
CRUD operations for User records via myapp CLI (auth target)
29862986

@@ -3019,7 +3019,7 @@ myapp auth:user get --id <value>
30193019
{
30203020
"content": "# myapp-auth:current-user
30213021

3022-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
3022+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
30233023

30243024
Get the currently authenticated user (auth target)
30253025

@@ -3042,7 +3042,7 @@ myapp auth:current-user
30423042
{
30433043
"content": "# myapp-auth:login
30443044

3045-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
3045+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
30463046

30473047
Authenticate a user (auth target)
30483048

@@ -3066,7 +3066,7 @@ myapp auth:login --email <value> --password <value>
30663066
{
30673067
"content": "# myapp-members:member
30683068

3069-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
3069+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
30703070

30713071
CRUD operations for Member records via myapp CLI (members target)
30723072

@@ -3105,7 +3105,7 @@ myapp members:member get --id <value>
31053105
{
31063106
"content": "# myapp-app:car
31073107

3108-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
3108+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
31093109

31103110
CRUD operations for Car records via myapp CLI (app target)
31113111

@@ -4235,7 +4235,7 @@ async function handleDelete(argv: Partial<Record<string, unknown>>, prompter: In
42354235
exports[`orm docs generator generates ORM AGENTS.md 1`] = `
42364236
"# ORM Client - Agent Reference
42374237

4238-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
4238+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
42394239
> This document is structured for LLM/agent consumption.
42404240

42414241
## OVERVIEW
@@ -4373,7 +4373,7 @@ exports[`orm docs generator generates ORM README 1`] = `
43734373
<img height="120" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
43744374
</p>
43754375

4376-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
4376+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
43774377

43784378
## Setup
43794379

@@ -4504,7 +4504,7 @@ No developer or entity involved in creating this software will be liable for any
45044504
exports[`orm docs generator generates ORM skill files 1`] = `
45054505
"# orm-car
45064506

4507-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
4507+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
45084508

45094509
ORM operations for Car records
45104510

@@ -4542,7 +4542,7 @@ const item = await db.car.create({
45424542
exports[`orm docs generator generates ORM skill files 2`] = `
45434543
"# orm-driver
45444544

4545-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
4545+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
45464546

45474547
ORM operations for Driver records
45484548

@@ -4580,7 +4580,7 @@ const item = await db.driver.create({
45804580
exports[`orm docs generator generates ORM skill files 3`] = `
45814581
"# orm-currentUser
45824582

4583-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
4583+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
45844584

45854585
Get the currently authenticated user
45864586

@@ -4603,7 +4603,7 @@ const result = await db.query.currentUser().execute();
46034603
exports[`orm docs generator generates ORM skill files 4`] = `
46044604
"# orm-login
46054605

4606-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
4606+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
46074607

46084608
Authenticate a user
46094609

@@ -5334,7 +5334,7 @@ exports[`target docs generator generates per-target README 1`] = `
53345334
<img height="120" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
53355335
</p>
53365336

5337-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
5337+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
53385338

53395339
## Overview
53405340

@@ -5398,7 +5398,7 @@ exports[`target docs generator generates root-root README for multi-target 1`] =
53985398
<img height="120" src="https://raw.githubusercontent.com/constructive-io/constructive/refs/heads/main/assets/outline-logo.svg" />
53995399
</p>
54005400

5401-
> @generated by @constructive-io/graphql-codegen - DO NOT EDIT
5401+
<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->
54025402

54035403
## APIs
54045404

graphql/codegen/src/__tests__/codegen/__snapshots__/react-query-hooks.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export * from "./useSearchUsersQuery";"
2828

2929
exports[`Barrel File Generators generateMainBarrel generates main barrel with all options enabled 1`] = `
3030
"/**
31-
* Auto-generated GraphQL SDK
31+
* GraphQL SDK
3232
* @generated by @constructive-io/graphql-codegen
3333
*
3434
* Tables: User, Post
@@ -70,7 +70,7 @@ export * from "./mutations";"
7070

7171
exports[`Barrel File Generators generateMainBarrel generates main barrel without custom operations 1`] = `
7272
"/**
73-
* Auto-generated GraphQL SDK
73+
* GraphQL SDK
7474
* @generated by @constructive-io/graphql-codegen
7575
*
7676
* Tables: User
@@ -109,7 +109,7 @@ export * from "./mutations";"
109109

110110
exports[`Barrel File Generators generateMainBarrel generates main barrel without mutations 1`] = `
111111
"/**
112-
* Auto-generated GraphQL SDK
112+
* GraphQL SDK
113113
* @generated by @constructive-io/graphql-codegen
114114
*
115115
* Tables: User, Post

graphql/codegen/src/core/codegen/barrel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export function generateMainBarrel(
150150
// Add file header as leading comment on first statement
151151
if (statements.length > 0) {
152152
addJSDocComment(statements[0], [
153-
'Auto-generated GraphQL SDK',
153+
'GraphQL SDK',
154154
'@generated by @constructive-io/graphql-codegen',
155155
'',
156156
`Tables: ${tableNames}`,
@@ -222,7 +222,7 @@ export function generateRootBarrel(options: RootBarrelOptions = {}): string {
222222
// Add file headeras leading comment on first statement
223223
if (statements.length > 0) {
224224
addJSDocComment(statements[0], [
225-
'Generated SDK - auto-generated, do not edit',
225+
'GraphQL SDK - auto-generated, do not edit',
226226
'@generated by @constructive-io/graphql-codegen',
227227
]);
228228
}

graphql/codegen/src/core/codegen/cli/docs-generator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export function generateAgentsDocs(
172172

173173
lines.push(`# ${toolName} CLI - Agent Reference`);
174174
lines.push('');
175-
lines.push('> @generated by @constructive-io/graphql-codegen - DO NOT EDIT');
175+
lines.push('<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->');
176176
lines.push('> This document is structured for LLM/agent consumption.');
177177
lines.push('');
178178

@@ -950,7 +950,7 @@ export function generateMultiTargetAgentsDocs(
950950

951951
lines.push(`# ${toolName} CLI - Agent Reference`);
952952
lines.push('');
953-
lines.push('> @generated by @constructive-io/graphql-codegen - DO NOT EDIT');
953+
lines.push('<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->');
954954
lines.push('> This document is structured for LLM/agent consumption.');
955955
lines.push('');
956956

graphql/codegen/src/core/codegen/docs-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function getReadmeHeader(title: string): string[] {
3535
` <img height="120" src="${CONSTRUCTIVE_LOGO_URL}" />`,
3636
'</p>',
3737
'',
38-
`> @generated by @constructive-io/graphql-codegen - DO NOT EDIT`,
38+
`<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->`,
3939
'',
4040
];
4141
}
@@ -125,7 +125,7 @@ export function buildSkillFile(skill: SkillDefinition): string {
125125

126126
lines.push(`# ${skill.name}`);
127127
lines.push('');
128-
lines.push('> @generated by @constructive-io/graphql-codegen - DO NOT EDIT');
128+
lines.push('<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->');
129129
lines.push('');
130130
lines.push(skill.description);
131131
lines.push('');

graphql/codegen/src/core/codegen/hooks-docs-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export function generateHooksAgentsDocs(
184184

185185
lines.push('# React Query Hooks - Agent Reference');
186186
lines.push('');
187-
lines.push('> @generated by @constructive-io/graphql-codegen - DO NOT EDIT');
187+
lines.push('<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->');
188188
lines.push('> This document is structured for LLM/agent consumption.');
189189
lines.push('');
190190

graphql/codegen/src/core/codegen/orm/docs-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export function generateOrmAgentsDocs(
157157

158158
lines.push('# ORM Client - Agent Reference');
159159
lines.push('');
160-
lines.push('> @generated by @constructive-io/graphql-codegen - DO NOT EDIT');
160+
lines.push('<!-- @constructive-io/graphql-codegen - DO NOT EDIT -->');
161161
lines.push('> This document is structured for LLM/agent consumption.');
162162
lines.push('');
163163

graphql/codegen/src/core/codegen/shared/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function generateSharedBarrel(hasSchemaTypes: boolean): string {
124124
// Add file header as leading comment on first statement
125125
if (statements.length > 0) {
126126
addJSDocComment(statements[0], [
127-
'Shared types - auto-generated, do not edit',
127+
'Shared types - do not edit',
128128
'@generated by @constructive-io/graphql-codegen',
129129
]);
130130
}

0 commit comments

Comments
 (0)