@stacksjs/types 0.58.57 → 0.58.59

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
3
3
  "type": "module",
4
- "version": "0.58.57",
4
+ "version": "0.58.59",
5
5
  "description": "The Stacks framework types.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -51,7 +51,7 @@
51
51
  "@mdit-vue/plugin-component": "^2.0.0",
52
52
  "@mdit-vue/plugin-frontmatter": "^2.0.0",
53
53
  "@mdit-vue/types": "^2.0.0",
54
- "@novu/stateless": "^0.23.0",
54
+ "@novu/stateless": "^0.23.1",
55
55
  "@rollup/pluginutils": "^5.1.0",
56
56
  "@stacksjs/validation": "latest",
57
57
  "@types/aws4": "^1.11.6",
@@ -62,7 +62,7 @@
62
62
  "@types/fs-extra": "^11.0.4",
63
63
  "@types/markdown-it-link-attributes": "^3.0.4",
64
64
  "@types/minimatch": "^5.1.2",
65
- "@types/node": "^20.11.16",
65
+ "@types/node": "^20.11.17",
66
66
  "@types/nprogress": "^0.2.3",
67
67
  "@vinejs/vine": "^1.7.1",
68
68
  "cac": "^6.7.14",
@@ -73,15 +73,15 @@
73
73
  "unocss": "^0.58.5",
74
74
  "unplugin-auto-import": "^0.17.5",
75
75
  "unplugin-vue-components": "^0.26.0",
76
- "vite": "^5.0.12",
76
+ "vite": "^5.1.1",
77
77
  "vite-plugin-inspect": "^0.8.3",
78
- "vite-plugin-pwa": "^0.17.5",
78
+ "vite-plugin-pwa": "^0.18.1",
79
79
  "vite-ssg": "^0.23.6",
80
80
  "vitepress": "1.0.0-rc.42",
81
- "vue": "^3.4.15"
81
+ "vue": "^3.4.18"
82
82
  },
83
83
  "devDependencies": {
84
- "aws-cdk-lib": "^2.126.0",
84
+ "aws-cdk-lib": "^2.127.0",
85
85
  "typescript": "^5.3.3"
86
86
  }
87
87
  }
package/src/ai.ts CHANGED
@@ -20,6 +20,7 @@ type AiModel = 'amazon.titan-embed-text-v1'
20
20
  export interface AiOptions {
21
21
  default: AiModel
22
22
  models: AiModel[]
23
+ deploy: boolean
23
24
  }
24
25
 
25
26
  export type AiConfig = Partial<AiOptions>
package/src/binary.ts CHANGED
@@ -6,6 +6,7 @@ export interface BinaryOptions {
6
6
  command: string
7
7
  description: string
8
8
  source: string
9
+ deploy: boolean
9
10
  // path: string // TODO: add this for a configurable path where the commands are located
10
11
  }
11
12
 
package/src/cli.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { BunFile } from 'bun'
2
2
 
3
- type ArrayBufferView = TypedArray | DataView
3
+ type ArrayBufferView = NodeJS.TypedArray | DataView
4
4
 
5
5
  export type { Subprocess, SyncSubprocess } from 'bun'
6
6
  export type Readable =
@@ -160,6 +160,10 @@ export interface CliOptions {
160
160
  * @default false
161
161
  */
162
162
  withLocalhost?: boolean
163
+
164
+ input?: string | ArrayBufferView | ReadableStream | Blob | Response | Request
165
+
166
+ quiet?: boolean
163
167
  }
164
168
 
165
169
  export type CliConfig = CliOptions
@@ -177,6 +181,7 @@ export type ActionOptions = {
177
181
  types?: boolean
178
182
  domains?: boolean
179
183
  count?: number
184
+ dryRun?: boolean // used in buddy release
180
185
  } & CliOptions & DomainsOptions
181
186
 
182
187
  export type BuildOption = 'components' | 'vueComponents' | 'webComponents' | 'elements' | 'functions' | 'docs' | 'views' | 'stacks' | 'all' | 'buddy' | 'server'
@@ -290,11 +295,16 @@ export interface CloudCliOptions extends CliOptions {
290
295
  }
291
296
  export interface CommitOptions extends CliOptions { }
292
297
  export interface KeyOptions extends CliOptions { }
293
- export interface FreshOptions extends CliOptions { }
298
+ export interface FreshOptions extends CliOptions {
299
+ dryRun?: boolean
300
+ quiet?: boolean
301
+ }
294
302
  export interface MigrateOptions extends CliOptions { }
295
303
  export interface InspireOptions extends CliOptions { }
296
304
  export interface InstallOptions extends CliOptions { }
297
- export interface ReleaseOptions extends CliOptions { }
305
+ export interface ReleaseOptions extends CliOptions {
306
+ dryRun?: boolean
307
+ }
298
308
  export interface PreinstallOptions extends CliOptions { }
299
309
  export interface PrepublishOptions extends CliOptions { }
300
310
  export interface TinkerOptions extends CliOptions { }
package/src/cron-jobs.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { IntRange } from '@stacksjs/scheduler'
2
+
1
3
  /**
2
4
  * Cron Job Options.
3
5
  */
@@ -12,7 +14,10 @@ export interface JobOptions {
12
14
  description?: string
13
15
  queue?: string
14
16
  timezone?: string
15
- tries?: number
17
+ /**
18
+ * Number of tries. Must be between 0 and 185.
19
+ */
20
+ tries?: IntRange<0, 185>
16
21
  backoff?: number | number[]
17
22
  rate?: string | Every
18
23
  enabled?: boolean
package/src/docs.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import type { UserConfig } from 'vitepress'
2
2
 
3
- export type DocsConfig = UserConfig
3
+ interface DeployedUserConfig extends UserConfig {
4
+ deploy: boolean
5
+ }
6
+
7
+ export type DocsConfig = DeployedUserConfig
4
8
  export type DocsOptions = DocsConfig
5
9
 
6
10
  export interface SocialLink {
package/src/index.ts CHANGED
@@ -30,6 +30,7 @@ export * from './i18n'
30
30
  export * from './inspect'
31
31
  // export * from './layout'
32
32
  export * from './library'
33
+ export * from './logger'
33
34
  export * from './manifest'
34
35
  export * from './model'
35
36
  export * from './money'
package/src/logger.ts ADDED
@@ -0,0 +1,54 @@
1
+ import type { LogLevel } from 'consola'
2
+ import { LogLevels, LogTypes } from 'consola'
3
+
4
+ /**
5
+ * **Logger Options**
6
+ *
7
+ * This configuration defines all of your logger options. Because Stacks is fully-typed, you
8
+ * may hover any of the options below and the definitions will be provided. In case you
9
+ * have any questions, feel free to reach out via Discord or GitHub Discussions.
10
+ */
11
+ export interface LoggerOptions {
12
+ /**
13
+ * **Log Level**
14
+ *
15
+ * The log level is a number that represents the verbosity of the logs. The higher the number,
16
+ * the more verbose the logs will be. The log levels are as follows:
17
+ *
18
+ * - 0: Error
19
+ * - 1: Warning
20
+ * - 2: Normal
21
+ * - 3: Info
22
+ * - 4: Debug
23
+ * - 5: Trace
24
+ * - -999: Silent
25
+ * - +999: Verbose
26
+ *
27
+ * @default 3
28
+ */
29
+ level: LogLevel
30
+
31
+ /**
32
+ * **Log File Path**
33
+ *
34
+ * The path to the log file. This will be used to write logs to a file. If you do not want to
35
+ * write logs to a file, you may set this to `null`.
36
+ *
37
+ * @default 'storage/logs/console.log'
38
+ */
39
+ logFilePath: string
40
+
41
+ /**
42
+ * **Errors Log Path**
43
+ *
44
+ * The path to the errors log file. This will be used to write error logs to a file. If you do
45
+ * not want to write error logs to a file, you may set this to `null`.
46
+ *
47
+ * @default 'storage/logs/errors.log'
48
+ */
49
+ errorsPath: string
50
+ }
51
+
52
+ export type LoggerConfig = Partial<LoggerOptions>
53
+
54
+ export { LogLevels, LogTypes }
package/src/router.ts CHANGED
@@ -34,13 +34,14 @@ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'before'
34
34
 
35
35
  export type RouteCallback = (params?: Record<string, any>) => any | string | object
36
36
 
37
+ type ActionName = string
37
38
  export interface Route {
38
39
  name: string
39
40
  uri: string
40
41
  url: string // used synonymously with uri
41
42
  method: HttpMethod
42
43
  pattern: RegExp
43
- callback: RouteCallback
44
+ callback: RouteCallback | ActionName
44
45
  paramNames: string[]
45
46
  middleware?: string | string[]
46
47
  statusCode?: StatusCode
package/src/stacks.ts CHANGED
@@ -12,6 +12,7 @@ import type {
12
12
  GitConfig,
13
13
  HashingConfig,
14
14
  LibraryConfig,
15
+ LoggerConfig,
15
16
  NotificationConfig,
16
17
  PaymentConfig,
17
18
  QueueConfig,
@@ -141,6 +142,15 @@ export interface StacksOptions {
141
142
  */
142
143
  library: LibraryConfig
143
144
 
145
+ /**
146
+ * **Logger Options**
147
+ *
148
+ * This configuration defines all of your Logger options. Because Stacks is fully-typed, you
149
+ * may hover any of the options below and the definitions will be provided. In case you
150
+ * have any questions, feel free to reach out via Discord or GitHub Discussions.
151
+ */
152
+ logger: LoggerConfig
153
+
144
154
  /**
145
155
  * **Notification Options**
146
156
  *
package/src/team.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  type TeamMemberName = string
2
2
  type Email = string
3
- type TeamMembers = Record<TeamMemberName, Email>
3
+ type TeamMembers = Record<TeamMemberName, Email>[]
4
4
 
5
5
  export interface Team {
6
6
  name: string