extension 4.0.33 → 4.0.35

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/README.md CHANGED
@@ -184,6 +184,36 @@ npx extension@latest dev https://github.com/GoogleChrome/chrome-extensions-sampl
184
184
  - Open issues and feature requests on [GitHub](https://github.com/extension-js/extension.js/issues)
185
185
  - Browse production-ready [examples](https://github.com/extension-js/examples)
186
186
 
187
+ ## Sponsors
188
+
189
+ Sponsors help the project ship faster releases, better developer experience, and long-term reliability for extension teams.
190
+
191
+ <div align="center">
192
+ <p>
193
+ <a href="https://www.testmuai.com/?utm_medium=sponsor&utm_source=extensionjs" target="_blank" rel="noopener noreferrer">
194
+ <picture>
195
+ <source media="(prefers-color-scheme: dark)" srcset="https://extension.js.org/images/sponsors/testmuai_dark.svg" />
196
+ <source media="(prefers-color-scheme: light)" srcset="https://extension.js.org/images/sponsors/testmuai.svg" />
197
+ <img src="https://extension.js.org/images/sponsors/testmuai.svg" width="220" alt="TestMu AI" />
198
+ </picture>
199
+ </a>
200
+ </p>
201
+ <p>
202
+ <a href="https://extension.dev/?utm_medium=sponsor&utm_source=extensionjs" target="_blank" rel="noopener noreferrer">
203
+ <picture>
204
+ <source media="(prefers-color-scheme: dark)" srcset="https://extension.js.org/images/sponsors/extensiondev_dark.svg" />
205
+ <source media="(prefers-color-scheme: light)" srcset="https://extension.js.org/images/sponsors/extensiondev.svg" />
206
+ <img src="https://extension.js.org/images/sponsors/extensiondev.svg" width="220" alt="extension.dev" />
207
+ </picture>
208
+ </a>
209
+ </p>
210
+ <p>
211
+ <a href="https://github.com/sponsors/cezaraugusto">Become a sponsor</a>
212
+ </p>
213
+ </div>
214
+
215
+ Documentation is hosted by [Mintlify](https://mintlify.com/?utm_medium=infrastructure&utm_source=extensionjs) through its open source program. Tiers and placement are listed in [BACKERS.md](https://github.com/extension-js/extension.js/blob/main/BACKERS.md).
216
+
187
217
  ## License
188
218
 
189
219
  MIT (c) Cezar Augusto and the Extension.js authors.
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(), DEFAULT_TIMEOUT_MS);
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 commandContext(command) {
6612
+ function telemetryCommandContext(command, argv = process.argv) {
6611
6613
  if ('create' !== command) return {};
6612
6614
  return {
6613
- template: readArgValue(process.argv, [
6615
+ template: readArgValue(argv, [
6614
6616
  '--template',
6615
6617
  '-t'
6616
6618
  ]),
6617
- source: readArgValue(process.argv, [
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
- ...commandContext(command)
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
- ...commandContext(command)
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.33",
41
+ "version": "4.0.35",
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.33",
110
- "extension-develop": "4.0.33",
111
- "extension-install": "4.0.33",
109
+ "extension-create": "4.0.35",
110
+ "extension-develop": "4.0.35",
111
+ "extension-install": "4.0.35",
112
112
  "commander": "^15.0.0",
113
113
  "pintor": "0.3.0",
114
114
  "semver": "^7.7.3",