-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pick all new changes #353
Pick all new changes #353
Changes from all commits
8d3d5ca
2a0533c
aeeb012
edf1def
bb26208
7b08d17
bc474cc
42a11dd
714bf3d
e519e69
2e3f30a
50b5c76
37a3a7b
860ed43
8a563ae
0285401
8e385c6
3c8200a
d58867b
b405289
b1b03f0
7eb2d54
2ea2f53
6deb405
359930d
6f6f089
1d895a3
e5f1810
ff52875
947f76a
c36f52c
dcb6011
8363c12
cce07c9
cc8675f
96d42d6
9f00b52
ba04bc8
49ff10a
0c1b404
3bce2bc
02f9eaa
ccc729b
7f4f69c
a8c2af0
b12783f
82f611f
6bdecc0
699688d
fd5462f
f4ccf5b
ed3dadd
ab2d721
3797122
8504fa5
8fcfcf1
2a9ae33
ae8a2af
c7a38a7
3551bed
3c6af46
b9c7f1f
6fcdaed
a4a6de6
039295b
6adf25e
1f8c593
6aefd64
ae45bc5
31ca9db
5f8d8b6
077c20a
be01da9
6d1a891
8a948d1
9b71088
670c560
9976b9a
190c511
9787f79
f92c1f7
b9f621d
fc9fc8b
47f86ca
f897a6e
0c1607b
e51e7c2
6faa3c6
734ecdf
54d6598
7005634
7622a15
e66862d
342a2f0
ce566b0
bebd65e
70681fa
c4ae650
4cf323c
e04fef0
c9b2b1c
aeca97d
2d8d522
f856bc5
0dca522
bfd8279
dfa45a5
78d4b62
bc51c9f
29b47fb
6f2c030
5044e4e
033eeef
767ca3f
f589032
c41c010
83627a5
ffaa523
33ddfa1
e2670a5
6e8e3ca
b8b8f7b
3decbe3
2895a1f
898648d
3008be0
bd98795
0929e60
16c42de
c3a189d
659b089
7bd9a5c
f2677ee
e99faef
d414996
ddd763c
2bceab9
af288d3
e18722c
5e6cd63
8adee6a
e6354f6
8a093b2
9947c13
1f14154
6074e18
f475364
7edddf8
38e0c08
4b01819
348aa26
111c97c
06ea7dd
c6b78c3
214ec56
b7c6a8f
f33db2c
3a71f43
e95b776
2c64bca
9b0828b
4f33758
155d994
2a85497
d8feab7
d5f4853
a6da82e
9cd3b95
3b97408
e1020d5
df41129
95a5598
f2fff9f
60ea5b9
ecab69f
b720d45
d9988c3
badf004
3176893
962b689
57cb655
44515c9
1afdf5b
47ccc70
1d94117
17a6048
202bd02
81e6e56
af6d749
a7fb8c6
9a83884
65840cf
ec2e917
f1917a5
6dd9a95
4cff9f5
52d2ea7
d210aca
2905567
43342a7
fb27c56
369a4ae
145ae51
39c7fb3
f8ed865
eed9736
cc48883
38d1a58
09a9550
62f3f72
dad3b6d
2896971
611f07b
37d1ca0
c5cffc1
0f11227
47b895d
e4265e2
34dcd5c
ae18411
e7c2b98
fd8445d
c728d79
2f35f00
25d858e
9dc6a43
ffa2c08
b360187
f5c07e0
b38ec08
38e2621
f8ae3e1
a99a8ff
18e5022
fa564bf
7a77b2d
9dde8f0
9d9e774
7f67f8b
3be311d
4910354
6f56bab
f081d16
bcb10e3
443d89b
5bdf626
f60e363
295253c
0633d8d
9bb29a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"extends": "zardoy", | ||
"ignorePatterns": [ | ||
"!*.js" | ||
], | ||
"rules": { | ||
"object-curly-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"semi": [ | ||
"error", | ||
"never" | ||
], | ||
"comma-dangle": [ | ||
"error", | ||
// todo maybe "always-multiline"? | ||
"only-multiline" | ||
], | ||
"indent": [ | ||
"error", | ||
2, | ||
{ | ||
"SwitchCase": 1, | ||
"ignoredNodes": [ | ||
"TemplateLiteral" | ||
] | ||
} | ||
], | ||
"quotes": [ | ||
"error", | ||
"single", | ||
{ | ||
"allowTemplateLiterals": true | ||
} | ||
], | ||
// perf | ||
"import/no-deprecated": "off", | ||
// --- | ||
"@typescript-eslint/prefer-nullish-coalescing": "off", | ||
"@typescript-eslint/naming-convention": "off", | ||
"prefer-template": "off", | ||
// intentional: improve readability in some cases | ||
"no-else-return": "off", | ||
"@typescript-eslint/padding-line-between-statements": "off", | ||
"arrow-body-style": "off", | ||
"unicorn/prefer-ternary": "off", | ||
"unicorn/switch-case-braces": "off", | ||
"@typescript-eslint/consistent-type-definitions": "off", | ||
"unicorn/explicit-length-check": "off", | ||
"unicorn/prefer-dom-node-append": "off", | ||
"typescript-eslint/no-confusing-void-expression": "off", | ||
"unicorn/no-lonely-if": "off", | ||
"no-multi-assign": "off", | ||
"sonarjs/no-duplicate-string": "off", | ||
"new-cap": "off", | ||
"unicorn/consistent-destructuring": "off", | ||
"unicorn/no-await-expression-member": "off", | ||
"unicorn/prefer-add-event-listener": "off", | ||
"unicorn/prefer-top-level-await": "off", | ||
"default-case": "off", | ||
// I guess it would better to fix | ||
"node/prefer-global/buffer": "off", | ||
"unicorn/prefer-optional-catch-binding": "off", // still useful for debugging | ||
"no-alert": "off", // todo once replaced with ui, enable | ||
"@typescript-eslint/restrict-plus-operands": "off", | ||
// --- | ||
"@typescript-eslint/no-throw-literal": "off", // disabling because of "rule expansion" | ||
"no-empty-function": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"import/no-extraneous-dependencies": "off", | ||
"@typescript-eslint/ban-types": "off", | ||
"unicorn/prefer-query-selector": "off", | ||
"@typescript-eslint/dot-notation": "off", // trick prop type-checking | ||
"@typescript-eslint/consistent-type-imports": "off", | ||
"no-negated-condition": "off", | ||
"@typescript-eslint/no-require-imports": "off", | ||
"unicorn/prefer-number-properties": "off", | ||
"@typescript-eslint/no-confusing-void-expression": "off", | ||
"unicorn/no-empty-file": "off", | ||
"unicorn/prefer-event-target": "off", | ||
// needs to be fixed actually | ||
"@typescript-eslint/no-floating-promises": "warn", | ||
"no-async-promise-executor": "off", | ||
"no-bitwise": "off", | ||
"unicorn/filename-case": "off", | ||
"max-depth": "off" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,25 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
|
||
permissions: write-all | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npm run build | ||
- run: npm test | ||
DeployPages: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'push' }} | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/[email protected] # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
- name: Install pnpm | ||
run: npm i -g pnpm | ||
- run: pnpm install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why pnpm ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. because of pnpm lock i guess There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, it should not matter what pm you use, but I had to put lockfile into the repo so I can lock deps for fully reproducible builds (without sacrificing branch information stored in package.json). So, yes, you are forced to use pnpm for reproducible builds, but if you don't care you actually use any other pm. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Npm also supports package lock. Doesn't it ? |
||
- run: pnpm lint | ||
- run: pnpm check-build | ||
- run: nohup pnpm prod-start & | ||
- run: nohup node cypress/minecraft-server.mjs & | ||
- uses: cypress-io/github-action@v5 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
- name: Edit config | ||
run: | | ||
sed -i -E 's/^ "defaultProxy": ""/ "defaultProxy": "pproxy.rom1504.fr"/g' config.json | ||
zardoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
sed -i -E 's/^ "defaultProxyPort": 0/ "defaultProxyPort": 443/g' config.json | ||
- name: Build | ||
run: | | ||
npm install | ||
npm run build | ||
cp -R public/ ../ | ||
rm -Rf ./* | ||
git checkout gh-pages | ||
rm -Rf ./* | ||
rm -Rf .github .gitignore .gitpod .gitpod.DockerFile .npmignore .npmrc | ||
cp -R ../public/* ./ | ||
- name: Create commits | ||
run: | | ||
git config user.name 'rom1504bot' | ||
git config user.email '[email protected]' | ||
git add --all | ||
git commit --amend -m "Update gh-pages" | ||
- name: Deploy 🚀 | ||
uses: ad-m/github-push-action@master | ||
install: false | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: gh-pages | ||
force: true | ||
name: cypress-images | ||
path: cypress/integration/__image_snapshots__/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Vercel Deploy Preview | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
on: | ||
pull_request: | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install Global Dependencies | ||
run: npm install --global vercel pnpm | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
uses: mathiasvr/[email protected] | ||
with: | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | ||
id: deploy | ||
- uses: mshick/add-pr-comment@v2 | ||
with: | ||
message: | | ||
Deployed to Vercel Preview: ${{ steps.deploy.outputs.stdout }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
name: npm-publish | ||
name: Deploy to GitHub pages | ||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | ||
on: | ||
push: | ||
branches: | ||
- master # Change this to your default branch | ||
branches: [main] | ||
jobs: | ||
npm-publish: | ||
name: npm-publish | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
- name: Set up Node.js | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 18.0.0 | ||
- run: npm install | ||
- id: publish | ||
uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
token: ${{ secrets.NPM_AUTH_TOKEN }} | ||
- name: Create Release | ||
if: steps.publish.outputs.type != 'none' | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.publish.outputs.version }} | ||
release_name: Release ${{ steps.publish.outputs.version }} | ||
body: ${{ steps.publish.outputs.version }} | ||
draft: false | ||
prerelease: false | ||
- name: Checkout repository | ||
uses: actions/checkout@master | ||
- name: Install pnpm | ||
run: npm i -g vercel pnpm | ||
# - run: pnpm install | ||
# - run: pnpm build | ||
- run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | ||
# will install + build to .vercel/output/static | ||
- run: vercel build --token=${{ secrets.VERCEL_TOKEN }} --prod | ||
- name: Deploy Project to Vercel | ||
uses: mathiasvr/[email protected] | ||
with: | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --prod | ||
id: deploy | ||
- run: | | ||
pnpx zardoy-release node --footer "This release URL: ${{ steps.deploy.outputs.stdout }}" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- run: cp vercel.json .vercel/output/static/vercel.json | ||
- uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: .vercel/output/static | ||
force_orphan: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
node_modules/ | ||
package-lock.json | ||
.vscode | ||
public | ||
**/public | ||
*.log | ||
.env.local | ||
Thumbs.db | ||
build | ||
localSettings.mjs | ||
dist | ||
.DS_Store | ||
.idea/ | ||
*.iml | ||
world | ||
out | ||
*.iml | ||
.vercel | ||
generated |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
package-lock=false | ||
public-hoist-pattern=* | ||
ignore-workspace-root-check=true | ||
shell-emulator=true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"configurations": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why? how do you debug this project otherwise? |
||
// UPDATED: all configs below are misconfigured and will crash vscode, open dist/index.html and use live preview debug instead | ||
// recommended as much faster | ||
{ | ||
// to launch "C:\Program Files\Google\Chrome Beta\Application\chrome.exe" --remote-debugging-port=9222 | ||
"type": "chrome", | ||
"address": "localhost", | ||
"name": "Attach Chrome", | ||
"request": "attach", | ||
// comment if using webpack | ||
"pathMapping": { | ||
"/": "${workspaceFolder}/dist" | ||
}, | ||
"outFiles": [ | ||
"${workspaceFolder}/dist/**/*.js", | ||
// "!${workspaceFolder}/dist/**/*vendors*", | ||
"!${workspaceFolder}/dist/**/*minecraftData*", | ||
"!**/node_modules/**" | ||
], | ||
"skipFiles": [ | ||
// "<node_internals>/**/*vendors*" | ||
"<node_internals>/**/*minecraftData*" | ||
], | ||
"port": 9222, | ||
}, | ||
{ | ||
// not recommended as in most cases it will slower as it launches from extension host so it slows down extension host, not sure why | ||
"type": "chrome", | ||
"name": "Launch Chrome", | ||
"request": "launch", | ||
"url": "http://localhost:8080/", | ||
"pathMapping": { | ||
"/": "${workspaceFolder}/dist" | ||
}, | ||
"outFiles": [ | ||
"${workspaceFolder}/dist/**/*.js", | ||
// "!${workspaceFolder}/dist/**/*vendors*", | ||
"!${workspaceFolder}/dist/**/*minecraftData*", | ||
"!**/node_modules/**" | ||
], | ||
"skipFiles": [ | ||
// "<node_internals>/**/*vendors*" | ||
"<node_internals>/**/*minecraftData*" | ||
], | ||
}, | ||
{ | ||
// to launch "C:\Program Files\Mozilla Firefox\firefox.exe" -start-debugger-server | ||
"type": "firefox", | ||
"name": "Attach Firefox", | ||
"request": "attach", | ||
// comment if using webpack | ||
"url": "http://localhost:8080/", | ||
"webRoot": "${workspaceFolder}/", | ||
"skipFiles": [ | ||
// "<node_internals>/**/*vendors*" | ||
"<node_internals>/**/*minecraftData*" | ||
], | ||
}, | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Contributing Guide | ||
|
||
After forking the repository, run the following commands to get started: | ||
|
||
0. Ensure you have [Node.js](https://nodejs.org) and `pnpm` installed. To install pnpm run `npm i -g pnpm`. | ||
1. Install dependencies: `pnpm i` | ||
2. Start the project in development mode: `pnpm start` | ||
|
||
A few notes: | ||
|
||
- It's recommended to use debugger for debugging. VSCode has a great debugger built-in. If debugger is slow, you can use `--no-sources` flag that would allow browser to speedup .map file parsing. | ||
- Some data are cached between restarts. If you see something doesn't work after upgrading dependencies, try to clear the by simply removing the `dist` folder. | ||
- The same folder `dist` is used for both development and production builds, so be careful when deploying the project. | ||
- Use `start-prod` script to start the project in production mode after running `build` script to build the project. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
{ | ||
"name": "Prismarine Web Client", | ||
"short_name": "Prismarine Web Client", | ||
"scope": "/", | ||
"start_url": "/", | ||
"icons": [{ | ||
"src": "favicon.png", | ||
"sizes": "512x512" | ||
}], | ||
"scope": "./", | ||
"start_url": "./", | ||
"icons": [ | ||
{ | ||
"src": "favicon.png", | ||
"sizes": "512x512" | ||
} | ||
], | ||
"background_color": "#349474", | ||
"theme_color": "#349474", | ||
"lang": "en-US", | ||
"orientation": "landscape", | ||
"display": "standalone" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this file ? We use standard