@dtsx/dtsx 0.11.37 → 0.11.39
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/README.md +18 -12
- package/dist/bin/cli.js +3 -3
- package/dist/{chunk-gsb3ty07.js → chunk-0c03j9eq.js} +2 -2
- package/dist/{chunk-n2nyd0ck.js → chunk-0m1wt3db.js} +2 -2
- package/dist/chunk-2dstvjpv.js +3 -0
- package/dist/{chunk-z4mvkazp.js → chunk-2ngfncfx.js} +11 -11
- package/dist/{chunk-ckq8g1ck.js → chunk-31kbs9mj.js} +3 -3
- package/dist/{chunk-m1khpcqb.js → chunk-3dweac93.js} +2 -2
- package/dist/chunk-3jjrn16z.js +14 -0
- package/dist/chunk-3mcz22q8.js +37 -0
- package/dist/{chunk-sjneg7p7.js → chunk-3s37g6bh.js} +8 -8
- package/dist/{chunk-r4s18nn5.js → chunk-45fpbdw3.js} +2 -2
- package/dist/{chunk-w9av39jy.js → chunk-4q78f5pg.js} +2 -2
- package/dist/{chunk-psrgw9f8.js → chunk-550teag8.js} +10 -10
- package/dist/{chunk-v44crx69.js → chunk-60wrxcjt.js} +11 -11
- package/dist/{chunk-0ke9xh7t.js → chunk-6epjc5rj.js} +3 -3
- package/dist/{chunk-n37yj3xv.js → chunk-7bt7x8sy.js} +3 -3
- package/dist/{chunk-j6pfxvy8.js → chunk-7j4cgkb4.js} +2 -2
- package/dist/chunk-7ynrmx5b.js +29 -0
- package/dist/chunk-7z8pykqp.js +3 -0
- package/dist/{chunk-acyj1dev.js → chunk-8dvxjzhy.js} +2 -2
- package/dist/{chunk-437g8zz6.js → chunk-8fg11pr7.js} +3 -3
- package/dist/{chunk-zq93f8ca.js → chunk-8kj9pkw5.js} +2 -2
- package/dist/chunk-8zvjkzsv.js +3 -0
- package/dist/{chunk-g9d5r6a8.js → chunk-996gqrz6.js} +2 -2
- package/dist/{chunk-aw48mk3t.js → chunk-9gp0e3kn.js} +2 -2
- package/dist/{chunk-rdzfdjkb.js → chunk-a3apthex.js} +3 -3
- package/dist/{chunk-5n0tfrpc.js → chunk-a3vfqhnp.js} +3 -3
- package/dist/{chunk-s0mvstt0.js → chunk-aak9xzy7.js} +2 -2
- package/dist/{chunk-p7w9ydhe.js → chunk-aq7y0s2v.js} +4 -4
- package/dist/{chunk-nchp0pqa.js → chunk-axj2w6hp.js} +2 -2
- package/dist/{chunk-dfye109x.js → chunk-ayyb1jpe.js} +2 -2
- package/dist/{chunk-srg5qhch.js → chunk-bc7ahgxz.js} +4 -4
- package/dist/{chunk-pzedkn7z.js → chunk-bkbsg2bv.js} +2 -2
- package/dist/{chunk-km8t8gqg.js → chunk-btc6zbyj.js} +2 -2
- package/dist/{chunk-1j6092xz.js → chunk-c7a07a26.js} +4 -4
- package/dist/{chunk-gs7wfk8b.js → chunk-cyw59tgm.js} +1 -1
- package/dist/{chunk-4f2mwn7p.js → chunk-dh3y4pf7.js} +4 -4
- package/dist/{chunk-strqhcqs.js → chunk-dpcvehxp.js} +2 -2
- package/dist/{chunk-knrtwppp.js → chunk-ee109s3r.js} +6 -6
- package/dist/{chunk-cen2t56g.js → chunk-ex03kbwr.js} +2 -2
- package/dist/{chunk-r4zkf9ag.js → chunk-fay5vymp.js} +2 -2
- package/dist/{chunk-xsf941gw.js → chunk-g3zt5h6d.js} +2 -2
- package/dist/{chunk-gsv5yc32.js → chunk-hgscwj1y.js} +4 -4
- package/dist/{chunk-mt9219xc.js → chunk-hqph3vnd.js} +5 -5
- package/dist/chunk-hvy1zvk6.js +3 -0
- package/dist/{chunk-wnk9yjw2.js → chunk-jfygtm4r.js} +2 -2
- package/dist/{chunk-xr1h3tv2.js → chunk-jhpfmjnx.js} +2 -2
- package/dist/chunk-js4m0y2m.js +3 -0
- package/dist/{chunk-wzcwctba.js → chunk-jswvvjkr.js} +3 -3
- package/dist/{chunk-1e10w914.js → chunk-jvqczw2k.js} +3 -3
- package/dist/{chunk-7610h2tf.js → chunk-jyq39qjt.js} +2 -2
- package/dist/{chunk-pga5m4wm.js → chunk-k5wz43yh.js} +2 -2
- package/dist/{chunk-bqabznps.js → chunk-ka8mbyjb.js} +2 -2
- package/dist/{chunk-2kwjbk55.js → chunk-kccc6p2t.js} +2 -2
- package/dist/{chunk-py7pj8aj.js → chunk-khyg6w62.js} +4 -4
- package/dist/{chunk-sq34kkhy.js → chunk-kv0bpgyw.js} +2 -2
- package/dist/{chunk-gpq2kggq.js → chunk-kv3x5jrs.js} +2 -2
- package/dist/{chunk-ggbahdr2.js → chunk-m0tacjrk.js} +3 -3
- package/dist/{chunk-bdxq6500.js → chunk-nd0sbh5r.js} +3 -3
- package/dist/{chunk-fgbdm1y6.js → chunk-nqgfrehj.js} +4 -4
- package/dist/{chunk-ezbp8tss.js → chunk-p4hf9bwj.js} +8 -8
- package/dist/{chunk-n6nw7sn2.js → chunk-phwfth21.js} +5 -5
- package/dist/chunk-qq5x44y9.js +38 -0
- package/dist/{chunk-q0hn0ymb.js → chunk-qrwst9bb.js} +4 -4
- package/dist/{chunk-nn9tpxx3.js → chunk-sgcne5bb.js} +2 -2
- package/dist/{chunk-dv5hhg1a.js → chunk-t6ds7drh.js} +2 -2
- package/dist/{chunk-wrnz0e76.js → chunk-tm2j0feh.js} +3 -3
- package/dist/chunk-vbzchjvq.js +3 -0
- package/dist/{chunk-60ssvwc8.js → chunk-veh8ks5v.js} +2 -2
- package/dist/chunk-vf8jmdsp.js +3 -0
- package/dist/chunk-vgmnxnjf.js +27 -0
- package/dist/{chunk-1h6ycqza.js → chunk-w26wgqh8.js} +4 -4
- package/dist/{chunk-n3p7wedp.js → chunk-x3arymvk.js} +2 -2
- package/dist/{chunk-fy97syc2.js → chunk-y3x7p6jf.js} +2 -2
- package/dist/{chunk-853ftm92.js → chunk-y4wykrya.js} +5 -5
- package/dist/{chunk-h7k9wamx.js → chunk-ybzz1jg7.js} +2 -2
- package/dist/chunk-yde8rmfm.js +31 -0
- package/dist/chunk-yzdh207n.js +10 -0
- package/dist/chunk-z6mpxpxt.js +3 -0
- package/dist/chunk-zbe06f63.js +3 -0
- package/dist/{chunk-vtskg4r2.js → chunk-zk55g2cb.js} +2 -2
- package/dist/{chunk-1bpv3tck.js → chunk-zn2gvwve.js} +4 -4
- package/dist/src/augmentation-graph.js +1 -1
- package/dist/src/binding-patterns.js +1 -1
- package/dist/src/branded-types.d.ts +0 -11
- package/dist/src/branded-types.js +1 -1
- package/dist/src/bundle-linker.js +1 -1
- package/dist/src/bundler.js +1 -1
- package/dist/src/cache.js +1 -1
- package/dist/src/call-signatures.js +1 -1
- package/dist/src/circular.js +1 -1
- package/dist/src/compat.js +1 -1
- package/dist/src/computed-keys.js +1 -1
- package/dist/src/concurrency.js +1 -1
- package/dist/src/config.js +1 -1
- package/dist/src/dangling-refs.js +1 -1
- package/dist/src/declaration-project.js +1 -1
- package/dist/src/declaration-publication.js +1 -1
- package/dist/src/declaration-references.js +1 -1
- package/dist/src/diff.js +1 -1
- package/dist/src/docs.js +1 -1
- package/dist/src/enum-declarations.js +1 -1
- package/dist/src/errors.js +1 -1
- package/dist/src/extractor/directives.js +1 -1
- package/dist/src/extractor/extract.js +1 -1
- package/dist/src/extractor/scanner.js +1 -1
- package/dist/src/extractor.js +1 -1
- package/dist/src/formats.js +1 -1
- package/dist/src/formatter.js +1 -1
- package/dist/src/function-properties.js +1 -1
- package/dist/src/generator.js +1 -1
- package/dist/src/global-types.js +1 -1
- package/dist/src/import-sorter.js +1 -1
- package/dist/src/incremental.d.ts +4 -4
- package/dist/src/incremental.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/inferred-imports.js +1 -1
- package/dist/src/json-config.js +1 -1
- package/dist/src/lexical.js +1 -1
- package/dist/src/logger.js +1 -1
- package/dist/src/lsp.js +1 -1
- package/dist/src/memory.js +1 -1
- package/dist/src/merger.js +1 -1
- package/dist/src/module-graph.js +1 -1
- package/dist/src/module-references.js +1 -1
- package/dist/src/native-checker.js +1 -1
- package/dist/src/native-engine.js +1 -1
- package/dist/src/native-extractor.js +1 -1
- package/dist/src/native-generation.js +1 -1
- package/dist/src/native-project.js +1 -1
- package/dist/src/optimizer.js +1 -1
- package/dist/src/output-normalizer.js +1 -1
- package/dist/src/parallel-processor.js +1 -1
- package/dist/src/parameters.d.ts +18 -0
- package/dist/src/parameters.js +1 -1
- package/dist/src/parser.js +1 -1
- package/dist/src/plugins/bun.js +1 -1
- package/dist/src/plugins/esbuild.js +1 -1
- package/dist/src/plugins/index.js +1 -1
- package/dist/src/plugins/tsdown.js +1 -1
- package/dist/src/plugins/tsup.js +1 -1
- package/dist/src/plugins/vite.js +1 -1
- package/dist/src/plugins/webpack.js +1 -1
- package/dist/src/plugins.js +1 -1
- package/dist/src/process-source.js +1 -1
- package/dist/src/processor/cache.js +1 -1
- package/dist/src/processor/comments.js +1 -1
- package/dist/src/processor/declarations.js +1 -1
- package/dist/src/processor/import-usage.js +1 -1
- package/dist/src/processor/imports.js +1 -1
- package/dist/src/processor/index.js +1 -1
- package/dist/src/processor/type-inference.d.ts +29 -0
- package/dist/src/processor/type-inference.js +1 -1
- package/dist/src/processor.js +1 -1
- package/dist/src/profiling.js +1 -1
- package/dist/src/return-type-scope.js +1 -1
- package/dist/src/security.js +1 -1
- package/dist/src/source-cache.js +1 -1
- package/dist/src/sourcemap.js +1 -1
- package/dist/src/stx.js +1 -1
- package/dist/src/tracking.js +1 -1
- package/dist/src/transformers.js +1 -1
- package/dist/src/tree-shaker.js +1 -1
- package/dist/src/tsconfig.js +1 -1
- package/dist/src/type-mappings.d.ts +0 -13
- package/dist/src/type-mappings.js +1 -1
- package/dist/src/utils.js +1 -1
- package/dist/src/value-inference.js +1 -1
- package/dist/src/vue.js +1 -1
- package/dist/src/watcher.js +1 -1
- package/dist/src/worker-thread.js +1 -1
- package/dist/src/worker.js +1 -1
- package/dist/src/workspace.js +1 -1
- package/native/darwin-arm64/libzig-dtsx.dylib +0 -0
- package/native/darwin-x64/libzig-dtsx.dylib +0 -0
- package/native/freebsd-x64/libzig-dtsx.so +0 -0
- package/native/linux-arm64/libzig-dtsx.so +0 -0
- package/native/linux-x64/libzig-dtsx.so +0 -0
- package/native/windows-x64/zig-dtsx.dll +0 -0
- package/package.json +1 -1
- package/dist/chunk-0azm93j9.js +0 -31
- package/dist/chunk-1pz7zxhc.js +0 -3
- package/dist/chunk-25vyhfzh.js +0 -3
- package/dist/chunk-69dbf6de.js +0 -3
- package/dist/chunk-79nv7twc.js +0 -14
- package/dist/chunk-90aptjh6.js +0 -24
- package/dist/chunk-cs4gwz1k.js +0 -27
- package/dist/chunk-d43bpfk6.js +0 -3
- package/dist/chunk-n94729d9.js +0 -3
- package/dist/chunk-p2qz2nk2.js +0 -3
- package/dist/chunk-qnf4byak.js +0 -3
- package/dist/chunk-rmdwvzgn.js +0 -3
- package/dist/chunk-s6c98nad.js +0 -29
- package/dist/chunk-t1jtn2r0.js +0 -10
- package/dist/chunk-ttc5pr8y.js +0 -37
- package/dist/chunk-xb92nrsm.js +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{
|
|
2
|
+
import{B}from"./chunk-60wrxcjt.js";import{k}from"./chunk-7z8pykqp.js";import{Ce,ve}from"./chunk-y4wykrya.js";import{createHash as x}from"crypto";import{readFile as d}from"fs/promises";import{resolve as m}from"path";async function An(g){let e={...B,...g},n=e.moduleSpecifierMode??"preserve";if(n!=="node"&&n!=="preserve")throw Error("moduleSpecifierMode must be preserve or node");if(e.plugins?.length)throw Error("Native project planning does not support generation plugins");let o=await Ce(e),l=[];for(let r of o.files){let s=await d(r),a=s.toString("utf8");if(!Buffer.from(a,"utf8").equals(s))throw Error(`Native declaration source must be valid UTF-8: ${r}`);let u=o.outputBySource.get(r),v=ve(r,e,o.resolver),i=[],S=new Set(k(a,{includeImports:!0}).map((t)=>t.specifier));for(let t of S){let p=v(t);if(p.kind!=="local")continue;let{resolvedSource:h,declarationOutput:w,emittedSpecifier:y}=p;i.push({specifier:t,resolvedSource:h,declarationOutput:w,emittedSpecifier:y})}let c={version:1,moduleSpecifierMode:n,sourceFile:r,outputFile:u,sourceHash:x("sha256").update(s).digest("hex"),rewrites:i};if(!e.isolatedDeclarations&&i.length)c.inferenceSources=await Promise.all(i.map(async(t)=>({specifier:t.specifier,source:await d(t.resolvedSource,"utf8")})));let f=o.augmentationImports.get(r);if(f?.size)c.augmentationImports=[...f];l.push(Object.freeze({sourceFile:r,outputFile:u,source:a,context:c}))}return Object.freeze({version:1,rootPath:m(e.cwd,e.root),outdirPath:m(e.cwd,e.outdir),files:Object.freeze(l)})}
|
|
3
|
+
export{An};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Se}from"./chunk-2dstvjpv.js";import{e}from"./chunk-btc6zbyj.js";import{Ee,U}from"./chunk-7z8pykqp.js";import{existsSync as x}from"fs";import{basename as D,dirname as M,extname as R,isAbsolute as v,relative as p,resolve as m}from"path";var{Glob:j}=globalThis.Bun;async function Ce(r,o){let s=await F(r);C(r,s);let n=s.slice(),a=await(o?o():Ee(r)),t=null;if(r.autoIncludeReExports!==!1&&n.length>0){t=await U(n,{includeImports:!0,resolveSpecifier:a});let l=m(r.cwd,r.root),u=r.exclude||[],f=[];for(let c of t.reachable){if(n.includes(c))continue;if(!b(c))continue;if(c.endsWith(".d.ts"))continue;if(c.includes("node_modules"))continue;let E=r.outputStructure==="flat"&&s.some((O)=>a.isPackageLocal?.(O,c));if(!S(c,l)&&!E){e.warn(`Skipping auto-included source outside root: ${p(r.cwd,c)}`);continue}if(X(c,u,l))continue;f.push(c)}if(f.length>0)n=[...n,...f],e.debug(`Auto-included ${f.length} file(s) reached via relative re-exports`)}let i=N(n,r),d=t??await U(n,{includeImports:!0,resolveSpecifier:a}),g=await Se([...d.sources.keys()],a,r.isolatedDeclarations??!1,d.sources),h=new Set(n);for(let[l,u]of g){if(!h.has(l))continue;for(let f of u){let c=a(f,l).resolved;if(c&&!h.has(c))throw Error(`Module augmentation import ${JSON.stringify(f)} from ${l} requires a source not emitted by this package build: ${c}`)}}let y=[...g].map(([l,u])=>[l,[...u].sort()]).sort(([l],[u])=>l.localeCompare(u));return Object.freeze({entryFiles:Object.freeze(s),files:Object.freeze(n),outputBySource:i,resolver:a,reachability:t,augmentationImports:g,getResolutionFingerprint:()=>JSON.stringify({resolution:a.cacheKey?.(n),augmentations:y})})}var P=50,w=new Map;function k(r){let o=w.get(r);if(!o){if(o=new j(r),w.set(r,o),w.size>P){let s=w.keys().next().value;if(s!==void 0)w.delete(s)}}return o}function X(r,o,s){if(!o||o.length===0)return!1;let n=p(s,r);for(let a of o){let t=k(a);if(t.match(n)||t.match(r))return!0}return!1}var G=/[*?[\]{}!]/;function C(r,o){let s=m(r.cwd,r.root),n=` root: ${s}
|
|
3
3
|
entrypoints: ${r.entrypoints.map((t)=>JSON.stringify(t)).join(", ")||"(none)"}
|
|
4
4
|
`+(r.exclude?.length?` exclude: ${r.exclude.map((t)=>JSON.stringify(t)).join(", ")}
|
|
5
|
-
`:"")+"Entrypoints are resolved relative to --root. Pass several by repeating --entrypoints or separating them with commas.";if(o.length===0){if(r.entrypoints.filter((i)=>
|
|
6
|
-
${n}`)}let a=r.entrypoints.filter((t)=>{if(
|
|
7
|
-
${n}`)}async function
|
|
8
|
-
export{
|
|
5
|
+
`:"")+"Entrypoints are resolved relative to --root. Pass several by repeating --entrypoints or separating them with commas.";if(o.length===0){if(r.entrypoints.filter((i)=>v(i)&&x(i)&&!S(i,s)).length===r.entrypoints.length)return;throw Error(`No source files matched. Nothing was generated.
|
|
6
|
+
${n}`)}let a=r.entrypoints.filter((t)=>{if(G.test(t))return!1;return!x(v(t)?t:m(s,t))});if(a.length>0)throw Error(`Entrypoint${a.length>1?"s":""} not found: ${a.map((t)=>JSON.stringify(t)).join(", ")}
|
|
7
|
+
${n}`)}async function F(r){let o=[],s=m(r.cwd,r.root),n=r.exclude||[],a=[...r.entrypoints,...r.include??[]];for(let t of a)if(v(t)&&b(t)){if(!t.includes("node_modules")){if(!S(t,s)&&r.outputStructure!=="flat")e.warn(`Skipping entrypoint outside root: ${p(r.cwd,t)}`);else if(!X(t,n,s))o.push(t)}}else{let i=new j(t);for await(let d of i.scan({cwd:s,absolute:!0,onlyFiles:!0}))if(b(d)&&!d.includes("node_modules")){if(!X(d,n,s))o.push(d)}}return[...new Set(o.map((t)=>m(t)))].sort()}function S(r,o){let s=p(o,r);return s!==".."&&!s.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!v(s)}function N(r,o){let s=new Map,n=new Map;for(let a of r){let t=V(a,o),i=s.get(t);if(i&&i!==a)throw Error(`Output path collision: ${p(o.cwd,i)} and ${p(o.cwd,a)} both emit ${p(o.cwd,t)}`);s.set(t,a),n.set(a,t)}return n}function b(r){return/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/.test(r)&&!/\.d\.(?:ts|mts|cts)$/.test(r)}function V(r,o){let s=m(o.cwd,o.root),n=p(s,r),a=/\.d\.(?:ts|mts|cts)$/.test(n)?n:n.replace(/\.(m?tsx?|cts|jsx?|mjs|cjs|vue|stx)$/,(t)=>{if(t===".mts"||t===".mjs")return".d.mts";if(t===".cts"||t===".cjs")return".d.cts";return".d.ts"});if(o.outputStructure==="mirror")return m(o.cwd,o.outdir,a);else{let t=D(a);return m(o.cwd,o.outdir,t)}}function Yo(r,o,s=""){let n=p(M(r),o).replace(/\\/g,"/");if(n=n.replace(/\.d\.mts$/,"").replace(/\.d\.cts$/,"").replace(/\.d\.ts$/,""),s)n+=s;if(!n.startsWith("."))n=`./${n}`;return n}function ve(r,o,s,n){let a=V(r,o);return(t)=>{let i=s(t,r);if(!i.isRelative||!i.resolved)return{kind:"unchanged",reason:i.isRelative?"unresolved":"external",specifier:t,emittedSpecifier:t};if(/\.d\.(?:ts|mts|cts)$/.test(i.resolved)){if(o.moduleSpecifierMode!=="node")return{kind:"unchanged",reason:"preserved-declaration",specifier:t,emittedSpecifier:t};if(n&&!n.has(i.resolved))throw Error(`Local declaration ${JSON.stringify(t)} from ${r} targets an authored declaration not emitted by this package build: ${i.resolved}. Declaration-only dependencies must be delivered with the package before this importer can be emitted.`)}if(i.isAlias&&n&&!n.has(i.resolved))throw Error(`Local alias ${JSON.stringify(t)} from ${r} targets a declaration excluded from this package build: ${i.resolved}`);if(n&&!n.has(i.resolved)&&X(i.resolved,o.exclude??[],m(o.cwd,o.root)))throw Error(`Local reference ${JSON.stringify(t)} from ${r} targets a source excluded from this package build: ${i.resolved}`);let d=i.isAlias?i.suffix??"":t.match(/[?#].*$/)?.[0]??"",g=d?t.slice(0,-d.length):t,h=R(g),y=/^(?:\.js|\.jsx|\.mjs|\.cjs)$/.test(h)?h:"";if(!y&&o.moduleSpecifierMode==="node"){let u=R(i.resolved);y=u===".mts"||u===".mjs"?".mjs":u===".cts"||u===".cjs"?".cjs":".js"}let l=V(i.resolved,o);return{kind:"local",specifier:t,resolvedSource:i.resolved,declarationOutput:l,emittedSpecifier:Yo(a,l,y)+d}}}
|
|
8
|
+
export{Ce,X,S,V,Yo,ve};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{basename as e,dirname as n,isAbsolute as i,join as o,relative as a,resolve as s}from"path";function
|
|
3
|
-
export{
|
|
2
|
+
import{basename as e,dirname as n,isAbsolute as i,join as o,relative as a,resolve as s}from"path";function Ri(t){if(!t||typeof t!=="string")throw Error("Invalid file path: must be a non-empty string");return t}function Mi(t){if(!t||typeof t!=="string")throw Error("Invalid directory path: must be a non-empty string");return t}function Oi(t){if(!t||typeof t!=="string")throw Error("Invalid glob pattern: must be a non-empty string");return t}function Ii(t){if(typeof t!=="string")throw TypeError("Invalid source code: must be a string");return t}function Li(t){if(typeof t!=="string")throw TypeError("Invalid DTS content: must be a string");return t}function Fi(t){if(!t||typeof t!=="string")throw Error("Invalid module specifier: must be a non-empty string");return t}function Ni(t){if(!t||typeof t!=="string")throw Error("Invalid type name: must be a non-empty string");if(!["string","number","boolean","symbol","bigint","undefined","null","void","never","any","unknown","object"].includes(t)&&!/^[A-Z_$]/.test(t));return t}function Bi(t){if(!t||typeof t!=="string")throw Error("Invalid declaration name: must be a non-empty string");return t}function Wi(t){if(!t||typeof t!=="string")throw Error("Invalid absolute path: must be a non-empty string");if(!t.startsWith("/")&&!/^[A-Z]:/i.test(t))throw Error("Invalid absolute path: must start with / or drive letter");return t}function ji(t){if(!t||typeof t!=="string")throw Error("Invalid relative path: must be a non-empty string");if(t.startsWith("/")||/^[A-Z]:/i.test(t))throw Error("Invalid relative path: must not be absolute");return t}function _i(t){if(typeof t!=="string")throw TypeError("Invalid JSON string: must be a string");try{JSON.parse(t)}catch{throw Error("Invalid JSON string: must be valid JSON")}return t}function Gi(t,r){return typeof t==="string"||typeof t==="number"}function Vi(t){return t}var Ui={join(t,...r){return o(t,...r)},dirname(t){return n(t)},basename(t){return e(t)},resolve(...t){return s(...t)},isAbsolute(t){return i(t)},relative(t,r){return a(t,r)}};
|
|
3
|
+
export{Ri,Mi,Oi,Ii,Li,Fi,Ni,Bi,Wi,ji,_i,Gi,Vi,Ui};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{g,ee,Et,u}from"./chunk-ayyb1jpe.js";import{W}from"./chunk-k5wz43yh.js";import{R,M}from"./chunk-2ngfncfx.js";import{P,D}from"./chunk-hqph3vnd.js";import{r}from"./chunk-z6mpxpxt.js";import{Se}from"./chunk-2dstvjpv.js";import{e,A}from"./chunk-btc6zbyj.js";import{Ee,k,Pn,U}from"./chunk-7z8pykqp.js";import{vn}from"./chunk-vgmnxnjf.js";import{He,wt}from"./chunk-ka8mbyjb.js";import{E}from"./chunk-60wrxcjt.js";import{Ce,X,V,ve}from"./chunk-y4wykrya.js";import{Ke,G,q,xt,Ct,vt,St}from"./chunk-3jjrn16z.js";import{K,he}from"./chunk-aak9xzy7.js";import{ze,bt}from"./chunk-p4hf9bwj.js";import{H}from"./chunk-8dvxjzhy.js";import{kn,Je}from"./chunk-zbe06f63.js";import{ye}from"./chunk-4q78f5pg.js";import{Ve}from"./chunk-550teag8.js";import{xe}from"./chunk-jswvvjkr.js";import{l}from"./chunk-yzdh207n.js";import{J,$t}from"./chunk-sgcne5bb.js";import{mkdir as De}from"fs/promises";import{availableParallelism as Pe}from"os";import{basename as ue,dirname as fe,relative as B,resolve as ie}from"path";var oe=new WeakMap,ce=new WeakMap;function se(d){let a=oe.get(d);if(!a)a=Ee(d),oe.set(d,a),a.catch(()=>oe.delete(d));return a}async function le(d,a,t,f,w,h=G){let o=ue(d)||"output.d.ts",C=B(fe(d),a),I=`${o}.map`,Y=t.lastIndexOf(`
|
|
3
|
+
${Ke()}`),p=Y===-1?t:t.slice(0,Y),y=vt(p,o,C,f),b=`${d}.map`;return await h(b,JSON.stringify(y)),e.debug(` Generated source map: ${B(w,b)}`),I}async function s(d){let a=Date.now(),t={...E,...d};if(t.logLevel)A(t.logLevel);else if(t.verbose)A("debug");let f=new xe;if(t.plugins&&t.plugins.length>0){for(let n of t.plugins)f.register(n),e.debug(`Registered plugin: ${n.name}`);t=await f.runOnStart(t)}if(t.moduleSpecifierMode!==void 0&&t.moduleSpecifierMode!=="preserve"&&t.moduleSpecifierMode!=="node")throw Error("moduleSpecifierMode must be preserve or node");if(await K(t),t.isolatedDeclarations===void 0)t.isolatedDeclarations=await q(t);let w=t.typeMappings?J(t.typeMappings):void 0,h=null,o={generationMode:t.isolatedDeclarations?"isolated":"semantic",filesProcessed:0,filesGenerated:0,filesFailed:0,filesValidated:0,validationErrors:0,declarationsFound:0,importsProcessed:0,exportsProcessed:0,durationMs:0,errors:[]},C=0;e.debug("Starting DTS generation..."),e.debug(`Using ${o.generationMode} declaration generation path`),e.debug("Config:",t);let I=await Ce(t,()=>se(t)),Y=I.entryFiles,p=[...I.files],{resolver:y,reachability:b}=I;if(ce.set(t,new Set(p)),t.incremental){let n=I.getResolutionFingerprint();if(!t.isolatedDeclarations){let i=new Set(p),m=new Map;for(let S of p){let T=await u(S);m.set(S,Je(T));for(let te of k(T,{includeImports:!0})){let O=y(te.specifier,S).resolved;if(O&&!O.split(/[/\\]/).includes("node_modules")&&!i.has(O))i.add(O),m.set(O,Je(await u(O)))}}let c=[...m].sort(([S],[T])=>S.localeCompare(T));n=JSON.stringify([n,c])}if(h=new He(t,n),t.clearCache){if(e.debug("Clearing build cache..."),!t.dryRun)h.clear()}else if(h.load()){let m=h.getStats();e.debug(`Loaded build cache with ${m.entries} entries`)}else e.debug("No existing build cache found, starting fresh");if(!t.dryRun)wt(t.cwd)}if(h&&!t.dryRun){let n=h.prune(new Set(p),t.cwd);if(n>0)e.debug(`Pruned ${n} deleted files from cache`)}if(e.debug(`Found ${p.length} TypeScript files`),t.progress&&p.length>0){let n=t.parallel?"parallel":"sequential";e.info(`Processing ${p.length} files (${n})...`)}let L=new Map,N=new Map,v=async(n,i,m="lf")=>{N.set(n,{content:i,lineEnding:m})},x=async(n,i)=>{let m;try{let c=V(n,t),S=async(F)=>{if(!t.diff)return;try{let _=await u(c),Q=Ct(_,F,B(t.cwd,c));if(Q)e.info(`
|
|
4
|
+
${Q}`);else e.debug(`[no changes] ${c}`)}catch{e.info(`[new file] ${B(t.cwd,c)}`)}},T=(F)=>{if(!t.validate)return 0;let _=xt(F,c);if(_.isValid)return e.debug(`[validation] ${c} - OK`),0;e.warn(`[validation] ${B(t.cwd,c)} has ${_.errors.length} error(s):`);for(let Q of _.errors){let ae=` Line ${Q.line}:${Q.column}`;if(Q.code)ae+=` [${Q.code}]`;if(ae+=` - ${Q.message}`,e.warn(ae),Q.suggestion)e.warn(` Suggestion: ${Q.suggestion}`)}return _.errors.length},te=(F)=>{e.info(`[dry-run] Would generate: ${c}`),e.debug("--- Content preview ---"),e.debug(F.slice(0,500)+(F.length>500?`
|
|
5
|
+
...`:"")),e.debug("--- End preview ---")};if(h){let F=h.getCachedIfValid(n,t.cwd);if(F){if(t.bundle)L.set(n,F);await S(F);let _=T(F);if(t.dryRun)te(F);else{if(t.declarationMap)m=i??await u(n),await le(c,n,F,m,t.cwd,v);await v(c,F,t.lineEnding)}return e.debug(`[cached] ${B(t.cwd,c)}`),{success:!0,file:n,declarationCount:0,importCount:0,exportCount:0,cached:!0,validationErrorCount:_}}}m=i??await u(n);let{content:O,declarationCount:ge,importCount:we,exportCount:be}=await me(n,m,t,f,w,I.augmentationImports.get(n));if(t.bundle)L.set(n,O);let j=O;if(t.prettier||t.indentStyle||t.indentSize){let F=await H(j,{usePrettier:t.prettier,builtIn:{indentSize:t.indentSize||2,useTabs:t.indentStyle==="tabs",normalizeWhitespace:!0,sortImports:!0,trailingNewline:!0}},c);j=F.content;for(let _ of F.warnings??[])e.warn(`[format] ${_}`)}if(t.declarationMap){let F=`${ue(c)||"output.d.ts"}.map`;j=St(j,F)}await S(j);let $e=T(j);if(t.dryRun)te(j);else{if(t.declarationMap&&m)await le(c,n,j,m,t.cwd,v);if(await v(c,j,t.lineEnding),h&&m)h.update(n,m,j,t.cwd);e.debug(`Generated: ${c}`)}return{success:!0,file:n,declarationCount:ge,importCount:we,exportCount:be,validationErrorCount:$e}}catch(c){let S=ze(c,n,m);if(t.plugins&&t.plugins.length>0)await f.runOnError(c instanceof Error?c:Error(String(c)),n,m||"");return{success:!1,file:n,declarationCount:0,importCount:0,exportCount:0,dtsError:S,validationErrorCount:0}}},z=t.parallel||t.parallel!==!1&&p.length>=10,Z=W(t.concurrency,Pe?.()??8),ne=new Map;if(z&&p.length>1){let n=p.map(async(i)=>{try{let m=await u(i);return{file:i,source:m}}catch{return{file:i,source:null}}});for(let i of await Promise.all(n))if(i.source!==null)ne.set(i.file,i.source)}let re=(n)=>{if(o.filesProcessed++,n.success){if(n.cached)C++;else o.filesGenerated++,o.declarationsFound+=n.declarationCount,o.importsProcessed+=n.importCount,o.exportsProcessed+=n.exportCount;if(t.validate){if(o.filesValidated++,n.validationErrorCount)o.validationErrors+=n.validationErrorCount}}else if(o.filesFailed++,n.dtsError){o.errors.push(n.dtsError);let i=bt(n.dtsError);if(t.continueOnError)e.warn(i);else throw e.error(i),Error(n.dtsError.message)}};if(z)for(let n=0;n<p.length;n+=Z){let i=p.slice(n,n+Z),m=await Promise.all(i.map((c)=>x(c,ne.get(c))));for(let c of m)re(c);if(t.progress){let c=Math.round(o.filesProcessed/p.length*100);e.info(`[${o.filesProcessed}/${p.length}] ${c}%`)}}else for(let n of p){let i=await x(n);if(re(i),t.progress){let m=Math.round(o.filesProcessed/p.length*100),c=i.cached?"[cached]":"";e.info(`[${o.filesProcessed}/${p.length}] ${m}% - ${B(t.cwd,n)} ${c}`)}}if(!t.bundle){let n=[];if(b)for(let i of b.unresolved)n.push({from:i.from,specifier:i.specifier,reason:"missing"});if(t.autoIncludeReExports===!1&&p.length>0){let i=new Set(p);for(let m of p){let c;try{c=await u(m)}catch{continue}for(let S of k(c)){let T=y(S.specifier,m);if(!T.isRelative)continue;if(!T.resolved)n.push({from:m,specifier:S.specifier,reason:"missing"});else if(!/\.d\.(?:ts|mts|cts)$/.test(T.resolved)&&!i.has(T.resolved))n.push({from:m,specifier:S.specifier,reason:"not-emitted"})}}}if(n.length>0){let i=[];i.push(`Found ${n.length} re-export(s) pointing at siblings that won't be in the output:`);for(let c of n){let S=B(t.cwd,c.from);if(c.reason==="missing")i.push(` ${S} \u2192 '${c.specifier}' (path not found on disk)`);else i.push(` ${S} \u2192 '${c.specifier}' (resolved but not in entrypoints; set autoIncludeReExports: true or add to entrypoints)`)}let m=i.join(`
|
|
6
|
+
`);if(t.failOnUnresolvedReExport)throw Error(m);e.warn(m),e.warn('Generated .d.ts files reference modules that were not emitted \u2014 consumers will see "has no exported member" errors.')}}if(t.bundle&&(o.filesGenerated>0||C>0)&&Y.length>0)try{e.debug("Bundling declarations...");let n=Y.length===1&&!!t.bundleOutput;for(let i of Y){let m=await U([i],{includeImports:!0,resolveSpecifier:y}),c=new Set;for(let O of m.reachable){if(O.endsWith(".d.ts"))continue;if(O.includes("node_modules"))continue;c.add(O)}let S=p.filter((O)=>c.has(O));if(!S.includes(i))S.push(i);let T=vn(i,S,L,{cwd:t.cwd,keepComments:t.keepComments});for(let O of new Set(T.warnings))e.warn(`[bundle] ${O}`);let te=n?ie(t.cwd,t.outdir,t.bundleOutput):V(i,t);if(t.dryRun)e.info(`[dry-run] Would bundle ${T.files.length} files to: ${B(t.cwd,te)}`);else await v(te,T.content,t.lineEnding),e.debug(`Prepared ${T.files.length} bundled files for: ${B(t.cwd,te)}`);if(n)break}}catch(n){let i=n instanceof Error?n.message:String(n);throw e.error(`Bundle failed: ${i}`),n}if(!t.dryRun)await he(t,N);if(h&&!t.dryRun)h.save(),e.debug("Saved build cache");if(o.durationMs=Date.now()-a,t.stats)if(t.outputFormat==="json")console.log(JSON.stringify(o,null,2));else{if(e.info(`
|
|
7
|
+
--- Generation Statistics ---`),e.info(`Files processed: ${o.filesProcessed}`),e.info(`Files generated: ${o.filesGenerated}`),C>0)e.info(`Files cached: ${C}`);if(o.filesFailed>0)e.info(`Files failed: ${o.filesFailed}`);if(e.info(`Declarations found: ${o.declarationsFound}`),e.info(`Imports processed: ${o.importsProcessed}`),e.info(`Exports processed: ${o.exportsProcessed}`),o.filesValidated>0){if(e.info(`Files validated: ${o.filesValidated}`),o.validationErrors>0)e.info(`Validation errors: ${o.validationErrors}`)}if(e.info(`Duration: ${o.durationMs}ms`),o.errors.length>0){e.info(`
|
|
8
|
+
Errors:`);for(let n of o.errors){let i=` - ${n.file}`;if(n.location)i+=`:${n.location.line}:${n.location.column}`;if(n.code)i+=` [${n.code}]`;if(i+=`: ${n.message}`,e.info(i),n.suggestion)e.info(` Suggestion: ${n.suggestion}`)}}e.info(`-----------------------------
|
|
9
|
+
`)}if(t.plugins&&t.plugins.length>0)await f.runOnEnd(o);return e.debug("DTS generation complete!"),o}async function Me(d,a,t){let f=await se(t),w=ve(a,t,f,ce.get(t));return Pn(d,(h)=>w(h).emittedSpecifier)}async function ro(d,a){oe.delete(a),ce.delete(a);let t=await se(a),f=await U([d],{includeImports:!0,resolveSpecifier:t}),w=await Se([...f.sources.keys()],t,a.isolatedDeclarations??!1,f.sources);return(await pe(d,a,void 0,w.get(ie(d)))).content}async function pe(d,a,t,f){let w=await u(d),h=a.typeMappings?J(a.typeMappings):void 0;return me(d,w,a,t,h,f)}async function me(d,a,t,f,w,h){let o=a;if(f)o=await f.runOnBeforeFile(d,a);let C=new Map;if(!t.isolatedDeclarations){let v=await se(t);for(let x of k(o,{includeImports:!0})){let z=v(x.specifier,d).resolved;if(z&&!z.split(/[/\\]/).includes("node_modules"))C.set(x.specifier,await u(z))}}let I=f?.hasDeclarationHooks()?null:Re(o,d,t,C,h);if(I!==null)return de(I,d,o,t,f,w,Fe(I));let Y=C.size?kn(o,C):void 0,p=r(o,d,t.keepComments,t.isolatedDeclarations??!1,Y);if(f)p=await f.runOnDeclarations(d,o,p);let y=0,b=0;for(let v=0;v<p.length;v++){let x=p[v];if(x.kind==="import")y++;if(x.kind==="export"||x.isExported)b++}let N=l(p,{filePath:d,sourceCode:o,declarations:p,augmentationImports:h},t.keepComments,t.importOrder);return de(N,d,o,t,f,w,{declarationCount:p.length,importCount:y,exportCount:b})}function Fe(d){let a=0,t=0,f=0;for(let w of d.split(`
|
|
10
|
+
`)){if(!w||w.startsWith(" ")||w.startsWith("\t")||w.startsWith("}")||w.startsWith("*")||w.startsWith("/"))continue;if(a++,w.startsWith("import "))t++;else if(w.startsWith("export "))f++}return{declarationCount:a,importCount:t,exportCount:f}}function Re(d,a,t,f,w){let h=t.importOrder??["bun"];if(h.length!==1||h[0]!=="bun")return null;let o=R(a)?M(d):P(a)?D(d):d;return ye(o,{keepComments:t.keepComments??!0,isolatedDeclarations:t.isolatedDeclarations??!1,sourceFile:a,inferenceSources:f,augmentationImports:w})}async function de(d,a,t,f,w,h,o){let C=await Me(d,a,f);if(h)C=$t(C,h,{filePath:a});if(f.normalizeOutput===!0||f.declarationOrder)C=Ve(C,{lineEnding:"lf",declarationOrder:f.declarationOrder,indent:{style:f.indentStyle??"spaces",size:f.indentSize??2}});if(w)C=await w.runOnAfterFile(a,t,C);return{content:C,...o}}async function io(d){let a={...E,...d};if(a.logLevel)A(a.logLevel);let t=ie(a.cwd,a.root),f=150,w=5,h=1e4,o={pendingChanges:new Set,debounceTimer:null,isProcessing:!1,errorCount:0,lastErrorTime:0};e.info(`Watching for changes in ${t}...`),e.info(`Press Ctrl+C to stop
|
|
11
|
+
`);try{await s(a),e.info(`[watch] Initial generation complete
|
|
12
|
+
`)}catch(y){let b=y instanceof Error?y.message:String(y);e.error(`[watch] Initial generation failed: ${b}`),e.info(`[watch] Continuing to watch for changes...
|
|
13
|
+
`)}async function C(){if(o.isProcessing||o.pendingChanges.size===0)return;let y=Date.now();if(o.errorCount>=w){if(y-o.lastErrorTime<h){e.warn(`[watch] Too many errors, pausing for ${Math.ceil((h-(y-o.lastErrorTime))/1000)}s...`);return}o.errorCount=0}o.isProcessing=!0;let b=Array.from(o.pendingChanges);o.pendingChanges.clear();let L=new Date().toLocaleTimeString();if(b.length===1)e.info(`
|
|
14
|
+
[${L}] File changed: ${b[0]}`);else e.info(`
|
|
15
|
+
[${L}] ${b.length} files changed`);let N=0,v=0;for(let x of b){let z=ie(t,x);try{let Z=a.exclude||[];if(X(z,Z,t)){e.debug(` Skipping excluded file: ${x}`);continue}if(!await ee(z).exists()){e.debug(` Skipping deleted file: ${x}`);continue}let re=V(z,a),{content:n}=await pe(z,a);await De(fe(re),{recursive:!0}),await G(re,n,a.lineEnding),e.info(` \u2713 ${B(a.cwd,re)}`),N++}catch(Z){v++,o.errorCount++,o.lastErrorTime=Date.now();let ne=ze(Z,z);if(e.error(` \u2717 ${x}: ${ne.message}`),ne.suggestion)e.error(` Suggestion: ${ne.suggestion}`)}}if(b.length>1)e.info(` Done: ${N} generated, ${v} failed`);if(v===0)o.errorCount=0;if(o.isProcessing=!1,o.pendingChanges.size>0)o.debounceTimer=setTimeout(C,f)}function I(y){if(o.pendingChanges.add(y),o.debounceTimer)clearTimeout(o.debounceTimer);o.debounceTimer=setTimeout(C,f)}let p=Et([g?"bun":"node","-e",`
|
|
16
|
+
const fs = require('fs');
|
|
17
|
+
|
|
18
|
+
const rootPath = '${t}';
|
|
19
|
+
|
|
20
|
+
fs.watch(rootPath, { recursive: true }, (eventType, filename) => {
|
|
21
|
+
if (filename && /.(?:[cm]?[jt]sx?|vue|stx)$/.test(filename) && !/.d.(?:ts|mts|cts)$/.test(filename)) {
|
|
22
|
+
console.log(\`CHANGED:\${filename}\`);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Keep process alive
|
|
27
|
+
setInterval(() => {}, 1000);
|
|
28
|
+
`],{stdout:"pipe",stderr:"inherit"});if(g){let y=p.stdout.getReader(),b=new TextDecoder,L="";while(!0){let{done:N,value:v}=await y.read();if(N)break;L+=b.decode(v,{stream:!0});let x=L.split(`
|
|
29
|
+
`);L=x.pop()||"";for(let z of x)if(z.startsWith("CHANGED:")){let Z=z.slice(8);I(Z)}}}else{let y=p.stdout,b="";y.on("data",(L)=>{b+=L.toString();let N=b.split(`
|
|
30
|
+
`);b=N.pop()||"";for(let v of N)if(v.startsWith("CHANGED:")){let x=v.slice(8);I(x)}}),await p.exited}}
|
|
31
|
+
export{s,ro,io};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{j,Hn,Kn}from"./chunk-7j4cgkb4.js";import{bn}from"./chunk-veh8ks5v.js";import{f}from"./chunk-a3apthex.js";import{ne,h,re,ie,se,oe,ae}from"./chunk-7ynrmx5b.js";import{Pe,b}from"./chunk-jfygtm4r.js";import{$e}from"./chunk-zk55g2cb.js";function L(k,x){throw Error(x||`Unexpected value: ${k}`)}var V=null,q=[],z=[];function l(k,x,d=!0,y=["bun"]){let o="",m=x.sourceCode;if(m){let e=0;while(e<m.length&&(m.charCodeAt(e)===32||m.charCodeAt(e)===9||m.charCodeAt(e)===10||m.charCodeAt(e)===13))e++;if(e<m.length-2&&m.charCodeAt(e)===47&&m.charCodeAt(e+1)===47&&m.charCodeAt(e+2)===47){let i=bn(m);if(i.length>0)for(let r=0;r<i.length;r++){if(o)o+=`
|
|
3
|
+
`;o+=i[r]}}}let w=[],N=[],M=[],P=[],U=[],W=[],_=[],C=[],T=[];for(let e of k){let i=e.kind;switch(i){case"import":w.push(e);break;case"function":N.push(e);break;case"variable":M.push(e);break;case"interface":P.push(e);break;case"type":U.push(e);break;case"class":W.push(e);break;case"enum":_.push(e);break;case"module":C.push(e);break;case"export":T.push(e);break;case"namespace":C.push(e);break;case"unknown":break;default:L(i,`Unhandled declaration kind: ${i}`)}}let S=[],v=[],A=[],F=new Set;for(let e of T){let i=f(e.leadingComments,d);if(e.text.startsWith("export default")){let r=e.text.endsWith(";")?e.text:`${e.text};`;A.push(i+r)}else{let r=e.text.trim();if(!r.endsWith(";"))r+=";";let a=i+r;if(!F.has(a))if(F.add(a),a.includes("export type"))S.push(a);else v.push(a)}}let u=[];if(w.length>0){let{usedItems:e}=$e(k);for(let r of w){if(r.isSideEffect){let t=r.text.trim(),p=t.endsWith(";")?t:`${t};`;u.push(p);continue}let a=b(r.text);if(!a)continue;let{defaultName:s,namedItems:n,isTypeOnly:g,namespaceName:c}=a,D=s?e.has(s):!1,G=c?e.has(c):!1;if(a.isImportEquals){if(D){let t=r.text.trim();u.push(t.endsWith(";")?t:`${t};`)}else if(x.augmentationImports?.has(a.source)){let t=Pe(r.text);if(!t)throw Error("Cannot locate an augmentation import module literal");u.push(`import ${t};`)}continue}let I="",E=0;for(let t=0;t<n.length;t++){let p=n[t];if(e.has(p.name)){if(E>0)I+=", ";if(!g&&p.isTypeOnly)I+="type ";I+=p.originalName===p.name?p.name:`${p.originalName} as ${p.name}`,E++}}if(D||G||E>0){let t=g?"import type ":"import ";if(G&&c){if(D&&s)t+=`${s}, `;t+=`* as ${c}`}else if(D&&s)t+=E>0?`${s}, { ${I} }`:s;else if(E>0)t+=`{ ${I} }`;let p=Pe(r.text);if(!p)throw Error("Cannot locate a grammatical module literal in the import declaration");t+=` from ${p};`,u.push(t)}else if(x.augmentationImports?.has(a.source)){let t=Pe(r.text);if(!t)throw Error("Cannot locate an augmentation import module literal");u.push(`import ${t};`)}}let i=y.length;if(u.length>1){if(V!==y)V=y,q=y.map((n)=>`from '${n}`),z=y.map((n)=>`from "${n}`);let r=q,a=z,s=new Map;for(let n of u){let g=i;for(let c=0;c<y.length;c++)if(n.includes(r[c])||n.includes(a[c])){g=c;break}s.set(n,g)}u.sort((n,g)=>{let c=s.get(n),D=s.get(g);return c!==D?c-D:n.localeCompare(g)})}}for(let e=0;e<u.length;e++){if(o)o+=`
|
|
4
|
+
`;o+=u[e]}for(let e=0;e<S.length;e++){if(o)o+=`
|
|
5
|
+
`;o+=S[e]}let K=[N,M,P,U,W,_,C];for(let e=0;e<K.length;e++){let i=K[e];for(let r=0;r<i.length;r++){let a=i[r],s="",n=a.kind;switch(n){case"function":s=ne(a,d);break;case"variable":s=h(a,d);break;case"interface":s=re(a,d);break;case"type":s=ie(a,d);break;case"class":s=se(a,d);break;case"enum":s=oe(a,d);break;case"module":case"namespace":s=ae(a,d);break;case"import":case"export":case"unknown":break;default:L(n,`Unhandled declaration kind in processor: ${n}`)}if(s){if(o)o+=`
|
|
6
|
+
`;o+=s}}}for(let e=0;e<v.length;e++){if(o)o+=`
|
|
7
|
+
`;o+=v[e]}for(let e=0;e<A.length;e++){if(o)o+=`
|
|
8
|
+
`;o+=A[e]}if(T.length===0&&j(x.sourceCode)&&(k.some(Kn)||!Hn(o)))o+=`${o?`
|
|
9
|
+
`:""}export {};`;return o}
|
|
10
|
+
export{l};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{W}from"./chunk-k5wz43yh.js";import{Te,Rn}from"./chunk-vbzchjvq.js";import{te,On}from"./chunk-8zvjkzsv.js";function Si(){On(),Rn()}function r(e,t,c=!0,n=!1,o){return Te(e,t,c,n,o)}async function Dn(e,t,c=!0,n={}){return await te(t,e,n),r(e,t,c)}async function $i(e,t={}){let c=W(t.concurrency,4),n=new Map;for(let o=0;o<e.length;o+=c){let s=e.slice(o,o+c),i=await Promise.all(s.map(async(a)=>({path:a.filePath,declarations:await Dn(a.sourceCode,a.filePath,a.keepComments,t)})));for(let a of i)n.set(a.path,a.declarations)}return n}
|
|
3
|
+
export{Si,r,Dn,$i};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Le}from"./chunk-ex03kbwr.js";import{T}from"./chunk-3mcz22q8.js";import{b}from"./chunk-jfygtm4r.js";function kn(i,r){let n=new Set;for(let e of T(i,"imports.ts",!1)){if(e.kind!=="import")continue;let t=b(e.text),a=t&&r.get(t.source);if(!t||t.isTypeOnly||!a)continue;let s=Je(a);for(let o of t.namedItems)if(!o.isTypeOnly&&s.some((m)=>m.name===o.originalName))n.add(o.name);if(t.defaultName&&s.some((o)=>o.isDefault))n.add(t.defaultName)}return n}function Je(i){let r=T(i,"dependency.ts",!1).filter((n)=>n.kind==="function");return r.filter((n)=>n.isExported&&!n.generics&&r.filter((e)=>e.name===n.name).length===1&&Le(i,n.name)===1).map((n)=>({name:n.name,isDefault:Boolean(n.isDefault)})).sort((n,e)=>n.name.localeCompare(e.name))}
|
|
3
|
+
export{kn,Je};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{c,i}from"./chunk-
|
|
2
|
+
import{c,i}from"./chunk-8kj9pkw5.js";import{h}from"./chunk-7ynrmx5b.js";import{y}from"./chunk-jfygtm4r.js";function $e(f){let r=new Set,n=[];for(let t of f)if(t.kind==="import")for(let o of y(t.text))r.add(o);else if(t.kind!=="unknown"){if(n.push(t.text),t.kind==="variable"){if(t.typeAnnotation)n.push(t.typeAnnotation);else if(t.value)n.push(h(t,!1))}}let e=n.join(`
|
|
3
3
|
`),s=new Set;for(let t=0;t<e.length;){if(!c(e.charCodeAt(t))){t++;continue}let o=t++;while(t<e.length&&i(e.charCodeAt(t)))t++;let a=e.slice(o,t);if(r.has(a))s.add(a)}return{usedItems:s,referenceText:e}}
|
|
4
|
-
export{
|
|
4
|
+
export{$e};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{r}from"./chunk-
|
|
2
|
+
import{r}from"./chunk-z6mpxpxt.js";import{existsSync as j,mkdirSync as N,readFileSync as z,writeFileSync as G}from"fs";import{dirname as K,relative as L,resolve as _}from"path";async function ls(t,e,n){let u=new Map,f=[],x=new Set,D=0,w=0,S=0,C=[];for(let i of t){let o=e.get(i);if(!o)continue;C.push({file:i,decls:r(o,i,n.keepComments)})}for(let{file:i,decls:o}of C){D+=o.length;for(let s of o)if(s.kind==="import"){w++;let c=s.source||"";if(c.startsWith("."))continue;if(!u.has(c))u.set(c,{source:c,specifiers:new Map,isTypeOnly:s.isTypeOnly||!1,isSideEffect:s.isSideEffect||!1});let l=u.get(c);if(s.specifiers)for(let h of s.specifiers){let W=h.alias||h.name;if(!l.specifiers.has(W))l.specifiers.set(W,{name:h.name,alias:h.alias,isType:h.isType||!1})}if(!s.isTypeOnly)l.isTypeOnly=!1}else if(s.isExported||s.kind==="export"){if(S++,s.kind==="export"&&s.source&&(s.source.startsWith(".")||s.source.startsWith("/")))continue;if(s.name&&x.has(s.name))continue;if(s.name)x.add(s.name);f.push({declaration:s,file:i})}}let a=[];a.push("/**"),a.push(" * Bundled TypeScript declarations"),a.push(` * Generated from ${t.length} source files`),a.push(" */"),a.push("");let T=n.importOrder||["bun"],y=Array.from(u.values()),p=Array(y.length);for(let i=0;i<y.length;i++){let o=y[i].source,s=T.length;for(let c=0;c<T.length;c++)if(o.startsWith(T[c])){s=c;break}p[i]=s}let g=y.map((i,o)=>o);g.sort((i,o)=>{let s=p[i],c=p[o];if(s!==c)return s-c;return y[i].source.localeCompare(y[o].source)});let b=g.map((i)=>y[i]);for(let i of b)if(i.isSideEffect)a.push(`import '${i.source}';`);else if(i.specifiers.size>0){let s=Array.from(i.specifiers.values()).map((l)=>{let h=l.isType?"type ":"";return l.alias?`${h}${l.name} as ${l.alias}`:`${h}${l.name}`}),c=i.isTypeOnly?"type ":"";a.push(`import ${c}{ ${s.join(", ")} } from '${i.source}';`)}if(b.length>0)a.push("");let m=new Map;for(let{declaration:i,file:o}of f){if(!m.has(o))m.set(o,[]);m.get(o).push(i)}for(let[i,o]of m){let s=L(n.cwd,i);a.push(`// From: ${s}`);for(let c of o){if(n.keepComments&&c.leadingComments)for(let l of c.leadingComments)a.push(l);a.push(F(c))}a.push("")}let d=a.join(`
|
|
3
3
|
`);return{content:d,files:t,declarationCount:D,importCount:w,exportCount:S,size:Buffer.byteLength(d,"utf8"),warnings:[]}}function F(t){if(t.text){let n=t.text.trim();if(t.isExported&&!n.startsWith("export"))n=`export ${n}`;if(!n.endsWith(";")&&!n.endsWith("}"))n+=";";return n}let e=[];if(t.isExported)e.push("export");if(t.isDefault)e.push("default");switch(t.kind){case"function":if(e.push("declare function"),e.push(t.name),t.generics)e.push(t.generics);if(e.push(`(${V(t.parameters)})`),t.returnType)e.push(`: ${t.returnType}`);break;case"variable":if(e.push("declare const"),e.push(t.name),t.typeAnnotation)e.push(`: ${t.typeAnnotation}`);break;case"interface":if(e.push("interface"),e.push(t.name),t.generics)e.push(t.generics);if(t.extends)e.push(`extends ${t.extends}`);if(e.push("{"),t.members)for(let n of t.members)e.push(` ${n.name}${n.typeAnnotation?`: ${n.typeAnnotation}`:""};`);e.push("}");break;case"type":if(e.push("type"),e.push(t.name),t.generics)e.push(t.generics);e.push("="),e.push(t.typeAnnotation||"unknown");break;case"class":if(e.push("declare class"),e.push(t.name),t.generics)e.push(t.generics);if(t.extends)e.push(`extends ${t.extends}`);if(t.implements&&t.implements.length>0)e.push(`implements ${t.implements.join(", ")}`);if(e.push("{"),t.members)for(let n of t.members)e.push(` ${F(n)}`);e.push("}");break;case"enum":if(e.push("declare enum"),e.push(t.name),e.push("{"),t.members){let n=t.members.map((u)=>u.value!==void 0?`${u.name} = ${u.value}`:u.name);e.push(` ${n.join(`,
|
|
4
|
-
`)}`)}e.push("}");break;default:return t.text||""}return e.join(" ")}function V(t){if(!t||t.length===0)return"";return t.map((e)=>{let n="";if(e.rest)n+="...";if(n+=e.name,e.optional)n+="?";if(e.type)n+=`: ${e.type}`;if(e.defaultValue)n+=` = ${e.defaultValue}`;return n}).join(", ")}async function
|
|
4
|
+
`)}`)}e.push("}");break;default:return t.text||""}return e.join(" ")}function V(t){if(!t||t.length===0)return"";return t.map((e)=>{let n="";if(e.rest)n+="...";if(n+=e.name,e.optional)n+="?";if(e.type)n+=`: ${e.type}`;if(e.defaultValue)n+=` = ${e.defaultValue}`;return n}).join(", ")}async function Kt(t,e={}){let n=[],u=new Map,f=[],x=[],D=new Set,w=0,S=0,C=0;for(let p of t){if(!j(p)){n.push(`File not found: ${p}`);continue}let g=z(p,"utf-8");x.push(p);let b=g.split(`
|
|
5
5
|
`),m=[],d=0,i=!1;for(let o of b){let s=o.trim();if(!s&&!i)continue;if(s.startsWith("import ")){S++;let l=s.match(/import\s+(type\s+)?(?:\{([^}]+)\}|(\w+)|\*\s+as\s+(\w+))\s+from\s+['"]([^'"]+)['"]/);if(l){let[,h,W,q,H,A]=l;if(e.externals?.some((P)=>A.startsWith(P))){f.push(s);continue}if(A.startsWith("."))continue;if(!u.has(A))u.set(A,{source:A,specifiers:new Map,isTypeOnly:!!h,isSideEffect:!1});let E=u.get(A);if(W){let P=W.split(",").map((k)=>k.trim());for(let k of P){let[I,v]=k.split(/\s+as\s+/).map((M)=>M.trim()),R=I.startsWith("type "),O=R?I.replace("type ",""):I;E.specifiers.set(v||O,{name:O,alias:v!==O?v:void 0,isType:R})}}if(!h)E.isTypeOnly=!1}continue}if(/^(export\s+)?(declare\s+)?(interface|type|class|function|const|let|var|enum|namespace|module)\s/.test(s)){if(i=!0,m=[o],d=(o.match(/\{/g)||[]).length-(o.match(/\}/g)||[]).length,d===0&&(s.endsWith(";")||!s.includes("{"))){let l=B(s);if(!D.has(l)||!e.mergeDuplicates){if(D.add(l),f.push(o),w++,s.startsWith("export"))C++}i=!1,m=[]}}else if(i){if(m.push(o),d+=(o.match(/\{/g)||[]).length-(o.match(/\}/g)||[]).length,d<=0){let l=m.join(`
|
|
6
6
|
`),h=B(m[0]);if(!D.has(h)||!e.mergeDuplicates){if(D.add(h),f.push(l),w++,m[0].trim().startsWith("export"))C++}i=!1,m=[]}}else if(s.startsWith("export ")&&!s.includes("declare"))f.push(o),C++}}let a=[];if(e.banner)a.push(e.banner),a.push("");if(e.includeReferences&&e.references){for(let p of e.references)a.push(`/// <reference types="${p}" />`);a.push("")}let T=Array.from(u.values()).sort((p,g)=>p.source.localeCompare(g.source));for(let p of T)if(p.specifiers.size>0){let b=Array.from(p.specifiers.values()).map((d)=>{let i=d.isType?"type ":"";return d.alias?`${i}${d.name} as ${d.alias}`:`${i}${d.name}`}),m=p.isTypeOnly?"type ":"";a.push(`import ${m}{ ${b.join(", ")} } from '${p.source}';`)}if(T.length>0)a.push("");if(e.ambient&&e.moduleName){a.push(`declare module '${e.moduleName}' {`);for(let p of f){let g=p.split(`
|
|
7
7
|
`).map((b)=>` ${b.replace(/^(\s*)(export\s+)?declare\s+/,"$1$2")}`).join(`
|
|
8
8
|
`);a.push(g)}a.push("}")}else{if(e.sortDeclarations)f.sort((p,g)=>{let b=B(p),m=B(g);return b.localeCompare(m)});for(let p of f)a.push(p)}if(e.footer)a.push(""),a.push(e.footer);let y=a.join(`
|
|
9
|
-
`);return{content:y,files:x,declarationCount:w,importCount:S,exportCount:C,size:Buffer.byteLength(y,"utf-8"),warnings:n}}function B(t){let e=t.match(/(interface|type|class|function|const|let|var|enum|namespace|module)\s+(\w+)/);return e?`${e[1]}:${e[2]}`:t.trim()}async function
|
|
10
|
-
export{
|
|
9
|
+
`);return{content:y,files:x,declarationCount:w,importCount:S,exportCount:C,size:Buffer.byteLength(y,"utf-8"),warnings:n}}function B(t){let e=t.match(/(interface|type|class|function|const|let|var|enum|namespace|module)\s+(\w+)/);return e?`${e[1]}:${e[2]}`:t.trim()}async function xr(t,e,n={}){let u=await Kt(t,n),f=K(e);if(!j(f))N(f,{recursive:!0});return G(e,u.content),u}function us(t={}){return{bundle:(e)=>Kt(e,t),bundleAndWrite:(e,n)=>xr(e,n,{...t,output:n})}}async function fs(t,e=process.cwd()){let n=Array.isArray(t)?t:[t],u=[];for(let f of n){if(f.includes("*"))continue;let x=_(e,f);if(j(x))u.push(x)}return u}
|
|
10
|
+
export{ls,Kt,xr,us,fs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Xo,Se}from"../chunk-2dstvjpv.js";import"../chunk-zk55g2cb.js";import"../chunk-ayyb1jpe.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Se as planAugmentationImports,Xo as scanModuleAugmentations};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{er,tr}from"../chunk-kccc6p2t.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{er as bindingPatternNames,tr as projectBindingPattern};
|
|
@@ -61,17 +61,6 @@ declare const __brand: unique symbol;
|
|
|
61
61
|
* Uses ESM imports hoisted to module scope so each call avoids the per-call
|
|
62
62
|
* `require('node:path')` overhead that the previous CommonJS-style implementation
|
|
63
63
|
* incurred.
|
|
64
|
-
* @defaultValue
|
|
65
|
-
* ```ts
|
|
66
|
-
* {
|
|
67
|
-
* join: (base: DirectoryPath, ...segments: string[]) => FilePath,
|
|
68
|
-
* dirname: (path: FilePath) => DirectoryPath,
|
|
69
|
-
* basename: (path: FilePath) => string,
|
|
70
|
-
* resolve: (...segments: string[]) => AbsolutePath,
|
|
71
|
-
* isAbsolute: (path: string) => path is AbsolutePath,
|
|
72
|
-
* relative: (from: DirectoryPath, to: FilePath) => RelativePath
|
|
73
|
-
* }
|
|
74
|
-
* ```
|
|
75
64
|
*/
|
|
76
65
|
export declare const BrandedPath: {
|
|
77
66
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ri,Mi,Oi,Ii,Li,Fi,Ni,Bi,Wi,ji,_i,Gi,Vi,Ui}from"../chunk-ybzz1jg7.js";export{Ui as BrandedPath,Wi as asAbsolutePath,Bi as asDeclarationName,Mi as asDirectoryPath,Li as asDtsContent,Ri as asFilePath,Oi as asGlobPattern,_i as asJsonString,Fi as asModuleSpecifier,ji as asRelativePath,Ii as asSourceCode,Ni as asTypeName,Gi as isBranded,Vi as unwrap};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Eo,qe,vn}from"../chunk-vgmnxnjf.js";import"../chunk-7z8pykqp.js";import"../chunk-vf8jmdsp.js";import"../chunk-bkbsg2bv.js";import"../chunk-ayyb1jpe.js";import"../chunk-btc6zbyj.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{vn as linkBundle,qe as renameIdentifiers,Eo as splitTopLevelStatements};
|
package/dist/src/bundler.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ls,Kt,xr,us,fs}from"../chunk-zn2gvwve.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{xr as bundleAndWrite,ls as bundleDeclarations,Kt as bundleDtsFiles,us as createBundler,fs as resolveEntryFiles};
|
package/dist/src/cache.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{oi,He,wt}from"../chunk-ka8mbyjb.js";import"../chunk-v6fwy63g.js";export{He as BuildCache,oi as clearBuildCache,wt as ensureGitignore};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Le}from"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Le as functionCount};
|
package/dist/src/circular.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Cr,vr,ds,ps,ms,gs,hs,ys,bs}from"../chunk-nqgfrehj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{ds as analyzeCircularDependencies,Cr as buildDependencyGraph,vr as detectCircularDependencies,ys as exportGraphAsDot,bs as exportGraphAsJson,hs as findAllDependencies,gs as findAllDependents,ps as formatCircularAnalysis,ms as getGraphSummary};
|
package/dist/src/compat.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{g,na,ra,ee,Xe,Et,u,ia,sa,oa}from"../chunk-ayyb1jpe.js";export{ee as file,ia as fileExists,oa as getRuntimeInfo,g as isBun,na as isNode,u as readTextFile,ra as runtime,Et as spawnProcess,Xe as write,sa as writeTextFile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{w,
|
|
2
|
+
import{w,Yn,Xn,Zn,Qn}from"../chunk-0m1wt3db.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Yn as attachComputedKeyConstants,w as evaluateKeyConstant,Qn as hasTemplateSubstitution,Zn as isSymbolKey,Xn as resolveTemplateKey};
|
package/dist/src/concurrency.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{W}from"../chunk-k5wz43yh.js";export{W as normalizeConcurrency};
|
package/dist/src/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{B,Zo,Qo,ea,ta,E}from"../chunk-60wrxcjt.js";import"../chunk-btc6zbyj.js";export{E as config,B as defaultConfig,ea as defineConfig,ta as defineConfigAsync,Zo as getConfig,Qo as resetConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{$n}from"../chunk-7bt7x8sy.js";import"../chunk-9gp0e3kn.js";export{$n as findDanglingTypeReferences};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ce,X,S,V,Yo,ve}from"../chunk-y4wykrya.js";import"../chunk-2dstvjpv.js";import"../chunk-zk55g2cb.js";import"../chunk-7z8pykqp.js";import"../chunk-vf8jmdsp.js";import"../chunk-bkbsg2bv.js";import"../chunk-ayyb1jpe.js";import"../chunk-btc6zbyj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{ve as createDeclarationReferenceResolver,V as getDeclarationOutputPath,Yo as getDeclarationSpecifier,X as isExcluded,S as isWithinRoot,Ce as planDeclarationProject};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{K,
|
|
2
|
+
import{K,he}from"../chunk-aak9xzy7.js";import"../chunk-3jjrn16z.js";import"../chunk-vae5wxar.js";import"../chunk-7bt7x8sy.js";import"../chunk-9gp0e3kn.js";import"../chunk-y4wykrya.js";import"../chunk-2dstvjpv.js";import"../chunk-zk55g2cb.js";import"../chunk-60wrxcjt.js";import"../chunk-7z8pykqp.js";import"../chunk-vf8jmdsp.js";import"../chunk-bkbsg2bv.js";import"../chunk-ayyb1jpe.js";import"../chunk-btc6zbyj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{K as assertSafeOutputConfiguration,he as publishDeclarationOutputs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{rt,Lt,j,Hn,Kn,qn}from"../chunk-7j4cgkb4.js";import"../chunk-kccc6p2t.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{qn as collectDeclarationValueReferences,rt as directConstValueAlias,j as isExternalModuleSource,Hn as isExternalModuleText,Kn as isPrivateImportableDeclaration,Lt as returnTypeExpectsObject};
|
package/dist/src/diff.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ft,qi,fr,Ji,dr,Yi,pr,mr,Xi}from"../chunk-phwfth21.js";import"../chunk-ayyb1jpe.js";export{ft as computeDiff,dr as diffFile,Yi as diffFiles,fr as formatColoredDiff,Ji as formatDiffSummary,qi as formatUnifiedDiff,mr as printDiff,Xi as printDiffs,pr as summarizeDiffs};
|
package/dist/src/docs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Zt,Qt,_e,en,tn,Dr,Rs,Ms}from"../chunk-ee109s3r.js";import"../chunk-btc6zbyj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Ms as createDocsGenerator,Qt as extractDocumentation,Rs as generateDocs,en as generateHTML,tn as generateJSON,_e as generateMarkdown,Dr as generateTypeDocJSON,Zt as parseJSDoc};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ma,Bn}from"../chunk-0c03j9eq.js";import"../chunk-0m1wt3db.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Bn as attachEnumBodies,ma as lowerEnumBody};
|
package/dist/src/errors.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ge,v,wn,ri,ii,xn,Cn,si,fo,po,mo,go,ho,yo,bo,ze,bt,wo}from"../chunk-p4hf9bwj.js";export{si as CircularDependencyError,Cn as ConfigError,v as DtsxError,ge as ErrorCodes,ri as ExtractionError,xn as FileError,wn as ParseError,ii as ProcessingError,ze as createDtsError,bt as formatDtsError,bo as formatErrorWithContext,yo as getLocationFromOffset,go as isConfigError,fo as isDtsxError,mo as isFileError,po as isParseError,wo as summarizeErrors,ho as wrapError};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{bn}from"../../chunk-veh8ks5v.js";export{bn as extractTripleSlashDirectives};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Te,Rn}from"../../chunk-vbzchjvq.js";import"../../chunk-hqph3vnd.js";import"../../chunk-2ngfncfx.js";import"../../chunk-v6fwy63g.js";import"../../chunk-3mcz22q8.js";import"../../chunk-jhpfmjnx.js";import"../../chunk-0c03j9eq.js";import"../../chunk-7ynrmx5b.js";import"../../chunk-996gqrz6.js";import"../../chunk-jfygtm4r.js";import"../../chunk-kv3x5jrs.js";import"../../chunk-7j4cgkb4.js";import"../../chunk-qq5x44y9.js";import"../../chunk-a3apthex.js";import"../../chunk-0m1wt3db.js";import"../../chunk-hvy1zvk6.js";import"../../chunk-kccc6p2t.js";import"../../chunk-ex03kbwr.js";import"../../chunk-c7a07a26.js";import"../../chunk-8kj9pkw5.js";export{Rn as clearDeclarationCache,Te as extractDeclarations};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ra,T,O,It}from"../../chunk-3mcz22q8.js";import"../../chunk-jhpfmjnx.js";import"../../chunk-0c03j9eq.js";import"../../chunk-7ynrmx5b.js";import"../../chunk-996gqrz6.js";import"../../chunk-jfygtm4r.js";import"../../chunk-kv3x5jrs.js";import"../../chunk-7j4cgkb4.js";import"../../chunk-qq5x44y9.js";import"../../chunk-a3apthex.js";import"../../chunk-0m1wt3db.js";import"../../chunk-hvy1zvk6.js";import"../../chunk-kccc6p2t.js";import"../../chunk-ex03kbwr.js";import"../../chunk-c7a07a26.js";import"../../chunk-8kj9pkw5.js";export{It as scanAmbientDeclarationMembers,Ra as scanDeclarations,T as scanIsolatedDeclarations,O as scanSemanticDeclarations};
|
package/dist/src/extractor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-k5wz43yh.js";import"../chunk-2ngfncfx.js";import"../chunk-hqph3vnd.js";import"../chunk-8kj9pkw5.js";import"../chunk-c7a07a26.js";import"../chunk-v6fwy63g.js";import"../chunk-ex03kbwr.js";import"../chunk-kccc6p2t.js";import"../chunk-0m1wt3db.js";import"../chunk-7j4cgkb4.js";import"../chunk-0c03j9eq.js";import"../chunk-hvy1zvk6.js";import"../chunk-a3apthex.js";import"../chunk-qq5x44y9.js";import"../chunk-jhpfmjnx.js";import"../chunk-7ynrmx5b.js";import"../chunk-3mcz22q8.js";import"../chunk-kv3x5jrs.js";import"../chunk-jfygtm4r.js";import"../chunk-996gqrz6.js";import"../chunk-vbzchjvq.js";import{Ot,te,Mn,In,Ln,Fn}from"../chunk-8zvjkzsv.js";import{Si,r,Dn,$i}from"../chunk-z6mpxpxt.js";export{$i as batchExtractDeclarations,Mn as batchParseSourceFiles,Si as clearSourceFileCache,r as extractDeclarations,Dn as extractDeclarationsAsync,Ln as getPendingParseCount,Ot as getSourceFile,te as getSourceFileAsync,In as getSourceFileCacheSize,Fn as shouldUseAsyncParsing};
|
package/dist/src/formats.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Rr,Mr,Or,Ir,Lr,Fr,Os,Is}from"../chunk-3s37g6bh.js";export{Os as convertToFormat,Is as getFormatExtension,Fr as toArkType,Ir as toIoTs,Rr as toJsonSchema,Or as toValibot,Lr as toYup,Mr as toZod};
|
package/dist/src/formatter.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{H,Xr,so,oo}from"../chunk-8dvxjzhy.js";export{so as createFormatter,H as formatDts,Xr as formatFiles,oo as quickFormat};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Nn}from"../chunk-jhpfmjnx.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{Nn as attachFunctionProperties};
|
package/dist/src/generator.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{s,
|
|
2
|
+
import{s,ro,io}from"../chunk-yde8rmfm.js";import"../chunk-8dvxjzhy.js";import"../chunk-550teag8.js";import{yt,ei,ti,ni,yn}from"../chunk-js4m0y2m.js";import"../chunk-yzdh207n.js";import"../chunk-veh8ks5v.js";import"../chunk-p4hf9bwj.js";import"../chunk-ka8mbyjb.js";import"../chunk-aak9xzy7.js";import"../chunk-4q78f5pg.js";import"../chunk-3jjrn16z.js";import"../chunk-vae5wxar.js";import"../chunk-vgmnxnjf.js";import"../chunk-sgcne5bb.js";import"../chunk-7bt7x8sy.js";import"../chunk-9gp0e3kn.js";import"../chunk-zbe06f63.js";import"../chunk-jswvvjkr.js";import"../chunk-y4wykrya.js";import"../chunk-2dstvjpv.js";import"../chunk-zk55g2cb.js";import"../chunk-60wrxcjt.js";import"../chunk-7z8pykqp.js";import"../chunk-vf8jmdsp.js";import"../chunk-bkbsg2bv.js";import"../chunk-ayyb1jpe.js";import"../chunk-btc6zbyj.js";import"../chunk-z6mpxpxt.js";import"../chunk-vbzchjvq.js";import"../chunk-hqph3vnd.js";import"../chunk-2ngfncfx.js";import"../chunk-8zvjkzsv.js";import"../chunk-k5wz43yh.js";import"../chunk-v6fwy63g.js";import"../chunk-3mcz22q8.js";import"../chunk-jhpfmjnx.js";import"../chunk-0c03j9eq.js";import"../chunk-7ynrmx5b.js";import"../chunk-996gqrz6.js";import"../chunk-jfygtm4r.js";import"../chunk-kv3x5jrs.js";import"../chunk-7j4cgkb4.js";import"../chunk-qq5x44y9.js";import"../chunk-a3apthex.js";import"../chunk-0m1wt3db.js";import"../chunk-hvy1zvk6.js";import"../chunk-kccc6p2t.js";import"../chunk-ex03kbwr.js";import"../chunk-c7a07a26.js";import"../chunk-8kj9pkw5.js";export{ni as clearResultCache,s as generate,ro as processFile,yt as processSource,ei as processSourceIsolated,ti as processSourceSemantic,yn as processSourceWithTypeScriptEngine,io as watch};
|
package/dist/src/global-types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{En}from"../chunk-9gp0e3kn.js";export{En as GLOBAL_TYPE_NAMES};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Jt,Yt,pt,Xt,Pr,Ps,Ds}from"../chunk-khyg6w62.js";export{Jt as DEFAULT_GROUP_ORDER,Ps as createImportSorter,pt as detectGroup,Yt as parseImport,Ds as presets,Xt as sortImports,Pr as sortImportsInContent};
|
|
@@ -7,10 +7,10 @@ export declare function createIncrementalBuilder(cache: IncrementalCache, config
|
|
|
7
7
|
getCachedDeclarations: (filePath: string) => Promise<Declaration[] | null>;
|
|
8
8
|
getCachedDts: (filePath: string) => Promise<string | null>;
|
|
9
9
|
cacheResult: (filePath: string,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
content: string,
|
|
11
|
+
declarations: Declaration[],
|
|
12
|
+
dtsContent: string,
|
|
13
|
+
dependencies?: string[],) => Promise<void>;
|
|
14
14
|
skip: (filePath: string) => void;
|
|
15
15
|
getResult: () => IncrementalBuildResult;
|
|
16
16
|
save: () => Promise<void>
|
package/dist/src/incremental.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ai,xo,Co,vo,So}from"../chunk-tm2j0feh.js";import"../chunk-v6fwy63g.js";export{ai as IncrementalCache,xo as createIncrementalBuilder,So as extractDependencies,vo as formatIncrementalResult,Co as pruneCache};
|