tsx 4.12.1 → 4.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/index.cjs +1 -1
- package/dist/cjs/api/index.d.cts +20 -1
- package/dist/cjs/api/index.d.mts +20 -1
- package/dist/cjs/api/index.mjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.mjs +1 -1
- package/dist/cli.cjs +26 -26
- package/dist/cli.mjs +4 -4
- package/dist/{client-CwCkgTEz.mjs → client-BQVF1NaW.mjs} +1 -1
- package/dist/{client-BTjWp1CE.cjs → client-D6NvIMSC.cjs} +1 -1
- package/dist/esm/api/index.cjs +1 -1
- package/dist/esm/api/index.d.cts +1 -3
- package/dist/esm/api/index.d.mts +1 -3
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/index.cjs +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/get-pipe-path-BHW2eJdv.mjs +1 -0
- package/dist/get-pipe-path-BoR10qr8.cjs +1 -0
- package/dist/{index-CJbZ7IJL.mjs → index-CEhzVOC2.mjs} +2 -2
- package/dist/loader.cjs +1 -1
- package/dist/loader.mjs +1 -1
- package/dist/package-GSD7l4b6.cjs +1 -0
- package/dist/package-ZHsh_FJ8.mjs +1 -0
- package/dist/preflight.cjs +1 -1
- package/dist/preflight.mjs +1 -1
- package/dist/register-BPRJR7M6.cjs +2 -0
- package/dist/register-CFdTi8dP.mjs +2 -0
- package/dist/register-C_6Nc_P5.mjs +1 -0
- package/dist/register-CfuJoh3S.cjs +1 -0
- package/dist/repl.cjs +1 -1
- package/dist/repl.mjs +1 -1
- package/dist/require-BZ2WDgiR.cjs +1 -0
- package/dist/require-BaX0y-S3.mjs +1 -0
- package/dist/types-Cxp8y2TL.d.ts +5 -0
- package/package.json +1 -1
- package/dist/get-pipe-path-DSB4_OG7.cjs +0 -1
- package/dist/get-pipe-path-Vzuhiw7V.mjs +0 -1
- package/dist/module-resolve-filename-CKIZs9Xo.mjs +0 -1
- package/dist/module-resolve-filename-b5zPkmr6.cjs +0 -1
- package/dist/package-BBP2Jigj.cjs +0 -1
- package/dist/package-CWsKm-Lk.mjs +0 -1
- package/dist/pkgroll_create-require-B-Pljx_-.cjs +0 -1
- package/dist/pkgroll_create-require-CddX1PP_.mjs +0 -1
- package/dist/register-C6cqI4Lq.mjs +0 -1
- package/dist/register-D4bgqem_.cjs +0 -1
- package/dist/register-RP3mmLDm.cjs +0 -1
- package/dist/register-k7tiHefx.mjs +0 -1
- package/dist/source-map-BkNfvVZg.cjs +0 -2
- package/dist/source-map-Ctni5cdJ.mjs +0 -2
package/dist/esm/api/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MessagePort } from 'node:worker_threads';
|
|
2
|
+
import { R as RequiredProperty } from '../../types-Cxp8y2TL.js';
|
|
2
3
|
|
|
3
4
|
type ScopedImport = (specifier: string, parentURL: string) => Promise<any>;
|
|
4
5
|
|
|
@@ -18,9 +19,6 @@ type NamespacedUnregister = Unregister & {
|
|
|
18
19
|
import: ScopedImport;
|
|
19
20
|
unregister: Unregister;
|
|
20
21
|
};
|
|
21
|
-
type RequiredProperty<Type, Keys extends keyof Type> = Type & {
|
|
22
|
-
[P in Keys]-?: Type[P];
|
|
23
|
-
};
|
|
24
22
|
type Register = {
|
|
25
23
|
(options: RequiredProperty<RegisterOptions, 'namespace'>): NamespacedUnregister;
|
|
26
24
|
(options?: RegisterOptions): Unregister;
|
package/dist/esm/api/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MessagePort } from 'node:worker_threads';
|
|
2
|
+
import { R as RequiredProperty } from '../../types-Cxp8y2TL.js';
|
|
2
3
|
|
|
3
4
|
type ScopedImport = (specifier: string, parentURL: string) => Promise<any>;
|
|
4
5
|
|
|
@@ -18,9 +19,6 @@ type NamespacedUnregister = Unregister & {
|
|
|
18
19
|
import: ScopedImport;
|
|
19
20
|
unregister: Unregister;
|
|
20
21
|
};
|
|
21
|
-
type RequiredProperty<Type, Keys extends keyof Type> = Type & {
|
|
22
|
-
[P in Keys]-?: Type[P];
|
|
23
|
-
};
|
|
24
22
|
type Register = {
|
|
25
23
|
(options: RequiredProperty<RegisterOptions, 'namespace'>): NamespacedUnregister;
|
|
26
24
|
(options?: RegisterOptions): Unregister;
|
package/dist/esm/api/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a=Object.defineProperty;var m=(t,r)=>a(t,"name",{value:r,configurable:!0});import{r as p}from"../../register-C_6Nc_P5.mjs";import"../../get-pipe-path-BHW2eJdv.mjs";import{r as n}from"../../register-CFdTi8dP.mjs";import"../../require-BaX0y-S3.mjs";import"node:module";import"node:worker_threads";import"node:url";import"module";import"node:path";import"../../temporary-directory-CwHp0_NW.mjs";import"node:os";import"get-tsconfig";import"node:fs";import"../../index-CEhzVOC2.mjs";import"esbuild";import"node:crypto";import"../../client-BQVF1NaW.mjs";import"node:net";const s=m((t,r)=>{if(!r||typeof r=="object"&&!r.parentURL)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const o=typeof r=="string",e=o?r:r.parentURL,i=Date.now().toString();return n({namespace:i}),p({namespace:i,...o?{}:r}).import(t,e)},"tsImport");export{p as register,s as tsImport};
|
package/dist/esm/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
The --loader flag was deprecated in Node v20.6.0 and v18.19.0`);
|
|
1
|
+
"use strict";var F=Object.defineProperty;var u=(e,t)=>F(e,"name",{value:t,configurable:!0});var N=require("node:worker_threads"),d=require("../node-features-roYmp9jK.cjs"),S=require("../register-CfuJoh3S.cjs");require("../get-pipe-path-BoR10qr8.cjs"),require("node:module");var q=require("node:path"),w=require("node:url");require("get-tsconfig");var R=require("node:fs");require("esbuild"),require("node:crypto");var y=require("../index-C1vsvhPH.cjs"),T=require("../client-D6NvIMSC.cjs"),i=require("../register-BPRJR7M6.cjs");require("../require-BZ2WDgiR.cjs");var j=require("node:fs/promises");require("module"),require("../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:net");const m={active:!0},O=u(async e=>{if(!e)throw new Error(`tsx must be loaded with --import instead of --loader
|
|
2
|
+
The --loader flag was deprecated in Node v20.6.0 and v18.19.0`);m.namespace=e.namespace,e.tsconfig!==!1&&i.loadTsconfig(e.tsconfig??process.env.TSX_TSCONFIG_PATH),e.port&&(m.port=e.port,e.port.on("message",t=>{t==="deactivate"&&(m.active=!1,e.port.postMessage({type:"deactivated"}))}))},"initialize"),v=u(()=>(i.loadTsconfig(process.env.TSX_TSCONFIG_PATH),"process.setSourceMapsEnabled(true);"),"globalPreload"),g=new Map,L=u(async e=>{if(g.has(e))return g.get(e);if(!await R.promises.access(e).then(()=>!0,()=>!1)){g.set(e,void 0);return}const n=await R.promises.readFile(e,"utf8");try{const o=JSON.parse(n);return g.set(e,o),o}catch{throw new Error(`Error parsing: ${e}`)}},"readPackageJson"),M=u(async e=>{let t=new URL("package.json",e);for(;!t.pathname.endsWith("/node_modules/package.json");){const n=w.fileURLToPath(t),o=await L(n);if(o)return o;const a=t;if(t=new URL("../package.json",t),t.pathname===a.pathname)break}},"findPackageJson"),D=u(async e=>(await M(e))?.type??"commonjs","getPackageType"),J=u(e=>{[e]=e.split("?");const t=q.extname(e);if(t===".json")return"json";if(t===".mjs"||t===".mts")return"module";if(t===".cjs"||t===".cts")return"commonjs"},"getFormatFromExtension"),$=u(e=>{const t=J(e);if(t)return t;if(i.tsExtensionsPattern.test(e))return D(e)},"getFormatFromFileUrl"),h="tsx-namespace=",l=u(e=>{const t=e.indexOf(h);if(t===-1)return;const n=e[t-1];if(n!=="?"&&n!=="&")return;const o=t+h.length,a=e.indexOf("&",o);return a===-1?e.slice(o):e.slice(o,a)},"getNamespace"),P=d.isFeatureSupported(d.importAttributes)?"importAttributes":"importAssertions",A=u(async(e,t,n)=>{if(!m.active)return n(e,t);const o=l(e);if(m.namespace&&m.namespace!==o)return n(e,t);if(m.port){const r=new URL(e);r.searchParams.delete("tsx-namespace"),m.port.postMessage({type:"load",url:r.toString()})}T.parent.send&&T.parent.send({type:"dependency",path:e}),i.isJsonPattern.test(e)&&(t[P]||(t[P]={}),t[P].type="json");const a=await n(e,t),p=e.startsWith("file://")?w.fileURLToPath(e):e;if(a.format==="commonjs"&&d.isFeatureSupported(d.esmLoadReadFile)&&a.responseURL?.startsWith("file:")&&!p.endsWith(".cjs")){const r=await y.transform(await j.readFile(new URL(e),"utf8"),p,{format:"cjs",platform:"node"}),c=new URLSearchParams({filePath:p});return o&&c.set("namespace",o),a.responseURL=`data:text/javascript,${encodeURIComponent(r.code)}?${c.toString()}`,a}if(!a.source)return a;const s=a.source.toString();if(a.format==="json"||i.tsExtensionsPattern.test(e)){const r=await y.transform(s,p,{tsconfigRaw:i.fileMatcher?.(p)});return{format:"module",source:i.inlineSourceMap(r)}}if(a.format==="module"){const r=y.transformDynamicImport(p,s);r&&(a.source=i.inlineSourceMap(r))}return a},"load"),_=u(async e=>(!e.format&&e.url.startsWith(i.fileUrlPrefix)&&(e.format=await $(e.url)),e),"resolveMissingFormat"),I=[".js",".json",".ts",".tsx",".jsx"],E=u(async(e,t,n)=>{const[o,a]=e.split("?");let p;for(const s of I)try{return await _(await n(o+s+(a?`?${a}`:""),t))}catch(r){if(p===void 0&&r instanceof Error){const{message:c}=r;r.message=r.message.replace(`${s}'`,"'"),r.stack=r.stack.replace(c,r.message),p=r}}throw p},"tryExtensions"),k=u(async(e,t,n)=>{const o=i.isDirectoryPattern.test(e),a=o?"index":"/index",[p,s]=e.split("?");try{return await E(p+a+(s?`?${s}`:""),t,n)}catch(r){if(!o)try{return await E(e,t,n)}catch{}const c=r,{message:f}=c;throw c.message=c.message.replace(`${a.replace("/",q.sep)}'`,"'"),c.stack=c.stack.replace(f,c.message),c}},"tryDirectory"),U=u(async(e,t,n,o)=>{if(!m.active)return n(e,t);const a=t.parentURL&&l(t.parentURL);if(i.requestAcceptsQuery(e)){let s=l(e);if(a&&!s&&(s=a,e+=`${e.includes("?")?"&":"?"}${h}${a}`),m.namespace&&m.namespace!==s)return n(e,t);if(i.isDirectoryPattern.test(e))return await k(e,t,n)}else if(i.tsconfigPathsMatcher&&!t.parentURL?.includes("/node_modules/")){const s=i.tsconfigPathsMatcher(e);for(const r of s)try{return await U(w.pathToFileURL(r).toString(),t,n)}catch{}}if(!i.isBarePackageName.test(e)&&(i.tsExtensionsPattern.test(t.parentURL)||i.allowJs)){const s=i.resolveTsPath(e);if(s)for(const r of s)try{return await _(await n(r,t))}catch(c){const{code:f}=c;if(f!=="ERR_MODULE_NOT_FOUND"&&f!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw c}}try{const s=await _(await n(e,t));if(i.requestAcceptsQuery(s.url)){const r=l(s.url);a&&!r&&(s.url+=`${s.url.includes("?")?"&":"?"}${h}${a}`)}return s}catch(s){if(s instanceof Error&&!o){const{code:r}=s;if(r==="ERR_UNSUPPORTED_DIR_IMPORT")try{return await k(e,t,n)}catch(c){if(c.code!=="ERR_PACKAGE_IMPORT_NOT_DEFINED")throw c}if(r==="ERR_MODULE_NOT_FOUND")try{return await E(e,t,n)}catch{}}throw s}},"resolve");d.isFeatureSupported(d.moduleRegister)&&N.isMainThread&&S.register(),exports.globalPreload=v,exports.initialize=O,exports.load=A,exports.resolve=U;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var L=Object.defineProperty;var i=(t,a)=>L(t,"name",{value:a,configurable:!0});import{isMainThread as
|
|
2
|
-
The --loader flag was deprecated in Node v20.6.0 and v18.19.0`);
|
|
1
|
+
var L=Object.defineProperty;var i=(t,a)=>L(t,"name",{value:a,configurable:!0});import{isMainThread as D}from"node:worker_threads";import{i as h,a as M,e as $,m as A}from"../node-features-_8ZFwP_x.mjs";import{r as I}from"../register-C_6Nc_P5.mjs";import"../get-pipe-path-BHW2eJdv.mjs";import"node:module";import _ from"node:path";import{fileURLToPath as E,pathToFileURL as b}from"node:url";import"get-tsconfig";import R from"node:fs";import"esbuild";import"node:crypto";import{t as k,a as W}from"../index-CEhzVOC2.mjs";import{p as T}from"../client-BQVF1NaW.mjs";import{l as U,t as w,a as v,b as j,f as C,c as N,d as O,e as Q,g as q,h as G,j as H,k as F}from"../register-CFdTi8dP.mjs";import"../require-BaX0y-S3.mjs";import{readFile as X}from"node:fs/promises";import"module";import"../temporary-directory-CwHp0_NW.mjs";import"node:os";import"node:net";const p={active:!0},B=i(async t=>{if(!t)throw new Error(`tsx must be loaded with --import instead of --loader
|
|
2
|
+
The --loader flag was deprecated in Node v20.6.0 and v18.19.0`);p.namespace=t.namespace,t.tsconfig!==!1&&U(t.tsconfig??process.env.TSX_TSCONFIG_PATH),t.port&&(p.port=t.port,t.port.on("message",a=>{a==="deactivate"&&(p.active=!1,t.port.postMessage({type:"deactivated"}))}))},"initialize"),K=i(()=>(U(process.env.TSX_TSCONFIG_PATH),"process.setSourceMapsEnabled(true);"),"globalPreload"),d=new Map,z=i(async t=>{if(d.has(t))return d.get(t);if(!await R.promises.access(t).then(()=>!0,()=>!1)){d.set(t,void 0);return}const o=await R.promises.readFile(t,"utf8");try{const n=JSON.parse(o);return d.set(t,n),n}catch{throw new Error(`Error parsing: ${t}`)}},"readPackageJson"),x=i(async t=>{let a=new URL("package.json",t);for(;!a.pathname.endsWith("/node_modules/package.json");){const o=E(a),n=await z(o);if(n)return n;const e=a;if(a=new URL("../package.json",a),a.pathname===e.pathname)break}},"findPackageJson"),V=i(async t=>(await x(t))?.type??"commonjs","getPackageType"),Y=i(t=>{[t]=t.split("?");const a=_.extname(t);if(a===".json")return"json";if(a===".mjs"||a===".mts")return"module";if(a===".cjs"||a===".cts")return"commonjs"},"getFormatFromExtension"),Z=i(t=>{const a=Y(t);if(a)return a;if(w.test(t))return V(t)},"getFormatFromFileUrl"),u="tsx-namespace=",g=i(t=>{const a=t.indexOf(u);if(a===-1)return;const o=t[a-1];if(o!=="?"&&o!=="&")return;const n=a+u.length,e=t.indexOf("&",n);return e===-1?t.slice(n):t.slice(n,e)},"getNamespace"),y=h(M)?"importAttributes":"importAssertions",tt=i(async(t,a,o)=>{if(!p.active)return o(t,a);const n=g(t);if(p.namespace&&p.namespace!==n)return o(t,a);if(p.port){const s=new URL(t);s.searchParams.delete("tsx-namespace"),p.port.postMessage({type:"load",url:s.toString()})}T.send&&T.send({type:"dependency",path:t}),v.test(t)&&(a[y]||(a[y]={}),a[y].type="json");const e=await o(t,a),m=t.startsWith("file://")?E(t):t;if(e.format==="commonjs"&&h($)&&e.responseURL?.startsWith("file:")&&!m.endsWith(".cjs")){const s=await k(await X(new URL(t),"utf8"),m,{format:"cjs",platform:"node"}),c=new URLSearchParams({filePath:m});return n&&c.set("namespace",n),e.responseURL=`data:text/javascript,${encodeURIComponent(s.code)}?${c.toString()}`,e}if(!e.source)return e;const r=e.source.toString();if(e.format==="json"||w.test(t)){const s=await k(r,m,{tsconfigRaw:C?.(m)});return{format:"module",source:j(s)}}if(e.format==="module"){const s=W(m,r);s&&(e.source=j(s))}return e},"load"),l=i(async t=>(!t.format&&t.url.startsWith(H)&&(t.format=await Z(t.url)),t),"resolveMissingFormat"),at=[".js",".json",".ts",".tsx",".jsx"],P=i(async(t,a,o)=>{const[n,e]=t.split("?");let m;for(const r of at)try{return await l(await o(n+r+(e?`?${e}`:""),a))}catch(s){if(m===void 0&&s instanceof Error){const{message:c}=s;s.message=s.message.replace(`${r}'`,"'"),s.stack=s.stack.replace(c,s.message),m=s}}throw m},"tryExtensions"),S=i(async(t,a,o)=>{const n=O.test(t),e=n?"index":"/index",[m,r]=t.split("?");try{return await P(m+e+(r?`?${r}`:""),a,o)}catch(s){if(!n)try{return await P(t,a,o)}catch{}const c=s,{message:f}=c;throw c.message=c.message.replace(`${e.replace("/",_.sep)}'`,"'"),c.stack=c.stack.replace(f,c.message),c}},"tryDirectory"),J=i(async(t,a,o,n)=>{if(!p.active)return o(t,a);const e=a.parentURL&&g(a.parentURL);if(N(t)){let r=g(t);if(e&&!r&&(r=e,t+=`${t.includes("?")?"&":"?"}${u}${e}`),p.namespace&&p.namespace!==r)return o(t,a);if(O.test(t))return await S(t,a,o)}else if(F&&!a.parentURL?.includes("/node_modules/")){const r=F(t);for(const s of r)try{return await J(b(s).toString(),a,o)}catch{}}if(!Q.test(t)&&(w.test(a.parentURL)||q)){const r=G(t);if(r)for(const s of r)try{return await l(await o(s,a))}catch(c){const{code:f}=c;if(f!=="ERR_MODULE_NOT_FOUND"&&f!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw c}}try{const r=await l(await o(t,a));if(N(r.url)){const s=g(r.url);e&&!s&&(r.url+=`${r.url.includes("?")?"&":"?"}${u}${e}`)}return r}catch(r){if(r instanceof Error&&!n){const{code:s}=r;if(s==="ERR_UNSUPPORTED_DIR_IMPORT")try{return await S(t,a,o)}catch(c){if(c.code!=="ERR_PACKAGE_IMPORT_NOT_DEFINED")throw c}if(s==="ERR_MODULE_NOT_FOUND")try{return await P(t,a,o)}catch{}}throw r}},"resolve");h(A)&&D&&I();export{K as globalPreload,B as initialize,tt as load,J as resolve};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var p=Object.defineProperty;var e=(t,r)=>p(t,"name",{value:r,configurable:!0});import{createRequire as o}from"module";import a from"node:path";import{t as s}from"./temporary-directory-CwHp0_NW.mjs";var m=o(import.meta.url);const i=process.platform==="win32",n=e(t=>{const r=a.join(s,`${t}.pipe`);return i?`\\\\?\\pipe\\${r}`:r},"getPipePath");export{n as g,i,m as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var t=(r,e)=>u(r,"name",{value:e,configurable:!0});var d=require("module"),n=require("node:path"),p=require("./temporary-directory-B83uKxJF.cjs"),s=typeof document<"u"?document.currentScript:null,o=require;const i=process.platform==="win32",c=t(r=>{const e=n.join(p.tmpdir,`${r}.pipe`);return i?`\\\\?\\pipe\\${e}`:e},"getPipePath");exports.getPipePath=c,exports.isWindows=i,exports.require=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var jt=Object.defineProperty;var l=(n,e)=>jt(n,"name",{value:e,configurable:!0});import{pathToFileURL as Pt}from"node:url";import{version as Je,
|
|
1
|
+
var jt=Object.defineProperty;var l=(n,e)=>jt(n,"name",{value:e,configurable:!0});import{pathToFileURL as Pt}from"node:url";import{version as Je,transform as Tt,transformSync as $t}from"esbuild";import Wt from"node:crypto";import F from"node:fs";import $ from"node:path";import Zt from"node:os";import{t as Vt}from"./temporary-directory-CwHp0_NW.mjs";const Re=l(n=>Wt.createHash("sha1").update(n).digest("hex"),"sha1"),ve=44,zt=59,xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fe=new Uint8Array(64),Ge=new Uint8Array(128);for(let n=0;n<xe.length;n++){const e=xe.charCodeAt(n);Fe[n]=e,Ge[e]=n}const de=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(n){return Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString()}}:{decode(n){let e="";for(let A=0;A<n.length;A++)e+=String.fromCharCode(n[A]);return e}};function eA(n){const e=new Int32Array(5),A=[];let i=0;do{const s=tA(n,i),a=[];let c=!0,C=0;e[0]=0;for(let u=i;u<s;u++){let g;u=W(n,u,e,0);const f=e[0];f<C&&(c=!1),C=f,Ue(n,u,s)?(u=W(n,u,e,1),u=W(n,u,e,2),u=W(n,u,e,3),Ue(n,u,s)?(u=W(n,u,e,4),g=[f,e[1],e[2],e[3],e[4]]):g=[f,e[1],e[2],e[3]]):g=[f],a.push(g)}c||AA(a),A.push(a),i=s+1}while(i<=n.length);return A}l(eA,"decode");function tA(n,e){const A=n.indexOf(";",e);return A===-1?n.length:A}l(tA,"indexOf");function W(n,e,A,i){let s=0,a=0,c=0;do{const u=n.charCodeAt(e++);c=Ge[u],s|=(c&31)<<a,a+=5}while(c&32);const C=s&1;return s>>>=1,C&&(s=-2147483648|-s),A[i]+=s,e}l(W,"decodeInteger");function Ue(n,e,A){return e>=A?!1:n.charCodeAt(e)!==ve}l(Ue,"hasMoreVlq");function AA(n){n.sort(rA)}l(AA,"sort");function rA(n,e){return n[0]-e[0]}l(rA,"sortComparator$1");function Me(n){const e=new Int32Array(5),A=1024*16,i=A-36,s=new Uint8Array(A),a=s.subarray(0,i);let c=0,C="";for(let u=0;u<n.length;u++){const g=n[u];if(u>0&&(c===A&&(C+=de.decode(s),c=0),s[c++]=zt),g.length!==0){e[0]=0;for(let f=0;f<g.length;f++){const r=g[f];c>i&&(C+=de.decode(a),s.copyWithin(0,i,c),c-=i),f>0&&(s[c++]=ve),c=Z(s,c,e,r,0),r.length!==1&&(c=Z(s,c,e,r,1),c=Z(s,c,e,r,2),c=Z(s,c,e,r,3),r.length!==4&&(c=Z(s,c,e,r,4)))}}}return C+de.decode(s.subarray(0,c))}l(Me,"encode");function Z(n,e,A,i,s){const a=i[s];let c=a-A[s];A[s]=a,c=c<0?-c<<1|1:c<<1;do{let C=c&31;c>>>=5,c>0&&(C|=32),n[e++]=Fe[C]}while(c>0);return e}l(Z,"encodeInteger");class ae{static{l(this,"BitSet")}constructor(e){this.bits=e instanceof ae?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class te{static{l(this,"Chunk")}constructor(e,A,i){this.start=e,this.end=A,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new te(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let A=this;for(;A;)e(A),A=A.next}eachPrevious(e){let A=this;for(;A;)e(A),A=A.previous}edit(e,A,i){return this.content=e,i||(this.intro="",this.outro=""),this.storeName=A,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const A=e-this.start,i=this.original.slice(0,A),s=this.original.slice(A);this.original=i;const a=new te(e,this.end,s);return a.outro=this.outro,this.outro="",this.end=e,this.edited?(a.edit("",!1),this.content=""):this.content=i,a.next=this.next,a.next&&(a.next.previous=a),a.previous=this,this.next=a,a}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const A=this.content.replace(e,"");if(A.length)return A!==this.content&&(this.split(this.start+A.length).edit("",void 0,!0),this.edited&&this.edit(A,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const A=this.content.replace(e,"");if(A.length){if(A!==this.content){const i=this.split(this.end-A.length);this.edited&&i.edit(A,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}}function iA(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?n=>globalThis.btoa(unescape(encodeURIComponent(n))):typeof Buffer=="function"?n=>Buffer.from(n,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}l(iA,"getBtoa");const nA=iA();let sA=class{static{l(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Me(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+nA(this.toString())}};function oA(n){const e=n.split(`
|
|
2
2
|
`),A=e.filter(a=>/^\t+/.test(a)),i=e.filter(a=>/^ {2,}/.test(a));if(A.length===0&&i.length===0)return null;if(A.length>=i.length)return" ";const s=i.reduce((a,c)=>{const C=/^ +/.exec(c)[0].length;return Math.min(C,a)},1/0);return new Array(s+1).join(" ")}l(oA,"guessIndent");function aA(n,e){const A=n.split(/[/\\]/),i=e.split(/[/\\]/);for(A.pop();A[0]===i[0];)A.shift(),i.shift();if(A.length){let s=A.length;for(;s--;)A[s]=".."}return A.concat(i).join("/")}l(aA,"getRelativePath");const cA=Object.prototype.toString;function QA(n){return cA.call(n)==="[object Object]"}l(QA,"isObject");function Ye(n){const e=n.split(`
|
|
3
3
|
`),A=[];for(let i=0,s=0;i<e.length;i++)A.push(s),s+=e[i].length+1;return l(function(s){let a=0,c=A.length;for(;a<c;){const g=a+c>>1;s<A[g]?c=g:a=g+1}const C=a-1,u=s-A[C];return{line:C,column:u}},"locate")}l(Ye,"getLocator");const hA=/\w/;class lA{static{l(this,"Mappings")}constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,A,i,s){if(A.length){const a=A.length-1;let c=A.indexOf(`
|
|
4
4
|
`,0),C=-1;for(;c>=0&&a>c;){const g=[this.generatedCodeColumn,e,i.line,i.column];s>=0&&g.push(s),this.rawSegments.push(g),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,C=c,c=A.indexOf(`
|
|
@@ -13,4 +13,4 @@ var jt=Object.defineProperty;var l=(n,e)=>jt(n,"name",{value:e,configurable:!0})
|
|
|
13
13
|
`;case 114:return"\r";case 120:return String.fromCharCode(pe(2));case 117:return function(){const e=S.charCodeAt(I);let A;return e===123?(++I,A=pe(S.indexOf("}",I)-I),++I,A>1114111&&U()):A=pe(4),A<=65535?String.fromCharCode(A):(A-=65536,String.fromCharCode(55296+(A>>10),56320+(1023&A)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:S.charCodeAt(I)===10&&++I;case 10:return"";case 56:case 57:U();default:if(n>=48&&n<=55){let e=S.substr(I-1,3).match(/^[0-7]+/)[0],A=parseInt(e,8);return A>255&&(e=e.slice(0,-1),A=parseInt(e,8)),I+=e.length-1,n=S.charCodeAt(I),e==="0"&&n!==56&&n!==57||U(),String.fromCharCode(A)}return je(n)?"":String.fromCharCode(n)}}l(EA,"k");function pe(n){const e=I;let A=0,i=0;for(let s=0;s<n;++s,++I){let a,c=S.charCodeAt(I);if(c!==95){if(c>=97)a=c-97+10;else if(c>=65)a=c-65+10;else{if(!(c>=48&&c<=57))break;a=c-48}if(a>=16)break;i=c,A=16*A+a}else i!==95&&s!==0||U(),i=c}return i!==95&&I-e===n||U(),A}l(pe,"l");function je(n){return n===13||n===10}l(je,"u");function U(){throw Object.assign(Error(`Parse error ${Xe}:${S.slice(0,I).split(`
|
|
14
14
|
`).length}:${I-S.lastIndexOf(`
|
|
15
15
|
`,I-1)}`),{idx:I})}l(U,"o");let Pe=!1;_e.then(()=>{Pe=!0});const Te=l((n,e)=>Pe?Oe(n,e):BA(n,e),"parseEsm"),$e="2",dA=(n=>{const e="default";return n[e]&&typeof n[e]=="object"&&"__esModule"in n[e]?n[e]:n}).toString(),wA=`.then(${dA})`,be=l((n,e,A)=>{if(A){if(!e.includes("import("))return}else if(!e.includes("import"))return;const s=Te(e,n)[0].filter(u=>u.d>-1);if(s.length===0)return;const a=new De(e);for(const u of s)a.appendRight(u.se,wA);const c=a.toString(),C=a.generateMap({source:n,includeContent:!1,hires:"boundary"});return{code:c,map:C}},"transformDynamicImport"),IA=l(n=>{try{const e=F.readFileSync(n,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),We=l(()=>{},"noop"),Ze=l(()=>Math.floor(Date.now()/1e8),"getTime");class kA extends Map{static{l(this,"FileCache")}cacheDirectory=Vt;oldCacheDirectory=$.join(Zt.tmpdir(),"tsx");cacheFiles;constructor(){super(),F.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=F.readdirSync(this.cacheDirectory).map(e=>{const[A,i]=e.split("-");return{time:Number(A),key:i,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const A=super.get(e);if(A)return A;const i=this.cacheFiles.find(c=>c.key===e);if(!i)return;const s=$.join(this.cacheDirectory,i.fileName),a=IA(s);if(!a){F.promises.unlink(s).then(()=>{const c=this.cacheFiles.indexOf(i);this.cacheFiles.splice(c,1)},()=>{});return}return super.set(e,a),a}set(e,A){if(super.set(e,A),A){const i=Ze();F.promises.writeFile($.join(this.cacheDirectory,`${i}-${e}`),JSON.stringify(A)).catch(We)}return this}expireDiskCache(){const e=Ze();for(const A of this.cacheFiles)e-A.time>7&&F.promises.unlink($.join(this.cacheDirectory,A.fileName)).catch(We)}async removeOldCacheDirectory(){try{await F.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in F.promises?await F.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await F.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var ne=process.env.TSX_DISABLE_CACHE?new Map:new kA;const pA=/^[\w+.-]+:\/\//,bA=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,mA=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function DA(n){return pA.test(n)}l(DA,"isAbsoluteUrl");function yA(n){return n.startsWith("//")}l(yA,"isSchemeRelativeUrl");function Ve(n){return n.startsWith("/")}l(Ve,"isAbsolutePath");function KA(n){return n.startsWith("file:")}l(KA,"isFileUrl");function ze(n){return/^[.?#]/.test(n)}l(ze,"isRelative");function se(n){const e=bA.exec(n);return et(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}l(se,"parseAbsoluteUrl");function SA(n){const e=mA.exec(n),A=e[2];return et("file:","",e[1]||"","",Ve(A)?A:"/"+A,e[3]||"",e[4]||"")}l(SA,"parseFileUrl");function et(n,e,A,i,s,a,c){return{scheme:n,user:e,host:A,port:i,path:s,query:a,hash:c,type:7}}l(et,"makeUrl");function tt(n){if(yA(n)){const A=se("http:"+n);return A.scheme="",A.type=6,A}if(Ve(n)){const A=se("http://foo.com"+n);return A.scheme="",A.host="",A.type=5,A}if(KA(n))return SA(n);if(DA(n))return se(n);const e=se("http://foo.com/"+n);return e.scheme="",e.host="",e.type=n?n.startsWith("?")?3:n.startsWith("#")?2:4:1,e}l(tt,"parseUrl");function NA(n){if(n.endsWith("/.."))return n;const e=n.lastIndexOf("/");return n.slice(0,e+1)}l(NA,"stripPathFilename");function LA(n,e){At(e,e.type),n.path==="/"?n.path=e.path:n.path=NA(e.path)+n.path}l(LA,"mergePaths");function At(n,e){const A=e<=4,i=n.path.split("/");let s=1,a=0,c=!1;for(let u=1;u<i.length;u++){const g=i[u];if(!g){c=!0;continue}if(c=!1,g!=="."){if(g===".."){a?(c=!0,a--,s--):A&&(i[s++]=g);continue}i[s++]=g,a++}}let C="";for(let u=1;u<s;u++)C+="/"+i[u];(!C||c&&!C.endsWith("/.."))&&(C+="/"),n.path=C}l(At,"normalizePath");function JA(n,e){if(!n&&!e)return"";const A=tt(n);let i=A.type;if(e&&i!==7){const a=tt(e),c=a.type;switch(i){case 1:A.hash=a.hash;case 2:A.query=a.query;case 3:case 4:LA(A,a);case 5:A.user=a.user,A.host=a.host,A.port=a.port;case 6:A.scheme=a.scheme}c>i&&(i=c)}At(A,i);const s=A.query+A.hash;switch(i){case 2:case 3:return s;case 4:{const a=A.path.slice(1);return a?ze(e||n)&&!ze(a)?"./"+a+s:a+s:s||"."}case 5:return A.path+s;default:return A.scheme+"//"+A.user+A.host+A.port+A.path+s}}l(JA,"resolve$1");function rt(n,e){return e&&!e.endsWith("/")&&(e+="/"),JA(n,e)}l(rt,"resolve");function RA(n){if(!n)return"";const e=n.lastIndexOf("/");return n.slice(0,e+1)}l(RA,"stripFilename");const Y=0;function vA(n,e){const A=it(n,0);if(A===n.length)return n;e||(n=n.slice());for(let i=A;i<n.length;i=it(n,i+1))n[i]=FA(n[i],e);return n}l(vA,"maybeSort");function it(n,e){for(let A=e;A<n.length;A++)if(!xA(n[A]))return A;return n.length}l(it,"nextUnsortedSegmentLine");function xA(n){for(let e=1;e<n.length;e++)if(n[e][Y]<n[e-1][Y])return!1;return!0}l(xA,"isSorted");function FA(n,e){return e||(n=n.slice()),n.sort(GA)}l(FA,"sortSegments");function GA(n,e){return n[Y]-e[Y]}l(GA,"sortComparator");let oe=!1;function UA(n,e,A,i){for(;A<=i;){const s=A+(i-A>>1),a=n[s][Y]-e;if(a===0)return oe=!0,s;a<0?A=s+1:i=s-1}return oe=!1,A-1}l(UA,"binarySearch");function MA(n,e,A){for(let i=A-1;i>=0&&n[i][Y]===e;A=i--);return A}l(MA,"lowerBound");function YA(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}l(YA,"memoizedState");function qA(n,e,A,i){const{lastKey:s,lastNeedle:a,lastIndex:c}=A;let C=0,u=n.length-1;if(i===s){if(e===a)return oe=c!==-1&&n[c][Y]===e,c;e>=a?C=c===-1?0:c:u=c}return A.lastKey=i,A.lastNeedle=e,A.lastIndex=UA(n,e,C,u)}l(qA,"memoizedBinarySearch");class nt{static{l(this,"TraceMap")}constructor(e,A){const i=typeof e=="string";if(!i&&e._decodedMemo)return e;const s=i?JSON.parse(e):e,{version:a,file:c,names:C,sourceRoot:u,sources:g,sourcesContent:f}=s;this.version=a,this.file=c,this.names=C||[],this.sourceRoot=u,this.sources=g,this.sourcesContent=f,this.ignoreList=s.ignoreList||s.x_google_ignoreList||void 0;const r=rt(u||"",RA(A));this.resolvedSources=g.map(D=>rt(D||"",r));const{mappings:m}=s;typeof m=="string"?(this._encoded=m,this._decoded=void 0):(this._encoded=void 0,this._decoded=vA(m,i)),this._decodedMemo=YA(),this._bySources=void 0,this._bySourceMemos=void 0}}function yr(n){return n}l(yr,"cast$2");function st(n){var e;return(e=n)._decoded||(e._decoded=eA(n._encoded))}l(st,"decodedMappings");function OA(n,e,A){const i=st(n);if(e>=i.length)return null;const s=i[e],a=_A(s,n._decodedMemo,e,A);return a===-1?null:s[a]}l(OA,"traceSegment");function _A(n,e,A,i,s){let a=qA(n,i,e,A);return oe&&(a=MA(n,i,a)),a===-1||a===n.length?-1:a}l(_A,"traceSegmentInternal");class me{static{l(this,"SetArray")}constructor(){this._indexes={__proto__:null},this.array=[]}}function Kr(n){return n}l(Kr,"cast$1");function ot(n,e){return n._indexes[e]}l(ot,"get");function ee(n,e){const A=ot(n,e);if(A!==void 0)return A;const{array:i,_indexes:s}=n,a=i.push(e);return s[e]=a-1}l(ee,"put");function HA(n,e){const A=ot(n,e);if(A===void 0)return;const{array:i,_indexes:s}=n;for(let a=A+1;a<i.length;a++){const c=i[a];i[a-1]=c,s[c]--}s[e]=void 0,i.pop()}l(HA,"remove");const XA=0,jA=1,PA=2,TA=3,$A=4,at=-1;class WA{static{l(this,"GenMapping")}constructor({file:e,sourceRoot:A}={}){this._names=new me,this._sources=new me,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=A,this._ignoreList=new me}}function Sr(n){return n}l(Sr,"cast");const ZA=l((n,e,A,i,s,a,c,C)=>tr(!0,n,e,A,i,s,a,c),"maybeAddSegment");function VA(n,e,A){const{_sources:i,_sourcesContent:s}=n,a=ee(i,e);s[a]=A}l(VA,"setSourceContent");function zA(n,e,A=!0){const{_sources:i,_sourcesContent:s,_ignoreList:a}=n,c=ee(i,e);c===s.length&&(s[c]=null),A?ee(a,c):HA(a,c)}l(zA,"setIgnore");function ct(n){const{_mappings:e,_sources:A,_sourcesContent:i,_names:s,_ignoreList:a}=n;return ir(e),{version:3,file:n.file||void 0,names:s.array,sourceRoot:n.sourceRoot||void 0,sources:A.array,sourcesContent:i,mappings:e,ignoreList:a.array}}l(ct,"toDecodedMap");function er(n){const e=ct(n);return Object.assign(Object.assign({},e),{mappings:Me(e.mappings)})}l(er,"toEncodedMap");function tr(n,e,A,i,s,a,c,C,u){const{_mappings:g,_sources:f,_sourcesContent:r,_names:m}=e,D=Ar(g,A),p=rr(D,i);if(!s)return nr(D,p)?void 0:Qt(D,p,[i]);const N=ee(f,s),x=C?ee(m,C):at;if(N===r.length&&(r[N]=null),!sr(D,p,N,a,c,x))return Qt(D,p,C?[i,N,a,c,x]:[i,N,a,c])}l(tr,"addSegmentInternal");function Ar(n,e){for(let A=n.length;A<=e;A++)n[A]=[];return n[e]}l(Ar,"getLine");function rr(n,e){let A=n.length;for(let i=A-1;i>=0;A=i--){const s=n[i];if(e>=s[XA])break}return A}l(rr,"getColumnIndex");function Qt(n,e,A){for(let i=n.length;i>e;i--)n[i]=n[i-1];n[e]=A}l(Qt,"insert");function ir(n){const{length:e}=n;let A=e;for(let i=A-1;i>=0&&!(n[i].length>0);A=i,i--);A<e&&(n.length=A)}l(ir,"removeEmptyFinalLines");function nr(n,e){return e===0?!0:n[e-1].length===1}l(nr,"skipSourceless");function sr(n,e,A,i,s,a){if(e===0)return!1;const c=n[e-1];return c.length===1?!1:A===c[jA]&&i===c[PA]&&s===c[TA]&&a===(c.length===5?c[$A]:at)}l(sr,"skipSource");const ht=lt("",-1,-1,"",null,!1),or=[];function lt(n,e,A,i,s,a){return{source:n,line:e,column:A,name:i,content:s,ignore:a}}l(lt,"SegmentObject");function ft(n,e,A,i,s){return{map:n,sources:e,source:A,content:i,ignore:s}}l(ft,"Source");function ut(n,e){return ft(n,e,"",null,!1)}l(ut,"MapSource");function ar(n,e,A){return ft(null,or,n,e,A)}l(ar,"OriginalSource");function cr(n){const e=new WA({file:n.map.file}),{sources:A,map:i}=n,s=i.names,a=st(i);for(let c=0;c<a.length;c++){const C=a[c];for(let u=0;u<C.length;u++){const g=C[u],f=g[0];let r=ht;if(g.length!==1){const X=A[g[1]];if(r=gt(X,g[2],g[3],g.length===5?s[g[4]]:""),r==null)continue}const{column:m,line:D,name:p,content:N,source:x,ignore:q}=r;ZA(e,c,f,x,D,m,p),x&&N!=null&&VA(e,x,N),q&&zA(e,x,!0)}}return e}l(cr,"traceMappings");function gt(n,e,A,i){if(!n.map)return lt(n.source,e,A,i,n.content,n.ignore);const s=OA(n.map,e,A);return s==null?null:s.length===1?ht:gt(n.sources[s[1]],s[2],s[3],s.length===5?n.map.names[s[4]]:i)}l(gt,"originalPositionFor");function Qr(n){return Array.isArray(n)?n:[n]}l(Qr,"asArray");function hr(n,e){const A=Qr(n).map(a=>new nt(a,"")),i=A.pop();for(let a=0;a<A.length;a++)if(A[a].sources.length>1)throw new Error(`Transformation map ${a} must have exactly one source file.
|
|
16
|
-
Did you specify these with the most recent transformation maps first?`);let s=Ct(i,e,"",0);for(let a=A.length-1;a>=0;a--)s=ut(A[a],[s]);return s}l(hr,"buildSourceMapTree");function Ct(n,e,A,i){const{resolvedSources:s,sourcesContent:a,ignoreList:c}=n,C=i+1,u=s.map((g,f)=>{const r={importer:A,depth:C,source:g||"",content:void 0,ignore:void 0},m=e(r.source,r),{source:D,content:p,ignore:N}=r;if(m)return Ct(new nt(m,D),e,D,C);const x=p!==void 0?p:a?a[f]:null,q=N!==void 0?N:c?c.includes(f):!1;return ar(D,x,q)});return ut(n,u)}l(Ct,"build");class lr{static{l(this,"SourceMap")}constructor(e,A){const i=A.decodedMappings?ct(e):er(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,A.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function Bt(n,e,A){const i={excludeContent:!!A,decodedMappings:!1},s=hr(n,e);return new lr(cr(s),i)}l(Bt,"remapping");const fr=l((n,e,A)=>{const i=[],s={code:e};for(const a of A){const c=a(n,s.code);c&&(Object.assign(s,c),i.unshift(c.map))}return{...s,map:Bt(i,()=>null)}},"applyTransformersSync"),ur=l(async(n,e,A)=>{const i=[],s={code:e};for(const a of A){const c=await a(n,s.code);c&&(Object.assign(s,c),i.unshift(c.map))}return{...s,map:Bt(i,()=>null)}},"applyTransformers"),gr=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),Et={...gr,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE,minifyWhitespace:!0,keepNames:!0},dt=l(n=>{const e=n.sourcefile;if(e){const A=$.extname(e.split("?")[0]);A?A===".cts"||A===".mts"?n.sourcefile=`${e.slice(0,-3)}ts`:A===".mjs"&&(n.sourcefile=`${e.slice(0,-3)}js`):n.sourcefile+=".js"}return A=>(A.map&&(n.sourcefile!==e&&(A.map=A.map.replace(JSON.stringify(n.sourcefile),JSON.stringify(e))),A.map=JSON.parse(A.map)),A)},"patchOptions"),wt=l(n=>{throw n.name="TransformError",delete n.errors,delete n.warnings,n},"formatEsbuildError"),Cr=l((n,e,A)=>{const[i,s]=e.split("?"),a={};i.endsWith(".cjs")||i.endsWith(".cts")||(a["import.meta.url"]=JSON.stringify(Pt(i)+(s?`?${s}`:"")));const c={...Et,format:"cjs",sourcefile:i,define:a,banner:"(()=>{",footer:"})()",...A},C=Re([n,JSON.stringify(c),Je,$e].join("-"));let u=ne.get(C);return u||(u=fr(e,n,[(g,f)=>{const r=dt(c);let m;try{m
|
|
16
|
+
Did you specify these with the most recent transformation maps first?`);let s=Ct(i,e,"",0);for(let a=A.length-1;a>=0;a--)s=ut(A[a],[s]);return s}l(hr,"buildSourceMapTree");function Ct(n,e,A,i){const{resolvedSources:s,sourcesContent:a,ignoreList:c}=n,C=i+1,u=s.map((g,f)=>{const r={importer:A,depth:C,source:g||"",content:void 0,ignore:void 0},m=e(r.source,r),{source:D,content:p,ignore:N}=r;if(m)return Ct(new nt(m,D),e,D,C);const x=p!==void 0?p:a?a[f]:null,q=N!==void 0?N:c?c.includes(f):!1;return ar(D,x,q)});return ut(n,u)}l(Ct,"build");class lr{static{l(this,"SourceMap")}constructor(e,A){const i=A.decodedMappings?ct(e):er(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,A.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function Bt(n,e,A){const i={excludeContent:!!A,decodedMappings:!1},s=hr(n,e);return new lr(cr(s),i)}l(Bt,"remapping");const fr=l((n,e,A)=>{const i=[],s={code:e};for(const a of A){const c=a(n,s.code);c&&(Object.assign(s,c),i.unshift(c.map))}return{...s,map:Bt(i,()=>null)}},"applyTransformersSync"),ur=l(async(n,e,A)=>{const i=[],s={code:e};for(const a of A){const c=await a(n,s.code);c&&(Object.assign(s,c),i.unshift(c.map))}return{...s,map:Bt(i,()=>null)}},"applyTransformers"),gr=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),Et={...gr,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE,minifyWhitespace:!0,keepNames:!0},dt=l(n=>{const e=n.sourcefile;if(e){const A=$.extname(e.split("?")[0]);A?A===".cts"||A===".mts"?n.sourcefile=`${e.slice(0,-3)}ts`:A===".mjs"&&(n.sourcefile=`${e.slice(0,-3)}js`):n.sourcefile+=".js"}return A=>(A.map&&(n.sourcefile!==e&&(A.map=A.map.replace(JSON.stringify(n.sourcefile),JSON.stringify(e))),A.map=JSON.parse(A.map)),A)},"patchOptions"),wt=l(n=>{throw n.name="TransformError",delete n.errors,delete n.warnings,n},"formatEsbuildError"),Cr=l((n,e,A)=>{const[i,s]=e.split("?"),a={};i.endsWith(".cjs")||i.endsWith(".cts")||(a["import.meta.url"]=JSON.stringify(Pt(i)+(s?`?${s}`:"")));const c={...Et,format:"cjs",sourcefile:i,define:a,banner:"(()=>{",footer:"})()",...A},C=Re([n,JSON.stringify(c),Je,$e].join("-"));let u=ne.get(C);return u||(u=fr(e,n,[(g,f)=>{const r=dt(c);let m;try{m=$t(f,c)}catch(D){throw wt(D)}return r(m)},(g,f)=>be(g,f,!0)]),ne.set(C,u)),u},"transformSync"),Br=l(async(n,e,A)=>{const i={...Et,format:"esm",sourcefile:e,...A},s=Re([n,JSON.stringify(i),Je,$e].join("-"));let a=ne.get(s);return a||(a=await ur(e,n,[async(c,C)=>{const u=dt(i);let g;try{g=await Tt(C,i)}catch(f){throw wt(f)}return u(g)},(c,C)=>be(c,C,!0)]),ne.set(s,a)),a},"transform");export{be as a,Cr as b,Te as p,Br as t};
|
package/dist/loader.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var
|
|
1
|
+
"use strict";var n=Object.defineProperty;var u=(e,i)=>n(e,"name",{value:i,configurable:!0});var c=require("./get-pipe-path-BoR10qr8.cjs"),l=require("node:repl"),v=require("esbuild"),r=require("./esm/index.cjs");require("module"),require("node:path"),require("./temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:worker_threads"),require("./node-features-roYmp9jK.cjs"),require("./register-CfuJoh3S.cjs"),require("node:module"),require("./register-BPRJR7M6.cjs"),require("node:url"),require("get-tsconfig"),require("node:fs"),require("./index-C1vsvhPH.cjs"),require("node:crypto"),require("./client-D6NvIMSC.cjs"),require("node:net"),require("./require-BZ2WDgiR.cjs"),require("node:fs/promises");const d=u(e=>{const{eval:i}=e,s=u(async function(t,o,a,q){try{t=(await v.transform(t,{sourcefile:a,loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}})).code}catch{}return i.call(this,t,o,a,q)},"preEval");e.eval=s},"patchEval"),{start:p}=l;l.start=function(){const e=Reflect.apply(p,this,arguments);return d(e),e},c.require("./cjs/index.cjs"),exports.globalPreload=r.globalPreload,exports.initialize=r.initialize,exports.load=r.load,exports.resolve=r.resolve;
|
package/dist/loader.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=Object.defineProperty;var i=(r,t)=>l(r,"name",{value:t,configurable:!0});import{r as n}from"./
|
|
1
|
+
var l=Object.defineProperty;var i=(r,t)=>l(r,"name",{value:t,configurable:!0});import{r as n}from"./get-pipe-path-BHW2eJdv.mjs";import p from"node:repl";import{transform as c}from"esbuild";import{globalPreload as J,initialize as K,load as L,resolve as M}from"./esm/index.mjs";import"module";import"node:path";import"./temporary-directory-CwHp0_NW.mjs";import"node:os";import"node:worker_threads";import"./node-features-_8ZFwP_x.mjs";import"./register-C_6Nc_P5.mjs";import"node:module";import"./register-CFdTi8dP.mjs";import"node:url";import"get-tsconfig";import"node:fs";import"./index-CEhzVOC2.mjs";import"node:crypto";import"./client-BQVF1NaW.mjs";import"node:net";import"./require-BaX0y-S3.mjs";import"node:fs/promises";const f=i(r=>{const{eval:t}=r,m=i(async function(o,a,e,s){try{o=(await c(o,{sourcefile:e,loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}})).code}catch{}return t.call(this,o,a,e,s)},"preEval");r.eval=m},"patchEval"),{start:u}=p;p.start=function(){const r=Reflect.apply(u,this,arguments);return f(r),r},n("./cjs/index.cjs");export{J as globalPreload,K as initialize,L as load,M as resolve};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r="4.13.1";exports.version=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="4.13.1";export{r as v};
|
package/dist/preflight.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var
|
|
1
|
+
"use strict";var u=Object.defineProperty;var t=(e,n)=>u(e,"name",{value:n,configurable:!0});var a=require("./get-pipe-path-BoR10qr8.cjs"),l=require("node:os"),f=require("node:worker_threads"),p=require("./client-D6NvIMSC.cjs");require("./suppress-warnings.cjs"),require("module"),require("node:path"),require("./temporary-directory-B83uKxJF.cjs"),require("node:net");const d=t((e,n)=>{for(const r of e)process.on(r,s=>{n(s),process.listenerCount(r)===0&&process.exit(128+l.constants.signals[r])});const{listenerCount:i,listeners:o}=process;process.listenerCount=function(r){let s=Reflect.apply(i,this,arguments);return e.includes(r)&&(s-=1),s},process.listeners=function(r){const s=Reflect.apply(o,this,arguments);return e.includes(r)?s.filter(c=>c!==n):s}},"bindHiddenSignalsHandler");f.isMainThread&&(a.require("./cjs/index.cjs"),(async()=>{const e=await p.connectingToServer;e&&d(["SIGINT","SIGTERM"],n=>{e({type:"signal",signal:n})})})());
|
package/dist/preflight.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=Object.defineProperty;var n=(t,s)=>p(t,"name",{value:s,configurable:!0});import{r as f}from"./
|
|
1
|
+
var p=Object.defineProperty;var n=(t,s)=>p(t,"name",{value:s,configurable:!0});import{r as f}from"./get-pipe-path-BHW2eJdv.mjs";import{constants as l}from"node:os";import{isMainThread as a}from"node:worker_threads";import{c as m}from"./client-BQVF1NaW.mjs";import"./suppress-warnings.mjs";import"module";import"node:path";import"./temporary-directory-CwHp0_NW.mjs";import"node:net";const u=n((t,s)=>{for(const e of t)process.on(e,r=>{s(r),process.listenerCount(e)===0&&process.exit(128+l.signals[e])});const{listenerCount:i,listeners:o}=process;process.listenerCount=function(e){let r=Reflect.apply(i,this,arguments);return t.includes(e)&&(r-=1),r},process.listeners=function(e){const r=Reflect.apply(o,this,arguments);return t.includes(e)?r.filter(c=>c!==s):r}},"bindHiddenSignalsHandler");a&&(f("./cjs/index.cjs"),(async()=>{const t=await m;t&&u(["SIGINT","SIGTERM"],s=>{t({type:"signal",signal:s})})})());
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var N=Object.defineProperty;var c=(e,s)=>N(e,"name",{value:s,configurable:!0});var C=require("./get-pipe-path-BoR10qr8.cjs"),h=require("node:module"),m=require("node:path"),_=require("node:url"),y=require("get-tsconfig"),F=require("node:fs"),S=require("./index-C1vsvhPH.cjs"),R=require("./client-D6NvIMSC.cjs");const v=Object.create(null);v[".js"]=[".ts",".tsx",".js",".jsx"],v[".jsx"]=[".tsx",".ts",".jsx",".js"],v[".cjs"]=[".cts"],v[".mjs"]=[".mts"];const T=c(e=>{const[s,t]=e.split("?"),a=m.extname(s),i=v[a];if(i){const l=s.slice(0,-a.length);return i.map(r=>l+r+(t?`?${t}`:""))}},"resolveTsPath"),I=c(e=>{const s=e.indexOf(":");if(s!==-1)return e.slice(0,s)},"getScheme"),b=c(e=>e[0]==="."&&(e[1]==="/"||e[1]==="."||e[2]==="/"),"isRelativePath"),D=c(e=>b(e)||m.isAbsolute(e),"isUnixPath"),W=c(e=>{if(D(e))return!0;const s=I(e);return s&&s!=="node"},"requestAcceptsQuery"),U="file://",w=/\.([cm]?ts|[tj]sx)($|\?)/,Q=/\.json($|\?)/,B=/\/(?:$|\?)/,k=/^(?:@[^/]+\/)?[^/]+$/;exports.fileMatcher=void 0,exports.tsconfigPathsMatcher=void 0,exports.allowJs=!1;const O=c(e=>{let s=null;if(e){const t=m.resolve(e);s={path:t,config:y.parseTsconfig(t)}}else{try{s=y.getTsconfig()}catch{}if(!s)return}exports.fileMatcher=y.createFilesMatcher(s),exports.tsconfigPathsMatcher=y.createPathsMatcher(s),exports.allowJs=s?.config.compilerOptions?.allowJs??!1},"loadTsconfig"),M=c(e=>Array.from(e).length>0?`?${e.toString()}`:"","urlSearchParamsStringify"),z=`${m.sep}node_modules${m.sep}`,L=c(e=>{if(!e.startsWith("data:text/javascript,"))return e;const s=e.indexOf("?");if(s===-1)return e;const t=new URLSearchParams(e.slice(s+1));let a=t.get("filePath");if(a){const i=t.get("namespace");i&&(a+=`?namespace=${encodeURIComponent(i)}`),h._cache[a]=h._cache[e],delete h._cache[e],e=a}return e},"interopCjsExports"),A=c((e,s,t)=>{if(!(t?.filename&&w.test(t.filename))&&!exports.allowJs)return;const a=T(s);if(a)for(const i of a)try{return e(i)}catch(l){const{code:r}=l;if(r!=="MODULE_NOT_FOUND"&&r!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw l}},"resolveTsFilename"),G=[".ts",".tsx",".jsx"],j=c((e,s)=>{for(const t of G)try{return e(s+t)}catch{}},"tryExtensions"),H=c((e,s)=>(t,a,i,l)=>{const r=c(o=>e(o,a,i,l),"resolve");t=L(t);const[f,P]=t.split("?"),u=new URLSearchParams(P);if(a?.filename){const n=new URLSearchParams(a.filename.split("?")[1]).get("namespace");n&&u.append("namespace",n)}if((u.get("namespace")??void 0)!==s)return r(t);const p=M(u);if(t=f,t.startsWith(U)&&(t=_.fileURLToPath(t)),exports.tsconfigPathsMatcher&&!b(t)&&!a?.filename?.includes(z)){const o=exports.tsconfigPathsMatcher(t);for(const n of o){const x=A(r,n,a);if(x)return x+p;try{return r(n)+p}catch{const g=j(r,n)||j(r,m.resolve(n,"index"));if(g)return g+p}}}const d=A(r,t,a);if(d)return d+p;try{const o=r(t);return o+(m.isAbsolute(o)?p:"")}catch(o){const n=j(r,t)||j(r,m.resolve(t,"index"));if(n)return n+p;throw o}},"createResolveFilename"),X=c(e=>{if(!e.includes("import")&&!e.includes("export"))return!1;try{return S.parseEsm(e)[3]}catch{return!0}},"isESM"),K=`
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,`,$=c(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),E=c(({code:e,map:s})=>e+K+Buffer.from(JSON.stringify(s),"utf8").toString("base64"),"inlineSourceMap"),V=[".cts",".mts",".ts",".tsx",".jsx"],Y=[".js",".cjs",".mjs"],Z=c((e,s)=>{const t=Object.assign(Object.create(null),e),a=t[".js"],i=c((l,r)=>{const[f,P]=r.split("?");if((new URLSearchParams(P).get("namespace")??void 0)!==s)return a(l,f);R.parent?.send&&R.parent.send({type:"dependency",path:f});const p=V.some(n=>f.endsWith(n)),d=Y.some(n=>f.endsWith(n));if(!p&&!d)return a(l,f);let o=F.readFileSync(f,"utf8");if(f.endsWith(".cjs")){const n=S.transformDynamicImport(r,o);n&&(o=$()?E(n):n.code)}else if(p||X(o)){const n=S.transformSync(o,r,{tsconfigRaw:exports.fileMatcher?.(f)});o=$()?E(n):n.code}l._compile(o,f)},"transformer");return t[".js"]=i,[".ts",".tsx",".jsx",".mjs"].forEach(l=>{Object.defineProperty(t,l,{value:i,enumerable:!1})}),t},"createExtensions"),J=c((e,s)=>{if(!s)throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument of tsx.require()");return(typeof s=="string"&&s.startsWith("file://")||s instanceof URL)&&(s=_.fileURLToPath(s)),m.resolve(m.dirname(s),e)},"resolveContext"),q=c(e=>{const{sourceMapsEnabled:s}=process,{_extensions:t,_resolveFilename:a}=h;O(process.env.TSX_TSCONFIG_PATH),process.setSourceMapsEnabled(!0);const i=H(a,e?.namespace);h._resolveFilename=i;const l=Z(h._extensions,e?.namespace);h._extensions=l;const r=c(()=>{s===!1&&process.setSourceMapsEnabled(!1),h._extensions=t,h._resolveFilename=a},"unregister");if(e?.namespace){const f=c((u,p)=>{const d=J(u,p),[o,n]=d.split("?"),x=new URLSearchParams(n);return e.namespace&&x.set("namespace",e.namespace),C.require(o+M(x))},"scopedRequire");r.require=f;const P=c((u,p,d)=>{const o=J(u,p),[n,x]=o.split("?"),g=new URLSearchParams(x);return e.namespace&&g.set("namespace",e.namespace),i(n+M(g),module,!1,d)},"scopedResolve");r.resolve=P,r.unregister=r}return r},"register");exports.fileUrlPrefix=U,exports.inlineSourceMap=E,exports.interopCjsExports=L,exports.isBarePackageName=k,exports.isDirectoryPattern=B,exports.isJsonPattern=Q,exports.loadTsconfig=O,exports.register=q,exports.requestAcceptsQuery=W,exports.resolveTsPath=T,exports.tsExtensionsPattern=w;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var N=Object.defineProperty;var o=(e,s)=>N(e,"name",{value:s,configurable:!0});import{r as C}from"./get-pipe-path-BHW2eJdv.mjs";import h from"node:module";import p from"node:path";import{fileURLToPath as R}from"node:url";import{parseTsconfig as W,getTsconfig as D,createFilesMatcher as J,createPathsMatcher as Q}from"get-tsconfig";import k from"node:fs";import{p as z,a as B,b as G}from"./index-CEhzVOC2.mjs";import{p as M}from"./client-BQVF1NaW.mjs";const g=Object.create(null);g[".js"]=[".ts",".tsx",".js",".jsx"],g[".jsx"]=[".tsx",".ts",".jsx",".js"],g[".cjs"]=[".cts"],g[".mjs"]=[".mts"];const T=o(e=>{const[s,t]=e.split("?"),a=p.extname(s),i=g[a];if(i){const l=s.slice(0,-a.length);return i.map(r=>l+r+(t?`?${t}`:""))}},"resolveTsPath"),H=o(e=>{const s=e.indexOf(":");if(s!==-1)return e.slice(0,s)},"getScheme"),O=o(e=>e[0]==="."&&(e[1]==="/"||e[1]==="."||e[2]==="/"),"isRelativePath"),X=o(e=>O(e)||p.isAbsolute(e),"isUnixPath"),K=o(e=>{if(X(e))return!0;const s=H(e);return s&&s!=="node"},"requestAcceptsQuery"),U="file://",w=/\.([cm]?ts|[tj]sx)($|\?)/,V=/\.json($|\?)/,Y=/\/(?:$|\?)/,Z=/^(?:@[^/]+\/)?[^/]+$/;let S,j,_=!1;const L=o(e=>{let s=null;if(e){const t=p.resolve(e);s={path:t,config:W(t)}}else{try{s=D()}catch{}if(!s)return}S=J(s),j=Q(s),_=s?.config.compilerOptions?.allowJs??!1},"loadTsconfig"),E=o(e=>Array.from(e).length>0?`?${e.toString()}`:"","urlSearchParamsStringify"),q=`${p.sep}node_modules${p.sep}`,A=o(e=>{if(!e.startsWith("data:text/javascript,"))return e;const s=e.indexOf("?");if(s===-1)return e;const t=new URLSearchParams(e.slice(s+1));let a=t.get("filePath");if(a){const i=t.get("namespace");i&&(a+=`?namespace=${encodeURIComponent(i)}`),h._cache[a]=h._cache[e],delete h._cache[e],e=a}return e},"interopCjsExports"),$=o((e,s,t)=>{if(!(t?.filename&&w.test(t.filename))&&!_)return;const a=T(s);if(a)for(const i of a)try{return e(i)}catch(l){const{code:r}=l;if(r!=="MODULE_NOT_FOUND"&&r!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw l}},"resolveTsFilename"),ee=[".ts",".tsx",".jsx"],v=o((e,s)=>{for(const t of ee)try{return e(s+t)}catch{}},"tryExtensions"),se=o((e,s)=>(t,a,i,l)=>{const r=o(c=>e(c,a,i,l),"resolve");t=A(t);const[f,P]=t.split("?"),d=new URLSearchParams(P);if(a?.filename){const n=new URLSearchParams(a.filename.split("?")[1]).get("namespace");n&&d.append("namespace",n)}if((d.get("namespace")??void 0)!==s)return r(t);const m=E(d);if(t=f,t.startsWith(U)&&(t=R(t)),j&&!O(t)&&!a?.filename?.includes(q)){const c=j(t);for(const n of c){const x=$(r,n,a);if(x)return x+m;try{return r(n)+m}catch{const y=v(r,n)||v(r,p.resolve(n,"index"));if(y)return y+m}}}const u=$(r,t,a);if(u)return u+m;try{const c=r(t);return c+(p.isAbsolute(c)?m:"")}catch(c){const n=v(r,t)||v(r,p.resolve(t,"index"));if(n)return n+m;throw c}},"createResolveFilename"),te=o(e=>{if(!e.includes("import")&&!e.includes("export"))return!1;try{return z(e)[3]}catch{return!0}},"isESM"),ne=`
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,`,F=o(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),b=o(({code:e,map:s})=>e+ne+Buffer.from(JSON.stringify(s),"utf8").toString("base64"),"inlineSourceMap"),re=[".cts",".mts",".ts",".tsx",".jsx"],ae=[".js",".cjs",".mjs"],oe=o((e,s)=>{const t=Object.assign(Object.create(null),e),a=t[".js"],i=o((l,r)=>{const[f,P]=r.split("?");if((new URLSearchParams(P).get("namespace")??void 0)!==s)return a(l,f);M?.send&&M.send({type:"dependency",path:f});const m=re.some(n=>f.endsWith(n)),u=ae.some(n=>f.endsWith(n));if(!m&&!u)return a(l,f);let c=k.readFileSync(f,"utf8");if(f.endsWith(".cjs")){const n=B(r,c);n&&(c=F()?b(n):n.code)}else if(m||te(c)){const n=G(c,r,{tsconfigRaw:S?.(f)});c=F()?b(n):n.code}l._compile(c,f)},"transformer");return t[".js"]=i,[".ts",".tsx",".jsx",".mjs"].forEach(l=>{Object.defineProperty(t,l,{value:i,enumerable:!1})}),t},"createExtensions"),I=o((e,s)=>{if(!s)throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument of tsx.require()");return(typeof s=="string"&&s.startsWith("file://")||s instanceof URL)&&(s=R(s)),p.resolve(p.dirname(s),e)},"resolveContext"),ce=o(e=>{const{sourceMapsEnabled:s}=process,{_extensions:t,_resolveFilename:a}=h;L(process.env.TSX_TSCONFIG_PATH),process.setSourceMapsEnabled(!0);const i=se(a,e?.namespace);h._resolveFilename=i;const l=oe(h._extensions,e?.namespace);h._extensions=l;const r=o(()=>{s===!1&&process.setSourceMapsEnabled(!1),h._extensions=t,h._resolveFilename=a},"unregister");if(e?.namespace){const f=o((d,m)=>{const u=I(d,m),[c,n]=u.split("?"),x=new URLSearchParams(n);return e.namespace&&x.set("namespace",e.namespace),C(c+E(x))},"scopedRequire");r.require=f;const P=o((d,m,u)=>{const c=I(d,m),[n,x]=c.split("?"),y=new URLSearchParams(x);return e.namespace&&y.set("namespace",e.namespace),i(n+E(y),module,!1,u)},"scopedResolve");r.resolve=P,r.unregister=r}return r},"register");export{V as a,b,K as c,Y as d,Z as e,S as f,_ as g,T as h,A as i,U as j,j as k,L as l,ce as r,w as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.defineProperty;var o=(e,s)=>g(e,"name",{value:s,configurable:!0});import m from"node:module";import{MessageChannel as v}from"node:worker_threads";import{i as h}from"./register-CFdTi8dP.mjs";import{pathToFileURL as w}from"node:url";const b=o((e,s,r)=>{const n=s.startsWith("file://")?s:w(s),a=new URL(e,n);return a.searchParams.set("tsx-namespace",r),a.toString()},"resolveSpecifier"),E=o(e=>(s,r)=>{if(!r)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");return import(b(s,r,e))},"createScopedImport");let l=!1;const M=o(e=>{if(!m.register)throw new Error(`This version of Node.js (${process.version}) does not support module.register(). Please upgrade to Node v18.9 or v20.6 and above.`);if(!l){const{_resolveFilename:t}=m;m._resolveFilename=(c,f,d,u)=>t(h(c),f,d,u),l=!0}const{sourceMapsEnabled:s}=process;process.setSourceMapsEnabled(!0);const{port1:r,port2:n}=new v;m.register(`./esm/index.mjs?${Date.now()}`,{parentURL:import.meta.url,data:{port:n,namespace:e?.namespace,tsconfig:e?.tsconfig},transferList:[n]});const a=e?.onImport,i=a&&(t=>{t.type==="load"&&a(t.url)});i&&(r.on("message",i),r.unref());const p=o(()=>(s===!1&&process.setSourceMapsEnabled(!1),i&&r.off("message",i),r.postMessage("deactivate"),new Promise(t=>{const c=o(f=>{f.type==="deactivated"&&(t(),r.off("message",c))},"onDeactivated");r.on("message",c)})),"unregister");return e?.namespace&&(p.import=E(e.namespace),p.unregister=p),p},"register");export{M as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var v=Object.defineProperty;var o=(e,t)=>v(e,"name",{value:t,configurable:!0});var u=require("node:module"),h=require("node:worker_threads"),w=require("./register-BPRJR7M6.cjs"),_=require("node:url"),f=typeof document<"u"?document.currentScript:null;const b=o((e,t,r)=>{const a=t.startsWith("file://")?t:_.pathToFileURL(t),n=new URL(e,a);return n.searchParams.set("tsx-namespace",r),n.toString()},"resolveSpecifier"),S=o(e=>(t,r)=>{if(!r)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");return import(b(t,r,e))},"createScopedImport");let m=!1;const E=o(e=>{if(!u.register)throw new Error(`This version of Node.js (${process.version}) does not support module.register(). Please upgrade to Node v18.9 or v20.6 and above.`);if(!m){const{_resolveFilename:s}=u;u._resolveFilename=(p,d,l,g)=>s(w.interopCjsExports(p),d,l,g),m=!0}const{sourceMapsEnabled:t}=process;process.setSourceMapsEnabled(!0);const{port1:r,port2:a}=new h.MessageChannel;u.register(`./esm/index.mjs?${Date.now()}`,{parentURL:typeof document>"u"?require("url").pathToFileURL(__filename).href:f&&f.src||new URL("register-CfuJoh3S.cjs",document.baseURI).href,data:{port:a,namespace:e?.namespace,tsconfig:e?.tsconfig},transferList:[a]});const n=e?.onImport,i=n&&(s=>{s.type==="load"&&n(s.url)});i&&(r.on("message",i),r.unref());const c=o(()=>(t===!1&&process.setSourceMapsEnabled(!1),i&&r.off("message",i),r.postMessage("deactivate"),new Promise(s=>{const p=o(d=>{d.type==="deactivated"&&(s(),r.off("message",p))},"onDeactivated");r.on("message",p)})),"unregister");return e?.namespace&&(c.import=S(e.namespace),c.unregister=c),c},"register");exports.register=E;
|
package/dist/repl.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var c=Object.defineProperty;var s=(e,r)=>c(e,"name",{value:r,configurable:!0});var l=require("node:repl"),u=require("./package-
|
|
1
|
+
"use strict";var c=Object.defineProperty;var s=(e,r)=>c(e,"name",{value:r,configurable:!0});var l=require("node:repl"),u=require("./package-GSD7l4b6.cjs"),q=require("./index-C1vsvhPH.cjs");require("node:url"),require("esbuild"),require("node:crypto"),require("node:fs"),require("node:path"),require("node:os"),require("./temporary-directory-B83uKxJF.cjs"),console.log(`Welcome to tsx v${u.version} (Node.js ${process.version}).
|
|
2
2
|
Type ".help" for more information.`);const t=l.start(),{eval:p}=t,v=s(async function(e,r,o,i){const a=await q.transform(e,o,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(n=>(console.log(n.message),{code:`
|
|
3
3
|
`}));return p.call(this,a.code,r,o,i)},"preEval");t.eval=v;
|
package/dist/repl.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var m=Object.defineProperty;var t=(o,r)=>m(o,"name",{value:r,configurable:!0});import p from"node:repl";import{v as l}from"./package-
|
|
1
|
+
var m=Object.defineProperty;var t=(o,r)=>m(o,"name",{value:r,configurable:!0});import p from"node:repl";import{v as l}from"./package-ZHsh_FJ8.mjs";import{t as c}from"./index-CEhzVOC2.mjs";import"node:url";import"esbuild";import"node:crypto";import"node:fs";import"node:path";import"node:os";import"./temporary-directory-CwHp0_NW.mjs";console.log(`Welcome to tsx v${l} (Node.js ${process.version}).
|
|
2
2
|
Type ".help" for more information.`);const s=p.start(),{eval:f}=s,v=t(async function(o,r,e,i){const n=await c(o,e,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(a=>(console.log(a.message),{code:`
|
|
3
3
|
`}));return f.call(this,n.code,r,e,i)},"preEval");s.eval=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var c=Object.defineProperty;var a=(r,t)=>c(r,"name",{value:t,configurable:!0});var s=require("./get-pipe-path-BoR10qr8.cjs"),n=require("./register-BPRJR7M6.cjs");let e;const i=a((r,t)=>(e||(e=n.register({namespace:Date.now().toString()})),e.require(r,t)),"tsxRequire"),o=a((r,t,u)=>(e||(e=n.register({namespace:Date.now().toString()})),e.resolve(r,t,u)),"resolve");o.paths=s.require.resolve.paths,i.resolve=o,i.main=s.require.main,i.extensions=s.require.extensions,i.cache=s.require.cache,exports.tsxRequire=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=Object.defineProperty;var a=(r,t)=>m(r,"name",{value:t,configurable:!0});import{r as o}from"./get-pipe-path-BHW2eJdv.mjs";import{r as n}from"./register-CFdTi8dP.mjs";let e;const s=a((r,t)=>(e||(e=n({namespace:Date.now().toString()})),e.require(r,t)),"tsxRequire"),i=a((r,t,c)=>(e||(e=n({namespace:Date.now().toString()})),e.resolve(r,t,c)),"resolve");i.paths=o.resolve.paths,s.resolve=i,s.main=o.main,s.extensions=o.extensions,s.cache=o.cache;export{s as t};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var r=(i,e)=>p(i,"name",{value:e,configurable:!0});var s=require("node:path"),o=require("./temporary-directory-B83uKxJF.cjs");const t=process.platform==="win32",a=r(i=>{const e=s.join(o.tmpdir,`${i}.pipe`);return t?`\\\\?\\pipe\\${e}`:e},"getPipePath");exports.getPipePath=a,exports.isWindows=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r=Object.defineProperty;var i=(t,p)=>r(t,"name",{value:p,configurable:!0});import s from"node:path";import{t as e}from"./temporary-directory-CwHp0_NW.mjs";const o=process.platform==="win32",a=i(t=>{const p=s.join(e,`${t}.pipe`);return o?`\\\\?\\pipe\\${p}`:p},"getPipePath");export{a as g,o as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var $=Object.defineProperty;var n=(s,t)=>$(s,"name",{value:t,configurable:!0});import l from"node:path";import P from"node:module";import{fileURLToPath as b}from"node:url";import{parseTsconfig as F,getTsconfig as U,createFilesMatcher as A,createPathsMatcher as v}from"get-tsconfig";const f=Object.create(null);f[".js"]=[".ts",".tsx",".js",".jsx"],f[".jsx"]=[".tsx",".ts",".jsx",".js"],f[".cjs"]=[".cts"],f[".mjs"]=[".mts"];const g=n(s=>{const[t,c]=s.split("?"),e=l.extname(t),o=f[e];if(o){const a=t.slice(0,-e.length);return o.map(i=>a+i+(c?`?${c}`:""))}},"resolveTsPath"),w=n(s=>{const t=s.indexOf(":");if(t!==-1)return s.slice(0,t)},"getScheme"),p=n(s=>s[0]==="."&&(s[1]==="/"||s[1]==="."||s[2]==="/"),"isRelativePath"),D=n(s=>p(s)||l.isAbsolute(s),"isUnixPath"),M=n(s=>{if(D(s))return!0;const t=w(s);return t&&t!=="node"},"requestAcceptsQuery"),T="file://",O=/\.([cm]?ts|[tj]sx)($|\?)/,N=/\.json($|\?)/,R=/\/(?:$|\?)/,u=/^(?:@[^/]+\/)?[^/]+$/;let _,m,x=!1;const C=n(s=>{let t=null;if(s){const c=l.resolve(s);t={path:c,config:F(c)}}else{try{t=U()}catch{}if(!t)return}_=A(t),m=v(t),x=t?.config.compilerOptions?.allowJs??!1},"loadTsconfig"),I=`${l.sep}node_modules${l.sep}`,y=n(s=>{if(!s.startsWith("data:text/javascript,"))return s;const t=s.indexOf("?");if(t===-1)return s;const e=new URLSearchParams(s.slice(t+1)).get("filePath");return e&&(P._cache[e]=P._cache[s],delete P._cache[s],s=e),s},"interopCjsExports"),E=n((s,t,c,e,o)=>{if(!(c?.filename&&O.test(c.filename))&&!x)return;const a=g(t);if(a)for(const i of a)try{return s(i,c,e,o)}catch(r){const{code:h}=r;if(h!=="MODULE_NOT_FOUND"&&h!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw r}},"resolveTsFilename"),J=n(s=>(t,c,e,o)=>{t=y(t);const a=t.indexOf("?"),i=a===-1?"":t.slice(a);if(a!==-1&&(t=t.slice(0,a)),t.startsWith(T)&&(t=b(t)),m&&!p(t)&&!c?.filename?.includes(I)){const h=m(t);for(const d of h){const j=E(s,d,c,e,o);if(j)return j+i;try{return s(d,c,e,o)+i}catch{}}}const r=E(s,t,c,e,o);return r?r+i:s(t,c,e,o)+i},"createResolveFilename");export{R as a,u as b,J as c,x as d,g as e,_ as f,T as g,m as h,N as i,y as j,C as l,M as r,O as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var y=Object.defineProperty;var n=(t,s)=>y(t,"name",{value:s,configurable:!0});var l=require("node:path"),m=require("node:module"),E=require("node:url"),P=require("get-tsconfig");const f=Object.create(null);f[".js"]=[".ts",".tsx",".js",".jsx"],f[".jsx"]=[".tsx",".ts",".jsx",".js"],f[".cjs"]=[".cts"],f[".mjs"]=[".mts"];const g=n(t=>{const[s,e]=t.split("?"),c=l.extname(s),o=f[c];if(o){const a=s.slice(0,-c.length);return o.map(i=>a+i+(e?`?${e}`:""))}},"resolveTsPath"),_=n(t=>{const s=t.indexOf(":");if(s!==-1)return t.slice(0,s)},"getScheme"),j=n(t=>t[0]==="."&&(t[1]==="/"||t[1]==="."||t[2]==="/"),"isRelativePath"),O=n(t=>j(t)||l.isAbsolute(t),"isUnixPath"),M=n(t=>{if(O(t))return!0;const s=_(t);return s&&s!=="node"},"requestAcceptsQuery"),T="file://",v=/\.([cm]?ts|[tj]sx)($|\?)/,F=/\.json($|\?)/,U=/\/(?:$|\?)/,$=/^(?:@[^/]+\/)?[^/]+$/;exports.fileMatcher=void 0,exports.tsconfigPathsMatcher=void 0,exports.allowJs=!1;const w=n(t=>{let s=null;if(t){const e=l.resolve(t);s={path:e,config:P.parseTsconfig(e)}}else{try{s=P.getTsconfig()}catch{}if(!s)return}exports.fileMatcher=P.createFilesMatcher(s),exports.tsconfigPathsMatcher=P.createPathsMatcher(s),exports.allowJs=s?.config.compilerOptions?.allowJs??!1},"loadTsconfig"),A=`${l.sep}node_modules${l.sep}`,p=n(t=>{if(!t.startsWith("data:text/javascript,"))return t;const s=t.indexOf("?");if(s===-1)return t;const c=new URLSearchParams(t.slice(s+1)).get("filePath");return c&&(m._cache[c]=m._cache[t],delete m._cache[t],t=c),t},"interopCjsExports"),u=n((t,s,e,c,o)=>{if(!(e?.filename&&v.test(e.filename))&&!exports.allowJs)return;const a=g(s);if(a)for(const i of a)try{return t(i,e,c,o)}catch(r){const{code:h}=r;if(h!=="MODULE_NOT_FOUND"&&h!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw r}},"resolveTsFilename"),J=n(t=>(s,e,c,o)=>{s=p(s);const a=s.indexOf("?"),i=a===-1?"":s.slice(a);if(a!==-1&&(s=s.slice(0,a)),s.startsWith(T)&&(s=E.fileURLToPath(s)),exports.tsconfigPathsMatcher&&!j(s)&&!e?.filename?.includes(A)){const h=exports.tsconfigPathsMatcher(s);for(const d of h){const x=u(t,d,e,c,o);if(x)return x+i;try{return t(d,e,c,o)+i}catch{}}}const r=u(t,s,e,c,o);return r?r+i:t(s,e,c,o)+i},"createResolveFilename");exports.createResolveFilename=J,exports.fileUrlPrefix=T,exports.interopCjsExports=p,exports.isBarePackageName=$,exports.isDirectoryPattern=U,exports.isJsonPattern=F,exports.loadTsconfig=w,exports.requestAcceptsQuery=M,exports.resolveTsPath=g,exports.tsExtensionsPattern=v;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var r="4.12.1";exports.version=r;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="4.12.1";export{r as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var r=require("module"),u=typeof document<"u"?document.currentScript:null,e=require;exports.require=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as r}from"module";var e=r(import.meta.url);export{e as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var d=Object.defineProperty;var a=(s,n)=>d(s,"name",{value:n,configurable:!0});import o from"node:module";import{f as x,l as j,c as y}from"./module-resolve-filename-CKIZs9Xo.mjs";import S from"node:fs";import{p as M,t as _,a as h}from"./index-CJbZ7IJL.mjs";import{s as m,i as p}from"./source-map-Ctni5cdJ.mjs";import{p as f}from"./client-CwCkgTEz.mjs";const E=a(s=>{if(!s.includes("import")&&!s.includes("export"))return!1;try{return M(s)[3]}catch{return!0}},"isESM"),F=[".cts",".mts",".ts",".tsx",".jsx"],b=[".js",".cjs",".mjs"],i=Object.assign(Object.create(null),o._extensions),v=i[".js"],u=a((s,n)=>{const e=n.split("?")[0];f?.send&&f.send({type:"dependency",path:e});const c=F.some(t=>e.endsWith(t)),l=b.some(t=>e.endsWith(t));if(!c&&!l)return v(s,e);let r=S.readFileSync(e,"utf8");if(e.endsWith(".cjs")){const t=_(n,r);t&&(r=m()?p(t):t.code)}else if(c||E(r)){const t=h(r,n,{tsconfigRaw:x?.(e)});r=m()?p(t):t.code}s._compile(r,e)},"transformer");[".js",".ts",".tsx",".jsx"].forEach(s=>{i[s]=u}),Object.defineProperty(i,".mjs",{value:u,enumerable:!1});const g=a(()=>{const{sourceMapsEnabled:s}=process,{_extensions:n,_resolveFilename:e}=o;j(process.env.TSX_TSCONFIG_PATH),process.setSourceMapsEnabled(!0);const c=y(e);return o._resolveFilename=c,o._extensions=i,a(()=>{s===!1&&process.setSourceMapsEnabled(!1),o._extensions=n,o._resolveFilename=e},"unregister")},"register");export{g as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var o=(e,t)=>g(e,"name",{value:t,configurable:!0});var u=require("node:module"),h=require("node:worker_threads"),w=require("./module-resolve-filename-b5zPkmr6.cjs"),_=require("node:url"),l=typeof document<"u"?document.currentScript:null;const b=o((e,t,r)=>{const a=t.startsWith("file://")?t:_.pathToFileURL(t),n=new URL(e,a);return n.searchParams.set("tsx-namespace",r),n.toString()},"resolveSpecifier"),S=o(e=>(t,r)=>{if(!r)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");return import(b(t,r,e))},"createScopedImport");let m=!1;const E=o(e=>{if(!u.register)throw new Error(`This version of Node.js (${process.version}) does not support module.register(). Please upgrade to Node v18.9 or v20.6 and above.`);if(!m){const{_resolveFilename:s}=u;u._resolveFilename=(p,d,f,v)=>s(w.interopCjsExports(p),d,f,v),m=!0}const{sourceMapsEnabled:t}=process;process.setSourceMapsEnabled(!0);const{port1:r,port2:a}=new h.MessageChannel;u.register(`./esm/index.mjs?${Date.now()}`,{parentURL:typeof document>"u"?require("url").pathToFileURL(__filename).href:l&&l.src||new URL("register-D4bgqem_.cjs",document.baseURI).href,data:{port:a,namespace:e?.namespace,tsconfig:e?.tsconfig},transferList:[a]});const n=e?.onImport,i=n&&(s=>{s.type==="load"&&n(s.url)});i&&(r.on("message",i),r.unref());const c=o(()=>(t===!1&&process.setSourceMapsEnabled(!1),i&&r.off("message",i),r.postMessage("deactivate"),new Promise(s=>{const p=o(d=>{d.type==="deactivated"&&(s(),r.off("message",p))},"onDeactivated");r.on("message",p)})),"unregister");return e?.namespace&&(c.import=S(e.namespace),c.unregister=c),c},"register");exports.register=E;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var x=Object.defineProperty;var a=(e,n)=>x(e,"name",{value:n,configurable:!0});var o=require("node:module"),u=require("./module-resolve-filename-b5zPkmr6.cjs"),v=require("node:fs"),p=require("./index-C1vsvhPH.cjs"),i=require("./source-map-BkNfvVZg.cjs"),f=require("./client-BTjWp1CE.cjs");const M=a(e=>{if(!e.includes("import")&&!e.includes("export"))return!1;try{return p.parseEsm(e)[3]}catch{return!0}},"isESM"),S=[".cts",".mts",".ts",".tsx",".jsx"],j=[".js",".cjs",".mjs"],l=Object.assign(Object.create(null),o._extensions),y=l[".js"],m=a((e,n)=>{const s=n.split("?")[0];f.parent?.send&&f.parent.send({type:"dependency",path:s});const c=S.some(r=>s.endsWith(r)),d=j.some(r=>s.endsWith(r));if(!c&&!d)return y(e,s);let t=v.readFileSync(s,"utf8");if(s.endsWith(".cjs")){const r=p.transformDynamicImport(n,t);r&&(t=i.shouldApplySourceMap()?i.inlineSourceMap(r):r.code)}else if(c||M(t)){const r=p.transformSync(t,n,{tsconfigRaw:u.fileMatcher?.(s)});t=i.shouldApplySourceMap()?i.inlineSourceMap(r):r.code}e._compile(t,s)},"transformer");[".js",".ts",".tsx",".jsx"].forEach(e=>{l[e]=m}),Object.defineProperty(l,".mjs",{value:m,enumerable:!1});const h=a(()=>{const{sourceMapsEnabled:e}=process,{_extensions:n,_resolveFilename:s}=o;u.loadTsconfig(process.env.TSX_TSCONFIG_PATH),process.setSourceMapsEnabled(!0);const c=u.createResolveFilename(s);return o._resolveFilename=c,o._extensions=l,a(()=>{e===!1&&process.setSourceMapsEnabled(!1),o._extensions=n,o._resolveFilename=s},"unregister")},"register");exports.register=h;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.defineProperty;var o=(e,s)=>g(e,"name",{value:s,configurable:!0});import m from"node:module";import{MessageChannel as v}from"node:worker_threads";import{j as h}from"./module-resolve-filename-CKIZs9Xo.mjs";import{pathToFileURL as w}from"node:url";const b=o((e,s,r)=>{const n=s.startsWith("file://")?s:w(s),a=new URL(e,n);return a.searchParams.set("tsx-namespace",r),a.toString()},"resolveSpecifier"),E=o(e=>(s,r)=>{if(!r)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");return import(b(s,r,e))},"createScopedImport");let l=!1;const M=o(e=>{if(!m.register)throw new Error(`This version of Node.js (${process.version}) does not support module.register(). Please upgrade to Node v18.9 or v20.6 and above.`);if(!l){const{_resolveFilename:t}=m;m._resolveFilename=(c,f,d,u)=>t(h(c),f,d,u),l=!0}const{sourceMapsEnabled:s}=process;process.setSourceMapsEnabled(!0);const{port1:r,port2:n}=new v;m.register(`./esm/index.mjs?${Date.now()}`,{parentURL:import.meta.url,data:{port:n,namespace:e?.namespace,tsconfig:e?.tsconfig},transferList:[n]});const a=e?.onImport,i=a&&(t=>{t.type==="load"&&a(t.url)});i&&(r.on("message",i),r.unref());const p=o(()=>(s===!1&&process.setSourceMapsEnabled(!1),i&&r.off("message",i),r.postMessage("deactivate"),new Promise(t=>{const c=o(f=>{f.type==="deactivated"&&(t(),r.off("message",c))},"onDeactivated");r.on("message",c)})),"unregister");return e?.namespace&&(p.import=E(e.namespace),p.unregister=p),p},"register");export{M as r};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var n=(e,o)=>s(e,"name",{value:o,configurable:!0});const p=`
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,`,r=n(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),a=n(({code:e,map:o})=>e+p+Buffer.from(JSON.stringify(o),"utf8").toString("base64"),"inlineSourceMap");exports.inlineSourceMap=a,exports.shouldApplySourceMap=r;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var o=(s,e)=>a(s,"name",{value:e,configurable:!0});const n=`
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,`,r=o(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),i=o(({code:s,map:e})=>s+n+Buffer.from(JSON.stringify(e),"utf8").toString("base64"),"inlineSourceMap");export{i,r as s};
|