@stacksjs/ts-cloud 0.16.13 → 0.16.15
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 +1 -1
- package/dist/bin/chunk-01tmdqe3.js +1 -0
- package/dist/bin/{chunk-ef4f8sef.js → chunk-0y4a84jm.js} +9 -9
- package/dist/bin/{chunk-9jmnmhpy.js → chunk-21am8b1b.js} +1 -1
- package/dist/bin/{chunk-4hajw7wc.js → chunk-23nxkj19.js} +1 -1
- package/dist/bin/{chunk-pthfzst7.js → chunk-2a8twtvv.js} +1 -1
- package/dist/bin/{chunk-3e6ywq3r.js → chunk-2cyhks5n.js} +1 -1
- package/dist/bin/{chunk-xbkwnffn.js → chunk-31tmm8kx.js} +2 -2
- package/dist/bin/chunk-3bwy7atq.js +1 -0
- package/dist/bin/{chunk-v8neg87z.js → chunk-3d8y4a6d.js} +88 -88
- package/dist/bin/{chunk-9gqf6ve1.js → chunk-3eht1tp2.js} +4 -4
- package/dist/bin/chunk-3rsvrp09.js +1 -0
- package/dist/bin/{chunk-t2bn3a09.js → chunk-3z65v87m.js} +6 -6
- package/dist/bin/{chunk-450etqze.js → chunk-489c9r4g.js} +3 -3
- package/dist/bin/chunk-4gf4mk0b.js +1 -0
- package/dist/bin/{chunk-087dfdz8.js → chunk-4mpfdw94.js} +2 -2
- package/dist/bin/{chunk-qj1yrcmq.js → chunk-4nbq68h4.js} +1 -1
- package/dist/bin/{chunk-m5yvdfr1.js → chunk-58phgtc8.js} +2 -2
- package/dist/bin/{chunk-vvtfpk7v.js → chunk-5ffj7508.js} +1 -1
- package/dist/bin/{chunk-px61rpsg.js → chunk-5jf6veax.js} +3 -3
- package/dist/bin/{chunk-m7afesag.js → chunk-8t0mrz5d.js} +78 -78
- package/dist/bin/{chunk-5t0p3fwx.js → chunk-9gcmpcmq.js} +1 -1
- package/dist/bin/{chunk-epyk8nmc.js → chunk-9j7qhwe0.js} +1 -1
- package/dist/bin/chunk-b7b87gxb.js +2 -0
- package/dist/bin/chunk-c7sqa85j.js +1 -0
- package/dist/bin/{chunk-pdw0qjq1.js → chunk-cb47f0pb.js} +2 -2
- package/dist/bin/chunk-cejjg0ts.js +1 -0
- package/dist/bin/chunk-e3hn6atg.js +1 -0
- package/dist/bin/chunk-fbq61aj0.js +1 -0
- package/dist/bin/{chunk-e0vq4yvj.js → chunk-fjd8tw77.js} +4 -4
- package/dist/bin/chunk-g4dytx12.js +1 -0
- package/dist/bin/{chunk-06z3c3k9.js → chunk-gwpmn3a3.js} +1 -1
- package/dist/bin/{chunk-ep08n0dt.js → chunk-hdr0q89a.js} +5 -5
- package/dist/bin/chunk-hssaw82j.js +1 -0
- package/dist/bin/chunk-k4x1pq4t.js +1 -0
- package/dist/bin/chunk-kcvvpvte.js +1 -0
- package/dist/bin/{chunk-rs2d8nj2.js → chunk-kft7wdhy.js} +1 -1
- package/dist/bin/{chunk-pd8v6bpd.js → chunk-me81g606.js} +1 -1
- package/dist/bin/chunk-n8a76gys.js +1 -0
- package/dist/bin/{chunk-kz8h9cwf.js → chunk-nazx54p5.js} +2 -2
- package/dist/bin/chunk-p1k08e45.js +1 -0
- package/dist/bin/{chunk-nx0pbksa.js → chunk-pm2vz6zp.js} +3 -3
- package/dist/bin/chunk-ps8ev3tq.js +1 -0
- package/dist/bin/chunk-q8s9v9hv.js +1 -0
- package/dist/bin/chunk-qcvmyfp7.js +1 -0
- package/dist/bin/chunk-qncvqmzy.js +1 -0
- package/dist/bin/{chunk-0vc6kbcr.js → chunk-r0qynqff.js} +4 -4
- package/dist/bin/chunk-r35q7kve.js +1 -0
- package/dist/bin/{chunk-mj43v7c9.js → chunk-r7k2mkn7.js} +4 -4
- package/dist/bin/chunk-rt9nbrwd.js +1 -0
- package/dist/bin/{chunk-1xnjsawx.js → chunk-s4z1knq4.js} +1 -1
- package/dist/bin/{chunk-mcqkjhgp.js → chunk-tb4ek3s5.js} +1 -1
- package/dist/bin/{chunk-rtrq59pg.js → chunk-trdteh51.js} +25 -25
- package/dist/bin/chunk-xhwjntw1.js +1 -0
- package/dist/bin/{chunk-yszmmsxy.js → chunk-yas09vmt.js} +3 -3
- package/dist/bin/{chunk-1hpraxqm.js → chunk-zm95j24a.js} +3 -3
- package/dist/bin/cli.js +113 -113
- package/dist/bin/dashboard-server.js +1 -1
- package/dist/{chunk-ndm0r1vb.js → chunk-21b8nage.js} +1 -1
- package/dist/{chunk-f5mqecfk.js → chunk-22ybphxa.js} +1 -1
- package/dist/chunk-29xhksd3.js +1 -0
- package/dist/{chunk-fjqx22m1.js → chunk-2rt6xbmv.js} +4 -4
- package/dist/chunk-2vgdfywj.js +1 -0
- package/dist/{chunk-t5e5phth.js → chunk-3bz7xz2d.js} +1 -1
- package/dist/{chunk-dbzveymg.js → chunk-42ngwzvc.js} +124 -124
- package/dist/chunk-67wrhk75.js +1 -0
- package/dist/chunk-7nq2rwjs.js +1 -0
- package/dist/{chunk-gdbtz492.js → chunk-80vxhxt5.js} +2 -2
- package/dist/{chunk-4w8d2mf0.js → chunk-8a02v9gs.js} +2 -2
- package/dist/{chunk-wkbk6pdg.js → chunk-8x24tv2g.js} +41 -41
- package/dist/{chunk-w41zkaey.js → chunk-97a7sxpe.js} +2 -2
- package/dist/{chunk-9rkyxwex.js → chunk-9be2pb0b.js} +5 -5
- package/dist/{chunk-kksj2fy7.js → chunk-9nxb5fyp.js} +4 -4
- package/dist/{chunk-d3vsmxhq.js → chunk-bd75na8x.js} +87 -87
- package/dist/{chunk-r5pjnw74.js → chunk-dns94gs7.js} +1 -1
- package/dist/{chunk-1bxqrj7m.js → chunk-dxcwfj3h.js} +1 -1
- package/dist/{chunk-aszeyg2w.js → chunk-fs78rxy1.js} +3 -3
- package/dist/{chunk-3nccgrzf.js → chunk-g8tp1zj4.js} +3 -3
- package/dist/chunk-gj27zyk5.js +1 -0
- package/dist/chunk-ht8rawp1.js +2 -0
- package/dist/{chunk-fc2wc5h7.js → chunk-kx7zw3xn.js} +143 -143
- package/dist/{chunk-7rygewtr.js → chunk-p0w0kwhx.js} +19 -19
- package/dist/{chunk-9s5sm0wt.js → chunk-pc0tz6be.js} +7 -7
- package/dist/{chunk-xv3w9q1a.js → chunk-pwpd6jt2.js} +1 -1
- package/dist/{chunk-jghkvdgt.js → chunk-s1bfyvmc.js} +1 -1
- package/dist/{chunk-30504159.js → chunk-sw1p9qge.js} +1 -1
- package/dist/{chunk-wp6pg5sx.js → chunk-tznx5510.js} +6 -6
- package/dist/{chunk-v99q99bs.js → chunk-y59rkb2n.js} +4 -4
- package/dist/deploy/index.js +1 -1
- package/dist/dns/cloudflare.d.ts +31 -0
- package/dist/dns/index.js +1 -1
- package/dist/drivers/index.js +1 -1
- package/dist/drivers/shared/deploy-script.d.ts +62 -29
- package/dist/index.js +40 -40
- package/dist/operations/index.js +1 -1
- package/dist/protection/index.js +1 -1
- package/dist/spend/index.js +1 -1
- package/dist/ui/404.html +1 -1
- package/dist/ui/accept-invitation.html +1 -1
- package/dist/ui/access-denied.html +1 -1
- package/dist/ui/account/automation.html +6 -6
- package/dist/ui/account/security.html +2 -2
- package/dist/ui/applications/compose.html +6 -6
- package/dist/ui/applications/new.html +2 -2
- package/dist/ui/data/backups.html +6 -6
- package/dist/ui/data/services.html +6 -6
- package/dist/ui/data/volumes.html +6 -6
- package/dist/ui/index.html +6 -6
- package/dist/ui/infrastructure/topology.html +6 -6
- package/dist/ui/integrations.html +2 -2
- package/dist/ui/operations/alerts.html +6 -6
- package/dist/ui/operations/configuration.html +6 -6
- package/dist/ui/operations/jobs.html +6 -6
- package/dist/ui/operations/maintenance.html +6 -6
- package/dist/ui/operations/observability.html +6 -6
- package/dist/ui/operations/previews.html +6 -6
- package/dist/ui/operations/queue.html +5 -5
- package/dist/ui/operations/regions.html +6 -6
- package/dist/ui/operations/releases.html +6 -6
- package/dist/ui/operations/spend.html +6 -6
- package/dist/ui/operations/workloads.html +6 -6
- package/dist/ui/security.html +2 -2
- package/dist/ui/server/actions.html +6 -6
- package/dist/ui/server/activity.html +2 -2
- package/dist/ui/server/capacity.html +5 -5
- package/dist/ui/server/database.html +6 -6
- package/dist/ui/server/deployments.html +5 -5
- package/dist/ui/server/diagnostics.html +2 -2
- package/dist/ui/server/firewall.html +6 -6
- package/dist/ui/server/fleet.html +5 -5
- package/dist/ui/server/logs.html +6 -6
- package/dist/ui/server/metrics.html +5 -5
- package/dist/ui/server/security.html +2 -2
- package/dist/ui/server/services.html +1 -1
- package/dist/ui/server/sites.html +6 -6
- package/dist/ui/server/ssh-keys.html +6 -6
- package/dist/ui/server/team.html +6 -6
- package/dist/ui/server/terminal.html +2 -2
- package/dist/ui/serverless/alarms.html +6 -6
- package/dist/ui/serverless/assets.html +2 -2
- package/dist/ui/serverless/cost.html +2 -2
- package/dist/ui/serverless/data.html +6 -6
- package/dist/ui/serverless/deployments.html +1 -1
- package/dist/ui/serverless/firewall.html +1 -1
- package/dist/ui/serverless/functions.html +5 -5
- package/dist/ui/serverless/logs.html +6 -6
- package/dist/ui/serverless/metrics.html +2 -2
- package/dist/ui/serverless/queues.html +6 -6
- package/dist/ui/serverless/secrets.html +5 -5
- package/dist/ui/serverless/traces.html +6 -6
- package/dist/ui/serverless.html +6 -6
- package/package.json +3 -3
- package/dist/bin/chunk-1fpkqcxr.js +0 -1
- package/dist/bin/chunk-4qzpqmhe.js +0 -1
- package/dist/bin/chunk-5czgtrcd.js +0 -1
- package/dist/bin/chunk-5pdjsaxq.js +0 -1
- package/dist/bin/chunk-84ep5s0n.js +0 -1
- package/dist/bin/chunk-9yra64dd.js +0 -1
- package/dist/bin/chunk-c8d1pfyk.js +0 -1
- package/dist/bin/chunk-dj05defh.js +0 -1
- package/dist/bin/chunk-g5w1fghb.js +0 -1
- package/dist/bin/chunk-gpxsnagd.js +0 -1
- package/dist/bin/chunk-j3w462ep.js +0 -1
- package/dist/bin/chunk-nxm87x83.js +0 -1
- package/dist/bin/chunk-p0a1vb1r.js +0 -1
- package/dist/bin/chunk-q46ntwdf.js +0 -1
- package/dist/bin/chunk-t1eft7s7.js +0 -1
- package/dist/bin/chunk-ta8cwf5g.js +0 -1
- package/dist/bin/chunk-vjmtc9jv.js +0 -1
- package/dist/bin/chunk-w91ws3rh.js +0 -2
- package/dist/bin/chunk-x5qg9hwd.js +0 -1
- package/dist/bin/chunk-xr8yrtpq.js +0 -1
- package/dist/bin/chunk-xxfpxvc1.js +0 -1
- package/dist/bin/chunk-zs8bfer0.js +0 -1
- package/dist/chunk-6e967ybg.js +0 -2
- package/dist/chunk-a6jazwvy.js +0 -1
- package/dist/chunk-kgw1dd9b.js +0 -1
- package/dist/chunk-mgq54dyz.js +0 -1
- package/dist/chunk-pnjajqyw.js +0 -1
- package/dist/chunk-y2s8wcdg.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u}from"./chunk-
|
|
2
|
-
`)}function
|
|
3
|
-
`)){let n=e.trim();if(!n)continue;try{let o=JSON.parse(Buffer.from(n,"base64").toString("utf8"));if(o&&typeof o==="object"&&!Array.isArray(o))r.push(o)}catch{continue}}return r}function
|
|
4
|
-
export{ot,
|
|
1
|
+
import{u}from"./chunk-97a7sxpe.js";var ot="/etc/rpx/sites.d",Mh={start:3000,end:3999};function g(t){return t.slug?.trim()||"app"}function Sc(t){let r=t.lastIndexOf(":");if(r<0||r===t.length-1)return;let e=t.slice(r+1).trim();if(!/^\d+$/.test(e))return;let n=Number(e);return n>=1&&n<=65535?n:void 0}function Zn(t,r={}){let e=r.ignoreSlug?.trim(),n=new Map;for(let o of t){let c=g(o);if(e&&c===e)continue;for(let a of o.proxies??[]){let f=typeof a.from==="string"?[a.from]:a.from??[];for(let i of f){let d=Sc(i);if(d!==void 0&&!n.has(d))n.set(d,c)}}}return n}function ei(t=ot){return[`for __tsc_fragment in ${t}/*.json; do`,' [ -f "$__tsc_fragment" ] || continue',` base64 < "$__tsc_fragment" | tr -d '\\n'`," printf '\\n'","done"].join(`
|
|
2
|
+
`)}function ti(t){let r=[];for(let e of t.split(`
|
|
3
|
+
`)){let n=e.trim();if(!n)continue;try{let o=JSON.parse(Buffer.from(n,"base64").toString("utf8"));if(o&&typeof o==="object"&&!Array.isArray(o))r.push(o)}catch{continue}}return r}function sp(t,r,e=Mh){let n=[],o=[],c=new Set(r.keys());for(let[a,f]of Object.entries(t.sites??{})){if(!f||u(f)!=="server-app")continue;let i=typeof f.port==="number"?f.port:void 0,d=Math.max(i??e.start,e.start),p;for(let s=d;s<=e.end;s++)if(!c.has(s)){p=s;break}if(p===void 0){let s=i!==void 0?r.get(i):void 0;o.push(`No free port for site '${a}' in ${e.start}-${e.end}${i!==void 0?` (wanted ${i}${s?`, held by '${s}'`:""})`:""}. Widen the range or free a port on the box.`);continue}c.add(p),n.push({site:a,port:p,declared:i,moved:i!==void 0&&p!==i})}return{allocations:n,errors:o}}
|
|
4
|
+
export{ot,Mh,Sc,Zn,ei,ti,sp};
|
package/dist/deploy/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Jr,Xr,
|
|
1
|
+
import{Jr,Xr,kl,Fi,Bl,_l,xl,oa,Ol,Ll,Dm,$l,S,Ml,Ui,Pe,Fl,Ul,xA,Ql,Pm,OA,LA,$A,Nm,km,MA,FA,Bm,_m,UA,Qi,Wt,aa,Yr,Zr,Jt,Je,It,Hi,xm,en,Hl,Gl,ca,qi,rn,Vi,Ea}from"../chunk-kx7zw3xn.js";import{ba,nn,sn,ji,zi,Ki,Wi,va,Ta}from"../chunk-9nxb5fyp.js";import{wa}from"../chunk-2rt6xbmv.js";import"../chunk-tznx5510.js";import"../chunk-g8tp1zj4.js";import"../chunk-sw1p9qge.js";import"../chunk-dns94gs7.js";import"../chunk-dxcwfj3h.js";import"../chunk-ht8rawp1.js";import"../chunk-21b8nage.js";import{ou,Ha,Ae,Ga,In,au,qa,gc,Cs,mc,Nt,Kn,Es}from"../chunk-bd75na8x.js";import"../chunk-fs78rxy1.js";import"../chunk-22ybphxa.js";import"../chunk-3bz7xz2d.js";import"../chunk-8a02v9gs.js";import{ot,Mh,Sc,Zn,ei,ti,sp}from"../chunk-y59rkb2n.js";import{B,Ir,Sr,Cc,Ts,u,Fh,op,ap,Ay,yy}from"../chunk-97a7sxpe.js";import"../chunk-8x24tv2g.js";import"../chunk-42ngwzvc.js";export{Mh as DEFAULT_SITE_PORT_RANGE,ot as HOST_SITES_DIR,Ga as IPV6_EXCLUDED_HOST_LABELS,gc as MANAGEMENT_DASHBOARD_SITE,Jr as addSiteToCloudConfig,sp as allocateSitePorts,UA as buildAndPushContainerImage,wa as buildAndPushServerlessImage,Wt as buildFunctionEnv,ei as buildHostSitePortsScript,Es as buildManagementDashboardArtifact,It as buildServerTopology,Hi as buildServerlessTopology,xm as buildTopology,ca as collectEgressMetrics,ou as collectServerDnsDomains,_m as createContainerImageDependencies,Nm as createExistingStaticFullStackDependencies,Pm as createStaticApiOriginDependencies,rn as dashboardActions,Cs as dashboardCredentialsFile,Fl as dashboardPageRoutes,va as deleteStaticSite,MA as deployExistingStaticFullStack,aa as deployServerlessApp,yy as deployShipsFiles,Ql as deploySite,OA as deployStaticApiOrigin,zi as deployStaticSite,Ta as deployStaticSiteFull,nn as deployStaticSiteWithExternalDns,sn as deployStaticSiteWithExternalDnsFull,Hl as egressReportMetrics,S as ensureDashboardActor,Kn as ensureManagementDashboard,FA as estimateExistingStaticFullStackMonthlyCost,$A as estimateStaticApiOriginMonthlyCost,Gl as fetchEgressReport,km as generateExistingStaticFullStackTemplate,ba as generateExternalDnsStaticSiteTemplate,ji as generateStaticSiteTemplate,Fh as hasComputeConfigured,Cc as hasProxyUpstream,Bm as hashContainerContext,In as hostAcceptsIpv6,Qi as infraEnvFromOutputs,Ml as initializeDashboardControlPlane,Wi as invalidateCache,Ir as isPhpSite,oa as isValidHostname,Ae as normalizePublicIpv6,Zn as occupiedHostPorts,ti as parseHostSiteFragments,Sc as parseUpstreamPort,au as reconcileAddressRecords,Yr as redeployServerlessApp,Xr as removeSiteFromCloudConfig,Ha as removeStaleServerAddressRecords,Ol as renderAliasesValue,xl as renderEnvValue,Ll as renderRedirectsValue,Dm as renderSiteSnippet,Bl as renderSslValue,_l as renderStringValue,Vi as resolveDashboardAction,mc as resolveDashboardAuth,en as resolveDashboardData,Ul as resolveLegacyDashboardRoute,Sr as resolveProxyUpstreams,Ts as resolveSiteDeployTarget,u as resolveSiteKind,Nt as resolveUiSource,Zr as rollbackServerlessApp,xA as routesForDashboard,Je as runRemoteCommand,qi as sanitizeCloudConfig,$l as setAttachToInCloudConfig,Jt as setMaintenance,Fi as setSitePropertyInCloudConfig,ap as shipsARelease,Ay as shipsToBucket,B as siteInstallBase,Ea as startLocalDashboardServer,Ui as synchronizeDashboardUsers,Pe as trackDashboardOperation,kl as updateSiteInCloudConfig,Ki as uploadStaticFiles,op as validateDeploymentConfig,qa as verifyAddressRecord,LA as verifyStaticApiOrigin};
|
package/dist/dns/cloudflare.d.ts
CHANGED
|
@@ -286,6 +286,37 @@ export declare class CloudflareProvider implements DnsProvider {
|
|
|
286
286
|
message?: string;
|
|
287
287
|
}>;
|
|
288
288
|
}
|
|
289
|
+
/**
|
|
290
|
+
* A rule expression with its host clause taken out. Two rules with the same
|
|
291
|
+
* shape (and the same action) do the same thing, each to its own hosts.
|
|
292
|
+
*/
|
|
293
|
+
export declare function expressionShape(expression: string): string | null;
|
|
294
|
+
/** The same expression scoped to `hosts` instead. */
|
|
295
|
+
export declare function scopeExpression(expression: string, hosts: readonly string[]): string;
|
|
296
|
+
/**
|
|
297
|
+
* The phase's rule list after one project writes its managed rules.
|
|
298
|
+
*
|
|
299
|
+
* A zone is routinely shared (stacksjs.com carries a dozen tenants' sites,
|
|
300
|
+
* each deploying on its own), and a phase holds only so many rules: 10 cache
|
|
301
|
+
* rules on Cloudflare's Free plan. Written one set per tenant, the fourth
|
|
302
|
+
* tenant's deploy failed with "exceeded the maximum number of rules in the
|
|
303
|
+
* phase http_request_cache_settings: 12 out of 10" and its site went without
|
|
304
|
+
* cache rules at all.
|
|
305
|
+
*
|
|
306
|
+
* So rules that behave identically - same action, parameters and expression,
|
|
307
|
+
* differing only in their hosts - are stored once with the union of their
|
|
308
|
+
* hosts. That is exact, not an approximation: the phase applies every
|
|
309
|
+
* matching rule, and a rule's effect on a host does not depend on which other
|
|
310
|
+
* hosts share it. Tenants on default settings now cost nothing extra.
|
|
311
|
+
*
|
|
312
|
+
* Ownership is therefore per host, not per rule. Writing this project's rules
|
|
313
|
+
* first takes its hosts out of every managed rule (dropping a rule left with
|
|
314
|
+
* none) and only then adds them back, merging where it can. The one cost: a
|
|
315
|
+
* host a project stops declaring lingers in a shared rule, which is harmless
|
|
316
|
+
* because nothing routes it. Rules without the managed prefix are never
|
|
317
|
+
* touched, and an unscoped managed rule is left alone by a scoped write.
|
|
318
|
+
*/
|
|
319
|
+
export declare function mergeManagedRules(existing: CloudflareRule[], incoming: CloudflareRule[]): CloudflareRule[];
|
|
289
320
|
/**
|
|
290
321
|
* The hosts a rule expression is scoped to, in the two shapes `hostCondition`
|
|
291
322
|
* writes: `http.host eq "a"` and `http.host in {"a" "b"}`.
|
package/dist/dns/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tt,se,
|
|
1
|
+
import{tt,se,_e,fe,Tt,fn,ns,is,nr,ir,An,sr,ss,os,as,cs,z,ds,ls,us,ps,oe,gs,ms,hs,T,Ua,yn,Qa}from"../chunk-ht8rawp1.js";import"../chunk-21b8nage.js";import"../chunk-8a02v9gs.js";export{fe as CloudflareProvider,yn as DnsProviderFactory,_e as GoDaddyProvider,tt as PROXIABLE_RECORD_TYPES,se as PorkbunProvider,z as Route53Provider,oe as UnifiedDnsValidator,as as applyDeclaredZoneSettings,us as applyZoneMigration,T as createDnsProvider,ms as createGoDaddyValidator,gs as createPorkbunValidator,hs as createRoute53Validator,sr as delegateZone,ss as delegateZoneFromConfig,os as describeDelegation,cs as describeZoneSettings,Ua as detectDnsProvider,Qa as dnsProviders,ds as exportRoute53Zone,nr as isNameserverRegistrar,ir as isZoneHost,ls as planZoneMigration,Tt as policyTag,fn as qualifyName,is as reconcileDeclaredRecords,ns as resolveDeclaredRecords,An as sameNameservers,ps as verifyZoneParity};
|
package/dist/drivers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Sn,wt,ar,Rt,Cn,En,bn,vn,uu,Va,K,lr,Jm,Tn,ja,ye,Ie,xe,N,ur,wn,pr,ce,za,Rn,Ka,Dn,Wa,gr,Xa,Oe,W,Ya,rt,Le,$e,nt,Se,ys,Za,pu,gu,ec,mu,it,Pn,tc,hu,fu,rc,mr,Ce,nc,Au,yu,Is,Nn,st,Iu,Su,Cu,Eu,bu,vu,Tu,wu,Ru,kn,Bn,_n,xn,On,Ln,$n,Du,Pu,hr,k,Ss,Nu,ku,Bu,ic,_u,xu,Xm,sc,Ym,Zm,Ou,Lu,eh,th,rh,oc,$u,nh,ih,sh,Mn,Un,Qn,Hn,ac,cc,dc,lc,oh,Gn,qn,Vn,jn,uc,pc,zn,bs,hc,Wn,fc,ah,ch,dh,lh}from"../chunk-bd75na8x.js";import"../chunk-fs78rxy1.js";import"../chunk-22ybphxa.js";import"../chunk-3bz7xz2d.js";import"../chunk-8a02v9gs.js";import"../chunk-97a7sxpe.js";import"../chunk-42ngwzvc.js";export{lc as AwsBoxProvisioner,ur as AwsDriver,Bu as BOOT_PARTITION_LABEL,Ss as CloudDriverFactory,En as DEFAULT_RPX_CERTS_DIR,ku as FIRST_BOOT_SCRIPT_PATH,dc as HetznerBoxProvisioner,gr as HetznerClient,Se as HetznerDriver,Ya as LEGACY_DRIVER_STATE_DIR,ys as LocalBoxDriver,ch as MANAGED_CACHE_POLICY_DISABLED,ah as MANAGED_CACHE_POLICY_OPTIMIZED,dh as MANAGED_ORIGIN_REQUEST_POLICY_ALL_VIEWER,yu as RASPBERRY_PI_DEFAULT_SWAP_GB,Wa as REMOTE_SCRIPT_RUNNER,Tn as RPX_DIR,ja as RPX_LAUNCHER_PATH,ye as RPX_SERVICE_NAME,nc as SSH_BOOTSTRAP_MARKER_DIR,Ce as SSH_BOOTSTRAP_VERSION,st as SSH_DEFAULTS,$n as SSH_DEPLOY_STORAGE_PATH,pu as SSH_INSECURE_HOST_KEY_OPTS,gu as SSH_KEEPALIVE_OPTS,Bn as SSH_PREFLIGHT_SCRIPT,Du as SSH_SKIP_BOOTSTRAP_ENV,hr as SshDriver,mr as SystemSshTransport,ac as UBUNTU_2404_AMI_PARAM,sh as acquireResizeLock,eh as applyHetznerHostOptimization,Is as assertArchSupported,Pu as assertSshComputeConfig,uc as buildAwsArtifactFetch,cc as buildBoxUserData,lh as buildCloudFrontOriginConfig,ic as buildCloudInitFirstBoot,Lu as buildHetznerHostOptimizationScript,zn as buildHostCleanupScript,pc as buildLocalArtifactFetch,K as buildRpxConfig,xe as buildRpxFragmentRefreshScript,lr as buildRpxLbConfig,Ie as buildRpxProvisionScript,mu as buildScpArgsFor,qn as buildSiteDeployScript,wn as buildSshArgs,ec as buildSshArgsFor,Nn as buildSshBootstrapScript,Vn as buildStaticSiteDeployScript,Nu as cloudDrivers,th as collectHetznerHostOptimizationReport,sc as collectHetznerResizeManifest,oh as createBoxProvisioner,k as createCloudDriver,hc as deployAllComputeSites,bs as deploySiteRelease,Va as deriveRouteId,Sn as describeScriptSyntaxError,rt as driverStateDir,Le as driverStatePath,Un as ensureFirewall,Qn as ensureServer,Mn as ensureSshKey,xn as evaluatePreflight,Xm as executeHetznerServerResize,fu as findKnownHostKey,Ln as formatPreflightFindings,wt as formatSshFailure,vn as gatewayHostnames,N as generateUbuntuAppCloudInit,bn as hasAutoWwwVariant,Za as isBoxMode,xu as isHetznerCapacityError,Cn as isLocalDatabase,hu as knownHostsLine,tc as knownHostsToken,uu as normalizeRoutePath,Oe as normalizeSshPublicKey,_n as parsePreflightFacts,_u as planHetznerServerResize,On as preflightFailed,Ym as prepareHetznerResize,$e as readDriverState,nh as readResizeCheckpoint,jn as releaseTarballTmpPath,Wn as reloadRpxGateway,Dn as remoteScriptRunner,Jm as renderRpxLauncher,fc as renewRpxCertificates,oc as resizeCheckpointPath,$u as resizeLockPath,Gn as resolveExecStart,Xa as resolveHetznerApiToken,Ou as resolveHetznerHostOptimizationPlan,bu as resolveSshHostKeyPolicy,Iu as resolveSshHosts,Ru as resolveSshLan,Cu as resolveSshPort,Eu as resolveSshPrivateKeyPath,Tu as resolveSshProfile,wu as resolveSshPublicIp,kn as resolveSshSettings,vu as resolveSshSudo,Su as resolveSshUser,Pn as scanHostKey,za as scpUpload,Hn as serverPublicIpv4,Au as sshBootstrapMarkerPath,pr as sshExec,ce as sshExecOrThrow,it as sshHostKeyFingerprint,rc as sshKnownHostsPath,Rt as summarizeRemoteFailures,ar as surfaceRemoteNotices,rh as verifyHetznerHostOptimization,Zm as verifyHetznerResize,Ka as waitForCloudInit,Rn as waitForSsh,W as wrapCloudInitUserData,nt as writeDriverState,ih as writeResizeCheckpoint};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* release (no window where the code is half-replaced). Old releases are kept for
|
|
11
11
|
* instant rollback. See {@link import('./releases')}.
|
|
12
12
|
*/
|
|
13
|
-
import type { SharedPathEntry } from '@ts-cloud/core';
|
|
13
|
+
import type { SharedPathEntry, SiteLivenessConfig } from '@ts-cloud/core';
|
|
14
14
|
/**
|
|
15
15
|
* Translate a `start` command into an absolute systemd ExecStart.
|
|
16
16
|
*
|
|
@@ -38,21 +38,6 @@ import type { SharedPathEntry } from '@ts-cloud/core';
|
|
|
38
38
|
* rather than emitting a unit that fails to start.
|
|
39
39
|
*/
|
|
40
40
|
export declare function resolveExecStart(start: string, runtime: 'bun' | 'node' | 'deno', workingDirectory?: string): string;
|
|
41
|
-
/**
|
|
42
|
-
* Shell that installs a recurring liveness check for one ported service.
|
|
43
|
-
*
|
|
44
|
-
* Three files: a check script, a oneshot service that runs it, and a timer.
|
|
45
|
-
* The script resolves the unit to probe at run time rather than baking in a
|
|
46
|
-
* release id, so it keeps working after the next deploy replaces the instance.
|
|
47
|
-
*
|
|
48
|
-
* `curl` without `-f`: any HTTP response means the process is answering, and a
|
|
49
|
-
* 404 on `/` is a routing opinion, not a wedged event loop. Only a connection
|
|
50
|
-
* failure or a timeout counts against it.
|
|
51
|
-
*
|
|
52
|
-
* A restart needs N consecutive failures, counted in a file under /run, so a
|
|
53
|
-
* single slow moment cannot bounce a healthy service; the counter resets on the
|
|
54
|
-
* first good response. flock keeps two ticks from overlapping.
|
|
55
|
-
*/
|
|
56
41
|
/**
|
|
57
42
|
* Stop the implicit per-template slice from silently capping the service.
|
|
58
43
|
*
|
|
@@ -138,15 +123,65 @@ export declare function buildAutoMemoryHigh(unitFile: string): string[];
|
|
|
138
123
|
*/
|
|
139
124
|
export declare function buildCommitmentReport(): string[];
|
|
140
125
|
export declare function buildSliceReconcile(instance: string): string[];
|
|
126
|
+
/**
|
|
127
|
+
* Liveness probe settings for a ported site - the same shape as
|
|
128
|
+
* `SiteConfig.liveness`. See {@link LIVENESS_DEFAULTS} for unset fields.
|
|
129
|
+
*/
|
|
130
|
+
export type LivenessOptions = SiteLivenessConfig;
|
|
131
|
+
export declare const LIVENESS_DEFAULTS: {
|
|
132
|
+
readonly path: '/';
|
|
133
|
+
readonly intervalSeconds: 60;
|
|
134
|
+
readonly failuresBeforeRestart: 3;
|
|
135
|
+
readonly timeoutSeconds: 10;
|
|
136
|
+
readonly startupGraceSeconds: 600;
|
|
137
|
+
readonly maxBackoffSeconds: 3600;
|
|
138
|
+
/** The wait before the second consecutive restart; it doubles from there. */
|
|
139
|
+
readonly backoffBaseSeconds: 300;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Shell that installs a recurring liveness check for one ported service.
|
|
143
|
+
*
|
|
144
|
+
* Three files: a check script, a oneshot service that runs it, and a timer.
|
|
145
|
+
* The script resolves the unit to probe at run time rather than baking in a
|
|
146
|
+
* release id, so it keeps working after the next deploy replaces the instance.
|
|
147
|
+
*
|
|
148
|
+
* `curl` without `-f`: any HTTP response means the process is answering, and a
|
|
149
|
+
* 404 on `/` is a routing opinion, not a wedged event loop. Only a refused
|
|
150
|
+
* connection or no response within `timeoutSeconds` counts against it. A
|
|
151
|
+
* timeout has to count - a wedged process still has its port bound and the
|
|
152
|
+
* kernel still accepts into its backlog, so "connects but never answers" is
|
|
153
|
+
* exactly the failure this exists for - which is why the budget is generous
|
|
154
|
+
* rather than why timeouts are forgiven.
|
|
155
|
+
*
|
|
156
|
+
* A restart needs N consecutive failures, counted in a file under /run, so a
|
|
157
|
+
* single slow moment cannot bounce a healthy service; the counter resets on the
|
|
158
|
+
* first good response. flock keeps two ticks from overlapping.
|
|
159
|
+
*
|
|
160
|
+
* **Startup grace.** A check against a unit younger than `startupGraceSeconds`
|
|
161
|
+
* is not counted. Without it the probe turned a slow boot into an outage loop:
|
|
162
|
+
* a release whose image warm-up kept its main thread busy for minutes after
|
|
163
|
+
* binding was restarted three minutes into each boot, three times running.
|
|
164
|
+
* Every restart threw the warm-up away and began it again, so visitors saw
|
|
165
|
+
* nine minutes of 502s from a release that would have been healthy in five.
|
|
166
|
+
* The age is the unit's own `ActiveEnterTimestampMonotonic` against
|
|
167
|
+
* `/proc/uptime`, which a restart resets, with the main PID's elapsed time as
|
|
168
|
+
* the fallback.
|
|
169
|
+
*
|
|
170
|
+
* **Back-off.** Restarts the probe itself issued are remembered with the time
|
|
171
|
+
* of the last one. The second in a row waits at least five minutes after the
|
|
172
|
+
* first and each later one doubles, capped at `maxBackoffSeconds`, so a
|
|
173
|
+
* release that can never come up is restarted a handful of times and then
|
|
174
|
+
* about hourly, not every few minutes forever. The streak is forgotten once
|
|
175
|
+
* the service answers with no probe restart in the last `maxBackoffSeconds`,
|
|
176
|
+
* and a deploy starts it afresh. Every held-off restart says so in the
|
|
177
|
+
* journal under the `<unit>-liveness` tag.
|
|
178
|
+
*/
|
|
141
179
|
export declare function buildLivenessUnits(options: {
|
|
142
180
|
unitBase: string;
|
|
143
181
|
/** systemd unit to restart. A `<base>@*.service` glob resolves at run time. */
|
|
144
182
|
unitPattern: string;
|
|
145
183
|
port: number;
|
|
146
|
-
|
|
147
|
-
intervalSeconds?: number;
|
|
148
|
-
failuresBeforeRestart?: number;
|
|
149
|
-
}): string[];
|
|
184
|
+
} & LivenessOptions): string[];
|
|
150
185
|
export interface BuildSiteDeployScriptOptions {
|
|
151
186
|
siteName: string;
|
|
152
187
|
slug: string;
|
|
@@ -218,18 +253,16 @@ export interface BuildSiteDeployScriptOptions {
|
|
|
218
253
|
* The probe is an HTTP request rather than a listener check for that exact
|
|
219
254
|
* reason — `ss` would have called the wedged process healthy.
|
|
220
255
|
*
|
|
256
|
+
* A unit younger than `startupGraceSeconds` is never restarted, and
|
|
257
|
+
* consecutive restarts back off, so a slow boot cannot become a restart
|
|
258
|
+
* loop. See {@link buildLivenessUnits}.
|
|
259
|
+
*
|
|
221
260
|
* Set `false` to opt out (a service that legitimately answers nothing on its
|
|
222
261
|
* port, or one where a restart is more dangerous than an outage).
|
|
223
|
-
* @default enabled, `/` every 60s, restart after 3
|
|
262
|
+
* @default enabled, `/` every 60s with a 10s timeout, restart after 3
|
|
263
|
+
* consecutive failures once the unit is 10 minutes old
|
|
224
264
|
*/
|
|
225
|
-
liveness?: false |
|
|
226
|
-
/** Path to request. @default '/' */
|
|
227
|
-
path?: string;
|
|
228
|
-
/** Seconds between checks. @default 60 */
|
|
229
|
-
intervalSeconds?: number;
|
|
230
|
-
/** Consecutive failures before a restart. @default 3 */
|
|
231
|
-
failuresBeforeRestart?: number;
|
|
232
|
-
};
|
|
265
|
+
liveness?: false | LivenessOptions;
|
|
233
266
|
/**
|
|
234
267
|
* systemd `MemoryHigh` for the app unit. See {@link SiteConfig.memoryHigh}.
|
|
235
268
|
* @default '2G'
|