{
  "version": 3,
  "sources": ["../src/loader-module.mts", "../src/loader-shared.ts"],
  "sourcesContent": ["import _path from 'node:path'\nimport _url from 'node:url'\n\nimport {\n  CJS,\n  ESM,\n  esbTranpile,\n  isDirectory,\n  isFile,\n  logMessage,\n  moduleType,\n} from './loader-shared'\n\n/* ========================================================================== *\n * ESM VERSION                                                                *\n * ========================================================================== */\n\n/** The formats that can be handled by NodeJS' loader */\ntype Format = 'builtin' | 'commonjs' | 'json' | 'module' | 'wasm'\n\n/* ========================================================================== */\n\n/** The type identifying a NodeJS' loader `resolve` hook. */\ntype ResolveHook = (\n  /** Whatever was requested to be imported (module, relative file, ...). */\n  specifier: string,\n  /** Context information around this `resolve` hook call. */\n  context: ResolveContext,\n  /** The subsequent resolve hook in the chain, or the Node.js default one. */\n  nextResolve: ResolveNext,\n) => ResolveResult | Promise<ResolveResult>\n\n/** Context information around a `resolve` hook call. */\ninterface ResolveContext {\n  importAssertions: object\n  /** Export conditions of the relevant `package.json`. */\n  conditions: string[]\n  /** The module importing this one, or undefined if this is the entry point. */\n  parentURL?: string | undefined\n}\n\n/** The subsequent resolve hook in the chain, or the Node.js default one. */\ntype ResolveNext = (specifier: string, context: ResolveContext) => ResolveResult | Promise<ResolveResult>\n\n/** A type describing the required results from a `resolve` hook */\ninterface ResolveResult {\n  /** The absolute URL to which this input resolves. */\n  url: string\n  /** A format hint to the `load` hook (it might be ignored). */\n  format?: Format | null | undefined\n  /** A signal that this hook intends to terminate the chain of resolve hooks. */\n  shortCircuit?: boolean | undefined\n}\n\n/* ========================================================================== */\n\n/** The type identifying a NodeJS' loader `load` hook. */\ntype LoadHook = (\n  /** The URL returned by the resolve chain. */\n  url: string,\n  /** Context information around this `load` hook call. */\n  context: LoadContext,\n  /** The subsequent load hook in the chain, or the Node.js default one. */\n  nextLoad: LoadNext,\n) => LoadResult | Promise<LoadResult>\n\n/** Context information around a `load` hook call. */\ninterface LoadContext {\n  importAssertions: object\n  /** Export conditions of the relevant `package.json` */\n  conditions: string[]\n  /** The format hint from the `resolve` hook. */\n  format?: ResolveResult['format']\n}\n\n/** The subsequent load hook in the chain, or the Node.js default one. */\ntype LoadNext = (url: string, context: LoadContext) => LoadResult | Promise<LoadResult>\n\n/** A type describing the required results from a `resolve` hook */\ntype LoadResult = {\n  /** The format of the code being loaded. */\n  format: Format\n  /** A signal that this hook intends to terminate the chain of load hooks. */\n  shortCircuit?: boolean | undefined\n} & ({\n  format: 'builtin' | 'commonjs'\n  /** When the source is `builtin` or `commonjs` no source must be returned */\n  source?: never | undefined\n} | {\n  format: 'json' | 'module'\n  /** When the source is `json` or `module` the source can include strings */\n  source: string | ArrayBuffer | NodeJS.TypedArray\n} | {\n  format: 'wasm'\n  /** When the source is `wasm` the source must not be a string */\n  source: ArrayBuffer | NodeJS.TypedArray\n})\n\n/* ========================================================================== */\n\nconst _type = moduleType(CJS)\n\n/**\n * Our main `resolve` hook: here we need to check for a couple of options\n * when importing \"\"\n */\nexport const resolve: ResolveHook = (specifier, context, nextResolve): ResolveResult | Promise<ResolveResult> => {\n  logMessage(ESM, `Resolving \"${specifier}\" from \"${context.parentURL}\"`)\n\n  /* We only resolve relative paths (\"./xxx\" or \"../xxx\") */\n  if (! specifier.match(/^\\.\\.?\\//)) return nextResolve(specifier, context)\n\n  /* We only resolve if we _do_ have a parent URL and it's a file */\n  const parentURL = context.parentURL\n  if (! parentURL) return nextResolve(specifier, context)\n  if (! parentURL.startsWith('file:')) return nextResolve(specifier, context)\n\n  /* We only resolve here if the importer is a \".ts\" or \".mts\" file */\n  if (! parentURL.match(/\\.m?ts$/)) return nextResolve(specifier, context)\n\n  /* The resolved URL is the specifier resolved against the parent */\n  const url = new URL(specifier, parentURL).href\n  const path = _url.fileURLToPath(url)\n\n  /*\n   * Here we are sure that:\n   *\n   * 1) we are resolving a local path (not a module)\n   * 2) the importer is a file, ending with \".ts\" or \".mts\"\n   *\n   * Now we can check if \"import 'foo'\" resolves to:\n   *\n   * 1) directly to a file, e.g. \"import './foo.js'\" or \"import './foo.mts'\"\n   * 2) import a \"pseudo-JS file\", e.g. \"import './foo.js'\" becomes \"import './foo.ts'\"\n   * 3) imports a file without extension as if it were \"import './foo.ts'\"\n   * 4) imports a directory  as in \"import './foo/index.ts'\"\n   *\n   * We resolve the _final_ specifier that will be passed to the next resolver\n   * for further potential resolution accordingly.\n   *\n   * We start with the easiest case: is this a real file on the disk?\n   */\n  if (isFile(path)) {\n    logMessage(ESM, `Positive match for \"${specifier}\" as \"${path}\" (1)`)\n    return nextResolve(specifier, context) // straight on\n  }\n\n  /*\n   * TypeScript allows us to import \"./foo.js\", and internally resolves this to\n   * \"./foo.ts\" (yeah, nice, right?) and while we normally wouldn't want to deal\n   * with this kind of stuff, the \"node16\" module resolution mode _forces_ us to\n   * use this syntax.\n   */\n  const match = specifier.match(/(.*)(\\.[mc]?js$)/)\n  if (match) {\n    const [ , base, ext ] = match\n    const tsspecifier = base + ext!.replace('js', 'ts')\n    const tsurl = new URL(tsspecifier, parentURL).href\n    const tspath = _url.fileURLToPath(tsurl)\n\n    if (isFile(tspath)) {\n      logMessage(ESM, `Positive match for \"${specifier}\" as \"${tspath}\" (2)`)\n      return nextResolve(tsspecifier, context) // straight on\n    }\n  }\n\n  /* Check if the import is actually a file with a \".ts\" extension */\n  if (isFile(`${path}.ts`)) {\n    logMessage(ESM, `Positive match for \"${specifier}.ts\" as \"${path}.ts\" (3)`)\n    return nextResolve(`${specifier}.ts`, context)\n  }\n\n  /* If the file is a directory, then see if we have an \"index.ts\" in there */\n  if (isDirectory(path)) {\n    const file = _path.resolve(path, 'index.ts') // resolve, as path is absolute\n    if (isFile(file)) {\n      logMessage(ESM, `Positive match for \"${specifier}\" as \"${file}\"  (4)`)\n      const spec = _url.pathToFileURL(file).pathname\n      return nextResolve(spec, context)\n    }\n  }\n\n  /* There's really nothing else we can do */\n  return nextResolve(specifier, context)\n}\n\n/** Our main `load` hook */\nexport const load: LoadHook = (url, context, nextLoad): LoadResult | Promise<LoadResult> => {\n  logMessage(ESM, `Attempting to load \"${url}\"`)\n\n  /* We only load from disk, so ignore everything else */\n  if (! url.startsWith('file:')) return nextLoad(url, context)\n\n  /* Figure our the extension (especially \".ts\", \".mts\" or \".cts\")... */\n  const ext = url.match(/\\.[cm]?ts$/)?.[0]\n\n  /* Quick and easy bail-outs for non-TS or \".cts\" (always `commonjs`) */\n  if (! ext) return nextLoad(url, context)\n\n  if (ext === '.cts') {\n    logMessage(ESM, `Switching type from \"module\" to \"commonjs\" for \"${url}\"`)\n    logMessage(ESM, 'Please note that named import WILL NOT WORK in this case, as Node.js performs a')\n    logMessage(ESM, 'static analisys on the CommonJS source code, and this file is transpiled from.')\n    logMessage(ESM, 'TypeScript to CommonJS dynamically.')\n    return { format: CJS, shortCircuit: true }\n  }\n\n  /* Convert the url into a file name, any error gets ignored */\n  const filename = _url.fileURLToPath(url)\n\n  /* If the file is a \".ts\", we need to figure out the default type */\n  if (ext === '.ts') {\n    if (_type === CJS) {\n      logMessage(ESM, `Switching type from \"module\" to \"commonjs\" for \"${url}\"`)\n      logMessage(ESM, 'Please note that named import WILL NOT WORK in this case, as Node.js performs a')\n      logMessage(ESM, 'static analisys on the CommonJS source code, and this file is transpiled from.')\n      logMessage(ESM, 'TypeScript to CommonJS dynamically.')\n      return { format: CJS, shortCircuit: true }\n    }\n  }\n\n  /* Transpile with ESBuild and return our source code */\n  const source = esbTranpile(filename, ESM)\n  return { source, format: ESM, shortCircuit: true }\n}\n\n/* ========================================================================== */\n\n/* Simply output the fact that we were loaded */\nlogMessage(ESM, 'TypeScript loader for ES Modules loaded')\n", "/* eslint-disable @typescript-eslint/no-unsafe-function-type */\n/* ========================================================================== *\n * HACK BEYOND REDEMPTION: TRANSPILE .ts FILES (the esm loader)               *\n * -------------------------------------------------------------------------- *\n * Use ESBuild to quickly transpile TypeScript files into JavaScript.         *\n *                                                                            *\n * The plan as it stands is as follows:                                       *\n * - `.mts` files always get transpiled to ESM modules                        *\n * - `.cts` files always get transpiled to CJS modules                        *\n * - `.ts` files are treanspiled according to what's in `package.json`        *\n *                                                                            *\n * Additionally, when transpiling to ESM modules, we can't rely on the magic  *\n * that Node's `require(...)` call uses to figure out which file to import.   *\n * We need to _actually verify_ on disk what's the correct file to import.    *\n *                                                                            *\n * This is a single module, only available as ESM, and it will _both_ behave  *\n * as a NodeJS' loader, _and_ inject the CJS extension handlers (hack) found  *\n * in the `_extensions` of `node:module` (same as `require.extensions`).      *\n * ========================================================================== */\n\n// NodeJS dependencies\nimport _fs from 'node:fs'\nimport _path from 'node:path'\nimport _util from 'node:util'\n\n// ESBuild is the only external dependency\nimport _esbuild from 'esbuild'\n\n/* ========================================================================== *\n * CONSTANTS AND TYPES                                                        *\n * ========================================================================== */\n\n/** Supported types from `package.json` */\nexport type Type = 'commonjs' | 'module'\n/** Constant identifying a `commonjs` module */\nexport const CJS = 'commonjs' as const\n/** Constant identifying an ESM `module` */\nexport const ESM = 'module' as const\n\n/* ========================================================================== *\n * DEBUGGING AND ERRORS                                                       *\n * ========================================================================== */\n\n/** Setup debugging */\nconst _debugLog = _util.debuglog('plug:ts-loader')\nconst _debug = _debugLog.enabled\n\n/** Emit some logs if `DEBUG_TS_LOADER` is set to `true` */\nexport function logMessage(mode: Type, arg: string, ...args: any []): void {\n  if (! _debug) return\n\n  const t = mode === ESM ? 'esm' : mode === CJS ? 'cjs' : '---'\n  _debugLog(`[${t}] ${arg}`, ...args)\n}\n\n/** Fail miserably */\nexport function throwError(\n    mode: Type,\n    message: string,\n    options: { start?: Function, code?: string, cause?: any } = {},\n): never {\n  const t = mode === ESM ? 'esm' : mode === CJS ? 'cjs' : '---'\n  const prefix = `[ts-loader|${t}|pid=${process.pid}]`\n\n  const { start = throwError, ...extra } = options\n  const error = new Error(`${prefix} ${message}`)\n  Error.captureStackTrace(error, start)\n  Object.assign(error, extra)\n\n  throw error\n}\n\n/* ========================================================================== *\n * MODULE TYPES AND FORCING TYPE                                              *\n * ========================================================================== */\n\n/**\n * Determine the current module type to transpile .TS files as looking at the\n * `__TS_LOADER_FORCE_TYPE` environment variable (used by PlugJS and CLI) or,\n * if unspecified, looking at the `type` field in the `package.json` file.\n */\nexport function moduleType(mode: Type): Type {\n  if (process.env.__TS_LOADER_FORCE_TYPE) {\n    const type = process.env.__TS_LOADER_FORCE_TYPE\n    if ((type === CJS) || (type === ESM)) {\n      logMessage(mode, `Forcing type to \"${type}\" from environment`)\n      return type\n    } else {\n      throwError(mode, `Invalid type \"${process.env.__TS_LOADER_FORCE_TYPE}\"`)\n    }\n  }\n\n  const _findType = (directory: string): Type => {\n    const packageFile = _path.join(directory, 'package.json')\n    try {\n      const packageData = _fs.readFileSync(packageFile, 'utf-8')\n      const packageJson = JSON.parse(packageData)\n      const packageType = packageJson.type\n      switch (packageType) {\n        case undefined:\n          logMessage(mode, `File \"${packageFile}\" does not declare a default type`)\n          return CJS\n\n        case CJS:\n        case ESM:\n          logMessage(mode, `File \"${packageFile}\" declares type as \"${CJS}\"`)\n          return packageType\n\n        default:\n          logMessage(mode, `File \"${packageFile}\" specifies unknown type \"${packageType}\"`)\n          return CJS\n      }\n    } catch (cause: any) {\n      if ((cause.code !== 'ENOENT') && (cause.code !== 'EISDIR')) {\n        throwError(mode, `Unable to read or parse \"${packageFile}\"`, { cause, start: _findType })\n      }\n    }\n\n    const parent = _path.dirname(directory)\n    if (directory !== parent) return _findType(directory)\n\n    logMessage(mode, `Type defaulted to \"${CJS}\"`)\n    return CJS\n  }\n\n  return _findType(process.cwd())\n}\n\n/* ========================================================================== *\n * ESBUILD HELPERS                                                            *\n * ========================================================================== */\n\n/**\n * Take an ESBuild `BuildResult` or `BuildFailure` (they both have arrays\n * of `Message` in both `warnings` and `errors`), format them and print them\n * out nicely. Then fail if any error was detected.\n */\nfunction _esbReport(\n    kind: 'error' | 'warning',\n    messages: _esbuild.Message[] = [],\n): void {\n  const output = process.stderr\n  const options = { color: !!output.isTTY, terminalWidth: output.columns || 80 }\n\n  const array = _esbuild.formatMessagesSync(messages, { kind, ...options })\n  array.forEach((message) => output.write(`${message}\\n`))\n}\n\n/**\n * Transpile with ESBuild\n */\nexport function esbTranpile(filename: string, type: Type): string {\n  logMessage(type, `Transpiling \"${filename}\" as \"${type}\"`)\n\n  const [ format, __fileurl ] = type === ESM ?\n    [ 'esm', 'import.meta.url' ] as const :\n    [ 'cjs', '__filename' ] as const\n\n  /* ESbuild options */\n  const options: _esbuild.TransformOptions = {\n    sourcefile: filename, // the original filename we're parsing\n    format, // what are we actually transpiling to???\n    loader: 'ts', // the format is always \"typescript\"\n    sourcemap: 'inline', // always inline source maps\n    sourcesContent: false, // do not include sources content in sourcemap\n    platform: 'node', // d'oh! :-)\n    minifyWhitespace: true, // https://github.com/evanw/esbuild/releases/tag/v0.16.14\n    logLevel: 'silent', // catching those in our _esbReport below\n    target: `node${process.versions['node']}`, // target _this_ version\n    define: { __fileurl }, // from \"globals.d.ts\"\n  }\n\n  /* Emit a line on the console when loading in debug mode */\n  if (_debug) {\n    if (format === 'esm') {\n      options.banner = `;(await import('node:util')).debuglog('plug:ts-loader')('[esm] Loaded \"%s\"', ${__fileurl});`\n    } else if (format === 'cjs') {\n      options.banner = `;require('node:util').debuglog('plug:ts-loader')('[cjs] Loaded \"%s\"', ${__fileurl});`\n    }\n  }\n\n  /* Transpile our TypeScript file into some JavaScript stuff */\n  let result\n  try {\n    const source = _fs.readFileSync(filename, 'utf-8')\n    result = _esbuild.transformSync(source, options)\n  } catch (cause: any) {\n    _esbReport('error', (cause as _esbuild.TransformFailure).errors)\n    _esbReport('warning', (cause as _esbuild.TransformFailure).warnings)\n    throwError(type, `ESBuild error transpiling \"${filename}\"`, { cause, start: esbTranpile })\n  }\n\n  /* Log transpile warnings if debugging */\n  if (_debug) _esbReport('warning', result.warnings)\n\n  /* Done! */\n  return result.code\n}\n\n\n/* ========================================================================== *\n * UTILITIES                                                                  *\n * ========================================================================== */\n\n/* Returns a boolean indicating whether the specified file exists or not */\nexport function isFile(path: string): boolean {\n  try {\n    return _fs.statSync(path).isFile()\n  } catch {\n    return false\n  }\n}\n\n/* Returns a boolean indicating whether the specified directory exists or not */\nexport function isDirectory(path: string): boolean {\n  try {\n    return _fs.statSync(path).isDirectory()\n  } catch {\n    return false\n  }\n}\n"],
  "mappings": ";AAAA,OAAOA,YAAW;AAClB,OAAO,UAAU;;;ACoBjB,OAAO,SAAS;AAChB,OAAO,WAAW;AAClB,OAAO,WAAW;AAGlB,OAAO,cAAc;AASd,IAAM,MAAM;AAEZ,IAAM,MAAM;AAOnB,IAAM,YAAY,MAAM,SAAS,gBAAgB;AACjD,IAAM,SAAS,UAAU;AAGlB,SAAS,WAAW,MAAY,QAAgB,MAAoB;AACzE,MAAI,CAAE,OAAQ;AAEd,QAAM,IAAI,SAAS,MAAM,QAAQ,SAAS,MAAM,QAAQ;AACxD,YAAU,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI;AACpC;AAGO,SAAS,WACZ,MACA,SACA,UAA4D,CAAC,GACxD;AACP,QAAM,IAAI,SAAS,MAAM,QAAQ,SAAS,MAAM,QAAQ;AACxD,QAAM,SAAS,cAAc,CAAC,QAAQ,QAAQ,GAAG;AAEjD,QAAM,EAAE,QAAQ,YAAY,GAAG,MAAM,IAAI;AACzC,QAAM,QAAQ,IAAI,MAAM,GAAG,MAAM,IAAI,OAAO,EAAE;AAC9C,QAAM,kBAAkB,OAAO,KAAK;AACpC,SAAO,OAAO,OAAO,KAAK;AAE1B,QAAM;AACR;AAWO,SAAS,WAAW,MAAkB;AAC3C,MAAI,QAAQ,IAAI,wBAAwB;AACtC,UAAM,OAAO,QAAQ,IAAI;AACzB,QAAK,SAAS,OAAS,SAAS,KAAM;AACpC,iBAAW,MAAM,oBAAoB,IAAI,oBAAoB;AAC7D,aAAO;AAAA,IACT,OAAO;AACL,iBAAW,MAAM,iBAAiB,QAAQ,IAAI,sBAAsB,GAAG;AAAA,IACzE;AAAA,EACF;AAEA,QAAM,YAAY,CAAC,cAA4B;AAC7C,UAAM,cAAc,MAAM,K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