silgi 0.38.11 → 0.38.13

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.38.11";
4
+ const version = "0.38.13";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -7,6 +7,7 @@ import { getContext, createContext } from 'unctx';
7
7
  import { Buffer } from 'node:buffer';
8
8
  import { klona } from 'klona';
9
9
  import { createStorage as createStorage$1, builtinDrivers, prefixStorage } from 'unstorage';
10
+ import { isDevelopment } from 'std-env';
10
11
  import { FastURL, FastResponse } from 'srvx';
11
12
  export { s as silgiCLICtx, t as tryUseSilgiCLI, u as useSilgiCLI } from '../_chunks/silgiApp.mjs';
12
13
  import { AsyncLocalStorage } from 'node:async_hooks';
@@ -102,6 +103,10 @@ class SilgiError extends Error {
102
103
  if (opts.cause && !this.cause) {
103
104
  this.cause = opts.cause;
104
105
  }
106
+ if (isDevelopment && opts.cause && opts.cause instanceof Error && opts.cause.stack && this.stack) {
107
+ this.stack += `
108
+ Caused by: ${opts.cause.stack}`;
109
+ }
105
110
  }
106
111
  toJSON() {
107
112
  const obj = {
package/dist/index.mjs CHANGED
@@ -9,5 +9,6 @@ import 'unctx';
9
9
  import 'node:buffer';
10
10
  import 'klona';
11
11
  import 'unstorage';
12
+ import 'std-env';
12
13
  import 'srvx';
13
14
  import 'node:async_hooks';
@@ -1,2 +1,3 @@
1
1
  import type { SilgiAppPlugin } from 'silgi/types';
2
2
  export declare const debugPlugin: SilgiAppPlugin;
3
+ export default debugPlugin;
@@ -3,3 +3,4 @@ import { defineSilgiPlugin } from "./plugin.mjs";
3
3
  export const debugPlugin = defineSilgiPlugin((silgi) => {
4
4
  createDebugger(silgi.hooks, { tag: "silgi-runtime" });
5
5
  });
6
+ export default debugPlugin;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.38.11",
4
+ "version": "0.38.13",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {
@@ -31,6 +31,10 @@
31
31
  "import": "./dist/runtime/internal/next.mjs",
32
32
  "silgiDev": "./dist/runtime/internal/next.ts"
33
33
  },
34
+ "./runtime/internal/debug": {
35
+ "import": "./dist/runtime/internal/debug.mjs",
36
+ "silgiDev": "./dist/runtime/internal/debug.ts"
37
+ },
34
38
  "./runtime/internal": {
35
39
  "import": "./dist/runtime/internal/index.mjs",
36
40
  "silgiDev": "./dist/runtime/internal/index.ts"