parsec-codegen
Advanced tools
Comparing version 0.0.0-alpha.6 to 1.0.0
@@ -8,2 +8,3 @@ #!/usr/bin/env node | ||
const {spawn} = require('child_process'); | ||
const replaceInFiles = require('replace-in-files'); | ||
@@ -14,2 +15,8 @@ (async () => { | ||
fs.writeFileSync(getPath('openapi.json'), await download(config.openapi)); | ||
await replaceInFiles({ | ||
from: /"tags[^\]]+],/g, // string or regex | ||
to: () => '', // string or fn (fn: carrying last argument - path to replaced file) | ||
files: getPath('openapi.json'), | ||
}) | ||
const args = process.argv.slice(2); | ||
@@ -22,3 +29,3 @@ const binPath = path.resolve(__dirname, 'openapi-generator.jar'); | ||
if (args) { | ||
command += ` generate -i openapi.json -g typescript-axios -o ${getPath('src/configs/codegen')}`; | ||
command += ` generate -i openapi.json -g typescript-axios -o ${getPath('src/configs/codegen')} --additional-properties useSingleRequestParameter=true`; | ||
} | ||
@@ -25,0 +32,0 @@ |
{ | ||
"name": "parsec-codegen", | ||
"version": "0.0.0-alpha.6", | ||
"version": "1.0.0", | ||
"description": "根据openapi生成代码", | ||
@@ -12,7 +12,7 @@ "bin": { | ||
"dependencies": { | ||
"@openapitools/openapi-generator-cli": "^1.0.18-4.3.1", | ||
"child_process": "^1.0.2", | ||
"download": "^8.0.0", | ||
"execa": "^4.0.3" | ||
"execa": "^4.0.3", | ||
"replace-in-files": "^3.0.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
24145562
5
34
1
5
+ Addedreplace-in-files@^3.0.0
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Addedarray-union@2.1.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedco@4.6.0(transitive)
+ Addeddir-glob@3.0.1(transitive)
+ Addedes6-promisify@6.1.1(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobby@11.1.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedis-binary@0.1.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreplace-in-files@3.0.0(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedslash@3.0.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removed@openapitools/openapi-generator-cli@1.0.18-5.0.0-beta2(transitive)