@strapi/plugin-users-permissions 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-users-permissions",
3
- "version": "4.15.1",
3
+ "version": "4.15.3-alpha.0",
4
4
  "description": "Protect your API with a full-authentication process based on JWT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,20 +19,38 @@
19
19
  "url": "https://strapi.io"
20
20
  }
21
21
  ],
22
+ "exports": {
23
+ "./strapi-admin": {
24
+ "source": "./admin/src/index.js",
25
+ "import": "./dist/admin/index.mjs",
26
+ "require": "./dist/admin/index.js",
27
+ "default": "./dist/admin/index.js"
28
+ },
29
+ "./strapi-server": {
30
+ "source": "./strapi-server.js",
31
+ "require": "./strapi-server.js",
32
+ "default": "./strapi-server.js"
33
+ },
34
+ "./package.json": "./package.json"
35
+ },
22
36
  "scripts": {
37
+ "build": "pack-up build",
38
+ "clean": "run -T rimraf dist",
23
39
  "lint": "run -T eslint .",
24
40
  "test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
25
41
  "test:front:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js",
26
42
  "test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
27
43
  "test:front:watch:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
28
44
  "test:unit": "run -T jest",
29
- "test:unit:watch": "run -T jest --watch"
45
+ "test:unit:watch": "run -T jest --watch",
46
+ "prepublishOnly": "yarn clean && yarn build",
47
+ "watch": "pack-up watch"
30
48
  },
31
49
  "dependencies": {
32
50
  "@strapi/design-system": "1.13.0",
33
- "@strapi/helper-plugin": "4.15.1",
51
+ "@strapi/helper-plugin": "4.15.3-alpha.0",
34
52
  "@strapi/icons": "1.13.0",
35
- "@strapi/utils": "4.15.1",
53
+ "@strapi/utils": "4.15.3-alpha.0",
36
54
  "bcryptjs": "2.4.3",
37
55
  "formik": "2.4.0",
38
56
  "grant-koa": "5.4.8",
@@ -51,6 +69,8 @@
51
69
  "yup": "0.32.9"
52
70
  },
53
71
  "devDependencies": {
72
+ "@strapi/pack-up": "4.15.3-alpha.0",
73
+ "@strapi/strapi": "4.15.3-alpha.0",
54
74
  "@testing-library/dom": "9.2.0",
55
75
  "@testing-library/react": "14.0.0",
56
76
  "@testing-library/user-event": "14.4.3",
@@ -61,10 +81,11 @@
61
81
  "styled-components": "5.3.3"
62
82
  },
63
83
  "peerDependencies": {
84
+ "@strapi/strapi": "^4.0.0",
64
85
  "react": "^17.0.0 || ^18.0.0",
65
86
  "react-dom": "^17.0.0 || ^18.0.0",
66
- "react-router-dom": "5.3.4",
67
- "styled-components": "5.3.3"
87
+ "react-router-dom": "^5.2.0",
88
+ "styled-components": "^5.2.1"
68
89
  },
69
90
  "engines": {
70
91
  "node": ">=18.0.0 <=20.x.x",
@@ -77,5 +98,5 @@
77
98
  "required": true,
78
99
  "kind": "plugin"
79
100
  },
80
- "gitHead": "b6c085052f108fcfe47d22972a664dfa85aa0358"
101
+ "gitHead": "81425b4b9803fd4df570e050c40dd984ebd28ac6"
81
102
  }
@@ -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/.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;