@vpxa/aikit 0.1.346 → 0.1.347

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.
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e,t}from"./server-BemxePvq.js";export{t as buildPreludeInjection,e as generatePrelude};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./server-DrADmSsL.js";export{t as buildPreludeInjection,e as generatePrelude};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{r as e}from"./server-BemxePvq.js";export{e as createSamplingClient};
@@ -1 +0,0 @@
1
- import{r as e}from"./server-DrADmSsL.js";export{e as createSamplingClient};
@@ -1,2 +0,0 @@
1
- import{createRequire as e}from"node:module";import{readFile as t}from"node:fs/promises";import{dirname as n,extname as r,resolve as i}from"node:path";import{existsSync as a}from"node:fs";var o=Object.defineProperty,s=(e,t)=>{let n={};for(var r in e)o(n,r,{get:e[r],enumerable:!0});return t||o(n,Symbol.toStringTag,{value:`Module`}),n},c=e(import.meta.url),l=s({buildExportMap:()=>v,buildImportMap:()=>g,extractImports:()=>f,resolveImportPath:()=>m});const u=new Set([`.ts`,`.tsx`,`.mts`,`.cts`,`.js`,`.jsx`,`.mjs`,`.cjs`]),d=[`.ts`,`.tsx`,`.d.ts`,`.js`,`.jsx`,`.mjs`,`.cjs`,`/index.ts`,`/index.tsx`,`/index.js`,`/index.jsx`,`/index.d.ts`];function f(e){let t=new Set,n=/(?:import|export)\s+(?:(?:type\s+)?\{[^}]*\}\s*|default\s+\w+\s*|\*\s+as\s+\w+\s*|\*\s*|type\s+\{[^}]*\}\s*|\w+(?:\s*,\s*\{[^}]*\})?\s*)?from\s+['"]([^'"]+)['"]/g,r;for(;(r=n.exec(e))!==null;)t.add(r[1]);let i=/import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;for(;(r=i.exec(e))!==null;)t.add(r[1]);let a=/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;for(;(r=a.exec(e))!==null;)t.add(r[1]);let o=/export\s+(?:\{[^}]*\}|\*\s+as\s+\w+|\*)\s+from\s+['"]([^'"]+)['"]/g;for(;(r=o.exec(e))!==null;)t.add(r[1]);return[...t]}function p(e){let t=e.startsWith(`.`),n=e.startsWith(`node:`);return{isLocal:t,isPackage:!t&&!n,isBuiltin:n}}function m(e,t,o){let{isLocal:s,isPackage:c,isBuiltin:l}=p(e);if(l||c||!s)return null;let u=i(n(t),e);if(!r(u)){for(let e of d){let t=u+e;if(a(t))return t}return u}return a(u)?u:null}function h(e){let t=r(e).toLowerCase();return u.has(t)}async function g(e,n){let i={};for(let a of n)if(!(a.category!==`source`&&a.category!==`test`)&&h(a.path))try{let n=f(await t(a.path,`utf-8`));i[a.path]=n.map(t=>{let{isLocal:n,isPackage:i,isBuiltin:o}=p(t),s=m(t,a.path,e);return{specifier:t,resolvedPath:s,isLocal:n,isPackage:i,isBuiltin:o,fileExtension:(s?r(s):null)||null}})}catch{i[a.path]=[]}return i}const _=[/^export\s+(?:default\s+)?(?:const|let|var|function|class|interface|type|enum|abstract\s+class)\s+(\w+)/gm,/^export\s+\{([^}]+)\}/gm,/^export\s+default\s+(?:class|function)\s+(\w+)/gm];async function v(e,n){let r={};for(let e of n)if(e.category===`source`&&h(e.path))try{let n=await t(e.path,`utf-8`);for(let t of _){let i;for(;(i=t.exec(n))!==null;){let t=i[1]?.trim();if(t&&!t.includes(`*`)&&!t.includes(`{`)&&!t.includes(`}`)){r[t]=e.path;continue}if(i[1]?.includes(`,`)||i[1]?.includes(` as `)){let t=i[1].split(`,`).map(e=>e.trim());for(let n of t){let t=n.match(/(\w+)\s+as\s+(\w+)/);t?r[t[2]]=e.path:n&&!n.includes(`*`)&&(r[n]=e.path)}}}}let i=n.match(/export\s+default\s+(?!class\s|function\s)(\w+|\{)/);i&&!i[1]?.startsWith(`{`)||n.includes(`export default `)&&(n.match(/export\s+default\s+(?:(?!class|function)\S+\s*)?\(/)||n.match(/export\s+default\s+(?:class|function)\s+\w+/));let a=n.match(/export\s+default\s+(?:class|function)\s+(\w+)/);if(a&&(r[a[1]]=e.path),!a&&n.includes(`export default `)){let t=n.split(`
2
- `);for(let n=0;n<t.length;n++){let i=t[n].trim();if(i.startsWith(`export default `)){let t=i.slice(15).trim().replace(/;$/,``);if(/^\w+$/.test(t))r[t]=e.path;else if(/^export\s+default\s+\w+/.test(i)){let n=t.split(/\s+/)[0];n&&/^\w+$/.test(n)&&(r[n]=e.path)}}}}let o=n.match(/export\s*=\s*(\w+)/);o&&(r[o[1]]=e.path)}catch{}return r}export{m as a,l as i,g as n,s as o,f as r,c as s,v as t};