Lines 1-45javascript
2"use strict";var zu=Object.create;var Gn=Object.defineProperty;var Hu=Object.getOwnPropertyDescriptor;var Ku=Object.getOwnPropertyNames;var Gu=Object.getPrototypeOf,Vu=Object.prototype.hasOwnProperty;var Ca=n=>{throw TypeError(n)};var Yu=(n,t,o)=>t in n?Gn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[t]=o;var Gr=(n,t)=>()=>(n&&(t=n(n=0)),t);var di=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),xa=(n,t)=>{for(var o in t)Gn(n,o,{get:t[o],enumerable:!0})},Xu=(n,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ku(t))!Vu.call(n,a)&&a!==o&&Gn(n,a,{get:()=>t ...
3Content-Disposition: form-data; name="`;return n.forEach((l,u)=>typeof l=="string"?i.push(a+Vi(u)+`"\r
5${l.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
7`):i.push(a+Vi(u)+`"; filename="${Vi(l.name,1)}"\r
8Content-Type: ${l.type||"application/octet-stream"}\r
11`)),i.push(`--${o}--`),new t(i,{type:"multipart/form-data; boundary="+o})}var an,od,id,yl,sd,bl,Vi,Jt,Ne,_l,Qt,uo=Gr(()=>{"use strict";nn();Gi();({toStringTag:an,iterator:od,hasInstance:id}=Symbol),yl=Math.random,sd="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),bl=(n,t,o)=>(n+="",/^(Blob|File)$/.test(t&&t[an])?[(o=o!==void 0?o+"":t[an]=="File"?t.name:"blob",n),t.name!==o||t[an]=="blob"?new Ar([t],o,t):t]:[n,t+""]),Vi=(n,t)=>(t?n:n.replace(/\r?\n|\r/g,`\r
12`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),Jt=(n,t,o)=>{if(t.length<o)throw new TypeError(`Failed to execute '${n}' on 'FormData': ${o} arguments required, but only ${t.length} present.`)},Qt=(_l=class{constructor(...t){M(this,Ne,[]);if(t.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[an](){return"FormData"}[od](){return this.entries()}static[id](t){return t&&typeof t=="object"&&t[an]==="FormData"&&!sd.some(o=>typeof t[o]!="function")}append(
13--`+t;let o=new Uint8Array(t.length);for(let i=0;i<t.length;i++)o[i]=t.charCodeAt(i),this.boundaryChars[o[i]]=!0;this.boundary=o,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=ne.START_BOUNDARY}write(t){let o=0,i=t.length,a=this.index,{lookbehind:l,boundary:u,boundaryChars:f,index:g,state:d,flags:p}=this,C=this.boundary.length,x=C-1,A=t.length,b,T,O=I=>{this[I+"Mark"]=o},v=I=>{delete this[I+"Mark"]},B=(I,D,W,me)=>{(D===void 0||D!==W)&&this[I](me&&me.subarray(D,W))},G=(I,D)=>{let W=I+"Mark";W in this&&(D?(B(I,this[W],o,t),delete this[W]):(B(I,this[W],t.length,t),this[W]=0))}; ...
15`)+o,a=i+1,i=n.indexOf(`
16`,a)}while(i!==-1);return l+=n.slice(a),l}var{stdout:Na,stderr:Ba}=Da,gi=Symbol("GENERATOR"),gr=Symbol("STYLER"),Vr=Symbol("IS_EMPTY"),ja=["ansi","ansi","ansi256","ansi16m"],yr=Object.create(null),sf=(n,t
17`);return l!==-1&&(t=ka(t,a,i,l)),i+t+a};Object.defineProperties(Yr.prototype,yr);var ff=Yr(),sh=Yr({level:Ba?Ba.level:0});var w=ff;var Tr=X(require("process"),1),rl=require("util");var xi=X(require("process"),1);var Xr=X(require("process"),1);var df=(n,t,o,i)=>{if(o==="length"||o==="prototype"||o==="arguments"||o==="caller")return;let a=Object.getOwnPropertyDescriptor(n,o),l=Object.getOwnPropertyDescriptor(t,o);!hf(a,l)&&i||Object.defineProperty(n,o,l)},hf=function(n,t){return n===void 0||n.configurable||n.writable===t.writable&&n.enumerable===t.enumerable&&n.configurable===t.configurable&&(n ...
18${t}`,gf=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),yf=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),bf=(n,t,o)=>{let i=o===""?"":`with ${o.trim()}() `
19`),d=u-1;i=[...g.slice(0,d),"... (content truncated to fit terminal)"].join(`
20`)}V(this,$,Vt).call(this,()=>m(this,re).write(i))===!1&&m(this,re).isTTY&&(L(this,Xe,()=>{L(this,Xe,void 0),V(this,$,Ui).call(this)}),m(this,re).once("drain",m(this,Xe))),L(this,Ct,V(this,$,ao).call(this,i,a))}finally{o&&V(this,$,Vt).call(this,()=>m(this,re).write(Zf))}return this}start(t){if(t&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let o=this.text?"-":"",i=" ".repeat(m(this,N).indent)+V(this,$,Mi).call(this,o,this.text,m(this,N).prefixText,m(this,N).suffixText);return i.trim()!==""&&V(this,$,Vt).call(this,()=>m(this,re).write(i+`
21`)),this}return this.isSpinning?this:(m(this,N).hideCursor&&vi.hide(m(this,re)),m(this,N).discardStdin&&Tr.default.stdin.isTTY&&(Fi.start(),L(this,vr,!0)),V(this,$,al).call(this),this.render(),L(this,Yt,setInterval(this.render.bind(this),this.interval)),this)}stop(){return clearInterval(m(this,Yt)),L(this,Yt,void 0),L(this,Ye,-1),L(this,Cr,0),V(this,$,Wi).call(this),V(this,$,ll).call(this),m(this,Xe)&&(m(this,re).removeListener("drain",m(this,Xe)),L(this,Xe,void 0)),this.isEnabled&&(this.clear(),m(this,N).hideCursor&&vi.show(m(this,re))),m(this,vr)&&(L(this,vr,!1),Fi.stop()),this}succeed(t){re ...
22`;return this.stop(),V(this,$,Vt).call(this,()=>m(this,re).write(u)),this}};Ct=new WeakMap,Ye=new WeakMap,Cr=new WeakMap,N=new WeakMap,ze=new WeakMap,re=new WeakMap,Yt=new WeakMap,xt=new WeakMap,xr=new WeakMap,Xe=new WeakMap,Ce=new WeakMap,vr=new WeakMap,$
23`||o==="\r"},il=function(){m(this,Ce)||(L(this,Ce,setTimeout(()=>{L(this,Ce,void 0),this.isSpinning&&V(this,$,Ui).call(this)},Jf)),typeof m(this,Ce)?.unref=="function"&&m(this,Ce).unref())},Wi=function(){m(this,Ce)&&(clearTimeout(m(this,Ce)),L(this,Ce,void 0))},Mi=function(t,o,i,a){let l=V(this,$,zi).call(this,i," "),f=typeof o=="string"?(t?" ":"")+o:"",g=V(this,$,Hi).call(this,a," ");return l+t+f+g},qi=function(t,o,i=!1){let a=typeof t=="function"?t():t;return typeof a=="string"&&a!==""?i?o+a:a+o:""},zi=function(t=m(this,N).prefixText,o=" "){return V(this,$,qi).call(this,t,o,!1)},Hi=function( ...
24`))i+=Math.max(1,Math.ceil(Ni(a)/o));return i},sl=function(t){if(!t||m(this,xt).has(t)||!t.isTTY||typeof t.write!="function")return;so.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");
26`),i=!1,a=!1,l;n.on("response",u=>{let{headers:f}=u;i=f["transfer-encoding"]==="chunked"&&!f["content-length"]}),n.on("socket",u=>{let f=()=>{if(i&&!a){let d=new Error("Premature close");d.code="ERR_STREAM_PREMATURE_CLOSE",t(d)}},g=d=>{a=dn.Buffer.compare(d.slice(-5),o)===0,!a&&l&&(a=dn.Buffer.compare(l.slice(-3),o.slice(0,3))===0&&dn.Buffer.compare(d.slice(-2),o.slice(3))===0),l=d};u.prependListener("close",f),u.on("data",g),n.on("close",()=>{u.removeListener("close",f),u.removeListener("data",g)})})}var Ke=require("child_process"),ss=X(require("semver"),1),Vl=X(require("crypto"),1),Yl=X(requ ...
HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/cli.cjsView on unpkg · L10 27\u{1F6A8} NexusHub Security Alert: Data Integrity Violation in file:
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/cli.cjsView on unpkg · L17 30 This file has been disabled until regenerated via npx nexus pull.
31`),null}}async getPage(t){let o=ft.default.resolve(process.cwd(),this.baseDir,"pages",`${t}.nx`);if(Ze.default.existsSync(o)){let i=this.decompileFile(o);if(!i)return null;let a=i;for(;a&&typeof a==
32`+o),console.log(R(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),n&&console.log(" "+w.bold.white(n)),console.log(R(` SDK CLI v${It} \xB7 Platform by G-Nexus \xB7 Enterprise Edition`)),console.log(R(` \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25 ...
33`))}async function Lr(){let n=process.cwd(),t=E.default.join(n,xo);await S.default.pathExists(t)||(console.log(`
34`+Q("\u2716 Project not initialized.")),console.log(R(" This project has not been set up with the NexusHub SDK.")),console.log(R(` Run the following command to get started:
35`)),console.log(" "+Pd("npx nexus init")+`
36`),process.exit(1))}async function Id(n){await S.default.ensureDir(E.default.join(process.cwd(),Ot)),await S.default.writeJson(E.default.join(process.cwd(),xo),{nexusVersion:It,initializedAt:new Date().toISOString(),projectId:n.projectId,workspace:n.workspace,features:n.features,checksum:Vl.default.createHash("md5").update(JSON.stringify(n)).digest("hex")},{spaces:2})}async function Jl(){try{return await S.default.readJson(E.default.join(process.cwd(),xo))}catch{return null}}async function Po(n,t,o){let i=E.default.resolve(process.cwd(),vo),a=ae.compile(n,t,o);await S.default.ensureDir(E.defau ...
37`+Q("\u2716 Missing credentials")),console.log(R(` NEXUS_API_KEY and NEXUS_PROJECT_ID must be set in .env or .env.local
38`)),process.exit(1)),t}async function Od(n,t){let o=E.default.join(process.cwd(),cs),i=ae.compile(n,t,n.projectId);await S.default.ensureDir(E.default.dirname(o)),await S.default.writeFile(o,i)}async function Dd(){try{let{apiKey:n}=pn(),t=E.default.join(process.cwd(),cs);if(!await S.default.pathExists(t)||!n)return null;let o=await S.default.readFile(t);return ae.decompile(o,n).data}catch{return null}}async function fe(n,t,{method:o="GET",body:i,timeout:a=3e4,retries:l=3}={}){for(let u=0;u<l;u++){let f=new AbortController,g=setTimeout(()=>f.abort(),a);try{let d=await wo(n,{method:o,headers:{Au ...
39`).some(u=>u.startsWith(t+"="))){let u=`${t}=${o}`;return i=i.trimEnd()+`
41`,await S.default.writeFile(n,i),!0}return!1}async function Ao(n){let t=E.default.join(process.cwd(),he),o={pages:{},collections:{},globals:{}};if(!await S.default.pathExists(t))return o;let i=E.default.join(t,
42${n.fields.filter(i=>!i.isHidden).map(i=>`${t} ${i.name}${i.validation?.required?"":"?"}: ${Eo(i,t+" ")};`).join(`
44${t}}`:"Record<string, unknown>";case"ARRAY":case"LIST":if(n.fields&&n.fields.length>0){let o=n.fields[0];return o.type==="OBJECT"&&o.fields?`Array<{
45${o.fields.filter(a=>!a.isHidden).map(a=>`${t} ${a.name}${a.validation?.required?"":"?"}: ${Eo(a,t+" ")};`).join(`
Long lines were clipped for display.