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