@codeleap/permissions 7.0.2 → 7.1.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.
- package/dist/Permission.js +38 -48
- package/dist/Permission.js.map +1 -1
- package/dist/PermissionsManager.js +39 -60
- package/dist/PermissionsManager.js.map +1 -1
- package/dist/globals.js +1 -2
- package/dist/index.js +4 -20
- package/dist/index.js.map +1 -1
- package/dist/types.js +1 -2
- package/package.json +8 -8
package/dist/Permission.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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");
|
|
1
|
+
import { globalState } from '@codeleap/store';
|
|
2
|
+
import { TypeGuards } from '@codeleap/types';
|
|
3
|
+
import { logger } from '@codeleap/logger';
|
|
16
4
|
/**
|
|
17
5
|
* Represents a single named permission with persistent reactive state.
|
|
18
6
|
*
|
|
@@ -25,7 +13,18 @@ const logger_1 = require("@codeleap/logger");
|
|
|
25
13
|
* on most platforms a blocked permission can only be cleared through the OS
|
|
26
14
|
* settings screen, not by a subsequent API call.
|
|
27
15
|
*/
|
|
28
|
-
class Permission {
|
|
16
|
+
export class Permission {
|
|
17
|
+
/** The name of the permission. */
|
|
18
|
+
name;
|
|
19
|
+
state;
|
|
20
|
+
checkStatus;
|
|
21
|
+
requestStatus;
|
|
22
|
+
/**
|
|
23
|
+
* Set to `true` to enable verbose permission logs via `@codeleap/logger`.
|
|
24
|
+
* Applies to every `Permission` instance; toggling at runtime takes effect
|
|
25
|
+
* immediately.
|
|
26
|
+
*/
|
|
27
|
+
static logsEnabled = false;
|
|
29
28
|
/**
|
|
30
29
|
* Converts a raw status string into a structured descriptor object.
|
|
31
30
|
* Prefer this over equality checks scattered across call sites so that
|
|
@@ -40,6 +39,8 @@ class Permission {
|
|
|
40
39
|
isBlocked: status === 'blocked',
|
|
41
40
|
};
|
|
42
41
|
}
|
|
42
|
+
/** Configuration object associated with the permission. */
|
|
43
|
+
config;
|
|
43
44
|
/**
|
|
44
45
|
* Snapshot of the persisted status. Returns `null` until the first
|
|
45
46
|
* `check()` or `request()` resolves.
|
|
@@ -61,7 +62,7 @@ class Permission {
|
|
|
61
62
|
}
|
|
62
63
|
constructor(options) {
|
|
63
64
|
const { name, config, check, request } = options;
|
|
64
|
-
this.state =
|
|
65
|
+
this.state = globalState(null, { persistKey: 'permissions-' + name });
|
|
65
66
|
this.name = name;
|
|
66
67
|
this.config = config;
|
|
67
68
|
this.checkStatus = check;
|
|
@@ -70,7 +71,7 @@ class Permission {
|
|
|
70
71
|
log(msg, obj) {
|
|
71
72
|
if (!Permission.logsEnabled)
|
|
72
73
|
return;
|
|
73
|
-
|
|
74
|
+
logger.log(`(Permission) ${this.name} -> ${msg}`, obj);
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* Directly overwrites the stored status without going through the native
|
|
@@ -95,19 +96,17 @@ class Permission {
|
|
|
95
96
|
* platforms that report a previously-blocked permission as merely denied on
|
|
96
97
|
* subsequent queries, which would incorrectly allow a re-request attempt.
|
|
97
98
|
*/
|
|
98
|
-
check() {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
return status;
|
|
110
|
-
});
|
|
99
|
+
async check() {
|
|
100
|
+
let status = await this.checkStatus();
|
|
101
|
+
if (status === 'denied' && this.value === 'blocked') {
|
|
102
|
+
status = this.value;
|
|
103
|
+
}
|
|
104
|
+
const update = status != this.value;
|
|
105
|
+
if (update && TypeGuards.isString(status)) {
|
|
106
|
+
this.set(status);
|
|
107
|
+
}
|
|
108
|
+
this.log('check', { status, update });
|
|
109
|
+
return status;
|
|
111
110
|
}
|
|
112
111
|
/**
|
|
113
112
|
* Triggers an interactive permission prompt (may show a system dialog) and
|
|
@@ -115,23 +114,14 @@ class Permission {
|
|
|
115
114
|
* Only call this in direct response to a user action; invoking it
|
|
116
115
|
* speculatively or on mount will fail silently on most platforms.
|
|
117
116
|
*/
|
|
118
|
-
request() {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return status;
|
|
127
|
-
});
|
|
117
|
+
async request() {
|
|
118
|
+
const status = await this.requestStatus();
|
|
119
|
+
const update = status != this.value;
|
|
120
|
+
if (update && TypeGuards.isString(status)) {
|
|
121
|
+
this.set(status);
|
|
122
|
+
}
|
|
123
|
+
this.log('request', { status, update });
|
|
124
|
+
return status;
|
|
128
125
|
}
|
|
129
126
|
}
|
|
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
127
|
//# sourceMappingURL=Permission.js.map
|
package/dist/Permission.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Permission.js","sourceRoot":"","sources":["../src/Permission.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Permission.js","sourceRoot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AO,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;QAErC,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO;QACX,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAA;QACzC,MAAM,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC,KAAK,CAAA;QAEnC,IAAI,MAAM,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1C,IAAI,CAAC,GAAG,CAAC,MAA0B,CAAC,CAAA;QACtC,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;QAEvC,OAAO,MAAM,CAAA;IACf,CAAC"}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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");
|
|
1
|
+
import { Permission } from './Permission';
|
|
2
|
+
import { logger } from '@codeleap/logger';
|
|
15
3
|
/**
|
|
16
4
|
* Registry and coordinator for a fixed set of named permissions.
|
|
17
5
|
*
|
|
@@ -21,7 +9,9 @@ const logger_1 = require("@codeleap/logger");
|
|
|
21
9
|
* pre-prompt logic (e.g. showing an educational interstitial before the OS
|
|
22
10
|
* dialog appears).
|
|
23
11
|
*/
|
|
24
|
-
class PermissionsManager {
|
|
12
|
+
export class PermissionsManager {
|
|
13
|
+
requester;
|
|
14
|
+
permissions = {};
|
|
25
15
|
get keys() {
|
|
26
16
|
return Object.keys(this.permissions);
|
|
27
17
|
}
|
|
@@ -37,28 +27,28 @@ class PermissionsManager {
|
|
|
37
27
|
});
|
|
38
28
|
return values;
|
|
39
29
|
}
|
|
40
|
-
forEach(callbackFn) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
});
|
|
30
|
+
async forEach(callbackFn) {
|
|
31
|
+
for (const permissionName in this.permissions) {
|
|
32
|
+
const permission = this.permissions[permissionName];
|
|
33
|
+
callbackFn(permission);
|
|
34
|
+
}
|
|
47
35
|
}
|
|
48
36
|
constructor(requester, permissions) {
|
|
49
|
-
this.permissions = {};
|
|
50
37
|
for (const permission in permissions) {
|
|
51
38
|
const permissionConfig = permissions[permission];
|
|
52
|
-
const permissionClass = new
|
|
39
|
+
const permissionClass = new Permission({
|
|
40
|
+
...permissionConfig,
|
|
41
|
+
name: permission,
|
|
42
|
+
});
|
|
53
43
|
this.permissions[permission] = permissionClass;
|
|
54
44
|
}
|
|
55
45
|
this.requester = requester;
|
|
56
46
|
this.checkAll();
|
|
57
47
|
}
|
|
58
48
|
log(msg, ...args) {
|
|
59
|
-
if (!
|
|
49
|
+
if (!Permission.logsEnabled)
|
|
60
50
|
return;
|
|
61
|
-
|
|
51
|
+
logger.log(`(Permissions) -> ${msg}`, ...(args ?? ''));
|
|
62
52
|
}
|
|
63
53
|
/**
|
|
64
54
|
* React hook that subscribes a component to the reactive state of a single
|
|
@@ -75,63 +65,52 @@ class PermissionsManager {
|
|
|
75
65
|
* Note: this bypasses `Permission.request()` on the individual instance —
|
|
76
66
|
* the `requester` callback owns the full flow, including any pre-prompt UI.
|
|
77
67
|
*/
|
|
78
|
-
request(permissionName) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return Permission_1.Permission.is(status);
|
|
83
|
-
});
|
|
68
|
+
async request(permissionName) {
|
|
69
|
+
const permission = this.permissions[permissionName];
|
|
70
|
+
const status = await this.requester(permission);
|
|
71
|
+
return Permission.is(status);
|
|
84
72
|
}
|
|
85
73
|
/**
|
|
86
74
|
* Silently queries a single permission's current status (no system dialog).
|
|
87
75
|
* Returns a structured descriptor via {@link Permission.is}.
|
|
88
76
|
*/
|
|
89
|
-
check(permissionName) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return Permission_1.Permission.is(status);
|
|
94
|
-
});
|
|
77
|
+
async check(permissionName) {
|
|
78
|
+
const permission = this.permissions[permissionName];
|
|
79
|
+
const status = await permission.check();
|
|
80
|
+
return Permission.is(status);
|
|
95
81
|
}
|
|
96
82
|
/**
|
|
97
83
|
* Requests multiple permissions sequentially. Requests are serial, not
|
|
98
84
|
* parallel, to avoid triggering concurrent system dialogs which may be
|
|
99
85
|
* rejected or silently dropped on some platforms.
|
|
100
86
|
*/
|
|
101
|
-
requestMany(permissionsNames) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return status;
|
|
108
|
-
});
|
|
87
|
+
async requestMany(permissionsNames) {
|
|
88
|
+
const status = {};
|
|
89
|
+
for (const permissionName of permissionsNames) {
|
|
90
|
+
status[permissionName] = await this.request(permissionName);
|
|
91
|
+
}
|
|
92
|
+
return status;
|
|
109
93
|
}
|
|
110
94
|
/**
|
|
111
95
|
* Silently queries multiple permissions sequentially. Serial execution
|
|
112
96
|
* ensures consistent ordering and avoids race conditions in the underlying
|
|
113
97
|
* state store.
|
|
114
98
|
*/
|
|
115
|
-
checkMany(permissionsNames) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return status;
|
|
122
|
-
});
|
|
99
|
+
async checkMany(permissionsNames) {
|
|
100
|
+
const status = {};
|
|
101
|
+
for (const permissionName of permissionsNames) {
|
|
102
|
+
status[permissionName] = await this.check(permissionName);
|
|
103
|
+
}
|
|
104
|
+
return status;
|
|
123
105
|
}
|
|
124
106
|
/**
|
|
125
107
|
* Silently refreshes every registered permission. Called automatically
|
|
126
108
|
* during construction so that cached statuses are up to date before the
|
|
127
109
|
* first render without requiring the caller to await initialization.
|
|
128
110
|
*/
|
|
129
|
-
checkAll() {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
return yield this.checkMany(this.keys);
|
|
133
|
-
});
|
|
111
|
+
async checkAll() {
|
|
112
|
+
this.log('checkAll');
|
|
113
|
+
return await this.checkMany(this.keys);
|
|
134
114
|
}
|
|
135
115
|
}
|
|
136
|
-
exports.PermissionsManager = PermissionsManager;
|
|
137
116
|
//# sourceMappingURL=PermissionsManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionsManager.js","sourceRoot":"","sources":["../src/PermissionsManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PermissionsManager.js","sourceRoot":"","sources":["../src/PermissionsManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IACrB,SAAS,CAAuD;IAExE,WAAW,GAA0B,EAA2B,CAAA;IAEhE,IAAY,IAAI;QACd,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAQ,CAAA;IAC7C,CAAC;IAED;;;;OAIG;IACH,IAAI,MAAM;QACR,MAAM,MAAM,GAAG,EAAiC,CAAA;QAEhD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YACxB,MAAM,CAAC,UAAU,CAAC,IAAS,CAAC,GAAG,UAAU,CAAC,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C,OAAO,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IAC9B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK,CAAC,cAAiB;QAC3B,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAA;QACnD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,KAAK,EAAE,CAAA;QACvC,OAAO,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IAC9B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW,CAAc,gBAAqB;QAClD,MAAM,MAAM,GAAG,EAAiD,CAAA;QAEhE,KAAK,MAAM,cAAc,IAAI,gBAAgB,EAAE,CAAC;YAC9C,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;QAC7D,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,SAAS,CAAc,gBAAqB;QAChD,MAAM,MAAM,GAAG,EAAiD,CAAA;QAEhE,KAAK,MAAM,cAAc,IAAI,gBAAgB,EAAE,CAAC;YAC9C,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAA;QAC3D,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QACpB,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACxC,CAAC;CACF"}
|
package/dist/globals.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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);
|
|
1
|
+
export * from './PermissionsManager';
|
|
2
|
+
export * from './Permission';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './globals';
|
|
21
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,WAAW,CAAA"}
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeleap/permissions",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"directory": "packages/permissions"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@codeleap/config": "7.0.
|
|
26
|
-
"@codeleap/logger": "7.0.
|
|
27
|
-
"@codeleap/store": "7.0.
|
|
28
|
-
"@codeleap/types": "7.0.
|
|
25
|
+
"@codeleap/config": "7.0.2",
|
|
26
|
+
"@codeleap/logger": "7.0.2",
|
|
27
|
+
"@codeleap/store": "7.0.2",
|
|
28
|
+
"@codeleap/types": "7.0.2",
|
|
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.
|
|
37
|
-
"@codeleap/types": "7.0.
|
|
38
|
-
"@codeleap/logger": "7.0.
|
|
36
|
+
"@codeleap/store": "7.0.2",
|
|
37
|
+
"@codeleap/types": "7.0.2",
|
|
38
|
+
"@codeleap/logger": "7.0.2",
|
|
39
39
|
"typescript": "5.5.2"
|
|
40
40
|
}
|
|
41
41
|
}
|