Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ea8d7fa
feat: enrich verification failure callback with exception details
flxapps Oct 7, 2025
2ef47a6
refactor: provide safe casting for exceptions
flxapps Oct 7, 2025
99b3046
rerfactor: update onVerificationFailed to require non-null SecReaderE…
flxapps Oct 7, 2025
56e668c
docs: update doc comment for onVerificationFailed method
flxapps Oct 8, 2025
33ea85b
fix: properly add exception details to LdExceptionMapper for error ha…
flxapps Feb 5, 2026
c76c7e3
test: add onVerificationFailed callback test for SecWidget
flxapps Feb 5, 2026
381637e
test: update goldens
flxapps Feb 5, 2026
e89320f
chore: update urp dependencies and related code
flxapps Feb 5, 2026
1818d18
docs: align verification failure exception docs
flxapps Feb 13, 2026
6bfdfa5
test: clarify measurement failure test comment
flxapps Feb 13, 2026
78c26b3
refactor: improve error message handling in SecReaderException and re…
flxapps Feb 16, 2026
29f740d
fix: correct copy-paste error message in getDeviceId()
flxapps Feb 16, 2026
685378a
fix: throw SecReaderException instead of raw Exception in getModelInfo()
flxapps Feb 16, 2026
6f2dac7
refactor: revert SecConnectionFailedException, remove unused class
flxapps Feb 16, 2026
4241737
fix: rethrow instead of silently returning null in prime()
flxapps Feb 16, 2026
32e6c25
refactor: handle DeviceError in exception mapper
flxapps Feb 16, 2026
31423fe
refactor: add exception types for connection and command failures in …
flxapps Feb 16, 2026
b600d42
docs: enhance documentation regarding exception handling
flxapps Feb 16, 2026
d99c6a6
ci: add mtrust-api-guard job to workflows for enhanced verification i…
flxapps Feb 16, 2026
1ea1ebd
chore: add .vscode/settings.json to .gitignore
flxapps Feb 16, 2026
3ffcb3f
ci: initial commit for api-guard-generated files
flxapps Feb 16, 2026
50be5f7
docs: update documentation while resolving linter issues
flxapps Feb 16, 2026
5d1da86
chore: add api_guard exclusion for example directory in analysis_opti…
flxapps Feb 16, 2026
ab1263f
chore: add pre_release parameter to api-guard job in PR workflow
flxapps Feb 16, 2026
3ac6be8
chore: remove condition to skip api-guard for dependabot in workflow …
flxapps Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 10 additions & 65 deletions .github/workflows/build_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,13 @@ on:
- dev

jobs:
version:
name: Version & Build
validate:
name: Validate Package
runs-on: macos-latest
environment: release
permissions:
contents: write

outputs:
version: ${{ steps.get_new_version.outputs.result}}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{secrets.ELEVATED_TOKEN}}

- name: 📇 Configure git
run: |
git fetch --prune --unshallow
git config --global user.name "GitHub Actions"
git config --global user.email "gh-actions@merckgroup.com"
shell: bash

# Retrieve the new version
- name: 🔂 Run standard-version
uses: actions/github-script@v7
with:
script: |
const {execSync} = require('child_process');
execSync('npx standard-version --skip.tag --prerelease', {stdio: 'inherit'});

# Retrieve the new version
- name: ⏎ Get new version
uses: actions/github-script@v7
id: get_new_version
with:
result-encoding: string
script: |
const fs = require('fs');
const package = JSON.parse(fs.readFileSync('package.json', 'utf8'));
return package.version;

- name: Print new version
run: echo ${{ steps.get_new_version.outputs.result}}

# Bump the pubspec.yaml file
- name: ⬆️ Bump pubspec.yaml
uses: emdgroup/mtrust-urp/.github/shared_actions/update-pubspec@dev
with:
version: ${{ steps.get_new_version.outputs.result }}
directory: .

- name: 📝 Update version in readme
uses: emdgroup/mtrust-urp/.github/shared_actions/update-pubspec-readme-version@dev
with:
directory: .

- name: Setup Dart
uses: dart-lang/setup-dart@v1
Expand All @@ -82,17 +33,11 @@ jobs:
with:
directory: "."

# We first commit with proper message and add an empty commit to keep the files history clean
- name: Update repo versions
run: |
git add .
git commit -m "chore(release): ${{ steps.get_new_version.outputs.result }}"
git commit --allow-empty -m "chore(release): ${{ steps.get_new_version.outputs.result }} [skip ci]"
git push origin dev

# For this part it is important to not push a commit with [skip ci] before the tag release
- name: Push tag for pub.dev
run: |
git commit --allow-empty -m "chore(release): ${{ steps.get_new_version.outputs.result }}"
git tag -a v${{ steps.get_new_version.outputs.result }} -m "Pub.dev version ${{ steps.get_new_version.outputs.result }}"
git push origin v${{ steps.get_new_version.outputs.result }}
api-guard:
needs: validate
uses: emdgroup/mtrust-api-guard/.github/workflows/publish_workflow.yaml@main
with:
git_push_branch: dev
git_push: true
pre_release: true
secrets: inherit
76 changes: 10 additions & 66 deletions .github/workflows/build_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,62 +6,13 @@ on:
- main

jobs:
version:
name: Version & Build
validate:
name: Validate Package
runs-on: macos-latest
environment: release
permissions:
contents: write

outputs:
version: ${{ steps.get_new_version.outputs.result}}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{secrets.ELEVATED_TOKEN}}

- name: 📇 Configure git
run: |
git fetch --prune --unshallow
git config --global user.name "GitHub Actions"
git config --global user.email "gh-actions@merckgroup.com"
shell: bash

# Retrieve the new version
- name: 🔂 Run standard-version
uses: actions/github-script@v7
with:
script: |
const {execSync} = require('child_process');
execSync('npx standard-version --skip.tag', {stdio: 'inherit'});

# Retrieve the new version
- name: ⏎ Get new version
uses: actions/github-script@v7
id: get_new_version
with:
result-encoding: string
script: |
const fs = require('fs');
const package = JSON.parse(fs.readFileSync('package.json', 'utf8'));
return package.version;

- name: Print new version
run: echo ${{ steps.get_new_version.outputs.result}}

# Bump the pubspec.yaml file
- name: ⬆️ Bump pubspec.yaml
uses: emdgroup/mtrust-urp/.github/shared_actions/update-pubspec@main
with:
version: ${{ steps.get_new_version.outputs.result }}
directory: .

- name: 📝 Update version in readme
uses: emdgroup/mtrust-urp/.github/shared_actions/update-pubspec-readme-version@main
with:
directory: .

- name: Setup Dart
uses: dart-lang/setup-dart@v1
Expand All @@ -82,24 +33,17 @@ jobs:
with:
directory: "."

# We first commit with proper message and add an empty commit to keep the files history clean
- name: Update repo versions
run: |
git add .
git commit -m "chore(release): ${{ steps.get_new_version.outputs.result }}"
git commit --allow-empty -m "chore(release): ${{ steps.get_new_version.outputs.result }} [skip ci]"
git push origin main

# For this part it is important to not push a commit with [skip ci] before the tag release
- name: Push tag for pub.dev
run: |
git commit --allow-empty -m "chore(release): ${{ steps.get_new_version.outputs.result }}"
git tag -a v${{ steps.get_new_version.outputs.result }} -m "Pub.dev version ${{ steps.get_new_version.outputs.result }}"
git push origin v${{ steps.get_new_version.outputs.result }}
api-guard:
needs: validate
uses: emdgroup/mtrust-api-guard/.github/workflows/publish_workflow.yaml@main
with:
git_push_branch: main
git_push: true
secrets: inherit

rebase_dev:
name: Write changes to dev branch
needs: [version]
needs: [api-guard]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pr_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,8 @@ jobs:
uses: emdgroup/mtrust-urp/.github/shared_actions/check-dart-licenses@dev
with:
directory: .

api-guard:
uses: emdgroup/mtrust-api-guard/.github/workflows/pr_workflow.yaml@main
with:
pre_release: true
3 changes: 3 additions & 0 deletions .github/workflows/pr_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ jobs:
uses: emdgroup/mtrust-urp/.github/shared_actions/check-dart-licenses@main
with:
directory: .

api-guard:
uses: emdgroup/mtrust-api-guard/.github/workflows/pr_workflow.yaml@main
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ test/failures
**/GeneratedPluginRegistrant.swift
**/generated_plugin_registrant.cc
**/generated_plugin_registrant.h
**/generated_plugins.cmake
**/generated_plugins.cmake
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ To display the SEC Modal, utilize the `SecModalBuilder` widget. It requires a co
strategy: _connectionStrategy,
payload: // Payload,
onVerificationDone: (mesurement) {},
onVerificationFailed: () {},
onVerificationFailed: (exception) {
// Handle verification failure. The exception provides details about the cause.
},
onDismiss: (){ } // Optionally
canDismiss: true, // Define whether the user can dismiss the modal
builder: (context, openModal) {
Expand Down
6 changes: 5 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ analyzer:
exclude:
- "lib/src/**/*.g.dart"
- "lib/src/**/*.freezed.dart"
- "lib/src/ui/l10n/*.dart"
- "lib/src/ui/l10n/*.dart"

api_guard:
exclude:
- "example/**"
7 changes: 3 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import 'package:example/virtual_strategy.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:mtrust_sec_kit/mtrust_sec_kit.dart';

import 'package:liquid_flutter/liquid_flutter.dart';
import 'package:mtrust_sec_kit/mtrust_sec_kit.dart';
import 'package:mtrust_urp_ble_strategy/mtrust_urp_ble_strategy.dart';

void main() {
Expand Down Expand Up @@ -102,8 +101,8 @@ class _MainAppState extends State<MainApp> {
onVerificationDone: (measurement) {
debugPrint("Verification done ${measurement.measurement}");
},
onVerificationFailed: () {
debugPrint("Verification failed");
onVerificationFailed: (exception) {
debugPrint("Verification failed: $exception");
},
builder: (context, openModal) {
return LdButton(
Expand Down
Loading