create-cogitator-app 0.5.1 → 0.5.2
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.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/lib.js +10 -2
- package/dist/lib.js.map +1 -1
- package/package.json +2 -1
package/dist/lib.js
CHANGED
|
@@ -392,7 +392,7 @@ function yamlString(value) {
|
|
|
392
392
|
|
|
393
393
|
// src/kit/versions.ts
|
|
394
394
|
function scaffolderVersion() {
|
|
395
|
-
return false ? "0.0.0" : "0.5.
|
|
395
|
+
return false ? "0.0.0" : "0.5.2";
|
|
396
396
|
}
|
|
397
397
|
function workspaceVersions() {
|
|
398
398
|
return typeof define_COGITATOR_VERSIONS_default === "undefined" ? {} : define_COGITATOR_VERSIONS_default;
|
|
@@ -7456,6 +7456,14 @@ function firstRunNotice(env = process.env) {
|
|
|
7456
7456
|
}
|
|
7457
7457
|
return `Cogitator sends one anonymous event per scaffolded project (version, preset, provider, memory, add-ons, package manager, Node major, OS). Turn it off with --no-telemetry or COGITATOR_TELEMETRY_DISABLED=1: ${TELEMETRY_DOCS}`;
|
|
7458
7458
|
}
|
|
7459
|
+
var UA_PLATFORMS = {
|
|
7460
|
+
darwin: "Macintosh; Intel Mac OS X 10_15_7",
|
|
7461
|
+
linux: "X11; Linux x86_64",
|
|
7462
|
+
win32: "Windows NT 10.0; Win64; x64"
|
|
7463
|
+
};
|
|
7464
|
+
function telemetryUserAgent(payload) {
|
|
7465
|
+
return `Mozilla/5.0 (${UA_PLATFORMS[payload.os] ?? payload.os}) create-cogitator-app/${payload.version}`;
|
|
7466
|
+
}
|
|
7459
7467
|
async function sendTelemetry(payload, options = {}) {
|
|
7460
7468
|
const website = options.websiteId ?? telemetryWebsiteId();
|
|
7461
7469
|
if (!website) return false;
|
|
@@ -7474,7 +7482,7 @@ async function sendTelemetry(payload, options = {}) {
|
|
|
7474
7482
|
method: "POST",
|
|
7475
7483
|
headers: {
|
|
7476
7484
|
"content-type": "application/json",
|
|
7477
|
-
"user-agent":
|
|
7485
|
+
"user-agent": telemetryUserAgent(payload)
|
|
7478
7486
|
},
|
|
7479
7487
|
body: JSON.stringify(body),
|
|
7480
7488
|
signal: AbortSignal.timeout(options.timeoutMs ?? SEND_TIMEOUT_MS)
|