@stacksjs/config 0.72.98 → 0.72.100

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/defaults.js CHANGED
@@ -2,4 +2,4 @@ var {require}=import.meta;import{commandsPath,projectPath,userDatabasePath}from"
2
2
  `,body:`Provide a LONGER description of the change (optional). Use "|" to break new line:
3
3
  `,breaking:`List any BREAKING CHANGES (optional). Use "|" to break new line:
4
4
  `,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:
5
- `,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't modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]},hashing:{driver:"bcrypt",bcrypt:{rounds:12},argon2:{memory:65536,time:2}},images:{social:{enabled:!1,outputDir:"public/social",publicPath:"/social",presets:["og","square","portrait"]},appStore:{enabled:!1,outputDir:"resources/app-store/screenshots"},appIcons:{enabled:!1,outputDir:"resources/app-icons",platforms:["ios","macos"],faviconDir:"public"}},library:{name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"",contributors:[],defaultLanguage:"en",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"]}},logging:{logsPath:"storage/logs/stacks.log",deploymentsPath:"storage/logs/deployments.log"},notification:{default:"email"},payment:{driver:"stripe"},server:{proxy:{}},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",retryAfter:90},redis:{driver:"redis",queue:"default",retryAfter:90},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:FRAMEWORK_DEFAULTS.awsRegion}}},saas:{plans:[{productName:"Stacks Hobby",description:"All the Stacks features.",pricing:[{key:"stacks_hobby_monthly",price:3900,interval:"month",currency:"usd"},{key:"stacks_hobby_yearly",price:37900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}},{productName:"Stacks Pro",description:"All the Stacks features, including being able to invite team members.",pricing:[{key:"stacks_pro_monthly",price:5900,interval:"month",currency:"usd"},{key:"stacks_pro_yearly",price:57900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}}],webhook:{endpoint:"/webhooks/stripe",secret:""},currencies:["usd"],coupons:[{code:"SUMMER2024",amountOff:500,duration:"once"}],products:[{name:"Stacks Pro",description:"All the Stacks features.",images:["url_to_image"]}]},searchEngine:{driver:"opensearch"},security:{firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0}},services:{aws:{accountId:"",appId:"",apiKey:"",region:FRAMEWORK_DEFAULTS.awsRegion},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},filesystems:{driver:"s3"},team:{name:"",members:{}},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:["hugeicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}}}};export default defaults;
5
+ `,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't modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]},hashing:{driver:"bcrypt",bcrypt:{rounds:12},argon2:{memory:65536,time:2}},images:{social:{enabled:!1,outputDir:"public/social",publicPath:"/social",presets:["og","square","portrait"]},appStore:{enabled:!1,outputDir:"resources/app-store/screenshots"},appIcons:{enabled:!1,outputDir:"resources/app-icons",platforms:["ios","macos"],faviconDir:"public"}},library:{name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"",contributors:[],defaultLanguage:"en",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"]}},logging:{logsPath:"storage/logs/stacks.log",deploymentsPath:"storage/logs/deployments.log"},notification:{default:"email"},payment:{driver:"stripe"},server:{proxy:{}},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",retryAfter:90},redis:{driver:"redis",queue:"default",retryAfter:90},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:FRAMEWORK_DEFAULTS.awsRegion}}},saas:{plans:[{productName:"Stacks Hobby",description:"All the Stacks features.",pricing:[{key:"stacks_hobby_monthly",price:3900,interval:"month",currency:"usd"},{key:"stacks_hobby_yearly",price:37900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}},{productName:"Stacks Pro",description:"All the Stacks features, including being able to invite team members.",pricing:[{key:"stacks_pro_monthly",price:5900,interval:"month",currency:"usd"},{key:"stacks_pro_yearly",price:57900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}}],webhook:{endpoint:"/webhooks/stripe",secret:""},currencies:["usd"],coupons:[{code:"SUMMER2024",amountOff:500,duration:"once"}],products:[{name:"Stacks Pro",description:"All the Stacks features.",images:["url_to_image"]}]},searchEngine:{driver:"opensearch"},security:{firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0}},services:{aws:{accountId:"",appId:"",apiKey:"",region:FRAMEWORK_DEFAULTS.awsRegion},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},filesystems:{driver:"local"},team:{name:"",members:{}},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:["hugeicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}}}};export default defaults;
package/dist/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { config } from '.';
2
- import type { AppConfig, CacheConfig, CdnConfig, ChatConfig, CliConfig, DatabaseConfig, DependenciesConfig, DnsConfig, EmailConfig, Events, FilesystemsConfig, FeatureFlagsConfig, GitConfig, HashingConfig, ImagesConfig, LibraryConfig, Model, NotificationConfig, PaymentConfig, QueueConfig, SearchEngineConfig, SecurityConfig, ServicesConfig, StacksConfig, StorageConfig, UiConfig } from '@stacksjs/types';
2
+ import type { AppConfig, CacheConfig, CdnConfig, ChatConfig, CliConfig, DatabaseConfig, DependenciesConfig, DnsConfig, EmailConfig, FilesystemsConfig, FeatureFlagsConfig, GitConfig, HashingConfig, ImagesConfig, LibraryConfig, NotificationConfig, PaymentConfig, QueueConfig, SearchEngineConfig, SecurityConfig, ServicesConfig, SmsConfig, StacksConfig, StorageConfig, UiConfig } from '@stacksjs/types';
3
3
  export declare function localUrl(options?: {
4
4
  domain?: string
5
5
  type?: LocalUrlType
@@ -28,13 +28,11 @@ export declare function defineQueue(config: QueueConfig): QueueConfig;
28
28
  export declare function defineSearchEngine(config: SearchEngineConfig): SearchEngineConfig;
29
29
  export declare function defineSecurity(config: SecurityConfig): SecurityConfig;
30
30
  export declare function defineServices(config: ServicesConfig): ServicesConfig;
31
- export declare function defineSms(config: any): any;
31
+ export declare function defineSms(config: SmsConfig): SmsConfig;
32
32
  export declare function defineStorage(config: StorageConfig): StorageConfig;
33
33
  export declare function defineFilesystems(config: FilesystemsConfig): FilesystemsConfig;
34
34
  export declare function defineFeatureFlags(config: FeatureFlagsConfig): FeatureFlagsConfig;
35
35
  export declare function defineUi(config: UiConfig): UiConfig;
36
- export declare function defineModel(config: Model): Model;
37
- export declare function defineEvents(config: Events): Events;
38
36
  export type LocalUrlType = | 'frontend'
39
37
  | 'backend'
40
38
  | 'api'
@@ -44,3 +42,12 @@ export type LocalUrlType = | 'frontend'
44
42
  | 'docs'
45
43
  | 'inspect'
46
44
  | 'desktop';
45
+ /**
46
+ * Re-exported rather than redeclared. The local version took `Events` and
47
+ * returned `Events`, which widens: the literal keys and listener names an
48
+ * application writes were thrown away at the boundary, so `keyof typeof events`
49
+ * came back as `string` and every consumer of the map was back to unchecked
50
+ * names. `@stacksjs/events` owns the event types, and its version preserves
51
+ * them.
52
+ */
53
+ export { defineEvents } from '@stacksjs/events';
package/dist/helpers.js CHANGED
@@ -1 +1 @@
1
- import{config}from".";export async function localUrl(options={}){const domain=options.domain??config.app.url??"stacks",type=options.type??"frontend",localhost=options.localhost??!1,https=options.https,network=options.network;let url=domain.replace(/\.[^.]+$/,".localhost");async function tunnel(port){const{createLocalTunnel}=await import("@stacksjs/tunnel");return createLocalTunnel(port)}switch(type){case"frontend":if(network)return await tunnel(config.ports?.frontend||3000);if(localhost)return`http://localhost:${config.ports?.frontend}`;break;case"backend":if(network)return await tunnel(config.ports?.backend||3001);if(localhost)return`http://localhost:${config.ports?.backend}`;url=`api.${url}`;break;case"admin":if(network)return await tunnel(config.ports?.admin||3002);if(localhost)return`http://localhost:${config.ports?.admin}`;url=`admin.${url}`;break;case"library":if(network)return await tunnel(config.ports?.library||3003);if(localhost)return`http://localhost:${config.ports?.library}`;url=`libs.${url}`;break;case"email":if(network)return await tunnel(config.ports?.email||3005);if(localhost)return`http://localhost:${config.ports?.email}`;url=`email.${url}`;break;case"desktop":if(network)return await tunnel(config.ports?.desktop||3004);if(localhost)return`http://localhost:${config.ports?.desktop}`;url=`desktop.${url}`;break;case"docs":if(network)return await tunnel(config.ports?.docs||3006);if(localhost)return`http://localhost:${config.ports?.docs}`;url=`docs.${url}`;break;case"inspect":if(network)return await tunnel(config.ports?.inspect||3007);if(localhost)return`http://localhost:${config.ports?.inspect}`;url=`inspect.${url}`;break;default:if(localhost)return`http://localhost:${config.ports?.frontend}`}if(https)return`https://${url}`;return`http://${url}`}export function defineStacksConfig(config){return config}export function defineApp(config){return config}export function defineCache(config){return config}export function defineCdn(config){return config}export function defineChat(config){return config}export function defineCli(config){return config}export function defineDatabase(config){return config}export function defineDependencies(config){return config}export function defineDns(config){return config}export function defineEmailConfig(config){return config}export function defineEmail(config){return config}export function defineGit(config){return config}export function defineHashing(config){return config}export function defineImages(config){return config}export function defineLibrary(config){return config}export function defineNotification(config){return config}export function definePayment(config){return config}export function defineQueue(config){return config}export function defineSearchEngine(config){return config}export function defineSecurity(config){return config}export function defineServices(config){return config}export function defineSms(config){return config}export function defineStorage(config){return config}export function defineFilesystems(config){return config}export function defineFeatureFlags(config){return config}export function defineUi(config){return config}export function defineModel(config){return config}export function defineEvents(config){return config}
1
+ import{config}from".";export async function localUrl(options={}){const domain=options.domain??config.app.url??"stacks",type=options.type??"frontend",localhost=options.localhost??!1,https=options.https,network=options.network;let url=domain.replace(/\.[^.]+$/,".localhost");async function tunnel(port){const{createLocalTunnel}=await import("@stacksjs/tunnel");return createLocalTunnel(port)}switch(type){case"frontend":if(network)return await tunnel(config.ports?.frontend||3000);if(localhost)return`http://localhost:${config.ports?.frontend}`;break;case"backend":if(network)return await tunnel(config.ports?.backend||3001);if(localhost)return`http://localhost:${config.ports?.backend}`;url=`api.${url}`;break;case"admin":if(network)return await tunnel(config.ports?.admin||3002);if(localhost)return`http://localhost:${config.ports?.admin}`;url=`admin.${url}`;break;case"library":if(network)return await tunnel(config.ports?.library||3003);if(localhost)return`http://localhost:${config.ports?.library}`;url=`libs.${url}`;break;case"email":if(network)return await tunnel(config.ports?.email||3005);if(localhost)return`http://localhost:${config.ports?.email}`;url=`email.${url}`;break;case"desktop":if(network)return await tunnel(config.ports?.desktop||3004);if(localhost)return`http://localhost:${config.ports?.desktop}`;url=`desktop.${url}`;break;case"docs":if(network)return await tunnel(config.ports?.docs||3006);if(localhost)return`http://localhost:${config.ports?.docs}`;url=`docs.${url}`;break;case"inspect":if(network)return await tunnel(config.ports?.inspect||3007);if(localhost)return`http://localhost:${config.ports?.inspect}`;url=`inspect.${url}`;break;default:if(localhost)return`http://localhost:${config.ports?.frontend}`}if(https)return`https://${url}`;return`http://${url}`}export function defineStacksConfig(config){return config}export function defineApp(config){return config}export function defineCache(config){return config}export function defineCdn(config){return config}export function defineChat(config){return config}export function defineCli(config){return config}export function defineDatabase(config){return config}export function defineDependencies(config){return config}export function defineDns(config){return config}export function defineEmailConfig(config){return config}export function defineEmail(config){return config}export function defineGit(config){return config}export function defineHashing(config){return config}export function defineImages(config){return config}export function defineLibrary(config){return config}export function defineNotification(config){return config}export function definePayment(config){return config}export function defineQueue(config){return config}export function defineSearchEngine(config){return config}export function defineSecurity(config){return config}export function defineServices(config){return config}export function defineSms(config){return config}export function defineStorage(config){return config}export function defineFilesystems(config){return config}export function defineFeatureFlags(config){return config}export function defineUi(config){return config}export{defineEvents}from"@stacksjs/events";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/config",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.72.98",
5
+ "version": "0.72.100",
6
6
  "description": "The Stacks config helper methods.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -55,11 +55,12 @@
55
55
  "prepublishOnly": "bun run build"
56
56
  },
57
57
  "dependencies": {
58
+ "@stacksjs/events": "0.72.100",
58
59
  "ts-pantry": "^0.11.35"
59
60
  },
60
61
  "devDependencies": {
61
- "@stacksjs/alias": "0.72.98",
62
+ "@stacksjs/alias": "0.72.100",
62
63
  "better-dx": "^0.2.24",
63
- "@stacksjs/types": "0.72.98"
64
+ "@stacksjs/types": "0.72.100"
64
65
  }
65
66
  }