@strapi/plugin-sentry 4.15.1 → 4.15.3-alpha.0

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.
package/.eslintignore CHANGED
@@ -1,2 +1 @@
1
- node_modules/
2
- .eslintrc.js
1
+ dist
package/.eslintrc ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "root": true,
3
+ "overrides": [
4
+ {
5
+ "files": ["admin/**/*"],
6
+ "extends": ["custom/front"]
7
+ },
8
+ {
9
+ "files": ["**/*"],
10
+ "excludedFiles": ["admin/**/*"],
11
+ "extends": ["custom/back"]
12
+ }
13
+ ]
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-sentry",
3
- "version": "4.15.1",
3
+ "version": "4.15.3-alpha.0",
4
4
  "description": "Send Strapi error events to Sentry",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,18 +20,38 @@
20
20
  "url": "https://strapi.io"
21
21
  }
22
22
  ],
23
+ "exports": {
24
+ "./strapi-admin": {
25
+ "source": "./admin/src/index.js",
26
+ "import": "./dist/admin/index.mjs",
27
+ "require": "./dist/admin/index.js",
28
+ "default": "./dist/admin/index.js"
29
+ },
30
+ "./strapi-server": {
31
+ "source": "./strapi-server.js",
32
+ "require": "./strapi-server.js",
33
+ "default": "./strapi-server.js"
34
+ },
35
+ "./package.json": "./package.json"
36
+ },
23
37
  "scripts": {
38
+ "build": "pack-up build",
39
+ "clean": "run -T rimraf dist",
24
40
  "lint": "run -T eslint .",
25
41
  "test:unit": "run -T jest",
26
- "test:unit:watch": "run -T jest --watch"
42
+ "test:unit:watch": "run -T jest --watch",
43
+ "prepublishOnly": "yarn clean && yarn build",
44
+ "watch": "pack-up watch"
27
45
  },
28
46
  "dependencies": {
29
47
  "@sentry/node": "6.19.7",
30
48
  "@strapi/design-system": "1.13.0",
31
- "@strapi/helper-plugin": "4.15.1",
49
+ "@strapi/helper-plugin": "4.15.3-alpha.0",
32
50
  "@strapi/icons": "1.13.0"
33
51
  },
34
52
  "devDependencies": {
53
+ "@strapi/pack-up": "4.15.3-alpha.0",
54
+ "@strapi/strapi": "4.15.3-alpha.0",
35
55
  "react": "^18.2.0",
36
56
  "react-dom": "^18.2.0",
37
57
  "react-router-dom": "5.3.4",
@@ -41,8 +61,8 @@
41
61
  "@strapi/strapi": "^4.0.0",
42
62
  "react": "^17.0.0 || ^18.0.0",
43
63
  "react-dom": "^17.0.0 || ^18.0.0",
44
- "react-router-dom": "5.3.4",
45
- "styled-components": "5.3.3"
64
+ "react-router-dom": "^5.2.0",
65
+ "styled-components": "^5.2.1"
46
66
  },
47
67
  "engines": {
48
68
  "node": ">=18.0.0 <=20.x.x",
@@ -54,5 +74,5 @@
54
74
  "description": "Send Strapi error events to Sentry.",
55
75
  "kind": "plugin"
56
76
  },
57
- "gitHead": "b6c085052f108fcfe47d22972a664dfa85aa0358"
77
+ "gitHead": "81425b4b9803fd4df570e050c40dd984ebd28ac6"
58
78
  }
@@ -0,0 +1,42 @@
1
+ import { Config, defineConfig } from '@strapi/pack-up';
2
+ import { transformWithEsbuild } from 'vite';
3
+
4
+ const config: Config = defineConfig({
5
+ bundles: [
6
+ {
7
+ source: './admin/src/index.js',
8
+ import: './dist/admin/index.mjs',
9
+ require: './dist/admin/index.js',
10
+ runtime: 'web',
11
+ },
12
+ ],
13
+ dist: './dist',
14
+ /**
15
+ * Because we're exporting a server & client package
16
+ * which have different runtimes we want to ignore
17
+ * what they look like in the package.json
18
+ */
19
+ exports: {},
20
+ plugins: [
21
+ {
22
+ name: 'treat-js-files-as-jsx',
23
+ async transform(code, id) {
24
+ /**
25
+ * Matches all files in src/ and ee/ that end with .js
26
+ */
27
+ if (!id.match(/src\/.*\.js$/) && !id.match(/ee\/.*\.js$/)) {
28
+ return null;
29
+ }
30
+
31
+ // Use the exposed transform from vite, instead of directly
32
+ // transforming with esbuild
33
+ return transformWithEsbuild(code, id, {
34
+ loader: 'tsx',
35
+ jsx: 'automatic',
36
+ });
37
+ },
38
+ },
39
+ ],
40
+ });
41
+
42
+ export default config;
package/.editorconfig DELETED
@@ -1,7 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- end_of_line = lf
5
- insert_final_newline = false
6
- indent_style = space
7
- indent_size = 2
package/.eslintrc.js DELETED
@@ -1,14 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- overrides: [
4
- {
5
- files: ['admin/**/*'],
6
- extends: ['custom/front'],
7
- },
8
- {
9
- files: ['**/*'],
10
- excludedFiles: ['admin/**/*'],
11
- extends: ['custom/back'],
12
- },
13
- ],
14
- };
package/strapi-admin.js DELETED
@@ -1,3 +0,0 @@
1
- 'use strict';
2
-
3
- module.exports = require('./admin/src').default;