@constructive-io/cli 5.11.1 → 6.0.1

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.
@@ -1,3 +1,3 @@
1
- import { CLIOptions, Inquirerer, ParsedArgs } from 'inquirerer';
2
- declare const _default: (argv: Partial<ParsedArgs>, _prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
1
+ import { CLIOptions, Inquirerer } from 'inquirerer';
2
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
3
3
  export default _default;
@@ -1,167 +1,60 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
- const fs = __importStar(require("node:fs"));
37
- const path = __importStar(require("node:path"));
38
- const graphql_server_1 = require("@constructive-io/graphql-server");
39
3
  const graphql_codegen_1 = require("@constructive-io/graphql-codegen");
40
- const graphql_env_1 = require("@constructive-io/graphql-env");
41
4
  const usage = `
42
5
  Constructive GraphQL Codegen:
43
6
 
44
7
  cnc codegen [OPTIONS]
45
8
 
46
- Options:
47
- --help, -h Show this help message
9
+ Source Options (choose one):
48
10
  --config <path> Path to graphql-codegen config file
49
- --target <name> Target name in config file
50
11
  --endpoint <url> GraphQL endpoint URL
51
- --auth <token> Authorization header value (e.g., "Bearer 123")
52
- --out <dir> Output directory (default: codegen)
53
- --dry-run Preview without writing files
54
- -v, --verbose Verbose output
12
+ --schemaFile <path> Path to GraphQL schema file
55
13
 
56
- --orm Generate Prisma-like ORM client instead of React Query hooks
14
+ Database Options:
15
+ --schemas <list> Comma-separated PostgreSQL schemas
16
+ --apiNames <list> Comma-separated API names
57
17
 
58
- --database <name> Database override for DB mode (defaults to PGDATABASE)
59
- --schemas <list> Comma-separated schemas (required for DB mode)
18
+ Generator Options:
19
+ --reactQuery Generate React Query hooks (default)
20
+ --orm Generate ORM client
21
+ --output <dir> Output directory (default: codegen)
22
+ --authorization <token> Authorization header value
23
+ --dryRun Preview without writing files
24
+ --verbose Verbose output
25
+
26
+ --help, -h Show this help message
60
27
  `;
61
- exports.default = async (argv, _prompter, _options) => {
28
+ exports.default = async (argv, prompter, _options) => {
62
29
  if (argv.help || argv.h) {
63
30
  console.log(usage);
64
31
  process.exit(0);
65
32
  }
66
- const opts = parseArgs(argv);
67
- const mode = determineMode(opts);
68
- if (mode.type === 'none') {
69
- console.error('Error: No source specified. Use --endpoint, --config, or --schemas for database mode.');
70
- process.exit(1);
71
- }
72
- // Build schema from database if needed
73
- const outDir = opts.output || 'codegen';
74
- const schemaPath = mode.type === 'database'
75
- ? await buildSchemaFromDatabase(mode.database, mode.schemas, outDir)
76
- : undefined;
77
- const commandOptions = {
78
- config: opts.config,
79
- target: opts.target,
80
- endpoint: mode.type === 'endpoint' ? mode.endpoint : undefined,
81
- schema: schemaPath,
82
- output: opts.config ? opts.output : outDir,
83
- authorization: opts.auth,
84
- verbose: opts.verbose,
85
- dryRun: opts.dryRun,
86
- };
87
- const result = opts.orm
88
- ? await (0, graphql_codegen_1.generateOrm)(commandOptions)
89
- : await (0, graphql_codegen_1.generateReactQuery)(commandOptions);
90
- printResult(result);
91
- if (!result.success) {
92
- process.exit(1);
93
- }
94
- };
95
- function parseArgs(argv) {
96
- const schemasArg = argv.schemas || '';
97
- return {
98
- endpoint: argv.endpoint || undefined,
99
- config: argv.config || (0, graphql_codegen_1.findConfigFile)() || undefined,
100
- target: argv.target || undefined,
101
- output: argv.out || undefined,
102
- auth: argv.auth || undefined,
103
- database: argv.database || undefined,
104
- schemas: schemasArg
105
- ? schemasArg.split(',').map((s) => s.trim()).filter(Boolean)
106
- : undefined,
107
- dryRun: !!(argv['dry-run'] || argv.dryRun),
108
- verbose: !!(argv.verbose || argv.v),
109
- orm: !!argv.orm,
110
- };
111
- }
112
- function determineMode(opts) {
113
- if (opts.endpoint) {
114
- return { type: 'endpoint', endpoint: opts.endpoint };
115
- }
116
- if (opts.schemas?.length) {
117
- const database = opts.database || (0, graphql_env_1.getEnvOptions)().pg.database;
118
- return { type: 'database', database, schemas: opts.schemas };
119
- }
120
- if (opts.config) {
121
- return { type: 'config', configPath: opts.config };
122
- }
123
- return { type: 'none' };
124
- }
125
- function printTargetResult(target) {
126
- const status = target.success ? '[ok]' : 'x';
127
- console.log(`\n${status} ${target.message}`);
128
- if (target.tables?.length) {
129
- console.log(' Tables:');
130
- target.tables.forEach((t) => console.log(` - ${t}`));
131
- }
132
- if (target.filesWritten?.length) {
133
- console.log(' Files written:');
134
- target.filesWritten.forEach((f) => console.log(` - ${f}`));
135
- }
136
- if (!target.success && target.errors?.length) {
137
- target.errors.forEach((e) => console.error(` - ${e}`));
138
- }
139
- }
140
- function printResult(result) {
141
- const targets = result.targets ?? [];
142
- const isMultiTarget = targets.length > 1 || (targets.length === 1 && targets[0]?.name !== 'default');
143
- if (isMultiTarget) {
144
- console.log(result.message);
145
- targets.forEach(printTargetResult);
33
+ // Auto-detect config file if not provided
34
+ const config = argv.config || (0, graphql_codegen_1.findConfigFile)();
35
+ if (config) {
36
+ // If config file exists, just run generate with it (config file handles everything)
37
+ const result = await (0, graphql_codegen_1.generate)({});
38
+ (0, graphql_codegen_1.printResult)(result);
146
39
  return;
147
40
  }
148
- if (!result.success) {
149
- console.error(result.message);
150
- result.errors?.forEach((e) => console.error(' -', e));
151
- }
152
- else {
153
- console.log(result.message);
154
- result.filesWritten?.forEach((f) => console.log(f));
155
- }
156
- }
157
- async function buildSchemaFromDatabase(database, schemas, outDir) {
158
- await fs.promises.mkdir(outDir, { recursive: true });
159
- const sdl = await (0, graphql_server_1.buildSchemaSDL)({
160
- database,
161
- schemas,
162
- graphile: { pgSettings: async () => ({ role: 'administrator' }) },
41
+ // No config file - prompt for options using shared questions
42
+ const answers = await prompter.prompt(argv, graphql_codegen_1.codegenQuestions);
43
+ // Build db config if schemas or apiNames provided
44
+ const db = (answers.schemas || answers.apiNames) ? {
45
+ schemas: answers.schemas,
46
+ apiNames: answers.apiNames,
47
+ } : undefined;
48
+ const result = await (0, graphql_codegen_1.generate)({
49
+ endpoint: answers.endpoint,
50
+ schemaFile: answers.schemaFile,
51
+ db,
52
+ output: answers.output,
53
+ authorization: answers.authorization,
54
+ reactQuery: answers.reactQuery,
55
+ orm: answers.orm,
56
+ dryRun: answers.dryRun,
57
+ verbose: answers.verbose,
163
58
  });
164
- const schemaPath = path.join(outDir, 'schema.graphql');
165
- await fs.promises.writeFile(schemaPath, sdl, 'utf-8');
166
- return schemaPath;
167
- }
59
+ (0, graphql_codegen_1.printResult)(result);
60
+ };
@@ -1,3 +1,3 @@
1
- import { CLIOptions, Inquirerer, ParsedArgs } from 'inquirerer';
2
- declare const _default: (argv: Partial<ParsedArgs>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
1
+ import { CLIOptions, Inquirerer } from 'inquirerer';
2
+ declare const _default: (argv: Partial<Record<string, unknown>>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
3
3
  export default _default;
@@ -7,32 +7,52 @@ Constructive Get GraphQL Schema:
7
7
 
8
8
  cnc get-graphql-schema [OPTIONS]
9
9
 
10
- Options:
11
- --help, -h Show this help message
10
+ Source Options (choose one):
11
+ --endpoint <url> GraphQL endpoint to fetch schema via introspection
12
12
  --database <name> Database name (default: constructive)
13
+
14
+ Options:
13
15
  --schemas <list> Comma-separated schemas to include
14
- --endpoint <url> GraphQL endpoint to fetch schema via introspection
15
- --headerHost <host> Optional Host header to send with endpoint requests
16
- --auth <token> Optional Authorization header value (e.g., "Bearer 123")
17
- --header "Name: Value" Optional HTTP header; repeat to add multiple headers
16
+ --headerHost <host> Host header to send with endpoint requests
17
+ --auth <token> Authorization header value
18
18
  --out <path> Output file path (default: print to stdout)
19
+
20
+ --help, -h Show this help message
19
21
  `;
20
- const defaultSchemas = [
21
- 'metaschema_public',
22
- 'metaschema_modules_public',
23
- 'services_public'
22
+ const questions = [
23
+ {
24
+ name: 'endpoint',
25
+ message: 'GraphQL endpoint URL',
26
+ type: 'text',
27
+ required: false,
28
+ },
29
+ {
30
+ name: 'database',
31
+ message: 'Database name',
32
+ type: 'text',
33
+ required: false,
34
+ },
35
+ {
36
+ name: 'schemas',
37
+ message: 'Comma-separated schemas',
38
+ type: 'text',
39
+ required: false,
40
+ },
41
+ {
42
+ name: 'out',
43
+ message: 'Output file path',
44
+ type: 'text',
45
+ required: false,
46
+ },
24
47
  ];
25
48
  exports.default = async (argv, prompter, _options) => {
26
49
  if (argv.help || argv.h) {
27
50
  console.log(usage);
28
51
  process.exit(0);
29
52
  }
30
- const endpoint = argv.endpoint ?? '';
31
- const headerHost = argv.headerHost ?? '';
32
- const auth = argv.auth ?? '';
33
- const database = argv.database ?? 'constructive';
34
- const schemasArg = argv.schemas ?? defaultSchemas.join(',');
35
- const out = argv.out ?? '';
53
+ const { endpoint, database, schemas: schemasArg, out, } = await prompter.prompt(argv, questions);
54
+ const schemas = String(schemasArg).split(',').map((s) => s.trim()).filter(Boolean);
55
+ // Parse repeated --header values into headers object
36
56
  const headerArg = argv.header;
37
57
  const headerList = Array.isArray(headerArg) ? headerArg : headerArg ? [headerArg] : [];
38
58
  const headers = {};
@@ -46,23 +66,19 @@ exports.default = async (argv, prompter, _options) => {
46
66
  continue;
47
67
  headers[name] = value;
48
68
  }
49
- const schemas = schemasArg.split(',').map(s => s.trim()).filter(Boolean);
50
69
  let sdl;
51
70
  if (endpoint) {
52
71
  const opts = {};
53
- if (headerHost)
54
- opts.headerHost = headerHost;
55
- if (auth)
56
- opts.auth = auth;
72
+ if (argv.headerHost)
73
+ opts.headerHost = argv.headerHost;
74
+ if (argv.auth)
75
+ opts.auth = argv.auth;
57
76
  if (Object.keys(headers).length)
58
77
  opts.headers = headers;
59
78
  sdl = await graphql_server_1.fetchEndpointSchemaSDL(endpoint, opts);
60
79
  }
61
80
  else {
62
- // The server package already depends on postgraphile and graphql,
63
- // and exporting a reusable programmatic builder from there
64
- // avoids adding new dependencies to cli and prevents duplication.
65
- sdl = await (0, graphql_server_1.buildSchemaSDL)({ database, schemas });
81
+ sdl = await (0, graphql_server_1.buildSchemaSDL)({ database: database, schemas });
66
82
  }
67
83
  if (out) {
68
84
  await fs_1.promises.writeFile(out, sdl, 'utf8');
@@ -1,132 +1,58 @@
1
- import * as fs from 'node:fs';
2
- import * as path from 'node:path';
3
- import { buildSchemaSDL } from '@constructive-io/graphql-server';
4
- import { generateReactQuery, generateOrm, findConfigFile, } from '@constructive-io/graphql-codegen';
5
- import { getEnvOptions } from '@constructive-io/graphql-env';
1
+ import { generate, findConfigFile, codegenQuestions, printResult, } from '@constructive-io/graphql-codegen';
6
2
  const usage = `
7
3
  Constructive GraphQL Codegen:
8
4
 
9
5
  cnc codegen [OPTIONS]
10
6
 
11
- Options:
12
- --help, -h Show this help message
7
+ Source Options (choose one):
13
8
  --config <path> Path to graphql-codegen config file
14
- --target <name> Target name in config file
15
9
  --endpoint <url> GraphQL endpoint URL
16
- --auth <token> Authorization header value (e.g., "Bearer 123")
17
- --out <dir> Output directory (default: codegen)
18
- --dry-run Preview without writing files
19
- -v, --verbose Verbose output
10
+ --schemaFile <path> Path to GraphQL schema file
11
+
12
+ Database Options:
13
+ --schemas <list> Comma-separated PostgreSQL schemas
14
+ --apiNames <list> Comma-separated API names
20
15
 
21
- --orm Generate Prisma-like ORM client instead of React Query hooks
16
+ Generator Options:
17
+ --reactQuery Generate React Query hooks (default)
18
+ --orm Generate ORM client
19
+ --output <dir> Output directory (default: codegen)
20
+ --authorization <token> Authorization header value
21
+ --dryRun Preview without writing files
22
+ --verbose Verbose output
22
23
 
23
- --database <name> Database override for DB mode (defaults to PGDATABASE)
24
- --schemas <list> Comma-separated schemas (required for DB mode)
24
+ --help, -h Show this help message
25
25
  `;
26
- export default async (argv, _prompter, _options) => {
26
+ export default async (argv, prompter, _options) => {
27
27
  if (argv.help || argv.h) {
28
28
  console.log(usage);
29
29
  process.exit(0);
30
30
  }
31
- const opts = parseArgs(argv);
32
- const mode = determineMode(opts);
33
- if (mode.type === 'none') {
34
- console.error('Error: No source specified. Use --endpoint, --config, or --schemas for database mode.');
35
- process.exit(1);
36
- }
37
- // Build schema from database if needed
38
- const outDir = opts.output || 'codegen';
39
- const schemaPath = mode.type === 'database'
40
- ? await buildSchemaFromDatabase(mode.database, mode.schemas, outDir)
41
- : undefined;
42
- const commandOptions = {
43
- config: opts.config,
44
- target: opts.target,
45
- endpoint: mode.type === 'endpoint' ? mode.endpoint : undefined,
46
- schema: schemaPath,
47
- output: opts.config ? opts.output : outDir,
48
- authorization: opts.auth,
49
- verbose: opts.verbose,
50
- dryRun: opts.dryRun,
51
- };
52
- const result = opts.orm
53
- ? await generateOrm(commandOptions)
54
- : await generateReactQuery(commandOptions);
55
- printResult(result);
56
- if (!result.success) {
57
- process.exit(1);
58
- }
59
- };
60
- function parseArgs(argv) {
61
- const schemasArg = argv.schemas || '';
62
- return {
63
- endpoint: argv.endpoint || undefined,
64
- config: argv.config || findConfigFile() || undefined,
65
- target: argv.target || undefined,
66
- output: argv.out || undefined,
67
- auth: argv.auth || undefined,
68
- database: argv.database || undefined,
69
- schemas: schemasArg
70
- ? schemasArg.split(',').map((s) => s.trim()).filter(Boolean)
71
- : undefined,
72
- dryRun: !!(argv['dry-run'] || argv.dryRun),
73
- verbose: !!(argv.verbose || argv.v),
74
- orm: !!argv.orm,
75
- };
76
- }
77
- function determineMode(opts) {
78
- if (opts.endpoint) {
79
- return { type: 'endpoint', endpoint: opts.endpoint };
80
- }
81
- if (opts.schemas?.length) {
82
- const database = opts.database || getEnvOptions().pg.database;
83
- return { type: 'database', database, schemas: opts.schemas };
84
- }
85
- if (opts.config) {
86
- return { type: 'config', configPath: opts.config };
87
- }
88
- return { type: 'none' };
89
- }
90
- function printTargetResult(target) {
91
- const status = target.success ? '[ok]' : 'x';
92
- console.log(`\n${status} ${target.message}`);
93
- if (target.tables?.length) {
94
- console.log(' Tables:');
95
- target.tables.forEach((t) => console.log(` - ${t}`));
96
- }
97
- if (target.filesWritten?.length) {
98
- console.log(' Files written:');
99
- target.filesWritten.forEach((f) => console.log(` - ${f}`));
100
- }
101
- if (!target.success && target.errors?.length) {
102
- target.errors.forEach((e) => console.error(` - ${e}`));
103
- }
104
- }
105
- function printResult(result) {
106
- const targets = result.targets ?? [];
107
- const isMultiTarget = targets.length > 1 || (targets.length === 1 && targets[0]?.name !== 'default');
108
- if (isMultiTarget) {
109
- console.log(result.message);
110
- targets.forEach(printTargetResult);
31
+ // Auto-detect config file if not provided
32
+ const config = argv.config || findConfigFile();
33
+ if (config) {
34
+ // If config file exists, just run generate with it (config file handles everything)
35
+ const result = await generate({});
36
+ printResult(result);
111
37
  return;
112
38
  }
113
- if (!result.success) {
114
- console.error(result.message);
115
- result.errors?.forEach((e) => console.error(' -', e));
116
- }
117
- else {
118
- console.log(result.message);
119
- result.filesWritten?.forEach((f) => console.log(f));
120
- }
121
- }
122
- async function buildSchemaFromDatabase(database, schemas, outDir) {
123
- await fs.promises.mkdir(outDir, { recursive: true });
124
- const sdl = await buildSchemaSDL({
125
- database,
126
- schemas,
127
- graphile: { pgSettings: async () => ({ role: 'administrator' }) },
39
+ // No config file - prompt for options using shared questions
40
+ const answers = await prompter.prompt(argv, codegenQuestions);
41
+ // Build db config if schemas or apiNames provided
42
+ const db = (answers.schemas || answers.apiNames) ? {
43
+ schemas: answers.schemas,
44
+ apiNames: answers.apiNames,
45
+ } : undefined;
46
+ const result = await generate({
47
+ endpoint: answers.endpoint,
48
+ schemaFile: answers.schemaFile,
49
+ db,
50
+ output: answers.output,
51
+ authorization: answers.authorization,
52
+ reactQuery: answers.reactQuery,
53
+ orm: answers.orm,
54
+ dryRun: answers.dryRun,
55
+ verbose: answers.verbose,
128
56
  });
129
- const schemaPath = path.join(outDir, 'schema.graphql');
130
- await fs.promises.writeFile(schemaPath, sdl, 'utf-8');
131
- return schemaPath;
132
- }
57
+ printResult(result);
58
+ };
@@ -5,32 +5,52 @@ Constructive Get GraphQL Schema:
5
5
 
6
6
  cnc get-graphql-schema [OPTIONS]
7
7
 
8
- Options:
9
- --help, -h Show this help message
8
+ Source Options (choose one):
9
+ --endpoint <url> GraphQL endpoint to fetch schema via introspection
10
10
  --database <name> Database name (default: constructive)
11
+
12
+ Options:
11
13
  --schemas <list> Comma-separated schemas to include
12
- --endpoint <url> GraphQL endpoint to fetch schema via introspection
13
- --headerHost <host> Optional Host header to send with endpoint requests
14
- --auth <token> Optional Authorization header value (e.g., "Bearer 123")
15
- --header "Name: Value" Optional HTTP header; repeat to add multiple headers
14
+ --headerHost <host> Host header to send with endpoint requests
15
+ --auth <token> Authorization header value
16
16
  --out <path> Output file path (default: print to stdout)
17
+
18
+ --help, -h Show this help message
17
19
  `;
18
- const defaultSchemas = [
19
- 'metaschema_public',
20
- 'metaschema_modules_public',
21
- 'services_public'
20
+ const questions = [
21
+ {
22
+ name: 'endpoint',
23
+ message: 'GraphQL endpoint URL',
24
+ type: 'text',
25
+ required: false,
26
+ },
27
+ {
28
+ name: 'database',
29
+ message: 'Database name',
30
+ type: 'text',
31
+ required: false,
32
+ },
33
+ {
34
+ name: 'schemas',
35
+ message: 'Comma-separated schemas',
36
+ type: 'text',
37
+ required: false,
38
+ },
39
+ {
40
+ name: 'out',
41
+ message: 'Output file path',
42
+ type: 'text',
43
+ required: false,
44
+ },
22
45
  ];
23
46
  export default async (argv, prompter, _options) => {
24
47
  if (argv.help || argv.h) {
25
48
  console.log(usage);
26
49
  process.exit(0);
27
50
  }
28
- const endpoint = argv.endpoint ?? '';
29
- const headerHost = argv.headerHost ?? '';
30
- const auth = argv.auth ?? '';
31
- const database = argv.database ?? 'constructive';
32
- const schemasArg = argv.schemas ?? defaultSchemas.join(',');
33
- const out = argv.out ?? '';
51
+ const { endpoint, database, schemas: schemasArg, out, } = await prompter.prompt(argv, questions);
52
+ const schemas = String(schemasArg).split(',').map((s) => s.trim()).filter(Boolean);
53
+ // Parse repeated --header values into headers object
34
54
  const headerArg = argv.header;
35
55
  const headerList = Array.isArray(headerArg) ? headerArg : headerArg ? [headerArg] : [];
36
56
  const headers = {};
@@ -44,23 +64,19 @@ export default async (argv, prompter, _options) => {
44
64
  continue;
45
65
  headers[name] = value;
46
66
  }
47
- const schemas = schemasArg.split(',').map(s => s.trim()).filter(Boolean);
48
67
  let sdl;
49
68
  if (endpoint) {
50
69
  const opts = {};
51
- if (headerHost)
52
- opts.headerHost = headerHost;
53
- if (auth)
54
- opts.auth = auth;
70
+ if (argv.headerHost)
71
+ opts.headerHost = argv.headerHost;
72
+ if (argv.auth)
73
+ opts.auth = argv.auth;
55
74
  if (Object.keys(headers).length)
56
75
  opts.headers = headers;
57
76
  sdl = await fetchEndpointSchemaSDL(endpoint, opts);
58
77
  }
59
78
  else {
60
- // The server package already depends on postgraphile and graphql,
61
- // and exporting a reusable programmatic builder from there
62
- // avoids adding new dependencies to cli and prevents duplication.
63
- sdl = await buildSchemaSDL({ database, schemas });
79
+ sdl = await buildSchemaSDL({ database: database, schemas });
64
80
  }
65
81
  if (out) {
66
82
  await fs.writeFile(out, sdl, 'utf8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/cli",
3
- "version": "5.11.1",
3
+ "version": "6.0.1",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Constructive CLI",
6
6
  "main": "index.js",
@@ -45,22 +45,22 @@
45
45
  "ts-node": "^10.9.2"
46
46
  },
47
47
  "dependencies": {
48
- "@constructive-io/graphql-codegen": "^2.32.0",
48
+ "@constructive-io/graphql-codegen": "^3.0.1",
49
49
  "@constructive-io/graphql-env": "^2.9.4",
50
- "@constructive-io/graphql-explorer": "^2.15.4",
51
- "@constructive-io/graphql-server": "^2.19.11",
52
- "@constructive-io/knative-job-service": "^0.9.11",
50
+ "@constructive-io/graphql-explorer": "^3.0.1",
51
+ "@constructive-io/graphql-server": "^3.0.1",
52
+ "@constructive-io/knative-job-service": "^1.0.1",
53
53
  "@inquirerer/utils": "^3.2.0",
54
- "@pgpmjs/core": "^4.17.1",
55
- "@pgpmjs/logger": "^1.5.0",
56
- "@pgpmjs/server-utils": "^2.10.0",
54
+ "@pgpmjs/core": "^5.0.0",
55
+ "@pgpmjs/logger": "^2.0.0",
56
+ "@pgpmjs/server-utils": "^3.0.0",
57
57
  "@pgpmjs/types": "^2.15.0",
58
58
  "find-and-require-package-json": "^0.9.0",
59
59
  "inquirerer": "^4.4.0",
60
60
  "js-yaml": "^4.1.0",
61
- "pg-cache": "^1.8.0",
61
+ "pg-cache": "^2.0.0",
62
62
  "pg-env": "^1.3.0",
63
- "pgpm": "^2.12.1",
63
+ "pgpm": "^3.0.0",
64
64
  "shelljs": "^0.10.0",
65
65
  "yanse": "^0.2.0"
66
66
  },
@@ -75,5 +75,5 @@
75
75
  "postgres",
76
76
  "graphile"
77
77
  ],
78
- "gitHead": "39b5c59b01b8ce391dc14daf5a9430ca0ff67574"
78
+ "gitHead": "f6b4b738f0d069833af001a80b97d86fea6499ae"
79
79
  }