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,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sendMetric = exports.telemetryAction = exports.THANK_YOU = void 0;
exports.sendMetric = exports.telemetryAction = void 0;
const tslib_1 = require("tslib");
const commander_1 = require("commander");
const debug_1 = tslib_1.__importDefault(require("debug"));
@ -11,8 +11,9 @@ const sysconfig_1 = require("./sysconfig");
const subprocess_1 = require("./util/subprocess");
const term_1 = require("./util/term");
const debug = (0, debug_1.default)('capacitor:telemetry');
exports.THANK_YOU = `\nThank you for helping to make Capacitor better! 💖` +
`\nInformation about the data we collect is available on our website: ${colors_1.default.strong('https://capacitorjs.com/telemetry')}\n`;
const THANK_YOU = `\nThank you for helping improve Capacitor by sharing anonymous usage data! 💖` +
`\nInformation about the data we collect is available on our website: ${colors_1.default.strong('https://capacitorjs.com/docs/next/cli/telemetry')}` +
`\nYou can disable telemetry at any time by using the ${colors_1.default.input('npx cap telemetry off')} command.`;
function telemetryAction(config, action) {
return async (...actionArgs) => {
const start = new Date();
@ -55,9 +56,10 @@ function telemetryAction(config, action) {
if ((0, term_1.isInteractive)()) {
let sysconfig = await (0, sysconfig_1.readConfig)();
if (!error && typeof sysconfig.telemetry === 'undefined') {
const confirm = await promptForTelemetry();
sysconfig = { ...sysconfig, telemetry: confirm };
// Telemetry is opt-out; turn telemetry on then inform the user how to opt-out.
sysconfig = { ...sysconfig, telemetry: true };
await (0, sysconfig_1.writeConfig)(sysconfig);
log_1.output.write(THANK_YOU);
}
await sendMetric(sysconfig, 'capacitor_cli_command', data);
}
@ -86,19 +88,6 @@ async function sendMetric(sysconfig, name, data) {
}
}
exports.sendMetric = sendMetric;
async function promptForTelemetry() {
const { confirm } = await (0, log_1.logPrompt)(`${colors_1.default.strong('Would you like to help improve Capacitor by sharing anonymous usage data? 💖')}\n` +
`Read more about what is being collected and why here: ${colors_1.default.strong('https://capacitorjs.com/telemetry')}. You can change your mind at any time by using the ${colors_1.default.input('npx cap telemetry')} command.`, {
type: 'confirm',
name: 'confirm',
message: 'Share anonymous usage data?',
initial: true,
});
if (confirm) {
log_1.output.write(exports.THANK_YOU);
}
return confirm;
}
/**
* Get a unique anonymous identifier for this app.
*/