@stacksjs/ts-cloud 0.11.4 → 0.11.6
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-cq9mca3h.js → chunk-5nsqz5n3.js} +46 -46
- package/dist/bin/{chunk-81hmza39.js → chunk-7zhgmp1s.js} +1 -1
- package/dist/bin/{chunk-104xrc2w.js → chunk-dkf4qsp2.js} +1 -1
- package/dist/bin/{chunk-b0e39tpv.js → chunk-j447p8t4.js} +1 -1
- package/dist/bin/{chunk-56wvjysz.js → chunk-x6f61g36.js} +9 -9
- package/dist/bin/{chunk-m189194f.js → chunk-yw6f160x.js} +1 -1
- package/dist/bin/cli.js +7 -7
- package/dist/bin/dashboard-server.js +1 -1
- package/dist/{chunk-vz95qy3n.js → chunk-1qdne0bf.js} +1 -1
- package/dist/chunk-5vt93kxx.js +1 -0
- package/dist/{chunk-ky5c6t5y.js → chunk-73ztr55z.js} +1 -1
- package/dist/chunk-95e6aeqz.js +1 -0
- package/dist/{chunk-hbhxk5a0.js → chunk-aj025v2s.js} +2 -2
- package/dist/{chunk-s3rpd72x.js → chunk-aw0cgv5w.js} +2 -2
- package/dist/{chunk-7xpxzbkr.js → chunk-aw0spg20.js} +66 -63
- package/dist/{chunk-q2njk4hx.js → chunk-by2bwzk6.js} +1 -1
- package/dist/{chunk-1ypkh8g6.js → chunk-dr4pj8hp.js} +1 -1
- package/dist/{chunk-r5natbed.js → chunk-hn40z11p.js} +1 -1
- package/dist/{chunk-nnqxmh7f.js → chunk-kasdm9tx.js} +1 -1
- package/dist/{chunk-gk58959n.js → chunk-mz0dk78z.js} +1 -1
- package/dist/{chunk-p6vszgc2.js → chunk-nk7sav4r.js} +2 -2
- package/dist/chunk-p10xt3jb.js +1 -0
- package/dist/{chunk-h1rc94df.js → chunk-q0rc1ax9.js} +1 -1
- package/dist/chunk-q9q6cmt0.js +1 -0
- package/dist/chunk-rd38qdnf.js +1 -0
- package/dist/{chunk-hwan3cev.js → chunk-tz9myq9a.js} +1 -1
- package/dist/{chunk-8e0az001.js → chunk-wavjkdb8.js} +2 -2
- package/dist/{chunk-b10cbk8z.js → chunk-x3hay61c.js} +1 -1
- package/dist/{chunk-t0kh8haz.js → chunk-xcj8zfmg.js} +1 -1
- package/dist/{chunk-qjk1v1gs.js → chunk-y4xkj2f1.js} +1 -1
- package/dist/{chunk-7pff0rv9.js → chunk-ywjkyg8p.js} +5 -5
- package/dist/{chunk-spx89gaw.js → chunk-z2qqwy7e.js} +1 -1
- package/dist/{chunk-6v4k9ekm.js → chunk-zam6ecam.js} +2 -2
- package/dist/{chunk-0hj552t7.js → chunk-zz52xje8.js} +2 -2
- package/dist/deploy/index.js +1 -1
- package/dist/dns/index.js +1 -1
- package/dist/drivers/index.js +1 -1
- package/dist/drivers/shared/deploy-script.d.ts +49 -0
- package/dist/drivers/shared/mail-provision.d.ts +1 -1
- package/dist/drivers/shared/mta-sts.d.ts +89 -0
- package/dist/drivers/shared/mta-sts.test.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -5
- package/dist/protection/index.js +1 -1
- package/dist/push/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 +5 -5
- 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 +5 -5
- 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 +5 -5
- package/dist/ui/operations/observability.html +6 -6
- package/dist/ui/operations/previews.html +6 -6
- package/dist/ui/operations/queue.html +6 -6
- package/dist/ui/operations/regions.html +5 -5
- 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 +1 -1
- package/dist/ui/server/capacity.html +5 -5
- package/dist/ui/server/database.html +5 -5
- 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 +6 -6
- 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 +2 -2
- 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 +2 -2
- package/dist/ui/serverless/firewall.html +1 -1
- package/dist/ui/serverless/functions.html +6 -6
- package/dist/ui/serverless/logs.html +6 -6
- package/dist/ui/serverless/metrics.html +1 -1
- package/dist/ui/serverless/queues.html +6 -6
- package/dist/ui/serverless/secrets.html +6 -6
- package/dist/ui/serverless/traces.html +6 -6
- package/dist/ui/serverless.html +6 -6
- package/package.json +3 -3
- package/dist/chunk-7fkyfh65.js +0 -1
- package/dist/chunk-hz7k9ymh.js +0 -1
- package/dist/chunk-kj7gzdj6.js +0 -1
- package/dist/chunk-m4vqpkpp.js +0 -1
- package/dist/chunk-n04a3bgf.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createRequire as a}from"node:module";var c=a(import.meta.url);
|
|
2
|
-
export{c as
|
|
2
|
+
export{c as Ct};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{sf as U}from"./chunk-
|
|
1
|
+
import{sf as U}from"./chunk-by2bwzk6.js";import{Ef as Z,Jf as _,Nf as K,Rf as L,Sf as Y}from"./chunk-tz9myq9a.js";import{Tf as M}from"./chunk-y4xkj2f1.js";import{Xh as W}from"./chunk-wavjkdb8.js";import{Zh as B}from"./chunk-nk7sav4r.js";import{Ct as j}from"./chunk-z2qqwy7e.js";function J(t){let{bucketName:s,domain:l,aliases:e,certificateArn:m,defaultRootObject:i="index.html",errorDocument:r="404.html",passthroughUrls:a=!1,singlePageApp:d=!1,dynamicApp:b=!1,computeOriginDomain:k,computeOriginPort:R=3008,computeOriginId:P="app-compute",retainOnStackDelete:x=!1}=t,A=x?{DeletionPolicy:"Retain",UpdateReplacePolicy:"Retain"}:{},y=b&&!!k,T=y?["GET","HEAD","OPTIONS","PUT","POST","PATCH","DELETE"]:["GET","HEAD"],F=y?["GET","HEAD"]:["GET","HEAD"],N={},O={};N.S3Bucket={Type:"AWS::S3::Bucket",...A,Properties:{BucketName:s,PublicAccessBlockConfiguration:{BlockPublicAcls:!0,BlockPublicPolicy:!1,IgnorePublicAcls:!0,RestrictPublicBuckets:!1},WebsiteConfiguration:{IndexDocument:i,ErrorDocument:r}}},O.BucketName={Description:"S3 Bucket Name",Value:{Ref:"S3Bucket"}},O.BucketArn={Description:"S3 Bucket ARN",Value:{"Fn::GetAtt":["S3Bucket","Arn"]}},N.CloudFrontOAC={Type:"AWS::CloudFront::OriginAccessControl",...A,Properties:{OriginAccessControlConfig:{Name:`OAC-${s}`,Description:`OAC for ${s}`,OriginAccessControlOriginType:"s3",SigningBehavior:"always",SigningProtocol:"sigv4"}}};let D;if(a&&y)D="InstallRootRedirectFunction",N[D]={Type:"AWS::CloudFront::Function",Properties:{Name:{"Fn::Sub":"${AWS::StackName}-install-root-redirect"},AutoPublish:!0,FunctionConfig:{Comment:"Redirect curl pantry.dev | bash (GET /) to /install.sh on S3",Runtime:"cloudfront-js-2.0"},FunctionCode:`function handler(event) {
|
|
2
2
|
var request = event.request;
|
|
3
3
|
if (request.uri === '/' || request.uri === '') {
|
|
4
4
|
return {
|
|
@@ -42,7 +42,7 @@ import{sf as U}from"./chunk-q2njk4hx.js";import{Ef as Z,Jf as _,Nf as K,Rf as L,
|
|
|
42
42
|
│ │
|
|
43
43
|
│ Verification typically takes 1-2 business days. │
|
|
44
44
|
│ After verification, re-run: bunx bunpress deploy │
|
|
45
|
-
└─────────────────────────────────────────────────────────────────────────────┘`),{success:!1,stackId:O,stackName:i,bucket:y,message:"CloudFront account verification required. Please contact AWS Support."}}return{success:!1,stackId:O,stackName:i,bucket:y,message:`Stack deployment failed: ${o.message}`}}let u=(await r.describeStacks({stackName:i})).Stacks[0]?.Outputs||[],C=(o)=>u.find((n)=>n.OutputKey===o)?.OutputValue,f=C("DistributionDomain");if(f&&d)console.log(`Creating DNS records via ${d.name}...`),await q(d,e,f);else if(f&&!d)console.log("Skipping DNS record creation (DNS verification was skipped)");return{success:!0,stackId:O,stackName:i,bucket:C("BucketName")||y,distributionId:C("DistributionId"),distributionDomain:f,domain:e,certificateArn:b,message:"Static site infrastructure deployed successfully with external DNS"}}async function q(t,s,l){if(!t){console.log("Skipping DNS record creation (DNS verification was skipped)");return}if(s.split(".").length===2)if(t instanceof Z){console.log(`Creating Route53 alias record for apex domain ${s} -> ${l}`);let i=await t.createCloudFrontAlias({domain:s,name:s,cloudFrontDomainName:l});if(!i.success)console.warn(`Warning: Could not create Route53 alias record: ${i.message}`),console.warn("Please manually create an A-record alias in Route53:"),console.warn(` ${s} -> ${l}`);else console.log(`Created Route53 alias record: ${s} -> ${l}`);let r=`www.${s}`;console.log(`Creating Route53 alias record for ${r} -> ${l}`);let a=await t.createCloudFrontAlias({domain:s,name:r,cloudFrontDomainName:l});if(!a.success)console.warn(`Warning: Could not create www Route53 alias: ${a.message}`),console.warn("Please manually create an A-record alias in Route53:"),console.warn(` ${r} -> ${l}`);else console.log(`Created Route53 alias record: ${r} -> ${l}`)}else{try{let d=await t.listRecords(s,"A");if(d.success)for(let b of d.records){let k=b.name.replace(/\.$/,"");if(k===s||k==="")console.log(`Removing existing root A record (${b.content}) to make room for ALIAS...`),await t.deleteRecord(s,{name:s,type:"A",content:b.content})}}catch(d){console.log(`Note: Could not check for conflicting A records: ${d instanceof Error?d.message:d}`)}console.log(`Creating ALIAS record for apex domain ${s} -> ${l}`);let i=await t.upsertRecord(s,{name:s,type:"ALIAS",content:l,ttl:600});if(!i.success)console.warn(`Warning: Could not create ALIAS record: ${i.message}`),console.warn("Please manually create an ALIAS record in your DNS provider:"),console.warn(` ${s} -> ${l}`);else console.log(`Created ALIAS record: ${s} -> ${l}`);let r=`www.${s}`;console.log(`Creating CNAME record for ${r} -> ${l}`);let a=await t.upsertRecord(s,{name:r,type:"CNAME",content:l,ttl:600});if(!a.success)console.warn(`Warning: Could not create www DNS record: ${a.message}`),console.warn("Please manually create a CNAME record:"),console.warn(` ${r} -> ${l}`);else console.log(`Created CNAME record: ${r} -> ${l}`)}else{console.log(`Creating CNAME record for ${s} -> ${l}`);let i=await t.upsertRecord(s,{name:s,type:"CNAME",content:l,ttl:600});if(!i.success)console.warn(`Warning: Could not create DNS record: ${i.message}`),console.warn("Please manually create a CNAME record:"),console.warn(` ${s} -> ${l}`);else console.log(`Created CNAME record: ${s} -> ${l}`)}}async function le(t){let{sourceDir:s,cleanBucket:l=!1,onProgress:e,...m}=t;e?.("infrastructure","Deploying CloudFormation stack...");let i=await G(m);if(!i.success)return i;if(l){e?.("clean","Cleaning old files from S3...");try{await new B(m.region||"us-east-1").emptyBucket(i.bucket)}catch(b){console.log(`Note: Could not clean bucket: ${b.message}`)}}e?.("upload","Uploading files to S3...");let{uploadStaticFiles:r}=await import("./chunk-
|
|
45
|
+
└─────────────────────────────────────────────────────────────────────────────┘`),{success:!1,stackId:O,stackName:i,bucket:y,message:"CloudFront account verification required. Please contact AWS Support."}}return{success:!1,stackId:O,stackName:i,bucket:y,message:`Stack deployment failed: ${o.message}`}}let u=(await r.describeStacks({stackName:i})).Stacks[0]?.Outputs||[],C=(o)=>u.find((n)=>n.OutputKey===o)?.OutputValue,f=C("DistributionDomain");if(f&&d)console.log(`Creating DNS records via ${d.name}...`),await q(d,e,f);else if(f&&!d)console.log("Skipping DNS record creation (DNS verification was skipped)");return{success:!0,stackId:O,stackName:i,bucket:C("BucketName")||y,distributionId:C("DistributionId"),distributionDomain:f,domain:e,certificateArn:b,message:"Static site infrastructure deployed successfully with external DNS"}}async function q(t,s,l){if(!t){console.log("Skipping DNS record creation (DNS verification was skipped)");return}if(s.split(".").length===2)if(t instanceof Z){console.log(`Creating Route53 alias record for apex domain ${s} -> ${l}`);let i=await t.createCloudFrontAlias({domain:s,name:s,cloudFrontDomainName:l});if(!i.success)console.warn(`Warning: Could not create Route53 alias record: ${i.message}`),console.warn("Please manually create an A-record alias in Route53:"),console.warn(` ${s} -> ${l}`);else console.log(`Created Route53 alias record: ${s} -> ${l}`);let r=`www.${s}`;console.log(`Creating Route53 alias record for ${r} -> ${l}`);let a=await t.createCloudFrontAlias({domain:s,name:r,cloudFrontDomainName:l});if(!a.success)console.warn(`Warning: Could not create www Route53 alias: ${a.message}`),console.warn("Please manually create an A-record alias in Route53:"),console.warn(` ${r} -> ${l}`);else console.log(`Created Route53 alias record: ${r} -> ${l}`)}else{try{let d=await t.listRecords(s,"A");if(d.success)for(let b of d.records){let k=b.name.replace(/\.$/,"");if(k===s||k==="")console.log(`Removing existing root A record (${b.content}) to make room for ALIAS...`),await t.deleteRecord(s,{name:s,type:"A",content:b.content})}}catch(d){console.log(`Note: Could not check for conflicting A records: ${d instanceof Error?d.message:d}`)}console.log(`Creating ALIAS record for apex domain ${s} -> ${l}`);let i=await t.upsertRecord(s,{name:s,type:"ALIAS",content:l,ttl:600});if(!i.success)console.warn(`Warning: Could not create ALIAS record: ${i.message}`),console.warn("Please manually create an ALIAS record in your DNS provider:"),console.warn(` ${s} -> ${l}`);else console.log(`Created ALIAS record: ${s} -> ${l}`);let r=`www.${s}`;console.log(`Creating CNAME record for ${r} -> ${l}`);let a=await t.upsertRecord(s,{name:r,type:"CNAME",content:l,ttl:600});if(!a.success)console.warn(`Warning: Could not create www DNS record: ${a.message}`),console.warn("Please manually create a CNAME record:"),console.warn(` ${r} -> ${l}`);else console.log(`Created CNAME record: ${r} -> ${l}`)}else{console.log(`Creating CNAME record for ${s} -> ${l}`);let i=await t.upsertRecord(s,{name:s,type:"CNAME",content:l,ttl:600});if(!i.success)console.warn(`Warning: Could not create DNS record: ${i.message}`),console.warn("Please manually create a CNAME record:"),console.warn(` ${s} -> ${l}`);else console.log(`Created CNAME record: ${s} -> ${l}`)}}async function le(t){let{sourceDir:s,cleanBucket:l=!1,onProgress:e,...m}=t;e?.("infrastructure","Deploying CloudFormation stack...");let i=await G(m);if(!i.success)return i;if(l){e?.("clean","Cleaning old files from S3...");try{await new B(m.region||"us-east-1").emptyBucket(i.bucket)}catch(b){console.log(`Note: Could not clean bucket: ${b.message}`)}}e?.("upload","Uploading files to S3...");let{uploadStaticFiles:r}=await import("./chunk-rd38qdnf.js"),a=await r({sourceDir:s,bucket:i.bucket,region:m.region||"us-east-1",cacheControl:m.cacheControl,onProgress:(b,k,R)=>{e?.("upload",`${b}/${k}: ${R}`)}});if(a.errors.length>0)return{...i,success:!1,message:`Upload errors: ${a.errors.join(", ")}`,filesUploaded:a.uploaded};if(i.distributionId&&a.uploaded>0){e?.("invalidate","Invalidating CloudFront cache...");let{invalidateCache:b}=await import("./chunk-rd38qdnf.js");await b(i.distributionId)}e?.("complete","Deployment complete!");let d=a.skipped>0?`Deployed ${a.uploaded} files (${a.skipped} unchanged) with external DNS`:`Deployed ${a.uploaded} files successfully with external DNS`;return{...i,filesUploaded:a.uploaded,filesSkipped:a.skipped,message:d}}function Q(t){let{bucketName:s,domain:l,certificateArn:e,hostedZoneId:m,defaultRootObject:i="index.html",errorDocument:r="404.html"}=t,a={},d={};a.S3Bucket={Type:"AWS::S3::Bucket",Properties:{BucketName:s,PublicAccessBlockConfiguration:{BlockPublicAcls:!0,BlockPublicPolicy:!1,IgnorePublicAcls:!0,RestrictPublicBuckets:!1},WebsiteConfiguration:{IndexDocument:i,ErrorDocument:r}}},d.BucketName={Description:"S3 Bucket Name",Value:{Ref:"S3Bucket"}},d.BucketArn={Description:"S3 Bucket ARN",Value:{"Fn::GetAtt":["S3Bucket","Arn"]}},a.CloudFrontOAC={Type:"AWS::CloudFront::OriginAccessControl",Properties:{OriginAccessControlConfig:{Name:`OAC-${s}`,Description:`OAC for ${s}`,OriginAccessControlOriginType:"s3",SigningBehavior:"always",SigningProtocol:"sigv4"}}},a.UrlRewriteFunction={Type:"AWS::CloudFront::Function",Properties:{Name:{"Fn::Sub":"${AWS::StackName}-url-rewrite"},AutoPublish:!0,FunctionConfig:{Comment:"Append .html extension to URLs without extensions",Runtime:"cloudfront-js-2.0"},FunctionCode:`function handler(event) {
|
|
46
46
|
const request = event.request;
|
|
47
47
|
var uri = request.uri;
|
|
48
48
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ct as ye}from"./chunk-z2qqwy7e.js";import{createRequire as Ln}from"node:module";import{isAbsolute as Gt,join as St,relative as Jn}from"node:path";import{existsSync as je,readdirSync as li}from"node:fs";import{join as Ae}from"node:path";import{createHash as Ii}from"node:crypto";import{copyFileSync as Ri,existsSync as Lt,readdirSync as Ni,readFileSync as st,statSync as Di,writeFileSync as ot}from"node:fs";import{basename as ki,dirname as ma,extname as pa,join as Ke}from"node:path";import{existsSync as Ya,readFileSync as zt}from"node:fs";import{homedir as Za}from"node:os";import{join as Xa}from"node:path";import{createHash as ar}from"node:crypto";import{existsSync as lt,mkdirSync as qs,readdirSync as Aa,readFileSync as Ca,unlinkSync as He,writeFileSync as zs}from"node:fs";import{join as xt}from"node:path";import{createHash as Qt}from"node:crypto";import{createReadStream as Qs,readdirSync as Js,statSync as At}from"node:fs";import{join as Ys,relative as Zs}from"node:path";import{deflateRawSync as Po}from"node:zlib";import{execSync as $o}from"node:child_process";import{createHash as Lo}from"node:crypto";import{cpSync as Mo,mkdtempSync as xo,rmSync as Oo,writeFileSync as Bo}from"node:fs";import{tmpdir as _o}from"node:os";import{dirname as Wo,isAbsolute as Go,join as Le,resolve as Fo}from"node:path";import{fileURLToPath as Vo}from"node:url";import{execFileSync as It}from"node:child_process";import{mkdtempSync as mn,readFileSync as Rt,rmSync as pn}from"node:fs";import{tmpdir as gn}from"node:os";import{dirname as Xo,join as ve}from"node:path";import{fileURLToPath as ec}from"node:url";import{AsyncLocalStorage as ac}from"node:async_hooks";import{createHash as rc}from"node:crypto";import{readFileSync as wc}from"node:fs";import{dirname as Ec,join as Tn}from"node:path";import{fileURLToPath as Pc}from"node:url";import{execFileSync as ut}from"node:child_process";import{existsSync as Nc,mkdirSync as Dc,mkdtempSync as kc,readdirSync as $c,readFileSync as Lc,rmSync as Mc,statSync as vn,writeFileSync as xc}from"node:fs";import{tmpdir as Oc}from"node:os";import{join as Me,relative as Bc}from"node:path";import{execSync as _c}from"node:child_process";import{createHash as Wc}from"node:crypto";import{readdirSync as Gc,readFileSync as Fc,statSync as En}from"node:fs";import{join as Vc,relative as Pn,resolve as da}from"node:path";var Mn=Object.defineProperty,xn=(e)=>e;function On(e,t){this[e]=xn.bind(null,t)}var De=(e,t)=>{for(var a in t)Mn(e,a,{get:t[a],enumerable:!0,configurable:!0,set:On.bind(t,a)})},Bn=(e,t)=>()=>(e&&(t=e(e=0)),t),_n=Ln(import.meta.url),Na={};De(Na,{clearSigningKeyCache:()=>Hn,createPresignedUrl:()=>Da,createPresignedUrlAsync:()=>Fn,detectServiceRegion:()=>jt,getSigningKeyCacheSize:()=>qn,isNodeCryptoAvailable:()=>zn,isWebCryptoAvailable:()=>Qn,makeAWSRequest:()=>Ba,makeAWSRequestAsync:()=>Un,makeAWSRequestOnce:()=>Vn,parseJSONResponse:()=>Kn,parseXMLResponse:()=>jn,signRequest:()=>K,signRequestAsync:()=>Kt});function jt(e){let t=typeof e==="string"?new URL(e):e,{hostname:a,pathname:r}=t;if(a.endsWith(".on.aws")){let o=a.match(/^[^.]+\.lambda-url\.([^.]+)\.on\.aws$/);if(o)return{service:"lambda",region:o[1]};return{service:"",region:""}}if(a.endsWith(".r2.cloudflarestorage.com"))return{service:"s3",region:"auto"};if(a.endsWith(".backblazeb2.com")){let o=a.match(/^(?:[^.]+\.)?s3\.([^.]+)\.backblazeb2\.com$/);if(o)return{service:"s3",region:o[1]};return{service:"",region:""}}let n=a.replace("dualstack.","").match(/([^.]+)\.(?:([^.]+)\.)?amazonaws\.com(?:\.cn)?$/);if(!n)return{service:"",region:""};let i=n[1],s=n[2]||"";if(s==="us-gov")s="us-gov-west-1";else if(s==="s3"||s==="s3-accelerate")s="us-east-1",i="s3";else if(i==="iot")if(a.startsWith("iot."))i="execute-api";else if(a.startsWith("data.jobs.iot."))i="iot-jobs-data";else i=r==="/mqtt"?"iotdevicegateway":"iotdata";else if(i==="autoscaling");else if(!s&&i.startsWith("s3-"))s=i.slice(3).replace(/^fips-|^external-1/,""),i="s3";else if(i.endsWith("-fips"))i=i.slice(0,-5);else if(s&&/-\d$/.test(i)&&!/-\d$/.test(s))[i,s]=[s,i];return i=Wa[i]||i,{service:i,region:s||"us-east-1"}}function K(e){let{method:t,url:a,body:r="",accessKeyId:n,secretAccessKey:i,sessionToken:s,signQuery:o=!1,expiresIn:c=86400,datetime:l}=e,u=new URL(a),m=u.hostname,p=jt(u),g=e.service||p.service,h=e.region||p.region;if(!g)throw Error("Could not detect service from URL. Please provide service explicitly.");if(!h)throw Error("Could not detect region from URL. Please provide region explicitly.");let y=l||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),b=y.substring(0,8),T=[b,h,g,"aws4_request"].join("/"),w="AWS4-HMAC-SHA256";if(o)return Wn({urlObj:u,method:t,body:r,accessKeyId:n,secretAccessKey:i,sessionToken:s,service:g,region:h,timestamp:y,date:b,credentialScope:T,algorithm:w,expiresIn:c,cache:e.cache});let S=u.pathname||"/",E=vt(u.searchParams),v={host:m,"x-amz-date":y,...e.headers};if(s)v["x-amz-security-token"]=s;let P=Object.keys(v).some((we)=>we.toLowerCase()==="content-type");if(r&&!P)v["content-type"]="application/x-amz-json-1.0";if(g==="s3"&&!v["x-amz-content-sha256"])v["x-amz-content-sha256"]=Ze(r);let N=ka(v),I=$a(v),D=v["x-amz-content-sha256"]||Ze(r),L=[t,wt(S),E,N,I,D].join(`
|
|
2
2
|
`),O=Ze(L),ce=[w,y,T,O].join(`
|
|
3
3
|
`),j=e.cache??ke,ae=Ma(i,b,h,g,ce,j),F=[`${w} Credential=${n}/${T}`,`SignedHeaders=${I}`,`Signature=${ae}`].join(", ");return v.authorization=F,{url:a,method:t,headers:v,body:r||void 0}}async function Kt(e){let{method:t,url:a,body:r="",accessKeyId:n,secretAccessKey:i,sessionToken:s,signQuery:o=!1,expiresIn:c=86400,datetime:l}=e,u=new URL(a),m=u.hostname,p=jt(u),g=e.service||p.service,h=e.region||p.region;if(!g)throw Error("Could not detect service from URL. Please provide service explicitly.");if(!h)throw Error("Could not detect region from URL. Please provide region explicitly.");let y=l||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),b=y.substring(0,8),T=[b,h,g,"aws4_request"].join("/"),w="AWS4-HMAC-SHA256";if(o)return Gn({urlObj:u,method:t,body:r,accessKeyId:n,secretAccessKey:i,sessionToken:s,service:g,region:h,timestamp:y,date:b,credentialScope:T,algorithm:w,expiresIn:c,cache:e.cache});let S=u.pathname||"/",E=vt(u.searchParams),v={host:m,"x-amz-date":y,...e.headers};if(s)v["x-amz-security-token"]=s;let P=Object.keys(v).some((Ge)=>Ge.toLowerCase()==="content-type");if(r&&!P)v["content-type"]="application/x-amz-json-1.0";let N=await ht(r);if(g==="s3"&&!v["x-amz-content-sha256"])v["x-amz-content-sha256"]=N;let I=ka(v),D=$a(v),L=v["x-amz-content-sha256"]||N,O=[t,wt(S),E,I,D,L].join(`
|
|
4
4
|
`),ce=await ht(O),j=[w,y,T,ce].join(`
|
|
@@ -7352,4 +7352,4 @@ php_admin_value[error_log] = /dev/stderr
|
|
|
7352
7352
|
php_admin_flag[log_errors] = on
|
|
7353
7353
|
clear_env = no
|
|
7354
7354
|
`}function Ic(){return Tn(Ec(Pc(import.meta.url)),"runtime-assets")}function Ra(){let e=Ic(),t=(a)=>wc(Tn(e,a),"utf-8");return[{path:"bootstrap",contents:t("bootstrap"),mode:493},{path:"tscloud/runtime.php",contents:t("runtime.php"),mode:420},{path:"tscloud/octane-runtime.php",contents:t("octane-runtime.php"),mode:420},{path:"tscloud/cli-runtime.php",contents:t("cli-runtime.php"),mode:420},{path:"tscloud/fastcgi-client.php",contents:t("fastcgi-client.php"),mode:420},{path:"tscloud/php-fpm.conf",contents:vc(),mode:420}]}function mp(e={}){let t=e.cacheDriver??"dynamodb";return{APP_ENV:"production",LOG_CHANNEL:"stderr",CACHE_STORE:t,CACHE_DRIVER:t,SESSION_DRIVER:t,QUEUE_CONNECTION:"sqs",FILESYSTEM_DISK:"s3",VIEW_COMPILED_PATH:"/tmp/storage/framework/views",APP_SERVICES_CACHE:"/tmp/bootstrap/cache/services.php",APP_PACKAGES_CACHE:"/tmp/bootstrap/cache/packages.php",APP_CONFIG_CACHE:"/tmp/bootstrap/cache/config.php",APP_ROUTES_CACHE:"/tmp/bootstrap/cache/routes.php",APP_EVENTS_CACHE:"/tmp/bootstrap/cache/events.php"}}var Rc=["composer install --no-dev --optimize-autoloader --no-interaction","php artisan config:cache","php artisan route:cache","php artisan event:cache","php artisan view:cache"];function*wn(e){for(let t of $c(e)){let a=Me(e,t);if(vn(a).isDirectory())yield*wn(a);else yield a}}function fp(e={}){let t=e.architecture??"x86_64",a=e.platform??(t==="arm64"?"linux/arm64":"linux/amd64"),r=e.onStep??(()=>{}),n=kc(Me(Oc(),"tscloud-php-layer-")),i="tscloud-php-layer:build";try{xc(Me(n,"Dockerfile"),Zo(e)),r("Building PHP runtime image (docker)"),ut("docker",["build","--platform",a,"-t","tscloud-php-layer:build",n],{stdio:"inherit"}),r("Extracting /opt/php from image");let s=ut("docker",["create","--platform",a,"tscloud-php-layer:build"],{encoding:"utf-8"}).trim(),o=Me(n,"opt");Dc(o,{recursive:!0});try{ut("docker",["cp",`${s}:/opt/php`,Me(o,"php")],{stdio:"inherit"})}finally{ut("docker",["rm",s],{stdio:"ignore"})}if(!Nc(Me(o,"php","bin","php")))throw Error("layer build produced no /opt/php/bin/php");let c=[];for(let m of wn(o)){let p=Bc(o,m).replace(/\\/g,"/"),g=vn(m).mode&73?493:420;c.push({name:p,data:Lc(m),mode:g})}r("Injecting runtime assets");let l=new Set(Ra().map((m)=>m.path)),u=c.filter((m)=>!l.has(m.name));for(let m of Ra())u.push({name:m.path,data:m.contents,mode:m.mode});return r("Packaging layer ZIP"),{zip:rt(u),architecture:t,fileCount:u.length}}finally{Mc(n,{recursive:!0,force:!0})}}var Uc=[".git",".github","node_modules","tests","storage/logs","storage/framework/cache","storage/framework/sessions","storage/framework/views",".env",".env.local",".vapor",".ts-cloud","dist-lambda"];function jc(e,t){return t.some((a)=>e===a||e.startsWith(`${a}/`))}function*In(e,t,a){for(let r of Gc(e)){let n=Vc(e,r),i=Pn(t,n).replace(/\\/g,"/");if(jc(i,a))continue;if(En(n).isDirectory())yield*In(n,t,a);else yield n}}function Kc(e){if(e.skipBuild)return;let t=da(e.projectRoot??process.cwd()),a=e.app.build??Rc;for(let r of a)e.onStep?.(`build: ${r}`),_c(r,{stdio:"inherit",cwd:t})}function Hc(e,t=[]){let a=da(e),r=[...Uc,Et(),...t],n=[];for(let i of In(a,a,r)){let s=Pn(a,i).replace(/\\/g,"/"),o=(En(i).mode&73)!==0;n.push({name:s,data:Fc(i),mode:o?493:420})}return n}function Tp(e){let t=da(e.projectRoot??process.cwd());Kc(e),e.onStep?.("packaging application tree");let a=Hc(t,e.exclude);if(!a.length)throw Error(`No files to package under ${t}`);let r=rt(a),n=e.app.handlers?.http??"public/index.php";return{zip:r,sha256:Wc("sha256").update(r).digest("hex"),handlers:{http:n,queue:e.app.handlers?.queue??n,cli:e.app.handlers?.cli??n},fileCount:a.length}}class Rn{optimizations=new Map;imageConfigs=new Map;ssgConfigs=new Map;prerenderConfigs=new Map;counter=0;createAssetOptimization(e){let t=`asset-opt-${Date.now()}-${this.counter++}`,a={id:t,...e};return this.optimizations.set(t,a),a}createImageOptimization(e){let t=`image-opt-${Date.now()}-${this.counter++}`,a={id:t,...e};return this.imageConfigs.set(t,a),a}createSSGConfig(e){let t=`ssg-${Date.now()}-${this.counter++}`,a={id:t,...e};return this.ssgConfigs.set(t,a),a}createPrerenderConfig(e){let t=`prerender-${Date.now()}-${this.counter++}`,a={id:t,...e};return this.prerenderConfigs.set(t,a),a}listOptimizations(){return Array.from(this.optimizations.values())}listImageConfigs(){return Array.from(this.imageConfigs.values())}clear(){this.optimizations.clear(),this.imageConfigs.clear(),this.ssgConfigs.clear(),this.prerenderConfigs.clear()}}var vp=new Rn;class Nn{policies=new Map;versioningConfigs=new Map;replicationRules=new Map;tieringConfigs=new Map;objectLocks=new Map;transferAcceleration=new Map;accessPoints=new Map;glacierConfigs=new Map;inventories=new Map;batchOps=new Map;eventNotifications=new Map;counter=0;createLifecyclePolicy(e,t){let a=`lifecycle-${Date.now()}-${this.counter++}`,r={id:a,transitions:e,expiration:t};return this.policies.set(a,r),r}enableVersioning(e=!1){let t=`versioning-${Date.now()}-${this.counter++}`,a={id:t,enabled:!0,mfaDelete:e};return this.versioningConfigs.set(t,a),a}createReplicationRule(e,t,a){let r=`replication-${Date.now()}-${this.counter++}`,n={id:r,sourceRegion:e,destRegion:t,destBucket:a};return this.replicationRules.set(r,n),n}createIntelligentTiering(e,t){let a=`tiering-${Date.now()}-${this.counter++}`,r={id:a,archiveDays:e,deepArchiveDays:t};return this.tieringConfigs.set(a,r),r}enableObjectLock(e){let t=`object-lock-${Date.now()}-${this.counter++}`,a={id:t,bucketName:e.bucketName,mode:e.mode||"COMPLIANCE",retentionDays:e.retentionDays,retentionYears:e.retentionYears,legalHoldEnabled:e.legalHoldEnabled||!1};return this.objectLocks.set(t,a),a}enableTransferAcceleration(e){let t=`transfer-accel-${Date.now()}-${this.counter++}`,a={id:t,bucketName:e,enabled:!0,endpoint:`${e}.s3-accelerate.amazonaws.com`};return this.transferAcceleration.set(t,a),a}createAccessPoint(e){let t=`access-point-${Date.now()}-${this.counter++}`,a={id:t,name:e.name,bucketName:e.bucketName,vpcId:e.vpcId,publicAccessBlock:e.publicAccessBlock!==!1,policy:e.policy};return this.accessPoints.set(t,a),a}createGlacierArchive(e){let t=`glacier-${Date.now()}-${this.counter++}`,a={id:t,bucketName:e.bucketName,archiveType:e.archiveType,transitionDays:e.transitionDays,restoreConfig:e.restoreTier?{tier:e.restoreTier,days:e.restoreDays||7}:void 0};return this.glacierConfigs.set(t,a),a}createInventory(e){let t=`inventory-${Date.now()}-${this.counter++}`,a={id:t,sourceBucket:e.sourceBucket,destinationBucket:e.destinationBucket,schedule:e.schedule||"Daily",format:e.format||"CSV",includedFields:e.includedFields||["Size","LastModifiedDate","StorageClass","ETag"],prefix:e.prefix};return this.inventories.set(t,a),a}createBatchOperation(e){let t=`batch-op-${Date.now()}-${this.counter++}`,a={id:t,operation:e.operation,manifestBucket:e.manifestBucket,manifestKey:e.manifestKey,priority:e.priority||10,status:"pending"};return this.batchOps.set(t,a),a}executeBatchOperation(e){let t=this.batchOps.get(e);if(!t)throw Error(`Batch operation not found: ${e}`);return t.status="in_progress",t.totalObjects=1000,t.processedObjects=0,t}getBatchOperationStatus(e){return this.batchOps.get(e)}createLambdaNotification(e){let t=`event-${Date.now()}-${this.counter++}`,a={id:t,bucketName:e.bucketName,events:e.events,destination:{type:"Lambda",arn:e.lambdaArn},filter:e.prefix||e.suffix?{prefix:e.prefix,suffix:e.suffix}:void 0};return this.eventNotifications.set(t,a),a}createSQSNotification(e){let t=`event-${Date.now()}-${this.counter++}`,a={id:t,bucketName:e.bucketName,events:e.events,destination:{type:"SQS",arn:e.queueArn},filter:e.prefix||e.suffix?{prefix:e.prefix,suffix:e.suffix}:void 0};return this.eventNotifications.set(t,a),a}createSNSNotification(e){let t=`event-${Date.now()}-${this.counter++}`,a={id:t,bucketName:e.bucketName,events:e.events,destination:{type:"SNS",arn:e.topicArn},filter:e.prefix||e.suffix?{prefix:e.prefix,suffix:e.suffix}:void 0};return this.eventNotifications.set(t,a),a}generateObjectLockCF(e){let t={ObjectLockEnabled:"Enabled",ObjectLockConfiguration:{ObjectLockEnabled:"Enabled",Rule:{DefaultRetention:{Mode:e.mode}}}};if(e.retentionDays)t.ObjectLockConfiguration.Rule.DefaultRetention.Days=e.retentionDays;if(e.retentionYears)t.ObjectLockConfiguration.Rule.DefaultRetention.Years=e.retentionYears;return t}generateTransferAccelerationCF(e){return{AccelerateConfiguration:{AccelerationStatus:e.enabled?"Enabled":"Suspended"}}}generateAccessPointCF(e){return{Type:"AWS::S3::AccessPoint",Properties:{Name:e.name,Bucket:e.bucketName,...e.vpcId&&{VpcConfiguration:{VpcId:e.vpcId}},PublicAccessBlockConfiguration:e.publicAccessBlock?{BlockPublicAcls:!0,BlockPublicPolicy:!0,IgnorePublicAcls:!0,RestrictPublicBuckets:!0}:void 0,...e.policy&&{Policy:e.policy}}}}generateInventoryCF(e){return{Type:"AWS::S3::Bucket",Properties:{InventoryConfigurations:[{Id:e.id,Destination:{BucketArn:`arn:aws:s3:::${e.destinationBucket}`,Format:e.format},Enabled:!0,IncludedObjectVersions:"Current",OptionalFields:e.includedFields,ScheduleFrequency:e.schedule,...e.prefix&&{Prefix:e.prefix}}]}}}generateEventNotificationCF(e){let t=e.destination.type==="Lambda"?"LambdaConfigurations":e.destination.type==="SQS"?"QueueConfigurations":"TopicConfigurations",a=e.destination.type==="Lambda"?"Function":e.destination.type==="SQS"?"Queue":"Topic",r={Event:e.events[0],[a]:e.destination.arn};if(e.filter)r.Filter={S3Key:{Rules:[...e.filter.prefix?[{Name:"prefix",Value:e.filter.prefix}]:[],...e.filter.suffix?[{Name:"suffix",Value:e.filter.suffix}]:[]]}};return{NotificationConfiguration:{[t]:[r]}}}clear(){this.policies.clear(),this.versioningConfigs.clear(),this.replicationRules.clear(),this.tieringConfigs.clear(),this.objectLocks.clear(),this.transferAcceleration.clear(),this.accessPoints.clear(),this.glacierConfigs.clear(),this.inventories.clear(),this.batchOps.clear(),this.eventNotifications.clear()}}var wp=new Nn;class Dn{checks=new Map;synthetics=new Map;uptimeTrackers=new Map;counter=0;createHealthCheck(e,t=30,a=10){let r=`health-${Date.now()}-${this.counter++}`,n={id:r,url:e,interval:t,timeout:a,status:"healthy"};return this.checks.set(r,n),n}createSyntheticMonitor(e,t,a,r){let n=`synthetic-${Date.now()}-${this.counter++}`,i={id:n,name:e,script:t,frequency:a,locations:r};return this.synthetics.set(n,i),i}trackUptime(e,t,a){let r=`uptime-${Date.now()}-${this.counter++}`,n=t/(t+a)*100,i={id:r,resource:e,uptime:t,downtime:a,availability:n};return this.uptimeTrackers.set(r,i),i}clear(){this.checks.clear(),this.synthetics.clear(),this.uptimeTrackers.clear()}}var Ep=new Dn;class kn{wafRules=new Map;shieldProtections=new Map;securityGroups=new Map;nacls=new Map;counter=0;createWAFRule(e,t,a,r){let n=`waf-${Date.now()}-${this.counter++}`,i={id:n,name:e,priority:t,action:a,conditions:r};return this.wafRules.set(n,i),i}enableShield(e,t="standard"){let a=`shield-${Date.now()}-${this.counter++}`,r={id:a,resourceArn:e,protectionType:t};return this.shieldProtections.set(a,r),r}createSecurityGroup(e,t,a){let r=`sg-${Date.now()}-${this.counter++}`,n={id:r,name:e,vpcId:t,rules:a};return this.securityGroups.set(r,n),n}createNACL(e,t){let a=`nacl-${Date.now()}-${this.counter++}`,r={id:a,vpcId:e,rules:t};return this.nacls.set(a,r),r}clear(){this.wafRules.clear(),this.shieldProtections.clear(),this.securityGroups.clear(),this.nacls.clear()}}var Pp=new kn;class $n{strategies=new Map;allocations=new Map;groups=new Map;counter=0;createTaggingStrategy(e,t){let a=`tagging-${Date.now()}-${this.counter++}`,r={id:a,tags:e,resources:t};return this.strategies.set(a,r),r}createCostAllocation(e,t){let a=`cost-${Date.now()}-${this.counter++}`,r={id:a,tagKey:e,allocations:t};return this.allocations.set(a,r),r}createResourceGroup(e,t,a){let r=`group-${Date.now()}-${this.counter++}`,n={id:r,name:e,query:{resourceTypeFilters:t,tagFilters:a}};return this.groups.set(r,n),n}clear(){this.strategies.clear(),this.allocations.clear(),this.groups.clear()}}var Ip=new $n;
|
|
7355
|
-
export{jt as
|
|
7355
|
+
export{jt as Bl,K as Cl,Kt as Dl,Da as El,Fn as Fl,Ba as Gl,Vn as Hl,Un as Il,jn as Jl,Kn as Kl,Hn as Ll,qn as Ml,zn as Nl,Qn as Ol,zc as Pl,Qc as Ql,Ga as Rl,Yn as Sl,Yc as Tl,Et as Ul,Zn as Vl,Xn as Wl,Zc as Xl,Va as Yl,Xc as Zl,el as _l,tl as $l,ti as am,al as bm,rl as cm,nl as dm,il as em,ni as fm,sl as gm,A as hm,f as im,ol as jm,cl as km,ll as lm,ul as mm,dl as nm,ml as om,pl as pm,gl as qm,hl as rm,yl as sm,ii as tm,si as um,fl as vm,Sl as wm,Pe as xm,pe as ym,ne as zm,q as Am,G as Bm,k as Cm,B as Dm,qe as Em,_ as Fm,ui as Gm,ge as Hm,se as Im,Te as Jm,Cl as Km,yi as Lm,z as Mm,vi as Nm,dt as Om,Ft as Pm,wi as Qm,ie as Rm,Ei as Sm,ee as Tm,Pi as Um,Ha as Vm,Q as Wm,J as Xm,U as Ym,ze as Zm,W as _m,Qe as $m,mt as an,Y as bn,d as cn,bt as dn,El as en,qa as fn,Pl as gn,Il as hn,Rl as in,Nl as jn,Dl as kn,kl as ln,$l as mn,Ll as nn,Ml as on,xl as pn,Ol as qn,Bl as rn,_l as sn,Wl as tn,Gl as un,Fl as vn,Vl as wn,Ul as xn,ys as yn,fs as zn,As as An,Cs as Bn,Ts as Cn,vs as Dn,ws as En,Es as Fn,Ja as Gn,ya as Hn,Ps as In,Is as Jn,jl as Kn,fa as Ln,Kl as Mn,Hl as Nn,We as On,ql as Pn,zl as Qn,Ql as Rn,Jl as Sn,Yl as Tn,Zl as Un,Rs as Vn,Ns as Wn,ks as Xn,$s as Yn,Ls as Zn,Pt as _n,au as $n,Ms as ao,xs as bo,Os as co,Z as do,ru as eo,fe as fo,pt as go,Ie as ho,Vs as io,tr as jo,Us as ko,js as lo,Ks as mo,ba as no,te as oo,nu as po,iu as qo,su as ro,ou as so,Hs as to,cu as uo,H as vo,lu as wo,uu as xo,du as yo,rr as zo,nr as Ao,hu as Bo,ir as Co,sr as Do,bu as Eo,Au as Fo,Cu as Go,Tu as Ho,vu as Io,Xs as Jo,Jt as Ko,wu as Lo,Eu as Mo,Pu as No,Iu as Oo,Ru as Po,eo as Qo,to as Ro,Nu as So,Du as To,ku as Uo,$u as Vo,Lu as Wo,Mu as Xo,xu as Yo,Ou as Zo,Bu as _o,cr as $o,Yt as ap,_u as bp,Wu as cp,Gu as dp,Fu as ep,lr as fp,ur as gp,dr as hp,Vu as ip,mr as jp,Uu as kp,ju as lp,Ku as mp,Hu as np,pr as op,qu as pp,zu as qp,Qu as rp,Ju as sp,Yu as tp,Zu as up,Xu as vp,ed as wp,io as xp,so as yp,oo as zp,co as Ap,hr as Bp,td as Cp,ad as Dp,rd as Ep,nd as Fp,id as Gp,sd as Hp,od as Ip,cd as Jp,ld as Kp,mo as Lp,po as Mp,go as Np,ho as Op,ud as Pp,dd as Qp,yr as Rp,md as Sp,fr as Tp,Sr as Up,br as Vp,Ar as Wp,pd as Xp,gd as Yp,hd as Zp,yd as _p,oe as $p,Ye as aq,fd as bq,Sd as cq,bd as dq,Ad as eq,Cd as fq,Td as gq,vd as hq,wd as iq,So as jq,Ed as kq,Pd as lq,Cr as mq,Tr as nq,Id as oq,Rd as pq,bo as qq,Nd as rq,Dd as sq,kd as tq,$d as uq,Ld as vq,Md as wq,xd as xq,Od as yq,Bd as zq,_d as Aq,Wd as Bq,Gd as Cq,Fd as Dq,Vd as Eq,Ud as Fq,jd as Gq,Kd as Hq,Hd as Iq,qd as Jq,zd as Kq,Qd as Lq,vr as Mq,Jd as Nq,wr as Oq,Yd as Pq,Er as Qq,Zd as Rq,Pr as Sq,Xd as Tq,Ir as Uq,em as Vq,xe as Wq,tm as Xq,Rr as Yq,am as Zq,Ct as _q,rm as $q,Nr as ar,nm as br,Dr as cr,im as dr,kr as er,sm as fr,$r as gr,om as hr,Lr as ir,cm as jr,Oe as kr,lm as lr,Mr as mr,um as nr,xr as or,dm as pr,Or as qr,mm as rr,Br as sr,pm as tr,_r as ur,gm as vr,Wr as wr,hm as xr,Gr as yr,ym as zr,Fr as Ar,fm as Br,Vr as Cr,Sm as Dr,Ur as Er,bm as Fr,jr as Gr,Am as Hr,Kr as Ir,Cm as Jr,Hr as Kr,Tm as Lr,qr as Mr,vm as Nr,zr as Or,wm as Pr,Qr,Em as Rr,Jr as Sr,Pm as Tr,Yr as Ur,Im as Vr,Zr as Wr,Rm as Xr,Xr as Yr,Nm as Zr,en as _r,Dm as $r,tn as as,km as bs,an as cs,$m as ds,rn as es,Lm as fs,nn as gs,Mm as hs,Ao as is,Co as js,wo as ks,Eo as ls,sn as ms,xm as ns,on as os,Om as ps,cn as qs,Bm as rs,ln as ss,_m as ts,rt as us,ko as vs,Ko as ws,Ho as xs,Hm as ys,qm as zs,qo as As,Qo as Bs,un as Cs,zm as Ds,Qm as Es,Jo as Fs,Yo as Gs,dn as Hs,Zo as Is,Jm as Js,yn as Ks,ap as Ls,rp as Ms,va as Ns,wa as Os,Ea as Ps,nc as Qs,ua as Rs,ic as Ss,sc as Ts,An as Us,oc as Vs,cc as Ws,Cn as Xs,uc as Ys,dc as Zs,mc as _s,sp as $s,pc as at,gc as bt,op as ct,Sc as dt,Ia as et,bc as ft,Cc as gt,Tc as ht,cp as it,vc as jt,Ra as kt,mp as lt,Rc as mt,fp as nt,Uc as ot,Kc as pt,Hc as qt,Tp as rt,Rn as st,vp as tt,Nn as ut,wp as vt,Dn as wt,Ep as xt,kn as yt,Pp as zt,$n as At,Ip as Bt};
|
package/dist/deploy/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ac as Z,Bc as aa,Cc as ba,Dc as ca,Ec as da,Fc as ea,Gc as fa,Hc as ga,Ic as ha,Jc as ia,Kc as ja,Lc as ka,Mc as la,Nc as ma,Oc as na,ic as y,jc as z,kc as A,lc as B,mc as C,nc as D,oc as E,od as oa,pc as O,pd as pa,qc as P,qd as qa,rc as Q,rd as ra,sc as R,tc as S,uc as T,vc as U,wc as V,xc as W,yc as X,zc as Y}from"../chunk-
|
|
1
|
+
import{Ac as Z,Bc as aa,Cc as ba,Dc as ca,Ec as da,Fc as ea,Gc as fa,Hc as ga,Ic as ha,Jc as ia,Kc as ja,Lc as ka,Mc as la,Nc as ma,Oc as na,ic as y,jc as z,kc as A,lc as B,mc as C,nc as D,oc as E,od as oa,pc as O,pd as pa,qc as P,qd as qa,rc as Q,rd as ra,sc as R,tc as S,uc as T,vc as U,wc as V,xc as W,yc as X,zc as Y}from"../chunk-ywjkyg8p.js";import{Ad as N,sd as F,td as G,ud as H,vd as I,wd as J,xd as K,yd as L,zd as M}from"../chunk-zam6ecam.js";import{Id as _}from"../chunk-dr4pj8hp.js";import"../chunk-q0rc1ax9.js";import"../chunk-kasdm9tx.js";import"../chunk-by2bwzk6.js";import"../chunk-73ztr55z.js";import"../chunk-xcj8zfmg.js";import"../chunk-tz9myq9a.js";import"../chunk-y4xkj2f1.js";import{Gh as s,Hh as t,Ih as u,Jh as v,Kh as w,Lh as x,Uf as a,Vf as b,Wf as c,Xf as d,Yf as e,Zf as f,_f as g,jg as h,kg as i,lg as j,mg as k,ng as l,og as m,pg as n,qg as o,rg as p,sg as q,tg as r}from"../chunk-aw0spg20.js";import"../chunk-aj025v2s.js";import"../chunk-wavjkdb8.js";import"../chunk-nk7sav4r.js";import"../chunk-mz0dk78z.js";import"../chunk-aw0cgv5w.js";import"../chunk-hn40z11p.js";import"../chunk-x3hay61c.js";import"../chunk-zz52xje8.js";import"../chunk-z2qqwy7e.js";export{d as IPV6_EXCLUDED_HOST_LABELS,s as MANAGEMENT_DASHBOARD_SITE,Z as buildAndPushContainerImage,_ as buildAndPushServerlessImage,ba as buildFunctionEnv,x as buildManagementDashboardArtifact,ha as buildServerTopology,ia as buildServerlessTopology,ja as buildTopology,na as collectEgressMetrics,a as collectServerDnsDomains,Y as createContainerImageDependencies,T as createExistingStaticFullStackDependencies,P as createStaticApiOriginDependencies,pa as dashboardActions,t as dashboardCredentialsFile,C as dashboardPageRoutes,M as deleteStaticSite,V as deployExistingStaticFullStack,ca as deployServerlessApp,r as deployShipsFiles,O as deploySite,Q as deployStaticApiOrigin,J as deployStaticSite,N as deployStaticSiteFull,G as deployStaticSiteWithExternalDns,H as deployStaticSiteWithExternalDnsFull,la as egressReportMetrics,y as ensureDashboardActor,w as ensureManagementDashboard,W as estimateExistingStaticFullStackMonthlyCost,S as estimateStaticApiOriginMonthlyCost,ma as fetchEgressReport,U as generateExistingStaticFullStackTemplate,F as generateExternalDnsStaticSiteTemplate,I as generateStaticSiteTemplate,n as hasComputeConfigured,k as hasProxyUpstream,X as hashContainerContext,e as hostAcceptsIpv6,aa as infraEnvFromOutputs,z as initializeDashboardControlPlane,L as invalidateCache,i as isPhpSite,c as normalizePublicIpv6,f as reconcileAddressRecords,da as redeployServerlessApp,b as removeStaleServerAddressRecords,qa as resolveDashboardAction,u as resolveDashboardAuth,ka as resolveDashboardData,D as resolveLegacyDashboardRoute,j as resolveProxyUpstreams,l as resolveSiteDeployTarget,m as resolveSiteKind,v as resolveUiSource,ea as rollbackServerlessApp,E as routesForDashboard,ga as runRemoteCommand,oa as sanitizeCloudConfig,fa as setMaintenance,p as shipsARelease,q as shipsToBucket,h as siteInstallBase,ra as startLocalDashboardServer,A as synchronizeDashboardUsers,B as trackDashboardOperation,K as uploadStaticFiles,o as validateDeploymentConfig,g as verifyAddressRecord,R as verifyStaticApiOrigin};
|
package/dist/dns/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Af as e,Bf as f,Cf as g,Df as h,Ef as i,Ff as j,Gf as k,Hf as l,If as m,Jf as n,Kf as o,Lf as p,Mf as q,Nf as r,Of as s,Pf as t,Qf as u,vf as a,wf as b,xf as c,zf as d}from"../chunk-
|
|
1
|
+
import{Af as e,Bf as f,Cf as g,Df as h,Ef as i,Ff as j,Gf as k,Hf as l,If as m,Jf as n,Kf as o,Lf as p,Mf as q,Nf as r,Of as s,Pf as t,Qf as u,vf as a,wf as b,xf as c,zf as d}from"../chunk-tz9myq9a.js";import"../chunk-y4xkj2f1.js";import"../chunk-mz0dk78z.js";import"../chunk-z2qqwy7e.js";export{d as CloudflareProvider,t as DnsProviderFactory,c as GoDaddyProvider,a as PROXIABLE_RECORD_TYPES,b as PorkbunProvider,i as Route53Provider,n as UnifiedDnsValidator,l as applyZoneMigration,r as createDnsProvider,p as createGoDaddyValidator,o as createPorkbunValidator,q as createRoute53Validator,s as detectDnsProvider,u as dnsProviders,j as exportRoute53Zone,k as planZoneMigration,e as policyTag,f as qualifyName,h as reconcileDeclaredRecords,g as resolveDeclaredRecords,m as verifyZoneParity};
|
package/dist/drivers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$g as
|
|
1
|
+
import{$g as G,Ag as g,Ah as ea,Bg as h,Bh as fa,Cg as i,Ch as ga,Dg as j,Dh as ha,Eg as k,Eh as ia,Fg as l,Fh as ja,Gg as m,Hg as n,Ig as o,Kg as p,Lg as q,Mg as r,Ng as s,Nh as ka,Og as t,Oh as la,Pg as u,Ph as ma,Qg as v,Qh as na,Rg as w,Rh as oa,Sg as x,Sh as pa,Tg as y,Th as qa,Ug as z,Uh as ra,Vg as A,Wg as B,Xg as C,Yg as D,Zg as E,_g as F,ah as H,bh as I,ch as J,dh as K,eh as L,fh as M,gh as N,hh as O,ih as P,jh as Q,kh as R,lh as S,mh as T,nh as U,oh as V,ph as W,qh as X,rh as Y,sh as Z,th as _,ug as a,uh as aa,vg as b,vh as ba,wg as c,wh as ca,xg as d,yg as e,zg as f,zh as da}from"../chunk-aw0spg20.js";import"../chunk-aj025v2s.js";import"../chunk-wavjkdb8.js";import"../chunk-nk7sav4r.js";import"../chunk-mz0dk78z.js";import"../chunk-hn40z11p.js";import"../chunk-x3hay61c.js";import"../chunk-zz52xje8.js";import"../chunk-z2qqwy7e.js";export{ba as AwsBoxProvisioner,o as AwsDriver,x as CloudDriverFactory,a as DEFAULT_RPX_CERTS_DIR,aa as HetznerBoxProvisioner,p as HetznerClient,t as HetznerDriver,u as LocalBoxDriver,pa as MANAGED_CACHE_POLICY_DISABLED,oa as MANAGED_CACHE_POLICY_OPTIMIZED,qa as MANAGED_ORIGIN_REQUEST_POLICY_ALL_VIEWER,i as RPX_DIR,j as RPX_LAUNCHER_PATH,k as RPX_SERVICE_NAME,Z as UBUNTU_2404_AMI_PARAM,U as acquireResizeLock,N as applyHetznerHostOptimization,ha as buildAwsArtifactFetch,_ as buildBoxUserData,ra as buildCloudFrontOriginConfig,M as buildHetznerHostOptimizationScript,ja as buildHostCleanupScript,ia as buildLocalArtifactFetch,f as buildRpxConfig,m as buildRpxFragmentRefreshScript,g as buildRpxLbConfig,l as buildRpxProvisionScript,ea as buildSiteDeployScript,C as buildSshArgs,fa as buildStaticSiteDeployScript,y as cloudDrivers,O as collectHetznerHostOptimizationReport,I as collectHetznerResizeManifest,ca as createBoxProvisioner,w as createCloudDriver,la as deployAllComputeSites,ka as deploySiteRelease,e as deriveRouteId,W as ensureFirewall,X as ensureServer,V as ensureSshKey,B as executeHetznerServerResize,c as gatewayHostnames,n as generateUbuntuAppCloudInit,b as hasAutoWwwVariant,v as isBoxMode,A as isHetznerCapacityError,d as normalizeRoutePath,r as normalizeSshPublicKey,z as planHetznerServerResize,J as prepareHetznerResize,S as readResizeCheckpoint,ga as releaseTarballTmpPath,ma as reloadRpxGateway,h as renderRpxLauncher,na as renewRpxCertificates,Q as resizeCheckpointPath,R as resizeLockPath,da as resolveExecStart,q as resolveHetznerApiToken,L as resolveHetznerHostOptimizationPlan,F as scpUpload,Y as serverPublicIpv4,D as sshExec,E as sshExecOrThrow,P as verifyHetznerHostOptimization,K as verifyHetznerResize,H as waitForCloudInit,G as waitForSsh,s as wrapCloudInitUserData,T as writeResizeCheckpoint};
|
|
@@ -16,6 +16,30 @@ import type { SharedPathEntry } from '@ts-cloud/core';
|
|
|
16
16
|
* systemd ExecStart by swapping the leading runtime word for its absolute path.
|
|
17
17
|
*/
|
|
18
18
|
export declare function resolveExecStart(start: string, runtime: 'bun' | 'node' | 'deno'): string;
|
|
19
|
+
/**
|
|
20
|
+
* Shell that installs a recurring liveness check for one ported service.
|
|
21
|
+
*
|
|
22
|
+
* Three files: a check script, a oneshot service that runs it, and a timer.
|
|
23
|
+
* The script resolves the unit to probe at run time rather than baking in a
|
|
24
|
+
* release id, so it keeps working after the next deploy replaces the instance.
|
|
25
|
+
*
|
|
26
|
+
* `curl` without `-f`: any HTTP response means the process is answering, and a
|
|
27
|
+
* 404 on `/` is a routing opinion, not a wedged event loop. Only a connection
|
|
28
|
+
* failure or a timeout counts against it.
|
|
29
|
+
*
|
|
30
|
+
* A restart needs N consecutive failures, counted in a file under /run, so a
|
|
31
|
+
* single slow moment cannot bounce a healthy service; the counter resets on the
|
|
32
|
+
* first good response. flock keeps two ticks from overlapping.
|
|
33
|
+
*/
|
|
34
|
+
export declare function buildLivenessUnits(options: {
|
|
35
|
+
unitBase: string;
|
|
36
|
+
/** systemd unit to restart. A `<base>@*.service` glob resolves at run time. */
|
|
37
|
+
unitPattern: string;
|
|
38
|
+
port: number;
|
|
39
|
+
path?: string;
|
|
40
|
+
intervalSeconds?: number;
|
|
41
|
+
failuresBeforeRestart?: number;
|
|
42
|
+
}): string[];
|
|
19
43
|
export interface BuildSiteDeployScriptOptions {
|
|
20
44
|
siteName: string;
|
|
21
45
|
slug: string;
|
|
@@ -74,6 +98,31 @@ export interface BuildSiteDeployScriptOptions {
|
|
|
74
98
|
* @default 5
|
|
75
99
|
*/
|
|
76
100
|
healthGateSeconds?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Recurring liveness check for a ported site: a timer that asks the service
|
|
103
|
+
* for an HTTP response and restarts it when it stops answering.
|
|
104
|
+
*
|
|
105
|
+
* `Restart=always` only covers a process that EXITS. A process that is alive
|
|
106
|
+
* and no longer serving is invisible to systemd: it reports `active`, the
|
|
107
|
+
* port stays bound, and connections pile up in the accept backlog. One app
|
|
108
|
+
* on a shared box sat like that for eight days with `active (running)` and
|
|
109
|
+
* 46 queued connections, and nothing anywhere noticed.
|
|
110
|
+
*
|
|
111
|
+
* The probe is an HTTP request rather than a listener check for that exact
|
|
112
|
+
* reason — `ss` would have called the wedged process healthy.
|
|
113
|
+
*
|
|
114
|
+
* Set `false` to opt out (a service that legitimately answers nothing on its
|
|
115
|
+
* port, or one where a restart is more dangerous than an outage).
|
|
116
|
+
* @default enabled, `/` every 60s, restart after 3 consecutive failures
|
|
117
|
+
*/
|
|
118
|
+
liveness?: false | {
|
|
119
|
+
/** Path to request. @default '/' */
|
|
120
|
+
path?: string;
|
|
121
|
+
/** Seconds between checks. @default 60 */
|
|
122
|
+
intervalSeconds?: number;
|
|
123
|
+
/** Consecutive failures before a restart. @default 3 */
|
|
124
|
+
failuresBeforeRestart?: number;
|
|
125
|
+
};
|
|
77
126
|
/**
|
|
78
127
|
* systemd `MemoryHigh` for the app unit. See {@link SiteConfig.memoryHigh}.
|
|
79
128
|
* @default '2G'
|
|
@@ -61,7 +61,7 @@ export declare function buildMailEnvFile(mail: ResolvedMailService): string;
|
|
|
61
61
|
export declare function buildMailUnit(mail: ResolvedMailService): string;
|
|
62
62
|
/** A DNS record an operator has to publish for mail to work. */
|
|
63
63
|
export interface MailDnsRecord {
|
|
64
|
-
type: 'MX' | 'TXT' | 'CNAME';
|
|
64
|
+
type: 'MX' | 'TXT' | 'CNAME' | 'A';
|
|
65
65
|
/** Record name, e.g. `example.com` or `default._domainkey.example.com`. */
|
|
66
66
|
name: string;
|
|
67
67
|
/**
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTA-STS — the policy that tells other mail servers TLS is not optional.
|
|
3
|
+
*
|
|
4
|
+
* SMTP's STARTTLS is opportunistic: a sender that cannot negotiate TLS delivers
|
|
5
|
+
* in plaintext instead, and an attacker who can strip the STARTTLS banner gets
|
|
6
|
+
* exactly that. MTA-STS (RFC 8461) is how a domain says "do not do that for
|
|
7
|
+
* me" — senders that honour it refuse to deliver unless the connection is
|
|
8
|
+
* authenticated TLS to a listed MX.
|
|
9
|
+
*
|
|
10
|
+
* It has two halves, and this module exists because half of it is worse than
|
|
11
|
+
* none:
|
|
12
|
+
*
|
|
13
|
+
* 1. a `_mta-sts.<domain>` TXT record advertising a policy id;
|
|
14
|
+
* 2. the policy itself, served at
|
|
15
|
+
* `https://mta-sts.<domain>/.well-known/mta-sts.txt`.
|
|
16
|
+
*
|
|
17
|
+
* A domain that publishes the record and does not serve the policy has told
|
|
18
|
+
* every sender to go looking for a file that 404s. They fall back to
|
|
19
|
+
* opportunistic TLS — so mail keeps flowing and nothing breaks, which is
|
|
20
|
+
* precisely why this stays broken for years once it happens. stacksjs.com had
|
|
21
|
+
* exactly that state.
|
|
22
|
+
*
|
|
23
|
+
* ## Why the policy is served by a listener rather than redirected
|
|
24
|
+
*
|
|
25
|
+
* RFC 8461 §3.3 requires the policy to be fetched over HTTPS with a certificate
|
|
26
|
+
* valid for `mta-sts.<domain>`, and forbids following redirects. So the policy
|
|
27
|
+
* cannot be pointed at a file living somewhere more convenient: the host needs
|
|
28
|
+
* its own vhost, its own certificate, and something answering on it.
|
|
29
|
+
*/
|
|
30
|
+
import type { ResolvedMailService } from '@ts-cloud/core';
|
|
31
|
+
/**
|
|
32
|
+
* How strictly senders should apply the policy.
|
|
33
|
+
*
|
|
34
|
+
* - `testing` — report failures, deliver anyway. Where a new policy starts.
|
|
35
|
+
* - `enforce` — refuse to deliver when TLS to a listed MX cannot be
|
|
36
|
+
* authenticated. This is the mode that can bounce real mail, and it is only
|
|
37
|
+
* safe once the MX set is right and its certificate is valid for the MX name.
|
|
38
|
+
* - `none` — the documented way to retire a policy. Publish it, let the old
|
|
39
|
+
* `max_age` lapse, and only then remove the record; deleting the record while
|
|
40
|
+
* senders still cache an `enforce` policy leaves them enforcing a policy the
|
|
41
|
+
* domain no longer has.
|
|
42
|
+
*/
|
|
43
|
+
export type MtaStsMode = 'testing' | 'enforce' | 'none';
|
|
44
|
+
export interface MtaStsPolicy {
|
|
45
|
+
/** Host the policy is served from — `mta-sts.<domain>`. */
|
|
46
|
+
host: string;
|
|
47
|
+
/** The file's contents, served at `/.well-known/mta-sts.txt`. */
|
|
48
|
+
body: string;
|
|
49
|
+
/**
|
|
50
|
+
* Policy id for the TXT record.
|
|
51
|
+
*
|
|
52
|
+
* Derived from the policy body, not from a timestamp. Senders cache by id and
|
|
53
|
+
* only refetch when it changes, so an id that moves on every deploy causes
|
|
54
|
+
* pointless refetches, and one that never moves means a corrected MX list is
|
|
55
|
+
* ignored until `max_age` lapses. Content-derived, both problems go away.
|
|
56
|
+
*/
|
|
57
|
+
id: string;
|
|
58
|
+
/** `_mta-sts.<domain>` TXT value. */
|
|
59
|
+
txt: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Build the policy for one domain.
|
|
63
|
+
*
|
|
64
|
+
* `mx` lists the hostnames senders may deliver to. It defaults to the mail
|
|
65
|
+
* server's own hostname because that is what ts-cloud's MX record points at;
|
|
66
|
+
* a domain whose mail also lands somewhere else must list that host too, or
|
|
67
|
+
* `enforce` will reject the mail it delivers there.
|
|
68
|
+
*/
|
|
69
|
+
export declare function buildMtaStsPolicy(mail: Pick<ResolvedMailService, 'hostname'>, domain: string, options?: {
|
|
70
|
+
mode?: MtaStsMode;
|
|
71
|
+
maxAge?: number;
|
|
72
|
+
mx?: string[];
|
|
73
|
+
}): MtaStsPolicy;
|
|
74
|
+
/**
|
|
75
|
+
* The port the policy listener binds on the box.
|
|
76
|
+
*
|
|
77
|
+
* 8461 is the RFC number, which makes it recognisable in an `ss -lntp` beside a
|
|
78
|
+
* dozen application ports that all look alike.
|
|
79
|
+
*/
|
|
80
|
+
export declare const MTA_STS_PORT = 8461;
|
|
81
|
+
/**
|
|
82
|
+
* A listener that serves exactly one file and nothing else.
|
|
83
|
+
*
|
|
84
|
+
* Deliberately not a static-file server pointed at a directory: this vhost is
|
|
85
|
+
* reachable from the whole internet and has one legitimate URL, so anything it
|
|
86
|
+
* can be persuaded to serve beyond that is surface for no benefit. Every other
|
|
87
|
+
* path is a 404, including `/`.
|
|
88
|
+
*/
|
|
89
|
+
export declare function buildMtaStsServer(policy: MtaStsPolicy, port?: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export * from './backups';
|
|
|
50
50
|
export * from './configuration';
|
|
51
51
|
export type { DnsProvider, DnsProviderConfig, DnsRecord, DnsRecordType, DnsRecordResult, CreateRecordResult, DeleteRecordResult, ListRecordsResult, } from './dns';
|
|
52
52
|
export { PROXIABLE_RECORD_TYPES } from './dns';
|
|
53
|
+
export type { MtaStsMode, MtaStsPolicy } from './drivers/shared/mta-sts';
|
|
54
|
+
export { buildMtaStsPolicy, buildMtaStsServer, MTA_STS_PORT } from './drivers/shared/mta-sts';
|
|
53
55
|
export type { MigratedRecord, SkippedRecord, ZoneMigrationPlan, ZoneMigrationReport, ZoneParityReport, } from './dns';
|
|
54
56
|
export { applyZoneMigration, exportRoute53Zone, planZoneMigration, verifyZoneParity, } from './dns';
|
|
55
57
|
export type { DeclaredRecord, DeclaredRecordInput, DeclaredRecordOutcome, DeclaredRecordsReport, } from './dns';
|