@ledgerhq/device-core 0.1.2-nightly.0 → 0.1.2-nightly.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +13 -0
- package/lib/capabilities/isEditDeviceNameSupported.d.ts.map +1 -1
- package/lib/capabilities/isEditDeviceNameSupported.js +6 -1
- package/lib/capabilities/isEditDeviceNameSupported.js.map +1 -1
- package/lib/capabilities/isEditDeviceNameSupported.test.js +7 -2
- package/lib/capabilities/isEditDeviceNameSupported.test.js.map +1 -1
- package/lib-es/capabilities/isEditDeviceNameSupported.d.ts.map +1 -1
- package/lib-es/capabilities/isEditDeviceNameSupported.js +6 -1
- package/lib-es/capabilities/isEditDeviceNameSupported.js.map +1 -1
- package/lib-es/capabilities/isEditDeviceNameSupported.test.js +7 -2
- package/lib-es/capabilities/isEditDeviceNameSupported.test.js.map +1 -1
- package/package.json +2 -2
- package/src/capabilities/isEditDeviceNameSupported.test.ts +8 -2
- package/src/capabilities/isEditDeviceNameSupported.ts +6 -1
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @ledgerhq/device-core
|
|
2
2
|
|
|
3
|
+
## 0.1.2-nightly.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`83e5690`](https://github.com/LedgerHQ/ledger-live/commit/83e5690429e41ecd1c508b3398904ae747085cf7)]:
|
|
8
|
+
- @ledgerhq/types-live@6.46.1-nightly.1
|
|
9
|
+
|
|
10
|
+
## 0.1.2-nightly.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#6733](https://github.com/LedgerHQ/ledger-live/pull/6733) [`bfca25b`](https://github.com/LedgerHQ/ledger-live/commit/bfca25b975e00c057da3a7ec82a9b05a0e5d5cf7) Thanks [@ofreyssinet-ledger](https://github.com/ofreyssinet-ledger)! - Device renaming: add Nano S Plus compatibility
|
|
15
|
+
|
|
3
16
|
## 0.1.2-nightly.0
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEditDeviceNameSupported.d.ts","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"isEditDeviceNameSupported.d.ts","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,aAAa,WAOrE"}
|
|
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.isEditDeviceNameSupported = void 0;
|
|
4
4
|
const devices_1 = require("@ledgerhq/devices");
|
|
5
5
|
function isEditDeviceNameSupported(deviceModelId) {
|
|
6
|
-
return [
|
|
6
|
+
return [
|
|
7
|
+
devices_1.DeviceModelId.nanoX,
|
|
8
|
+
devices_1.DeviceModelId.nanoSP,
|
|
9
|
+
devices_1.DeviceModelId.stax,
|
|
10
|
+
devices_1.DeviceModelId.europa,
|
|
11
|
+
].includes(deviceModelId);
|
|
7
12
|
}
|
|
8
13
|
exports.isEditDeviceNameSupported = isEditDeviceNameSupported;
|
|
9
14
|
//# sourceMappingURL=isEditDeviceNameSupported.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEditDeviceNameSupported.js","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAElD,SAAgB,yBAAyB,CAAC,aAA4B;IACpE,OAAO,CAAC,uBAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"isEditDeviceNameSupported.js","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAElD,SAAgB,yBAAyB,CAAC,aAA4B;IACpE,OAAO;QACL,uBAAa,CAAC,KAAK;QACnB,uBAAa,CAAC,MAAM;QACpB,uBAAa,CAAC,IAAI;QAClB,uBAAa,CAAC,MAAM;KACrB,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC5B,CAAC;AAPD,8DAOC"}
|
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const devices_1 = require("@ledgerhq/devices");
|
|
4
4
|
const isEditDeviceNameSupported_1 = require("./isEditDeviceNameSupported");
|
|
5
|
-
const supportedDevices = [
|
|
6
|
-
|
|
5
|
+
const supportedDevices = [
|
|
6
|
+
devices_1.DeviceModelId.stax,
|
|
7
|
+
devices_1.DeviceModelId.nanoX,
|
|
8
|
+
devices_1.DeviceModelId.europa,
|
|
9
|
+
devices_1.DeviceModelId.nanoSP,
|
|
10
|
+
];
|
|
11
|
+
const unsupportedDevices = [devices_1.DeviceModelId.blue];
|
|
7
12
|
describe("isEditDeviceNameSupported", () => {
|
|
8
13
|
it("should return true for supported devices", () => {
|
|
9
14
|
supportedDevices.forEach((deviceModelId) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEditDeviceNameSupported.test.js","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.test.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,2EAAwE;AAExE,MAAM,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"isEditDeviceNameSupported.test.js","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.test.ts"],"names":[],"mappings":";;AAAA,+CAAkD;AAClD,2EAAwE;AAExE,MAAM,gBAAgB,GAAG;IACvB,uBAAa,CAAC,IAAI;IAClB,uBAAa,CAAC,KAAK;IACnB,uBAAa,CAAC,MAAM;IACpB,uBAAa,CAAC,MAAM;CACrB,CAAC;AACF,MAAM,kBAAkB,GAAG,CAAC,uBAAa,CAAC,IAAI,CAAC,CAAC;AAEhD,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,gBAAgB,CAAC,OAAO,CAAC,CAAC,aAA4B,EAAE,EAAE;YACxD,MAAM,CAAC,IAAA,qDAAyB,EAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,kBAAkB,CAAC,OAAO,CAAC,CAAC,aAA4B,EAAE,EAAE;YAC1D,MAAM,CAAC,IAAA,qDAAyB,EAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEditDeviceNameSupported.d.ts","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"isEditDeviceNameSupported.d.ts","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,aAAa,WAOrE"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { DeviceModelId } from "@ledgerhq/devices";
|
|
2
2
|
export function isEditDeviceNameSupported(deviceModelId) {
|
|
3
|
-
return [
|
|
3
|
+
return [
|
|
4
|
+
DeviceModelId.nanoX,
|
|
5
|
+
DeviceModelId.nanoSP,
|
|
6
|
+
DeviceModelId.stax,
|
|
7
|
+
DeviceModelId.europa,
|
|
8
|
+
].includes(deviceModelId);
|
|
4
9
|
}
|
|
5
10
|
//# sourceMappingURL=isEditDeviceNameSupported.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEditDeviceNameSupported.js","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,UAAU,yBAAyB,CAAC,aAA4B;IACpE,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"isEditDeviceNameSupported.js","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,UAAU,yBAAyB,CAAC,aAA4B;IACpE,OAAO;QACL,aAAa,CAAC,KAAK;QACnB,aAAa,CAAC,MAAM;QACpB,aAAa,CAAC,IAAI;QAClB,aAAa,CAAC,MAAM;KACrB,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { DeviceModelId } from "@ledgerhq/devices";
|
|
2
2
|
import { isEditDeviceNameSupported } from "./isEditDeviceNameSupported";
|
|
3
|
-
const supportedDevices = [
|
|
4
|
-
|
|
3
|
+
const supportedDevices = [
|
|
4
|
+
DeviceModelId.stax,
|
|
5
|
+
DeviceModelId.nanoX,
|
|
6
|
+
DeviceModelId.europa,
|
|
7
|
+
DeviceModelId.nanoSP,
|
|
8
|
+
];
|
|
9
|
+
const unsupportedDevices = [DeviceModelId.blue];
|
|
5
10
|
describe("isEditDeviceNameSupported", () => {
|
|
6
11
|
it("should return true for supported devices", () => {
|
|
7
12
|
supportedDevices.forEach((deviceModelId) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isEditDeviceNameSupported.test.js","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"isEditDeviceNameSupported.test.js","sourceRoot":"","sources":["../../src/capabilities/isEditDeviceNameSupported.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,gBAAgB,GAAG;IACvB,aAAa,CAAC,IAAI;IAClB,aAAa,CAAC,KAAK;IACnB,aAAa,CAAC,MAAM;IACpB,aAAa,CAAC,MAAM;CACrB,CAAC;AACF,MAAM,kBAAkB,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAEhD,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QAClD,gBAAgB,CAAC,OAAO,CAAC,CAAC,aAA4B,EAAE,EAAE;YACxD,MAAM,CAAC,yBAAyB,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,kBAAkB,CAAC,OAAO,CAAC,CAAC,aAA4B,EAAE,EAAE;YAC1D,MAAM,CAAC,yBAAyB,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/device-core",
|
|
3
|
-
"version": "0.1.2-nightly.
|
|
3
|
+
"version": "0.1.2-nightly.2",
|
|
4
4
|
"description": "Ledger Live device core module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@ledgerhq/hw-transport": "^6.30.6",
|
|
26
26
|
"@ledgerhq/logs": "^6.12.0",
|
|
27
27
|
"@ledgerhq/devices": "^8.3.0",
|
|
28
|
-
"@ledgerhq/types-live": "^6.46.1-nightly.
|
|
28
|
+
"@ledgerhq/types-live": "^6.46.1-nightly.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@testing-library/react": "14",
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { DeviceModelId } from "@ledgerhq/devices";
|
|
2
2
|
import { isEditDeviceNameSupported } from "./isEditDeviceNameSupported";
|
|
3
3
|
|
|
4
|
-
const supportedDevices = [
|
|
5
|
-
|
|
4
|
+
const supportedDevices = [
|
|
5
|
+
DeviceModelId.stax,
|
|
6
|
+
DeviceModelId.nanoX,
|
|
7
|
+
DeviceModelId.europa,
|
|
8
|
+
DeviceModelId.nanoSP,
|
|
9
|
+
];
|
|
10
|
+
const unsupportedDevices = [DeviceModelId.blue];
|
|
6
11
|
|
|
7
12
|
describe("isEditDeviceNameSupported", () => {
|
|
8
13
|
it("should return true for supported devices", () => {
|
|
@@ -10,6 +15,7 @@ describe("isEditDeviceNameSupported", () => {
|
|
|
10
15
|
expect(isEditDeviceNameSupported(deviceModelId)).toBe(true);
|
|
11
16
|
});
|
|
12
17
|
});
|
|
18
|
+
|
|
13
19
|
it("should return false for unsupported devices", () => {
|
|
14
20
|
unsupportedDevices.forEach((deviceModelId: DeviceModelId) => {
|
|
15
21
|
expect(isEditDeviceNameSupported(deviceModelId)).toBe(false);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { DeviceModelId } from "@ledgerhq/devices";
|
|
2
2
|
|
|
3
3
|
export function isEditDeviceNameSupported(deviceModelId: DeviceModelId) {
|
|
4
|
-
return [
|
|
4
|
+
return [
|
|
5
|
+
DeviceModelId.nanoX,
|
|
6
|
+
DeviceModelId.nanoSP,
|
|
7
|
+
DeviceModelId.stax,
|
|
8
|
+
DeviceModelId.europa,
|
|
9
|
+
].includes(deviceModelId);
|
|
5
10
|
}
|