Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parsec-codegen

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parsec-codegen - npm Package Compare versions

Comparing version 0.0.0-alpha.6 to 1.0.0

openapitools.json

9

bin/parsec-codegen.js

@@ -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 @@

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc