site/node_modules/tsx/dist/esm/api/index.mjs

2 lines
1 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
var s=Object.defineProperty;var i=(r,t)=>s(r,"name",{value:t,configurable:!0});import{r as p}from"../../register-BArwRho-.mjs";import"../../get-pipe-path-BHW2eJdv.mjs";import{r as n,i as c,c as u}from"../../register-B_eFQvfc.mjs";import"../../require-CB-6wn_y.mjs";import{i as g,e as d}from"../../node-features-_8ZFwP_x.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-DeKCL_WS.mjs";import"esbuild";import"node:crypto";import"../../client-BQVF1NaW.mjs";import"node:net";const f=i((r,t)=>{if(!t||typeof t=="object"&&!t.parentURL)throw new Error("The current file path (import.meta.url) must be provided in the second argument of tsImport()");const e=typeof t=="string",o=e?t:t.parentURL,m=Date.now().toString(),a=n({namespace:m});return!g(d)&&!c.test(r)&&u.test(r)?Promise.resolve(a.require(r,o)):p({namespace:m,...e?{}:t}).import(r,o)},"tsImport");export{p as register,f as tsImport};