docuvia 1.14.3 → 1.14.4
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/ast-worker.js +1 -1
- package/dist/{chunk-XXJIGRZK.js → chunk-6LPHX5FW.js} +2 -2
- package/dist/{chunk-UMLQT5AB.js → chunk-CHC3PPGJ.js} +2 -2
- package/dist/{chunk-ER4DQKJQ.js → chunk-PU3PIUSW.js} +1 -1
- package/dist/chunk-PU3PIUSW.js.map +1 -0
- package/dist/{chunk-XYEEF3NX.js → chunk-WMWPVOME.js} +2 -2
- package/dist/cli.js +140 -133
- package/dist/cli.js.map +1 -1
- package/dist/fs-utils-DHI62E2D.js +3 -0
- package/dist/{init-templates-VT3N2GHJ.js → init-templates-E7S222BX.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-ER4DQKJQ.js.map +0 -1
- package/dist/fs-utils-2H5TSSYS.js +0 -3
- /package/dist/{chunk-XXJIGRZK.js.map → chunk-6LPHX5FW.js.map} +0 -0
- /package/dist/{chunk-UMLQT5AB.js.map → chunk-CHC3PPGJ.js.map} +0 -0
- /package/dist/{chunk-XYEEF3NX.js.map → chunk-WMWPVOME.js.map} +0 -0
- /package/dist/{fs-utils-2H5TSSYS.js.map → fs-utils-DHI62E2D.js.map} +0 -0
- /package/dist/{init-templates-VT3N2GHJ.js.map → init-templates-E7S222BX.js.map} +0 -0
package/dist/ast-worker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c,d as a,e as y,f as _,h as T}from"./chunk-
|
|
2
|
+
import{c,d as a,e as y,f as _,h as T}from"./chunk-CHC3PPGJ.js";import{d as L,qa as P,ta as E}from"./chunk-PU3PIUSW.js";import"./chunk-KVOCOCYJ.js";import{parentPort as N}from"worker_threads";import{Parser as w,Language as U}from"web-tree-sitter";import*as O from"path";import*as D from"fs";import{createHash as H}from"crypto";function h(e){return H(P).update(e.text).digest("hex")}var x=new L(e=>N?.postMessage(e));process.on("uncaughtException",e=>{x.error(a.WORKER_UNCAUGHT_EXCEPTION,{error:e instanceof Error?e.message:String(e)})});process.on("unhandledRejection",e=>{x.error(a.WORKER_UNHANDLED_REJECTION,{error:e instanceof Error?e.message:String(e)})});var S=!1,b=null;function G(){return b??=_(),b}var C=new Map;function K(e){let t=C.get(e);return t||(t=U.load(e),C.set(e,t)),t}function Y(e){let t=[],n=e.matchAll(/import\s+{([^}]+)}\s+from\s+['"]([^'"]+)['"]/g);for(let r of n)t.push({localName:r[1].trim(),originalName:r[1].trim(),modulePath:r[2]});return t}function F(e){return e.childForFieldName("name")?.text||e.descendantsOfType("identifier")[0]?.text||a.ANONYMOUS_NAME}function Q(e){let t=e.childForFieldName("declarator")?.childForFieldName("declarator");if(t)return t.type===c.QUALIFIED_IDENTIFIER?t.childForFieldName("name")?.text??a.ANONYMOUS_NAME:t.text}function V(e){let t=e.childForFieldName("name");if(t)return t.text;let n=Q(e);if(n)return n;let r=new Set([c.VARIABLE_DECLARATOR,c.ASSIGNMENT_EXPRESSION,c.PAIR,c.PUBLIC_FIELD_DEFINITION]),o=e.parent;for(;o&&o.type!==c.ARGUMENTS;){if(r.has(o.type)){let s=o.childForFieldName("name")||o.childForFieldName("key")||o.childForFieldName("left");if(s)return s.text}o=o.parent}return a.ANONYMOUS_NAME}function W(e){return e.childForFieldName("function")||e.childForFieldName("expression")||e.childForFieldName("type")||e.childForFieldName("name")||e.childForFieldName("method")||e}function J(e){let t=W(e),n=t.namedChildren,r=n[n.length-1],o=n.length>=2?n[n.length-2]:void 0;if(!r||!o)return{targetFunction:f(t.text),calleeName:t.text,calleeKind:"bare"};if(!j.has(r.type))return{targetFunction:f(t.text),calleeKind:"computed"};let s=r.text,i=o.text;return i.includes("(")?{targetFunction:f(t.text),calleeName:s,receiverText:i,calleeKind:"arg-chain"}:{targetFunction:f(t.text),calleeName:s,receiverText:i,calleeKind:i==="this"||i==="super"?"this":"member"}}function f(e){return e.replace(/\s+/g,"")}var j=new Set(["identifier","property_identifier","field_identifier","shorthand_property_identifier","attribute"]);function B(e){return((e.childForFieldName("property")||e.childForFieldName("field")||e.childForFieldName("attribute")||e.childForFieldName("name")||e.childForFieldName("method"))??e).startPosition}function g(e,t){let n=e.parent;for(;n;){if(t.has(n.id))return F(n);n=n.parent}return a.ANONYMOUS_NAME}function v(e){return e.type===c.TYPE_IDENTIFIER?e.text:e.descendantsOfType(c.TYPE_IDENTIFIER)[0]?.text}function X(e){let t=e.parent;for(;t;){if(t.type===c.IMPL_ITEM){let n=t.childForFieldName("type");return n?v(n):void 0}t=t.parent}}function z(e){let n=e.childForFieldName("receiver")?.namedChild(0)?.childForFieldName("type");return n?v(n):void 0}function Z(e){let n=e.childForFieldName("declarator")?.childForFieldName("declarator");if(n?.type!==c.QUALIFIED_IDENTIFIER)return;let r=n.childForFieldName("scope");if(r)return r.type===c.QUALIFIED_IDENTIFIER?r.childForFieldName("name")?.text:r.text}function $(e){return X(e)??z(e)??Z(e)}function q(e,t,n){let r=t.extractClasses(e.rootNode);for(let o of r)n.push({name:F(o),startLine:o.startPosition.row,endLine:o.endPosition.row,methods:[],contentHash:h(o)});return r}var ee=new Set(["arrow_function","function_expression"]);function te(e,t,n){let r=t.extractVariables?.(e.rootNode)??[];for(let o of r){let s=o.childForFieldName("value");s&&ee.has(s.type)||n.push({name:F(o),startLine:o.startPosition.row,endLine:o.endPosition.row,contentHash:h(o)})}return r}function ne(e,t,n,r){let o=new Set(r.map(i=>i.id)),s=t.extractFunctions(e.rootNode);for(let i of s){let d=g(i,o),l=d===a.ANONYMOUS_NAME?$(i):d;n.push({name:V(i),startLine:i.startPosition.row,endLine:i.endPosition.row,contentHash:h(i),containerName:l})}return s}function re(e,t,n,r){let o=new Set(n.map(i=>i.id)),s=t.extractCalls(e.rootNode);for(let i of s){if(r.length>=1e3)break;let d=B(i),l=J(i);r.push({sourceFunction:g(i,o),targetFunction:l.targetFunction,startLine:d.row,startColumn:d.column,calleeName:l.calleeName,receiverText:l.receiverText,calleeKind:l.calleeKind})}}function oe(e,t,n,r){if(!t.extractImplements)return;let o=new Set(n.map(s=>s.id));for(let s of t.extractImplements(e.rootNode))r.push({sourceClass:g(s,o),targetInterface:s.text})}function se(e,t,n,r){if(!t.extractExtends)return;let o=new Set(n.map(s=>s.id));for(let s of t.extractExtends(e.rootNode))r.push({sourceClass:g(s,o),targetClass:s.text})}var ie=new Set([E.TYPESCRIPT,E.JAVASCRIPT]),ae="Worker",ce="path",le="resolve",de="join",ue="__dirname";function me(e){if(e.type!=="call_expression")return!1;let t=e.childForFieldName("function");if(!t||t.type!=="member_expression")return!1;let n=t.childForFieldName("object")?.text,r=t.childForFieldName("property")?.text;return n===ce&&(r===le||r===de)}function ge(e){let t=e.childForFieldName("arguments");return!t||!t.namedChildren.some(o=>o?.type==="identifier"&&o.text===ue)?void 0:t.descendantsOfType("string")[0]?.text.replace(/['"]/g,"")}function pe(e,t){for(let n of e.rootNode.descendantsOfType(c.ASSIGNMENT_EXPRESSION)){if(!n)continue;let r=n.childForFieldName("left"),o=n.childForFieldName("right");if(r?.text!==t||!o||!me(o))continue;let s=ge(o);if(s)return s}}function fe(e,t){if(t.type==="string")return t.text.replace(/['"]/g,"");if(t.type==="identifier"||t.type==="member_expression")return pe(e,t.text)}function Ne(e,t,n,r){if(!ie.has(t))return;let o=new Set(n.map(s=>s.id));for(let s of e.rootNode.descendantsOfType("new_expression")){if(!s||s.childForFieldName("constructor")?.text!==ae)continue;let l=s.childForFieldName("arguments")?.namedChildren.find(p=>p!==null);if(!l)continue;let m=fe(e,l);m&&r.push({sourceFunction:g(s,o),targetPath:m})}}function Ee(e,t,n){let r=[],o=[],s=[],i=[],d=[],l=[],m=[],p=[],A=[],I=[];if(e){r.push(a.parsedViaTreeSitter(e.rootNode.childCount));try{let u=q(e,t,d),R=ne(e,t,i,u),M=t.extractImports(e.rootNode);o.push(...y(M)),te(e,t,l),re(e,t,R,m),oe(e,t,u,p),se(e,t,u,A),Ne(e,n,R,I),r.push(a.QUERIED_VIA_LANGUAGE_PROVIDER)}catch(u){r.push(a.providerQueryFailed(u instanceof Error?u.message:String(u)))}}return{imports:o,exports:s,functions:i,classes:d,variables:l,calls:m,implements:p,extends:A,workerSpawns:I,decisions:r}}function he(e,t){for(let n of e.drainQueryCompileFailures?.()??[])x.error(a.QUERY_COMPILE_FAILED,{language:t,kind:n.kind,pattern:n.pattern,message:n.message})}function xe(e,t,n,r){let o=new w;o.setLanguage(n),t.initQueries?.(n),he(t,r);let s=o.parse(e),i=Ee(s,t,r);return s&&s.delete(),o.delete(),i}async function Fe(e){S||(await w.init(),S=!0);let t=await G(),n=O.extname(e.filePath),r=t.getProviderForExtension(n);if(!r)return{taskId:e.taskId,success:!0,data:{imports:[],exports:[],functions:[],classes:[],calls:[],decisions:[a.noLanguageProviderForExtension(n)]}};let{wasmPath:o,attemptedPaths:s}=T(r.wasm_file);if(!D.existsSync(o))return{taskId:e.taskId,success:!0,data:{imports:Y(e.code),exports:[],functions:[],classes:[],calls:[],decisions:[a.wasmNotFound(e.language,s.join(", "))]}};let i=await K(o),d=xe(e.code,r,i,e.language);return{taskId:e.taskId,success:!0,data:d}}N?.on("message",async e=>{try{let t=await Fe(e);N?.postMessage(t)}catch(t){N?.postMessage({taskId:e.taskId,success:!1,error:t.stack||String(t)})}});export{Fe as buildParseResponse,ne as collectFunctionNodes,Ne as collectWorkerSpawns,J as getCalleeEvidence,he as reportQueryCompileFailures,V as resolveCallableName,T as resolveWasmPath};
|
|
3
3
|
//# sourceMappingURL=ast-worker.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{Q as e,S as o,Wa as t,ja as n}from"./chunk-
|
|
2
|
+
import{Q as e,S as o,Wa as t,ja as n}from"./chunk-PU3PIUSW.js";var _=".github",u=".claude",d="hooks.json",O="settings.json",E=".cursor/mcp.json",h="claude_desktop_config.json",x="docuvia-local",A="copilot-instructions.md",N="CLAUDE.md",R=".cursorrules",r="docuvia:start",g="docuvia:end",S=".windsurfrules",I="llms.txt",L="AGENTS.md",C=".hermes.md",m=".continue/rules",f="docuvia.md",T="Cursor",U="Claude",M="GitHub Copilot",D="Codex",y="Continue",F="Hermes Agent",b="cursor",v="claude",P="copilot",G="codex",w="continue",H="hermes",K="${CLAUDE_PLUGIN_ROOT}/hooks",k="${CURSOR_PLUGIN_ROOT}/hooks",J="${CLAUDE_PROJECT_DIR}/"+t,q="npx",V="-y",$="--no-install",j=["docuvia","mcp"],X="DOCUVIA_WORKSPACE_ROOT",B=`#!/usr/bin/env node
|
|
3
3
|
/**
|
|
4
4
|
* Docuvia Agent Hook
|
|
5
5
|
* Intercepts AI searches and augments with high-density AST context from local SQLite.
|
|
@@ -79,4 +79,4 @@ Run: \`npx --no-install docuvia analyze <file> --agent-authored --stage\`
|
|
|
79
79
|
Pipe a JSON payload on stdin (default) \u2014 \`{"decisions":[{"title":string,"content":string,"nodeType":"change"|"rule"|"decision"|"context","confidence":number}]}\` \u2014 or pass \`--decisions-file=<path>\` instead. Put \`--agent-authored\`/\`--stage\` after the positional \`<file>\`, not before \u2014 a flag preceding the path silently swallows it as the flag's own value. Staged decisions flush into the knowledge graph automatically the next time you commit a change touching that file \u2014 nothing else to run.
|
|
80
80
|
<!-- docuvia:end -->
|
|
81
81
|
`;export{_ as a,u as b,d as c,O as d,E as e,h as f,x as g,A as h,N as i,R as j,r as k,g as l,S as m,I as n,L as o,C as p,m as q,f as r,T as s,U as t,M as u,D as v,y as w,F as x,b as y,v as z,P as A,G as B,w as C,H as D,K as E,k as F,J as G,q as H,V as I,$ as J,j as K,X as L,B as M,s as N,W as O,z as P};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-6LPHX5FW.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
import{Aa as Q,Ba as V,Ca as j,Da as W,Ea as q,pa as F,ta as u,ua as v,va as k,wa as Y,xa as G,ya as B,za as H}from"./chunk-ER4DQKJQ.js";var J="anonymous";var gt="AstWorkerCrashError",$t={ARGUMENTS:"arguments",VARIABLE_DECLARATOR:"variable_declarator",ASSIGNMENT_EXPRESSION:"assignment_expression",PAIR:"pair",PUBLIC_FIELD_DEFINITION:"public_field_definition",IMPL_ITEM:"impl_item",TYPE_IDENTIFIER:"type_identifier",POINTER_TYPE:"pointer_type",QUALIFIED_IDENTIFIER:"qualified_identifier"},xt={PARSE_FAILURE_NO_DETAIL:"parse returned success=false with no error detail",PARSE_FAILURE_RESULT:"AST parse returned failure result",PARSE_THREW:"AST parse threw (worker crash or rejection)",WORKER_UNCAUGHT_EXCEPTION:"AST worker uncaughtException",QUERY_COMPILE_FAILED:"AST language query failed to compile; using fallback",WORKER_UNHANDLED_REJECTION:"AST worker unhandledRejection",WORKER_EXITED_DURING_SHUTDOWN:"AST worker exited during pool shutdown (expected)",WORKER_CRASHED_EXITED:"AST worker crashed/exited",WORKER_EXITED_UNEXPECTEDLY:"Worker exited unexpectedly",POOL_TERMINATED:"AST worker pool terminated before task completion",UNKNOWN_FILE:"(unknown file)",PARSE_CACHE_HIT:"AST parse cache hit",CACHE_METRICS_AND_QUEUE_PERFORMANCE:"AST cache metrics and queue performance",TASK_TIMED_OUT_TERMINATING:"AST worker task timed out \u2014 terminating stuck worker",WORKER_TERMINATE_FAILED:"AST worker terminate() rejected \u2014 forced termination did not complete",QUERIED_VIA_LANGUAGE_PROVIDER:"Queried nodes using @workspace/ast-core LanguageProvider",ANONYMOUS_NAME:J,workerCrashWhileParsing:n=>`AST worker crashed while parsing ${n}: `,taskTimedOutAfterMs:(n,e)=>`AST worker task ${n} timed out after ${e}ms`,workerExitedWithCode:n=>`Worker exited with code ${n}`,noLanguageProviderForExtension:n=>`No language provider registered for extension ${n}`,wasmNotFound:(n,e)=>`WASM not found for ${n}, AST parsing skipped (Regex fallback used). Tried paths: ${e}`,parsedViaTreeSitter:n=>`Parsed via web-tree-sitter (nodes: ${n})`,providerQueryFailed:n=>`ast-core provider query failed: ${n}`};var p={FILE:"file",CLASS:"class",FUNCTION:"function",CALL:"call",METHOD_CALL:"method_call",IMPORT:"import",API_CONTRACT:"api_contract"};var N={IDENTIFIER:"identifier",SCOPED_IDENTIFIER:"scoped_identifier",QUALIFIED_IDENTIFIER:"qualified_identifier",DOTTED_NAME:"dotted_name",ALIASED_IMPORT:"aliased_import",USE_AS_CLAUSE:"use_as_clause",USE_WILDCARD:"use_wildcard",SCOPED_USE_LIST:"scoped_use_list",USE_LIST:"use_list",DOT:"dot",BLANK_IDENTIFIER:"blank_identifier",NAMESPACE_USE_DECLARATION:"namespace_use_declaration",INCLUDE_EXPRESSION:"include_expression",INCLUDE_ONCE_EXPRESSION:"include_once_expression",REQUIRE_EXPRESSION:"require_expression",REQUIRE_ONCE_EXPRESSION:"require_once_expression",IMPORT_STATEMENT:"import_statement",IMPORT_FROM_STATEMENT:"import_from_statement",USE_DECLARATION:"use_declaration",IMPORT_DECLARATION:"import_declaration",PREPROC_INCLUDE:"preproc_include",USING_DECLARATION:"using_declaration",CALL:"call",USING_DIRECTIVE:"using_directive",CALL_EXPRESSION:"call_expression",METHOD_INVOCATION:"method_invocation",EXPLICIT_CONSTRUCTOR_INVOCATION:"explicit_constructor_invocation",COMMAND_CALL:"command_call",FUNCTION_CALL_EXPRESSION:"function_call_expression",MEMBER_CALL_EXPRESSION:"member_call_expression",SCOPED_CALL_EXPRESSION:"scoped_call_expression",INVOCATION_EXPRESSION:"invocation_expression",OBJECT_CREATION_EXPRESSION:"object_creation_expression",MEMBER_EXPRESSION:"member_expression",ATTRIBUTE:"attribute",MEMBER_ACCESS_EXPRESSION:"member_access_expression",VARIABLE_DECLARATION:"variable_declaration",LEXICAL_DECLARATION:"lexical_declaration",VARIABLE_DECLARATOR:"variable_declarator",ARROW_FUNCTION:"arrow_function",FUNCTION_DECLARATION:"function_declaration",METHOD_DEFINITION:"method_definition",CLASS_DECLARATION:"class_declaration",INTERFACE_DECLARATION:"interface_declaration",TYPE_ALIAS_DECLARATION:"type_alias_declaration",EXPORT_STATEMENT:"export_statement"};var d="*",ue=["require","require_relative","load"],K="this",me="new";function Xt(n){let e=[];for(let r of n){let o=r.type,i=_e[o];if(i){i(r,e);continue}if(ye(o)){Xe(r,o,e);continue}ke(r,e)}return e}var _e={[N.IMPORT_STATEMENT]:Ae,[N.EXPORT_STATEMENT]:pe,[N.IMPORT_FROM_STATEMENT]:Ce,[N.USE_DECLARATION]:Fe,[N.IMPORT_DECLARATION]:$e,[N.PREPROC_INCLUDE]:xe,[N.USING_DECLARATION]:Ue,[N.CALL]:Me,[N.USING_DIRECTIVE]:ve};function Ae(n,e){let r=n.descendantsOfType("string").pop();if(!r)return;let o=r.text.replace(/['"]/g,""),i=n.descendantsOfType("namespace_import")[0];if(i){let l=i.descendantsOfType("identifier")[0];l&&e.push({localName:l.text,originalName:d,modulePath:o});return}let s=n.descendantsOfType("named_imports")[0];if(s){let l=s.descendantsOfType("import_specifier");for(let I of l){if(!I)continue;let E=I.childForFieldName("name"),T=I.childForFieldName("alias");if(E){let S=E.text,C=T?T.text:S;e.push({localName:C,originalName:S,modulePath:o})}}return}let a=n.descendantsOfType("identifier")[0];a&&e.push({localName:a.text,originalName:d,modulePath:o})}function pe(n,e){let r=n.childForFieldName("source");if(!r)return;let o=r.text.replace(/['"]/g,""),i=n.descendantsOfType("export_clause")[0];if(i)for(let s of i.descendantsOfType("export_specifier")){if(!s)continue;let a=s.childForFieldName("name");if(!a)continue;let l=s.childForFieldName("alias");e.push({localName:l?l.text:a.text,originalName:a.text,modulePath:o,viaReexport:!0})}}function Ce(n,e){let r=n.childForFieldName("module_name");if(!r)return;let o=r.text;if(n.descendantsOfType("wildcard_import")[0])return;n.childForFieldName("name")&&Ye(n,o,e)}function Oe(n,e){let r=n.childForFieldName("path"),o=n.childForFieldName("alias");r&&o&&e.push({localName:o.text,originalName:d,modulePath:r.text})}function Se(n,e,r){let o=n.childForFieldName("path"),i=n.childForFieldName("alias");o&&i&&r.push({localName:i.text,originalName:d,modulePath:`${e}::${o.text}`})}function Re(n,e,r){let o=n.descendantsOfType("identifier").pop();o&&r.push({localName:o.text,originalName:d,modulePath:`${e}::${n.text}`})}function Le(n,e,r){if(n.type===N.USE_AS_CLAUSE){Se(n,e,r);return}if(n.type===N.IDENTIFIER){r.push({localName:n.text,originalName:d,modulePath:`${e}::${n.text}`});return}n.type===N.SCOPED_IDENTIFIER&&Re(n,e,r)}function he(n,e){let r=n.childForFieldName("path"),o=n.childForFieldName("list");if(!r||!o)return;let i=r.text;for(let s of o.namedChildren)s&&Le(s,i,e)}function De(n,e){let r=n.descendantsOfType("identifier"),o=r[r.length-1];o&&e.push({localName:o.text,originalName:d,modulePath:n.text})}function Pe(n,e){for(let r of n.namedChildren)r&&r.type===N.IDENTIFIER&&e.push({localName:r.text,originalName:d,modulePath:r.text})}function Fe(n,e){let r=n.childForFieldName("argument");if(r){if(r.type===N.USE_AS_CLAUSE){Oe(r,e);return}if(r.type!==N.USE_WILDCARD){if(r.type===N.SCOPED_USE_LIST){he(r,e);return}if(r.type===N.SCOPED_IDENTIFIER||r.type===N.IDENTIFIER){De(r,e);return}r.type===N.USE_LIST&&Pe(r,e)}}}function ge(n,e){let r=n.childForFieldName("path");if(!r)return;let o=r.text.replace(/['"]/g,""),i=n.childForFieldName("name");if(i){if(i.type===N.DOT||i.type===N.BLANK_IDENTIFIER)return;e.push({localName:i.text,originalName:d,modulePath:o})}else{let s=o.split("/"),a=s[s.length-1];e.push({localName:a,originalName:d,modulePath:o})}}function $e(n,e){let r=n.descendantsOfType("import_spec_list")[0];if(!r)return;let o=r.descendantsOfType("import_spec");for(let i of o)i&&ge(i,e)}function xe(n,e){let r=n.childForFieldName("path");if(r){let o=r.text.replace(/[<>"']/g,"");e.push({localName:o,originalName:d,modulePath:o})}}function Ue(n,e){let r=n.namedChildren;for(let o of r)if(o)if(o.type===N.QUALIFIED_IDENTIFIER){let i=o.descendantsOfType("identifier"),s=i[i.length-1];s&&e.push({localName:s.text,originalName:d,modulePath:o.text})}else o.type===N.IDENTIFIER&&e.push({localName:o.text,originalName:d,modulePath:o.text})}function Me(n,e){let r=n.childForFieldName("method");if(!r)return;let o=r.text;if(!ue.includes(o))return;let i=n.childForFieldName("arguments");if(!i)return;let s=i.descendantsOfType("string_content")[0]||i.descendantsOfType("string")[0];if(!s)return;let a=s.text.replace(/['"]/g,""),l=a.replace(/\.rb$/,"");e.push({localName:l,originalName:d,modulePath:a})}function ye(n){return n===N.NAMESPACE_USE_DECLARATION||n===N.INCLUDE_EXPRESSION||n===N.INCLUDE_ONCE_EXPRESSION||n===N.REQUIRE_EXPRESSION||n===N.REQUIRE_ONCE_EXPRESSION}function we(n,e){let r=n.descendantsOfType("qualified_name")[0]||n.descendantsOfType("name")[0];if(r){let o=r.text,i=o.split("\\"),s=i[i.length-1];e.push({localName:s,originalName:d,modulePath:o})}}function be(n,e){let r=n.descendantsOfType("string")[0]||n.descendantsOfType("string_content")[0];if(r){let o=r.text.replace(/['"]/g,"");e.push({localName:o,originalName:d,modulePath:o})}}function Xe(n,e,r){e===N.NAMESPACE_USE_DECLARATION?we(n,r):be(n,r)}function ve(n,e){let r=n.descendantsOfType("qualified_name")[0]||n.descendantsOfType("identifier")[0];if(r){let o=r.text,i=o.split("."),s=i[i.length-1];e.push({localName:s,originalName:d,modulePath:o})}}function ke(n,e){let r=n.descendantsOfType("string").pop();if(!r)return;let o=r.text.replace(/['"]/g,""),i=n.descendantsOfType("identifier");for(let s of i)s&&(e.some(a=>a.localName===s.text)||e.push({localName:s.text,originalName:s.text,modulePath:o}))}function Ye(n,e,r){if(n.childForFieldName("name")){for(let i of n.namedChildren)if(i)if(i.type===N.ALIASED_IMPORT){let s=i.childForFieldName("name"),a=i.childForFieldName("alias");s&&a&&r.push({localName:a.text,originalName:s.text,modulePath:e})}else if(i.type===N.DOTTED_NAME){let s=i.descendantsOfType("identifier"),a=s[s.length-1];a&&r.push({localName:a.text,originalName:i.text,modulePath:e})}else i.type===N.IDENTIFIER&&r.push({localName:i.text,originalName:i.text,modulePath:e})}}function Ge(n){let e=n.childForFieldName("function");if(!e)return{isMethodCall:!1,methodName:""};if(e.type===N.MEMBER_EXPRESSION){let r=e.childForFieldName("property"),o=e.childForFieldName("object");if(r)return{isMethodCall:!0,methodName:r.text,objectName:o?.text}}return{isMethodCall:!1,methodName:e.text}}function Be(n){let e=n.childForFieldName("function");if(!e)return{isMethodCall:!1,methodName:""};if(e.type===N.ATTRIBUTE){let r=e.childForFieldName("attribute"),o=e.childForFieldName("object");if(r)return{isMethodCall:!0,methodName:r.text,objectName:o?.text}}return{isMethodCall:!1,methodName:e.text}}function He(n){let e=n.childForFieldName("name"),r=n.childForFieldName("object");if(e)return{isMethodCall:!0,methodName:e.text,objectName:r?.text}}function Qe(n){return{isMethodCall:!0,methodName:n.childForFieldName("constructor")?.text||K,objectName:K}}function Ve(n){let e=n.childForFieldName("method");if(!e)return;let r=n.childForFieldName("receiver");return r?{isMethodCall:!0,methodName:e.text,objectName:r.text}:{isMethodCall:!1,methodName:e.text}}function M(n){let e=n.type,o=n.childForFieldName("name")?.text||"";if(e===N.MEMBER_CALL_EXPRESSION){let i=n.childForFieldName("object");return{isMethodCall:!0,methodName:o,objectName:i?.text}}if(e===N.SCOPED_CALL_EXPRESSION){let i=n.childForFieldName("scope");return{isMethodCall:!0,methodName:o,objectName:i?.text}}return{isMethodCall:!1,methodName:o}}function je(n){let e=n.childForFieldName("function")||n.namedChildren[0];if(e&&e.type===N.MEMBER_ACCESS_EXPRESSION){let r=e.childForFieldName("name"),o=e.childForFieldName("expression");if(r)return{isMethodCall:!0,methodName:r.text,objectName:o?.text}}if(e)return{isMethodCall:!1,methodName:e.text}}function We(n){let e=n.childForFieldName("type");return{isMethodCall:!0,methodName:me,objectName:e?.text}}var vt={[N.CALL_EXPRESSION]:Ge,[N.CALL]:Be,[N.METHOD_INVOCATION]:He,[N.EXPLICIT_CONSTRUCTOR_INVOCATION]:Qe,[N.COMMAND_CALL]:Ve,[N.FUNCTION_CALL_EXPRESSION]:M,[N.MEMBER_CALL_EXPRESSION]:M,[N.SCOPED_CALL_EXPRESSION]:M,[N.INVOCATION_EXPRESSION]:je,[N.OBJECT_CREATION_EXPRESSION]:We};var qe=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,L=class n extends Date{#t=!1;#n=!1;#e=null;constructor(e){let r=!0,o=!0,i="Z";if(typeof e=="string"){let s=e.match(qe);s?(s[1]||(r=!1,e=`0000-01-01T${e}`),o=!!s[2],o&&e[10]===" "&&(e=e.replace(" ","T")),s[2]&&+s[2]>23?e="":(i=s[3]||null,e=e.toUpperCase(),!i&&o&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=r,this.#n=o,this.#e=i)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let r=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return r=this.#e[0]==="-"?r:-r,new Date(this.getTime()-r*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,r="Z"){let o=new n(e);return o.#e=r,o}static wrapAsLocalDateTime(e){let r=new n(e);return r.#e=null,r}static wrapAsLocalDate(e){let r=new n(e);return r.#n=!1,r.#e=null,r}static wrapAsLocalTime(e){let r=new n(e);return r.#t=!1,r.#e=null,r}};function Je(n,e){let r=n.slice(0,e).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}function Ke(n,e,r){let o=n.split(/\r\n|\n|\r/g),i="",s=(Math.log10(e+1)|0)+1;for(let a=e-1;a<=e+1;a++){let l=o[a-1];l&&(i+=a.toString().padEnd(s," "),i+=": ",i+=l,i+=`
|
|
2
|
+
import{Aa as Q,Ba as V,Ca as j,Da as W,Ea as q,pa as F,ta as u,ua as v,va as k,wa as Y,xa as G,ya as B,za as H}from"./chunk-PU3PIUSW.js";var J="anonymous";var gt="AstWorkerCrashError",$t={ARGUMENTS:"arguments",VARIABLE_DECLARATOR:"variable_declarator",ASSIGNMENT_EXPRESSION:"assignment_expression",PAIR:"pair",PUBLIC_FIELD_DEFINITION:"public_field_definition",IMPL_ITEM:"impl_item",TYPE_IDENTIFIER:"type_identifier",POINTER_TYPE:"pointer_type",QUALIFIED_IDENTIFIER:"qualified_identifier"},xt={PARSE_FAILURE_NO_DETAIL:"parse returned success=false with no error detail",PARSE_FAILURE_RESULT:"AST parse returned failure result",PARSE_THREW:"AST parse threw (worker crash or rejection)",WORKER_UNCAUGHT_EXCEPTION:"AST worker uncaughtException",QUERY_COMPILE_FAILED:"AST language query failed to compile; using fallback",WORKER_UNHANDLED_REJECTION:"AST worker unhandledRejection",WORKER_EXITED_DURING_SHUTDOWN:"AST worker exited during pool shutdown (expected)",WORKER_CRASHED_EXITED:"AST worker crashed/exited",WORKER_EXITED_UNEXPECTEDLY:"Worker exited unexpectedly",POOL_TERMINATED:"AST worker pool terminated before task completion",UNKNOWN_FILE:"(unknown file)",PARSE_CACHE_HIT:"AST parse cache hit",CACHE_METRICS_AND_QUEUE_PERFORMANCE:"AST cache metrics and queue performance",TASK_TIMED_OUT_TERMINATING:"AST worker task timed out \u2014 terminating stuck worker",WORKER_TERMINATE_FAILED:"AST worker terminate() rejected \u2014 forced termination did not complete",QUERIED_VIA_LANGUAGE_PROVIDER:"Queried nodes using @workspace/ast-core LanguageProvider",ANONYMOUS_NAME:J,workerCrashWhileParsing:n=>`AST worker crashed while parsing ${n}: `,taskTimedOutAfterMs:(n,e)=>`AST worker task ${n} timed out after ${e}ms`,workerExitedWithCode:n=>`Worker exited with code ${n}`,noLanguageProviderForExtension:n=>`No language provider registered for extension ${n}`,wasmNotFound:(n,e)=>`WASM not found for ${n}, AST parsing skipped (Regex fallback used). Tried paths: ${e}`,parsedViaTreeSitter:n=>`Parsed via web-tree-sitter (nodes: ${n})`,providerQueryFailed:n=>`ast-core provider query failed: ${n}`};var p={FILE:"file",CLASS:"class",FUNCTION:"function",CALL:"call",METHOD_CALL:"method_call",IMPORT:"import",API_CONTRACT:"api_contract"};var N={IDENTIFIER:"identifier",SCOPED_IDENTIFIER:"scoped_identifier",QUALIFIED_IDENTIFIER:"qualified_identifier",DOTTED_NAME:"dotted_name",ALIASED_IMPORT:"aliased_import",USE_AS_CLAUSE:"use_as_clause",USE_WILDCARD:"use_wildcard",SCOPED_USE_LIST:"scoped_use_list",USE_LIST:"use_list",DOT:"dot",BLANK_IDENTIFIER:"blank_identifier",NAMESPACE_USE_DECLARATION:"namespace_use_declaration",INCLUDE_EXPRESSION:"include_expression",INCLUDE_ONCE_EXPRESSION:"include_once_expression",REQUIRE_EXPRESSION:"require_expression",REQUIRE_ONCE_EXPRESSION:"require_once_expression",IMPORT_STATEMENT:"import_statement",IMPORT_FROM_STATEMENT:"import_from_statement",USE_DECLARATION:"use_declaration",IMPORT_DECLARATION:"import_declaration",PREPROC_INCLUDE:"preproc_include",USING_DECLARATION:"using_declaration",CALL:"call",USING_DIRECTIVE:"using_directive",CALL_EXPRESSION:"call_expression",METHOD_INVOCATION:"method_invocation",EXPLICIT_CONSTRUCTOR_INVOCATION:"explicit_constructor_invocation",COMMAND_CALL:"command_call",FUNCTION_CALL_EXPRESSION:"function_call_expression",MEMBER_CALL_EXPRESSION:"member_call_expression",SCOPED_CALL_EXPRESSION:"scoped_call_expression",INVOCATION_EXPRESSION:"invocation_expression",OBJECT_CREATION_EXPRESSION:"object_creation_expression",MEMBER_EXPRESSION:"member_expression",ATTRIBUTE:"attribute",MEMBER_ACCESS_EXPRESSION:"member_access_expression",VARIABLE_DECLARATION:"variable_declaration",LEXICAL_DECLARATION:"lexical_declaration",VARIABLE_DECLARATOR:"variable_declarator",ARROW_FUNCTION:"arrow_function",FUNCTION_DECLARATION:"function_declaration",METHOD_DEFINITION:"method_definition",CLASS_DECLARATION:"class_declaration",INTERFACE_DECLARATION:"interface_declaration",TYPE_ALIAS_DECLARATION:"type_alias_declaration",EXPORT_STATEMENT:"export_statement"};var d="*",ue=["require","require_relative","load"],K="this",me="new";function Xt(n){let e=[];for(let r of n){let o=r.type,i=_e[o];if(i){i(r,e);continue}if(ye(o)){Xe(r,o,e);continue}ke(r,e)}return e}var _e={[N.IMPORT_STATEMENT]:Ae,[N.EXPORT_STATEMENT]:pe,[N.IMPORT_FROM_STATEMENT]:Ce,[N.USE_DECLARATION]:Fe,[N.IMPORT_DECLARATION]:$e,[N.PREPROC_INCLUDE]:xe,[N.USING_DECLARATION]:Ue,[N.CALL]:Me,[N.USING_DIRECTIVE]:ve};function Ae(n,e){let r=n.descendantsOfType("string").pop();if(!r)return;let o=r.text.replace(/['"]/g,""),i=n.descendantsOfType("namespace_import")[0];if(i){let l=i.descendantsOfType("identifier")[0];l&&e.push({localName:l.text,originalName:d,modulePath:o});return}let s=n.descendantsOfType("named_imports")[0];if(s){let l=s.descendantsOfType("import_specifier");for(let I of l){if(!I)continue;let E=I.childForFieldName("name"),T=I.childForFieldName("alias");if(E){let S=E.text,C=T?T.text:S;e.push({localName:C,originalName:S,modulePath:o})}}return}let a=n.descendantsOfType("identifier")[0];a&&e.push({localName:a.text,originalName:d,modulePath:o})}function pe(n,e){let r=n.childForFieldName("source");if(!r)return;let o=r.text.replace(/['"]/g,""),i=n.descendantsOfType("export_clause")[0];if(i)for(let s of i.descendantsOfType("export_specifier")){if(!s)continue;let a=s.childForFieldName("name");if(!a)continue;let l=s.childForFieldName("alias");e.push({localName:l?l.text:a.text,originalName:a.text,modulePath:o,viaReexport:!0})}}function Ce(n,e){let r=n.childForFieldName("module_name");if(!r)return;let o=r.text;if(n.descendantsOfType("wildcard_import")[0])return;n.childForFieldName("name")&&Ye(n,o,e)}function Oe(n,e){let r=n.childForFieldName("path"),o=n.childForFieldName("alias");r&&o&&e.push({localName:o.text,originalName:d,modulePath:r.text})}function Se(n,e,r){let o=n.childForFieldName("path"),i=n.childForFieldName("alias");o&&i&&r.push({localName:i.text,originalName:d,modulePath:`${e}::${o.text}`})}function Re(n,e,r){let o=n.descendantsOfType("identifier").pop();o&&r.push({localName:o.text,originalName:d,modulePath:`${e}::${n.text}`})}function Le(n,e,r){if(n.type===N.USE_AS_CLAUSE){Se(n,e,r);return}if(n.type===N.IDENTIFIER){r.push({localName:n.text,originalName:d,modulePath:`${e}::${n.text}`});return}n.type===N.SCOPED_IDENTIFIER&&Re(n,e,r)}function he(n,e){let r=n.childForFieldName("path"),o=n.childForFieldName("list");if(!r||!o)return;let i=r.text;for(let s of o.namedChildren)s&&Le(s,i,e)}function De(n,e){let r=n.descendantsOfType("identifier"),o=r[r.length-1];o&&e.push({localName:o.text,originalName:d,modulePath:n.text})}function Pe(n,e){for(let r of n.namedChildren)r&&r.type===N.IDENTIFIER&&e.push({localName:r.text,originalName:d,modulePath:r.text})}function Fe(n,e){let r=n.childForFieldName("argument");if(r){if(r.type===N.USE_AS_CLAUSE){Oe(r,e);return}if(r.type!==N.USE_WILDCARD){if(r.type===N.SCOPED_USE_LIST){he(r,e);return}if(r.type===N.SCOPED_IDENTIFIER||r.type===N.IDENTIFIER){De(r,e);return}r.type===N.USE_LIST&&Pe(r,e)}}}function ge(n,e){let r=n.childForFieldName("path");if(!r)return;let o=r.text.replace(/['"]/g,""),i=n.childForFieldName("name");if(i){if(i.type===N.DOT||i.type===N.BLANK_IDENTIFIER)return;e.push({localName:i.text,originalName:d,modulePath:o})}else{let s=o.split("/"),a=s[s.length-1];e.push({localName:a,originalName:d,modulePath:o})}}function $e(n,e){let r=n.descendantsOfType("import_spec_list")[0];if(!r)return;let o=r.descendantsOfType("import_spec");for(let i of o)i&&ge(i,e)}function xe(n,e){let r=n.childForFieldName("path");if(r){let o=r.text.replace(/[<>"']/g,"");e.push({localName:o,originalName:d,modulePath:o})}}function Ue(n,e){let r=n.namedChildren;for(let o of r)if(o)if(o.type===N.QUALIFIED_IDENTIFIER){let i=o.descendantsOfType("identifier"),s=i[i.length-1];s&&e.push({localName:s.text,originalName:d,modulePath:o.text})}else o.type===N.IDENTIFIER&&e.push({localName:o.text,originalName:d,modulePath:o.text})}function Me(n,e){let r=n.childForFieldName("method");if(!r)return;let o=r.text;if(!ue.includes(o))return;let i=n.childForFieldName("arguments");if(!i)return;let s=i.descendantsOfType("string_content")[0]||i.descendantsOfType("string")[0];if(!s)return;let a=s.text.replace(/['"]/g,""),l=a.replace(/\.rb$/,"");e.push({localName:l,originalName:d,modulePath:a})}function ye(n){return n===N.NAMESPACE_USE_DECLARATION||n===N.INCLUDE_EXPRESSION||n===N.INCLUDE_ONCE_EXPRESSION||n===N.REQUIRE_EXPRESSION||n===N.REQUIRE_ONCE_EXPRESSION}function we(n,e){let r=n.descendantsOfType("qualified_name")[0]||n.descendantsOfType("name")[0];if(r){let o=r.text,i=o.split("\\"),s=i[i.length-1];e.push({localName:s,originalName:d,modulePath:o})}}function be(n,e){let r=n.descendantsOfType("string")[0]||n.descendantsOfType("string_content")[0];if(r){let o=r.text.replace(/['"]/g,"");e.push({localName:o,originalName:d,modulePath:o})}}function Xe(n,e,r){e===N.NAMESPACE_USE_DECLARATION?we(n,r):be(n,r)}function ve(n,e){let r=n.descendantsOfType("qualified_name")[0]||n.descendantsOfType("identifier")[0];if(r){let o=r.text,i=o.split("."),s=i[i.length-1];e.push({localName:s,originalName:d,modulePath:o})}}function ke(n,e){let r=n.descendantsOfType("string").pop();if(!r)return;let o=r.text.replace(/['"]/g,""),i=n.descendantsOfType("identifier");for(let s of i)s&&(e.some(a=>a.localName===s.text)||e.push({localName:s.text,originalName:s.text,modulePath:o}))}function Ye(n,e,r){if(n.childForFieldName("name")){for(let i of n.namedChildren)if(i)if(i.type===N.ALIASED_IMPORT){let s=i.childForFieldName("name"),a=i.childForFieldName("alias");s&&a&&r.push({localName:a.text,originalName:s.text,modulePath:e})}else if(i.type===N.DOTTED_NAME){let s=i.descendantsOfType("identifier"),a=s[s.length-1];a&&r.push({localName:a.text,originalName:i.text,modulePath:e})}else i.type===N.IDENTIFIER&&r.push({localName:i.text,originalName:i.text,modulePath:e})}}function Ge(n){let e=n.childForFieldName("function");if(!e)return{isMethodCall:!1,methodName:""};if(e.type===N.MEMBER_EXPRESSION){let r=e.childForFieldName("property"),o=e.childForFieldName("object");if(r)return{isMethodCall:!0,methodName:r.text,objectName:o?.text}}return{isMethodCall:!1,methodName:e.text}}function Be(n){let e=n.childForFieldName("function");if(!e)return{isMethodCall:!1,methodName:""};if(e.type===N.ATTRIBUTE){let r=e.childForFieldName("attribute"),o=e.childForFieldName("object");if(r)return{isMethodCall:!0,methodName:r.text,objectName:o?.text}}return{isMethodCall:!1,methodName:e.text}}function He(n){let e=n.childForFieldName("name"),r=n.childForFieldName("object");if(e)return{isMethodCall:!0,methodName:e.text,objectName:r?.text}}function Qe(n){return{isMethodCall:!0,methodName:n.childForFieldName("constructor")?.text||K,objectName:K}}function Ve(n){let e=n.childForFieldName("method");if(!e)return;let r=n.childForFieldName("receiver");return r?{isMethodCall:!0,methodName:e.text,objectName:r.text}:{isMethodCall:!1,methodName:e.text}}function M(n){let e=n.type,o=n.childForFieldName("name")?.text||"";if(e===N.MEMBER_CALL_EXPRESSION){let i=n.childForFieldName("object");return{isMethodCall:!0,methodName:o,objectName:i?.text}}if(e===N.SCOPED_CALL_EXPRESSION){let i=n.childForFieldName("scope");return{isMethodCall:!0,methodName:o,objectName:i?.text}}return{isMethodCall:!1,methodName:o}}function je(n){let e=n.childForFieldName("function")||n.namedChildren[0];if(e&&e.type===N.MEMBER_ACCESS_EXPRESSION){let r=e.childForFieldName("name"),o=e.childForFieldName("expression");if(r)return{isMethodCall:!0,methodName:r.text,objectName:o?.text}}if(e)return{isMethodCall:!1,methodName:e.text}}function We(n){let e=n.childForFieldName("type");return{isMethodCall:!0,methodName:me,objectName:e?.text}}var vt={[N.CALL_EXPRESSION]:Ge,[N.CALL]:Be,[N.METHOD_INVOCATION]:He,[N.EXPLICIT_CONSTRUCTOR_INVOCATION]:Qe,[N.COMMAND_CALL]:Ve,[N.FUNCTION_CALL_EXPRESSION]:M,[N.MEMBER_CALL_EXPRESSION]:M,[N.SCOPED_CALL_EXPRESSION]:M,[N.INVOCATION_EXPRESSION]:je,[N.OBJECT_CREATION_EXPRESSION]:We};var qe=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,L=class n extends Date{#t=!1;#n=!1;#e=null;constructor(e){let r=!0,o=!0,i="Z";if(typeof e=="string"){let s=e.match(qe);s?(s[1]||(r=!1,e=`0000-01-01T${e}`),o=!!s[2],o&&e[10]===" "&&(e=e.replace(" ","T")),s[2]&&+s[2]>23?e="":(i=s[3]||null,e=e.toUpperCase(),!i&&o&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=r,this.#n=o,this.#e=i)}isDateTime(){return this.#t&&this.#n}isLocal(){return!this.#t||!this.#n||!this.#e}isDate(){return this.#t&&!this.#n}isTime(){return this.#n&&!this.#t}isValid(){return this.#t||this.#n}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z")return e;let r=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return r=this.#e[0]==="-"?r:-r,new Date(this.getTime()-r*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,r="Z"){let o=new n(e);return o.#e=r,o}static wrapAsLocalDateTime(e){let r=new n(e);return r.#e=null,r}static wrapAsLocalDate(e){let r=new n(e);return r.#n=!1,r.#e=null,r}static wrapAsLocalTime(e){let r=new n(e);return r.#t=!1,r.#e=null,r}};function Je(n,e){let r=n.slice(0,e).split(/\r\n|\n|\r/g);return[r.length,r.pop().length+1]}function Ke(n,e,r){let o=n.split(/\r\n|\n|\r/g),i="",s=(Math.log10(e+1)|0)+1;for(let a=e-1;a<=e+1;a++){let l=o[a-1];l&&(i+=a.toString().padEnd(s," "),i+=": ",i+=l,i+=`
|
|
3
3
|
`,a===e&&(i+=" ".repeat(s+r+2),i+=`^
|
|
4
4
|
`))}return i}var f=class extends Error{line;column;codeblock;constructor(e,r){let[o,i]=Je(r.toml,r.ptr),s=Ke(r.toml,o,i);super(`Invalid TOML document: ${e}
|
|
5
5
|
|
|
@@ -59,4 +59,4 @@ smol-toml/dist/index.js:
|
|
|
59
59
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
60
60
|
*)
|
|
61
61
|
*/
|
|
62
|
-
//# sourceMappingURL=chunk-
|
|
62
|
+
//# sourceMappingURL=chunk-CHC3PPGJ.js.map
|
|
@@ -96,4 +96,4 @@ fi
|
|
|
96
96
|
exit 0
|
|
97
97
|
`,META_KEY_TIER_C_QUEUE:"tierCQueue",META_KEY_TIER_C_BUDGET:"tierCBudget",DEFAULT_TIER_C_DAILY_CALL_CAP:50,DEFAULT_TIER_C_DAILY_TOKEN_CAP:1e5,DEFAULT_TIER_C_WALL_CLOCK_MS:12e3,DEFAULT_TIER_C_ITEM_CAP:20,DEFAULT_TIER_C_LOAD_THRESHOLD:.8,DEFAULT_TIER_C_MAX_ITEM_FAILURES:3};import y from"path";var x=[".ts",".tsx",".mts",".cts"],b=[".js",".jsx",".mjs",".cjs"],M=[".py"],k=[".rs"],F=[".go"],w=[".java"],G=[".c",".h"],H=[".cpp",".cxx",".cc",".hpp",".hxx",".hh",".cu",".cuh"],U=[".rb",".rake",".gemspec"],K=[".php",".phtml",".php3",".php4",".php5",".phps"],B=[".cs"],C=new Set(["Rakefile","Gemfile","Guardfile","Vagrantfile","Brewfile"]),N=(()=>{let t=new Map,e=[[s.TYPESCRIPT,x],[s.JAVASCRIPT,b],[s.PYTHON,M],[s.RUST,k],[s.GO,F],[s.JAVA,w],[s.C,G],[s.CPP,H],[s.RUBY,U],[s.PHP,K],[s.CSHARP,B]];for(let[o,r]of e)for(let i of r)t.set(i,o);return t})();function ut(t){let e=N.get(y.extname(t).toLowerCase());return e||(C.has(y.basename(t))?s.RUBY:void 0)}function j(t){return N.has(y.extname(t).toLowerCase())?!0:C.has(y.basename(t))}function mt(){return Array.from(N.keys()).map(t=>t.replace(/^\./,""))}function Et(t){return j(t)&&!t.includes(`${I}/`)&&!t.includes(`${f}/`)}var _t={TIMED_OUT_WAITING:t=>`Timed out waiting for the lock at ${t} \u2014 another process may be stuck`},h=class extends Error{constructor(e){super(_t.TIMED_OUT_WAITING(e)),this.name="ProcessLockTimeoutError"}};var V=`${A.SOURCE_COMMIT_TRAILER_KEY}: `;function yt(t){for(let e of t.split(`
|
|
98
98
|
`)){let o=e.trim();if(o.startsWith(V))return o.slice(V.length).trim()}}function St(t,e,o,r){if(!o&&!r)return;let g=(e?t.files.getTierBFileStatus(e):void 0)?.lastProcessedAt??null,Y=r&&g===null,u=t.files.getTierBCoverage(),W=o&&u.processedFiles<u.totalFiles;if(!(!Y&&!W))return{ownFileLastProcessedAt:g,workspaceFilesProcessed:u.processedFiles,workspaceFilesTotal:u.totalFiles}}function Tt(t){let e={total:0,resolved:0,selfDiscarded:0,unresolved:0,unresolvable:0,external:0,unknownReceiver:0};for(let o of Object.values(t))e.total+=o.total,e.resolved+=o.resolved,e.selfDiscarded+=o.selfDiscarded,e.unresolvable=(e.unresolvable??0)+(o.unresolvable??0),e.external=(e.external??0)+(o.external??0),e.unknownReceiver=(e.unknownReceiver??0)+(o.unknownReceiver??0),e.unresolved+=o.unresolved;return e}function ft(t){return t.total-t.selfDiscarded-(t.unresolvable??0)-(t.external??0)-(t.unknownReceiver??0)}var It={PASS:"pass",FAIL:"fail"};export{a,d as b,Ne as c,T as d,L as e,l as f,c as g,Oe as h,ve as i,v as j,Pe as k,xe as l,be as m,Me as n,ke as o,Fe as p,we as q,Ge as r,He as s,Ue as t,Ke as u,Be as v,je as w,Ve as x,Ye as y,We as z,Xe as A,qe as B,Qe as C,ze as D,Je as E,Ze as F,$e as G,et as H,tt as I,ot as J,nt as K,rt as L,it as M,st as N,at as O,ct as P,m as Q,q as R,f as S,Q as T,z as U,J as V,Z as W,$ as X,ee as Y,te as Z,oe as _,ne as $,re as aa,ie as ba,se as ca,ae as da,I as ea,ce as fa,le as ga,pe as ha,de as ia,ge as ja,ue as ka,lt as la,pt as ma,dt as na,gt as oa,me as pa,Ee as qa,P as ra,A as sa,s as ta,x as ua,b as va,M as wa,k as xa,F as ya,w as za,G as Aa,H as Ba,U as Ca,K as Da,B as Ea,C as Fa,ut as Ga,j as Ha,mt as Ia,Et as Ja,_e as Ka,ye as La,Se as Ma,Te as Na,fe as Oa,Ie as Pa,h as Qa,yt as Ra,St as Sa,Tt as Ta,ft as Ua,It as Va,Le as Wa,Re as Xa,Ae as Ya,Ce as Za};
|
|
99
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-PU3PIUSW.js.map
|