@onekeyfe/hd-core 1.2.0-alpha.161 → 1.2.0-alpha.162
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/__tests__/device-state-events.test.ts +2 -2
- package/__tests__/device-state-mapper.test.ts +11 -2
- package/__tests__/device-utils.test.ts +6 -0
- package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +13 -3
- package/__tests__/protocol-v2-resources.test.ts +35 -2
- package/__tests__/protocol-v2.test.ts +89 -42
- package/__tests__/search-devices.test.ts +4 -3
- package/dist/api/FirmwareUpdateV4.d.ts +3 -1
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts +0 -15
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
- package/dist/index.d.ts +2 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +102 -298
- package/dist/protocols/protocol-v2/resources.d.ts +1 -0
- package/dist/protocols/protocol-v2/resources.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/FirmwareUpdateV4.ts +75 -179
- package/src/api/SearchDevices.ts +2 -2
- package/src/api/firmware/FirmwareUpdatePlan.ts +0 -41
- package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +10 -6
- package/src/core/index.ts +6 -97
- package/src/device/Device.ts +3 -1
- package/src/device/DeviceStateMapper.ts +2 -2
- package/src/deviceProfile/buildDeviceFeatures.ts +7 -2
- package/src/index.ts +0 -6
- package/src/protocols/protocol-v2/resources.ts +16 -12
- package/src/types/api/firmwareUpdate.ts +1 -1
- package/src/utils/deviceFeaturesCompat.ts +9 -4
- package/src/utils/deviceInfoUtils.ts +3 -1
- package/__tests__/firmware-memory-host.test.ts +0 -126
- package/dist/api/firmware/FirmwareMemoryHost.d.ts +0 -22
- package/dist/api/firmware/FirmwareMemoryHost.d.ts.map +0 -1
- package/src/api/firmware/FirmwareMemoryHost.ts +0 -143
package/dist/index.js
CHANGED
|
@@ -419,7 +419,8 @@ const resolveDeviceBleName = (features) => {
|
|
|
419
419
|
if (!features)
|
|
420
420
|
return null;
|
|
421
421
|
const compatible = asCompatibleFeatures(features);
|
|
422
|
-
|
|
422
|
+
const bleName = (_a = firstNonEmptyString(compatible.bleName, compatible.onekey_ble_name, compatible.ble_name)) !== null && _a !== void 0 ? _a : null;
|
|
423
|
+
return bleName ? hdShared.canonicalizePro2BleAdvertisementName(bleName) : null;
|
|
423
424
|
};
|
|
424
425
|
const resolveDeviceFirmwareVersion = (features) => {
|
|
425
426
|
var _a;
|
|
@@ -467,7 +468,7 @@ const getDeviceTypeByBleName = (name) => {
|
|
|
467
468
|
if (/^Touch/i.test(name))
|
|
468
469
|
return hdShared.EDeviceType.Touch;
|
|
469
470
|
const compactName = name.replace(/[\s-]/g, '');
|
|
470
|
-
if (/\bPro\s*2\b/i.test(name) || /^
|
|
471
|
+
if (/\bPro\s*2\b/i.test(name) || /^(?:OneKey)?Pro2[a-f0-9]{4}$/i.test(compactName)) {
|
|
471
472
|
return hdShared.EDeviceType.Pro2;
|
|
472
473
|
}
|
|
473
474
|
if (/\bNeo\b/i.test(name) || /^Neo/i.test(name) || /^(?:OneKey)?Neo/i.test(compactName)) {
|
|
@@ -929,22 +930,6 @@ const finalizeFirmwareUpdatePlan = ({ features, firmwareType, platform, artifact
|
|
|
929
930
|
};
|
|
930
931
|
return assertFirmwareUpdatePlan(Object.assign(Object.assign({}, planWithoutDigest), { planDigest: digestFirmwareUpdatePlan(planWithoutDigest) }));
|
|
931
932
|
};
|
|
932
|
-
const buildProtocolV2LocalFirmwareUpdatePlan = ({ features, firmwareType, platform, artifacts, }) => {
|
|
933
|
-
if (artifacts.length === 0) {
|
|
934
|
-
return planError('Protocol V2 local firmware plan has no artifacts');
|
|
935
|
-
}
|
|
936
|
-
const plan = finalizeFirmwareUpdatePlan({
|
|
937
|
-
features,
|
|
938
|
-
firmwareType,
|
|
939
|
-
platform,
|
|
940
|
-
artifacts: artifacts.map(artifact => (Object.assign(Object.assign({}, artifact), { role: artifact.target === 'resource' ? 'resourceBundle' : 'component', url: `https://local-firmware.invalid/${encodeURIComponent(artifact.artifactId)}` }))),
|
|
941
|
-
targetsToUpdate: artifacts.map(artifact => artifact.target),
|
|
942
|
-
});
|
|
943
|
-
if (plan.executor !== 'v4') {
|
|
944
|
-
return planError('Protocol V2 local firmware plan requires executor v4');
|
|
945
|
-
}
|
|
946
|
-
return plan;
|
|
947
|
-
};
|
|
948
933
|
const buildProtocolV2FirmwareUpdatePlan = ({ features, firmwareType, platform, release, targetsToUpdate, forceUpdateTargets, resourceArchive, }) => {
|
|
949
934
|
const validatedForceTargets = validateFirmwareUpdatePlanForceTargets(forceUpdateTargets);
|
|
950
935
|
if (validatedForceTargets.some(target => target === 'ble' || target === 'bootloader')) {
|
|
@@ -1135,6 +1120,10 @@ const getFirmwareUpdateResourceName = (value) => {
|
|
|
1135
1120
|
}
|
|
1136
1121
|
return resourceName;
|
|
1137
1122
|
};
|
|
1123
|
+
const getPreparedEntryIdentity = (entryName) => {
|
|
1124
|
+
getFirmwareUpdateResourceName(entryName);
|
|
1125
|
+
return entryName.toLowerCase();
|
|
1126
|
+
};
|
|
1138
1127
|
const assertPreparedEntry = (value) => {
|
|
1139
1128
|
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
1140
1129
|
return preparedPlanError('Firmware prepared plan entry must be an object');
|
|
@@ -1187,7 +1176,8 @@ const assertPreparedArtifacts = ({ plan, artifacts, }) => {
|
|
|
1187
1176
|
return preparedPlanError('Firmware prepared plan materialization is incomplete');
|
|
1188
1177
|
}
|
|
1189
1178
|
if (materializedEntries &&
|
|
1190
|
-
new Set(materializedEntries.map(entry =>
|
|
1179
|
+
new Set(materializedEntries.map(entry => getPreparedEntryIdentity(entry.entryName))).size !==
|
|
1180
|
+
materializedEntries.length) {
|
|
1191
1181
|
return preparedPlanError('Firmware prepared plan contains duplicate entry names');
|
|
1192
1182
|
}
|
|
1193
1183
|
return Object.assign(Object.assign(Object.assign(Object.assign({ artifactId: planArtifact.artifactId, role: planArtifact.role, target: planArtifact.target, container: planArtifact.container }, (planArtifact.logicalName ? { logicalName: planArtifact.logicalName } : {})), (planArtifact.targetVersion ? { targetVersion: planArtifact.targetVersion } : {})), { artifact: Object.assign(Object.assign({}, artifact), { sha256: artifact.sha256.toLowerCase() }) }), ((materializedEntries === null || materializedEntries === void 0 ? void 0 : materializedEntries.length) ? { materializedEntries } : {}));
|
|
@@ -1293,7 +1283,7 @@ const validateFirmwareUpdatePreparedPlan = (value) => {
|
|
|
1293
1283
|
assertFirmwareArtifactReference(artifact.artifact);
|
|
1294
1284
|
const materializedEntryNames = (_d = (_c = artifact.materializedEntries) === null || _c === void 0 ? void 0 : _c.map(entry => {
|
|
1295
1285
|
assertPreparedEntry(entry);
|
|
1296
|
-
return
|
|
1286
|
+
return getPreparedEntryIdentity(entry.entryName);
|
|
1297
1287
|
})) !== null && _d !== void 0 ? _d : [];
|
|
1298
1288
|
if (new Set(materializedEntryNames).size !== materializedEntryNames.length) {
|
|
1299
1289
|
return preparedPlanError('Firmware prepared plan contains duplicate entry names');
|
|
@@ -40716,21 +40706,26 @@ function parseProtocolV2Resources(value) {
|
|
|
40716
40706
|
},
|
|
40717
40707
|
};
|
|
40718
40708
|
}
|
|
40719
|
-
|
|
40720
|
-
|
|
40721
|
-
|
|
40709
|
+
function isProtocolV2ResourceArchiveEntryName(entryName) {
|
|
40710
|
+
var _a;
|
|
40711
|
+
const normalized = entryName.replace(/\\/g, '/');
|
|
40712
|
+
if (!normalized.toLowerCase().endsWith('.okpkg')) {
|
|
40713
|
+
return false;
|
|
40714
|
+
}
|
|
40715
|
+
const parts = normalized.split('/');
|
|
40716
|
+
const fileName = (_a = parts[parts.length - 1]) !== null && _a !== void 0 ? _a : '';
|
|
40717
|
+
return (fileName.length > 0 &&
|
|
40718
|
+
!fileName.startsWith('.') &&
|
|
40719
|
+
!parts.some(part => part === '__MACOSX' || part === '.' || part === '..' || part === ''));
|
|
40720
|
+
}
|
|
40721
|
+
function isSafeResourceDevicePath(path) {
|
|
40722
|
+
return !(path.includes('\\') ||
|
|
40722
40723
|
path.includes('//') ||
|
|
40723
40724
|
[...path].some(char => {
|
|
40724
40725
|
const code = char.charCodeAt(0);
|
|
40725
40726
|
return code <= 0x1f || code === 0x7f;
|
|
40726
40727
|
}) ||
|
|
40727
|
-
path.split('/').some(part => part === '.' || part === '..'))
|
|
40728
|
-
return false;
|
|
40729
|
-
}
|
|
40730
|
-
if (path === PROTOCOL_V2_BOOT_RESOURCE_PACKAGE_STAGING_PATH) {
|
|
40731
|
-
return true;
|
|
40732
|
-
}
|
|
40733
|
-
return (path.endsWith('.okpkg') && PROTOCOL_V2_RESOURCE_DEVICE_ROOTS.some(root => path.startsWith(root)));
|
|
40728
|
+
path.split('/').some(part => part === '.' || part === '..'));
|
|
40734
40729
|
}
|
|
40735
40730
|
function readAscii(bytes, offset, length) {
|
|
40736
40731
|
return Array.from(bytes.slice(offset, offset + length))
|
|
@@ -40748,7 +40743,7 @@ function readResourceDevicePath(bytes) {
|
|
|
40748
40743
|
throw new Error('Invalid Pro2 RESOURCE package device path metadata');
|
|
40749
40744
|
}
|
|
40750
40745
|
const path = readAscii(pathBytes, 0, pathBytes.byteLength);
|
|
40751
|
-
if (!
|
|
40746
|
+
if (!isSafeResourceDevicePath(path)) {
|
|
40752
40747
|
throw new Error(`Invalid Pro2 RESOURCE package device path: ${path}`);
|
|
40753
40748
|
}
|
|
40754
40749
|
return path;
|
|
@@ -44531,7 +44526,7 @@ const mapProtocolV2DeviceInfoToState = (info, mode = 'unknown') => {
|
|
|
44531
44526
|
vendor: 'onekey.so',
|
|
44532
44527
|
serialNo: (_b = info.hw) === null || _b === void 0 ? void 0 : _b.serial_no,
|
|
44533
44528
|
bleName: ((_c = info.coprocessor) === null || _c === void 0 ? void 0 : _c.bt_adv_name)
|
|
44534
|
-
? hdShared.
|
|
44529
|
+
? hdShared.canonicalizePro2BleAdvertisementName(info.coprocessor.bt_adv_name)
|
|
44535
44530
|
: undefined,
|
|
44536
44531
|
deviceId: loader ? null : undefined,
|
|
44537
44532
|
}),
|
|
@@ -45412,7 +45407,8 @@ class Device extends events.exports {
|
|
|
45412
45407
|
}
|
|
45413
45408
|
getCurrentBleName() {
|
|
45414
45409
|
var _a, _b;
|
|
45415
|
-
|
|
45410
|
+
const bleName = (_b = (_a = this.state) === null || _a === void 0 ? void 0 : _a.identity.bleName) !== null && _b !== void 0 ? _b : null;
|
|
45411
|
+
return bleName ? hdShared.canonicalizePro2BleAdvertisementName(bleName) : null;
|
|
45416
45412
|
}
|
|
45417
45413
|
getCurrentLabel() {
|
|
45418
45414
|
var _a, _b;
|
|
@@ -46923,7 +46919,7 @@ class SearchDevices extends BaseMethod {
|
|
|
46923
46919
|
if (!seenIds.has(lowerId)) {
|
|
46924
46920
|
seenIds.add(lowerId);
|
|
46925
46921
|
const rawBleName = (_e = (_d = device.name) !== null && _d !== void 0 ? _d : device.localName) !== null && _e !== void 0 ? _e : '';
|
|
46926
|
-
const bleName = hdShared.
|
|
46922
|
+
const bleName = hdShared.canonicalizePro2BleAdvertisementName(rawBleName);
|
|
46927
46923
|
devices.push(Object.assign(Object.assign({}, device), { connectId: device.id, serialNo: null, uuid: '', deviceId: null, name: bleName || device.name, deviceType: getDeviceTypeByBleName(bleName) }));
|
|
46928
46924
|
}
|
|
46929
46925
|
}
|
|
@@ -51707,86 +51703,6 @@ const INSTALLABLE_FIRMWARE_TARGET_IDS = new Set([
|
|
|
51707
51703
|
]);
|
|
51708
51704
|
new Map(Object.entries(ProtocolV2FirmwareTargetType).flatMap(([key, value]) => INSTALLABLE_FIRMWARE_TARGET_IDS.has(value) ? [[key, value]] : []));
|
|
51709
51705
|
|
|
51710
|
-
let memoryHostSequence = 0;
|
|
51711
|
-
const createReference = (binary, prefix) => {
|
|
51712
|
-
const digest = utils.bytesToHex(sha256.sha256(new Uint8Array(binary)));
|
|
51713
|
-
return {
|
|
51714
|
-
artifactRef: `fwmem:${prefix}:${digest.slice(0, 32)}`,
|
|
51715
|
-
size: binary.byteLength,
|
|
51716
|
-
sha256: digest,
|
|
51717
|
-
};
|
|
51718
|
-
};
|
|
51719
|
-
function prepareFirmwareUpdateV4MemoryHost({ sdk, plan, artifacts, }) {
|
|
51720
|
-
if (plan.executor !== 'v4') {
|
|
51721
|
-
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, 'Firmware memory host only supports V4 plans');
|
|
51722
|
-
}
|
|
51723
|
-
memoryHostSequence += 1;
|
|
51724
|
-
const hostId = `${Date.now()}:${memoryHostSequence}`;
|
|
51725
|
-
const binaries = new Map();
|
|
51726
|
-
const inputs = artifacts.map((input, artifactIndex) => {
|
|
51727
|
-
var _a;
|
|
51728
|
-
const artifactBinary = new Uint8Array(input.binary).slice();
|
|
51729
|
-
const artifact = createReference(artifactBinary.buffer, `${hostId}:artifact:${artifactIndex}`);
|
|
51730
|
-
binaries.set(artifact.artifactRef, artifactBinary);
|
|
51731
|
-
const materializedEntries = (_a = input.materializedEntries) === null || _a === void 0 ? void 0 : _a.map((entry, entryIndex) => {
|
|
51732
|
-
const entryArtifact = createReference(entry.binary, `${hostId}:entry:${artifactIndex}:${entryIndex}`);
|
|
51733
|
-
return {
|
|
51734
|
-
entryName: entry.entryName,
|
|
51735
|
-
artifact: entryArtifact,
|
|
51736
|
-
};
|
|
51737
|
-
});
|
|
51738
|
-
return Object.assign({ artifactId: input.artifactId, artifact }, ((materializedEntries === null || materializedEntries === void 0 ? void 0 : materializedEntries.length) ? { materializedEntries } : {}));
|
|
51739
|
-
});
|
|
51740
|
-
const preparedPlan = sdk.prepareFirmwareUpdatePlan({
|
|
51741
|
-
plan,
|
|
51742
|
-
leaseRef: `fwmemlease:${hostId}`,
|
|
51743
|
-
artifacts: inputs,
|
|
51744
|
-
});
|
|
51745
|
-
const readers = new Map();
|
|
51746
|
-
let readerSequence = 0;
|
|
51747
|
-
const artifactReader = {
|
|
51748
|
-
open({ artifactRef }) {
|
|
51749
|
-
const binary = binaries.get(artifactRef);
|
|
51750
|
-
if (!binary) {
|
|
51751
|
-
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, 'Firmware memory artifact is unavailable');
|
|
51752
|
-
}
|
|
51753
|
-
readerSequence += 1;
|
|
51754
|
-
const readerId = `fwmemreader:${hostId}:${readerSequence}`;
|
|
51755
|
-
readers.set(readerId, binary);
|
|
51756
|
-
return Promise.resolve({ readerId, size: binary.byteLength });
|
|
51757
|
-
},
|
|
51758
|
-
read({ readerId, offset, length }) {
|
|
51759
|
-
const binary = readers.get(readerId);
|
|
51760
|
-
if (!binary || offset < 0 || length <= 0 || offset + length > binary.byteLength) {
|
|
51761
|
-
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, 'Firmware memory artifact read is invalid');
|
|
51762
|
-
}
|
|
51763
|
-
const data = binary.slice(offset, offset + length).buffer;
|
|
51764
|
-
return Promise.resolve({
|
|
51765
|
-
data,
|
|
51766
|
-
bytesRead: data.byteLength,
|
|
51767
|
-
eof: offset + length === binary.byteLength,
|
|
51768
|
-
});
|
|
51769
|
-
},
|
|
51770
|
-
close({ readerId }) {
|
|
51771
|
-
readers.delete(readerId);
|
|
51772
|
-
return Promise.resolve();
|
|
51773
|
-
},
|
|
51774
|
-
};
|
|
51775
|
-
const hostBindingGeneration = sdk.registerFirmwareUpdateHostBinding({
|
|
51776
|
-
artifactReader,
|
|
51777
|
-
preparedPlanDigest: preparedPlan.preparedPlanDigest,
|
|
51778
|
-
});
|
|
51779
|
-
return {
|
|
51780
|
-
preparedPlan,
|
|
51781
|
-
hostBindingGeneration,
|
|
51782
|
-
release: () => {
|
|
51783
|
-
sdk.unregisterFirmwareUpdateHostBinding(hostBindingGeneration);
|
|
51784
|
-
readers.clear();
|
|
51785
|
-
binaries.clear();
|
|
51786
|
-
},
|
|
51787
|
-
};
|
|
51788
|
-
}
|
|
51789
|
-
|
|
51790
51706
|
const Log$7 = getLogger(exports.LoggerNames.Method);
|
|
51791
51707
|
const SESSION_ERROR$1 = 'session not found';
|
|
51792
51708
|
const PROTOCOL_V2_BOOTLOADER_RECONNECT_TIMEOUT = 90 * 1000;
|
|
@@ -52255,16 +52171,7 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52255
52171
|
if (!this.params.preparedPlan &&
|
|
52256
52172
|
this.params.resourceArchiveBinary &&
|
|
52257
52173
|
((_c = this.params.targetsToUpdate) === null || _c === void 0 ? void 0 : _c.includes('resource'))) {
|
|
52258
|
-
|
|
52259
|
-
features: deviceFeatures,
|
|
52260
|
-
firmwareType,
|
|
52261
|
-
});
|
|
52262
|
-
try {
|
|
52263
|
-
return yield this.runProtocolV2PreparedArtifacts(deviceFeatures, firmwareType);
|
|
52264
|
-
}
|
|
52265
|
-
finally {
|
|
52266
|
-
localMemoryHost.release();
|
|
52267
|
-
}
|
|
52174
|
+
return this.runProtocolV2DirectArtifacts({});
|
|
52268
52175
|
}
|
|
52269
52176
|
const hasPreparedComponentArtifacts = Object.values((_d = this.params.componentArtifacts) !== null && _d !== void 0 ? _d : {}).some(Boolean);
|
|
52270
52177
|
if (this.params.preparedPlan || hasPreparedComponentArtifacts) {
|
|
@@ -52273,12 +52180,12 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52273
52180
|
let fwBinaryMap = [];
|
|
52274
52181
|
let bootloaderBinary = null;
|
|
52275
52182
|
let installItems;
|
|
52276
|
-
let
|
|
52183
|
+
let explicitInstallItems;
|
|
52277
52184
|
try {
|
|
52278
52185
|
this.postTipMessage(exports.FirmwareUpdateTipMessage.StartDownloadFirmware);
|
|
52279
52186
|
fwBinaryMap = this.collectExplicitTargetBinaries();
|
|
52280
52187
|
bootloaderBinary = this.prepareBootloaderBinary();
|
|
52281
|
-
|
|
52188
|
+
explicitInstallItems = this.buildProtocolV2InstallItems({
|
|
52282
52189
|
bootloaderBinary,
|
|
52283
52190
|
fwBinaryMap,
|
|
52284
52191
|
});
|
|
@@ -52320,16 +52227,10 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52320
52227
|
}
|
|
52321
52228
|
if (wantsResources) {
|
|
52322
52229
|
this.params.resourceArchiveBinary = yield this.downloadRemoteProtocolV2ResourceArchive(deviceFeatures, firmwareType);
|
|
52323
|
-
resourceMemoryHost = yield this.prepareProtocolV2LocalMemoryHost({
|
|
52324
|
-
features: deviceFeatures,
|
|
52325
|
-
firmwareType,
|
|
52326
|
-
availableInstallItems: installItems !== null && installItems !== void 0 ? installItems : explicitInstallItems,
|
|
52327
|
-
});
|
|
52328
52230
|
}
|
|
52329
52231
|
this.postTipMessage(exports.FirmwareUpdateTipMessage.FinishDownloadFirmware);
|
|
52330
52232
|
}
|
|
52331
52233
|
catch (err) {
|
|
52332
|
-
resourceMemoryHost === null || resourceMemoryHost === void 0 ? void 0 : resourceMemoryHost.release();
|
|
52333
52234
|
if (typeof err === 'object' &&
|
|
52334
52235
|
err !== null &&
|
|
52335
52236
|
'params' in err &&
|
|
@@ -52341,13 +52242,11 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52341
52242
|
}
|
|
52342
52243
|
throw normalizeFirmwarePreparationError(err);
|
|
52343
52244
|
}
|
|
52344
|
-
if (
|
|
52345
|
-
|
|
52346
|
-
|
|
52347
|
-
|
|
52348
|
-
|
|
52349
|
-
resourceMemoryHost.release();
|
|
52350
|
-
}
|
|
52245
|
+
if (wantsResources && this.params.resourceArchiveBinary) {
|
|
52246
|
+
return this.runProtocolV2DirectArtifacts({
|
|
52247
|
+
availableInstallItems: installItems !== null && installItems !== void 0 ? installItems : explicitInstallItems,
|
|
52248
|
+
announceDownload: false,
|
|
52249
|
+
});
|
|
52351
52250
|
}
|
|
52352
52251
|
if (!bootloaderBinary && fwBinaryMap.length === 0 && !(installItems === null || installItems === void 0 ? void 0 : installItems.length)) {
|
|
52353
52252
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.FirmwareUpdateDownloadFailed, 'No firmware to update');
|
|
@@ -52448,95 +52347,59 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52448
52347
|
return installSources;
|
|
52449
52348
|
});
|
|
52450
52349
|
}
|
|
52451
|
-
|
|
52452
|
-
bootloaderBinary: this.prepareBootloaderBinary(),
|
|
52453
|
-
fwBinaryMap: this.collectExplicitTargetBinaries(),
|
|
52454
|
-
}), }) {
|
|
52455
|
-
var _a, _b;
|
|
52350
|
+
runProtocolV2DirectArtifacts({ availableInstallItems, announceDownload = true, }) {
|
|
52456
52351
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52457
|
-
|
|
52458
|
-
|
|
52459
|
-
|
|
52460
|
-
|
|
52461
|
-
|
|
52462
|
-
|
|
52463
|
-
|
|
52464
|
-
|
|
52465
|
-
|
|
52466
|
-
|
|
52352
|
+
try {
|
|
52353
|
+
if (announceDownload) {
|
|
52354
|
+
this.postTipMessage(exports.FirmwareUpdateTipMessage.StartDownloadFirmware);
|
|
52355
|
+
}
|
|
52356
|
+
const installItems = this.filterProtocolV2LocalInstallItems(availableInstallItems !== null && availableInstallItems !== void 0 ? availableInstallItems : this.buildProtocolV2InstallItems({
|
|
52357
|
+
bootloaderBinary: this.prepareBootloaderBinary(),
|
|
52358
|
+
fwBinaryMap: this.collectExplicitTargetBinaries(),
|
|
52359
|
+
}));
|
|
52360
|
+
const installSources = yield Promise.all(installItems.map((item) => __awaiter(this, void 0, void 0, function* () {
|
|
52361
|
+
return ({
|
|
52362
|
+
fileName: item.fileName,
|
|
52363
|
+
source: yield this.openProtocolV2MemorySource(item.binary),
|
|
52364
|
+
targetId: item.targetId,
|
|
52365
|
+
kind: item.kind,
|
|
52366
|
+
});
|
|
52367
|
+
})));
|
|
52368
|
+
const resourceSources = this.params.resourceArchiveBinary
|
|
52369
|
+
? yield this.createProtocolV2ResourceSourcesFromArchive(this.params.resourceArchiveBinary)
|
|
52370
|
+
: [];
|
|
52371
|
+
if (installSources.length === 0 && resourceSources.length === 0) {
|
|
52372
|
+
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.FirmwareUpdateDownloadFailed, 'No firmware to update');
|
|
52373
|
+
}
|
|
52374
|
+
if (announceDownload) {
|
|
52375
|
+
this.postTipMessage(exports.FirmwareUpdateTipMessage.FinishDownloadFirmware);
|
|
52376
|
+
}
|
|
52377
|
+
return yield this.executeProtocolV2SourceUpdate({
|
|
52378
|
+
installSources,
|
|
52379
|
+
resourceSources,
|
|
52467
52380
|
});
|
|
52468
52381
|
}
|
|
52469
|
-
|
|
52470
|
-
|
|
52471
|
-
const memoryArtifacts = [];
|
|
52472
|
-
for (const item of installItems) {
|
|
52473
|
-
const target = PROTOCOL_V2_UPDATE_TARGET_BY_TARGET_ID.get(item.targetId);
|
|
52474
|
-
if (!target || item.binary.byteLength <= 0) {
|
|
52475
|
-
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, `Protocol V2 local firmware artifact is invalid: ${item.fileName}`, { firmwareUpdateCode: 'FirmwareArtifactsNotPrepared' });
|
|
52476
|
-
}
|
|
52477
|
-
const artifactId = `component:${target}`;
|
|
52478
|
-
planArtifacts.push(Object.assign({ artifactId,
|
|
52479
|
-
target, container: 'raw', logicalName: item.fileName, expectedSize: item.binary.byteLength, expectedSha256: bytesToHex(sha256.sha256(new Uint8Array(item.binary))) }, (((_b = this.params.expectedTargetVersions) === null || _b === void 0 ? void 0 : _b[target])
|
|
52480
|
-
? { targetVersion: this.params.expectedTargetVersions[target] }
|
|
52481
|
-
: {})));
|
|
52482
|
-
memoryArtifacts.push({ artifactId, binary: item.binary });
|
|
52382
|
+
finally {
|
|
52383
|
+
yield this.closeProtocolV2PreparedSources();
|
|
52483
52384
|
}
|
|
52484
|
-
|
|
52485
|
-
|
|
52486
|
-
|
|
52487
|
-
|
|
52488
|
-
|
|
52489
|
-
|
|
52490
|
-
|
|
52491
|
-
|
|
52492
|
-
|
|
52493
|
-
|
|
52494
|
-
|
|
52495
|
-
|
|
52496
|
-
|
|
52497
|
-
|
|
52498
|
-
|
|
52499
|
-
const plan = buildProtocolV2LocalFirmwareUpdatePlan({
|
|
52500
|
-
features,
|
|
52501
|
-
firmwareType,
|
|
52502
|
-
platform: this.params.platform,
|
|
52503
|
-
artifacts: planArtifacts,
|
|
52504
|
-
});
|
|
52505
|
-
let memoryHost;
|
|
52506
|
-
try {
|
|
52507
|
-
memoryHost = prepareFirmwareUpdateV4MemoryHost({
|
|
52508
|
-
sdk: {
|
|
52509
|
-
prepareFirmwareUpdatePlan,
|
|
52510
|
-
registerFirmwareUpdateHostBinding,
|
|
52511
|
-
unregisterFirmwareUpdateHostBinding,
|
|
52512
|
-
},
|
|
52513
|
-
plan,
|
|
52514
|
-
artifacts: memoryArtifacts,
|
|
52515
|
-
});
|
|
52516
|
-
const preparedPlan = validateFirmwareUpdatePreparedPlan(memoryHost.preparedPlan);
|
|
52517
|
-
assertFirmwareUpdatePreparedPlanBinding({
|
|
52518
|
-
preparedPlan,
|
|
52519
|
-
executor: 'v4',
|
|
52520
|
-
platform: this.params.platform,
|
|
52521
|
-
scopeTargets: [],
|
|
52522
|
-
bindings: [],
|
|
52523
|
-
});
|
|
52524
|
-
assertFirmwareUpdatePreparedPlanDeviceIdentity({
|
|
52525
|
-
preparedPlan,
|
|
52526
|
-
deviceIdentity: this.protocolV2ExpectedSerialNumber,
|
|
52527
|
-
deviceModel: this.getProtocolV2PreparedPlanDeviceModel(features),
|
|
52385
|
+
});
|
|
52386
|
+
}
|
|
52387
|
+
createProtocolV2ResourceSourcesFromArchive(binary) {
|
|
52388
|
+
var _a;
|
|
52389
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52390
|
+
const archive = yield this.prepareProtocolV2LocalResourceArchive(binary);
|
|
52391
|
+
const sources = [];
|
|
52392
|
+
for (const resource of archive.resources) {
|
|
52393
|
+
sources.push({
|
|
52394
|
+
name: (_a = resource.entryName.split('/').pop()) !== null && _a !== void 0 ? _a : resource.entryName,
|
|
52395
|
+
source: yield this.openProtocolV2MemorySource(resource.binary),
|
|
52396
|
+
devicePath: resource.header.devicePath,
|
|
52397
|
+
version: resource.header.version,
|
|
52398
|
+
payloadHash: resource.header.payloadHash,
|
|
52399
|
+
headerHash: resource.header.headerHash,
|
|
52528
52400
|
});
|
|
52529
|
-
const hostBinding = resolveFirmwareUpdateHostBinding(memoryHost.hostBindingGeneration, preparedPlan.preparedPlanDigest);
|
|
52530
|
-
this.params.preparedPlan = preparedPlan;
|
|
52531
|
-
this.params.targetsToUpdate = [...preparedPlan.targetsToUpdate];
|
|
52532
|
-
this.params.artifactReader = hostBinding.artifactReader;
|
|
52533
|
-
this.params.componentArtifacts = undefined;
|
|
52534
|
-
return memoryHost;
|
|
52535
|
-
}
|
|
52536
|
-
catch (error) {
|
|
52537
|
-
memoryHost === null || memoryHost === void 0 ? void 0 : memoryHost.release();
|
|
52538
|
-
throw error;
|
|
52539
52401
|
}
|
|
52402
|
+
return sources;
|
|
52540
52403
|
});
|
|
52541
52404
|
}
|
|
52542
52405
|
prepareProtocolV2LocalResourceArchive(binary) {
|
|
@@ -52552,13 +52415,12 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52552
52415
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, 'Protocol V2 resource ZIP cannot be parsed', { firmwareUpdateCode: 'FirmwareArtifactsNotPrepared' });
|
|
52553
52416
|
}
|
|
52554
52417
|
const zipEntries = Object.values(zip.files);
|
|
52555
|
-
const resourceEntries = zipEntries.filter(entry => !entry.dir && entry.name
|
|
52418
|
+
const resourceEntries = zipEntries.filter(entry => !entry.dir && isProtocolV2ResourceArchiveEntryName(entry.name));
|
|
52556
52419
|
if (resourceEntries.length === 0 ||
|
|
52557
52420
|
resourceEntries.length > PROTOCOL_V2_RESOURCE_FILE_MAX_COUNT) {
|
|
52558
52421
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, 'Protocol V2 resource ZIP has no valid resource package set', { firmwareUpdateCode: 'FirmwareArtifactsNotPrepared' });
|
|
52559
52422
|
}
|
|
52560
52423
|
let totalSize = 0;
|
|
52561
|
-
const materializedEntries = [];
|
|
52562
52424
|
const resources = [];
|
|
52563
52425
|
const devicePaths = new Set();
|
|
52564
52426
|
for (const entry of resourceEntries) {
|
|
@@ -52585,10 +52447,9 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52585
52447
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, `Protocol V2 resource ZIP contains duplicate device path: ${header.devicePath}`, { firmwareUpdateCode: 'FirmwareArtifactsNotPrepared' });
|
|
52586
52448
|
}
|
|
52587
52449
|
devicePaths.add(canonicalDevicePath);
|
|
52588
|
-
materializedEntries.push({ entryName: entry.name, binary: fileBinary });
|
|
52589
52450
|
resources.push({ entryName: entry.name, binary: fileBinary, header });
|
|
52590
52451
|
}
|
|
52591
|
-
return { binary,
|
|
52452
|
+
return { binary, resources };
|
|
52592
52453
|
});
|
|
52593
52454
|
}
|
|
52594
52455
|
prepareProtocolV2ResourceSources() {
|
|
@@ -52606,7 +52467,7 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52606
52467
|
});
|
|
52607
52468
|
}
|
|
52608
52469
|
prepareProtocolV2ResourceArchiveSources() {
|
|
52609
|
-
var _a, _b
|
|
52470
|
+
var _a, _b;
|
|
52610
52471
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52611
52472
|
const archiveArtifacts = (_b = (_a = this.params.preparedPlan) === null || _a === void 0 ? void 0 : _a.artifacts.filter(artifact => artifact.role === 'resourceBundle' &&
|
|
52612
52473
|
artifact.target === 'resource' &&
|
|
@@ -52633,20 +52494,7 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
52633
52494
|
if (archiveDigest !== archiveArtifact.artifact.sha256.toLowerCase()) {
|
|
52634
52495
|
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, 'Protocol V2 prepared resource archive does not match its approved receipt', { firmwareUpdateCode: 'FirmwareArtifactReceiptMismatch' });
|
|
52635
52496
|
}
|
|
52636
|
-
|
|
52637
|
-
const sources = [];
|
|
52638
|
-
for (const resource of verifiedArchive.resources) {
|
|
52639
|
-
const source = yield this.openProtocolV2MemorySource(resource.binary);
|
|
52640
|
-
sources.push({
|
|
52641
|
-
name: (_c = resource.entryName.split('/').pop()) !== null && _c !== void 0 ? _c : resource.entryName,
|
|
52642
|
-
source,
|
|
52643
|
-
devicePath: resource.header.devicePath,
|
|
52644
|
-
version: resource.header.version,
|
|
52645
|
-
payloadHash: resource.header.payloadHash,
|
|
52646
|
-
headerHash: resource.header.headerHash,
|
|
52647
|
-
});
|
|
52648
|
-
}
|
|
52649
|
-
return sources;
|
|
52497
|
+
return this.createProtocolV2ResourceSourcesFromArchive(archiveBinary);
|
|
52650
52498
|
});
|
|
52651
52499
|
}
|
|
52652
52500
|
runProtocolV2PreparedArtifacts(features, firmwareType, announceDownload = true) {
|
|
@@ -53014,6 +52862,11 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
53014
52862
|
return `vol0:${path}`;
|
|
53015
52863
|
return `vol0:/${path}`;
|
|
53016
52864
|
}
|
|
52865
|
+
getProtocolV2ResourceComparePath(devicePath) {
|
|
52866
|
+
return isProtocolV2BootResourcePackagePath(devicePath)
|
|
52867
|
+
? PROTOCOL_V2_BOOT_RESOURCE_PACKAGE_PATH
|
|
52868
|
+
: devicePath;
|
|
52869
|
+
}
|
|
53017
52870
|
readProtocolV2DeviceFileHeader(path, expectedSize) {
|
|
53018
52871
|
var _a, _b, _c, _d;
|
|
53019
52872
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -53072,7 +52925,7 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
53072
52925
|
if (!bundle.payloadHash || !bundle.headerHash)
|
|
53073
52926
|
return false;
|
|
53074
52927
|
try {
|
|
53075
|
-
const header = yield this.readProtocolV2DeviceFileHeader(bundle.devicePath, bundle.source.size);
|
|
52928
|
+
const header = yield this.readProtocolV2DeviceFileHeader(this.getProtocolV2ResourceComparePath(bundle.devicePath), bundle.source.size);
|
|
53076
52929
|
if (!header)
|
|
53077
52930
|
return false;
|
|
53078
52931
|
if (bundle.version) {
|
|
@@ -53273,8 +53126,7 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
|
|
|
53273
53126
|
let totalSize = installSources.reduce((total, item) => total + item.source.size, 0);
|
|
53274
53127
|
const resourcesToSync = [];
|
|
53275
53128
|
for (const resource of resourceSources) {
|
|
53276
|
-
|
|
53277
|
-
if (!requiresFreshStaging && (yield this.isProtocolV2ResourceBundleUpToDate(resource))) {
|
|
53129
|
+
if (yield this.isProtocolV2ResourceBundleUpToDate(resource)) {
|
|
53278
53130
|
Log$7.log(`[FirmwareUpdateV4] skip RESC bundle ${resource.name}; already up to date`);
|
|
53279
53131
|
}
|
|
53280
53132
|
else {
|
|
@@ -65216,7 +65068,6 @@ const onCallDevice = (context, message, method) => __awaiter(void 0, void 0, voi
|
|
|
65216
65068
|
if ((_g = method.payload) === null || _g === void 0 ? void 0 : _g.onlyConnectBleDevice) {
|
|
65217
65069
|
preWarmCallbackTask === null || preWarmCallbackTask === void 0 ? void 0 : preWarmCallbackTask.resolve();
|
|
65218
65070
|
Log.debug('Call API - only connect ble device: ', device === null || device === void 0 ? void 0 : device.mainId);
|
|
65219
|
-
requestQueue.releaseTask(method.responseID);
|
|
65220
65071
|
return createResponseMessage(method.responseID, true, null);
|
|
65221
65072
|
}
|
|
65222
65073
|
Log.debug('Call API - setDevice: ', device.mainId);
|
|
@@ -65592,31 +65443,7 @@ function isMissingDetectedProtocolV2Error(method, error) {
|
|
|
65592
65443
|
typeof typedError.message === 'string' &&
|
|
65593
65444
|
typedError.message.includes('Device protocol has not been detected'));
|
|
65594
65445
|
}
|
|
65595
|
-
|
|
65596
|
-
function raceBleAcquire(acquirePromise, abortSignal) {
|
|
65597
|
-
return new Promise((resolve, reject) => {
|
|
65598
|
-
let settled = false;
|
|
65599
|
-
const settle = (fn) => {
|
|
65600
|
-
if (settled)
|
|
65601
|
-
return;
|
|
65602
|
-
settled = true;
|
|
65603
|
-
clearTimeout(deadline);
|
|
65604
|
-
abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener('abort', onAbort);
|
|
65605
|
-
fn();
|
|
65606
|
-
};
|
|
65607
|
-
const onAbort = () => settle(() => reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.CallQueueActionCancelled)));
|
|
65608
|
-
const deadline = setTimeout(() => settle(() => reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BleTimeoutError, `BLE acquire exceeded ${BLE_ACQUIRE_DEADLINE_MS}ms deadline`))), BLE_ACQUIRE_DEADLINE_MS);
|
|
65609
|
-
acquirePromise.then(value => settle(() => resolve(value)), error => settle(() => reject(error)));
|
|
65610
|
-
if (abortSignal) {
|
|
65611
|
-
if (abortSignal.aborted) {
|
|
65612
|
-
onAbort();
|
|
65613
|
-
return;
|
|
65614
|
-
}
|
|
65615
|
-
abortSignal.addEventListener('abort', onAbort);
|
|
65616
|
-
}
|
|
65617
|
-
});
|
|
65618
|
-
}
|
|
65619
|
-
function connectDeviceForBle(method, device, abortSignal, retryCount = 0) {
|
|
65446
|
+
function connectDeviceForBle(method, device, retryCount = 0) {
|
|
65620
65447
|
var _a;
|
|
65621
65448
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65622
65449
|
try {
|
|
@@ -65631,31 +65458,9 @@ function connectDeviceForBle(method, device, abortSignal, retryCount = 0) {
|
|
|
65631
65458
|
!device.commands ||
|
|
65632
65459
|
device.commands.disposed;
|
|
65633
65460
|
if (shouldAcquire) {
|
|
65634
|
-
|
|
65635
|
-
|
|
65636
|
-
|
|
65637
|
-
}
|
|
65638
|
-
if (!useAcquireGuards) {
|
|
65639
|
-
yield device.acquire(method.payload.connectProtocol, {
|
|
65640
|
-
forceProtocolDetection: method.payload.forceProtocolDetection,
|
|
65641
|
-
});
|
|
65642
|
-
}
|
|
65643
|
-
else {
|
|
65644
|
-
try {
|
|
65645
|
-
yield raceBleAcquire(device.acquire(method.payload.connectProtocol, {
|
|
65646
|
-
forceProtocolDetection: method.payload.forceProtocolDetection,
|
|
65647
|
-
}), abortSignal);
|
|
65648
|
-
}
|
|
65649
|
-
catch (err) {
|
|
65650
|
-
if (err.errorCode === hdShared.HardwareErrorCode.BleTimeoutError &&
|
|
65651
|
-
device.mainId &&
|
|
65652
|
-
device.deviceConnector) {
|
|
65653
|
-
yield device.deviceConnector.disconnect(device.mainId).catch(() => undefined);
|
|
65654
|
-
device.markTransportDisconnected();
|
|
65655
|
-
}
|
|
65656
|
-
throw err;
|
|
65657
|
-
}
|
|
65658
|
-
}
|
|
65461
|
+
yield device.acquire(method.payload.connectProtocol, {
|
|
65462
|
+
forceProtocolDetection: method.payload.forceProtocolDetection,
|
|
65463
|
+
});
|
|
65659
65464
|
}
|
|
65660
65465
|
if ((_a = method.payload) === null || _a === void 0 ? void 0 : _a.onlyConnectBleDevice) {
|
|
65661
65466
|
if (shouldAcquire) {
|
|
@@ -65686,7 +65491,7 @@ function connectDeviceForBle(method, device, abortSignal, retryCount = 0) {
|
|
|
65686
65491
|
const nextRetry = retryCount + 1;
|
|
65687
65492
|
Log.debug(`Bluetooth connection will retry, retry count: ${nextRetry}`);
|
|
65688
65493
|
yield wait(3000);
|
|
65689
|
-
yield connectDeviceForBle(method, device,
|
|
65494
|
+
yield connectDeviceForBle(method, device, nextRetry);
|
|
65690
65495
|
}
|
|
65691
65496
|
else {
|
|
65692
65497
|
throw err;
|
|
@@ -65771,7 +65576,7 @@ const ensureConnected = (_context, method, connectId, pollingId, abortSignal) =>
|
|
|
65771
65576
|
if (tryCount === 1) {
|
|
65772
65577
|
device.beginConnectionAttempt();
|
|
65773
65578
|
}
|
|
65774
|
-
yield connectDeviceForBle(method, device
|
|
65579
|
+
yield connectDeviceForBle(method, device);
|
|
65775
65580
|
}
|
|
65776
65581
|
resolve(device);
|
|
65777
65582
|
return;
|
|
@@ -66387,7 +66192,6 @@ exports.parseConnectSettings = parseConnectSettings;
|
|
|
66387
66192
|
exports.parseMessage = parseMessage;
|
|
66388
66193
|
exports.patchFeatures = patchFeatures;
|
|
66389
66194
|
exports.preloadSessionCache = preloadSessionCache;
|
|
66390
|
-
exports.prepareFirmwareUpdateV4MemoryHost = prepareFirmwareUpdateV4MemoryHost;
|
|
66391
66195
|
exports.projectDeviceStateFeatures = projectFeatures;
|
|
66392
66196
|
exports.registerFirmwareUpdateHostBinding = registerFirmwareUpdateHostBinding;
|
|
66393
66197
|
exports.safeThrowError = safeThrowError;
|
|
@@ -4,6 +4,7 @@ export declare const PROTOCOL_V2_BOOT_RESOURCE_PACKAGE_STAGING_PATH: string;
|
|
|
4
4
|
export declare const PROTOCOL_V2_ROM_PARAMS_PACKAGE_PATH = "vol0:/loaders/rom/params.okpkg";
|
|
5
5
|
export declare const PROTOCOL_V2_RESOURCE_PACKAGE_HEADER_SIZE = 24464;
|
|
6
6
|
export declare function parseProtocolV2Resources(value: unknown): IProtocolV2Resources | undefined;
|
|
7
|
+
export declare function isProtocolV2ResourceArchiveEntryName(entryName: string): boolean;
|
|
7
8
|
export type ProtocolV2ResourcePackageHeader = {
|
|
8
9
|
version: IVersionArray;
|
|
9
10
|
payloadLength: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/resources.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEvE,eAAO,MAAM,sCAAsC,iDACH,CAAC;AACjD,eAAO,MAAM,8CAA8C,QAAsD,CAAC;AAClH,eAAO,MAAM,mCAAmC,mCAAmC,CAAC;AACpF,eAAO,MAAM,wCAAwC,QAAS,CAAC;AAW/D,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,GAAG,SAAS,CA8BzF;
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/resources.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEvE,eAAO,MAAM,sCAAsC,iDACH,CAAC;AACjD,eAAO,MAAM,8CAA8C,QAAsD,CAAC;AAClH,eAAO,MAAM,mCAAmC,mCAAmC,CAAC;AACpF,eAAO,MAAM,wCAAwC,QAAS,CAAC;AAW/D,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,oBAAoB,GAAG,SAAS,CA8BzF;AAED,wBAAgB,oCAAoC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAY/E;AA0CD,MAAM,MAAM,+BAA+B,GAAG;IAC5C,OAAO,EAAE,aAAa,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,MAAM,GAClB,+BAA+B,CAyCjC;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,WAAW,GAAG,UAAU,GAC/B,+BAA+B,CAGjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceFeaturesCompat.d.ts","sourceRoot":"","sources":["../../src/utils/deviceFeaturesCompat.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"deviceFeaturesCompat.d.ts","sourceRoot":"","sources":["../../src/utils/deviceFeaturesCompat.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAEd,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;AAoB5D,eAAO,MAAM,qBAAqB,cAAe,mBAAmB,KAAG,MAWtE,CAAC;AAEF,eAAO,MAAM,2BAA2B,cAAe,mBAAmB,KAAG,OAI5E,CAAC;AAEF,eAAO,MAAM,iBAAiB,cAAe,mBAAmB,KAAG,WAqDlE,CAAC;AAEF,eAAO,MAAM,yBAAyB,cAAe,mBAAmB,KAAG,aAsB1E,CAAC;AAEF,eAAO,MAAM,oBAAoB,cAAe,mBAAmB,KAAG,MAAM,GAAG,IAO9E,CAAC;AAEF,eAAO,MAAM,4BAA4B,cAAe,mBAAmB,KAAG,MAAM,GAAG,IAgBtF,CAAC;AAEF,eAAO,MAAM,8BAA8B,cAAe,mBAAmB,KAAG,MAAM,GAAG,IAiBxF,CAAC;AAEF,eAAO,MAAM,yBAAyB,cAAe,mBAAmB,KAAG,MAAM,GAAG,IAUnF,CAAC;AAEF,eAAO,MAAM,+BAA+B,cAAe,mBAAmB,KAAG,MAAM,GAAG,IASzF,CAAC"}
|