@shell-shock/preset-script 0.6.7 → 0.6.8

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.
@@ -2912,14 +2912,19 @@ function ConsoleBuiltin(props) {
2912
2912
  (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
2913
2913
  (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
2914
2914
  condition: __alloy_js_core.code`(err as Error)?.message`,
2915
+ children: __alloy_js_core.code`message = (err as Error).message;`
2916
+ }),
2917
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseClause, { children: __alloy_js_core.code`message = String(err);` }),
2918
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__powerlines_plugin_alloy_core_components_spacing.Spacing, {}),
2919
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
2920
+ condition: __alloy_js_core.code`env.STACKTRACE`,
2915
2921
  get children() {
2916
- return [__alloy_js_core.code`message = (err as Error).message;`, (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
2917
- condition: __alloy_js_core.code`env.STACKTRACE && (err as Error)?.stack`,
2922
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.IfStatement, {
2923
+ condition: __alloy_js_core.code`(err as Error)?.stack`,
2918
2924
  children: __alloy_js_core.code`message += " \\n\\n" + (err as Error).stack;`
2919
- })];
2925
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseClause, { children: __alloy_js_core.code`message += " \\n\\n" + (new Error(" ")).stack.split("\\n").slice(2).map(line => line.trim()).join("\\n");` })];
2920
2926
  }
2921
- }),
2922
- (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.ElseClause, { children: __alloy_js_core.code`message = String(err);` })
2927
+ })
2923
2928
  ];
2924
2929
  }
2925
2930
  }),