Skip to content

Commit daae9f8

Browse files
authored
Merge pull request #8 from JournalOfTrialAndError/updated-strapi
2 parents f56f4e1 + 22cbccb commit daae9f8

File tree

8 files changed

+2509
-1479
lines changed

8 files changed

+2509
-1479
lines changed

backend/config/middlewares.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,31 @@ module.exports = [
1313
"blob:",
1414
"res.cloudinary.com",
1515
"upload.wikimedia.org",
16+
"s3.amazonaws.com",
17+
"stapi.io",
1618
],
1719
"media-src": [
1820
"'self'",
1921
"data:",
2022
"blob:",
2123
"res.cloudinary.com",
2224
"upload.wikimedia.org",
25+
"s3.amazonaws.com",
26+
"stapi.io",
27+
],
28+
"script-src": [
29+
"'self'",
30+
"'unsafe-inline'",
31+
"cdn.jsdelivr.net",
32+
"editor.unlayer.com",
33+
],
34+
"frame-src": ["'self'", "editor.unlayer.com"],
35+
"script-src-attr": [
36+
"'self'",
37+
"'unsafe-inline'",
38+
"cdn.jsdelivr.net",
39+
"editor.unilayer.com",
2340
],
24-
"script-src": ["'self'", "'unsafe-inline'", "cdn.jsdelivr.net"],
25-
"script-src-attr": ["'self'", "'unsafe-inline'", "cdn.jsdelivr.net"],
2641
upgradeInsecureRequests: null,
2742
},
2843
},
@@ -33,6 +48,7 @@ module.exports = [
3348
"strapi::logger",
3449
"strapi::query",
3550
"strapi::body",
51+
"strapi::session",
3652
{
3753
name: "strapi::favicon",
3854
config: {

backend/config/plugins.js

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,98 @@ module.exports = ({ env }) => ({
1313
},
1414
},
1515
},
16+
// "rest-cache": {
17+
// config: {
18+
// provider: {
19+
// name: "memory",
20+
// options: {
21+
// max: 32767,
22+
// maxAge: 3600,
23+
// },
24+
// },
25+
// strategy: {
26+
// contentTypes: [
27+
// // list of Content-Types UID to cache
28+
// "api::category.category",
29+
// "api::content-content-interface.content-content-interface",
30+
// "api::content-update-interface.content-update-interface",
31+
// "api::article.article",
32+
// "api::global.global",
33+
// "api::homepage.homepage",
34+
// ],
35+
// },
36+
// },
37+
// },
38+
"email-designer": {
39+
enabled: true,
40+
41+
// ⬇︎ Add the config property
42+
config: {
43+
editor: {
44+
// optional - if you have a premium unlayer account
45+
//projectId: [UNLAYER_PROJECT_ID],
46+
47+
tools: {
48+
heading: {
49+
properties: {
50+
text: {
51+
value: "This is the new default text!",
52+
},
53+
},
54+
},
55+
},
56+
options: {
57+
features: {
58+
colorPicker: {
59+
presets: ["#002642", "#feaf0c", "#697689", "#37D67A"],
60+
},
61+
},
62+
fonts: {
63+
showDefaultFonts: false,
64+
/*
65+
* If you want use a custom font you need a premium unlayer account and pass a projectId number :-(
66+
*/
67+
customFonts: [
68+
{
69+
label: "Overpass",
70+
value: "'Overpass', sans-serif",
71+
url: "https://fonts.googleapis.com/css?family=Overpass",
72+
},
73+
{
74+
label: "Open Sans",
75+
value: "'Open Sans', Tahoma, Verdana, sans-serif",
76+
url: "https://fonts.googleapis.com/css?family=Open+Sans",
77+
},
78+
// ...
79+
],
80+
},
81+
mergeTags: [
82+
{
83+
name: "Email",
84+
value: "{{= USER.username }}",
85+
sample: "john@doe.com",
86+
},
87+
// ...
88+
],
89+
},
90+
appearance: {
91+
// theme: "dark",
92+
// panels: {
93+
// tools: {
94+
// dock: "left",
95+
// },
96+
// },
97+
},
98+
},
99+
},
100+
},
101+
"entity-notes": {
102+
enabled: true,
103+
},
104+
scheduler: {
105+
enabled: true,
106+
config: {
107+
model: "scheduler",
108+
},
109+
},
16110
});

backend/config/server.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
const cronTasks = require("@webbio/strapi-plugin-scheduler/cron-task");
12
module.exports = ({ env }) => ({
23
host: env("HOST", "localhost"),
34
port: env.int("PORT", 1337),
5+
app: {
6+
keys: env.array("APP_KEYS", env("STRAPI_APP_KEYS", ["secret", "key"])),
7+
},
8+
cron: {
9+
enabled: true,
10+
tasks: cronTasks,
11+
},
412
});

backend/package.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
22
"dependencies": {
3-
"@strapi/plugin-graphql": "^4.0.0",
4-
"@strapi/plugin-i18n": "4.0.2",
5-
"@strapi/plugin-users-permissions": "4.0.2",
6-
"@strapi/provider-upload-cloudinary": "^4.0.4",
7-
"@strapi/strapi": "4.0.4",
3+
"@strapi/icons": "^0.0.1-alpha.4",
4+
"@strapi/plugin-graphql": "^4.2.0-beta.0",
5+
"@strapi/plugin-i18n": "^4.2.0-beta.0",
6+
"@strapi/plugin-users-permissions": "^4.2.0-beta.0",
7+
"@strapi/provider-upload-cloudinary": "^4.2.0-beta.0",
8+
"@strapi/strapi": "^4.2.0-beta.0",
89
"@types/node-fetch": "2",
10+
"@webbio/strapi-plugin-scheduler": "^0.1.0",
911
"@yermangderrff/strapi-to-typescript": "^2.0.15",
1012
"dotenv": "^11.0.0",
1113
"forever": "^4.0.2",
14+
"formik": "^2.2.6",
15+
"immer": "9.0.6",
1216
"jsonwebtoken": "^8.5.1",
1317
"lodash.set": "^4.3.2",
1418
"mime-types": "^2.1.27",
@@ -20,10 +24,16 @@
2024
"patch-package": "^6.4.7",
2125
"pg": "^8.7.1",
2226
"postinstall-postinstall": "^2.1.0",
27+
"qs": "6.10.1",
28+
"react-router-dom": "^5.2.0",
29+
"react-select": "^4.0.2",
2330
"slugify": "^1.6.5",
2431
"sqlite3": "5.0.2",
25-
"strapi-plugin-ckeditor5": "^2.0.0-rc.2",
32+
"strapi-plugin-email-designer": "^2.1.0",
33+
"strapi-plugin-notes": "^1.0.0",
34+
"strapi-plugin-react-editorjs": "^2.0.0",
2635
"strapi-sdk-js": "^2.1.3",
36+
"styled-components": "^5.2.1",
2737
"wait-on": "^6.0.0",
2838
"webflow-api": "https://github.com/webflow/js-webflow-api"
2939
},

backend/patches/@strapi+strapi+4.0.4 copy.patch

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)