@m1212e/rumble 0.18.6 → 0.18.8
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/out/client/generate.cjs +1 -1
- package/out/client/generate.mjs +1 -1
- package/out/client.d.cts +2 -2
- package/out/client.d.cts.map +1 -1
- package/out/client.d.mts +2 -2
- package/out/client.d.mts.map +1 -1
- package/out/{generate-BPCmvoc1.mjs → generate-BxAyU8HE.mjs} +3 -3
- package/out/generate-BxAyU8HE.mjs.map +1 -0
- package/out/{generate-WD2Bsyjg.cjs → generate-v10zBoUq.cjs} +3 -3
- package/out/generate-v10zBoUq.cjs.map +1 -0
- package/out/index.cjs +6 -3
- package/out/index.cjs.map +1 -1
- package/out/index.d.cts.map +1 -1
- package/out/index.d.mts.map +1 -1
- package/out/index.mjs +6 -3
- package/out/index.mjs.map +1 -1
- package/package.json +1 -1
- package/out/generate-BPCmvoc1.mjs.map +0 -1
- package/out/generate-WD2Bsyjg.cjs.map +0 -1
package/out/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as lazy } from "./lazy-BgeBy3-B.mjs";
|
|
2
|
-
import { t as generateFromSchema } from "./generate-
|
|
2
|
+
import { t as generateFromSchema } from "./generate-BxAyU8HE.mjs";
|
|
3
3
|
import { GraphQLError } from "graphql";
|
|
4
4
|
import { EnvelopArmorPlugin } from "@escape.tech/graphql-armor";
|
|
5
5
|
import { useDisableIntrospection } from "@graphql-yoga/plugin-disable-introspection";
|
|
@@ -180,7 +180,7 @@ function mapNullFieldsToUndefined(obj) {
|
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region package.json
|
|
183
|
-
var version = "0.18.
|
|
183
|
+
var version = "0.18.8";
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region lib/helpers/mergeFilters.ts
|
|
186
186
|
function mergeFilters(filterA, filterB, mode = "AND") {
|
|
@@ -352,11 +352,13 @@ const createAbilityBuilder = ({ db, actions, defaultLimit, otel }) => {
|
|
|
352
352
|
allow: (action) => {
|
|
353
353
|
if (hasBeenBuilt) throw new RumbleError("You can't call allow() after the ability builder has been built. Please ensure that you register all abilities before accessing them.");
|
|
354
354
|
const actions = Array.isArray(action) ? action : [action];
|
|
355
|
+
const setUnrestrictedByThisCall = /* @__PURE__ */ new Set();
|
|
355
356
|
for (const action of actions) {
|
|
356
357
|
let filters = queryFilters.get(action);
|
|
357
358
|
if (!filters) {
|
|
358
359
|
filters = "unrestricted";
|
|
359
360
|
queryFilters.set(action, filters);
|
|
361
|
+
setUnrestrictedByThisCall.add(action);
|
|
360
362
|
}
|
|
361
363
|
}
|
|
362
364
|
return {
|
|
@@ -373,7 +375,8 @@ const createAbilityBuilder = ({ db, actions, defaultLimit, otel }) => {
|
|
|
373
375
|
*/
|
|
374
376
|
when: (queryFilter) => {
|
|
375
377
|
for (const action of actions) {
|
|
376
|
-
if (queryFilters.get(action) === "unrestricted") queryFilters.set(action, []);
|
|
378
|
+
if (queryFilters.get(action) === "unrestricted") if (setUnrestrictedByThisCall.has(action)) queryFilters.set(action, []);
|
|
379
|
+
else continue;
|
|
377
380
|
queryFilters.get(action).push(queryFilter);
|
|
378
381
|
}
|
|
379
382
|
} };
|