@constructive-io/graphql-codegen 5.15.9 → 5.17.0
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 +0 -4
- package/core/codegen/cli/docs-generator.js +0 -2
- package/core/codegen/docs-utils.d.ts +0 -1
- package/core/codegen/docs-utils.js +0 -15
- package/core/codegen/hooks-docs-generator.js +0 -1
- package/core/codegen/orm/docs-generator.js +0 -1
- package/core/codegen/target-docs-generator.js +0 -2
- package/esm/core/codegen/cli/docs-generator.js +1 -3
- package/esm/core/codegen/docs-utils.d.ts +0 -1
- package/esm/core/codegen/docs-utils.js +0 -14
- package/esm/core/codegen/hooks-docs-generator.js +1 -2
- package/esm/core/codegen/orm/docs-generator.js +1 -2
- package/esm/core/codegen/target-docs-generator.js +1 -3
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -194,7 +194,6 @@ function generateReadme(tables, customOperations, toolName, registry) {
|
|
|
194
194
|
lines.push(`${toolName} --no-tty car create --name "Sedan" --year 2024`);
|
|
195
195
|
lines.push('```');
|
|
196
196
|
lines.push('');
|
|
197
|
-
lines.push(...(0, docs_utils_1.getReadmeFooter)());
|
|
198
197
|
return {
|
|
199
198
|
fileName: 'README.md',
|
|
200
199
|
content: lines.join('\n'),
|
|
@@ -799,7 +798,6 @@ function generateMultiTargetReadme(input) {
|
|
|
799
798
|
}
|
|
800
799
|
lines.push('```');
|
|
801
800
|
lines.push('');
|
|
802
|
-
lines.push(...(0, docs_utils_1.getReadmeFooter)());
|
|
803
801
|
return {
|
|
804
802
|
fileName: 'README.md',
|
|
805
803
|
content: lines.join('\n'),
|
|
@@ -25,7 +25,6 @@ export interface SkillReferenceDefinition {
|
|
|
25
25
|
language?: string;
|
|
26
26
|
}
|
|
27
27
|
export declare function getReadmeHeader(title: string): string[];
|
|
28
|
-
export declare function getReadmeFooter(): string[];
|
|
29
28
|
export declare function resolveDocsConfig(docs: DocsConfig | boolean | undefined): DocsConfig;
|
|
30
29
|
export declare function formatArgType(arg: Operation['args'][number]): string;
|
|
31
30
|
export declare function formatTypeRef(t: Operation['args'][number]['type']): string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getReadmeHeader = getReadmeHeader;
|
|
4
|
-
exports.getReadmeFooter = getReadmeFooter;
|
|
5
4
|
exports.resolveDocsConfig = resolveDocsConfig;
|
|
6
5
|
exports.formatArgType = formatArgType;
|
|
7
6
|
exports.formatTypeRef = formatTypeRef;
|
|
@@ -36,20 +35,6 @@ function getReadmeHeader(title) {
|
|
|
36
35
|
'',
|
|
37
36
|
];
|
|
38
37
|
}
|
|
39
|
-
function getReadmeFooter() {
|
|
40
|
-
return [
|
|
41
|
-
'---',
|
|
42
|
-
'',
|
|
43
|
-
'Built by the [Constructive](https://constructive.io) team.',
|
|
44
|
-
'',
|
|
45
|
-
'## Disclaimer',
|
|
46
|
-
'',
|
|
47
|
-
'AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.',
|
|
48
|
-
'',
|
|
49
|
-
'No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.',
|
|
50
|
-
'',
|
|
51
|
-
];
|
|
52
|
-
}
|
|
53
38
|
function resolveDocsConfig(docs) {
|
|
54
39
|
if (docs === true) {
|
|
55
40
|
return { readme: true, agents: true, skills: true };
|
|
@@ -70,7 +70,6 @@ function generateTargetReadme(options) {
|
|
|
70
70
|
lines.push('See [cli/README.md](./cli/README.md) for command reference.');
|
|
71
71
|
lines.push('');
|
|
72
72
|
}
|
|
73
|
-
lines.push(...(0, docs_utils_1.getReadmeFooter)());
|
|
74
73
|
return {
|
|
75
74
|
fileName: 'README.md',
|
|
76
75
|
content: lines.join('\n'),
|
|
@@ -89,7 +88,6 @@ function generateRootRootReadme(targets) {
|
|
|
89
88
|
lines.push(`| ${target.name} | ${endpoint} | ${gens} | [${target.output}/README.md](${target.output}/README.md) |`);
|
|
90
89
|
}
|
|
91
90
|
lines.push('');
|
|
92
|
-
lines.push(...(0, docs_utils_1.getReadmeFooter)());
|
|
93
91
|
return {
|
|
94
92
|
fileName: 'README.md',
|
|
95
93
|
content: lines.join('\n'),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toKebabCase } from 'inflekt';
|
|
2
|
-
import { buildSearchExamples, buildSearchExamplesMarkdown, buildSkillFile, buildSkillReference, buildSpecialFieldsMarkdown, categorizeSpecialFields, cleanTypeName, flattenArgs, flattenedArgsToFlags, getEditableFields,
|
|
2
|
+
import { buildSearchExamples, buildSearchExamplesMarkdown, buildSkillFile, buildSkillReference, buildSpecialFieldsMarkdown, categorizeSpecialFields, cleanTypeName, flattenArgs, flattenedArgsToFlags, getEditableFields, getReadmeHeader, } from '../docs-utils';
|
|
3
3
|
import { getPrimaryKeyInfo, getScalarFields, getTableNames, } from '../utils';
|
|
4
4
|
import { getFieldsWithDefaults } from './table-command-generator';
|
|
5
5
|
export { resolveDocsConfig } from '../docs-utils';
|
|
@@ -184,7 +184,6 @@ export function generateReadme(tables, customOperations, toolName, registry) {
|
|
|
184
184
|
lines.push(`${toolName} --no-tty car create --name "Sedan" --year 2024`);
|
|
185
185
|
lines.push('```');
|
|
186
186
|
lines.push('');
|
|
187
|
-
lines.push(...getReadmeFooter());
|
|
188
187
|
return {
|
|
189
188
|
fileName: 'README.md',
|
|
190
189
|
content: lines.join('\n'),
|
|
@@ -789,7 +788,6 @@ export function generateMultiTargetReadme(input) {
|
|
|
789
788
|
}
|
|
790
789
|
lines.push('```');
|
|
791
790
|
lines.push('');
|
|
792
|
-
lines.push(...getReadmeFooter());
|
|
793
791
|
return {
|
|
794
792
|
fileName: 'README.md',
|
|
795
793
|
content: lines.join('\n'),
|
|
@@ -25,7 +25,6 @@ export interface SkillReferenceDefinition {
|
|
|
25
25
|
language?: string;
|
|
26
26
|
}
|
|
27
27
|
export declare function getReadmeHeader(title: string): string[];
|
|
28
|
-
export declare function getReadmeFooter(): string[];
|
|
29
28
|
export declare function resolveDocsConfig(docs: DocsConfig | boolean | undefined): DocsConfig;
|
|
30
29
|
export declare function formatArgType(arg: Operation['args'][number]): string;
|
|
31
30
|
export declare function formatTypeRef(t: Operation['args'][number]['type']): string;
|
|
@@ -13,20 +13,6 @@ export function getReadmeHeader(title) {
|
|
|
13
13
|
'',
|
|
14
14
|
];
|
|
15
15
|
}
|
|
16
|
-
export function getReadmeFooter() {
|
|
17
|
-
return [
|
|
18
|
-
'---',
|
|
19
|
-
'',
|
|
20
|
-
'Built by the [Constructive](https://constructive.io) team.',
|
|
21
|
-
'',
|
|
22
|
-
'## Disclaimer',
|
|
23
|
-
'',
|
|
24
|
-
'AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.',
|
|
25
|
-
'',
|
|
26
|
-
'No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.',
|
|
27
|
-
'',
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
16
|
export function resolveDocsConfig(docs) {
|
|
31
17
|
if (docs === true) {
|
|
32
18
|
return { readme: true, agents: true, skills: true };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toKebabCase } from 'inflekt';
|
|
2
|
-
import { argPlaceholder, buildSkillFile, buildSkillReference, fieldPlaceholder, formatArgType,
|
|
2
|
+
import { argPlaceholder, buildSkillFile, buildSkillReference, fieldPlaceholder, formatArgType, getReadmeHeader, pkPlaceholder, } from './docs-utils';
|
|
3
3
|
import { getBulkCreateMutationHookName, getBulkDeleteMutationHookName, getBulkUpdateMutationHookName, getBulkUpsertMutationHookName, getCreateMutationHookName, getDeleteMutationHookName, getListQueryHookName, getPrimaryKeyInfo, getScalarFields, getSingleQueryHookName, getTableNames, getUpdateMutationHookName, hasValidPrimaryKey, ucFirst, } from './utils';
|
|
4
4
|
function getCustomHookName(op) {
|
|
5
5
|
if (op.kind === 'query') {
|
|
@@ -129,7 +129,6 @@ export function generateHooksReadme(tables, customOperations, registry) {
|
|
|
129
129
|
lines.push('');
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
lines.push(...getReadmeFooter());
|
|
133
132
|
return {
|
|
134
133
|
fileName: 'README.md',
|
|
135
134
|
content: lines.join('\n'),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toKebabCase } from 'inflekt';
|
|
2
|
-
import { argPlaceholder, buildSkillFile, buildSkillReference, buildSpecialFieldsMarkdown, categorizeSpecialFields, fieldPlaceholder, formatArgType, getEditableFields,
|
|
2
|
+
import { argPlaceholder, buildSkillFile, buildSkillReference, buildSpecialFieldsMarkdown, categorizeSpecialFields, fieldPlaceholder, formatArgType, getEditableFields, getReadmeHeader, pkPlaceholder, } from '../docs-utils';
|
|
3
3
|
import { getPrimaryKeyInfo, getScalarFields, getTableNames, lcFirst, } from '../utils';
|
|
4
4
|
export function generateOrmReadme(tables, customOperations, registry) {
|
|
5
5
|
const lines = [];
|
|
@@ -131,7 +131,6 @@ export function generateOrmReadme(tables, customOperations, registry) {
|
|
|
131
131
|
lines.push('');
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
lines.push(...getReadmeFooter());
|
|
135
134
|
return {
|
|
136
135
|
fileName: 'README.md',
|
|
137
136
|
content: lines.join('\n'),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getReadmeHeader } from './docs-utils';
|
|
2
2
|
export function generateTargetReadme(options) {
|
|
3
3
|
const { hasOrm, hasHooks, hasCli, tableCount, customQueryCount, customMutationCount, config, } = options;
|
|
4
4
|
const lines = [];
|
|
@@ -66,7 +66,6 @@ export function generateTargetReadme(options) {
|
|
|
66
66
|
lines.push('See [cli/README.md](./cli/README.md) for command reference.');
|
|
67
67
|
lines.push('');
|
|
68
68
|
}
|
|
69
|
-
lines.push(...getReadmeFooter());
|
|
70
69
|
return {
|
|
71
70
|
fileName: 'README.md',
|
|
72
71
|
content: lines.join('\n'),
|
|
@@ -85,7 +84,6 @@ export function generateRootRootReadme(targets) {
|
|
|
85
84
|
lines.push(`| ${target.name} | ${endpoint} | ${gens} | [${target.output}/README.md](${target.output}/README.md) |`);
|
|
86
85
|
}
|
|
87
86
|
lines.push('');
|
|
88
|
-
lines.push(...getReadmeFooter());
|
|
89
87
|
return {
|
|
90
88
|
fileName: 'README.md',
|
|
91
89
|
content: lines.join('\n'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-codegen",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.17.0",
|
|
4
4
|
"description": "GraphQL SDK generator for Constructive databases with React Query hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -56,24 +56,24 @@
|
|
|
56
56
|
"@0no-co/graphql.web": "^1.3.3",
|
|
57
57
|
"@babel/generator": "^7.29.1",
|
|
58
58
|
"@babel/types": "^7.29.0",
|
|
59
|
-
"@constructive-io/graphql-query": "^4.
|
|
60
|
-
"@constructive-io/graphql-types": "^3.
|
|
59
|
+
"@constructive-io/graphql-query": "^4.13.0",
|
|
60
|
+
"@constructive-io/graphql-types": "^3.29.0",
|
|
61
61
|
"@inquirerer/utils": "^3.3.12",
|
|
62
|
-
"@pgpmjs/core": "^7.
|
|
62
|
+
"@pgpmjs/core": "^7.26.0",
|
|
63
63
|
"ajv": "^8.20.0",
|
|
64
64
|
"deepmerge": "^4.3.1",
|
|
65
65
|
"find-and-require-package-json": "^0.9.1",
|
|
66
66
|
"gql-ast": "^3.23.0",
|
|
67
|
-
"graphile-schema": "^2.
|
|
67
|
+
"graphile-schema": "^2.13.0",
|
|
68
68
|
"graphql": "16.13.0",
|
|
69
69
|
"inflekt": "^0.8.1",
|
|
70
70
|
"inquirerer": "^4.9.3",
|
|
71
71
|
"jiti": "^2.7.0",
|
|
72
72
|
"oxfmt": "^0.51.0",
|
|
73
|
-
"pg-cache": "^3.
|
|
74
|
-
"pg-env": "^1.
|
|
75
|
-
"pgsql-client": "^4.
|
|
76
|
-
"pgsql-seed": "^3.
|
|
73
|
+
"pg-cache": "^3.26.0",
|
|
74
|
+
"pg-env": "^1.30.0",
|
|
75
|
+
"pgsql-client": "^4.12.0",
|
|
76
|
+
"pgsql-seed": "^3.11.0",
|
|
77
77
|
"query-spec": "^0.11.0",
|
|
78
78
|
"undici": "^8.3.0"
|
|
79
79
|
},
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"tsx": "^4.21.0",
|
|
102
102
|
"typescript": "^5.9.3"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "06bf3edad0d1d1dba9b44f17b8c791de6768576d"
|
|
105
105
|
}
|