@lessly/sdk-app 63.0.0 → 63.2.0
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/_types/index.d.ts +1 -0
- package/dist/_types/runtime/operations.d.ts +13 -0
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/docs/recipes/access.md +53 -0
- package/docs/rules.md +22 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11132,7 +11132,7 @@ function normalize(raw) {
|
|
|
11132
11132
|
deny: asStringArray(r.deny)
|
|
11133
11133
|
};
|
|
11134
11134
|
}
|
|
11135
|
-
function createAccess(opts, bindings2,
|
|
11135
|
+
function createAccess(opts, bindings2, operations3) {
|
|
11136
11136
|
let snapshot;
|
|
11137
11137
|
let inflight;
|
|
11138
11138
|
let state = "idle";
|
|
@@ -11169,7 +11169,7 @@ function createAccess(opts, bindings2, operations2) {
|
|
|
11169
11169
|
if (state !== "ready" || !snapshot) return false;
|
|
11170
11170
|
if (ELEVATED_ROLES.has(snapshot.role)) return true;
|
|
11171
11171
|
const key = typeof op === "string" ? op : op.operationKey;
|
|
11172
|
-
const level = typeof op === "string" ?
|
|
11172
|
+
const level = typeof op === "string" ? operations3[key] : op.level;
|
|
11173
11173
|
const subject = level === void 0 ? { key } : { key, level };
|
|
11174
11174
|
return evaluate(subject, { allow: snapshot.allow, deny: snapshot.deny });
|
|
11175
11175
|
},
|
|
@@ -11265,6 +11265,9 @@ function accessReason(op) {
|
|
|
11265
11265
|
return typeof op === "string" ? `Requires access to ${op}. Ask an admin of this product.` : `Requires level:${op.level} (${op.operationKey}). Ask an admin of this product.`;
|
|
11266
11266
|
}
|
|
11267
11267
|
|
|
11268
|
-
|
|
11268
|
+
// src/runtime/operations.ts
|
|
11269
|
+
var operations2 = operations;
|
|
11270
|
+
|
|
11271
|
+
export { LesslyApiError, accessReason, connectStream, createLesslyApp, isAccessDenied, operations2 as operations };
|
|
11269
11272
|
//# sourceMappingURL=index.js.map
|
|
11270
11273
|
//# sourceMappingURL=index.js.map
|