@stacksjs/error-handling 0.58.72 → 0.59.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/README.md CHANGED
@@ -55,7 +55,7 @@ result.isErr() // false
55
55
  ### Example #2
56
56
 
57
57
  ```js
58
- const command = 'rimraf ./bun.lockb ./node_modules ./core/**/dist'
58
+ const command = 'bunx rimraf ./bun.lockb ./node_modules ./core/**/dist'
59
59
  const result = await runCommand(command, options)
60
60
 
61
61
  if (result.isOk()) {
@@ -0,0 +1,14 @@
1
+ interface ErrorOptions {
2
+ silent?: boolean;
3
+ }
4
+ export declare const StacksError: ErrorConstructor;
5
+ export declare class ErrorHandler {
6
+ static logFile: string;
7
+ static handle(err: ErrorDescription | Error, options?: ErrorOptions | Error): Error;
8
+ static handleError(err: Error, options?: ErrorOptions): Error;
9
+ static writeErrorToFile(err: Error): Promise<void>;
10
+ static writeErrorToConsole(err: string | Error, options?: ErrorOptions): void;
11
+ }
12
+ type ErrorDescription = string;
13
+ export declare function handleError(err: ErrorDescription | Error, options?: ErrorOptions | Error): Error;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './handler';
2
+ export { err, errAsync, fromPromise, fromSafePromise, fromThrowable, ok, okAsync, Err, Ok, Result, ResultAsync } from 'neverthrow';
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ var __toESM = (mod, isNodeMode, target) => {
16
16
  };
17
17
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
18
18
 
19
- // /home/runner/work/stacks/stacks/node_modules/neverthrow/dist/index.cjs.js
19
+ // ../../../../node_modules/neverthrow/dist/index.cjs.js
20
20
  var require_index_cjs = __commonJS((exports) => {
21
21
  var __awaiter = function(thisArg, _arguments, P, generator) {
22
22
  function adopt(value) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/error-handling",
3
3
  "type": "module",
4
- "version": "0.58.72",
4
+ "version": "0.59.1",
5
5
  "description": "Type safe error handling.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",