@brucewayne1939/sword-security 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,13 +7,13 @@ this plugin enables the app to use security features
7
7
  To use npm
8
8
 
9
9
  ```bash
10
- npm install sword-security
10
+ npm install @brucewayne1939/sword-security
11
11
  ````
12
12
 
13
13
  To use yarn
14
14
 
15
15
  ```bash
16
- yarn add sword-security
16
+ yarn add @brucewayne1939/sword-security
17
17
  ```
18
18
 
19
19
  Sync native files
@@ -27,7 +27,7 @@ npx cap sync
27
27
  Add the following to your `app.component.ts`:
28
28
 
29
29
  ```typescript
30
- import { Security } from 'sword-security';
30
+ import { SwordSecurityPlugin } from '@brucewayne1939/sword-security';
31
31
 
32
32
  @Component({
33
33
  // ...
@@ -50,8 +50,8 @@ export class AppComponent implements OnInit {
50
50
 
51
51
  async checkDeviceSecurity() {
52
52
  try {
53
- const rootResult = await Security.isRooted();
54
- const devResult = await Security.isDeveloperModeEnabled();
53
+ const rootResult = await SwordSecurityPlugin.isRooted();
54
+ const devResult = await SwordSecurityPlugin.isDeveloperModeEnabled();
55
55
  console.log('Rooted:', rootResult.rooted);
56
56
  console.log('Developer Mode:', devResult.enabled);
57
57
 
@@ -69,7 +69,7 @@ export class AppComponent implements OnInit {
69
69
  text: 'Open Settings',
70
70
  handler: async () => {
71
71
  this.securityPopupOpen = false;
72
- await Security.openDeveloperSettings();
72
+ await SwordSecurityPlugin.openDeveloperSettings();
73
73
  }
74
74
  }
75
75
  ]
@@ -18,7 +18,7 @@ buildscript {
18
18
  apply plugin: 'com.android.library'
19
19
 
20
20
  android {
21
- namespace = "com.mycompany.plugins.example"
21
+ namespace = "com.brucewayne1939.swordsecurity"
22
22
  compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
23
23
  defaultConfig {
24
24
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
@@ -1,8 +1,8 @@
1
- package com.mycompany.plugins.example;
1
+ package com.brucewayne1939.swordsecurity;
2
2
 
3
3
  import com.getcapacitor.Logger;
4
4
 
5
- public class Example {
5
+ public class SwordSecurity {
6
6
 
7
7
  public String echo(String value) {
8
8
  Logger.info("Echo", value);
@@ -1,4 +1,4 @@
1
- package com.mycompany.plugins.example;
1
+ package com.brucewayne1939.swordsecurity;
2
2
 
3
3
  import android.content.Intent;
4
4
  import android.provider.Settings;
@@ -9,8 +9,8 @@ import com.getcapacitor.PluginMethod;
9
9
  import com.getcapacitor.annotation.CapacitorPlugin;
10
10
  import java.io.File;
11
11
 
12
- @CapacitorPlugin(name = "SecurityPlugin")
13
- public class SecurityPlugin extends Plugin {
12
+ @CapacitorPlugin(name = "SwordSecurityPlugin")
13
+ public class SwordSecurityPlugin extends Plugin {
14
14
 
15
15
  @PluginMethod
16
16
  public void isDeveloperModeEnabled(PluginCall call) {
@@ -1,4 +1,4 @@
1
- export interface SecurityPlugin {
1
+ export interface SwordSecurityPlugin {
2
2
  isDeveloperModeEnabled(): Promise<{
3
3
  enabled: boolean;
4
4
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface SecurityPlugin {\n isDeveloperModeEnabled(): Promise<{ enabled: boolean }>;\n isRooted(): Promise<{ rooted: boolean }>;\n openDeveloperSettings(): Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface SwordSecurityPlugin {\n isDeveloperModeEnabled(): Promise<{ enabled: boolean }>;\n isRooted(): Promise<{ rooted: boolean }>;\n openDeveloperSettings(): Promise<void>;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { SecurityPlugin } from './definitions';
2
- declare const SecurityPlugin: SecurityPlugin;
1
+ import type { SwordSecurityPlugin } from './definitions';
2
+ declare const SwordSecurityPlugin: SwordSecurityPlugin;
3
3
  export * from './definitions';
4
- export { SecurityPlugin };
4
+ export { SwordSecurityPlugin };
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { registerPlugin } from '@capacitor/core';
2
- const SecurityPlugin = registerPlugin('SecurityPlugin', {
2
+ const SwordSecurityPlugin = registerPlugin('SwordSecurityPlugin', {
3
3
  web: () => import('./web').then((m) => new m.SecurityWeb()),
4
4
  });
5
5
  export * from './definitions';
6
- export { SecurityPlugin };
6
+ export { SwordSecurityPlugin };
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,cAAc,GAAG,cAAc,CAAiB,gBAAgB,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { SecurityPlugin } from './definitions';\n\nconst SecurityPlugin = registerPlugin<SecurityPlugin>('SecurityPlugin', {\n web: () => import('./web').then((m) => new m.SecurityWeb()),\n});\n\nexport * from './definitions';\nexport { SecurityPlugin };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,mBAAmB,GAAG,cAAc,CAAsB,qBAAqB,EAAE;IACrF,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { SwordSecurityPlugin } from './definitions';\n\nconst SwordSecurityPlugin = registerPlugin<SwordSecurityPlugin>('SwordSecurityPlugin', {\n web: () => import('./web').then((m) => new m.SecurityWeb()),\n});\n\nexport * from './definitions';\nexport { SwordSecurityPlugin };\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- import type { SecurityPlugin } from './definitions';
3
- export declare class SecurityWeb extends WebPlugin implements SecurityPlugin {
2
+ import type { SwordSecurityPlugin } from './definitions';
3
+ export declare class SecurityWeb extends WebPlugin implements SwordSecurityPlugin {
4
4
  isDeveloperModeEnabled(): Promise<{
5
5
  enabled: boolean;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACxC,KAAK,CAAC,sBAAsB;QAC1B,kEAAkE;QAClE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,wDAAwD;QACxD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,qBAAqB;QACzB,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACvC,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { SecurityPlugin } from './definitions';\n\nexport class SecurityWeb extends WebPlugin implements SecurityPlugin {\n async isDeveloperModeEnabled(): Promise<{ enabled: boolean }> {\n // Web implementation - developer mode is typically not applicable\n return { enabled: false };\n }\n\n async isRooted(): Promise<{ rooted: boolean }> {\n // Web implementation - rooting is not applicable on web\n return { rooted: false };\n }\n\n async openDeveloperSettings(): Promise<void> {\n console.warn('Not supported on web');\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACxC,KAAK,CAAC,sBAAsB;QAC1B,kEAAkE;QAClE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,wDAAwD;QACxD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,qBAAqB;QACzB,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACvC,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { SwordSecurityPlugin } from './definitions';\n\nexport class SecurityWeb extends WebPlugin implements SwordSecurityPlugin {\n async isDeveloperModeEnabled(): Promise<{ enabled: boolean }> {\n // Web implementation - developer mode is typically not applicable\n return { enabled: false };\n }\n\n async isRooted(): Promise<{ rooted: boolean }> {\n // Web implementation - rooting is not applicable on web\n return { rooted: false };\n }\n\n async openDeveloperSettings(): Promise<void> {\n console.warn('Not supported on web');\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
 
3
3
  var core = require('@capacitor/core');
4
4
 
5
- const SecurityPlugin = core.registerPlugin('SecurityPlugin', {
5
+ const SwordSecurityPlugin = core.registerPlugin('SwordSecurityPlugin', {
6
6
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SecurityWeb()),
7
7
  });
8
8
 
@@ -25,5 +25,5 @@ var web = /*#__PURE__*/Object.freeze({
25
25
  SecurityWeb: SecurityWeb
26
26
  });
27
27
 
28
- exports.SecurityPlugin = SecurityPlugin;
28
+ exports.SwordSecurityPlugin = SwordSecurityPlugin;
29
29
  //# sourceMappingURL=plugin.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SecurityPlugin = registerPlugin('SecurityPlugin', {\n web: () => import('./web').then((m) => new m.SecurityWeb()),\n});\nexport * from './definitions';\nexport { SecurityPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SecurityWeb extends WebPlugin {\n async isDeveloperModeEnabled() {\n // Web implementation - developer mode is typically not applicable\n return { enabled: false };\n }\n async isRooted() {\n // Web implementation - rooting is not applicable on web\n return { rooted: false };\n }\n async openDeveloperSettings() {\n console.warn('Not supported on web');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;AACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/D,CAAC;;ACFM,MAAM,WAAW,SAASC,cAAS,CAAC;AAC3C,IAAI,MAAM,sBAAsB,GAAG;AACnC;AACA,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ,IAAI,MAAM,QAAQ,GAAG;AACrB;AACA,QAAQ,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;AAChC,IAAI;AACJ,IAAI,MAAM,qBAAqB,GAAG;AAClC,QAAQ,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;AAC5C,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SwordSecurityPlugin = registerPlugin('SwordSecurityPlugin', {\n web: () => import('./web').then((m) => new m.SecurityWeb()),\n});\nexport * from './definitions';\nexport { SwordSecurityPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SecurityWeb extends WebPlugin {\n async isDeveloperModeEnabled() {\n // Web implementation - developer mode is typically not applicable\n return { enabled: false };\n }\n async isRooted() {\n // Web implementation - rooting is not applicable on web\n return { rooted: false };\n }\n async openDeveloperSettings() {\n console.warn('Not supported on web');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,mBAAmB,GAAGA,mBAAc,CAAC,qBAAqB,EAAE;AAClE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/D,CAAC;;ACFM,MAAM,WAAW,SAASC,cAAS,CAAC;AAC3C,IAAI,MAAM,sBAAsB,GAAG;AACnC;AACA,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;AACjC,IAAI;AACJ,IAAI,MAAM,QAAQ,GAAG;AACrB;AACA,QAAQ,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;AAChC,IAAI;AACJ,IAAI,MAAM,qBAAqB,GAAG;AAClC,QAAQ,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;AAC5C,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var capacitorExample = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
- const SecurityPlugin = core.registerPlugin('SecurityPlugin', {
4
+ const SwordSecurityPlugin = core.registerPlugin('SwordSecurityPlugin', {
5
5
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.SecurityWeb()),
6
6
  });
7
7
 
@@ -24,7 +24,7 @@ var capacitorExample = (function (exports, core) {
24
24
  SecurityWeb: SecurityWeb
25
25
  });
26
26
 
27
- exports.SecurityPlugin = SecurityPlugin;
27
+ exports.SwordSecurityPlugin = SwordSecurityPlugin;
28
28
 
29
29
  return exports;
30
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SecurityPlugin = registerPlugin('SecurityPlugin', {\n web: () => import('./web').then((m) => new m.SecurityWeb()),\n});\nexport * from './definitions';\nexport { SecurityPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SecurityWeb extends WebPlugin {\n async isDeveloperModeEnabled() {\n // Web implementation - developer mode is typically not applicable\n return { enabled: false };\n }\n async isRooted() {\n // Web implementation - rooting is not applicable on web\n return { rooted: false };\n }\n async openDeveloperSettings() {\n console.warn('Not supported on web');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;IACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;;ICFM,MAAM,WAAW,SAASC,cAAS,CAAC;IAC3C,IAAI,MAAM,sBAAsB,GAAG;IACnC;IACA,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ,IAAI,MAAM,QAAQ,GAAG;IACrB;IACA,QAAQ,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IAChC,IAAI;IACJ,IAAI,MAAM,qBAAqB,GAAG;IAClC,QAAQ,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;IAC5C,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SwordSecurityPlugin = registerPlugin('SwordSecurityPlugin', {\n web: () => import('./web').then((m) => new m.SecurityWeb()),\n});\nexport * from './definitions';\nexport { SwordSecurityPlugin };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SecurityWeb extends WebPlugin {\n async isDeveloperModeEnabled() {\n // Web implementation - developer mode is typically not applicable\n return { enabled: false };\n }\n async isRooted() {\n // Web implementation - rooting is not applicable on web\n return { rooted: false };\n }\n async openDeveloperSettings() {\n console.warn('Not supported on web');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,mBAAmB,GAAGA,mBAAc,CAAC,qBAAqB,EAAE;IAClE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;;ICFM,MAAM,WAAW,SAASC,cAAS,CAAC;IAC3C,IAAI,MAAM,sBAAsB,GAAG;IACnC;IACA,QAAQ,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;IACjC,IAAI;IACJ,IAAI,MAAM,QAAQ,GAAG;IACrB;IACA,QAAQ,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IAChC,IAAI;IACJ,IAAI,MAAM,qBAAqB,GAAG;IAClC,QAAQ,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC;IAC5C,IAAI;IACJ;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brucewayne1939/sword-security",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "this plugin enables the app to use security features",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",