{"version":3,"file":"routeFileWatch.js","names":[],"sources":["esm/utils/routeFileWatch.js"],"sourcesContent":["import path from \"node:path\";\nconst routeFileExtensionRe = /\\.[jt]sx?$/;\nfunction isRouteFilePath(filePath) {\n  return routeFileExtensionRe.test(filePath) && !filePath.endsWith(\".d.ts\");\n}\nfunction isPathInsideDirectory(filePath, directory) {\n  const relativePath = path.relative(path.resolve(directory), path.resolve(filePath));\n  return relativePath !== \"\" && !relativePath.startsWith(\"..\") && !path.isAbsolute(relativePath);\n}\nfunction isRouteFileWatchEvent({\n  event,\n  filePath,\n  routerRoot,\n  includeChangeEvents = false\n}) {\n  const isRouteFileEvent = event === \"add\" || event === \"delete\" || event === \"unlink\" || includeChangeEvents && event === \"change\";\n  return isRouteFileEvent && isPathInsideDirectory(filePath, routerRoot) && isRouteFilePath(filePath);\n}\nexport {\n  isPathInsideDirectory,\n  isRouteFilePath,\n  isRouteFileWatchEvent\n};\n//# sourceMappingURL=routeFileWatch.js.map\n"],"mappings":";;;AACA,MAAM,uBAAuB;AAC7B,SAAS,gBAAgB,UAAU;CACjC,OAAO,qBAAqB,KAAK,QAAQ,KAAK,CAAC,SAAS,SAAS,OAAO;AAC1E;AACA,SAAS,sBAAsB,UAAU,WAAW;CAClD,MAAM,eAAe,KAAK,SAAS,KAAK,QAAQ,SAAS,GAAG,KAAK,QAAQ,QAAQ,CAAC;CAClF,OAAO,iBAAiB,MAAM,CAAC,aAAa,WAAW,IAAI,KAAK,CAAC,KAAK,WAAW,YAAY;AAC/F;AACA,SAAS,sBAAsB,EAC7B,OACA,UACA,YACA,sBAAsB,SACrB;CACD,MAAM,mBAAmB,UAAU,SAAS,UAAU,YAAY,UAAU,YAAY,uBAAuB,UAAU;CACzH,OAAO,oBAAoB,sBAAsB,UAAU,UAAU,KAAK,gBAAgB,QAAQ;AACpG"}