No description
  • Rust 47.2%
  • TypeScript 28.1%
  • JavaScript 13.8%
  • Svelte 7%
  • CSS 3.6%
  • Other 0.2%
Find a file
renovate[bot] 4fd060a797
Configure Renovate (#273)
Welcome to [Renovate](https://redirect.github.com/renovatebot/renovate)!
This is an onboarding PR to help you understand and configure settings
before regular Pull Requests begin.

🚦 To activate Renovate, merge this Pull Request. To disable Renovate,
simply close this Pull Request unmerged.



---
### Detected Package Files

 * `client/Cargo.toml` (cargo)
 * `server/Cargo.toml` (cargo)
 * `.github/workflows/bench.yml` (github-actions)
 * `.github/workflows/check.yml` (github-actions)
 * `.github/workflows/release.yml` (github-actions)
 * `.github/workflows/test-release.yml` (github-actions)
 * `mise.toml` (mise)
 * `client/js/package.json` (npm)

### Configuration Summary

Based on the default config's presets, Renovate will:

  - Start dependency updates only once this onboarding PR is merged
  - Hopefully safe environment variables to allow users to configure.
  - Show all Merge Confidence badges for pull requests.
  - Enable Renovate Dependency Dashboard creation.
- Use semantic commit type `fix` for dependencies and `chore` for all
others if semantic commits are in use.
- Ignore `node_modules`, `bower_components`, `vendor` and various
test/tests (except for nuget) directories.
  - Group known monorepo packages together.
  - Use curated list of recommended non-monorepo package groupings.
  - Apply crowd-sourced package replacement rules.
  - Apply crowd-sourced workarounds for known problems with packages.

🔡 Do you want to change how Renovate upgrades your dependencies? Add
your custom config to `renovate.json` in this branch. Renovate will
update the Pull Request description the next time it runs.

---

### What to Expect

With your current configuration, Renovate will create 4 Pull Requests:

<details>
<summary>Update Rust crate tokio to v1.45.1</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/tokio-1.x-lockfile`
  - Merge into: `main`
- Upgrade [tokio](https://redirect.github.com/tokio-rs/tokio) to
`1.45.1`


</details>

<details>
<summary>Update dependency webpack to v5.99.9</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/webpack-5.x-lockfile`
  - Merge into: `main`
- Upgrade [webpack](https://redirect.github.com/webpack/webpack) to
`5.99.9`


</details>

<details>
<summary>Update Rust crate num_cpus to v1.17.0</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/num_cpus-1.x-lockfile`
  - Merge into: `main`
- Upgrade [num_cpus](https://redirect.github.com/seanmonstar/num_cpus)
to `1.17.0`


</details>

<details>
<summary>Update dependency webpack-cli to v6</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/webpack-cli-6.x`
  - Merge into: `main`
- Upgrade [webpack-cli](https://redirect.github.com/webpack/webpack-cli)
to `^6.0.0`


</details>



🚸 Branch creation will be limited to maximum 2 per hour, so it doesn't
swamp any CI resources or overwhelm the project. See docs for
`prhourlylimit` for details.


---

❓ Got questions? Check out Renovate's
[Docs](https://docs.renovatebot.com/), particularly the Getting Started
section.
If you need any further assistance then you can also [request help
here](https://redirect.github.com/renovatebot/renovate/discussions).


---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/boardgamers/clash).


<!--renovate-config-hash:e80b4e42a3043bc12fa0640db4bac392d2bf770acf841360d7c8ceeeac2ec1a9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
2025-06-20 06:03:30 +00:00
.github/workflows Configure Renovate (#273) 2025-06-20 06:03:30 +00:00
client Configure Renovate (#273) 2025-06-20 06:03:30 +00:00
scripts use workspace (#253) 2025-05-15 09:27:51 +02:00
server Log action, fix synergies (#272) 2025-06-17 18:07:38 +00:00
.gitignore fix replay, teach us now, try new font (#252) 2025-05-15 07:36:40 +00:00
Cargo.lock Fixes (#270) 2025-06-15 14:27:43 +00:00
Cargo.toml use workspace (#253) 2025-05-15 09:27:51 +02:00
LICENSE Initial commit 2022-12-28 11:56:35 +01:00
mise.toml refactor logging (#269) 2025-06-15 09:37:17 +02:00
README.md Fix remote client (#242) 2025-05-04 13:14:56 +02:00
RELEASING.md Publish server (#56) 2024-09-29 13:22:34 +02:00
renovate.json Configure Renovate (#273) 2025-06-20 06:03:30 +00:00

clash

Lines of code

Client

Run native client

  • cd client
  • cargo run.

Run remote with boardgamers-mono web client locally

  • ./scripts/build-remote-client.sh
  • cd client/js/dist && basic-http-server .
  • google-chrome --js-flags='--stack-trace-limit 100' --disable-web-security --user-data-dir=/tmp http://localhost:8612

Server wrapper

  • cd server
  • cargo install wasm-pack (if you haven't already)
  • ./build-remote-server.sh

Notes

Todo

Boardgamers Mono

old

.tool-versions

nodejs 16.x
pnpm 6.14.1

Bypass npm publish

Index: apps/game-server/app/services/engines.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/apps/game-server/app/services/engines.ts b/apps/game-server/app/services/engines.ts
--- a/apps/game-server/app/services/engines.ts	(revision 741eecd403ed7c5b38b3b98b1e26be8a502cafc0)
+++ b/apps/game-server/app/services/engines.ts	(date 1726905060117)
@@ -7,9 +7,7 @@
 const engines = {};
 
 async function requirePath(name: string, version: number) {
-  const entryPoint = (await GameInfo.findById({ game: name, version }, "engine.entryPoint", { lean: true })).engine
-    .entryPoint;
-  return `../../games/node_modules/${name}_${version}/${entryPoint}`;
+  return `/home/gregor/source/clash/server/pkg`;
 }
 
 export async function getEngine(name: string, version: number): Promise<Engine> {

Set viewer directly

Index: apps/api/app/resources.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/apps/api/app/resources.ts b/apps/api/app/resources.ts
--- a/apps/api/app/resources.ts	(revision 741eecd403ed7c5b38b3b98b1e26be8a502cafc0)
+++ b/apps/api/app/resources.ts	(date 1726922668897)
@@ -31,7 +31,8 @@
 
   const viewer: ViewerInfo =
     gameInfo?.viewer?.alternate?.url && ctx.query.alternate === "1" ? gameInfo?.viewer.alternate : gameInfo.viewer;
-  const viewerUrl = ctx.query.customViewerUrl || viewer.url;
+  const viewerUrl = "http://127.0.0.1:4000/client.js";
 
   ctx.body = `
     <html>
@@ -48,7 +49,9 @@
         </div>
       </body>
       <${"script"} type='text/javascript'>
-        const gameObj = window.${viewer.topLevelVariable}.launch('#app');
+        const gameObj = window.clash.launch('#app');
         window.addEventListener('message', event => {
           console.log('received message from controller', event.data.type, JSON.parse(JSON.stringify(event.data)));
           switch (event.data.type) {

GameInfo.json (for now)

  {
    "_id": {
      "game": "clash",
      "version": 1
    },
    "description": "Clash of Cultures",
    "engine": {
      "package": {
        "name": "@boardgamers/clash-server",
        "version": "*"
      },
      "entryPoint": "server.js"
    },
    "expansions": [],
    "label": "Clash of Cultures",
    "meta": {
      "public": true,
      "needOwnership": true
    },
    "options": [],
    "players": [
      2,
      3,
      4
    ],
    "preferences": [],
    "rules": "",
    "viewer": {
      "url": "//cdn.jsdelivr.net/npm/@boardgamers/clash-client@0.0.5/client.js",
      "topLevelVariable": "clash",
      "dependencies": {
        "scripts": [],
        "stylesheets": []
      },
      "replayable": true,
      "alternate": null,
      "settings": []
    }
  }

Docs