@stacksjs/types 0.70.23 → 0.70.26

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.
Files changed (161) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/src/ai.d.ts +37 -0
  3. package/dist/src/analytics.d.ts +36 -0
  4. package/dist/src/api.d.ts +26 -0
  5. package/dist/src/app.d.ts +28 -0
  6. package/dist/src/attributes.d.ts +1 -0
  7. package/dist/src/auth.d.ts +49 -0
  8. package/dist/src/auto-imports.d.ts +8 -0
  9. package/dist/{binary.d.ts → src/binary.d.ts} +4 -1
  10. package/dist/src/cache.d.ts +79 -0
  11. package/dist/{cdn.d.ts → src/cdn.d.ts} +1 -1
  12. package/dist/{chat.d.ts → src/chat.d.ts} +29 -48
  13. package/dist/src/cli.d.ts +308 -0
  14. package/dist/{cloud.d.ts → src/cloud.d.ts} +81 -26
  15. package/dist/{components.d.ts → src/components.d.ts} +1 -4
  16. package/dist/{configure.d.ts → src/configure.d.ts} +1 -1
  17. package/dist/{cron-jobs.d.ts → src/cron-jobs.d.ts} +33 -37
  18. package/dist/src/dashboard.d.ts +33 -0
  19. package/dist/{database.d.ts → src/database.d.ts} +20 -12
  20. package/dist/src/dependencies.d.ts +17 -0
  21. package/dist/src/deploy.d.ts +16 -0
  22. package/dist/{dns.d.ts → src/dns.d.ts} +59 -59
  23. package/dist/src/docs.d.ts +23 -0
  24. package/dist/src/email.d.ts +201 -0
  25. package/dist/src/env.d.ts +1 -0
  26. package/dist/{errors.d.ts → src/errors.d.ts} +17 -24
  27. package/dist/src/events.d.ts +31 -0
  28. package/dist/src/exit-code.d.ts +10 -0
  29. package/dist/{file-systems.d.ts → src/file-systems.d.ts} +10 -6
  30. package/dist/{git.d.ts → src/git.d.ts} +9 -6
  31. package/dist/src/hashing.d.ts +57 -0
  32. package/dist/src/helpers.d.ts +1 -0
  33. package/dist/src/i18n.d.ts +65 -0
  34. package/dist/src/index.d.ts +70 -0
  35. package/dist/{library.d.ts → src/library.d.ts} +31 -33
  36. package/dist/src/logging.d.ts +12 -0
  37. package/dist/{manifest.d.ts → src/manifest.d.ts} +4 -1
  38. package/dist/src/model-names.d.ts +1 -0
  39. package/dist/src/model.d.ts +251 -0
  40. package/dist/{notifications.d.ts → src/notifications.d.ts} +1 -26
  41. package/dist/src/oauth.d.ts +290 -0
  42. package/dist/{pages.d.ts → src/pages.d.ts} +1 -1
  43. package/dist/src/payments.d.ts +322 -0
  44. package/dist/src/phone.d.ts +52 -0
  45. package/dist/src/ports.d.ts +20 -0
  46. package/dist/src/promise.d.ts +1 -0
  47. package/dist/src/push.d.ts +108 -0
  48. package/dist/src/queue.d.ts +310 -0
  49. package/dist/src/reactivity.d.ts +1 -0
  50. package/dist/src/realtime.d.ts +443 -0
  51. package/dist/src/request.d.ts +154 -0
  52. package/dist/{response.d.ts → src/response.d.ts} +1 -1
  53. package/dist/src/router.d.ts +105 -0
  54. package/dist/{saas.d.ts → src/saas.d.ts} +2 -2
  55. package/dist/src/scheduler.d.ts +1 -0
  56. package/dist/{search-engine.d.ts → src/search-engine.d.ts} +41 -45
  57. package/dist/{security.d.ts → src/security.d.ts} +4 -8
  58. package/dist/{server.d.ts → src/server.d.ts} +1 -1
  59. package/dist/src/services.d.ts +140 -0
  60. package/dist/{settings-config.d.ts → src/settings-config.d.ts} +1 -1
  61. package/dist/src/sms.d.ts +144 -0
  62. package/dist/src/stack-extensions.d.ts +137 -0
  63. package/dist/src/stacks.d.ts +40 -0
  64. package/dist/src/storage.d.ts +105 -0
  65. package/dist/src/table-names.d.ts +1 -0
  66. package/dist/src/tables.d.ts +34 -0
  67. package/dist/src/team.d.ts +7 -0
  68. package/dist/src/ui.d.ts +55 -0
  69. package/dist/src/utils.d.ts +39 -0
  70. package/package.json +13 -32
  71. package/src/ai.ts +20 -6
  72. package/src/analytics.ts +38 -1
  73. package/src/app.ts +38 -0
  74. package/src/attributes.ts +5 -1
  75. package/src/auth.ts +122 -0
  76. package/src/auto-imports.ts +8 -1
  77. package/src/cache.ts +226 -69
  78. package/src/chat.ts +0 -20
  79. package/src/cli.ts +24 -9
  80. package/src/cloud.ts +40 -1
  81. package/src/components.ts +3 -5
  82. package/src/cron-jobs.ts +1 -1
  83. package/src/dashboard.ts +40 -0
  84. package/src/database.ts +18 -2
  85. package/src/dns.ts +1 -1
  86. package/src/docs.ts +3 -3
  87. package/src/email.ts +303 -13
  88. package/src/errors.ts +2 -3
  89. package/src/events.ts +10 -5
  90. package/src/git.ts +3 -3
  91. package/src/hashing.ts +15 -19
  92. package/src/i18n.ts +105 -3
  93. package/src/index.ts +9 -5
  94. package/src/library.ts +0 -5
  95. package/src/model-names.ts +1 -1
  96. package/src/model.ts +87 -10
  97. package/src/oauth.ts +488 -0
  98. package/src/payments.ts +370 -27
  99. package/src/phone.ts +62 -0
  100. package/src/push.ts +107 -0
  101. package/src/queue.ts +386 -28
  102. package/src/reactivity.ts +1 -1
  103. package/src/realtime.ts +584 -0
  104. package/src/request.ts +344 -22
  105. package/src/router.ts +62 -4
  106. package/src/search-engine.ts +13 -13
  107. package/src/services.ts +100 -5
  108. package/src/sms.ts +263 -3
  109. package/src/stack-extensions.ts +184 -0
  110. package/src/stacks.ts +34 -4
  111. package/src/storage.ts +140 -6
  112. package/src/table-names.ts +1 -1
  113. package/src/ui.ts +20 -12
  114. package/src/utils.ts +1 -1
  115. package/dist/ai.d.ts +0 -20
  116. package/dist/analytics.d.ts +0 -13
  117. package/dist/api.d.ts +0 -26
  118. package/dist/app.d.ts +0 -32
  119. package/dist/attributes.d.ts +0 -1
  120. package/dist/auto-imports.d.ts +0 -1
  121. package/dist/build.d.ts +0 -2
  122. package/dist/cache.d.ts +0 -49
  123. package/dist/cli.d.ts +0 -310
  124. package/dist/dependencies.d.ts +0 -16
  125. package/dist/deploy.d.ts +0 -10
  126. package/dist/docs.d.ts +0 -26
  127. package/dist/email.d.ts +0 -107
  128. package/dist/events.d.ts +0 -5
  129. package/dist/exit-code.d.ts +0 -5
  130. package/dist/hashing.d.ts +0 -36
  131. package/dist/helpers.d.ts +0 -1
  132. package/dist/i18n.d.ts +0 -11
  133. package/dist/index.d.ts +0 -65
  134. package/dist/inspect.d.ts +0 -3
  135. package/dist/logging.d.ts +0 -6
  136. package/dist/model-names.d.ts +0 -1
  137. package/dist/model.d.ts +0 -232
  138. package/dist/payments.d.ts +0 -94
  139. package/dist/ports.d.ts +0 -13
  140. package/dist/promise.d.ts +0 -1
  141. package/dist/push.d.ts +0 -35
  142. package/dist/pwa.d.ts +0 -3
  143. package/dist/queue.d.ts +0 -45
  144. package/dist/reactivity.d.ts +0 -1
  145. package/dist/request.d.ts +0 -49
  146. package/dist/router.d.ts +0 -65
  147. package/dist/scheduler.d.ts +0 -1
  148. package/dist/services.d.ts +0 -81
  149. package/dist/ssg.d.ts +0 -3
  150. package/dist/stacks.d.ts +0 -54
  151. package/dist/storage.d.ts +0 -31
  152. package/dist/table-names.d.ts +0 -1
  153. package/dist/tables.d.ts +0 -34
  154. package/dist/team.d.ts +0 -8
  155. package/dist/ui.d.ts +0 -47
  156. package/dist/utils.d.ts +0 -27
  157. package/src/build.ts +0 -2
  158. package/src/inspect.ts +0 -10
  159. package/src/layout.ts +0 -8
  160. package/src/pwa.ts +0 -8
  161. package/src/ssg.ts +0 -3
package/src/cache.ts CHANGED
@@ -1,121 +1,278 @@
1
- import type { GetOptions } from 'bentocache/types'
2
-
1
+ /**
2
+ * Cache Options - Configuration for the caching system
3
+ */
3
4
  export interface CacheOptions {
4
5
  /**
5
6
  * **Cache Driver**
6
7
  *
7
- * This value determines the cache driver that will be used by your application to store
8
- * cached data. By default, Stacks uses the "redis" driver, which stores cached data in
9
- * in a self-configufed Redis instance. You may use any of the other drivers provided
10
- * by Stacks or write your own custom driver.
11
- *
12
- * @default "redis"
13
- * @example "redis"
14
- * @example "memcached"
15
- * @example "dynamodb"
8
+ * The cache driver that will be used by your application to store
9
+ * cached data. Supports 'memory' and 'redis' drivers.
16
10
  *
17
- * @see https://stacks.js.org/docs/cache
11
+ * @default "memory"
18
12
  */
19
- driver: string
13
+ driver: 'memory' | 'redis'
20
14
 
21
15
  /**
22
16
  * **Cache Prefix**
23
17
  *
24
- * This value determines the prefix that will be used when storing items in the cache. This
25
- * prefix may be useful when multiple applications are sharing the same cache driver so that
26
- * they may avoid collisions when attempting to retrieve items from the cache.
18
+ * The prefix used when storing items in the cache. Useful when
19
+ * multiple applications share the same cache driver.
27
20
  *
28
- * @default string "stacks"
29
- * @example "stacks"
30
- *
31
- * @see https://stacks.js.org/docs/cache
21
+ * @default "stacks"
32
22
  */
33
23
  prefix: string
34
24
 
35
25
  /**
36
26
  * **Cache TTL**
37
27
  *
38
- * This value determines the default time to live for items stored in the cache. This value
39
- * may be overridden when storing items in the cache. If no value is specified, the cache
40
- * driver will default to a reasonable time to live for the given item.
28
+ * Default time to live for items stored in the cache (in seconds).
29
+ * Use 0 for no expiration.
41
30
  *
42
- * @default number 3600
43
- * @example 3600
44
- * @example 3600 * 24
45
- * @example -1 (never expires)
31
+ * @default 3600
46
32
  */
47
33
  ttl: number
48
34
 
35
+ /**
36
+ * **Max Keys**
37
+ *
38
+ * Maximum number of keys to store in the cache.
39
+ * Use -1 for unlimited.
40
+ *
41
+ * @default -1
42
+ */
43
+ maxKeys?: number
44
+
45
+ /**
46
+ * **Use Clones**
47
+ *
48
+ * Whether to clone values when getting/setting.
49
+ * Disable for better performance with immutable data.
50
+ *
51
+ * @default true
52
+ */
53
+ useClones?: boolean
54
+
55
+ /**
56
+ * **Driver-specific configurations**
57
+ */
49
58
  drivers: {
50
59
  redis?: {
51
- connection: string
60
+ /**
61
+ * Redis connection URL
62
+ * @example "redis://localhost:6379"
63
+ */
64
+ url?: string
52
65
 
53
66
  /**
54
- * **Redis Host**
55
- *
56
- * This value determines the host that will be used to connect to the Redis server.
57
- *
58
- * @default string "localhost"
59
- * @example "localhost"
67
+ * Redis Host
68
+ * @default "localhost"
60
69
  */
61
70
  host: string
62
71
 
63
72
  /**
64
- * **Redis Port**
65
- *
66
- * This value determines the port that will be used to connect to the Redis server.
67
- *
68
- * @default number 6379
69
- * @example 6379
73
+ * Redis Port
74
+ * @default 6379
70
75
  */
71
76
  port: number
72
77
 
73
78
  /**
74
- * **Redis Username**
75
- *
76
- * This value determines the username that will be used to connect to the Redis server.
77
- *
78
- * @default string ""
79
- * @example "admin"
79
+ * Redis Username
80
80
  */
81
- username: string
81
+ username?: string
82
82
 
83
83
  /**
84
- * **Redis Password**
85
- *
86
- * This value determines the password that will be used to connect to the Redis server.
87
- *
88
- * @default string ""
89
- * @example "password"
84
+ * Redis Password
90
85
  */
91
- password: string
86
+ password?: string
87
+
88
+ /**
89
+ * Redis Database number
90
+ * @default 0
91
+ */
92
+ database?: number
93
+
94
+ /**
95
+ * Enable TLS
96
+ * @default false
97
+ */
98
+ tls?: boolean
92
99
  }
93
100
 
94
- memcached?: object
101
+ memory?: {
102
+ /**
103
+ * Maximum number of keys
104
+ * @default -1
105
+ */
106
+ maxKeys?: number
95
107
 
96
- dynamodb?: {
97
- key: string
98
- secret: string
99
- region: string
100
- table: string
101
- endpoint: string
108
+ /**
109
+ * Check period for expired keys (in seconds)
110
+ * @default 600
111
+ */
112
+ checkPeriod?: number
113
+
114
+ /**
115
+ * Delete keys on expire
116
+ * @default true
117
+ */
118
+ deleteOnExpire?: boolean
102
119
  }
103
120
  }
104
121
  }
105
122
 
106
123
  export type CacheConfig = Partial<CacheOptions>
107
124
 
125
+ /**
126
+ * Cache Driver Interface - Defines the API for all cache implementations
127
+ */
108
128
  export interface CacheDriver {
109
- set: (key: string, value: string, ttl?: number) => Promise<void>
110
- setForever: (key: string, value: string, ttl?: number) => Promise<void>
111
- get: <T> (key: GetOptions<T>) => Promise<T>
112
- getOrSet: <T> (key: string, value: T) => Promise<T>
113
- remove: (key: string) => Promise<void>
129
+ /**
130
+ * Get a cached value
131
+ */
132
+ get: <T>(key: string) => Promise<T | undefined>
133
+
134
+ /**
135
+ * Get multiple cached values
136
+ */
137
+ mget: <T>(keys: string[]) => Promise<Record<string, T>>
138
+
139
+ /**
140
+ * Set a cached value with optional TTL (in seconds)
141
+ */
142
+ set: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
143
+
144
+ /**
145
+ * Set multiple cached values
146
+ */
147
+ mset: <T>(entries: Array<{ key: string, value: T, ttl?: number }>) => Promise<boolean>
148
+
149
+ /**
150
+ * Set a cached value that never expires
151
+ */
152
+ setForever: <T>(key: string, value: T) => Promise<boolean>
153
+
154
+ /**
155
+ * Get a value or set it if not cached
156
+ */
157
+ getOrSet: <T>(key: string, fetcher: () => T | Promise<T>, ttl?: number) => Promise<T>
158
+
159
+ /**
160
+ * Delete one or more keys
161
+ */
162
+ del: (keys: string | string[]) => Promise<number>
163
+
164
+ /**
165
+ * Check if a key exists
166
+ */
114
167
  has: (key: string) => Promise<boolean>
168
+
169
+ /**
170
+ * Check if a key is missing
171
+ */
115
172
  missing: (key: string) => Promise<boolean>
116
- del: (key: string) => Promise<void>
117
- deleteMany: (keys: string[]) => Promise<void>
173
+
174
+ /**
175
+ * Delete a single key (alias for del)
176
+ */
177
+ remove: (key: string) => Promise<void>
178
+
179
+ /**
180
+ * Delete multiple keys
181
+ */
182
+ deleteMany: (keys: string[]) => Promise<number>
183
+
184
+ /**
185
+ * Clear all cached values
186
+ */
118
187
  clear: () => Promise<void>
119
- deleteAll: () => Promise<void>
188
+
189
+ /**
190
+ * Clear all cached values (alias for clear)
191
+ */
192
+ flush: () => Promise<void>
193
+
194
+ /**
195
+ * Get all keys matching a pattern
196
+ */
197
+ keys: (pattern?: string) => Promise<string[]>
198
+
199
+ /**
200
+ * Get the TTL of a key (in seconds)
201
+ */
202
+ getTtl: (key: string) => Promise<number | undefined>
203
+
204
+ /**
205
+ * Set/update the TTL of a key
206
+ */
207
+ ttl: (key: string, ttl: number) => Promise<boolean>
208
+
209
+ /**
210
+ * Get a value and delete it atomically
211
+ */
212
+ take: <T>(key: string) => Promise<T | undefined>
213
+
214
+ /**
215
+ * Get a cached value or compute and store it (Laravel-style).
216
+ * TTL comes before callback (Laravel convention).
217
+ */
218
+ remember: <T>(key: string, ttl: number, callback: () => T | Promise<T>) => Promise<T>
219
+
220
+ /**
221
+ * Get a cached value or compute and store it forever (no expiration).
222
+ */
223
+ rememberForever: <T>(key: string, callback: () => T | Promise<T>) => Promise<T>
224
+
225
+ /**
226
+ * Get cache statistics
227
+ */
228
+ getStats: () => Promise<CacheStats>
229
+
230
+ /**
231
+ * Close the cache connection
232
+ */
233
+ close: () => Promise<void>
234
+
235
+ /**
236
+ * Disconnect from the cache (alias for close)
237
+ */
120
238
  disconnect: () => Promise<void>
239
+
240
+ /**
241
+ * Tag-aware writes. The returned scope mirrors the cache API but
242
+ * indexes every write under the supplied tag(s) so a single
243
+ * `flush()` can invalidate cascading entries together.
244
+ *
245
+ * @example
246
+ * ```ts
247
+ * await cache.tags(['user:42']).put('user:42:feed', payload, 300)
248
+ * await cache.tags(['user:42']).flush()
249
+ * ```
250
+ */
251
+ tags?: (tags: readonly string[]) => TaggedCacheScope
252
+ }
253
+
254
+ /**
255
+ * Returned by `cache.tags(tags)`. Tag-scoped writes/reads with a
256
+ * cascading `flush()`.
257
+ */
258
+ export interface TaggedCacheScope {
259
+ put: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
260
+ set: <T>(key: string, value: T, ttl?: number) => Promise<boolean>
261
+ setForever: <T>(key: string, value: T) => Promise<boolean>
262
+ remember: <T>(key: string, ttl: number, callback: () => T | Promise<T>) => Promise<T>
263
+ rememberForever: <T>(key: string, callback: () => T | Promise<T>) => Promise<T>
264
+ get: <T>(key: string) => Promise<T | undefined>
265
+ has: (key: string) => Promise<boolean>
266
+ flush: () => Promise<number>
267
+ }
268
+
269
+ /**
270
+ * Cache Statistics
271
+ */
272
+ export interface CacheStats {
273
+ hits: number
274
+ misses: number
275
+ keys: number
276
+ size?: number
277
+ hitRate?: number
121
278
  }
package/src/chat.ts CHANGED
@@ -191,23 +191,3 @@ export interface SlackResponse {
191
191
  */
192
192
  [key: string]: any
193
193
  }
194
-
195
- /**
196
- * Render options for templates
197
- */
198
- export interface RenderOptions {
199
- /**
200
- * Data to be used for template rendering
201
- */
202
- data?: Record<string, any>
203
-
204
- /**
205
- * Template engine options
206
- */
207
- engineOptions?: Record<string, any>
208
-
209
- /**
210
- * Additional rendering options
211
- */
212
- [key: string]: any
213
- }
package/src/cli.ts CHANGED
@@ -174,6 +174,8 @@ export interface CliOptions {
174
174
  */
175
175
  background?: boolean
176
176
 
177
+ timeoutMs?: number
178
+
177
179
  startTime?: number
178
180
 
179
181
  /**
@@ -208,7 +210,6 @@ DomainsOptions
208
210
 
209
211
  export type BuildOption =
210
212
  | 'components'
211
- | 'vueComponents'
212
213
  | 'webComponents'
213
214
  | 'elements'
214
215
  | 'functions'
@@ -267,7 +268,7 @@ export type GeneratorOption =
267
268
  | 'componentMeta'
268
269
  | 'coreSymlink'
269
270
  | 'openApiSpec'
270
- | 'pkgxConfig'
271
+ | 'pantryConfig'
271
272
  | 'openapi'
272
273
  | 'modelFiles'
273
274
  export type GeneratorOptions = {
@@ -290,20 +291,24 @@ export type MakeBooleanOption =
290
291
  | 'model'
291
292
  | 'notification'
292
293
  | 'stack'
294
+ | 'middleware'
295
+ | 'dryRun'
296
+ | 'withValidation'
297
+ | 'withAuth'
293
298
  export type MakeOptions = {
294
299
  [key in MakeBooleanOption]: boolean
295
300
  } & {
296
301
  [key in MakeStringOption]: string
297
302
  } & CliOptions
298
303
 
299
- export type UpgradeBoolean = 'framework' | 'dependencies' | 'bun' | 'shell' | 'binary' | 'all' | 'force'
304
+ export type UpgradeBoolean = 'framework' | 'dependencies' | 'bun' | 'shell' | 'binary' | 'all' | 'force' | 'canary' | 'stable' | 'noPostinstall' | 'postinstall'
300
305
 
301
- export type UpgradeString = 'version'
306
+ export type UpgradeString = 'version' | 'from'
302
307
 
303
308
  export type UpgradeOptions = {
304
- [key in UpgradeBoolean]: boolean
309
+ [key in UpgradeBoolean]?: boolean
305
310
  } & {
306
- [key in UpgradeString]: string
311
+ [key in UpgradeString]?: string
307
312
  } & CliOptions
308
313
 
309
314
  export type ExamplesString = 'version'
@@ -314,7 +319,7 @@ export type ExamplesOptions = {
314
319
  } & {
315
320
  [key in ExamplesBoolean]: boolean
316
321
  } & CliOptions
317
- export type TestOptions = CliOptions & {
322
+ export type TestingOptions = CliOptions & {
318
323
  ui?: boolean
319
324
  feature?: boolean
320
325
  unit?: boolean
@@ -388,10 +393,15 @@ export interface MigrateOptions extends CliOptions {
388
393
 
389
394
  export interface CliQueueOptions extends CliOptions {
390
395
  queue?: string
396
+ id?: string | number
397
+ all?: boolean
398
+ force?: boolean
399
+ connection?: string
391
400
  }
392
401
 
393
402
  export interface ReleaseOptions extends CliOptions {
394
403
  dryRun?: boolean
404
+ bump?: 'patch' | 'minor' | 'major' | 'prepatch' | 'preminor' | 'premajor' | 'prerelease' | string
395
405
  }
396
406
  export interface ProjectsOptions extends CliOptions {
397
407
  list?: boolean
@@ -412,9 +422,14 @@ export interface SearchCommandOptions extends CliOptions {
412
422
 
413
423
  export interface ScheduleOptions extends CliOptions {}
414
424
 
415
- export interface TinkerOptions extends CliOptions {}
425
+ export interface TinkerOptions extends CliOptions {
426
+ eval?: string | boolean
427
+ print?: string | boolean
428
+ noBanner?: boolean
429
+ preload?: string
430
+ }
416
431
  export interface TypesOptions extends CliOptions {}
417
432
 
418
- export type LibEntryType = 'vue-components' | 'web-components' | 'functions' | 'all'
433
+ export type LibEntryType = 'web-components' | 'functions' | 'all'
419
434
 
420
435
  export type { CAC as CLI } from 'cac'
package/src/cloud.ts CHANGED
@@ -270,7 +270,7 @@ type InfrastructureOptions = Partial<{
270
270
  *
271
271
  * These settings are used to configure the firewall.
272
272
  *
273
- * @see https://stacksjs.org/docs/cloud#firewall
273
+ * @see https://stacksjs.com/docs/cloud#firewall
274
274
  *
275
275
  * @example
276
276
  * ```ts
@@ -327,8 +327,44 @@ type InfrastructureOptions = Partial<{
327
327
  cli: boolean
328
328
  docs: boolean
329
329
  fileSystem: boolean
330
+
331
+ /**
332
+ * **Tunnel Configuration**
333
+ *
334
+ * Deploy a custom tunnel server for sharing local dev servers.
335
+ * Only needed for custom domains — localtunnel.dev is the shared default.
336
+ *
337
+ * @example
338
+ * ```ts
339
+ * tunnel: {
340
+ * enabled: true,
341
+ * domain: 'tunnel.mycompany.com',
342
+ * ssl: { enabled: true },
343
+ * }
344
+ * ```
345
+ */
346
+ tunnel: TunnelCloudConfig
330
347
  }>
331
348
 
349
+ export interface TunnelCloudConfig {
350
+ /** Enable custom tunnel server deployment (opt-in) */
351
+ enabled: boolean
352
+ /** Custom domain for the tunnel server (must NOT be localtunnel.dev) */
353
+ domain?: string
354
+ /** AWS region to deploy to */
355
+ region?: string
356
+ /** EC2 instance type */
357
+ instanceType?: string
358
+ /** Resource name prefix */
359
+ prefix?: string
360
+ /** SSL configuration */
361
+ ssl?: {
362
+ enabled: boolean
363
+ porkbunApiKey?: string
364
+ porkbunSecretKey?: string
365
+ }
366
+ }
367
+
332
368
  export interface CloudOptions {
333
369
  sites: {
334
370
  root: string
@@ -337,6 +373,9 @@ export interface CloudOptions {
337
373
  }
338
374
 
339
375
  infrastructure: InfrastructureOptions
376
+ cdn: any
377
+ api: any
378
+ firewall: any
340
379
  }
341
380
 
342
381
  export type CloudConfig = Partial<CloudOptions>
package/src/components.ts CHANGED
@@ -1,5 +1,3 @@
1
- export type { Options as ComponentOptions } from 'unplugin-vue-components'
2
-
3
1
  export interface TagOption {
4
2
  /**
5
3
  * **Tag Name**
@@ -21,7 +19,7 @@ export interface TagOption {
21
19
  * name: ['HelloWorld', 'AppHelloWorld'] // results in `<AppHelloWorld />`
22
20
  * }]
23
21
  * }
24
- * @see https://stacksjs.org/docs/components
22
+ * @see https://stacksjs.com/docs/components
25
23
  */
26
24
  name: string | string[]
27
25
 
@@ -35,7 +33,7 @@ export interface TagOption {
35
33
  * {
36
34
  * name: 'HelloWorld' // results in `<HelloWorld />`
37
35
  * }
38
- * @see https://stacksjs.org/docs/components
36
+ * @see https://stacksjs.com/docs/components
39
37
  */
40
38
  description?: string
41
39
 
@@ -53,7 +51,7 @@ export interface TagOption {
53
51
  * description: 'The way to greet the user.',
54
52
  * }
55
53
  * }
56
- * @see https://stacksjs.org/docs/components
54
+ * @see https://stacksjs.com/docs/components
57
55
  */
58
56
  attributes?: {
59
57
  name: string
package/src/cron-jobs.ts CHANGED
@@ -26,7 +26,7 @@ export enum Every {
26
26
  Year = '0 0 1 1 *',
27
27
  }
28
28
 
29
- export type JobHandler = (data?: any) => Promise<any> | any
29
+ export type JobHandler = (_data?: any) => Promise<any> | any
30
30
 
31
31
  /**
32
32
  * Represents different backoff strategies for job retries
@@ -0,0 +1,40 @@
1
+ /**
2
+ * **Dashboard Options**
3
+ *
4
+ * Controls which sections render in the `buddy dev --dashboard` sidebar.
5
+ * Every section defaults to enabled — set a flag to `false` in
6
+ * `config/dashboard.ts` to hide it (for example, projects that don't
7
+ * use commerce features set `commerce.enabled: false`).
8
+ *
9
+ * The `data` section is always visible (it's where every project's
10
+ * userland models live). It exposes per-row toggles for the basic
11
+ * built-in rows so a project can drop, say, the newsletter Subscribers
12
+ * row when there's no newsletter without losing the model viewer.
13
+ */
14
+ export interface DashboardOptions {
15
+ /** Per-section visibility toggles. Omit a section to leave it enabled. */
16
+ sections?: {
17
+ library?: { enabled?: boolean }
18
+ content?: { enabled?: boolean }
19
+ commerce?: { enabled?: boolean }
20
+ marketing?: { enabled?: boolean }
21
+ analytics?: { enabled?: boolean }
22
+ management?: { enabled?: boolean }
23
+ utilities?: { enabled?: boolean }
24
+ /**
25
+ * Data section is always rendered (it hosts userland models). These
26
+ * sub-flags hide individual built-in rows. Userland model rows are
27
+ * always shown — they're the whole point of this section.
28
+ */
29
+ data?: {
30
+ dashboard?: { enabled?: boolean }
31
+ activity?: { enabled?: boolean }
32
+ users?: { enabled?: boolean }
33
+ teams?: { enabled?: boolean }
34
+ subscribers?: { enabled?: boolean }
35
+ allModels?: { enabled?: boolean }
36
+ }
37
+ }
38
+ }
39
+
40
+ export type DashboardConfig = Partial<DashboardOptions>
package/src/database.ts CHANGED
@@ -1,6 +1,7 @@
1
+ import type { SupportedDialect } from 'bun-query-builder'
1
2
  export interface DatabaseOptions {
2
- default: string
3
-
3
+ default: SupportedDialect
4
+ logging?: boolean
4
5
  connections: {
5
6
  mysql?: {
6
7
  url?: string
@@ -39,6 +40,21 @@ export interface DatabaseOptions {
39
40
 
40
41
  migrations: string
41
42
  migrationLocks: string
43
+
44
+ // Query logging configuration
45
+ queryLogging?: {
46
+ enabled: boolean
47
+ slowThreshold: number // in milliseconds
48
+ retention: number // in days
49
+ pruneFrequency: number // in hours
50
+ excludedQueries?: string[] // patterns to exclude
51
+ analysis?: {
52
+ enabled: boolean
53
+ analyzeAll: boolean // analyze all queries, not just slow ones
54
+ explainPlan: boolean // collect EXPLAIN plans
55
+ suggestions: boolean // generate optimization suggestions
56
+ }
57
+ }
42
58
  }
43
59
 
44
60
  export type DatabaseConfig = Partial<DatabaseOptions>
package/src/dns.ts CHANGED
@@ -362,7 +362,7 @@ export interface ContactInfo extends ContactDetail {
362
362
  * you may hover any of the options below and the definitions will be provided. In case
363
363
  * you have any questions, feel free to reach out via Discord or GitHub Discussions.
364
364
  *
365
- * @see https://stacksjs.org/docs/dns
365
+ * @see https://stacksjs.com/docs/dns
366
366
  */
367
367
  export interface DnsOptions {
368
368
  driver: 'aws'
package/src/docs.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { UserConfig } from 'vitepress'
1
+ import type { BunPressOptions } from '@stacksjs/bunpress'
2
2
 
3
- export interface DocsUserConfig extends UserConfig {
4
- deploy: boolean
3
+ export interface DocsUserConfig extends BunPressOptions {
4
+ deploy?: boolean
5
5
  }
6
6
 
7
7
  export type DocsConfig = DocsUserConfig