@arkts/image-manager 0.5.5 → 0.5.7
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/dist/index.cjs +12 -13
- package/dist/index.mjs +12 -13
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -32,7 +32,7 @@ let base64_js = require("base64-js");
|
|
|
32
32
|
let vscode_fs = require("vscode-fs");
|
|
33
33
|
|
|
34
34
|
//#region package.json
|
|
35
|
-
var version = "0.5.
|
|
35
|
+
var version = "0.5.7";
|
|
36
36
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/common/serializable-content.ts
|
|
@@ -276,11 +276,10 @@ var EmulatorFileImpl = class extends SerializableFileImpl {
|
|
|
276
276
|
}
|
|
277
277
|
}).filter(Boolean);
|
|
278
278
|
}
|
|
279
|
-
getDeviceItems(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
else
|
|
283
|
-
else this.getDeviceItems(item.getChildren());
|
|
279
|
+
getDeviceItems() {
|
|
280
|
+
const items = [];
|
|
281
|
+
for (const item of this.getItems()) if (EmulatorGroupItem.is(item)) for (const child of item.getChildren()) items.push(child);
|
|
282
|
+
else items.push(item);
|
|
284
283
|
return items;
|
|
285
284
|
}
|
|
286
285
|
findRemoteImageByDeviceItem(deviceItem, remoteImages) {
|
|
@@ -1343,16 +1342,16 @@ let OptionsResolver;
|
|
|
1343
1342
|
default: return join(URI.file(os.homedir()), ".huawei", "Emulator");
|
|
1344
1343
|
}
|
|
1345
1344
|
}
|
|
1346
|
-
const imageBasePath = typeof options.imageBasePath === "string" ? URI.file(options.imageBasePath) : options.imageBasePath
|
|
1347
|
-
const cachePath = typeof options.cachePath === "string" ? URI.file(options.cachePath) : options.cachePath
|
|
1345
|
+
const imageBasePath = typeof options.imageBasePath === "string" ? options.imageBasePath ? URI.file(options.imageBasePath) : resolveDefaultImageBasePath() : options.imageBasePath ? options.imageBasePath : resolveDefaultImageBasePath();
|
|
1346
|
+
const cachePath = typeof options.cachePath === "string" ? options.cachePath ? URI.file(options.cachePath) : join(imageBasePath, "cache") : options.cachePath ? options.cachePath : join(imageBasePath, "cache");
|
|
1348
1347
|
return {
|
|
1349
1348
|
imageBasePath,
|
|
1350
|
-
deployedPath: typeof options.deployedPath === "string" ? URI.file(options.deployedPath) : options.deployedPath
|
|
1349
|
+
deployedPath: typeof options.deployedPath === "string" ? options.deployedPath ? URI.file(options.deployedPath) : resolveDefaultDeployedPath() : options.deployedPath ? options.deployedPath : resolveDefaultDeployedPath(),
|
|
1351
1350
|
cachePath,
|
|
1352
|
-
sdkPath: typeof options.sdkPath === "string" ? URI.file(options.sdkPath) : options.sdkPath
|
|
1353
|
-
configPath: typeof options.configPath === "string" ? URI.file(options.configPath) : options.configPath
|
|
1354
|
-
logPath: typeof options.logPath === "string" ? URI.file(options.logPath) : options.logPath
|
|
1355
|
-
emulatorPath: typeof options.emulatorPath === "string" ? URI.file(options.emulatorPath) : options.emulatorPath
|
|
1351
|
+
sdkPath: typeof options.sdkPath === "string" ? options.sdkPath ? URI.file(options.sdkPath) : resolveDefaultSdkPath() : options.sdkPath ? options.sdkPath : resolveDefaultSdkPath(),
|
|
1352
|
+
configPath: typeof options.configPath === "string" ? options.configPath ? URI.file(options.configPath) : resolveDefaultConfigPath() : options.configPath ? options.configPath : resolveDefaultConfigPath(),
|
|
1353
|
+
logPath: typeof options.logPath === "string" ? options.logPath ? URI.file(options.logPath) : resolveDefaultLogPath() : options.logPath ? options.logPath : resolveDefaultLogPath(),
|
|
1354
|
+
emulatorPath: typeof options.emulatorPath === "string" ? options.emulatorPath ? URI.file(options.emulatorPath) : resolveDefaultEmulatorPath() : options.emulatorPath ? options.emulatorPath : resolveDefaultEmulatorPath(),
|
|
1356
1355
|
adapter
|
|
1357
1356
|
};
|
|
1358
1357
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { fromByteArray } from "base64-js";
|
|
|
3
3
|
import { RelativePattern, WriteableFlags, createNodeFileSystem } from "vscode-fs";
|
|
4
4
|
|
|
5
5
|
//#region package.json
|
|
6
|
-
var version = "0.5.
|
|
6
|
+
var version = "0.5.7";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/common/serializable-content.ts
|
|
@@ -247,11 +247,10 @@ var EmulatorFileImpl = class extends SerializableFileImpl {
|
|
|
247
247
|
}
|
|
248
248
|
}).filter(Boolean);
|
|
249
249
|
}
|
|
250
|
-
getDeviceItems(
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
else
|
|
254
|
-
else this.getDeviceItems(item.getChildren());
|
|
250
|
+
getDeviceItems() {
|
|
251
|
+
const items = [];
|
|
252
|
+
for (const item of this.getItems()) if (EmulatorGroupItem.is(item)) for (const child of item.getChildren()) items.push(child);
|
|
253
|
+
else items.push(item);
|
|
255
254
|
return items;
|
|
256
255
|
}
|
|
257
256
|
findRemoteImageByDeviceItem(deviceItem, remoteImages) {
|
|
@@ -1314,16 +1313,16 @@ let OptionsResolver;
|
|
|
1314
1313
|
default: return join(URI.file(os.homedir()), ".huawei", "Emulator");
|
|
1315
1314
|
}
|
|
1316
1315
|
}
|
|
1317
|
-
const imageBasePath = typeof options.imageBasePath === "string" ? URI.file(options.imageBasePath) : options.imageBasePath
|
|
1318
|
-
const cachePath = typeof options.cachePath === "string" ? URI.file(options.cachePath) : options.cachePath
|
|
1316
|
+
const imageBasePath = typeof options.imageBasePath === "string" ? options.imageBasePath ? URI.file(options.imageBasePath) : resolveDefaultImageBasePath() : options.imageBasePath ? options.imageBasePath : resolveDefaultImageBasePath();
|
|
1317
|
+
const cachePath = typeof options.cachePath === "string" ? options.cachePath ? URI.file(options.cachePath) : join(imageBasePath, "cache") : options.cachePath ? options.cachePath : join(imageBasePath, "cache");
|
|
1319
1318
|
return {
|
|
1320
1319
|
imageBasePath,
|
|
1321
|
-
deployedPath: typeof options.deployedPath === "string" ? URI.file(options.deployedPath) : options.deployedPath
|
|
1320
|
+
deployedPath: typeof options.deployedPath === "string" ? options.deployedPath ? URI.file(options.deployedPath) : resolveDefaultDeployedPath() : options.deployedPath ? options.deployedPath : resolveDefaultDeployedPath(),
|
|
1322
1321
|
cachePath,
|
|
1323
|
-
sdkPath: typeof options.sdkPath === "string" ? URI.file(options.sdkPath) : options.sdkPath
|
|
1324
|
-
configPath: typeof options.configPath === "string" ? URI.file(options.configPath) : options.configPath
|
|
1325
|
-
logPath: typeof options.logPath === "string" ? URI.file(options.logPath) : options.logPath
|
|
1326
|
-
emulatorPath: typeof options.emulatorPath === "string" ? URI.file(options.emulatorPath) : options.emulatorPath
|
|
1322
|
+
sdkPath: typeof options.sdkPath === "string" ? options.sdkPath ? URI.file(options.sdkPath) : resolveDefaultSdkPath() : options.sdkPath ? options.sdkPath : resolveDefaultSdkPath(),
|
|
1323
|
+
configPath: typeof options.configPath === "string" ? options.configPath ? URI.file(options.configPath) : resolveDefaultConfigPath() : options.configPath ? options.configPath : resolveDefaultConfigPath(),
|
|
1324
|
+
logPath: typeof options.logPath === "string" ? options.logPath ? URI.file(options.logPath) : resolveDefaultLogPath() : options.logPath ? options.logPath : resolveDefaultLogPath(),
|
|
1325
|
+
emulatorPath: typeof options.emulatorPath === "string" ? options.emulatorPath ? URI.file(options.emulatorPath) : resolveDefaultEmulatorPath() : options.emulatorPath ? options.emulatorPath : resolveDefaultEmulatorPath(),
|
|
1327
1326
|
adapter
|
|
1328
1327
|
};
|
|
1329
1328
|
}
|
package/package.json
CHANGED