File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @trigger.dev/rbac" ,
3+ "private" : true ,
4+ "version" : " 0.0.1" ,
5+ "main" : " ./dist/index.js" ,
6+ "types" : " ./dist/index.d.ts" ,
7+ "dependencies" : {
8+ "@trigger.dev/plugins" : " workspace:*"
9+ },
10+ "devDependencies" : {
11+ "@types/node" : " ^20.14.14" ,
12+ "rimraf" : " 6.0.1"
13+ },
14+ "scripts" : {
15+ "clean" : " rimraf dist" ,
16+ "typecheck" : " tsc --noEmit" ,
17+ "build" : " pnpm run clean && tsc --noEmit false --outDir dist --declaration" ,
18+ "dev" : " tsc --noEmit false --outDir dist --declaration --watch"
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ import type { RBACPlugin } from "@trigger.dev/plugins" ;
2+
3+ export function create ( ) : RBACPlugin {
4+ return {
5+ type : "rbac" ,
6+ } ;
7+ }
Original file line number Diff line number Diff line change 1+ import type { RBACPlugin } from "@trigger.dev/plugins" ;
2+
3+ export type { RBACPlugin } ;
4+
5+ type PluginModule = {
6+ create ( ) : RBACPlugin | Promise < RBACPlugin > ;
7+ } ;
8+
9+ export async function createRBACPlugin ( ) : Promise < RBACPlugin > {
10+ try {
11+ // Installed in cloud deployments; absent in OSS
12+ // eslint-disable-next-line @typescript-eslint/no-require-imports
13+ const { create } = require ( "@triggerdotdev/plugin-rbac" ) as PluginModule ;
14+ return create ( ) ;
15+ } catch {
16+ // eslint-disable-next-line @typescript-eslint/no-require-imports
17+ const { create } = require ( "./fallback" ) as PluginModule ;
18+ return create ( ) ;
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "esModuleInterop" : true ,
4+ "forceConsistentCasingInFileNames" : true ,
5+ "isolatedModules" : true ,
6+ "moduleResolution" : " node" ,
7+ "preserveWatchOutput" : true ,
8+ "skipLibCheck" : true ,
9+ "noEmit" : true ,
10+ "strict" : true
11+ },
12+ "exclude" : [" node_modules" ]
13+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @trigger.dev/plugins" ,
3+ "version" : " 4.4.4" ,
4+ "description" : " Plugin contracts and interfaces for Trigger.dev" ,
5+ "license" : " MIT" ,
6+ "publishConfig" : {
7+ "access" : " public"
8+ },
9+ "repository" : {
10+ "type" : " git" ,
11+ "url" : " https://github.com/triggerdotdev/trigger.dev" ,
12+ "directory" : " packages/plugins"
13+ },
14+ "type" : " module" ,
15+ "files" : [
16+ " dist"
17+ ],
18+ "scripts" : {
19+ "clean" : " rimraf dist .turbo" ,
20+ "build" : " tsup" ,
21+ "dev" : " tsup --watch --onSuccess 'yalc push --no-sig || true'" ,
22+ "typecheck" : " tsc --noEmit"
23+ },
24+ "devDependencies" : {
25+ "@types/node" : " ^20.14.14" ,
26+ "rimraf" : " 6.0.1" ,
27+ "tsup" : " ^8.4.0" ,
28+ "typescript" : " ^5.3.0"
29+ },
30+ "engines" : {
31+ "node" : " >=18.20.0"
32+ },
33+ "main" : " ./dist/index.cjs" ,
34+ "module" : " ./dist/index.js" ,
35+ "types" : " ./dist/index.d.ts" ,
36+ "exports" : {
37+ "." : {
38+ "types" : " ./dist/index.d.ts" ,
39+ "import" : " ./dist/index.js" ,
40+ "require" : " ./dist/index.cjs"
41+ }
42+ }
43+ }
Original file line number Diff line number Diff line change 1+ export type { RBACPlugin } from "./rbac.js" ;
Original file line number Diff line number Diff line change 1+ export interface RBACPlugin {
2+ readonly type : "rbac" ;
3+ }
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ../../.configs/tsconfig.base.json" ,
3+ "compilerOptions" : {
4+ "composite" : true ,
5+ "isolatedDeclarations" : false ,
6+ "sourceMap" : true
7+ },
8+ "include" : [" ./src/**/*.ts" ]
9+ }
Original file line number Diff line number Diff line change 1+ import { defineConfig } from "tsup" ;
2+
3+ export default defineConfig ( {
4+ entry : [ "src/index.ts" ] ,
5+ format : [ "cjs" , "esm" ] ,
6+ dts : true ,
7+ splitting : false ,
8+ sourcemap : true ,
9+ clean : true ,
10+ treeshake : true ,
11+ } ) ;
You can’t perform that action at this time.
0 commit comments