@strapi/plugin-users-permissions 0.0.0-next.d2c02ba7d58eb81b8c45c3d12076d6413ecde204 → 0.0.0-next.d482633e774699cc8d4e05531deaeb6001e791cd
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 +1 -2
- package/.eslintrc +14 -0
- package/admin/src/index.js +5 -15
- package/package.json +31 -11
- package/packup.config.ts +42 -0
- package/.eslintrc.js +0 -14
- package/strapi-admin.js +0 -3
package/.eslintignore
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
.eslintrc.js
|
|
1
|
+
dist
|
package/.eslintrc
ADDED
package/admin/src/index.js
CHANGED
|
@@ -33,9 +33,7 @@ export default {
|
|
|
33
33
|
id: 'roles',
|
|
34
34
|
to: `/settings/users-permissions/roles`,
|
|
35
35
|
async Component() {
|
|
36
|
-
const component = await import(
|
|
37
|
-
/* webpackChunkName: "users-roles-settings-page" */ './pages/Roles'
|
|
38
|
-
);
|
|
36
|
+
const component = await import('./pages/Roles');
|
|
39
37
|
|
|
40
38
|
return component;
|
|
41
39
|
},
|
|
@@ -49,9 +47,7 @@ export default {
|
|
|
49
47
|
id: 'providers',
|
|
50
48
|
to: `/settings/users-permissions/providers`,
|
|
51
49
|
async Component() {
|
|
52
|
-
const component = await import(
|
|
53
|
-
/* webpackChunkName: "users-providers-settings-page" */ './pages/Providers'
|
|
54
|
-
);
|
|
50
|
+
const component = await import('./pages/Providers');
|
|
55
51
|
|
|
56
52
|
return component;
|
|
57
53
|
},
|
|
@@ -65,9 +61,7 @@ export default {
|
|
|
65
61
|
id: 'email-templates',
|
|
66
62
|
to: `/settings/users-permissions/email-templates`,
|
|
67
63
|
async Component() {
|
|
68
|
-
const component = await import(
|
|
69
|
-
/* webpackChunkName: "users-email-settings-page" */ './pages/EmailTemplates'
|
|
70
|
-
);
|
|
64
|
+
const component = await import('./pages/EmailTemplates');
|
|
71
65
|
|
|
72
66
|
return component;
|
|
73
67
|
},
|
|
@@ -81,9 +75,7 @@ export default {
|
|
|
81
75
|
id: 'advanced-settings',
|
|
82
76
|
to: `/settings/users-permissions/advanced-settings`,
|
|
83
77
|
async Component() {
|
|
84
|
-
const component = await import(
|
|
85
|
-
/* webpackChunkName: "users-advanced-settings-page" */ './pages/AdvancedSettings'
|
|
86
|
-
);
|
|
78
|
+
const component = await import('./pages/AdvancedSettings');
|
|
87
79
|
|
|
88
80
|
return component;
|
|
89
81
|
},
|
|
@@ -101,9 +93,7 @@ export default {
|
|
|
101
93
|
async registerTrads({ locales }) {
|
|
102
94
|
const importedTrads = await Promise.all(
|
|
103
95
|
locales.map((locale) => {
|
|
104
|
-
return import(
|
|
105
|
-
/* webpackChunkName: "users-permissions-translation-[request]" */ `./translations/${locale}.json`
|
|
106
|
-
)
|
|
96
|
+
return import(`./translations/${locale}.json`)
|
|
107
97
|
.then(({ default: data }) => {
|
|
108
98
|
return {
|
|
109
99
|
data: prefixPluginTranslations(data, 'users-permissions'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-users-permissions",
|
|
3
|
-
"version": "0.0.0-next.
|
|
3
|
+
"version": "0.0.0-next.d482633e774699cc8d4e05531deaeb6001e791cd",
|
|
4
4
|
"description": "Protect your API with a full-authentication process based on JWT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -19,20 +19,37 @@
|
|
|
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": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
37
|
+
"build": "pack-up build",
|
|
38
|
+
"clean": "run -T rimraf dist",
|
|
39
|
+
"lint": "run -T eslint .",
|
|
25
40
|
"test:front": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js",
|
|
26
|
-
"test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
|
|
27
41
|
"test:front:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js",
|
|
42
|
+
"test:front:watch": "run -T cross-env IS_EE=true jest --config ./jest.config.front.js --watchAll",
|
|
28
43
|
"test:front:watch:ce": "run -T cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll",
|
|
29
|
-
"
|
|
44
|
+
"test:unit": "run -T jest",
|
|
45
|
+
"test:unit:watch": "run -T jest --watch",
|
|
46
|
+
"watch": "pack-up watch"
|
|
30
47
|
},
|
|
31
48
|
"dependencies": {
|
|
32
|
-
"@strapi/design-system": "1.
|
|
33
|
-
"@strapi/helper-plugin": "0.0.0-next.
|
|
34
|
-
"@strapi/icons": "1.
|
|
35
|
-
"@strapi/utils": "0.0.0-next.
|
|
49
|
+
"@strapi/design-system": "1.13.0",
|
|
50
|
+
"@strapi/helper-plugin": "0.0.0-next.d482633e774699cc8d4e05531deaeb6001e791cd",
|
|
51
|
+
"@strapi/icons": "1.13.0",
|
|
52
|
+
"@strapi/utils": "0.0.0-next.d482633e774699cc8d4e05531deaeb6001e791cd",
|
|
36
53
|
"bcryptjs": "2.4.3",
|
|
37
54
|
"formik": "2.4.0",
|
|
38
55
|
"grant-koa": "5.4.8",
|
|
@@ -51,6 +68,8 @@
|
|
|
51
68
|
"yup": "0.32.9"
|
|
52
69
|
},
|
|
53
70
|
"devDependencies": {
|
|
71
|
+
"@strapi/pack-up": "0.0.0-next.d482633e774699cc8d4e05531deaeb6001e791cd",
|
|
72
|
+
"@strapi/strapi": "0.0.0-next.d482633e774699cc8d4e05531deaeb6001e791cd",
|
|
54
73
|
"@testing-library/dom": "9.2.0",
|
|
55
74
|
"@testing-library/react": "14.0.0",
|
|
56
75
|
"@testing-library/user-event": "14.4.3",
|
|
@@ -61,13 +80,14 @@
|
|
|
61
80
|
"styled-components": "5.3.3"
|
|
62
81
|
},
|
|
63
82
|
"peerDependencies": {
|
|
83
|
+
"@strapi/strapi": "4.0.0",
|
|
64
84
|
"react": "^17.0.0 || ^18.0.0",
|
|
65
85
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
66
86
|
"react-router-dom": "5.3.4",
|
|
67
87
|
"styled-components": "5.3.3"
|
|
68
88
|
},
|
|
69
89
|
"engines": {
|
|
70
|
-
"node": ">=
|
|
90
|
+
"node": ">=18.0.0 <=20.x.x",
|
|
71
91
|
"npm": ">=6.0.0"
|
|
72
92
|
},
|
|
73
93
|
"strapi": {
|
|
@@ -77,5 +97,5 @@
|
|
|
77
97
|
"required": true,
|
|
78
98
|
"kind": "plugin"
|
|
79
99
|
},
|
|
80
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "d482633e774699cc8d4e05531deaeb6001e791cd"
|
|
81
101
|
}
|
package/packup.config.ts
ADDED
|
@@ -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
package/strapi-admin.js
DELETED