Comparing version 0.1.10 to 0.1.11
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.1.11](https://github.com/nuxt-contrib/jiti/compare/v0.1.10...v0.1.11) (2020-06-19) | ||
### Features | ||
* interopDefault ([44117ef](https://github.com/nuxt-contrib/jiti/commit/44117ef88f712b37bfe0a72181b76fa1a3f374c1)) | ||
### [0.1.10](https://github.com/nuxt-contrib/jiti/compare/v0.1.9...v0.1.10) (2020-06-19) | ||
@@ -7,0 +14,0 @@ |
/*! For license information please see jiti.js.LICENSE.txt */ | ||
module.exports=(()=>{var e={"./node_modules/create-require/create-require.js":(e,r,t)=>{const n=t("module"),o=t("path"),i=t("fs");e.exports=function(e){return function(e){try{return i.lstatSync(e).isDirectory()}catch(e){return!1}}(e)&&(e=o.join(e,"index.js")),n.createRequire?n.createRequire(e):n.createRequireFromPath?n.createRequireFromPath(e):function(e){const r=new n.Module(e,null);return r.filename=e,r.paths=n.Module._nodeModulePaths(o.dirname(e)),r._compile("module.exports = require;",e),r.exports}(e)}},"./node_modules/mkdirp/index.js":(e,r,t)=>{const n=t("./node_modules/mkdirp/lib/opts-arg.js"),o=t("./node_modules/mkdirp/lib/path-arg.js"),{mkdirpNative:i,mkdirpNativeSync:s}=t("./node_modules/mkdirp/lib/mkdirp-native.js"),{mkdirpManual:a,mkdirpManualSync:c}=t("./node_modules/mkdirp/lib/mkdirp-manual.js"),{useNative:l,useNativeSync:u}=t("./node_modules/mkdirp/lib/use-native.js"),d=(e,r)=>(e=o(e),r=n(r),l(r)?i(e,r):a(e,r));d.sync=(e,r)=>(e=o(e),r=n(r),u(r)?s(e,r):c(e,r)),d.native=(e,r)=>i(o(e),n(r)),d.manual=(e,r)=>a(o(e),n(r)),d.nativeSync=(e,r)=>s(o(e),n(r)),d.manualSync=(e,r)=>c(o(e),n(r)),e.exports=d},"./node_modules/mkdirp/lib/find-made.js":(e,r,t)=>{const{dirname:n}=t("path"),o=(e,r,t)=>t===r?Promise.resolve():e.statAsync(r).then(e=>e.isDirectory()?t:void 0,t=>"ENOENT"===t.code?o(e,n(r),r):void 0),i=(e,r,t)=>{if(t!==r)try{return e.statSync(r).isDirectory()?t:void 0}catch(t){return"ENOENT"===t.code?i(e,n(r),r):void 0}};e.exports={findMade:o,findMadeSync:i}},"./node_modules/mkdirp/lib/mkdirp-manual.js":(e,r,t)=>{const{dirname:n}=t("path"),o=(e,r,t)=>{r.recursive=!1;const i=n(e);return i===e?r.mkdirAsync(e,r).catch(e=>{if("EISDIR"!==e.code)throw e}):r.mkdirAsync(e,r).then(()=>t||e,n=>{if("ENOENT"===n.code)return o(i,r).then(t=>o(e,r,t));if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;return r.statAsync(e).then(e=>{if(e.isDirectory())return t;throw n},()=>{throw n})})},i=(e,r,t)=>{const o=n(e);if(r.recursive=!1,o===e)try{return r.mkdirSync(e,r)}catch(e){if("EISDIR"!==e.code)throw e;return}try{return r.mkdirSync(e,r),t||e}catch(n){if("ENOENT"===n.code)return i(e,r,i(o,r,t));if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;try{if(!r.statSync(e).isDirectory())throw n}catch(e){throw n}}};e.exports={mkdirpManual:o,mkdirpManualSync:i}},"./node_modules/mkdirp/lib/mkdirp-native.js":(e,r,t)=>{const{dirname:n}=t("path"),{findMade:o,findMadeSync:i}=t("./node_modules/mkdirp/lib/find-made.js"),{mkdirpManual:s,mkdirpManualSync:a}=t("./node_modules/mkdirp/lib/mkdirp-manual.js");e.exports={mkdirpNative:(e,r)=>{r.recursive=!0;return n(e)===e?r.mkdirAsync(e,r):o(r,e).then(t=>r.mkdirAsync(e,r).then(()=>t).catch(t=>{if("ENOENT"===t.code)return s(e,r);throw t}))},mkdirpNativeSync:(e,r)=>{r.recursive=!0;if(n(e)===e)return r.mkdirSync(e,r);const t=i(r,e);try{return r.mkdirSync(e,r),t}catch(t){if("ENOENT"===t.code)return a(e,r);throw t}}}},"./node_modules/mkdirp/lib/opts-arg.js":(e,r,t)=>{const{promisify:n}=t("util"),o=t("fs");e.exports=e=>{if(e)if("object"==typeof e)e={mode:511,fs:o,...e};else if("number"==typeof e)e={mode:e,fs:o};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8),fs:o}}else e={mode:511,fs:o};return e.mkdir=e.mkdir||e.fs.mkdir||o.mkdir,e.mkdirAsync=n(e.mkdir),e.stat=e.stat||e.fs.stat||o.stat,e.statAsync=n(e.stat),e.statSync=e.statSync||e.fs.statSync||o.statSync,e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||o.mkdirSync,e}},"./node_modules/mkdirp/lib/path-arg.js":(e,r,t)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:o,parse:i}=t("path");e.exports=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=o(e),"win32"===n){const r=/[*|"<>?:]/,{root:t}=i(e);if(r.test(e.substr(t.length)))throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e}},"./node_modules/mkdirp/lib/use-native.js":(e,r,t)=>{const n=t("fs"),o=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),i=+o[0]>10||10==+o[0]&&+o[1]>=12,s=i?e=>e.mkdir===n.mkdir:()=>!1,a=i?e=>e.mkdirSync===n.mkdirSync:()=>!1;e.exports={useNative:s,useNativeSync:a}},"./node_modules/path-parse/index.js":e=>{"use strict";var r="win32"===process.platform,t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,n=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,o={};o.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var r,o,i,s,a,c=(r=e,o=t.exec(r),i=(o[1]||"")+(o[2]||""),s=o[3]||"",a=n.exec(s),[i,a[1],a[2],a[3]]);if(!c||4!==c.length)throw new TypeError("Invalid path '"+e+"'");return{root:c[0],dir:c[0]+c[1].slice(0,-1),base:c[2],ext:c[3],name:c[2].slice(0,c[2].length-c[3].length)}};var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s={};s.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var r,t=(r=e,i.exec(r).slice(1));if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},e.exports=r?o.parse:s.parse,e.exports.posix=s.parse,e.exports.win32=o.parse},"./node_modules/resolve/index.js":(e,r,t)=>{var n=t("./node_modules/resolve/lib/async.js");n.core=t("./node_modules/resolve/lib/core.js"),n.isCore=t("./node_modules/resolve/lib/is-core.js"),n.sync=t("./node_modules/resolve/lib/sync.js"),e.exports=n},"./node_modules/resolve/lib/async.js":(e,r,t)=>{var n=t("fs"),o=t("path"),i=t("./node_modules/resolve/lib/caller.js"),s=t("./node_modules/resolve/lib/node-modules-paths.js"),a=t("./node_modules/resolve/lib/normalize-options.js"),c=t("./node_modules/resolve/lib/is-core.js"),l=n.realpath&&"function"==typeof n.realpath.native?n.realpath.native:n.realpath,u=function(e,r){n.stat(e,(function(e,t){return e?"ENOENT"===e.code||"ENOTDIR"===e.code?r(null,!1):r(e):r(null,t.isFile()||t.isFIFO())}))},d=function(e,r){n.stat(e,(function(e,t){return e?"ENOENT"===e.code||"ENOTDIR"===e.code?r(null,!1):r(e):r(null,t.isDirectory())}))},p=function(e,r){l(e,(function(t,n){t&&"ENOENT"!==t.code?r(t):r(null,t?e:n)}))},m=function(e,r,t,n){t&&!1===t.preserveSymlinks?e(r,n):n(null,r)};e.exports=function(e,r,t){var l=t,f=r;if("function"==typeof r&&(l=f,f={}),"string"!=typeof e){var h=new TypeError("Path must be a string.");return process.nextTick((function(){l(h)}))}var v=(f=a(e,f)).isFile||u,_=f.isDirectory||d,y=f.readFile||n.readFile,g=f.realpath||p,b=f.packageIterator,k=f.extensions||[".js"],j=f.basedir||o.dirname(i()),S=f.filename||j;f.paths=f.paths||[];var x,E=o.resolve(j);function w(r,t,n){r?l(r):t?l(null,t,n):O(x,(function(r,t,n){if(r)l(r);else if(t)m(g,t,f,(function(e,r){e?l(e):l(null,r,n)}));else{var o=new Error("Cannot find module '"+e+"' from '"+S+"'");o.code="MODULE_NOT_FOUND",l(o)}}))}function N(e,r,t){var n=r,i=t;"function"==typeof n&&(i=n,n=void 0),function e(r,t,n){if(0===r.length)return i(null,void 0,n);var s=t+r[0],a=n;a?c(null,a):function e(r,t){if(""===r||"/"===r)return t(null);if("win32"===process.platform&&/^\w:[/\\]*$/.test(r))return t(null);if(/[/\\]node_modules[/\\]*$/.test(r))return t(null);m(g,r,f,(function(n,i){if(n)return e(o.dirname(r),t);var s=o.join(i,"package.json");v(s,(function(n,i){if(!i)return e(o.dirname(r),t);y(s,(function(e,n){e&&t(e);try{var o=JSON.parse(n)}catch(e){}o&&f.packageFilter&&(o=f.packageFilter(o,s)),t(null,o,r)}))}))}))}(o.dirname(s),c);function c(n,c,u){if(a=c,n)return i(n);if(u&&a&&f.pathFilter){var d=o.relative(u,s),p=d.slice(0,d.length-r[0].length),m=f.pathFilter(a,t,p);if(m)return e([""].concat(k.slice()),o.resolve(u,m),a)}v(s,l)}function l(n,o){return n?i(n):o?i(null,s,a):void e(r.slice(1),t,a)}}([""].concat(k),e,n)}function O(e,r,t){var n=t,i=r;"function"==typeof i&&(n=i,i=f.package),m(g,e,f,(function(r,t){if(r)return n(r);var s=o.join(t,"package.json");v(s,(function(r,t){return r?n(r):t?void y(s,(function(r,t){if(r)return n(r);try{var i=JSON.parse(t)}catch(e){}if(i&&f.packageFilter&&(i=f.packageFilter(i,s)),i&&i.main){if("string"!=typeof i.main){var a=new TypeError("package “"+i.name+"” `main` must be a string");return a.code="INVALID_PACKAGE_MAIN",n(a)}return"."!==i.main&&"./"!==i.main||(i.main="index"),void N(o.resolve(e,i.main),i,(function(r,t,i){return r?n(r):t?n(null,t,i):i?void O(o.resolve(e,i.main),i,(function(r,t,i){return r?n(r):t?n(null,t,i):void N(o.join(e,"index"),i,n)})):N(o.join(e,"index"),i,n)}))}N(o.join(e,"/index"),i,n)})):N(o.join(e,"index"),i,n)}))}))}m(g,E,f,(function(r,t){r?l(r):function(r){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e))x=o.resolve(r,e),"."!==e&&".."!==e&&"/"!==e.slice(-1)||(x+="/"),/\/$/.test(e)&&x===r?O(x,f.package,w):N(x,f.package,w);else{if(c(e))return l(null,e);!function(e,r,t){var n=function(){return function(e,r,t){for(var n=s(r,t,e),i=0;i<n.length;i++)n[i]=o.join(n[i],e);return n}(e,r,f)};!function e(r,t){if(0===t.length)return r(null,void 0);var n=t[0];function i(o,i){return o?r(o):i?void N(n,f.package,s):e(r,t.slice(1))}function s(e,t,o){return e?r(e):t?r(null,t,o):void O(n,f.package,a)}function a(n,o,i){return n?r(n):o?r(null,o,i):void e(r,t.slice(1))}_(o.dirname(n),i)}(t,b?b(e,r,n,f):n())}(e,r,(function(r,t,n){if(r)l(r);else{if(t)return m(g,t,f,(function(e,r){e?l(e):l(null,r,n)}));var o=new Error("Cannot find module '"+e+"' from '"+S+"'");o.code="MODULE_NOT_FOUND",l(o)}}))}}(t)}))}},"./node_modules/resolve/lib/caller.js":e=>{e.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,r){return r};var r=(new Error).stack;return Error.prepareStackTrace=e,r[2].getFileName()}},"./node_modules/resolve/lib/core.js":(e,r,t)=>{var n=process.versions&&process.versions.node&&process.versions.node.split(".")||[];function o(e){for(var r=e.split(" "),t=r.length>1?r[0]:"=",o=(r.length>1?r[1]:r[0]).split("."),i=0;i<3;++i){var s=Number(n[i]||0),a=Number(o[i]||0);if(s!==a)return"<"===t?s<a:">="===t&&s>=a}return">="===t}function i(e){var r=e.split(/ ?&& ?/);if(0===r.length)return!1;for(var t=0;t<r.length;++t)if(!o(r[t]))return!1;return!0}function s(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){for(var r=0;r<e.length;++r)if(i(e[r]))return!0;return!1}return i(e)}var a=t("./node_modules/resolve/lib/core.json"),c={};for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(c[l]=s(a[l]));e.exports=c},"./node_modules/resolve/lib/core.json":e=>{"use strict";e.exports=JSON.parse('{"assert":true,"async_hooks":">= 8","buffer_ieee754":"< 0.9.7","buffer":true,"child_process":true,"cluster":true,"console":true,"constants":true,"crypto":true,"_debug_agent":">= 1 && < 8","_debugger":"< 8","dgram":true,"dns":true,"domain":true,"events":true,"freelist":"< 6","fs":true,"fs/promises":[">= 10 && < 10.1",">= 14"],"_http_agent":">= 0.11.1","_http_client":">= 0.11.1","_http_common":">= 0.11.1","_http_incoming":">= 0.11.1","_http_outgoing":">= 0.11.1","_http_server":">= 0.11.1","http":true,"http2":">= 8.8","https":true,"inspector":">= 8.0.0","_linklist":"< 8","module":true,"net":true,"node-inspect/lib/_inspect":">= 7.6.0 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6.0 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6.0 && < 12","os":true,"path":true,"perf_hooks":">= 8.5","process":">= 1","punycode":true,"querystring":true,"readline":true,"repl":true,"smalloc":">= 0.11.5 && < 3","_stream_duplex":">= 0.9.4","_stream_transform":">= 0.9.4","_stream_wrap":">= 1.4.1","_stream_passthrough":">= 0.9.4","_stream_readable":">= 0.9.4","_stream_writable":">= 0.9.4","stream":true,"string_decoder":true,"sys":true,"timers":true,"_tls_common":">= 0.11.13","_tls_legacy":">= 0.11.3 && < 10","_tls_wrap":">= 0.11.3","tls":true,"trace_events":">= 10","tty":true,"url":true,"util":true,"v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/consarray":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/csvparser":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/logreader":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/profile_view":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/splaytree":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8":">= 1","vm":true,"wasi":">= 13.4 && < 13.5","worker_threads":">= 11.7","zlib":true}')},"./node_modules/resolve/lib/is-core.js":(e,r,t)=>{var n=t("./node_modules/resolve/lib/core.js");e.exports=function(e){return Object.prototype.hasOwnProperty.call(n,e)}},"./node_modules/resolve/lib/node-modules-paths.js":(e,r,t)=>{var n=t("path"),o=n.parse||t("./node_modules/path-parse/index.js"),i=function(e,r){var t="/";/^([A-Za-z]:)/.test(e)?t="":/^\\\\/.test(e)&&(t="\\\\");for(var i=[e],s=o(e);s.dir!==i[i.length-1];)i.push(s.dir),s=o(s.dir);return i.reduce((function(e,o){return e.concat(r.map((function(e){return n.resolve(t,o,e)})))}),[])};e.exports=function(e,r,t){var n=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&"function"==typeof r.paths)return r.paths(t,e,(function(){return i(e,n)}),r);var o=i(e,n);return r&&r.paths?o.concat(r.paths):o}},"./node_modules/resolve/lib/normalize-options.js":e=>{e.exports=function(e,r){return r||{}}},"./node_modules/resolve/lib/sync.js":(e,r,t)=>{var n=t("./node_modules/resolve/lib/is-core.js"),o=t("fs"),i=t("path"),s=t("./node_modules/resolve/lib/caller.js"),a=t("./node_modules/resolve/lib/node-modules-paths.js"),c=t("./node_modules/resolve/lib/normalize-options.js"),l=o.realpathSync&&"function"==typeof o.realpathSync.native?o.realpathSync.native:o.realpathSync,u=function(e){try{var r=o.statSync(e)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return!1;throw e}return r.isFile()||r.isFIFO()},d=function(e){try{var r=o.statSync(e)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return!1;throw e}return r.isDirectory()},p=function(e){try{return l(e)}catch(e){if("ENOENT"!==e.code)throw e}return e},m=function(e,r,t){return t&&!1===t.preserveSymlinks?e(r):r};e.exports=function(e,r){if("string"!=typeof e)throw new TypeError("Path must be a string.");var t=c(e,r),l=t.isFile||u,f=t.readFileSync||o.readFileSync,h=t.isDirectory||d,v=t.realpathSync||p,_=t.packageIterator,y=t.extensions||[".js"],g=t.basedir||i.dirname(s()),b=t.filename||g;t.paths=t.paths||[];var k=m(v,i.resolve(g),t);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var j=i.resolve(k,e);"."!==e&&".."!==e&&"/"!==e.slice(-1)||(j+="/");var S=w(j)||N(j);if(S)return m(v,S,t)}else{if(n(e))return e;var x=function(e,r){for(var n=function(){return function(e,r,t){for(var n=a(r,t,e),o=0;o<n.length;o++)n[o]=i.join(n[o],e);return n}(e,r,t)},o=_?_(e,r,n,t):n(),s=0;s<o.length;s++){var c=o[s];if(h(i.dirname(c))){var l=w(c);if(l)return l;var u=N(c);if(u)return u}}}(e,k);if(x)return m(v,x,t)}var E=new Error("Cannot find module '"+e+"' from '"+b+"'");throw E.code="MODULE_NOT_FOUND",E;function w(e){var r=function e(r){if(""===r||"/"===r)return;if("win32"===process.platform&&/^\w:[/\\]*$/.test(r))return;if(/[/\\]node_modules[/\\]*$/.test(r))return;var n=i.join(m(v,r,t),"package.json");if(!l(n))return e(i.dirname(r));var o=f(n);try{var s=JSON.parse(o)}catch(e){}s&&t.packageFilter&&(s=t.packageFilter(s,r));return{pkg:s,dir:r}}(i.dirname(e));if(r&&r.dir&&r.pkg&&t.pathFilter){var n=i.relative(r.dir,e),o=t.pathFilter(r.pkg,e,n);o&&(e=i.resolve(r.dir,o))}if(l(e))return e;for(var s=0;s<y.length;s++){var a=e+y[s];if(l(a))return a}}function N(e){var r=i.join(m(v,e,t),"/package.json");if(l(r)){try{var n=f(r,"UTF8"),o=JSON.parse(n)}catch(e){}if(o&&t.packageFilter&&(o=t.packageFilter(o,e)),o&&o.main){if("string"!=typeof o.main){var s=new TypeError("package “"+o.name+"” `main` must be a string");throw s.code="INVALID_PACKAGE_MAIN",s}"."!==o.main&&"./"!==o.main||(o.main="index");try{var a=w(i.resolve(e,o.main));if(a)return a;var c=N(i.resolve(e,o.main));if(c)return c}catch(e){}}}return w(i.join(e,"/index"))}}},"./src/jiti.ts":(e,r,t)=>{"use strict";t.d(r,{default:()=>v});t("./node_modules/v8-compile-cache/v8-compile-cache.js");var n=t("fs"),o=t("module"),i=t("path"),s=t("os"),a=t("crypto"),c=t("./node_modules/mkdirp/index.js"),l=t.n(c),u=t("./node_modules/create-require/create-require.js"),d=t.n(u),p=t("./node_modules/resolve/index.js"),m=t.n(p);e=t.hmd(e);const f={debug:!1,cache:!0};function h(e,r=8){return(0,a.createHash)("md5").update(e).digest("hex").substr(0,r)}function v(r=process.cwd(),t={}){if(t=Object.assign(Object.assign({},f),t),function(e){try{return(0,n.lstatSync)(e).isDirectory()}catch(e){return!1}}(r)&&(r=(0,i.join)(r,"index.js")),t.cache&&!t.cacheDir){const e=(0,i.join)(process.cwd(),"node_modules");(0,n.existsSync)(e)?t.cacheDir=(0,i.join)(e,".cache/jiti"):t.cacheDir=(0,i.join)((0,s.tmpdir)(),"node-jiti")}const a={extensions:[".js",".mjs",".ts"],basedir:(0,i.dirname)(r)},c=e=>m().sync(e,a);c.paths=e=>[];const u=d()(r);function p(...e){t.debug&&console.log("[jiti]",...e)}function _(e,r,o){if(!t.cache)return o();const s=` /* v1-${h(r,16)} */`,a=(0,i.basename)((0,i.dirname)(e))+"-"+(0,i.basename)(e),c=(0,i.join)(t.cacheDir,a+"."+h(e)+".js");if((0,n.existsSync)(c)){const e=(0,n.readFileSync)(c,"utf-8");if(e.endsWith(s))return e}const u=o();return l().sync(t.cacheDir),(0,n.writeFileSync)(c,u+s,"utf-8"),u}function y(r){var s;if(o.builtinModules.includes(r))return u(r);const a=c(r);if(u.cache[a])return null===(s=u.cache[a])||void 0===s?void 0:s.exports;let l=(0,n.readFileSync)(a,"utf-8");if(a.match(/\.ts$/))p("[ts]",a),l=_(a,l,()=>t.transform({source:l,filename:a,ts:!0}));else{if(!l.match(/^\s*import .* from/m)&&!l.match(/^\s*export /m))return p("[bail]",a),u(r);p("[esm]",a),l=_(a,l,()=>t.transform({source:l,filename:a}))}const d=new o.Module(a);return d.filename=a,d.parent=e,d.require=v(a,t),d.path=(0,i.dirname)(a),d.paths=o.Module._nodeModulePaths(d.path),d._compile(l,a),d.loaded=!0,u.cache[a]=d,d.exports}return y.resolve=c,y.cache=u.cache,y.extensions=u.extensions,y.main=u.main,y}},"./node_modules/v8-compile-cache/v8-compile-cache.js":(e,r,t)=>{"use strict";e=t.nmd(e);const n=t("module"),o=t("crypto"),i=t("fs"),s=t("path"),a=t("vm"),c=t("os"),l=Object.prototype.hasOwnProperty;class u{constructor(e,r){const t=r?m(r+"."):"";this._blobFilename=s.join(e,t+"BLOB"),this._mapFilename=s.join(e,t+"MAP"),this._lockFilename=s.join(e,t+"LOCK"),this._directory=e,this._load()}has(e,r){return l.call(this._memoryBlobs,e)?this._invalidationKeys[e]===r:!!l.call(this._storedMap,e)&&this._storedMap[e][0]===r}get(e,r){if(l.call(this._memoryBlobs,e)){if(this._invalidationKeys[e]===r)return this._memoryBlobs[e]}else if(l.call(this._storedMap,e)){const t=this._storedMap[e];if(t[0]===r)return this._storedBlob.slice(t[1],t[2])}}set(e,r,t){this._invalidationKeys[e]=r,this._memoryBlobs[e]=t,this._dirty=!0}delete(e){l.call(this._memoryBlobs,e)&&(this._dirty=!0,delete this._memoryBlobs[e]),l.call(this._invalidationKeys,e)&&(this._dirty=!0,delete this._invalidationKeys[e]),l.call(this._storedMap,e)&&(this._dirty=!0,delete this._storedMap[e])}isDirty(){return this._dirty}save(){const e=this._getDump(),r=Buffer.concat(e[0]),t=JSON.stringify(e[1]);try{p(this._directory),i.writeFileSync(this._lockFilename,"LOCK",{flag:"wx"})}catch(e){return!1}try{i.writeFileSync(this._blobFilename,r),i.writeFileSync(this._mapFilename,t)}catch(e){throw e}finally{i.unlinkSync(this._lockFilename)}return!0}_load(){try{this._storedBlob=i.readFileSync(this._blobFilename),this._storedMap=JSON.parse(i.readFileSync(this._mapFilename))}catch(e){this._storedBlob=Buffer.alloc(0),this._storedMap={}}this._dirty=!1,this._memoryBlobs={},this._invalidationKeys={}}_getDump(){const e=[],r={};let t=0;function n(n,o,i){e.push(i),r[n]=[o,t,t+i.length],t+=i.length}for(const e of Object.keys(this._memoryBlobs)){const r=this._memoryBlobs[e];n(e,this._invalidationKeys[e],r)}for(const e of Object.keys(this._storedMap)){if(l.call(r,e))continue;const t=this._storedMap[e],o=this._storedBlob.slice(t[1],t[2]);n(e,t[0],o)}return[e,r]}}class d{constructor(){this._cacheStore=null,this._previousModuleCompile=null}setCacheStore(e){this._cacheStore=e}install(){const e=this,r="function"==typeof t("./node_modules/v8-compile-cache sync recursive").resolve.paths;this._previousModuleCompile=n.prototype._compile,n.prototype._compile=function(t,o){const i=this;function a(e){return i.require(e)}function c(e,r){return n._resolveFilename(e,i,!1,r)}a.resolve=c,r&&(c.paths=function(e){return n._resolveLookupPaths(e,i,!0)}),a.main=process.mainModule,a.extensions=n._extensions,a.cache=n._cache;const l=s.dirname(o),u=e._moduleCompile(o,t),d=[i.exports,a,i,o,l,process,global,Buffer];return u.apply(i.exports,d)}}uninstall(){n.prototype._compile=this._previousModuleCompile}_moduleCompile(e,r){var t=r.length;if(t>=2&&35===r.charCodeAt(0)&&33===r.charCodeAt(1))if(2===t)r="";else{for(var i=2;i<t;++i){var s=r.charCodeAt(i);if(10===s||13===s)break}r=i===t?"":r.slice(i)}var c=n.wrap(r),l=o.createHash("sha1").update(r,"utf8").digest("hex"),u=this._cacheStore.get(e,l),d=new a.Script(c,{filename:e,lineOffset:0,displayErrors:!0,cachedData:u,produceCachedData:!0});return d.cachedDataProduced?this._cacheStore.set(e,l,d.cachedData):d.cachedDataRejected&&this._cacheStore.delete(e),d.runInThisContext({filename:e,lineOffset:0,columnOffset:0,displayErrors:!0})}}function p(e){!function e(r,t){try{i.mkdirSync(r,t)}catch(t){if("ENOENT"===t.code)e(s.dirname(r)),e(r);else try{if(!i.statSync(r).isDirectory())throw t}catch(e){throw t}}}(s.resolve(e),511)}function m(e){const r={"\\":"zB",":":"zC","/":"zS","\0":"z0",z:"zZ"};return e.replace(/[\\:\/\x00z]/g,e=>r[e])}function f(){return!0===new a.Script('""',{produceCachedData:!0}).cachedDataProduced}function h(){const e="function"==typeof process.getuid?"v8-compile-cache-"+process.getuid():"v8-compile-cache",r="string"==typeof process.versions.v8?process.versions.v8:"string"==typeof process.versions.chakracore?"chakracore-"+process.versions.chakracore:"node-"+process.version;return s.join(c.tmpdir(),e,r)}function v(){return e.parent&&"string"==typeof e.parent.filename?e.parent.filename:process.cwd()}if(!process.env.DISABLE_V8_COMPILE_CACHE&&f()){const e=new u(h(),v()),r=new d;r.setCacheStore(e),r.install(),process.once("exit",t=>{e.isDirty()&&e.save(),r.uninstall()})}e.exports.__TEST__={FileSystemBlobStore:u,NativeCompileCache:d,mkdirpSync:p,slashEscape:m,supportsCachedData:f,getCacheDir:h,getParentName:v}},"./node_modules/v8-compile-cache sync recursive":e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id="./node_modules/v8-compile-cache sync recursive",e.exports=r},crypto:e=>{"use strict";e.exports=require("crypto")},fs:e=>{"use strict";e.exports=require("fs")},module:e=>{"use strict";e.exports=require("module")},os:e=>{"use strict";e.exports=require("os")},path:e=>{"use strict";e.exports=require("path")},util:e=>{"use strict";e.exports=require("util")},vm:e=>{"use strict";e.exports=require("vm")}},r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={id:n,loaded:!1,exports:{}};return e[n](o,o.exports,t),o.loaded=!0,o.exports}return t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t("./src/jiti.ts")})().default; | ||
module.exports=(()=>{var e={"./node_modules/create-require/create-require.js":(e,r,t)=>{const n=t("module"),o=t("path"),i=t("fs");e.exports=function(e){return function(e){try{return i.lstatSync(e).isDirectory()}catch(e){return!1}}(e)&&(e=o.join(e,"index.js")),n.createRequire?n.createRequire(e):n.createRequireFromPath?n.createRequireFromPath(e):function(e){const r=new n.Module(e,null);return r.filename=e,r.paths=n.Module._nodeModulePaths(o.dirname(e)),r._compile("module.exports = require;",e),r.exports}(e)}},"./node_modules/mkdirp/index.js":(e,r,t)=>{const n=t("./node_modules/mkdirp/lib/opts-arg.js"),o=t("./node_modules/mkdirp/lib/path-arg.js"),{mkdirpNative:i,mkdirpNativeSync:s}=t("./node_modules/mkdirp/lib/mkdirp-native.js"),{mkdirpManual:a,mkdirpManualSync:c}=t("./node_modules/mkdirp/lib/mkdirp-manual.js"),{useNative:l,useNativeSync:u}=t("./node_modules/mkdirp/lib/use-native.js"),d=(e,r)=>(e=o(e),r=n(r),l(r)?i(e,r):a(e,r));d.sync=(e,r)=>(e=o(e),r=n(r),u(r)?s(e,r):c(e,r)),d.native=(e,r)=>i(o(e),n(r)),d.manual=(e,r)=>a(o(e),n(r)),d.nativeSync=(e,r)=>s(o(e),n(r)),d.manualSync=(e,r)=>c(o(e),n(r)),e.exports=d},"./node_modules/mkdirp/lib/find-made.js":(e,r,t)=>{const{dirname:n}=t("path"),o=(e,r,t)=>t===r?Promise.resolve():e.statAsync(r).then(e=>e.isDirectory()?t:void 0,t=>"ENOENT"===t.code?o(e,n(r),r):void 0),i=(e,r,t)=>{if(t!==r)try{return e.statSync(r).isDirectory()?t:void 0}catch(t){return"ENOENT"===t.code?i(e,n(r),r):void 0}};e.exports={findMade:o,findMadeSync:i}},"./node_modules/mkdirp/lib/mkdirp-manual.js":(e,r,t)=>{const{dirname:n}=t("path"),o=(e,r,t)=>{r.recursive=!1;const i=n(e);return i===e?r.mkdirAsync(e,r).catch(e=>{if("EISDIR"!==e.code)throw e}):r.mkdirAsync(e,r).then(()=>t||e,n=>{if("ENOENT"===n.code)return o(i,r).then(t=>o(e,r,t));if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;return r.statAsync(e).then(e=>{if(e.isDirectory())return t;throw n},()=>{throw n})})},i=(e,r,t)=>{const o=n(e);if(r.recursive=!1,o===e)try{return r.mkdirSync(e,r)}catch(e){if("EISDIR"!==e.code)throw e;return}try{return r.mkdirSync(e,r),t||e}catch(n){if("ENOENT"===n.code)return i(e,r,i(o,r,t));if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;try{if(!r.statSync(e).isDirectory())throw n}catch(e){throw n}}};e.exports={mkdirpManual:o,mkdirpManualSync:i}},"./node_modules/mkdirp/lib/mkdirp-native.js":(e,r,t)=>{const{dirname:n}=t("path"),{findMade:o,findMadeSync:i}=t("./node_modules/mkdirp/lib/find-made.js"),{mkdirpManual:s,mkdirpManualSync:a}=t("./node_modules/mkdirp/lib/mkdirp-manual.js");e.exports={mkdirpNative:(e,r)=>{r.recursive=!0;return n(e)===e?r.mkdirAsync(e,r):o(r,e).then(t=>r.mkdirAsync(e,r).then(()=>t).catch(t=>{if("ENOENT"===t.code)return s(e,r);throw t}))},mkdirpNativeSync:(e,r)=>{r.recursive=!0;if(n(e)===e)return r.mkdirSync(e,r);const t=i(r,e);try{return r.mkdirSync(e,r),t}catch(t){if("ENOENT"===t.code)return a(e,r);throw t}}}},"./node_modules/mkdirp/lib/opts-arg.js":(e,r,t)=>{const{promisify:n}=t("util"),o=t("fs");e.exports=e=>{if(e)if("object"==typeof e)e={mode:511,fs:o,...e};else if("number"==typeof e)e={mode:e,fs:o};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8),fs:o}}else e={mode:511,fs:o};return e.mkdir=e.mkdir||e.fs.mkdir||o.mkdir,e.mkdirAsync=n(e.mkdir),e.stat=e.stat||e.fs.stat||o.stat,e.statAsync=n(e.stat),e.statSync=e.statSync||e.fs.statSync||o.statSync,e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||o.mkdirSync,e}},"./node_modules/mkdirp/lib/path-arg.js":(e,r,t)=>{const n=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:o,parse:i}=t("path");e.exports=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=o(e),"win32"===n){const r=/[*|"<>?:]/,{root:t}=i(e);if(r.test(e.substr(t.length)))throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e}},"./node_modules/mkdirp/lib/use-native.js":(e,r,t)=>{const n=t("fs"),o=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),i=+o[0]>10||10==+o[0]&&+o[1]>=12,s=i?e=>e.mkdir===n.mkdir:()=>!1,a=i?e=>e.mkdirSync===n.mkdirSync:()=>!1;e.exports={useNative:s,useNativeSync:a}},"./node_modules/path-parse/index.js":e=>{"use strict";var r="win32"===process.platform,t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,n=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,o={};o.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var r,o,i,s,a,c=(r=e,o=t.exec(r),i=(o[1]||"")+(o[2]||""),s=o[3]||"",a=n.exec(s),[i,a[1],a[2],a[3]]);if(!c||4!==c.length)throw new TypeError("Invalid path '"+e+"'");return{root:c[0],dir:c[0]+c[1].slice(0,-1),base:c[2],ext:c[3],name:c[2].slice(0,c[2].length-c[3].length)}};var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s={};s.parse=function(e){if("string"!=typeof e)throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var r,t=(r=e,i.exec(r).slice(1));if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},e.exports=r?o.parse:s.parse,e.exports.posix=s.parse,e.exports.win32=o.parse},"./node_modules/resolve/index.js":(e,r,t)=>{var n=t("./node_modules/resolve/lib/async.js");n.core=t("./node_modules/resolve/lib/core.js"),n.isCore=t("./node_modules/resolve/lib/is-core.js"),n.sync=t("./node_modules/resolve/lib/sync.js"),e.exports=n},"./node_modules/resolve/lib/async.js":(e,r,t)=>{var n=t("fs"),o=t("path"),i=t("./node_modules/resolve/lib/caller.js"),s=t("./node_modules/resolve/lib/node-modules-paths.js"),a=t("./node_modules/resolve/lib/normalize-options.js"),c=t("./node_modules/resolve/lib/is-core.js"),l=n.realpath&&"function"==typeof n.realpath.native?n.realpath.native:n.realpath,u=function(e,r){n.stat(e,(function(e,t){return e?"ENOENT"===e.code||"ENOTDIR"===e.code?r(null,!1):r(e):r(null,t.isFile()||t.isFIFO())}))},d=function(e,r){n.stat(e,(function(e,t){return e?"ENOENT"===e.code||"ENOTDIR"===e.code?r(null,!1):r(e):r(null,t.isDirectory())}))},p=function(e,r){l(e,(function(t,n){t&&"ENOENT"!==t.code?r(t):r(null,t?e:n)}))},m=function(e,r,t,n){t&&!1===t.preserveSymlinks?e(r,n):n(null,r)};e.exports=function(e,r,t){var l=t,f=r;if("function"==typeof r&&(l=f,f={}),"string"!=typeof e){var h=new TypeError("Path must be a string.");return process.nextTick((function(){l(h)}))}var v=(f=a(e,f)).isFile||u,y=f.isDirectory||d,_=f.readFile||n.readFile,g=f.realpath||p,b=f.packageIterator,k=f.extensions||[".js"],j=f.basedir||o.dirname(i()),S=f.filename||j;f.paths=f.paths||[];var x,E=o.resolve(j);function w(r,t,n){r?l(r):t?l(null,t,n):O(x,(function(r,t,n){if(r)l(r);else if(t)m(g,t,f,(function(e,r){e?l(e):l(null,r,n)}));else{var o=new Error("Cannot find module '"+e+"' from '"+S+"'");o.code="MODULE_NOT_FOUND",l(o)}}))}function N(e,r,t){var n=r,i=t;"function"==typeof n&&(i=n,n=void 0),function e(r,t,n){if(0===r.length)return i(null,void 0,n);var s=t+r[0],a=n;a?c(null,a):function e(r,t){if(""===r||"/"===r)return t(null);if("win32"===process.platform&&/^\w:[/\\]*$/.test(r))return t(null);if(/[/\\]node_modules[/\\]*$/.test(r))return t(null);m(g,r,f,(function(n,i){if(n)return e(o.dirname(r),t);var s=o.join(i,"package.json");v(s,(function(n,i){if(!i)return e(o.dirname(r),t);_(s,(function(e,n){e&&t(e);try{var o=JSON.parse(n)}catch(e){}o&&f.packageFilter&&(o=f.packageFilter(o,s)),t(null,o,r)}))}))}))}(o.dirname(s),c);function c(n,c,u){if(a=c,n)return i(n);if(u&&a&&f.pathFilter){var d=o.relative(u,s),p=d.slice(0,d.length-r[0].length),m=f.pathFilter(a,t,p);if(m)return e([""].concat(k.slice()),o.resolve(u,m),a)}v(s,l)}function l(n,o){return n?i(n):o?i(null,s,a):void e(r.slice(1),t,a)}}([""].concat(k),e,n)}function O(e,r,t){var n=t,i=r;"function"==typeof i&&(n=i,i=f.package),m(g,e,f,(function(r,t){if(r)return n(r);var s=o.join(t,"package.json");v(s,(function(r,t){return r?n(r):t?void _(s,(function(r,t){if(r)return n(r);try{var i=JSON.parse(t)}catch(e){}if(i&&f.packageFilter&&(i=f.packageFilter(i,s)),i&&i.main){if("string"!=typeof i.main){var a=new TypeError("package “"+i.name+"” `main` must be a string");return a.code="INVALID_PACKAGE_MAIN",n(a)}return"."!==i.main&&"./"!==i.main||(i.main="index"),void N(o.resolve(e,i.main),i,(function(r,t,i){return r?n(r):t?n(null,t,i):i?void O(o.resolve(e,i.main),i,(function(r,t,i){return r?n(r):t?n(null,t,i):void N(o.join(e,"index"),i,n)})):N(o.join(e,"index"),i,n)}))}N(o.join(e,"/index"),i,n)})):N(o.join(e,"index"),i,n)}))}))}m(g,E,f,(function(r,t){r?l(r):function(r){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e))x=o.resolve(r,e),"."!==e&&".."!==e&&"/"!==e.slice(-1)||(x+="/"),/\/$/.test(e)&&x===r?O(x,f.package,w):N(x,f.package,w);else{if(c(e))return l(null,e);!function(e,r,t){var n=function(){return function(e,r,t){for(var n=s(r,t,e),i=0;i<n.length;i++)n[i]=o.join(n[i],e);return n}(e,r,f)};!function e(r,t){if(0===t.length)return r(null,void 0);var n=t[0];function i(o,i){return o?r(o):i?void N(n,f.package,s):e(r,t.slice(1))}function s(e,t,o){return e?r(e):t?r(null,t,o):void O(n,f.package,a)}function a(n,o,i){return n?r(n):o?r(null,o,i):void e(r,t.slice(1))}y(o.dirname(n),i)}(t,b?b(e,r,n,f):n())}(e,r,(function(r,t,n){if(r)l(r);else{if(t)return m(g,t,f,(function(e,r){e?l(e):l(null,r,n)}));var o=new Error("Cannot find module '"+e+"' from '"+S+"'");o.code="MODULE_NOT_FOUND",l(o)}}))}}(t)}))}},"./node_modules/resolve/lib/caller.js":e=>{e.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,r){return r};var r=(new Error).stack;return Error.prepareStackTrace=e,r[2].getFileName()}},"./node_modules/resolve/lib/core.js":(e,r,t)=>{var n=process.versions&&process.versions.node&&process.versions.node.split(".")||[];function o(e){for(var r=e.split(" "),t=r.length>1?r[0]:"=",o=(r.length>1?r[1]:r[0]).split("."),i=0;i<3;++i){var s=Number(n[i]||0),a=Number(o[i]||0);if(s!==a)return"<"===t?s<a:">="===t&&s>=a}return">="===t}function i(e){var r=e.split(/ ?&& ?/);if(0===r.length)return!1;for(var t=0;t<r.length;++t)if(!o(r[t]))return!1;return!0}function s(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){for(var r=0;r<e.length;++r)if(i(e[r]))return!0;return!1}return i(e)}var a=t("./node_modules/resolve/lib/core.json"),c={};for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(c[l]=s(a[l]));e.exports=c},"./node_modules/resolve/lib/core.json":e=>{"use strict";e.exports=JSON.parse('{"assert":true,"async_hooks":">= 8","buffer_ieee754":"< 0.9.7","buffer":true,"child_process":true,"cluster":true,"console":true,"constants":true,"crypto":true,"_debug_agent":">= 1 && < 8","_debugger":"< 8","dgram":true,"dns":true,"domain":true,"events":true,"freelist":"< 6","fs":true,"fs/promises":[">= 10 && < 10.1",">= 14"],"_http_agent":">= 0.11.1","_http_client":">= 0.11.1","_http_common":">= 0.11.1","_http_incoming":">= 0.11.1","_http_outgoing":">= 0.11.1","_http_server":">= 0.11.1","http":true,"http2":">= 8.8","https":true,"inspector":">= 8.0.0","_linklist":"< 8","module":true,"net":true,"node-inspect/lib/_inspect":">= 7.6.0 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6.0 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6.0 && < 12","os":true,"path":true,"perf_hooks":">= 8.5","process":">= 1","punycode":true,"querystring":true,"readline":true,"repl":true,"smalloc":">= 0.11.5 && < 3","_stream_duplex":">= 0.9.4","_stream_transform":">= 0.9.4","_stream_wrap":">= 1.4.1","_stream_passthrough":">= 0.9.4","_stream_readable":">= 0.9.4","_stream_writable":">= 0.9.4","stream":true,"string_decoder":true,"sys":true,"timers":true,"_tls_common":">= 0.11.13","_tls_legacy":">= 0.11.3 && < 10","_tls_wrap":">= 0.11.3","tls":true,"trace_events":">= 10","tty":true,"url":true,"util":true,"v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/consarray":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/csvparser":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/logreader":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/profile_view":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8/tools/splaytree":[">= 4.4.0 && < 5",">= 5.2.0 && < 12"],"v8":">= 1","vm":true,"wasi":">= 13.4 && < 13.5","worker_threads":">= 11.7","zlib":true}')},"./node_modules/resolve/lib/is-core.js":(e,r,t)=>{var n=t("./node_modules/resolve/lib/core.js");e.exports=function(e){return Object.prototype.hasOwnProperty.call(n,e)}},"./node_modules/resolve/lib/node-modules-paths.js":(e,r,t)=>{var n=t("path"),o=n.parse||t("./node_modules/path-parse/index.js"),i=function(e,r){var t="/";/^([A-Za-z]:)/.test(e)?t="":/^\\\\/.test(e)&&(t="\\\\");for(var i=[e],s=o(e);s.dir!==i[i.length-1];)i.push(s.dir),s=o(s.dir);return i.reduce((function(e,o){return e.concat(r.map((function(e){return n.resolve(t,o,e)})))}),[])};e.exports=function(e,r,t){var n=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&"function"==typeof r.paths)return r.paths(t,e,(function(){return i(e,n)}),r);var o=i(e,n);return r&&r.paths?o.concat(r.paths):o}},"./node_modules/resolve/lib/normalize-options.js":e=>{e.exports=function(e,r){return r||{}}},"./node_modules/resolve/lib/sync.js":(e,r,t)=>{var n=t("./node_modules/resolve/lib/is-core.js"),o=t("fs"),i=t("path"),s=t("./node_modules/resolve/lib/caller.js"),a=t("./node_modules/resolve/lib/node-modules-paths.js"),c=t("./node_modules/resolve/lib/normalize-options.js"),l=o.realpathSync&&"function"==typeof o.realpathSync.native?o.realpathSync.native:o.realpathSync,u=function(e){try{var r=o.statSync(e)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return!1;throw e}return r.isFile()||r.isFIFO()},d=function(e){try{var r=o.statSync(e)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return!1;throw e}return r.isDirectory()},p=function(e){try{return l(e)}catch(e){if("ENOENT"!==e.code)throw e}return e},m=function(e,r,t){return t&&!1===t.preserveSymlinks?e(r):r};e.exports=function(e,r){if("string"!=typeof e)throw new TypeError("Path must be a string.");var t=c(e,r),l=t.isFile||u,f=t.readFileSync||o.readFileSync,h=t.isDirectory||d,v=t.realpathSync||p,y=t.packageIterator,_=t.extensions||[".js"],g=t.basedir||i.dirname(s()),b=t.filename||g;t.paths=t.paths||[];var k=m(v,i.resolve(g),t);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(e)){var j=i.resolve(k,e);"."!==e&&".."!==e&&"/"!==e.slice(-1)||(j+="/");var S=w(j)||N(j);if(S)return m(v,S,t)}else{if(n(e))return e;var x=function(e,r){for(var n=function(){return function(e,r,t){for(var n=a(r,t,e),o=0;o<n.length;o++)n[o]=i.join(n[o],e);return n}(e,r,t)},o=y?y(e,r,n,t):n(),s=0;s<o.length;s++){var c=o[s];if(h(i.dirname(c))){var l=w(c);if(l)return l;var u=N(c);if(u)return u}}}(e,k);if(x)return m(v,x,t)}var E=new Error("Cannot find module '"+e+"' from '"+b+"'");throw E.code="MODULE_NOT_FOUND",E;function w(e){var r=function e(r){if(""===r||"/"===r)return;if("win32"===process.platform&&/^\w:[/\\]*$/.test(r))return;if(/[/\\]node_modules[/\\]*$/.test(r))return;var n=i.join(m(v,r,t),"package.json");if(!l(n))return e(i.dirname(r));var o=f(n);try{var s=JSON.parse(o)}catch(e){}s&&t.packageFilter&&(s=t.packageFilter(s,r));return{pkg:s,dir:r}}(i.dirname(e));if(r&&r.dir&&r.pkg&&t.pathFilter){var n=i.relative(r.dir,e),o=t.pathFilter(r.pkg,e,n);o&&(e=i.resolve(r.dir,o))}if(l(e))return e;for(var s=0;s<_.length;s++){var a=e+_[s];if(l(a))return a}}function N(e){var r=i.join(m(v,e,t),"/package.json");if(l(r)){try{var n=f(r,"UTF8"),o=JSON.parse(n)}catch(e){}if(o&&t.packageFilter&&(o=t.packageFilter(o,e)),o&&o.main){if("string"!=typeof o.main){var s=new TypeError("package “"+o.name+"” `main` must be a string");throw s.code="INVALID_PACKAGE_MAIN",s}"."!==o.main&&"./"!==o.main||(o.main="index");try{var a=w(i.resolve(e,o.main));if(a)return a;var c=N(i.resolve(e,o.main));if(c)return c}catch(e){}}}return w(i.join(e,"/index"))}}},"./src/jiti.ts":(e,r,t)=>{"use strict";t.d(r,{default:()=>v});t("./node_modules/v8-compile-cache/v8-compile-cache.js");var n=t("fs"),o=t("module"),i=t("path"),s=t("os"),a=t("crypto"),c=t("./node_modules/mkdirp/index.js"),l=t.n(c),u=t("./node_modules/create-require/create-require.js"),d=t.n(u),p=t("./node_modules/resolve/index.js"),m=t.n(p);e=t.hmd(e);const f={debug:!1,cache:!0};function h(e,r=8){return(0,a.createHash)("md5").update(e).digest("hex").substr(0,r)}function v(r=process.cwd(),t={}){if(t=Object.assign(Object.assign({},f),t),function(e){try{return(0,n.lstatSync)(e).isDirectory()}catch(e){return!1}}(r)&&(r=(0,i.join)(r,"index.js")),t.cache&&!t.cacheDir){const e=(0,i.join)(process.cwd(),"node_modules");(0,n.existsSync)(e)?t.cacheDir=(0,i.join)(e,".cache/jiti"):t.cacheDir=(0,i.join)((0,s.tmpdir)(),"node-jiti")}const a={extensions:[".js",".mjs",".ts"],basedir:(0,i.dirname)(r)},c=e=>m().sync(e,a);c.paths=e=>[];const u=d()(r);function p(...e){t.debug&&console.log("[jiti]",...e)}function y(e,r,o){if(!t.cache)return o();const s=` /* v1-${h(r,16)} */`,a=(0,i.basename)((0,i.dirname)(e))+"-"+(0,i.basename)(e),c=(0,i.join)(t.cacheDir,a+"."+h(e)+".js");if((0,n.existsSync)(c)){const e=(0,n.readFileSync)(c,"utf-8");if(e.endsWith(s))return e}const u=o();return l().sync(t.cacheDir),(0,n.writeFileSync)(c,u+s,"utf-8"),u}function _(r){var s;if(o.builtinModules.includes(r))return u(r);const a=c(r);if(u.cache[a])return null===(s=u.cache[a])||void 0===s?void 0:s.exports;let l=(0,n.readFileSync)(a,"utf-8");if(a.match(/\.ts$/))p("[ts]",a),l=y(a,l,()=>t.transform({source:l,filename:a,ts:!0}));else{if(!l.match(/^\s*import .* from/m)&&!l.match(/^\s*export /m))return p("[bail]",a),u(r);p("[esm]",a),l=y(a,l,()=>t.transform({source:l,filename:a}))}const d=new o.Module(a);return d.filename=a,d.parent=e,d.require=v(a,t),d.path=(0,i.dirname)(a),d.paths=o.Module._nodeModulePaths(d.path),d._compile(l,a),d.loaded=!0,u.cache[a]=d,(m=d.exports)&&"object"==typeof m&&"default"in m?m.default:m;var m}return _.resolve=c,_.cache=u.cache,_.extensions=u.extensions,_.main=u.main,_}},"./node_modules/v8-compile-cache/v8-compile-cache.js":(e,r,t)=>{"use strict";e=t.nmd(e);const n=t("module"),o=t("crypto"),i=t("fs"),s=t("path"),a=t("vm"),c=t("os"),l=Object.prototype.hasOwnProperty;class u{constructor(e,r){const t=r?m(r+"."):"";this._blobFilename=s.join(e,t+"BLOB"),this._mapFilename=s.join(e,t+"MAP"),this._lockFilename=s.join(e,t+"LOCK"),this._directory=e,this._load()}has(e,r){return l.call(this._memoryBlobs,e)?this._invalidationKeys[e]===r:!!l.call(this._storedMap,e)&&this._storedMap[e][0]===r}get(e,r){if(l.call(this._memoryBlobs,e)){if(this._invalidationKeys[e]===r)return this._memoryBlobs[e]}else if(l.call(this._storedMap,e)){const t=this._storedMap[e];if(t[0]===r)return this._storedBlob.slice(t[1],t[2])}}set(e,r,t){this._invalidationKeys[e]=r,this._memoryBlobs[e]=t,this._dirty=!0}delete(e){l.call(this._memoryBlobs,e)&&(this._dirty=!0,delete this._memoryBlobs[e]),l.call(this._invalidationKeys,e)&&(this._dirty=!0,delete this._invalidationKeys[e]),l.call(this._storedMap,e)&&(this._dirty=!0,delete this._storedMap[e])}isDirty(){return this._dirty}save(){const e=this._getDump(),r=Buffer.concat(e[0]),t=JSON.stringify(e[1]);try{p(this._directory),i.writeFileSync(this._lockFilename,"LOCK",{flag:"wx"})}catch(e){return!1}try{i.writeFileSync(this._blobFilename,r),i.writeFileSync(this._mapFilename,t)}catch(e){throw e}finally{i.unlinkSync(this._lockFilename)}return!0}_load(){try{this._storedBlob=i.readFileSync(this._blobFilename),this._storedMap=JSON.parse(i.readFileSync(this._mapFilename))}catch(e){this._storedBlob=Buffer.alloc(0),this._storedMap={}}this._dirty=!1,this._memoryBlobs={},this._invalidationKeys={}}_getDump(){const e=[],r={};let t=0;function n(n,o,i){e.push(i),r[n]=[o,t,t+i.length],t+=i.length}for(const e of Object.keys(this._memoryBlobs)){const r=this._memoryBlobs[e];n(e,this._invalidationKeys[e],r)}for(const e of Object.keys(this._storedMap)){if(l.call(r,e))continue;const t=this._storedMap[e],o=this._storedBlob.slice(t[1],t[2]);n(e,t[0],o)}return[e,r]}}class d{constructor(){this._cacheStore=null,this._previousModuleCompile=null}setCacheStore(e){this._cacheStore=e}install(){const e=this,r="function"==typeof t("./node_modules/v8-compile-cache sync recursive").resolve.paths;this._previousModuleCompile=n.prototype._compile,n.prototype._compile=function(t,o){const i=this;function a(e){return i.require(e)}function c(e,r){return n._resolveFilename(e,i,!1,r)}a.resolve=c,r&&(c.paths=function(e){return n._resolveLookupPaths(e,i,!0)}),a.main=process.mainModule,a.extensions=n._extensions,a.cache=n._cache;const l=s.dirname(o),u=e._moduleCompile(o,t),d=[i.exports,a,i,o,l,process,global,Buffer];return u.apply(i.exports,d)}}uninstall(){n.prototype._compile=this._previousModuleCompile}_moduleCompile(e,r){var t=r.length;if(t>=2&&35===r.charCodeAt(0)&&33===r.charCodeAt(1))if(2===t)r="";else{for(var i=2;i<t;++i){var s=r.charCodeAt(i);if(10===s||13===s)break}r=i===t?"":r.slice(i)}var c=n.wrap(r),l=o.createHash("sha1").update(r,"utf8").digest("hex"),u=this._cacheStore.get(e,l),d=new a.Script(c,{filename:e,lineOffset:0,displayErrors:!0,cachedData:u,produceCachedData:!0});return d.cachedDataProduced?this._cacheStore.set(e,l,d.cachedData):d.cachedDataRejected&&this._cacheStore.delete(e),d.runInThisContext({filename:e,lineOffset:0,columnOffset:0,displayErrors:!0})}}function p(e){!function e(r,t){try{i.mkdirSync(r,t)}catch(t){if("ENOENT"===t.code)e(s.dirname(r)),e(r);else try{if(!i.statSync(r).isDirectory())throw t}catch(e){throw t}}}(s.resolve(e),511)}function m(e){const r={"\\":"zB",":":"zC","/":"zS","\0":"z0",z:"zZ"};return e.replace(/[\\:\/\x00z]/g,e=>r[e])}function f(){return!0===new a.Script('""',{produceCachedData:!0}).cachedDataProduced}function h(){const e="function"==typeof process.getuid?"v8-compile-cache-"+process.getuid():"v8-compile-cache",r="string"==typeof process.versions.v8?process.versions.v8:"string"==typeof process.versions.chakracore?"chakracore-"+process.versions.chakracore:"node-"+process.version;return s.join(c.tmpdir(),e,r)}function v(){return e.parent&&"string"==typeof e.parent.filename?e.parent.filename:process.cwd()}if(!process.env.DISABLE_V8_COMPILE_CACHE&&f()){const e=new u(h(),v()),r=new d;r.setCacheStore(e),r.install(),process.once("exit",t=>{e.isDirty()&&e.save(),r.uninstall()})}e.exports.__TEST__={FileSystemBlobStore:u,NativeCompileCache:d,mkdirpSync:p,slashEscape:m,supportsCachedData:f,getCacheDir:h,getParentName:v}},"./node_modules/v8-compile-cache sync recursive":e=>{function r(e){var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}r.keys=()=>[],r.resolve=r,r.id="./node_modules/v8-compile-cache sync recursive",e.exports=r},crypto:e=>{"use strict";e.exports=require("crypto")},fs:e=>{"use strict";e.exports=require("fs")},module:e=>{"use strict";e.exports=require("module")},os:e=>{"use strict";e.exports=require("os")},path:e=>{"use strict";e.exports=require("path")},util:e=>{"use strict";e.exports=require("util")},vm:e=>{"use strict";e.exports=require("vm")}},r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={id:n,loaded:!1,exports:{}};return e[n](o,o.exports,t),o.loaded=!0,o.exports}return t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t("./src/jiti.ts")})().default; |
export declare function isDir(filename: string): boolean; | ||
export declare function interopDefault(ex: any): any; |
{ | ||
"name": "jiti", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "Runtime typescript and ESM support for Node.js (CommonJS)", | ||
@@ -5,0 +5,0 @@ "repository": "nuxt-contrib/jiti", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1143582
4239