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

@capacitor-community/privacy-screen

Package Overview
Dependencies
Maintainers
27
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/privacy-screen - npm Package Compare versions

Comparing version 1.1.2 to 2.0.0-dev.6b38a40

android/src/main/java/com/getcapacitor/plugin/privacyscreen/PrivacyScreenPlugin.java

0

CHANGELOG.md

@@ -0,0 +0,0 @@ # Changelog

15

dist/esm/definitions.d.ts

@@ -1,17 +0,18 @@

declare module '@capacitor/core' {
interface PluginRegistry {
PrivacyScreen: PrivacyScreenPlugin;
}
}
export interface PrivacyScreenPlugin {
/**
* Supported platform(s): Android, iOS
* Enables the privacy screen protection.
*
* Only available for Android and iOS.
*
* @since 1.1.0
*/
enable(): Promise<void>;
/**
* Supported platform(s): Android, iOS
* Disables the privacy screen protection.
*
* Only available for Android and iOS.
*
* @since 1.1.0
*/
disable(): Promise<void>;
}

@@ -0,1 +1,2 @@

export {};
//# sourceMappingURL=definitions.js.map

@@ -0,2 +1,4 @@

import type { PrivacyScreenPlugin } from './definitions';
declare const PrivacyScreen: PrivacyScreenPlugin;
export * from './definitions';
export * from './web';
export { PrivacyScreen };

@@ -1,2 +0,7 @@

export * from './web';
import { registerPlugin } from '@capacitor/core';
const PrivacyScreen = registerPlugin('PrivacyScreen', {
web: () => import('./web').then(m => new m.PrivacyScreenWeb()),
});
export * from './definitions';
export { PrivacyScreen };
//# sourceMappingURL=index.js.map
import { WebPlugin } from '@capacitor/core';
import { PrivacyScreenPlugin } from './definitions';
import type { PrivacyScreenPlugin } from './definitions';
export declare class PrivacyScreenWeb extends WebPlugin implements PrivacyScreenPlugin {

@@ -8,3 +8,1 @@ constructor();

}
declare const PrivacyScreen: PrivacyScreenWeb;
export { PrivacyScreen };

@@ -1,10 +0,1 @@

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
import { WebPlugin } from '@capacitor/core';

@@ -18,17 +9,9 @@ export class PrivacyScreenWeb extends WebPlugin {

}
enable() {
return __awaiter(this, void 0, void 0, function* () {
console.warn('Web platform is not supported.');
});
async enable() {
throw this.unimplemented('Not implemented on web.');
}
disable() {
return __awaiter(this, void 0, void 0, function* () {
console.warn('Web platform is not supported.');
});
async disable() {
throw this.unimplemented('Not implemented on web.');
}
}
const PrivacyScreen = new PrivacyScreenWeb();
export { PrivacyScreen };
import { registerWebPlugin } from '@capacitor/core';
registerWebPlugin(PrivacyScreen);
//# sourceMappingURL=web.js.map

@@ -7,11 +7,6 @@ 'use strict';

var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const PrivacyScreen = core.registerPlugin('PrivacyScreen', {
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.PrivacyScreenWeb()),
});
class PrivacyScreenWeb extends core.WebPlugin {

@@ -24,18 +19,16 @@ constructor() {

}
enable() {
return __awaiter(this, void 0, void 0, function* () {
console.warn('Web platform is not supported.');
});
async enable() {
throw this.unimplemented('Not implemented on web.');
}
disable() {
return __awaiter(this, void 0, void 0, function* () {
console.warn('Web platform is not supported.');
});
async disable() {
throw this.unimplemented('Not implemented on web.');
}
}
const PrivacyScreen = new PrivacyScreenWeb();
core.registerWebPlugin(PrivacyScreen);
var web = /*#__PURE__*/Object.freeze({
__proto__: null,
PrivacyScreenWeb: PrivacyScreenWeb
});
exports.PrivacyScreen = PrivacyScreen;
exports.PrivacyScreenWeb = PrivacyScreenWeb;
//# sourceMappingURL=plugin.cjs.js.map
var capacitorPrivacyScreen = (function (exports, core) {
'use strict';
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
const PrivacyScreen = core.registerPlugin('PrivacyScreen', {
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.PrivacyScreenWeb()),
});
class PrivacyScreenWeb extends core.WebPlugin {

@@ -20,19 +15,19 @@ constructor() {

}
enable() {
return __awaiter(this, void 0, void 0, function* () {
console.warn('Web platform is not supported.');
});
async enable() {
throw this.unimplemented('Not implemented on web.');
}
disable() {
return __awaiter(this, void 0, void 0, function* () {
console.warn('Web platform is not supported.');
});
async disable() {
throw this.unimplemented('Not implemented on web.');
}
}
const PrivacyScreen = new PrivacyScreenWeb();
core.registerWebPlugin(PrivacyScreen);
var web = /*#__PURE__*/Object.freeze({
__proto__: null,
PrivacyScreenWeb: PrivacyScreenWeb
});
exports.PrivacyScreen = PrivacyScreen;
exports.PrivacyScreenWeb = PrivacyScreenWeb;
Object.defineProperty(exports, '__esModule', { value: true });
return exports;

@@ -39,0 +34,0 @@

{
"name": "@capacitor-community/privacy-screen",
"version": "1.1.2",
"version": "2.0.0-dev.6b38a40",
"description": "Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.",

@@ -9,6 +9,13 @@ "main": "dist/plugin.js",

"scripts": {
"lint": "npm run prettier -- --check && npm run swiftlint -- lint",
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
"verify:android": "cd android && ./gradlew clean build test && cd ..",
"verify:web": "npm run build",
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- autocorrect --format",
"eslint": "eslint . --ext ts",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"build": "npm run clean && tsc && rollup -c rollup.config.js",
"docgen": "docgen --api PrivacyScreenPlugin --output-readme README.md --output-json dist/docs.json",
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
"clean": "rimraf ./dist",

@@ -22,17 +29,20 @@ "watch": "tsc --watch",

"devDependencies": {
"@capacitor/android": "2.4.6",
"@capacitor/core": "2.4.6",
"@capacitor/ios": "2.4.6",
"@ionic/prettier-config": "1.0.0",
"@ionic/swiftlint-config": "1.0.0",
"prettier": "2.0.5",
"prettier-plugin-java": "0.8.3",
"rimraf": "3.0.0",
"rollup": "2.21.0",
"@capacitor/android": "3.0.0-beta.6",
"@capacitor/core": "3.0.0-beta.6",
"@capacitor/docgen": "0.0.16",
"@capacitor/ios": "3.0.0-beta.6",
"@ionic/eslint-config": "0.3.0",
"@ionic/prettier-config": "1.0.1",
"@ionic/swiftlint-config": "1.1.2",
"eslint": "7.11.0",
"prettier": "2.2.0",
"prettier-plugin-java": "1.0.0",
"rimraf": "3.0.2",
"rollup": "2.32.0",
"standard-version": "9.1.0",
"swiftlint": "1.0.1",
"typescript": "3.8.3"
"typescript": "4.0.3"
},
"peerDependencies": {
"@capacitor/core": "^2.4.6"
"@capacitor/core": "3.0.0-beta.6"
},

@@ -61,2 +71,5 @@ "files": [

"swiftlint": "@ionic/swiftlint-config",
"eslintConfig": {
"extends": "@ionic/eslint-config/recommended"
},
"repository": {

@@ -63,0 +76,0 @@ "type": "git",

@@ -35,3 +35,12 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p>

### Capacitor 3.x
```
npm install @capacitor-community/privacy-screen@next
npx cap sync
```
### Capacitor 2.x
```
npm install @capacitor-community/privacy-screen

@@ -58,3 +67,2 @@ npx cap sync

new ArrayList<Class<? extends Plugin>>() {
{

@@ -69,2 +77,3 @@ // Additional plugins you've installed go here

}
```

@@ -95,2 +104,45 @@

## API
<docgen-index>
* [`enable()`](#enable)
* [`disable()`](#disable)
</docgen-index>
<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
### enable()
```typescript
enable() => Promise<void>
```
Enables the privacy screen protection.
Only available for Android and iOS.
**Since:** 1.1.0
--------------------
### disable()
```typescript
disable() => Promise<void>
```
Disables the privacy screen protection.
Only available for Android and iOS.
**Since:** 1.1.0
--------------------
</docgen-api>
## Changelog

@@ -97,0 +149,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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