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/index.js
CHANGED
|
@@ -529,7 +529,7 @@ function yamlString(value) {
|
|
|
529
529
|
|
|
530
530
|
// src/kit/versions.ts
|
|
531
531
|
function scaffolderVersion() {
|
|
532
|
-
return false ? "0.0.0" : "0.5.
|
|
532
|
+
return false ? "0.0.0" : "0.5.2";
|
|
533
533
|
}
|
|
534
534
|
function workspaceVersions() {
|
|
535
535
|
return typeof define_COGITATOR_VERSIONS_default === "undefined" ? {} : define_COGITATOR_VERSIONS_default;
|
|
@@ -6225,6 +6225,14 @@ function firstRunNotice(env = process.env) {
|
|
|
6225
6225
|
}
|
|
6226
6226
|
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}`;
|
|
6227
6227
|
}
|
|
6228
|
+
var UA_PLATFORMS = {
|
|
6229
|
+
darwin: "Macintosh; Intel Mac OS X 10_15_7",
|
|
6230
|
+
linux: "X11; Linux x86_64",
|
|
6231
|
+
win32: "Windows NT 10.0; Win64; x64"
|
|
6232
|
+
};
|
|
6233
|
+
function telemetryUserAgent(payload) {
|
|
6234
|
+
return `Mozilla/5.0 (${UA_PLATFORMS[payload.os] ?? payload.os}) create-cogitator-app/${payload.version}`;
|
|
6235
|
+
}
|
|
6228
6236
|
async function sendTelemetry(payload, options = {}) {
|
|
6229
6237
|
const website = options.websiteId ?? telemetryWebsiteId();
|
|
6230
6238
|
if (!website) return false;
|
|
@@ -6243,7 +6251,7 @@ async function sendTelemetry(payload, options = {}) {
|
|
|
6243
6251
|
method: "POST",
|
|
6244
6252
|
headers: {
|
|
6245
6253
|
"content-type": "application/json",
|
|
6246
|
-
"user-agent":
|
|
6254
|
+
"user-agent": telemetryUserAgent(payload)
|
|
6247
6255
|
},
|
|
6248
6256
|
body: JSON.stringify(body),
|
|
6249
6257
|
signal: AbortSignal.timeout(options.timeoutMs ?? SEND_TIMEOUT_MS)
|