@constructive-io/graphql-codegen 2.27.3 → 2.28.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/cli/index.d.ts +1 -2
- package/cli/index.js +4 -6
- package/esm/cli/index.d.ts +1 -2
- package/esm/cli/index.js +3 -5
- package/package.json +10 -12
package/cli/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CLI entry point for graphql-codegen
|
|
4
4
|
*/
|
|
5
|
-
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
6
|
-
import { ParsedArgs } from 'minimist';
|
|
5
|
+
import { CLIOptions, Inquirerer, ParsedArgs } from 'inquirerer';
|
|
7
6
|
export declare const commands: (argv: Partial<ParsedArgs>, prompter: Inquirerer, _options: CLIOptions) => Promise<Partial<ParsedArgs>>;
|
|
8
7
|
export declare const options: Partial<CLIOptions>;
|
package/cli/index.js
CHANGED
|
@@ -38,8 +38,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
})();
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
exports.options = exports.commands = void 0;
|
|
41
|
-
const find_and_require_package_json_1 = require("find-and-require-package-json");
|
|
42
|
-
const utils_1 = require("@inquirerer/utils");
|
|
43
41
|
const inquirerer_1 = require("inquirerer");
|
|
44
42
|
const init_1 = require("./commands/init");
|
|
45
43
|
const generate_1 = require("./commands/generate");
|
|
@@ -548,11 +546,11 @@ const createCommandMap = () => {
|
|
|
548
546
|
};
|
|
549
547
|
const commands = async (argv, prompter, _options) => {
|
|
550
548
|
if (argv.version || argv.v) {
|
|
551
|
-
const pkg = (0,
|
|
549
|
+
const pkg = (0, inquirerer_1.getPackageJson)(__dirname);
|
|
552
550
|
console.log(pkg.version);
|
|
553
551
|
process.exit(0);
|
|
554
552
|
}
|
|
555
|
-
const { first: command, newArgv } = (0,
|
|
553
|
+
const { first: command, newArgv } = (0, inquirerer_1.extractFirst)(argv);
|
|
556
554
|
if ((argv.help || argv.h) && !command) {
|
|
557
555
|
console.log(usageText);
|
|
558
556
|
process.exit(0);
|
|
@@ -582,7 +580,7 @@ const commands = async (argv, prompter, _options) => {
|
|
|
582
580
|
const commandFn = commandMap[command];
|
|
583
581
|
if (!commandFn) {
|
|
584
582
|
console.log(usageText);
|
|
585
|
-
await (0,
|
|
583
|
+
await (0, inquirerer_1.cliExitWithError)(`Unknown command: ${command}`);
|
|
586
584
|
}
|
|
587
585
|
await commandFn(newArgv);
|
|
588
586
|
prompter.close();
|
|
@@ -613,7 +611,7 @@ exports.options = {
|
|
|
613
611
|
};
|
|
614
612
|
if (require.main === module) {
|
|
615
613
|
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
616
|
-
const pkg = (0,
|
|
614
|
+
const pkg = (0, inquirerer_1.getPackageJson)(__dirname);
|
|
617
615
|
console.log(pkg.version);
|
|
618
616
|
process.exit(0);
|
|
619
617
|
}
|
package/esm/cli/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CLI entry point for graphql-codegen
|
|
4
4
|
*/
|
|
5
|
-
import { CLIOptions, Inquirerer } from 'inquirerer';
|
|
6
|
-
import { ParsedArgs } from 'minimist';
|
|
5
|
+
import { CLIOptions, Inquirerer, ParsedArgs } from 'inquirerer';
|
|
7
6
|
export declare const commands: (argv: Partial<ParsedArgs>, prompter: Inquirerer, _options: CLIOptions) => Promise<Partial<ParsedArgs>>;
|
|
8
7
|
export declare const options: Partial<CLIOptions>;
|
package/esm/cli/index.js
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* CLI entry point for graphql-codegen
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import { cliExitWithError, extractFirst } from '@inquirerer/utils';
|
|
7
|
-
import { CLI } from 'inquirerer';
|
|
5
|
+
import { CLI, cliExitWithError, extractFirst, getPackageJson } from 'inquirerer';
|
|
8
6
|
import { initCommand, findConfigFile, loadConfigFile } from './commands/init';
|
|
9
7
|
import { generateCommand } from './commands/generate';
|
|
10
8
|
import { generateOrmCommand } from './commands/generate-orm';
|
|
@@ -512,7 +510,7 @@ const createCommandMap = () => {
|
|
|
512
510
|
};
|
|
513
511
|
export const commands = async (argv, prompter, _options) => {
|
|
514
512
|
if (argv.version || argv.v) {
|
|
515
|
-
const pkg =
|
|
513
|
+
const pkg = getPackageJson(__dirname);
|
|
516
514
|
console.log(pkg.version);
|
|
517
515
|
process.exit(0);
|
|
518
516
|
}
|
|
@@ -576,7 +574,7 @@ export const options = {
|
|
|
576
574
|
};
|
|
577
575
|
if (require.main === module) {
|
|
578
576
|
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
579
|
-
const pkg =
|
|
577
|
+
const pkg = getPackageJson(__dirname);
|
|
580
578
|
console.log(pkg.version);
|
|
581
579
|
process.exit(0);
|
|
582
580
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-codegen",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.28.0",
|
|
4
4
|
"description": "CLI-based GraphQL SDK generator for PostGraphile endpoints with React Query hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -54,15 +54,14 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@babel/generator": "^7.28.6",
|
|
56
56
|
"@babel/types": "^7.28.6",
|
|
57
|
-
"@inquirerer/utils": "^3.
|
|
57
|
+
"@inquirerer/utils": "^3.2.0",
|
|
58
58
|
"ajv": "^8.17.1",
|
|
59
|
-
"find-and-require-package-json": "^0.
|
|
59
|
+
"find-and-require-package-json": "^0.9.0",
|
|
60
60
|
"gql-ast": "^2.6.0",
|
|
61
61
|
"graphql": "15.10.1",
|
|
62
|
-
"inflekt": "^0.
|
|
63
|
-
"inquirerer": "^4.
|
|
62
|
+
"inflekt": "^0.3.0",
|
|
63
|
+
"inquirerer": "^4.4.0",
|
|
64
64
|
"jiti": "^2.6.1",
|
|
65
|
-
"minimist": "^1.2.8",
|
|
66
65
|
"oxfmt": "^0.13.0"
|
|
67
66
|
},
|
|
68
67
|
"peerDependencies": {
|
|
@@ -78,17 +77,16 @@
|
|
|
78
77
|
}
|
|
79
78
|
},
|
|
80
79
|
"devDependencies": {
|
|
81
|
-
"@tanstack/react-query": "^5.90.
|
|
80
|
+
"@tanstack/react-query": "^5.90.19",
|
|
82
81
|
"@types/babel__generator": "^7.27.0",
|
|
83
|
-
"@types/jest": "^
|
|
84
|
-
"@types/minimist": "^1.2.5",
|
|
82
|
+
"@types/jest": "^30.0.0",
|
|
85
83
|
"@types/node": "^20.19.27",
|
|
86
|
-
"@types/react": "^19.2.
|
|
87
|
-
"jest": "^
|
|
84
|
+
"@types/react": "^19.2.8",
|
|
85
|
+
"jest": "^30.2.0",
|
|
88
86
|
"react": "^19.2.3",
|
|
89
87
|
"ts-jest": "^29.2.5",
|
|
90
88
|
"tsx": "^4.21.0",
|
|
91
89
|
"typescript": "^5.9.3"
|
|
92
90
|
},
|
|
93
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "ec2b5f644c479626305ef85a05a6e7105c2c58cd"
|
|
94
92
|
}
|