@markwharton/pwa-core 3.5.0 → 4.0.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/client.d.ts +47 -89
- package/dist/client.js +102 -252
- package/dist/server.d.ts +71 -62
- package/dist/server.js +100 -69
- package/dist/shared.d.ts +4 -4
- package/dist/shared.js +4 -4
- package/package.json +1 -1
package/dist/shared.js
CHANGED
|
@@ -35,15 +35,15 @@ function okVoid() {
|
|
|
35
35
|
/**
|
|
36
36
|
* Creates a failure result with an error message.
|
|
37
37
|
* @param error - The error message
|
|
38
|
-
* @param
|
|
38
|
+
* @param status - Optional HTTP status code for API/push operations
|
|
39
39
|
* @returns A Result with ok=false and the error details
|
|
40
40
|
* @example
|
|
41
41
|
* return err('Token expired');
|
|
42
42
|
* return err('Subscription gone', 410);
|
|
43
43
|
*/
|
|
44
|
-
function err(error,
|
|
45
|
-
return
|
|
46
|
-
? { ok: false, error,
|
|
44
|
+
function err(error, status) {
|
|
45
|
+
return status !== undefined
|
|
46
|
+
? { ok: false, error, status }
|
|
47
47
|
: { ok: false, error };
|
|
48
48
|
}
|
|
49
49
|
// =============================================================================
|