openapi-gen-typescript
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -329,3 +329,3 @@ "use strict"; | ||
yield mkdirp(currTagNameDir); | ||
const tagIndex = []; | ||
const namespaceNameArr = []; | ||
Object.keys(currMap).map((namespaceName) => { | ||
@@ -344,3 +344,3 @@ const { summary, code } = currMap[namespaceName]; | ||
].join('\n'); | ||
tagIndex.push(`export * as ${namespaceName} from './${namespaceName}';`); | ||
namespaceNameArr.push(namespaceName); | ||
fs.writeFileSync(`${currTagNameDir}/${namespaceName}.ts`, util_1.format(pathCode)); | ||
@@ -352,3 +352,6 @@ }); | ||
*/\n`, | ||
...tagIndex, | ||
...namespaceNameArr.map(key => `import * as ${key} from './${key}';`), | ||
`\nexport { | ||
${namespaceNameArr.join(',\n')} | ||
}`, | ||
].join('\n'); | ||
@@ -355,0 +358,0 @@ fs.writeFileSync(`${currTagNameDir}/index.ts`, util_1.format(tagCode)); |
{ | ||
"name": "openapi-gen-typescript", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
@@ -468,3 +468,3 @@ // @ts-ignore | ||
await mkdirp(currTagNameDir); | ||
const tagIndex: string[] = []; | ||
const namespaceNameArr: string[] = []; | ||
Object.keys(currMap).map((namespaceName: string) => { | ||
@@ -483,3 +483,3 @@ const { summary, code } = currMap[namespaceName]; | ||
].join('\n'); | ||
tagIndex.push(`export * as ${namespaceName} from './${namespaceName}';`); | ||
namespaceNameArr.push(namespaceName); | ||
fs.writeFileSync(`${currTagNameDir}/${namespaceName}.ts`, format(pathCode)); | ||
@@ -491,3 +491,6 @@ }); | ||
*/\n`, | ||
...tagIndex, | ||
...namespaceNameArr.map(key => `import * as ${key} from './${key}';`), | ||
`\nexport { | ||
${namespaceNameArr.join(',\n')} | ||
}`, | ||
].join('\n'); | ||
@@ -494,0 +497,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69651
1517