extension 4.0.33 → 4.0.34
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
CHANGED
|
@@ -6485,7 +6485,7 @@ var __webpack_modules__ = {
|
|
|
6485
6485
|
if (0 === this.buffer.length) return;
|
|
6486
6486
|
const batch = this.buffer.splice(0, this.buffer.length);
|
|
6487
6487
|
const ac = new AbortController();
|
|
6488
|
-
const t = setTimeout(()=>ac.abort(),
|
|
6488
|
+
const t = setTimeout(()=>ac.abort(), this.timeoutMs);
|
|
6489
6489
|
const url = new URL('/capture/', this.host);
|
|
6490
6490
|
await fetch(url.toString(), {
|
|
6491
6491
|
method: 'POST',
|
|
@@ -6544,6 +6544,7 @@ var __webpack_modules__ = {
|
|
|
6544
6544
|
_define_property(this, "sampleRate", void 0);
|
|
6545
6545
|
_define_property(this, "maxEventsPerRun", void 0);
|
|
6546
6546
|
_define_property(this, "debounceMs", void 0);
|
|
6547
|
+
_define_property(this, "timeoutMs", void 0);
|
|
6547
6548
|
_define_property(this, "debug", void 0);
|
|
6548
6549
|
_define_property(this, "common", void 0);
|
|
6549
6550
|
_define_property(this, "recent", new Map());
|
|
@@ -6557,6 +6558,7 @@ var __webpack_modules__ = {
|
|
|
6557
6558
|
this.sampleRate = clamp(init.sampleRate ?? DEFAULT_SAMPLE_RATE, 0, 1);
|
|
6558
6559
|
this.maxEventsPerRun = Math.max(0, init.maxEventsPerRun ?? DEFAULT_MAX_EVENTS);
|
|
6559
6560
|
this.debounceMs = Math.max(0, init.debounceMs ?? DEFAULT_DEBOUNCE_MS);
|
|
6561
|
+
this.timeoutMs = Math.max(1, init.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
6560
6562
|
this.common = {
|
|
6561
6563
|
os: process.platform,
|
|
6562
6564
|
arch: process.arch,
|
|
@@ -6607,14 +6609,14 @@ var __webpack_modules__ = {
|
|
|
6607
6609
|
}
|
|
6608
6610
|
}
|
|
6609
6611
|
}
|
|
6610
|
-
function
|
|
6612
|
+
function telemetryCommandContext(command, argv = process.argv) {
|
|
6611
6613
|
if ('create' !== command) return {};
|
|
6612
6614
|
return {
|
|
6613
|
-
template: readArgValue(
|
|
6615
|
+
template: readArgValue(argv, [
|
|
6614
6616
|
'--template',
|
|
6615
6617
|
'-t'
|
|
6616
6618
|
]),
|
|
6617
|
-
source: readArgValue(
|
|
6619
|
+
source: readArgValue(argv, [
|
|
6618
6620
|
'--source'
|
|
6619
6621
|
]) || 'cli'
|
|
6620
6622
|
};
|
|
@@ -6650,7 +6652,7 @@ var __webpack_modules__ = {
|
|
|
6650
6652
|
command,
|
|
6651
6653
|
success: true,
|
|
6652
6654
|
version: telemetry_cli_version,
|
|
6653
|
-
...
|
|
6655
|
+
...telemetryCommandContext(command)
|
|
6654
6656
|
});
|
|
6655
6657
|
}
|
|
6656
6658
|
function markCommandFailure(command = invoked) {
|
|
@@ -6659,7 +6661,7 @@ var __webpack_modules__ = {
|
|
|
6659
6661
|
command,
|
|
6660
6662
|
success: false,
|
|
6661
6663
|
version: telemetry_cli_version,
|
|
6662
|
-
...
|
|
6664
|
+
...telemetryCommandContext(command)
|
|
6663
6665
|
});
|
|
6664
6666
|
}
|
|
6665
6667
|
function printOptOutNoticeIfFirstRun() {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Telemetry, type TelemetrySource } from './telemetry';
|
|
2
2
|
type KnownCommand = 'create' | 'dev' | 'start' | 'preview' | 'build' | 'install' | 'uninstall' | 'telemetry' | 'unknown';
|
|
3
3
|
export declare function detectInvokedCommand(argv: string[]): KnownCommand;
|
|
4
|
+
export declare function telemetryCommandContext(command: string, argv?: string[]): {
|
|
5
|
+
template?: string;
|
|
6
|
+
source?: string;
|
|
7
|
+
};
|
|
4
8
|
export declare const telemetry: Telemetry;
|
|
5
9
|
export declare function getTelemetryConsent(): {
|
|
6
10
|
enabled: boolean;
|
|
@@ -16,6 +16,7 @@ type TelemetryInit = {
|
|
|
16
16
|
sampleRate?: number;
|
|
17
17
|
maxEventsPerRun?: number;
|
|
18
18
|
debounceMs?: number;
|
|
19
|
+
timeoutMs?: number;
|
|
19
20
|
};
|
|
20
21
|
type TelemetryStorage = {
|
|
21
22
|
telemetryDir: string;
|
|
@@ -45,6 +46,7 @@ export declare class Telemetry {
|
|
|
45
46
|
private readonly sampleRate;
|
|
46
47
|
private readonly maxEventsPerRun;
|
|
47
48
|
private readonly debounceMs;
|
|
49
|
+
private readonly timeoutMs;
|
|
48
50
|
private readonly debug;
|
|
49
51
|
private readonly common;
|
|
50
52
|
private recent;
|
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"extension": "./bin/extension.cjs"
|
|
39
39
|
},
|
|
40
40
|
"name": "extension",
|
|
41
|
-
"version": "4.0.
|
|
41
|
+
"version": "4.0.34",
|
|
42
42
|
"description": "The cross-browser extension framework. Build Chrome, Edge, Firefox, and Safari extensions with no build configuration.",
|
|
43
43
|
"homepage": "https://extension.js.org/",
|
|
44
44
|
"bugs": {
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"vivaldi-location2": "2.1.1",
|
|
107
107
|
"waterfox-location": "2.1.1",
|
|
108
108
|
"yandex-location": "2.1.1",
|
|
109
|
-
"extension-create": "4.0.
|
|
110
|
-
"extension-develop": "4.0.
|
|
111
|
-
"extension-install": "4.0.
|
|
109
|
+
"extension-create": "4.0.34",
|
|
110
|
+
"extension-develop": "4.0.34",
|
|
111
|
+
"extension-install": "4.0.34",
|
|
112
112
|
"commander": "^15.0.0",
|
|
113
113
|
"pintor": "0.3.0",
|
|
114
114
|
"semver": "^7.7.3",
|