@capacitor/cli
Advanced tools
Comparing version 7.0.0-nightly-20241018T150527.0 to 7.0.0-nightly-20241021T150557.0
@@ -9,3 +9,4 @@ "use strict"; | ||
const sysconfig_1 = require("../sysconfig"); | ||
const telemetry_1 = require("../telemetry"); | ||
const 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`; | ||
async function telemetryCommand(onOrOff) { | ||
@@ -22,3 +23,3 @@ const sysconfig = await (0, sysconfig_1.readConfig)(); | ||
if (enabled) { | ||
log_1.output.write(telemetry_1.THANK_YOU); | ||
log_1.output.write(THANK_YOU); | ||
} | ||
@@ -25,0 +26,0 @@ } |
"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"); | ||
@@ -14,4 +14,5 @@ const commander_1 = require("commander"); | ||
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/telemetry')}` + | ||
`\nYou can disable telemetry at any time by using the ${colors_1.default.input('npx cap telemetry off')} command.`; | ||
function telemetryAction(config, action) { | ||
@@ -59,5 +60,6 @@ return async (...actionArgs) => { | ||
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); | ||
} | ||
@@ -91,15 +93,2 @@ await sendMetric(sysconfig, 'capacitor_cli_command', 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; | ||
} | ||
/** | ||
@@ -106,0 +95,0 @@ * Get a unique anonymous identifier for this app. |
{ | ||
"name": "@capacitor/cli", | ||
"version": "7.0.0-nightly-20241018T150527.0", | ||
"version": "7.0.0-nightly-20241021T150557.0", | ||
"description": "Capacitor: Cross-platform apps with JavaScript and the web", | ||
@@ -5,0 +5,0 @@ "homepage": "https://capacitorjs.com", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
848063
6895