From 60b71f1f34c35f8eb4319de3c2813efa611d491b Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 13 Jul 2024 03:12:12 -0400 Subject: [PATCH 01/27] minor bump to electron client versions. fix warning with min value being a string by default --- nt-app/package.json | 30 +++--- nt-app/src/components/vRoomFlags.vue | 4 +- yarn.lock | 150 +++++++++++++++++---------- 3 files changed, 111 insertions(+), 73 deletions(-) diff --git a/nt-app/package.json b/nt-app/package.json index 586f023..3955258 100644 --- a/nt-app/package.json +++ b/nt-app/package.json @@ -19,28 +19,28 @@ "@fortawesome/fontawesome-free": "^5.15.1", "@popperjs/core": "^2.6.0", "electron": "9.4.4", - "electron-updater": "5.0.6", - "fs-extra": "^11.1.1", - "got": "^11.8.1", + "electron-updater": "5.3.0", + "fs-extra": "^11.2.0", + "got": "^11.8.6", "jsonwebtoken": "^9.0.2", - "keytar": "^7.2.0", - "uuid": "^9.0.0", - "validator": "^13.5.1", - "vue": "^2.6.11", - "vue-form-json-schema": "^2.9.2", + "keytar": "^7.9.0", + "uuid": "^9.0.1", + "validator": "^13.12.0", + "vue": "^2.7.16", + "vue-form-json-schema": "^2.9.5", "vue-router": "^3.2.0", - "vuex": "^3.6.0", - "ws": "^7.4.2" + "vuex": "^3.6.2", + "ws": "^7.5.10" }, "devDependencies": { "@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-router": "~4.5.0", - "@vue/cli-service": "~4.5.0", - "electron-devtools-installer": "3.1.0", - "eslint": "^6.7.2", + "@vue/cli-service": "~4.5.19", + "electron-devtools-installer": "3.2.0", + "eslint": "^6.8.0", "eslint-plugin-vue": "^6.2.2", - "vue-cli-plugin-electron-builder": "~2.0.0-rc.5", - "vue-template-compiler": "^2.6.11" + "vue-cli-plugin-electron-builder": "~2.1.1", + "vue-template-compiler": "^2.7.16" }, "installConfig": { "hoistingLimits": "workspaces" diff --git a/nt-app/src/components/vRoomFlags.vue b/nt-app/src/components/vRoomFlags.vue index bc9861f..bc82474 100644 --- a/nt-app/src/components/vRoomFlags.vue +++ b/nt-app/src/components/vRoomFlags.vue @@ -52,7 +52,7 @@
Date: Sat, 13 Jul 2024 03:42:02 -0400 Subject: [PATCH 02/27] major-ish bump to electron client versions --- nt-app/package.json | 10 ++--- yarn.lock | 91 +++++++++++++++++++-------------------------- 2 files changed, 44 insertions(+), 57 deletions(-) diff --git a/nt-app/package.json b/nt-app/package.json index 3955258..7c24203 100644 --- a/nt-app/package.json +++ b/nt-app/package.json @@ -1,6 +1,6 @@ { "name": "nt-app", - "version": "0.10.10", + "version": "0.10.11", "author": "Noita-Together", "description": "Allows you to play noita with friends...", "repository": "https://github.com/Noita-Together/noita-together", @@ -18,8 +18,8 @@ "dependencies": { "@fortawesome/fontawesome-free": "^5.15.1", "@popperjs/core": "^2.6.0", - "electron": "9.4.4", - "electron-updater": "5.3.0", + "electron": "^11.5.0", + "electron-updater": "6.2.1", "fs-extra": "^11.2.0", "got": "^11.8.6", "jsonwebtoken": "^9.0.2", @@ -36,10 +36,10 @@ "@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-router": "~4.5.0", "@vue/cli-service": "~4.5.19", - "electron-devtools-installer": "3.2.0", + "electron-devtools-installer": "^3.2.0", "eslint": "^6.8.0", "eslint-plugin-vue": "^6.2.2", - "vue-cli-plugin-electron-builder": "~2.1.1", + "vue-cli-plugin-electron-builder": "^2.1.1", "vue-template-compiler": "^2.7.16" }, "installConfig": { diff --git a/yarn.lock b/yarn.lock index eaedbc3..721b45d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1778,13 +1778,6 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:^7.3.6": - version: 7.5.6 - resolution: "@types/semver@npm:7.5.6" - checksum: 563a0120ec0efcc326567db2ed920d5d98346f3638b6324ea6b50222b96f02a8add3c51a916b6897b51523aad8ac227d21d3dcf8913559f1bfc6c15b14d23037 - languageName: node - linkType: hard - "@types/send@npm:*": version: 0.17.4 resolution: "@types/send@npm:0.17.4" @@ -3692,13 +3685,13 @@ __metadata: languageName: node linkType: hard -"builder-util-runtime@npm:9.1.1": - version: 9.1.1 - resolution: "builder-util-runtime@npm:9.1.1" +"builder-util-runtime@npm:9.2.4": + version: 9.2.4 + resolution: "builder-util-runtime@npm:9.2.4" dependencies: debug: ^4.3.4 sax: ^1.2.4 - checksum: 3458f9c8accad6e934c841cffa93f5d4b342c22b10b9c1a2eb3fd44ca96ea2c662b1048f9a075da9b8a4fada17206887b7e92ebdca331b1071520916e013e245 + checksum: 7d02b7f57a10ac0d65a6dac08c7048d8e4a2bbbaa6025423fa0c08b6d629c2fedf6c712f4807f5c3480cabe1a721b5eccc21bcccb6211ce660e067945fd016cc languageName: node linkType: hard @@ -5764,7 +5757,7 @@ __metadata: languageName: node linkType: hard -"electron-devtools-installer@npm:3.2.0": +"electron-devtools-installer@npm:^3.2.0": version: 3.2.0 resolution: "electron-devtools-installer@npm:3.2.0" dependencies: @@ -5815,33 +5808,32 @@ __metadata: languageName: node linkType: hard -"electron-updater@npm:5.3.0": - version: 5.3.0 - resolution: "electron-updater@npm:5.3.0" +"electron-updater@npm:6.2.1": + version: 6.2.1 + resolution: "electron-updater@npm:6.2.1" dependencies: - "@types/semver": ^7.3.6 - builder-util-runtime: 9.1.1 - fs-extra: ^10.0.0 + builder-util-runtime: 9.2.4 + fs-extra: ^10.1.0 js-yaml: ^4.1.0 lazy-val: ^1.0.5 lodash.escaperegexp: ^4.1.2 lodash.isequal: ^4.5.0 - semver: ^7.3.5 - typed-emitter: ^2.1.0 - checksum: 975381ffb0d9e17686f7f0b90739320922ca52d06ee548e89ceeb3b56bfc23180c20e7049e5c33ef789b228eb4c960c9886986e1332577866dca2437c315ed4e + semver: ^7.3.8 + tiny-typed-emitter: ^2.1.0 + checksum: 92a064610a3c9df747dce9c3eccd69c48adb2c8b37b9d7c13d1c39f7e2a9ffaef4e909ab50e6973d557566bde6de7ec9c64e2cc3a2cdef18b3220c5d91333e1c languageName: node linkType: hard -"electron@npm:9.4.4": - version: 9.4.4 - resolution: "electron@npm:9.4.4" +"electron@npm:^11.5.0": + version: 11.5.0 + resolution: "electron@npm:11.5.0" dependencies: "@electron/get": ^1.0.1 "@types/node": ^12.0.12 extract-zip: ^1.0.3 bin: electron: cli.js - checksum: 79d03561190e056ee881885e30d9c6305a39de1cd59335fac7181fff7c25d5ce00340acc7e84ee2eece70c6956edeb09844cea21fad81b9120dc2d84c4578898 + checksum: 9c7cc76bf2d10d3299ed60ca1461573e62f30a0e38520e6447f8544d369a1aa743c4b0c59fed9666b3c9c5ba4638d9d797edea1ea4379adbf21b79eb3949b7a0 languageName: node linkType: hard @@ -7260,7 +7252,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^10.0.0": +"fs-extra@npm:^10.0.0, fs-extra@npm:^10.1.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" dependencies: @@ -11449,9 +11441,9 @@ __metadata: "@vue/cli-plugin-eslint": ~4.5.0 "@vue/cli-plugin-router": ~4.5.0 "@vue/cli-service": ~4.5.19 - electron: 9.4.4 - electron-devtools-installer: 3.2.0 - electron-updater: 5.3.0 + electron: ^11.5.0 + electron-devtools-installer: ^3.2.0 + electron-updater: 6.2.1 eslint: ^6.8.0 eslint-plugin-vue: ^6.2.2 fs-extra: ^11.2.0 @@ -11461,7 +11453,7 @@ __metadata: uuid: ^9.0.1 validator: ^13.12.0 vue: ^2.7.16 - vue-cli-plugin-electron-builder: ~2.1.1 + vue-cli-plugin-electron-builder: ^2.1.1 vue-form-json-schema: ^2.9.5 vue-router: ^3.2.0 vue-template-compiler: ^2.7.16 @@ -13826,15 +13818,6 @@ prettier@latest: languageName: node linkType: hard -"rxjs@npm:*": - version: 7.8.1 - resolution: "rxjs@npm:7.8.1" - dependencies: - tslib: ^2.1.0 - checksum: de4b53db1063e618ec2eca0f7965d9137cabe98cf6be9272efe6c86b47c17b987383df8574861bcced18ebd590764125a901d5506082be84a8b8e364bf05f119 - languageName: node - linkType: hard - "rxjs@npm:^6.6.0": version: 6.6.7 resolution: "rxjs@npm:6.6.7" @@ -14012,6 +13995,15 @@ prettier@latest: languageName: node linkType: hard +"semver@npm:^7.3.8": + version: 7.6.2 + resolution: "semver@npm:7.6.2" + bin: + semver: bin/semver.js + checksum: 40f6a95101e8d854357a644da1b8dd9d93ce786d5c6a77227bc69dbb17bea83d0d1d1d7c4cd5920a6df909f48e8bd8a5909869535007f90278289f2451d0292d + languageName: node + linkType: hard + "send@npm:0.18.0": version: 0.18.0 resolution: "send@npm:0.18.0" @@ -15299,6 +15291,13 @@ prettier@latest: languageName: node linkType: hard +"tiny-typed-emitter@npm:^2.1.0": + version: 2.1.0 + resolution: "tiny-typed-emitter@npm:2.1.0" + checksum: 709bca410054e08df4dc29d5ea0916328bb2900d60245c6a743068ea223887d9fd2c945b6070eb20336275a557a36c2808e5c87d2ed4b60633458632be4a3e10 + languageName: node + linkType: hard + "tmp-promise@npm:^3.0.2": version: 3.0.3 resolution: "tmp-promise@npm:3.0.3" @@ -15747,18 +15746,6 @@ prettier@latest: languageName: node linkType: hard -"typed-emitter@npm:^2.1.0": - version: 2.1.0 - resolution: "typed-emitter@npm:2.1.0" - dependencies: - rxjs: "*" - dependenciesMeta: - rxjs: - optional: true - checksum: 95821a9e05784b972cc9d152891fd12a56cb4b1a7c57e768c02bea6a8984da7aff8f19404a7b69eea11fae2a3b6c0c510a4c510f575f50162c759ae9059f2520 - languageName: node - linkType: hard - "typedarray-to-buffer@npm:^3.1.5": version: 3.1.5 resolution: "typedarray-to-buffer@npm:3.1.5" @@ -16343,7 +16330,7 @@ prettier@latest: languageName: node linkType: hard -"vue-cli-plugin-electron-builder@npm:~2.1.1": +"vue-cli-plugin-electron-builder@npm:^2.1.1": version: 2.1.1 resolution: "vue-cli-plugin-electron-builder@npm:2.1.1" dependencies: From c58654a737c00fcd09d1bf4c5d67f23401bcbc13 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 21:45:24 -0400 Subject: [PATCH 03/27] Update electron-updater to 6.3.0 --- nt-app/package.json | 2 +- yarn.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/nt-app/package.json b/nt-app/package.json index 7c24203..55c9752 100644 --- a/nt-app/package.json +++ b/nt-app/package.json @@ -19,7 +19,7 @@ "@fortawesome/fontawesome-free": "^5.15.1", "@popperjs/core": "^2.6.0", "electron": "^11.5.0", - "electron-updater": "6.2.1", + "electron-updater": "6.3.0", "fs-extra": "^11.2.0", "got": "^11.8.6", "jsonwebtoken": "^9.0.2", diff --git a/yarn.lock b/yarn.lock index 721b45d..e16c635 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3685,13 +3685,13 @@ __metadata: languageName: node linkType: hard -"builder-util-runtime@npm:9.2.4": - version: 9.2.4 - resolution: "builder-util-runtime@npm:9.2.4" +"builder-util-runtime@npm:9.2.5": + version: 9.2.5 + resolution: "builder-util-runtime@npm:9.2.5" dependencies: debug: ^4.3.4 sax: ^1.2.4 - checksum: 7d02b7f57a10ac0d65a6dac08c7048d8e4a2bbbaa6025423fa0c08b6d629c2fedf6c712f4807f5c3480cabe1a721b5eccc21bcccb6211ce660e067945fd016cc + checksum: 5853457a10c3dbbe9eb7f7e55dc0a4e7bb77a70659039f961c43c8e8ddd3f07374b445eec1ab2bbaf4e8248635c49122b2e3df30456e85eff06e5260219ed470 languageName: node linkType: hard @@ -5808,11 +5808,11 @@ __metadata: languageName: node linkType: hard -"electron-updater@npm:6.2.1": - version: 6.2.1 - resolution: "electron-updater@npm:6.2.1" +"electron-updater@npm:6.3.0": + version: 6.3.0 + resolution: "electron-updater@npm:6.3.0" dependencies: - builder-util-runtime: 9.2.4 + builder-util-runtime: 9.2.5 fs-extra: ^10.1.0 js-yaml: ^4.1.0 lazy-val: ^1.0.5 @@ -5820,7 +5820,7 @@ __metadata: lodash.isequal: ^4.5.0 semver: ^7.3.8 tiny-typed-emitter: ^2.1.0 - checksum: 92a064610a3c9df747dce9c3eccd69c48adb2c8b37b9d7c13d1c39f7e2a9ffaef4e909ab50e6973d557566bde6de7ec9c64e2cc3a2cdef18b3220c5d91333e1c + checksum: e1af276f9a3d84bcb56b0a19a3b77870a199dfb4ac25c4e1b57aa42003cfbdc2a80750c9ba638f47b8f2e1536b3cb6b884df331f2944b9fa5a799922c27cec9b languageName: node linkType: hard @@ -11443,7 +11443,7 @@ __metadata: "@vue/cli-service": ~4.5.19 electron: ^11.5.0 electron-devtools-installer: ^3.2.0 - electron-updater: 6.2.1 + electron-updater: 6.3.0 eslint: ^6.8.0 eslint-plugin-vue: ^6.2.2 fs-extra: ^11.2.0 From 6f2d0180530b3b3d4aa5b3405e7ca6b9717a4d17 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 21:55:32 -0400 Subject: [PATCH 04/27] Up version to 0.10.11 and add test deploy script for github actions --- .github/workflows/deploy-windows.yml | 39 ++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-windows.yml diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml new file mode 100644 index 0000000..855b419 --- /dev/null +++ b/.github/workflows/deploy-windows.yml @@ -0,0 +1,39 @@ +name: Deploy Windows + +on: + push: + tags: + - 'app-*' + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: yarn install + - name: Get version from tag + id: get_tag_version + run: echo ::set-output name=version::${{ github.ref }} + - name: Set package.json version + run: | + npm version ${ { steps.get_tag_version.outputs.version }#app-} + working-directory: ./nt-app + - run: yarn install + - run: yarn workspace nt-app electron:build --publish never + - run: ls ./nt-app/dist_electron/ + - run: | + cp "./nt-app/dist_electron/latest.yml" ./build/latest.yml + cp "./nt-app/dist_electron/Noita Together Setup ${{ steps.get_tag_version.outputs.version }}.exe" ./build/Noita-Together-Setup-${{ steps.get_tag_version.outputs.version }}.exe + cp "./nt-app/dist_electron/Noita Together Setup ${{ steps.get_tag_version.outputs.version }}.exe.blockmap" ./build/Noita-Together-Setup-${{ steps.get_tag_version.outputs.version }}.exe.blockmap + - name: Upload files to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_DEPLOY_TOKEN }} + file: ./build/ + tag: ${{ github.ref }} + overwrite: true + file_glob: true \ No newline at end of file diff --git a/package.json b/package.json index 8dde3f0..5237042 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "noita-together", "private": true, - "version": "0.10.10", + "version": "0.10.11", "packageManager": "yarn@3.5.1", "workspaces": [ "nt-app/", From 27818d772a834ac568f2206b34f514a2a97b627f Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 21:58:30 -0400 Subject: [PATCH 05/27] Update github actions typo --- .github/workflows/deploy-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index 855b419..1f47944 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -32,7 +32,7 @@ jobs: - name: Upload files to release uses: svenstaro/upload-release-action@v2 with: - repo_token: ${{ secrets.GITHUB_DEPLOY_TOKEN }} + repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./build/ tag: ${{ github.ref }} overwrite: true From 2c8541ad3bf7ec9496c6b2eac7ff29a4aaad0a02 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 22:18:12 -0400 Subject: [PATCH 06/27] fix github actions? --- .github/workflows/deploy-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index 1f47944..d1c7c9b 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -20,7 +20,7 @@ jobs: run: echo ::set-output name=version::${{ github.ref }} - name: Set package.json version run: | - npm version ${ { steps.get_tag_version.outputs.version }#app-} + npm version ${{ steps.get_tag_version.outputs.version }#app-} working-directory: ./nt-app - run: yarn install - run: yarn workspace nt-app electron:build --publish never From c5ac8e3178be46c11b0df7499805ff9490b86135 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 22:25:54 -0400 Subject: [PATCH 07/27] Fix syntax error --- .github/workflows/deploy-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index d1c7c9b..9b4f9ae 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -20,7 +20,7 @@ jobs: run: echo ::set-output name=version::${{ github.ref }} - name: Set package.json version run: | - npm version ${{ steps.get_tag_version.outputs.version }#app-} + npm version ${{ steps.get_tag_version.outputs.version }}#app- working-directory: ./nt-app - run: yarn install - run: yarn workspace nt-app electron:build --publish never From 66b92b36536c09905b3ae552f6509099802a9051 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 22:35:44 -0400 Subject: [PATCH 08/27] fix path issues --- .github/workflows/deploy-windows.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index 9b4f9ae..93f20b3 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -24,16 +24,17 @@ jobs: working-directory: ./nt-app - run: yarn install - run: yarn workspace nt-app electron:build --publish never - - run: ls ./nt-app/dist_electron/ + - run: ls ${{ github.workspace }}/nt-app/dist_electron/ - run: | - cp "./nt-app/dist_electron/latest.yml" ./build/latest.yml - cp "./nt-app/dist_electron/Noita Together Setup ${{ steps.get_tag_version.outputs.version }}.exe" ./build/Noita-Together-Setup-${{ steps.get_tag_version.outputs.version }}.exe - cp "./nt-app/dist_electron/Noita Together Setup ${{ steps.get_tag_version.outputs.version }}.exe.blockmap" ./build/Noita-Together-Setup-${{ steps.get_tag_version.outputs.version }}.exe.blockmap + mkdir ${{ github.workspace }}/build + cp "${{ github.workspace }}/nt-app/dist_electron/latest.yml" ${{ github.workspace }}/build/latest.yml + cp "${{ github.workspace }}/nt-app/dist_electron/Noita Together Setup ${{ steps.get_tag_version.outputs.version }}.exe" ${{ github.workspace }}/build/Noita-Together-Setup-${{ steps.get_tag_version.outputs.version }}.exe + cp "${{ github.workspace }}/nt-app/dist_electron/Noita Together Setup ${{ steps.get_tag_version.outputs.version }}.exe.blockmap" ${{ github.workspace }}/build/Noita-Together-Setup-${{ steps.get_tag_version.outputs.version }}.exe.blockmap - name: Upload files to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./build/ + file: ${{ github.workspace }}/build/ tag: ${{ github.ref }} overwrite: true file_glob: true \ No newline at end of file From a604e684622bbb893a1beababe52c0b88736950a Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 22:50:07 -0400 Subject: [PATCH 09/27] fix copy issues after build --- .github/workflows/deploy-windows.yml | 12 ++---------- nt-app/package.json | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index 93f20b3..3d0aade 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -15,21 +15,13 @@ jobs: with: node-version: 16 - run: yarn install - - name: Get version from tag - id: get_tag_version - run: echo ::set-output name=version::${{ github.ref }} - - name: Set package.json version - run: | - npm version ${{ steps.get_tag_version.outputs.version }}#app- - working-directory: ./nt-app - - run: yarn install - run: yarn workspace nt-app electron:build --publish never - run: ls ${{ github.workspace }}/nt-app/dist_electron/ - run: | mkdir ${{ github.workspace }}/build cp "${{ github.workspace }}/nt-app/dist_electron/latest.yml" ${{ github.workspace }}/build/latest.yml - cp "${{ github.workspace }}/nt-app/dist_electron/Noita Together Setup ${{ steps.get_tag_version.outputs.version }}.exe" ${{ github.workspace }}/build/Noita-Together-Setup-${{ steps.get_tag_version.outputs.version }}.exe - cp "${{ github.workspace }}/nt-app/dist_electron/Noita Together Setup ${{ steps.get_tag_version.outputs.version }}.exe.blockmap" ${{ github.workspace }}/build/Noita-Together-Setup-${{ steps.get_tag_version.outputs.version }}.exe.blockmap + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.exe" ${{ github.workspace }}/build/ + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.exe.blockmap" ${{ github.workspace }}/build/ - name: Upload files to release uses: svenstaro/upload-release-action@v2 with: diff --git a/nt-app/package.json b/nt-app/package.json index 55c9752..f44d710 100644 --- a/nt-app/package.json +++ b/nt-app/package.json @@ -1,6 +1,6 @@ { "name": "nt-app", - "version": "0.10.11", + "version": "0.10.11-beta6", "author": "Noita-Together", "description": "Allows you to play noita with friends...", "repository": "https://github.com/Noita-Together/noita-together", From bccbcfa3f03e4401fcdd6aba3dd37590bec3a109 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 23:01:10 -0400 Subject: [PATCH 10/27] fix file uploader --- .github/workflows/deploy-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index 3d0aade..b26f18c 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -26,7 +26,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ github.workspace }}/build/ + file: ${{ github.workspace }}/build/* tag: ${{ github.ref }} overwrite: true file_glob: true \ No newline at end of file From 9af7198eff2a82e6e427656e3239ae53664e342c Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 20 Jul 2024 23:13:59 -0400 Subject: [PATCH 11/27] give workflow permission to write --- .github/workflows/deploy-windows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index b26f18c..934fa6a 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -5,6 +5,10 @@ on: tags: - 'app-*' +#for uploading release exe +permissions: + contents: write + jobs: build: runs-on: windows-latest From 4e71c81f7a66f64f4b313557d92114e878087ea4 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 21:46:45 -0400 Subject: [PATCH 12/27] Update windows deploy with environment --- .github/workflows/deploy-windows.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index 934fa6a..1430a28 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -1,9 +1,9 @@ -name: Deploy Windows +name: Deploy Windows Dev on: push: tags: - - 'app-*' + - 'dev-*' #for uploading release exe permissions: @@ -12,6 +12,7 @@ permissions: jobs: build: runs-on: windows-latest + environment: dev steps: - uses: actions/checkout@v3 @@ -33,4 +34,4 @@ jobs: file: ${{ github.workspace }}/build/* tag: ${{ github.ref }} overwrite: true - file_glob: true \ No newline at end of file + file_glob: true From be347076bf39e8524f0ef07a0c9ab3f233064029 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 22:03:20 -0400 Subject: [PATCH 13/27] Update deploy-windows.yml to create env --- .github/workflows/deploy-windows.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index 1430a28..e9bd0a1 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -16,6 +16,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: 'Create env file' + working-directory: ${{ github.workspace }}/nt-app/ + run: | + touch .env + echo VUE_APP_HOSTNAME=${{ secrets.VUE_APP_HOSTNAME }} >> .env + echo VUE_APP_NT_LOGIN_URL=${{ secrets.VUE_APP_NT_LOGIN_URL }} >> .env + echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ secrets.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env + cat .env - uses: actions/setup-node@v3 with: node-version: 16 From 450a016243efe43063236c4783ae466da657bc65 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 22:14:02 -0400 Subject: [PATCH 14/27] Update env vars access --- .github/workflows/deploy-windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index e9bd0a1..44353e9 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -20,9 +20,9 @@ jobs: working-directory: ${{ github.workspace }}/nt-app/ run: | touch .env - echo VUE_APP_HOSTNAME=${{ secrets.VUE_APP_HOSTNAME }} >> .env - echo VUE_APP_NT_LOGIN_URL=${{ secrets.VUE_APP_NT_LOGIN_URL }} >> .env - echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ secrets.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env + echo VUE_APP_HOSTNAME=$VUE_APP_HOSTNAME >> .env + echo VUE_APP_NT_LOGIN_URL=$VUE_APP_NT_LOGIN_URL >> .env + echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=$VUE_APP_LOBBY_SERVER_WS_URL_BASE >> .env cat .env - uses: actions/setup-node@v3 with: From 719173be959b77b140f45b17973892523907bb36 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 22:31:12 -0400 Subject: [PATCH 15/27] maybe now environment variables will be seen --- .github/workflows/deploy-windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows.yml index 44353e9..f99da0f 100644 --- a/.github/workflows/deploy-windows.yml +++ b/.github/workflows/deploy-windows.yml @@ -20,9 +20,9 @@ jobs: working-directory: ${{ github.workspace }}/nt-app/ run: | touch .env - echo VUE_APP_HOSTNAME=$VUE_APP_HOSTNAME >> .env - echo VUE_APP_NT_LOGIN_URL=$VUE_APP_NT_LOGIN_URL >> .env - echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=$VUE_APP_LOBBY_SERVER_WS_URL_BASE >> .env + echo VUE_APP_HOSTNAME=${{ vars.VUE_APP_HOSTNAME }} >> .env + echo VUE_APP_NT_LOGIN_URL=${{ vars.VUE_APP_NT_LOGIN_URL }} >> .env + echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ vars.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env cat .env - uses: actions/setup-node@v3 with: From 35ddd0dfe643d76a44a1ef4ec808a7d2deb0c3af Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 22:59:02 -0400 Subject: [PATCH 16/27] Add files for dev and prod envs for linux and windows --- .github/workflows/deploy-linux-dev.yml | 45 +++++++++++++++++++ .github/workflows/deploy-linux-prod.yml | 45 +++++++++++++++++++ ...loy-windows.yml => deploy-windows-dev.yml} | 0 .github/workflows/deploy-windows-prod.yml | 45 +++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 .github/workflows/deploy-linux-dev.yml create mode 100644 .github/workflows/deploy-linux-prod.yml rename .github/workflows/{deploy-windows.yml => deploy-windows-dev.yml} (100%) create mode 100644 .github/workflows/deploy-windows-prod.yml diff --git a/.github/workflows/deploy-linux-dev.yml b/.github/workflows/deploy-linux-dev.yml new file mode 100644 index 0000000..1ba77cd --- /dev/null +++ b/.github/workflows/deploy-linux-dev.yml @@ -0,0 +1,45 @@ +name: Deploy Linux Dev + +on: + push: + tags: + - 'v*' + +#for uploading release exe +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + environment: prod + + steps: + - uses: actions/checkout@v3 + - name: 'Create env file' + working-directory: ${{ github.workspace }}/nt-app/ + run: | + touch .env + echo VUE_APP_HOSTNAME=${{ vars.VUE_APP_HOSTNAME }} >> .env + echo VUE_APP_NT_LOGIN_URL=${{ vars.VUE_APP_NT_LOGIN_URL }} >> .env + echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ vars.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env + cat .env + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: yarn install + - run: yarn workspace nt-app electron:build --publish never + - run: ls ${{ github.workspace }}/nt-app/dist_electron/ + - run: | + mkdir ${{ github.workspace }}/build + cp "${{ github.workspace }}/nt-app/dist_electron/latest-linux.yml" ${{ github.workspace }}/build/latest.yml + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.AppImage ${{ github.workspace }}/build/ + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.snap" ${{ github.workspace }}/build/ + - name: Upload files to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.workspace }}/build/* + tag: ${{ github.ref }} + overwrite: true + file_glob: true diff --git a/.github/workflows/deploy-linux-prod.yml b/.github/workflows/deploy-linux-prod.yml new file mode 100644 index 0000000..dc5626b --- /dev/null +++ b/.github/workflows/deploy-linux-prod.yml @@ -0,0 +1,45 @@ +name: Deploy Linux Production + +on: + push: + tags: + - 'v*' + +#for uploading release exe +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + environment: prod + + steps: + - uses: actions/checkout@v3 + - name: 'Create env file' + working-directory: ${{ github.workspace }}/nt-app/ + run: | + touch .env + echo VUE_APP_HOSTNAME=${{ vars.VUE_APP_HOSTNAME }} >> .env + echo VUE_APP_NT_LOGIN_URL=${{ vars.VUE_APP_NT_LOGIN_URL }} >> .env + echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ vars.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env + cat .env + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: yarn install + - run: yarn workspace nt-app electron:build --publish never + - run: ls ${{ github.workspace }}/nt-app/dist_electron/ + - run: | + mkdir ${{ github.workspace }}/build + cp "${{ github.workspace }}/nt-app/dist_electron/latest-linux.yml" ${{ github.workspace }}/build/latest.yml + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.AppImage ${{ github.workspace }}/build/ + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.snap" ${{ github.workspace }}/build/ + - name: Upload files to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.workspace }}/build/* + tag: ${{ github.ref }} + overwrite: true + file_glob: true diff --git a/.github/workflows/deploy-windows.yml b/.github/workflows/deploy-windows-dev.yml similarity index 100% rename from .github/workflows/deploy-windows.yml rename to .github/workflows/deploy-windows-dev.yml diff --git a/.github/workflows/deploy-windows-prod.yml b/.github/workflows/deploy-windows-prod.yml new file mode 100644 index 0000000..c0c663b --- /dev/null +++ b/.github/workflows/deploy-windows-prod.yml @@ -0,0 +1,45 @@ +name: Deploy Windows Production + +on: + push: + tags: + - 'v*' + +#for uploading release exe +permissions: + contents: write + +jobs: + build: + runs-on: windows-latest + environment: prod + + steps: + - uses: actions/checkout@v3 + - name: 'Create env file' + working-directory: ${{ github.workspace }}/nt-app/ + run: | + touch .env + echo VUE_APP_HOSTNAME=${{ vars.VUE_APP_HOSTNAME }} >> .env + echo VUE_APP_NT_LOGIN_URL=${{ vars.VUE_APP_NT_LOGIN_URL }} >> .env + echo VUE_APP_LOBBY_SERVER_WS_URL_BASE=${{ vars.VUE_APP_LOBBY_SERVER_WS_URL_BASE }} >> .env + cat .env + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: yarn install + - run: yarn workspace nt-app electron:build --publish never + - run: ls ${{ github.workspace }}/nt-app/dist_electron/ + - run: | + mkdir ${{ github.workspace }}/build + cp "${{ github.workspace }}/nt-app/dist_electron/latest.yml" ${{ github.workspace }}/build/latest.yml + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.exe" ${{ github.workspace }}/build/ + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.exe.blockmap" ${{ github.workspace }}/build/ + - name: Upload files to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ github.workspace }}/build/* + tag: ${{ github.ref }} + overwrite: true + file_glob: true From 37c30856f04fc7a5b63033e1e6e80fcccfc51459 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 23:00:27 -0400 Subject: [PATCH 17/27] linux dev workflow should be dev --- .github/workflows/deploy-linux-dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-linux-dev.yml b/.github/workflows/deploy-linux-dev.yml index 1ba77cd..e7b4f13 100644 --- a/.github/workflows/deploy-linux-dev.yml +++ b/.github/workflows/deploy-linux-dev.yml @@ -3,7 +3,7 @@ name: Deploy Linux Dev on: push: tags: - - 'v*' + - 'dev-*' #for uploading release exe permissions: @@ -12,7 +12,7 @@ permissions: jobs: build: runs-on: ubuntu-latest - environment: prod + environment: dev steps: - uses: actions/checkout@v3 From ee73fdda480b700e97f8993b14c7083c87d4f70e Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 23:07:07 -0400 Subject: [PATCH 18/27] fix typos --- .github/workflows/deploy-linux-dev.yml | 2 +- .github/workflows/deploy-linux-prod.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-linux-dev.yml b/.github/workflows/deploy-linux-dev.yml index e7b4f13..9372595 100644 --- a/.github/workflows/deploy-linux-dev.yml +++ b/.github/workflows/deploy-linux-dev.yml @@ -33,7 +33,7 @@ jobs: - run: | mkdir ${{ github.workspace }}/build cp "${{ github.workspace }}/nt-app/dist_electron/latest-linux.yml" ${{ github.workspace }}/build/latest.yml - cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.AppImage ${{ github.workspace }}/build/ + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.AppImage" ${{ github.workspace }}/build/ cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.snap" ${{ github.workspace }}/build/ - name: Upload files to release uses: svenstaro/upload-release-action@v2 diff --git a/.github/workflows/deploy-linux-prod.yml b/.github/workflows/deploy-linux-prod.yml index dc5626b..7408fa9 100644 --- a/.github/workflows/deploy-linux-prod.yml +++ b/.github/workflows/deploy-linux-prod.yml @@ -33,7 +33,7 @@ jobs: - run: | mkdir ${{ github.workspace }}/build cp "${{ github.workspace }}/nt-app/dist_electron/latest-linux.yml" ${{ github.workspace }}/build/latest.yml - cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.AppImage ${{ github.workspace }}/build/ + cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.AppImage" ${{ github.workspace }}/build/ cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.snap" ${{ github.workspace }}/build/ - name: Upload files to release uses: svenstaro/upload-release-action@v2 From 1890547ce59d5f4ab327947b313d378870009d21 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 23:16:04 -0400 Subject: [PATCH 19/27] Fix linux artifact copying --- .github/workflows/deploy-linux-dev.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-linux-dev.yml b/.github/workflows/deploy-linux-dev.yml index 9372595..5e47b22 100644 --- a/.github/workflows/deploy-linux-dev.yml +++ b/.github/workflows/deploy-linux-dev.yml @@ -30,11 +30,12 @@ jobs: - run: yarn install - run: yarn workspace nt-app electron:build --publish never - run: ls ${{ github.workspace }}/nt-app/dist_electron/ - - run: | + - working-directory: "${{ github.workspace }}/nt-app/dist_electron/" + run: | mkdir ${{ github.workspace }}/build - cp "${{ github.workspace }}/nt-app/dist_electron/latest-linux.yml" ${{ github.workspace }}/build/latest.yml - cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.AppImage" ${{ github.workspace }}/build/ - cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.snap" ${{ github.workspace }}/build/ + cp ./latest-linux.yml ${{ github.workspace }}/build/latest.yml + cp ./*.AppImage ${{ github.workspace }}/build/ + cp ./*.snap ${{ github.workspace }}/build/ - name: Upload files to release uses: svenstaro/upload-release-action@v2 with: From ca299e5760a96ef329611f506063e36c9ecac742 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 23:20:42 -0400 Subject: [PATCH 20/27] fix copying of latest-linux.yml to not overwrite windows --- .github/workflows/deploy-linux-dev.yml | 2 +- .github/workflows/deploy-linux-prod.yml | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-linux-dev.yml b/.github/workflows/deploy-linux-dev.yml index 5e47b22..effe00b 100644 --- a/.github/workflows/deploy-linux-dev.yml +++ b/.github/workflows/deploy-linux-dev.yml @@ -33,7 +33,7 @@ jobs: - working-directory: "${{ github.workspace }}/nt-app/dist_electron/" run: | mkdir ${{ github.workspace }}/build - cp ./latest-linux.yml ${{ github.workspace }}/build/latest.yml + cp ./latest-linux.yml ${{ github.workspace }}/build/latest-linux.yml cp ./*.AppImage ${{ github.workspace }}/build/ cp ./*.snap ${{ github.workspace }}/build/ - name: Upload files to release diff --git a/.github/workflows/deploy-linux-prod.yml b/.github/workflows/deploy-linux-prod.yml index 7408fa9..e648f83 100644 --- a/.github/workflows/deploy-linux-prod.yml +++ b/.github/workflows/deploy-linux-prod.yml @@ -30,11 +30,12 @@ jobs: - run: yarn install - run: yarn workspace nt-app electron:build --publish never - run: ls ${{ github.workspace }}/nt-app/dist_electron/ - - run: | + - working-directory: "${{ github.workspace }}/nt-app/dist_electron/" + run: | mkdir ${{ github.workspace }}/build - cp "${{ github.workspace }}/nt-app/dist_electron/latest-linux.yml" ${{ github.workspace }}/build/latest.yml - cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.AppImage" ${{ github.workspace }}/build/ - cp "${{ github.workspace }}/nt-app/dist_electron/Noita-Together-Setup-*.snap" ${{ github.workspace }}/build/ + cp ./latest-linux.yml ${{ github.workspace }}/build/latest-linux.yml + cp ./*.AppImage ${{ github.workspace }}/build/ + cp ./*.snap ${{ github.workspace }}/build/ - name: Upload files to release uses: svenstaro/upload-release-action@v2 with: From f19f7b2cb30303ee2dfb5f4151edd9a4a3da497b Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 23:23:55 -0400 Subject: [PATCH 21/27] remove snap file --- .github/workflows/deploy-linux-dev.yml | 1 - .github/workflows/deploy-linux-prod.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/deploy-linux-dev.yml b/.github/workflows/deploy-linux-dev.yml index effe00b..86d6489 100644 --- a/.github/workflows/deploy-linux-dev.yml +++ b/.github/workflows/deploy-linux-dev.yml @@ -35,7 +35,6 @@ jobs: mkdir ${{ github.workspace }}/build cp ./latest-linux.yml ${{ github.workspace }}/build/latest-linux.yml cp ./*.AppImage ${{ github.workspace }}/build/ - cp ./*.snap ${{ github.workspace }}/build/ - name: Upload files to release uses: svenstaro/upload-release-action@v2 with: diff --git a/.github/workflows/deploy-linux-prod.yml b/.github/workflows/deploy-linux-prod.yml index e648f83..ea89a98 100644 --- a/.github/workflows/deploy-linux-prod.yml +++ b/.github/workflows/deploy-linux-prod.yml @@ -34,8 +34,6 @@ jobs: run: | mkdir ${{ github.workspace }}/build cp ./latest-linux.yml ${{ github.workspace }}/build/latest-linux.yml - cp ./*.AppImage ${{ github.workspace }}/build/ - cp ./*.snap ${{ github.workspace }}/build/ - name: Upload files to release uses: svenstaro/upload-release-action@v2 with: From 9ecd0711b441544151fc4d81fdf58d78df0a5011 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 28 Jul 2024 23:26:18 -0400 Subject: [PATCH 22/27] Update nt-app/package.json --- nt-app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nt-app/package.json b/nt-app/package.json index f44d710..9f32791 100644 --- a/nt-app/package.json +++ b/nt-app/package.json @@ -1,6 +1,6 @@ { "name": "nt-app", - "version": "0.10.11-beta6", + "version": "0.11.0-experimental-july", "author": "Noita-Together", "description": "Allows you to play noita with friends...", "repository": "https://github.com/Noita-Together/noita-together", From 874d46948bcdead85d7051aa873e865ee7cfef23 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 18 Aug 2024 21:03:06 -0400 Subject: [PATCH 23/27] fix issues where we add the same user to the users list without checking if they already exist --- nt-app/src/store/index.js | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/nt-app/src/store/index.js b/nt-app/src/store/index.js index 679149f..267b02b 100644 --- a/nt-app/src/store/index.js +++ b/nt-app/src/store/index.js @@ -523,22 +523,31 @@ export default new Vuex.Store({ state.roomChat = [] }, userJoinedRoom: (state, payload) => { - state.room.users.push({ - userId: payload.userId, - name: payload.name, - owner: false, - color: randomColor(payload.name), - readyState: { - ready: false, + //assume that connected user is already are a user, unless we don't find them + let existingUser = state.room.users.find((user => user.userId === payload.userId)) + let user = existingUser + if(!user){ + //user does not exist yet. create an object to hold their data + user = { + userId: payload.userId, + name: payload.name, + owner: false, + color: randomColor(payload.name), + } + } + user.readyState = { + ready: false, seed: "", mods: [] - } - }) + } + if(existingUser) return + //user does not exist yet. push the user to the users table + state.room.users.push(user) }, userLeftRoom: (state, payload) => { const users = state.room.users for (const [i, user] of users.entries()) { - if (user.userId == payload.userId) { + if (user.userId === payload.userId) { users.splice(i, 1) } } @@ -559,7 +568,7 @@ export default new Vuex.Store({ ":" + ("0" + time.getMinutes()).slice(-2) const found = state.room.users.find( - (user) => user.userId == payload.userId + (user) => user.userId === payload.userId ) let userColor = randomColor(payload.name) userColor = (found && found.color) || userColor @@ -567,7 +576,6 @@ export default new Vuex.Store({ let messageClass = userRegex.test(payload.message) ? "mention" : "chat-entry" - console.log(payload.name) let messageSpans = payload.message .split(userRegex) .filter(String) From 03537320f45f205bc7ed18d055984fe15bbcd6d7 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 18 Aug 2024 21:07:01 -0400 Subject: [PATCH 24/27] version debugging code to make sure users get added and removed from the client and noita correctly --- .idea/noita-together.iml | 37 +++++++++++++++++++++++++++++++++++++ nt-app/src/ws.js | 31 +++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/.idea/noita-together.iml b/.idea/noita-together.iml index 8fb5088..7c18dc9 100644 --- a/.idea/noita-together.iml +++ b/.idea/noita-together.iml @@ -51,9 +51,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/nt-app/src/ws.js b/nt-app/src/ws.js index bf0691e..abd874c 100644 --- a/nt-app/src/ws.js +++ b/nt-app/src/ws.js @@ -180,11 +180,42 @@ module.exports = (data) => { }) ipcMain.on("CLIENT_MESSAGE", (e, data) => { + console.log('CLIENT_MESSAGE', e, data) const msg = encodeLobbyMsg(data.key, data.payload) sendMsg(msg) }) ipcMain.on("CLIENT_CHAT", (e, data) => { + if(process.env.ALLOW_DEBUG_CHAT_COMMANDS){ + let chatMsg = data.payload.message + console.log('CLIENT_CHAT', chatMsg) + //check + if(chatMsg.startsWith('/') && chatMsg.split(' ').length > 1){ + console.log('We got a potential client command. Check it before we try sending it to the backend') + let msgSplit = chatMsg.split(' ') + let payload + switch (msgSplit[0]){ + case '/useradd': + payload = { + userId: msgSplit[1], + name: msgSplit[1] + } + console.log(`Sending fake sUserJoinedRoom with payload to self`, payload) + appEvent('sUserJoinedRoom', payload) + lobby.sUserJoinedRoom(payload) + return + case '/userdel': + payload = { + userId: msgSplit[1] + } + console.log(`Sending fake sUserLeftRoom with payload to self`, payload) + lobby.sUserLeftRoom(payload) + appEvent('sUserLeftRoom', payload) + return + } + } + } + const msg = encodeGameMsg(data.key, data.payload) sendMsg(msg) }) From bf91f99a495aa402fe0514cd32a1eb63b805df43 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 18 Aug 2024 21:14:30 -0400 Subject: [PATCH 25/27] fix minor typo --- nt-app/src/store/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nt-app/src/store/index.js b/nt-app/src/store/index.js index 267b02b..05375f9 100644 --- a/nt-app/src/store/index.js +++ b/nt-app/src/store/index.js @@ -523,7 +523,7 @@ export default new Vuex.Store({ state.roomChat = [] }, userJoinedRoom: (state, payload) => { - //assume that connected user is already are a user, unless we don't find them + //assume that connected user is already a user, unless we don't find them let existingUser = state.room.users.find((user => user.userId === payload.userId)) let user = existingUser if(!user){ From fa0daa52bb6b22598898efb6f51a13fd51d2360e Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sun, 18 Aug 2024 21:27:56 -0400 Subject: [PATCH 26/27] add debug bulk user gen command --- nt-app/src/ws.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nt-app/src/ws.js b/nt-app/src/ws.js index abd874c..4b623b9 100644 --- a/nt-app/src/ws.js +++ b/nt-app/src/ws.js @@ -204,6 +204,17 @@ module.exports = (data) => { appEvent('sUserJoinedRoom', payload) lobby.sUserJoinedRoom(payload) return + case '/bulkusergen': + console.log(`Sending bulk fake sUserJoinedRoom with payload to self`, payload) + for(let i = 0; i < parseInt(msgSplit[1]); i++){ + payload = { + userId: uuidv4(), + name: uuidv4() + } + appEvent('sUserJoinedRoom', payload) + lobby.sUserJoinedRoom(payload) + } + return case '/userdel': payload = { userId: msgSplit[1] From c6b920fffeda59c22117825bd0df8798aa2ce6e0 Mon Sep 17 00:00:00 2001 From: Skye Telman Date: Sat, 24 Aug 2024 21:58:18 -0400 Subject: [PATCH 27/27] Apply suggestions from code review --- nt-app/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nt-app/package.json b/nt-app/package.json index 9f32791..10cacee 100644 --- a/nt-app/package.json +++ b/nt-app/package.json @@ -1,6 +1,6 @@ { "name": "nt-app", - "version": "0.11.0-experimental-july", + "version": "0.11.0", "author": "Noita-Together", "description": "Allows you to play noita with friends...", "repository": "https://github.com/Noita-Together/noita-together", diff --git a/package.json b/package.json index 5237042..ea37b67 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "noita-together", "private": true, - "version": "0.10.11", + "version": "0.11.0", "packageManager": "yarn@3.5.1", "workspaces": [ "nt-app/",