@stacksjs/error-handling 0.70.35 → 0.70.37

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -158,7 +158,7 @@ Context: ${JSON.stringify(i,null,2)}`;H(u).catch((d)=>{console.error("Failed to
158
158
  <a href="/" class="production-link">← Back to Home</a>
159
159
  </div>
160
160
  </body>
161
- </html>`}function o(f){let n=G[f];if(!n)return"";let l=Array.isArray(n.commonCauses)&&n.commonCauses.length>0,i=typeof n.suggestion==="string"&&n.suggestion.length>0,v=typeof n.docLink==="string"&&n.docLink.length>0;if(!l&&!i&&!v)return"";let u=l?`<ul class="error-hint-causes">${n.commonCauses.map((C)=>`<li>${c(C)}</li>`).join("")}</ul>`:"",A=i?`<p class="error-hint-suggestion">${c(n.suggestion)}</p>`:"",d=v?`<a class="error-hint-doc" href="${c(n.docLink)}" target="_blank" rel="noreferrer noopener">Read the docs →</a>`:"";return`<section class="error-hint card">
161
+ </html>`}function o(f){let n=G[f];if(!n)return"";let l=Array.isArray(n.commonCauses)&&n.commonCauses.length>0,i=typeof n.suggestion==="string"&&n.suggestion.length>0,v=typeof n.docLink==="string"&&n.docLink.length>0;if(!l&&!i&&!v)return"";let u=l?`<ul class="error-hint-causes">${n.commonCauses.map((C)=>`<li>${c(C)}</li>`).join("")}</ul>`:"",A=i?`<p class="error-hint-suggestion">${c(n.suggestion)}</p>`:"",d=v?`<a class="error-hint-doc" href="${c(n.docLink)}" target="_blank" rel="noreferrer noopener">Read the docs →</a>`:"";return`<section class="card error-hint">
162
162
  <div class="card-header">Likely causes &amp; next steps</div>
163
163
  <div class="card-body">${u}${A}${d}</div>
164
164
  </section>`}class W{config;framework;request;routing;user;queries=[];constructor(f){this.config={appName:"App",theme:"auto",showEnvironment:!0,showQueries:!0,showRequest:!0,enableCopyMarkdown:!0,snippetLines:8,...f}}setFramework(f,n){return this.framework={name:f,version:n},this}setRequest(f){if(f instanceof Request){let n=new URL(f.url);this.request={method:f.method,url:f.url,headers:Object.fromEntries(f.headers.entries()),queryParams:Object.fromEntries(n.searchParams.entries())}}else this.request=f;return this}setRouting(f){return this.routing=f,this}setUser(f){return this.user=f,this}addQuery(f,n,l){return this.queries.push({query:f,time:n,connection:l}),this}render(f,n=500){let l=K(f.stack,this.config.basePaths,{includeFrameworkFrames:this.config.showFrameworkFrames===!0});return`<!DOCTYPE html>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/error-handling",
3
3
  "type": "module",
4
- "version": "0.70.35",
4
+ "version": "0.70.37",
5
5
  "description": "Type safe error handling.",
6
6
  "author": "Chris Breuer",
7
7
  "contributors": [