mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-02-19 16:22:25 +01:00
feat(connect-data): separate new package from connect-common
This commit is contained in:
committed by
Tomáš Martykán
parent
2be4887662
commit
b25906f1f4
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -8,8 +8,8 @@ packages/suite-data/files/bin/tor/mac-*/*.dylib filter=lfs diff=lfs merge=lfs -t
|
||||
packages/suite-data/files/bin/tor/mac-*/tor filter=lfs diff=lfs merge=lfs -text
|
||||
packages/suite-data/files/bin/tor/win-*/*.dll filter=lfs diff=lfs merge=lfs -text
|
||||
packages/suite-data/files/bin/tor/win-*/tor.exe filter=lfs diff=lfs merge=lfs -text
|
||||
packages/connect-common/files/firmware/*/*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
packages/connect-common/files/devkit/firmware/*/*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
packages/connect-data/files/firmware/*/*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
packages/connect-data/files/devkit/firmware/*/*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
packages/suite-data/files/bin/coinjoin/linux-arm64/WalletWasabi.WabiSabiClientLibrary filter=lfs diff=lfs merge=lfs -text
|
||||
packages/suite-data/files/bin/coinjoin/linux-x64/WalletWasabi.WabiSabiClientLibrary filter=lfs diff=lfs merge=lfs -text
|
||||
packages/suite-data/files/bin/coinjoin/osx-arm64/WalletWasabi.WabiSabiClientLibrary filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
@@ -17,6 +17,7 @@ inputs:
|
||||
- blockchain-link-utils
|
||||
- blockchain-link
|
||||
- connect-common
|
||||
- connect-data
|
||||
- transport
|
||||
- utils
|
||||
- utxo-lib
|
||||
|
||||
2
.github/actions/release-connect/action.yml
vendored
2
.github/actions/release-connect/action.yml
vendored
@@ -41,7 +41,7 @@ runs:
|
||||
# Pull only files needed for connect to save LFS bandwidth
|
||||
- name: "Pull LFS files for connect"
|
||||
shell: bash
|
||||
run: git lfs pull --include "packages/connect-common/files/**/*"
|
||||
run: git lfs pull --include "packages/connect-data/files/**/*"
|
||||
|
||||
- name: Configure aws credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
|
||||
6
.github/workflows/check-code-validation.yml
vendored
6
.github/workflows/check-code-validation.yml
vendored
@@ -186,8 +186,8 @@ jobs:
|
||||
with:
|
||||
filters: |
|
||||
releases-json:
|
||||
- 'packages/connect-common/files/firmware/t1b1/releases.json'
|
||||
- 'packages/connect-common/files/firmware/t2t1/releases.json'
|
||||
- 'packages/connect-data/files/firmware/t1b1/releases.json'
|
||||
- 'packages/connect-data/files/firmware/t2t1/releases.json'
|
||||
- name: "Checkout branches for Nx"
|
||||
if: steps.changes.outputs.releases-json == 'true'
|
||||
uses: ./.github/actions/nx-checkout
|
||||
@@ -197,4 +197,4 @@ jobs:
|
||||
|
||||
- name: Check releases.json revisions
|
||||
if: steps.changes.outputs.releases-json == 'true'
|
||||
run: yarn workspace @trezor/connect-common validate-releases.json
|
||||
run: yarn workspace @trezor/connect-data validate-releases.json
|
||||
|
||||
1
.github/workflows/test-connect-popup.yml
vendored
1
.github/workflows/test-connect-popup.yml
vendored
@@ -15,6 +15,7 @@ on:
|
||||
paths:
|
||||
- "packages/connect/**"
|
||||
- "packages/connect-common/**"
|
||||
- "packages/connect-data/**"
|
||||
- "packages/connect-explorer/**"
|
||||
- "packages/connect-web/**"
|
||||
- "packages/connect-explorer-theme/**"
|
||||
|
||||
1
.github/workflows/test-connect.yml
vendored
1
.github/workflows/test-connect.yml
vendored
@@ -11,6 +11,7 @@ on:
|
||||
paths:
|
||||
- "packages/blockchain-link/**"
|
||||
- "packages/connect-common/**"
|
||||
- "packages/connect-data/**"
|
||||
- "packages/connect-web/**"
|
||||
- "packages/connect/**"
|
||||
- "packages/protobuf/**"
|
||||
|
||||
1
.github/workflows/test-suite-web-e2e-pr.yml
vendored
1
.github/workflows/test-suite-web-e2e-pr.yml
vendored
@@ -20,6 +20,7 @@ on:
|
||||
- "packages/react-native-usb/**"
|
||||
# ignore unrelated github workflows config files
|
||||
- ".github/workflows/connect-common"
|
||||
- ".github/workflows/connect-data"
|
||||
- ".github/workflows/connect-examples"
|
||||
- ".github/workflows/connect-explorer"
|
||||
- ".github/workflows/connect-mobile"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## The pipeline
|
||||
|
||||
Do not change `@trezor/connect-common/files/coins.json` manually.
|
||||
Do not change `@trezor/connect-data/files/coins.json` manually.
|
||||
|
||||
The one and only source of truth are `*.json` definitions declared and maintained in the [firmware repository](https://github.com/trezor/trezor-firmware/tree/main/common/defs).
|
||||
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
|
||||
1. After the signing FW has been tested by QA in Test Signed environment.
|
||||
|
||||
1. Add new firmwares along with each firmware release JSON file from repository [trezor/data](https://github.com/trezor/data) to `packages/connect-common/files/firmware/*` and remove the current ones
|
||||
1. Add new firmwares along with each firmware release JSON file from repository [trezor/data](https://github.com/trezor/data) to `packages/connect-data/files/firmware/*` and remove the current ones
|
||||
|
||||
1. Remove older binaries so they are not bundled in the desktop app any more, but always keep:
|
||||
- the intermediary FW for T1B1 [packages/connect-common/files/firmware/t1b1/trezor-inter-v{1 | 2 | 3}.bin](https://github.com/trezor/trezor-suite/blob/develop/packages/connect-common/files/firmware/t1b1/trezor-inter-v1.bin)
|
||||
- and 2.1.1 for T2T1 [packages/connect-common/files/firmware/t2t1/trezor-2.1.1.bin](https://github.com/trezor/trezor-suite/blob/develop/packages/connect-common/files/firmware/t2t1/trezor-2.1.1.bin)
|
||||
- the intermediary FW for T1B1 [packages/connect-data/files/firmware/t1b1/trezor-inter-v{1 | 2 | 3}.bin](https://github.com/trezor/trezor-suite/blob/develop/packages/connect-data/files/firmware/t1b1/trezor-inter-v1.bin)
|
||||
- and 2.1.1 for T2T1 [packages/connect-data/files/firmware/t2t1/trezor-2.1.1.bin](https://github.com/trezor/trezor-suite/blob/develop/packages/connect-data/files/firmware/t2t1/trezor-2.1.1.bin)
|
||||
|
||||
1. Once new firmwares and releases JSON are added and old firmwares are removed you can proceed with running script `yarn tsx packages/connect-common/scripts/generate-firmware-index.ts` that will update the file `packages/connect-common/src/map-releases.ts`.
|
||||
1. Once new firmwares and releases JSON are added and old firmwares are removed you can proceed with running script `yarn tsx packages/connect-data/scripts/generate-firmware-index.ts` that will update the file `packages/connect-data/src/map-releases.ts`.
|
||||
|
||||
1. Update `packages/connect-common/files/firmware/release/releases.v1.json` to be mapped to the latest FW. Make sure the sequence is higher than the one in `https://github.com/trezor/trezor-suite-firmware-release/blob/main/releases/production/releases.v1.json` if you want it to be used.
|
||||
1. Update `packages/connect-data/files/firmware/release/releases.v1.json` to be mapped to the latest FW. Make sure the sequence is higher than the one in `https://github.com/trezor/trezor-suite-firmware-release/blob/main/releases/production/releases.v1.json` if you want it to be used.
|
||||
|
||||
1. If you have completed the points above you should have something like [19be9a7](https://github.com/trezor/trezor-suite/commit/19be9a7521699a6b3c05c220cc8a1850a2c963fa).
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ const getFeatures = (device: Device) =>
|
||||
const fwUpdate = (device: Device) =>
|
||||
TrezorConnect.firmwareUpdate({
|
||||
device,
|
||||
baseUrl: path.resolve(__dirname, '../connect-common/files'),
|
||||
baseUrl: path.resolve(__dirname, '../connect-data/files'),
|
||||
});
|
||||
|
||||
const runTestCase = async (device: Device) => {
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
"files": [
|
||||
"lib/",
|
||||
"libESM/",
|
||||
"files/**/*.json",
|
||||
"files/**/*.txt",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"publishConfig": {
|
||||
@@ -35,7 +33,6 @@
|
||||
"types": "./lib/index.d.ts"
|
||||
},
|
||||
"./lib/*": "./lib/*.js",
|
||||
"./files/*": "./files/*",
|
||||
"./libESM/*.js": "./libESM/*.js"
|
||||
}
|
||||
},
|
||||
@@ -45,7 +42,6 @@
|
||||
"build:lib:esm": "yarn g:rimraf ./libESM && yarn g:tsc --build tsconfig.libESM.json && ../../scripts/publish/replace-imports.sh ./libESM esm",
|
||||
"type-check": "yarn g:tsc --build tsconfig.json",
|
||||
"prepublishOnly": "yarn tsx ../../scripts/publish/prepublishNPM.js",
|
||||
"validate-releases.json": "./scripts/check-all-firmware-revisions.sh",
|
||||
"depcheck": "yarn g:depcheck"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -3,4 +3,3 @@ export * from './messageChannel/window-window';
|
||||
export * from './messageChannel/serviceworker-window';
|
||||
export * from './messageChannel/window-serviceworker';
|
||||
export * from './systemInfo';
|
||||
export * from './map-releases';
|
||||
|
||||
50
packages/connect-data/LICENSE.md
Normal file
50
packages/connect-data/LICENSE.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# TREZOR REFERENCE SOURCE LICENSE (T-RSL)
|
||||
|
||||
This license governs use of the accompanying software. If you use the software,
|
||||
you accept this license. If you do not accept the license, do not use the
|
||||
software.
|
||||
|
||||
## 1. Definitions
|
||||
|
||||
The terms "reproduce," "reproduction" and "distribution" have the same meaning
|
||||
here as under U.S. copyright law.
|
||||
|
||||
"You" means the licensee of the software.
|
||||
|
||||
"Your company" means the company you worked for when you downloaded the
|
||||
software.
|
||||
|
||||
"Reference use" means use of the software within your company as a reference,
|
||||
in read only form, for the sole purposes of debugging your products,
|
||||
maintaining your products, or enhancing the interoperability of your products
|
||||
with the software, and specifically excludes the right to distribute the
|
||||
software outside of your company.
|
||||
|
||||
"Licensed patents" means any Licensor patent claims which read directly on the
|
||||
software as distributed by the Licensor under this license.
|
||||
|
||||
## 2. Grant of Rights
|
||||
|
||||
(A) Copyright Grant - Subject to the terms of this license, the Licensor grants
|
||||
you a non-transferable, non-exclusive, worldwide, royalty-free copyright
|
||||
license to reproduce the software for reference use.
|
||||
|
||||
(B) Patent Grant - Subject to the terms of this license, the Licensor grants
|
||||
you a non-transferable, non-exclusive, worldwide, royalty-free patent license
|
||||
under licensed patents for reference use.
|
||||
|
||||
## 3. Limitations
|
||||
|
||||
(A) No Trademark License - This license does not grant you any rights to use
|
||||
the Licensor's name, logo, or trademarks.
|
||||
|
||||
(B) If you begin patent litigation against the Licensor over patents that you
|
||||
think may apply to the software (including a cross-claim or counterclaim in
|
||||
a lawsuit), your license to the software ends automatically.
|
||||
|
||||
(C) The software is licensed "as-is." You bear the risk of using it. The
|
||||
Licensor gives no express warranties, guarantees or conditions. You may have
|
||||
additional consumer rights under your local laws which this license cannot
|
||||
change. To the extent permitted under your local laws, the Licensor excludes
|
||||
the implied warranties of merchantability, fitness for a particular purpose and
|
||||
non-infringement.
|
||||
18
packages/connect-data/README.md
Normal file
18
packages/connect-data/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# @trezor/connect-data
|
||||
|
||||
[](https://www.npmjs.org/package/@trezor/connect-data)
|
||||
[](https://snyk.io/test/github/trezor/trezor-suite/badge.svg?targetFile=packages/connect-data/package.json)
|
||||
|
||||
Data used by @trezor/connect\* packages.
|
||||
|
||||
## files
|
||||
|
||||
### bridge
|
||||
|
||||
Data in `releases.json` are used to determine which version of Bridge to use depending on the user's operating system.
|
||||
|
||||
### firmware
|
||||
|
||||
Binaries of the latest versions of firmware for each Trezor model are included in this package so that they are available to users of Suite desktop app without connecting to the internet. The process of bundling new firmwares is described [here](../../docs/releases/bundling-new-firmwares.md). Besides the latest versions, T1B1 and T2T1 both require a transitory version for upgrading from old firmware (intermediary firmware `trezor-inter-1.10.0.bin` for T1B1 and version `trezor-2.1.1.bin` for T2T1).
|
||||
|
||||
There is a `releases.json` file for each Trezor model which must be updated any time new binaries are added. This file provides data about all available firmware versions and it is used to display them in Suite and to make sure that the correct firmware is downloaded. Read more about `releases.json` and it's structure [here](../../docs/releases/adding-new-firmwares.md#firmware-releasesjson-files-structure)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user