@stacksjs/config 0.63.0 → 0.63.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,1508 +1,5 @@
1
1
  // @bun
2
- var __defProp = Object.defineProperty;
3
- var __export = (target, all) => {
4
- for (var name in all)
5
- __defProp(target, name, {
6
- get: all[name],
7
- enumerable: true,
8
- configurable: true,
9
- set: (newValue) => all[name] = () => newValue
10
- });
11
- };
2
+ var f=Object.defineProperty;var u=(z,W)=>{for(var R in W)f(z,R,{get:W[R],enumerable:!0,configurable:!0,set:(V)=>W[R]=()=>V})};var J={};u(J,{ui:()=>rz,team:()=>lz,storage:()=>uz,services:()=>fz,security:()=>hz,searchEngine:()=>dz,queue:()=>yz,ports:()=>gz,payment:()=>vz,overrides:()=>M,notification:()=>pz,logger:()=>mz,localUrl:()=>t,library:()=>bz,hashing:()=>wz,git:()=>kz,errors:()=>Tz,email:()=>Dz,docs:()=>Sz,dns:()=>Iz,determineAppEnv:()=>cz,defineUi:()=>Pz,defineStorage:()=>Oz,defineStacksConfig:()=>s,defineSms:()=>Mz,defineServices:()=>Nz,defineSecurity:()=>Az,defineSearchEngine:()=>Uz,defineQueue:()=>xz,definePayment:()=>_z,defineNotification:()=>Wz,defineModel:()=>Ez,defineLibrary:()=>Qz,defineJob:()=>Fz,defineHashing:()=>$z,defineGit:()=>Zz,defineEvents:()=>Cz,defineEmailConfig:()=>Xz,defineEmail:()=>Yz,defineDns:()=>Vz,defineDependencies:()=>Rz,defineDatabase:()=>Kz,defineCronJob:()=>Jz,defineCli:()=>zz,defineChat:()=>o,defineCdn:()=>e,defineCache:()=>i,defineApp:()=>n,defaults:()=>U,database:()=>qz,config:()=>d,cloud:()=>Gz,cli:()=>Hz,cache:()=>Bz,app:()=>$,analytics:()=>jz,ai:()=>Lz});import{commandsPath as l,userDatabasePath as r}from"@stacksjs/path";var U={ai:{deploy:!1,models:["amazon.titan-embed-text-v1","amazon.titan-text-express-v1","amazon.titan-embed-image-v1","amazon.titan-image-generator-v1","anthropic.claude-v1","anthropic.claude-v2","anthropic.claude-v2:1","anthropic.claude-instant-v1","meta.llama2-13b-chat-v1","meta.llama2-70b-chat-v1"]},analytics:{driver:void 0},app:{name:"Stacks",description:"A Stacks application.",env:"local",url:"stacks.localhost",debug:!0,key:"",timezone:"UTC",locale:"en",fallbackLocale:"en",cipher:"AES-256-CBC",docMode:!1,redirectUrls:[],maintenanceMode:!1},cli:{name:"My Custom CLI",command:"my-custom-cli",description:"Stacks is a full-stack framework for TypeScript.",source:l(),deploy:!1},cache:{driver:"redis",prefix:"stx",ttl:3600,drivers:{redis:{connection:"default",host:"localhost",port:6379,username:"",password:""}}},cloud:{type:"serverless",driver:"aws",storage:{},environments:["production","staging","development"],firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0},cdn:{allowedMethods:"GET_HEAD",cachedMethods:"GET_HEAD",minTtl:0,defaultTtl:86400,maxTtl:31536000,compress:!0,priceClass:"PriceClass_All",originShieldRegion:"us-east-1",cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:2}},fileSystem:!1},database:{default:"sqlite",connections:{sqlite:{database:r("stacks.sqlite"),prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"},dns:{driver:"aws",a:[],aaaa:[],cname:[],mx:[],txt:[]},docs:{lang:"en-US",title:"Stacks",description:"Rapid application, cloud & library framework.",lastUpdated:!0,deploy:!1,themeConfig:{editLink:{pattern:"https://github.com/stacksjs/stacks/edit/main/docs/docs/:path",text:"Edit this page on GitHub"},footer:{message:"Released under the MIT License.",copyright:"Copyright \xA9 2024-present Stacks.js, Inc."}}},email:{from:{name:"Stacks",address:"no-reply@stacksjs.org"},mailboxes:[],server:{scan:!0}},errors:{messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}},git:{hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you\u2019re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:"Write a SHORT, IMPERATIVE tense description of the change:\n",body:'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',breaking:'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:"List any ISSUES by this change. E.g.: #31, #34:\n",confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: \u2728 A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: \u26A1\uFE0F A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: \u2705 Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]},hashing:{driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,time:1}},library:{name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}},logger:{level:3,logFilePath:"storage/logs/console.log",errorsPath:"storage/logs/errors.log"},notification:{default:"email"},payment:{driver:"stripe"},ports:{frontend:3000,backend:3001,admin:3002,library:3003,desktop:3004,email:3005,docs:3006,inspect:3007,api:3008,systemTray:3009,database:3010},queue:{default:"sync",connections:{sync:{driver:"sync"},database:{driver:"database",table:"jobs",queue:"default",retry_after:90},redis:{driver:"redis",connection:"default",queue:"default",retry_after:90},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}},searchEngine:{driver:"opensearch"},security:{firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0}},services:{aws:{accountId:"",appId:"",apiKey:"",region:"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},storage:{driver:"s3"},team:{name:"Stacks",members:{"Chris Breuer":"chris@stacksjs.org"}},ui:{shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}}}};var O={default:"meta.llama2-70b-chat-v1",models:["amazon.titan-text-express-v1","amazon.titan-text-lite-v1","meta.llama2-70b-chat-v1"],deploy:!0};var P={driver:"fathom",drivers:{googleAnalytics:{trackingId:"UA-XXXXXXXXX-X"},fathom:{siteId:"WOLZMJDL"}}};import{env as Q}from"@stacksjs/env";var E={name:Q.APP_NAME??"Stacks",description:"Stacks is a full-stack framework for building modern web applications.",env:Q.APP_ENV??"local",url:Q.APP_URL??"stacks.localhost",redirectUrls:["stacksjs.com"],debug:Q.DEBUG??!1,key:Q.APP_KEY,maintenanceMode:Q.APP_MAINTENANCE??!1,docMode:!1,timezone:"America/Los_Angeles",locale:"en",fallbackLocale:"en",cipher:"aes-256-cbc"};import{env as A}from"@stacksjs/env";var C={driver:"dynamodb",prefix:"stacks",ttl:3600,drivers:{dynamodb:{key:A.AWS_ACCESS_KEY_ID||"",secret:A.AWS_SECRET_ACCESS_KEY||"",region:A.AWS_DEFAULT_REGION||"us-east-1",table:"cache",endpoint:""},memcached:{persistent_id:"",sasl:["",""],options:{},servers:[{host:"127.0.0.1",port:11211,weight:100}]},redis:{connection:"cache",host:"127.0.0.1",port:6379,password:"",username:"stacks"}}};var L={name:"My Custom CLI",command:"custom-cli",description:"This is an example command to illustrate how to create your own commands. Check out `../app/commands` for more.",deploy:!0};import{env as c}from"@stacksjs/env";var _={firewall:{enabled:!0,countryCodes:["RU","IR"],ipAddresses:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0,queryString:[],httpHeaders:[]}};var j={type:"serverless",driver:"aws",firewall:_.firewall,environments:["production","staging","development"],storage:{},api:{prefix:c.API_PREFIX||"api",description:"My awesome Stacks API",deploy:!0,memorySize:512,prewarm:10,timeout:30},cdn:{compress:!0,allowedMethods:"ALL",cachedMethods:"GET_HEAD",originShieldRegion:"us-east-1",minTtl:0,defaultTtl:86400,maxTtl:31536000,cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:1}},fileSystem:!0};import{env as K}from"@stacksjs/env";var B={default:K.DB_CONNECTION||"mysql",connections:{sqlite:{database:K.DB_DATABASE||"stacks",prefix:""},dynamodb:{key:K.AWS_ACCESS_KEY_ID||"",secret:K.AWS_SECRET_ACCESS_KEY||"",region:K.AWS_DEFAULT_REGION||"us-east-1",prefix:K.DB_DATABASE||"stacks",endpoint:"http://localhost",port:K.DB_PORT||8000},mysql:{name:K.DB_DATABASE||"stacks",host:K.DB_HOST||"127.0.0.1",port:K.DB_PORT||3306,username:K.DB_USERNAME||"root",password:K.DB_PASSWORD||"",prefix:""},postgres:{name:K.DB_DATABASE||"stacks",host:K.DB_HOST||"127.0.0.1",port:K.DB_PORT||3306,username:K.DB_USERNAME||"",password:K.DB_PASSWORD||"",prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"};import{env as a}from"@stacksjs/env";var G={a:[{name:a.APP_URL||"",address:"10.0.0.1",ttl:300},{name:"www",address:"@",ttl:300}],aaaa:[],cname:[],mx:[],txt:[],nameservers:[]};import{env as N}from"@stacksjs/env";var H={from:{name:N.MAIL_FROM_NAME||"Stacks",address:N.MAIL_FROM_ADDRESS||"no-reply@stacksjs.org"},mailboxes:["chris@stacksjs.org","blake@stacksjs.org","glenn@stacksjs.org"],url:N.APP_URL||"http://localhost:3000",charset:"UTF-8",server:{scan:!0}};var q={messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}};var I={hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you\u2019re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:"Write a SHORT, IMPERATIVE tense description of the change:\n",body:'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',breaking:'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:"List any ISSUES by this change. E.g.: #31, #34:\n",confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: \u2728 A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: \u26A1\uFE0F A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: \u2705 Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]};var S={driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,threads:1,time:1}};var D={name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",releaseable:!0,vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}};var T={level:3,logFilePath:"storage/logs/console.log",errorsPath:"storage/logs/errors.log"};var k={default:"email"};var w={driver:"stripe"};import{env as X}from"@stacksjs/env";var b={frontend:X.PORT??3000,backend:X.PORT_BACKEND??3001,admin:X.PORT_ADMIN??3002,library:X.PORT_LIBRARY??3003,desktop:X.PORT_DESKTOP??3004,email:X.PORT_EMAIL??3005,docs:X.PORT_DOCS??3006,inspect:X.PORT_INSPECT??3007,api:X.PORT_API??3008,systemTray:X.PORT_SYSTEM_TRAY??3009,database:3010};var m={default:"sync",connections:{sync:{driver:"sync"},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}};var p={driver:"opensearch"};import{env as x}from"@stacksjs/env";var v={aws:{accountId:x.AWS_ACCOUNT_ID||"",appId:x.AWS_ACCESS_KEY_ID||"",apiKey:x.AWS_SECRET_ACCESS_KEY||"",region:x.AWS_DEFAULT_REGION||"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},lemonSqueezy:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}};var g={driver:"s3"};var y={name:"Stacks",members:{chris:"chris@stacksjs.org",blake:"blake@stacksjs.org",zoltan:"zoltan@stacksjs.org",freddy:"freddy@stacksjs.org",glenn:"glenn@stacksjs.org",dorell:"dorell@stacksjs.org",avery:"avery@stacksjs.org",adelino:"adelino@stacksjs.org"}};var h={shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}},theme:{colors:{veryCool:"#0000ff",brand:{primary:"hsl(var(--hue, 217) 78% 51%)"}}}};var M={ai:O,analytics:P,app:E,cache:C,cli:L,cloud:j,database:B,dns:G,email:H,errors:q,git:I,hashing:S,library:D,logger:T,notification:k,queue:m,payment:w,ports:b,searchEngine:p,security:_,services:v,storage:g,team:y,ui:h};import{createLocalTunnel as Z}from"@stacksjs/tunnel";async function t({domain:z=J.app.url||"stacks",type:W="frontend",localhost:R=!1,https:V=void 0,network:Y=void 0}={}){let F;switch(W){case"frontend":if(Y)return await Z(J.ports?.frontend||3000);if(R)return`http://localhost:${J.ports?.frontend}`;if(F=z.replace(/\.[^\.]+$/,".localhost"),V)return`https://${F}`;return F;case"backend":if(Y)return await Z(J.ports?.backend||3001);if(R)return`http://localhost:${J.ports?.backend}`;if(F=z.replace(/\.[^\.]+$/,".localhost/api/"),V)return`https://${F}`;return F;case"api":if(Y)return await Z(J.ports?.backend||3001);if(R)return`http://localhost:${J.ports?.backend}`;if(F=z.replace(/\.[^\.]+$/,".localhost/api/"),V)return`https://${F}`;return F;case"admin":if(Y)return await Z(J.ports?.admin||3002);if(R)return`http://localhost:${J.ports?.admin}`;if(F=z.replace(/\.[^\.]+$/,".localhost/admin/"),V)return`https://${F}`;return F;case"library":if(Y)return await Z(J.ports?.library||3003);if(R)return`http://localhost:${J.ports?.library}`;if(F=z.replace(/\.[^\.]+$/,".localhost/libs/"),V)return`https://${F}`;return F;case"email":if(Y)return await Z(J.ports?.email||3005);if(R)return`http://localhost:${J.ports?.email}`;if(F=z.replace(/\.[^\.]+$/,".localhost/email/"),V)return`https://${F}`;return F;case"desktop":if(Y)return await Z(J.ports?.desktop||3004);if(R)return`http://localhost:${J.ports?.email}`;if(F=z.replace(/\.[^\.]+$/,".localhost/email/"),V)return`https://${F}`;return F;case"docs":if(Y)return await Z(J.ports?.desktop||3006);if(R)return`http://localhost:${J.ports?.docs}`;if(F=z.replace(/\.[^\.]+$/,".localhost/docs/"),V)return`https://${F}`;return F;case"inspect":if(Y)return await Z(J.ports?.desktop||3007);if(R)return`http://localhost:${J.ports?.inspect}`;if(F=z.replace(/\.[^\.]+$/,".localhost/__inspect/"),V)return`https://${F}`;return F;default:if(R)return`http://localhost:${J.ports?.frontend}`;if(F=z.replace(/\.[^\.]+$/,".localhost"),V)return`https://${F}`;return F}}function s(z){return z}function n(z){return z}function i(z){return z}function e(z){return z}function o(z){return z}function zz(z){return z}function Fz(z){return z}function Jz(z){return z}function Kz(z){return z}function Rz(z){return z}function Vz(z){return z}function Xz(z){return z}function Yz(z){return z}function Zz(z){return z}function $z(z){return z}function Qz(z){return z}function Wz(z){return z}function _z(z){return z}function xz(z){return z}function Uz(z){return z}function Az(z){return z}function Nz(z){return z}function Mz(z){return z}function Oz(z){return z}function Pz(z){return z}function Ez(z){return z}function Cz(z){return z}var d={...U,...M},{ai:Lz,analytics:jz,app:$,cache:Bz,cloud:Gz,cli:Hz,database:qz,dns:Iz,docs:Sz,email:Dz,errors:Tz,git:kz,hashing:wz,library:bz,logger:mz,notification:pz,payment:vz,ports:gz,queue:yz,security:hz,searchEngine:dz,services:fz,storage:uz,team:lz,ui:rz}=d;var cz=()=>{if($.env==="local")return"dev";if($.env==="development")return"dev";if($.env==="staging")return"stage";if($.env==="production")return"prod";if(!$.env)throw new Error("Couldn't determine app environment");return $.env};export{rz as ui,lz as team,uz as storage,fz as services,hz as security,dz as searchEngine,yz as queue,gz as ports,vz as payment,M as overrides,pz as notification,mz as logger,t as localUrl,bz as library,wz as hashing,kz as git,Tz as errors,Dz as email,Sz as docs,Iz as dns,cz as determineAppEnv,Pz as defineUi,Oz as defineStorage,s as defineStacksConfig,Mz as defineSms,Nz as defineServices,Az as defineSecurity,Uz as defineSearchEngine,xz as defineQueue,_z as definePayment,Wz as defineNotification,Ez as defineModel,Qz as defineLibrary,Fz as defineJob,$z as defineHashing,Zz as defineGit,Cz as defineEvents,Xz as defineEmailConfig,Yz as defineEmail,Vz as defineDns,Rz as defineDependencies,Kz as defineDatabase,Jz as defineCronJob,zz as defineCli,o as defineChat,e as defineCdn,i as defineCache,n as defineApp,U as defaults,qz as database,J as config,Gz as cloud,Hz as cli,Bz as cache,$ as app,jz as analytics,Lz as ai};
12
3
 
13
- // src/config.ts
14
- var exports_config = {};
15
- __export(exports_config, {
16
- ui: () => ui2,
17
- team: () => team2,
18
- storage: () => storage2,
19
- services: () => services2,
20
- security: () => security3,
21
- searchEngine: () => searchEngine,
22
- queue: () => queue2,
23
- ports: () => ports2,
24
- payment: () => payment2,
25
- overrides: () => overrides_default,
26
- notification: () => notification2,
27
- logger: () => logger2,
28
- localUrl: () => localUrl,
29
- library: () => library2,
30
- hashing: () => hashing2,
31
- git: () => git2,
32
- errors: () => errors2,
33
- email: () => email2,
34
- docs: () => docs,
35
- dns: () => dns2,
36
- determineAppEnv: () => determineAppEnv,
37
- defineUi: () => defineUi,
38
- defineStorage: () => defineStorage,
39
- defineStacksConfig: () => defineStacksConfig,
40
- defineSms: () => defineSms,
41
- defineServices: () => defineServices,
42
- defineSecurity: () => defineSecurity,
43
- defineSearchEngine: () => defineSearchEngine,
44
- defineQueue: () => defineQueue,
45
- definePayment: () => definePayment,
46
- defineNotification: () => defineNotification,
47
- defineModel: () => defineModel,
48
- defineLibrary: () => defineLibrary,
49
- defineJob: () => defineJob,
50
- defineHashing: () => defineHashing,
51
- defineGit: () => defineGit,
52
- defineEvents: () => defineEvents,
53
- defineEmailConfig: () => defineEmailConfig,
54
- defineEmail: () => defineEmail,
55
- defineDns: () => defineDns,
56
- defineDependencies: () => defineDependencies,
57
- defineDatabase: () => defineDatabase,
58
- defineCronJob: () => defineCronJob,
59
- defineCli: () => defineCli,
60
- defineChat: () => defineChat,
61
- defineCdn: () => defineCdn,
62
- defineCache: () => defineCache,
63
- defineApp: () => defineApp,
64
- defaults: () => defaults_default,
65
- database: () => database2,
66
- config: () => config,
67
- cloud: () => cloud2,
68
- cli: () => cli2,
69
- cache: () => cache2,
70
- app: () => app2,
71
- analytics: () => analytics2,
72
- ai: () => ai2
73
- });
74
-
75
- // src/defaults.ts
76
- import {commandsPath, userDatabasePath} from "@stacksjs/path";
77
- var defaults_default = {
78
- ai: {
79
- deploy: false,
80
- models: [
81
- "amazon.titan-embed-text-v1",
82
- "amazon.titan-text-express-v1",
83
- "amazon.titan-embed-image-v1",
84
- "amazon.titan-image-generator-v1",
85
- "anthropic.claude-v1",
86
- "anthropic.claude-v2",
87
- "anthropic.claude-v2:1",
88
- "anthropic.claude-instant-v1",
89
- "meta.llama2-13b-chat-v1",
90
- "meta.llama2-70b-chat-v1"
91
- ]
92
- },
93
- analytics: {
94
- driver: undefined
95
- },
96
- app: {
97
- name: "Stacks",
98
- description: "A Stacks application.",
99
- env: "local",
100
- url: "stacks.localhost",
101
- debug: true,
102
- key: "",
103
- timezone: "UTC",
104
- locale: "en",
105
- fallbackLocale: "en",
106
- cipher: "AES-256-CBC",
107
- docMode: false,
108
- redirectUrls: [],
109
- maintenanceMode: false
110
- },
111
- cli: {
112
- name: "My Custom CLI",
113
- command: "my-custom-cli",
114
- description: "Stacks is a full-stack framework for TypeScript.",
115
- source: commandsPath(),
116
- deploy: false
117
- },
118
- cache: {
119
- driver: "redis",
120
- prefix: "stx",
121
- ttl: 3600,
122
- drivers: {
123
- redis: {
124
- connection: "default",
125
- host: "localhost",
126
- port: 6379,
127
- username: "",
128
- password: ""
129
- }
130
- }
131
- },
132
- cloud: {
133
- type: "serverless",
134
- driver: "aws",
135
- storage: {},
136
- environments: ["production", "staging", "development"],
137
- firewall: {
138
- enabled: true,
139
- countryCodes: [],
140
- ipAddresses: [],
141
- queryString: [],
142
- httpHeaders: [],
143
- rateLimitPerMinute: 1000,
144
- useIpReputationLists: true,
145
- useKnownBadInputsRuleSet: true
146
- },
147
- cdn: {
148
- allowedMethods: "GET_HEAD",
149
- cachedMethods: "GET_HEAD",
150
- minTtl: 0,
151
- defaultTtl: 86400,
152
- maxTtl: 31536000,
153
- compress: true,
154
- priceClass: "PriceClass_All",
155
- originShieldRegion: "us-east-1",
156
- cookieBehavior: "none",
157
- allowList: {
158
- cookies: [],
159
- headers: [],
160
- queryStrings: []
161
- },
162
- realtimeLogs: {
163
- enabled: true,
164
- samplingRate: 2
165
- }
166
- },
167
- fileSystem: false
168
- },
169
- database: {
170
- default: "sqlite",
171
- connections: {
172
- sqlite: {
173
- database: userDatabasePath("stacks.sqlite"),
174
- prefix: ""
175
- }
176
- },
177
- migrations: "migrations",
178
- migrationLocks: "migration_locks"
179
- },
180
- dns: {
181
- driver: "aws",
182
- a: [],
183
- aaaa: [],
184
- cname: [],
185
- mx: [],
186
- txt: []
187
- },
188
- docs: {
189
- lang: "en-US",
190
- title: "Stacks",
191
- description: "Rapid application, cloud & library framework.",
192
- lastUpdated: true,
193
- deploy: false,
194
- themeConfig: {
195
- editLink: {
196
- pattern: "https://github.com/stacksjs/stacks/edit/main/docs/docs/:path",
197
- text: "Edit this page on GitHub"
198
- },
199
- footer: {
200
- message: "Released under the MIT License.",
201
- copyright: "Copyright \xA9 2024-present Stacks.js, Inc."
202
- }
203
- }
204
- },
205
- email: {
206
- from: {
207
- name: "Stacks",
208
- address: "no-reply@stacksjs.org"
209
- },
210
- mailboxes: [],
211
- server: {
212
- scan: true
213
- }
214
- },
215
- errors: {
216
- messages: {
217
- string: "The {{ field }} field must be a string",
218
- email: "The {{ field }} field must be a valid email address",
219
- regex: "The {{ field }} field format is invalid",
220
- url: "The {{ field }} field must be a valid URL",
221
- activeUrl: "The {{ field }} field must be a valid URL",
222
- alpha: "The {{ field }} field must contain only letters",
223
- alphaNumeric: "The {{ field }} field must contain only letters and numbers",
224
- minLength: "The {{ field }} field must have at least {{ min }} characters",
225
- maxLength: "The {{ field }} field must not be greater than {{ max }} characters",
226
- fixedLength: "The {{ field }} field must be {{ size }} characters long",
227
- confirmed: "The {{ field }} field and {{ otherField }} field must be the same",
228
- endsWith: "The {{ field }} field must end with {{ substring }}",
229
- startsWith: "The {{ field }} field must start with {{ substring }}",
230
- sameAs: "The {{ field }} field and {{ otherField }} field must be the same",
231
- notSameAs: "The {{ field }} field and {{ otherField }} field must be different",
232
- in: "The selected {{ field }} is invalid",
233
- notIn: "The selected {{ field }} is invalid",
234
- ipAddress: "The {{ field }} field must be a valid IP address",
235
- uuid: "The {{ field }} field must be a valid UUID",
236
- ascii: "The {{ field }} field must only contain ASCII characters",
237
- creditCard: "The {{ field }} field must be a valid {{ providersList }} card number",
238
- hexCode: "The {{ field }} field must be a valid hex color code",
239
- iban: "The {{ field }} field must be a valid IBAN number",
240
- jwt: "The {{ field }} field must be a valid JWT token",
241
- coordinates: "The {{ field }} field must contain latitude and longitude coordinates",
242
- mobile: "The {{ field }} field must be a valid mobile phone number",
243
- passport: "The {{ field }} field must be a valid passport number",
244
- postalCode: "The {{ field }} field must be a valid postal code",
245
- boolean: "The value must be a boolean",
246
- number: "The {{ field }} field must be a number",
247
- min: "The {{ field }} field must be at least {{ min }}",
248
- max: "The {{ field }} field must not be greater than {{ max }}",
249
- range: "The {{ field }} field must be between {{ min }} and {{ max }}",
250
- positive: "The {{ field }} field must be positive",
251
- negative: "The {{ field }} field must be negative",
252
- decimal: "The {{ field }} field must have {{ digits }} decimal places",
253
- withoutDecimals: "The {{ field }} field must not have decimal places",
254
- date: "The {{ field }} field must be a datetime value",
255
- "date.equals": "The {{ field }} field must be a date equal to {{ expectedValue }}",
256
- "date.after": "The {{ field }} field must be a date after {{ expectedValue }}",
257
- "date.before": "The {{ field }} field must be a date before {{ expectedValue }}",
258
- "date.afterOrEqual": "The {{ field }} field must be a date after or equal to {{ expectedValue }}",
259
- "date.beforeOrEqual": "The {{ field }} field must be a date before or equal to {{ expectedValue }}",
260
- "date.sameAs": "The {{ field }} field and {{ otherField }} field must be the same",
261
- "date.notSameAs": "The {{ field }} field and {{ otherField }} field must be different",
262
- "date.afterField": "The {{ field }} field must be a date after {{ otherField }}",
263
- accepted: "The {{ field }} field must be accepted",
264
- enum: "The selected {{ field }} is invalid",
265
- literal: "The {{ field }} field must be {{ expectedValue }}",
266
- object: "The {{ field }} field must be an object",
267
- record: "The {{ field }} field must be an object",
268
- "record.minLength": "The {{ field }} field must have at least {{ min }} items",
269
- "record.maxLength": "The {{ field }} field must not have more than {{ max }} items",
270
- "record.fixedLength": "The {{ field }} field must contain {{ size }} items",
271
- array: "The {{ field }} field must be an array",
272
- "array.minLength": "The {{ field }} field must have at least {{ min }} items",
273
- "array.maxLength": "The {{ field }} field must not have more than {{ max }} items",
274
- "array.fixedLength": "The {{ field }} field must contain {{ size }} items",
275
- notEmpty: "The {{ field }} field must not be empty",
276
- distinct: "The {{ field }} field has duplicate values",
277
- tuple: "The {{ field }} field must be an array",
278
- union: "Invalid value provided for {{ field }} field",
279
- unionGroup: "Invalid value provided for {{ field }} field",
280
- unionOfTypes: "Invalid value provided for {{ field }} field"
281
- }
282
- },
283
- git: {
284
- hooks: {
285
- "pre-commit": "lint-staged"
286
- },
287
- scopes: [
288
- "",
289
- "ci",
290
- "deps",
291
- "dx",
292
- "release",
293
- "docs",
294
- "test",
295
- "core",
296
- "actions",
297
- "arrays",
298
- "auth",
299
- "build",
300
- "cache",
301
- "cli",
302
- "cloud",
303
- "collections",
304
- "config",
305
- "database",
306
- "datetime",
307
- "docs",
308
- "errors",
309
- "git",
310
- "lint",
311
- "x-ray",
312
- "modules",
313
- "notifications",
314
- "objects",
315
- "path",
316
- "realtime",
317
- "router",
318
- "buddy",
319
- "security",
320
- "server",
321
- "storage",
322
- "strings",
323
- "tests",
324
- "types",
325
- "ui",
326
- "utils"
327
- ],
328
- messages: {
329
- type: "Select the type of change that you\u2019re committing:",
330
- scope: "Select the SCOPE of this change (optional):",
331
- customScope: "Select the SCOPE of this change:",
332
- subject: "Write a SHORT, IMPERATIVE tense description of the change:\n",
333
- body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
334
- breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
335
- footerPrefixesSelect: "Select the ISSUES type of the change list by this change (optional):",
336
- customFooterPrefixes: "Input ISSUES prefix:",
337
- footer: "List any ISSUES by this change. E.g.: #31, #34:\n",
338
- confirmCommit: "Are you sure you want to proceed with the commit above?"
339
- },
340
- types: [
341
- {
342
- value: "feat",
343
- name: "feat: \u2728 A new feature",
344
- emoji: ":sparkles:"
345
- },
346
- { value: "fix", name: "fix: \uD83D\uDC1B A bug fix", emoji: ":bug:" },
347
- {
348
- value: "docs",
349
- name: "docs: \uD83D\uDCDD Documentation only changes",
350
- emoji: ":memo:"
351
- },
352
- {
353
- value: "style",
354
- name: "style: \uD83D\uDC84 Changes that do not affect the meaning of the code",
355
- emoji: ":lipstick:"
356
- },
357
- {
358
- value: "refactor",
359
- name: "refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",
360
- emoji: ":recycle:"
361
- },
362
- {
363
- value: "perf",
364
- name: "perf: \u26A1\uFE0F A code change that improves performance",
365
- emoji: ":zap:"
366
- },
367
- {
368
- value: "test",
369
- name: "test: \u2705 Adding missing tests or adjusting existing tests",
370
- emoji: ":white_check_mark:"
371
- },
372
- {
373
- value: "build",
374
- name: "build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",
375
- emoji: ":package:"
376
- },
377
- {
378
- value: "ci",
379
- name: "ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",
380
- emoji: ":ferris_wheel:"
381
- },
382
- {
383
- value: "chore",
384
- name: "chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",
385
- emoji: ":hammer:"
386
- },
387
- {
388
- value: "revert",
389
- name: "revert: \u23EA\uFE0F Reverts a previous commit",
390
- emoji: ":rewind:"
391
- }
392
- ]
393
- },
394
- hashing: {
395
- driver: "argon2",
396
- bcrypt: {
397
- rounds: 10,
398
- cost: 4
399
- },
400
- argon2: {
401
- memory: 65536,
402
- time: 1
403
- }
404
- },
405
- library: {
406
- name: "hello-world",
407
- owner: "@stacksjs",
408
- repository: "stacksjs/stacks",
409
- license: "MIT",
410
- author: "Chris Breuer",
411
- contributors: ["Chris Breuer <chris@stacksjs.org>"],
412
- defaultLanguage: "en",
413
- vueComponents: {
414
- name: "hello-world-vue",
415
- description: "Your Vue component library description",
416
- keywords: ["component", "library", "vue", "vite", "typescript", "javascript"],
417
- tags: [
418
- {
419
- name: ["HelloWorld", "AppHelloWorld"],
420
- description: "The Hello World custom element, built via this framework.",
421
- attributes: [
422
- {
423
- name: "greeting",
424
- description: "The greeting."
425
- }
426
- ]
427
- }
428
- ]
429
- },
430
- webComponents: {
431
- name: "hello-world-elements",
432
- description: "Your framework agnostic web component library description.",
433
- keywords: ["custom-elements", "web-components", "library", "framework-agnostic", "typescript", "javascript"],
434
- tags: [
435
- {
436
- name: ["HelloWorld", "AppHelloWorld"],
437
- description: "The Hello World custom element, built via this framework.",
438
- attributes: [
439
- {
440
- name: "greeting",
441
- description: "The greeting."
442
- }
443
- ]
444
- }
445
- ]
446
- },
447
- functions: {
448
- name: "hello-world-fx",
449
- description: "Your function library description.",
450
- keywords: ["functions", "composables", "library", "typescript", "javascript"],
451
- shouldGenerateSourcemap: false,
452
- files: ["counter", "dark"]
453
- }
454
- },
455
- logger: {
456
- level: 3,
457
- logFilePath: "storage/logs/console.log",
458
- errorsPath: "storage/logs/errors.log"
459
- },
460
- notification: {
461
- default: "email"
462
- },
463
- payment: {
464
- driver: "stripe"
465
- },
466
- ports: {
467
- frontend: 3000,
468
- backend: 3001,
469
- admin: 3002,
470
- library: 3003,
471
- desktop: 3004,
472
- email: 3005,
473
- docs: 3006,
474
- inspect: 3007,
475
- api: 3008,
476
- systemTray: 3009,
477
- database: 3010
478
- },
479
- queue: {
480
- default: "sync",
481
- connections: {
482
- sync: {
483
- driver: "sync"
484
- },
485
- database: {
486
- driver: "database",
487
- table: "jobs",
488
- queue: "default",
489
- retry_after: 90
490
- },
491
- redis: {
492
- driver: "redis",
493
- connection: "default",
494
- queue: "default",
495
- retry_after: 90
496
- },
497
- sqs: {
498
- driver: "sqs",
499
- key: "",
500
- secret: "",
501
- prefix: "",
502
- suffix: "",
503
- queue: "default",
504
- region: "us-east-1"
505
- }
506
- }
507
- },
508
- searchEngine: {
509
- driver: "opensearch"
510
- },
511
- security: {
512
- firewall: {
513
- enabled: true,
514
- countryCodes: [],
515
- ipAddresses: [],
516
- queryString: [],
517
- httpHeaders: [],
518
- rateLimitPerMinute: 1000,
519
- useIpReputationLists: true,
520
- useKnownBadInputsRuleSet: true
521
- }
522
- },
523
- services: {
524
- aws: {
525
- accountId: "",
526
- appId: "",
527
- apiKey: "",
528
- region: "us-east-1"
529
- },
530
- algolia: {
531
- appId: "",
532
- apiKey: ""
533
- },
534
- meilisearch: {
535
- appId: "",
536
- apiKey: ""
537
- },
538
- stripe: {
539
- appId: "",
540
- apiKey: ""
541
- }
542
- },
543
- storage: {
544
- driver: "s3"
545
- },
546
- team: {
547
- name: "Stacks",
548
- members: {
549
- "Chris Breuer": "chris@stacksjs.org"
550
- }
551
- },
552
- ui: {
553
- shortcuts: [
554
- [
555
- "btn",
556
- "inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
557
- ]
558
- ],
559
- safelist: "prose prose-sm m-auto text-left",
560
- trigger: ":stx:",
561
- classPrefix: "stx-",
562
- reset: "tailwind",
563
- icons: ["heroicons"],
564
- fonts: {
565
- email: {
566
- title: "Mona",
567
- text: "Hubot"
568
- },
569
- desktop: {
570
- title: "Mona",
571
- text: "Hubot"
572
- },
573
- mobile: {
574
- title: "Mona",
575
- text: "Hubot"
576
- },
577
- web: {
578
- title: "Mona",
579
- text: "Hubot"
580
- }
581
- }
582
- }
583
- };
584
-
585
- // ../../../../config/ai.ts
586
- var ai_default = {
587
- default: "meta.llama2-70b-chat-v1",
588
- models: [
589
- "amazon.titan-text-express-v1",
590
- "amazon.titan-text-lite-v1",
591
- "meta.llama2-70b-chat-v1"
592
- ],
593
- deploy: true
594
- };
595
-
596
- // ../../../../config/analytics.ts
597
- var analytics_default = {
598
- driver: "fathom",
599
- drivers: {
600
- googleAnalytics: {
601
- trackingId: "UA-XXXXXXXXX-X"
602
- },
603
- fathom: {
604
- siteId: "WOLZMJDL"
605
- }
606
- }
607
- };
608
-
609
- // ../../../../config/app.ts
610
- import {env as env2} from "@stacksjs/env";
611
- var app_default = {
612
- name: env2.APP_NAME ?? "Stacks",
613
- description: "Stacks is a full-stack framework for building modern web applications.",
614
- env: env2.APP_ENV ?? "local",
615
- url: env2.APP_URL ?? "stacks.localhost",
616
- redirectUrls: ["stacksjs.com"],
617
- debug: env2.DEBUG ?? false,
618
- key: env2.APP_KEY,
619
- maintenanceMode: env2.APP_MAINTENANCE ?? false,
620
- docMode: false,
621
- timezone: "America/Los_Angeles",
622
- locale: "en",
623
- fallbackLocale: "en",
624
- cipher: "aes-256-cbc"
625
- };
626
-
627
- // ../../../../config/cache.ts
628
- import {env as env4} from "@stacksjs/env";
629
- var cache_default = {
630
- driver: "dynamodb",
631
- prefix: "stacks",
632
- ttl: 3600,
633
- drivers: {
634
- dynamodb: {
635
- key: env4.AWS_ACCESS_KEY_ID || "",
636
- secret: env4.AWS_SECRET_ACCESS_KEY || "",
637
- region: env4.AWS_DEFAULT_REGION || "us-east-1",
638
- table: "cache",
639
- endpoint: ""
640
- },
641
- memcached: {
642
- persistent_id: "",
643
- sasl: ["", ""],
644
- options: {},
645
- servers: [
646
- {
647
- host: "127.0.0.1",
648
- port: 11211,
649
- weight: 100
650
- }
651
- ]
652
- },
653
- redis: {
654
- connection: "cache",
655
- host: "127.0.0.1",
656
- port: 6379,
657
- password: "",
658
- username: "stacks"
659
- }
660
- }
661
- };
662
-
663
- // ../../../../config/cli.ts
664
- var cli_default = {
665
- name: "My Custom CLI",
666
- command: "custom-cli",
667
- description: "This is an example command to illustrate how to create your own commands. Check out `../app/commands` for more.",
668
- deploy: true
669
- };
670
-
671
- // ../../../../config/cloud.ts
672
- import {env as env6} from "@stacksjs/env";
673
-
674
- // ../../../../config/security.ts
675
- var security_default = {
676
- firewall: {
677
- enabled: true,
678
- countryCodes: ["RU", "IR"],
679
- ipAddresses: [],
680
- rateLimitPerMinute: 1000,
681
- useIpReputationLists: true,
682
- useKnownBadInputsRuleSet: true,
683
- queryString: [],
684
- httpHeaders: []
685
- }
686
- };
687
-
688
- // ../../../../config/cloud.ts
689
- var cloud_default = {
690
- type: "serverless",
691
- driver: "aws",
692
- firewall: security_default.firewall,
693
- environments: ["production", "staging", "development"],
694
- storage: {},
695
- api: {
696
- prefix: env6.API_PREFIX || "api",
697
- description: "My awesome Stacks API",
698
- deploy: true,
699
- memorySize: 512,
700
- prewarm: 10,
701
- timeout: 30
702
- },
703
- cdn: {
704
- compress: true,
705
- allowedMethods: "ALL",
706
- cachedMethods: "GET_HEAD",
707
- originShieldRegion: "us-east-1",
708
- minTtl: 0,
709
- defaultTtl: 86400,
710
- maxTtl: 31536000,
711
- cookieBehavior: "none",
712
- allowList: {
713
- cookies: [],
714
- headers: [],
715
- queryStrings: []
716
- },
717
- realtimeLogs: {
718
- enabled: true,
719
- samplingRate: 1
720
- }
721
- },
722
- fileSystem: true
723
- };
724
-
725
- // ../../../../config/database.ts
726
- import {env as env8} from "@stacksjs/env";
727
- var database_default = {
728
- default: env8.DB_CONNECTION || "mysql",
729
- connections: {
730
- sqlite: {
731
- database: env8.DB_DATABASE || "stacks",
732
- prefix: ""
733
- },
734
- dynamodb: {
735
- key: env8.AWS_ACCESS_KEY_ID || "",
736
- secret: env8.AWS_SECRET_ACCESS_KEY || "",
737
- region: env8.AWS_DEFAULT_REGION || "us-east-1",
738
- prefix: env8.DB_DATABASE || "stacks",
739
- endpoint: "http://localhost",
740
- port: env8.DB_PORT || 8000
741
- },
742
- mysql: {
743
- name: env8.DB_DATABASE || "stacks",
744
- host: env8.DB_HOST || "127.0.0.1",
745
- port: env8.DB_PORT || 3306,
746
- username: env8.DB_USERNAME || "root",
747
- password: env8.DB_PASSWORD || "",
748
- prefix: ""
749
- },
750
- postgres: {
751
- name: env8.DB_DATABASE || "stacks",
752
- host: env8.DB_HOST || "127.0.0.1",
753
- port: env8.DB_PORT || 3306,
754
- username: env8.DB_USERNAME || "",
755
- password: env8.DB_PASSWORD || "",
756
- prefix: ""
757
- }
758
- },
759
- migrations: "migrations",
760
- migrationLocks: "migration_locks"
761
- };
762
-
763
- // ../../../../config/dns.ts
764
- import {env as env10} from "@stacksjs/env";
765
- var dns_default = {
766
- a: [
767
- {
768
- name: env10.APP_URL || "",
769
- address: "10.0.0.1",
770
- ttl: 300
771
- },
772
- {
773
- name: "www",
774
- address: "@",
775
- ttl: 300
776
- }
777
- ],
778
- aaaa: [],
779
- cname: [],
780
- mx: [],
781
- txt: [],
782
- nameservers: []
783
- };
784
-
785
- // ../../../../config/email.ts
786
- import {env as env12} from "@stacksjs/env";
787
- var email_default = {
788
- from: {
789
- name: env12.MAIL_FROM_NAME || "Stacks",
790
- address: env12.MAIL_FROM_ADDRESS || "no-reply@stacksjs.org"
791
- },
792
- mailboxes: ["chris@stacksjs.org", "blake@stacksjs.org", "glenn@stacksjs.org"],
793
- url: env12.APP_URL || "http://localhost:3000",
794
- charset: "UTF-8",
795
- server: {
796
- scan: true
797
- }
798
- };
799
-
800
- // ../../../../config/errors.ts
801
- var errors_default = {
802
- messages: {
803
- string: "The {{ field }} field must be a string",
804
- email: "The {{ field }} field must be a valid email address",
805
- regex: "The {{ field }} field format is invalid",
806
- url: "The {{ field }} field must be a valid URL",
807
- activeUrl: "The {{ field }} field must be a valid URL",
808
- alpha: "The {{ field }} field must contain only letters",
809
- alphaNumeric: "The {{ field }} field must contain only letters and numbers",
810
- minLength: "The {{ field }} field must have at least {{ min }} characters",
811
- maxLength: "The {{ field }} field must not be greater than {{ max }} characters",
812
- fixedLength: "The {{ field }} field must be {{ size }} characters long",
813
- confirmed: "The {{ field }} field and {{ otherField }} field must be the same",
814
- endsWith: "The {{ field }} field must end with {{ substring }}",
815
- startsWith: "The {{ field }} field must start with {{ substring }}",
816
- sameAs: "The {{ field }} field and {{ otherField }} field must be the same",
817
- notSameAs: "The {{ field }} field and {{ otherField }} field must be different",
818
- in: "The selected {{ field }} is invalid",
819
- notIn: "The selected {{ field }} is invalid",
820
- ipAddress: "The {{ field }} field must be a valid IP address",
821
- uuid: "The {{ field }} field must be a valid UUID",
822
- ascii: "The {{ field }} field must only contain ASCII characters",
823
- creditCard: "The {{ field }} field must be a valid {{ providersList }} card number",
824
- hexCode: "The {{ field }} field must be a valid hex color code",
825
- iban: "The {{ field }} field must be a valid IBAN number",
826
- jwt: "The {{ field }} field must be a valid JWT token",
827
- coordinates: "The {{ field }} field must contain latitude and longitude coordinates",
828
- mobile: "The {{ field }} field must be a valid mobile phone number",
829
- passport: "The {{ field }} field must be a valid passport number",
830
- postalCode: "The {{ field }} field must be a valid postal code",
831
- boolean: "The value must be a boolean",
832
- number: "The {{ field }} field must be a number",
833
- min: "The {{ field }} field must be at least {{ min }}",
834
- max: "The {{ field }} field must not be greater than {{ max }}",
835
- range: "The {{ field }} field must be between {{ min }} and {{ max }}",
836
- positive: "The {{ field }} field must be positive",
837
- negative: "The {{ field }} field must be negative",
838
- decimal: "The {{ field }} field must have {{ digits }} decimal places",
839
- withoutDecimals: "The {{ field }} field must not have decimal places",
840
- date: "The {{ field }} field must be a datetime value",
841
- "date.equals": "The {{ field }} field must be a date equal to {{ expectedValue }}",
842
- "date.after": "The {{ field }} field must be a date after {{ expectedValue }}",
843
- "date.before": "The {{ field }} field must be a date before {{ expectedValue }}",
844
- "date.afterOrEqual": "The {{ field }} field must be a date after or equal to {{ expectedValue }}",
845
- "date.beforeOrEqual": "The {{ field }} field must be a date before or equal to {{ expectedValue }}",
846
- "date.sameAs": "The {{ field }} field and {{ otherField }} field must be the same",
847
- "date.notSameAs": "The {{ field }} field and {{ otherField }} field must be different",
848
- "date.afterField": "The {{ field }} field must be a date after {{ otherField }}",
849
- accepted: "The {{ field }} field must be accepted",
850
- enum: "The selected {{ field }} is invalid",
851
- literal: "The {{ field }} field must be {{ expectedValue }}",
852
- object: "The {{ field }} field must be an object",
853
- record: "The {{ field }} field must be an object",
854
- "record.minLength": "The {{ field }} field must have at least {{ min }} items",
855
- "record.maxLength": "The {{ field }} field must not have more than {{ max }} items",
856
- "record.fixedLength": "The {{ field }} field must contain {{ size }} items",
857
- array: "The {{ field }} field must be an array",
858
- "array.minLength": "The {{ field }} field must have at least {{ min }} items",
859
- "array.maxLength": "The {{ field }} field must not have more than {{ max }} items",
860
- "array.fixedLength": "The {{ field }} field must contain {{ size }} items",
861
- notEmpty: "The {{ field }} field must not be empty",
862
- distinct: "The {{ field }} field has duplicate values",
863
- tuple: "The {{ field }} field must be an array",
864
- union: "Invalid value provided for {{ field }} field",
865
- unionGroup: "Invalid value provided for {{ field }} field",
866
- unionOfTypes: "Invalid value provided for {{ field }} field"
867
- }
868
- };
869
-
870
- // ../../../../config/git.ts
871
- var git_default = {
872
- hooks: {
873
- "pre-commit": "lint-staged"
874
- },
875
- scopes: [
876
- "",
877
- "ci",
878
- "deps",
879
- "dx",
880
- "release",
881
- "docs",
882
- "test",
883
- "core",
884
- "actions",
885
- "arrays",
886
- "auth",
887
- "build",
888
- "cache",
889
- "cli",
890
- "cloud",
891
- "collections",
892
- "config",
893
- "database",
894
- "datetime",
895
- "docs",
896
- "errors",
897
- "git",
898
- "lint",
899
- "x-ray",
900
- "modules",
901
- "notifications",
902
- "objects",
903
- "path",
904
- "realtime",
905
- "router",
906
- "buddy",
907
- "security",
908
- "server",
909
- "storage",
910
- "strings",
911
- "tests",
912
- "types",
913
- "ui",
914
- "utils"
915
- ],
916
- messages: {
917
- type: "Select the type of change that you\u2019re committing:",
918
- scope: "Select the SCOPE of this change (optional):",
919
- customScope: "Select the SCOPE of this change:",
920
- subject: "Write a SHORT, IMPERATIVE tense description of the change:\n",
921
- body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
922
- breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
923
- footerPrefixesSelect: "Select the ISSUES type of the change list by this change (optional):",
924
- customFooterPrefixes: "Input ISSUES prefix:",
925
- footer: "List any ISSUES by this change. E.g.: #31, #34:\n",
926
- confirmCommit: "Are you sure you want to proceed with the commit above?"
927
- },
928
- types: [
929
- { value: "feat", name: "feat: \u2728 A new feature", emoji: ":sparkles:" },
930
- { value: "fix", name: "fix: \uD83D\uDC1B A bug fix", emoji: ":bug:" },
931
- {
932
- value: "docs",
933
- name: "docs: \uD83D\uDCDD Documentation only changes",
934
- emoji: ":memo:"
935
- },
936
- {
937
- value: "style",
938
- name: "style: \uD83D\uDC84 Changes that do not affect the meaning of the code",
939
- emoji: ":lipstick:"
940
- },
941
- {
942
- value: "refactor",
943
- name: "refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",
944
- emoji: ":recycle:"
945
- },
946
- {
947
- value: "perf",
948
- name: "perf: \u26A1\uFE0F A code change that improves performance",
949
- emoji: ":zap:"
950
- },
951
- {
952
- value: "test",
953
- name: "test: \u2705 Adding missing tests or adjusting existing tests",
954
- emoji: ":white_check_mark:"
955
- },
956
- {
957
- value: "build",
958
- name: "build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",
959
- emoji: ":package:"
960
- },
961
- {
962
- value: "ci",
963
- name: "ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",
964
- emoji: ":ferris_wheel:"
965
- },
966
- {
967
- value: "chore",
968
- name: "chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",
969
- emoji: ":hammer:"
970
- },
971
- {
972
- value: "revert",
973
- name: "revert: \u23EA\uFE0F Reverts a previous commit",
974
- emoji: ":rewind:"
975
- }
976
- ]
977
- };
978
-
979
- // ../../../../config/hashing.ts
980
- var hashing_default = {
981
- driver: "argon2",
982
- bcrypt: {
983
- rounds: 10,
984
- cost: 4
985
- },
986
- argon2: {
987
- memory: 65536,
988
- threads: 1,
989
- time: 1
990
- }
991
- };
992
-
993
- // ../../../../config/library.ts
994
- var library_default = {
995
- name: "hello-world",
996
- owner: "@stacksjs",
997
- repository: "stacksjs/stacks",
998
- license: "MIT",
999
- author: "Chris Breuer",
1000
- contributors: ["Chris Breuer <chris@stacksjs.org>"],
1001
- defaultLanguage: "en",
1002
- releaseable: true,
1003
- vueComponents: {
1004
- name: "hello-world-vue",
1005
- description: "Your Vue component library description",
1006
- keywords: ["component", "library", "vue", "vite", "typescript", "javascript"],
1007
- tags: [
1008
- {
1009
- name: ["HelloWorld", "AppHelloWorld"],
1010
- description: "The Hello World custom element, built via this framework.",
1011
- attributes: [
1012
- {
1013
- name: "greeting",
1014
- description: "The greeting."
1015
- }
1016
- ]
1017
- }
1018
- ]
1019
- },
1020
- webComponents: {
1021
- name: "hello-world-elements",
1022
- description: "Your framework agnostic web component library description.",
1023
- keywords: ["custom-elements", "web-components", "library", "framework-agnostic", "typescript", "javascript"],
1024
- tags: [
1025
- {
1026
- name: ["HelloWorld", "AppHelloWorld"],
1027
- description: "The Hello World custom element, built via this framework.",
1028
- attributes: [
1029
- {
1030
- name: "greeting",
1031
- description: "The greeting."
1032
- }
1033
- ]
1034
- }
1035
- ]
1036
- },
1037
- functions: {
1038
- name: "hello-world-fx",
1039
- description: "Your function library description.",
1040
- keywords: ["functions", "composables", "library", "typescript", "javascript"],
1041
- shouldGenerateSourcemap: false,
1042
- files: ["counter", "dark"]
1043
- }
1044
- };
1045
-
1046
- // ../../../../config/logger.ts
1047
- var logger_default = {
1048
- level: 3,
1049
- logFilePath: "storage/logs/console.log",
1050
- errorsPath: "storage/logs/errors.log"
1051
- };
1052
-
1053
- // ../../../../config/notification.ts
1054
- var notification_default = {
1055
- default: "email"
1056
- };
1057
-
1058
- // ../../../../config/payment.ts
1059
- var payment_default = {
1060
- driver: "stripe"
1061
- };
1062
-
1063
- // ../../../../config/ports.ts
1064
- import {env as env14} from "@stacksjs/env";
1065
- var ports_default = {
1066
- frontend: env14.PORT ?? 3000,
1067
- backend: env14.PORT_BACKEND ?? 3001,
1068
- admin: env14.PORT_ADMIN ?? 3002,
1069
- library: env14.PORT_LIBRARY ?? 3003,
1070
- desktop: env14.PORT_DESKTOP ?? 3004,
1071
- email: env14.PORT_EMAIL ?? 3005,
1072
- docs: env14.PORT_DOCS ?? 3006,
1073
- inspect: env14.PORT_INSPECT ?? 3007,
1074
- api: env14.PORT_API ?? 3008,
1075
- systemTray: env14.PORT_SYSTEM_TRAY ?? 3009,
1076
- database: 3010
1077
- };
1078
-
1079
- // ../../../../config/queue.ts
1080
- var queue_default = {
1081
- default: "sync",
1082
- connections: {
1083
- sync: {
1084
- driver: "sync"
1085
- },
1086
- sqs: {
1087
- driver: "sqs",
1088
- key: "",
1089
- secret: "",
1090
- prefix: "",
1091
- suffix: "",
1092
- queue: "default",
1093
- region: "us-east-1"
1094
- }
1095
- }
1096
- };
1097
-
1098
- // ../../../../config/search-engine.ts
1099
- var search_engine_default = {
1100
- driver: "opensearch"
1101
- };
1102
-
1103
- // ../../../../config/services.ts
1104
- import {env as env16} from "@stacksjs/env";
1105
- var services_default = {
1106
- aws: {
1107
- accountId: env16.AWS_ACCOUNT_ID || "",
1108
- appId: env16.AWS_ACCESS_KEY_ID || "",
1109
- apiKey: env16.AWS_SECRET_ACCESS_KEY || "",
1110
- region: env16.AWS_DEFAULT_REGION || "us-east-1"
1111
- },
1112
- algolia: {
1113
- appId: "",
1114
- apiKey: ""
1115
- },
1116
- meilisearch: {
1117
- appId: "",
1118
- apiKey: ""
1119
- },
1120
- lemonSqueezy: {
1121
- appId: "",
1122
- apiKey: ""
1123
- },
1124
- stripe: {
1125
- appId: "",
1126
- apiKey: ""
1127
- }
1128
- };
1129
-
1130
- // ../../../../config/storage.ts
1131
- var storage_default = {
1132
- driver: "s3"
1133
- };
1134
-
1135
- // ../../../../config/team.ts
1136
- var team_default = {
1137
- name: "Stacks",
1138
- members: {
1139
- chris: "chris@stacksjs.org",
1140
- blake: "blake@stacksjs.org",
1141
- zoltan: "zoltan@stacksjs.org",
1142
- freddy: "freddy@stacksjs.org",
1143
- glenn: "glenn@stacksjs.org",
1144
- dorell: "dorell@stacksjs.org",
1145
- avery: "avery@stacksjs.org",
1146
- adelino: "adelino@stacksjs.org"
1147
- }
1148
- };
1149
-
1150
- // ../../../../config/ui.ts
1151
- var ui_default = {
1152
- shortcuts: [
1153
- [
1154
- "btn",
1155
- "inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"
1156
- ]
1157
- ],
1158
- safelist: "prose prose-sm m-auto text-left",
1159
- trigger: ":stx:",
1160
- classPrefix: "stx-",
1161
- reset: "tailwind",
1162
- icons: ["heroicons"],
1163
- fonts: {
1164
- email: {
1165
- title: "Mona",
1166
- text: "Hubot"
1167
- },
1168
- desktop: {
1169
- title: "Mona",
1170
- text: "Hubot"
1171
- },
1172
- mobile: {
1173
- title: "Mona",
1174
- text: "Hubot"
1175
- },
1176
- web: {
1177
- title: "Mona",
1178
- text: "Hubot"
1179
- }
1180
- },
1181
- theme: {
1182
- colors: {
1183
- veryCool: "#0000ff",
1184
- brand: {
1185
- primary: "hsl(var(--hue, 217) 78% 51%)"
1186
- }
1187
- }
1188
- }
1189
- };
1190
-
1191
- // src/overrides.ts
1192
- var overrides_default = {
1193
- ai: ai_default,
1194
- analytics: analytics_default,
1195
- app: app_default,
1196
- cache: cache_default,
1197
- cli: cli_default,
1198
- cloud: cloud_default,
1199
- database: database_default,
1200
- dns: dns_default,
1201
- email: email_default,
1202
- errors: errors_default,
1203
- git: git_default,
1204
- hashing: hashing_default,
1205
- library: library_default,
1206
- logger: logger_default,
1207
- notification: notification_default,
1208
- queue: queue_default,
1209
- payment: payment_default,
1210
- ports: ports_default,
1211
- searchEngine: search_engine_default,
1212
- security: security_default,
1213
- services: services_default,
1214
- storage: storage_default,
1215
- team: team_default,
1216
- ui: ui_default
1217
- };
1218
-
1219
- // src/helpers.ts
1220
- import {createLocalTunnel} from "@stacksjs/tunnel";
1221
- async function localUrl({
1222
- domain = exports_config.app.url || "stacks",
1223
- type = "frontend",
1224
- localhost = false,
1225
- https = undefined,
1226
- network = undefined
1227
- } = {}) {
1228
- let url;
1229
- switch (type) {
1230
- case "frontend":
1231
- if (network)
1232
- return await createLocalTunnel(exports_config.ports?.frontend || 3000);
1233
- if (localhost)
1234
- return `http://localhost:${exports_config.ports?.frontend}`;
1235
- url = domain.replace(/\.[^\.]+$/, ".localhost");
1236
- if (https)
1237
- return `https://${url}`;
1238
- return url;
1239
- case "backend":
1240
- if (network)
1241
- return await createLocalTunnel(exports_config.ports?.backend || 3001);
1242
- if (localhost)
1243
- return `http://localhost:${exports_config.ports?.backend}`;
1244
- url = domain.replace(/\.[^\.]+$/, ".localhost/api/");
1245
- if (https)
1246
- return `https://${url}`;
1247
- return url;
1248
- case "api":
1249
- if (network)
1250
- return await createLocalTunnel(exports_config.ports?.backend || 3001);
1251
- if (localhost)
1252
- return `http://localhost:${exports_config.ports?.backend}`;
1253
- url = domain.replace(/\.[^\.]+$/, ".localhost/api/");
1254
- if (https)
1255
- return `https://${url}`;
1256
- return url;
1257
- case "admin":
1258
- if (network)
1259
- return await createLocalTunnel(exports_config.ports?.admin || 3002);
1260
- if (localhost)
1261
- return `http://localhost:${exports_config.ports?.admin}`;
1262
- url = domain.replace(/\.[^\.]+$/, ".localhost/admin/");
1263
- if (https)
1264
- return `https://${url}`;
1265
- return url;
1266
- case "library":
1267
- if (network)
1268
- return await createLocalTunnel(exports_config.ports?.library || 3003);
1269
- if (localhost)
1270
- return `http://localhost:${exports_config.ports?.library}`;
1271
- url = domain.replace(/\.[^\.]+$/, ".localhost/libs/");
1272
- if (https)
1273
- return `https://${url}`;
1274
- return url;
1275
- case "email":
1276
- if (network)
1277
- return await createLocalTunnel(exports_config.ports?.email || 3005);
1278
- if (localhost)
1279
- return `http://localhost:${exports_config.ports?.email}`;
1280
- url = domain.replace(/\.[^\.]+$/, ".localhost/email/");
1281
- if (https)
1282
- return `https://${url}`;
1283
- return url;
1284
- case "desktop":
1285
- if (network)
1286
- return await createLocalTunnel(exports_config.ports?.desktop || 3004);
1287
- if (localhost)
1288
- return `http://localhost:${exports_config.ports?.email}`;
1289
- url = domain.replace(/\.[^\.]+$/, ".localhost/email/");
1290
- if (https)
1291
- return `https://${url}`;
1292
- return url;
1293
- case "docs":
1294
- if (network)
1295
- return await createLocalTunnel(exports_config.ports?.desktop || 3006);
1296
- if (localhost)
1297
- return `http://localhost:${exports_config.ports?.docs}`;
1298
- url = domain.replace(/\.[^\.]+$/, ".localhost/docs/");
1299
- if (https)
1300
- return `https://${url}`;
1301
- return url;
1302
- case "inspect":
1303
- if (network)
1304
- return await createLocalTunnel(exports_config.ports?.desktop || 3007);
1305
- if (localhost)
1306
- return `http://localhost:${exports_config.ports?.inspect}`;
1307
- url = domain.replace(/\.[^\.]+$/, ".localhost/__inspect/");
1308
- if (https)
1309
- return `https://${url}`;
1310
- return url;
1311
- default:
1312
- if (localhost)
1313
- return `http://localhost:${exports_config.ports?.frontend}`;
1314
- url = domain.replace(/\.[^\.]+$/, ".localhost");
1315
- if (https)
1316
- return `https://${url}`;
1317
- return url;
1318
- }
1319
- }
1320
- function defineStacksConfig(config) {
1321
- return config;
1322
- }
1323
- function defineApp(config) {
1324
- return config;
1325
- }
1326
- function defineCache(config) {
1327
- return config;
1328
- }
1329
- function defineCdn(config) {
1330
- return config;
1331
- }
1332
- function defineChat(config) {
1333
- return config;
1334
- }
1335
- function defineCli(config) {
1336
- return config;
1337
- }
1338
- function defineJob(config) {
1339
- return config;
1340
- }
1341
- function defineCronJob(config) {
1342
- return config;
1343
- }
1344
- function defineDatabase(config) {
1345
- return config;
1346
- }
1347
- function defineDependencies(config) {
1348
- return config;
1349
- }
1350
- function defineDns(config) {
1351
- return config;
1352
- }
1353
- function defineEmailConfig(config) {
1354
- return config;
1355
- }
1356
- function defineEmail(config) {
1357
- return config;
1358
- }
1359
- function defineGit(config) {
1360
- return config;
1361
- }
1362
- function defineHashing(config) {
1363
- return config;
1364
- }
1365
- function defineLibrary(config) {
1366
- return config;
1367
- }
1368
- function defineNotification(config) {
1369
- return config;
1370
- }
1371
- function definePayment(config) {
1372
- return config;
1373
- }
1374
- function defineQueue(config) {
1375
- return config;
1376
- }
1377
- function defineSearchEngine(config) {
1378
- return config;
1379
- }
1380
- function defineSecurity(config) {
1381
- return config;
1382
- }
1383
- function defineServices(config) {
1384
- return config;
1385
- }
1386
- function defineSms(config) {
1387
- return config;
1388
- }
1389
- function defineStorage(config) {
1390
- return config;
1391
- }
1392
- function defineUi(config) {
1393
- return config;
1394
- }
1395
- function defineModel(config) {
1396
- return config;
1397
- }
1398
- function defineEvents(config) {
1399
- return config;
1400
- }
1401
-
1402
- // src/config.ts
1403
- var config = {
1404
- ...defaults_default,
1405
- ...overrides_default
1406
- };
1407
- var {
1408
- ai: ai2,
1409
- analytics: analytics2,
1410
- app: app2,
1411
- cache: cache2,
1412
- cloud: cloud2,
1413
- cli: cli2,
1414
- database: database2,
1415
- dns: dns2,
1416
- docs,
1417
- email: email2,
1418
- errors: errors2,
1419
- git: git2,
1420
- hashing: hashing2,
1421
- library: library2,
1422
- logger: logger2,
1423
- notification: notification2,
1424
- payment: payment2,
1425
- ports: ports2,
1426
- queue: queue2,
1427
- security: security3,
1428
- searchEngine,
1429
- services: services2,
1430
- storage: storage2,
1431
- team: team2,
1432
- ui: ui2
1433
- } = config;
1434
- var determineAppEnv = () => {
1435
- if (app2.env === "local")
1436
- return "dev";
1437
- if (app2.env === "development")
1438
- return "dev";
1439
- if (app2.env === "staging")
1440
- return "stage";
1441
- if (app2.env === "production")
1442
- return "prod";
1443
- if (!app2.env)
1444
- throw new Error("Couldn't determine app environment");
1445
- return app2.env;
1446
- };
1447
- export {
1448
- ui2 as ui,
1449
- team2 as team,
1450
- storage2 as storage,
1451
- services2 as services,
1452
- security3 as security,
1453
- searchEngine,
1454
- queue2 as queue,
1455
- ports2 as ports,
1456
- payment2 as payment,
1457
- overrides_default as overrides,
1458
- notification2 as notification,
1459
- logger2 as logger,
1460
- localUrl,
1461
- library2 as library,
1462
- hashing2 as hashing,
1463
- git2 as git,
1464
- errors2 as errors,
1465
- email2 as email,
1466
- docs,
1467
- dns2 as dns,
1468
- determineAppEnv,
1469
- defineUi,
1470
- defineStorage,
1471
- defineStacksConfig,
1472
- defineSms,
1473
- defineServices,
1474
- defineSecurity,
1475
- defineSearchEngine,
1476
- defineQueue,
1477
- definePayment,
1478
- defineNotification,
1479
- defineModel,
1480
- defineLibrary,
1481
- defineJob,
1482
- defineHashing,
1483
- defineGit,
1484
- defineEvents,
1485
- defineEmailConfig,
1486
- defineEmail,
1487
- defineDns,
1488
- defineDependencies,
1489
- defineDatabase,
1490
- defineCronJob,
1491
- defineCli,
1492
- defineChat,
1493
- defineCdn,
1494
- defineCache,
1495
- defineApp,
1496
- defaults_default as defaults,
1497
- database2 as database,
1498
- exports_config as config,
1499
- cloud2 as cloud,
1500
- cli2 as cli,
1501
- cache2 as cache,
1502
- app2 as app,
1503
- analytics2 as analytics,
1504
- ai2 as ai
1505
- };
1506
-
1507
- //# debugId=73F59A5528E3DEE364756E2164756E21
4
+ //# debugId=C77D5971A8BB32A464756E2164756E21
1508
5
  //# sourceMappingURL=index.js.map