@angular/service-worker 20.0.5 → 20.0.7

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/config/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.5
2
+ * @license Angular v20.0.7
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.5
2
+ * @license Angular v20.0.7
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.5
2
+ * @license Angular v20.0.7
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -309,10 +309,10 @@ class SwPush {
309
309
  decodeBase64(input) {
310
310
  return atob(input);
311
311
  }
312
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: SwPush, deps: [{ token: NgswCommChannel }], target: i0.ɵɵFactoryTarget.Injectable });
313
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: SwPush });
312
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SwPush, deps: [{ token: NgswCommChannel }], target: i0.ɵɵFactoryTarget.Injectable });
313
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SwPush });
314
314
  }
315
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: SwPush, decorators: [{
315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SwPush, decorators: [{
316
316
  type: Injectable
317
317
  }], ctorParameters: () => [{ type: NgswCommChannel }] });
318
318
 
@@ -420,10 +420,10 @@ class SwUpdate {
420
420
  const nonce = this.sw.generateNonce();
421
421
  return this.sw.postMessageWithOperation('ACTIVATE_UPDATE', { nonce }, nonce);
422
422
  }
423
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: SwUpdate, deps: [{ token: NgswCommChannel }], target: i0.ɵɵFactoryTarget.Injectable });
424
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: SwUpdate });
423
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SwUpdate, deps: [{ token: NgswCommChannel }], target: i0.ɵɵFactoryTarget.Injectable });
424
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SwUpdate });
425
425
  }
426
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: SwUpdate, decorators: [{
426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: SwUpdate, decorators: [{
427
427
  type: Injectable
428
428
  }], ctorParameters: () => [{ type: NgswCommChannel }] });
429
429
 
@@ -614,11 +614,11 @@ class ServiceWorkerModule {
614
614
  providers: [provideServiceWorker(script, options)],
615
615
  };
616
616
  }
617
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ServiceWorkerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
618
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.5", ngImport: i0, type: ServiceWorkerModule });
619
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ServiceWorkerModule, providers: [SwPush, SwUpdate] });
617
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ServiceWorkerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
618
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.7", ngImport: i0, type: ServiceWorkerModule });
619
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ServiceWorkerModule, providers: [SwPush, SwUpdate] });
620
620
  }
621
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: ServiceWorkerModule, decorators: [{
621
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ServiceWorkerModule, decorators: [{
622
622
  type: NgModule,
623
623
  args: [{ providers: [SwPush, SwUpdate] }]
624
624
  }] });
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v20.0.5
2
+ * @license Angular v20.0.7
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
package/ngsw-worker.js CHANGED
@@ -1069,7 +1069,7 @@ ${error.stack}`;
1069
1069
  };
1070
1070
 
1071
1071
  // bazel-out/k8-fastbuild/bin/packages/service-worker/worker/src/debug.js
1072
- var SW_VERSION = "20.0.5";
1072
+ var SW_VERSION = "20.0.7";
1073
1073
  var DEBUG_LOG_BUFFER_SIZE = 100;
1074
1074
  var DebugHandler = class {
1075
1075
  constructor(driver, adapter2) {
@@ -1314,10 +1314,6 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
1314
1314
  if (req.headers.has("ngsw-bypass") || /[?&]ngsw-bypass(?:[=&]|$)/i.test(requestUrlObj.search)) {
1315
1315
  return;
1316
1316
  }
1317
- if (req.headers.has("range")) {
1318
- event.respondWith(this.handleRangeRequest(req));
1319
- return;
1320
- }
1321
1317
  if (requestUrlObj.path === this.ngswStatePath) {
1322
1318
  event.respondWith(this.debugger.handleFetch(req));
1323
1319
  return;
@@ -1339,49 +1335,6 @@ ${msgIdle}`, { headers: this.adapter.newHeaders({ "Content-Type": "text/plain" }
1339
1335
  }
1340
1336
  event.respondWith(this.handleFetch(event));
1341
1337
  }
1342
- async handleRangeRequest(req) {
1343
- try {
1344
- const response = await fetch(req);
1345
- const contentType = response.headers.get("Content-Type");
1346
- if (!contentType || !contentType.startsWith("video/")) {
1347
- return response;
1348
- }
1349
- const rangeHeader = req.headers.get("range");
1350
- if (!rangeHeader) {
1351
- return new Response(null, {
1352
- status: 416,
1353
- statusText: "Range Not Satisfiable"
1354
- });
1355
- }
1356
- const rangeMatch = /bytes=(\d+)-(\d+)?/.exec(rangeHeader);
1357
- if (!rangeMatch) {
1358
- return new Response(null, {
1359
- status: 416,
1360
- statusText: "Range Not Satisfiable"
1361
- });
1362
- }
1363
- const start = Number(rangeMatch[1]);
1364
- const end = rangeMatch[2] ? Number(rangeMatch[2]) : void 0;
1365
- const buffer = await response.arrayBuffer();
1366
- const contentLength = buffer.byteLength;
1367
- const chunk = buffer.slice(start, end ? end + 1 : contentLength);
1368
- const chunkLength = chunk.byteLength;
1369
- const headers = new Headers(response.headers);
1370
- headers.set("Content-Range", `bytes ${start}-${end ? end : contentLength - 1}/${contentLength}`);
1371
- headers.set("Content-Length", chunkLength.toString());
1372
- headers.set("Accept-Ranges", "bytes");
1373
- return new Response(chunk, {
1374
- status: 206,
1375
- statusText: "Partial Content",
1376
- headers
1377
- });
1378
- } catch (error) {
1379
- return new Response(null, {
1380
- status: 500,
1381
- statusText: "Internal Server Error"
1382
- });
1383
- }
1384
- }
1385
1338
  onMessage(event) {
1386
1339
  if (this.state === DriverReadyState.SAFE_MODE) {
1387
1340
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/service-worker",
3
- "version": "20.0.5",
3
+ "version": "20.0.7",
4
4
  "description": "Angular - service worker tooling!",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "tslib": "^2.3.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@angular/core": "20.0.5",
36
+ "@angular/core": "20.0.7",
37
37
  "rxjs": "^6.5.3 || ^7.4.0"
38
38
  },
39
39
  "repository": {