Update capacitor version

This commit is contained in:
Pieter Vander Vennet 2025-07-06 20:20:48 +02:00
parent 91155bce0a
commit f3b3a86b32
610 changed files with 28718 additions and 7101 deletions

View file

@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CapLiveReloadHelper = void 0;
const utils_fs_1 = require("@ionic/utils-fs");
const fs_extra_1 = require("fs-extra");
const os_1 = require("os");
const path_1 = require("path");
class CapLiveReload {
@ -73,7 +73,7 @@ class CapLiveReload {
return res[0].address;
}
const all = Object.keys(interfaces)
.map(nic => {
.map((nic) => {
//
// Note: name will only be `public` or `private`
// when this is called.
@ -86,9 +86,7 @@ class CapLiveReload {
if (!name) {
return true;
}
return name === 'public'
? isPrivate(details.address)
: isPublic(details.address);
return name === 'public' ? isPrivate(details.address) : isPublic(details.address);
});
return addresses.length ? addresses[0].address : undefined;
})
@ -128,22 +126,21 @@ class CapLiveReload {
const capConfigPath = rootConfigChange
? config.app.extConfigFilePath
: (0, path_1.join)(platformAbsPath, 'capacitor.config.json');
const configJson = (0, utils_fs_1.readJSONSync)(capConfigPath);
const configJson = (0, fs_extra_1.readJSONSync)(capConfigPath);
this.configJsonToRevertTo.json = JSON.stringify(configJson, null, 2);
this.configJsonToRevertTo.platformPath = capConfigPath;
const url = `http://${options.host}:${options.port}`;
configJson.server = {
url,
};
(0, utils_fs_1.writeJSONSync)(capConfigPath, configJson, { spaces: '\t' });
(0, fs_extra_1.writeJSONSync)(capConfigPath, configJson, { spaces: '\t' });
}
async revertCapConfigForLiveReload() {
if (this.configJsonToRevertTo.json == null ||
this.configJsonToRevertTo.platformPath == null)
if (this.configJsonToRevertTo.json == null || this.configJsonToRevertTo.platformPath == null)
return;
const capConfigPath = this.configJsonToRevertTo.platformPath;
const configJson = this.configJsonToRevertTo.json;
(0, utils_fs_1.writeJSONSync)(capConfigPath, JSON.parse(configJson), { spaces: '\t' });
(0, fs_extra_1.writeJSONSync)(capConfigPath, JSON.parse(configJson), { spaces: '\t' });
this.configJsonToRevertTo.json = null;
this.configJsonToRevertTo.platformPath = null;
}