Skip to content

Commit 1bff9b3

Browse files
authored
2.0.0 (#226)
* wip on 2.0 * update gitignore * fix readme apparently * ux * fix ignore * fuck yea * click items * clicking is good * awesome * update list rules instead of endless new ones * update list rules instead of endless new ones * pretty * add backups * oh well good enough * tooltips * update readme and comments * working realm page * make a full javascript mega alerts * js mega alerts * comments pls and remove old * new item button * better ui * fix title * fix pet title * fix newlines * lgtm * minor fixes * fixing validation * error messages * validation rules * add missing settings * aaa requirements * more validation * fixing defaults * wowhead tooltips * open wowhead links properly * adding exe build pipline * update name * fix certs * fix pipeline * more fixes * add log file and stuff * fix logs * fix app * working windows, attempt to fix mac * 2.0.0 exe testing (#227) * got exe built * fix lint errors * working now * wip fixes * fix mac quit issue * no the sod realm list is really just that * fixing missing commodity realm * 1.6.0 (#228) * move to https * bump version * move to https and fix other stuff * fix data dir location on mac build * prettier * pretttier * use pre commit checks * try a build * fix husky * fix base encode for windows * fix readme * attempt to fix windows portable paths * more fixes * add better logging * just do windows portable * try more fixes * dont try and mess with the windows pipeline * make the data dir configurable * adding zoom buttons * remove legacy pet list * wip on pet settings * fix pet ui * fixing pet validation * fix pipeline * backup restore button is awesome * add eslint config * push out version with backupss * disable push * try again * disable push again * fix button layout * add a website link * 2.0.0 coderabbit (#230) * cr fix 1 * more cr fixes * more cr fixes * more cr fixess * more cr fixes * see if this fixes lint * fixing mega-alerts * disable push * minor fixes * see if it works without the installer and zip which we dont want * minor fixes * add more target info * keep going even when you get a 429 those happen all the time * fix logs * add target prices for all scans * fixing more logs and defaults * make a new release * undo push * fix price display for ilvl items * fix ilvl stuff store price in gold * add ilvl fixes * pause pipeline * add where to sell with ilvl search for boe gear * use a static path in windows dont use temp * undo push * update checker * minor cr fixes * hide and reveal buttons * wow a real stack overflow error * make a new release * remove push * fix json list * have dropdown select for pet breeds too * fix breed list * respect check boxes in settings * wip on fixing teriary * remove legacy pet stuff * use apis and github page like python does * add logging * fix loading ilvl rules * fix logging * add more logging * fixed alot of stuff push new * add labels * fix pet validation * fix broad ilvl searches * fix race condition * more coderabbit fixes * fix more coderabbit * fix innerhtml issue * fix exact bonus id match * get the token price right * dont force in commodities * fixing tokens for good * pussh * fix faction * add remove all realms * fix message and add shopping list * fix linkss * fix timestamp * fix many issues * fixing changed dirs * fixing path thing * fix commodity crash * disable push * fix recommended price * remove push
1 parent 9950dba commit 1bff9b3

21 files changed

+14891
-117
lines changed

.coderabbit.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.eslintrc.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2021": true,
5+
"node": true
6+
},
7+
"globals": {
8+
"document": "readonly",
9+
"window": "readonly",
10+
"navigator": "readonly",
11+
"console": "readonly",
12+
"setTimeout": "readonly",
13+
"setInterval": "readonly",
14+
"clearTimeout": "readonly",
15+
"clearInterval": "readonly",
16+
"fetch": "readonly",
17+
"FormData": "readonly",
18+
"AbortController": "readonly",
19+
"confirm": "readonly",
20+
"alert": "readonly",
21+
"require": "readonly",
22+
"module": "readonly",
23+
"process": "readonly",
24+
"__dirname": "readonly"
25+
},
26+
"rules": {
27+
"no-undef": "error"
28+
}
29+
}
30+
Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
name: Build EXE & DMG for Electron App
2+
3+
env:
4+
AAA_VERSION: "2.0.0"
5+
6+
on:
7+
workflow_dispatch:
8+
# push:
9+
10+
jobs:
11+
build-windows:
12+
runs-on: windows-latest
13+
outputs:
14+
upload_url_base64: ${{ steps.b64encode_upload_url.outputs.upload_url_base64 }}
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '18'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: |
28+
npm ci || npm install
29+
30+
- name: Decode Certificate
31+
run: |
32+
$cert_content = '${{ secrets.CERT_BASE64 }}'
33+
if ($cert_content -and $cert_content -ne '') {
34+
try {
35+
$cert_bytes = [Convert]::FromBase64String($cert_content)
36+
if ($cert_bytes.Length -eq 0) {
37+
Write-Error "Certificate decode resulted in empty byte array"
38+
exit 1
39+
}
40+
$cert_path = "certificate.pfx"
41+
[IO.File]::WriteAllBytes($cert_path, $cert_bytes)
42+
if (-not (Test-Path $cert_path)) {
43+
Write-Error "Failed to write certificate file"
44+
exit 1
45+
}
46+
echo "WIN_CERT_FILE=$cert_path" >> $env:GITHUB_ENV
47+
echo "WIN_CERT_PASSWORD=${{ secrets.CERT_PASSWORD }}" >> $env:GITHUB_ENV
48+
} catch {
49+
Write-Error "Failed to decode certificate: $_"
50+
exit 1
51+
}
52+
}
53+
shell: pwsh
54+
55+
- name: Build Windows executable
56+
run: npm run build:win
57+
env:
58+
WIN_CERT_FILE: ${{ env.WIN_CERT_FILE }}
59+
WIN_CERT_PASSWORD: ${{ env.WIN_CERT_PASSWORD }}
60+
61+
- name: Sign Windows Executable (if certificate available)
62+
env:
63+
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}
64+
run: |
65+
if (Test-Path "certificate.pfx") {
66+
$cert_path = "certificate.pfx"
67+
$timestamp_url = "http://timestamp.digicert.com"
68+
69+
# Resolve and validate signtool
70+
$signtoolPath = Resolve-Path "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" -ErrorAction SilentlyContinue | Select-Object -Last 1
71+
if (-not $signtoolPath -or -not (Test-Path $signtoolPath)) {
72+
Write-Error "signtool.exe not found. Please ensure Windows SDK is installed."
73+
exit 1
74+
}
75+
76+
$executable_path = ".\dist-electron\Azeroth Auction Assassin Setup ${{ env.AAA_VERSION }}.exe"
77+
if (Test-Path $executable_path) {
78+
try {
79+
& $signtoolPath sign /f $cert_path /p $env:CERT_PASSWORD /tr $timestamp_url /td sha256 /fd sha256 /v $executable_path
80+
if ($LASTEXITCODE -ne 0) {
81+
Write-Error "Failed to sign installer: exit code $LASTEXITCODE"
82+
exit 1
83+
}
84+
} catch {
85+
Write-Error "Error signing installer: $_"
86+
exit 1
87+
}
88+
}
89+
# Also sign portable if it exists
90+
$portable_path = ".\dist-electron\Azeroth Auction Assassin-${{ env.AAA_VERSION }}-portable.exe"
91+
if (Test-Path $portable_path) {
92+
try {
93+
& $signtoolPath sign /f $cert_path /p $env:CERT_PASSWORD /tr $timestamp_url /td sha256 /fd sha256 /v $portable_path
94+
if ($LASTEXITCODE -ne 0) {
95+
Write-Error "Failed to sign portable: exit code $LASTEXITCODE"
96+
exit 1
97+
}
98+
} catch {
99+
Write-Error "Error signing portable: $_"
100+
exit 1
101+
}
102+
}
103+
}
104+
shell: pwsh
105+
106+
- name: Create Release
107+
id: create_release
108+
uses: softprops/action-gh-release@v2
109+
with:
110+
tag_name: "v${{env.AAA_VERSION}}"
111+
name: "Release v${{env.AAA_VERSION}}"
112+
draft: false
113+
prerelease: false
114+
env:
115+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116+
117+
- name: Encode and Save Upload URL as Base64
118+
id: b64encode_upload_url
119+
run: |
120+
$uploadUrl = '${{ steps.create_release.outputs.upload_url }}'
121+
$bytes = [System.Text.Encoding]::UTF8.GetBytes($uploadUrl)
122+
$base64 = [Convert]::ToBase64String($bytes)
123+
echo "upload_url_base64=$base64" >> $env:GITHUB_OUTPUT
124+
shell: pwsh
125+
126+
# - name: Upload Windows Installer to Release
127+
# uses: actions/upload-release-asset@v1
128+
# env:
129+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130+
# with:
131+
# upload_url: ${{ steps.create_release.outputs.upload_url }}
132+
# asset_path: .\dist-electron\Azeroth Auction Assassin Setup ${{ env.AAA_VERSION }}.exe
133+
# asset_name: AzerothAuctionAssassin-Setup-${{ env.AAA_VERSION }}.exe
134+
# asset_content_type: application/octet-stream
135+
# if: ${{ always() }}
136+
137+
- name: Upload Windows Portable to Release
138+
uses: actions/upload-release-asset@v1
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
with:
142+
upload_url: ${{ steps.create_release.outputs.upload_url }}
143+
asset_path: .\dist-electron\Azeroth Auction Assassin-${{ env.AAA_VERSION }}-portable.exe
144+
asset_name: AzerothAuctionAssassin-${{ env.AAA_VERSION }}-portable.exe
145+
asset_content_type: application/octet-stream
146+
if: ${{ always() }}
147+
148+
build-mac:
149+
needs: build-windows
150+
if: ${{ needs.build-windows.result == 'success' }}
151+
runs-on: macos-latest
152+
153+
steps:
154+
- name: Checkout code
155+
uses: actions/checkout@v4
156+
157+
- name: Setup Node.js
158+
uses: actions/setup-node@v4
159+
with:
160+
node-version: '18'
161+
cache: 'npm'
162+
163+
- name: Decode Upload URL
164+
run: |
165+
if [ -z "${{ needs.build-windows.outputs.upload_url_base64 }}" ]; then
166+
echo "Error: upload_url_base64 is empty"
167+
exit 1
168+
fi
169+
echo "decoded_upload_url=$(echo '${{ needs.build-windows.outputs.upload_url_base64 }}' | base64 --decode)" >> $GITHUB_ENV
170+
171+
- name: Install dependencies
172+
run: |
173+
npm ci || npm install
174+
175+
- name: Decode Certificate
176+
run: |
177+
CERT_BASE64="${{ secrets.CERT_BASE64 }}"
178+
if [ -n "$CERT_BASE64" ]; then
179+
set -e
180+
echo "$CERT_BASE64" | base64 -d > certificate.pfx
181+
if [ ! -s certificate.pfx ]; then
182+
echo "Error: Certificate decode resulted in empty file"
183+
exit 1
184+
fi
185+
# Convert PFX to P12 for macOS if needed, or use directly
186+
# For self-signed certs, we'll try to import the PFX directly
187+
if ! security create-keychain -p "" build.keychain; then
188+
echo "Error: Failed to create keychain"
189+
exit 1
190+
fi
191+
if ! security default-keychain -s build.keychain; then
192+
echo "Error: Failed to set default keychain"
193+
exit 1
194+
fi
195+
if ! security unlock-keychain -p "" build.keychain; then
196+
echo "Error: Failed to unlock keychain"
197+
exit 1
198+
fi
199+
# Try importing as PFX first, if that fails, try converting
200+
if ! security import certificate.pfx -k build.keychain -P "${{ secrets.CERT_PASSWORD }}" -T /usr/bin/codesign -T /usr/bin/productsign; then
201+
echo "PFX import failed, attempting conversion to P12..."
202+
if ! openssl pkcs12 -in certificate.pfx -out certificate.p12 -nodes -passin pass:"${{ secrets.CERT_PASSWORD }}"; then
203+
echo "Error: Failed to convert PFX to P12"
204+
exit 1
205+
fi
206+
if ! security import certificate.p12 -k build.keychain -P "${{ secrets.CERT_PASSWORD }}" -T /usr/bin/codesign -T /usr/bin/productsign; then
207+
echo "Error: Failed to import P12 certificate"
208+
exit 1
209+
fi
210+
fi
211+
if ! security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" build.keychain; then
212+
echo "Error: Failed to set key partition list"
213+
exit 1
214+
fi
215+
fi
216+
217+
- name: Build macOS executable
218+
run: npm run build:mac
219+
220+
- name: Sign macOS Executable (if certificate available)
221+
run: |
222+
if [ -f "certificate.pfx" ] || [ -f "certificate.p12" ]; then
223+
# Get the certificate identity name
224+
CERT_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID" | head -1 | sed 's/.*"\(.*\)".*/\1/' || \
225+
security find-identity -v -p codesigning build.keychain | head -2 | tail -1 | sed 's/.*"\(.*\)".*/\1/')
226+
if [ -n "$CERT_IDENTITY" ]; then
227+
if ! codesign --deep --force --verify --verbose --sign "$CERT_IDENTITY" --keychain build.keychain --options runtime dist-electron/*.dmg; then
228+
echo "Error: Failed to sign DMG"
229+
exit 1
230+
fi
231+
if ! codesign --deep --force --verify --verbose --sign "$CERT_IDENTITY" --keychain build.keychain --options runtime dist-electron/*.zip; then
232+
echo "Error: Failed to sign ZIP"
233+
exit 1
234+
fi
235+
fi
236+
fi
237+
238+
# put Decode Upload URL back here if it doesn't work up at the top
239+
240+
- name: Upload macOS DMG to Release
241+
uses: actions/upload-release-asset@v1
242+
env:
243+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
244+
with:
245+
upload_url: ${{ env.decoded_upload_url }}
246+
asset_path: ./dist-electron/Azeroth Auction Assassin-${{ env.AAA_VERSION }}.dmg
247+
asset_name: AzerothAuctionAssassin-${{ env.AAA_VERSION }}-macOS.dmg
248+
asset_content_type: application/octet-stream
249+
if: ${{ always() && needs.build-windows.outputs.upload_url_base64 != '' }}
250+
251+
# - name: Upload macOS ZIP to Release
252+
# uses: actions/upload-release-asset@v1
253+
# env:
254+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
255+
# with:
256+
# upload_url: ${{ env.decoded_upload_url }}
257+
# asset_path: ./dist-electron/Azeroth Auction Assassin-${{ env.AAA_VERSION }}-mac.zip
258+
# asset_name: AzerothAuctionAssassin-${{ env.AAA_VERSION }}-macOS.zip
259+
# asset_content_type: application/zip
260+
# if: ${{ always() && needs.build-windows.outputs.upload_url_base64 != '' }}
261+

.github/workflows/lint.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: "Npm Linters"
3+
4+
on:
5+
push:
6+
# branches:
7+
# - main
8+
# pull_request:
9+
# branches:
10+
# - main
11+
12+
jobs:
13+
"Prettier":
14+
runs-on: ubuntu-latest
15+
container: node:20
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Check Prettier formatting
22+
run: npm run lint

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ output
1717
dist
1818
venv
1919

20+
# Node / Electron / Typescript
21+
node_modules/
22+
dist-electron/
23+
2024
# C extensions
2125
*.so
2226

@@ -181,3 +185,4 @@ AzerothAuctionAssassin-windows/AzerothAuctionAssassin/AzerothAuctionAssassin.csp
181185

182186
#Ignore cursor AI rules
183187
.cursor/rules/codacy.mdc
188+
.codacy/

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": false,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"useTabs": false,
6+
"trailingComma": "es5",
7+
"printWidth": 80,
8+
"arrowParens": "always"
9+
}
10+

AzerothAuctionAssassin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2808,15 +2808,15 @@ def paid_save_data_to_json(self):
28082808
QMessageBox.critical(
28092809
self,
28102810
"Auction Assassin Token",
2811-
"Please provide a valid Auction Assassin token to save data!",
2811+
"AAA token expired or invalid. Please provide a valid Auction Assassin token to save data!",
28122812
)
28132813
return
28142814

28152815
if "succeeded" not in response_dict:
28162816
QMessageBox.critical(
28172817
self,
28182818
"Auction Assassin Token",
2819-
"Please provide a valid Auction Assassin token to save data!",
2819+
"AAA token expired or invalid. Please provide a valid Auction Assassin token to save data!",
28202820
)
28212821
return
28222822

0 commit comments

Comments
 (0)