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

@aparajita/capacitor-native-decorator

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aparajita/capacitor-native-decorator - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

14

dist/cli/make-ios-plugin.js

@@ -48,2 +48,5 @@ #! /usr/bin/env node

}
function capitalize(str) {
return `${str.at(0)?.toUpperCase()}${str.slice(1)}`;
}
function cli() {

@@ -59,10 +62,9 @@ const pluginPath = checkPath();

const nativeMethods = [...plugin.matchAll(decoraterRE)].reduce((result, match) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const groups = match.groups;
const returnType = ['none', 'callback'].includes(groups?.returnType ?? '')
? 'CAPPluginReturnCallback'
: 'CAPPluginReturnPromise';
const returnType = groups.returnType ?? 'promise';
const capReturnType = `CAPPluginReturn${capitalize(returnType)}`;
result.push(pluginEntryTemplate
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
.replace('__method__', groups?.methodName ?? '')
.replace('__type__', returnType));
.replace('__method__', groups.methodName)
.replace('__type__', capReturnType));
return result;

@@ -69,0 +71,0 @@ }, []);

{
"name": "@aparajita/capacitor-native-decorator",
"version": "2.0.2",
"version": "2.0.3",
"description": "Decorator for Capacitor plugins that allows painless TypeScript<->native integration",

@@ -41,8 +41,8 @@ "keywords": [

"push": "git push --follow-tags origin main",
"release.check": "commit-and-tag-version $VERSION --dry-run",
"release": "commit-and-tag-version $VERSION && pnpm push && pnpm publish"
"release.check": "commit-and-tag-version ${VERSION:+-r $VERSION} --dry-run",
"release": "commit-and-tag-version ${VERSION:+-r $VERSION} && pnpm push && pnpm publish"
},
"repository": {
"type": "git",
"url": "git+https://github.com/aparajita/capacitor-native-decorator.git"
"url": "https://github.com/aparajita/capacitor-native-decorator.git"
},

@@ -49,0 +49,0 @@ "bugs": {

{
"name": "@aparajita/capacitor-native-decorator",
"version": "2.0.3",
"version": "2.0.4",
"description": "Decorator for Capacitor plugins that allows painless TypeScript<->native integration",

@@ -27,3 +27,3 @@ "keywords": [

"type": "git",
"url": "git+https://github.com/aparajita/capacitor-native-decorator.git"
"url": "https://github.com/aparajita/capacitor-native-decorator.git"
},

@@ -76,5 +76,5 @@ "bugs": {

"push": "git push --follow-tags origin main",
"release.check": "commit-and-tag-version $VERSION --dry-run",
"release": "commit-and-tag-version $VERSION && pnpm push && pnpm publish"
"release.check": "commit-and-tag-version ${VERSION:+-r $VERSION} --dry-run",
"release": "commit-and-tag-version ${VERSION:+-r $VERSION} && pnpm push && pnpm publish"
}
}
<div class="markdown-body">
# capacitor-native-decorator
# capacitor-native-decorator&nbsp;&nbsp;[![npm version](https://badge.fury.io/js/@aparajita%2Fcapacitor-native-decorator.svg)](https://badge.fury.io/js/@aparajita%2Fcapacitor-native-decorator)

@@ -5,0 +5,0 @@ This package adds a `@native` decorator to TypeScript, which fundamentally changes the way we write and call Capacitor plugins.

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