Skip to content

Commit f7f2b0c

Browse files
authored
🔀 Merge pull request #19 from chartbrew/v5-migration
Strapi V5 migration
2 parents 9827b7f + ab37bf1 commit f7f2b0c

64 files changed

Lines changed: 17942 additions & 18030 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
.cache
2-
build
3-
**/node_modules/**
1+
dist

.gitignore

Lines changed: 138 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,138 @@
1-
**node_modules**
2-
*.DS_Store
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
############################
4+
# OS X
5+
############################
6+
7+
.DS_Store
8+
.AppleDouble
9+
.LSOverride
10+
Icon
11+
.Spotlight-V100
12+
.Trashes
13+
._*
14+
15+
16+
############################
17+
# Linux
18+
############################
19+
20+
*~
21+
22+
23+
############################
24+
# Windows
25+
############################
26+
27+
Thumbs.db
28+
ehthumbs.db
29+
Desktop.ini
30+
$RECYCLE.BIN/
31+
*.cab
32+
*.msi
33+
*.msm
34+
*.msp
35+
36+
37+
############################
38+
# Packages
39+
############################
40+
41+
*.7z
42+
*.csv
43+
*.dat
44+
*.dmg
45+
*.gz
46+
*.iso
47+
*.jar
48+
*.rar
49+
*.tar
50+
*.zip
51+
*.com
52+
*.class
53+
*.dll
54+
*.exe
55+
*.o
56+
*.seed
57+
*.so
58+
*.swo
59+
*.swp
60+
*.swn
61+
*.swm
62+
*.out
63+
*.pid
64+
65+
66+
############################
67+
# Logs and databases
68+
############################
69+
70+
.tmp
71+
*.log
72+
*.sql
73+
*.sqlite
74+
*.sqlite3
75+
76+
77+
############################
78+
# Misc.
79+
############################
80+
81+
*#
82+
ssl
83+
.idea
84+
nbproject
85+
.tsbuildinfo
86+
.eslintcache
87+
.env
88+
89+
90+
############################
91+
# Strapi
92+
############################
93+
94+
public/uploads/*
95+
!public/uploads/.gitkeep
96+
97+
98+
############################
99+
# Build
100+
############################
101+
102+
dist
103+
build
104+
105+
106+
############################
107+
# Node.js
108+
############################
109+
110+
lib-cov
111+
lcov.info
112+
pids
113+
logs
114+
results
115+
node_modules
116+
.node_history
117+
118+
119+
############################
120+
# Package managers
121+
############################
122+
123+
.yarn/*
124+
!.yarn/cache
125+
!.yarn/unplugged
126+
!.yarn/patches
127+
!.yarn/releases
128+
!.yarn/sdks
129+
!.yarn/versions
130+
.pnp.*
131+
yarn-error.log
132+
133+
134+
############################
135+
# Tests
136+
############################
137+
138+
coverage

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Chartbrew
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@
1414

1515
<p align="center">
1616
<strong>
17-
This is the official <a href="https://chartbrew.com">Chartbrew</a> plugin for <a href="https://strapi.io">Strapi v4</a>. Chartbrew is an open-source web application that can connect directly to Strapi and other data sources and use the data to create beautiful charts. It features a chart builder, editable dashboards, embedable charts, query & requests editor, and team capabilities.
17+
This is the official <a href="https://chartbrew.com">Chartbrew</a> plugin for <a href="https://strapi.io">Strapi</a>. Chartbrew is an open-source web application that can connect directly to Strapi and other data sources and use the data to create beautiful charts. It features a chart builder, editable dashboards, embedable charts, query & requests editor, and team capabilities.
1818
</strong>
1919
</p>
2020

21+
> **Note**
22+
> This plugin is compatible with Strapi v5.
23+
>
24+
> If you are using Strapi v4, check out the [strapi-v4 branch](https://github.com/chartbrew/strapi-plugin-chartbrew/tree/strapi-v4) of this repository.
25+
2126
<br />
2227

2328
![](https://raw.githubusercontent.com/chartbrew/strapi-plugin-chartbrew/master/admin/src/assets/strapi-chartbrew-dashboard.jpg)
@@ -156,4 +161,4 @@ You can create charts directly from your Strapi dashboards. To do this, you will
156161

157162
## ⚠️ Dependencies
158163

159-
* Strapi v4+
164+
* Strapi v5+

admin/jsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es6",
4+
"jsx": "react",
5+
"module": "esnext",
6+
"allowSyntheticDefaultImports": true,
7+
"esModuleInterop": true
8+
},
9+
"include": ["./src/**/*.js", "./src/**/*.jsx"]
10+
}

admin/src/actions/project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getSettings } from './store';
22
import axiosInstance from '../utils/axiosInstance';
3-
import pluginId from '../pluginId';
3+
import { PLUGIN_ID } from '../pluginId';
44

55
export async function getProjects() {
66
const { host, token } = await getSettings();
@@ -117,7 +117,7 @@ export async function getProjectConnections(projectId) {
117117
}
118118

119119
export async function generateTemplate(data) {
120-
return axiosInstance.post(`/${pluginId}/generate`, data)
120+
return axiosInstance.post(`/${PLUGIN_ID}/generate`, data)
121121
.then((project) => {
122122
return project.data;
123123
})

admin/src/actions/store.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import axiosInstance from '../utils/axiosInstance';
2-
import pluginId from '../pluginId';
2+
import { PLUGIN_ID } from '../pluginId';
33

44
export async function getSettings() {
5-
const settings = await axiosInstance.get(`/${pluginId}/settings`);
5+
const settings = await axiosInstance.get(`/${PLUGIN_ID}/settings`);
66

77
return settings.data;
88
}
99

1010
export async function setSettings(data) {
11-
const response = await axiosInstance.post(`/${pluginId}/settings`, {
11+
const response = await axiosInstance.post(`/${PLUGIN_ID}/settings`, {
1212
body: data,
1313
});
1414

0 commit comments

Comments
 (0)