Skip to content

Commit

Permalink
Merge pull request #30 from LedgerHQ/improve-plugin-support
Browse files Browse the repository at this point in the history
Improve support for plugins
  • Loading branch information
agrojean-ledger authored Feb 14, 2024
2 parents 0dc0854 + 790703c commit 96e1a8c
Show file tree
Hide file tree
Showing 9 changed files with 700 additions and 282 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0]

### Added

* New setting to allow / deny device operations on Nano X (denied by default).
* Support parsing of `test.dependencies` fields from the [app manifest specification](https://github.com/LedgerHQ/ledgered/blob/master/doc/utils/manifest.md). Speed up the setup for running functional tests by automating the clone/build of tests dependencies when needed.
* Add button to rebuild test dependencies (if any) in treeview.

### Changed

* Refactor of `appSelected.ts` for better maintainability.

### Fixed

* Replace TOML parsing package (previous one couldn't parse 1.0.0 TOML)
* Update Udev rules for sideloading following hidapi python package update. Display warning message when rules need to be updated.
* Wording in some tree view items.

## [0.4.0]

### Added
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,25 @@ This extension contributes the following settings:
* `ledgerDevTools.onboardingPin`: Set the device quick onboarding PIN code.
* `ledgerDevTools.onboardingSeed`: Set the device quick onboarding 24-word Seed phrase.
* `ledgerDevTools.dockerImage`: Set the Ledger developer tools Docker image.
* `ledgerDevTools.additionalDepsPerApp`: Add dependencies for current app's functional tests (for instance 'apk add python3-protobuf').
* `ledgerDevTools.additionalReqsPerApp`: Add prerequisites for current app's functional tests (for instance 'apk add python3-protobuf').
* `ledgerDevTools.keepContainerTerminal`: Indicates to keep the Terminal window opened after a successful Container Update.
* `ledgerDevTools.containerUpdateRetries`: Set the max number of Container Update retries.
* `ledgerDevTools.userScpPrivateKey`: Use the host's `SCP_PRIVKEY` environment variable when loading/deleting app on device. Cf. <https://developers.ledger.com/docs/embedded-app/pin-bypass>
* `ledgerDevTools.defaultDevice`: Select the default Device
* `ledgerDevTools.enableDeviceOpsForNanoX`: Allow device operations on Nano X (requires special development device)

## Release Notes

## 0.5.0

* New setting to allow / deny device operations on Nano X (denied by default).
* Support parsing of `test.dependencies` fields from the [app manifest specification](https://github.com/LedgerHQ/ledgered/blob/master/doc/utils/manifest.md). Speed up the setup for running functional tests by automating the clone/build of tests dependencies when needed.
* Add button to rebuild test dependencies (if any) in treeview.
* Refactor of `appSelected.ts` for better maintainability.
* Replace TOML parsing package (previous one couldn't parse 1.0.0 TOML)
* Update Udev rules for sideloading following hidapi python package update. Display warning message when rules need to be updated.
* Wording in some tree view items.

## 0.4.0

* Add "select all targets" command with a button in the main tree view.
Expand Down
31 changes: 15 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 57 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ledger-dev-tools",
"displayName": "Ledger Dev Tools",
"description": "Tools to accelerate development of apps for Ledger devices.",
"version": "0.4.0",
"version": "0.5.0",
"publisher": "LedgerHQ",
"license": "Apache",
"icon": "resources/ledger-square.png",
Expand All @@ -21,14 +21,29 @@
],
"main": "./dist/extension.js",
"contributes": {
"menus":{
"view/item/context": [
{
"command": "toggleAllTargets",
"when": "view == mainView && viewItem == selectTarget && ledgerDevTools.showToggleAllTargets",
"group": "inline"
}
]
"menus": {
"view/item/context": [
{
"command": "toggleAllTargets",
"when": "view == mainView && viewItem == selectTarget && ledgerDevTools.showToggleAllTargets",
"group": "inline"
},
{
"command": "selectTestUseCase",
"when": "view == mainView && viewItem == functionalTests && ledgerDevTools.showSelectTestUseCase",
"group": "inline"
},
{
"command": "rebuildTestUseCaseDeps",
"when": "view == mainView && viewItem == functionalTests && ledgerDevTools.showRebuildTestUseCaseDeps",
"group": "inline"
},
{
"command": "rebuildTestUseCaseDepsSpin",
"when": "view == mainView && viewItem == functionalTests && ledgerDevTools.showrebuildTestUseCaseDepsSpin",
"group": "inline"
}
]
},
"taskDefinitions": [
{
Expand Down Expand Up @@ -86,14 +101,38 @@
"icon": "$(check-all)",
"enablement": "ledgerDevTools.showToggleAllTargets"
},
{
"command": "selectTestUseCase",
"title": "Select test use case",
"category": "Ledger",
"tooltip": "Select the test use case you want to run, when manifest contains multiple test use cases.",
"icon": "$(selection)",
"enablement": "ledgerDevTools.showSelectTestUseCase"
},
{
"command": "rebuildTestUseCaseDeps",
"title": "Rebuild test use case dependencies",
"category": "Ledger",
"tooltip": "Rebuild the dependencies for the selected test use case.",
"icon": "$(sync)",
"enablement": "ledgerDevTools.showRebuildTestUseCaseDeps"
},
{
"command": "rebuildTestUseCaseDepsSpin",
"title": "Building test dependencies...",
"category": "Ledger",
"tooltip": "Rebuild the dependencies for the selected test use case.",
"icon": "$(sync~spin)",
"enablement": "ledgerDevTools.showrebuildTestUseCaseDepsSpin"
},
{
"command": "showAppList",
"title": "Select app",
"category": "Ledger",
"tooltip": "Select the app you want to build."
},
{
"command": "additionalDepsPerApp",
"command": "additionalReqsPerApp",
"title": "Add test dependencies",
"category": "Ledger",
"tooltip": "Add additional test dependencies to install for selected app."
Expand All @@ -117,13 +156,13 @@
"default": "glory promote mansion idle axis finger extra february uncover one trip resource lawn turtle enact monster seven myth punch hobby comfort wild raise skin",
"markdownDescription": "Device quick onboarding default 24-word Seed phrase."
},
"ledgerDevTools.additionalDepsPerApp": {
"ledgerDevTools.additionalReqsPerApp": {
"type": "object",
"default": {
"app-boilerplate": "apk add gcc musl-dev python3-dev"
},
"scope": "application",
"description": "Additional dependencies to install for each app."
"description": "Additional functional tests prerequisites to install in the current app's docker container."
},
"ledgerDevTools.keepContainerTerminal": {
"type": "boolean",
Expand All @@ -150,6 +189,11 @@
"Stax"
],
"markdownDescription": "Select the default Device"
},
"ledgerDevTools.enableDeviceOpsForNanoX": {
"type": "boolean",
"default": false,
"markdownDescription": "Allow device operations on Nano X (requires special development device)"
}
}
}
Expand All @@ -166,6 +210,7 @@
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@ltd/j-toml": "^1.38.0",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/node": "20.2.5",
Expand All @@ -177,7 +222,6 @@
"fast-glob": "^3.3.0",
"glob": "^8.1.0",
"mocha": "^10.2.0",
"toml": "^3.0.0",
"ts-loader": "^9.4.3",
"typescript": "^5.1.3",
"webpack": "^5.85.0",
Expand Down
Loading

0 comments on commit 96e1a8c

Please sign in to comment.