@redocly/cli 0.0.0-snapshot.1739981736 → 0.0.0-snapshot.1740152436

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/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
  }
@@ -730,10 +729,10 @@ yargs
730
729
  process.env.REDOCLY_CLI_COMMAND = 'eject';
731
730
  (0, wrapper_1.commandWrapper)(eject_1.handleEject)(argv);
732
731
  })
733
- .command('respect [files..]', 'Run workflow tests', (yargs) => {
732
+ .command('respect [files...]', 'Run Arazzo tests.', (yargs) => {
734
733
  return yargs
735
734
  .positional('files', {
736
- describe: 'Test files or glob pattern',
735
+ describe: 'Test files or glob pattern.',
737
736
  type: 'string',
738
737
  array: true,
739
738
  default: [],
@@ -742,98 +741,80 @@ yargs
742
741
  .options({
743
742
  input: {
744
743
  alias: 'i',
745
- describe: 'Input parameters',
744
+ describe: 'Input parameters.',
746
745
  type: 'string',
747
746
  },
748
747
  server: {
749
748
  alias: 'S',
750
- describe: 'Server parameters',
749
+ describe: 'Server parameters.',
751
750
  type: 'string',
752
751
  },
753
752
  workflow: {
754
753
  alias: 'w',
755
- describe: 'Workflow name',
754
+ describe: 'Workflow name.',
756
755
  type: 'string',
757
756
  array: true,
758
757
  },
759
758
  skip: {
760
759
  alias: 's',
761
- describe: 'Workflow to skip',
760
+ describe: 'Workflow to skip.',
762
761
  type: 'string',
763
762
  array: true,
764
763
  },
765
764
  verbose: {
766
765
  alias: 'v',
767
- describe: 'Apply verbose mode',
766
+ describe: 'Apply verbose mode.',
768
767
  type: 'boolean',
769
768
  },
770
769
  'har-output': {
771
- describe: 'Har file output name',
770
+ describe: 'Har file output name.',
772
771
  type: 'string',
773
772
  },
774
773
  'json-output': {
775
- describe: 'JSON file output name',
774
+ describe: 'JSON file output name.',
776
775
  type: 'string',
777
776
  },
778
- residency: {
779
- describe: 'Residency of Reunite application. Defaults to US.',
780
- type: 'string',
781
- default: 'us',
782
- },
783
777
  'client-cert': {
784
- describe: 'Mutual TLS client certificate',
778
+ describe: 'Mutual TLS client certificate.',
785
779
  type: 'string',
786
780
  },
787
781
  'client-key': {
788
- describe: 'Mutual TLS client key',
782
+ describe: 'Mutual TLS client key.',
789
783
  type: 'string',
790
784
  },
791
785
  'ca-cert': {
792
- describe: 'Mutual TLS CA certificate',
786
+ describe: 'Mutual TLS CA certificate.',
793
787
  type: 'string',
794
788
  },
795
789
  severity: {
796
- describe: 'Severity of the check',
790
+ describe: 'Severity of the check.',
797
791
  type: 'string',
798
792
  },
799
793
  });
800
- }, (argv) => {
794
+ }, async (argv) => {
801
795
  process.env.REDOCLY_CLI_COMMAND = 'respect';
802
- (0, wrapper_1.commandWrapper)(respect_core_1.handleRun)(argv);
796
+ const { handleRun } = await Promise.resolve().then(() => require('@redocly/respect-core'));
797
+ (0, wrapper_1.commandWrapper)(handleRun)(argv);
803
798
  })
804
- .command('generate-arazzo <descriptionPath>', 'Auto-generate test config file from description', (yargs) => {
799
+ .command('generate-arazzo <descriptionPath>', 'Auto-generate arazzo description file from an API description.', (yargs) => {
805
800
  return yargs
806
801
  .positional('descriptionPath', {
807
- describe: 'Description file path',
802
+ describe: 'Description file path.',
808
803
  type: 'string',
809
804
  })
810
805
  .env('REDOCLY_CLI_RESPECT')
811
806
  .options({
812
807
  'output-file': {
813
808
  alias: 'o',
814
- describe: 'Output File name',
815
- type: 'string',
816
- },
817
- extended: {
818
- describe: 'Generate config with populated values from description using success criteria',
819
- type: 'boolean',
820
- },
821
- residency: {
822
- describe: 'Residency of Reunite application. Defaults to US.',
809
+ describe: 'Output File name.',
823
810
  type: 'string',
824
- default: 'us',
825
811
  },
826
812
  });
827
- }
828
- // async (argv) => {
829
- // try {
830
- // await handleGenerate(argv as GenerateConfigFileArgv);
831
- // } catch {
832
- // logger.error(`❌ Auto config generation failed.`);
833
- // process.exit(1);
834
- // }
835
- // },
836
- )
813
+ }, async (argv) => {
814
+ process.env.REDOCLY_CLI_COMMAND = 'generate-arazzo';
815
+ const { handleGenerate } = await Promise.resolve().then(() => require('@redocly/respect-core'));
816
+ (0, wrapper_1.commandWrapper)(handleGenerate)(argv);
817
+ })
837
818
  .completion('completion', 'Generate autocomplete script for `redocly` command.')
838
819
  .demandCommand(1)
839
820
  .middleware([update_version_notifier_1.notifyUpdateCliVersion])
package/lib/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { BundleOutputFormat, Region, Config, RuleSeverity } from '@redocly/openapi-core';
2
+ import type { RespectOptions, GenerateArazzoFileOptions } from '@redocly/respect-core';
2
3
  import type { ArgumentsCamelCase } from 'yargs';
3
4
  import type { LintOptions } from './commands/lint';
4
5
  import type { BundleOptions } from './commands/bundle';
@@ -27,7 +28,7 @@ export type Entrypoint = {
27
28
  export declare const outputExtensions: ReadonlyArray<BundleOutputFormat>;
28
29
  export type OutputExtensions = 'json' | 'yaml' | 'yml' | undefined;
29
30
  export declare const regionChoices: ReadonlyArray<Region>;
30
- export type CommandOptions = StatsOptions | SplitOptions | JoinOptions | PushOptions | CMSPushOptions | LintOptions | BundleOptions | LoginOptions | LogoutOptions | PreviewDocsOptions | BuildDocsArgv | PushStatusOptions | PreviewProjectOptions | TranslationsOptions | EjectOptions;
31
+ export type CommandOptions = StatsOptions | SplitOptions | JoinOptions | PushOptions | CMSPushOptions | LintOptions | BundleOptions | LoginOptions | LogoutOptions | PreviewDocsOptions | BuildDocsArgv | PushStatusOptions | PreviewProjectOptions | TranslationsOptions | EjectOptions | RespectOptions | GenerateArazzoFileOptions;
31
32
  export type VerifyConfigOptions = {
32
33
  config?: string;
33
34
  'lint-config'?: RuleSeverity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/cli",
3
- "version": "0.0.0-snapshot.1739981736",
3
+ "version": "0.0.0-snapshot.1740152436",
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.1739981736",
39
+ "@redocly/openapi-core": "0.0.0-snapshot.1740152436",
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.1739981736"
63
+ "@redocly/respect-core": "0.0.0-snapshot.1740152436"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/configstore": "^5.0.1",