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npm/@adonisjs/assembler@8.6.0/build/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/@adonisjs/assembler@8.6.0/build/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { a as memoize, d as throttle, f as watch, h as debug_default, i as loadHooks, l as run, m as VirtualFileSystem, n as getPort, o as processRoutes, r as hasRoutesHooks, s as readTsConfig, t as copyFiles, u as runNode } from \"./utils-QbfbfSOx.js\";\nimport { n as FileBuffer, t as IndexGenerator } from \"./main-2xsAOfXo.js\";\nimport { t as CodemodException } from \"./codemod_exception-DJbmh2NN.js\";\nimport dedent from \"dedent\";\nimport fs, { readFile, unlink } from \"node:fs/promises\";\nimport { cliui } from \"@poppinss/cliui\";\nimport { fileURLToPath } from \"node:url\";\nimport string from \"@poppinss/utils/string\";\nimport { join, relative } from \"node:path/posix\";\nimport { detectPackageManager } from \"@antfu/install-pkg\";\nimport getRandomPort from \"get-port\";\nimport { EnvLoader } from \"@adonisjs/env\";\nimport picomatch from \"picomatch\";\nimport prettyHrtime from \"pretty-hrtime\";\nimport { RuntimeException } from \"@poppinss/utils/exception\";\n//#region src/bundler.ts\n/**\n* List of package managers we support in order to\n* copy lockfiles\n*/\nconst SUPPORTED_PACKAGE_MANAGERS = {\n\t\"npm\": {\n\t\tpackageManagerFiles: [\"package-lock.json\"],\n\t\tinstallCommand: \"npm ci --omit=\\\"dev\\\"\"\n\t},\n\t\"yarn\": {\n\t\tpackageManagerFiles: [\"yarn.lock\"],\n\t\tinstallCommand: \"yarn install --production\"\n\t},\n\t\"yarn@berry\": {\n\t\tpackageManagerFiles: [\n\t\t\t\"yarn.lock\",\n\t\t\t\".yarn/**/*\",\n\t\t\t\".yarnrc.yml\"\n\t\t],\n\t\tinstallCommand: \"yarn workspaces focus --production\"\n\t},\n\t\"pnpm\": {\n\t\tpackageManagerFiles: [\"pnpm-lock.yaml\"],\n\t\tinstallCommand: \"pnpm i --prod\"\n\t},\n\t\"bun\": {\n\t\tpackageManagerFiles: [\"bun.lock\", \"bun.lockb\"],\n\t\tinstallCommand: \"bun install --production\"\n\t},\n\t\"nub\": {\n\t\tpackageManagerFiles: [\"nub.lock\"],\n\t\tinstallCommand: \"nub install --prod\"\n\t},\n\t\"aube\": {\n\t\tpackageManagerFiles: [\"aube-lock.yaml\"],\n\t\tinstallCommand: \"aube install --prod\"\n\t}\n};\n/**\n* The bundler class exposes the API to build an AdonisJS project.\n*\n* @example\n* const bundler = new Bundler(new URL('./'), ts, { hooks: [] })\n* const success = await bundler.bundle()\n*/\nvar Bundler = class {\n\t/**\n\t* Hooks to execute custom actions during the build process\n\t*/\n\t#hooks;\n\t/**\n\t* Index generator for managing auto-generated index files\n\t*/\n\t#indexGenerator;\n\t/**\n\t* CLI UI instance for displaying colorful messages and progress information\n\t*/\n\tui = cliui();\n\t/**\n\t* The current working directory URL\n\t*/\n\tcwd;\n\t/**\n\t* The current working project directory path as string\n\t*/\n\tcwdPath;\n\t/**\n\t* Bundler configuration options including hooks and meta files\n\t*/\n\toptions;\n\t/**\n\t* Create a new bundler instance\n\t*\n\t* @param cwd - The current working directory URL\n\t* @param _ts - TypeScript module reference retained for backward compatibility\n\t* @param options - Bundler configuration options\n\t*/\n\tconstructor(cwd, _ts, options) {\n\t\tthis.cwd = cwd;\n\t\tthis.options = options;\n\t\tthis.cwdPath = string.toUnixSlash(fileURLToPath(this.cwd));\n\t}\n\t/**\n\t* Returns the relative unix path for an absolute\n\t* file path\n\t*/\n\t#getRelativeName(filePath) {\n\t\treturn string.toUnixSlash(relative(this.cwdPath, filePath));\n\t}\n\t/**\n\t* Cleans up the build directory\n\t*/\n\tasync #cleanupBuildDirectory(outDir) {\n\t\tawait fs.rm(outDir, {\n\t\t\trecursive: true,\n\t\t\tforce: true,\n\t\t\tmaxRetries: 5\n\t\t});\n\t}\n\t/**\n\t* Runs tsc command to build the source.\n\t*/\n\tasync #runTsc(args) {\n\t\ttry {\n\t\t\tawait run(this.cwd, {\n\t\t\t\tstdio: \"inherit\",\n\t\t\t\tscript: \"tsc\",\n\t\t\t\tscriptArgs: Object.entries(args).flatMap(([key, value]) => value ? [`--${key}`, value] : [])\n\t\t\t});\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}\n\t/**\n\t* Copy meta files to the output directory\n\t*/\n\tasync #copyMetaFiles(outDir, additionalFilesToCopy) {\n\t\tconst metaFiles = (this.options.metaFiles || []).map((file) => file.pattern).concat(additionalFilesToCopy);\n\t\tawait copyFiles(metaFiles, this.cwdPath, outDir);\n\t}\n\t/**\n\t* Detect the package manager used by the project\n\t*/\n\tasync #detectPackageManager() {\n\t\tconst pkgManager = await detectPackageManager(this.cwdPath);\n\t\tif (pkgManager === \"deno\") return \"npm\";\n\t\t/**\n\t\t* Rush controls pnpm from the monorepo root. The compiled application is\n\t\t* standalone, so it should use the regular pnpm metadata and command.\n\t\t*/\n\t\tif (pkgManager === \"pnpm@6\" || pkgManager === \"pnpm-rush\") return \"pnpm\";\n\t\treturn pkgManager;\n\t}\n\t/**\n\t* Rewrite the ace file since the original one\n\t* is importing ts-node which is not installed\n\t* in a production environment.\n\t*/\n\tasync #createAceFile(outDir) {\n\t\tconst aceFileLocation = join(outDir, \"ace.js\");\n\t\tconst aceFileContent = dedent(`\n      /**\n       * This file is auto-generated by the build process.\n       * If you had any custom code inside this file, then\n       * instead write it inside the \"bin/console.js\" file.\n       */\n\n      await import('./bin/console.js')\n    `);\n\t\tawait fs.writeFile(aceFileLocation, aceFileContent);\n\t\tthis.ui.logger.info(\"created ace file\", { suffix: this.#getRelativeName(aceFileLocation) });\n\t}\n\t/**\n\t* Bundles the application to be run in production\n\t*\n\t* @param stopOnError - Whether to stop the build process on TypeScript errors\n\t* @param client - Override the detected package manager\n\t* @returns Promise that resolves to true if build succeeded, false otherwise\n\t*\n\t* @example\n\t* const success = await bundler.bundle(true, 'npm')\n\t*/\n\tasync bundle(stopOnError = true, client, options = {}) {\n\t\tthis.packageManager = client ?? await this.#detectPackageManager() ?? \"npm\";\n\t\t/**\n\t\t* Step 1: Parse config file to get the build output directory\n\t\t*/\n\t\tconst tsConfig = readTsConfig(this.cwdPath, options.tsconfigPath);\n\t\tif (!tsConfig) return false;\n\t\tconst outDir = tsConfig.getNormalizedOutDir();\n\t\tthis.ui.logger.info(\"loading hooks...\");\n\t\tthis.#hooks = await loadHooks(this.options.hooks, [\n\t\t\t\"init\",\n\t\t\t\"buildStarting\",\n\t\t\t\"buildFinished\"\n\t\t]);\n\t\tthis.#indexGenerator = new IndexGenerator(this.cwdPath, this.ui.logger);\n\t\t/**\n\t\t* Step 2: Run init hook and the index generator\n\t\t*/\n\t\tawait this.#hooks.runner(\"init\").run(this, this.#hooks, this.#indexGenerator);\n\t\tthis.#hooks.clear(\"init\");\n\t\tthis.ui.logger.info(\"generating indexes...\");\n\t\tawait this.#indexGenerator.generate();\n\t\t/**\n\t\t* Step 3: Cleanup existing build directory (if any)\n\t\t*/\n\t\tthis.ui.logger.info(\"cleaning up output directory\", { suffix: this.#getRelativeName(outDir) });\n\t\tawait this.#cleanupBuildDirectory(outDir);\n\t\t/**\n\t\t* Step 4: Execute build starting hook\n\t\t*/\n\t\tawait this.#hooks.runner(\"buildStarting\").run(this);\n\t\t/**\n\t\t* Step 5: Build typescript source code\n\t\t*/\n\t\tthis.ui.logger.info(\"compiling typescript source\", { suffix: \"tsc\" });\n\t\tconst buildCompleted = await this.#runTsc({\n\t\t\toutDir,\n\t\t\tproject: options.tsconfigPath\n\t\t});\n\t\tawait this.#createAceFile(outDir);\n\t\t/**\n\t\t* Remove incomplete build directory when tsc build\n\t\t* failed and stopOnError is set to true.\n\t\t*/\n\t\tif (!buildCompleted && stopOnError) {\n\t\t\tawait this.#cleanupBuildDirectory(outDir);\n\t\t\tconst instructions = this.ui.sticker().fullScreen().drawBorder((borderChar, colors) => colors.red(borderChar));\n\t\t\tinstructions.add(this.ui.colors.red(\"Cannot complete the build process as there are TypeScript errors.\"));\n\t\t\tinstructions.add(this.ui.colors.red(\"Use \\\"--ignore-ts-errors\\\" flag to ignore TypeScript errors and continue the build.\"));\n\t\t\tthis.ui.logger.logError(instructions.prepare());\n\t\t\treturn false;\n\t\t}\n\t\t/**\n\t\t* Step 6: Copy meta files to the build directory\n\t\t*/\n\t\tconst pkgFiles = [\"package.json\", ...SUPPORTED_PACKAGE_MANAGERS[this.packageManager].packageManagerFiles];\n\t\tthis.ui.logger.info(\"copying meta files to the output directory\");\n\t\tawait this.#copyMetaFiles(outDir, pkgFiles);\n\t\tthis.ui.logger.success(\"build completed\");\n\t\tthis.ui.logger.log(\"\");\n\t\tconst displayMessage = this.ui.instructions().heading(\"Run the following commands to start the server in production\");\n\t\t/**\n\t\t* Step 7: Execute build completed hook\n\t\t*/\n\t\tawait this.#hooks.runner(\"buildFinished\").run(this, displayMessage);\n\t\t/**\n\t\t* Display next steps\n\t\t*/\n\t\tdisplayMessage.add(this.ui.colors.cyan(`cd ${this.#getRelativeName(outDir)}`)).add(this.ui.colors.cyan(SUPPORTED_PACKAGE_MANAGERS[this.packageManager].installCommand)).add(this.ui.colors.cyan(\"node bin/server.js\")).render();\n\t\treturn true;\n\t}\n};\n//#endregion\n//#region src/codegen.ts\n/**\n* CodeGen runs the codegen performed by the dev-server, without the server\n* and without the file watcher.\n*\n* The dev-server, the bundler and the test runner all generate code as a\n* side-effect of doing something else. CodeGen exists to perform the same work\n* on its own, so the contents of the \".adonisjs\" directory can be refreshed\n* deterministically. For example, inside a CI pipeline before typechecking or\n* creating a build.\n*\n* The class covers both the codegen stages.\n*\n* - The static stage runs the \"init\" hooks against an index generator and\n*   writes the index files. Nothing but the file-system is needed for it.\n*\n* - The runtime stage runs the routes hooks. It needs a snapshot of the state\n*   that only a booted application knows about, therefore the snapshot has to\n*   be supplied by the caller. Assembler never boots the app itself.\n*\n* The stages run in that order, because an application imports the generated\n* index files from its preload files and hence cannot be booted before they\n* exist.\n*\n* Unlike the dev-server, errors are not swallowed. A codegen run either\n* completes or throws, so the caller can exit with a non-zero code.\n*\n* @example\n* const codegen = new CodeGen(cwd, { hooks: rcFile.hooks })\n* codegen.ui.logger = command.logger\n*\n* await codegen.run(async () => {\n*   await warmUpApp()\n*   return { routes: router.toJSON() }\n* })\n*/\nvar CodeGen = class {\n\t/**\n\t* Hooks to execute custom actions during the codegen process\n\t*/\n\t#hooks;\n\t/**\n\t* Index generator for managing auto-generated index files\n\t*/\n\t#indexGenerator;\n\t/**\n\t* Routes scanner created when a routes snapshot has been supplied and\n\t* there are hooks interested in scanning them\n\t*/\n\t#routesScanner;\n\t/**\n\t* CLI UI instance for displaying colorful messages and progress information\n\t*/\n\tui = cliui();\n\t/**\n\t* The current working directory URL\n\t*/\n\tcwd;\n\t/**\n\t* The current working project directory path as string\n\t*/\n\tcwdPath;\n\t/**\n\t* CodeGen configuration options including hooks\n\t*/\n\toptions;\n\t/**\n\t* Create a new codegen instance\n\t*\n\t* @param cwd - The current working directory URL\n\t* @param options - CodeGen configuration options\n\t*/\n\tconstructor(cwd, options) {\n\t\tthis.cwd = cwd;\n\t\tthis.options = options;\n\t\tthis.cwdPath = string.toUnixSlash(fileURLToPath(this.cwd));\n\t}\n\t/**\n\t* Reference to the index generator used by the last run\n\t*/\n\tget indexGenerator() {\n\t\treturn this.#indexGenerator;\n\t}\n\t/**\n\t* Reference to the routes scanner used by the last run. Stays undefined\n\t* when no routes were supplied or no hook asked for them to be scanned\n\t*/\n\tget routesScanner() {\n\t\treturn this.#routesScanner;\n\t}\n\t/**\n\t* Generate the codegen files.\n\t*\n\t* The index files are written first, because the application cannot be booted\n\t* without them. The preload files of an application import the generated\n\t* barrel files, for example \"start/routes.ts\" imports the controllers barrel,\n\t* so those files have to exist on disk before anything imports them. The\n\t* dev-server generates them ahead of spawning the app for the same reason.\n\t*\n\t* Therefore the caller boots the application from inside the \"collectSnapshot\"\n\t* callback and returns the state only a booted app knows about. Skip the\n\t* callback to generate the index files alone.\n\t*\n\t* @param collectSnapshot - Called once the index files exist. Boot the app\n\t*   here and return the runtime state to generate the rest from\n\t*\n\t* @example\n\t* // Index files only\n\t* await codegen.run()\n\t*\n\t* // Index files, then everything derived from the routes\n\t* await codegen.run(async () => {\n\t*   await app.boot()\n\t*   await app.warmUp()\n\t*   router.commit()\n\t*   return { routes: router.toJSON() }\n\t* })\n\t*/\n\tasync run(collectSnapshot) {\n\t\tthis.ui.logger.info(\"loading hooks...\");\n\t\tthis.#hooks = await loadHooks(this.options.hooks, [\n\t\t\t\"init\",\n\t\t\t\"routesCommitted\",\n\t\t\t\"routesScanning\",\n\t\t\t\"routesScanned\"\n\t\t]);\n\t\tthis.#indexGenerator = new IndexGenerator(this.cwdPath, this.ui.logger);\n\t\t/**\n\t\t* Static stage. Run the init hooks and write the index files. Nothing but\n\t\t* the file-system is needed for it\n\t\t*/\n\t\tawait this.#hooks.runner(\"init\").run(this, this.#hooks, this.#indexGenerator);\n\t\tthis.#hooks.clear(\"init\");\n\t\tthis.ui.logger.info(\"generating indexes...\");\n\t\tawait this.#indexGenerator.generate();\n\t\tif (!collectSnapshot) return;\n\t\t/**\n\t\t* Runtime stage. The index files exist by now, so the caller is able to\n\t\t* boot the app and hand over the state we cannot collect ourselves\n\t\t*/\n\t\tconst snapshot = await collectSnapshot();\n\t\tif (snapshot.routes)\n /**\n\t\t* The cast is needed because a hooks instance is invariant over its\n\t\t* events map. This instance carries the \"init\" hook as well, which the\n\t\t* helper has no interest in\n\t\t*/\n\t\tthis.#routesScanner = await processRoutes(this.#hooks, this, this.cwdPath, snapshot.routes);\n\t}\n};\n//#endregion\n//#region src/file_system.ts\nconst DEFAULT_INCLUDES = [\"**/*\"];\nconst ALWAYS_EXCLUDE = [\n\t\".git/**\",\n\t\"coverage/**\",\n\t\".github/**\",\n\t\".adonisjs/**\",\n\t\"tmp/**\",\n\t\"storage/**\",\n\t\"build/**\"\n];\nconst DEFAULT_EXCLUDES = [\n\t\"node_modules/**\",\n\t\"bower_components/**\",\n\t\"jspm_packages/**\"\n];\n/**\n* Exposes an intutive API to run actions when different kind of files\n* are changed. The FileSystem is built around the vocabulary used by\n* AdonisJS. Which includes:\n*\n* - Source files: TypeScript, JavaScript, JSON, JSX, TSX files that are included\n*   inside the \"tsconfig.json\" file are considered as source files.\n* - Meta files: Files registered under the \"metaFiles\" array of \"adonisrc.ts\" file\n*   are called meta files.\n* - Meta restart files: Meta files with \"restart: true\" enabled are called meta restart\n*   files.\n*\n* Using FileSystem you can register actions to be executed when a file changes in\n* one of the above categories.\n*\n* @example\n* const fs = new FileSystem(cwd, tsConfig, rcFile)\n* const file = fs.inspect('./app/controllers/users_controller.ts')\n*/\nvar FileSystem = class {\n\t/**\n\t* The current working project directory\n\t*/\n\t#cwd;\n\t/**\n\t* Referenced to the parsed ts config file. We use it to read the includes,\n\t* excludes and pre-scanned files.\n\t*/\n\t#tsConfig;\n\t/**\n\t* Set of pre-scanned typeScript files provided by tsconfig\n\t*/\n\t#scannedTypeScriptFiles = /* @__PURE__ */ new Set();\n\t/**\n\t* Picomatch matcher function to know if a file path is\n\t* part of includes\n\t*/\n\t#isIncluded;\n\t/**\n\t* Picomatch matcher function to know if a file path is\n\t* part of excludes\n\t*/\n\t#isExcluded;\n\t/**\n\t* Picomatch matcher function to know if a file path is a\n\t* meta file with reloadServer option enabled\n\t*/\n\t#isMetaFileWithReloadsEnabled;\n\t/**\n\t* Picomatch matcher function to know if a file path is a\n\t* meta file with reloadServer option disabled\n\t*/\n\t#isMetaFileWithReloadsDisabled;\n\t/**\n\t* Picomatch matcher function to know if a file path is a\n\t* test file or not\n\t*/\n\t#isTestFile;\n\t/**\n\t* References to includes and excludes glob patterns\n\t*/\n\t#includes;\n\t#excludes;\n\t/**\n\t* Includes glob patterns extracted from \"tsconfig.json\" file.\n\t* Defaults to: [\"**\\/*\"]\n\t*/\n\tget includes() {\n\t\treturn this.#includes;\n\t}\n\t/**\n\t* Excludes glob patterns extracted from \"tsconfig.json\" file.\n\t*\n\t* Defaults to: [\n\t*   'node_modules/**',\n\t*   'bower_components/**',\n\t*   'jspm_packages/**,\n\t* ]\n\t*\n\t* Following patterns are always ignored\n\t*\n\t* '.git/**', 'coverage/**', '.github/**', '.adonisjs/**', 'tmp/**', 'storage/**', 'build/**'\n\t*/\n\tget excludes() {\n\t\treturn this.#excludes;\n\t}\n\t/**\n\t* Inspect a file path to determine its type and properties within the project.\n\t*\n\t* This method analyzes a file to categorize it as a script file, test file, or meta file,\n\t* and determines whether changes to the file should trigger server restarts. Results\n\t* are memoized for performance optimization.\n\t*\n\t* @param absolutePath - The absolute Unix path to the file\n\t* @param relativePath - The relative Unix path from the project root\n\t* @returns File inspection result or null if the file should be ignored\n\t*\n\t* @example\n\t* const file = fileSystem.inspect('/project/app/models/user.ts', 'app/models/user.ts')\n\t* if (file) {\n\t*   console.log(file.fileType) // 'script'\n\t*   console.log(file.reloadServer) // true\n\t* }\n\t*/\n\tinspect = memoize((absolutePath, relativePath) => {\n\t\trelativePath = relativePath ?? relative(this.#cwd, absolutePath);\n\t\t/**\n\t\t* If a file is a script file and part of the backend project, then we consider\n\t\t* the file.\n\t\t*\n\t\t* Non script files are not checked inside the backend project, since there are\n\t\t* anyways cannot be processed by TypeScript.\n\t\t*/\n\t\tif (this.#isScriptFile(relativePath) && (this.#scannedTypeScriptFiles.has(absolutePath) || this.#isPartOfBackendProject(relativePath))) {\n\t\t\tdebug_default(\"backend project file \\\"%s\\\"\", relativePath);\n\t\t\tconst isTestFile = this.#isTestFile(relativePath);\n\t\t\treturn {\n\t\t\t\tfileType: isTestFile ? \"test\" : \"script\",\n\t\t\t\treloadServer: !isTestFile,\n\t\t\t\tunixRelativePath: relativePath,\n\t\t\t\tunixAbsolutePath: absolutePath\n\t\t\t};\n\t\t}\n\t\t/**\n\t\t* Check for meta files with reload flag enabled\n\t\t*/\n\t\tif (this.#isMetaFileWithReloadsEnabled(relativePath)) {\n\t\t\tdebug_default(\"meta file \\\"%s\\\"\", relativePath);\n\t\t\treturn {\n\t\t\t\tfileType: \"meta\",\n\t\t\t\treloadServer: true,\n\t\t\t\tunixRelativePath: relativePath,\n\t\t\t\tunixAbsolutePath: absolutePath\n\t\t\t};\n\t\t}\n\t\t/**\n\t\t* Check for meta files with reload flag disabled\n\t\t*/\n\t\tif (this.#isMetaFileWithReloadsDisabled(relativePath)) {\n\t\t\tdebug_default(\"meta file \\\"%s\\\"\", relativePath);\n\t\t\treturn {\n\t\t\t\tfileType: \"meta\",\n\t\t\t\treloadServer: false,\n\t\t\t\tunixRelativePath: relativePath,\n\t\t\t\tunixAbsolutePath: absolutePath\n\t\t\t};\n\t\t}\n\t\tdebug_default(\"ignored file \\\"%s\\\"\", relativePath);\n\t\treturn null;\n\t});\n\t/**\n\t* Determines if a directory should be watched by the file watcher.\n\t*\n\t* This method checks if a directory should be monitored for file changes\n\t* based on the TypeScript configuration includes/excludes patterns.\n\t* Results are memoized for performance. Chokidar sends absolute Unix paths.\n\t*\n\t* Note: Use shouldWatchFile for files and this method for directories only.\n\t*\n\t* @param absolutePath - The absolute Unix path to the directory\n\t* @returns True if the directory should be watched\n\t*\n\t* @example\n\t* const shouldWatch = fileSystem.shouldWatchDirectory('/project/app/controllers')\n\t* console.log(shouldWatch) // true\n\t*/\n\tshouldWatchDirectory = memoize((absolutePath) => {\n\t\t/**\n\t\t* Always watch the project root\n\t\t*/\n\t\tif (absolutePath === this.#cwd) {\n\t\t\tdebug_default(\"watching project root\");\n\t\t\treturn true;\n\t\t}\n\t\t/**\n\t\t* Ignore directories excluded by tsconfig.json file. If tsconfig excludes\n\t\t* directories include by metaFiles, then its a mis-configuration and we\n\t\t* should update excludes to be more specific.\n\t\t*\n\t\t* Overriding excludes via metaFiles patterns is close to impossible because\n\t\t* of how undeterministic glob patterns are.\n\t\t*/\n\t\tconst relativePath = relative(this.#cwd, absolutePath);\n\t\tif (this.#isExcluded(relativePath)) {\n\t\t\tdebug_default(\"watching \\\"%s\\\"\", absolutePath);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\t/**\n\t* Create a new FileSystem instance\n\t*\n\t* @param cwd - The current working directory URL or string path\n\t* @param tsConfig - Parsed TypeScript configuration\n\t* @param rcFile - AdonisJS RC file configuration\n\t*/\n\tconstructor(cwd, tsConfig, rcFile) {\n\t\tthis.#cwd = cwd;\n\t\tthis.#tsConfig = tsConfig;\n\t\tconst files = tsConfig.config.files ?? [];\n\t\tconst metaFiles = rcFile.metaFiles ?? [];\n\t\tconst testSuites = rcFile.suites ?? [];\n\t\tconst outDir = tsConfig.config.compilerOptions?.outDir;\n\t\t/**\n\t\t* Register files we know ahead of time\n\t\t*/\n\t\tfor (const file of files) this.#scannedTypeScriptFiles.add(string.toUnixSlash(file));\n\t\t/**\n\t\t* Compute includes and excludes\n\t\t*/\n\t\tthis.#includes = tsConfig.config.include || DEFAULT_INCLUDES;\n\t\tthis.#excludes = ALWAYS_EXCLUDE.concat(tsConfig.config.exclude || (outDir ? DEFAULT_EXCLUDES.concat(outDir) : DEFAULT_EXCLUDES));\n\t\t/**\n\t\t* Pre-compute meta file patterns to avoid repeated array operations\n\t\t*/\n\t\tconst metaFilesWithReloads = [];\n\t\tconst metaFilesWithoutReloads = [];\n\t\tfor (const file of metaFiles) if (file.reloadServer) metaFilesWithReloads.push(file.pattern);\n\t\telse metaFilesWithoutReloads.push(file.pattern);\n\t\tconst testFilePatterns = testSuites.flatMap((suite) => suite.files);\n\t\t/**\n\t\t* Initiate picomatch matchers we will need to identify metafiles\n\t\t*/\n\t\tthis.#isMetaFileWithReloadsEnabled = picomatch(metaFilesWithReloads);\n\t\tthis.#isMetaFileWithReloadsDisabled = picomatch(metaFilesWithoutReloads);\n\t\tthis.#isTestFile = picomatch(testFilePatterns);\n\t\tthis.#isIncluded = picomatch(this.#includes);\n\t\tthis.#isExcluded = picomatch(this.#excludes);\n\t\tdebug_default(\"initiating file system %O\", {\n\t\t\tincludes: this.#includes,\n\t\t\texcludes: this.#excludes,\n\t\t\toutDir,\n\t\t\tfiles,\n\t\t\tmetaFiles,\n\t\t\ttestSuites\n\t\t});\n\t}\n\t/**\n\t* Determines if a file path represents a script file based on TypeScript configuration.\n\t*\n\t* Script files are those that can be processed by the TypeScript compiler:\n\t* - Files ending with \".ts\" or \".tsx\" (excluding \".d.ts\" declaration files)\n\t* - Files ending with \".js\" when \"allowJs\" option is enabled in tsconfig\n\t* - Files ending with \".json\" when \"resolveJsonModule\" option is enabled in tsconfig\n\t*\n\t* @param relativePath - The relative file path to check\n\t* @returns True if the file is a script file\n\t*/\n\t#isScriptFile(relativePath) {\n\t\tif ((relativePath.endsWith(\".ts\") || relativePath.endsWith(\".tsx\")) && !relativePath.endsWith(\".d.ts\")) return true;\n\t\tif (this.#tsConfig.config.compilerOptions?.allowJs && relativePath.endsWith(\".js\")) return true;\n\t\tif (this.#tsConfig.config.compilerOptions?.resolveJsonModule && relativePath.endsWith(\".json\")) return true;\n\t\treturn false;\n\t}\n\t/**\n\t* Checks if a file path is part of the backend TypeScript project.\n\t*\n\t* Uses TypeScript configuration \"includes\", \"excludes\", and \"files\" paths\n\t* to determine if a file should be considered part of the project compilation.\n\t*\n\t* @param relativePath - The relative file path to check\n\t* @returns True if the file is part of the backend project\n\t*/\n\t#isPartOfBackendProject(relativePath) {\n\t\t/**\n\t\t* Script and non-script files can be excluded using tsconfig\n\t\t*/\n\t\tif (this.#isExcluded(relativePath)) {\n\t\t\tdebug_default(\"excluded by tsconfig \\\"%s\\\"\", relativePath);\n\t\t\treturn false;\n\t\t}\n\t\t/**\n\t\t* Return true when included\n\t\t*/\n\t\tif (this.#isIncluded(relativePath)) {\n\t\t\tdebug_default(\"included by tsconfig \\\"%s\\\"\", relativePath);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Returns true if the file should be watched. Chokidar sends\n\t* absolute unix paths to the ignored callback.\n\t*\n\t* You must use \"shouldWatchDirectory\" method for directories and call\n\t* this method for files only.\n\t*\n\t* @param absolutePath - The absolute path to the file\n\t* @returns True if the file should be watched\n\t*/\n\tshouldWatchFile(absolutePath) {\n\t\treturn this.inspect(absolutePath) !== null;\n\t}\n};\n//#endregion\n//#region src/shortcuts_manager.ts\n/**\n* Manages keyboard shortcuts for development server interaction.\n*\n* The ShortcutsManager provides a convenient way to handle keyboard inputs\n* during development, allowing users to restart servers, clear console,\n* open browsers, and perform other common development tasks through simple\n* key presses.\n*\n* @example\n* const shortcuts = new ShortcutsManager({\n*   logger: ui.logger,\n*   callbacks: {\n*     onRestart: () => server.restart(),\n*     onClear: () => console.clear(),\n*     onQuit: () => process.exit()\n*   }\n* })\n* shortcuts.setup()\n*/\nvar ShortcutsManager = class {\n\t/**\n\t* Logger instance for displaying messages\n\t*/\n\t#logger;\n\t/**\n\t* Callback functions for different keyboard shortcuts\n\t*/\n\t#callbacks;\n\t/**\n\t* The server URL used for opening browser\n\t*/\n\t#serverUrl;\n\t/**\n\t* Key press event handler function\n\t*/\n\t#keyPressHandler;\n\t/**\n\t* Available keyboard shortcuts with their handlers\n\t*/\n\t#shortcuts = [\n\t\t{\n\t\t\tkey: \"r\",\n\t\t\tdescription: \"restart server\",\n\t\t\thandler: () => {\n\t\t\t\tthis.#logger.log(\"\");\n\t\t\t\tthis.#logger.info(\"Manual restart triggered...\");\n\t\t\t\tthis.#callbacks.onRestart();\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tkey: \"c\",\n\t\t\tdescription: \"clear console\",\n\t\t\thandler: () => {\n\t\t\t\tthis.#callbacks.onClear();\n\t\t\t\tthis.#logger.info(\"Console cleared\");\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tkey: \"o\",\n\t\t\tdescription: \"open in browser\",\n\t\t\thandler: () => this.#handleOpenBrowser()\n\t\t},\n\t\t{\n\t\t\tkey: \"h\",\n\t\t\tdescription: \"show this help\",\n\t\t\thandler: () => this.showHelp()\n\t\t}\n\t];\n\t/**\n\t* Create a new ShortcutsManager instance\n\t*\n\t* @param options - Configuration options for the shortcuts manager\n\t*/\n\tconstructor(options) {\n\t\tthis.#logger = options.logger;\n\t\tthis.#callbacks = options.callbacks;\n\t}\n\t/**\n\t* Set server url for opening in browser\n\t*\n\t* This URL will be used when the user presses 'o' to open the\n\t* development server in their default browser.\n\t*\n\t* @param url - The server URL to open when 'o' key is pressed\n\t*/\n\tsetServerUrl(url) {\n\t\tthis.#serverUrl = url;\n\t}\n\t/**\n\t* Initialize keyboard shortcuts by setting up raw mode on stdin\n\t*\n\t* This method enables raw mode on stdin to capture individual keypresses\n\t* and sets up the event listener for handling keyboard input. Only works\n\t* in TTY environments.\n\t*/\n\tsetup() {\n\t\tif (!process.stdin.isTTY) return;\n\t\tprocess.stdin.setRawMode(true);\n\t\tthis.#keyPressHandler = (data) => this.#handleKeyPress(data.toString());\n\t\tprocess.stdin.on(\"data\", this.#keyPressHandler);\n\t}\n\t/**\n\t* Handle key press events and execute corresponding shortcuts\n\t*\n\t* Processes individual key presses and matches them against registered\n\t* shortcuts. Also handles special key combinations like Ctrl+C and Ctrl+D.\n\t*\n\t* @param key - The pressed key as a string\n\t*/\n\t#handleKeyPress(key) {\n\t\tif (key === \"\u0003\" || key === \"\u0004\") return this.#callbacks.onQuit();\n\t\tconst shortcut = this.#shortcuts.find((s) => s.key === key);\n\t\tif (shortcut) shortcut.handler();\n\t}\n\t/**\n\t* Handle opening browser with the configured server URL\n\t*\n\t* Uses the 'open' package to launch the default browser and navigate\n\t* to the development server URL.\n\t*/\n\tasync #handleOpenBrowser() {\n\t\tthis.#logger.log(\"\");\n\t\tthis.#logger.info(`Opening ${this.#serverUrl}...`);\n\t\tconst { default: open } = await import(\"open\");\n\t\topen(this.#serverUrl);\n\t}\n\t/**\n\t* Show available keyboard shortcuts in the console\n\t*\n\t* Displays a formatted list of all available keyboard shortcuts\n\t* and their descriptions to help users understand what actions\n\t* are available.\n\t*/\n\tshowHelp() {\n\t\tthis.#logger.log(\"\");\n\t\tthis.#logger.log(\"Available shortcuts:\");\n\t\tthis.#shortcuts.forEach(({ key, description }) => this.#logger.log(`· ${key}: ${description}`));\n\t}\n\t/**\n\t* Cleanup keyboard shortcuts and restore terminal state\n\t*\n\t* Disables raw mode on stdin, removes event listeners, and restores\n\t* the terminal to its normal state. Should be called when shutting down\n\t* the development server.\n\t*/\n\tcleanup() {\n\t\tif (!process.stdin.isTTY) return;\n\t\tprocess.stdin.setRawMode(false);\n\t\tprocess.stdin.pause();\n\t\tprocess.stdin.unref();\n\t\tprocess.stdin.removeListener(\"data\", this.#keyPressHandler);\n\t\tthis.#keyPressHandler = void 0;\n\t}\n};\n//#endregion\n//#region src/dev_server.ts\n/**\n* Exposes the API to start the development server in HMR, watch or static mode\n*\n* In HMR mode, the DevServer will exec the \"bin/server.ts\" file and let hot-hook\n* manage the changes using hot module reloading.\n*\n* In watch mode, the DevServer will start an internal watcher and restarts the server\n* after every file change. The files must be part of the TypeScript project (via tsconfig.json),\n* or registered as metaFiles.\n*\n* In static mode, the server runs without file watching or hot reloading.\n*\n* @example\n* const devServer = new DevServer(cwd, { hmr: true, hooks: [] })\n* await devServer.start(ts)\n*/\nvar DevServer = class DevServer {\n\t/**\n\t* Pre-allocated info object for hot-hook full reload events\n\t*/\n\tstatic #HOT_HOOK_FULL_RELOAD_INFO = {\n\t\tsource: \"hot-hook\",\n\t\tfullReload: true,\n\t\thotReloaded: false\n\t};\n\t/**\n\t* Pre-allocated info object for hot-hook invalidation events\n\t*/\n\tstatic #HOT_HOOK_INVALIDATED_INFO = {\n\t\tsource: \"hot-hook\",\n\t\tfullReload: false,\n\t\thotReloaded: true\n\t};\n\t/**\n\t* Pre-allocated info object for file watcher events\n\t*/\n\tstatic #WATCHER_INFO = {\n\t\tsource: \"watcher\",\n\t\tfullReload: true,\n\t\thotReloaded: false\n\t};\n\t/**\n\t* External listeners that are invoked when child process\n\t* gets an error or closes\n\t*/\n\t#onError;\n\t#onClose;\n\t/**\n\t* The stickyPort is set by the start and the startAndWatch methods\n\t* and we will continue to use that port during restart\n\t*/\n\t#stickyPort;\n\t/**\n\t* The stickyHmrPort is set by the start and the startAndWatch methods\n\t* and we will continue to use that port during restart\n\t*/\n\t#stickyHmrPort;\n\t/**\n\t* The mode is set by the start and the startAndWatch methods\n\t*/\n\t#mode = \"static\";\n\t/**\n\t* Reference to chokidar watcher\n\t*/\n\t#watcher;\n\t/**\n\t* Absolute paths of the environment files loaded by the application\n\t*/\n\t#envFiles;\n\t/**\n\t* Reference to the child process\n\t*/\n\t#httpServer;\n\t/**\n\t* Flag to track if the HTTP server child process is alive\n\t*/\n\t#isHttpServerAlive = false;\n\t/**\n\t* Keyboard shortcuts manager instance\n\t*/\n\t#shortcutsManager;\n\t/**\n\t* Filesystem is used to decide which files to watch or entertain when\n\t* using hot-hook\n\t*/\n\t#fileSystem;\n\t/**\n\t* Index generator for managing auto-generated index files\n\t*/\n\t#indexGenerator;\n\t/**\n\t* Routes scanner to scan routes and infer route request and\n\t* response data\n\t*/\n\t#routesScanner;\n\t/**\n\t* Hooks to execute custom actions during the dev server lifecycle\n\t*/\n\t#hooks;\n\t/**\n\t* CLI UI instance for displaying colorful messages and progress information\n\t*/\n\tui = cliui();\n\t/**\n\t* Restarts the HTTP server and throttle concurrent calls to\n\t* ensure we do not end up with a long loop of restarts\n\t*/\n\t#restartHTTPServer = throttle(async () => {\n\t\tif (this.#httpServer) {\n\t\t\tthis.#httpServer.removeAllListeners();\n\t\t\tthis.#httpServer.kill(\"SIGKILL\");\n\t\t}\n\t\tawait this.#startHTTPServer(this.#stickyPort, this.#stickyHmrPort);\n\t}, \"restartHTTPServer\");\n\t/**\n\t* Sets up keyboard shortcuts for development server interactions\n\t*\n\t* Initializes the shortcuts manager with callbacks for restarting the server,\n\t* clearing the screen, and quitting the application.\n\t*/\n\t#setupKeyboardShortcuts() {\n\t\tthis.#shortcutsManager = new ShortcutsManager({\n\t\t\tlogger: this.ui.logger,\n\t\t\tcallbacks: {\n\t\t\t\tonRestart: () => this.#restartHTTPServer(),\n\t\t\t\tonClear: () => this.#clearScreen(),\n\t\t\t\tonQuit: () => this.close()\n\t\t\t}\n\t\t});\n\t\tthis.#shortcutsManager.setup();\n\t}\n\t/**\n\t* Cleanup keyboard shortcuts and restore terminal state\n\t*\n\t* Removes keyboard shortcuts event listeners and restores the terminal\n\t* to its normal state when shutting down the development server.\n\t*/\n\t#cleanupKeyboardShortcuts() {\n\t\tthis.#shortcutsManager?.cleanup();\n\t}\n\t/**\n\t* The mode in which the DevServer is running\n\t*\n\t* Returns the current operating mode of the development server:\n\t* - 'hmr': Hot Module Reloading enabled\n\t* - 'watch': File system watching with full restarts\n\t* - 'static': No file watching or hot reloading\n\t*/\n\tget mode() {\n\t\treturn this.#mode;\n\t}\n\t/**\n\t* Script file to start the development server\n\t*/\n\tscriptFile = \"bin/server.ts\";\n\t/**\n\t* The current working directory URL\n\t*/\n\tcwd;\n\t/**\n\t* File path computed from the cwd\n\t*/\n\tcwdPath;\n\t/**\n\t* Development server configuration options including hooks and environment variables\n\t*/\n\toptions;\n\t/**\n\t* Create a new DevServer instance\n\t*\n\t* @param cwd - The current working directory URL\n\t* @param options - Development server configuration options\n\t*/\n\tconstructor(cwd, options) {\n\t\tthis.cwd = cwd;\n\t\tthis.options = options;\n\t\tthis.cwdPath = string.toUnixSlash(fileURLToPath(this.cwd));\n\t}\n\t/**\n\t* Type guard to check if child process message is from AdonisJS HTTP server\n\t*\n\t* Validates that a message from the child process contains the expected\n\t* structure indicating the AdonisJS server is ready and listening.\n\t*\n\t* @param message - Unknown message from child process\n\t* @returns True if message is an AdonisJS ready message\n\t*/\n\t#isAdonisJSReadyMessage(message) {\n\t\treturn message !== null && typeof message === \"object\" && \"isAdonisJS\" in message && \"environment\" in message && message.environment === \"web\";\n\t}\n\t/**\n\t* Type guard to check if child process message contains routes information\n\t*\n\t* Validates that a message from the child process contains the expected\n\t* structure with routes file location from the AdonisJS server.\n\t*\n\t* @param message - Unknown message from child process\n\t* @returns True if message contains routes file location\n\t*/\n\t#isAdonisJSRoutesMessage(message) {\n\t\treturn message !== null && typeof message === \"object\" && \"routesFileLocation\" in message;\n\t}\n\t/**\n\t* Displays server information and executes hooks after server startup\n\t*\n\t* Shows server URL, mode, startup duration, and help instructions.\n\t* Also executes the devServerStarted hooks to allow custom post-startup logic.\n\t*\n\t* @param message - Server ready message containing port, host, and optional duration\n\t*/\n\tasync #postServerReady(message) {\n\t\tconst host = message.host === \"0.0.0.0\" ? \"127.0.0.1\" : message.host;\n\t\tconst info = {\n\t\t\thost,\n\t\t\tport: message.port\n\t\t};\n\t\tconst serverUrl = `http://${host}:${message.port}`;\n\t\tthis.#shortcutsManager?.setServerUrl(serverUrl);\n\t\tconst displayMessage = this.ui.sticker().add(`Server address: ${this.ui.colors.cyan(serverUrl)}`).add(`Mode: ${this.ui.colors.cyan(this.mode)}`);\n\t\tif (message.duration) displayMessage.add(`Ready in: ${this.ui.colors.cyan(prettyHrtime(message.duration))}`);\n\t\tdisplayMessage.add(`Press ${this.ui.colors.dim(\"h\")} to show help`);\n\t\t/**\n\t\t* Run hooks before displaying the \"displayMessage\". It will allow hooks to add\n\t\t* custom lines to the display message.\n\t\t*/\n\t\ttry {\n\t\t\tawait this.#hooks.runner(\"devServerStarted\").run(this, info, displayMessage);\n\t\t} catch (error) {\n\t\t\tthis.ui.logger.error(\"One of the \\\"devServerStarted\\\" hooks failed\");\n\t\t\tthis.ui.logger.fatal(error);\n\t\t}\n\t\tdisplayMessage.render();\n\t}\n\t/**\n\t* Type guard to check if child process message is from hot-hook\n\t*\n\t* Validates that a message from the child process is a hot-hook notification\n\t* about file changes, invalidations, or full reloads.\n\t*\n\t* @param message - Unknown message from child process\n\t* @returns True if message is a hot-hook message\n\t*/\n\t#isHotHookMessage(message) {\n\t\treturn message !== null && typeof message === \"object\" && \"type\" in message && typeof message.type === \"string\" && message.type.startsWith(\"hot-hook:\");\n\t}\n\t/**\n\t* Conditionally clears the terminal screen based on configuration\n\t*\n\t* Clears the terminal screen if the clearScreen option is enabled,\n\t* providing a clean view for development output.\n\t*/\n\t#clearScreen() {\n\t\tif (this.options.clearScreen) process.stdout.write(\"\\x1Bc\");\n\t}\n\t/**\n\t* Creates our file system watcher\n\t*/\n\t#createWatcher(options) {\n\t\tconst watcher = watch({\n\t\t\tusePolling: options?.poll ?? false,\n\t\t\tcwd: this.cwdPath,\n\t\t\tignoreInitial: true,\n\t\t\tignored: (file, stats) => {\n\t\t\t\tif (!stats) return false;\n\t\t\t\tif (file.includes(\"inertia\") && !file.includes(\"node_modules\")) return false;\n\t\t\t\tif (stats.isFile()) {\n\t\t\t\t\tif (this.#envFiles.has(string.toUnixSlash(file))) return false;\n\t\t\t\t\treturn !this.#fileSystem.shouldWatchFile(file);\n\t\t\t\t}\n\t\t\t\treturn !this.#fileSystem.shouldWatchDirectory(file);\n\t\t\t}\n\t\t});\n\t\twatcher.on(\"error\", (error) => {\n\t\t\tthis.ui.logger.warning(\"file system watcher failure\");\n\t\t\tthis.ui.logger.fatal(error);\n\t\t\tthis.#onError?.(error);\n\t\t\tthis.#watcher?.close();\n\t\t});\n\t\twatcher.on(\"ready\", () => {\n\t\t\tthis.ui.logger.info(\"watching file system for changes...\");\n\t\t});\n\t\treturn watcher;\n\t}\n\t/**\n\t* Handles file change events in HMR mode by forwarding to hot-hook\n\t* or restarting the server if dead.\n\t*/\n\t#handleHmrWatcherEvent(options) {\n\t\tconst relativePath = string.toUnixSlash(options.filePath);\n\t\tconst absolutePath = join(this.cwdPath, relativePath);\n\t\tif (this.#isHttpServerAlive === false) {\n\t\t\tthis.#clearScreen();\n\t\t\tthis.ui.logger.log(`${this.ui.colors.green(options.displayLabel)} ${relativePath}`);\n\t\t\tthis.#restartHTTPServer();\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t* Environment files are outside of hot-hook's imports tree and always\n\t\t* require a full server restart.\n\t\t*/\n\t\tif (this.#envFiles.has(absolutePath)) {\n\t\t\tif (options.action === \"add\") this.#hooks.runner(\"fileAdded\").run(relativePath, absolutePath, this);\n\t\t\telse if (options.action === \"change\") this.#hooks.runner(\"fileChanged\").run(relativePath, absolutePath, DevServer.#WATCHER_INFO, this);\n\t\t\telse this.#hooks.runner(\"fileRemoved\").run(relativePath, absolutePath, this);\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t* For add/unlink, we call the hooks directly since hot-hook ignores files\n\t\t* not in its dependency tree. This ensures index files are regenerated\n\t\t* for new/removed files.\n\t\t*/\n\t\tif (options.action === \"add\") this.#hooks.runner(\"fileAdded\").run(relativePath, absolutePath, this);\n\t\telse if (options.action === \"unlink\") this.#hooks.runner(\"fileRemoved\").run(relativePath, absolutePath, this);\n\t\t/**\n\t\t* Forward all events to hot-hook so it can:\n\t\t* - Update its dependency tree (for unlink)\n\t\t* - Handle HMR for change events on imported files\n\t\t* - Then we wait for hot-hook to notify us back via IPC message\n\t\t*/\n\t\tthis.#httpServer?.send({\n\t\t\ttype: \"hot-hook:file-changed\",\n\t\t\tpath: absolutePath,\n\t\t\taction: options.action\n\t\t});\n\t}\n\t/**\n\t* Handles file change events and triggers appropriate server actions\n\t*\n\t* Processes file change notifications and determines whether to restart\n\t* the server, hot reload, or ignore the change based on file type and mode.\n\t*\n\t* @param relativePath - Relative path to the changed file\n\t* @param absolutePath - Absolute path to the changed file\n\t* @param action - Type of file change (add, update, delete)\n\t* @param info - Optional information about the change source and reload behavior\n\t*/\n\t#handleFileChange(relativePath, absolutePath, action, info) {\n\t\t/**\n\t\t* Ignore add and delete events in HMR mode and let hot-hook find the\n\t\t* file via import first.\n\t\t*\n\t\t* Remember, hot-hook does not send the action as \"add\" or \"delete\" if this\n\t\t* file is being imported.\n\t\t*/\n\t\tif ((action === \"add\" || action === \"delete\") && this.mode === \"hmr\" && !this.#envFiles.has(absolutePath)) {\n\t\t\tdebug_default(\"ignoring add and delete actions in HMR mode %s\", relativePath);\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t* Notify about the invalidated file\n\t\t*/\n\t\tif (info && info.source === \"hot-hook\" && info.hotReloaded) {\n\t\t\tdebug_default(\"hot reloading %s, info %O\", relativePath, info);\n\t\t\tthis.ui.logger.log(`${this.ui.colors.green(\"invalidated\")} ${relativePath}`);\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t* Do not do anything when fullReload is not enabled.\n\t\t*/\n\t\tif (info && !info.fullReload) {\n\t\t\tdebug_default(\"ignoring full reload\", relativePath, info);\n\t\t\treturn;\n\t\t}\n\t\tif (this.#envFiles.has(absolutePath)) {\n\t\t\tthis.#clearScreen();\n\t\t\tthis.ui.logger.log(`${this.ui.colors.green(action)} ${relativePath}`);\n\t\t\tthis.#restartHTTPServer();\n\t\t\treturn;\n\t\t}\n\t\tconst file = this.#fileSystem.inspect(absolutePath, relativePath);\n\t\tif (!file) return;\n\t\tif (file.reloadServer) {\n\t\t\tthis.#clearScreen();\n\t\t\tthis.ui.logger.log(`${this.ui.colors.green(action)} ${relativePath}`);\n\t\t\tthis.#restartHTTPServer();\n\t\t\treturn;\n\t\t}\n\t\tthis.ui.logger.log(`${this.ui.colors.green(action)} ${relativePath}`);\n\t}\n\t/**\n\t* Regenerates index files when a file is added or removed\n\t*\n\t* Updates the index generator to reflect file system changes by adding\n\t* or removing files from the generated index files.\n\t*\n\t* @param filePath - Absolute path to the file that changed\n\t* @param action - Whether the file was added or deleted\n\t*/\n\t#regenerateIndex(filePath, action) {\n\t\tif (action === \"add\") return this.#indexGenerator.addFile(filePath);\n\t\treturn this.#indexGenerator.removeFile(filePath);\n\t}\n\t/**\n\t* Re-scans routes when a file is modified during hot reloading\n\t*\n\t* Invalidates the routes cache for the given file and triggers route\n\t* scanning hooks if the invalidation was successful.\n\t*\n\t* @param filePath - Absolute path to the file that was modified\n\t*\n\t* @example\n\t* await devServer.#reScanRoutes('/path/to/routes.ts')\n\t*/\n\tasync #reScanRoutes(filePath) {\n\t\tif (!this.#routesScanner) return;\n\t\ttry {\n\t\t\tif (await this.#routesScanner.invalidate(filePath)) await this.#hooks.runner(\"routesScanned\").run(this, this.#routesScanner);\n\t\t} catch (error) {\n\t\t\tthis.ui.logger.error(\"Unable to rescan routes because of the following error\");\n\t\t\tthis.ui.logger.fatal(error);\n\t\t}\n\t}\n\t/**\n\t* Processes routes received from the AdonisJS server\n\t*\n\t* Executes routesCommitted hooks and optionally scans routes if scanning\n\t* hooks are registered. Creates a routes scanner instance if needed and\n\t* processes routes for each domain.\n\t*\n\t* @param routesList - Routes organized by domain\n\t*\n\t* @example\n\t* await devServer.#processRoutes({\n\t*   'example.com': [\n\t*     { pattern: '/', handler: 'HomeController.index' }\n\t*   ]\n\t* })\n\t*/\n\t#processRoutes = throttle(async (routesFileLocation) => {\n\t\ttry {\n\t\t\t/**\n\t\t\t* Remove the routes file and return early when there are no\n\t\t\t* hooks listening for routes related events\n\t\t\t*/\n\t\t\tif (!hasRoutesHooks(this.#hooks)) {\n\t\t\t\tunlink(routesFileLocation).catch(() => {});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t/**\n\t\t\t* Read routes JSON, parse it and remove the file\n\t\t\t*/\n\t\t\tconst routesJSON = await readFile(routesFileLocation, \"utf-8\");\n\t\t\tconst routesList = JSON.parse(routesJSON);\n\t\t\tunlink(routesFileLocation).catch(() => {});\n\t\t\t/**\n\t\t\t* Share the routes with the hooks and scan them. The sequence is shared\n\t\t\t* with the codegen, hence it lives inside a util\n\t\t\t*/\n\t\t\tthis.#routesScanner = await processRoutes(this.#hooks, this, this.cwdPath, routesList);\n\t\t} catch (error) {\n\t\t\tthis.ui.logger.error(\"Unable to process and scan routes because of the following error\");\n\t\t\tthis.ui.logger.fatal(error);\n\t\t}\n\t}, \"processRoutes\");\n\t/**\n\t* Registers hooks for file system events and server restart triggers\n\t*\n\t* Sets up event handlers that respond to file additions, changes, and removals\n\t* by regenerating indexes and handling server restarts as needed.\n\t*/\n\t#registerServerRestartHooks() {\n\t\tthis.#hooks.add(\"fileAdded\", async (relativePath, absolutePath) => {\n\t\t\tawait this.#regenerateIndex(absolutePath, \"add\");\n\t\t\tthis.#handleFileChange(relativePath, absolutePath, \"add\");\n\t\t});\n\t\tthis.#hooks.add(\"fileChanged\", (relativePath, absolutePath, info) => {\n\t\t\t/**\n\t\t\t* Rescan routes when the file is hot-reloaded or when the file is\n\t\t\t* not part of the imports tree, but meant to be hot-reloaded\n\t\t\t*/\n\t\t\tif (info.hotReloaded || !info.hotReloaded && !info.fullReload) this.#reScanRoutes(absolutePath);\n\t\t\tthis.#handleFileChange(relativePath, absolutePath, \"update\", info);\n\t\t});\n\t\tthis.#hooks.add(\"fileRemoved\", async (relativePath, absolutePath) => {\n\t\t\tawait this.#regenerateIndex(absolutePath, \"delete\");\n\t\t\tthis.#handleFileChange(relativePath, absolutePath, \"delete\");\n\t\t});\n\t}\n\t/**\n\t* Initializes the development server state and executes init hooks\n\t*\n\t* Parses TypeScript configuration, sets up file system, loads hooks,\n\t* initializes the index generator, and prepares the server for the\n\t* specified mode (HMR, watch, or static).\n\t*\n\t* @param ts - TypeScript module reference\n\t* @param mode - Server mode (hmr, watch, or static)\n\t* @returns True if initialization succeeds, false if tsconfig parsing fails\n\t*\n\t* @example\n\t* const success = await devServer.#init(ts, 'hmr')\n\t* if (!success) {\n\t*   console.error('Failed to initialize dev server')\n\t* }\n\t*/\n\tasync #init(mode) {\n\t\tconst tsConfig = readTsConfig(this.cwdPath);\n\t\tif (!tsConfig) {\n\t\t\tthis.#onError?.(new RuntimeException(\"Unable to parse tsconfig file\"));\n\t\t\treturn false;\n\t\t}\n\t\tthis.#mode = mode;\n\t\tthis.#clearScreen();\n\t\tthis.ui.logger.info(`starting server in ${this.#mode} mode...`);\n\t\tthis.#indexGenerator = new IndexGenerator(this.cwdPath, this.ui.logger);\n\t\tthis.#stickyPort = String(await getPort(this.cwd));\n\t\tthis.#stickyHmrPort = String(await getRandomPort({ port: 24678 }));\n\t\tthis.#envFiles = new Set(new EnvLoader(this.cwd).getPaths().map((filePath) => string.toUnixSlash(filePath)));\n\t\tthis.#fileSystem = new FileSystem(this.cwdPath, tsConfig, this.options);\n\t\tthis.ui.logger.info(\"loading hooks...\");\n\t\tthis.#hooks = await loadHooks(this.options.hooks, [\n\t\t\t\"init\",\n\t\t\t\"routesCommitted\",\n\t\t\t\"routesScanning\",\n\t\t\t\"routesScanned\",\n\t\t\t\"devServerStarting\",\n\t\t\t\"devServerStarted\",\n\t\t\t\"fileAdded\",\n\t\t\t\"fileChanged\",\n\t\t\t\"fileRemoved\"\n\t\t]);\n\t\tthis.#registerServerRestartHooks();\n\t\tthis.#setupKeyboardShortcuts();\n\t\t/**\n\t\t* Run init hooks and clear them as they won't be executed\n\t\t* ever again\n\t\t*/\n\t\tawait this.#hooks.runner(\"init\").run(this, this.#hooks, this.#indexGenerator);\n\t\tthis.#hooks.clear(\"init\");\n\t\tthis.ui.logger.info(\"generating indexes...\");\n\t\tawait this.#indexGenerator.generate();\n\t\treturn true;\n\t}\n\t/**\n\t* Starts the HTTP server as a child process\n\t*\n\t* Creates a new Node.js child process to run the server script with the\n\t* specified port and configuration. Sets up message handlers for server\n\t* ready notifications, routes sharing, and hot-hook events. Executes\n\t* devServerStarting hooks before spawning the process.\n\t*\n\t* @param port - Port number for the server to listen on\n\t*\n\t* @example\n\t* await devServer.#startHTTPServer('3333')\n\t*/\n\tasync #startHTTPServer(port, hmrPort) {\n\t\t/**\n\t\t* Execute the registered before creating the child process. This will allow\n\t\t* hooks to modify the options before they are used.\n\t\t*/\n\t\tawait this.#hooks.runner(\"devServerStarting\").run(this);\n\t\tdebug_default(\"starting http server using \\\"%s\\\" file, options %O\", this.scriptFile, this.options);\n\t\treturn new Promise((resolve) => {\n\t\t\t/**\n\t\t\t* Creating child process\n\t\t\t*/\n\t\t\tthis.#httpServer = runNode(this.cwd, {\n\t\t\t\tscript: this.scriptFile,\n\t\t\t\tenv: {\n\t\t\t\t\tPORT: port,\n\t\t\t\t\tVITE_HMR_PORT: hmrPort,\n\t\t\t\t\tDEV_MODE: \"true\",\n\t\t\t\t\t...this.options.env\n\t\t\t\t},\n\t\t\t\tnodeArgs: this.options.nodeArgs,\n\t\t\t\treject: true,\n\t\t\t\tscriptArgs: this.options.scriptArgs\n\t\t\t});\n\t\t\tthis.#isHttpServerAlive = true;\n\t\t\tthis.#httpServer.on(\"message\", async (message) => {\n\t\t\t\tif (this.#isAdonisJSReadyMessage(message)) {\n\t\t\t\t\tdebug_default(\"received http server ready message %O\", message);\n\t\t\t\t\tawait this.#postServerReady(message);\n\t\t\t\t\tresolve();\n\t\t\t\t} else if (this.#isAdonisJSRoutesMessage(message)) {\n\t\t\t\t\tdebug_default(\"received routes location from the server %O\", message);\n\t\t\t\t\tawait this.#processRoutes(message.routesFileLocation);\n\t\t\t\t} else if (this.#mode === \"hmr\" && this.#isHotHookMessage(message)) {\n\t\t\t\t\tdebug_default(\"received hot-hook message %O\", message);\n\t\t\t\t\tif (message.type === \"hot-hook:full-reload\") {\n\t\t\t\t\t\tconst absolutePath = message.path ? string.toUnixSlash(message.path) : \"\";\n\t\t\t\t\t\tconst relativePath = relative(this.cwdPath, absolutePath);\n\t\t\t\t\t\tthis.#hooks.runner(\"fileChanged\").run(relativePath, absolutePath, DevServer.#HOT_HOOK_FULL_RELOAD_INFO, this);\n\t\t\t\t\t} else if (message.type === \"hot-hook:invalidated\") {\n\t\t\t\t\t\tconst absolutePath = message.paths[0] ? string.toUnixSlash(message.paths[0]) : \"\";\n\t\t\t\t\t\tconst relativePath = relative(this.cwdPath, absolutePath);\n\t\t\t\t\t\tthis.#hooks.runner(\"fileChanged\").run(relativePath, absolutePath, DevServer.#HOT_HOOK_INVALIDATED_INFO, this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.#httpServer.then((result) => {\n\t\t\t\tthis.#isHttpServerAlive = false;\n\t\t\t\tif (!this.#watcher) this.#onClose?.(result.exitCode);\n\t\t\t\telse this.ui.logger.info(\"Underlying HTTP server closed. Still watching for changes\");\n\t\t\t}).catch((error) => {\n\t\t\t\tthis.#isHttpServerAlive = false;\n\t\t\t\tif (!this.#watcher) this.#onError?.(error);\n\t\t\t\telse this.ui.logger.info(\"Underlying HTTP server died. Still watching for changes\");\n\t\t\t}).finally(() => {\n\t\t\t\tresolve();\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Adds listener to get notified when dev server is closed\n\t*\n\t* Registers a callback function that will be invoked when the development\n\t* server's child process exits. The callback receives the exit code.\n\t*\n\t* @param callback - Function to call when dev server closes\n\t* @returns This DevServer instance for method chaining\n\t*\n\t* @example\n\t* devServer.onClose((exitCode) => {\n\t*   console.log(`Server closed with exit code: ${exitCode}`)\n\t* })\n\t*/\n\tonClose(callback) {\n\t\tthis.#onClose = callback;\n\t\treturn this;\n\t}\n\t/**\n\t* Adds listener to get notified when dev server encounters an error\n\t*\n\t* Registers a callback function that will be invoked when the development\n\t* server's child process encounters an error or fails to start.\n\t*\n\t* @param callback - Function to call when dev server encounters an error\n\t* @returns This DevServer instance for method chaining\n\t*\n\t* @example\n\t* devServer.onError((error) => {\n\t*   console.error('Dev server error:', error.message)\n\t* })\n\t*/\n\tonError(callback) {\n\t\tthis.#onError = callback;\n\t\treturn this;\n\t}\n\t/**\n\t* Closes watchers and terminates the running child process\n\t*\n\t* Cleans up keyboard shortcuts, stops file system watchers, and kills\n\t* the HTTP server child process. This should be called when shutting down\n\t* the development server.\n\t*\n\t* @example\n\t* await devServer.close()\n\t*/\n\tasync close() {\n\t\tthis.#cleanupKeyboardShortcuts();\n\t\tawait this.#watcher?.close();\n\t\tif (this.#httpServer) {\n\t\t\tthis.#httpServer.removeAllListeners();\n\t\t\tthis.#httpServer.kill(\"SIGKILL\");\n\t\t}\n\t}\n\t/**\n\t* Starts the development server in static or HMR mode\n\t*\n\t* Initializes the server and starts the HTTP server. The mode is determined\n\t* by the `hmr` option in DevServerOptions. In HMR mode, hot-hook is configured\n\t* to enable hot module reloading.\n\t*\n\t* @param ts - TypeScript module reference\n\t*\n\t* @example\n\t* const devServer = new DevServer(cwd, { hmr: true, hooks: [] })\n\t* await devServer.start(ts)\n\t*/\n\tasync start() {\n\t\tif (!await this.#init(this.options.hmr ? \"hmr\" : \"static\")) return;\n\t\tif (this.#mode === \"hmr\") {\n\t\t\tthis.options.nodeArgs.push(\"--import=hot-hook/register\");\n\t\t\tthis.options.env = {\n\t\t\t\t...this.options.env,\n\t\t\t\tHOT_HOOK_WATCH: \"false\"\n\t\t\t};\n\t\t}\n\t\tthis.ui.logger.info(\"starting HTTP server...\");\n\t\tawait this.#startHTTPServer(this.#stickyPort, this.#stickyHmrPort);\n\t\tif (this.#mode !== \"hmr\") return;\n\t\tthis.#watcher = this.#createWatcher();\n\t\tthis.#watcher.on(\"add\", (filePath) => {\n\t\t\tthis.#handleHmrWatcherEvent({\n\t\t\t\tfilePath,\n\t\t\t\taction: \"add\",\n\t\t\t\tdisplayLabel: \"add\"\n\t\t\t});\n\t\t});\n\t\tthis.#watcher.on(\"change\", (filePath) => {\n\t\t\tthis.#handleHmrWatcherEvent({\n\t\t\t\tfilePath,\n\t\t\t\taction: \"change\",\n\t\t\t\tdisplayLabel: \"update\"\n\t\t\t});\n\t\t});\n\t\tthis.#watcher.on(\"unlink\", (filePath) => {\n\t\t\tthis.#handleHmrWatcherEvent({\n\t\t\t\tfilePath,\n\t\t\t\taction: \"unlink\",\n\t\t\t\tdisplayLabel: \"delete\"\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Starts the development server in watch mode and restarts on file changes\n\t*\n\t* Initializes the server, starts the HTTP server, and sets up a file system\n\t* watcher that monitors for changes. When files are added, modified, or deleted,\n\t* the server automatically restarts. The watcher respects TypeScript project\n\t* configuration and metaFiles settings.\n\t*\n\t* @param ts - TypeScript module reference\n\t* @param options - Watch options including polling mode\n\t*\n\t* @example\n\t* const devServer = new DevServer(cwd, { hooks: [] })\n\t* await devServer.startAndWatch(ts, { poll: false })\n\t*/\n\tasync startAndWatch(options) {\n\t\tif (!await this.#init(\"watch\")) return;\n\t\tthis.ui.logger.info(\"starting HTTP server...\");\n\t\tawait this.#startHTTPServer(this.#stickyPort, this.#stickyHmrPort);\n\t\tthis.#watcher = this.#createWatcher({ poll: options?.poll });\n\t\tthis.#watcher.on(\"add\", (filePath) => {\n\t\t\tconst relativePath = string.toUnixSlash(filePath);\n\t\t\tconst absolutePath = join(this.cwdPath, relativePath);\n\t\t\tthis.#hooks.runner(\"fileAdded\").run(relativePath, absolutePath, this);\n\t\t});\n\t\tthis.#watcher.on(\"change\", (filePath) => {\n\t\t\tconst relativePath = string.toUnixSlash(filePath);\n\t\t\tconst absolutePath = join(this.cwdPath, relativePath);\n\t\t\tthis.#hooks.runner(\"fileChanged\").run(relativePath, absolutePath, DevServer.#WATCHER_INFO, this);\n\t\t});\n\t\tthis.#watcher.on(\"unlink\", (filePath) => {\n\t\t\tconst relativePath = string.toUnixSlash(filePath);\n\t\t\tconst absolutePath = join(this.cwdPath, relativePath);\n\t\t\tthis.#hooks.runner(\"fileRemoved\").run(relativePath, absolutePath, this);\n\t\t});\n\t}\n};\n//#endregion\n//#region src/test_runner.ts\n/**\n* Exposes the API to run Japa tests and optionally watch for file\n* changes to re-run the tests.\n*\n* The TestRunner provides intelligent test execution with watch mode capabilities.\n* When files change, it can selectively run specific tests or the entire suite\n* based on what changed.\n*\n* The watch mode functions as follows:\n*  - If the changed file is a test file, then only tests for that file\n*    will be re-run.\n*  - Otherwise, all tests will re-run with respect to the initial\n*    filters applied when running the `node ace test` command.\n*\n* @example\n* const testRunner = new TestRunner(cwd, { suites: [], hooks: [] })\n* await testRunner.run()\n*\n* @example\n* // Run tests in watch mode\n* const testRunner = new TestRunner(cwd, { suites: [], hooks: [] })\n* await testRunner.runAndWatch(ts, { poll: false })\n*/\nvar TestRunner = class {\n\t/**\n\t* External listeners that are invoked when child process\n\t* gets an error or closes\n\t*/\n\t#onError;\n\t#onClose;\n\t/**\n\t* The stickyPort is set by the startAndWatch method and we will\n\t* continue to use this port during re-runs\n\t*/\n\t#stickyPort;\n\t/**\n\t* The stickyHmrPort is set by the start and the startAndWatch methods\n\t* and we will continue to use that port during restart\n\t*/\n\t#stickyHmrPort;\n\t/**\n\t* Reference to chokidar watcher\n\t*/\n\t#watcher;\n\t/**\n\t* Reference to the test script child process\n\t*/\n\t#testsProcess;\n\t/**\n\t* Filesystem is used to decide which files to watch or entertain in watch\n\t* mode\n\t*/\n\t#fileSystem;\n\t/**\n\t* Hooks to execute custom actions during the tests runner lifecycle\n\t*/\n\t#hooks;\n\t/**\n\t* Index generator for managing auto-generated index files\n\t*/\n\t#indexGenerator;\n\t/**\n\t* CLI UI instance for displaying colorful messages and progress information\n\t*/\n\tui = cliui();\n\t/**\n\t* Re-runs the test child process and throttle concurrent calls to\n\t* ensure we do not end up with a long loop of restarts\n\t*/\n\t#reRunTests = throttle(async (filters) => {\n\t\tif (this.#testsProcess) {\n\t\t\tthis.#testsProcess.removeAllListeners();\n\t\t\tthis.#testsProcess.kill(\"SIGKILL\");\n\t\t}\n\t\tawait this.#runTests(this.#stickyPort, this.#stickyHmrPort, filters);\n\t}, \"reRunTests\");\n\t/**\n\t* The script file to run as a child process\n\t*/\n\tscriptFile = \"bin/test.ts\";\n\t/**\n\t* The current working directory URL\n\t*/\n\tcwd;\n\t/**\n\t* The current working directory path as a string\n\t*/\n\tcwdPath;\n\t/**\n\t* Test runner configuration options including filters, reporters, and hooks\n\t*/\n\toptions;\n\t/**\n\t* Create a new TestRunner instance\n\t*\n\t* @param cwd - The current working directory URL\n\t* @param options - Test runner configuration options\n\t*/\n\tconstructor(cwd, options) {\n\t\tthis.cwd = cwd;\n\t\tthis.options = options;\n\t\tthis.cwdPath = string.toUnixSlash(fileURLToPath(this.cwd));\n\t}\n\t/**\n\t* Convert test runner options to the CLI args\n\t*\n\t* Transforms the test runner configuration options into command-line\n\t* arguments that can be passed to the test script.\n\t*\n\t* @returns Array of command-line arguments\n\t*/\n\t#convertOptionsToArgs() {\n\t\tconst args = [];\n\t\tif (this.options.reporters) {\n\t\t\targs.push(\"--reporters\");\n\t\t\targs.push(this.options.reporters.join(\",\"));\n\t\t}\n\t\tif (this.options.timeout !== void 0) {\n\t\t\targs.push(\"--timeout\");\n\t\t\targs.push(String(this.options.timeout));\n\t\t}\n\t\tif (this.options.failed) args.push(\"--failed\");\n\t\tif (this.options.retries !== void 0) {\n\t\t\targs.push(\"--retries\");\n\t\t\targs.push(String(this.options.retries));\n\t\t}\n\t\treturn args;\n\t}\n\t/**\n\t* Converts all known filters to CLI args\n\t*\n\t* Transforms test filters (suites, files, groups, tags, tests) into\n\t* command-line arguments for the test script.\n\t*\n\t* @param filters - The test filters to convert\n\t* @returns Array of command-line arguments representing the filters\n\t*/\n\t#convertFiltersToArgs(filters) {\n\t\tconst args = [];\n\t\tif (filters.suites) args.push(...filters.suites);\n\t\tif (filters.files) {\n\t\t\targs.push(\"--files\");\n\t\t\targs.push(filters.files.join(\",\"));\n\t\t}\n\t\tif (filters.groups) {\n\t\t\targs.push(\"--groups\");\n\t\t\targs.push(filters.groups.join(\",\"));\n\t\t}\n\t\tif (filters.tags) {\n\t\t\targs.push(\"--tags\");\n\t\t\targs.push(filters.tags.join(\",\"));\n\t\t}\n\t\tif (filters.tests) {\n\t\t\targs.push(\"--tests\");\n\t\t\targs.push(filters.tests.join(\",\"));\n\t\t}\n\t\treturn args;\n\t}\n\t/**\n\t* Conditionally clear the terminal screen\n\t*\n\t* Clears the terminal screen if the clearScreen option is enabled\n\t* in the test runner configuration.\n\t*/\n\t#clearScreen() {\n\t\tif (this.options.clearScreen) process.stdout.write(\"\\x1Bc\");\n\t}\n\t/**\n\t* Runs tests as a child process\n\t*\n\t* Creates a Node.js child process to execute the test script with\n\t* appropriate command-line arguments and environment variables.\n\t* Handles process lifecycle and hook execution.\n\t*\n\t* @param port - The port number to set in the environment\n\t* @param filters - Optional test filters to apply for this run\n\t*/\n\tasync #runTests(port, hmrPort, filters) {\n\t\t/**\n\t\t* Execute the registered before creating the child process. This will allow\n\t\t* hooks to modify the options before they are used.\n\t\t*/\n\t\tawait this.#hooks.runner(\"testsStarting\").run(this);\n\t\tdebug_default(\"running tests using \\\"%s\\\" file, options %O\", this.scriptFile, this.options);\n\t\treturn new Promise(async (resolve) => {\n\t\t\t/**\n\t\t\t* If inline filters are defined, then we ignore the\n\t\t\t* initial filters\n\t\t\t*/\n\t\t\tconst mergedFilters = {\n\t\t\t\t...this.options.filters,\n\t\t\t\t...filters\n\t\t\t};\n\t\t\tconst scriptArgs = [\n\t\t\t\t...this.#convertOptionsToArgs(),\n\t\t\t\t...this.options.scriptArgs,\n\t\t\t\t...this.#convertFiltersToArgs(mergedFilters)\n\t\t\t];\n\t\t\tthis.#testsProcess = runNode(this.cwd, {\n\t\t\t\tscript: this.scriptFile,\n\t\t\t\treject: true,\n\t\t\t\tenv: {\n\t\t\t\t\tPORT: port,\n\t\t\t\t\tVITE_HMR_PORT: hmrPort,\n\t\t\t\t\t...this.options.env\n\t\t\t\t},\n\t\t\t\tnodeArgs: this.options.nodeArgs,\n\t\t\t\tscriptArgs\n\t\t\t});\n\t\t\tthis.#testsProcess.then((result) => {\n\t\t\t\tthis.#hooks.runner(\"testsFinished\").run(this).catch((error) => {\n\t\t\t\t\tthis.ui.logger.error(\"One of the \\\"testsFinished\\\" hooks failed\");\n\t\t\t\t\tthis.ui.logger.fatal(error);\n\t\t\t\t}).finally(() => {\n\t\t\t\t\tif (!this.#watcher) {\n\t\t\t\t\t\tthis.#onClose?.(result.exitCode);\n\t\t\t\t\t\tthis.close();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}).catch((error) => {\n\t\t\t\tif (!this.#watcher) {\n\t\t\t\t\tthis.#onError?.(error);\n\t\t\t\t\tthis.close();\n\t\t\t\t} else this.ui.logger.info(\"Underlying HTTP server died. Still watching for changes\");\n\t\t\t}).finally(() => resolve());\n\t\t});\n\t}\n\t/**\n\t* Handles file change event during watch mode\n\t*\n\t* Determines whether to run specific tests or all tests based on\n\t* the type of file that changed. Test files trigger selective runs,\n\t* while other files trigger full test suite runs.\n\t*\n\t* @param filePath - The path of the changed file\n\t* @param action - The type of change (add, update, delete)\n\t*/\n\t#handleFileChange(relativePath, absolutePath, action) {\n\t\tconst file = this.#fileSystem.inspect(absolutePath, relativePath);\n\t\tif (!file) return;\n\t\tthis.#clearScreen();\n\t\tthis.ui.logger.log(`${this.ui.colors.green(action)} ${relativePath}`);\n\t\tif (file.fileType === \"test\") this.#reRunTests({ files: [relativePath] });\n\t\telse this.#reRunTests();\n\t}\n\t/**\n\t* Re-generates the index when a file is changed, but only in HMR\n\t* mode\n\t*/\n\t#regenerateIndex(filePath, action) {\n\t\tif (action === \"add\") return this.#indexGenerator.addFile(filePath);\n\t\treturn this.#indexGenerator.removeFile(filePath);\n\t}\n\t/**\n\t* Registers inline hooks for file changes and test re-runs\n\t*\n\t* Sets up event handlers that respond to file system changes by\n\t* triggering appropriate test runs based on the changed files.\n\t*/\n\t#registerServerRestartHooks() {\n\t\tthis.#hooks.add(\"fileAdded\", async (relativePath, absolutePath) => {\n\t\t\tawait this.#regenerateIndex(absolutePath, \"add\");\n\t\t\tthis.#handleFileChange(relativePath, absolutePath, \"add\");\n\t\t});\n\t\tthis.#hooks.add(\"fileChanged\", async (relativePath, absolutePath) => {\n\t\t\tawait this.#regenerateIndex(absolutePath, \"add\");\n\t\t\tthis.#handleFileChange(relativePath, absolutePath, \"update\");\n\t\t});\n\t\tthis.#hooks.add(\"fileRemoved\", async (relativePath, absolutePath) => {\n\t\t\tawait this.#regenerateIndex(absolutePath, \"delete\");\n\t\t\tthis.#handleFileChange(relativePath, absolutePath, \"delete\");\n\t\t});\n\t}\n\t/**\n\t* Add listener to get notified when test runner is closed\n\t*\n\t* @param callback - Function to call when test runner closes\n\t* @returns This TestRunner instance for method chaining\n\t*/\n\tonClose(callback) {\n\t\tthis.#onClose = callback;\n\t\treturn this;\n\t}\n\t/**\n\t* Add listener to get notified when test runner encounters an error\n\t*\n\t* @param callback - Function to call when test runner encounters an error\n\t* @returns This TestRunner instance for method chaining\n\t*/\n\tonError(callback) {\n\t\tthis.#onError = callback;\n\t\treturn this;\n\t}\n\t/**\n\t* Close watchers and running child processes\n\t*\n\t* Cleans up file system watchers and terminates any running test\n\t* processes to ensure graceful shutdown.\n\t*/\n\tasync close() {\n\t\tawait this.#watcher?.close();\n\t\tif (this.#testsProcess) {\n\t\t\tthis.#testsProcess.removeAllListeners();\n\t\t\tthis.#testsProcess.kill(\"SIGKILL\");\n\t\t}\n\t}\n\t/**\n\t* Runs tests once without watching for file changes\n\t*\n\t* Executes the test suite a single time and exits. This is the\n\t* equivalent of running tests in CI/CD environments.\n\t*/\n\tasync run() {\n\t\tthis.#stickyPort = String(await getPort(this.cwd));\n\t\tthis.#stickyHmrPort = String(await getRandomPort({ port: 24678 }));\n\t\tthis.#indexGenerator = new IndexGenerator(this.cwdPath, this.ui.logger);\n\t\tthis.#clearScreen();\n\t\tthis.ui.logger.info(\"loading hooks...\");\n\t\tthis.#hooks = await loadHooks(this.options.hooks, [\n\t\t\t\"init\",\n\t\t\t\"testsStarting\",\n\t\t\t\"testsFinished\"\n\t\t]);\n\t\t/**\n\t\t* Run init hooks and clear them as they won't be executed\n\t\t* ever again\n\t\t*/\n\t\tawait this.#hooks.runner(\"init\").run(this, this.#hooks, this.#indexGenerator);\n\t\tthis.#hooks.clear(\"init\");\n\t\tthis.ui.logger.info(\"generating indexes...\");\n\t\tawait this.#indexGenerator.generate();\n\t\tthis.ui.logger.info(\"booting application to run tests...\");\n\t\tawait this.#runTests(this.#stickyPort, this.#stickyHmrPort);\n\t}\n\t/**\n\t* Run tests in watch mode and re-run them when files change\n\t*\n\t* Starts the test runner in watch mode, monitoring the file system\n\t* for changes and automatically re-running tests when relevant files\n\t* are modified. Uses intelligent filtering to run only affected tests\n\t* when possible.\n\t*\n\t* @param ts - TypeScript module reference for parsing configuration\n\t* @param options - Watch options including polling mode for file system monitoring\n\t*/\n\tasync runAndWatch(options) {\n\t\tconst tsConfig = readTsConfig(this.cwdPath);\n\t\tif (!tsConfig) {\n\t\t\tthis.#onError?.(new RuntimeException(\"Unable to parse tsconfig file\"));\n\t\t\treturn;\n\t\t}\n\t\tthis.#stickyPort = String(await getPort(this.cwd));\n\t\tthis.#stickyHmrPort = String(getRandomPort({ port: 24678 }));\n\t\tthis.#indexGenerator = new IndexGenerator(this.cwdPath, this.ui.logger);\n\t\tthis.#fileSystem = new FileSystem(this.cwdPath, tsConfig, {\n\t\t\t...this.options,\n\t\t\tsuites: this.options.suites?.filter((suite) => {\n\t\t\t\tif (this.options.filters.suites) return this.options.filters.suites.includes(suite.name);\n\t\t\t\treturn true;\n\t\t\t})\n\t\t});\n\t\tthis.#clearScreen();\n\t\tthis.ui.logger.info(\"loading hooks...\");\n\t\tthis.#hooks = await loadHooks(this.options.hooks, [\n\t\t\t\"init\",\n\t\t\t\"testsStarting\",\n\t\t\t\"testsFinished\",\n\t\t\t\"fileAdded\",\n\t\t\t\"fileChanged\",\n\t\t\t\"fileRemoved\"\n\t\t]);\n\t\tthis.#registerServerRestartHooks();\n\t\t/**\n\t\t* Run init hooks and clear them as they won't be executed\n\t\t* ever again\n\t\t*/\n\t\tawait this.#hooks.runner(\"init\").run(this, this.#hooks, this.#indexGenerator);\n\t\tthis.#hooks.clear(\"init\");\n\t\tthis.ui.logger.info(\"generating indexes...\");\n\t\tawait this.#indexGenerator.generate();\n\t\tthis.ui.logger.info(\"booting application to run tests...\");\n\t\tawait this.#runTests(this.#stickyPort, this.#stickyHmrPort);\n\t\t/**\n\t\t* Create watcher\n\t\t*/\n\t\tthis.#watcher = watch({\n\t\t\tusePolling: options?.poll ?? false,\n\t\t\tcwd: this.cwdPath,\n\t\t\tignoreInitial: true,\n\t\t\tignored: (file, stats) => {\n\t\t\t\tif (!stats) return false;\n\t\t\t\tif (stats.isFile()) return !this.#fileSystem.shouldWatchFile(file);\n\t\t\t\treturn !this.#fileSystem.shouldWatchDirectory(file);\n\t\t\t}\n\t\t});\n\t\t/**\n\t\t* Notify the watcher is ready\n\t\t*/\n\t\tthis.#watcher.on(\"ready\", () => {\n\t\t\tthis.ui.logger.info(\"watching file system for changes...\");\n\t\t});\n\t\t/**\n\t\t* Cleanup when watcher dies\n\t\t*/\n\t\tthis.#watcher.on(\"error\", (error) => {\n\t\t\tthis.ui.logger.warning(\"file system watcher failure\");\n\t\t\tthis.ui.logger.fatal(error);\n\t\t\tthis.#onError?.(error);\n\t\t\tthis.#watcher?.close();\n\t\t});\n\t\tthis.#watcher.on(\"add\", (filePath) => {\n\t\t\tconst relativePath = string.toUnixSlash(filePath);\n\t\t\tconst absolutePath = join(this.cwdPath, filePath);\n\t\t\tthis.#hooks.runner(\"fileAdded\").run(relativePath, absolutePath, this);\n\t\t});\n\t\tthis.#watcher.on(\"change\", (filePath) => {\n\t\t\tconst relativePath = string.toUnixSlash(filePath);\n\t\t\tconst absolutePath = join(this.cwdPath, filePath);\n\t\t\tthis.#hooks.runner(\"fileChanged\").run(relativePath, absolutePath, {\n\t\t\t\tsource: \"watcher\",\n\t\t\t\tfullReload: true,\n\t\t\t\thotReloaded: false\n\t\t\t}, this);\n\t\t});\n\t\tthis.#watcher.on(\"unlink\", (filePath) => {\n\t\t\tconst relativePath = string.toUnixSlash(filePath);\n\t\t\tconst absolutePath = join(this.cwdPath, filePath);\n\t\t\tthis.#hooks.runner(\"fileRemoved\").run(relativePath, absolutePath, this);\n\t\t});\n\t}\n};\n//#endregion\nexport { Bundler, CodeGen, CodemodException, DevServer, FileBuffer, SUPPORTED_PACKAGE_MANAGERS, TestRunner, VirtualFileSystem };\n"]}