@strapi/generators 0.0.0-fd8e4c6bfa → 0.0.0-ffd0a215143bcafd0354d791533a57a084e53ffb
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/lib/files/js/plugin/admin/src/utils/axiosInstance.js +4 -2
- package/lib/files/ts/plugin/admin/src/components/Initializer/index.tsx +2 -3
- package/lib/files/ts/plugin/admin/src/components/PluginIcon/index.tsx +1 -1
- package/lib/files/ts/plugin/admin/src/utils/axiosInstance.ts +4 -2
- package/lib/templates/js/plugin-package.json.hbs +1 -1
- package/lib/templates/ts/plugin-package.json.hbs +4 -2
- package/package.json +5 -5
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import axios from 'axios';
|
|
6
|
-
import { auth } from '@strapi/helper-plugin';
|
|
6
|
+
import { auth, wrapAxiosInstance } from '@strapi/helper-plugin';
|
|
7
7
|
|
|
8
8
|
const instance = axios.create({
|
|
9
9
|
baseURL: process.env.STRAPI_ADMIN_BACKEND_URL,
|
|
@@ -37,4 +37,6 @@ instance.interceptors.response.use(
|
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
const wrapper = wrapAxiosInstance(instance);
|
|
41
|
+
|
|
42
|
+
export default wrapper;
|
|
@@ -11,9 +11,8 @@ type InitializerProps = {
|
|
|
11
11
|
setPlugin: (id: string) => void;
|
|
12
12
|
};
|
|
13
13
|
|
|
14
|
-
const Initializer
|
|
15
|
-
const ref = useRef
|
|
16
|
-
ref.current = setPlugin;
|
|
14
|
+
const Initializer = ({ setPlugin }: InitializerProps) => {
|
|
15
|
+
const ref = useRef(setPlugin);
|
|
17
16
|
|
|
18
17
|
useEffect(() => {
|
|
19
18
|
ref.current(pluginId);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import axios from 'axios';
|
|
6
|
-
import { auth } from '@strapi/helper-plugin';
|
|
6
|
+
import { auth, wrapAxiosInstance } from '@strapi/helper-plugin';
|
|
7
7
|
|
|
8
8
|
const instance = axios.create({
|
|
9
9
|
baseURL: process.env.STRAPI_ADMIN_BACKEND_URL,
|
|
@@ -37,4 +37,6 @@ instance.interceptors.response.use(
|
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
const wrapper = wrapAxiosInstance(instance);
|
|
41
|
+
|
|
42
|
+
export default wrapper;
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
"description": "Description of {{ pluginName }} plugin",
|
|
8
8
|
"kind": "plugin"
|
|
9
9
|
},
|
|
10
|
-
"dependencies": {
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@strapi/icons": "^1.3.1"
|
|
12
|
+
},
|
|
11
13
|
"devDependencies": {
|
|
12
14
|
"typescript": "4.6.3"
|
|
13
15
|
},
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
}
|
|
21
23
|
],
|
|
22
24
|
"engines": {
|
|
23
|
-
"node": ">=14.19.1 <=
|
|
25
|
+
"node": ">=14.19.1 <=18.x.x",
|
|
24
26
|
"npm": ">=6.0.0"
|
|
25
27
|
},
|
|
26
28
|
"scripts": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/generators",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-ffd0a215143bcafd0354d791533a57a084e53ffb",
|
|
4
4
|
"description": "Interactive API generator.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"main": "lib/index.js",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@sindresorhus/slugify": "1.1.0",
|
|
33
|
-
"@strapi/typescript-utils": "0.0.0-
|
|
34
|
-
"@strapi/utils": "0.0.0-
|
|
33
|
+
"@strapi/typescript-utils": "0.0.0-ffd0a215143bcafd0354d791533a57a084e53ffb",
|
|
34
|
+
"@strapi/utils": "0.0.0-ffd0a215143bcafd0354d791533a57a084e53ffb",
|
|
35
35
|
"chalk": "4.1.2",
|
|
36
36
|
"fs-extra": "10.0.0",
|
|
37
37
|
"node-plop": "0.26.3",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"pluralize": "8.0.0"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
|
-
"node": ">=14.19.1 <=
|
|
42
|
+
"node": ">=14.19.1 <=18.x.x",
|
|
43
43
|
"npm": ">=6.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "ffd0a215143bcafd0354d791533a57a084e53ffb"
|
|
46
46
|
}
|