@stacksjs/types 0.58.58 → 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/dist/index.js +1787 -6
- package/package.json +6 -6
- package/src/ai.ts +1 -0
- package/src/binary.ts +1 -0
- package/src/cli.ts +13 -3
- package/src/docs.ts +5 -1
- package/src/index.ts +1 -0
- package/src/logger.ts +54 -0
- package/src/router.ts +2 -1
- package/src/stacks.ts +10 -0
- package/src/team.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.59",
|
|
5
5
|
"description": "The Stacks framework types.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -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.
|
|
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.
|
|
76
|
+
"vite": "^5.1.1",
|
|
77
77
|
"vite-plugin-inspect": "^0.8.3",
|
|
78
|
-
"vite-plugin-pwa": "^0.
|
|
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.
|
|
81
|
+
"vue": "^3.4.18"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"aws-cdk-lib": "^2.
|
|
84
|
+
"aws-cdk-lib": "^2.127.0",
|
|
85
85
|
"typescript": "^5.3.3"
|
|
86
86
|
}
|
|
87
87
|
}
|
package/src/ai.ts
CHANGED
package/src/binary.ts
CHANGED
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/docs.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { UserConfig } from 'vitepress'
|
|
2
2
|
|
|
3
|
-
|
|
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
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
|
*
|