@constructive-io/cli 5.9.2 → 5.10.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.
@@ -1,4 +1,3 @@
1
- import { CLIOptions, Inquirerer } from 'inquirerer';
2
- import { ParsedArgs } from 'minimist';
1
+ import { CLIOptions, Inquirerer, ParsedArgs } from 'inquirerer';
3
2
  declare const _default: (argv: Partial<ParsedArgs>, _prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
- import { CLIOptions, Inquirerer } from 'inquirerer';
2
- import { ParsedArgs } from 'minimist';
1
+ import { CLIOptions, Inquirerer, ParsedArgs } from 'inquirerer';
3
2
  declare const _default: (argv: Partial<ParsedArgs>, prompter: Inquirerer, _options: CLIOptions) => Promise<void>;
4
3
  export default _default;
package/commands/jobs.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const fs_1 = require("fs");
4
4
  const path_1 = require("path");
5
5
  const knative_job_service_1 = require("@constructive-io/knative-job-service");
6
- const utils_1 = require("@inquirerer/utils");
6
+ const inquirerer_1 = require("inquirerer");
7
7
  const jobsUsageText = `
8
8
  Constructive Jobs:
9
9
 
@@ -140,11 +140,11 @@ exports.default = async (argv, prompter, _options) => {
140
140
  console.log(jobsUsageText);
141
141
  process.exit(0);
142
142
  }
143
- const { first: subcommand, newArgv } = (0, utils_1.extractFirst)(argv);
143
+ const { first: subcommand, newArgv } = (0, inquirerer_1.extractFirst)(argv);
144
144
  const args = newArgv;
145
145
  if (!subcommand) {
146
146
  console.log(jobsUsageText);
147
- await (0, utils_1.cliExitWithError)('No subcommand provided. Use "up".');
147
+ await (0, inquirerer_1.cliExitWithError)('No subcommand provided. Use "up".');
148
148
  return;
149
149
  }
150
150
  switch (subcommand) {
@@ -156,12 +156,12 @@ exports.default = async (argv, prompter, _options) => {
156
156
  await server.start();
157
157
  }
158
158
  catch (error) {
159
- await (0, utils_1.cliExitWithError)(`Failed to start jobs runtime: ${error.message}`);
159
+ await (0, inquirerer_1.cliExitWithError)(`Failed to start jobs runtime: ${error.message}`);
160
160
  }
161
161
  break;
162
162
  }
163
163
  default:
164
164
  console.log(jobsUsageText);
165
- await (0, utils_1.cliExitWithError)(`Unknown subcommand: ${subcommand}. Use "up".`);
165
+ await (0, inquirerer_1.cliExitWithError)(`Unknown subcommand: ${subcommand}. Use "up".`);
166
166
  }
167
167
  };
package/commands.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { CLIOptions, Inquirerer } from 'inquirerer';
2
- import { ParsedArgs } from 'minimist';
1
+ import { CLIOptions, Inquirerer, ParsedArgs } from 'inquirerer';
3
2
  export declare const commands: (argv: Partial<ParsedArgs>, prompter: Inquirerer, options: CLIOptions & {
4
3
  skipPgTeardown?: boolean;
5
4
  }) => Promise<Partial<ParsedArgs>>;
package/commands.js CHANGED
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.commands = void 0;
7
- const find_and_require_package_json_1 = require("find-and-require-package-json");
8
7
  const utils_1 = require("@inquirerer/utils");
8
+ const inquirerer_1 = require("inquirerer");
9
9
  const codegen_1 = __importDefault(require("./commands/codegen"));
10
10
  const explorer_1 = __importDefault(require("./commands/explorer"));
11
11
  const get_graphql_schema_1 = __importDefault(require("./commands/get-graphql-schema"));
@@ -22,11 +22,11 @@ const createCommandMap = () => {
22
22
  };
23
23
  };
24
24
  const commands = async (argv, prompter, options) => {
25
- let { first: command, newArgv } = (0, utils_1.extractFirst)(argv);
25
+ let { first: command, newArgv } = (0, inquirerer_1.extractFirst)(argv);
26
26
  // Run update check early so it shows on help/version paths too
27
27
  // (checkForUpdates auto-skips in CI or when INQUIRERER_SKIP_UPDATE_CHECK / CONSTRUCTIVE_SKIP_UPDATE_CHECK is set)
28
28
  try {
29
- const pkg = (0, find_and_require_package_json_1.findAndRequirePackageJson)(__dirname);
29
+ const pkg = (0, inquirerer_1.getPackageJson)(__dirname);
30
30
  const updateResult = await (0, utils_1.checkForUpdates)({
31
31
  pkgName: pkg.name,
32
32
  pkgVersion: pkg.version,
@@ -41,7 +41,7 @@ const commands = async (argv, prompter, options) => {
41
41
  // ignore update check failures
42
42
  }
43
43
  if (argv.version || argv.v) {
44
- const pkg = (0, find_and_require_package_json_1.findAndRequirePackageJson)(__dirname);
44
+ const pkg = (0, inquirerer_1.getPackageJson)(__dirname);
45
45
  console.log(pkg.version);
46
46
  process.exit(0);
47
47
  }
@@ -82,7 +82,7 @@ const commands = async (argv, prompter, options) => {
82
82
  const commandFn = commandMap[command];
83
83
  if (!commandFn) {
84
84
  console.log(utils_2.usageText);
85
- await (0, utils_1.cliExitWithError)(`Unknown command: ${command}`);
85
+ await (0, inquirerer_1.cliExitWithError)(`Unknown command: ${command}`);
86
86
  }
87
87
  await commandFn(newArgv, prompter, options);
88
88
  prompter.close();
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'fs';
2
2
  import { resolve } from 'path';
3
3
  import { KnativeJobsSvc } from '@constructive-io/knative-job-service';
4
- import { cliExitWithError, extractFirst } from '@inquirerer/utils';
4
+ import { cliExitWithError, extractFirst } from 'inquirerer';
5
5
  const jobsUsageText = `
6
6
  Constructive Jobs:
7
7
 
package/esm/commands.js CHANGED
@@ -1,5 +1,5 @@
1
- import { findAndRequirePackageJson } from 'find-and-require-package-json';
2
- import { cliExitWithError, checkForUpdates, extractFirst } from '@inquirerer/utils';
1
+ import { checkForUpdates } from '@inquirerer/utils';
2
+ import { cliExitWithError, extractFirst, getPackageJson } from 'inquirerer';
3
3
  import codegen from './commands/codegen';
4
4
  import explorer from './commands/explorer';
5
5
  import getGraphqlSchema from './commands/get-graphql-schema';
@@ -20,7 +20,7 @@ export const commands = async (argv, prompter, options) => {
20
20
  // Run update check early so it shows on help/version paths too
21
21
  // (checkForUpdates auto-skips in CI or when INQUIRERER_SKIP_UPDATE_CHECK / CONSTRUCTIVE_SKIP_UPDATE_CHECK is set)
22
22
  try {
23
- const pkg = findAndRequirePackageJson(__dirname);
23
+ const pkg = getPackageJson(__dirname);
24
24
  const updateResult = await checkForUpdates({
25
25
  pkgName: pkg.name,
26
26
  pkgVersion: pkg.version,
@@ -35,7 +35,7 @@ export const commands = async (argv, prompter, options) => {
35
35
  // ignore update check failures
36
36
  }
37
37
  if (argv.version || argv.v) {
38
- const pkg = findAndRequirePackageJson(__dirname);
38
+ const pkg = getPackageJson(__dirname);
39
39
  console.log(pkg.version);
40
40
  process.exit(0);
41
41
  }
package/esm/index.js CHANGED
@@ -1,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { findAndRequirePackageJson } from 'find-and-require-package-json';
3
- import { CLI } from 'inquirerer';
2
+ import { CLI, getPackageJson } from 'inquirerer';
4
3
  import { commands } from './commands';
5
4
  if (process.argv.includes('--version') || process.argv.includes('-v')) {
6
- const pkg = findAndRequirePackageJson(__dirname);
5
+ const pkg = getPackageJson(__dirname);
7
6
  console.log(pkg.version);
8
7
  process.exit(0);
9
8
  }
package/index.js CHANGED
@@ -2,11 +2,10 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.options = void 0;
5
- const find_and_require_package_json_1 = require("find-and-require-package-json");
6
5
  const inquirerer_1 = require("inquirerer");
7
6
  const commands_1 = require("./commands");
8
7
  if (process.argv.includes('--version') || process.argv.includes('-v')) {
9
- const pkg = (0, find_and_require_package_json_1.findAndRequirePackageJson)(__dirname);
8
+ const pkg = (0, inquirerer_1.getPackageJson)(__dirname);
10
9
  console.log(pkg.version);
11
10
  process.exit(0);
12
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/cli",
3
- "version": "5.9.2",
3
+ "version": "5.10.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Constructive CLI",
6
6
  "main": "index.js",
@@ -34,9 +34,8 @@
34
34
  "test:watch": "jest --watch"
35
35
  },
36
36
  "devDependencies": {
37
- "@inquirerer/test": "^1.2.5",
37
+ "@inquirerer/test": "^1.3.0",
38
38
  "@types/js-yaml": "^4.0.9",
39
- "@types/minimist": "^1.2.5",
40
39
  "@types/node": "^20.12.7",
41
40
  "@types/pg": "^8.16.0",
42
41
  "@types/shelljs": "^0.8.16",
@@ -46,25 +45,24 @@
46
45
  "ts-node": "^10.9.2"
47
46
  },
48
47
  "dependencies": {
49
- "@constructive-io/graphql-codegen": "^2.27.2",
48
+ "@constructive-io/graphql-codegen": "^2.28.0",
50
49
  "@constructive-io/graphql-env": "^2.9.0",
51
- "@constructive-io/graphql-explorer": "^2.14.1",
52
- "@constructive-io/graphql-server": "^2.18.2",
53
- "@constructive-io/knative-job-service": "^0.8.2",
54
- "@inquirerer/utils": "^3.1.3",
55
- "@pgpmjs/core": "^4.16.1",
56
- "@pgpmjs/logger": "^1.4.0",
57
- "@pgpmjs/server-utils": "^2.9.0",
50
+ "@constructive-io/graphql-explorer": "^2.15.0",
51
+ "@constructive-io/graphql-server": "^2.19.0",
52
+ "@constructive-io/knative-job-service": "^0.9.0",
53
+ "@inquirerer/utils": "^3.2.0",
54
+ "@pgpmjs/core": "^4.17.0",
55
+ "@pgpmjs/logger": "^1.5.0",
56
+ "@pgpmjs/server-utils": "^2.10.0",
58
57
  "@pgpmjs/types": "^2.15.0",
59
- "find-and-require-package-json": "^0.8.6",
60
- "inquirerer": "^4.3.1",
58
+ "find-and-require-package-json": "^0.9.0",
59
+ "inquirerer": "^4.4.0",
61
60
  "js-yaml": "^4.1.0",
62
- "minimist": "^1.2.8",
63
- "pg-cache": "^1.7.1",
61
+ "pg-cache": "^1.8.0",
64
62
  "pg-env": "^1.3.0",
65
- "pgpm": "^2.11.1",
63
+ "pgpm": "^2.12.0",
66
64
  "shelljs": "^0.10.0",
67
- "yanse": "^0.1.11"
65
+ "yanse": "^0.2.0"
68
66
  },
69
67
  "keywords": [
70
68
  "cli",
@@ -77,5 +75,5 @@
77
75
  "postgres",
78
76
  "graphile"
79
77
  ],
80
- "gitHead": "3ffd5718e86ea5fa9ca6e0930aeb510cf392f343"
78
+ "gitHead": "ec2b5f644c479626305ef85a05a6e7105c2c58cd"
81
79
  }