No description
- Rust 47.2%
- TypeScript 28.1%
- JavaScript 13.8%
- Svelte 7%
- CSS 3.6%
- Other 0.2%
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [jdx/mise-action](https://redirect.github.com/jdx/mise-action) | action | minor | `v5.0.1` → `v5.1.0` | --- ### Release Notes <details> <summary>jdx/mise-action (jdx/mise-action)</summary> ### [`v5.1.0`](https://redirect.github.com/jdx/mise-action/releases/tag/v5.1.0): : Tool version outputs, plugins input, and cached mise reuse [Compare Source](https://redirect.github.com/jdx/mise-action/compare/v5.0.1...v5.1.0) mise-action now reports the tool versions it installed as step outputs, can install mise plugins before tools, and can save the cache at the end of the job. Several caching fixes stop the action from downloading mise again on every run. #### Added - **Tool versions as step outputs.** After install, the action runs `mise ls --json --current` and sets a `versions` output. This is a JSON object of the active, installed tools. Each tool maps to a list of `{version, requested_version, install_path, source}` entries. Each tool also gets its own output with its resolved version, such as `steps.mise.outputs.node`. A tool only gets its own output if its name is a valid output name and isn't `cache-hit` or `versions`. Names like `npm:@scope/pkg` appear only in `versions`. If the action can't read the versions, it prints a warning and the step still succeeds. ([#​655](https://redirect.github.com/jdx/mise-action/pull/655) by [@​jdx](https://redirect.github.com/jdx)) ```yaml - uses: jdx/mise-action@v5 id: mise - run: echo "node ${{ steps.mise.outputs.node }}" ``` - **`plugins` input.** List plugins one per line as `name` or `name url`. Blank lines and `#` comments are ignored. The action runs `mise plugins install -y` for each one before `mise install`. Plugins that are already installed, for example restored from the cache, are left as they are. An unknown plugin fails the step. When `plugins` is set, its hash is added to the default cache key. Custom `cache_key` templates can use it as `{{plugins_hash}}`. If `plugins` is unset, existing cache keys don't change. ([#​656](https://redirect.github.com/jdx/mise-action/pull/656) by [@​jdx](https://redirect.github.com/jdx)) ```yaml - uses: jdx/mise-action@v5 env: # needed for idiomatic files such as .yvmrc MISE_IDIOMATIC_VERSION_FILE_ENABLE_TOOLS: yarn with: plugins: | yarn php https://github.com/verzly/mise-php#latest ``` - **`cache_save_post` input (opt-in, default `false`).** When enabled, the mise cache is saved in the action's post step instead of right after install. This way, tools installed by later steps are included in the cache, for example from monorepo sub-project configs or task-level tools. The setting only applies on a cache miss, because an existing cache entry can't be overwritten. The post step runs even if a later step fails. If the post-step save fails, the action prints a warning and the job doesn't fail. ([#​649](https://redirect.github.com/jdx/mise-action/pull/649) by [@​jdx](https://redirect.github.com/jdx)) - **`auto_update` input (default `false`).** See Changed below. ([#​642](https://redirect.github.com/jdx/mise-action/pull/642) by [@​jdx](https://redirect.github.com/jdx)) - The action now warns when you use the `mise_toml` input and a `.mise.toml` already exists in the working directory. mise loads `.mise.toml` before the `mise.toml` the action writes, so the input may have no effect. ([#​654](https://redirect.github.com/jdx/mise-action/pull/654) by [@​jdx](https://redirect.github.com/jdx)) #### Changed - **A cached mise is kept when `version` is unset.** Before, each new mise release made the action reject the cached binary in integrity verification and download mise again on every run until the cache key changed. Now the cached binary is kept until the cache key changes. The action verifies it against the signed checksums of the version recorded at install, without running it first. Caches saved before this release have no version record, so they are still verified against the latest release, and a tampered binary is still replaced. The integrity warning now includes the underlying error. To keep updating to newer releases as before, set `auto_update: true`. Each updated binary is cached under its own mise version, so each release is downloaded only once. An explicit `version` input works the same as before. ([#​642](https://redirect.github.com/jdx/mise-action/pull/642) by [@​jdx](https://redirect.github.com/jdx)) #### Fixed - **The cache is saved after a partial-match restore.** When the cache was restored from a key that only matched the prefix, the action never saved under the primary key, so it rebuilt the same tools on every run. Exact cache hits still skip the save. ([#​646](https://redirect.github.com/jdx/mise-action/pull/646) by [@​jdx](https://redirect.github.com/jdx)) - **Caches saved before this release no longer cause a download on every run.** These caches have no version record, so a cached binary is verified against the latest release. Once a newer mise shipped, the action downloaded mise again on every run. It now also saves the reinstalled binary in a cache keyed by mise version, so later runs restore that binary instead of downloading it. ([#​648](https://redirect.github.com/jdx/mise-action/pull/648) by [@​jdx](https://redirect.github.com/jdx)) - **Windows: mise installs without `unzip`.** The mise zip is now extracted with PowerShell's `Expand-Archive`. Self-hosted Windows runners that don't have `unzip`, such as fresh Windows 11 arm64 machines, can now install mise. ([#​650](https://redirect.github.com/jdx/mise-action/pull/650) by [@​jdx](https://redirect.github.com/jdx)) #### Documentation - New README guides cover matrix builds, using another cache action, and Rust caching: - Matrix builds: use `MISE_<TOOL>_VERSION` overrides and give each matrix entry its own `cache_key`. - Other cache actions: set `cache: false` and cache mise's data directory yourself. - Rust: explains why a restored cache can be missing Rust components such as `rustfmt`, with two workarounds. ([#​654](https://redirect.github.com/jdx/mise-action/pull/654), [#​651](https://redirect.github.com/jdx/mise-action/pull/651) by [@​jdx](https://redirect.github.com/jdx)) **Full Changelog**: <https://github.com/jdx/mise-action/compare/v5.0.1...v5.1.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/boardgamers/clash). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| .idea | ||
| client | ||
| scripts | ||
| server | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| mise.toml | ||
| README.md | ||
| RELEASING.md | ||
clash
Play online at
Client
Run native client
cd clientcargo run.
Run remote with boardgamers-mono web client locally
mise run build-remote-clientcd 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 servercargo install wasm-pack(if you haven't already)./build-remote-server.sh
Notes
- https://stackoverflow.com/questions/40102686/how-to-install-package-with-local-path-by-yarn-it-couldnt-find-package
- class:d-none={!stateSent}
Todo
- Add https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js to scripts
Boardgamers Mono
docker run -d -p 27017:27017 mongo:4.4cd apps/api && pnpm seed && echo cron=1 > .envpnpm dev --filter @bgs/api --filter @bgs/game-server --filter @bgs/web --filter @bgs/admin- admin: http://localhost:3000 (admin@test.com / password)
- user: http://localhost:8612/ (user@test.com / password)
old
github.com/boardgamers/boardgamers-mono@683f4d4735/.gitpod.yml (L12-L18)(if you haven't already)- This will create three users, with emails admin@test.com, user@test.com and user2@test.com, and "password" password".
.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": []
}
}
Also add "script URL" = https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js