@develit-services/rbac 0.0.1 → 0.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.
- package/dist/export/worker.cjs +2 -2
- package/dist/export/worker.mjs +2 -2
- package/dist/export/wrangler.d.cts +0 -1
- package/dist/export/wrangler.d.mts +0 -1
- package/dist/export/wrangler.d.ts +0 -1
- package/dist/shared/{rbac.C9brkvW9.mjs → rbac.CY8-sBAP.mjs} +1 -1
- package/dist/shared/{rbac.2EhZ2epo.cjs → rbac.CtYOhFTw.cjs} +0 -1
- package/dist/{@types.cjs → types.cjs} +1 -1
- package/dist/{@types.mjs → types.mjs} +1 -1
- package/package.json +5 -5
- /package/dist/{@types.d.cts → types.d.cts} +0 -0
- /package/dist/{@types.d.mts → types.d.mts} +0 -0
- /package/dist/{@types.d.ts → types.d.ts} +0 -0
package/dist/export/worker.cjs
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const cloudflare_workers = require('cloudflare:workers');
|
|
6
6
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
7
|
-
const verifyScope = require('../shared/rbac.
|
|
7
|
+
const verifyScope = require('../shared/rbac.CtYOhFTw.cjs');
|
|
8
8
|
const database_schema = require('../shared/rbac.Cra1T2nC.cjs');
|
|
9
9
|
const drizzleOrm = require('drizzle-orm');
|
|
10
10
|
const zod = require('zod');
|
|
@@ -301,7 +301,7 @@ function extractResourcesFromPath(scope, resourcePath) {
|
|
|
301
301
|
const inputGetValueByKeySchema = zod.z.object({
|
|
302
302
|
type: zod.z.string().nonempty("Type parameter cannot be empty"),
|
|
303
303
|
path: zod.z.string().nonempty("Path parameter cannot be empty"),
|
|
304
|
-
jwt:
|
|
304
|
+
jwt: zod.z.unknown()
|
|
305
305
|
});
|
|
306
306
|
const parseJson = (data) => {
|
|
307
307
|
try {
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
2
2
|
import { uuidv4, first, createInternalError, develitWorker, action, service } from '@develit-io/backend-sdk';
|
|
3
|
-
import {
|
|
3
|
+
import { c as createRoleInputSchema, a as assignRoleToUserInputSchema, b as assignRolesToUserInputSchema, r as revokeRoleFromUserInputSchema, f as grantScopeToUserInputSchema, h as grantScopesToUserInputSchema, j as revokeScopeFromUserInputSchema, e as grantScopeToRoleInputSchema, i as revokeScopeFromRoleInputSchema, S as SCOPES, g as getUserPermissionsInputSchema, v as verifyAccessInputSchema, d as deleteRoleInputSchema, u as updateRoleInputSchema } from '../shared/rbac.CY8-sBAP.mjs';
|
|
4
4
|
import { s as schema } from '../shared/rbac.CJLU5iuV.mjs';
|
|
5
5
|
import { eq, and, count, inArray } from 'drizzle-orm';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -297,7 +297,7 @@ function extractResourcesFromPath(scope, resourcePath) {
|
|
|
297
297
|
const inputGetValueByKeySchema = z.object({
|
|
298
298
|
type: z.string().nonempty("Type parameter cannot be empty"),
|
|
299
299
|
path: z.string().nonempty("Path parameter cannot be empty"),
|
|
300
|
-
jwt:
|
|
300
|
+
jwt: z.unknown()
|
|
301
301
|
});
|
|
302
302
|
const parseJson = (data) => {
|
|
303
303
|
try {
|
|
@@ -341,4 +341,4 @@ const verifyScopeOutputSchema = z.object({
|
|
|
341
341
|
isVerified: z.boolean().default(false)
|
|
342
342
|
});
|
|
343
343
|
|
|
344
|
-
export { LABELED_SCOPES as L, SCOPES as S, assignRoleToUserInputSchema as a, assignRolesToUserInputSchema as b, createRoleInputSchema as c, deleteRoleInputSchema as d, grantScopeToRoleInputSchema as e, grantScopeToUserInputSchema as f, getUserPermissionsInputSchema as g, grantScopesToUserInputSchema as h, revokeScopeFromRoleInputSchema as i, revokeScopeFromUserInputSchema as j, verifyScopeInputSchema as k, verifyScopeOutputSchema as l,
|
|
344
|
+
export { LABELED_SCOPES as L, SCOPES as S, assignRoleToUserInputSchema as a, assignRolesToUserInputSchema as b, createRoleInputSchema as c, deleteRoleInputSchema as d, grantScopeToRoleInputSchema as e, grantScopeToUserInputSchema as f, getUserPermissionsInputSchema as g, grantScopesToUserInputSchema as h, revokeScopeFromRoleInputSchema as i, revokeScopeFromUserInputSchema as j, verifyScopeInputSchema as k, verifyScopeOutputSchema as l, revokeRoleFromUserInputSchema as r, updateRoleInputSchema as u, verifyAccessInputSchema as v };
|
|
@@ -353,7 +353,6 @@ exports.getUserPermissionsInputSchema = getUserPermissionsInputSchema;
|
|
|
353
353
|
exports.grantScopeToRoleInputSchema = grantScopeToRoleInputSchema;
|
|
354
354
|
exports.grantScopeToUserInputSchema = grantScopeToUserInputSchema;
|
|
355
355
|
exports.grantScopesToUserInputSchema = grantScopesToUserInputSchema;
|
|
356
|
-
exports.jwtPayloadSchema = jwtPayloadSchema;
|
|
357
356
|
exports.revokeRoleFromUserInputSchema = revokeRoleFromUserInputSchema;
|
|
358
357
|
exports.revokeScopeFromRoleInputSchema = revokeScopeFromRoleInputSchema;
|
|
359
358
|
exports.revokeScopeFromUserInputSchema = revokeScopeFromUserInputSchema;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { L as LABELED_SCOPES, S as SCOPES, a as assignRoleToUserInputSchema, b as assignRolesToUserInputSchema, c as createRoleInputSchema, d as deleteRoleInputSchema, g as getUserPermissionsInputSchema, e as grantScopeToRoleInputSchema, f as grantScopeToUserInputSchema, h as grantScopesToUserInputSchema, r as revokeRoleFromUserInputSchema, i as revokeScopeFromRoleInputSchema, j as revokeScopeFromUserInputSchema, u as updateRoleInputSchema, v as verifyAccessInputSchema, k as verifyScopeInputSchema, l as verifyScopeOutputSchema } from './shared/rbac.
|
|
1
|
+
export { L as LABELED_SCOPES, S as SCOPES, a as assignRoleToUserInputSchema, b as assignRolesToUserInputSchema, c as createRoleInputSchema, d as deleteRoleInputSchema, g as getUserPermissionsInputSchema, e as grantScopeToRoleInputSchema, f as grantScopeToUserInputSchema, h as grantScopesToUserInputSchema, r as revokeRoleFromUserInputSchema, i as revokeScopeFromRoleInputSchema, j as revokeScopeFromUserInputSchema, u as updateRoleInputSchema, v as verifyAccessInputSchema, k as verifyScopeInputSchema, l as verifyScopeOutputSchema } from './shared/rbac.CY8-sBAP.mjs';
|
|
2
2
|
import 'zod';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-services/rbac",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"author": "Develit.io s.r.o.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"require": "./dist/database/schema.cjs"
|
|
21
21
|
},
|
|
22
22
|
"./@types": {
|
|
23
|
-
"types": "./dist
|
|
24
|
-
"import": "./dist
|
|
25
|
-
"require": "./dist
|
|
23
|
+
"types": "./dist/types.d.ts",
|
|
24
|
+
"import": "./dist/types.mjs",
|
|
25
|
+
"require": "./dist/types.cjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"./dist"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"dev": "wrangler dev --port
|
|
33
|
+
"dev": "wrangler dev --port 9235 --persist-to ../../.wrangler/state",
|
|
34
34
|
"wrangler:generate": "develit wrangler:generate",
|
|
35
35
|
"db:init": "wrangler d1 execute develit-rbac --local --persist-to ../../.wrangler/state --command=\"SELECT 'Creating database...' AS status;\"",
|
|
36
36
|
"db:generate": "drizzle-kit generate",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|