generated from caido/starterkit-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcaido.config.ts
78 lines (75 loc) · 2.17 KB
/
caido.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import { defineConfig } from '@caido-community/dev';
import vue from '@vitejs/plugin-vue';
import tailwindcss from "tailwindcss";
// @ts-expect-error no declared types at this time
import tailwindPrimeui from "tailwindcss-primeui";
import tailwindCaido from "@caido/tailwindcss";
import prefixwrap from "postcss-prefixwrap";
import path from "path";
export default defineConfig({
id: "authmatrix",
name: "AuthMatrix",
description: "Grid-based authorization testing across multiple users and roles.",
version: "0.4.0",
author: {
name: "Caido Labs Inc.",
email: "[email protected]",
url: "https://caido.io",
},
plugins: [
{
kind: "backend",
id: "backend",
root: "packages/backend",
},
{
kind: 'frontend',
id: "frontend",
root: 'packages/frontend',
backend: {
id: "backend",
},
vite: {
plugins: [vue()],
build: {
rollupOptions: {
external: ['@caido/frontend-sdk']
}
},
resolve: {
alias: [
{
find: "@",
replacement: path.resolve(__dirname, "packages/frontend/src"),
},
],
},
css: {
postcss: {
plugins: [
prefixwrap("#plugin--authmatrix"),
tailwindcss({
corePlugins: {
preflight: false,
},
content: [
'./packages/frontend/src/**/*.{vue,ts}',
'./node_modules/@caido/primevue/dist/primevue.mjs'
],
// Check the [data-mode="dark"] attribute on the <html> element to determine the mode
// This attribute is set in the Caido core application
darkMode: ["selector", '[data-mode="dark"]'],
plugins: [
// This plugin injects the necessary Tailwind classes for PrimeVue components
tailwindPrimeui,
// This plugin injects the necessary Tailwind classes for the Caido theme
tailwindCaido,
],
})
]
}
}
}
}
]
});