1// @nalvietnam/avatar-cli — built with tsup
L2: var ha=Object.defineProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var Y=(t,e)=>{for(var n in e)ha(t,n,{get:e[n],enumerable:!0})};var xt={};Y(xt,{atomicSwapDir:()=>Dt,copyDirRecursive...
L3: `,n)}async function dn(t,e,n=[]){await S(e);let r=await N.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=mn(t,o.name),a=mn(e,o.name);if(o.isDire...
HighChild Process
Package source references child process execution.
dist/index.jsView on unpkg · L1 22`),plain:t=>process.stdout.write(`${t}
L23: `)}});import{spawnSync as ic}from"child_process";function be(){let t=ic("gh",["api","user","--jq",".login"],{encoding:"utf8",stdio:["ignore","pipe","pipe"],timeout:1e4});if(t.signa...
L24: `),new Kt(Mn(a),`T\u1EA1o repo ${o} th\u1EA5t b\u1EA1i.`)}return i.success(`\u0110\xE3 t\u1EA1o: git@github.com:${o}.git`),`git@github.com:${o}.git`}var Kt,Ln=L(()=>{"use strict";N...
L25: `);let s=Mn(o);throw s==="name-exists"?new Gn(e):s==="no-permission"?new $t("no-permission",`Kh\xF4ng c\xF3 quy\u1EC1n t\u1EA1o repo ${e}. Ki\u1EC3m tra \u0111\u0103ng nh\u1EADp \u...
L26: `),r=Ja("git",["credential","approve"],{input:n,encoding:"utf8",stdio:["pipe","pipe","pipe"]});return r.status===0?{ok:!0}:{ok:!1,error:(r.stderr||"").trim()||(r.error?.message??"g...
L27: Ki\u1EC3m tra: \u0111ang login \u0111\xFAng GitHub account ch\u01B0a? (gh auth status)`);break;case"network":i.dim(" \u2192 L\u1ED7i m\u1EA1ng (m\u1EA5t k\u1EBFt n\u1ED1i / DNS / ...
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/index.jsView on unpkg · L22 1// @nalvietnam/avatar-cli — built with tsup
L2: var ha=Object.defineProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var Y=(t,e)=>{for(var n in e)ha(t,n,{get:e[n],enumerable:!0})};var xt={};Y(xt,{atomicSwapDir:()=>Dt,copyDirRecursive...
L3: `,n)}async function dn(t,e,n=[]){await S(e);let r=await N.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=mn(t,o.name),a=mn(e,o.name);if(o.isDire...
L4: `).filter(c=>c.trim().length>0)):n(new Error(`tar list exit ${a}: ${s.trim()}`))})})}function Sa(t,e){if(t.startsWith("/")||t.startsWith("~"))return!1;let n=mn(e,t),r=jr(e,n);retur...
...
L16: `});var ut={};Y(ut,{REPOS_MANIFEST_RELATIVE:()=>io,addRepoToManifest:()=>he,readReposManifest:()=>fe,removeRepoFromManifest:()=>za,repoNameExists:()=>we});import{join as qa}from"pa...
L17: `),await o.add("."),await o.commit("chore: initial commit (avatar add repo \u2014 d\u1EF1 \xE1n m\u1EDBi)").catch(()=>{}),await o.addRemote("origin",t.url).catch(()=>{}),await o.pu...
L18: `),success:t=>process.stdout.write(`${p.green("\u2713")} ${t}
HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/index.jsView on unpkg · L1 1// @nalvietnam/avatar-cli — built with tsup
L2: var ha=Object.defineProperty;var L=(t,e)=>()=>(t&&(e=t(t=0)),e);var Y=(t,e)=>{for(var n in e)ha(t,n,{get:e[n],enumerable:!0})};var xt={};Y(xt,{atomicSwapDir:()=>Dt,copyDirRecursive...
L3: `,n)}async function dn(t,e,n=[]){await S(e);let r=await N.readdir(t,{withFileTypes:!0});for(let o of r){if(n.includes(o.name))continue;let s=mn(t,o.name),a=mn(e,o.name);if(o.isDire...
L4: `).filter(c=>c.trim().length>0)):n(new Error(`tar list exit ${a}: ${s.trim()}`))})})}function Sa(t,e){if(t.startsWith("/")||t.startsWith("~"))return!1;let n=mn(e,t),r=jr(e,n);retur...
L5: `),r=zr(n,Jr),o=zr(n,Yr);if(r!==-1&&o!==-1&&r<o){let s=n.slice(0,r),a=n.slice(o+1);return{content:[...s,e.trimEnd(),...a].join(`
...
L16: `});var ut={};Y(ut,{REPOS_MANIFEST_RELATIVE:()=>io,addRepoToManifest:()=>he,readReposManifest:()=>fe,removeRepoFromManifest:()=>za,repoNameExists:()=>we});import{join as qa}from"pa...
L17: `),await o.add("."),await o.commit("chore: initial commit (avatar add repo \u2014 d\u1EF1 \xE1n m\u1EDBi)").catch(()=>{}),await o.addRemote("origin",t.url).catch(()=>{}),await o.pu...
L18: `),success:t=>process.stdout.write(`${p.green("\u2713")} ${t}
...
L2
MediumInstall Persistence
Source writes installer persistence such as shell profile or service configuration.
dist/index.jsView on unpkg · L1