strapi-plugin-magic-sessionmanager 4.2.4 → 4.2.6

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.
Files changed (62) hide show
  1. package/README.md +0 -2
  2. package/dist/server/index.js +1 -1
  3. package/dist/server/index.mjs +1 -1
  4. package/package.json +1 -3
  5. package/admin/jsconfig.json +0 -10
  6. package/admin/src/components/Initializer.jsx +0 -11
  7. package/admin/src/components/LicenseGuard.jsx +0 -591
  8. package/admin/src/components/OnlineUsersWidget.jsx +0 -212
  9. package/admin/src/components/PluginIcon.jsx +0 -8
  10. package/admin/src/components/SessionDetailModal.jsx +0 -449
  11. package/admin/src/components/SessionInfoCard.jsx +0 -151
  12. package/admin/src/components/SessionInfoPanel.jsx +0 -385
  13. package/admin/src/components/index.jsx +0 -5
  14. package/admin/src/hooks/useLicense.js +0 -103
  15. package/admin/src/index.js +0 -149
  16. package/admin/src/pages/ActiveSessions.jsx +0 -12
  17. package/admin/src/pages/Analytics.jsx +0 -735
  18. package/admin/src/pages/App.jsx +0 -12
  19. package/admin/src/pages/HomePage.jsx +0 -1212
  20. package/admin/src/pages/License.jsx +0 -603
  21. package/admin/src/pages/Settings.jsx +0 -1646
  22. package/admin/src/pages/SettingsNew.jsx +0 -1204
  23. package/admin/src/pages/UpgradePage.jsx +0 -448
  24. package/admin/src/pages/index.jsx +0 -3
  25. package/admin/src/pluginId.js +0 -4
  26. package/admin/src/translations/de.json +0 -299
  27. package/admin/src/translations/en.json +0 -299
  28. package/admin/src/translations/es.json +0 -287
  29. package/admin/src/translations/fr.json +0 -287
  30. package/admin/src/translations/pt.json +0 -287
  31. package/admin/src/utils/getTranslation.js +0 -5
  32. package/admin/src/utils/index.js +0 -2
  33. package/admin/src/utils/parseUserAgent.js +0 -79
  34. package/admin/src/utils/theme.js +0 -85
  35. package/server/jsconfig.json +0 -10
  36. package/server/src/bootstrap.js +0 -492
  37. package/server/src/config/index.js +0 -23
  38. package/server/src/content-types/index.js +0 -9
  39. package/server/src/content-types/session/schema.json +0 -84
  40. package/server/src/controllers/controller.js +0 -11
  41. package/server/src/controllers/index.js +0 -11
  42. package/server/src/controllers/license.js +0 -266
  43. package/server/src/controllers/session.js +0 -433
  44. package/server/src/controllers/settings.js +0 -122
  45. package/server/src/destroy.js +0 -22
  46. package/server/src/index.js +0 -23
  47. package/server/src/middlewares/index.js +0 -5
  48. package/server/src/middlewares/last-seen.js +0 -62
  49. package/server/src/policies/index.js +0 -3
  50. package/server/src/register.js +0 -36
  51. package/server/src/routes/admin.js +0 -149
  52. package/server/src/routes/content-api.js +0 -60
  53. package/server/src/routes/index.js +0 -9
  54. package/server/src/services/geolocation.js +0 -182
  55. package/server/src/services/index.js +0 -13
  56. package/server/src/services/license-guard.js +0 -316
  57. package/server/src/services/notifications.js +0 -319
  58. package/server/src/services/service.js +0 -7
  59. package/server/src/services/session.js +0 -393
  60. package/server/src/utils/encryption.js +0 -121
  61. package/server/src/utils/getClientIp.js +0 -118
  62. package/server/src/utils/logger.js +0 -84
@@ -1,84 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Debug Logger Utility for magic-sessionmanager
5
- * Only logs messages when debug: true in plugin config
6
- * ALL logs (including errors/warnings) are hidden unless debug mode is enabled
7
- */
8
-
9
- const PLUGIN_NAME = 'magic-sessionmanager';
10
- const PREFIX = '[magic-sessionmanager]';
11
-
12
- /**
13
- * Format message with prefix - returns a formatted string
14
- */
15
- function formatMessage(prefix, args) {
16
- if (args.length === 0) return prefix;
17
- const parts = args.map(arg =>
18
- typeof arg === 'string' ? arg : JSON.stringify(arg)
19
- );
20
- return `${prefix} ${parts.join(' ')}`;
21
- }
22
-
23
- /**
24
- * Creates a logger instance that respects debug config
25
- * @param {object} strapi - Strapi instance
26
- * @returns {object} Logger with info, debug, warn, error methods
27
- */
28
- function createLogger(strapi) {
29
- const getDebugMode = () => {
30
- try {
31
- const config = strapi.config.get(`plugin::${PLUGIN_NAME}`) || {};
32
- return config.debug === true;
33
- } catch {
34
- return false;
35
- }
36
- };
37
-
38
- return {
39
- /**
40
- * Log info - only when debug: true
41
- */
42
- info: (...args) => {
43
- if (getDebugMode()) {
44
- strapi.log.info(formatMessage(PREFIX, args));
45
- }
46
- },
47
-
48
- /**
49
- * Log debug - only when debug: true
50
- */
51
- debug: (...args) => {
52
- if (getDebugMode()) {
53
- strapi.log.debug(formatMessage(PREFIX, args));
54
- }
55
- },
56
-
57
- /**
58
- * Log warning - only when debug: true
59
- */
60
- warn: (...args) => {
61
- if (getDebugMode()) {
62
- strapi.log.warn(formatMessage(PREFIX, args));
63
- }
64
- },
65
-
66
- /**
67
- * Log error - only when debug: true
68
- */
69
- error: (...args) => {
70
- if (getDebugMode()) {
71
- strapi.log.error(formatMessage(PREFIX, args));
72
- }
73
- },
74
-
75
- /**
76
- * Force log - always logged (for critical errors only)
77
- */
78
- forceError: (...args) => {
79
- strapi.log.error(formatMessage(PREFIX, args));
80
- },
81
- };
82
- }
83
-
84
- module.exports = { createLogger };