-
Notifications
You must be signed in to change notification settings - Fork 16
feat: Zemu v0.50.0 - Container Pooling and Enhanced Error Handling #552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6b64d5a
feat: modernize Zemu codebase to Zondax standards (#547)
jleni 98e687d
Modernize codebase (#548)
jleni 006249c
feat: implement container pooling and fix transport error handling (#β¦
jleni ba4634e
feat: increase default container pool size to 2 for all devices
jleni 8795229
fix: add explicit permissions to GitHub workflows
jleni b4cf22f
fix: address CodeRabbit review comments
jleni 5bf6cd5
test: align metadata and comments to CLA_NOT_SUPPORTED (0x6E00)
jleni e8ecdb8
fix: correct property name from containerPooling to disablePool in tests
jleni 84cbfdd
fix: resolve ButtonKind errors for non-touch devices
jleni 61da4b4
feat: implement automatic container cleanup to prevent port conflicts
jleni 10f3a97
fix: add explicit support for prerelease tags while maintaining security
jleni 0b82757
refactor: simplify tag patterns with clear comments
jleni e7871ce
fix: improve error handling and code formatting in container pool iniβ¦
jleni 68820f6
adjust github token permission settings
jleni 4d552a5
feat: add comprehensive APDU error codes to errors module
jleni 56bf24d
refactor: consolidate duplicate dummyButton definitions into single eβ¦
jleni db3c466
fix: update GitHub workflow permissions for npm publishing
jleni 49eb797
docs: update README with latest features and improvements
jleni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,25 @@ | ||
| # Basic dependabot.yml file with | ||
| # minimum configuration for two package managers | ||
|
|
||
| version: 2 | ||
| updates: | ||
| # Enable version updates for npm | ||
| - package-ecosystem: "npm" | ||
| # Look for `package.json` and `lock` files in the `root` directory | ||
| directory: "/" | ||
| # Check the npm registry for updates every day (weekdays) | ||
| schedule: | ||
| interval: "daily" | ||
| target-branch: dev | ||
| commit-message: | ||
| prefix: "deps" | ||
| open-pull-requests-limit: 5 | ||
| target-branch: "main" | ||
| groups: | ||
| all: | ||
| patterns: ["*"] | ||
| ignore: | ||
| # Ignore major version updates for stability | ||
| - dependency-name: "*" | ||
| update-types: ["version-update:semver-major"] | ||
|
|
||
| # Enable version updates for GitHub Actions | ||
| - package-ecosystem: 'github-actions' | ||
| directory: '/' | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: 'daily' | ||
| time: '11:00' | ||
| interval: "daily" | ||
| commit-message: | ||
| prefix: 'chore' | ||
| prefix-development: 'chore' | ||
| include: 'scope' | ||
| target-branch: dev | ||
| prefix: "ci" | ||
| target-branch: "main" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: CI-ts | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, dev] | ||
| pull_request: | ||
| branches: [main, dev] | ||
| schedule: | ||
| - cron: "0 0 * * *" # Daily at midnight UTC | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.head.ref || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| ts-checks: | ||
| uses: zondax/_workflows/.github/workflows/_checks-ts.yaml@main | ||
| with: | ||
| package_manager: pnpm | ||
| node_version: "22" | ||
| enable_tests: false # Disable tests here since they need Docker | ||
| enable_coverage: false | ||
| test_command: "test" | ||
| lint_command: "check" | ||
| format_command: "check" | ||
|
|
||
| test-with-docker: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| needs: ts-checks | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 8 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'pnpm' | ||
| - name: Install dependencies | ||
| run: pnpm install | ||
| - name: Run tests with Docker | ||
| run: pnpm test | ||
| env: | ||
| DISPLAY: :99 | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,55 +1,29 @@ | ||
| name: Publish package | ||
| name: Publish NPM Package | ||
|
|
||
| on: | ||
| release: | ||
| types: | ||
| - created | ||
| types: [created] | ||
| push: | ||
| tags: | ||
| - "v[0-9]+(\\.[0-9]+)*" | ||
| - "v[0-9]+" | ||
| - "v[0-9]+.[0-9]+" | ||
| - "v[0-9]+.[0-9]+.[0-9]+" | ||
| - "v[0-9]+.[0-9]+.[0-9]+-*" | ||
|
|
||
|
jleni marked this conversation as resolved.
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
|
jleni marked this conversation as resolved.
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| jobs: | ||
| build-test: | ||
| name: Build and Test | ||
| timeout-minutes: 5 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| - name: Install node | ||
| uses: actions/setup-node@v4 | ||
| - run: npm install -g yarn | ||
| - run: yarn install | ||
| - run: yarn build | ||
| - run: yarn test | ||
| publish-npm: | ||
| uses: zondax/_workflows/.github/workflows/_publish-npm.yaml@main | ||
| with: | ||
| timeout_minutes: 10 | ||
|
jleni marked this conversation as resolved.
|
||
| dry_run: false | ||
| secrets: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH_AUTO }} | ||
|
|
||
| publish: | ||
| timeout-minutes: 5 | ||
| runs-on: ubuntu-latest | ||
| needs: [build-test] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
| - name: Install node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| registry-url: "https://registry.npmjs.org" | ||
| scope: "@zondax" | ||
| - run: npm install -g yarn | ||
| - run: yarn install | ||
| - run: yarn build | ||
| - run: mv README-npm README.md | ||
| - name: Get latest release version number | ||
| id: get_version | ||
| run: echo "version=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT | ||
| - name: Show version | ||
| run: echo ${{ steps.get_version.outputs.version }} | ||
| - name: Update tag | ||
| run: npm --no-git-tag-version version ${{ steps.get_version.outputs.version }} | ||
| - name: Publish package | ||
| run: npm publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_PUBLISH_AUTO }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,3 +173,5 @@ dist | |
|
|
||
| # Finder (MacOS) folder config | ||
| .DS_Store | ||
| tests/snapshots-tmp/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| [tools] | ||
| node = "22" | ||
| pnpm = "latest" | ||
|
|
||
| [env] | ||
| # Ensure pnpm uses the correct Node.js version | ||
| NODE_ENV = "development" | ||
|
|
||
| [tasks.install] | ||
| description = "Install dependencies" | ||
| run = "pnpm install" | ||
|
|
||
| [tasks.build] | ||
| description = "Build the project" | ||
| run = "pnpm build" | ||
|
|
||
| [tasks.test] | ||
| description = "Run tests" | ||
| run = "pnpm test" | ||
|
|
||
| [tasks.check] | ||
| description = "Run linting and formatting checks" | ||
| run = "pnpm check" | ||
|
|
||
| [tasks.dev] | ||
| description = "Development setup" | ||
| run = [ | ||
| "pnpm install", | ||
| "pnpm check", | ||
| "pnpm build" | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "recommendations": ["biomejs.biome"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "editor.defaultFormatter": "biomejs.biome", | ||
| "editor.formatOnSave": true, | ||
| "editor.codeActionsOnSave": { | ||
| "quickfix.biome": "explicit", | ||
| "source.organizeImports.biome": "explicit" | ||
| }, | ||
| "[typescript]": { | ||
| "editor.defaultFormatter": "biomejs.biome" | ||
| }, | ||
| "[javascript]": { | ||
| "editor.defaultFormatter": "biomejs.biome" | ||
| }, | ||
| "cSpell.words": ["zemu"], | ||
| "workbench.colorCustomizations": { | ||
| "activityBar.activeBackground": "#93e6fc", | ||
| "activityBar.background": "#93e6fc", | ||
| "activityBar.foreground": "#15202b", | ||
| "activityBar.inactiveForeground": "#15202b99", | ||
| "activityBarBadge.background": "#fa45d4", | ||
| "activityBarBadge.foreground": "#15202b", | ||
| "commandCenter.border": "#15202b99", | ||
| "sash.hoverBorder": "#93e6fc", | ||
| "statusBar.background": "#61dafb", | ||
| "statusBar.foreground": "#15202b", | ||
| "statusBarItem.hoverBackground": "#2fcefa", | ||
| "statusBarItem.remoteBackground": "#61dafb", | ||
| "statusBarItem.remoteForeground": "#15202b", | ||
| "titleBar.activeBackground": "#61dafb", | ||
| "titleBar.activeForeground": "#15202b", | ||
| "titleBar.inactiveBackground": "#61dafb99", | ||
| "titleBar.inactiveForeground": "#15202b99" | ||
| }, | ||
| "peacock.color": "#61dafb" | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.