extension 3.6.0 → 3.6.1
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/cli.cjs +8 -2
- package/package.json +3 -3
package/dist/cli.cjs
CHANGED
|
@@ -585,6 +585,8 @@ Cross-Browser Compatibility
|
|
|
585
585
|
const DEFAULT_FLUSH_AT = Number(process.env.EXTENSION_TELEMETRY_FLUSH_AT || 10);
|
|
586
586
|
const DEFAULT_FLUSH_INTERVAL = Number(process.env.EXTENSION_TELEMETRY_FLUSH_INTERVAL || 2000);
|
|
587
587
|
const DEFAULT_TIMEOUT_MS = Number(process.env.EXTENSION_TELEMETRY_TIMEOUT_MS || 200);
|
|
588
|
+
const DEFAULT_POSTHOG_KEY = 'phc_Np5x3Jg3h2V7kTFtNch2uz6QBaWDycQpIidzX5PetaN';
|
|
589
|
+
const DEFAULT_POSTHOG_HOST = 'https://us.i.posthog.com';
|
|
588
590
|
class Telemetry {
|
|
589
591
|
track(event, props = {}) {
|
|
590
592
|
if (this.disabled || !this.storage) return;
|
|
@@ -605,6 +607,7 @@ Cross-Browser Compatibility
|
|
|
605
607
|
}
|
|
606
608
|
if (this.debug) console.error('[telemetry]', JSON.stringify(payload));
|
|
607
609
|
if (!this.apiKey || !this.host) return;
|
|
610
|
+
if ('cli_shutdown' === event) return void this.buffer.push(payload);
|
|
608
611
|
this.buffer.push(payload);
|
|
609
612
|
if (this.buffer.length >= DEFAULT_FLUSH_AT) return void this.flush();
|
|
610
613
|
if (!this.timer) this.timer = setTimeout(()=>{
|
|
@@ -667,8 +670,8 @@ Cross-Browser Compatibility
|
|
|
667
670
|
is_ci: isCI(),
|
|
668
671
|
schema_version: 1
|
|
669
672
|
};
|
|
670
|
-
this.apiKey = init.apiKey ||
|
|
671
|
-
this.host = init.host ||
|
|
673
|
+
this.apiKey = init.apiKey || DEFAULT_POSTHOG_KEY;
|
|
674
|
+
this.host = init.host || DEFAULT_POSTHOG_HOST;
|
|
672
675
|
if (!this.disabled && this.storage) {
|
|
673
676
|
const consentPath = this.storage.consentFile;
|
|
674
677
|
try {
|
|
@@ -746,6 +749,7 @@ Cross-Browser Compatibility
|
|
|
746
749
|
});
|
|
747
750
|
if (!telemetryDisabled) {
|
|
748
751
|
const startedAt = Date.now();
|
|
752
|
+
let shutdownTracked = false;
|
|
749
753
|
const known = new Set([
|
|
750
754
|
'create',
|
|
751
755
|
'dev',
|
|
@@ -766,6 +770,8 @@ Cross-Browser Compatibility
|
|
|
766
770
|
telemetry_cli_telemetry.track('manifest_summary', summary);
|
|
767
771
|
}
|
|
768
772
|
process.on('beforeExit', async function() {
|
|
773
|
+
if (shutdownTracked) return;
|
|
774
|
+
shutdownTracked = true;
|
|
769
775
|
telemetry_cli_telemetry.track('cli_shutdown', {
|
|
770
776
|
command_guess: invoked,
|
|
771
777
|
duration_ms: Date.now() - startedAt,
|
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"extension": "./bin/extension.cjs"
|
|
34
34
|
},
|
|
35
35
|
"name": "extension",
|
|
36
|
-
"version": "3.6.
|
|
36
|
+
"version": "3.6.1",
|
|
37
37
|
"description": "Create cross-browser extensions with no build configuration.",
|
|
38
38
|
"homepage": "https://extension.js.org/",
|
|
39
39
|
"bugs": {
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"@types/chrome": "^0.1.33",
|
|
91
91
|
"@types/node": "^25.2.0",
|
|
92
92
|
"@types/webextension-polyfill": "0.12.4",
|
|
93
|
-
"extension-create": "^3.6.
|
|
94
|
-
"extension-develop": "^3.6.
|
|
93
|
+
"extension-create": "^3.6.1",
|
|
94
|
+
"extension-develop": "^3.6.1",
|
|
95
95
|
"commander": "^14.0.3",
|
|
96
96
|
"pintor": "0.3.0",
|
|
97
97
|
"semver": "^7.7.3",
|