@strapi/plugin-sentry 4.26.0 → 4.26.2

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 (74) hide show
  1. package/dist/_chunks/{dk-Ht5BJvwV.mjs → dk-D9TLFbt6.mjs} +1 -1
  2. package/dist/_chunks/dk-D9TLFbt6.mjs.map +1 -0
  3. package/dist/_chunks/{dk-ACiZv75I.js → dk-NQyAzZiU.js} +1 -1
  4. package/dist/_chunks/dk-NQyAzZiU.js.map +1 -0
  5. package/dist/_chunks/{en--hlKpBzk.mjs → en-CegwVP3M.mjs} +1 -1
  6. package/dist/_chunks/en-CegwVP3M.mjs.map +1 -0
  7. package/dist/_chunks/{en-vyox7ZSC.js → en-bbgXRWo3.js} +1 -1
  8. package/dist/_chunks/en-bbgXRWo3.js.map +1 -0
  9. package/dist/_chunks/{es-tPYrS3N2.js → es-31ok883l.js} +1 -1
  10. package/dist/_chunks/es-31ok883l.js.map +1 -0
  11. package/dist/_chunks/{es-21jfFVzQ.mjs → es-DxC1UwjP.mjs} +1 -1
  12. package/dist/_chunks/es-DxC1UwjP.mjs.map +1 -0
  13. package/dist/_chunks/{fr-2usi50FD.js → fr-6Xd8HjNA.js} +1 -1
  14. package/dist/_chunks/fr-6Xd8HjNA.js.map +1 -0
  15. package/dist/_chunks/{fr-8muIKZms.mjs → fr-BRlwHIG8.mjs} +1 -1
  16. package/dist/_chunks/fr-BRlwHIG8.mjs.map +1 -0
  17. package/dist/_chunks/{ko-NdEnkB5D.mjs → ko-C_MXyOM9.mjs} +1 -1
  18. package/dist/_chunks/ko-C_MXyOM9.mjs.map +1 -0
  19. package/dist/_chunks/{ko-nuQP7I5M.js → ko-DdXSFVkr.js} +1 -1
  20. package/dist/_chunks/ko-DdXSFVkr.js.map +1 -0
  21. package/dist/_chunks/{pl-5DTLh5PW.mjs → pl-6hJT3Sda.mjs} +1 -1
  22. package/dist/_chunks/pl-6hJT3Sda.mjs.map +1 -0
  23. package/dist/_chunks/{pl-cdsG7ySn.js → pl-KE2e7O1o.js} +1 -1
  24. package/dist/_chunks/pl-KE2e7O1o.js.map +1 -0
  25. package/dist/_chunks/{ru-KtwsGCNm.js → ru-C41W13kt.js} +1 -1
  26. package/dist/_chunks/ru-C41W13kt.js.map +1 -0
  27. package/dist/_chunks/{ru-_BJx1_V5.mjs → ru-DnVqFddA.mjs} +1 -1
  28. package/dist/_chunks/ru-DnVqFddA.mjs.map +1 -0
  29. package/dist/_chunks/{sv-QDPLOKcT.js → sv-DCUFAW2Z.js} +1 -1
  30. package/dist/_chunks/sv-DCUFAW2Z.js.map +1 -0
  31. package/dist/_chunks/{sv-YocrQXH3.mjs → sv-DjL9wmwK.mjs} +1 -1
  32. package/dist/_chunks/sv-DjL9wmwK.mjs.map +1 -0
  33. package/dist/_chunks/{tr-nkbjyt2S.mjs → tr-BKL2AN-d.mjs} +1 -1
  34. package/dist/_chunks/tr-BKL2AN-d.mjs.map +1 -0
  35. package/dist/_chunks/{tr-W6PupknE.js → tr-DgnL-Yfr.js} +1 -1
  36. package/dist/_chunks/tr-DgnL-Yfr.js.map +1 -0
  37. package/dist/_chunks/{vi-10CsgDK2.mjs → vi-DLBe31mD.mjs} +1 -1
  38. package/dist/_chunks/vi-DLBe31mD.mjs.map +1 -0
  39. package/dist/_chunks/{vi-hEp1hNio.js → vi-E2aG_wR_.js} +1 -1
  40. package/dist/_chunks/vi-E2aG_wR_.js.map +1 -0
  41. package/dist/_chunks/{zh-WWNi5hqs.mjs → zh-5kkOa7U5.mjs} +1 -1
  42. package/dist/_chunks/zh-5kkOa7U5.mjs.map +1 -0
  43. package/dist/_chunks/{zh-uRG2X3qF.js → zh-Uq7oN9Sz.js} +1 -1
  44. package/dist/_chunks/zh-Uq7oN9Sz.js.map +1 -0
  45. package/dist/admin/index.js +11 -96
  46. package/dist/admin/index.js.map +1 -1
  47. package/dist/admin/index.mjs +11 -96
  48. package/dist/admin/index.mjs.map +1 -1
  49. package/dist/server/index.js +1 -2
  50. package/dist/server/index.js.map +1 -1
  51. package/dist/server/index.mjs.map +1 -1
  52. package/package.json +5 -5
  53. package/dist/_chunks/dk-ACiZv75I.js.map +0 -1
  54. package/dist/_chunks/dk-Ht5BJvwV.mjs.map +0 -1
  55. package/dist/_chunks/en--hlKpBzk.mjs.map +0 -1
  56. package/dist/_chunks/en-vyox7ZSC.js.map +0 -1
  57. package/dist/_chunks/es-21jfFVzQ.mjs.map +0 -1
  58. package/dist/_chunks/es-tPYrS3N2.js.map +0 -1
  59. package/dist/_chunks/fr-2usi50FD.js.map +0 -1
  60. package/dist/_chunks/fr-8muIKZms.mjs.map +0 -1
  61. package/dist/_chunks/ko-NdEnkB5D.mjs.map +0 -1
  62. package/dist/_chunks/ko-nuQP7I5M.js.map +0 -1
  63. package/dist/_chunks/pl-5DTLh5PW.mjs.map +0 -1
  64. package/dist/_chunks/pl-cdsG7ySn.js.map +0 -1
  65. package/dist/_chunks/ru-KtwsGCNm.js.map +0 -1
  66. package/dist/_chunks/ru-_BJx1_V5.mjs.map +0 -1
  67. package/dist/_chunks/sv-QDPLOKcT.js.map +0 -1
  68. package/dist/_chunks/sv-YocrQXH3.mjs.map +0 -1
  69. package/dist/_chunks/tr-W6PupknE.js.map +0 -1
  70. package/dist/_chunks/tr-nkbjyt2S.mjs.map +0 -1
  71. package/dist/_chunks/vi-10CsgDK2.mjs.map +0 -1
  72. package/dist/_chunks/vi-hEp1hNio.js.map +0 -1
  73. package/dist/_chunks/zh-WWNi5hqs.mjs.map +0 -1
  74. package/dist/_chunks/zh-uRG2X3qF.js.map +0 -1
@@ -6,4 +6,4 @@ const dk = {
6
6
  export {
7
7
  dk as default
8
8
  };
9
- //# sourceMappingURL=dk-Ht5BJvwV.mjs.map
9
+ //# sourceMappingURL=dk-D9TLFbt6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dk-D9TLFbt6.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const dk = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = dk;
9
- //# sourceMappingURL=dk-ACiZv75I.js.map
9
+ //# sourceMappingURL=dk-NQyAzZiU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dk-NQyAzZiU.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const en = {
6
6
  export {
7
7
  en as default
8
8
  };
9
- //# sourceMappingURL=en--hlKpBzk.mjs.map
9
+ //# sourceMappingURL=en-CegwVP3M.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-CegwVP3M.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const en = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = en;
9
- //# sourceMappingURL=en-vyox7ZSC.js.map
9
+ //# sourceMappingURL=en-bbgXRWo3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-bbgXRWo3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const es = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = es;
9
- //# sourceMappingURL=es-tPYrS3N2.js.map
9
+ //# sourceMappingURL=es-31ok883l.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-31ok883l.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const es = {
6
6
  export {
7
7
  es as default
8
8
  };
9
- //# sourceMappingURL=es-21jfFVzQ.mjs.map
9
+ //# sourceMappingURL=es-DxC1UwjP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-DxC1UwjP.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const fr = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = fr;
9
- //# sourceMappingURL=fr-2usi50FD.js.map
9
+ //# sourceMappingURL=fr-6Xd8HjNA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr-6Xd8HjNA.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const fr = {
6
6
  export {
7
7
  fr as default
8
8
  };
9
- //# sourceMappingURL=fr-8muIKZms.mjs.map
9
+ //# sourceMappingURL=fr-BRlwHIG8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr-BRlwHIG8.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const ko = {
6
6
  export {
7
7
  ko as default
8
8
  };
9
- //# sourceMappingURL=ko-NdEnkB5D.mjs.map
9
+ //# sourceMappingURL=ko-C_MXyOM9.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ko-C_MXyOM9.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const ko = {
6
6
  "plugin.name": "Sentry에"
7
7
  };
8
8
  exports.default = ko;
9
- //# sourceMappingURL=ko-nuQP7I5M.js.map
9
+ //# sourceMappingURL=ko-DdXSFVkr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ko-DdXSFVkr.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const pl = {
6
6
  export {
7
7
  pl as default
8
8
  };
9
- //# sourceMappingURL=pl-5DTLh5PW.mjs.map
9
+ //# sourceMappingURL=pl-6hJT3Sda.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pl-6hJT3Sda.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const pl = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = pl;
9
- //# sourceMappingURL=pl-cdsG7ySn.js.map
9
+ //# sourceMappingURL=pl-KE2e7O1o.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pl-KE2e7O1o.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const ru = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = ru;
9
- //# sourceMappingURL=ru-KtwsGCNm.js.map
9
+ //# sourceMappingURL=ru-C41W13kt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru-C41W13kt.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const ru = {
6
6
  export {
7
7
  ru as default
8
8
  };
9
- //# sourceMappingURL=ru-_BJx1_V5.mjs.map
9
+ //# sourceMappingURL=ru-DnVqFddA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru-DnVqFddA.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const sv = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = sv;
9
- //# sourceMappingURL=sv-QDPLOKcT.js.map
9
+ //# sourceMappingURL=sv-DCUFAW2Z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sv-DCUFAW2Z.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const sv = {
6
6
  export {
7
7
  sv as default
8
8
  };
9
- //# sourceMappingURL=sv-YocrQXH3.mjs.map
9
+ //# sourceMappingURL=sv-DjL9wmwK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sv-DjL9wmwK.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const tr = {
6
6
  export {
7
7
  tr as default
8
8
  };
9
- //# sourceMappingURL=tr-nkbjyt2S.mjs.map
9
+ //# sourceMappingURL=tr-BKL2AN-d.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr-BKL2AN-d.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const tr = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = tr;
9
- //# sourceMappingURL=tr-W6PupknE.js.map
9
+ //# sourceMappingURL=tr-DgnL-Yfr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr-DgnL-Yfr.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const vi = {
6
6
  export {
7
7
  vi as default
8
8
  };
9
- //# sourceMappingURL=vi-10CsgDK2.mjs.map
9
+ //# sourceMappingURL=vi-DLBe31mD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-DLBe31mD.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const vi = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = vi;
9
- //# sourceMappingURL=vi-hEp1hNio.js.map
9
+ //# sourceMappingURL=vi-E2aG_wR_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-E2aG_wR_.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const zh = {
6
6
  export {
7
7
  zh as default
8
8
  };
9
- //# sourceMappingURL=zh-WWNi5hqs.mjs.map
9
+ //# sourceMappingURL=zh-5kkOa7U5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-5kkOa7U5.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const zh = {
6
6
  "plugin.name": "Sentry"
7
7
  };
8
8
  exports.default = zh;
9
- //# sourceMappingURL=zh-uRG2X3qF.js.map
9
+ //# sourceMappingURL=zh-Uq7oN9Sz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-Uq7oN9Sz.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,110 +1,25 @@
1
1
  "use strict";
2
2
  const helperPlugin = require("@strapi/helper-plugin");
3
- const __variableDynamicImportRuntimeHelper = (glob, path) => {
3
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
4
4
  const v = glob[path];
5
5
  if (v) {
6
6
  return typeof v === "function" ? v() : Promise.resolve(v);
7
7
  }
8
8
  return new Promise((_, reject) => {
9
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
9
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
10
+ reject.bind(
11
+ null,
12
+ new Error(
13
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
14
+ )
15
+ )
16
+ );
10
17
  });
11
18
  };
12
- const name$1 = "@strapi/plugin-sentry";
13
- const version = "4.25.24";
14
- const description = "Send Strapi error events to Sentry";
15
- const repository = {
16
- type: "git",
17
- url: "https://github.com/strapi/strapi.git",
18
- directory: "packages/plugins/sentry"
19
- };
20
- const license = "SEE LICENSE IN LICENSE";
21
- const author = {
22
- name: "Strapi Solutions SAS",
23
- email: "hi@strapi.io",
24
- url: "https://strapi.io"
25
- };
26
- const maintainers = [
27
- {
28
- name: "Strapi Solutions SAS",
29
- email: "hi@strapi.io",
30
- url: "https://strapi.io"
31
- }
32
- ];
33
- const exports$1 = {
34
- "./strapi-admin": {
35
- types: "./dist/admin/src/index.d.ts",
36
- source: "./admin/src/index.ts",
37
- "import": "./dist/admin/index.mjs",
38
- require: "./dist/admin/index.js",
39
- "default": "./dist/admin/index.js"
40
- },
41
- "./strapi-server": {
42
- types: "./dist/server/src/index.d.ts",
43
- source: "./server/src/index.ts",
44
- "import": "./dist/server/index.mjs",
45
- require: "./dist/server/index.js",
46
- "default": "./dist/server/index.js"
47
- },
48
- "./package.json": "./package.json"
49
- };
50
- const files = [
51
- "./dist",
52
- "strapi-server.js"
53
- ];
54
- const scripts = {
55
- build: "strapi plugin:build --force",
56
- clean: "run -T rimraf dist",
57
- lint: "run -T eslint .",
58
- "test:unit": "run -T jest",
59
- "test:unit:watch": "run -T jest --watch",
60
- watch: "strapi plugin:watch"
61
- };
62
- const dependencies = {
63
- "@sentry/node": "6.19.7",
64
- "@strapi/design-system": "1.19.0",
65
- "@strapi/helper-plugin": "4.25.24",
66
- "@strapi/icons": "1.19.0"
67
- };
68
- const devDependencies = {
69
- "@strapi/pack-up": "4.23.0",
70
- "@strapi/strapi": "4.25.24",
71
- react: "^18.2.0",
72
- "react-dom": "^18.2.0",
73
- "react-router-dom": "5.3.4",
74
- "styled-components": "5.3.3"
75
- };
76
- const peerDependencies = {
77
- "@strapi/strapi": "^4.0.0",
78
- react: "^17.0.0 || ^18.0.0",
79
- "react-dom": "^17.0.0 || ^18.0.0",
80
- "react-router-dom": "^5.2.0",
81
- "styled-components": "^5.2.1"
82
- };
83
- const engines = {
84
- node: ">=18.0.0 <=20.x.x",
85
- npm: ">=6.0.0"
86
- };
87
19
  const strapi = {
88
- name: "sentry",
89
- displayName: "Sentry",
90
- description: "Send Strapi error events to Sentry.",
91
- kind: "plugin"
20
+ name: "sentry"
92
21
  };
93
22
  const pluginPkg = {
94
- name: name$1,
95
- version,
96
- description,
97
- repository,
98
- license,
99
- author,
100
- maintainers,
101
- exports: exports$1,
102
- files,
103
- scripts,
104
- dependencies,
105
- devDependencies,
106
- peerDependencies,
107
- engines,
108
23
  strapi
109
24
  };
110
25
  const pluginId = "sentry";
@@ -121,7 +36,7 @@ const index = {
121
36
  async registerTrads({ locales }) {
122
37
  const importedTrads = await Promise.all(
123
38
  locales.map((locale) => {
124
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => Promise.resolve().then(() => require("../_chunks/dk-ACiZv75I.js")), "./translations/en.json": () => Promise.resolve().then(() => require("../_chunks/en-vyox7ZSC.js")), "./translations/es.json": () => Promise.resolve().then(() => require("../_chunks/es-tPYrS3N2.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("../_chunks/fr-2usi50FD.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("../_chunks/ko-nuQP7I5M.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("../_chunks/pl-cdsG7ySn.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("../_chunks/ru-KtwsGCNm.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("../_chunks/sv-QDPLOKcT.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("../_chunks/tr-W6PupknE.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("../_chunks/vi-hEp1hNio.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("../_chunks/zh-uRG2X3qF.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
39
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => Promise.resolve().then(() => require("../_chunks/dk-NQyAzZiU.js")), "./translations/en.json": () => Promise.resolve().then(() => require("../_chunks/en-bbgXRWo3.js")), "./translations/es.json": () => Promise.resolve().then(() => require("../_chunks/es-31ok883l.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("../_chunks/fr-6Xd8HjNA.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("../_chunks/ko-DdXSFVkr.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("../_chunks/pl-KE2e7O1o.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("../_chunks/ru-C41W13kt.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("../_chunks/sv-DCUFAW2Z.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("../_chunks/tr-DgnL-Yfr.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("../_chunks/vi-E2aG_wR_.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("../_chunks/zh-Uq7oN9Sz.js")) }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
125
40
  return {
126
41
  data: helperPlugin.prefixPluginTranslations(data, pluginId),
127
42
  locale
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'sentry';\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":["prefixPluginTranslations"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACMxB,MAAM,OAAO,UAAU,OAAO;AAG9B,MAAe,QAAA;AAAA,EACb,SAAS,KAAU;AACjB,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,YAAY;AAAA,EAAC;AAAA,EACb,MAAM,cAAc,EAAE,WAAkC;AAChD,UAAA,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACf,eAAA,qCAA+B,uBAAA,OAAA,EAAA,0BAAA,MAAA,qCAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,qCAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,qCAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,OAAA,EACnC,KAAK,CAAC,EAAE,SAAS,KAAA,MAAW;AACpB,iBAAA;AAAA,YACL,MAAMA,aAAAA,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QACF,CACD,EACA,MAAM,MAAM;AACJ,iBAAA;AAAA,YACL,MAAM,CAAC;AAAA,YACP;AAAA,UAAA;AAAA,QACF,CACD;AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;;"}
1
+ {"version":3,"file":"index.js","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'sentry';\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\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AA,UAAA;AAAA,QAEJ,CAAC;AAAA,MACL,CAAC;AAAA,IAAA;AAGH,WAAO,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;;"}
@@ -1,109 +1,24 @@
1
1
  import { prefixPluginTranslations } from "@strapi/helper-plugin";
2
- const __variableDynamicImportRuntimeHelper = (glob, path) => {
2
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
3
3
  const v = glob[path];
4
4
  if (v) {
5
5
  return typeof v === "function" ? v() : Promise.resolve(v);
6
6
  }
7
7
  return new Promise((_, reject) => {
8
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
8
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
9
+ reject.bind(
10
+ null,
11
+ new Error(
12
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
13
+ )
14
+ )
15
+ );
9
16
  });
10
17
  };
11
- const name$1 = "@strapi/plugin-sentry";
12
- const version = "4.25.24";
13
- const description = "Send Strapi error events to Sentry";
14
- const repository = {
15
- type: "git",
16
- url: "https://github.com/strapi/strapi.git",
17
- directory: "packages/plugins/sentry"
18
- };
19
- const license = "SEE LICENSE IN LICENSE";
20
- const author = {
21
- name: "Strapi Solutions SAS",
22
- email: "hi@strapi.io",
23
- url: "https://strapi.io"
24
- };
25
- const maintainers = [
26
- {
27
- name: "Strapi Solutions SAS",
28
- email: "hi@strapi.io",
29
- url: "https://strapi.io"
30
- }
31
- ];
32
- const exports = {
33
- "./strapi-admin": {
34
- types: "./dist/admin/src/index.d.ts",
35
- source: "./admin/src/index.ts",
36
- "import": "./dist/admin/index.mjs",
37
- require: "./dist/admin/index.js",
38
- "default": "./dist/admin/index.js"
39
- },
40
- "./strapi-server": {
41
- types: "./dist/server/src/index.d.ts",
42
- source: "./server/src/index.ts",
43
- "import": "./dist/server/index.mjs",
44
- require: "./dist/server/index.js",
45
- "default": "./dist/server/index.js"
46
- },
47
- "./package.json": "./package.json"
48
- };
49
- const files = [
50
- "./dist",
51
- "strapi-server.js"
52
- ];
53
- const scripts = {
54
- build: "strapi plugin:build --force",
55
- clean: "run -T rimraf dist",
56
- lint: "run -T eslint .",
57
- "test:unit": "run -T jest",
58
- "test:unit:watch": "run -T jest --watch",
59
- watch: "strapi plugin:watch"
60
- };
61
- const dependencies = {
62
- "@sentry/node": "6.19.7",
63
- "@strapi/design-system": "1.19.0",
64
- "@strapi/helper-plugin": "4.25.24",
65
- "@strapi/icons": "1.19.0"
66
- };
67
- const devDependencies = {
68
- "@strapi/pack-up": "4.23.0",
69
- "@strapi/strapi": "4.25.24",
70
- react: "^18.2.0",
71
- "react-dom": "^18.2.0",
72
- "react-router-dom": "5.3.4",
73
- "styled-components": "5.3.3"
74
- };
75
- const peerDependencies = {
76
- "@strapi/strapi": "^4.0.0",
77
- react: "^17.0.0 || ^18.0.0",
78
- "react-dom": "^17.0.0 || ^18.0.0",
79
- "react-router-dom": "^5.2.0",
80
- "styled-components": "^5.2.1"
81
- };
82
- const engines = {
83
- node: ">=18.0.0 <=20.x.x",
84
- npm: ">=6.0.0"
85
- };
86
18
  const strapi = {
87
- name: "sentry",
88
- displayName: "Sentry",
89
- description: "Send Strapi error events to Sentry.",
90
- kind: "plugin"
19
+ name: "sentry"
91
20
  };
92
21
  const pluginPkg = {
93
- name: name$1,
94
- version,
95
- description,
96
- repository,
97
- license,
98
- author,
99
- maintainers,
100
- exports,
101
- files,
102
- scripts,
103
- dependencies,
104
- devDependencies,
105
- peerDependencies,
106
- engines,
107
22
  strapi
108
23
  };
109
24
  const pluginId = "sentry";
@@ -120,7 +35,7 @@ const index = {
120
35
  async registerTrads({ locales }) {
121
36
  const importedTrads = await Promise.all(
122
37
  locales.map((locale) => {
123
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => import("../_chunks/dk-Ht5BJvwV.mjs"), "./translations/en.json": () => import("../_chunks/en--hlKpBzk.mjs"), "./translations/es.json": () => import("../_chunks/es-21jfFVzQ.mjs"), "./translations/fr.json": () => import("../_chunks/fr-8muIKZms.mjs"), "./translations/ko.json": () => import("../_chunks/ko-NdEnkB5D.mjs"), "./translations/pl.json": () => import("../_chunks/pl-5DTLh5PW.mjs"), "./translations/ru.json": () => import("../_chunks/ru-_BJx1_V5.mjs"), "./translations/sv.json": () => import("../_chunks/sv-YocrQXH3.mjs"), "./translations/tr.json": () => import("../_chunks/tr-nkbjyt2S.mjs"), "./translations/vi.json": () => import("../_chunks/vi-10CsgDK2.mjs"), "./translations/zh.json": () => import("../_chunks/zh-WWNi5hqs.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
38
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => import("../_chunks/dk-D9TLFbt6.mjs"), "./translations/en.json": () => import("../_chunks/en-CegwVP3M.mjs"), "./translations/es.json": () => import("../_chunks/es-DxC1UwjP.mjs"), "./translations/fr.json": () => import("../_chunks/fr-BRlwHIG8.mjs"), "./translations/ko.json": () => import("../_chunks/ko-C_MXyOM9.mjs"), "./translations/pl.json": () => import("../_chunks/pl-6hJT3Sda.mjs"), "./translations/ru.json": () => import("../_chunks/ru-DnVqFddA.mjs"), "./translations/sv.json": () => import("../_chunks/sv-DjL9wmwK.mjs"), "./translations/tr.json": () => import("../_chunks/tr-BKL2AN-d.mjs"), "./translations/vi.json": () => import("../_chunks/vi-DLBe31mD.mjs"), "./translations/zh.json": () => import("../_chunks/zh-5kkOa7U5.mjs") }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
124
39
  return {
125
40
  data: prefixPluginTranslations(data, pluginId),
126
41
  locale
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'sentry';\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACMxB,MAAM,OAAO,UAAU,OAAO;AAG9B,MAAe,QAAA;AAAA,EACb,SAAS,KAAU;AACjB,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,YAAY;AAAA,EAAC;AAAA,EACb,MAAM,cAAc,EAAE,WAAkC;AAChD,UAAA,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACf,eAAA,qCAA+B,uBAAA,OAAA,EAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,OAAA,EACnC,KAAK,CAAC,EAAE,SAAS,KAAA,MAAW;AACpB,iBAAA;AAAA,YACL,MAAM,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QACF,CACD,EACA,MAAM,MAAM;AACJ,iBAAA;AAAA,YACL,MAAM,CAAC;AAAA,YACP;AAAA,UAAA;AAAA,QACF,CACD;AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'sentry';\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACMxB,MAAM,OAAO,UAAU,OAAO;AAG9B,MAAA,QAAe;AAAA,EACb,SAAS,KAAU;AACjB,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,YAAY;AAAA,EAAC;AAAA,EACb,MAAM,cAAc,EAAE,WAAkC;AACtD,UAAM,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACtB,eAAO,qCAAA,uBAAA,OAAA,EAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,SAAA,CAAA,EACJ,KAAK,CAAC,EAAE,SAAS,KAAA,MAAW;AAC3B,iBAAO;AAAA,YACL,MAAM,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QAEJ,CAAC,EACA,MAAM,MAAM;AACX,iBAAO;AAAA,YACL,MAAM,CAAA;AAAA,YACN;AAAA,UAAA;AAAA,QAEJ,CAAC;AAAA,MACL,CAAC;AAAA,IAAA;AAGH,WAAO,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;"}
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  const Sentry = require("@sentry/node");
3
3
  function _interopNamespace(e) {
4
- if (e && e.__esModule)
5
- return e;
4
+ if (e && e.__esModule) return e;
6
5
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
7
6
  if (e) {
8
7
  for (const k in e) {
@@ -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 { Strapi } 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: 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 { Strapi } from '@strapi/strapi';\nimport initSentryMiddleware from './middlewares/sentry';\n\nexport default async ({ strapi }: { strapi: Strapi }) => {\n // Initialize the Sentry service exposed by this plugin\n initSentryMiddleware({ strapi });\n};\n","import type { Strapi } from '@strapi/strapi';\nimport type { Config } from 'src/config';\nimport * as Sentry from '@sentry/node';\n\nconst createSentryService = (strapi: 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: 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,MAAiC;AACjD,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,MA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,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/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 { Strapi } 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: 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 { Strapi } from '@strapi/strapi';\nimport initSentryMiddleware from './middlewares/sentry';\n\nexport default async ({ strapi }: { strapi: Strapi }) => {\n // Initialize the Sentry service exposed by this plugin\n initSentryMiddleware({ strapi });\n};\n","import type { Strapi } from '@strapi/strapi';\nimport type { Config } from 'src/config';\nimport * as Sentry from '@sentry/node';\n\nconst createSentryService = (strapi: 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: 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,MAAiC;AACjD,QAAM,gBAAwD,OAC3D,OAAO,QAAQ,EACf,QAAQ,QAAQ;AACnB,gBAAc,KAAA;AACd,QAAMA,UAAS,cAAc,YAAA;AAE7B,MAAI,CAACA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Z,aAAO;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKA,UAAU,OAAc,gBAAgD;AAEtE,UAAI,CAAC,WAAW,CAAC,UAAU;AACzB,eAAO,IAAI,KAAK,uDAAuD;AACvE;AAAA,MACF;AAEA,eAAS,UAAU,CAAC,UAAU;AAE5B,YAAI,kBAAkBD,QAAO,cAAc;AACzC,yBAAe,KAAK;AAAA,QACtB;AAGA,kBAAU,iBAAiB,KAAK;AAAA,MAClC,CAAC;AAAA,IACH;AAAA,EAAA;AAEJ;AAEA,MAAA,SAAe,CAAC,EAAE,OAAA,MAAiC,oBAAoB,MAAM;ACxE7E,MAAA,WAAe;AAAA,EACb;AACF;ACIA,MAAA,SAAe;AAAA,EACb,SAAS;AAAA,IACP,KAAK;AAAA,IACL,cAAc;AAAA,IACd,MAAM,CAAA;AAAA,EAAC;AAAA,EAET,YAAY;AAAA,EAAC;AACf;ACXA,MAAA,QAAe,OAAO;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","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 { Strapi } 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: 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 { Strapi } from '@strapi/strapi';\nimport initSentryMiddleware from './middlewares/sentry';\n\nexport default async ({ strapi }: { strapi: Strapi }) => {\n // Initialize the Sentry service exposed by this plugin\n initSentryMiddleware({ strapi });\n};\n","import type { Strapi } from '@strapi/strapi';\nimport type { Config } from 'src/config';\nimport * as Sentry from '@sentry/node';\n\nconst createSentryService = (strapi: 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: 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"],"mappings":";AAOA,MAAA,uBAAe,CAAC,EAAE,OAAA,MAAiC;AACjD,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,MAAiC;AAElC,uBAAA,EAAE,QAAQ;AACjC;ACFA,MAAM,sBAAsB,CAAC,WAAmB;AAC9C,MAAI,UAAU;AACd,MAAI,WAAiC;AAGrC,QAAMC,UAAS,OAAO,OAAO,IAAI,eAAe;AAEzC,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;AACF,eAAO,KAAK;AAAA,UACV,KAAKA,QAAO;AAAA,UACZ,aAAa,OAAO,OAAO,IAAI,aAAa;AAAA,UAC5C,GAAGA,QAAO;AAAA,QAAA,CACX;AAGU,mBAAA;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,kBAAkBA,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,MAA0B,oBAAoB,MAAM;ACxE7E,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.mjs","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 { Strapi } 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: 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 { Strapi } from '@strapi/strapi';\nimport initSentryMiddleware from './middlewares/sentry';\n\nexport default async ({ strapi }: { strapi: Strapi }) => {\n // Initialize the Sentry service exposed by this plugin\n initSentryMiddleware({ strapi });\n};\n","import type { Strapi } from '@strapi/strapi';\nimport type { Config } from 'src/config';\nimport * as Sentry from '@sentry/node';\n\nconst createSentryService = (strapi: 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: 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"],"mappings":";AAOA,MAAA,uBAAe,CAAC,EAAE,OAAA,MAAiC;AACjD,QAAM,gBAAwD,OAC3D,OAAO,QAAQ,EACf,QAAQ,QAAQ;AACnB,gBAAc,KAAA;AACd,QAAMA,UAAS,cAAc,YAAA;AAE7B,MAAI,CAACA,SAAQ;AAEX;AAAA,EACF;AAEA,SAAO,OAAO,IAAI,OAAO,KAAK,SAAS;AACrC,QAAI;AACF,YAAM,KAAA;AAAA,IACR,SAAS,OAAO;AACd,UAAI,iBAAiB,OAAO;AAC1B,sBAAc,UAAU,OAAO,CAAC,UAAwB;AACtD,gBAAM,kBAAkB,CAAC,UAAU;AAEjC,mBAAOA,QAAO,SAAS,aAAa,OAAO,IAAI,SAA2B;AAAA;AAAA,cAExE,aAAa;AAAA,YAAA,C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AAA,EAAA;AAEJ;AAEA,MAAA,SAAe,CAAC,EAAE,OAAA,MAAiC,oBAAoB,MAAM;ACxE7E,MAAA,WAAe;AAAA,EACb;AACF;ACIA,MAAA,SAAe;AAAA,EACb,SAAS;AAAA,IACP,KAAK;AAAA,IACL,cAAc;AAAA,IACd,MAAM,CAAA;AAAA,EAAC;AAAA,EAET,YAAY;AAAA,EAAC;AACf;ACXA,MAAA,QAAe,OAAO;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-sentry",
3
- "version": "4.26.0",
3
+ "version": "4.26.2",
4
4
  "description": "Send Strapi error events to Sentry",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,12 +52,12 @@
52
52
  "dependencies": {
53
53
  "@sentry/node": "6.19.7",
54
54
  "@strapi/design-system": "1.19.0",
55
- "@strapi/helper-plugin": "4.26.0",
55
+ "@strapi/helper-plugin": "4.26.2",
56
56
  "@strapi/icons": "1.19.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@strapi/pack-up": "4.23.0",
60
- "@strapi/strapi": "4.26.0",
60
+ "@strapi/strapi": "4.26.2",
61
61
  "react": "^18.2.0",
62
62
  "react-dom": "^18.2.0",
63
63
  "react-router-dom": "5.3.4",
@@ -71,7 +71,7 @@
71
71
  "styled-components": "^5.2.1"
72
72
  },
73
73
  "engines": {
74
- "node": ">=18.0.0 <=20.x.x",
74
+ "node": ">=18.0.0 <=22.x.x",
75
75
  "npm": ">=6.0.0"
76
76
  },
77
77
  "strapi": {
@@ -80,5 +80,5 @@
80
80
  "description": "Send Strapi error events to Sentry.",
81
81
  "kind": "plugin"
82
82
  },
83
- "gitHead": "57657610e79a82f73b7ca504cb66aaa9109d3a0b"
83
+ "gitHead": "7ad165f89d1ccae3c524439a36fc619ecf6b23f9"
84
84
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"dk-ACiZv75I.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"dk-Ht5BJvwV.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"en--hlKpBzk.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"en-vyox7ZSC.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"es-21jfFVzQ.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"es-tPYrS3N2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fr-2usi50FD.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fr-8muIKZms.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ko-NdEnkB5D.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ko-nuQP7I5M.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pl-5DTLh5PW.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pl-cdsG7ySn.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ru-KtwsGCNm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ru-_BJx1_V5.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sv-QDPLOKcT.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sv-YocrQXH3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tr-W6PupknE.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tr-nkbjyt2S.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"vi-10CsgDK2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"vi-hEp1hNio.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"zh-WWNi5hqs.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"zh-uRG2X3qF.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}