stkit 17.0.0__py3-none-any.whl
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.
- stk/__init__.py +19 -0
- stk/__main__.py +6 -0
- stk/agent_login.py +78 -0
- stk/app.py +323 -0
- stk/checks.py +634 -0
- stk/cli/__init__.py +49 -0
- stk/cli/agent.py +267 -0
- stk/cli/base.py +79 -0
- stk/cli/database.py +199 -0
- stk/cli/develop.py +63 -0
- stk/cli/doctor.py +262 -0
- stk/cli/main.py +101 -0
- stk/cli/reports.py +296 -0
- stk/cli/smoke.py +399 -0
- stk/cli/users.py +259 -0
- stk/cli/watch.py +68 -0
- stk/extensions.py +29 -0
- stk/migrations/__init__.py +130 -0
- stk/migrations/env.py +58 -0
- stk/migrations/script.py.mako +17 -0
- stk/migrations/versions/stk_0001_initial_schema.py +213 -0
- stk/portal/views.py +34 -0
- stk/public/__init__.py +0 -0
- stk/public/models.py +0 -0
- stk/public/views.py +344 -0
- stk/scaffold/__init__.py +1 -0
- stk/scaffold/app/CLAUDE.md +65 -0
- stk/scaffold/app/Dockerfile +41 -0
- stk/scaffold/app/README.md +16 -0
- stk/scaffold/app/__app__/__init__.py +1 -0
- stk/scaffold/app/__app__/app.py +8 -0
- stk/scaffold/app/__app__/settings.py +7 -0
- stk/scaffold/app/claude/skills/stk-api/SKILL.md +52 -0
- stk/scaffold/app/claude/skills/stk-blueprint/SKILL.md +48 -0
- stk/scaffold/app/claude/skills/stk-deploy/SKILL.md +61 -0
- stk/scaffold/app/claude/skills/stk-lessons/SKILL.md +58 -0
- stk/scaffold/app/claude/skills/stk-migrate/SKILL.md +96 -0
- stk/scaffold/app/docker-compose.yml +88 -0
- stk/scaffold/app/dockerignore +13 -0
- stk/scaffold/app/env-sample +78 -0
- stk/scaffold/app/gitignore +8 -0
- stk/scaffold/app/nginx/nginx.conf +46 -0
- stk/scaffold/app/nginx/stk.conf +36 -0
- stk/scaffold/app/postgres/init-db.sh +8 -0
- stk/scaffold/app/pyproject.toml +23 -0
- stk/scaffold/app/tests/__init__.py +0 -0
- stk/scaffold/app/tests/test_app.py +23 -0
- stk/scaffold/generator.py +209 -0
- stk/scaffold/templates.py +437 -0
- stk/security.py +145 -0
- stk/settings.py +147 -0
- stk/shell.py +284 -0
- stk/static/VERSIONS.txt +4 -0
- stk/static/css/app.css +229 -0
- stk/static/css/layout.css +330 -0
- stk/static/css/vuetify.min.css +6 -0
- stk/static/icons/fonts/tabler-icons.woff2 +0 -0
- stk/static/icons/tabler-icons.min.css +4 -0
- stk/static/img/auth-bg.webp +0 -0
- stk/static/img/favicon.ico +0 -0
- stk/static/img/stk.svg +1664 -0
- stk/static/js/axios.min.js +5 -0
- stk/static/js/components/NotificationDropdown.js +156 -0
- stk/static/js/components/ThemeSwitcher.js +68 -0
- stk/static/js/components/TransitionExpand.js +64 -0
- stk/static/js/components/VerticalNavGroup.js +119 -0
- stk/static/js/components/VerticalNavLink.js +36 -0
- stk/static/js/components/VerticalNavSectionTitle.js +21 -0
- stk/static/js/components/index.js +47 -0
- stk/static/js/config.js +150 -0
- stk/static/js/vue.min.js +13 -0
- stk/static/js/vuetify.min.js +3148 -0
- stk/static/robots.txt +1 -0
- stk/tasks/__init__.py +78 -0
- stk/templates/401.html +14 -0
- stk/templates/404.html +12 -0
- stk/templates/500.html +13 -0
- stk/templates/_brand.html +1 -0
- stk/templates/auth_layout.html +26 -0
- stk/templates/cms/activities.html +135 -0
- stk/templates/cms/roles.html +215 -0
- stk/templates/cms/users.html +312 -0
- stk/templates/dashboard.html +132 -0
- stk/templates/index.html +52 -0
- stk/templates/layout.html +328 -0
- stk/templates/login-layout.html +54 -0
- stk/templates/security/_macros.html +39 -0
- stk/templates/security/_messages.html +12 -0
- stk/templates/security/change_password.html +100 -0
- stk/templates/security/confirm_email.html +44 -0
- stk/templates/security/email/change_notice.html +4 -0
- stk/templates/security/email/change_notice.txt +5 -0
- stk/templates/security/email/confirmation_instructions.html +3 -0
- stk/templates/security/email/confirmation_instructions.txt +3 -0
- stk/templates/security/email/login_instructions.html +5 -0
- stk/templates/security/email/login_instructions.txt +5 -0
- stk/templates/security/email/reset_instructions.html +1 -0
- stk/templates/security/email/reset_instructions.txt +3 -0
- stk/templates/security/email/reset_notice.html +1 -0
- stk/templates/security/email/reset_notice.txt +1 -0
- stk/templates/security/email/welcome.html +7 -0
- stk/templates/security/email/welcome.txt +7 -0
- stk/templates/security/forgot_password.html +63 -0
- stk/templates/security/login_user.html +206 -0
- stk/templates/security/mf_recovery.html +67 -0
- stk/templates/security/mf_recovery_codes.html +119 -0
- stk/templates/security/register_user.html +263 -0
- stk/templates/security/reset_password.html +53 -0
- stk/templates/security/send_confirmation.html +48 -0
- stk/templates/security/send_login.html +39 -0
- stk/templates/security/two_factor_select.html +78 -0
- stk/templates/security/two_factor_setup.html +166 -0
- stk/templates/security/two_factor_verify_code.html +71 -0
- stk/templates/security/wan_register.html +179 -0
- stk/templates/security/wan_signin.html +123 -0
- stk/templates/security/wan_verify.html +109 -0
- stk/user/__init__.py +0 -0
- stk/user/forms.py +10 -0
- stk/user/models.py +308 -0
- stk/user/views.py +339 -0
- stk/utils/email.py +32 -0
- stk/utils/ratelimit.py +67 -0
- stk/websocket.py +133 -0
- stkit-17.0.0.dist-info/METADATA +135 -0
- stkit-17.0.0.dist-info/RECORD +128 -0
- stkit-17.0.0.dist-info/WHEEL +4 -0
- stkit-17.0.0.dist-info/entry_points.txt +2 -0
- stkit-17.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* stk Components Registration
|
|
3
|
+
* Registers all custom components globally on a Vue app
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
function registerStkComponents(app) {
|
|
7
|
+
// Register transition component
|
|
8
|
+
app.component('transition-expand', TransitionExpand);
|
|
9
|
+
|
|
10
|
+
// Register navigation components
|
|
11
|
+
app.component('vertical-nav-link', VerticalNavLink);
|
|
12
|
+
app.component('vertical-nav-group', VerticalNavGroup);
|
|
13
|
+
app.component('vertical-nav-section-title', VerticalNavSectionTitle);
|
|
14
|
+
|
|
15
|
+
// Register UI components
|
|
16
|
+
app.component('notification-dropdown', NotificationDropdown);
|
|
17
|
+
app.component('theme-switcher', ThemeSwitcher);
|
|
18
|
+
|
|
19
|
+
return app;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Helper to resolve which component to use for a nav item
|
|
24
|
+
*/
|
|
25
|
+
function resolveNavComponent(item) {
|
|
26
|
+
if ('heading' in item) return 'vertical-nav-section-title';
|
|
27
|
+
if ('children' in item) return 'vertical-nav-group';
|
|
28
|
+
return 'vertical-nav-link';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Filter navigation items by user role
|
|
33
|
+
* @param {Array} items - Navigation items
|
|
34
|
+
* @param {Array} userRoles - User's roles (e.g., ['admin', 'user'])
|
|
35
|
+
* @returns {Array} Filtered navigation items
|
|
36
|
+
*/
|
|
37
|
+
function filterNavByRole(items, userRoles = []) {
|
|
38
|
+
// Pure on purpose: this runs inside a computed, so mutating a nav item would
|
|
39
|
+
// re-trigger that computed forever (Vue 3.5 prod loops instead of warning).
|
|
40
|
+
return items
|
|
41
|
+
.filter(item => !item.role || userRoles.includes(item.role))
|
|
42
|
+
.map(item =>
|
|
43
|
+
item.children
|
|
44
|
+
? { ...item, children: filterNavByRole(item.children, userRoles) }
|
|
45
|
+
: item
|
|
46
|
+
);
|
|
47
|
+
}
|
stk/static/js/config.js
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* stk Framework - Central Configuration
|
|
3
|
+
* Monochrome brutalist palette
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const config = {
|
|
7
|
+
// Common Vue settings
|
|
8
|
+
delimiters: ['${', '}'],
|
|
9
|
+
|
|
10
|
+
// Vuetify configuration
|
|
11
|
+
vuetifyConfig: {
|
|
12
|
+
// Tabler icon set for Vuetify's internal component icons (data-table
|
|
13
|
+
// sort/pagination, select dropdown, checkboxes, alerts). Without this
|
|
14
|
+
// Vuetify defaults to mdi aliases, which render blank since we ship no
|
|
15
|
+
// MDI font. Pass-through any explicit "ti ti-*" string; prefix bare names.
|
|
16
|
+
icons: {
|
|
17
|
+
defaultSet: 'tabler',
|
|
18
|
+
sets: {
|
|
19
|
+
tabler: {
|
|
20
|
+
component: (props) => {
|
|
21
|
+
const icon = props.icon || '';
|
|
22
|
+
const cls = (icon.startsWith('ti ') || icon.startsWith('ti-'))
|
|
23
|
+
? icon
|
|
24
|
+
: `ti ti-${icon}`;
|
|
25
|
+
return Vue.h(props.tag, { class: cls });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
aliases: {
|
|
30
|
+
complete: 'check',
|
|
31
|
+
cancel: 'circle-x',
|
|
32
|
+
close: 'x',
|
|
33
|
+
delete: 'x',
|
|
34
|
+
clear: 'circle-x',
|
|
35
|
+
success: 'circle-check',
|
|
36
|
+
info: 'info-circle',
|
|
37
|
+
warning: 'alert-triangle',
|
|
38
|
+
error: 'alert-circle',
|
|
39
|
+
prev: 'chevron-left',
|
|
40
|
+
next: 'chevron-right',
|
|
41
|
+
checkboxOn: 'square-check',
|
|
42
|
+
checkboxOff: 'square',
|
|
43
|
+
checkboxIndeterminate: 'square-minus',
|
|
44
|
+
delimiter: 'circle',
|
|
45
|
+
sortAsc: 'arrow-up',
|
|
46
|
+
sortDesc: 'arrow-down',
|
|
47
|
+
expand: 'chevron-down',
|
|
48
|
+
menu: 'menu-2',
|
|
49
|
+
subgroup: 'chevron-down',
|
|
50
|
+
dropdown: 'chevron-down',
|
|
51
|
+
radioOn: 'circle-check',
|
|
52
|
+
radioOff: 'circle',
|
|
53
|
+
edit: 'pencil',
|
|
54
|
+
ratingEmpty: 'star',
|
|
55
|
+
ratingFull: 'star-filled',
|
|
56
|
+
ratingHalf: 'star-half-filled',
|
|
57
|
+
loading: 'loader-2',
|
|
58
|
+
first: 'chevrons-left',
|
|
59
|
+
last: 'chevrons-right',
|
|
60
|
+
unfold: 'arrows-sort',
|
|
61
|
+
file: 'paperclip',
|
|
62
|
+
plus: 'plus',
|
|
63
|
+
minus: 'minus',
|
|
64
|
+
calendar: 'calendar',
|
|
65
|
+
treeviewCollapse: 'chevron-down',
|
|
66
|
+
treeviewExpand: 'chevron-right',
|
|
67
|
+
eyeDropper: 'color-picker',
|
|
68
|
+
upload: 'upload',
|
|
69
|
+
color: 'palette'
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaults: {
|
|
73
|
+
VTextField: {
|
|
74
|
+
variant: 'outlined'
|
|
75
|
+
},
|
|
76
|
+
VSelect: {
|
|
77
|
+
variant: 'outlined'
|
|
78
|
+
},
|
|
79
|
+
VTextarea: {
|
|
80
|
+
variant: 'outlined'
|
|
81
|
+
},
|
|
82
|
+
VCombobox: {
|
|
83
|
+
variant: 'outlined'
|
|
84
|
+
},
|
|
85
|
+
VChip: {
|
|
86
|
+
size: 'small',
|
|
87
|
+
rounded: 'sm'
|
|
88
|
+
},
|
|
89
|
+
VCard: {
|
|
90
|
+
elevation: 0,
|
|
91
|
+
rounded: 0
|
|
92
|
+
},
|
|
93
|
+
VMenu: {
|
|
94
|
+
offset: 10
|
|
95
|
+
},
|
|
96
|
+
VBtn: {
|
|
97
|
+
variant: 'elevated',
|
|
98
|
+
size: 'small',
|
|
99
|
+
rounded: 0
|
|
100
|
+
},
|
|
101
|
+
VDialog: {
|
|
102
|
+
rounded: 0
|
|
103
|
+
},
|
|
104
|
+
VToolbar: {
|
|
105
|
+
elevation: 0
|
|
106
|
+
},
|
|
107
|
+
VDataTableServer: {
|
|
108
|
+
itemsPerPage: 25,
|
|
109
|
+
itemsPerPageOptions: [25, 50, 100]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
theme: {
|
|
113
|
+
defaultTheme: window.__settings__?.dark ? 'dark' : 'light',
|
|
114
|
+
themes: {
|
|
115
|
+
light: {
|
|
116
|
+
dark: false,
|
|
117
|
+
colors: {
|
|
118
|
+
primary: '#1a1a1a',
|
|
119
|
+
secondary: '#555555',
|
|
120
|
+
accent: '#333333',
|
|
121
|
+
error: '#b91c1c',
|
|
122
|
+
info: '#1a1a1a',
|
|
123
|
+
success: '#166534',
|
|
124
|
+
warning: '#a16207',
|
|
125
|
+
background: '#fafafa',
|
|
126
|
+
surface: '#fafafa',
|
|
127
|
+
'surface-light': '#f0f0f0',
|
|
128
|
+
'on-surface': '#1a1a1a',
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
dark: {
|
|
132
|
+
dark: true,
|
|
133
|
+
colors: {
|
|
134
|
+
primary: '#e5e5e5',
|
|
135
|
+
secondary: '#a3a3a3',
|
|
136
|
+
accent: '#d4d4d4',
|
|
137
|
+
error: '#fca5a5',
|
|
138
|
+
info: '#e5e5e5',
|
|
139
|
+
success: '#86efac',
|
|
140
|
+
warning: '#fde047',
|
|
141
|
+
background: '#0a0a0a',
|
|
142
|
+
surface: '#141414',
|
|
143
|
+
'surface-light': '#262626',
|
|
144
|
+
'on-surface': '#e5e5e5',
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|