@effect/io
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -35,5 +35,5 @@ /** | ||
/** | ||
* Listens to execution traces. | ||
* Enable debugger on execution | ||
*/ | ||
traceExecutionHook: Array<(trace: string) => void>; | ||
debuggerEnabled: boolean; | ||
} | ||
@@ -49,3 +49,3 @@ /** | ||
*/ | ||
export declare const nodeSourceMapExtractor: (at: number) => string | undefined; | ||
export declare const getCallTraceFromNewError: (at: number) => string | undefined; | ||
/** | ||
@@ -63,2 +63,6 @@ * @since 1.0.0 | ||
export declare const getCallTrace: () => string | undefined; | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
export declare const debugAs: <F extends Function, G extends Function>(f: F, g: G) => G; | ||
//# sourceMappingURL=Debug.d.ts.map |
17
Debug.js
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.withCallTrace = exports.runtimeDebug = exports.nodeSourceMapExtractor = exports.isTraceEnabled = exports.getCallTrace = void 0; | ||
exports.withCallTrace = exports.runtimeDebug = exports.isTraceEnabled = exports.getCallTraceFromNewError = exports.getCallTrace = exports.debugAs = void 0; | ||
var _Function = /*#__PURE__*/require("@fp-ts/data/Function"); | ||
@@ -23,4 +23,4 @@ /** | ||
traceFilter: () => true, | ||
traceExecutionHook: [], | ||
traceExecutionLogEnabled: false | ||
traceExecutionLogEnabled: false, | ||
debuggerEnabled: false | ||
}; | ||
@@ -32,3 +32,3 @@ /** | ||
exports.runtimeDebug = runtimeDebug; | ||
const nodeSourceMapExtractor = at => { | ||
const getCallTraceFromNewError = at => { | ||
const limit = Error.stackTraceLimit; | ||
@@ -51,3 +51,3 @@ Error.stackTraceLimit = at; | ||
/** @internal */ | ||
exports.nodeSourceMapExtractor = nodeSourceMapExtractor; | ||
exports.getCallTraceFromNewError = getCallTraceFromNewError; | ||
const stack = []; | ||
@@ -91,3 +91,10 @@ /** @internal */ | ||
}; | ||
/** | ||
* @since 1.0.0 | ||
*/ | ||
exports.getCallTrace = getCallTrace; | ||
const debugAs = (f, g) => Object.assign(g, { | ||
debugAs: "debugAs" in f ? f["debugAs"] : f | ||
}); | ||
exports.debugAs = debugAs; | ||
//# sourceMappingURL=Debug.js.map |
@@ -298,3 +298,3 @@ "use strict"; | ||
return self => { | ||
return foldCauseEffect(cause => { | ||
return foldCauseEffect((0, _Debug.debugAs)(onFailure, cause => { | ||
const either = Cause.failureOrCause(cause); | ||
@@ -311,3 +311,3 @@ switch (either._tag) { | ||
} | ||
}, onSuccess)(self).traced(trace); | ||
}), onSuccess)(self).traced(trace); | ||
}; | ||
@@ -314,0 +314,0 @@ }; |
{ | ||
"name": "@effect/io", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3987965
66347