codegen-openapi-ts 0.5.9 → 0.6.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/README.md CHANGED
@@ -24,6 +24,7 @@
24
24
  - Supports custom url request mapping (ex: backend gateway) (v0.5.3)
25
25
  - Supports config autocomplete wrapper (v0.5.8)
26
26
  - Supports generating relevant models if selectedOnly (v0.5.8)
27
+ - Supports esm config (v0.6.0)
27
28
 
28
29
  ## Install
29
30
 
package/bin/index.js CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  const path = require('path');
6
6
  const program = require('commander');
7
+ const esmConfig = require('esm-config');
7
8
  const pkg = require('../package.json');
8
9
  const OpenAPI = require(path.resolve(__dirname, '../dist/index.js'));
9
10
 
@@ -19,7 +20,7 @@ const params = program
19
20
 
20
21
  async function generateOnConfig () {
21
22
  try {
22
- const configFile = require(path.join(appRoot, params.config))
23
+ const configFile = await esmConfig(path.join(appRoot, params.config))
23
24
 
24
25
  for (let i = 0; i < configFile.length; i++) {
25
26
  console.log('Generating ' + configFile[i].source)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codegen-openapi-ts",
3
- "version": "0.5.9",
3
+ "version": "0.6.0",
4
4
  "description": "Library that generates Typescript clients based on the OpenAPI specification.",
5
5
  "author": "devteaa",
6
6
  "homepage": "https://github.com/devteaa/codegen-openapi-ts",
@@ -68,6 +68,7 @@
68
68
  "camelcase": "^6.2.1",
69
69
  "commander": "^8.3.0",
70
70
  "cross-blob": "^2.0.1",
71
+ "esm-config": "^1.1.0",
71
72
  "form-data": "^4.0.0",
72
73
  "handlebars": "^4.7.6",
73
74
  "json-schema-ref-parser": "^9.0.7",