@codeleap/permissions 7.0.0 → 7.0.2

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.
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Permission = void 0;
13
+ const store_1 = require("@codeleap/store");
14
+ const types_1 = require("@codeleap/types");
15
+ const logger_1 = require("@codeleap/logger");
16
+ /**
17
+ * Represents a single named permission with persistent reactive state.
18
+ *
19
+ * State is backed by `globalState` and persisted under the key
20
+ * `"permissions-<name>"`, so the last-known status survives page reloads or
21
+ * app restarts without an extra async check.
22
+ *
23
+ * The status machine has one sticky transition: once a permission reaches
24
+ * `"blocked"` it will never regress to `"denied"` via {@link check} — because
25
+ * on most platforms a blocked permission can only be cleared through the OS
26
+ * settings screen, not by a subsequent API call.
27
+ */
28
+ class Permission {
29
+ /**
30
+ * Converts a raw status string into a structured descriptor object.
31
+ * Prefer this over equality checks scattered across call sites so that
32
+ * adding a new status variant only requires updating this method.
33
+ */
34
+ static is(status) {
35
+ return {
36
+ value: status,
37
+ isGranted: status === 'granted',
38
+ isLimited: status === 'limited',
39
+ isDenied: status === 'denied',
40
+ isBlocked: status === 'blocked',
41
+ };
42
+ }
43
+ /**
44
+ * Snapshot of the persisted status. Returns `null` until the first
45
+ * `check()` or `request()` resolves.
46
+ */
47
+ get value() {
48
+ return this.state.get();
49
+ }
50
+ get isGranted() {
51
+ return Permission.is(this.value).isGranted;
52
+ }
53
+ get isLimited() {
54
+ return Permission.is(this.value).isLimited;
55
+ }
56
+ get isDenied() {
57
+ return Permission.is(this.value).isDenied;
58
+ }
59
+ get isBlocked() {
60
+ return Permission.is(this.value).isBlocked;
61
+ }
62
+ constructor(options) {
63
+ const { name, config, check, request } = options;
64
+ this.state = (0, store_1.globalState)(null, { persistKey: 'permissions-' + name });
65
+ this.name = name;
66
+ this.config = config;
67
+ this.checkStatus = check;
68
+ this.requestStatus = request;
69
+ }
70
+ log(msg, obj) {
71
+ if (!Permission.logsEnabled)
72
+ return;
73
+ logger_1.logger.log(`(Permission) ${this.name} -> ${msg}`, obj);
74
+ }
75
+ /**
76
+ * Directly overwrites the stored status without going through the native
77
+ * check or request flow. Useful when the status is already known from an
78
+ * external source (e.g. a push-notification token registration callback).
79
+ */
80
+ set(newStatus) {
81
+ this.state.set(newStatus);
82
+ }
83
+ /**
84
+ * React hook that subscribes a component to this permission's reactive
85
+ * state. Re-renders whenever the status changes.
86
+ */
87
+ use() {
88
+ return this.state.use();
89
+ }
90
+ /**
91
+ * Queries the native status without showing a user-facing prompt.
92
+ *
93
+ * If the platform returns `"denied"` but the stored value is already
94
+ * `"blocked"`, the `"blocked"` value is preserved. This guards against
95
+ * platforms that report a previously-blocked permission as merely denied on
96
+ * subsequent queries, which would incorrectly allow a re-request attempt.
97
+ */
98
+ check() {
99
+ return __awaiter(this, void 0, void 0, function* () {
100
+ let status = yield this.checkStatus();
101
+ if (status === 'denied' && this.value === 'blocked') {
102
+ status = this.value;
103
+ }
104
+ const update = status != this.value;
105
+ if (update && types_1.TypeGuards.isString(status)) {
106
+ this.set(status);
107
+ }
108
+ this.log('check', { status, update });
109
+ return status;
110
+ });
111
+ }
112
+ /**
113
+ * Triggers an interactive permission prompt (may show a system dialog) and
114
+ * updates stored state when the result differs from the current value.
115
+ * Only call this in direct response to a user action; invoking it
116
+ * speculatively or on mount will fail silently on most platforms.
117
+ */
118
+ request() {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ const status = yield this.requestStatus();
121
+ const update = status != this.value;
122
+ if (update && types_1.TypeGuards.isString(status)) {
123
+ this.set(status);
124
+ }
125
+ this.log('request', { status, update });
126
+ return status;
127
+ });
128
+ }
129
+ }
130
+ exports.Permission = Permission;
131
+ /**
132
+ * Set to `true` to enable verbose permission logs via `@codeleap/logger`.
133
+ * Applies to every `Permission` instance; toggling at runtime takes effect
134
+ * immediately.
135
+ */
136
+ Permission.logsEnabled = false;
137
+ //# sourceMappingURL=Permission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Permission.js","sourceRoot":"","sources":["../src/Permission.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0D;AAG1D,2CAA4C;AAC5C,6CAAyC;AAEzC;;;;;;;;;;;GAWG;AACH,MAAa,UAAU;IAiBrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,MAAwB;QAChC,OAAO;YACL,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,MAAM,KAAK,SAAS;YAC/B,SAAS,EAAE,MAAM,KAAK,SAAS;YAC/B,QAAQ,EAAE,MAAM,KAAK,QAAQ;YAC7B,SAAS,EAAE,MAAM,KAAK,SAAS;SAChC,CAAA;IACH,CAAC;IAKD;;;OAGG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAA;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAA;IAC5C,CAAC;IAED,IAAI,SAAS;QACX,OAAO,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAA;IAC5C,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAA;IAC3C,CAAC;IAED,I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AC,MAAM,CAAC,EAAE,CAAC;gBAC1C,IAAI,CAAC,GAAG,CAAC,MAA0B,CAAC,CAAA;YACtC,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;YAErC,OAAO,MAAM,CAAA;QACf,CAAC;KAAA;IAED;;;;;OAKG;IACG,OAAO;;YACX,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAA;YACzC,MAAM,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC,KAAK,CAAA;YAEnC,IAAI,MAAM,IAAI,kBAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1C,IAAI,CAAC,GAAG,CAAC,MAA0B,CAAC,CAAA;YACtC,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;YAEvC,OAAO,MAAM,CAAA;QACf,CAAC;KAAA;;AAvIH,gCAwIC;AA9HC;;;;GAIG;AACI,sBAAW,GAAY,KAAK,CAAA"}
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.PermissionsManager = void 0;
13
+ const Permission_1 = require("./Permission");
14
+ const logger_1 = require("@codeleap/logger");
15
+ /**
16
+ * Registry and coordinator for a fixed set of named permissions.
17
+ *
18
+ * Instantiating this class immediately calls `checkAll()` in the background so
19
+ * that every permission's cached status is refreshed before the first render.
20
+ * The `requester` callback is the single authoritative place to implement any
21
+ * pre-prompt logic (e.g. showing an educational interstitial before the OS
22
+ * dialog appears).
23
+ */
24
+ class PermissionsManager {
25
+ get keys() {
26
+ return Object.keys(this.permissions);
27
+ }
28
+ /**
29
+ * Snapshot of all registered permissions' current statuses. Values reflect
30
+ * whatever is in persistent state at the moment of access — call
31
+ * `checkAll()` first if you need fresh data from the platform.
32
+ */
33
+ get values() {
34
+ const values = {};
35
+ this.forEach(permission => {
36
+ values[permission.name] = permission.value;
37
+ });
38
+ return values;
39
+ }
40
+ forEach(callbackFn) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ for (const permissionName in this.permissions) {
43
+ const permission = this.permissions[permissionName];
44
+ callbackFn(permission);
45
+ }
46
+ });
47
+ }
48
+ constructor(requester, permissions) {
49
+ this.permissions = {};
50
+ for (const permission in permissions) {
51
+ const permissionConfig = permissions[permission];
52
+ const permissionClass = new Permission_1.Permission(Object.assign(Object.assign({}, permissionConfig), { name: permission }));
53
+ this.permissions[permission] = permissionClass;
54
+ }
55
+ this.requester = requester;
56
+ this.checkAll();
57
+ }
58
+ log(msg, ...args) {
59
+ if (!Permission_1.Permission.logsEnabled)
60
+ return;
61
+ logger_1.logger.log(`(Permissions) -> ${msg}`, ...(args !== null && args !== void 0 ? args : ''));
62
+ }
63
+ /**
64
+ * React hook that subscribes a component to the reactive state of a single
65
+ * named permission. Re-renders whenever that permission's status changes.
66
+ */
67
+ use(permissionName) {
68
+ return this.permissions[permissionName].use();
69
+ }
70
+ /**
71
+ * Requests a single permission through the manager's `requester` callback.
72
+ * The result passes through {@link Permission.is} so callers get a
73
+ * structured descriptor rather than a raw string.
74
+ *
75
+ * Note: this bypasses `Permission.request()` on the individual instance —
76
+ * the `requester` callback owns the full flow, including any pre-prompt UI.
77
+ */
78
+ request(permissionName) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ const permission = this.permissions[permissionName];
81
+ const status = yield this.requester(permission);
82
+ return Permission_1.Permission.is(status);
83
+ });
84
+ }
85
+ /**
86
+ * Silently queries a single permission's current status (no system dialog).
87
+ * Returns a structured descriptor via {@link Permission.is}.
88
+ */
89
+ check(permissionName) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ const permission = this.permissions[permissionName];
92
+ const status = yield permission.check();
93
+ return Permission_1.Permission.is(status);
94
+ });
95
+ }
96
+ /**
97
+ * Requests multiple permissions sequentially. Requests are serial, not
98
+ * parallel, to avoid triggering concurrent system dialogs which may be
99
+ * rejected or silently dropped on some platforms.
100
+ */
101
+ requestMany(permissionsNames) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const status = {};
104
+ for (const permissionName of permissionsNames) {
105
+ status[permissionName] = yield this.request(permissionName);
106
+ }
107
+ return status;
108
+ });
109
+ }
110
+ /**
111
+ * Silently queries multiple permissions sequentially. Serial execution
112
+ * ensures consistent ordering and avoids race conditions in the underlying
113
+ * state store.
114
+ */
115
+ checkMany(permissionsNames) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ const status = {};
118
+ for (const permissionName of permissionsNames) {
119
+ status[permissionName] = yield this.check(permissionName);
120
+ }
121
+ return status;
122
+ });
123
+ }
124
+ /**
125
+ * Silently refreshes every registered permission. Called automatically
126
+ * during construction so that cached statuses are up to date before the
127
+ * first render without requiring the caller to await initialization.
128
+ */
129
+ checkAll() {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ this.log('checkAll');
132
+ return yield this.checkMany(this.keys);
133
+ });
134
+ }
135
+ }
136
+ exports.PermissionsManager = PermissionsManager;
137
+ //# sourceMappingURL=PermissionsManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionsManager.js","sourceRoot":"","sources":["../src/PermissionsManager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAyC;AAGzC,6CAAyC;AAEzC;;;;;;;;GAQG;AACH,MAAa,kBAAkB;IAK7B,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B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACxC,CAAC;KAAA;CACF;AA/HD,gDA+HC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=globals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globals.js","sourceRoot":"","sources":["../src/globals.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./PermissionsManager"), exports);
18
+ __exportStar(require("./Permission"), exports);
19
+ __exportStar(require("./types"), exports);
20
+ __exportStar(require("./globals"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,+CAA4B;AAC5B,0CAAuB;AACvB,4CAAyB"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codeleap/permissions",
3
- "version": "7.0.0",
4
- "main": "src/index.ts",
3
+ "version": "7.0.2",
4
+ "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
7
7
  ".": {
@@ -22,10 +22,10 @@
22
22
  "directory": "packages/permissions"
23
23
  },
24
24
  "devDependencies": {
25
- "@codeleap/config": "7.0.0",
26
- "@codeleap/logger": "7.0.0",
27
- "@codeleap/store": "7.0.0",
28
- "@codeleap/types": "7.0.0",
25
+ "@codeleap/config": "7.0.1",
26
+ "@codeleap/logger": "7.0.1",
27
+ "@codeleap/store": "7.0.1",
28
+ "@codeleap/types": "7.0.1",
29
29
  "ts-node-dev": "1.1.8"
30
30
  },
31
31
  "scripts": {
@@ -33,9 +33,9 @@
33
33
  "typecheck": "bun tsc --noEmit -p ./tsconfig.json"
34
34
  },
35
35
  "peerDependencies": {
36
- "@codeleap/store": "7.0.0",
37
- "@codeleap/types": "7.0.0",
38
- "@codeleap/logger": "7.0.0",
36
+ "@codeleap/store": "7.0.1",
37
+ "@codeleap/types": "7.0.1",
38
+ "@codeleap/logger": "7.0.1",
39
39
  "typescript": "5.5.2"
40
40
  }
41
41
  }