@stacksjs/buddy 0.75.627 → 0.75.628

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.
@@ -1,5 +1,5 @@
1
- import{existsSync,mkdirSync,mkdtempSync,readFileSync,readdirSync,rmSync,statSync,writeFileSync}from"node:fs";import{homedir}from"node:os";import{dirname,isAbsolute,join,relative,resolve}from"node:path";import process from"node:process";import{missingQueueWorkerProblem}from"../deploy-queue-worker";import{pathToFileURL}from"node:url";import{runAction}from"@stacksjs/actions/run-action";import{assertPublicationAllowed}from"@stacksjs/actions/publication-preflight";import{runBeforeDeployHook}from"@stacksjs/actions/deploy/hooks";import{italic,onUnknownSubcommand,outro,prompts}from"@stacksjs/cli";import{app,dns as dnsConfig,email as emailConfig}from"@stacksjs/config";import{resolvePrivateTenants}from"../cloud-tenants";import{addDomain,hasUserDomainBeenAddedToCloud,syncDnsConfig}from"@stacksjs/dns";import{loadProjectDnsConfig}from"../config";import{env}from"@stacksjs/env";import{Action}from"@stacksjs/enums";import{path as p}from"@stacksjs/path";import{ExitCode}from"@stacksjs/types";import{getErrorMessage}from"@stacksjs/utils";import{withDeployNotification}from"../deploy-notify";import{deploymentIdentityConfig,withDeploymentIdentity}from"../deploy-identity";import{assertCurrentDeploymentRevision,assertNotBehindLiveRelease,automatedDeploymentRevision,liveReleasesCommand}from"../deployment-revision";import{dnsCredentialFix,envFileForEnvironment,resolveZoneNameservers}from"../dns-credentials";import{assertComputeResidency}from"@stacksjs/ts-cloud";import{resultFailed}from"../result";import{deploymentRetirements,explicitDeploymentEnvFile,validateDeploymentProviderInputs}from"../deployment-inputs";import{findUnbackedManagedServices,hasOffsiteBackupDestination,unbackedDataMessage}from"../unbacked-data";import{applyDeploymentDomainOverride,createDeploymentPreview,deploymentPreviewJsonPrefix,formatDeploymentPreview,resolveDeploymentEnvironment}from"./deploy-preview";import{buildPreviewTeardownScript,derivePreviewConfig,previewDomain,previewPort,previewTarget}from"./preview-deploy";import{deployTargetLabel,dnsHeld,dnsPublishingAllowed,hetznerTarget,isSshPipelineProvider,lanUrls,mergeSshStatePin,remoteExecOptions,resolveSshTarget,sshCliArgs,sshStatePin,toSshTarget}from"./deploy-ssh-target";const log={info:(...args)=>console.log("ℹ",...args),success:(...args)=>console.log("✓",...args),warn:(...args)=>console.log("⚠",...args),error:(...args)=>console.error("✗",...args),debug:(...args)=>{if(process.argv.includes("--verbose")||process.argv.includes("-v")){console.log("\uD83D\uDD0D",...args)}}};const MAIL_PACKAGE_DOMAIN="github.com/mail-os/mail";const MAIL_PACKAGE_SPEC=`${MAIL_PACKAGE_DOMAIN}@0.1.0`;const MAIL_TARGET_PLATFORM="linux-x86_64";const MAIL_BINARY_NAMES=["mail","mail-x86_64-linux","mail-x86_64-linux-gnu"];export const ROLLBACK_FLAGS_SINCE="0.16.34";export function installedTsCloudVersion(cliPath=resolveTsCloudCliPath()){try{const pkg=JSON.parse(readFileSync(resolve(dirname(cliPath),"..","..","package.json"),"utf8"));return typeof pkg.version==="string"?pkg.version:null}catch{return null}}export function versionAtLeast(a,b){const pa=a.split(".").map((n)=>Number.parseInt(n,10)||0);const pb=b.split(".").map((n)=>Number.parseInt(n,10)||0);for(let i=0;i<3;i++){if((pa[i]??0)!==(pb[i]??0))return(pa[i]??0)>(pb[i]??0)}return true}export function resolveTsCloudCliPath(tsCloudEntry=import.meta.resolve("@stacksjs/ts-cloud")){return resolve(dirname(new URL(tsCloudEntry).pathname),"bin/cli.js")}export async function runDeployRollback(site,options,execute=async(command)=>{const child=Bun.spawn(command,{cwd:p.projectPath(),env:process.env,stdin:"inherit",stdout:"inherit",stderr:"inherit"});return await child.exited},tsCloudVersion=installedTsCloudVersion()){const environment=resolveDeploymentEnvironment({option:options.env});const command=[process.execPath,resolveTsCloudCliPath(),"deploy:rollback"];const newFlags=[options.dryRun&&"--dry-run",options.all&&"--all",options.onlyIfLive&&"--only-if-live"].filter(Boolean);if(newFlags.length>0&&!(tsCloudVersion&&versionAtLeast(tsCloudVersion,ROLLBACK_FLAGS_SINCE))){log.error(`${newFlags.join(", ")} needs @stacksjs/ts-cloud ${ROLLBACK_FLAGS_SINCE} or newer (installed: ${tsCloudVersion??"unknown"}). An older one ignores it and rolls back for real.`);log.info(` ➡️ bun add @stacksjs/ts-cloud@^${ROLLBACK_FLAGS_SINCE}`);return ExitCode.InvalidArgument}if(site)command.push(site);command.push("--env",environment);if(options.to)command.push("--to",options.to);if(options.dryRun)command.push("--dry-run");if(options.all)command.push("--all");if(options.onlyIfLive)command.push("--only-if-live",options.onlyIfLive);if(options.verbose)command.push("--verbose");return await execute(command)}function collectMatchingFiles(root,names,maxDepth=8){const nameSet=new Set(names);const matches=[];if(!existsSync(root))return matches;function walk(dir,depth){if(depth>maxDepth)return;for(const entry of readdirSync(dir)){if(entry===".git"||entry==="node_modules")continue;const fullPath=join(dir,entry);const stat=statSync(fullPath);if(stat.isDirectory()){walk(fullPath,depth+1)}else if(stat.isFile()&&nameSet.has(entry)){matches.push(fullPath)}}}walk(root,0);return matches}function isElfBinary(filePath){const header=readFileSync(filePath).slice(0,4);return header[0]===127&&header[1]===69&&header[2]===76&&header[3]===70}function resolvePantryInstallCommand(){const localPantryCli=join(homedir(),"Code","Tools","pantry","packages","ts-pantry","bin","cli.ts");if(existsSync(localPantryCli)){return{command:"bun",args:[localPantryCli]}}const projectPantry=p.projectPath("pantry/.bin/pantry");if(existsSync(projectPantry)){return{command:projectPantry,args:[]}}const globalPantry=join(homedir(),".local","share","pantry","global","bin","pantry");if(existsSync(globalPantry)){return{command:globalPantry,args:[]}}return{command:"pantry",args:[]}}async function installMailBinaryWithPantry(){const{execFileSync}=await import("node:child_process");const pantry=resolvePantryInstallCommand();execFileSync(pantry.command,[...pantry.args,"install",MAIL_PACKAGE_SPEC,"--install-dir",p.projectPath("pantry"),"--platform",MAIL_TARGET_PLATFORM,"--quiet"],{cwd:p.projectPath(),stdio:process.argv.includes("--verbose")||process.argv.includes("-v")?"inherit":"pipe",env:process.env})}async function findPantryMailBinary(){const directCandidates=[...MAIL_BINARY_NAMES.map((name)=>p.projectPath(`pantry/.bin/${name}`)),...MAIL_BINARY_NAMES.map((name)=>join(homedir(),".local","share","pantry","global","bin",name))];for(const candidate of directCandidates){if(existsSync(candidate)&&isElfBinary(candidate))return candidate}for(const root of[p.projectPath("pantry"),join(homedir(),".local","share","pantry")]){for(const candidate of collectMatchingFiles(root,MAIL_BINARY_NAMES)){if(isElfBinary(candidate))return candidate}}return null}async function ensureDeployPrerequisites(verbose=false,environment="production",envFile){if(envFile){const values=await resolveDeployEnvValues(environment,undefined,envFile);if(!values.APP_KEY?.trim())throw new Error("The selected deployment environment requires APP_KEY");return}const{ensureAppKey,ensureDeployEnvIsSet,ensureEnvIsSet}=await import("./setup");const cwd=p.projectPath();await ensureEnvIsSet({cwd,verbose});await ensureDeployEnvIsSet(cwd,environment);await ensureAppKey(cwd)}function loadAwsCredentialsFromFile(){const credentialsPath=join(homedir(),".aws","credentials");const configPath=join(homedir(),".aws","config");if(!existsSync(credentialsPath)){return{}}try{const content=readFileSync(credentialsPath,"utf-8");const lines=content.split(`
2
- `);const profiles=["default","stacks"];let currentProfile="";let credentials={};const profileCredentials={};for(const line of lines){const trimmed=line.trim();const profileMatch=trimmed.match(/^\[(.+)\]$/);if(profileMatch?.[1]){currentProfile=profileMatch[1];profileCredentials[currentProfile]={};continue}const keyValue=trimmed.match(/^(\w+)\s*=\s*(.+)$/);if(keyValue&&currentProfile){const[,key,value]=keyValue;const target=profileCredentials[currentProfile];if(!target||value===undefined)continue;if(key==="aws_access_key_id"){target.accessKeyId=value}else if(key==="aws_secret_access_key"){target.secretAccessKey=value}}}for(const profile of profiles){if(profileCredentials[profile]?.accessKeyId&&profileCredentials[profile]?.secretAccessKey){credentials=profileCredentials[profile];log.debug(`Using AWS credentials from ~/.aws/credentials [${profile}] profile`);break}}if(!credentials.accessKeyId){for(const[profile,creds]of Object.entries(profileCredentials)){if(creds.accessKeyId&&creds.secretAccessKey){credentials=creds;log.debug(`Using AWS credentials from ~/.aws/credentials [${profile}] profile`);break}}}let region;if(existsSync(configPath)){const configContent=readFileSync(configPath,"utf-8");const regionMatch=configContent.match(/region\s*=\s*(.+)/);if(regionMatch?.[1]){region=regionMatch[1].trim()}}return{...credentials,region}}catch(error){log.debug("Failed to read AWS credentials file:",error);return{}}}async function setupEmailDnsRecords(emailDomain,region,logger,options){logger.info("Setting up email DNS records...");try{const{SESClient}=await import("@stacksjs/ts-cloud");const{Route53Client}=await import("@stacksjs/ts-cloud");const ses=new SESClient(region);const route53=new Route53Client(region);logger.info(`Getting DKIM tokens for ${emailDomain}...`);const identity=await ses.getEmailIdentity(emailDomain);const tokens=identity.DkimAttributes?.Tokens||[];if(tokens.length===0){logger.warn("No DKIM tokens found - domain may not be set up in SES yet");return}logger.info(`Found ${tokens.length} DKIM tokens`);const zones=await route53.listHostedZones();const zone=zones.HostedZones?.find((z)=>z.Name===`${emailDomain}.`);if(!zone){logger.warn(`Hosted zone not found for ${emailDomain} - DNS records must be added manually`);logger.info("DKIM records needed:");for(const token of tokens){logger.info(` CNAME: ${token}._domainkey.${emailDomain} -> ${token}.dkim.amazonses.com`)}logger.info(` MX: ${emailDomain} -> 10 inbound-smtp.${region}.amazonaws.com`);return}const hostedZoneId=zone.Id?.replace("/hostedzone/","");logger.info(`Found hosted zone: ${hostedZoneId}`);for(const token of tokens){const recordName=`${token}._domainkey.${emailDomain}`;const recordValue=`${token}.dkim.amazonses.com`;try{await route53.changeResourceRecordSets({HostedZoneId:hostedZoneId,ChangeBatch:{Changes:[{Action:"UPSERT",ResourceRecordSet:{Name:recordName,Type:"CNAME",TTL:300,ResourceRecords:[{Value:recordValue}]}}]}});logger.success(`Added DKIM record: ${token}._domainkey`)}catch(e){logger.warn(`Failed to add DKIM record: ${getErrorMessage(e)}`)}}const mailSubdomain=options?.mailSubdomain||"mail";const mxTarget=options?.mode==="server"?`10 ${mailSubdomain}.${emailDomain}`:`10 inbound-smtp.${region}.amazonaws.com`;try{await route53.changeResourceRecordSets({HostedZoneId:hostedZoneId,ChangeBatch:{Changes:[{Action:"UPSERT",ResourceRecordSet:{Name:emailDomain,Type:"MX",TTL:300,ResourceRecords:[{Value:mxTarget}]}}]}});logger.success(`Added MX record: ${mxTarget}`)}catch(e){logger.warn(`Failed to add MX record: ${getErrorMessage(e)}`)}try{await route53.changeResourceRecordSets({HostedZoneId:hostedZoneId,ChangeBatch:{Changes:[{Action:"UPSERT",ResourceRecordSet:{Name:emailDomain,Type:"TXT",TTL:300,ResourceRecords:[{Value:'"v=spf1 include:amazonses.com ~all"'}]}}]}});logger.success("Added SPF record")}catch(e){logger.warn(`Failed to add SPF record: ${getErrorMessage(e)}`)}try{await route53.changeResourceRecordSets({HostedZoneId:hostedZoneId,ChangeBatch:{Changes:[{Action:"UPSERT",ResourceRecordSet:{Name:`_dmarc.${emailDomain}`,Type:"TXT",TTL:300,ResourceRecords:[{Value:`"v=DMARC1;p=quarantine;pct=25;rua=mailto:dmarcreports@${emailDomain}"`}]}}]}});logger.success("Added DMARC record")}catch(e){logger.warn(`Failed to add DMARC record: ${getErrorMessage(e)}`)}try{const appName=process.env.APP_NAME?.toLowerCase().replace(/[^a-z0-9]/g,"-")||"stacks";const ruleSetName=`${appName}-email-rules`;await ses.setActiveReceiptRuleSet(ruleSetName);logger.success(`Activated email receipt rule set: ${ruleSetName}`)}catch(e){logger.warn(`Failed to activate receipt rule set: ${getErrorMessage(e)}`)}logger.success("Email DNS records configured!");logger.info("Note: DKIM verification may take 5-15 minutes to complete")}catch(error){logger.warn(`Failed to set up email DNS records: ${getErrorMessage(error)}`);logger.info("You can manually set up DNS records using: buddy email:verify")}}async function createDefaultMailUser(appName,emailDomain,region,logger){try{const{DynamoDBClient}=await import("@stacksjs/ts-cloud");const crypto=await import("crypto");const dynamodb=new DynamoDBClient(region);const tableName=`${appName}-mail-users`;const mailboxes=emailConfig?.mailboxes||[];if(mailboxes.length===0){const defaultEmail=`admin@${emailDomain}`;const defaultPassword=crypto.randomBytes(16).toString("hex");const passwordHash=crypto.createHash("sha256").update(defaultPassword).digest("hex");try{await dynamodb.putItem({TableName:tableName,Item:{email:{S:defaultEmail},passwordHash:{S:passwordHash},createdAt:{S:new Date().toISOString()},displayName:{S:"Admin"}}});logger.success(`Created default mail user: ${defaultEmail}`);logger.info(`Password: ${defaultPassword}`);logger.info("Save this password - it will not be shown again!")}catch(e){const msg=getErrorMessage(e);if(msg.includes("ConditionalCheckFailedException")||msg.includes("already exists")){logger.debug("Default mail user already exists")}else{throw e}}}else{for(const mailbox of mailboxes){const mb=typeof mailbox==="object"&&mailbox!==null?mailbox:null;const configured=mb?.email;const email=mb?configured?.includes("@")?configured:`${configured??""}@${emailDomain}`:`${mailbox}@${emailDomain}`;const password=mb?.password?mb.password:crypto.randomBytes(16).toString("hex");const passwordHash=crypto.createHash("sha256").update(password).digest("hex");try{await dynamodb.putItem({TableName:tableName,Item:{email:{S:email},passwordHash:{S:passwordHash},createdAt:{S:new Date().toISOString()},displayName:{S:mb?mb.displayName||email:String(mailbox)}}});logger.success(`Created mail user: ${email}`);if(!mb?.password){logger.info(` Password: ${password}`)}}catch(e){const msg=getErrorMessage(e);if(msg.includes("ConditionalCheckFailedException")){logger.debug(`Mail user ${email} already exists`)}else{logger.warn(`Failed to create mail user ${email}: ${msg}`)}}}}}catch(error){logger.warn(`Failed to create mail users: ${getErrorMessage(error)}`)}}async function uploadMailServerToS3(bucketName,region,mode){try{const{S3Client:S3}=await import("@stacksjs/ts-cloud");const s3Client=new S3(region);if(mode==="serverless"){const serverTsPath=p.frameworkPath("core/mail-server/server.ts");if(existsSync(serverTsPath)){const serverCode=readFileSync(serverTsPath,"utf-8");await s3Client.putObject({bucket:bucketName,key:"mail-server/server.ts",body:serverCode,contentType:"text/typescript"});log.success("Uploaded serverless mail server code to S3")}const pkgPath=p.frameworkPath("core/mail-server/package.json");if(existsSync(pkgPath)){const pkgJson=readFileSync(pkgPath,"utf-8");await s3Client.putObject({bucket:bucketName,key:"mail-server/package.json",body:pkgJson,contentType:"application/json"})}return}let binaryUploaded=false;try{await installMailBinaryWithPantry();const linuxBinaryPath=await findPantryMailBinary();if(linuxBinaryPath&&existsSync(linuxBinaryPath)&&isElfBinary(linuxBinaryPath)){log.info(`Uploading Pantry mail binary: ${linuxBinaryPath}`);const binaryContent=readFileSync(linuxBinaryPath);await s3Client.putObject({bucket:bucketName,key:"mail-server/smtp-server",body:binaryContent,contentType:"application/octet-stream"});log.success("Uploaded Linux x86_64 mail server binary to S3");binaryUploaded=true}}catch(error){log.debug(`Pantry mail install failed: ${getErrorMessage(error)}`)}if(!binaryUploaded){log.warn(`No Pantry-provided ${MAIL_TARGET_PLATFORM} mail binary found. Release ${MAIL_PACKAGE_DOMAIN}, then run the Pantry binary sync for that package.`)}}catch(uploadErr){log.debug(`Could not upload mail server to S3 (bucket may not exist yet): ${uploadErr.message}`)}}export async function loadTsCloudConfig(envName){try{const base=p.projectPath("config/cloud.ts");const spec=envName?`${base}?env=${envName}`:base;const mod=await import(spec);return mod.tsCloud}catch(err){log.debug("Could not load config/cloud.ts tsCloud export:",err);return}}export function resolveProvider(tsCloudConfig){return tsCloudConfig?.cloud?.provider||process.env.CLOUD_PROVIDER||"aws"}function readWaitSecs(name,defaultSecs){const secs=process.env[name]?Number.parseInt(process.env[name],10):Number.NaN;return Number.isFinite(secs)&&secs>0?secs:defaultSecs}function fmtDuration(secs){const m=Math.floor(secs/60);const s=secs%60;return m?s?`${m}m${s}s`:`${m}m`:`${s}s`}export function pollFailureDetail(error){const raw=error instanceof Error?error.message:typeof error==="string"?error:"";const collapsed=raw.replace(/\s+/g," ").trim();if(!collapsed)return;return collapsed.length>300?`${collapsed.slice(0,297)}...`:collapsed}export function sshUnreachableMessage(opts){const detail=pollFailureDetail(opts.lastError);return`SSH did not become reachable on ${opts.ip} within ${fmtDuration(opts.waitSecs)} (waited ${opts.elapsedSecs}s).`+(detail?`
1
+ import{existsSync,mkdirSync,mkdtempSync,readFileSync,readdirSync,rmSync,statSync,writeFileSync}from"node:fs";import{homedir}from"node:os";import{dirname,isAbsolute,join,relative,resolve}from"node:path";import process from"node:process";import{missingQueueWorkerProblem}from"../deploy-queue-worker";import{pathToFileURL}from"node:url";import{runAction}from"@stacksjs/actions/run-action";import{assertPublicationAllowed}from"@stacksjs/actions/publication-preflight";import{runBeforeDeployHook}from"@stacksjs/actions/deploy/hooks";import{italic,onUnknownSubcommand,outro,prompts}from"@stacksjs/cli";import{app,dns as dnsConfig,email as emailConfig,security as securityConfig}from"@stacksjs/config";import{resolvePrivateTenants}from"../cloud-tenants";import{addDomain,hasUserDomainBeenAddedToCloud,syncDnsConfig}from"@stacksjs/dns";import{loadProjectDnsConfig}from"../config";import{env}from"@stacksjs/env";import{Action}from"@stacksjs/enums";import{path as p}from"@stacksjs/path";import{ExitCode}from"@stacksjs/types";import{getErrorMessage}from"@stacksjs/utils";import{withDeployNotification}from"../deploy-notify";import{deploymentIdentityConfig,withDeploymentIdentity}from"../deploy-identity";import{assertCurrentDeploymentRevision,assertNotBehindLiveRelease,automatedDeploymentRevision,liveReleasesCommand}from"../deployment-revision";import{dnsCredentialFix,envFileForEnvironment,resolveZoneNameservers}from"../dns-credentials";import{assertComputeResidency}from"@stacksjs/ts-cloud";import{resultFailed}from"../result";import{deploymentRetirements,explicitDeploymentEnvFile,validateDeploymentProviderInputs}from"../deployment-inputs";import{findUnbackedManagedServices,hasOffsiteBackupDestination,unbackedDataMessage}from"../unbacked-data";import{applySecurityWaf}from"../waf-config";import{applyDeploymentDomainOverride,createDeploymentPreview,deploymentPreviewJsonPrefix,formatDeploymentPreview,resolveDeploymentEnvironment}from"./deploy-preview";import{buildPreviewTeardownScript,derivePreviewConfig,previewDomain,previewPort,previewTarget}from"./preview-deploy";import{deployTargetLabel,dnsHeld,dnsPublishingAllowed,hetznerTarget,isSshPipelineProvider,lanUrls,mergeSshStatePin,remoteExecOptions,resolveSshTarget,sshCliArgs,sshStatePin,toSshTarget}from"./deploy-ssh-target";const log={info:(...args)=>console.log("ℹ",...args),success:(...args)=>console.log("✓",...args),warn:(...args)=>console.log("⚠",...args),error:(...args)=>console.error("✗",...args),debug:(...args)=>{if(process.argv.includes("--verbose")||process.argv.includes("-v")){console.log("\uD83D\uDD0D",...args)}}};const MAIL_PACKAGE_DOMAIN="github.com/mail-os/mail";const MAIL_PACKAGE_SPEC=`${MAIL_PACKAGE_DOMAIN}@0.1.0`;const MAIL_TARGET_PLATFORM="linux-x86_64";const MAIL_BINARY_NAMES=["mail","mail-x86_64-linux","mail-x86_64-linux-gnu"];export const ROLLBACK_FLAGS_SINCE="0.16.34";export function installedTsCloudVersion(cliPath=resolveTsCloudCliPath()){try{const pkg=JSON.parse(readFileSync(resolve(dirname(cliPath),"..","..","package.json"),"utf8"));return typeof pkg.version==="string"?pkg.version:null}catch{return null}}export function versionAtLeast(a,b){const pa=a.split(".").map((n)=>Number.parseInt(n,10)||0);const pb=b.split(".").map((n)=>Number.parseInt(n,10)||0);for(let i=0;i<3;i++){if((pa[i]??0)!==(pb[i]??0))return(pa[i]??0)>(pb[i]??0)}return true}export function resolveTsCloudCliPath(tsCloudEntry=import.meta.resolve("@stacksjs/ts-cloud")){return resolve(dirname(new URL(tsCloudEntry).pathname),"bin/cli.js")}export async function runDeployRollback(site,options,execute=async(command)=>{const child=Bun.spawn(command,{cwd:p.projectPath(),env:process.env,stdin:"inherit",stdout:"inherit",stderr:"inherit"});return await child.exited},tsCloudVersion=installedTsCloudVersion()){const environment=resolveDeploymentEnvironment({option:options.env});const command=[process.execPath,resolveTsCloudCliPath(),"deploy:rollback"];const newFlags=[options.dryRun&&"--dry-run",options.all&&"--all",options.onlyIfLive&&"--only-if-live"].filter(Boolean);if(newFlags.length>0&&!(tsCloudVersion&&versionAtLeast(tsCloudVersion,ROLLBACK_FLAGS_SINCE))){log.error(`${newFlags.join(", ")} needs @stacksjs/ts-cloud ${ROLLBACK_FLAGS_SINCE} or newer (installed: ${tsCloudVersion??"unknown"}). An older one ignores it and rolls back for real.`);log.info(` ➡️ bun add @stacksjs/ts-cloud@^${ROLLBACK_FLAGS_SINCE}`);return ExitCode.InvalidArgument}if(site)command.push(site);command.push("--env",environment);if(options.to)command.push("--to",options.to);if(options.dryRun)command.push("--dry-run");if(options.all)command.push("--all");if(options.onlyIfLive)command.push("--only-if-live",options.onlyIfLive);if(options.verbose)command.push("--verbose");return await execute(command)}function collectMatchingFiles(root,names,maxDepth=8){const nameSet=new Set(names);const matches=[];if(!existsSync(root))return matches;function walk(dir,depth){if(depth>maxDepth)return;for(const entry of readdirSync(dir)){if(entry===".git"||entry==="node_modules")continue;const fullPath=join(dir,entry);const stat=statSync(fullPath);if(stat.isDirectory()){walk(fullPath,depth+1)}else if(stat.isFile()&&nameSet.has(entry)){matches.push(fullPath)}}}walk(root,0);return matches}function isElfBinary(filePath){const header=readFileSync(filePath).slice(0,4);return header[0]===127&&header[1]===69&&header[2]===76&&header[3]===70}function resolvePantryInstallCommand(){const localPantryCli=join(homedir(),"Code","Tools","pantry","packages","ts-pantry","bin","cli.ts");if(existsSync(localPantryCli)){return{command:"bun",args:[localPantryCli]}}const projectPantry=p.projectPath("pantry/.bin/pantry");if(existsSync(projectPantry)){return{command:projectPantry,args:[]}}const globalPantry=join(homedir(),".local","share","pantry","global","bin","pantry");if(existsSync(globalPantry)){return{command:globalPantry,args:[]}}return{command:"pantry",args:[]}}async function installMailBinaryWithPantry(){const{execFileSync}=await import("node:child_process");const pantry=resolvePantryInstallCommand();execFileSync(pantry.command,[...pantry.args,"install",MAIL_PACKAGE_SPEC,"--install-dir",p.projectPath("pantry"),"--platform",MAIL_TARGET_PLATFORM,"--quiet"],{cwd:p.projectPath(),stdio:process.argv.includes("--verbose")||process.argv.includes("-v")?"inherit":"pipe",env:process.env})}async function findPantryMailBinary(){const directCandidates=[...MAIL_BINARY_NAMES.map((name)=>p.projectPath(`pantry/.bin/${name}`)),...MAIL_BINARY_NAMES.map((name)=>join(homedir(),".local","share","pantry","global","bin",name))];for(const candidate of directCandidates){if(existsSync(candidate)&&isElfBinary(candidate))return candidate}for(const root of[p.projectPath("pantry"),join(homedir(),".local","share","pantry")]){for(const candidate of collectMatchingFiles(root,MAIL_BINARY_NAMES)){if(isElfBinary(candidate))return candidate}}return null}async function ensureDeployPrerequisites(verbose=false,environment="production",envFile){if(envFile){const values=await resolveDeployEnvValues(environment,undefined,envFile);if(!values.APP_KEY?.trim())throw new Error("The selected deployment environment requires APP_KEY");return}const{ensureAppKey,ensureDeployEnvIsSet,ensureEnvIsSet}=await import("./setup");const cwd=p.projectPath();await ensureEnvIsSet({cwd,verbose});await ensureDeployEnvIsSet(cwd,environment);await ensureAppKey(cwd)}function loadAwsCredentialsFromFile(){const credentialsPath=join(homedir(),".aws","credentials");const configPath=join(homedir(),".aws","config");if(!existsSync(credentialsPath)){return{}}try{const content=readFileSync(credentialsPath,"utf-8");const lines=content.split(`
2
+ `);const profiles=["default","stacks"];let currentProfile="";let credentials={};const profileCredentials={};for(const line of lines){const trimmed=line.trim();const profileMatch=trimmed.match(/^\[(.+)\]$/);if(profileMatch?.[1]){currentProfile=profileMatch[1];profileCredentials[currentProfile]={};continue}const keyValue=trimmed.match(/^(\w+)\s*=\s*(.+)$/);if(keyValue&&currentProfile){const[,key,value]=keyValue;const target=profileCredentials[currentProfile];if(!target||value===undefined)continue;if(key==="aws_access_key_id"){target.accessKeyId=value}else if(key==="aws_secret_access_key"){target.secretAccessKey=value}}}for(const profile of profiles){if(profileCredentials[profile]?.accessKeyId&&profileCredentials[profile]?.secretAccessKey){credentials=profileCredentials[profile];log.debug(`Using AWS credentials from ~/.aws/credentials [${profile}] profile`);break}}if(!credentials.accessKeyId){for(const[profile,creds]of Object.entries(profileCredentials)){if(creds.accessKeyId&&creds.secretAccessKey){credentials=creds;log.debug(`Using AWS credentials from ~/.aws/credentials [${profile}] profile`);break}}}let region;if(existsSync(configPath)){const configContent=readFileSync(configPath,"utf-8");const regionMatch=configContent.match(/region\s*=\s*(.+)/);if(regionMatch?.[1]){region=regionMatch[1].trim()}}return{...credentials,region}}catch(error){log.debug("Failed to read AWS credentials file:",error);return{}}}async function setupEmailDnsRecords(emailDomain,region,logger,options){logger.info("Setting up email DNS records...");try{const{SESClient}=await import("@stacksjs/ts-cloud");const{Route53Client}=await import("@stacksjs/ts-cloud");const ses=new SESClient(region);const route53=new Route53Client(region);logger.info(`Getting DKIM tokens for ${emailDomain}...`);const identity=await ses.getEmailIdentity(emailDomain);const tokens=identity.DkimAttributes?.Tokens||[];if(tokens.length===0){logger.warn("No DKIM tokens found - domain may not be set up in SES yet");return}logger.info(`Found ${tokens.length} DKIM tokens`);const zones=await route53.listHostedZones();const zone=zones.HostedZones?.find((z)=>z.Name===`${emailDomain}.`);if(!zone){logger.warn(`Hosted zone not found for ${emailDomain} - DNS records must be added manually`);logger.info("DKIM records needed:");for(const token of tokens){logger.info(` CNAME: ${token}._domainkey.${emailDomain} -> ${token}.dkim.amazonses.com`)}logger.info(` MX: ${emailDomain} -> 10 inbound-smtp.${region}.amazonaws.com`);return}const hostedZoneId=zone.Id?.replace("/hostedzone/","");logger.info(`Found hosted zone: ${hostedZoneId}`);for(const token of tokens){const recordName=`${token}._domainkey.${emailDomain}`;const recordValue=`${token}.dkim.amazonses.com`;try{await route53.changeResourceRecordSets({HostedZoneId:hostedZoneId,ChangeBatch:{Changes:[{Action:"UPSERT",ResourceRecordSet:{Name:recordName,Type:"CNAME",TTL:300,ResourceRecords:[{Value:recordValue}]}}]}});logger.success(`Added DKIM record: ${token}._domainkey`)}catch(e){logger.warn(`Failed to add DKIM record: ${getErrorMessage(e)}`)}}const mailSubdomain=options?.mailSubdomain||"mail";const mxTarget=options?.mode==="server"?`10 ${mailSubdomain}.${emailDomain}`:`10 inbound-smtp.${region}.amazonaws.com`;try{await route53.changeResourceRecordSets({HostedZoneId:hostedZoneId,ChangeBatch:{Changes:[{Action:"UPSERT",ResourceRecordSet:{Name:emailDomain,Type:"MX",TTL:300,ResourceRecords:[{Value:mxTarget}]}}]}});logger.success(`Added MX record: ${mxTarget}`)}catch(e){logger.warn(`Failed to add MX record: ${getErrorMessage(e)}`)}try{await route53.changeResourceRecordSets({HostedZoneId:hostedZoneId,ChangeBatch:{Changes:[{Action:"UPSERT",ResourceRecordSet:{Name:emailDomain,Type:"TXT",TTL:300,ResourceRecords:[{Value:'"v=spf1 include:amazonses.com ~all"'}]}}]}});logger.success("Added SPF record")}catch(e){logger.warn(`Failed to add SPF record: ${getErrorMessage(e)}`)}try{await route53.changeResourceRecordSets({HostedZoneId:hostedZoneId,ChangeBatch:{Changes:[{Action:"UPSERT",ResourceRecordSet:{Name:`_dmarc.${emailDomain}`,Type:"TXT",TTL:300,ResourceRecords:[{Value:`"v=DMARC1;p=quarantine;pct=25;rua=mailto:dmarcreports@${emailDomain}"`}]}}]}});logger.success("Added DMARC record")}catch(e){logger.warn(`Failed to add DMARC record: ${getErrorMessage(e)}`)}try{const appName=process.env.APP_NAME?.toLowerCase().replace(/[^a-z0-9]/g,"-")||"stacks";const ruleSetName=`${appName}-email-rules`;await ses.setActiveReceiptRuleSet(ruleSetName);logger.success(`Activated email receipt rule set: ${ruleSetName}`)}catch(e){logger.warn(`Failed to activate receipt rule set: ${getErrorMessage(e)}`)}logger.success("Email DNS records configured!");logger.info("Note: DKIM verification may take 5-15 minutes to complete")}catch(error){logger.warn(`Failed to set up email DNS records: ${getErrorMessage(error)}`);logger.info("You can manually set up DNS records using: buddy email:verify")}}async function createDefaultMailUser(appName,emailDomain,region,logger){try{const{DynamoDBClient}=await import("@stacksjs/ts-cloud");const crypto=await import("crypto");const dynamodb=new DynamoDBClient(region);const tableName=`${appName}-mail-users`;const mailboxes=emailConfig?.mailboxes||[];if(mailboxes.length===0){const defaultEmail=`admin@${emailDomain}`;const defaultPassword=crypto.randomBytes(16).toString("hex");const passwordHash=crypto.createHash("sha256").update(defaultPassword).digest("hex");try{await dynamodb.putItem({TableName:tableName,Item:{email:{S:defaultEmail},passwordHash:{S:passwordHash},createdAt:{S:new Date().toISOString()},displayName:{S:"Admin"}}});logger.success(`Created default mail user: ${defaultEmail}`);logger.info(`Password: ${defaultPassword}`);logger.info("Save this password - it will not be shown again!")}catch(e){const msg=getErrorMessage(e);if(msg.includes("ConditionalCheckFailedException")||msg.includes("already exists")){logger.debug("Default mail user already exists")}else{throw e}}}else{for(const mailbox of mailboxes){const mb=typeof mailbox==="object"&&mailbox!==null?mailbox:null;const configured=mb?.email;const email=mb?configured?.includes("@")?configured:`${configured??""}@${emailDomain}`:`${mailbox}@${emailDomain}`;const password=mb?.password?mb.password:crypto.randomBytes(16).toString("hex");const passwordHash=crypto.createHash("sha256").update(password).digest("hex");try{await dynamodb.putItem({TableName:tableName,Item:{email:{S:email},passwordHash:{S:passwordHash},createdAt:{S:new Date().toISOString()},displayName:{S:mb?mb.displayName||email:String(mailbox)}}});logger.success(`Created mail user: ${email}`);if(!mb?.password){logger.info(` Password: ${password}`)}}catch(e){const msg=getErrorMessage(e);if(msg.includes("ConditionalCheckFailedException")){logger.debug(`Mail user ${email} already exists`)}else{logger.warn(`Failed to create mail user ${email}: ${msg}`)}}}}}catch(error){logger.warn(`Failed to create mail users: ${getErrorMessage(error)}`)}}async function uploadMailServerToS3(bucketName,region,mode){try{const{S3Client:S3}=await import("@stacksjs/ts-cloud");const s3Client=new S3(region);if(mode==="serverless"){const serverTsPath=p.frameworkPath("core/mail-server/server.ts");if(existsSync(serverTsPath)){const serverCode=readFileSync(serverTsPath,"utf-8");await s3Client.putObject({bucket:bucketName,key:"mail-server/server.ts",body:serverCode,contentType:"text/typescript"});log.success("Uploaded serverless mail server code to S3")}const pkgPath=p.frameworkPath("core/mail-server/package.json");if(existsSync(pkgPath)){const pkgJson=readFileSync(pkgPath,"utf-8");await s3Client.putObject({bucket:bucketName,key:"mail-server/package.json",body:pkgJson,contentType:"application/json"})}return}let binaryUploaded=false;try{await installMailBinaryWithPantry();const linuxBinaryPath=await findPantryMailBinary();if(linuxBinaryPath&&existsSync(linuxBinaryPath)&&isElfBinary(linuxBinaryPath)){log.info(`Uploading Pantry mail binary: ${linuxBinaryPath}`);const binaryContent=readFileSync(linuxBinaryPath);await s3Client.putObject({bucket:bucketName,key:"mail-server/smtp-server",body:binaryContent,contentType:"application/octet-stream"});log.success("Uploaded Linux x86_64 mail server binary to S3");binaryUploaded=true}}catch(error){log.debug(`Pantry mail install failed: ${getErrorMessage(error)}`)}if(!binaryUploaded){log.warn(`No Pantry-provided ${MAIL_TARGET_PLATFORM} mail binary found. Release ${MAIL_PACKAGE_DOMAIN}, then run the Pantry binary sync for that package.`)}}catch(uploadErr){log.debug(`Could not upload mail server to S3 (bucket may not exist yet): ${uploadErr.message}`)}}export async function loadTsCloudConfig(envName){try{const base=p.projectPath("config/cloud.ts");const spec=envName?`${base}?env=${envName}`:base;const mod=await import(spec);const applied=applySecurityWaf(mod.tsCloud,securityConfig?.waf,resolveProvider(mod.tsCloud));for(const warning of applied.warnings)log.warn(warning);return applied.config}catch(err){log.debug("Could not load config/cloud.ts tsCloud export:",err);return}}export function resolveProvider(tsCloudConfig){return tsCloudConfig?.cloud?.provider||process.env.CLOUD_PROVIDER||"aws"}function readWaitSecs(name,defaultSecs){const secs=process.env[name]?Number.parseInt(process.env[name],10):Number.NaN;return Number.isFinite(secs)&&secs>0?secs:defaultSecs}function fmtDuration(secs){const m=Math.floor(secs/60);const s=secs%60;return m?s?`${m}m${s}s`:`${m}m`:`${s}s`}export function pollFailureDetail(error){const raw=error instanceof Error?error.message:typeof error==="string"?error:"";const collapsed=raw.replace(/\s+/g," ").trim();if(!collapsed)return;return collapsed.length>300?`${collapsed.slice(0,297)}...`:collapsed}export function sshUnreachableMessage(opts){const detail=pollFailureDetail(opts.lastError);return`SSH did not become reachable on ${opts.ip} within ${fmtDuration(opts.waitSecs)} (waited ${opts.elapsedSecs}s).`+(detail?`
3
3
  Last attempt: ${detail}`:"")+`
4
4
  A connection timeout means the box is probably still booting, so raise TS_CLOUD_SSH_WAIT_SECS and retry. "Permission denied" means the key is not authorized, and a refused or reset connection (especially after earlier attempts got further) usually means fail2ban banned this IP. Waiting longer fixes neither.`}export function bunRuntimeMissingMessage(opts){const detail=pollFailureDetail(opts.lastError);return`bun runtime did not appear at /usr/local/bin/bun within ${fmtDuration(opts.waitSecs)} (waited ${opts.elapsedSecs}s).`+(detail?`
5
5
  Last attempt: ${detail}`:"")+`
@@ -0,0 +1,16 @@
1
+ import type { SecurityConfig } from '@stacksjs/types';
2
+ export declare function applySecurityWaf(tsCloudConfig: any, waf: WafSettings | undefined, provider: string): AppliedWaf;
3
+ export declare interface AppliedWaf {
4
+ config: any
5
+ warnings: string[]
6
+ }
7
+ /**
8
+ * `security.waf` in the app's Stacks config, applied to the deploy target.
9
+ *
10
+ * Box deploys run zig-waf, configured by ts-cloud's `infrastructure.compute.waf`. Before this the
11
+ * only way to configure it was to know about that field in `config/cloud.ts`; now the security
12
+ * config drives it, and an explicit `compute.waf` in `config/cloud.ts` still wins field by field,
13
+ * so nobody's existing setup changes under them.
14
+ */
15
+ declare type WafSettings = NonNullable<NonNullable<SecurityConfig['waf']>>;
16
+ export {};
@@ -0,0 +1 @@
1
+ const COMPUTE_FIELDS=["mode","paranoiaLevel","inboundThreshold","outboundThreshold","maxBodyBytes","bypassPaths","exclusions","forward"];const AWS_UNSUPPORTED=["paranoiaLevel","inboundThreshold","outboundThreshold","maxBodyBytes","bypassPaths","exclusions","forward"];export function applySecurityWaf(tsCloudConfig,waf,provider){const warnings=[];if(!tsCloudConfig||!waf)return{config:tsCloudConfig,warnings};if(provider==="aws"){const unsupported=AWS_UNSUPPORTED.filter((key)=>waf[key]!==undefined);if(unsupported.length>0)warnings.push(`security.waf: AWS WAF has no equivalent for ${unsupported.join(", ")}; those settings apply to box deploys only.`);return{config:tsCloudConfig,warnings}}const config=structuredClone(tsCloudConfig);const compute=(config.infrastructure??={}).compute??={};const explicit=compute.waf;if(explicit===false){warnings.push("security.waf is ignored: config/cloud.ts sets infrastructure.compute.waf to false.");return{config,warnings}}const fromSecurity={mode:"detection"};for(const key of COMPUTE_FIELDS){if(waf[key]!==undefined)fromSecurity[key]=structuredClone(waf[key])}const overrides=explicit&&typeof explicit==="object"?explicit:{};const overridden=Object.keys(overrides).filter((key)=>(key in fromSecurity)&&JSON.stringify(overrides[key])!==JSON.stringify(fromSecurity[key]));if(overridden.length>0)warnings.push(`security.waf: config/cloud.ts infrastructure.compute.waf overrides ${overridden.join(", ")}.`);compute.waf={...fromSecurity,...overrides};return{config,warnings}}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.627",
5
+ "version": "0.75.628",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -95,71 +95,71 @@
95
95
  "prepublishOnly": "bun run build"
96
96
  },
97
97
  "dependencies": {
98
- "@stacksjs/actions": "0.75.627",
99
- "@stacksjs/docs": "0.75.627",
100
- "@stacksjs/ai": "0.75.627",
101
- "@stacksjs/alias": "0.75.627",
102
- "@stacksjs/analytics": "0.75.627",
103
- "@stacksjs/api": "0.75.627",
104
- "@stacksjs/arrays": "0.75.627",
105
- "@stacksjs/auth": "0.75.627",
106
- "@stacksjs/browser-extension": "0.75.627",
107
- "@stacksjs/build": "0.75.627",
98
+ "@stacksjs/actions": "0.75.628",
99
+ "@stacksjs/docs": "0.75.628",
100
+ "@stacksjs/ai": "0.75.628",
101
+ "@stacksjs/alias": "0.75.628",
102
+ "@stacksjs/analytics": "0.75.628",
103
+ "@stacksjs/api": "0.75.628",
104
+ "@stacksjs/arrays": "0.75.628",
105
+ "@stacksjs/auth": "0.75.628",
106
+ "@stacksjs/browser-extension": "0.75.628",
107
+ "@stacksjs/build": "0.75.628",
108
108
  "@stacksjs/bumpx": "^0.2.32",
109
- "@stacksjs/cache": "0.75.627",
110
- "@stacksjs/chat": "0.75.627",
109
+ "@stacksjs/cache": "0.75.628",
110
+ "@stacksjs/chat": "0.75.628",
111
111
  "@stacksjs/clapp": "^0.2.17",
112
- "@stacksjs/cli": "0.75.627",
113
- "@stacksjs/cloud": "0.75.627",
114
- "@stacksjs/cms": "0.75.627",
115
- "@stacksjs/collections": "0.75.627",
116
- "@stacksjs/commerce": "0.75.627",
117
- "@stacksjs/config": "0.75.627",
118
- "@stacksjs/database": "0.75.627",
119
- "@stacksjs/desktop-build": "0.75.627",
120
- "@stacksjs/dns": "0.75.627",
112
+ "@stacksjs/cli": "0.75.628",
113
+ "@stacksjs/cloud": "0.75.628",
114
+ "@stacksjs/cms": "0.75.628",
115
+ "@stacksjs/collections": "0.75.628",
116
+ "@stacksjs/commerce": "0.75.628",
117
+ "@stacksjs/config": "0.75.628",
118
+ "@stacksjs/database": "0.75.628",
119
+ "@stacksjs/desktop-build": "0.75.628",
120
+ "@stacksjs/dns": "0.75.628",
121
121
  "@stacksjs/dnsx": "^0.2.3",
122
- "@stacksjs/email": "0.75.627",
123
- "@stacksjs/enums": "0.75.627",
124
- "@stacksjs/env": "0.75.627",
125
- "@stacksjs/error-handling": "0.75.627",
126
- "@stacksjs/events": "0.75.627",
127
- "@stacksjs/features": "0.75.627",
128
- "@stacksjs/git": "0.75.627",
122
+ "@stacksjs/email": "0.75.628",
123
+ "@stacksjs/enums": "0.75.628",
124
+ "@stacksjs/env": "0.75.628",
125
+ "@stacksjs/error-handling": "0.75.628",
126
+ "@stacksjs/events": "0.75.628",
127
+ "@stacksjs/features": "0.75.628",
128
+ "@stacksjs/git": "0.75.628",
129
129
  "@stacksjs/gitit": "^0.2.5",
130
- "@stacksjs/health": "0.75.627",
131
- "@stacksjs/hq": "0.75.627",
130
+ "@stacksjs/health": "0.75.628",
131
+ "@stacksjs/hq": "0.75.628",
132
132
  "@stacksjs/httx": "^0.1.10",
133
- "@stacksjs/image": "0.75.627",
134
- "@stacksjs/lint": "0.75.627",
135
- "@stacksjs/logging": "0.75.627",
136
- "@stacksjs/notifications": "0.75.627",
137
- "@stacksjs/objects": "0.75.627",
138
- "@stacksjs/orm": "0.75.627",
139
- "@stacksjs/path": "0.75.627",
140
- "@stacksjs/payments": "0.75.627",
141
- "@stacksjs/realtime": "0.75.627",
142
- "@stacksjs/router": "0.75.627",
133
+ "@stacksjs/image": "0.75.628",
134
+ "@stacksjs/lint": "0.75.628",
135
+ "@stacksjs/logging": "0.75.628",
136
+ "@stacksjs/notifications": "0.75.628",
137
+ "@stacksjs/objects": "0.75.628",
138
+ "@stacksjs/orm": "0.75.628",
139
+ "@stacksjs/path": "0.75.628",
140
+ "@stacksjs/payments": "0.75.628",
141
+ "@stacksjs/realtime": "0.75.628",
142
+ "@stacksjs/router": "0.75.628",
143
143
  "@stacksjs/rpx": "^0.11.54",
144
- "@stacksjs/scheduler": "0.75.627",
145
- "@stacksjs/search-engine": "0.75.627",
146
- "@stacksjs/security": "0.75.627",
147
- "@stacksjs/server": "0.75.627",
148
- "@stacksjs/sites": "0.75.627",
149
- "@stacksjs/skills": "0.75.627",
150
- "@stacksjs/socials": "0.75.627",
151
- "@stacksjs/storage": "0.75.627",
152
- "@stacksjs/strings": "0.75.627",
144
+ "@stacksjs/scheduler": "0.75.628",
145
+ "@stacksjs/search-engine": "0.75.628",
146
+ "@stacksjs/security": "0.75.628",
147
+ "@stacksjs/server": "0.75.628",
148
+ "@stacksjs/sites": "0.75.628",
149
+ "@stacksjs/skills": "0.75.628",
150
+ "@stacksjs/socials": "0.75.628",
151
+ "@stacksjs/storage": "0.75.628",
152
+ "@stacksjs/strings": "0.75.628",
153
153
  "@stacksjs/stx": "^0.2.908",
154
- "@stacksjs/testing": "0.75.627",
155
- "@stacksjs/tinker": "0.75.627",
154
+ "@stacksjs/testing": "0.75.628",
155
+ "@stacksjs/tinker": "0.75.628",
156
156
  "@stacksjs/tlsx": "^0.13.19",
157
157
  "@stacksjs/ts-cloud": "^0.16.144",
158
- "@stacksjs/tunnel": "0.75.627",
159
- "@stacksjs/types": "0.75.627",
160
- "@stacksjs/ui": "0.75.627",
161
- "@stacksjs/utils": "0.75.627",
162
- "@stacksjs/validation": "0.75.627",
158
+ "@stacksjs/tunnel": "0.75.628",
159
+ "@stacksjs/types": "0.75.628",
160
+ "@stacksjs/ui": "0.75.628",
161
+ "@stacksjs/utils": "0.75.628",
162
+ "@stacksjs/validation": "0.75.628",
163
163
  "ajv": "^8.20.0",
164
164
  "ajv-formats": "^3.0.1",
165
165
  "bun-plugin-stx": "^0.2.908",