@redocly/cli 0.0.0-snapshot.1739968717 → 0.0.0-snapshot.1740061304

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.
Files changed (2) hide show
  1. package/lib/index.js +15 -34
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -23,8 +23,7 @@ const translations_1 = require("./commands/translations");
23
23
  const eject_1 = require("./commands/eject");
24
24
  const constants_1 = require("./commands/preview-project/constants");
25
25
  const push_1 = require("./commands/push");
26
- const respect_core_1 = require("@redocly/respect-core");
27
- dotenv.config({ path: path.resolve(__dirname, '../.env') });
26
+ dotenv.config({ path: path.resolve(process.cwd(), './.env') });
28
27
  if (!('replaceAll' in String.prototype)) {
29
28
  require('core-js/actual/string/replace-all');
30
29
  }
@@ -735,6 +734,7 @@ yargs
735
734
  .positional('files', {
736
735
  describe: 'Test files or glob pattern',
737
736
  type: 'string',
737
+ array: true,
738
738
  default: [],
739
739
  })
740
740
  .env('REDOCLY_CLI_RESPECT')
@@ -752,14 +752,14 @@ yargs
752
752
  workflow: {
753
753
  alias: 'w',
754
754
  describe: 'Workflow name',
755
- type: 'array',
756
- greedy: false,
755
+ type: 'string',
756
+ array: true,
757
757
  },
758
758
  skip: {
759
759
  alias: 's',
760
760
  describe: 'Workflow to skip',
761
- type: 'array',
762
- greedy: false,
761
+ type: 'string',
762
+ array: true,
763
763
  },
764
764
  verbose: {
765
765
  alias: 'v',
@@ -774,11 +774,6 @@ yargs
774
774
  describe: 'JSON file output name',
775
775
  type: 'string',
776
776
  },
777
- residency: {
778
- describe: 'Residency of Reunite application. Defaults to US.',
779
- type: 'string',
780
- default: 'us',
781
- },
782
777
  'client-cert': {
783
778
  describe: 'Mutual TLS client certificate',
784
779
  type: 'string',
@@ -797,13 +792,9 @@ yargs
797
792
  },
798
793
  });
799
794
  }, async (argv) => {
800
- try {
801
- await (0, respect_core_1.handleRun)(argv);
802
- }
803
- catch (err) {
804
- // logger.error(red(`${err?.message}`));
805
- process.exit(1);
806
- }
795
+ process.env.REDOCLY_CLI_COMMAND = 'respect';
796
+ const { handleRun } = await Promise.resolve().then(() => require('@redocly/respect-core'));
797
+ (0, wrapper_1.commandWrapper)(handleRun)(argv);
807
798
  })
808
799
  .command('generate-arazzo <descriptionPath>', 'Auto-generate test config file from description', (yargs) => {
809
800
  return yargs
@@ -811,7 +802,7 @@ yargs
811
802
  describe: 'Description file path',
812
803
  type: 'string',
813
804
  })
814
- .env('REDOCLY_SPOT')
805
+ .env('REDOCLY_CLI_RESPECT')
815
806
  .options({
816
807
  'output-file': {
817
808
  alias: 'o',
@@ -822,22 +813,12 @@ yargs
822
813
  describe: 'Generate config with populated values from description using success criteria',
823
814
  type: 'boolean',
824
815
  },
825
- residency: {
826
- describe: 'Residency of Reunite application. Defaults to US.',
827
- type: 'string',
828
- default: 'us',
829
- },
830
816
  });
831
- }
832
- // async (argv) => {
833
- // try {
834
- // await handleGenerate(argv as GenerateConfigFileArgv);
835
- // } catch {
836
- // logger.error(`❌ Auto config generation failed.`);
837
- // process.exit(1);
838
- // }
839
- // },
840
- )
817
+ }, async (argv) => {
818
+ process.env.REDOCLY_CLI_COMMAND = 'generate-arazzo';
819
+ const { handleGenerate } = await Promise.resolve().then(() => require('@redocly/respect-core'));
820
+ (0, wrapper_1.commandWrapper)(handleGenerate)(argv);
821
+ })
841
822
  .completion('completion', 'Generate autocomplete script for `redocly` command.')
842
823
  .demandCommand(1)
843
824
  .middleware([update_version_notifier_1.notifyUpdateCliVersion])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/cli",
3
- "version": "0.0.0-snapshot.1739968717",
3
+ "version": "0.0.0-snapshot.1740061304",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -36,7 +36,7 @@
36
36
  "Roman Hotsiy <roman@redocly.com> (https://redocly.com/)"
37
37
  ],
38
38
  "dependencies": {
39
- "@redocly/openapi-core": "0.0.0-snapshot.1739968717",
39
+ "@redocly/openapi-core": "0.0.0-snapshot.1740061304",
40
40
  "abort-controller": "^3.0.0",
41
41
  "chokidar": "^3.5.1",
42
42
  "colorette": "^1.2.0",
@@ -60,7 +60,7 @@
60
60
  "simple-websocket": "^9.0.0",
61
61
  "styled-components": "^6.0.7",
62
62
  "yargs": "17.0.1",
63
- "@redocly/respect-core": "0.0.0-snapshot.1739968717"
63
+ "@redocly/respect-core": "0.0.0-snapshot.1740061304"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/configstore": "^5.0.1",