@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.
@@ -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.2EhZ2epo.cjs');
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: verifyScope.jwtPayloadSchema.optional()
304
+ jwt: zod.z.unknown()
305
305
  });
306
306
  const parseJson = (data) => {
307
307
  try {
@@ -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 { m as jwtPayloadSchema, 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.C9brkvW9.mjs';
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: jwtPayloadSchema.optional()
300
+ jwt: z.unknown()
301
301
  });
302
302
  const parseJson = (data) => {
303
303
  try {
@@ -25,7 +25,6 @@ declare function defineRbacServiceWrangler(config: RbacServiceWranglerConfig): {
25
25
  invocation_logs: boolean;
26
26
  };
27
27
  };
28
- preview_urls: boolean;
29
28
  workers_dev: boolean;
30
29
  keep_vars: boolean;
31
30
  };
@@ -25,7 +25,6 @@ declare function defineRbacServiceWrangler(config: RbacServiceWranglerConfig): {
25
25
  invocation_logs: boolean;
26
26
  };
27
27
  };
28
- preview_urls: boolean;
29
28
  workers_dev: boolean;
30
29
  keep_vars: boolean;
31
30
  };
@@ -25,7 +25,6 @@ declare function defineRbacServiceWrangler(config: RbacServiceWranglerConfig): {
25
25
  invocation_logs: boolean;
26
26
  };
27
27
  };
28
- preview_urls: boolean;
29
28
  workers_dev: boolean;
30
29
  keep_vars: boolean;
31
30
  };
@@ -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, jwtPayloadSchema as m, revokeRoleFromUserInputSchema as r, updateRoleInputSchema as u, verifyAccessInputSchema as v };
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,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const verifyScope = require('./shared/rbac.2EhZ2epo.cjs');
3
+ const verifyScope = require('./shared/rbac.CtYOhFTw.cjs');
4
4
  require('zod');
5
5
 
6
6
 
@@ -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.C9brkvW9.mjs';
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.1",
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/@types.d.ts",
24
- "import": "./dist/@types.mjs",
25
- "require": "./dist/@types.cjs"
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 9234 --persist-to ../../.wrangler/state",
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