@defer.run/client
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -18,3 +18,3 @@ "use strict"; | ||
if (debug) { | ||
console.log(`[defer.run][${fn}] invoked.`); | ||
console.log(`[defer.run][${fn.name}] invoked.`); | ||
} | ||
@@ -31,3 +31,3 @@ if (token) { | ||
catch (error) { | ||
console.log(`[defer.run][${fn}] Failed to serialize arguments: ${error}`); | ||
console.log(`[defer.run][${fn.name}] Failed to serialize arguments: ${error}`); | ||
reject(); | ||
@@ -44,7 +44,7 @@ } | ||
if (debug) { | ||
console.log(`[defer.run][${fn}] response[${resp.statusText}]: ${await resp.text()}`); | ||
console.log(`[defer.run][${fn.name}] response[${resp.statusText}]: ${await resp.text()}`); | ||
} | ||
resolve(resp); | ||
}, (error) => { | ||
console.log(`[defer.run][${fn}] Failed to execute: ${error}`); | ||
console.log(`[defer.run][${fn.name}] Failed to execute: ${error}`); | ||
reject(); | ||
@@ -56,3 +56,3 @@ }); | ||
if (debug) { | ||
console.log(`[defer.run][${fn}] defer ignore, no token found.`); | ||
console.log(`[defer.run][${fn.name}] defer ignore, no token found.`); | ||
} | ||
@@ -59,0 +59,0 @@ return fn(...args); |
@@ -14,3 +14,3 @@ import { fetch } from "@whatwg-node/fetch"; | ||
if (debug) { | ||
console.log(`[defer.run][${fn}] invoked.`); | ||
console.log(`[defer.run][${fn.name}] invoked.`); | ||
} | ||
@@ -27,3 +27,3 @@ if (token) { | ||
catch (error) { | ||
console.log(`[defer.run][${fn}] Failed to serialize arguments: ${error}`); | ||
console.log(`[defer.run][${fn.name}] Failed to serialize arguments: ${error}`); | ||
reject(); | ||
@@ -40,7 +40,7 @@ } | ||
if (debug) { | ||
console.log(`[defer.run][${fn}] response[${resp.statusText}]: ${await resp.text()}`); | ||
console.log(`[defer.run][${fn.name}] response[${resp.statusText}]: ${await resp.text()}`); | ||
} | ||
resolve(resp); | ||
}, (error) => { | ||
console.log(`[defer.run][${fn}] Failed to execute: ${error}`); | ||
console.log(`[defer.run][${fn.name}] Failed to execute: ${error}`); | ||
reject(); | ||
@@ -52,3 +52,3 @@ }); | ||
if (debug) { | ||
console.log(`[defer.run][${fn}] defer ignore, no token found.`); | ||
console.log(`[defer.run][${fn.name}] defer ignore, no token found.`); | ||
} | ||
@@ -55,0 +55,0 @@ return fn(...args); |
{ | ||
"name": "@defer.run/client", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "cua JavaScript client", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
{ | ||
"name": "@defer.run/client", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "cua JavaScript client", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -27,3 +27,3 @@ import { fetch } from "@whatwg-node/fetch"; | ||
if (debug) { | ||
console.log(`[defer.run][${fn}] invoked.`); | ||
console.log(`[defer.run][${fn.name}] invoked.`); | ||
} | ||
@@ -40,3 +40,3 @@ if (token) { | ||
console.log( | ||
`[defer.run][${fn}] Failed to serialize arguments: ${error}` | ||
`[defer.run][${fn.name}] Failed to serialize arguments: ${error}` | ||
); | ||
@@ -58,3 +58,3 @@ reject(); | ||
console.log( | ||
`[defer.run][${fn}] response[${ | ||
`[defer.run][${fn.name}] response[${ | ||
resp.statusText | ||
@@ -67,3 +67,3 @@ }]: ${await resp.text()}` | ||
(error) => { | ||
console.log(`[defer.run][${fn}] Failed to execute: ${error}`); | ||
console.log(`[defer.run][${fn.name}] Failed to execute: ${error}`); | ||
reject(); | ||
@@ -75,3 +75,3 @@ } | ||
if (debug) { | ||
console.log(`[defer.run][${fn}] defer ignore, no token found.`); | ||
console.log(`[defer.run][${fn.name}] defer ignore, no token found.`); | ||
} | ||
@@ -78,0 +78,0 @@ return fn(...args); |
16312