@strapi/plugin-sentry 0.0.0-experimental.62ce06180fe9a772eaeb3d43d238b26644f39f7c → 0.0.0-experimental.6340da17068c3bed7fb006e7bcc554c71129e282

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 (151) hide show
  1. package/LICENSE +18 -3
  2. package/README.md +1 -1
  3. package/dist/admin/index.js +58 -146
  4. package/dist/admin/index.js.map +1 -1
  5. package/dist/admin/index.mjs +54 -147
  6. package/dist/admin/index.mjs.map +1 -1
  7. package/dist/admin/package.json.js +13 -0
  8. package/dist/admin/package.json.js.map +1 -0
  9. package/dist/admin/package.json.mjs +8 -0
  10. package/dist/admin/package.json.mjs.map +1 -0
  11. package/dist/admin/pluginId.js +6 -0
  12. package/dist/admin/pluginId.js.map +1 -0
  13. package/dist/admin/pluginId.mjs +4 -0
  14. package/dist/admin/pluginId.mjs.map +1 -0
  15. package/dist/admin/src/index.d.ts +2 -1
  16. package/dist/admin/translations/cs.json.js +10 -0
  17. package/dist/admin/translations/cs.json.js.map +1 -0
  18. package/dist/admin/translations/cs.json.mjs +8 -0
  19. package/dist/admin/translations/cs.json.mjs.map +1 -0
  20. package/dist/admin/translations/da.json.js +10 -0
  21. package/dist/admin/translations/da.json.js.map +1 -0
  22. package/dist/admin/translations/da.json.mjs +8 -0
  23. package/dist/admin/translations/da.json.mjs.map +1 -0
  24. package/dist/admin/translations/en.json.js +10 -0
  25. package/dist/admin/translations/en.json.js.map +1 -0
  26. package/dist/admin/translations/en.json.mjs +8 -0
  27. package/dist/admin/translations/en.json.mjs.map +1 -0
  28. package/dist/admin/translations/es.json.js +10 -0
  29. package/dist/admin/translations/es.json.js.map +1 -0
  30. package/dist/admin/translations/es.json.mjs +8 -0
  31. package/dist/admin/translations/es.json.mjs.map +1 -0
  32. package/dist/admin/translations/fr.json.js +10 -0
  33. package/dist/admin/translations/fr.json.js.map +1 -0
  34. package/dist/admin/translations/fr.json.mjs +8 -0
  35. package/dist/admin/translations/fr.json.mjs.map +1 -0
  36. package/dist/admin/translations/ko.json.js +10 -0
  37. package/dist/admin/translations/ko.json.js.map +1 -0
  38. package/dist/admin/translations/ko.json.mjs +8 -0
  39. package/dist/admin/translations/ko.json.mjs.map +1 -0
  40. package/dist/admin/translations/pl.json.js +10 -0
  41. package/dist/admin/translations/pl.json.js.map +1 -0
  42. package/dist/admin/translations/pl.json.mjs +8 -0
  43. package/dist/admin/translations/pl.json.mjs.map +1 -0
  44. package/dist/admin/translations/ru.json.js +10 -0
  45. package/dist/admin/translations/ru.json.js.map +1 -0
  46. package/dist/admin/translations/ru.json.mjs +8 -0
  47. package/dist/admin/translations/ru.json.mjs.map +1 -0
  48. package/dist/admin/translations/sk.json.js +10 -0
  49. package/dist/admin/translations/sk.json.js.map +1 -0
  50. package/dist/admin/translations/sk.json.mjs +8 -0
  51. package/dist/admin/translations/sk.json.mjs.map +1 -0
  52. package/dist/admin/translations/sv.json.js +10 -0
  53. package/dist/admin/translations/sv.json.js.map +1 -0
  54. package/dist/admin/translations/sv.json.mjs +8 -0
  55. package/dist/admin/translations/sv.json.mjs.map +1 -0
  56. package/dist/admin/translations/tr.json.js +10 -0
  57. package/dist/admin/translations/tr.json.js.map +1 -0
  58. package/dist/admin/translations/tr.json.mjs +8 -0
  59. package/dist/admin/translations/tr.json.mjs.map +1 -0
  60. package/dist/admin/translations/uk.json.js +10 -0
  61. package/dist/admin/translations/uk.json.js.map +1 -0
  62. package/dist/admin/translations/uk.json.mjs +8 -0
  63. package/dist/admin/translations/uk.json.mjs.map +1 -0
  64. package/dist/admin/translations/vi.json.js +10 -0
  65. package/dist/admin/translations/vi.json.js.map +1 -0
  66. package/dist/admin/translations/vi.json.mjs +8 -0
  67. package/dist/admin/translations/vi.json.mjs.map +1 -0
  68. package/dist/admin/translations/zh.json.js +10 -0
  69. package/dist/admin/translations/zh.json.js.map +1 -0
  70. package/dist/admin/translations/zh.json.mjs +8 -0
  71. package/dist/admin/translations/zh.json.mjs.map +1 -0
  72. package/dist/admin/utils/prefixPluginTranslations.js +11 -0
  73. package/dist/admin/utils/prefixPluginTranslations.js.map +1 -0
  74. package/dist/admin/utils/prefixPluginTranslations.mjs +9 -0
  75. package/dist/admin/utils/prefixPluginTranslations.mjs.map +1 -0
  76. package/dist/server/bootstrap.js +13 -0
  77. package/dist/server/bootstrap.js.map +1 -0
  78. package/dist/server/bootstrap.mjs +11 -0
  79. package/dist/server/bootstrap.mjs.map +1 -0
  80. package/dist/server/config.js +13 -0
  81. package/dist/server/config.js.map +1 -0
  82. package/dist/server/config.mjs +11 -0
  83. package/dist/server/config.mjs.map +1 -0
  84. package/dist/server/index.js +12 -122
  85. package/dist/server/index.js.map +1 -1
  86. package/dist/server/index.mjs +11 -105
  87. package/dist/server/index.mjs.map +1 -1
  88. package/dist/server/middlewares/sentry.js +39 -0
  89. package/dist/server/middlewares/sentry.js.map +1 -0
  90. package/dist/server/middlewares/sentry.mjs +37 -0
  91. package/dist/server/middlewares/sentry.mjs.map +1 -0
  92. package/dist/server/services/index.js +10 -0
  93. package/dist/server/services/index.js.map +1 -0
  94. package/dist/server/services/index.mjs +8 -0
  95. package/dist/server/services/index.mjs.map +1 -0
  96. package/dist/server/services/sentry.js +84 -0
  97. package/dist/server/services/sentry.js.map +1 -0
  98. package/dist/server/services/sentry.mjs +62 -0
  99. package/dist/server/services/sentry.mjs.map +1 -0
  100. package/dist/server/src/bootstrap.d.ts.map +1 -1
  101. package/dist/server/src/index.d.ts +2 -2
  102. package/dist/server/src/middlewares/sentry.d.ts.map +1 -1
  103. package/dist/server/src/services/index.d.ts +2 -2
  104. package/dist/server/src/services/sentry.d.ts +2 -2
  105. package/dist/server/src/services/sentry.d.ts.map +1 -1
  106. package/package.json +21 -17
  107. package/dist/_chunks/dk-D9TLFbt6.mjs +0 -9
  108. package/dist/_chunks/dk-D9TLFbt6.mjs.map +0 -1
  109. package/dist/_chunks/dk-NQyAzZiU.js +0 -9
  110. package/dist/_chunks/dk-NQyAzZiU.js.map +0 -1
  111. package/dist/_chunks/en-CegwVP3M.mjs +0 -9
  112. package/dist/_chunks/en-CegwVP3M.mjs.map +0 -1
  113. package/dist/_chunks/en-bbgXRWo3.js +0 -9
  114. package/dist/_chunks/en-bbgXRWo3.js.map +0 -1
  115. package/dist/_chunks/es-31ok883l.js +0 -9
  116. package/dist/_chunks/es-31ok883l.js.map +0 -1
  117. package/dist/_chunks/es-DxC1UwjP.mjs +0 -9
  118. package/dist/_chunks/es-DxC1UwjP.mjs.map +0 -1
  119. package/dist/_chunks/fr-6Xd8HjNA.js +0 -9
  120. package/dist/_chunks/fr-6Xd8HjNA.js.map +0 -1
  121. package/dist/_chunks/fr-BRlwHIG8.mjs +0 -9
  122. package/dist/_chunks/fr-BRlwHIG8.mjs.map +0 -1
  123. package/dist/_chunks/ko-C_MXyOM9.mjs +0 -9
  124. package/dist/_chunks/ko-C_MXyOM9.mjs.map +0 -1
  125. package/dist/_chunks/ko-DdXSFVkr.js +0 -9
  126. package/dist/_chunks/ko-DdXSFVkr.js.map +0 -1
  127. package/dist/_chunks/pl-6hJT3Sda.mjs +0 -9
  128. package/dist/_chunks/pl-6hJT3Sda.mjs.map +0 -1
  129. package/dist/_chunks/pl-KE2e7O1o.js +0 -9
  130. package/dist/_chunks/pl-KE2e7O1o.js.map +0 -1
  131. package/dist/_chunks/ru-C41W13kt.js +0 -9
  132. package/dist/_chunks/ru-C41W13kt.js.map +0 -1
  133. package/dist/_chunks/ru-DnVqFddA.mjs +0 -9
  134. package/dist/_chunks/ru-DnVqFddA.mjs.map +0 -1
  135. package/dist/_chunks/sv-DCUFAW2Z.js +0 -9
  136. package/dist/_chunks/sv-DCUFAW2Z.js.map +0 -1
  137. package/dist/_chunks/sv-DjL9wmwK.mjs +0 -9
  138. package/dist/_chunks/sv-DjL9wmwK.mjs.map +0 -1
  139. package/dist/_chunks/tr-BKL2AN-d.mjs +0 -9
  140. package/dist/_chunks/tr-BKL2AN-d.mjs.map +0 -1
  141. package/dist/_chunks/tr-DgnL-Yfr.js +0 -9
  142. package/dist/_chunks/tr-DgnL-Yfr.js.map +0 -1
  143. package/dist/_chunks/vi-DLBe31mD.mjs +0 -9
  144. package/dist/_chunks/vi-DLBe31mD.mjs.map +0 -1
  145. package/dist/_chunks/vi-E2aG_wR_.js +0 -9
  146. package/dist/_chunks/vi-E2aG_wR_.js.map +0 -1
  147. package/dist/_chunks/zh-5kkOa7U5.mjs +0 -9
  148. package/dist/_chunks/zh-5kkOa7U5.mjs.map +0 -1
  149. package/dist/_chunks/zh-Uq7oN9Sz.js +0 -9
  150. package/dist/_chunks/zh-Uq7oN9Sz.js.map +0 -1
  151. package/strapi-server.js +0 -3
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var en = {
4
+ "plugin.description.long": "Send Strapi error events to Sentry.",
5
+ "plugin.description.short": "Send Strapi error events to Sentry.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = en;
10
+ //# sourceMappingURL=en.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var en = {
2
+ "plugin.description.long": "Send Strapi error events to Sentry.",
3
+ "plugin.description.short": "Send Strapi error events to Sentry.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { en as default };
8
+ //# sourceMappingURL=en.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var es = {
4
+ "plugin.description.long": "Envíe los eventos de error de Strapi a Sentry.",
5
+ "plugin.description.short": "Envíe los eventos de error de Strapi a Sentry.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = es;
10
+ //# sourceMappingURL=es.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var es = {
2
+ "plugin.description.long": "Envíe los eventos de error de Strapi a Sentry.",
3
+ "plugin.description.short": "Envíe los eventos de error de Strapi a Sentry.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { es as default };
8
+ //# sourceMappingURL=es.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var fr = {
4
+ "plugin.description.long": "Envoie vos erreurs Strapi à Sentry.",
5
+ "plugin.description.short": "Envoie vos erreurs Strapi à Sentry.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = fr;
10
+ //# sourceMappingURL=fr.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var fr = {
2
+ "plugin.description.long": "Envoie vos erreurs Strapi à Sentry.",
3
+ "plugin.description.short": "Envoie vos erreurs Strapi à Sentry.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { fr as default };
8
+ //# sourceMappingURL=fr.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var ko = {
4
+ "plugin.description.long": "Strapi 에러 이벤트를 Sentry에 보냅니다.",
5
+ "plugin.description.short": "Strapi 에러 이벤트를 Sentry에 보냅니다.",
6
+ "plugin.name": "Sentry에"
7
+ };
8
+
9
+ module.exports = ko;
10
+ //# sourceMappingURL=ko.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ko.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var ko = {
2
+ "plugin.description.long": "Strapi 에러 이벤트를 Sentry에 보냅니다.",
3
+ "plugin.description.short": "Strapi 에러 이벤트를 Sentry에 보냅니다.",
4
+ "plugin.name": "Sentry에"
5
+ };
6
+
7
+ export { ko as default };
8
+ //# sourceMappingURL=ko.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ko.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var pl = {
4
+ "plugin.description.long": "Wyślij zdarzenia z błędami ze Strapi do Sentry",
5
+ "plugin.description.short": "Wyślij zdarzenia z błędami ze Strapi do Sentry.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = pl;
10
+ //# sourceMappingURL=pl.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var pl = {
2
+ "plugin.description.long": "Wyślij zdarzenia z błędami ze Strapi do Sentry",
3
+ "plugin.description.short": "Wyślij zdarzenia z błędami ze Strapi do Sentry.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { pl as default };
8
+ //# sourceMappingURL=pl.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pl.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var ru = {
4
+ "plugin.description.long": "Отсылает записи об ошибках Strapi в Sentry. Иными словами, ведёт журнал событий с ошибками и отправляет их в Sentry.",
5
+ "plugin.description.short": "Отсылает записи об ошибках Strapi в Sentry.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = ru;
10
+ //# sourceMappingURL=ru.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var ru = {
2
+ "plugin.description.long": "Отсылает записи об ошибках Strapi в Sentry. Иными словами, ведёт журнал событий с ошибками и отправляет их в Sentry.",
3
+ "plugin.description.short": "Отсылает записи об ошибках Strapi в Sentry.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { ru as default };
8
+ //# sourceMappingURL=ru.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var sk = {
4
+ "plugin.description.long": "Odosielať chybové udalosti Strapi do Sentry.",
5
+ "plugin.description.short": "Odosielať chybové udalosti Strapi do Sentry.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = sk;
10
+ //# sourceMappingURL=sk.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sk.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var sk = {
2
+ "plugin.description.long": "Odosielať chybové udalosti Strapi do Sentry.",
3
+ "plugin.description.short": "Odosielať chybové udalosti Strapi do Sentry.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { sk as default };
8
+ //# sourceMappingURL=sk.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sk.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var sv = {
4
+ "plugin.description.long": "Skicka felkoder från strapi som Sentry-events.",
5
+ "plugin.description.short": "Skicka felkoder från strapi som Sentry-events.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = sv;
10
+ //# sourceMappingURL=sv.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sv.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var sv = {
2
+ "plugin.description.long": "Skicka felkoder från strapi som Sentry-events.",
3
+ "plugin.description.short": "Skicka felkoder från strapi som Sentry-events.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { sv as default };
8
+ //# sourceMappingURL=sv.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sv.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var tr = {
4
+ "plugin.description.long": "Strapi hata olaylarını Sentry'e ilet.",
5
+ "plugin.description.short": "Strapi hata olaylarını Sentry'e ilet.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = tr;
10
+ //# sourceMappingURL=tr.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var tr = {
2
+ "plugin.description.long": "Strapi hata olaylarını Sentry'e ilet.",
3
+ "plugin.description.short": "Strapi hata olaylarını Sentry'e ilet.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { tr as default };
8
+ //# sourceMappingURL=tr.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var uk = {
4
+ "plugin.description.long": "Надіслати події помилок Strapi на Sentry.",
5
+ "plugin.description.short": "Надіслати події помилок Strapi на Sentry.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = uk;
10
+ //# sourceMappingURL=uk.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uk.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var uk = {
2
+ "plugin.description.long": "Надіслати події помилок Strapi на Sentry.",
3
+ "plugin.description.short": "Надіслати події помилок Strapi на Sentry.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { uk as default };
8
+ //# sourceMappingURL=uk.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uk.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var vi = {
4
+ "plugin.description.long": "Gửi lỗi Strapi lên Sentry.",
5
+ "plugin.description.short": "Gửi lỗi Strapi lên Sentry.",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = vi;
10
+ //# sourceMappingURL=vi.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var vi = {
2
+ "plugin.description.long": "Gửi lỗi Strapi lên Sentry.",
3
+ "plugin.description.short": "Gửi lỗi Strapi lên Sentry.",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { vi as default };
8
+ //# sourceMappingURL=vi.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var zh = {
4
+ "plugin.description.long": "將 Strapi 錯誤事件傳送至 Sentry。",
5
+ "plugin.description.short": "將 Strapi 錯誤事件傳送至 Sentry。",
6
+ "plugin.name": "Sentry"
7
+ };
8
+
9
+ module.exports = zh;
10
+ //# sourceMappingURL=zh.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ var zh = {
2
+ "plugin.description.long": "將 Strapi 錯誤事件傳送至 Sentry。",
3
+ "plugin.description.short": "將 Strapi 錯誤事件傳送至 Sentry。",
4
+ "plugin.name": "Sentry"
5
+ };
6
+
7
+ export { zh as default };
8
+ //# sourceMappingURL=zh.json.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ const prefixPluginTranslations = (trad, pluginId)=>{
4
+ return Object.keys(trad).reduce((acc, current)=>{
5
+ acc[`${pluginId}.${current}`] = trad[current];
6
+ return acc;
7
+ }, {});
8
+ };
9
+
10
+ exports.prefixPluginTranslations = prefixPluginTranslations;
11
+ //# sourceMappingURL=prefixPluginTranslations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefixPluginTranslations.js","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":";;AAEA,MAAMA,wBAAAA,GAA2B,CAACC,IAAAA,EAAmBC,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAAA,EAAKC,OAAAA,GAAAA;QACpCD,GAAG,CAAC,CAAA,EAAGJ,QAAAA,CAAS,CAAC,EAAEK,SAAS,CAAC,GAAGN,IAAI,CAACM,OAAAA,CAAQ;QAC7C,OAAOD,GAAAA;AACT,IAAA,CAAA,EAAG,EAAC,CAAA;AACN;;;;"}
@@ -0,0 +1,9 @@
1
+ const prefixPluginTranslations = (trad, pluginId)=>{
2
+ return Object.keys(trad).reduce((acc, current)=>{
3
+ acc[`${pluginId}.${current}`] = trad[current];
4
+ return acc;
5
+ }, {});
6
+ };
7
+
8
+ export { prefixPluginTranslations };
9
+ //# sourceMappingURL=prefixPluginTranslations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefixPluginTranslations.mjs","sources":["../../../admin/src/utils/prefixPluginTranslations.ts"],"sourcesContent":["type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n"],"names":["prefixPluginTranslations","trad","pluginId","Object","keys","reduce","acc","current"],"mappings":"AAEA,MAAMA,wBAAAA,GAA2B,CAACC,IAAAA,EAAmBC,QAAAA,GAAAA;AAInD,IAAA,OAAOC,OAAOC,IAAI,CAACH,MAAMI,MAAM,CAAC,CAACC,GAAAA,EAAKC,OAAAA,GAAAA;QACpCD,GAAG,CAAC,CAAA,EAAGJ,QAAAA,CAAS,CAAC,EAAEK,SAAS,CAAC,GAAGN,IAAI,CAACM,OAAAA,CAAQ;QAC7C,OAAOD,GAAAA;AACT,IAAA,CAAA,EAAG,EAAC,CAAA;AACN;;;;"}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var sentry = require('./middlewares/sentry.js');
4
+
5
+ var bootstrap = (async ({ strapi })=>{
6
+ // Initialize the Sentry service exposed by this plugin
7
+ sentry({
8
+ strapi
9
+ });
10
+ });
11
+
12
+ module.exports = bootstrap;
13
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.js","sources":["../../server/src/bootstrap.ts"],"sourcesContent":["import type { Core } from '@strapi/strapi';\nimport initSentryMiddleware from './middlewares/sentry';\n\nexport default async ({ strapi }: { strapi: Core.Strapi }) => {\n // Initialize the Sentry service exposed by this plugin\n initSentryMiddleware({ strapi });\n};\n"],"names":["strapi","initSentryMiddleware"],"mappings":";;;;AAGA,gBAAe,CAAA,OAAO,EAAEA,MAAM,EAA2B,GAAA;;IAEvDC,MAAAA,CAAqB;AAAED,QAAAA;AAAO,KAAA,CAAA;AAChC,CAAA;;;;"}
@@ -0,0 +1,11 @@
1
+ import initSentryMiddleware from './middlewares/sentry.mjs';
2
+
3
+ var bootstrap = (async ({ strapi })=>{
4
+ // Initialize the Sentry service exposed by this plugin
5
+ initSentryMiddleware({
6
+ strapi
7
+ });
8
+ });
9
+
10
+ export { bootstrap as default };
11
+ //# sourceMappingURL=bootstrap.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.mjs","sources":["../../server/src/bootstrap.ts"],"sourcesContent":["import type { Core } from '@strapi/strapi';\nimport initSentryMiddleware from './middlewares/sentry';\n\nexport default async ({ strapi }: { strapi: Core.Strapi }) => {\n // Initialize the Sentry service exposed by this plugin\n initSentryMiddleware({ strapi });\n};\n"],"names":["strapi","initSentryMiddleware"],"mappings":";;AAGA,gBAAe,CAAA,OAAO,EAAEA,MAAM,EAA2B,GAAA;;IAEvDC,oBAAAA,CAAqB;AAAED,QAAAA;AAAO,KAAA,CAAA;AAChC,CAAA;;;;"}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var config = {
4
+ default: {
5
+ dsn: null,
6
+ sendMetadata: true,
7
+ init: {}
8
+ },
9
+ validator () {}
10
+ };
11
+
12
+ module.exports = config;
13
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sources":["../../server/src/config.ts"],"sourcesContent":["import type { NodeOptions } from '@sentry/node';\n\nexport interface Config {\n dsn: string | null;\n sendMetadata: boolean;\n init: NodeOptions;\n}\n\nexport default {\n default: {\n dsn: null,\n sendMetadata: true,\n init: {},\n } satisfies Config,\n validator() {},\n};\n"],"names":["default","dsn","sendMetadata","init","validator"],"mappings":";;AAQA,aAAe;IACbA,OAAAA,EAAS;QACPC,GAAAA,EAAK,IAAA;QACLC,YAAAA,EAAc,IAAA;AACdC,QAAAA,IAAAA,EAAM;AACR,KAAA;IACAC,SAAAA,CAAAA,GAAAA,CAAa;AACf,CAAA;;;;"}
@@ -0,0 +1,11 @@
1
+ var config = {
2
+ default: {
3
+ dsn: null,
4
+ sendMetadata: true,
5
+ init: {}
6
+ },
7
+ validator () {}
8
+ };
9
+
10
+ export { config as default };
11
+ //# sourceMappingURL=config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.mjs","sources":["../../server/src/config.ts"],"sourcesContent":["import type { NodeOptions } from '@sentry/node';\n\nexport interface Config {\n dsn: string | null;\n sendMetadata: boolean;\n init: NodeOptions;\n}\n\nexport default {\n default: {\n dsn: null,\n sendMetadata: true,\n init: {},\n } satisfies Config,\n validator() {},\n};\n"],"names":["default","dsn","sendMetadata","init","validator"],"mappings":"AAQA,aAAe;IACbA,OAAAA,EAAS;QACPC,GAAAA,EAAK,IAAA;QACLC,YAAAA,EAAc,IAAA;AACdC,QAAAA,IAAAA,EAAM;AACR,KAAA;IACAC,SAAAA,CAAAA,GAAAA,CAAa;AACf,CAAA;;;;"}
@@ -1,124 +1,14 @@
1
- "use strict";
2
- const Sentry = require("@sentry/node");
3
- function _interopNamespace(e) {
4
- if (e && e.__esModule)
5
- return e;
6
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
7
- if (e) {
8
- for (const k in e) {
9
- if (k !== "default") {
10
- const d = Object.getOwnPropertyDescriptor(e, k);
11
- Object.defineProperty(n, k, d.get ? d : {
12
- enumerable: true,
13
- get: () => e[k]
14
- });
15
- }
16
- }
17
- }
18
- n.default = e;
19
- return Object.freeze(n);
20
- }
21
- const Sentry__namespace = /* @__PURE__ */ _interopNamespace(Sentry);
22
- const initSentryMiddleware = ({ strapi }) => {
23
- const sentryService = strapi.plugin("sentry").service("sentry");
24
- sentryService.init();
25
- const sentry2 = sentryService.getInstance();
26
- if (!sentry2) {
27
- return;
28
- }
29
- strapi.server.use(async (ctx, next) => {
30
- try {
31
- await next();
32
- } catch (error) {
33
- if (error instanceof Error) {
34
- sentryService.sendError(error, (scope) => {
35
- scope.addEventProcessor((event) => {
36
- return sentry2.Handlers.parseRequest(event, ctx.request, {
37
- // Don't parse the transaction name, we'll do it manually
38
- transaction: false
39
- });
40
- });
41
- scope.setTag("transaction", `${ctx.method} ${ctx._matchedRoute}`);
42
- scope.setTag("strapi_version", strapi.config.info.strapi);
43
- scope.setTag("method", ctx.method);
44
- });
45
- }
46
- throw error;
47
- }
48
- });
49
- };
50
- const bootstrap = async ({ strapi }) => {
51
- initSentryMiddleware({ strapi });
52
- };
53
- const createSentryService = (strapi) => {
54
- let isReady = false;
55
- let instance = null;
56
- const config2 = strapi.config.get("plugin::sentry");
57
- return {
58
- /**
59
- * Initialize Sentry service
60
- */
61
- init() {
62
- if (instance != null) {
63
- return this;
64
- }
65
- if (!config2.dsn) {
66
- strapi.log.info("@strapi/plugin-sentry is disabled because no Sentry DSN was provided");
67
- return this;
68
- }
69
- try {
70
- Sentry__namespace.init({
71
- dsn: config2.dsn,
72
- environment: strapi.config.get("environment"),
73
- ...config2.init
74
- });
75
- instance = Sentry__namespace;
76
- isReady = true;
77
- } catch (error) {
78
- strapi.log.warn("Could not set up Sentry, make sure you entered a valid DSN");
79
- }
80
- return this;
81
- },
82
- /**
83
- * Expose Sentry instance through a getter
84
- */
85
- getInstance() {
86
- return instance;
87
- },
88
- /**
89
- * Higher level method to send exception events to Sentry
90
- */
91
- sendError(error, configureScope) {
92
- if (!isReady || !instance) {
93
- strapi.log.warn("Sentry wasn't properly initialized, cannot send event");
94
- return;
95
- }
96
- instance.withScope((scope) => {
97
- if (configureScope && config2.sendMetadata) {
98
- configureScope(scope);
99
- }
100
- instance?.captureException(error);
101
- });
102
- }
103
- };
104
- };
105
- const sentry = ({ strapi }) => createSentryService(strapi);
106
- const services = {
107
- sentry
108
- };
109
- const config = {
110
- default: {
111
- dsn: null,
112
- sendMetadata: true,
113
- init: {}
114
- },
115
- validator() {
116
- }
117
- };
118
- const index = () => ({
119
- bootstrap,
120
- config,
121
- services
122
- });
1
+ 'use strict';
2
+
3
+ var bootstrap = require('./bootstrap.js');
4
+ var index$1 = require('./services/index.js');
5
+ var config = require('./config.js');
6
+
7
+ var index = (()=>({
8
+ bootstrap,
9
+ config,
10
+ services: index$1
11
+ }));
12
+
123
13
  module.exports = index;
124
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../server/src/middlewares/sentry.ts","../../server/src/bootstrap.ts","../../server/src/services/sentry.ts","../../server/src/services/index.ts","../../server/src/config.ts","../../server/src/index.ts"],"sourcesContent":["import type { Core } from '@strapi/strapi';\nimport type Sentry from '@sentry/node';\nimport type createSentryService from '../services/sentry';\n\n/**\n * Programmatic sentry middleware. We do not want to expose it in the plugin\n */\nexport default ({ strapi }: { strapi: Core.Strapi }) => {\n const sentryService: ReturnType<typeof createSentryService> = strapi\n .plugin('sentry')\n .service('sentry');\n sentryService.init();\n const sentry = sentryService.getInstance();\n\n if (!sentry) {\n // initialization failed\n return;\n }\n\n strapi.server.use(async (ctx, next) => {\n try {\n await next();\n } catch (error) {\n if (error instanceof Error) {\n sentryService.sendError(error, (scope: Sentry.Scope) => {\n scope.addEventProcessor((event) => {\n // Parse Koa context to add error metadata\n return sentry.Handlers.parseRequest(event, ctx.request as Sentry.Request, {\n // Don't parse the transaction name, we'll do it manually\n transaction: false,\n });\n });\n\n // Manually add transaction name\n scope.setTag('transaction', `${ctx.method} ${ctx._matchedRoute}`);\n // Manually add Strapi version\n scope.setTag('strapi_version', strapi.config.info.strapi);\n scope.setTag('method', ctx.method);\n });\n }\n\n throw error;\n }\n });\n};\n","import type { Core } from '@strapi/strapi';\nimport initSentryMiddleware from './middlewares/sentry';\n\nexport default async ({ strapi }: { strapi: Core.Strapi }) => {\n // Initialize the Sentry service exposed by this plugin\n initSentryMiddleware({ strapi });\n};\n","import type { Core } from '@strapi/strapi';\nimport type { Config } from 'src/config';\nimport * as Sentry from '@sentry/node';\n\nconst createSentryService = (strapi: Core.Strapi) => {\n let isReady = false;\n let instance: typeof Sentry | null = null;\n\n // Retrieve user config and merge it with the default one\n const config = strapi.config.get('plugin::sentry') as Config;\n\n return {\n /**\n * Initialize Sentry service\n */\n init() {\n // Make sure there isn't a Sentry instance already running\n if (instance != null) {\n return this;\n }\n\n // Don't init Sentry if no DSN was provided\n if (!config.dsn) {\n strapi.log.info('@strapi/plugin-sentry is disabled because no Sentry DSN was provided');\n return this;\n }\n\n try {\n Sentry.init({\n dsn: config.dsn,\n environment: strapi.config.get('environment'),\n ...config.init,\n });\n\n // Store the successfully initialized Sentry instance\n instance = Sentry;\n isReady = true;\n } catch (error) {\n strapi.log.warn('Could not set up Sentry, make sure you entered a valid DSN');\n }\n\n return this;\n },\n\n /**\n * Expose Sentry instance through a getter\n */\n getInstance() {\n return instance;\n },\n\n /**\n * Higher level method to send exception events to Sentry\n */\n sendError(error: Error, configureScope?: (scope: Sentry.Scope) => void) {\n // Make sure Sentry is ready\n if (!isReady || !instance) {\n strapi.log.warn(\"Sentry wasn't properly initialized, cannot send event\");\n return;\n }\n\n instance.withScope((scope) => {\n // Configure the Sentry scope using the provided callback\n if (configureScope && config.sendMetadata) {\n configureScope(scope);\n }\n\n // Actually send the Error to Sentry\n instance?.captureException(error);\n });\n },\n };\n};\n\nexport default ({ strapi }: { strapi: Core.Strapi }) => createSentryService(strapi);\n","import sentry from './sentry';\n\nexport default {\n sentry,\n};\n","import type { NodeOptions } from '@sentry/node';\n\nexport interface Config {\n dsn: string | null;\n sendMetadata: boolean;\n init: NodeOptions;\n}\n\nexport default {\n default: {\n dsn: null,\n sendMetadata: true,\n init: {},\n } satisfies Config,\n validator() {},\n};\n","import bootstrap from './bootstrap';\nimport services from './services';\nimport config from './config';\n\nexport default () => ({\n bootstrap,\n config,\n services,\n});\n"],"names":["sentry","config","Sentry"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAOA,MAAA,uBAAe,CAAC,EAAE,OAAA,MAAsC;AACtD,QAAM,gBAAwD,OAC3D,OAAO,QAAQ,EACf,QAAQ,QAAQ;AACnB,gBAAc,KAAK;AACb,QAAAA,UAAS,cAAc;AAE7B,MAAI,CAACA,SAAQ;AAEX;AAAA,EACF;AAEA,SAAO,OAAO,IAAI,OAAO,KAAK,SAAS;AACjC,QAAA;AACF,YAAM,KAAK;AAAA,aACJ,OAAO;AACd,UAAI,iBAAiB,OAAO;AACZ,sBAAA,UAAU,OAAO,CAAC,UAAwB;AAChD,gBAAA,kBAAkB,CAAC,UAAU;AAEjC,mBAAOA,QAAO,SAAS,aAAa,OAAO,IAAI,SAA2B;AAAA;AAAA,cAExE,aAAa;AAAA,YAAA,CACd;AAAA,UAAA,CACF;AAGK,gBAAA,OAAO,eAAe,GAAG,IAAI,MAAM,IAAI,IAAI,aAAa,EAAE;AAEhE,gBAAM,OAAO,kBAAkB,OAAO,OAAO,KAAK,MAAM;AAClD,gBAAA,OAAO,UAAU,IAAI,MAAM;AAAA,QAAA,CAClC;AAAA,MACH;AAEM,YAAA;AAAA,IACR;AAAA,EAAA,CACD;AACH;ACzCA,MAAA,YAAe,OAAO,EAAE,OAAA,MAAsC;AAEvC,uBAAA,EAAE,QAAQ;AACjC;ACFA,MAAM,sBAAsB,CAAC,WAAwB;AACnD,MAAI,UAAU;AACd,MAAI,WAAiC;AAGrC,QAAMC,UAAS,OAAO,OAAO,IAAI,gBAAgB;AAE1C,SAAA;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAEL,UAAI,YAAY,MAAM;AACb,eAAA;AAAA,MACT;AAGI,UAAA,CAACA,QAAO,KAAK;AACR,eAAA,IAAI,KAAK,sEAAsE;AAC/E,eAAA;AAAA,MACT;AAEI,UAAA;AACFC,0BAAO,KAAK;AAAA,UACV,KAAKD,QAAO;AAAA,UACZ,aAAa,OAAO,OAAO,IAAI,aAAa;AAAA,UAC5C,GAAGA,QAAO;AAAA,QAAA,CACX;AAGU,mBAAAC;AACD,kBAAA;AAAA,eACH,OAAO;AACP,eAAA,IAAI,KAAK,4DAA4D;AAAA,MAC9E;AAEO,aAAA;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKA,cAAc;AACL,aAAA;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKA,UAAU,OAAc,gBAAgD;AAElE,UAAA,CAAC,WAAW,CAAC,UAAU;AAClB,eAAA,IAAI,KAAK,uDAAuD;AACvE;AAAA,MACF;AAES,eAAA,UAAU,CAAC,UAAU;AAExB,YAAA,kBAAkBD,QAAO,cAAc;AACzC,yBAAe,KAAK;AAAA,QACtB;AAGA,kBAAU,iBAAiB,KAAK;AAAA,MAAA,CACjC;AAAA,IACH;AAAA,EAAA;AAEJ;AAEA,MAAe,SAAA,CAAC,EAAE,OAAO,MAA+B,oBAAoB,MAAM;ACxElF,MAAe,WAAA;AAAA,EACb;AACF;ACIA,MAAe,SAAA;AAAA,EACb,SAAS;AAAA,IACP,KAAK;AAAA,IACL,cAAc;AAAA,IACd,MAAM,CAAC;AAAA,EACT;AAAA,EACA,YAAY;AAAA,EAAC;AACf;ACXA,MAAA,QAAe,OAAO;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF;;"}
1
+ {"version":3,"file":"index.js","sources":["../../server/src/index.ts"],"sourcesContent":["import bootstrap from './bootstrap';\nimport services from './services';\nimport config from './config';\n\nexport default () => ({\n bootstrap,\n config,\n services,\n});\n"],"names":["bootstrap","config","services"],"mappings":";;;;;;AAIA,YAAe,CAAA,KAAO;AACpBA,QAAAA,SAAAA;AACAC,QAAAA,MAAAA;AACAC,kBAAAA;AACF,KAAA,CAAC;;;;"}