Commit 09445b1
authored
Feat/v5 support (#102)
* feat: Strapi v5 Support with Dashboard Widget & Mobile-Optimized UI
## Features
- ✅ Strapi v5.3.2 compatibility with @strapi/sdk-plugin
- ✅ Dashboard widget showing real-time Socket.IO statistics
- ✅ Mobile-optimized Monitoring & Settings pages with responsive design
- ✅ Enhanced input fields (48px height, 16px font on mobile)
- ✅ Fixed GitHub Issues #95 (images collection) and #82 (CollectionTypes with relations)
- ✅ Entity Service API instead of deprecated db.query()
- ✅ Multi-language support (EN, DE, ES, FR, PT)
## UI/UX Improvements
- Modern styled-components for responsive layouts
- Touch-friendly inputs with proper sizing
- Hidden number spinners on mobile for better UX
- Gradient stat cards with hover effects
- Auto-refresh every 60 seconds to reduce database load
## Technical Changes
- Uses Entity Service API for proper relation handling
- Transform service for media and relation fields
- Proper sanitization and permission checks
- Redis adapter support for multi-server scaling
- Namespace support for isolated Socket.IO endpoints
- Role-based permissions with content-type granularity
* fix: Security & Transaction Fixes for Strapi v5
🔒 Security:
- Add sanitize-sensitive-fields middleware
- Filters password, tokens, secrets from Socket.IO events
- Recursive deep sanitization for nested objects
🔧 Transaction Fixes:
- Use transactionCtx.onCommit for lifecycle hooks
- Prevent 'Transaction query already complete' errors
- afterDelete uses raw() to avoid sanitization queries
- Disable bulkDeleteMany hooks (Strapi v5 transaction limitations)
✅ Event Matrix:
- Create (single/bulk): Full events with sanitization
- Update (single/bulk): Full events with sanitization
- Delete (single): ID-only events via raw()
- Delete (bulk): Disabled due to transaction conflicts
* fix: Remove eval() from transaction context loading
- Replace eval('require') with lazy-loaded require()
- Cleaner transaction context initialization
- No more build warnings
- Maintains same functionality for post-commit hooks
* refactor: apply Strapi v5 best practices
- Remove emoji from service welcome message
- Convert React default imports to named imports (3 files)
- Document legitimate Query Engine usage for admin::api-token
* admin::api-token is Core Admin Entity
* Follows official Strapi Core implementation
* Source: strapi/strapi/packages/core/admin/server/strategies/api-token.js
- Build clean without warnings
Note: Using strapi.db.query() for admin::api-token is correct
per Strapi Core implementation
* chore: migrate to @strapi-community/plugin-io v5.0.0
- Rename package from strapi-plugin-io to @strapi-community/plugin-io
- Update version from 3.0.0 to 5.0.0 (matching Strapi v5)
- Modernize README with better structure and examples
- Update all documentation references to new package name
- Update repository URLs to strapi-community organization
- Update TypeScript import paths
- Remove internal DOCUMENTATION_UPDATE.md file
- Update migration guide with v5 versioning
- Enhance Getting Started guide
- Build and verify successful for v5.0.0
* fix: remove spinner buttons from number inputs in settings
- Hide increment/decrement buttons for cleaner UI
- Removed browser native spinners and Strapi NumberInput spinners
- Simplified CSS for number inputs
- Better mobile and desktop experience
* feat: improve dark mode support for monitoring page
- Replace hardcoded colors with Strapi theme system
- Use theme.colors.neutral0, neutral100, neutral150 etc.
- Proper background colors for cards and items
- Dark mode compatible shadows
- Better contrast in both light and dark modes
- Keep gradient header with white text for visual impact
* fix: add dark mode support for event type filter select
- Created StyledSelect component with theme-aware colors
- Removed hardcoded white background and border colors
- Added proper hover and focus states
- Dark mode compatible dropdown options
* docs: add comprehensive CHANGELOG.md
- Document v5.0.0 release with all breaking changes
- Include migration path from v2 to v5
- List all new features and improvements
- Document UI/UX improvements
- Add version support matrix
- Include deprecation notices
- Add upcoming features roadmap
* docs: comprehensive README documentation update
- Fix broken documentation links to non-existent files
- Remove invalid 'populate' option from contentTypes config examples
- Document all 12 helper functions with examples
- Add complete Monitoring Service documentation
- Add Entity Subscription helpers documentation
- Clarify admin panel structure and widget requirements (Strapi v5.13+)
- Update types.d.ts with entity subscription interfaces
- Update api-reference.json with new methods
- Update docs/api/io-class.md with entity subscription section
- Fix version references (3.x -> 5.x)
* ci: fix npm publish workflow
- Remove npm ci (not needed, dist is pre-built)
- Update actions to v4
- Use Node 20
- Add --access public for scoped package
- Include dist/ in repository for direct publish
* feat: add populate option for content type events
- Add populate configuration to content type schema (Zod)
- Implement refetch logic in lifecycle hooks for create/update events
- Support multiple populate formats: '*', true, string[], object
- Add TypeScript types for PopulateConfig
- Document populate option in README with examples
- Update npm-publish workflow to build before publish
Populate allows including relations in emitted Socket.IO events.
When configured, the plugin refetches entities with populated
relations after create/update operations before emitting.
* security: add sensitive fields protection for all emitted data
- Add recursive removal of sensitive fields (password, token, apiKey, etc.)
- Support custom sensitiveFields in plugin config
- Apply sanitization to both emit() and raw() methods
- Update TypeScript types and documentation
Default blocked fields: password, resetPasswordToken, confirmationToken,
refreshToken, accessToken, secret, apiKey, privateKey, token, salt, hash
* ci: improve npm publish workflow with best practices
- Add build job for PR/push validation
- Add npm cache for faster CI
- Verify plugin structure before publish
- Check version matches release tag
- Support npm tags: latest, beta, alpha, next
- Add post-publish verification
- Upload build artifacts between jobs
* fix: correct peerDependencies and remove legacy-peer-deps workaround
- Remove @strapi/sdk-plugin from peerDependencies (build-only dep)
- Use flexible version ranges for peerDependencies
- Mark design-system and icons as optional peers
- Remove --legacy-peer-deps from CI workflow
* chore: update devDependencies to latest compatible versions
- @strapi/strapi: 5.3.2 -> 5.33.0
- @strapi/design-system: 2.0.0-rc.30 -> 2.0.2
- @strapi/icons: 2.0.0-rc.30 -> 2.0.2
- prettier: 3.6.2 -> 3.7.4
- eslint: 8.57.0 -> 8.57.1
- eslint-config-prettier: 9.1.0 -> 9.1.2
Note: React 18, react-router-dom 6, zod 3 kept for Strapi v5 compatibility1 parent 758c6d6 commit 09445b1
File tree
35 files changed
+197968
-23375
lines changed- .github/workflows
- dist
- _chunks
- admin
- server
- server/src
- bootstrap
- config
- services
- structures
35 files changed
+197968
-23375
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
9 | 17 | | |
10 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
11 | 24 | | |
| 25 | + | |
12 | 26 | | |
13 | | - | |
14 | | - | |
| 27 | + | |
| 28 | + | |
15 | 29 | | |
16 | | - | |
17 | | - | |
| 30 | + | |
| 31 | + | |
18 | 32 | | |
19 | | - | |
20 | | - | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
22 | | - | |
| 36 | + | |
23 | 37 | | |
24 | 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 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
25 | 134 | | |
26 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
27 | 138 | | |
28 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
176 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
177 | 186 | | |
178 | 187 | | |
179 | 188 | | |
| |||
217 | 226 | | |
218 | 227 | | |
219 | 228 | | |
220 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
221 | 328 | | |
222 | 329 | | |
223 | 330 | | |
| |||
0 commit comments