@constructive-io/cli 5.6.21 → 5.6.22
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/commands/codegen.js +15 -21
- package/esm/commands/codegen.js +15 -21
- package/package.json +6 -6
package/commands/codegen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const generate_1 = require("@constructive-io/graphql-codegen/cli/commands/generate");
|
|
4
4
|
const usage = `
|
|
5
5
|
Constructive GraphQL Codegen:
|
|
6
6
|
|
|
@@ -20,29 +20,23 @@ exports.default = async (argv, _prompter, _options) => {
|
|
|
20
20
|
console.log(usage);
|
|
21
21
|
process.exit(0);
|
|
22
22
|
}
|
|
23
|
-
const cwd = argv.cwd || process.cwd();
|
|
24
23
|
const endpoint = argv.endpoint || '';
|
|
25
|
-
const outDir = argv.out || '
|
|
24
|
+
const outDir = argv.out || 'codegen';
|
|
26
25
|
const auth = argv.auth || '';
|
|
27
26
|
const configPath = argv.config || '';
|
|
28
27
|
const dryRun = !!(argv['dry-run'] || argv.dryRun);
|
|
29
28
|
const verbose = !!(argv.verbose || argv.v);
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (verbose)
|
|
44
|
-
args.push('-v');
|
|
45
|
-
const res = (0, child_process_1.spawnSync)(process.execPath, [bin, ...args], { cwd, stdio: 'inherit' });
|
|
46
|
-
if ((res.status ?? 0) !== 0)
|
|
47
|
-
process.exit(res.status ?? 1);
|
|
29
|
+
const result = await (0, generate_1.generateCommand)({
|
|
30
|
+
config: configPath,
|
|
31
|
+
endpoint,
|
|
32
|
+
output: outDir,
|
|
33
|
+
authorization: auth,
|
|
34
|
+
verbose,
|
|
35
|
+
dryRun,
|
|
36
|
+
});
|
|
37
|
+
if (!result.success) {
|
|
38
|
+
console.error('x', result.message);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
console.log('[ok]', result.message);
|
|
48
42
|
};
|
package/esm/commands/codegen.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { generateCommand } from '@constructive-io/graphql-codegen/cli/commands/generate';
|
|
2
2
|
const usage = `
|
|
3
3
|
Constructive GraphQL Codegen:
|
|
4
4
|
|
|
@@ -18,29 +18,23 @@ export default async (argv, _prompter, _options) => {
|
|
|
18
18
|
console.log(usage);
|
|
19
19
|
process.exit(0);
|
|
20
20
|
}
|
|
21
|
-
const cwd = argv.cwd || process.cwd();
|
|
22
21
|
const endpoint = argv.endpoint || '';
|
|
23
|
-
const outDir = argv.out || '
|
|
22
|
+
const outDir = argv.out || 'codegen';
|
|
24
23
|
const auth = argv.auth || '';
|
|
25
24
|
const configPath = argv.config || '';
|
|
26
25
|
const dryRun = !!(argv['dry-run'] || argv.dryRun);
|
|
27
26
|
const verbose = !!(argv.verbose || argv.v);
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (verbose)
|
|
42
|
-
args.push('-v');
|
|
43
|
-
const res = spawnSync(process.execPath, [bin, ...args], { cwd, stdio: 'inherit' });
|
|
44
|
-
if ((res.status ?? 0) !== 0)
|
|
45
|
-
process.exit(res.status ?? 1);
|
|
27
|
+
const result = await generateCommand({
|
|
28
|
+
config: configPath,
|
|
29
|
+
endpoint,
|
|
30
|
+
output: outDir,
|
|
31
|
+
authorization: auth,
|
|
32
|
+
verbose,
|
|
33
|
+
dryRun,
|
|
34
|
+
});
|
|
35
|
+
if (!result.success) {
|
|
36
|
+
console.error('x', result.message);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
console.log('[ok]', result.message);
|
|
46
40
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/cli",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.22",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive CLI",
|
|
6
6
|
"main": "index.js",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@constructive-io/graphql-codegen": "^2.23.3",
|
|
50
50
|
"@constructive-io/graphql-env": "^2.8.19",
|
|
51
|
-
"@constructive-io/graphql-explorer": "^2.13.
|
|
52
|
-
"@constructive-io/graphql-server": "^2.16.
|
|
51
|
+
"@constructive-io/graphql-explorer": "^2.13.16",
|
|
52
|
+
"@constructive-io/graphql-server": "^2.16.1",
|
|
53
53
|
"@inquirerer/utils": "^3.1.3",
|
|
54
|
-
"@pgpmjs/core": "^4.
|
|
54
|
+
"@pgpmjs/core": "^4.15.0",
|
|
55
55
|
"@pgpmjs/logger": "^1.3.7",
|
|
56
56
|
"@pgpmjs/server-utils": "^2.8.15",
|
|
57
57
|
"@pgpmjs/types": "^2.14.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"minimist": "^1.2.8",
|
|
62
62
|
"pg-cache": "^1.6.15",
|
|
63
63
|
"pg-env": "^1.2.5",
|
|
64
|
-
"pgpm": "^2.10.
|
|
64
|
+
"pgpm": "^2.10.14",
|
|
65
65
|
"shelljs": "^0.10.0",
|
|
66
66
|
"yanse": "^0.1.11"
|
|
67
67
|
},
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"postgres",
|
|
77
77
|
"graphile"
|
|
78
78
|
],
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "15e8f92ee6ec7bfebd6647dec743e4235b0362ac"
|
|
80
80
|
}
|