@hey-api/openapi-ts 0.53.12 → 0.54.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.
package/bin/index.cjs CHANGED
@@ -12,29 +12,34 @@ const params = program
12
12
  .name(Object.keys(pkg.bin)[0])
13
13
  .usage('[options]')
14
14
  .version(pkg.version)
15
- .option(
16
- '--base [value]',
17
- 'Manually set base in OpenAPI config instead of inferring from server value',
18
- )
19
15
  .option(
20
16
  '-c, --client <value>',
21
17
  'HTTP client to generate [@hey-api/client-axios, @hey-api/client-fetch, legacy/angular, legacy/axios, legacy/fetch, legacy/node, legacy/xhr]',
22
18
  )
23
19
  .option('-d, --debug', 'Run in debug mode?')
24
20
  .option('--dry-run [value]', 'Skip writing files to disk?')
25
- .option('--exportCore [value]', 'Write core files to disk')
21
+ .option(
22
+ '-e, --experimental-parser [value]',
23
+ 'Opt-in to the experimental parser?',
24
+ )
26
25
  .option('-f, --file [value]', 'Path to the config file')
27
26
  .option(
28
27
  '-i, --input <value>',
29
28
  'OpenAPI specification (path, url, or string content)',
30
29
  )
31
- .option('--name <value>', 'Custom client class name')
32
- .option('-o, --output <value>', 'Output directory')
33
- .option('--request <value>', 'Path to custom request file')
34
- .option('--schemas [value]', 'Write schemas to disk')
35
- .option('--services [value]', 'Write services to disk')
36
- .option('--types [value]', 'Write types to disk')
37
- .option('--useOptions [value]', 'Use options instead of arguments')
30
+ .option('-o, --output <value>', 'Output folder')
31
+ .option('-p, --plugins [value...]', "List of plugins you'd like to use")
32
+ .option(
33
+ '--base [value]',
34
+ 'DEPRECATED. Manually set base in OpenAPI config instead of inferring from server value',
35
+ )
36
+ .option('--exportCore [value]', 'DEPRECATED. Write core files to disk')
37
+ .option('--name <value>', 'DEPRECATED. Custom client class name')
38
+ .option('--request <value>', 'DEPRECATED. Path to custom request file')
39
+ .option(
40
+ '--useOptions [value]',
41
+ 'DEPRECATED. Use options instead of arguments?',
42
+ )
38
43
  .parse(process.argv)
39
44
  .opts();
40
45
 
@@ -69,12 +74,15 @@ async function start() {
69
74
  const { createClient } = require(resolve(__dirname, '../dist/index.cjs'));
70
75
  userConfig = processParams(params, [
71
76
  'dryRun',
77
+ 'experimentalParser',
72
78
  'exportCore',
73
- 'schemas',
74
- 'services',
75
- 'types',
76
79
  'useOptions',
77
80
  ]);
81
+ if (params.plugins === true) {
82
+ userConfig.plugins = [];
83
+ } else if (params.plugins) {
84
+ userConfig.plugins = params.plugins;
85
+ }
78
86
  await createClient(userConfig);
79
87
  process.exit(0);
80
88
  } catch (error) {