PHP 8.2.30
Preview: hook.cjs.map Size: 4.99 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/@babel/register/lib/hook.cjs.map

{"version":3,"names":["pirates","require","sourceMapSupport","piratesRevert","maps","Object","create","installSourceMapSupport","install","handleUncaughtExceptions","environment","retrieveSourceMap","filename","map","url","Module","compiling","internalModuleCache","_cache","compileBabel7","client","code","isLocalClient","compile","globalModuleCache","inputCode","result","transform","register","opts","_opts$extensions","addHook","bind","exts","extensions","getDefaultExtensions","ignoreNodeModules","setOptions","revert","module","exports"],"sources":["../src/hook.cts"],"sourcesContent":["import type { IClient, Options } from \"./types.cts\";\n\nimport pirates = require(\"pirates\");\nconst sourceMapSupport: typeof import(\"@cspotcode/source-map-support\") = process\n  .env.BABEL_8_BREAKING\n  ? require(\"@cspotcode/source-map-support\")\n  : require(\"source-map-support\");\n\nlet piratesRevert: () => void;\nconst maps = Object.create(null);\n\nfunction installSourceMapSupport() {\n  // @ts-expect-error assign to function\n  installSourceMapSupport = () => {};\n\n  sourceMapSupport.install({\n    handleUncaughtExceptions: false,\n    environment: \"node\",\n    retrieveSourceMap(filename: string) {\n      const map = maps?.[filename];\n      if (map) {\n        return { url: null, map: map };\n      } else {\n        return null;\n      }\n    },\n  });\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n  // Babel 7 compiles files in the same thread where it hooks `require()`,\n  // so we must prevent mixing Babel plugin dependencies with the files\n  // to be compiled.\n  // All the `!process.env.BABEL_8_BREAKING` code in this file is for\n  // this purpose.\n\n  const Module = require(\"node:module\");\n\n  let compiling = false;\n  const internalModuleCache = Module._cache;\n\n  // eslint-disable-next-line no-var\n  var compileBabel7 = function compileBabel7(\n    client: IClient,\n    code: string,\n    filename: string,\n  ) {\n    // @ts-expect-error Babel 7 property\n    if (!client.isLocalClient) return compile(client, code, filename);\n\n    if (compiling) return code;\n\n    const globalModuleCache = Module._cache;\n    try {\n      compiling = true;\n      Module._cache = internalModuleCache;\n      return compile(client, code, filename);\n    } finally {\n      compiling = false;\n      Module._cache = globalModuleCache;\n    }\n  };\n}\n\nfunction compile(client: IClient, inputCode: string, filename: string) {\n  const result = client.transform(inputCode, filename);\n\n  if (result === null) return inputCode;\n\n  const { code, map } = result;\n  if (map) {\n    maps[filename] = map;\n    installSourceMapSupport();\n  }\n  return code;\n}\n\nfunction register(client: IClient, opts: Options = {}) {\n  if (piratesRevert) piratesRevert();\n\n  piratesRevert = pirates.addHook(\n    (process.env.BABEL_8_BREAKING ? compile : compileBabel7).bind(null, client),\n    {\n      exts: opts.extensions ?? client.getDefaultExtensions(),\n      ignoreNodeModules: false,\n    },\n  );\n\n  client.setOptions(opts);\n}\n\nfunction revert() {\n  if (piratesRevert) piratesRevert();\n}\n\nexport = { register, revert };\n"],"mappings":";;MAEOA,OAAO,GAAAC,OAAA,CAAW,SAAS;AAClC,MAAMC,gBAAgE,GAGlED,OAAO,CAAC,oBAAoB,CAAC;AAEjC,IAAIE,aAAyB;AAC7B,MAAMC,IAAI,GAAGC,MAAM,CAACC,MAAM,CAAC,IAAI,CAAC;AAEhC,SAASC,uBAAuBA,CAAA,EAAG;EAEjCA,uBAAuB,GAAGA,CAAA,KAAM,CAAC,CAAC;EAElCL,gBAAgB,CAACM,OAAO,CAAC;IACvBC,wBAAwB,EAAE,KAAK;IAC/BC,WAAW,EAAE,MAAM;IACnBC,iBAAiBA,CAACC,QAAgB,EAAE;MAClC,MAAMC,GAAG,GAAGT,IAAI,oBAAJA,IAAI,CAAGQ,QAAQ,CAAC;MAC5B,IAAIC,GAAG,EAAE;QACP,OAAO;UAAEC,GAAG,EAAE,IAAI;UAAED,GAAG,EAAEA;QAAI,CAAC;MAChC,CAAC,MAAM;QACL,OAAO,IAAI;MACb;IACF;EACF,CAAC,CAAC;AACJ;AASE,MAAME,MAAM,GAAGd,OAAO,CAAC,QAAa,CAAC;AAErC,IAAIe,SAAS,GAAG,KAAK;AACrB,MAAMC,mBAAmB,GAAGF,MAAM,CAACG,MAAM;AAGzC,IAAIC,a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,iBAAiB,EAAE;EACrB,CACF,CAAC;EAEDhB,MAAM,CAACiB,UAAU,CAACR,IAAI,CAAC;AACzB;AAEA,SAASS,MAAMA,CAAA,EAAG;EAChB,IAAInC,aAAa,EAAEA,aAAa,CAAC,CAAC;AACpC;AAACoC,MAAA,CAAAC,OAAA,GAEQ;EAAEZ,QAAQ;EAAEU;AAAO,CAAC","ignoreList":[]}

Directory Contents

Dirs: 1 × Files: 20

Name Size Perms Modified Actions
worker DIR
- drwxr-xr-x 2026-02-28 00:28:48
Edit Download
192 B lrw-r--r-- 2026-02-28 00:27:06
Edit Download
672 B lrw-r--r-- 2026-02-28 00:27:14
Edit Download
84 B lrw-r--r-- 2026-02-28 00:27:26
Edit Download
335 B lrw-r--r-- 2026-02-28 00:27:32
Edit Download
676 B lrw-r--r-- 2026-02-28 00:27:38
Edit Download
1.81 KB lrw-r--r-- 2026-02-28 00:27:44
Edit Download
1.79 KB lrw-r--r-- 2026-02-28 00:27:52
Edit Download
4.99 KB lrw-r--r-- 2026-02-28 00:28:00
Edit Download
267 B lrw-r--r-- 2026-02-28 00:28:04
Edit Download
1.19 KB lrw-r--r-- 2026-02-28 00:28:08
Edit Download
398 B lrw-r--r-- 2026-02-28 00:28:12
Edit Download
1.38 KB lrw-r--r-- 2026-02-28 00:28:18
Edit Download
358 B lrw-r--r-- 2026-02-28 00:28:22
Edit Download
1005 B lrw-r--r-- 2026-02-28 00:28:24
Edit Download
468 B lrw-r--r-- 2026-02-28 00:28:26
Edit Download
1.73 KB lrw-r--r-- 2026-02-28 00:28:28
Edit Download
324 B lrw-r--r-- 2026-02-28 00:28:28
Edit Download
741 B lrw-r--r-- 2026-02-28 00:28:30
Edit Download
3.57 KB lrw-r--r-- 2026-02-28 00:28:32
Edit Download
6.70 KB lrw-r--r-- 2026-02-28 00:28:34
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).