@@ -158,20 +158,6 @@ var require_src = __commonJS({
158158 }
159159} ) ;
160160
161- // ../../node_modules/is-unicode-supported/index.js
162- var require_is_unicode_supported = __commonJS ( {
163- "../../node_modules/is-unicode-supported/index.js" ( exports2 , module2 ) {
164- "use strict" ;
165- module2 . exports = ( ) => {
166- if ( process . platform !== "win32" ) {
167- return true ;
168- }
169- return Boolean ( process . env . CI ) || Boolean ( process . env . WT_SESSION ) || // Windows Terminal
170- process . env . TERM_PROGRAM === "vscode" || process . env . TERM === "xterm-256color" || process . env . TERM === "alacritty" ;
171- } ;
172- }
173- } ) ;
174-
175161// ../../node_modules/zod/dist/esm/v3/external.js
176162var external_exports = { } ;
177163__export ( external_exports , {
@@ -4208,45 +4194,56 @@ var coerce = {
42084194} ;
42094195var NEVER = INVALID ;
42104196
4211- // ../plugins/dist/utils.js
4212- var isHookTree = ( value ) => {
4213- if ( value == null || typeof value !== "object" || Array . isArray ( value ) ) {
4214- return false ;
4215- }
4216- for ( const child of Object . values ( value ) ) {
4217- if ( child === void 0 ) {
4218- continue ;
4219- }
4220- if ( typeof child === "function" ) {
4221- continue ;
4222- }
4223- if ( child == null || typeof child !== "object" || Array . isArray ( child ) || ! isHookTree ( child ) ) {
4224- return false ;
4225- }
4226- }
4227- return true ;
4197+ // ../tools/dist/logger.js
4198+ var import_node_util = __toESM ( require ( "util" ) , 1 ) ;
4199+ var verbose = ! ! process . env . HARNESS_DEBUG ;
4200+ var BASE_TAG = "[harness]" ;
4201+ var getTimestamp = ( ) => ( /* @__PURE__ */ new Date ( ) ) . toISOString ( ) ;
4202+ var normalizeScope = ( scope ) => scope . trim ( ) . replace ( / ^ \[ + | \] + $ / g, "" ) . replace ( / \] \[ / g, "][" ) ;
4203+ var formatPrefix = ( scopes ) => {
4204+ const suffix = scopes . map ( ( scope ) => `[${ normalizeScope ( scope ) } ]` ) . join ( "" ) ;
4205+ return `${ BASE_TAG } ${ suffix } ` ;
42284206} ;
4229-
4230- // ../plugins/dist/plugin.js
4231- var isHarnessPlugin = ( value ) => {
4232- if ( value == null || typeof value !== "object" || Array . isArray ( value ) ) {
4233- return false ;
4234- }
4235- const candidate = value ;
4236- if ( typeof candidate . name !== "string" || candidate . name . length === 0 ) {
4237- return false ;
4238- }
4239- if ( candidate . createState != null && typeof candidate . createState !== "function" ) {
4240- return false ;
4241- }
4242- if ( candidate . hooks != null && ! isHookTree ( candidate . hooks ) ) {
4243- return false ;
4244- }
4245- return true ;
4207+ var mapLines = ( text , prefix ) => text . split ( "\n" ) . map ( ( line ) => `${ prefix } ${ line } ` ) . join ( "\n" ) ;
4208+ var writeLog = ( level , scopes , messages ) => {
4209+ const method = level === "warn" ? console . warn : level === "error" ? console . error : level === "debug" ? console . debug : console . info ;
4210+ const output = import_node_util . default . format ( ...messages ) ;
4211+ const prefix = `${ getTimestamp ( ) } ${ formatPrefix ( scopes ) } ` ;
4212+ method ( mapLines ( output , prefix ) ) ;
42464213} ;
4247-
4248- // ../tools/dist/logger.js
4249- var import_node_util2 = __toESM ( require ( "util" ) , 1 ) ;
4214+ var setVerbose = ( level ) => {
4215+ verbose = level ;
4216+ } ;
4217+ var isVerbose = ( ) => {
4218+ return verbose ;
4219+ } ;
4220+ var createScopedLogger = ( scopes = [ ] ) => ( {
4221+ debug : ( ...messages ) => {
4222+ if ( ! verbose ) {
4223+ return ;
4224+ }
4225+ writeLog ( "debug" , scopes , messages ) ;
4226+ } ,
4227+ info : ( ...messages ) => {
4228+ writeLog ( "info" , scopes , messages ) ;
4229+ } ,
4230+ warn : ( ...messages ) => {
4231+ writeLog ( "warn" , scopes , messages ) ;
4232+ } ,
4233+ error : ( ...messages ) => {
4234+ writeLog ( "error" , scopes , messages ) ;
4235+ } ,
4236+ log : ( ...messages ) => {
4237+ writeLog ( "log" , scopes , messages ) ;
4238+ } ,
4239+ success : ( ...messages ) => {
4240+ writeLog ( "success" , scopes , messages ) ;
4241+ } ,
4242+ child : ( scope ) => createScopedLogger ( [ ...scopes , scope ] ) ,
4243+ setVerbose,
4244+ isVerbose
4245+ } ) ;
4246+ var logger = createScopedLogger ( ) ;
42504247
42514248// ../../node_modules/@clack /core/dist/index.mjs
42524249var import_node_process = require ( "process" ) ;
@@ -4271,7 +4268,7 @@ var import_node_process2 = __toESM(require("process"), 1);
42714268var import_node_fs = require ( "fs" ) ;
42724269var import_node_path = require ( "path" ) ;
42734270var import_sisteransi2 = __toESM ( require_src ( ) , 1 ) ;
4274- var import_node_util = require ( "util" ) ;
4271+ var import_node_util2 = require ( "util" ) ;
42754272function ht ( ) {
42764273 return import_node_process2 . default . platform !== "win32" ? import_node_process2 . default . env . TERM !== "linux" : ! ! import_node_process2 . default . env . CI || ! ! import_node_process2 . default . env . WT_SESSION || ! ! import_node_process2 . default . env . TERMINUS_SUBLIME || import_node_process2 . default . env . ConEmuTask === "{cmd::Cmder}" || import_node_process2 . default . env . TERM_PROGRAM === "Terminus-Sublime" || import_node_process2 . default . env . TERM_PROGRAM === "vscode" || import_node_process2 . default . env . TERM === "xterm-256color" || import_node_process2 . default . env . TERM === "alacritty" || import_node_process2 . default . env . TERMINAL_EMULATOR === "JetBrains-JediTerm" ;
42774274}
@@ -4313,12 +4310,8 @@ var Ut = import_picocolors.default.magenta;
43134310var Ye = { light : w ( "\u2500" , "-" ) , heavy : w ( "\u2501" , "=" ) , block : w ( "\u2588" , "#" ) } ;
43144311var ze = `${ import_picocolors . default . gray ( h ) } ` ;
43154312
4316- // ../tools/dist/logger.js
4317- var import_is_unicode_supported = __toESM ( require_is_unicode_supported ( ) , 1 ) ;
4318- var unicode = ( 0 , import_is_unicode_supported . default ) ( ) ;
4319- var unicodeWithFallback = ( c , fallback ) => unicode ? c : fallback ;
4320- var SYMBOL_DEBUG = unicodeWithFallback ( "\u25CF" , "\u2022" ) ;
4321- var verbose = ! ! process . env . HARNESS_DEBUG ;
4313+ // ../tools/dist/spawn.js
4314+ var spawnLogger = logger . child ( "spawn" ) ;
43224315
43234316// ../tools/dist/react-native.js
43244317var import_node_module = require ( "module" ) ;
@@ -4338,6 +4331,46 @@ var import_node_fs4 = __toESM(require("fs"), 1);
43384331var import_node_path4 = __toESM ( require ( "path" ) , 1 ) ;
43394332var DEFAULT_ARTIFACT_ROOT = import_node_path4 . default . join ( process . cwd ( ) , ".harness" , "crash-reports" ) ;
43404333
4334+ // ../plugins/dist/utils.js
4335+ var isHookTree = ( value ) => {
4336+ if ( value == null || typeof value !== "object" || Array . isArray ( value ) ) {
4337+ return false ;
4338+ }
4339+ for ( const child of Object . values ( value ) ) {
4340+ if ( child === void 0 ) {
4341+ continue ;
4342+ }
4343+ if ( typeof child === "function" ) {
4344+ continue ;
4345+ }
4346+ if ( child == null || typeof child !== "object" || Array . isArray ( child ) || ! isHookTree ( child ) ) {
4347+ return false ;
4348+ }
4349+ }
4350+ return true ;
4351+ } ;
4352+
4353+ // ../plugins/dist/plugin.js
4354+ var isHarnessPlugin = ( value ) => {
4355+ if ( value == null || typeof value !== "object" || Array . isArray ( value ) ) {
4356+ return false ;
4357+ }
4358+ const candidate = value ;
4359+ if ( typeof candidate . name !== "string" || candidate . name . length === 0 ) {
4360+ return false ;
4361+ }
4362+ if ( candidate . createState != null && typeof candidate . createState !== "function" ) {
4363+ return false ;
4364+ }
4365+ if ( candidate . hooks != null && ! isHookTree ( candidate . hooks ) ) {
4366+ return false ;
4367+ }
4368+ return true ;
4369+ } ;
4370+
4371+ // ../plugins/dist/manager.js
4372+ var pluginsLogger = logger . child ( "plugins" ) ;
4373+
43414374// ../config/dist/types.js
43424375var DEFAULT_METRO_PORT = 8081 ;
43434376var RunnerSchema = external_exports . object ( {
0 commit comments