New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@xdp/generate-api

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xdp/generate-api - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

12

package.json
{
"name": "@xdp/generate-api",
"version": "1.0.5",
"version": "1.0.6",
"description": "",
"main": "index.js",
"scripts": {
"dev": "node ./bin/gen-api-dev.js",
"gen": "node ./bin/gen-api.js"
},
"bin": {

@@ -49,3 +45,7 @@ "gen-api": "./bin/gen-api.js"

"registry": "https://registry.npmjs.org/"
},
"scripts": {
"dev": "node ./bin/gen-api-dev.js",
"gen": "node ./bin/gen-api.js"
}
}
}

@@ -100,6 +100,11 @@ const path = require('path')

const item = interfaceItem[interfaceKey]
propertyList.push(`${interfaceKey}?: ${item.type} // ${item.description}`)
propertyList.push(`/**
* ${item.description}
*/
${interfaceKey}?: ${item.type}`)
})
const content = `${importString}
// ${definition.description || originKey}
/**
* ${definition.description || originKey}
*/
export interface I${toUpperFirst(key)} {

@@ -110,3 +115,5 @@ ${propertyList.join('\n ')}

writeFile(content, `${key}.ts`, dirPath)
writeFile(`// ${definition.description || originKey}
writeFile(`/**
* ${definition.description || originKey}
*/
export { I${toUpperFirst(key)} } from './${key}'\n`, 'index.ts', dirPath, true)

@@ -113,0 +120,0 @@ result[key] = content

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