@e2b/cli 0.2.0 → 0.2.1
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/index.js +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -71,7 +71,7 @@ ${r.message}`:C,U=[F,t,e].filter(Boolean).join(`
|
|
|
71
71
|
`),a+=t+"[["+s+`]]
|
|
72
72
|
`,a+=ZE(s+".",t,o)}),a}function nj(e,t,n,r){var i=e+hu(n),s="";return R9(r).length>0&&(s+=t+"["+i+`]
|
|
73
73
|
`),s+ZE(i+".",t,r)}});var M9=E(t1=>{"use strict";l();t1.parse=C9();t1.stringify=x9()});var i1=E(ms=>{"use strict";l();Object.defineProperty(ms,"__esModule",{value:!0});ms.DEFAULT_COLOR_MAP=void 0;ms.DEFAULT_COLOR_MAP={red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",white_bold:"\x1B[01m",reset:"\x1B[0m"};var r1=class{constructor(t=ms.DEFAULT_COLOR_MAP){this.text="",this.colorMap=t}addCharsWithColor(t,n){let r=this.colorMap[t];this.text+=r!==void 0?`${r}${n}${this.colorMap.reset}`:n}renderConsole(){return this.text}};ms.default=r1});var Wa=E(Xe=>{"use strict";l();Object.defineProperty(Xe,"__esModule",{value:!0});Xe.DEFAULT_HEADER_ALIGNMENT=Xe.DEFAULT_ROW_ALIGNMENT=Xe.DEFAULT_HEADER_FONT_COLOR=Xe.DEFAULT_ROW_FONT_COLOR=Xe.COLORS=Xe.ALIGNMENTS=Xe.DEFAULT_TABLE_STYLE=Xe.DEFAULT_ROW_SEPARATOR=Xe.DEFAULT_COLUMN_LEN=void 0;Xe.DEFAULT_COLUMN_LEN=20;Xe.DEFAULT_ROW_SEPARATOR=!1;Xe.DEFAULT_TABLE_STYLE={headerTop:{left:"\u250C",mid:"\u252C",right:"\u2510",other:"\u2500"},headerBottom:{left:"\u251C",mid:"\u253C",right:"\u2524",other:"\u2500"},tableBottom:{left:"\u2514",mid:"\u2534",right:"\u2518",other:"\u2500"},vertical:"\u2502",rowSeparator:{left:"\u251C",mid:"\u253C",right:"\u2524",other:"\u2500"}};Xe.ALIGNMENTS=["right","left","center"];Xe.COLORS=["red","green","yellow","white","blue","magenta","cyan","white_bold","reset"];Xe.DEFAULT_ROW_FONT_COLOR="white";Xe.DEFAULT_HEADER_FONT_COLOR="white_bold";Xe.DEFAULT_ROW_ALIGNMENT="right";Xe.DEFAULT_HEADER_ALIGNMENT="center"});var s1=E($n=>{"use strict";l();Object.defineProperty($n,"__esModule",{value:!0});$n.rawColumnToInternalColumn=$n.objIfExists=void 0;var uj=Wa(),dj=(e,t)=>t?{[e]:t}:{};$n.objIfExists=dj;var _j=e=>{var t;return Object.assign(Object.assign(Object.assign(Object.assign({name:e.name,title:(t=e.title)!==null&&t!==void 0?t:e.name},(0,$n.objIfExists)("color",e.color)),(0,$n.objIfExists)("maxLen",e.maxLen)),(0,$n.objIfExists)("minLen",e.minLen)),{alignment:e.alignment||uj.DEFAULT_ROW_ALIGNMENT})};$n.rawColumnToInternalColumn=_j});var H9=E(a1=>{"use strict";l();Object.defineProperty(a1,"__esModule",{value:!0});var mj=[{first:768,last:879},{first:1155,last:1158},{first:1160,last:1161},{first:1425,last:1469},{first:1471,last:1471},{first:1473,last:1474},{first:1476,last:1477},{first:1479,last:1479},{first:1536,last:1539},{first:1552,last:1557},{first:1611,last:1630},{first:1648,last:1648},{first:1750,last:1764},{first:1767,last:1768},{first:1770,last:1773},{first:1807,last:1807},{first:1809,last:1809},{first:1840,last:1866},{first:1958,last:1968},{first:2027,last:2035},{first:2305,last:2306},{first:2364,last:2364},{first:2369,last:2376},{first:2381,last:2381},{first:2385,last:2388},{first:2402,last:2403},{first:2433,last:2433},{first:2492,last:2492},{first:2497,last:2500},{first:2509,last:2509},{first:2530,last:2531},{first:2561,last:2562},{first:2620,last:2620},{first:2625,last:2626},{first:2631,last:2632},{first:2635,last:2637},{first:2672,last:2673},{first:2689,last:2690},{first:2748,last:2748},{first:2753,last:2757},{first:2759,last:2760},{first:2765,last:2765},{first:2786,last:2787},{first:2817,last:2817},{first:2876,last:2876},{first:2879,last:2879},{first:2881,last:2883},{first:2893,last:2893},{first:2902,last:2902},{first:2946,last:2946},{first:3008,last:3008},{first:3021,last:3021},{first:3134,last:3136},{first:3142,last:3144},{first:3146,last:3149},{first:3157,last:3158},{first:3260,last:3260},{first:3263,last:3263},{first:3270,last:3270},{first:3276,last:3277},{first:3298,last:3299},{first:3393,last:3395},{first:3405,last:3405},{first:3530,last:3530},{first:3538,last:3540},{first:3542,last:3542},{first:3633,last:3633},{first:3636,last:3642},{first:3655,last:3662},{first:3761,last:3761},{first:3764,last:3769},{first:3771,last:3772},{first:3784,last:3789},{first:3864,last:3865},{first:3893,last:3893},{first:3895,last:3895},{first:3897,last:3897},{first:3953,last:3966},{first:3968,last:3972},{first:3974,last:3975},{first:3984,last:3991},{first:3993,last:4028},{first:4038,last:4038},{first:4141,last:4144},{first:4146,last:4146},{first:4150,last:4151},{first:4153,last:4153},{first:4184,last:4185},{first:4448,last:4607},{first:4959,last:4959},{first:5906,last:5908},{first:5938,last:5940},{first:5970,last:5971},{first:6002,last:6003},{first:6068,last:6069},{first:6071,last:6077},{first:6086,last:6086},{first:6089,last:6099},{first:6109,last:6109},{first:6155,last:6157},{first:6313,last:6313},{first:6432,last:6434},{first:6439,last:6440},{first:6450,last:6450},{first:6457,last:6459},{first:6679,last:6680},{first:6912,last:6915},{first:6964,last:6964},{first:6966,last:6970},{first:6972,last:6972},{first:6978,last:6978},{first:7019,last:7027},{first:7616,last:7626},{first:7678,last:7679},{first:8203,last:8207},{first:8234,last:8238},{first:8288,last:8291},{first:8298,last:8303},{first:8400,last:8431},{first:12330,last:12335},{first:12441,last:12442},{first:43014,last:43014},{first:43019,last:43019},{first:43045,last:43046},{first:64286,last:64286},{first:65024,last:65039},{first:65056,last:65059},{first:65279,last:65279},{first:65529,last:65531},{first:68097,last:68099},{first:68101,last:68102},{first:68108,last:68111},{first:68152,last:68154},{first:68159,last:68159},{first:119143,last:119145},{first:119155,last:119170},{first:119173,last:119179},{first:119210,last:119213},{first:119362,last:119364},{first:917505,last:917505},{first:917536,last:917631},{first:917760,last:917999}];a1.default=mj});var Y9=E(o1=>{"use strict";l();Object.defineProperty(o1,"__esModule",{value:!0});var pj=(e,t,n)=>{let r=0,i,s=n;if(e<t[0].first||e>t[s].last)return 0;for(;s>=r;)if(i=Math.floor((r+s)/2),e>t[i].last)r=i+1;else if(e<t[i].first)s=i-1;else return 1;return 0};o1.default=pj});var l1=E(Ka=>{"use strict";l();var V9=Ka&&Ka.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ka,"__esModule",{value:!0});var q9=V9(H9()),Ej=V9(Y9()),fj=e=>e===0?0:e<32||e>=127&&e<160?-1:Ej.default(e,q9.default,q9.default.length-1)?0:1+ +(e>=4352&&(e<=4447||e===9001||e===9002||e>=11904&&e<=42191&&e!==12351||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141));Ka.default=fj});var $9=E(za=>{"use strict";l();var gj=za&&za.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(za,"__esModule",{value:!0});var hj=gj(l1()),Sj=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n),i=hj.default(r);if(i<0)return-1;t+=i}return t};za.default=Sj});var K9=E(Ar=>{"use strict";l();var W9=Ar&&Ar.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.wcswidth=Ar.wcwidth=void 0;var Tj=W9($9());Ar.wcswidth=Tj.default;var bj=W9(l1());Ar.wcwidth=bj.default});var c1=E(ii=>{"use strict";l();Object.defineProperty(ii,"__esModule",{value:!0});ii.findWidthInConsole=ii.stripAnsi=void 0;var Dj=K9(),Cj=/\x1b\[\d{1,3}(;\d{1,3})*m/g,Rj=e=>e.replace(Cj,"");ii.stripAnsi=Rj;var Aj=(e,t)=>{let n=0;return e=(0,ii.stripAnsi)(e),t&&Object.entries(t).forEach(([r,i])=>{let s=new RegExp(r,"g");n+=(e.match(s)||[]).length*i,e=e.replace(r,"")}),n+=(0,Dj.wcswidth)(e),n};ii.findWidthInConsole=Aj});var d1=E(Or=>{"use strict";l();Object.defineProperty(Or,"__esModule",{value:!0});Or.biggestWordInSentence=Or.limitWidth=Or.textWithPadding=void 0;var u1=c1(),Oj=(e,t,n,r)=>{let i=(0,u1.findWidthInConsole)(e,r),s=Math.floor((n-i)/2),a=n-s-i;if(n<i)return e;switch(t){case"left":return e.concat(" ".repeat(n-i));case"center":return" ".repeat(s).concat(e).concat(" ".repeat(a));case"right":default:return" ".repeat(n-i).concat(e)}};Or.textWithPadding=Oj;var Nj=(e,t,n)=>{let r=[],i=e.split(" "),s=[],a=0;return i.forEach(o=>{let c=(0,u1.findWidthInConsole)(o,n);a+c<=t?(a+=c+1,s.push(o)):(r.push(s.join(" ")),s=[o],a=c+1)}),r.push(s.join(" ")),r};Or.limitWidth=Nj;var yj=(e,t)=>e.split(" ").reduce((n,r)=>Math.max(n,(0,u1.findWidthInConsole)(r,t)),0);Or.biggestWordInSentence=yj});var Qa=E(ve=>{"use strict";l();Object.defineProperty(ve,"__esModule",{value:!0});ve.getWidthLimitedColumnsArray=ve.createHeaderAsRow=ve.renderTableHorizontalBorders=ve.findLenOfColumn=ve.createRow=ve.createColumFromComputedColumn=ve.createColumFromOnlyName=ve.createTableHorizontalBorders=ve.convertRawRowOptionsToStandard=ve.cellText=void 0;var _1=s1(),z9=c1(),m1=d1(),bu=Wa(),ps=(e,t)=>Math.max(e,t),Ij=e=>e==null?"":`${e}`;ve.cellText=Ij;var vj=e=>{if(e)return{color:e.color,separator:e.separator||bu.DEFAULT_ROW_SEPARATOR}};ve.convertRawRowOptionsToStandard=vj;var xj=({left:e,mid:t,right:n,other:r},i)=>{let s=e;return i.forEach(a=>{s+=r.repeat(a+2),s+=t}),s=s.slice(0,-t.length),s+=n,s};ve.createTableHorizontalBorders=xj;var Mj=e=>({name:e,title:e});ve.createColumFromOnlyName=Mj;var Lj=e=>{var t;return Object.assign(Object.assign(Object.assign(Object.assign({name:e.name,title:(t=e.title)!==null&&t!==void 0?t:e.name},(0,_1.objIfExists)("color",e.color)),(0,_1.objIfExists)("maxLen",e.maxLen)),(0,_1.objIfExists)("minLen",e.minLen)),{alignment:e.alignment||bu.DEFAULT_ROW_ALIGNMENT})};ve.createColumFromComputedColumn=Lj;var wj=(e,t,n)=>({color:e,separator:n,text:t});ve.createRow=wj;var Pj=(e,t,n)=>{let r=e.name,i=e.title,s=ps(0,e?.minLen||0);return e.maxLen?(s=ps(s,ps(e.maxLen,(0,m1.biggestWordInSentence)(i,n))),s=t.reduce((a,o)=>ps(a,(0,m1.biggestWordInSentence)((0,ve.cellText)(o.text[r]),n)),s),s):(s=ps(s,(0,z9.findWidthInConsole)(i,n)),t.forEach(a=>{s=ps(s,(0,z9.findWidthInConsole)((0,ve.cellText)(a.text[r]),n))}),s)};ve.findLenOfColumn=Pj;var Fj=(e,t)=>(0,ve.createTableHorizontalBorders)(e,t);ve.renderTableHorizontalBorders=Fj;var kj=(e,t)=>{let n=bu.DEFAULT_HEADER_FONT_COLOR,r=e(n,{},!1);return t.forEach(i=>{r.text[i.name]=i.title}),r};ve.createHeaderAsRow=kj;var Bj=(e,t,n)=>{let r={};return e.forEach(i=>{r[i.name]=(0,m1.limitWidth)((0,ve.cellText)(t.text[i.name]),i.length||bu.DEFAULT_COLUMN_LEN,n)}),r};ve.getWidthLimitedColumnsArray=Bj});var Q9=E(Es=>{"use strict";l();Object.defineProperty(Es,"__esModule",{value:!0});Es.preProcessRows=Es.preProcessColumns=void 0;var Uj=Qa(),Gj=e=>{e.computedColumns.length&&e.computedColumns.forEach(t=>{e.addColumn(t),e.rows.forEach(n=>{n.text[t.name]=t.function(n.text)})})},Hj=e=>{e.enabledColumns.length&&(e.columns=e.columns.filter(t=>e.enabledColumns.includes(t.name)))},Yj=e=>{e.disabledColumns.length&&(e.columns=e.columns.filter(t=>!e.disabledColumns.includes(t.name)))},qj=e=>{e.columns.forEach(t=>{t.length=(0,Uj.findLenOfColumn)(t,e.rows,e.charLength)})},Vj=e=>{Gj(e),Yj(e),Hj(e),qj(e)};Es.preProcessColumns=Vj;var $j=e=>{let t=e.rows.filter(n=>e.filterFunction(n.text)).sort((n,r)=>e.sortFunction(n.text,r.text));e.rows=t};Es.preProcessRows=$j});var p1=E(Vt=>{"use strict";l();var j9=Vt&&Vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.printSimpleTable=Vt.renderSimpleTable=Vt.renderTable=void 0;var Z9=j9(i1()),J9=d1(),nn=Wa(),Nr=Qa(),Wj=j9(E1()),X9=Q9(),Kj=(e,t,n,r,i,s,a,o)=>{let c=new Z9.default(a);return c.addCharsWithColor("",e.vertical),t.forEach(u=>{let m=n<r[u.name].length?(0,Nr.cellText)(r[u.name][n]):"";c.addCharsWithColor(nn.DEFAULT_ROW_FONT_COLOR," "),c.addCharsWithColor(i&&nn.DEFAULT_HEADER_FONT_COLOR||u.color||s.color,(0,J9.textWithPadding)(m,u.alignment||nn.DEFAULT_ROW_ALIGNMENT,u.length||nn.DEFAULT_COLUMN_LEN,o)),c.addCharsWithColor("",` ${e.vertical}`)}),c.renderConsole()},e2=(e,t,n,r,i,s)=>{let a=(0,Nr.getWidthLimitedColumnsArray)(t,n,s),o=Object.values(a).reduce((u,d)=>Math.max(u,d.length),0),c=[];for(let u=0;u<o;u+=1){let d=Kj(e,t,u,a,i,n,r,s);c.push(d)}return c},zj=(e,t)=>{let n=[];return n=n.concat(e2(e.tableStyle,e.columns,t,e.colorMap,void 0,e.charLength)),n},Qj=e=>{let t=[];if(e.title===void 0)return t;let n=()=>{let s=(a,o)=>a+o+2+1;return e.columns.map(a=>a.length||nn.DEFAULT_COLUMN_LEN).reduce(s,1)},r=(0,J9.textWithPadding)(e.title,nn.DEFAULT_HEADER_ALIGNMENT,n()),i=new Z9.default(e.colorMap);return i.addCharsWithColor(nn.DEFAULT_HEADER_FONT_COLOR,r),t.push(i.renderConsole()),t},Xj=e=>{let t=[];t.push((0,Nr.renderTableHorizontalBorders)(e.tableStyle.headerTop,e.columns.map(r=>r.length||nn.DEFAULT_COLUMN_LEN)));let n=(0,Nr.createHeaderAsRow)(Nr.createRow,e.columns);return t=t.concat(e2(e.tableStyle,e.columns,n,e.colorMap,!0)),t.push((0,Nr.renderTableHorizontalBorders)(e.tableStyle.headerBottom,e.columns.map(r=>r.length||nn.DEFAULT_COLUMN_LEN))),t},jj=e=>{let t=[];return t.push((0,Nr.renderTableHorizontalBorders)(e.tableStyle.tableBottom,e.columns.map(n=>n.length||nn.DEFAULT_COLUMN_LEN))),t},Zj=(e,t)=>{let n=[],r=e.rows.length-1;return e.rows.indexOf(t)!==r&&t.separator&&n.push((0,Nr.renderTableHorizontalBorders)(e.tableStyle.rowSeparator,e.columns.map(s=>s.length||nn.DEFAULT_COLUMN_LEN))),n},Jj=e=>{(0,X9.preProcessColumns)(e),(0,X9.preProcessRows)(e);let t=[];return Qj(e).forEach(n=>t.push(n)),Xj(e).forEach(n=>t.push(n)),e.rows.forEach(n=>{zj(e,n).forEach(r=>t.push(r)),Zj(e,n).forEach(r=>t.push(r))}),jj(e).forEach(n=>t.push(n)),t.join(`
|
|
74
|
-
`)};Vt.renderTable=Jj;var eZ=e=>{let t=new Wj.default;return t.addRows(e),(0,Vt.renderTable)(t)};Vt.renderSimpleTable=eZ;var tZ=e=>{console.log((0,Vt.renderSimpleTable)(e))};Vt.printSimpleTable=tZ});var E1=E(g1=>{"use strict";l();Object.defineProperty(g1,"__esModule",{value:!0});var nZ=i1(),Du=Wa(),Cu=Qa(),rZ=s1(),iZ=p1(),sZ=()=>0,aZ=()=>!0,f1=class{initSimple(t){this.columns=t.map(n=>({name:n,title:n,alignment:Du.DEFAULT_ROW_ALIGNMENT}))}initDetailed(t){var n;this.title=t?.title||this.title,this.tableStyle=t?.style||this.tableStyle,this.sortFunction=t?.sort||this.sortFunction,this.filterFunction=t?.filter||this.filterFunction,this.enabledColumns=t?.enabledColumns||this.enabledColumns,this.disabledColumns=t?.disabledColumns||this.disabledColumns,this.computedColumns=t?.computedColumns||this.computedColumns,this.columns=((n=t?.columns)===null||n===void 0?void 0:n.map(rZ.rawColumnToInternalColumn))||this.columns,this.rowSeparator=t?.rowSeparator||this.rowSeparator,this.charLength=t?.charLength||this.charLength,t?.colorMap&&(this.colorMap=Object.assign(Object.assign({},this.colorMap),t.colorMap)),t.rows!==void 0&&this.addRows(t.rows)}constructor(t){this.rows=[],this.columns=[],this.title=void 0,this.tableStyle=Du.DEFAULT_TABLE_STYLE,this.filterFunction=aZ,this.sortFunction=sZ,this.enabledColumns=[],this.disabledColumns=[],this.computedColumns=[],this.rowSeparator=Du.DEFAULT_ROW_SEPARATOR,this.colorMap=nZ.DEFAULT_COLOR_MAP,this.charLength={},t instanceof Array?this.initSimple(t):typeof t=="object"&&this.initDetailed(t)}createColumnFromRow(t){let n=this.columns.map(r=>r.name);Object.keys(t).forEach(r=>{n.includes(r)||this.columns.push((0,Cu.createColumFromOnlyName)(r))})}addColumn(t){typeof t=="string"?this.columns.push((0,Cu.createColumFromOnlyName)(t)):this.columns.push((0,Cu.createColumFromComputedColumn)(t))}addColumns(t){t.forEach(n=>{this.addColumn(n)})}addRow(t,n){this.createColumnFromRow(t),this.rows.push((0,Cu.createRow)(n?.color||Du.DEFAULT_ROW_FONT_COLOR,t,n?.separator!==void 0?n?.separator:this.rowSeparator))}addRows(t,n){t.forEach(r=>{this.addRow(r,n)})}renderTable(){return(0,iZ.renderTable)(this)}};g1.default=f1});var n2=E(Xa=>{"use strict";l();var oZ=Xa&&Xa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xa,"__esModule",{value:!0});var lZ=oZ(E1()),t2=Qa(),h1=class{constructor(t){this.table=new lZ.default(t)}addColumn(t){return this.table.addColumn(t),this}addColumns(t){return this.table.addColumns(t),this}addRow(t,n){return this.table.addRow(t,(0,t2.convertRawRowOptionsToStandard)(n)),this}addRows(t,n){return this.table.addRows(t,(0,t2.convertRawRowOptionsToStandard)(n)),this}printTable(){let t=this.table.renderTable();console.log(t)}render(){return this.table.renderTable()}};Xa.default=h1});var S1=E(Sn=>{"use strict";l();var cZ=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.renderTable=Sn.printTable=Sn.Table=void 0;var uZ=cZ(n2());Sn.Table=uZ.default;var r2=p1();Object.defineProperty(Sn,"printTable",{enumerable:!0,get:function(){return r2.printSimpleTable}});Object.defineProperty(Sn,"renderTable",{enumerable:!0,get:function(){return r2.renderSimpleTable}})});var fZ={};Au(fZ,{pkg:()=>lc});module.exports=FP(fZ);l();var D2=J(require("update-notifier"));var Ou={};Au(Ou,{author:()=>YP,bin:()=>XP,bugs:()=>qP,default:()=>JP,dependencies:()=>jP,description:()=>UP,devDependencies:()=>zP,engines:()=>ZP,files:()=>QP,homepage:()=>GP,license:()=>HP,name:()=>BP,publishConfig:()=>$P,repository:()=>VP,scripts:()=>KP,sideEffects:()=>WP,version:()=>Nu});var BP="@e2b/cli",Nu="0.2.0",UP="CLI for managing e2b sandbox templates",GP="https://e2b.dev",HP="MIT",YP={name:"FoundryLabs, Inc.",email:"hello@e2b.dev",url:"https://e2b.dev"},qP="https://github.com/e2b-dev/e2b/issues",VP={type:"git",url:"https://github.com/e2b-dev/e2b",directory:"packages/cli"},$P={access:"public"},WP=!1,KP={prepublishOnly:"pnpm build",build:"tsc --noEmit --skipLibCheck && tsup --minify",dev:"tsup --watch",test:"pnpm build && cd testground/demo-basic && ../../dist/index.js template build","check-deps":"knip","update-deps":"ncu -u && pnpm i"},zP={"@types/inquirer":"^9.0.7","@types/node":"^18.18.6","@types/tar-fs":"^2.0.3","@types/update-notifier":"6.0.5",knip:"^2.33.4","npm-check-updates":"^16.14.6",tsup:"^7.2.0",typescript:"^5.2.2",vitest:"^0.34.6"},QP=["dist","LICENSE","README","package.json"],XP={e2b:"dist/index.js"},jP={"@balena/dockerignore":"^1.0.2","@e2b/sdk":"^0.11.20","@iarna/toml":"^2.2.5","@nodelib/fs.walk":"^2.0.0","async-listen":"^3.0.1",boxen:"^7.1.1",chalk:"^5.3.0","cli-highlight":"^2.1.11",commander:"^11.1.0","console-table-printer":"^2.11.2",ignore:"^5.2.4",inquirer:"^9.2.12",open:"^9.1.0","strip-ansi":"^7.1.0","tar-fs":"^3.0.4","update-notifier":"5.1.0",yup:"^1.3.2"},ZP={node:">=18"},JP={name:BP,version:Nu,description:UP,homepage:GP,license:HP,author:YP,bugs:qP,repository:VP,publishConfig:$P,sideEffects:WP,scripts:KP,devDependencies:zP,files:QP,bin:XP,dependencies:jP,engines:ZP};l();l();var $1=J(V1(),1),{program:wZ,createCommand:PZ,createArgument:FZ,createOption:kZ,CommanderError:BZ,InvalidArgumentError:UZ,InvalidOptionArgumentError:GZ,Command:tt,Argument:HZ,Option:si,Help:YZ}=$1.default;l();l();l();var W1=(e=0)=>t=>`\x1B[${t+e}m`,K1=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,z1=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,we={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},VZ=Object.keys(we.modifier),g5=Object.keys(we.color),h5=Object.keys(we.bgColor),$Z=[...g5,...h5];function S5(){let e=new Map;for(let[t,n]of Object.entries(we)){for(let[r,i]of Object.entries(n))we[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[r]=we[r],e.set(i[0],i[1]);Object.defineProperty(we,t,{value:n,enumerable:!1})}return Object.defineProperty(we,"codes",{value:e,enumerable:!1}),we.color.close="\x1B[39m",we.bgColor.close="\x1B[49m",we.color.ansi=W1(),we.color.ansi256=K1(),we.color.ansi16m=z1(),we.bgColor.ansi=W1(10),we.bgColor.ansi256=K1(10),we.bgColor.ansi16m=z1(10),Object.defineProperties(we,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(s=>s+s).join(""));let i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>we.rgbToAnsi256(...we.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,i;if(t>=232)n=((t-232)*10+8)/255,r=n,i=n;else{t-=16;let o=t%36;n=Math.floor(t/36)/5,r=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(n,r,i)*2;if(s===0)return 30;let a=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(n));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>we.ansi256ToAnsi(we.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>we.ansi256ToAnsi(we.hexToAnsi256(t)),enumerable:!1}}),we}var T5=S5(),Kt=T5;l();var ro=J(require("process"),1),X1=J(require("os"),1),Hu=J(require("tty"),1);function Pt(e,t=globalThis.Deno?globalThis.Deno.args:ro.default.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}var{env:Ue}=ro.default,no;Pt("no-color")||Pt("no-colors")||Pt("color=false")||Pt("color=never")?no=0:(Pt("color")||Pt("colors")||Pt("color=true")||Pt("color=always"))&&(no=1);function b5(){if("FORCE_COLOR"in Ue)return Ue.FORCE_COLOR==="true"?1:Ue.FORCE_COLOR==="false"?0:Ue.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Ue.FORCE_COLOR,10),3)}function D5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function C5(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=b5();r!==void 0&&(no=r);let i=n?no:r;if(i===0)return 0;if(n){if(Pt("color=16m")||Pt("color=full")||Pt("color=truecolor"))return 3;if(Pt("color=256"))return 2}if("TF_BUILD"in Ue&&"AGENT_NAME"in Ue)return 1;if(e&&!t&&i===void 0)return 0;let s=i||0;if(Ue.TERM==="dumb")return s;if(ro.default.platform==="win32"){let a=X1.default.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in Ue)return"GITHUB_ACTIONS"in Ue||"GITEA_ACTIONS"in Ue?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in Ue)||Ue.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Ue)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ue.TEAMCITY_VERSION)?1:0;if(Ue.COLORTERM==="truecolor"||Ue.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Ue){let a=Number.parseInt((Ue.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ue.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ue.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ue.TERM)||"COLORTERM"in Ue?1:s}function Q1(e,t={}){let n=C5(e,{streamIsTTY:e&&e.isTTY,...t});return D5(n)}var R5={stdout:Q1({isTTY:Hu.default.isatty(1)}),stderr:Q1({isTTY:Hu.default.isatty(2)})},j1=R5;l();function Z1(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,s=0,a="";do a+=e.slice(s,r)+t+n,s=r+i,r=e.indexOf(t,s);while(r!==-1);return a+=e.slice(s),a}function J1(e,t,n,r){let i=0,s="";do{let a=e[r-1]==="\r";s+=e.slice(i,a?r-1:r)+t+(a?`\r
|
|
74
|
+
`)};Vt.renderTable=Jj;var eZ=e=>{let t=new Wj.default;return t.addRows(e),(0,Vt.renderTable)(t)};Vt.renderSimpleTable=eZ;var tZ=e=>{console.log((0,Vt.renderSimpleTable)(e))};Vt.printSimpleTable=tZ});var E1=E(g1=>{"use strict";l();Object.defineProperty(g1,"__esModule",{value:!0});var nZ=i1(),Du=Wa(),Cu=Qa(),rZ=s1(),iZ=p1(),sZ=()=>0,aZ=()=>!0,f1=class{initSimple(t){this.columns=t.map(n=>({name:n,title:n,alignment:Du.DEFAULT_ROW_ALIGNMENT}))}initDetailed(t){var n;this.title=t?.title||this.title,this.tableStyle=t?.style||this.tableStyle,this.sortFunction=t?.sort||this.sortFunction,this.filterFunction=t?.filter||this.filterFunction,this.enabledColumns=t?.enabledColumns||this.enabledColumns,this.disabledColumns=t?.disabledColumns||this.disabledColumns,this.computedColumns=t?.computedColumns||this.computedColumns,this.columns=((n=t?.columns)===null||n===void 0?void 0:n.map(rZ.rawColumnToInternalColumn))||this.columns,this.rowSeparator=t?.rowSeparator||this.rowSeparator,this.charLength=t?.charLength||this.charLength,t?.colorMap&&(this.colorMap=Object.assign(Object.assign({},this.colorMap),t.colorMap)),t.rows!==void 0&&this.addRows(t.rows)}constructor(t){this.rows=[],this.columns=[],this.title=void 0,this.tableStyle=Du.DEFAULT_TABLE_STYLE,this.filterFunction=aZ,this.sortFunction=sZ,this.enabledColumns=[],this.disabledColumns=[],this.computedColumns=[],this.rowSeparator=Du.DEFAULT_ROW_SEPARATOR,this.colorMap=nZ.DEFAULT_COLOR_MAP,this.charLength={},t instanceof Array?this.initSimple(t):typeof t=="object"&&this.initDetailed(t)}createColumnFromRow(t){let n=this.columns.map(r=>r.name);Object.keys(t).forEach(r=>{n.includes(r)||this.columns.push((0,Cu.createColumFromOnlyName)(r))})}addColumn(t){typeof t=="string"?this.columns.push((0,Cu.createColumFromOnlyName)(t)):this.columns.push((0,Cu.createColumFromComputedColumn)(t))}addColumns(t){t.forEach(n=>{this.addColumn(n)})}addRow(t,n){this.createColumnFromRow(t),this.rows.push((0,Cu.createRow)(n?.color||Du.DEFAULT_ROW_FONT_COLOR,t,n?.separator!==void 0?n?.separator:this.rowSeparator))}addRows(t,n){t.forEach(r=>{this.addRow(r,n)})}renderTable(){return(0,iZ.renderTable)(this)}};g1.default=f1});var n2=E(Xa=>{"use strict";l();var oZ=Xa&&Xa.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xa,"__esModule",{value:!0});var lZ=oZ(E1()),t2=Qa(),h1=class{constructor(t){this.table=new lZ.default(t)}addColumn(t){return this.table.addColumn(t),this}addColumns(t){return this.table.addColumns(t),this}addRow(t,n){return this.table.addRow(t,(0,t2.convertRawRowOptionsToStandard)(n)),this}addRows(t,n){return this.table.addRows(t,(0,t2.convertRawRowOptionsToStandard)(n)),this}printTable(){let t=this.table.renderTable();console.log(t)}render(){return this.table.renderTable()}};Xa.default=h1});var S1=E(Sn=>{"use strict";l();var cZ=Sn&&Sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.renderTable=Sn.printTable=Sn.Table=void 0;var uZ=cZ(n2());Sn.Table=uZ.default;var r2=p1();Object.defineProperty(Sn,"printTable",{enumerable:!0,get:function(){return r2.printSimpleTable}});Object.defineProperty(Sn,"renderTable",{enumerable:!0,get:function(){return r2.renderSimpleTable}})});var fZ={};Au(fZ,{pkg:()=>lc});module.exports=FP(fZ);l();var D2=J(require("update-notifier"));var Ou={};Au(Ou,{author:()=>YP,bin:()=>XP,bugs:()=>qP,default:()=>JP,dependencies:()=>jP,description:()=>UP,devDependencies:()=>zP,engines:()=>ZP,files:()=>QP,homepage:()=>GP,license:()=>HP,name:()=>BP,publishConfig:()=>$P,repository:()=>VP,scripts:()=>KP,sideEffects:()=>WP,version:()=>Nu});var BP="@e2b/cli",Nu="0.2.1",UP="CLI for managing e2b sandbox templates",GP="https://e2b.dev",HP="MIT",YP={name:"FoundryLabs, Inc.",email:"hello@e2b.dev",url:"https://e2b.dev"},qP="https://github.com/e2b-dev/e2b/issues",VP={type:"git",url:"https://github.com/e2b-dev/e2b",directory:"packages/cli"},$P={access:"public"},WP=!1,KP={prepublishOnly:"pnpm build",build:"tsc --noEmit --skipLibCheck && tsup --minify",dev:"tsup --watch",test:"pnpm build && cd testground/demo-basic && ../../dist/index.js template build","check-deps":"knip","update-deps":"ncu -u && pnpm i"},zP={"@types/inquirer":"^9.0.7","@types/node":"^18.18.6","@types/tar-fs":"^2.0.3","@types/update-notifier":"6.0.5",knip:"^2.33.4","npm-check-updates":"^16.14.6",tsup:"^7.2.0",typescript:"^5.2.2",vitest:"^0.34.6"},QP=["dist","LICENSE","README","package.json"],XP={e2b:"dist/index.js"},jP={"@balena/dockerignore":"^1.0.2","@iarna/toml":"^2.2.5","@nodelib/fs.walk":"^2.0.0","async-listen":"^3.0.1",boxen:"^7.1.1",chalk:"^5.3.0","cli-highlight":"^2.1.11",commander:"^11.1.0","console-table-printer":"^2.11.2",e2b:"^0.11.20",ignore:"^5.2.4",inquirer:"^9.2.12",open:"^9.1.0","strip-ansi":"^7.1.0","tar-fs":"^3.0.4","update-notifier":"5.1.0",yup:"^1.3.2"},ZP={node:">=18"},JP={name:BP,version:Nu,description:UP,homepage:GP,license:HP,author:YP,bugs:qP,repository:VP,publishConfig:$P,sideEffects:WP,scripts:KP,devDependencies:zP,files:QP,bin:XP,dependencies:jP,engines:ZP};l();l();var $1=J(V1(),1),{program:wZ,createCommand:PZ,createArgument:FZ,createOption:kZ,CommanderError:BZ,InvalidArgumentError:UZ,InvalidOptionArgumentError:GZ,Command:tt,Argument:HZ,Option:si,Help:YZ}=$1.default;l();l();l();var W1=(e=0)=>t=>`\x1B[${t+e}m`,K1=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,z1=(e=0)=>(t,n,r)=>`\x1B[${38+e};2;${t};${n};${r}m`,we={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},VZ=Object.keys(we.modifier),g5=Object.keys(we.color),h5=Object.keys(we.bgColor),$Z=[...g5,...h5];function S5(){let e=new Map;for(let[t,n]of Object.entries(we)){for(let[r,i]of Object.entries(n))we[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},n[r]=we[r],e.set(i[0],i[1]);Object.defineProperty(we,t,{value:n,enumerable:!1})}return Object.defineProperty(we,"codes",{value:e,enumerable:!1}),we.color.close="\x1B[39m",we.bgColor.close="\x1B[49m",we.color.ansi=W1(),we.color.ansi256=K1(),we.color.ansi16m=z1(),we.bgColor.ansi=W1(10),we.bgColor.ansi256=K1(10),we.bgColor.ansi16m=z1(10),Object.defineProperties(we,{rgbToAnsi256:{value(t,n,r){return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[r]=n;r.length===3&&(r=[...r].map(s=>s+s).join(""));let i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>we.rgbToAnsi256(...we.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,i;if(t>=232)n=((t-232)*10+8)/255,r=n,i=n;else{t-=16;let o=t%36;n=Math.floor(t/36)/5,r=Math.floor(o/6)/5,i=o%6/5}let s=Math.max(n,r,i)*2;if(s===0)return 30;let a=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(n));return s===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>we.ansi256ToAnsi(we.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>we.ansi256ToAnsi(we.hexToAnsi256(t)),enumerable:!1}}),we}var T5=S5(),Kt=T5;l();var ro=J(require("process"),1),X1=J(require("os"),1),Hu=J(require("tty"),1);function Pt(e,t=globalThis.Deno?globalThis.Deno.args:ro.default.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}var{env:Ue}=ro.default,no;Pt("no-color")||Pt("no-colors")||Pt("color=false")||Pt("color=never")?no=0:(Pt("color")||Pt("colors")||Pt("color=true")||Pt("color=always"))&&(no=1);function b5(){if("FORCE_COLOR"in Ue)return Ue.FORCE_COLOR==="true"?1:Ue.FORCE_COLOR==="false"?0:Ue.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Ue.FORCE_COLOR,10),3)}function D5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function C5(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let r=b5();r!==void 0&&(no=r);let i=n?no:r;if(i===0)return 0;if(n){if(Pt("color=16m")||Pt("color=full")||Pt("color=truecolor"))return 3;if(Pt("color=256"))return 2}if("TF_BUILD"in Ue&&"AGENT_NAME"in Ue)return 1;if(e&&!t&&i===void 0)return 0;let s=i||0;if(Ue.TERM==="dumb")return s;if(ro.default.platform==="win32"){let a=X1.default.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in Ue)return"GITHUB_ACTIONS"in Ue||"GITEA_ACTIONS"in Ue?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in Ue)||Ue.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Ue)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ue.TEAMCITY_VERSION)?1:0;if(Ue.COLORTERM==="truecolor"||Ue.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Ue){let a=Number.parseInt((Ue.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ue.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ue.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ue.TERM)||"COLORTERM"in Ue?1:s}function Q1(e,t={}){let n=C5(e,{streamIsTTY:e&&e.isTTY,...t});return D5(n)}var R5={stdout:Q1({isTTY:Hu.default.isatty(1)}),stderr:Q1({isTTY:Hu.default.isatty(2)})},j1=R5;l();function Z1(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,s=0,a="";do a+=e.slice(s,r)+t+n,s=r+i,r=e.indexOf(t,s);while(r!==-1);return a+=e.slice(s),a}function J1(e,t,n,r){let i=0,s="";do{let a=e[r-1]==="\r";s+=e.slice(i,a?r-1:r)+t+(a?`\r
|
|
75
75
|
`:`
|
|
76
76
|
`)+n,i=r+1,r=e.indexOf(`
|
|
77
77
|
`,i)}while(r!==-1);return s+=e.slice(i),s}var{stdout:ef,stderr:tf}=j1,Yu=Symbol("GENERATOR"),ai=Symbol("STYLER"),Ss=Symbol("IS_EMPTY"),nf=["ansi","ansi","ansi256","ansi16m"],oi=Object.create(null),A5=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=ef?ef.level:0;e.level=t.level===void 0?n:t.level};var O5=e=>{let t=(...n)=>n.join(" ");return A5(t,e),Object.setPrototypeOf(t,Ts.prototype),t};function Ts(e){return O5(e)}Object.setPrototypeOf(Ts.prototype,Function.prototype);for(let[e,t]of Object.entries(Kt))oi[e]={get(){let n=io(this,Vu(t.open,t.close,this[ai]),this[Ss]);return Object.defineProperty(this,e,{value:n}),n}};oi.visible={get(){let e=io(this,this[ai],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var qu=(e,t,n,...r)=>e==="rgb"?t==="ansi16m"?Kt[n].ansi16m(...r):t==="ansi256"?Kt[n].ansi256(Kt.rgbToAnsi256(...r)):Kt[n].ansi(Kt.rgbToAnsi(...r)):e==="hex"?qu("rgb",t,n,...Kt.hexToRgb(...r)):Kt[n][e](...r),N5=["rgb","hex","ansi256"];for(let e of N5){oi[e]={get(){let{level:n}=this;return function(...r){let i=Vu(qu(e,nf[n],"color",...r),Kt.color.close,this[ai]);return io(this,i,this[Ss])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);oi[t]={get(){let{level:n}=this;return function(...r){let i=Vu(qu(e,nf[n],"bgColor",...r),Kt.bgColor.close,this[ai]);return io(this,i,this[Ss])}}}}var y5=Object.defineProperties(()=>{},{...oi,level:{enumerable:!0,get(){return this[Yu].level},set(e){this[Yu].level=e}}}),Vu=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},io=(e,t,n)=>{let r=(...i)=>I5(r,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(r,y5),r[Yu]=e,r[ai]=t,r[Ss]=n,r},I5=(e,t)=>{if(e.level<=0||!t)return e[Ss]?"":t;let n=e[ai];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=Z1(t,n.close,n.open),n=n.parent;let s=t.indexOf(`
|
|
@@ -134,7 +134,7 @@ sandbox = Sandbox(template="${a?.length?a[0]:s.data.templateID}")
|
|
|
134
134
|
# https://e2b.dev/docs/sandbox/overview
|
|
135
135
|
|
|
136
136
|
# Close sandbox once done
|
|
137
|
-
sandbox.close()`),c=oy(`import { Sandbox } from '
|
|
137
|
+
sandbox.close()`),c=oy(`import { Sandbox } from 'e2b'
|
|
138
138
|
|
|
139
139
|
// Start sandbox
|
|
140
140
|
const sandbox = await Sandbox.create({ template: '${a?.length?a[0]:s.data.templateID}' })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e2b/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "CLI for managing e2b sandbox templates",
|
|
5
5
|
"homepage": "https://e2b.dev",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@balena/dockerignore": "^1.0.2",
|
|
44
|
-
"@e2b/sdk": "^0.11.20",
|
|
45
44
|
"@iarna/toml": "^2.2.5",
|
|
46
45
|
"@nodelib/fs.walk": "^2.0.0",
|
|
47
46
|
"async-listen": "^3.0.1",
|
|
@@ -50,6 +49,7 @@
|
|
|
50
49
|
"cli-highlight": "^2.1.11",
|
|
51
50
|
"commander": "^11.1.0",
|
|
52
51
|
"console-table-printer": "^2.11.2",
|
|
52
|
+
"e2b": "^0.11.20",
|
|
53
53
|
"ignore": "^5.2.4",
|
|
54
54
|
"inquirer": "^9.2.12",
|
|
55
55
|
"open": "^9.1.0",
|