File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 */
88
99import * as colors from "colors" ;
10- import { warn } from "log/mod.ts" ;
1110
1211type StackEntry = {
1312 pos : string ;
@@ -48,7 +47,7 @@ export const getStackAsArray = (
4847 / ^ .* a t a s y n c ( .* ) s r c \/ q u a r t o .t s : \d + : \d + $ / ,
4948 ) ;
5049 if ( ! m ) {
51- warn (
50+ console . log (
5251 "Could not find quarto.ts in stack trace, is QUARTO_DENO_V8_OPTIONS set with a sufficiently-large stack size?" ,
5352 ) ;
5453 }
@@ -109,6 +108,20 @@ export const getStackAsArray = (
109108 col : m3 [ 5 ] + ( m3 [ 1 ] ? 6 : 0 ) ,
110109 } ;
111110 }
111+
112+ // at async Command.execute (https://deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7)
113+ const m4 = s . match (
114+ / ^ .* a t ( a s y n c ) ? ( .* ) \( ( h t t p .+ ) : ( \d + ) : ( \d + ) * \) $ / ,
115+ ) ;
116+ if ( m4 ) {
117+ return {
118+ pos : m4 [ 3 ] ,
119+ name : `${ m4 [ 2 ] } ` ,
120+ line : m4 [ 4 ] ,
121+ // if async, move the column to the start of the actual function name
122+ col : m4 [ 5 ] + ( m4 [ 1 ] ? 6 : 0 ) ,
123+ } ;
124+ }
112125 throw new Error ( `Unexpected stack entry: ${ s } ` ) ;
113126 } ) ;
114127
You can’t perform that action at this time.
0 commit comments