@elizaos/capacitor-mobile-signals 1.0.0 → 2.0.0-beta.1

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.
@@ -35,7 +35,7 @@ android {
35
35
  repositories {
36
36
  google()
37
37
  maven {
38
- url = uri(rootProject.ext.mavenCentralMirrorUrl)
38
+ url = uri(rootProject.ext.has('mavenCentralMirrorUrl') ? rootProject.ext.mavenCentralMirrorUrl : 'https://repo.maven.apache.org/maven2')
39
39
  }
40
40
  mavenCentral()
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/capacitor-mobile-signals",
3
- "version": "1.0.0",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "Bridges mobile wake, lock, battery, and protected-data state into LifeOps.",
5
5
  "keywords": [
6
6
  "mobile",
@@ -27,7 +27,8 @@
27
27
  "dist/",
28
28
  "ios/Sources/",
29
29
  "scripts/validate-ios-screen-time.mjs",
30
- "*.podspec"
30
+ "*.podspec",
31
+ "dist"
31
32
  ],
32
33
  "author": "elizaOS",
33
34
  "license": "MIT",
@@ -36,9 +37,9 @@
36
37
  "url": "https://github.com/elizaOS/eliza"
37
38
  },
38
39
  "scripts": {
39
- "build": "npm run clean && tsc && rollup -c rollup.config.mjs",
40
- "clean": "rimraf ./dist",
41
- "prepublishOnly": "npm run build",
40
+ "build": "bun run clean && bunx tsc -p tsconfig.json && bun --bun rollup -c rollup.config.mjs",
41
+ "clean": "node ../../../scripts/rm-path-recursive.mjs dist",
42
+ "prepublishOnly": "bun run build",
42
43
  "test": "vitest run",
43
44
  "validate:ios-screen-time": "node scripts/validate-ios-screen-time.mjs",
44
45
  "watch": "tsc --watch"
@@ -50,7 +51,7 @@
50
51
  "@rollup/plugin-node-resolve": "^16.0.0",
51
52
  "rimraf": "^6.0.0",
52
53
  "rollup": "^4.60.2",
53
- "typescript": "^6.0.0",
54
+ "typescript": "^6.0.3",
54
55
  "vitest": "^4.0.17"
55
56
  },
56
57
  "peerDependencies": {
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=web.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web.test.d.ts","sourceRoot":"","sources":["../../src/web.test.ts"],"names":[],"mappings":""}
@@ -1,75 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { MobileSignalsWeb } from "./web.js";
3
- describe("MobileSignalsWeb Screen Time status", () => {
4
- it("reports Screen Time as unavailable without fabricating usage data", async () => {
5
- const plugin = new MobileSignalsWeb();
6
- const permissions = await plugin.checkPermissions();
7
- expect(permissions.screenTime).toEqual({
8
- supported: false,
9
- requirements: {
10
- entitlements: {
11
- familyControls: "com.apple.developer.family-controls",
12
- },
13
- frameworks: ["FamilyControls", "DeviceActivity"],
14
- deviceActivityReportExtension: false,
15
- deviceActivityMonitorExtension: false,
16
- android: {
17
- usageStatsPermission: "android.permission.PACKAGE_USAGE_STATS",
18
- usageAccessSettingsAction: "android.settings.USAGE_ACCESS_SETTINGS",
19
- },
20
- },
21
- entitlements: {
22
- familyControls: false,
23
- },
24
- provisioning: {
25
- satisfied: false,
26
- inspected: "not-inspectable",
27
- reason: "Web fallback has no Family Controls or DeviceActivity access.",
28
- },
29
- authorization: {
30
- status: "unavailable",
31
- canRequest: false,
32
- },
33
- reportAvailable: false,
34
- coarseSummaryAvailable: false,
35
- thresholdEventsAvailable: false,
36
- rawUsageExportAvailable: false,
37
- android: {
38
- usageAccessGranted: false,
39
- packageUsageStatsPermissionDeclared: false,
40
- canOpenUsageAccessSettings: false,
41
- foregroundEventsAvailable: false,
42
- totalTimeForegroundMs: null,
43
- },
44
- reason: "Web fallback has no Family Controls or DeviceActivity access.",
45
- });
46
- expect(permissions.setupActions).toEqual([
47
- {
48
- id: "health_permissions",
49
- label: "Health permissions",
50
- status: "unavailable",
51
- canRequest: false,
52
- canOpenSettings: false,
53
- settingsTarget: null,
54
- reason: "Web fallback has no HealthKit or Health Connect access.",
55
- },
56
- {
57
- id: "screen_time_authorization",
58
- label: "Screen Time",
59
- status: "unavailable",
60
- canRequest: false,
61
- canOpenSettings: false,
62
- settingsTarget: null,
63
- reason: "Web fallback cannot open native Screen Time settings.",
64
- },
65
- ]);
66
- const snapshot = await plugin.getSnapshot();
67
- expect(snapshot.healthSnapshot?.screenTime).toEqual(permissions.screenTime);
68
- await expect(plugin.openSettings({ target: "usageAccess" })).resolves.toEqual({
69
- opened: false,
70
- target: "usageAccess",
71
- actualTarget: "app",
72
- reason: "Web fallback cannot open native device settings.",
73
- });
74
- });
75
- });