@ledgerhq/device-management-kit 0.12.0 → 0.13.0
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/lib/cjs/package.json +1 -1
- package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js +1 -1
- package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.js.map +3 -3
- package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js +1 -1
- package/lib/cjs/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +3 -3
- package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
- package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.js.map +3 -3
- package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
- package/lib/cjs/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +3 -3
- package/lib/cjs/src/api/device-model/model/DeviceModel.js +1 -1
- package/lib/cjs/src/api/device-model/model/DeviceModel.js.map +3 -3
- package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js +1 -1
- package/lib/cjs/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
- package/lib/esm/package.json +1 -1
- package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js +1 -1
- package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.js.map +3 -3
- package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js +1 -1
- package/lib/esm/src/api/device-action/task/PredictOutOfMemoryTask.test.js.map +3 -3
- package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js +1 -1
- package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.js.map +3 -3
- package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js +1 -1
- package/lib/esm/src/api/device-model/data/StaticDeviceModelDataSource.test.js.map +3 -3
- package/lib/esm/src/api/device-model/model/DeviceModel.js +1 -1
- package/lib/esm/src/api/device-model/model/DeviceModel.js.map +3 -3
- package/lib/esm/src/api/device-model/model/DeviceModel.stub.js +1 -1
- package/lib/esm/src/api/device-model/model/DeviceModel.stub.js.map +2 -2
- package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts +4 -3
- package/lib/types/src/api/device-action/task/PredictOutOfMemoryTask.d.ts.map +1 -1
- package/lib/types/src/api/device-model/data/StaticDeviceModelDataSource.d.ts.map +1 -1
- package/lib/types/src/api/device-model/model/DeviceModel.d.ts +44 -20
- package/lib/types/src/api/device-model/model/DeviceModel.d.ts.map +1 -1
- package/lib/types/src/api/device-model/model/DeviceModel.stub.d.ts.map +1 -1
- package/lib/types/tsconfig.prod.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/lib/cjs/src/api/device-model/model/DeviceModel.test.js +0 -2
- package/lib/cjs/src/api/device-model/model/DeviceModel.test.js.map +0 -7
- package/lib/esm/src/api/device-model/model/DeviceModel.test.js +0 -2
- package/lib/esm/src/api/device-model/model/DeviceModel.test.js.map +0 -7
- package/lib/types/src/api/device-model/model/DeviceModel.test.d.ts +0 -2
- package/lib/types/src/api/device-model/model/DeviceModel.test.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"ts-node": "10.9.2",
|
|
23
23
|
"@ledgerhq/eslint-config-dsdk": "^0.0.2",
|
|
24
24
|
"@ledgerhq/ldmk-tool": "^0.0.1",
|
|
25
|
-
"@ledgerhq/tsconfig-dsdk": "^1.0.1",
|
|
26
25
|
"@ledgerhq/prettier-config-dsdk": "^0.0.2",
|
|
26
|
+
"@ledgerhq/tsconfig-dsdk": "^1.0.1",
|
|
27
27
|
"@ledgerhq/vitest-config-dmk": "^0.0.0"
|
|
28
28
|
},
|
|
29
29
|
"exports": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"type": "git",
|
|
48
48
|
"url": "https://github.com/LedgerHQ/device-sdk-ts.git"
|
|
49
49
|
},
|
|
50
|
-
"version": "0.
|
|
50
|
+
"version": "0.13.0",
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "pnpm ldmk-tool build --entryPoints index.ts,src/**/*.ts --tsconfig tsconfig.prod.json",
|
|
53
53
|
"dev": "concurrently \"pnpm watch:builds\" \"pnpm watch:types\"",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var t=require("../../device/DeviceModel"),r=require("./DeviceModel"),c=require("./DeviceModel.stub");describe("DeviceModel",()=>{let o;beforeAll(()=>{o=(0,c.deviceModelStubBuilder)()}),test("should return the correct block size for Nano X",()=>{const e=new r.TransportDeviceModel(o);expect(e.getBlockSize("2.0.0")).toBe(4*1024)}),test("should return the correct block size for Stax",()=>{const e=new r.TransportDeviceModel({...o,id:t.DeviceModelId.STAX});expect(e.getBlockSize("2.0.0")).toBe(32)}),test("should return the correct block size for Nano SP",()=>{const e=new r.TransportDeviceModel({...o,id:t.DeviceModelId.NANO_SP});expect(e.getBlockSize("2.0.0")).toBe(32)}),test("should return the correct block size for Nano S with version lower than 2.0.0",()=>{const e=new r.TransportDeviceModel({...o,id:t.DeviceModelId.NANO_S});expect(e.getBlockSize("1.0.0")).toBe(4*1024)}),test("should return the correct block size for Nano S with version 2.0.0",()=>{const e=new r.TransportDeviceModel({...o,id:t.DeviceModelId.NANO_S});expect(e.getBlockSize("2.0.0")).toBe(2*1024)}),test("should return the correct block size for Flex",()=>{const e=new r.TransportDeviceModel({...o,id:t.DeviceModelId.FLEX});expect(e.getBlockSize("2.0.0")).toBe(32)})});
|
|
2
|
-
//# sourceMappingURL=DeviceModel.test.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/api/device-model/model/DeviceModel.test.ts"],
|
|
4
|
-
"sourcesContent": ["import { DeviceModelId } from \"@api/device/DeviceModel\";\n\nimport { TransportDeviceModel } from \"./DeviceModel\";\nimport { deviceModelStubBuilder } from \"./DeviceModel.stub\";\n\ndescribe(\"DeviceModel\", () => {\n let stubDeviceModel: TransportDeviceModel;\n\n beforeAll(() => {\n stubDeviceModel = deviceModelStubBuilder();\n });\n\n test(\"should return the correct block size for Nano X\", () => {\n const deviceModel = new TransportDeviceModel(stubDeviceModel);\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(4 * 1024);\n });\n\n test(\"should return the correct block size for Stax\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.STAX,\n });\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(32);\n });\n\n test(\"should return the correct block size for Nano SP\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.NANO_SP,\n });\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(32);\n });\n\n test(\"should return the correct block size for Nano S with version lower than 2.0.0\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.NANO_S,\n });\n const firmwareVersion = \"1.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(4 * 1024);\n });\n\n test(\"should return the correct block size for Nano S with version 2.0.0\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.NANO_S,\n });\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(2 * 1024);\n });\n\n // flex\n test(\"should return the correct block size for Flex\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.FLEX,\n });\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(32);\n });\n});\n"],
|
|
5
|
-
"mappings": "aAAA,IAAAA,EAA8B,mCAE9BA,EAAqC,yBACrCA,EAAuC,8BAEvC,SAAS,cAAe,IAAM,CAC5B,IAAIC,EAEJ,UAAU,IAAM,CACdA,KAAkB,0BAAuB,CAC3C,CAAC,EAED,KAAK,kDAAmD,IAAM,CAC5D,MAAMC,EAAc,IAAI,uBAAqBD,CAAe,EAG5D,OAAOC,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAI,IAAI,CACjE,CAAC,EAED,KAAK,gDAAiD,IAAM,CAC1D,MAAMA,EAAc,IAAI,uBAAqB,CAC3C,GAAGD,EACH,GAAI,gBAAc,IACpB,CAAC,EAGD,OAAOC,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAE,CAC3D,CAAC,EAED,KAAK,mDAAoD,IAAM,CAC7D,MAAMA,EAAc,IAAI,uBAAqB,CAC3C,GAAGD,EACH,GAAI,gBAAc,OACpB,CAAC,EAGD,OAAOC,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAE,CAC3D,CAAC,EAED,KAAK,gFAAiF,IAAM,CAC1F,MAAMA,EAAc,IAAI,uBAAqB,CAC3C,GAAGD,EACH,GAAI,gBAAc,MACpB,CAAC,EAGD,OAAOC,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAI,IAAI,CACjE,CAAC,EAED,KAAK,qEAAsE,IAAM,CAC/E,MAAMA,EAAc,IAAI,uBAAqB,CAC3C,GAAGD,EACH,GAAI,gBAAc,MACpB,CAAC,EAGD,OAAOC,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAI,IAAI,CACjE,CAAC,EAGD,KAAK,gDAAiD,IAAM,CAC1D,MAAMA,EAAc,IAAI,uBAAqB,CAC3C,GAAGD,EACH,GAAI,gBAAc,IACpB,CAAC,EAGD,OAAOC,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAE,CAC3D,CAAC,CACH,CAAC",
|
|
6
|
-
"names": ["import_DeviceModel", "stubDeviceModel", "deviceModel"]
|
|
7
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{DeviceModelId as i}from"../../device/DeviceModel";import{TransportDeviceModel as r}from"./DeviceModel";import{deviceModelStubBuilder as c}from"./DeviceModel.stub";describe("DeviceModel",()=>{let o;beforeAll(()=>{o=c()}),test("should return the correct block size for Nano X",()=>{const e=new r(o);expect(e.getBlockSize("2.0.0")).toBe(4*1024)}),test("should return the correct block size for Stax",()=>{const e=new r({...o,id:i.STAX});expect(e.getBlockSize("2.0.0")).toBe(32)}),test("should return the correct block size for Nano SP",()=>{const e=new r({...o,id:i.NANO_SP});expect(e.getBlockSize("2.0.0")).toBe(32)}),test("should return the correct block size for Nano S with version lower than 2.0.0",()=>{const e=new r({...o,id:i.NANO_S});expect(e.getBlockSize("1.0.0")).toBe(4*1024)}),test("should return the correct block size for Nano S with version 2.0.0",()=>{const e=new r({...o,id:i.NANO_S});expect(e.getBlockSize("2.0.0")).toBe(2*1024)}),test("should return the correct block size for Flex",()=>{const e=new r({...o,id:i.FLEX});expect(e.getBlockSize("2.0.0")).toBe(32)})});
|
|
2
|
-
//# sourceMappingURL=DeviceModel.test.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/api/device-model/model/DeviceModel.test.ts"],
|
|
4
|
-
"sourcesContent": ["import { DeviceModelId } from \"@api/device/DeviceModel\";\n\nimport { TransportDeviceModel } from \"./DeviceModel\";\nimport { deviceModelStubBuilder } from \"./DeviceModel.stub\";\n\ndescribe(\"DeviceModel\", () => {\n let stubDeviceModel: TransportDeviceModel;\n\n beforeAll(() => {\n stubDeviceModel = deviceModelStubBuilder();\n });\n\n test(\"should return the correct block size for Nano X\", () => {\n const deviceModel = new TransportDeviceModel(stubDeviceModel);\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(4 * 1024);\n });\n\n test(\"should return the correct block size for Stax\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.STAX,\n });\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(32);\n });\n\n test(\"should return the correct block size for Nano SP\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.NANO_SP,\n });\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(32);\n });\n\n test(\"should return the correct block size for Nano S with version lower than 2.0.0\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.NANO_S,\n });\n const firmwareVersion = \"1.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(4 * 1024);\n });\n\n test(\"should return the correct block size for Nano S with version 2.0.0\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.NANO_S,\n });\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(2 * 1024);\n });\n\n // flex\n test(\"should return the correct block size for Flex\", () => {\n const deviceModel = new TransportDeviceModel({\n ...stubDeviceModel,\n id: DeviceModelId.FLEX,\n });\n const firmwareVersion = \"2.0.0\";\n\n expect(deviceModel.getBlockSize(firmwareVersion)).toBe(32);\n });\n});\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,iBAAAA,MAAqB,0BAE9B,OAAS,wBAAAC,MAA4B,gBACrC,OAAS,0BAAAC,MAA8B,qBAEvC,SAAS,cAAe,IAAM,CAC5B,IAAIC,EAEJ,UAAU,IAAM,CACdA,EAAkBD,EAAuB,CAC3C,CAAC,EAED,KAAK,kDAAmD,IAAM,CAC5D,MAAME,EAAc,IAAIH,EAAqBE,CAAe,EAG5D,OAAOC,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAI,IAAI,CACjE,CAAC,EAED,KAAK,gDAAiD,IAAM,CAC1D,MAAMA,EAAc,IAAIH,EAAqB,CAC3C,GAAGE,EACH,GAAIH,EAAc,IACpB,CAAC,EAGD,OAAOI,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAE,CAC3D,CAAC,EAED,KAAK,mDAAoD,IAAM,CAC7D,MAAMA,EAAc,IAAIH,EAAqB,CAC3C,GAAGE,EACH,GAAIH,EAAc,OACpB,CAAC,EAGD,OAAOI,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAE,CAC3D,CAAC,EAED,KAAK,gFAAiF,IAAM,CAC1F,MAAMA,EAAc,IAAIH,EAAqB,CAC3C,GAAGE,EACH,GAAIH,EAAc,MACpB,CAAC,EAGD,OAAOI,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAI,IAAI,CACjE,CAAC,EAED,KAAK,qEAAsE,IAAM,CAC/E,MAAMA,EAAc,IAAIH,EAAqB,CAC3C,GAAGE,EACH,GAAIH,EAAc,MACpB,CAAC,EAGD,OAAOI,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAI,IAAI,CACjE,CAAC,EAGD,KAAK,gDAAiD,IAAM,CAC1D,MAAMA,EAAc,IAAIH,EAAqB,CAC3C,GAAGE,EACH,GAAIH,EAAc,IACpB,CAAC,EAGD,OAAOI,EAAY,aAFK,OAEuB,CAAC,EAAE,KAAK,EAAE,CAC3D,CAAC,CACH,CAAC",
|
|
6
|
-
"names": ["DeviceModelId", "TransportDeviceModel", "deviceModelStubBuilder", "stubDeviceModel", "deviceModel"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceModel.test.d.ts","sourceRoot":"","sources":["../../../../../../src/api/device-model/model/DeviceModel.test.ts"],"names":[],"mappings":""}
|