@dtsx/dtsx 0.11.56 → 0.11.57
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/bin/cli.js +1 -1
- package/dist/{chunk-g25sbqbw.js → chunk-14zb70ca.js} +3 -3
- package/dist/{chunk-tgaear7n.js → chunk-1b003vaa.js} +6 -6
- package/dist/{chunk-2qbj76ap.js → chunk-31t6c3q1.js} +19 -19
- package/dist/{chunk-6b6rt0yh.js → chunk-3phg2e1n.js} +2 -2
- package/dist/{chunk-6c8nk9rm.js → chunk-4rchw3mn.js} +4 -4
- package/dist/{chunk-9h17ws4c.js → chunk-4tk9w4ms.js} +1 -1
- package/dist/chunk-59q0p96t.js +3 -0
- package/dist/{chunk-hgg4aqvf.js → chunk-5af6meh8.js} +2 -2
- package/dist/{chunk-9bj73ygx.js → chunk-5egg62em.js} +3 -3
- package/dist/{chunk-h7ebvy8j.js → chunk-5ncggctz.js} +2 -2
- package/dist/{chunk-spdw3tc0.js → chunk-5t69y2qj.js} +2 -2
- package/dist/{chunk-mzxxgnp8.js → chunk-5zcampnz.js} +2 -2
- package/dist/{chunk-8r7rmcz7.js → chunk-6bsft59m.js} +5 -5
- package/dist/chunk-6m4fpfzj.js +31 -0
- package/dist/{chunk-msa98cgm.js → chunk-6mg1pbfj.js} +10 -10
- package/dist/chunk-6rxhkcx0.js +3 -0
- package/dist/{chunk-yxcyqezk.js → chunk-6vhzmpy0.js} +4 -4
- package/dist/{chunk-nnayqrp5.js → chunk-6yvk3q1e.js} +2 -2
- package/dist/{chunk-bt2n0b75.js → chunk-7061vwkq.js} +2 -2
- package/dist/chunk-72txgcxc.js +3 -0
- package/dist/{chunk-heqx5083.js → chunk-8j311f4n.js} +4 -4
- package/dist/{chunk-gwa4hmfa.js → chunk-8z4tvwyd.js} +2 -2
- package/dist/{chunk-hj7gs32r.js → chunk-93jzvstf.js} +2 -2
- package/dist/{chunk-hkcqbex1.js → chunk-9hz32qxh.js} +2 -2
- package/dist/{chunk-c726s7aj.js → chunk-a018gbxq.js} +4 -4
- package/dist/{chunk-pnfjhm01.js → chunk-aa3k6rcj.js} +2 -2
- package/dist/{chunk-njknd1pt.js → chunk-abe0mchv.js} +4 -4
- package/dist/{chunk-hbmnkmzb.js → chunk-b1wmavr8.js} +3 -3
- package/dist/{chunk-btcj8fgc.js → chunk-c094c8jt.js} +3 -3
- package/dist/{chunk-qhkxctek.js → chunk-ctpxwa1v.js} +2 -2
- package/dist/{chunk-x6ddycvm.js → chunk-dc6thsdb.js} +2 -2
- package/dist/{chunk-k8tnz2qd.js → chunk-ered54kd.js} +8 -8
- package/dist/{chunk-38r6thfe.js → chunk-f27fd50q.js} +2 -2
- package/dist/{chunk-eskywkxz.js → chunk-fcx6r0m1.js} +4 -4
- package/dist/{chunk-mph001z4.js → chunk-fnncnk59.js} +4 -4
- package/dist/{chunk-ekf33t9z.js → chunk-fpbcgcwd.js} +3 -3
- package/dist/chunk-fxx9zbtq.js +3 -0
- package/dist/{chunk-555w3kcr.js → chunk-g2s10ehd.js} +2 -2
- package/dist/{chunk-srm0ddsk.js → chunk-gzjccs8y.js} +9 -9
- package/dist/{chunk-cgqg1br8.js → chunk-h3m1vfa2.js} +3 -3
- package/dist/{chunk-b6994asf.js → chunk-hnjv8zsq.js} +2 -2
- package/dist/{chunk-6j6dvj8a.js → chunk-hqytpz18.js} +2 -2
- package/dist/{chunk-vk5r6pgx.js → chunk-jb43rwce.js} +2 -2
- package/dist/chunk-jhjj15ey.js +38 -0
- package/dist/{chunk-fpa2ea8k.js → chunk-k2axmtyh.js} +5 -5
- package/dist/{chunk-kkshxyex.js → chunk-kqyqbrcv.js} +3 -3
- package/dist/{chunk-81jrzxr6.js → chunk-mzpbqdd2.js} +4 -4
- package/dist/{chunk-ewgs91y1.js → chunk-n8044s0h.js} +2 -2
- package/dist/{chunk-4rsk49xj.js → chunk-naweq349.js} +2 -2
- package/dist/{chunk-v22xpr7j.js → chunk-p023fhce.js} +3 -3
- package/dist/{chunk-7dmn623d.js → chunk-ppybvpk4.js} +3 -3
- package/dist/{chunk-1mzxq1rg.js → chunk-q8dtn1qf.js} +2 -2
- package/dist/{chunk-mqv5m22t.js → chunk-qg691xj0.js} +4 -4
- package/dist/{chunk-j7rpp55s.js → chunk-qhbdh4gy.js} +3 -3
- package/dist/{chunk-1t77gtcx.js → chunk-qhsgmwcm.js} +2 -2
- package/dist/{chunk-dak0dhnx.js → chunk-qxkvzznc.js} +2 -2
- package/dist/chunk-r7qq9579.js +7 -0
- package/dist/{chunk-qbk49jz5.js → chunk-rb602c8k.js} +11 -11
- package/dist/{chunk-tw99ftp1.js → chunk-rcmdt2gs.js} +2 -2
- package/dist/{chunk-7pw9ayve.js → chunk-rzjj16rb.js} +3 -3
- package/dist/{chunk-9mdgtq38.js → chunk-s28gyv8z.js} +2 -2
- package/dist/{chunk-qt9gjs57.js → chunk-s3mxfatw.js} +2 -2
- package/dist/{chunk-djbck65n.js → chunk-s5rja20d.js} +2 -2
- package/dist/{chunk-62428w6e.js → chunk-s9937pks.js} +6 -6
- package/dist/{chunk-5bdwrsqt.js → chunk-srbye4cm.js} +4 -4
- package/dist/{chunk-8vvryt8p.js → chunk-ss3na6s0.js} +2 -2
- package/dist/chunk-szxyqpfq.js +3 -0
- package/dist/{chunk-9wwsqemm.js → chunk-try1hmvs.js} +2 -2
- package/dist/{chunk-r46rw8gr.js → chunk-vdt9x6h8.js} +5 -5
- package/dist/chunk-vej5fnnp.js +3 -0
- package/dist/{chunk-f5jc2v3k.js → chunk-vs6ay4t3.js} +2 -2
- package/dist/{chunk-20jq5v1p.js → chunk-w482p1x8.js} +6 -6
- package/dist/{chunk-h6ddkhyq.js → chunk-wmzg12wb.js} +2 -2
- package/dist/{chunk-g9emajpc.js → chunk-xvp60m78.js} +2 -2
- package/dist/chunk-y18th8yp.js +3 -0
- package/dist/{chunk-6r01zgys.js → chunk-yd8rwwzf.js} +2 -2
- package/dist/{chunk-4cr1q0yf.js → chunk-ynpxjf6d.js} +2 -2
- package/dist/{chunk-nmht3krt.js → chunk-ysgfcqvf.js} +4 -4
- package/dist/{chunk-7rdazac9.js → chunk-ywzc3ym6.js} +20 -20
- package/dist/{chunk-rzcnab8j.js → chunk-z03w2v8h.js} +2 -2
- package/dist/{chunk-0d5nemtn.js → chunk-zddtg858.js} +2 -2
- package/dist/{chunk-6ekemc3h.js → chunk-zf6qpv30.js} +2 -2
- package/dist/src/augmentation-graph.js +1 -1
- package/dist/src/binding-patterns.js +1 -1
- 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/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.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/inferred-imports.js +1 -1
- package/dist/src/initializer-type-spans.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/numeric-literals.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.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/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.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/syntax-validator.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.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-0a1xppye.js +0 -3
- package/dist/chunk-5tn8854w.js +0 -31
- package/dist/chunk-5yx2x4v4.js +0 -3
- package/dist/chunk-cfjd81h8.js +0 -3
- package/dist/chunk-daasy0pw.js +0 -3
- package/dist/chunk-h28vzayq.js +0 -3
- package/dist/chunk-sjbm1trn.js +0 -3
- package/dist/chunk-t5nmnzy6.js +0 -7
- package/dist/chunk-vt5hr8vs.js +0 -3
- package/dist/chunk-wq5r1ms9.js +0 -38
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{l}from"../../chunk-
|
|
2
|
+
import{l}from"../../chunk-mzpbqdd2.js";import"../../chunk-aa3k6rcj.js";import"../../chunk-7061vwkq.js";import{fe,x,de,pe,me,ge,Hn,Kn,he}from"../../chunk-vdt9x6h8.js";import{Yn,C}from"../../chunk-s28gyv8z.js";import{Qn}from"../../chunk-zf6qpv30.js";import"../../chunk-ynpxjf6d.js";import{n,Ht,We,ee,dt,o,pt,_e,K}from"../../chunk-ywzc3ym6.js";import{f}from"../../chunk-587w6ktw.js";import"../../chunk-yd8rwwzf.js";import"../../chunk-fxx9zbtq.js";import"../../chunk-8z4tvwyd.js";import"../../chunk-jb43rwce.js";import"../../chunk-9hz32qxh.js";import"../../chunk-r7qq9579.js";import"../../chunk-h3m1vfa2.js";export{Qn as clearProcessorCaches,C as extractAllImportedItems,K as extractSatisfiesType,o as findMatchingBracket,f as formatComments,We as inferArrayType,pt as inferFunctionType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,dt as inferObjectType,_e as isGenericType,ee as parseArrayElements,Yn as parseImportStatement,me as processClassDeclaration,l as processDeclarations,ge as processEnumDeclaration,Kn as processExportDeclaration,fe as processFunctionDeclaration,Hn as processImportDeclaration,de as processInterfaceDeclaration,he as processModuleDeclaration,pe as processTypeDeclaration,x as processVariableDeclaration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{zt,Ut,n,Ht,B
|
|
2
|
+
import{zt,Ut,n,Ht,B,xa,W,Kt,We,ee,rr,qt,dt,H,ye,o,pt,_e,K,za,Ua,Ha,Ka,qa,Ja,Ya,Ca,Xa,Za,Qa}from"../../chunk-ywzc3ym6.js";import"../../chunk-587w6ktw.js";import"../../chunk-yd8rwwzf.js";import"../../chunk-fxx9zbtq.js";import"../../chunk-8z4tvwyd.js";import{h,S,q}from"../../chunk-jb43rwce.js";import"../../chunk-9hz32qxh.js";import"../../chunk-r7qq9579.js";import"../../chunk-h3m1vfa2.js";export{qt as classFieldDefaultDoc,ye as cleanParameterDefaults,Ut as consumeCleanDefault,zt as enableCleanDefaultCollection,Ka as extractInferTypes,K as extractSatisfiesType,o as findMatchingBracket,W as indentNestedType,We as inferArrayType,H as inferCallType,Ua as inferConditionalType,B as inferFunctionBodyReturnType,pt as inferFunctionType,Xa as inferKeyofType,za as inferMappedType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,Kt as inferNewExpressionType,dt as inferObjectType,Ha as inferTemplateLiteralTypeAdvanced,Za as inferTypeofType,S as isBigIntLiteral,qa as isComplexType,_e as isGenericType,Qa as isIndexedAccessType,h as isNumericLiteral,rr as leadingSourceComments,q as numericLiteralType,ee as parseArrayElements,Ca as parseTypeParameters,Ya as parseUtilityType,xa as primitiveMethodReturnType,Ja as simplifyComplexType};
|
package/dist/src/processor.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-h3m1vfa2.js";import"../chunk-r7qq9579.js";import"../chunk-8z4tvwyd.js";import"../chunk-ynpxjf6d.js";import"../chunk-aa3k6rcj.js";import{f}from"../chunk-587w6ktw.js";import"../chunk-9hz32qxh.js";import"../chunk-jb43rwce.js";import"../chunk-fxx9zbtq.js";import"../chunk-yd8rwwzf.js";import{n,Ht,We,ee,dt,o,pt,_e,K}from"../chunk-ywzc3ym6.js";import{fe,x,de,pe,me,ge,Hn,Kn,he}from"../chunk-vdt9x6h8.js";import{Qn}from"../chunk-zf6qpv30.js";import{Yn,C}from"../chunk-s28gyv8z.js";import"../chunk-7061vwkq.js";import{l}from"../chunk-mzpbqdd2.js";export{Qn as clearProcessorCaches,C as extractAllImportedItems,K as extractSatisfiesType,o as findMatchingBracket,f as formatComments,We as inferArrayType,pt as inferFunctionType,n as inferNarrowType,Ht as inferNarrowTypeInUnion,dt as inferObjectType,_e as isGenericType,ee as parseArrayElements,Yn as parseImportStatement,me as processClassDeclaration,l as processDeclarations,ge as processEnumDeclaration,Kn as processExportDeclaration,fe as processFunctionDeclaration,Hn as processImportDeclaration,de as processInterfaceDeclaration,he as processModuleDeclaration,pe as processTypeDeclaration,x as processVariableDeclaration};
|
package/dist/src/profiling.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{hn,ai,zs,Us,yn,Hs}from"../chunk-5egg62em.js";export{hn as Profiler,yn as Timer,Us as createProfiledIo,ai as createProfiler,Hs as createTimer,zs as profileExecution};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Li}from"../chunk-jhjj15ey.js";import"../chunk-vdt9x6h8.js";import"../chunk-5zcampnz.js";import"../chunk-g2s10ehd.js";import"../chunk-5ncggctz.js";import"../chunk-s28gyv8z.js";import"../chunk-zf6qpv30.js";import"../chunk-ynpxjf6d.js";import"../chunk-ywzc3ym6.js";import"../chunk-587w6ktw.js";import"../chunk-yd8rwwzf.js";import"../chunk-fxx9zbtq.js";import"../chunk-8z4tvwyd.js";import"../chunk-jb43rwce.js";import"../chunk-vej5fnnp.js";import"../chunk-9hz32qxh.js";import"../chunk-r7qq9579.js";import"../chunk-h3m1vfa2.js";export{Li as createReturnTypeScope};
|
package/dist/src/security.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{z,P,at,ki,On,Ti,Ai,Di,Ft,In,Bt,Pi,Jo,Yo,Xo,Zo}from"../chunk-szxyqpfq.js";export{z as DEFAULT_SECURITY_CONFIG,P as SecurityError,Jo as createSecureBatchProcessor,Pi as createSecureProcessor,Zo as createSecurityMiddleware,On as isBlockedPath,Xo as isSafePath,Ai as isSymlink,Yo as sanitizeFilename,In as validateFileBatch,Ft as validateFilePath,Ti as validateFileSize,at as validatePath,ki as validatePaths,Di as validateSymlink,Bt as withTimeout};
|
package/dist/src/source-cache.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Lt,ae,Sn,$n,En,kn,Tn}from"../chunk-rcmdt2gs.js";import"../chunk-v6fwy63g.js";import"../chunk-mew3f4wh.js";export{Sn as batchParseSourceFiles,$n as clearSourceFileCache,kn as getPendingParseCount,Lt as getSourceFile,ae as getSourceFileAsync,En as getSourceFileCacheSize,Tn as shouldUseAsyncParsing};
|
package/dist/src/sourcemap.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Vn,Wt,oa,aa,ca,la,Ii,ua,fa}from"../chunk-8j311f4n.js";export{Wt as SourceMapConsumer,Vn as SourceMapGenerator,ca as appendInlineSourceMap,aa as appendSourceMapComment,fa as buildDeclarationMappings,oa as createSourceMap,ua as extractSourceMap,Ii as readSourceMap,la as writeSourceMap};
|
package/dist/src/stx.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{O,
|
|
2
|
+
import{O,Do,I}from"../chunk-k2axmtyh.js";import"../chunk-rb602c8k.js";export{O as isStxFile,Do as parseStxScripts,I as transformStxToTs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Te}from"../chunk-5af6meh8.js";export{Te as validateTypeScriptSyntax};
|
package/dist/src/tracking.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{cn,ln,un,As,Ds}from"../chunk-ppybvpk4.js";export{cn as Tracker,As as analyzeImports,Ds as analyzeTypes,ln as createTracker,un as trackDeclarations};
|
package/dist/src/transformers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{gr,hr,en,_i,yr,ji,Se,Gi,Ye,Vi,br,zi,wr,Ui,Hi,Ki,qi,xr,Cr,Ji,Yi,Xi,Zi,Qi,es,ts,ns}from"../chunk-qhbdh4gy.js";import"../chunk-rzjj16rb.js";export{hr as cloneDeclaration,ji as composeTransformers,gr as createDeclaration,Ui as createJSDocTransformer,xr as createModifierTransformer,ns as createNamespacePrefixPlugin,qi as createParameterTransformer,br as createPrefixTransformer,wr as createRemoveTransformer,Vi as createRenameTransformer,Ki as createReturnTypeTransformer,Xi as createStripTagsTransformer,zi as createSuffixTransformer,Ye as createTransformerPlugin,Hi as createTypeTransformer,Zi as createWrapTypeTransformer,ts as declarePlugin,Se as filterByKind,Gi as filterByPredicate,_i as findDeclarations,yr as mapDeclarations,Yi as optionalTransformer,Qi as readonlyPlugin,Cr as readonlyTransformer,Ji as requiredTransformer,es as stripPrivatePlugin,en as walkDeclarations};
|
package/dist/src/tree-shaker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{ht,yt,bt,Er,kr,Tr,ps}from"../chunk-ysgfcqvf.js";export{Tr as analyzeDependencies,yt as buildDeclarationDependencyGraph,ps as createTreeShaker,bt as extractTypeReferences,kr as findUnusedDeclarations,ht as treeShake,Er as treeShakeContent};
|
package/dist/src/tsconfig.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{le}from"../chunk-dc6thsdb.js";import"../chunk-xvp60m78.js";export{le as readEffectiveTsconfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Kr,qr,Jr,Yr,Xr,pn,te,Ns,Fs,xt,Bs}from"../chunk-zddtg858.js";export{pn as TypeMapper,Bs as TypeTransformers,xt as applyTypeMappings,te as createTypeMapper,Ns as defaultTypeMapper,Kr as defaultTypeMappings,Xr as getPresetMappings,Jr as readonlyTypeMappings,Yr as simplifiedTypeMappings,Fs as strictTypeMapper,qr as strictTypeMappings};
|
package/dist/src/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{et,Ks,X,ci,ie,vt,St,$t,Et}from"../chunk-w482p1x8.js";import"../chunk-p023fhce.js";import"../chunk-6yvk3q1e.js";import"../chunk-5af6meh8.js";import"../chunk-31t6c3q1.js";import"../chunk-dc6thsdb.js";import"../chunk-xvp60m78.js";import"../chunk-3phg2e1n.js";import"../chunk-ss3na6s0.js";export{Et as addSourceMapComment,Ks as assertNever,ie as checkIsolatedDeclarationsConfig,St as createDiff,$t as generateDeclarationMap,ci as getAllTypeScriptFiles,et as sourceMapCommentPrefix,vt as validateDtsContent,X as writeToFile};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Gt,
|
|
2
|
+
import{Gt,Jn}from"../chunk-5ncggctz.js";import"../chunk-s28gyv8z.js";import"../chunk-zf6qpv30.js";import"../chunk-ynpxjf6d.js";import"../chunk-ywzc3ym6.js";import"../chunk-587w6ktw.js";import"../chunk-yd8rwwzf.js";import"../chunk-fxx9zbtq.js";import"../chunk-8z4tvwyd.js";import"../chunk-jb43rwce.js";import"../chunk-9hz32qxh.js";import"../chunk-r7qq9579.js";import"../chunk-h3m1vfa2.js";export{Gt as inferDeclarationCallTypes,Jn as inferDeclarationValueAliases};
|
package/dist/src/vue.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{L,
|
|
2
|
+
import{L,Po,At,Dt,c,Oe,tt,Pt,Rt,nt,rt,it,Mt,st,Ot,It,N}from"../chunk-rb602c8k.js";export{Mt as collapseTypeText,Rt as extractDefaultExportOptions,rt as filterLocalValueStatements,Oe as findMacroCall,c as findMatching,nt as getOptionValue,L as isVueFile,tt as mapRuntimeProps,Dt as maskNonCode,Po as parseVueSfc,it as removeInlinedDeclaration,Ot as resolveEmitsType,It as resolveExposedType,st as resolvePropsType,At as skipNonCode,Pt as stripMacroStatements,N as transformVueSfcToTs};
|
package/dist/src/watcher.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{_r,Ps,jr,Rs}from"../chunk-4rchw3mn.js";export{Rs as createWatchLogger,_r as createWatcher,jr as formatWatchResult,Ps as watchAndGenerate};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-mew3f4wh.js";import"../chunk-
|
|
2
|
+
import"../chunk-mew3f4wh.js";import"../chunk-h3m1vfa2.js";import"../chunk-r7qq9579.js";import"../chunk-rb602c8k.js";import"../chunk-k2axmtyh.js";import"../chunk-v6fwy63g.js";import"../chunk-8z4tvwyd.js";import"../chunk-5zcampnz.js";import"../chunk-9hz32qxh.js";import"../chunk-ynpxjf6d.js";import"../chunk-vej5fnnp.js";import"../chunk-jb43rwce.js";import"../chunk-fxx9zbtq.js";import"../chunk-yd8rwwzf.js";import"../chunk-587w6ktw.js";import"../chunk-ywzc3ym6.js";import"../chunk-g2s10ehd.js";import"../chunk-vdt9x6h8.js";import"../chunk-jhjj15ey.js";import"../chunk-zf6qpv30.js";import"../chunk-s28gyv8z.js";import"../chunk-5ncggctz.js";import"../chunk-y18th8yp.js";import"../chunk-rcmdt2gs.js";import{r}from"../chunk-59q0p96t.js";import"../chunk-qxkvzznc.js";import"../chunk-aa3k6rcj.js";import"../chunk-7061vwkq.js";import{l}from"../chunk-mzpbqdd2.js";import{Qe}from"../chunk-72txgcxc.js";import*as R from"fs";import{parentPort as M}from"worker_threads";var P=typeof Bun<"u"?Bun:null,S=P?null:R,T=Promise.resolve({extractDeclarations:r,processDeclarations:l});async function N(e){let u=Date.now();try{let{extractDeclarations:m,processDeclarations:A}=await T,f=e.config?.keepComments,C=e.config?.isolatedDeclarations,v=e.config?.importOrder,B=e.config?.engine;if(e.type==="process-batch"){let{filePaths:o,outPaths:D}=e,p=o?null:e.files||[],d=o?o.length:p.length,w=e.writeOutput===!0,g=w?null:Array(d),c=null,b=e.sources;if(!b&&d>0){let t=Array(d);for(let s=0;s<d;s++){let n=p?p[s]:null,h=n?n.sourceCode:void 0,i=o?o[s]:n.filePath;if(h!=null)t[s]=Promise.resolve(h);else if(P)t[s]=P.file(i).text();else t[s]=Promise.resolve(S.readFileSync(i,"utf-8"))}b=await Promise.all(t)}let x={filePath:"",sourceCode:"",declarations:[]},O=w&&P?Array(d):null,F=!0;for(let t=0;t<d;t++){let s=p?p[t]:null,n=o?o[t]:s.filePath,h=D?D[t]:s?s.outPath:void 0;try{let i=b?b[t]:s?.sourceCode||"",a=null,y=Qe(i,n,f??!0,v??["bun"],C??!1,B);if(y===null)a=m(i,n,f,C),x.filePath=n,x.sourceCode=i,x.declarations=a,y=A(a,x,f??!0,v);if(w){if(!h)throw Error(`Missing outPath for ${n}`);if(P)O[t]=P.write(h,y);else S.writeFileSync(h,y)}else if(g)g[t]={filePath:n,success:!0,content:y,declarations:a}}catch(i){let a=i&&i.message?i.message:String(i);if(w){if(!c)c=[];c.push({filePath:n,success:!1,error:a})}else if(g)g[t]={filePath:n,success:!1,error:a};F=!1}}if(O)await Promise.all(O);let E=c?.length?`${c[0].filePath}: ${c[0].error||"Worker batch failed"}`:void 0;return{id:e.id,success:F,filePath:e.filePath,batchResults:w?c||void 0:g,error:E,duration:Date.now()-u}}if(e.type==="extract"){let o=m(e.sourceCode,e.filePath,f,C);return{id:e.id,success:!0,filePath:e.filePath,declarations:o,duration:Date.now()-u}}if(e.type==="process"){let o=m(e.sourceCode,e.filePath,f,C),D=A(o,{filePath:e.filePath,sourceCode:e.sourceCode,declarations:o},f??!0,v);return{id:e.id,success:!0,filePath:e.filePath,content:D,declarations:o,duration:Date.now()-u}}throw Error(`Unknown task type: ${e.type}`)}catch(m){return{id:e.id,success:!1,filePath:e.filePath,error:m.message,duration:Date.now()-u}}}M?.on("message",async(e)=>{let u=await N(e);M.postMessage(u)});
|
package/dist/src/worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ln,Ri,Qo,ea,ta}from"../chunk-b1wmavr8.js";import"../chunk-ss3na6s0.js";export{Ln as WorkerPool,ea as batchFiles,ta as calculateOptimalBatchSize,Ri as createWorkerPool,Qo as parallelProcess};
|
package/dist/src/workspace.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Gr,Vr,fn,Ms,zr,Ur,Os}from"../chunk-fpbcgcwd.js";import"../chunk-6m4fpfzj.js";import"../chunk-6rxhkcx0.js";import"../chunk-wmzg12wb.js";import"../chunk-zddtg858.js";import"../chunk-5t69y2qj.js";import"../chunk-72txgcxc.js";import"../chunk-qxkvzznc.js";import"../chunk-mzpbqdd2.js";import"../chunk-aa3k6rcj.js";import"../chunk-93jzvstf.js";import"../chunk-w482p1x8.js";import"../chunk-p023fhce.js";import"../chunk-6yvk3q1e.js";import"../chunk-rzjj16rb.js";import"../chunk-5af6meh8.js";import"../chunk-6vhzmpy0.js";import"../chunk-31t6c3q1.js";import"../chunk-f27fd50q.js";import"../chunk-7061vwkq.js";import"../chunk-59q0p96t.js";import"../chunk-y18th8yp.js";import"../chunk-k2axmtyh.js";import"../chunk-rb602c8k.js";import"../chunk-rcmdt2gs.js";import"../chunk-v6fwy63g.js";import"../chunk-mew3f4wh.js";import"../chunk-1b003vaa.js";import"../chunk-6mg1pbfj.js";import"../chunk-gzjccs8y.js";import"../chunk-qhsgmwcm.js";import"../chunk-dc6thsdb.js";import"../chunk-xvp60m78.js";import"../chunk-3phg2e1n.js";import"../chunk-jhjj15ey.js";import"../chunk-vdt9x6h8.js";import"../chunk-5zcampnz.js";import"../chunk-g2s10ehd.js";import"../chunk-5ncggctz.js";import"../chunk-s28gyv8z.js";import"../chunk-zf6qpv30.js";import"../chunk-ynpxjf6d.js";import"../chunk-ywzc3ym6.js";import"../chunk-587w6ktw.js";import"../chunk-yd8rwwzf.js";import"../chunk-fxx9zbtq.js";import"../chunk-8z4tvwyd.js";import"../chunk-jb43rwce.js";import"../chunk-vej5fnnp.js";import"../chunk-9hz32qxh.js";import"../chunk-r7qq9579.js";import"../chunk-h3m1vfa2.js";import"../chunk-ss3na6s0.js";export{zr as discoverWorkspaceFromPackageJson,Gr as discoverWorkspaceProjects,Os as generateFromPackageWorkspaces,Ms as generateMonorepo,fn as generateWorkspace,Ur as resolveWorkspacePatterns,Vr as sortProjectsByDependencies};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/dist/chunk-0a1xppye.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{V}from"./chunk-mew3f4wh.js";import{Le,_n}from"./chunk-vt5hr8vs.js";import{ue,Gn}from"./chunk-tw99ftp1.js";function Mi(){Gn(),_n()}function r(e,t,c=!0,n=!1,o){return Le(e,t,c,n,o)}async function Wn(e,t,c=!0,n={}){return await ue(t,e,n),r(e,t,c)}async function Oi(e,t={}){let c=V(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 Wn(a.sourceCode,a.filePath,a.keepComments,t)})));for(let a of i)n.set(a.path,a.declarations)}return n}
|
|
3
|
-
export{Mi,r,Wn,Oi};
|
package/dist/chunk-5tn8854w.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{w,le,Mt,u}from"./chunk-6b6rt0yh.js";import{V}from"./chunk-mew3f4wh.js";import{L,N}from"./chunk-qbk49jz5.js";import{O,I}from"./chunk-fpa2ea8k.js";import{r}from"./chunk-0a1xppye.js";import{Re}from"./chunk-38r6thfe.js";import{e,M}from"./chunk-8vvryt8p.js";import{Oe,P,Bn,Z}from"./chunk-1t77gtcx.js";import{Rn}from"./chunk-srm0ddsk.js";import{et,kt}from"./chunk-h6ddkhyq.js";import{D}from"./chunk-2qbj76ap.js";import{De,oe,X,Pe}from"./chunk-yxcyqezk.js";import{tt,Y,re,Tt,At,Dt,Pt}from"./chunk-20jq5v1p.js";import{ne,$e}from"./chunk-hj7gs32r.js";import{Qe,Et}from"./chunk-tgaear7n.js";import{te}from"./chunk-spdw3tc0.js";import{Ln,rt}from"./chunk-cfjd81h8.js";import{q,Ee}from"./chunk-dak0dhnx.js";import{Xe}from"./chunk-msa98cgm.js";import{Ae}from"./chunk-7pw9ayve.js";import{l}from"./chunk-81jrzxr6.js";import{ie,Rt}from"./chunk-0d5nemtn.js";import{mkdir as ye}from"fs/promises";import{availableParallelism as Se}from"os";import{basename as fe,dirname as pe,relative as z,resolve as ee}from"path";var Q=new WeakMap,ce=new WeakMap;function se(d){let a=Q.get(d);if(!a)a=Oe(d),Q.set(d,a),a.catch(()=>Q.delete(d));return a}async function de(d,a,t,f,h,g=Y){let o=fe(d)||"output.d.ts",C=z(pe(d),a),T=`${o}.map`,j=t.lastIndexOf(`
|
|
3
|
-
${tt()}`),p=j===-1?t:t.slice(0,j),y=Dt(p,o,C,f),b=`${d}.map`;return await g(b,JSON.stringify(y)),e.debug(` Generated source map: ${z(h,b)}`),T}async function s(d){let a=Date.now(),t={...D,...d};if(t.logLevel)M(t.logLevel);else if(t.verbose)M("debug");let f=new Ae;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(q(t.engine,"engine"),await ne(t),t.isolatedDeclarations===void 0)t.isolatedDeclarations=await re(t);let h=t.typeMappings?ie(t.typeMappings):void 0,g=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 T=await De(t,()=>se(t)),j=T.entryFiles,p=[...T.files],{resolver:y,reachability:b}=T;if(ce.set(t,new Set(p)),t.incremental){let n=T.getResolutionFingerprint();if(!t.isolatedDeclarations){let i=new Set(p),m=new Map;for(let S of p){let F=await u(S);m.set(S,rt(F));for(let U of P(F,{includeImports:!0})){let R=y(U.specifier,S).resolved;if(R&&!R.split(/[/\\]/).includes("node_modules")&&!i.has(R))i.add(R),m.set(R,rt(await u(R)))}}let c=[...m].sort(([S],[F])=>S.localeCompare(F));n=JSON.stringify([n,c])}if(g=new et(t,n),t.clearCache){if(e.debug("Clearing build cache..."),!t.dryRun)g.clear()}else if(g.load()){let m=g.getStats();e.debug(`Loaded build cache with ${m.entries} entries`)}else e.debug("No existing build cache found, starting fresh");if(!t.dryRun)kt(t.cwd)}if(g&&!t.dryRun){let n=g.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 W=new Map,k=new Map,v=async(n,i,m="lf")=>{k.set(n,{content:i,lineEnding:m})},E=async(n,i)=>{let m;try{let c=X(n,t),S=async(x)=>{if(!t.diff)return;try{let B=await u(c),H=At(B,x,z(t.cwd,c));if(H)e.info(`
|
|
4
|
-
${H}`);else e.debug(`[no changes] ${c}`)}catch{e.info(`[new file] ${z(t.cwd,c)}`)}},F=(x)=>{if(!t.validate)return 0;let B=Tt(x,c);if(B.isValid)return e.debug(`[validation] ${c} - OK`),0;e.warn(`[validation] ${z(t.cwd,c)} has ${B.errors.length} error(s):`);for(let H of B.errors){let ae=` Line ${H.line}:${H.column}`;if(H.code)ae+=` [${H.code}]`;if(ae+=` - ${H.message}`,e.warn(ae),H.suggestion)e.warn(` Suggestion: ${H.suggestion}`)}return B.errors.length},U=(x)=>{e.info(`[dry-run] Would generate: ${c}`),e.debug("--- Content preview ---"),e.debug(x.slice(0,500)+(x.length>500?`
|
|
5
|
-
...`:"")),e.debug("--- End preview ---")};if(g){let x=g.getCachedIfValid(n,t.cwd);if(x){if(t.bundle)W.set(n,x);await S(x);let B=F(x);if(t.dryRun)U(x);else{if(t.declarationMap)m=i??await u(n),await de(c,n,x,m,t.cwd,v);await v(c,x,t.lineEnding)}return e.debug(`[cached] ${z(t.cwd,c)}`),{success:!0,file:n,declarationCount:0,importCount:0,exportCount:0,cached:!0,validationErrorCount:B}}}m=i??await u(n);let{content:R,declarationCount:he,importCount:we,exportCount:Ce}=await ge(n,m,t,f,h,T.augmentationImports.get(n));if(t.bundle)W.set(n,R);let A=R;if(t.prettier||t.indentStyle||t.indentSize){let x=await te(A,{usePrettier:t.prettier,builtIn:{indentSize:t.indentSize||2,useTabs:t.indentStyle==="tabs",normalizeWhitespace:!0,sortImports:!0,trailingNewline:!0}},c);A=x.content;for(let B of x.warnings??[])e.warn(`[format] ${B}`)}if(t.declarationMap){let x=`${fe(c)||"output.d.ts"}.map`;A=Pt(A,x)}await S(A);let be=F(A);if(t.dryRun)U(A);else{if(t.declarationMap&&m)await de(c,n,A,m,t.cwd,v);if(await v(c,A,t.lineEnding),g&&m)g.update(n,m,A,t.cwd);e.debug(`Generated: ${c}`)}return{success:!0,file:n,declarationCount:he,importCount:we,exportCount:Ce,validationErrorCount:be}}catch(c){let S=Qe(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}}},G=t.parallel||t.parallel!==!1&&p.length>=10,J=V(t.concurrency,Se?.()??8),_=new Map;if(G&&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)_.set(i.file,i.source)}let K=(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=Et(n.dtsError);if(t.continueOnError)e.warn(i);else throw e.error(i),Error(n.dtsError.message)}};if(G)for(let n=0;n<p.length;n+=J){let i=p.slice(n,n+J),m=await Promise.all(i.map((c)=>E(c,_.get(c))));for(let c of m)K(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 E(n);if(K(i),t.progress){let m=Math.round(o.filesProcessed/p.length*100),c=i.cached?"[cached]":"";e.info(`[${o.filesProcessed}/${p.length}] ${m}% - ${z(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 P(c)){let F=y(S.specifier,m);if(!F.isRelative)continue;if(!F.resolved)n.push({from:m,specifier:S.specifier,reason:"missing"});else if(!/\.d\.(?:ts|mts|cts)$/.test(F.resolved)&&!i.has(F.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=z(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)&&j.length>0)try{e.debug("Bundling declarations...");let n=j.length===1&&!!t.bundleOutput;for(let i of j){let m=await Z([i],{includeImports:!0,resolveSpecifier:y}),c=new Set;for(let R of m.reachable){if(R.endsWith(".d.ts"))continue;if(R.includes("node_modules"))continue;c.add(R)}let S=p.filter((R)=>c.has(R));if(!S.includes(i))S.push(i);let F=Rn(i,S,W,{cwd:t.cwd,keepComments:t.keepComments});for(let R of new Set(F.warnings))e.warn(`[bundle] ${R}`);let U=n?ee(t.cwd,t.outdir,t.bundleOutput):X(i,t);if(t.dryRun)e.info(`[dry-run] Would bundle ${F.files.length} files to: ${z(t.cwd,U)}`);else await v(U,F.content,t.lineEnding),e.debug(`Prepared ${F.files.length} bundled files for: ${z(t.cwd,U)}`);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 $e(t,k);if(g&&!t.dryRun)g.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 ve(d,a,t){let f=await se(t),h=Pe(a,t,f,ce.get(t));return Bn(d,(g)=>h(g).emittedSpecifier)}async function po(d,a){Q.delete(a),ce.delete(a);let t=await se(a),f=await Z([d],{includeImports:!0,resolveSpecifier:t}),h=await Re([...f.sources.keys()],t,a.isolatedDeclarations??!1,f.sources);return(await me(d,a,void 0,h.get(ee(d)))).content}async function me(d,a,t,f){let h=await u(d),g=a.typeMappings?ie(a.typeMappings):void 0;return ge(d,h,a,t,g,f)}async function ge(d,a,t,f,h,g){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 E of P(o,{includeImports:!0})){let G=v(E.specifier,d).resolved;if(G&&!G.split(/[/\\]/).includes("node_modules"))C.set(E.specifier,await u(G))}}let T=f?.hasDeclarationHooks()?null:Me(o,d,t,C,g);if(T!==null)return ue(T,d,o,t,f,h,xe(T));let j=C.size?Ln(o,C):void 0,p=r(o,d,t.keepComments,t.isolatedDeclarations??!1,j);if(f)p=await f.runOnDeclarations(d,o,p);let y=0,b=0;for(let v=0;v<p.length;v++){let E=p[v];if(E.kind==="import")y++;if(E.kind==="export"||E.isExported)b++}let k=l(p,{filePath:d,sourceCode:o,declarations:p,augmentationImports:g},t.keepComments,t.importOrder);return ue(k,d,o,t,f,h,{declarationCount:p.length,importCount:y,exportCount:b})}function xe(d){let a=0,t=0,f=0;for(let h of d.split(`
|
|
10
|
-
`)){if(!h||h.startsWith(" ")||h.startsWith("\t")||h.startsWith("}")||h.startsWith("*")||h.startsWith("/"))continue;if(a++,h.startsWith("import "))t++;else if(h.startsWith("export "))f++}return{declarationCount:a,importCount:t,exportCount:f}}function Me(d,a,t,f,h){let g=t.importOrder??["bun"];if(g.length!==1||g[0]!=="bun")return null;let o=L(a)?N(d):O(a)?I(d):d;return Ee(o,{keepComments:t.keepComments??!0,isolatedDeclarations:t.isolatedDeclarations??!1,engine:t.engine,sourceFile:a,inferenceSources:f,augmentationImports:h})}async function ue(d,a,t,f,h,g,o){let C=await ve(d,a,f);if(g)C=Rt(C,g,{filePath:a});if(f.normalizeOutput===!0||f.declarationOrder)C=Xe(C,{lineEnding:"lf",declarationOrder:f.declarationOrder,indent:{style:f.indentStyle??"spaces",size:f.indentSize??2}});if(h)C=await h.runOnAfterFile(a,t,C);return{content:C,...o}}async function mo(d){let a={...D,...d};if(a.logLevel)M(a.logLevel);let t=ee(a.cwd,a.root),f=150,h=5,g=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>=h){if(y-o.lastErrorTime<g){e.warn(`[watch] Too many errors, pausing for ${Math.ceil((g-(y-o.lastErrorTime))/1000)}s...`);return}o.errorCount=0}o.isProcessing=!0;let b=Array.from(o.pendingChanges);o.pendingChanges.clear();let W=new Date().toLocaleTimeString();if(b.length===1)e.info(`
|
|
14
|
-
[${W}] File changed: ${b[0]}`);else e.info(`
|
|
15
|
-
[${W}] ${b.length} files changed`);let k=0,v=0;for(let E of b){let G=ee(t,E);try{let J=a.exclude||[];if(oe(G,J,t)){e.debug(` Skipping excluded file: ${E}`);continue}if(!await le(G).exists()){e.debug(` Skipping deleted file: ${E}`);continue}let K=X(G,a),{content:n}=await me(G,a);await ye(pe(K),{recursive:!0}),await Y(K,n,a.lineEnding),e.info(` \u2713 ${z(a.cwd,K)}`),k++}catch(J){v++,o.errorCount++,o.lastErrorTime=Date.now();let _=Qe(J,G);if(e.error(` \u2717 ${E}: ${_.message}`),_.suggestion)e.error(` Suggestion: ${_.suggestion}`)}}if(b.length>1)e.info(` Done: ${k} generated, ${v} failed`);if(v===0)o.errorCount=0;if(o.isProcessing=!1,o.pendingChanges.size>0)o.debounceTimer=setTimeout(C,f)}function T(y){if(o.pendingChanges.add(y),o.debounceTimer)clearTimeout(o.debounceTimer);o.debounceTimer=setTimeout(C,f)}let p=Mt([w?"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(w){let y=p.stdout.getReader(),b=new TextDecoder,W="";while(!0){let{done:k,value:v}=await y.read();if(k)break;W+=b.decode(v,{stream:!0});let E=W.split(`
|
|
29
|
-
`);W=E.pop()||"";for(let G of E)if(G.startsWith("CHANGED:")){let J=G.slice(8);T(J)}}}else{let y=p.stdout,b="";y.on("data",(W)=>{b+=W.toString();let k=b.split(`
|
|
30
|
-
`);b=k.pop()||"";for(let v of k)if(v.startsWith("CHANGED:")){let E=v.slice(8);T(E)}}),await p.exited}}
|
|
31
|
-
export{s,po,mo};
|
package/dist/chunk-5yx2x4v4.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{L,N}from"./chunk-qbk49jz5.js";import{O,I}from"./chunk-fpa2ea8k.js";import{p}from"./chunk-v6fwy63g.js";import{R,F}from"./chunk-wq5r1ms9.js";import{Le}from"./chunk-vt5hr8vs.js";import{J,Ee}from"./chunk-dak0dhnx.js";import{l}from"./chunk-81jrzxr6.js";function Ze(t,n,r,s,e,i){if(s.length!==1||s[0]!=="bun")return null;if(J(i)==="typescript")return null;let a=L(n??"")?N(t):O(n??"")?I(t):t;return Ee(a,{keepComments:r,isolatedDeclarations:e,engine:i,sourceFile:n})}var y=100,x=0,c=new Map;function $t(t,n,r=!0,s=["bun"],e=!1,i){let a=p(t),b=JSON.stringify([n,r,e,s,J(i)]),g=c.get(b);if(g&&g.contentHash===a)return g.lastAccess=++x,g.result;let h=Ze(t,n,r,s,e,i)??E(t,n,r,s,e);if(c.set(b,{result:h,contentHash:a,lastAccess:++x}),c.size>y){let S=Math.max(1,Math.ceil(c.size*0.1)),u=[];for(let[o,f]of c)u.push([o,f.lastAccess]);u.sort((o,f)=>o[1]-f[1]);for(let o=0;o<S&&o<u.length;o++)c.delete(u[o][0])}return h}function ci(t,n,r=!0,s=["bun"]){return $t(t,n,r,s,!0)}function li(t,n,r=!0,s=["bun"]){return $t(t,n,r,s,!1)}function E(t,n,r,s,e){let i=Le(t,n,r,e);return l(i,{filePath:n??"stdin.ts",sourceCode:t,declarations:i},r,s)}function ui(){c.clear()}function Ba(t,n,r=!0,s=["bun"],e=!1,i){return Ze(t,n,r,s,e,i)??kn(t,n,r,s,e)}function kn(t,n,r=!0,s=["bun"],e=!1){if(L(n??""))t=N(t);else if(O(n??""))t=I(t);let i=e?R(t,n,r):F(t,n,r);return l(i,{filePath:n??"stdin.ts",sourceCode:t,declarations:i},r,s)}
|
|
3
|
-
export{Ze,$t,ci,li,ui,Ba,kn};
|
package/dist/chunk-cfjd81h8.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ve}from"./chunk-mzxxgnp8.js";import{R}from"./chunk-wq5r1ms9.js";import{v}from"./chunk-9mdgtq38.js";function Ln(i,r){let n=new Set;for(let e of R(i,"imports.ts",!1)){if(e.kind!=="import")continue;let t=v(e.text),a=t&&r.get(t.source);if(!t||t.isTypeOnly||!a)continue;let s=rt(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 rt(i){let r=R(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&&Ve(i,n.name)===1).map((n)=>({name:n.name,isDefault:Boolean(n.isDefault)})).sort((n,e)=>n.name.localeCompare(e.name))}
|
|
3
|
-
export{Ln,rt};
|
package/dist/chunk-daasy0pw.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{m}from"./chunk-t5nmnzy6.js";import{y,ee}from"./chunk-vk5r6pgx.js";function _(b){let f=m(b),e=0,v,I,w,z=[new Map,new Map],n=(t=e)=>f[t]?b.slice(f[t].start,f[t].end):"",d=(t=e)=>f[t]?.kind==="word",g=(t,u)=>/[\r\n]/.test(b.slice(t,u));function r(t){if(n()!==t)return!1;return e++,!0}function k(t){let u=e;for(let a of t)if(!r(a)||e>u+1&&f[e-2].end!==f[e-1].start)return e=u,!1;return!0}function h(t){let u=e;if(t())return!0;return e=u,!1}function o(){if(!d())return!1;return e++,!0}function T(){let t=e,u=e;while(u<f.length&&(u===t||f[u-1].end===f[u].start)){let i=n(u),l=(i==="+"||i==="-")&&/[eE]$/.test(n(u-1));if(!d(u)&&!/^[0-9.]$/.test(i)&&!l)break;u++}if(u===t)return!1;let a=b.slice(f[t].start,f[u-1].end);if(!y(a)&&!ee(a))return!1;return e=u,!0}function A(){if(!["(","[","{"].includes(n()))return!1;if(!v){v=new Map;let u=[];for(let a=0;a<f.length;a++){let i=n(a);if(["(","[","{"].includes(i))u.push(a);else if([")","]","}"].includes(i)){let l=u.pop();if(l!==void 0&&["()","[]","{}"].includes(n(l)+i))v.set(l,a+1);else u.length=0}}}let t=v.get(e);if(t===void 0)return!1;return e=t,!0}function D(){return o()||(n()==="{"||n()==="[")&&A()}function N(){if(!r("("))return!1;if(r(")"))return!0;do{if(k("..."),!D())return!1;if(r("?"),r(":")&&!s())return!1;if(n()===")")break}while(r(",")&&n()!==")");return r(")")}function x(){if(!r("<"))return!1;if(n()===">")return!1;do{if(n()==="const")e++;while((n()==="in"||n()==="out")&&d(e+1)&&n(e+1)!=="extends")e++;if(!o())return!1;if(r("extends")&&!s(!1))return!1;if(r("=")&&!s())return!1;if(n()===">")break}while(r(",")&&n()!==">");return r(">")}function O(){if(!r("<")||n()===">")return!1;do{if(!s())return!1;if(n()===">")break}while(r(",")&&n()!==">");return r(">")}function F(){if(r("abstract"),r("new"),n()==="<"&&!x())return!1;return N()&&k("=>")&&q()}function G(){if(f[e]?.kind!=="literal"||b.charCodeAt(f[e].start)!==96)return!1;for(;;){let t=f[e++];if(!t)return!1;if(b.charCodeAt(t.end-1)===96)return!0;if(b.charCodeAt(t.end-1)!==36||!r("{")||!s()||!r("}"))return!1;if(f[e]?.kind!=="literal")return!1}}function H(){if(!r("["))return!1;if(r("]"))return!0;do{k("...");let t=e;if(d()||f[e]?.kind==="quoted"){if(e++,r("?"),!r(":"))e=t}if(!s())return!1;if(r("?"),n()==="]")break}while(r(",")&&n()!=="]");return r("]")}function q(){if(r("asserts")){if(!o())return!1;return!r("is")||s()}if(d()&&n(e+1)==="is")return e+=2,s();return s()}function S(){if(n()==="<"&&!x())return!1;if(!N())return!1;return!r(":")||q()}function J(){if(!r("["))return!1;if(d()&&(n(e+1)==="in"||n(e+1)===":")){e++;let t=r("in");if(!t&&!r(":"))return!1;if(!s())return!1;if(t&&r("as")&&!s())return!1}else{if(!o()&&!T()){if(f[e]?.kind!=="quoted")return!1;e++}while(r("."))if(!o())return!1}return r("]")}function B(){if(n()==="[")return J();if(o()||T())return!0;if(f[e]?.kind!=="quoted")return!1;return e++,!0}function K(){if(n()!=="get"&&n()!=="set")return;let t=e++;e=B()&&n()==="("?t+1:t}function L(){if(!r("{"))return!1;while(!r("}")){if(e>=f.length)return!1;let t=e;if((n()==="+"||n()==="-")&&n(e+1)==="readonly")e++;if(n()==="readonly"&&n(e+1)!==":"&&n(e+1)!=="?"&&n(e+1)!=="("&&n(e+1)!==";"&&n(e+1)!=="}")e++;if(n()==="new"&&(n(e+1)==="("||n(e+1)==="<"))e++;if(n()==="("||n()==="<"){if(!S())return!1}else{if(K(),!B())return!1;if(n()==="+"||n()==="-"){if(e++,!r("?"))return!1}else r("?");if(r(":")){if(!s())return!1}else if(n()==="("||n()==="<"){if(!S())return!1}}if(e===t)return!1;if(r(";")||r(","))continue;if(n()!=="}"&&!g(f[e-1].end,f[e]?.start??b.length))return!1}return!0}function P(){if(h(F))return!0;if(r("("))return s()&&r(")");if(n()==="{")return L();if(n()==="[")return H();if(h(G))return!0;if(f[e]?.kind==="quoted")return e++,!0;if(r("-"))return T();if(h(T))return!0;if(r("typeof")){if(n()==="import")return P();if(!o())return!1;while(r("."))if(!o())return!1;if(n()==="<"&&!O())return!1;return!0}if(r("import")){if(!r("(")||!s())return!1;if(r(",")&&!L())return!1;return r(")")}if(["export","function","class","const","let","var","return","throw","default","new","abstract"].includes(n()))return!1;return o()}function E(){if(n()==="keyof"||n()==="readonly"||n()==="unique")return e++,E();if(r("infer")){if(!o())return!1;if(r("extends")&&!s(!1))return!1;return!0}if(!P())return!1;for(;;)if(r(".")){if(!o())return!1}else if(n()==="<"){if(g(f[e-1].end,f[e].start))return!0;if(!O())return!1}else if(n()==="["){if(g(f[e-1].end,f[e].start))return!0;if(e++,!r("]")&&!(s()&&r("]")))return!1}else return!0}function R(){if(r("&"),!E())return!1;while(r("&"))if(!E())return!1;return!0}function s(t=!0){let u=e,a=z[t?1:0],i=a.get(u);if(i!==void 0){if(i<0)return!1;return e=i,!0}let l=Q(t);if(a.set(u,l?e:-1),!l)e=u;return l}function Q(t){if(r("|"),!R())return!1;while(r("|"))if(!R())return!1;if(t&&n()==="extends"&&!g(f[e-1].end,f[e].start))return e++,s(!1)&&r("?")&&s()&&r(":")&&s();return!0}function U(){if(n()!=="("||!A())return!1;if(r(":")&&!q())return!1;return k("=>")}function V(){r("async");let t=r("function");if(t){if(r("*"),d())e++}if(n()==="<"&&!x())return!1;if(n()!=="("||!A())return!1;if(r(":")&&!q())return!1;return t?n()==="{":k("=>")}function W(){let t=n();if(t==="<"||t===">"||t==="+"||t==="-")return!1;if(t==="("||f[e]?.kind==="literal"&&b.charCodeAt(f[e].start)===96)return!0;if(!f[e]||g(f[e-1].end,f[e].start))return!0;if(["*","/","%","=","&","|","^","?",":",",",";",")","]","}","in","instanceof","as","satisfies"].includes(t))return!0;if(t==="!")return n(e+1)==="="&&f[e].end===f[e+1]?.start;return!d()&&f[e]?.kind!=="quoted"&&f[e]?.kind!=="literal"&&!["{","[","~","#","@"].includes(t)&&!/^[0-9]$/.test(t)}return(t,u,a)=>{let i=0,l=f.length;while(i<l){let p=i+l>>>1;if(f[p].start<t)i=p+1;else l=p}if(f[i]?.start!==t)return;if(I!==u){I=u,w=void 0;let p=0,M=i;while(p<M){let C=p+M>>>1;if(f[C].start<u)p=C+1;else M=C}if(e=p,V())w=n()==="{"?f[e].start:f[e-1].end}if(w!==void 0&&t<w)return{end:w,completeOperand:!1,parameters:!0};if(n(i)!=="<")return;e=i;let c=n(i-1),j=t===u||["=","+","-","*","/","%","&","|","^","!","~","?",":","<",">","void","typeof","await","yield","delete"].includes(c);if((c==="function"||c==="class"||c==="*"&&n(i-2)==="function"||d(i-1)&&(n(i-2)==="function"||n(i-2)==="class"||n(i-2)==="*"&&n(i-3)==="function"))&&h(x))return{end:f[e-1].end,completeOperand:!1,parameters:!0};if(e=i,(j||c==="async")&&h(x)){let p=f[e-1].end;if(h(U))return{end:p,completeOperand:!1,parameters:!0}}e=i;let X=c==="."&&n(i-2)==="?"&&f[i-2].end===f[i-1].start;if((f[i-1]?.end??-1)>=u&&(X||d(i-1)||c===")"||c==="]"||c==="!"||c===">"&&f[i-1].end===a)&&h(O)&&W())return{end:f[e-1].end,completeOperand:!0};if(e=i,j&&r("<")&&s()&&r(">"))return{end:f[e-1].end,completeOperand:!1};return}}
|
|
3
|
-
export{_};
|
package/dist/chunk-h28vzayq.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{t,d,E}from"./chunk-t5nmnzy6.js";import{S}from"./chunk-hkcqbex1.js";function D(n){return typeof n==="string"?E(n,"'"):String(n)}function Sa(n,y,m=new Map){let o=t(n),e=new Map(m),i=new Map,f=[],c=1,p=0,q=0;for(let r=1;r<o.length;r++){let w=o[r],K=n.slice(w.start,w.end);if(w.kind==="punctuation"&&p===0&&(K===","||K==="}")){let l=o.slice(c,r),a=l[0];if(a){let u=a.kind==="quoted"?d(n.slice(a.start,a.end)):n.slice(a.start,a.end),v=l.findIndex((g)=>g.kind==="punctuation"&&n[g.start]==="="),s=q;if(v>=0){let g=l.slice(v+1),B="",C=l[v].end;for(let x=0;x+2<g.length;x++){let[h,A,M]=g.slice(x,x+3);if(h.kind!=="word"||M.kind!=="word"||n.slice(A.start,A.end)!==".")continue;let b=e.get(`${n.slice(h.start,h.end)}.${n.slice(M.start,M.end)}`);if(b===void 0||typeof b==="object")continue;B+=n.slice(C,h.start)+D(b),C=M.end,x+=2}B+=n.slice(C,l.at(-1).end),s=S(B,e),f.push({start:l[v].start,end:l.at(-1).end,text:s===void 0?"":`= ${D(s)}`})}else if(s!==void 0)f.push({start:a.end,end:a.end,text:` = ${D(s)}`});if(q=typeof s==="number"?s+1:void 0,u!==void 0){if(e.delete(u),e.delete(`${y}.${u}`),s!==void 0)i.set(u,s),e.set(u,s),e.set(`${y}.${u}`,s)}}c=r+1}else if(w.kind==="punctuation"){if("([{".includes(K))p++;else if(")]}".includes(K))p--}}let k=n;for(let r of f.reverse())k=k.slice(0,r.start)+r.text+k.slice(r.end);return{body:k,members:i}}function Kn(n,y){let m=[...new Set([...n,...y.values()])];if(!m.some((e)=>e.kind==="enum"))return;m.sort((e,i)=>(e.start??0)-(i.start??0));let o=new Map;for(let e of m)if(e.kind==="enum"){let i=e.text.indexOf("{");if(i<0)continue;if(t(e.text.slice(0,i)).some((c)=>e.text.slice(c.start,c.end)==="declare"))continue;let f=Sa(e.text.slice(i),e.name,o);e.text=e.text.slice(0,i)+f.body;for(let[c,p]of f.members)o.set(`${e.name}.${c}`,p)}else if(e.kind==="variable"&&e.modifiers?.[0]==="const"&&!e.typeAnnotation&&!e.modifiers.includes("const assertion")&&typeof e.value==="string"){let i=S(e.value,o);if(i!==void 0)o.set(e.name,i)}}
|
|
3
|
-
export{Sa,Kn};
|
package/dist/chunk-sjbm1trn.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lstat as d,realpath as f,stat as T}from"fs/promises";import{isAbsolute as l,normalize as g,relative as p,resolve as u}from"path";var j={rootDir:process.cwd(),maxFileSize:10485760,maxTotalSize:104857600,timeout:30000,followSymlinks:!1,maxFiles:1e4,blockedPatterns:["**/.git/**","**/node_modules/**","**/.env*","**/secrets/**","**/*.key","**/*.pem"]};class k extends Error{code;path;constructor(t,r,e){super(t);this.code=r;this.path=e;this.name="SecurityError"}}function Ye(t,r={}){let{rootDir:e=process.cwd()}=r,i=g(t),n=l(i)?i:u(e,i),o=u(n),s=p(e,o);if(s.startsWith("..")||l(s))throw new k(`Path traversal detected: "${t}" resolves outside root directory`,"PATH_TRAVERSAL",t);return o}function Yr(t,r={}){return t.map((e)=>Ye(e,r))}function hn(t,r={}){let e=r.blockedPatterns||j.blockedPatterns;for(let i of e)if(h(t,i))return!0;return!1}var m=new Map;function P(t){let r=m.get(t);if(r)return r;let e=t.replace(/\*\*/g,"<<GLOBSTAR>>").replace(/\*/g,"<<STAR>>").replace(/\?/g,"<<QUESTION>>");e=e.replace(/[.+^${}()|[\]\\]/g,"\\$&"),e=e.replace(/^<<GLOBSTAR>>\//,"(.*\\/)?"),e=e.replace(/\/<<GLOBSTAR>>$/,"(\\/.*)?"),e=e.replace(/\/<<GLOBSTAR>>\//g,"(\\/.*)?\\/"),e=e.replace(/<<GLOBSTAR>>/g,".*"),e=e.replace(/<<STAR>>/g,"[^/]*"),e=e.replace(/<<QUESTION>>/g,"[^/]");let i=new RegExp(`^${e}$`);return m.set(t,i),i}function h(t,r){let e=t.indexOf("\\")===-1?t:t.replace(/\\/g,"/");return P(r).test(e)}async function Xr(t,r={}){let e=r.maxFileSize??j.maxFileSize;try{let i=await T(t);if(i.size>e)throw new k(`File too large: "${t}" is ${a(i.size)}, max is ${a(e)}`,"FILE_TOO_LARGE",t);return i.size}catch(i){if(i instanceof k)throw i;throw new k(`Failed to check file size: ${t}`,"INVALID_PATH",t)}}async function Zr(t){try{return(await d(t)).isSymbolicLink()}catch{return!1}}async function Qr(t,r={}){let e=r.followSymlinks??j.followSymlinks;if(await Zr(t)){if(!e)throw new k(`Symbolic links not allowed: "${t}"`,"SYMLINK_NOT_ALLOWED",t);let i=await f(t);return Ye(i,r)}return t}async function vt(t,r={}){let e=Ye(t,r);if(hn(e,r))throw new k(`Path matches blocked pattern: "${t}"`,"BLOCKED_PATTERN",t);let i=await Qr(e,r),n=await Xr(i,r);return{path:i,size:n}}async function yn(t,r={}){let e=r.maxFiles??j.maxFiles,i=r.maxTotalSize??j.maxTotalSize;if(t.length>e)throw new k(`Too many files: ${t.length} exceeds maximum of ${e}`,"MAX_FILES_EXCEEDED");let n=[],o=0;for(let s of t){let c=await vt(s,r);if(n.push(c.path),o+=c.size,o>i)throw new k(`Total size exceeded: ${a(o)} exceeds maximum of ${a(i)}`,"TOTAL_SIZE_EXCEEDED")}return{paths:n,totalSize:o}}function St(t,r,e="Operation"){return new Promise((i,n)=>{let o=setTimeout(()=>{n(new k(`${e} timed out after ${r}ms`,"TIMEOUT"))},r);t.then((s)=>{clearTimeout(o),i(s)}).catch((s)=>{clearTimeout(o),n(s)})})}function ei(t,r={}){let e=r.timeout??j.timeout;return async(i)=>{let{path:n}=await vt(i,r);return St(t(n),e,`Processing ${i}`)}}function oo(t,r={}){let e=r.timeout??j.timeout;return async(i)=>{let{paths:n}=await yn(i,r);return St(t(n),e,`Processing ${i.length} files`)}}function ao(t){let r=t.replace(/\\/g,"/").replace(/\0/g,"").replace(/^\/+/,"").replace(/^[A-Z]:/i,""),e="";while(e!==r)e=r,r=r.replace(/\.\.\/|\.\.$/g,"").replace(/\/+/g,"/");return r.replace(/^\/+|\/+$/g,"")}function co(t){if(t.includes("\x00"))return!1;if(g(t).includes(".."))return!1;if(l(t)&&!t.startsWith(process.cwd()))return!1;return!0}function a(t){if(t===0)return"0 B";let r=["B","KB","MB","GB"],e=1024,i=Math.floor(Math.log(t)/Math.log(e));return`${Number.parseFloat((t/e**i).toFixed(2))} ${r[i]}`}function lo(t={}){let r={...j,...t};return{validatePath:(e)=>Ye(e,r),validatePaths:(e)=>Yr(e,r),validateFile:(e)=>vt(e,r),validateBatch:(e)=>yn(e,r),withTimeout:(e,i)=>St(e,r.timeout,i),secureProcessor:(e)=>ei(e,r),isBlocked:(e)=>hn(e,r),getConfig:()=>r}}
|
|
3
|
-
export{j,k,Ye,Yr,hn,Xr,Zr,Qr,vt,yn,St,ei,oo,ao,co,lo};
|
package/dist/chunk-t5nmnzy6.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{a,i,h,g,xe,Ue}from"./chunk-cgqg1br8.js";function t(f){let o=[],c=f.length,l=new Set,e=Ue(f,l),r=0;function k(){let S=r++;while(r<c){let y=f.charCodeAt(r);if(y===92)r+=2;else if(y===96){o.push({start:S,end:++r,kind:"literal"});return}else if(y===36&&f.charCodeAt(r+1)===123)o.push({start:S,end:r+1,kind:"literal"}),o.push({start:r+1,end:r+2,kind:"punctuation"}),r+=2,p(!0),S=r;else r++}o.push({start:S,end:r,kind:"literal"})}function p(S=!1){let y=0,M=0;while(r<c){let w=r,n=f.charCodeAt(r);if(n===60&&(M>0||f[r+1]!=="/"&&xe(f,r,o.at(-1)?.end??0))){let u=e(r);if(u){if(M=Math.max(0,M+u.delta),u.delta<0){r=u.end+1,o.push({start:w,end:r,kind:"literal"});continue}}}if(n===32||n>=9&&n<=13||n>127&&/\s/.test(f[r])){r++;continue}if(n===47){let u=f.charCodeAt(r+1);if(u===47){let s=f.indexOf(`
|
|
3
|
-
`,r+2);r=s===-1?c:s+1;continue}if(u===42){let s=f.indexOf("*/",r+2);r=s===-1?c:s+2;continue}if(!l.has(r)&&h(f,r,o.at(-1)?.end??0)){r=g(f,r),o.push({start:w,end:r,kind:"literal"});continue}}else if(n===96){k();continue}else if(n===34||n===39){r++;let u=!1;while(r<c){let s=f.charCodeAt(r++);if(s===92)r++;else if(s===n){u=!0;break}}o.push({start:w,end:Math.min(r,c),kind:u?"quoted":"literal"});continue}else if(a(n)){while(i(f.charCodeAt(++r)));o.push({start:w,end:r,kind:"word"});continue}if(o.push({start:w,end:++r,kind:"punctuation"}),S){if(n===123)y++;else if(n===125){if(y===0)return;y--}}}}return p(),o}var R,q=[];function m(f){if(f!==R)q=t(f),R=f;return q}function ur(){R=void 0,q=[]}function d(f){let o="",c=f.length-1;for(let l=1;l<c;l++){if(f[l]!=="\\"){o+=f[l];continue}let e=f[++l];if(l>=c)return;switch(e){case`
|
|
4
|
-
`:break;case"\r":if(f[l+1]===`
|
|
5
|
-
`)l++;break;case"n":o+=`
|
|
6
|
-
`;break;case"r":o+="\r";break;case"t":o+="\t";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;case"0":if(/\d/.test(f[l+1]??""))return;o+="\x00";break;case"x":case"u":{let r=e==="u"&&f[l+1]==="{",k=l+(r?2:1),p=r?f.indexOf("}",k):k+(e==="x"?2:4),S=f.slice(k,p);if(p<k||p>c||!/^[\da-f]+$/i.test(S)||r&&S.length>6)return;let y=Number.parseInt(S,16);if(y>1114111)return;o+=String.fromCodePoint(y),l=r?p:p-1;break}default:if(/\d/.test(e))return;o+=e}}return o}function E(f,o){let c=o;for(let l of f){let e=l.charCodeAt(0);if(l===o||l==="\\")c+=`\\${l}`;else if(e<32||e===8232||e===8233||l.length===1&&e>=55296&&e<=57343)c+=`\\u${e.toString(16).padStart(4,"0")}`;else c+=l}return c+o}function ze(f){let o=t(f),c=(p)=>o[p]?f.slice(o[p].start,o[p].end):"";if(c(0)!=="import")return;let l=c(1)==="type"&&c(2)!=="=",e=l?2:1;if(o[e]?.kind!=="word"||c(e+1)!=="="||c(e+2)!=="require"||c(e+3)!=="("||o[e+4]?.kind!=="quoted"||c(e+5)!==")")return;let r=e+6;if(o.length!==r&&!(o.length===r+1&&c(r)===";"))return;let k=d(c(e+4));if(k===void 0)return;return{name:c(e),source:k,isTypeOnly:l,end:o[o.length-1].end}}function b(f){let o=t(f),c=[],l=new Set,e=(n)=>n>=0&&n<o.length?f.slice(o[n].start,o[n].end):"",r=(n)=>o[n]?.kind==="quoted",k=(n)=>o[n]?.kind==="word",p=[],S=!1,y=0;if(f.includes("declare")&&f.includes("module"))for(let n=0;n<o.length;n++){let u=e(n);if(y===0&&k(n)&&e(n-1)!=="."&&e(n-1)!=="#"){if(u==="export"||u==="import"&&e(n+1)!=="("&&e(n+1)!==".")S=!0;if(u==="declare"&&e(n+1)==="module"&&r(n+2)&&e(n+3)==="{")p.push(n+2)}if(u==="{"||u==="("||u==="[")y++;else if(u==="}"||u===")"||u==="]")y--}function M(n,u=!1){if(e(n)==="*"){if(e(n+1)==="as")return k(n+2)||u&&r(n+2)?n+3:-1;return u?n+1:-1}if(e(n)!=="{")return-1;let s=1;for(let x=n+1;x<o.length;x++)if(e(x)==="{")s++;else if(e(x)==="}"&&--s===0)return x+1;else if(o[x].kind==="literal"||e(x)===";")return-1;return-1}function w(n,u,s,x){let T=o[n];if(!T||T.kind!=="quoted"||l.has(T.start))return;let C=d(f.slice(T.start,T.end));if(C===void 0)return;l.add(T.start),c.push({specifier:C,kind:u,isTypeOnly:s,category:x,start:T.start,end:T.end})}for(let n=0;n<o.length;n++){if(!k(n)||e(n-1)==="."||e(n-1)==="#")continue;let u=e(n),s=n+1;if(u==="export"){let x=e(s)==="type";if(x)s++;let T=e(s)==="*"?e(s+1)==="as"?"export-star-as":"export-star":"export-named",C=M(s,!0);if(C>=0&&e(C)==="from")w(C+1,T,x,"export")}else if(u==="import"){if(r(s)){w(s,"import",!1,"static-import");continue}if(e(s)==="("){if(e(s+2)===")"||e(s+2)===",")w(s+1,"import",!1,"import-type");continue}let x=e(s)==="type"&&e(s+1)!=="from"&&e(s+1)!=="="&&e(s+1)!==",";if(x)s++;if(k(s)){if(s++,e(s)==="="){if(e(s+1)==="require"&&e(s+2)==="("&&e(s+4)===")")w(s+3,"import",x,"static-import");continue}if(e(s)===",")s=M(s+1)}else s=M(s);if(s>=0&&e(s)==="from")w(s+1,"import",x,"static-import")}}if(S&&p.length){for(let n of p)w(n,"import",!0,"augmentation");c.sort((n,u)=>n.start-u.start)}return c}
|
|
7
|
-
export{t,m,ur,d,E,ze,b};
|
package/dist/chunk-vt5hr8vs.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ur}from"./chunk-t5nmnzy6.js";import{L,N}from"./chunk-qbk49jz5.js";import{O,I}from"./chunk-fpa2ea8k.js";import{p}from"./chunk-v6fwy63g.js";import{R,F}from"./chunk-wq5r1ms9.js";var y=100,h=0,e=new Map;function Le(n,s,c=!0,i=!1,l){if(L(s??""))n=N(n);else if(O(s??""))n=I(n);let f=p(n),m=JSON.stringify([s,c,i,[...l??[]].sort()]),a=e.get(m);if(a&&a.contentHash===f)return a.lastAccess=++h,a.declarations;let g=i?R(n,s,c):F(n,s,c,l);if(e.set(m,{declarations:g,contentHash:f,lastAccess:++h}),e.size>y){let S=Math.max(1,Math.ceil(e.size*0.1)),r=[];for(let[t,o]of e)r.push([t,o.lastAccess]);r.sort((t,o)=>t[1]-o[1]);for(let t=0;t<S&&t<r.length;t++)e.delete(r[t][0])}return g}function _n(){e.clear(),ur()}
|
|
3
|
-
export{Le,_n};
|