@serwist/core 8.2.0 → 8.4.0

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.
@@ -1,2 +0,0 @@
1
- declare const getFriendlyURL: (url: URL | string) => string;
2
- export { getFriendlyURL };
@@ -1,11 +0,0 @@
1
- /**
2
- * Returns a promise that resolves to a window client matching the passed
3
- * `resultingClientId`. For browsers that don't support `resultingClientId`
4
- * or if waiting for the resulting client to apper takes too long, resolve to
5
- * `undefined`.
6
- *
7
- * @param resultingClientId
8
- * @returns
9
- * @private
10
- */
11
- export declare function resultingClientExists(resultingClientId?: string): Promise<Client | undefined>;
@@ -1,9 +0,0 @@
1
- /**
2
- * Returns a promise that resolves and the passed number of milliseconds.
3
- * This utility is an async/await-friendly version of `setTimeout`.
4
- *
5
- * @param ms
6
- * @returns
7
- * @private
8
- */
9
- export declare function timeout(ms: number): Promise<unknown>;
@@ -1,11 +0,0 @@
1
- /**
2
- * A utility method that makes it easier to use `event.waitUntil` with
3
- * async functions and return the result.
4
- *
5
- * @param event
6
- * @param asyncFn
7
- * @returns
8
- * @private
9
- */
10
- declare function waitUntil(event: ExtendableEvent, asyncFn: () => Promise<any>): Promise<any>;
11
- export { waitUntil };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var quotaErrorCallbacks = require('./quotaErrorCallbacks-t3P-jWKl.js');
3
+ var quotaErrorCallbacks = require('./quotaErrorCallbacks.cjs');
4
4
 
5
5
  /**
6
6
  * Get the current cache names and prefix/suffix used by Workbox.
package/dist/index.d.cts CHANGED
@@ -0,0 +1,11 @@
1
+ import { cacheNames } from "./cacheNames.js";
2
+ import { clientsClaim } from "./clientsClaim.js";
3
+ import { copyResponse } from "./copyResponse.js";
4
+ import { registerQuotaErrorCallback } from "./registerQuotaErrorCallback.js";
5
+ import { setCacheNameDetails } from "./setCacheNameDetails.js";
6
+ /**
7
+ * All Serwist libraries use `@serwist/core` for shared code as well as
8
+ * setting default values that need to be shared (like cache names).
9
+ */
10
+ export { cacheNames, clientsClaim, copyResponse, registerQuotaErrorCallback, setCacheNameDetails };
11
+ export * from "./types.js";
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var quotaErrorCallbacks = require('./quotaErrorCallbacks-t3P-jWKl.js');
3
+ var quotaErrorCallbacks = require('./quotaErrorCallbacks.cjs');
4
4
 
5
5
  /*
6
6
  Copyright 2020 Google LLC
@@ -1,15 +0,0 @@
1
- import { assert } from "./_private/assert.js";
2
- import { cacheMatchIgnoreParams } from "./_private/cacheMatchIgnoreParams.js";
3
- import { cacheNames as privateCacheNames } from "./_private/cacheNames.js";
4
- import { canConstructReadableStream } from "./_private/canConstructReadableStream.js";
5
- import { canConstructResponseFromBodyStream } from "./_private/canConstructResponseFromBodyStream.js";
6
- import { Deferred } from "./_private/Deferred.js";
7
- import { dontWaitFor } from "./_private/dontWaitFor.js";
8
- import { executeQuotaErrorCallbacks } from "./_private/executeQuotaErrorCallbacks.js";
9
- import { getFriendlyURL } from "./_private/getFriendlyURL.js";
10
- import { logger } from "./_private/logger.js";
11
- import { resultingClientExists } from "./_private/resultingClientExists.js";
12
- import { SerwistError } from "./_private/SerwistError.js";
13
- import { timeout } from "./_private/timeout.js";
14
- import { waitUntil } from "./_private/waitUntil.js";
15
- export { assert, cacheMatchIgnoreParams, canConstructReadableStream, canConstructResponseFromBodyStream, Deferred, dontWaitFor, executeQuotaErrorCallbacks, getFriendlyURL, logger, privateCacheNames, resultingClientExists, SerwistError, timeout, waitUntil, };
@@ -1,5 +1,5 @@
1
- import { l as logger, q as quotaErrorCallbacks } from './quotaErrorCallbacks-efexit-Y.js';
2
- export { S as SerwistError, f as assert, a as canConstructResponseFromBodyStream, c as privateCacheNames } from './quotaErrorCallbacks-efexit-Y.js';
1
+ import { l as logger, q as quotaErrorCallbacks } from './quotaErrorCallbacks.js';
2
+ export { S as SerwistError, f as assert, a as canConstructResponseFromBodyStream, c as privateCacheNames } from './quotaErrorCallbacks.js';
3
3
 
4
4
  /*
5
5
  Copyright 2020 Google LLC
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as cacheNames$1, S as SerwistError, a as canConstructResponseFromBodyStream, f as finalAssertExports, q as quotaErrorCallbacks, l as logger } from './quotaErrorCallbacks-efexit-Y.js';
1
+ import { c as cacheNames$1, S as SerwistError, a as canConstructResponseFromBodyStream, f as finalAssertExports, q as quotaErrorCallbacks, l as logger } from './quotaErrorCallbacks.js';
2
2
 
3
3
  /**
4
4
  * Get the current cache names and prefix/suffix used by Workbox.
@@ -1,8 +0,0 @@
1
- /**
2
- * Adds a function to the set of quotaErrorCallbacks that will be executed if
3
- * there's a quota error.
4
- *
5
- * @param callback
6
- */
7
- declare function registerQuotaErrorCallback(callback: Function): void;
8
- export { registerQuotaErrorCallback };
@@ -1,9 +0,0 @@
1
- import type { PartialCacheNameDetails } from "./_private/cacheNames.js";
2
- /**
3
- * Modifies the default cache names used by the Serwist packages.
4
- * Cache names are generated as `<prefix>-<Cache Name>-<suffix>`.
5
- *
6
- * @param details
7
- */
8
- declare function setCacheNameDetails(details: PartialCacheNameDetails): void;
9
- export { setCacheNameDetails };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/core",
3
- "version": "8.2.0",
3
+ "version": "8.4.0",
4
4
  "type": "module",
5
5
  "description": "This module is used by a number of the other Serwist modules to share common code.",
6
6
  "files": [
@@ -17,7 +17,7 @@
17
17
  "license": "MIT",
18
18
  "repository": "serwist/serwist",
19
19
  "bugs": "https://github.com/serwist/serwist/issues",
20
- "homepage": "https://serwist.vercel.app",
20
+ "homepage": "https://serwist.pages.dev",
21
21
  "main": "./dist/index.js",
22
22
  "module": "./dist/index.js",
23
23
  "types": "./dist/index.d.ts",
@@ -52,10 +52,11 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "rollup": "4.9.1",
55
- "@serwist/constants": "8.2.0"
55
+ "@serwist/constants": "8.4.0"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "rimraf dist && cross-env NODE_ENV=production rollup --config rollup.config.js",
59
+ "dev": "rollup --config rollup.config.js --watch",
59
60
  "lint": "eslint src --ext ts,tsx,js,jsx,cjs,mjs",
60
61
  "typecheck": "tsc"
61
62
  }