@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.
- package/package.json +1 -1
- package/packages/core/dist/index.d.ts +23 -1
- package/packages/core/dist/index.js +1 -1
- package/packages/server/dist/bin.js +1 -1
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/prelude-B58MO48q.js +1 -0
- package/packages/server/dist/prelude-HRPwDugi.js +2 -0
- package/packages/server/dist/sampling-DvrIzeWt.js +1 -0
- package/packages/server/dist/sampling-lH0Mam1_.js +2 -0
- package/packages/server/dist/{server-BemxePvq.js → server-B9PIl5SY.js} +170 -170
- package/packages/server/dist/{server-DrADmSsL.js → server-Bme4eBy1.js} +170 -170
- package/packages/server/dist/{server-http-Dxm0ojXH.js → server-http-C7PO0D_V.js} +1 -1
- package/packages/server/dist/{server-http-Bqpd6YFe.js → server-http-rK25FoUm.js} +1 -1
- package/packages/server/dist/{server-stdio-BKsekmb0.js → server-stdio-BVxXXgvL.js} +1 -1
- package/packages/server/dist/{server-stdio-G0HKuOkb.js → server-stdio-OQL2grn7.js} +1 -1
- package/packages/tools/dist/import-resolver-nPrVzU5s.js +2 -0
- package/packages/tools/dist/index.js +99 -99
- package/packages/server/dist/prelude-BZ8GJ-XM.js +0 -2
- package/packages/server/dist/prelude-n6bQqN8I.js +0 -1
- package/packages/server/dist/sampling-BPyxG8R9.js +0 -2
- package/packages/server/dist/sampling-Du72dbFV.js +0 -1
- package/packages/tools/dist/import-resolver-BjraRSaz.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./server-DrADmSsL.js";export{t as buildPreludeInjection,e as generatePrelude};
|
|
@@ -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};
|