Skip to content

Commit dbe7d86

Browse files
authored
Merge pull request #204 from pluginpal/feature/strapi-5
Feature/strapi 5
2 parents 212c076 + a70cb10 commit dbe7d86

File tree

317 files changed

+14533
-18407
lines changed

Some content is hidden

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

317 files changed

+14533
-18407
lines changed

.changeset/every-lies-glow.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"webtools-addon-sitemap": major
3+
"strapi-plugin-webtools": major
4+
---
5+
6+
Strapi 5 support

.changeset/pre.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"mode": "pre",
2+
"mode": "exit",
33
"tag": "beta",
44
"initialVersions": {
55
"@pluginpal/webtools-addon-menus": "0.0.0",

.eslintrc.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,21 @@ module.exports = {
3434
"project": [path.join(__dirname, './tsconfig.jest.json')],
3535
},
3636
"rules": {
37-
"@typescript-eslint/await-thenable": "off"
37+
"@typescript-eslint/await-thenable": "off",
38+
"import/no-relative-packages": "off",
3839
}
3940
}
4041
],
4142
"rules": {
43+
"import/no-unresolved": [2, {
44+
"ignore": [
45+
"@strapi/strapi/admin",
46+
"@strapi/icons/symbols",
47+
"@strapi/admin/strapi-admin"
48+
]
49+
}],
4250
"import/prefer-default-export": "off",
4351
"arrow-body-style": "off",
44-
"@typescript-eslint/unbound-method": "off"
52+
"@typescript-eslint/unbound-method": "off",
4553
}
4654
}

.github/workflows/deploy-test-server.yml

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,73 +8,73 @@ on:
88
- develop
99

1010
jobs:
11-
# preflight-checks:
12-
# name: Preflight checks
13-
# runs-on: ubuntu-latest
14-
# steps:
15-
# - name: Check if there are config-sync changes on production
16-
# uses: appleboy/ssh-action@v0.1.10
17-
# with:
18-
# host: ${{ secrets.SSH_HOST }}
19-
# username: ${{ secrets.SSH_CI_USERNAME }}
20-
# password: ${{ secrets.SSH_CI_PASSWORD }}
21-
# script_stop: true
22-
# script: dokku run strapi ../node_modules/.bin/config-sync diff
11+
preflight-checks:
12+
name: Preflight checks
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check if there are config-sync changes on production
16+
uses: appleboy/ssh-action@v0.1.10
17+
with:
18+
host: ${{ secrets.SSH_HOST }}
19+
username: ${{ secrets.SSH_CI_USERNAME }}
20+
password: ${{ secrets.SSH_CI_PASSWORD }}
21+
script_stop: true
22+
script: dokku run strapi ../node_modules/.bin/config-sync diff
2323
deploy:
2424
name: Deploy
25-
# needs: [preflight-checks]
25+
needs: [preflight-checks]
2626
runs-on: ubuntu-latest
2727
environment:
2828
name: Test
2929
url: https://test.pluginpal.io
30-
# steps:
31-
# - name: Checkout repository
32-
# uses: actions/checkout@v2
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v2
3333

34-
# - name: Set up Docker
35-
# uses: actions/setup-node@v3
36-
# with:
37-
# node-version: 18
38-
# cache: 'yarn'
34+
- name: Set up Docker
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: 18
38+
cache: 'yarn'
3939

40-
# - name: Install plugin dependencies
41-
# run: yarn install
40+
- name: Install plugin dependencies
41+
run: yarn install
4242

43-
# - name: Build the packages
44-
# run: yarn run build
43+
- name: Build the packages
44+
run: yarn run build
4545

46-
# - name: Install de playground dependencies
47-
# run: yarn playground:install
46+
- name: Install de playground dependencies
47+
run: yarn playground:install
4848

49-
# - name: Build a Docker image of the playground
50-
# run: |
51-
# cd playground
52-
# docker build \
53-
# --build-arg PUBLIC_URL=${{ secrets.TEST_URL }} \
54-
# -t strapi-playground:latest .
55-
# docker save -o strapi-playground-latest.tar strapi-playground:latest
49+
- name: Build a Docker image of the playground
50+
run: |
51+
cd playground
52+
docker build \
53+
--build-arg PUBLIC_URL=${{ secrets.TEST_URL }} \
54+
-t strapi-playground:latest .
55+
docker save -o strapi-playground-latest.tar strapi-playground:latest
5656
57-
# - name: Transfer the Docker image to the Dokku server
58-
# uses: appleboy/scp-action@v0.1.3
59-
# with:
60-
# host: ${{ secrets.SSH_HOST }}
61-
# username: ${{ secrets.SSH_CI_USERNAME }}
62-
# password: ${{ secrets.SSH_CI_PASSWORD }}
63-
# source: playground/strapi-playground-latest.tar
64-
# target: /var/lib/dokku/data/storage/strapi/docker-images
57+
- name: Transfer the Docker image to the Dokku server
58+
uses: appleboy/scp-action@v0.1.3
59+
with:
60+
host: ${{ secrets.SSH_HOST }}
61+
username: ${{ secrets.SSH_CI_USERNAME }}
62+
password: ${{ secrets.SSH_CI_PASSWORD }}
63+
source: playground/strapi-playground-latest.tar
64+
target: /var/lib/dokku/data/storage/strapi/docker-images
6565

66-
# - name: Deploy the Dokku app based on the Docker image
67-
# uses: appleboy/ssh-action@v0.1.10
68-
# with:
69-
# host: ${{ secrets.SSH_HOST }}
70-
# username: ${{ secrets.SSH_CI_USERNAME }}
71-
# password: ${{ secrets.SSH_CI_PASSWORD }}
72-
# script_stop: true
73-
# script: |
74-
# sudo docker load -i /var/lib/dokku/data/storage/strapi/docker-images/playground/strapi-playground-latest.tar
75-
# STRAPI_LATEST_IMAGE=$(sudo docker images --format "{{.ID}}" strapi-playground:latest)
76-
# sudo docker tag strapi-playground:latest strapi-playground:$STRAPI_LATEST_IMAGE
77-
# dokku git:from-image strapi strapi-playground:$STRAPI_LATEST_IMAGE
78-
# sudo docker system prune --all --force
79-
# sudo rm -rf /var/lib/dokku/data/storage/strapi/docker-images/playground/strapi-playground-latest.tar
66+
- name: Deploy the Dokku app based on the Docker image
67+
uses: appleboy/ssh-action@v0.1.10
68+
with:
69+
host: ${{ secrets.SSH_HOST }}
70+
username: ${{ secrets.SSH_CI_USERNAME }}
71+
password: ${{ secrets.SSH_CI_PASSWORD }}
72+
script_stop: true
73+
script: |
74+
sudo docker load -i /var/lib/dokku/data/storage/strapi/docker-images/playground/strapi-playground-latest.tar
75+
STRAPI_LATEST_IMAGE=$(sudo docker images --format "{{.ID}}" strapi-playground:latest)
76+
sudo docker tag strapi-playground:latest strapi-playground:$STRAPI_LATEST_IMAGE
77+
dokku git:from-image strapi strapi-playground:$STRAPI_LATEST_IMAGE
78+
sudo docker system prune --all --force
79+
sudo rm -rf /var/lib/dokku/data/storage/strapi/docker-images/playground/strapi-playground-latest.tar
8080

.github/workflows/tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: yarn test:unit
6969
- name: Run integration tests
7070
run: yarn test:integration
71-
- name: Run end-to-end tests
71+
- name: Run Cypress tests
7272
uses: cypress-io/github-action@v6
7373
with:
7474
start: yarn playground:start
@@ -78,6 +78,12 @@ jobs:
7878
name: cypress-screenshots
7979
path: cypress/screenshots
8080
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
81+
- uses: actions/upload-artifact@v4
82+
if: failure()
83+
with:
84+
name: cypress-videos
85+
path: cypress/videos
86+
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
8187
- name: Upload coverage to Codecov
8288
uses: codecov/codecov-action@v2
8389
with:

MIGRATION.md

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

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<a href="https://docs.pluginpal.io/webtools">Read the documentation</a>
77

88
<p>
9-
<a href="https://www.npmjs.org/package/@pluginpal/webtools-core">
10-
<img src="https://img.shields.io/npm/v/@pluginpal/webtools-core/latest.svg" alt="NPM Version" />
9+
<a href="https://www.npmjs.org/package/strapi-plugin-webtools">
10+
<img src="https://img.shields.io/npm/v/strapi-plugin-webtools/latest.svg" alt="NPM Version" />
1111
</a>
12-
<a href="https://www.npmjs.org/package/@pluginpal/webtools-core">
13-
<img src="https://img.shields.io/npm/dm/@pluginpal/webtools-core" alt="Monthly download on NPM" />
12+
<a href="https://www.npmjs.org/package/strapi-plugin-webtools">
13+
<img src="https://img.shields.io/npm/dm/strapi-plugin-webtools" alt="Monthly download on NPM" />
1414
</a>
1515
<a href="https://codecov.io/gh/pluginpal/strapi-webtools">
1616
<img src="https://img.shields.io/github/actions/workflow/status/pluginpal/strapi-webtools/tests.yml?branch=master" alt="CI build status" />
@@ -22,9 +22,6 @@
2222

2323
</div>
2424

25-
> [!IMPORTANT]
26-
> The Webtools suite is still in BETA
27-
2825
## ✨ Features
2926

3027
- **Unique URLs** Every page will get their own unique path
@@ -39,10 +36,10 @@
3936

4037
```bash
4138
# using yarn
42-
yarn add @pluginpal/webtools-core
39+
yarn add strapi-plugin-webtools
4340

4441
# using npm
45-
npm install @pluginpal/webtools-core --save
42+
npm install strapi-plugin-webtools --save
4643
```
4744

4845
After successful installation you have to rebuild the admin UI so it'll include this plugin. To rebuild and restart Strapi run:
@@ -72,7 +69,7 @@ Webtools can be extended by installing addons that hook into the core Webtools f
7269
## 🔗 Links
7370

7471
- [PluginPal marketplace](https://www.pluginpal.io/plugin/webtools)
75-
- [NPM package](https://www.npmjs.com/package/@pluginpal/webtools-core)
72+
- [NPM package](https://www.npmjs.com/package/strapi-plugin-webtools)
7673
- [GitHub repository](https://github.com/pluginpal/strapi-webtools)
7774
- [Strapi marketplace](https://market.strapi.io/plugins/@pluginpal-webtools-core)
7875

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { presets: ['@babel/preset-env'] };

cypress.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ module.exports = defineConfig({
88
// implement node event listeners here.
99
require('cypress-terminal-report/src/installLogsPrinter')(on);
1010
},
11-
video: false,
11+
video: true,
1212
defaultCommandTimeout: 10000,
13+
requestTimeout: 10000,
1314
},
1415
});

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
preset: 'ts-jest',
33
testEnvironment: 'node',
4-
testMatch: ['**/__tests__/?(*.)+(spec|test).ts'],
4+
testMatch: ['**/__tests__/?(*.)+(spec|test).(ts|js)'],
55
// transform: {},
66
// globalSetup: './playground/__tests__/setup-strapi.ts',
77
// setupFilesAfterEnv: ['./playground/__tests__/setup-strapi.ts'],

0 commit comments

Comments
 (0)