Lines 1-10javascript
3var p5=Object.defineProperty;var c5=(Z)=>Z;function l5(Z,$){this[Z]=c5.bind(null,$)}var xZ=(Z,$)=>{for(var Q in $)p5(Z,Q,{get:$[Q],enumerable:!0,configurable:!0,set:l5.bind($,Q)})};var G4=(Z,$)=>()=>(Z&&($=Z(Z=0)),$);var U4={};xZ(U4,{provisionDb:()=>Q6});import{createClient as d5}from"@libsql/client";import{drizzle as n5}from"drizzle-orm/libsql";import{migrate as r5}from"drizzle-orm/libsql/migrator";import{readMigrationFiles as o5}from"drizzle-orm/migrator";import{dirname as fZ,join as i5}from"path";import{fileURLToPath as s5}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(JZ(pZ(process.cwd())));if(/^[0-9a-f]{12}$/.test(MZ)){let Z=g(MZ);if(Z)return Z}return g(JZ(pZ(f5(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(m5(g5?"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} ${h5("(untouched \u2014 only Beacon's data is erased)")}`);console.log(` data: ${n(s.id)} ${h5("(delet ...
7`),process.exit(0);async function p8(Z){try{let{pid:$,port:Q}=JSON.parse(m8(f5(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(` ${x5(`removed ${s.name} (via the running daemon)`)}
8`);else{let Z=await u5(s.id);if(!Z.ok)console.error(`[beacon] remove failed: ${Z.error??"unknown error"}`),process.exit(1);console.log(` ${x5(`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.