Socket
Socket
Sign inDemoInstall

@capacitor/docgen

Package Overview
Dependencies
Maintainers
6
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/docgen - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

16

dist/parse.js

@@ -29,13 +29,3 @@ "use strict";

return (api) => {
let apiInterface = interfaces.find((i) => i.name === api) || null;
/**
* Add methods of import(many is used in `extends`)
*/
const allImportObject = interfaces
.filter((i) => (apiInterface === null || apiInterface === void 0 ? void 0 : apiInterface.importObject.includes(i.name)) && i.name !== api)
.map((i) => i.importObject);
const otherMethod = interfaces.filter((i) => [...new Set(allImportObject.flat())].includes(i.name)).map((d) => d.methods) || null;
if (apiInterface !== null && otherMethod && otherMethod.length > 0) {
apiInterface.methods = [...new Set(apiInterface === null || apiInterface === void 0 ? void 0 : apiInterface.methods.concat(otherMethod.flat(1)))];
}
const apiInterface = interfaces.find((i) => i.name === api) || null;
const data = {

@@ -108,3 +98,2 @@ api: apiInterface,

function getInterface(typeChecker, node) {
var _a, _b;
const interfaceName = node.name.text;

@@ -127,4 +116,2 @@ const methods = node.members.filter(typescript_1.default.isMethodSignature).reduce((methods, methodSignature) => {

const docs = symbol ? serializeSymbol(typeChecker, symbol) : null;
// @ts-ignore
const importObject = ((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.locals) === null || _b === void 0 ? void 0 : _b.keys()) || [];
const i = {

@@ -137,3 +124,2 @@ name: interfaceName,

properties,
importObject: [...importObject].filter((d) => d !== interfaceName),
};

@@ -140,0 +126,0 @@ return i;

@@ -21,3 +21,2 @@ export interface DocsData {

properties: DocsInterfaceProperty[];
importObject: string[];
}

@@ -24,0 +23,0 @@ export interface DocsEnum {

2

package.json
{
"name": "@capacitor/docgen",
"version": "0.1.1",
"version": "0.2.0",
"description": "Docs Readme Markdown and JSON Generator for Capacitor Plugins",

@@ -5,0 +5,0 @@ "keywords": [

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