Skip to content

Commit 4b95db9

Browse files
Update libraries to latest version and refactor accordingly
1 parent d05d830 commit 4b95db9

Some content is hidden

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

78 files changed

+24788
-20823
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.php]
12+
indent_size = 4
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Server
22
server/web/app/plugins/*
33
!server/web/app/plugins/.gitkeep
4+
server/web/app/themes/*
5+
!server/web/app/themes/.gitkeep
46
server/web/app/mu-plugins/*/
57
server/web/app/upgrade
68
server/web/app/uploads/*
@@ -21,4 +23,26 @@ wp-cli.local.yml
2123
.pnp.js
2224

2325
# Logs
26+
logs
2427
*.log
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
pnpm-debug.log*
32+
lerna-debug.log*
33+
34+
node_modules
35+
dist
36+
dist-ssr
37+
*.local
38+
39+
# Editor directories and files
40+
.vscode/*
41+
!.vscode/extensions.json
42+
.idea
43+
.DS_Store
44+
*.suo
45+
*.ntvs*
46+
*.njsproj
47+
*.sln
48+
*.sw?

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Install dependencies
99

1010
```sh
1111
composer install
12-
npm install
12+
pnpm install
1313
```
1414

1515
Create the database and fill details in `.env` file
@@ -21,15 +21,15 @@ cp .env.example .env
2121
Setup server (This sets up the wordpress database with the expected configuration)
2222

2323
```sh
24-
./setup-server.sh
24+
./bin/setup-server.sh
2525
```
2626

2727
## Start server & client
2828

2929
Start server and react app
3030

3131
```sh
32-
npm start
32+
pnpm start
3333
```
3434

3535
## Notes

codegen.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { CodegenConfig } from '@graphql-codegen/cli'
2+
3+
const config: CodegenConfig = {
4+
schema: 'http://localhost:3001/wp/graphql',
5+
documents: ['src/**/*.ts*'],
6+
generates: {
7+
'src/GraphQl/Generated/types.ts': {
8+
plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo'],
9+
config: {
10+
avoidOptionals: true
11+
}
12+
}
13+
}
14+
}
15+
export default config

codegen.yml

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

composer.json

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,36 @@
1414
"package": {
1515
"name": "funkhaus/wp-graphql-cors",
1616
"type": "wordpress-plugin",
17-
"version": "1.1.0",
17+
"version": "2.1.1",
1818
"dist": {
19-
"url": "https://github.com/funkhaus/wp-graphql-cors/archive/v1.1.0.zip",
19+
"url": "https://github.com/funkhaus/wp-graphql-cors/archive/2.1.1.zip",
2020
"type": "zip"
2121
},
2222
"source": {
2323
"url": "https://github.com/funkhaus/wp-graphql-cors",
2424
"type": "git",
25-
"reference": "tree/v1.1.0"
25+
"reference": "2.1.1"
2626
}
2727
}
2828
}
2929
],
3030
"require": {
31-
"php": ">=7.2",
32-
"composer/installers": "^1.8",
33-
"funkhaus/wp-graphql-cors": "^1.1",
31+
"php": ">=8.3",
32+
"composer/installers": "^2.2",
3433
"oscarotero/env": "^2.1",
34+
"wpackagist-theme/twentytwentyfive": "^1.0",
35+
"funkhaus/wp-graphql-cors": "^2.1",
3536
"roots/bedrock-autoloader": "^1.0",
36-
"roots/wordpress": "5.5",
37+
"roots/bedrock-disallow-indexing": "^2.0",
38+
"roots/wordpress": "6.7",
3739
"roots/wp-config": "1.0.0",
38-
"roots/wp-password-bcrypt": "1.0.0",
40+
"roots/wp-password-bcrypt": "1.2.0",
3941
"valu/wp-graphql-offset-pagination": "^0.2.0",
40-
"vlucas/phpdotenv": "^4.1",
41-
"wp-graphql/wp-graphql": "^0.12.1",
42-
"wp-graphql/wp-graphql-acf": "^0.3.5",
43-
"wp-graphql/wp-graphql-jwt-authentication": "^0.4.1",
44-
"wpackagist-plugin/advanced-custom-fields": "^5.9"
42+
"vlucas/phpdotenv": "^5.5",
43+
"wp-graphql/wp-graphql": "^1.0",
44+
"wp-graphql/wpgraphql-acf": "^2.4",
45+
"wp-graphql/wp-graphql-jwt-authentication": "^0.7.0",
46+
"wpackagist-plugin/advanced-custom-fields": "^6.0"
4547
},
4648
"require-dev": {
4749
"roave/security-advisories": "dev-master",
@@ -52,7 +54,11 @@
5254
"sort-packages": true,
5355
"optimize-autoloader": true,
5456
"preferred-install": "dist",
55-
"vendor-dir": "server/vendor"
57+
"vendor-dir": "server/vendor",
58+
"allow-plugins": {
59+
"composer/installers": true,
60+
"roots/wordpress-core-installer": true
61+
}
5662
},
5763
"minimum-stability": "dev",
5864
"prefer-stable": true,
@@ -64,7 +70,7 @@
6470
"valu/wp-graphql-offset-pagination",
6571
"wp-graphql/wp-graphql",
6672
"wp-graphql/wp-graphql-jwt-authentication",
67-
"wp-graphql/wp-graphql-acf",
73+
"wp-graphql/wpgraphql-acf",
6874
"wpackagist-plugin/advanced-custom-fields"
6975
],
7076
"server/web/app/plugins/{$name}/": ["type:wordpress-plugin"],

0 commit comments

Comments
 (0)