@blueid/access-cli 0.19.0 → 0.22.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/createProvisioningData/action.js +7 -3
- package/lib/createProvisioningData/index.js +11 -11
- package/lib/proto/BlueCore_pb.js +976 -0
- package/lib/proto/BlueLock_pb.js +46 -0
- package/lib/proto/BlueSDK_pb.js +73 -0
- package/lib/proto/BlueSystem_pb.js +260 -0
- package/lib/shared/binaryToIntelHex.js +246 -0
- package/lib/shared/crc16.js +26 -0
- package/lib/shared/outputBuffer.js +58 -2
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ import { BlueSystemProvisioning } from '../proto/BlueSystem_pb.js'
|
|
|
9
9
|
|
|
10
10
|
export default async (
|
|
11
11
|
provisioningFile,
|
|
12
|
-
{ vendorIdentity, hardwareType, hardwareSerialNumber, hardwareVersion, hardwareName, meta, format }
|
|
12
|
+
{ vendorIdentity, hardwareType, hardwareSerialNumber, hardwareVersion, hardwareName, meta, format },
|
|
13
13
|
) => {
|
|
14
14
|
const { deviceId, terminalPrivateKey, signaturePublicKey } = await registerDevice({
|
|
15
15
|
vendorIdentity,
|
|
@@ -28,7 +28,11 @@ export default async (
|
|
|
28
28
|
signaturePublicKey,
|
|
29
29
|
})
|
|
30
30
|
|
|
31
|
-
const buffer = protoDelimited.enc(provisionData)
|
|
31
|
+
const buffer = Buffer.from(protoDelimited.enc(provisionData))
|
|
32
32
|
|
|
33
|
-
outputBuffer(buffer, format, provisioningFile
|
|
33
|
+
outputBuffer(buffer, format, provisioningFile, {
|
|
34
|
+
fileHexSize: 512,
|
|
35
|
+
fileHexCrc16: true,
|
|
36
|
+
fileHexCrc16Magic: true,
|
|
37
|
+
})
|
|
34
38
|
}
|
|
@@ -13,36 +13,36 @@ program
|
|
|
13
13
|
.addOption(
|
|
14
14
|
new Option(
|
|
15
15
|
'--vendorIdentity [vendorIdentity]',
|
|
16
|
-
'The vendor identity to be used for authentication or "test" for test-data'
|
|
17
|
-
).makeOptionMandatory(true)
|
|
16
|
+
'The vendor identity to be used for authentication or "test" for test-data',
|
|
17
|
+
).makeOptionMandatory(true),
|
|
18
18
|
)
|
|
19
19
|
.addOption(
|
|
20
20
|
new Option('--hardwareType [hardwareType]', 'The type of the device')
|
|
21
21
|
.choices(Object.values(BlueHardwareType).filter((x) => typeof x === 'string'))
|
|
22
|
-
.makeOptionMandatory(true)
|
|
22
|
+
.makeOptionMandatory(true),
|
|
23
23
|
)
|
|
24
24
|
.addOption(
|
|
25
25
|
new Option(
|
|
26
26
|
'--hardwareVersion [hardwareVersion]',
|
|
27
|
-
'The actual hardware version of the device which is vendor specific'
|
|
28
|
-
)
|
|
27
|
+
'The actual hardware version of the device which is vendor specific',
|
|
28
|
+
),
|
|
29
29
|
)
|
|
30
30
|
.addOption(
|
|
31
31
|
new Option(
|
|
32
32
|
'--hardwareSerialNumber [hardwareSerialNumber]',
|
|
33
|
-
'The vendor serial number for the device which is vendor specific'
|
|
34
|
-
).makeOptionMandatory(true)
|
|
33
|
+
'The vendor serial number for the device which is vendor specific',
|
|
34
|
+
).makeOptionMandatory(true),
|
|
35
35
|
)
|
|
36
36
|
.addOption(
|
|
37
37
|
new Option(
|
|
38
38
|
'--hardwareName [hardwareName]',
|
|
39
|
-
'The human readable identifier of the device which is vendor specific'
|
|
40
|
-
).makeOptionMandatory(true)
|
|
39
|
+
'The human readable identifier of the device which is vendor specific',
|
|
40
|
+
).makeOptionMandatory(true),
|
|
41
41
|
)
|
|
42
42
|
.addOption(new Option('--meta [meta]', 'Optional meta data in JSON format for the device'))
|
|
43
43
|
.addOption(
|
|
44
44
|
new Option('--format [format]', 'The output format to be used')
|
|
45
|
-
.choices(['file'].concat(outputFormats))
|
|
46
|
-
.makeOptionMandatory()
|
|
45
|
+
.choices(['file', 'file_hex'].concat(outputFormats))
|
|
46
|
+
.makeOptionMandatory(),
|
|
47
47
|
)
|
|
48
48
|
.action(action)
|