diff --git a/.cursor/rules/vars-usage.mdc b/.cursor/rules/vars-usage.mdc index 7120e7ae..233e0aba 100644 --- a/.cursor/rules/vars-usage.mdc +++ b/.cursor/rules/vars-usage.mdc @@ -14,3 +14,5 @@ Ask AI - Some other global variables that can be used without window prefixes are listed in src/globals.d.ts Rationale: This ensures a clean separation between the Mineflayer logic (server-side/game logic) and the renderer (client-side/view logic), making the renderer portable and testable, and maintains proper usage of global state. + +For more general project contributing guides see CONTRIBUTING.md on like how to setup the project. Use pnpm tsc if needed to validate result with typechecking the whole project. diff --git a/.eslintrc.json b/.eslintrc.json index 3552f6a7..63f6749a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,6 +23,7 @@ // ], "@stylistic/arrow-spacing": "error", "@stylistic/block-spacing": "error", + "@typescript-eslint/no-this-alias": "off", "@stylistic/brace-style": [ "error", "1tbs", diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index f913b9b6..e80b7100 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -26,7 +26,7 @@ jobs: uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 cache: "pnpm" - name: Move Cypress to dependencies run: | diff --git a/.github/workflows/build-single-file.yml b/.github/workflows/build-single-file.yml index 93b1b77f..5f9800db 100644 --- a/.github/workflows/build-single-file.yml +++ b/.github/workflows/build-single-file.yml @@ -23,6 +23,8 @@ jobs: - name: Build single-file version - minecraft.html run: pnpm build-single-file && mv dist/single/index.html minecraft.html + env: + LOCAL_CONFIG_FILE: config.mcraft-only.json - name: Upload artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/build-zip.yml b/.github/workflows/build-zip.yml index cc472476..76ca65ca 100644 --- a/.github/workflows/build-zip.yml +++ b/.github/workflows/build-zip.yml @@ -23,6 +23,8 @@ jobs: - name: Build project run: pnpm build + env: + LOCAL_CONFIG_FILE: config.mcraft-only.json - name: Bundle server.js run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc344aad..8fc56ea9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: cd package zip -r ../self-host.zip . - run: pnpm build-playground - - run: pnpm build-storybook + # - run: pnpm build-storybook - run: pnpm test-unit - run: pnpm lint diff --git a/.github/workflows/next-deploy.yml b/.github/workflows/next-deploy.yml index 943727eb..75b39f6c 100644 --- a/.github/workflows/next-deploy.yml +++ b/.github/workflows/next-deploy.yml @@ -36,7 +36,7 @@ jobs: run: vercel build --token=${{ secrets.VERCEL_TOKEN }} env: CONFIG_JSON_SOURCE: BUNDLED - - run: pnpm build-storybook + LOCAL_CONFIG_FILE: config.mcraft-only.json - name: Copy playground files run: | mkdir -p .vercel/output/static/playground diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index f35e6a00..89fd6698 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -78,7 +78,7 @@ jobs: run: vercel build --token=${{ secrets.VERCEL_TOKEN }} env: CONFIG_JSON_SOURCE: BUNDLED - - run: pnpm build-storybook + LOCAL_CONFIG_FILE: config.mcraft-only.json - name: Copy playground files run: | mkdir -p .vercel/output/static/playground diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14c4b471..3e8c4136 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: - run: vercel build --token=${{ secrets.VERCEL_TOKEN }} --prod env: CONFIG_JSON_SOURCE: BUNDLED - - run: pnpm build-storybook + LOCAL_CONFIG_FILE: config.mcraft-only.json - name: Copy playground files run: | mkdir -p .vercel/output/static/playground @@ -48,12 +48,26 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: .vercel/output/static force_orphan: true - + + # Create CNAME file for custom domain + - name: Create CNAME file + run: echo "github.mcraft.fun" > .vercel/output/static/CNAME + + - name: Deploy to mwc-mcraft-pages repository + uses: peaceiris/actions-gh-pages@v3 + with: + personal_token: ${{ secrets.MCW_MCRAFT_PAGE_DEPLOY_TOKEN }} + external_repository: ${{ github.repository_owner }}/mwc-mcraft-pages + publish_dir: .vercel/output/static + publish_branch: main + destination_dir: docs + force_orphan: true + - name: Change index.html title run: | # change
@@ -170,6 +178,7 @@ Server specific:
- `?lockConnect=true` - Only works then `ip` parameter is set. Disables cancel/save buttons and all inputs in the connect screen already set as parameters. Useful for integrates iframes.
- `?autoConnect=true` - Only works then `ip` and `version` parameters are set and `allowAutoConnect` is `true` in config.json! Directly connects to the specified server. Useful for integrates iframes.
- `?serversList=