@stacksjs/ts-cloud 0.7.110 → 0.7.111
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/aws/index.js +3 -3
- package/dist/bin/cli.js +5 -5
- package/dist/bin/dashboard-server.js +3 -3
- package/dist/{chunk-wmz8x3cy.js → chunk-3ee2jav4.js} +7 -7
- package/dist/{chunk-x6yzgv7y.js → chunk-6a1t7fnq.js} +2 -2
- package/dist/{chunk-9v2pwxv9.js → chunk-kpeb5rcs.js} +2 -2
- package/dist/{chunk-hpv68b4a.js → chunk-nsgqsmrh.js} +1 -1
- package/dist/{chunk-wj3s95p9.js → chunk-rds0sy87.js} +3 -2
- package/dist/{chunk-k114qwg9.js → chunk-ttz2ra5j.js} +2 -2
- package/dist/{chunk-8kh577qh.js → chunk-v0vpamnf.js} +3 -3
- package/dist/{chunk-d3vx2ekv.js → chunk-wh1y5rtk.js} +5 -2
- package/dist/deploy/index.js +6 -6
- package/dist/drivers/index.js +2 -2
- package/dist/index.js +6 -6
- package/dist/ui/access-denied.html +2 -2
- package/dist/ui/account/automation.html +3 -3
- package/dist/ui/account/security.html +2 -2
- package/dist/ui/applications/compose.html +4 -4
- package/dist/ui/applications/new.html +2 -2
- package/dist/ui/data/backups.html +4 -4
- package/dist/ui/data/services.html +4 -4
- package/dist/ui/data/volumes.html +4 -4
- package/dist/ui/index.html +4 -4
- package/dist/ui/infrastructure/topology.html +4 -4
- package/dist/ui/integrations.html +2 -2
- package/dist/ui/operations/alerts.html +4 -4
- package/dist/ui/operations/configuration.html +4 -4
- package/dist/ui/operations/jobs.html +4 -4
- package/dist/ui/operations/maintenance.html +4 -4
- package/dist/ui/operations/observability.html +4 -4
- package/dist/ui/operations/previews.html +4 -4
- package/dist/ui/operations/queue.html +4 -4
- package/dist/ui/operations/regions.html +3 -3
- package/dist/ui/operations/releases.html +4 -4
- package/dist/ui/operations/spend.html +4 -4
- package/dist/ui/operations/workloads.html +4 -4
- package/dist/ui/security.html +2 -2
- package/dist/ui/server/actions.html +4 -4
- package/dist/ui/server/activity.html +2 -2
- package/dist/ui/server/capacity.html +3 -3
- package/dist/ui/server/database.html +4 -4
- package/dist/ui/server/deployments.html +4 -4
- package/dist/ui/server/diagnostics.html +2 -2
- package/dist/ui/server/firewall.html +4 -4
- package/dist/ui/server/fleet.html +4 -4
- package/dist/ui/server/logs.html +3 -3
- package/dist/ui/server/metrics.html +4 -4
- package/dist/ui/server/security.html +2 -2
- package/dist/ui/server/services.html +2 -2
- package/dist/ui/server/sites.html +4 -4
- package/dist/ui/server/ssh-keys.html +4 -4
- package/dist/ui/server/team.html +3 -3
- package/dist/ui/server/terminal.html +2 -2
- package/dist/ui/serverless/alarms.html +4 -4
- package/dist/ui/serverless/assets.html +2 -2
- package/dist/ui/serverless/cost.html +2 -2
- package/dist/ui/serverless/data.html +4 -4
- package/dist/ui/serverless/deployments.html +2 -2
- package/dist/ui/serverless/firewall.html +2 -2
- package/dist/ui/serverless/functions.html +4 -4
- package/dist/ui/serverless/logs.html +4 -4
- package/dist/ui/serverless/metrics.html +2 -2
- package/dist/ui/serverless/queues.html +3 -3
- package/dist/ui/serverless/secrets.html +4 -4
- package/dist/ui/serverless/traces.html +4 -4
- package/dist/ui/serverless.html +4 -4
- package/package.json +3 -3
|
@@ -5714,11 +5714,11 @@ ${JSON.stringify(T)}`).digest("hex")}class Oh{controlPlane;identities;queue;spen
|
|
|
5714
5714
|
host:${R}
|
|
5715
5715
|
`,"content-type;host","UNSIGNED-PAYLOAD"].join(`
|
|
5716
5716
|
`),X=["AWS4-HMAC-SHA256",A,h,OE.createHash("sha256").update(I).digest("hex")].join(`
|
|
5717
|
-
`),J=OE.createHmac("sha256",`AWS4${N}`).update(S).digest(),z=OE.createHmac("sha256",J).update(this.region).digest(),f=OE.createHmac("sha256",z).update("s3").digest(),W=OE.createHmac("sha256",f).update("aws4_request").digest(),Q=OE.createHmac("sha256",W).update(X).digest("hex");return U.append("X-Amz-Signature",Q),`${this.endpointProtocol}://${R}${this.objectPath(E,r)}?${U.toString()}`}async createMultipartUpload(E,_,T){let t={};if(T?.contentType)t["Content-Type"]=T.contentType;if(T?.metadata)for(let[
|
|
5717
|
+
`),J=OE.createHmac("sha256",`AWS4${N}`).update(S).digest(),z=OE.createHmac("sha256",J).update(this.region).digest(),f=OE.createHmac("sha256",z).update("s3").digest(),W=OE.createHmac("sha256",f).update("aws4_request").digest(),Q=OE.createHmac("sha256",W).update(X).digest("hex");return U.append("X-Amz-Signature",Q),`${this.endpointProtocol}://${R}${this.objectPath(E,r)}?${U.toString()}`}async createMultipartUpload(E,_,T){let t={};if(T?.contentType)t["Content-Type"]=T.contentType;if(T?.metadata)for(let[L,A]of Object.entries(T.metadata))t[`x-amz-meta-${L}`]=A;let d=_.split("/").map((L)=>encodeURIComponent(L)).join("/"),N=await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${d}`,bucket:E,queryParams:{uploads:""},headers:t});return{UploadId:(N?.InitiateMultipartUploadResult??N)?.UploadId}}async uploadPart(E,_,T,t,d){let{accessKeyId:N,secretAccessKey:R,sessionToken:L}=this.getCredentials(),A=this.s3VirtualHost(E),S=_.split("/").map((BE)=>encodeURIComponent(BE)).join("/"),h=this.objectPath(E,S),O=`${this.objectUrl(E,S)}?partNumber=${t}&uploadId=${encodeURIComponent(T)}`,r=new Date,U=r.toISOString().replace(/[:-]|\.\d{3}/g,""),I=r.toISOString().slice(0,10).replace(/-/g,""),X=OE.createHash("sha256").update(d).digest("hex"),J={host:A,"x-amz-date":U,"x-amz-content-sha256":X};if(L)J["x-amz-security-token"]=L;let z=Object.keys(J).sort().map((BE)=>`${BE.toLowerCase()}:${J[BE].trim()}
|
|
5718
5718
|
`).join(""),f=Object.keys(J).sort().map((BE)=>BE.toLowerCase()).join(";"),W=["PUT",h,`partNumber=${t}&uploadId=${encodeURIComponent(T)}`,z,f,X].join(`
|
|
5719
5719
|
`),Q="AWS4-HMAC-SHA256",G=`${I}/${this.region}/s3/aws4_request`,V=[Q,U,G,OE.createHash("sha256").update(W).digest("hex")].join(`
|
|
5720
5720
|
`),M=OE.createHmac("sha256",`AWS4${R}`).update(I).digest(),i=OE.createHmac("sha256",M).update(this.region).digest(),K=OE.createHmac("sha256",i).update("s3").digest(),b=OE.createHmac("sha256",K).update("aws4_request").digest(),o=OE.createHmac("sha256",b).update(V).digest("hex"),NE=`${Q} Credential=${N}/${G}, SignedHeaders=${f}, Signature=${o}`,hE=await fetch(O,{method:"PUT",headers:{...J,Authorization:NE},body:We(d)});if(!hE.ok){let BE=await hE.text();throw Error(`Upload part failed: ${hE.status} ${BE}`)}return{ETag:hE.headers.get("etag")||""}}async completeMultipartUpload(E,_,T,t){let d=_.split("/").map((L)=>encodeURIComponent(L)).join("/"),R=`<?xml version="1.0" encoding="UTF-8"?>
|
|
5721
|
-
<CompleteMultipartUpload>${t.sort((L,A)=>L.PartNumber-A.PartNumber).map((L)=>`<Part><PartNumber>${L.PartNumber}</PartNumber><ETag>${L.ETag}</ETag></Part>`).join("")}</CompleteMultipartUpload>`;await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${d}`,bucket:E,queryParams:{uploadId:T},headers:{"Content-Type":"application/xml"},body:R})}async abortMultipartUpload(E,_,T){let t=_.split("/").map((d)=>encodeURIComponent(d)).join("/");await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${t}`,bucket:E,queryParams:{uploadId:T}})}async listMultipartUploads(E){let
|
|
5721
|
+
<CompleteMultipartUpload>${t.sort((L,A)=>L.PartNumber-A.PartNumber).map((L)=>`<Part><PartNumber>${L.PartNumber}</PartNumber><ETag>${L.ETag}</ETag></Part>`).join("")}</CompleteMultipartUpload>`;await this.client.request({service:"s3",region:this.region,method:"POST",path:`/${d}`,bucket:E,queryParams:{uploadId:T},headers:{"Content-Type":"application/xml"},body:R})}async abortMultipartUpload(E,_,T){let t=_.split("/").map((d)=>encodeURIComponent(d)).join("/");await this.client.request({service:"s3",region:this.region,method:"DELETE",path:`/${t}`,bucket:E,queryParams:{uploadId:T}})}async listMultipartUploads(E){let _=await this.client.request({service:"s3",region:this.region,method:"GET",path:"/",bucket:E,queryParams:{uploads:""}}),T=(_?.ListMultipartUploadsResult??_)?.Upload;if(!T)return[];return(Array.isArray(T)?T:[T]).map((d)=>({Key:d.Key,UploadId:d.UploadId,Initiated:d.Initiated}))}async restoreObject(E,_,T,t="Standard"){let d=`<?xml version="1.0" encoding="UTF-8"?>
|
|
5722
5722
|
<RestoreRequest>
|
|
5723
5723
|
<Days>${T}</Days>
|
|
5724
5724
|
<GlacierJobParameters>
|
|
@@ -6170,7 +6170,7 @@ writeFileSync(candidatePath, JSON.stringify(candidate, null, 2) + '\\n', { mode:
|
|
|
6170
6170
|
`.trim();return[`__tsc_fragment_candidate="$(mktemp "${E}.candidate.XXXXXX")"`,`cat > "$__tsc_fragment_candidate" <<'${T}'`,_,T,'chmod 0600 "$__tsc_fragment_candidate"',`if [ -f ${E} ]; then TS_CLOUD_RPX_CURRENT_FRAGMENT=${E} TS_CLOUD_RPX_CANDIDATE_FRAGMENT="$__tsc_fragment_candidate" ${t.bunBin} -e ${S9(d)}; fi`,`mv -f "$__tsc_fragment_candidate" ${E}`,`chmod 0600 ${E}`]}function xB(E){return`rpx-cert-renew-${(E||"app").replace(/[^a-z0-9._-]+/gi,"-")}.service`}function A9(E){let _=new Set;for(let T of E.proxies){let t=T.to;if(!t||t.startsWith("*")||t.includes(":")||!t.includes("."))continue;_.add(t)}return[..._]}function h9(E){let{config:_,proxy:T}=E,t=_.acmeChallengeWebroot,d=A9(_);if(!T.onDemandTls||!t||d.length===0)return[];let N=E.bunBin??"/usr/local/bin/bun",R=T.version??"latest",L=_.productionCerts.certsDir,A=T.onDemandTlsEmail??`webmaster@${d[0]}`,S=`${N} ${RT}/node_modules/@stacksjs/tlsx/dist/bin/cli.js`,h=d.join(","),O=d.join(" "),r=(E.slug||"app").replace(/[^a-z0-9._-]+/gi,"-"),U=`${cS}/renew-certs-${r}.sh`,I=xB(r),X=`rpx-cert-renew-${r}.timer`,J=["#!/bin/sh","# Generated by ts-cloud — issue/renew rpx gateway TLS certs via tlsx http-01.","# The running gateway serves the challenge from $WEBROOT on :80, so this needs","# no downtime and no DNS credentials. Reloads the gateway only if a cert changed.","set -u",`CERTS='${L}'`,`WEBROOT='${t}'`,`EMAIL='${A}'`,`TLSX="${S}"`,`DOMAINS='${h}'`,'before=$(cat "$CERTS"/*.crt 2>/dev/null | sha256sum)',`for d in ${O}; do`,' if [ ! -s "$CERTS/$d.crt" ]; then',' $TLSX acme:issue -d "$d" --method http-01 --webroot "$WEBROOT" --dir "$CERTS" --prod --email "$EMAIL" || echo "issue $d failed (non-fatal)"'," # rpx reloads its SNI set when a PEM appears. Complete that reload"," # before the next hostname starts http-01, or :80 can disappear in"," # the middle of the following challenge on a multi-domain deploy.",` [ -s "$CERTS/$d.crt" ] && systemctl restart ${Id}`," fi","done",'$TLSX acme:renew --domains "$DOMAINS" --method http-01 --webroot "$WEBROOT" --dir "$CERTS" --days 30 --prod --email "$EMAIL" || echo "renew: some domains failed (non-fatal)"','rm -f "$CERTS"/*.chain.crt','after=$(cat "$CERTS"/*.crt 2>/dev/null | sha256sum)',`[ "$before" = "$after" ] || systemctl restart ${Id}`].join(`
|
|
6171
6171
|
`),z=["[Unit]",`Description=Issue/renew rpx gateway TLS certs for ${r} (tlsx http-01)`,`After=network-online.target ${Id}`,"Wants=network-online.target","","[Service]","Type=oneshot",`ExecStart=${U}`].join(`
|
|
6172
6172
|
`),f=["[Unit]",`Description=Daily rpx gateway TLS cert issuance/renewal for ${r}`,"","[Timer]","OnCalendar=*-*-* 03:30:00","RandomizedDelaySec=1h","Persistent=true","","[Install]","WantedBy=timers.target"].join(`
|
|
6173
|
-
`);return[`mkdir -p ${t}`,`(cd ${RT} && ${N} add @stacksjs/tlsx@${R}) || true`,...gR(U,J,"TS_CLOUD_RENEW_EOF"),`chmod +x ${U}`,...gR(`/etc/systemd/system/${I}`,z,"TS_CLOUD_RENEW_SVC_EOF"),...gR(`/etc/systemd/system/${X}`,f,"TS_CLOUD_RENEW_TIMER_EOF"),"systemctl daemon-reload",`systemctl enable --now ${X} || true`,`${U} || true`]}function rN(E){let{config:_,proxy:T}=E,t=E.bunBin??"/usr/local/bin/bun",d=T.version??"latest",N=_.productionCerts.certsDir,R=(E.slug||"app").replace(/[^a-z0-9._-]+/gi,"-"),L=JSON.stringify({slug:R,..._},null,2),A=L9(ON,N),h=[`Environment=RPX_UPSTREAM_TIMEOUT=${T.upstreamTimeout??60}`];if(typeof T.maxUpstreamConns==="number")h.push(`Environment=RPX_MAX_UPSTREAM_CONNS=${T.maxUpstreamConns}`);let O=T.memoryHigh??"512M",r=T.memoryMax??"768M";return["set -euo pipefail",`mkdir -p ${cS} ${ON} ${N} ${RT}`,`rm -rf ${RT}.next ${RT}.prev`,`mkdir -p ${RT}.next`,`(cd ${RT}.next && ${t} add @stacksjs/rpx@${d})`,`mv ${RT} ${RT}.prev`,`mv ${RT}.next ${RT}`,`rm -rf ${RT}.prev`,`ln -sfn ${RT}/node_modules ${cS}/node_modules`,...kB(`${ON}/${R}.json`,L,"TS_CLOUD_RPX_FRAGMENT_EOF",{bunBin:t,preserveManagementDashboardRoutes:E.preserveManagementDashboardRoutes}),...gR(eI,A,"TS_CLOUD_RPX_EOF"),`${t} build --production --compile --outfile ${$S}.next ${eI}`,`chmod 0755 ${$S}.next`,`mv -f ${$S}.next ${$S}`,...gR(`/etc/systemd/system/${Id}`,["[Unit]","Description=rpx reverse-proxy gateway (managed by ts-cloud)","After=network.target network-online.target","Wants=network-online.target","","[Service]","Type=simple",`ExecStart=${$S}`,`WorkingDirectory=${RT}`,"Environment=BUN_INSTALL=/root/.bun","Environment=APP_ENV=production","Environment=NODE_ENV=production",...h,"MemoryAccounting=true",`MemoryHigh=${O}`,`MemoryMax=${r}`,"OOMPolicy=stop","Restart=always","RestartSec=5","LimitNOFILE=1048576","AmbientCapabilities=CAP_NET_BIND_SERVICE","","[Install]","WantedBy=multi-user.target"].join(`
|
|
6173
|
+
`);return[`mkdir -p ${t}`,`(cd ${RT} && ${N} add @stacksjs/tlsx@${R}) || true`,...gR(U,J,"TS_CLOUD_RENEW_EOF"),`chmod +x ${U}`,...gR(`/etc/systemd/system/${I}`,z,"TS_CLOUD_RENEW_SVC_EOF"),...gR(`/etc/systemd/system/${X}`,f,"TS_CLOUD_RENEW_TIMER_EOF"),"systemctl daemon-reload",`systemctl enable --now ${X} || true`,`${U} || true`]}function rN(E){let{config:_,proxy:T}=E,t=E.bunBin??"/usr/local/bin/bun",d=T.version??"latest",N=_.productionCerts.certsDir,R=(E.slug||"app").replace(/[^a-z0-9._-]+/gi,"-"),L=JSON.stringify({slug:R,..._},null,2),A=L9(ON,N),h=[`Environment=RPX_UPSTREAM_TIMEOUT=${T.upstreamTimeout??60}`];if(typeof T.maxUpstreamConns==="number")h.push(`Environment=RPX_MAX_UPSTREAM_CONNS=${T.maxUpstreamConns}`);let O=T.memoryHigh??"512M",r=T.memoryMax??"768M";return["set -euo pipefail",`mkdir -p ${cS} ${ON} ${N} ${RT}`,`rm -rf ${RT}.next ${RT}.prev`,`mkdir -p ${RT}.next`,`(cd ${RT}.next && ${t} add @stacksjs/rpx@${d})`,`mv ${RT} ${RT}.prev`,`mv ${RT}.next ${RT}`,`rm -rf ${RT}.prev`,`ln -sfn ${RT}/node_modules ${cS}/node_modules`,...kB(`${ON}/${R}.json`,L,"TS_CLOUD_RPX_FRAGMENT_EOF",{bunBin:t,preserveManagementDashboardRoutes:E.preserveManagementDashboardRoutes}),...gR(eI,A,"TS_CLOUD_RPX_EOF"),`${t} build --production --compile --outfile ${$S}.next ${eI}`,`chmod 0755 ${$S}.next`,`mv -f ${$S}.next ${$S}`,...gR(`/etc/systemd/system/${Id}`,["[Unit]","Description=rpx reverse-proxy gateway (managed by ts-cloud)","After=network.target network-online.target","Wants=network-online.target","","[Service]","Type=simple",`ExecStart=${$S}`,`WorkingDirectory=${RT}`,"Environment=BUN_INSTALL=/root/.bun","Environment=APP_ENV=production","Environment=NODE_ENV=production",...h,"MemoryAccounting=true",`MemoryHigh=${O}`,`MemoryMax=${r}`,"OOMPolicy=stop","Restart=always","RestartSec=5","StartLimitIntervalSec=120","StartLimitBurst=5",`ExecStartPre=/bin/sh -c 'for p in 80 443; do fuser -k -n tcp "$p" 2>/dev/null || true; done; sleep 1'`,"LimitNOFILE=1048576","AmbientCapabilities=CAP_NET_BIND_SERVICE","","[Install]","WantedBy=multi-user.target"].join(`
|
|
6174
6174
|
`),"TS_CLOUD_RPX_UNIT_EOF"),"systemctl daemon-reload","systemctl disable --now bun-gateway.service 2>/dev/null || true","systemctl disable --now bun-gateway-renew.timer bun-gateway-renew.service 2>/dev/null || true","rm -f /etc/systemd/system/bun-gateway-renew.timer /etc/systemd/system/bun-gateway-renew.service","systemctl disable --now ts-cloud-nginx.service 2>/dev/null || true",`for timer in /etc/systemd/system/rpx-cert-renew-*.timer; do [ -e "$timer" ] || continue; unit="$(basename "$timer")"; tenant="\${unit#rpx-cert-renew-}"; tenant="\${tenant%.timer}"; [ -f "${ON}/$tenant.json" ] && continue; systemctl disable --now "$unit" 2>/dev/null || true; rm -f "$timer" "/etc/systemd/system/rpx-cert-renew-$tenant.service" "${cS}/renew-certs-$tenant.sh"; done`,`systemctl enable ${Id}`,`systemctl restart ${Id}`,...h9(E)]}function yO(E){let _=(E.slug||"app").replace(/[^a-z0-9._-]+/gi,"-"),T=JSON.stringify({slug:_,...E.config},null,2);return["set -euo pipefail",`mkdir -p ${ON}`,...kB(`${ON}/${_}.json`,T,"TS_CLOUD_RPX_FRAGMENT_EOF",{bunBin:"/usr/local/bin/bun",preserveManagementDashboardRoutes:E.preserveManagementDashboardRoutes}),`systemctl restart ${Id}`]}function kR(E=[],_={}){let T=_.path??"/root/.ssh/authorized_keys",d=[`mkdir -p ${T.replace(/\/[^/]*$/,"")}`,`touch ${T}`,`sed -i '/^${qB("# >>> ts-cloud managed keys >>>")}$/,/^${qB("# <<< ts-cloud managed keys <<<")}$/d' ${T}`];if(E.length>0){let N=["# >>> ts-cloud managed keys >>>",...E.map((R)=>`${R.publicKey.trim()} ${R.name}`),"# <<< ts-cloud managed keys <<<"].join(`
|
|
6175
6175
|
`);d.push(`cat >> ${T} <<'TS_CLOUD_KEYS_EOF'`,N,"TS_CLOUD_KEYS_EOF",`chmod 600 ${T}`)}return d}function qB(E){return E.replace(/[.*[\]\\/^$]/g,"\\$&")}vL();WI();function uB(E,_){let T=`/tmp/ts-cloud-${E}.sh`,t=`TS_CLOUD_${E.toUpperCase().replace(/[^A-Z0-9]/g,"_")}_EOF`;return[`cat > ${T} <<'${t}'`,_.replace(/\n$/,""),t,`chmod +x ${T}`,`bash ${T} || echo "ts-cloud: ${E} setup did not complete; continuing" >&2`,`rm -f ${T}`]}function nB(E,_){if(E===!1)return;if(E===!0||E===void 0)return _;return E}var bB={enabled:!0,ports:[80,443]},r9={mode:"detection",paranoiaLevel:1};function U9(E=!0,_=[]){let T=nB(E,bB);if(!T||T.enabled===!1)return[];let t=[...new Set([...T.ports??bB.ports??[],..._])].sort((d,N)=>d-N);return uB("ddos",n0({...T,ports:t}))}function D9(E=!0){let _=nB(E,r9);if(!_||_.mode==="off")return[];return uB("waf",BI(_))}function lB(E={},_=[]){return[...U9(E.ddos,_),...D9(E.waf)]}var I9=[80,443];function zI(E={}){if(E.enabled===!1)return[];let _=[...new Set([...I9,...E.allowedPorts||[]])].filter((t)=>Number.isInteger(t)&&t>=1&&t<=65535).sort((t,d)=>t-d),T=["export DEBIAN_FRONTEND=noninteractive","command -v ufw >/dev/null 2>&1 || apt-get install -y ufw","ufw --force reset","ufw default deny incoming","ufw default allow outgoing","ufw allow OpenSSH"];for(let t of _)T.push(`ufw allow ${t}/tcp`);return T.push("ufw --force enable"),T}function eS(E){let _=E.infrastructure?.compute??{},T=_.runtime==="php"||!!_.php,t=T||!!_.managedServices,d=t?fR():[],N=!CN(_),R=T?[...d,...gO({versions:_.php?.versions,default:_.php?.default,extensions:_.php?.extensions,installNginx:N,optimizeForProduction:_.php?.optimizeForProduction,ini:_.php?.ini}),...N?ZB():[]]:void 0,L=[],A=__(E);if(!T&&t)L.push(...d);if(L.push(...ZR(E.notifications)),_.managedServices)L.push(...VO(_.managedServices),...IS(A,_.managedServices));if(L.push(...zI(_.firewall??(T?{enabled:!0}:{enabled:!1}))),L.push(...lB({ddos:_.ddos,waf:_.waf},_.firewall?.allowedPorts??[])),L.push(...AN(_.autoUpdates??T)),L.push(...hN(_.monitoring??T)),L.push(...kR(_.sshKeys)),_.backups?.enabled)L.push(...ZO({database:A,backups:_.backups}));return{runtime:_.runtime||"bun",runtimeVersion:_.runtimeVersion||"latest",phpBox:T,phpProvision:R,servicesProvision:L.length>0?L:void 0}}function qT(E={}){let{runtime:_="bun",runtimeVersion:T="latest",systemPackages:t=[],database:d,phpProvision:N,servicesProvision:R,caddyfile:L,rpxProvision:A,baked:S=!1,swapGb:h=2}=E,O=new Set(t);if(d==="sqlite")O.add("sqlite3");else if(d==="mysql")O.add("mysql-client");else if(d==="postgres")O.add("postgresql-client");let r=`#!/bin/bash
|
|
6176
6176
|
set -euo pipefail
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deployStaticSiteWithExternalDnsFull
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-v0vpamnf.js";
|
|
4
4
|
import {
|
|
5
5
|
box,
|
|
6
6
|
error,
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
SQSClient,
|
|
23
23
|
STSClient,
|
|
24
24
|
SecretsManagerClient
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-6a1t7fnq.js";
|
|
26
26
|
import {
|
|
27
27
|
IAMClient
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-nsgqsmrh.js";
|
|
29
29
|
import {
|
|
30
30
|
CloudFrontClient
|
|
31
31
|
} from "./chunk-01d86gt1.js";
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
resolveSiteKind,
|
|
51
51
|
resolveUiSource,
|
|
52
52
|
siteInstallBase
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-wh1y5rtk.js";
|
|
54
54
|
import {
|
|
55
55
|
SSMClient
|
|
56
56
|
} from "./chunk-7m60qnc8.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
import {
|
|
61
61
|
S3Client,
|
|
62
62
|
resolveCredentials
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-rds0sy87.js";
|
|
64
64
|
import {
|
|
65
65
|
AWSClient,
|
|
66
66
|
buildQueryParams
|
|
@@ -10395,7 +10395,7 @@ async function sendAuthenticationEmail(config, message) {
|
|
|
10395
10395
|
if (!from)
|
|
10396
10396
|
return false;
|
|
10397
10397
|
try {
|
|
10398
|
-
const { EmailClient } = await import("./chunk-
|
|
10398
|
+
const { EmailClient } = await import("./chunk-ttz2ra5j.js");
|
|
10399
10399
|
const email = new EmailClient({ region: config.project.region, defaultFrom: from });
|
|
10400
10400
|
await email.send(message);
|
|
10401
10401
|
return true;
|
|
@@ -36403,7 +36403,7 @@ async function startLocalDashboardServer(options = {}) {
|
|
|
36403
36403
|
});
|
|
36404
36404
|
const notificationRouter = new NotificationRouter(alertStore, {
|
|
36405
36405
|
emailImpl: async (input) => {
|
|
36406
|
-
const { email } = await import("./chunk-
|
|
36406
|
+
const { email } = await import("./chunk-ttz2ra5j.js");
|
|
36407
36407
|
return email.send(input);
|
|
36408
36408
|
}
|
|
36409
36409
|
});
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
generateStaticSiteTemplate,
|
|
6
6
|
invalidateCache,
|
|
7
7
|
uploadStaticFiles
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-v0vpamnf.js";
|
|
9
9
|
import"./chunk-01d86gt1.js";
|
|
10
10
|
import"./chunk-gttvakpv.js";
|
|
11
11
|
import"./chunk-32e7ya18.js";
|
|
12
12
|
import"./chunk-4cjrg98a.js";
|
|
13
|
-
import"./chunk-
|
|
13
|
+
import"./chunk-rds0sy87.js";
|
|
14
14
|
import"./chunk-zqtpg06c.js";
|
|
15
15
|
import"./chunk-v0bahtg2.js";
|
|
16
16
|
export {
|
|
@@ -1407,7 +1407,8 @@ host:${host}
|
|
|
1407
1407
|
queryParams: { uploads: "" },
|
|
1408
1408
|
headers
|
|
1409
1409
|
});
|
|
1410
|
-
|
|
1410
|
+
const root = result?.InitiateMultipartUploadResult ?? result;
|
|
1411
|
+
return { UploadId: root?.UploadId };
|
|
1411
1412
|
}
|
|
1412
1413
|
async uploadPart(bucket, key, uploadId, partNumber, body) {
|
|
1413
1414
|
const { accessKeyId, secretAccessKey, sessionToken } = this.getCredentials();
|
|
@@ -1504,7 +1505,7 @@ host:${host}
|
|
|
1504
1505
|
bucket,
|
|
1505
1506
|
queryParams: { uploads: "" }
|
|
1506
1507
|
});
|
|
1507
|
-
const uploads = result?.ListMultipartUploadsResult?.Upload;
|
|
1508
|
+
const uploads = (result?.ListMultipartUploadsResult ?? result)?.Upload;
|
|
1508
1509
|
if (!uploads)
|
|
1509
1510
|
return [];
|
|
1510
1511
|
const list = Array.isArray(uploads) ? uploads : [uploads];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EmailClient,
|
|
3
3
|
email
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-nsgqsmrh.js";
|
|
5
5
|
import"./chunk-32e7ya18.js";
|
|
6
|
-
import"./chunk-
|
|
6
|
+
import"./chunk-rds0sy87.js";
|
|
7
7
|
import"./chunk-zqtpg06c.js";
|
|
8
8
|
import"./chunk-v0bahtg2.js";
|
|
9
9
|
export {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-4cjrg98a.js";
|
|
17
17
|
import {
|
|
18
18
|
S3Client
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-rds0sy87.js";
|
|
20
20
|
import {
|
|
21
21
|
__require
|
|
22
22
|
} from "./chunk-v0bahtg2.js";
|
|
@@ -815,7 +815,7 @@ async function deployStaticSiteWithExternalDnsFull(config) {
|
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
817
|
onProgress?.("upload", "Uploading files to S3...");
|
|
818
|
-
const { uploadStaticFiles } = await import("./chunk-
|
|
818
|
+
const { uploadStaticFiles } = await import("./chunk-kpeb5rcs.js");
|
|
819
819
|
const uploadResult = await uploadStaticFiles({
|
|
820
820
|
sourceDir,
|
|
821
821
|
bucket: infraResult.bucket,
|
|
@@ -835,7 +835,7 @@ async function deployStaticSiteWithExternalDnsFull(config) {
|
|
|
835
835
|
}
|
|
836
836
|
if (infraResult.distributionId && uploadResult.uploaded > 0) {
|
|
837
837
|
onProgress?.("invalidate", "Invalidating CloudFront cache...");
|
|
838
|
-
const { invalidateCache } = await import("./chunk-
|
|
838
|
+
const { invalidateCache } = await import("./chunk-kpeb5rcs.js");
|
|
839
839
|
await invalidateCache(infraResult.distributionId);
|
|
840
840
|
}
|
|
841
841
|
onProgress?.("complete", "Deployment complete!");
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-4cjrg98a.js";
|
|
8
8
|
import {
|
|
9
9
|
S3Client
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-rds0sy87.js";
|
|
11
11
|
import {
|
|
12
12
|
renderWafInstallScript
|
|
13
13
|
} from "./chunk-va2yd85b.js";
|
|
@@ -1287,7 +1287,7 @@ async function sendNotifications(config, event, message, options = {}) {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
async function sendEmailNotification(email, event, message) {
|
|
1289
1289
|
try {
|
|
1290
|
-
const mod = await import("./chunk-
|
|
1290
|
+
const mod = await import("./chunk-ttz2ra5j.js");
|
|
1291
1291
|
await mod.email.send({
|
|
1292
1292
|
to: email.to,
|
|
1293
1293
|
from: email.from,
|
|
@@ -1877,6 +1877,9 @@ function buildRpxProvisionScript(options) {
|
|
|
1877
1877
|
"OOMPolicy=stop",
|
|
1878
1878
|
"Restart=always",
|
|
1879
1879
|
"RestartSec=5",
|
|
1880
|
+
"StartLimitIntervalSec=120",
|
|
1881
|
+
"StartLimitBurst=5",
|
|
1882
|
+
`ExecStartPre=/bin/sh -c 'for p in 80 443; do fuser -k -n tcp "$p" 2>/dev/null || true; done; sleep 1'`,
|
|
1880
1883
|
"LimitNOFILE=1048576",
|
|
1881
1884
|
"AmbientCapabilities=CAP_NET_BIND_SERVICE",
|
|
1882
1885
|
"",
|
package/dist/deploy/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
synchronizeDashboardUsers,
|
|
37
37
|
trackDashboardOperation,
|
|
38
38
|
verifyStaticApiOrigin
|
|
39
|
-
} from "../chunk-
|
|
39
|
+
} from "../chunk-3ee2jav4.js";
|
|
40
40
|
import {
|
|
41
41
|
deleteStaticSite,
|
|
42
42
|
deployStaticSite,
|
|
@@ -47,12 +47,12 @@ import {
|
|
|
47
47
|
generateStaticSiteTemplate,
|
|
48
48
|
invalidateCache,
|
|
49
49
|
uploadStaticFiles
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-v0vpamnf.js";
|
|
51
51
|
import {
|
|
52
52
|
buildAndPushServerlessImage
|
|
53
53
|
} from "../chunk-wmbep3b5.js";
|
|
54
|
-
import"../chunk-
|
|
55
|
-
import"../chunk-
|
|
54
|
+
import"../chunk-6a1t7fnq.js";
|
|
55
|
+
import"../chunk-nsgqsmrh.js";
|
|
56
56
|
import"../chunk-01d86gt1.js";
|
|
57
57
|
import"../chunk-50jpda9q.js";
|
|
58
58
|
import"../chunk-he9a874b.js";
|
|
@@ -78,10 +78,10 @@ import {
|
|
|
78
78
|
siteInstallBase,
|
|
79
79
|
validateDeploymentConfig,
|
|
80
80
|
verifyAddressRecord
|
|
81
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-wh1y5rtk.js";
|
|
82
82
|
import"../chunk-7m60qnc8.js";
|
|
83
83
|
import"../chunk-4cjrg98a.js";
|
|
84
|
-
import"../chunk-
|
|
84
|
+
import"../chunk-rds0sy87.js";
|
|
85
85
|
import"../chunk-zqtpg06c.js";
|
|
86
86
|
import"../chunk-19bs955w.js";
|
|
87
87
|
import"../chunk-va2yd85b.js";
|
package/dist/drivers/index.js
CHANGED
|
@@ -68,10 +68,10 @@ import {
|
|
|
68
68
|
waitForSsh,
|
|
69
69
|
wrapCloudInitUserData,
|
|
70
70
|
writeResizeCheckpoint
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-wh1y5rtk.js";
|
|
72
72
|
import"../chunk-7m60qnc8.js";
|
|
73
73
|
import"../chunk-4cjrg98a.js";
|
|
74
|
-
import"../chunk-
|
|
74
|
+
import"../chunk-rds0sy87.js";
|
|
75
75
|
import"../chunk-zqtpg06c.js";
|
|
76
76
|
import"../chunk-va2yd85b.js";
|
|
77
77
|
import"../chunk-aa2dkn7b.js";
|
package/dist/index.js
CHANGED
|
@@ -208,7 +208,7 @@ import {
|
|
|
208
208
|
verifyUpdateSignature,
|
|
209
209
|
webhookEndpoint,
|
|
210
210
|
zeroCapacity
|
|
211
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-3ee2jav4.js";
|
|
212
212
|
import {
|
|
213
213
|
deleteStaticSite,
|
|
214
214
|
deployStaticSite,
|
|
@@ -219,7 +219,7 @@ import {
|
|
|
219
219
|
generateStaticSiteTemplate,
|
|
220
220
|
invalidateCache,
|
|
221
221
|
uploadStaticFiles
|
|
222
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-v0vpamnf.js";
|
|
223
223
|
import {
|
|
224
224
|
buildAndPushServerlessImage
|
|
225
225
|
} from "./chunk-wmbep3b5.js";
|
|
@@ -260,12 +260,12 @@ import {
|
|
|
260
260
|
providerEndpoint,
|
|
261
261
|
remapKey,
|
|
262
262
|
resolveObjectStorage
|
|
263
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-6a1t7fnq.js";
|
|
264
264
|
import {
|
|
265
265
|
EmailClient,
|
|
266
266
|
IAMClient,
|
|
267
267
|
SESClient
|
|
268
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-nsgqsmrh.js";
|
|
269
269
|
import {
|
|
270
270
|
CloudFrontClient
|
|
271
271
|
} from "./chunk-01d86gt1.js";
|
|
@@ -338,7 +338,7 @@ import {
|
|
|
338
338
|
waitForCloudInit,
|
|
339
339
|
waitForSsh,
|
|
340
340
|
wrapCloudInitUserData
|
|
341
|
-
} from "./chunk-
|
|
341
|
+
} from "./chunk-wh1y5rtk.js";
|
|
342
342
|
import {
|
|
343
343
|
EC2Client,
|
|
344
344
|
SSMClient
|
|
@@ -348,7 +348,7 @@ import {
|
|
|
348
348
|
} from "./chunk-4cjrg98a.js";
|
|
349
349
|
import {
|
|
350
350
|
S3Client
|
|
351
|
-
} from "./chunk-
|
|
351
|
+
} from "./chunk-rds0sy87.js";
|
|
352
352
|
import {
|
|
353
353
|
AWSClient
|
|
354
354
|
} from "./chunk-zqtpg06c.js";
|