Skip to content

Commit

Permalink
quite important fixes (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy authored Nov 5, 2023
2 parents aea90db + 9e152d9 commit c14b251
Show file tree
Hide file tree
Showing 70 changed files with 1,056 additions and 753 deletions.
7 changes: 3 additions & 4 deletions cypress/integration/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import type { AppOptions } from '../../src/optionsStorage'

const cleanVisit = (url?) => {
window.localStorage.clear()
cy.clearLocalStorage()
visit(url)
}

Expand Down Expand Up @@ -52,15 +52,14 @@ it('Loads & renders singleplayer', () => {
testWorldLoad()
})

it('Joins to server', {
retries: 3
}, () => {
it.only('Joins to server', () => {
// visit('/?version=1.16.1')
window.localStorage.version = ''
visit()
// todo replace with data-test
cy.get('[data-test-id="connect-screen-button"]', { includeShadowDom: true }).click()
cy.get('input#serverip', { includeShadowDom: true }).clear().focus().type('localhost')
cy.get('input#botversion', { includeShadowDom: true }).clear().focus().type('1.16.1') // todo needs to fix autoversion
cy.get('[data-test-id="connect-to-server"]', { includeShadowDom: true }).click()
testWorldLoad()
})
Expand Down
1 change: 0 additions & 1 deletion cypress/minecraft-server.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import mcServer from 'flying-squid'
import defaultOptions from 'flying-squid/config/default-settings.json' assert { type: 'json' }

/** @type {import('minecraft-protocol').ServerOptions & Record<string ,any>} */
const serverOptions = {
...defaultOptions,
'online-mode': false,
Expand Down
3 changes: 2 additions & 1 deletion esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const buildOptions = {
},
loader: {
// todo use external or resolve issues with duplicating
'.png': 'dataurl'
'.png': 'dataurl',
'.map': 'empty'
},
write: false,
// todo would be better to enable?
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:cypress": "cypress run",
"test:e2e": "start-test http-get://localhost:8080 test:cypress",
"prod-start": "node server.js",
"postinstall": "node scripts/gen-texturepack-files.mjs",
"postinstall": "node scripts/gen-texturepack-files.mjs && tsx scripts/optimizeBlockCollisions.ts",
"test-mc-server": "tsx cypress/minecraft-server.mjs",
"lint": "eslint \"{src,cypress}/**/*.{ts,js,jsx,tsx}\"",
"storybook": "storybook dev -p 6006",
Expand All @@ -31,9 +31,11 @@
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@types/wicg-file-system-access": "^2023.10.2",
"@xmcl/text-component": "^2.1.3",
"@zardoy/react-util": "^0.2.0",
"@zardoy/utils": "^0.0.11",
"browserfs": "github:zardoy/browserfs#build",
"change-case": "^5.1.2",
"compression": "^1.7.4",
"cors": "^2.8.5",
"cypress-plugin-snapshots": "^1.4.4",
Expand All @@ -49,8 +51,9 @@
"lit": "^2.8.0",
"lodash-es": "^4.17.21",
"minecraft-assets": "^1.9.1",
"minecraft-data": "^3.0.0",
"minecraft-data": "3.48.0",
"net-browserify": "github:zardoy/prismarinejs-net-browserify",
"node-gzip": "^1.1.2",
"peerjs": "^1.5.0",
"pretty-bytes": "^6.1.1",
"qrcode.react": "^3.1.0",
Expand Down Expand Up @@ -117,7 +120,7 @@
"diamond-square": "github:zardoy/diamond-square",
"prismarine-block": "github:zardoy/prismarine-block#next-era",
"prismarine-world": "github:zardoy/prismarine-world#next-era",
"minecraft-data": "3.45.0",
"minecraft-data": "3.48.0",
"prismarine-provider-anvil": "github:zardoy/prismarine-provider-anvil#everything",
"minecraft-protocol": "github:zardoy/minecraft-protocol#custom-client-extra",
"react": "^18.2.0"
Expand Down
Loading

0 comments on commit c14b251

Please sign in to comment.