Lines 1-10javascript
3var c5=Object.defineProperty;var l5=(Z)=>Z;function d5(Z,$){this[Z]=l5.bind(null,$)}var fZ=(Z,$)=>{for(var Q in $)c5(Z,Q,{get:$[Q],enumerable:!0,configurable:!0,set:d5.bind($,Q)})};var G4=(Z,$)=>()=>(Z&&($=Z(Z=0)),$);var U4={};fZ(U4,{provisionDb:()=>J6});import{createClient as n5}from"@libsql/client";import{drizzle as r5}from"drizzle-orm/libsql";import{migrate as o5}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as i5}from"drizzle-orm/migrator";import{dirname as gZ,join as s5}from"path";import{fileURLToPath as a5}from"url";async function DZ(Z,$){return(await Z.execute({sql:"SELECT ...
4`)){let U=W.trim().match(/^(\w+)\s+(\w+(?:\[\])?\??)\s*(.*)$/);if(!U||/^@@/.test(W.trim()))continue;let[,N,L,q]=U,H=/^(String|Int|BigInt|Float|Decimal|Boolean|DateTime|Json|Bytes)(\[\])?\??$/.test(L),G=q.match(/@relation\([^)]*fields:\s*\[(\w+)\][^)]*references:\s*\[(\w+)\]/);if(G)Q.push({fromTable:K,fromColumn:G[1],toTable:L.replace(/[?[\]]/g,""),toColumn:G[2]});if(!H)continue;j.push({name:N,type:w7(L),isPk:/@id\b/.test(q)||void 0,isFk:/@relation\b/.test(q)||void 0,nullable:L.endsWith("?")})}if(j.length)$.push({name:K,columns:j})}}return{tables:$,relations:Q}}function y7(Z,$){if(/mode:\s*["'] ...
5`)){let V=J.trim();if(!V||V.startsWith("//")||V.startsWith("*")||V.startsWith("/*"))continue;let{annots:Y,rest:X}=m7(V);if(Q.push(...Y),!
6\x1B[1m${Z}\x1B[0m`;function b8(){if(!MZ)return g(ZZ(FZ(process.cwd())));if(/^[0-9a-f]{12}$/.test(MZ)){let Z=g(MZ);if(Z)return Z}return g(ZZ(FZ(g5(MZ))))}var s=b8();if(!s)console.error(`[beacon] ${MZ??process.cwd()} is not a registered Beacon workspace \u2014 nothing to remove.`),process.exit(1);console.log(b5(h5?"Beacon \xB7 remove workspace":"Beacon \xB7 remove workspace (dry run)"));console.log(` name: ${s.name}${r()===s.id?" (currently active)":""}`);console.log(` repo: ${s.path} ${m5("(untouched \u2014 only Beacon's data is erased)")}`);console.log(` data: ${n(s.id)} ${m5("(delet ...
7`),process.exit(0);async function p8(Z){try{let{pid:$,port:Q}=JSON.parse(m8(g5(t(),"server.json"),"utf8"));if(!$||!Q)return!1;return process.kill($,0),(await fetch(`http://localhost:${Q}/api/workspace`,{method:"DELETE",headers:{"content-type":"application/json"},body:JSON.stringify({id:Z}),signal:AbortSignal.timeout(1e4)})).ok}catch{return!1}}if(await p8(s.id))console.log(` ${f5(`removed ${s.name} (via the running daemon)`)}
8`);else{let Z=await x5(s.id);if(!Z.ok)console.error(`[beacon] remove failed: ${Z.error??"unknown error"}`),process.exit(1);console.log(` ${f5(`removed ${s.name}`)}
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/bin/remove.jsView on unpkg · L2 HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/bin/remove.jsView on unpkg · L2 9`)}if(h8(n(s.id)))console.error(`[beacon] warning: ${n(s.id)} still exists \u2014 remove it manually.`),process.exit(1);
Long lines were clipped for display.