@stacksjs/types 0.67.0 → 0.68.0
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/ai.d.ts +17 -14
- package/dist/analytics.d.ts +12 -14
- package/dist/api.d.ts +25 -66
- package/dist/app.d.ts +29 -134
- package/dist/auto-imports.d.ts +1 -1
- package/dist/binary.d.ts +7 -10
- package/dist/build.d.ts +2 -2
- package/dist/cache.d.ts +48 -77
- package/dist/cdn.d.ts +3 -15
- package/dist/chat.d.ts +2 -2
- package/dist/cli.d.ts +252 -239
- package/dist/cloud.d.ts +305 -68
- package/dist/components.d.ts +11 -59
- package/dist/configure.d.ts +11 -11
- package/dist/cron-jobs.d.ts +34 -41
- package/dist/database.d.ts +50 -45
- package/dist/dependencies.d.ts +15 -61
- package/dist/deploy.d.ts +10 -16
- package/dist/dns.d.ts +349 -167
- package/dist/docs.d.ts +20 -19
- package/dist/email.d.ts +15 -10
- package/dist/errors.d.ts +87 -69
- package/dist/events.d.ts +3 -30
- package/dist/exit-code.d.ts +4 -9
- package/dist/file-systems.d.ts +52 -56
- package/dist/git.d.ts +54 -126
- package/dist/hashing.d.ts +30 -97
- package/dist/helpers.d.ts +1 -1
- package/dist/i18n.d.ts +10 -18
- package/dist/index.d.ts +62 -61
- package/dist/index.js +1 -1
- package/dist/inspect.d.ts +3 -9
- package/dist/library.d.ts +798 -139
- package/dist/logging.d.ts +5 -27
- package/dist/manifest.d.ts +6 -9
- package/dist/model-names.d.ts +1 -1
- package/dist/model.d.ts +150 -130
- package/dist/notifications.d.ts +150 -105
- package/dist/pages.d.ts +10 -10
- package/dist/payments.d.ts +84 -55
- package/dist/ports.d.ts +13 -20
- package/dist/promise.d.ts +1 -1
- package/dist/push.d.ts +34 -30
- package/dist/pwa.d.ts +3 -7
- package/dist/queue.d.ts +36 -33
- package/dist/reactivity.d.ts +1 -1
- package/dist/request.d.ts +39 -26
- package/dist/router.d.ts +51 -51
- package/dist/saas.d.ts +32 -0
- package/dist/scheduler.d.ts +1 -1
- package/dist/search-engine.d.ts +85 -111
- package/dist/security.d.ts +18 -16
- package/dist/server.d.ts +16 -6
- package/dist/services.d.ts +34 -28
- package/dist/settings-config.d.ts +8 -8
- package/dist/ssg.d.ts +3 -2
- package/dist/stacks.d.ts +53 -203
- package/dist/storage.d.ts +29 -36
- package/dist/tables.d.ts +34 -52
- package/dist/team.d.ts +7 -8
- package/dist/ui.d.ts +39 -162
- package/dist/utils.d.ts +20 -30
- package/package.json +8 -8
- package/src/cli.ts +2 -0
- package/src/cloud.ts +16 -4
- package/src/errors.ts +8 -0
- package/src/index.ts +1 -0
- package/src/model-names.ts +1 -1
- package/src/model.ts +6 -0
- package/src/payments.ts +32 -0
- package/src/saas.ts +33 -0
- package/src/stacks.ts +10 -0
- package/dist/env.d.ts +0 -0
- package/dist/layout.d.ts +0 -0
- package/dist/native.d.ts +0 -0
- package/dist/sms.d.ts +0 -0
package/dist/storage.d.ts
CHANGED
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* The storage driver to utilize.
|
|
8
|
-
*
|
|
9
|
-
* @default string 's3'
|
|
10
|
-
* @see https://stacksjs.org/docs/storage
|
|
11
|
-
*/
|
|
12
|
-
driver: "s3" | "efs" | "local";
|
|
13
|
-
}
|
|
14
|
-
export type StorageConfig = Partial<StorageOptions>;
|
|
15
|
-
export interface StorageDriver {
|
|
16
|
-
list: (path: string, options?: any) => DirectoryListing;
|
|
17
|
-
changeVisibility: (path: string, visibility: string) => Promise<void>;
|
|
18
|
-
visibility: (path: string) => Promise<string>;
|
|
19
|
-
fileExists: (path: string) => Promise<boolean>;
|
|
20
|
-
directoryExists: (path: string) => Promise<boolean>;
|
|
21
|
-
publicUrl: (path: string, options: PublicUrlOptions) => Promise<string>;
|
|
22
|
-
temporaryUrl: (path: string, options: TemporaryUrlOptions) => Promise<string>;
|
|
23
|
-
checksum: (path: string, options: ChecksumOptions) => Promise<string>;
|
|
24
|
-
mimeType: (path: string, options: MimeTypeOptions) => Promise<string>;
|
|
25
|
-
lastModified: (path: string) => Promise<number>;
|
|
26
|
-
fileSize: (path: string) => Promise<number>;
|
|
27
|
-
read: (path: string) => Promise<FileContents>;
|
|
28
|
-
readToString: (path: string) => Promise<string>;
|
|
29
|
-
readToBuffer: (path: string) => Promise<Buffer>;
|
|
30
|
-
readToUint8Array: (path: string) => Promise<Uint8Array>;
|
|
31
|
-
deleteFile: (path: string) => Promise<void>;
|
|
32
|
-
copyFile: (from: string, to: string) => Promise<void>;
|
|
33
|
-
moveFile: (from: string, to: string) => Promise<void>;
|
|
34
|
-
stat: (path: string) => Promise<StatEntry>;
|
|
35
|
-
createDirectory: (path: string) => Promise<void>;
|
|
36
|
-
write: (path: string, contents: FileContents) => Promise<void>;
|
|
1
|
+
import type { Buffer } from 'node:buffer';
|
|
2
|
+
import type { ChecksumOptions, DirectoryListing, FileContents, MimeTypeOptions, PublicUrlOptions, StatEntry, TemporaryUrlOptions } from '@flystorage/file-storage';
|
|
3
|
+
|
|
4
|
+
export declare interface StorageOptions {
|
|
5
|
+
driver: 's3' | 'efs' | 'local'
|
|
37
6
|
}
|
|
7
|
+
export declare type StorageConfig = Partial<StorageOptions>
|
|
8
|
+
export declare interface StorageDriver {
|
|
9
|
+
list: (path: string, options?: any) => DirectoryListing
|
|
10
|
+
changeVisibility: (path: string, visibility: string) => Promise<void>
|
|
11
|
+
visibility: (path: string) => Promise<string>
|
|
12
|
+
fileExists: (path: string) => Promise<boolean>
|
|
13
|
+
directoryExists: (path: string) => Promise<boolean>
|
|
14
|
+
publicUrl: (path: string, options: PublicUrlOptions) => Promise<string>
|
|
15
|
+
temporaryUrl: (path: string, options: TemporaryUrlOptions) => Promise<string>
|
|
16
|
+
checksum: (path: string, options: ChecksumOptions) => Promise<string>
|
|
17
|
+
mimeType: (path: string, options: MimeTypeOptions) => Promise<string>
|
|
18
|
+
lastModified: (path: string) => Promise<number>
|
|
19
|
+
fileSize: (path: string) => Promise<number>
|
|
20
|
+
read: (path: string) => Promise<FileContents>
|
|
21
|
+
readToString: (path: string) => Promise<string>
|
|
22
|
+
readToBuffer: (path: string) => Promise<Buffer>
|
|
23
|
+
readToUint8Array: (path: string) => Promise<Uint8Array>
|
|
24
|
+
deleteFile: (path: string) => Promise<void>
|
|
25
|
+
copyFile: (from: string, to: string) => Promise<void>
|
|
26
|
+
moveFile: (from: string, to: string) => Promise<void>
|
|
27
|
+
stat: (path: string) => Promise<StatEntry>
|
|
28
|
+
createDirectory: (path: string) => Promise<void>
|
|
29
|
+
write: (path: string, contents: FileContents) => Promise<void>
|
|
30
|
+
}
|
package/dist/tables.d.ts
CHANGED
|
@@ -1,52 +1,34 @@
|
|
|
1
|
-
import type { Hits, SearchResponse } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
selectedAll?: boolean;
|
|
36
|
-
goToNextPage: number;
|
|
37
|
-
goToPage: number;
|
|
38
|
-
goToPrevPage: number;
|
|
39
|
-
lastPageNumber: number;
|
|
40
|
-
searchFilters?: object;
|
|
41
|
-
searchParams?: object;
|
|
42
|
-
setTotalHits: number;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* The current page number
|
|
46
|
-
* @default 1
|
|
47
|
-
* @type {number}
|
|
48
|
-
* @memberof TableStore
|
|
49
|
-
* @example 1
|
|
50
|
-
*/
|
|
51
|
-
currentPage: number;
|
|
52
|
-
}
|
|
1
|
+
import type { Hits, SearchResponse } from 'meilisearch';
|
|
2
|
+
|
|
3
|
+
export declare interface TableStore {
|
|
4
|
+
index: string
|
|
5
|
+
results?: SearchResponse<Record<string, any>>
|
|
6
|
+
hits?: Hits
|
|
7
|
+
|
|
8
|
+
columns: string[]
|
|
9
|
+
source?: string
|
|
10
|
+
password?: string
|
|
11
|
+
searchable?: string | boolean
|
|
12
|
+
query?: string
|
|
13
|
+
sortable?: string | boolean
|
|
14
|
+
sort?: string
|
|
15
|
+
sorts?: string | string[]
|
|
16
|
+
filterable?: string | boolean
|
|
17
|
+
filters?: string | string[]
|
|
18
|
+
filterValue?: any[]
|
|
19
|
+
actionable?: string | boolean
|
|
20
|
+
actions?: string | string[]
|
|
21
|
+
perPage: number
|
|
22
|
+
selectable?: string | boolean
|
|
23
|
+
selectedRows?: number[] | string[]
|
|
24
|
+
selectedAll?: boolean
|
|
25
|
+
goToNextPage: number
|
|
26
|
+
goToPage: number
|
|
27
|
+
goToPrevPage: number
|
|
28
|
+
lastPageNumber: number
|
|
29
|
+
searchFilters?: object
|
|
30
|
+
searchParams?: object
|
|
31
|
+
setTotalHits: number
|
|
32
|
+
|
|
33
|
+
currentPage: number
|
|
34
|
+
}
|
package/dist/team.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
type TeamMemberName = string
|
|
2
|
-
type Email = string
|
|
3
|
-
type TeamMembers = Record<TeamMemberName, Email
|
|
4
|
-
export interface Team {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
1
|
+
declare type TeamMemberName = string
|
|
2
|
+
type Email = string
|
|
3
|
+
type TeamMembers = Record<TeamMemberName, Email>
|
|
4
|
+
export declare interface Team {
|
|
5
|
+
name: string
|
|
6
|
+
members?: TeamMembers
|
|
7
|
+
}
|
package/dist/ui.d.ts
CHANGED
|
@@ -1,165 +1,42 @@
|
|
|
1
|
-
import type { UserConfig } from
|
|
2
|
-
import type { UserShortcuts } from
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type { UserConfig } from '@unocss/core';
|
|
2
|
+
import type { UserShortcuts } from 'unocss';
|
|
3
|
+
|
|
4
|
+
export declare type Font = 'inter' | 'mona' | 'hubot'
|
|
5
|
+
export type Icon = 'heroicons'
|
|
6
|
+
export declare type WebFontsProviders = 'google' | 'bunny' | 'fontshare'
|
|
7
|
+
export type Shortcuts = UserShortcuts
|
|
8
|
+
export declare interface FontInfo {
|
|
9
|
+
title: string
|
|
10
|
+
text: string
|
|
10
11
|
}
|
|
11
|
-
export interface WebFontMeta {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export declare interface WebFontMeta {
|
|
13
|
+
name: string
|
|
14
|
+
weights?: (string | number)[]
|
|
15
|
+
italic?: boolean
|
|
16
|
+
provider?: WebFontsProviders
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
shortcuts: Shortcuts;
|
|
42
|
-
/**
|
|
43
|
-
* **Safelist**
|
|
44
|
-
*
|
|
45
|
-
* Use the `safelist` option to ensure the generation of
|
|
46
|
-
* those utility classes. This is useful when certain
|
|
47
|
-
* class names don’t exist in your content files.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* safelist: [
|
|
52
|
-
* 'btn',
|
|
53
|
-
* 'btn-lg',
|
|
54
|
-
* 'btn-blue',
|
|
55
|
-
* 'btn-blue-500',
|
|
56
|
-
* ]
|
|
57
|
-
*/
|
|
58
|
-
safelist: string;
|
|
59
|
-
/**
|
|
60
|
-
* **Trigger String**
|
|
61
|
-
*
|
|
62
|
-
* The "trigger string" defines the class name markup
|
|
63
|
-
* you want to add into your components.
|
|
64
|
-
*
|
|
65
|
-
* @default ':stx:'
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* trigger: ':stx:'
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
trigger?: string;
|
|
73
|
-
/**
|
|
74
|
-
* **Class Prefix**
|
|
75
|
-
*
|
|
76
|
-
* The prefix for the compiled class name. When transforming
|
|
77
|
-
* all utility classes into a single class, this prefix
|
|
78
|
-
* will be added to the generated CSS class name.
|
|
79
|
-
*
|
|
80
|
-
* @default 'stx-'
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```ts
|
|
84
|
-
* prefix: 'stx-'
|
|
85
|
-
* ```
|
|
86
|
-
*/
|
|
87
|
-
classPrefix?: string;
|
|
88
|
-
/**
|
|
89
|
-
* **Hash Function**
|
|
90
|
-
*
|
|
91
|
-
* The hash function used to generate the class name.
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```ts
|
|
95
|
-
* hash: (str: string) => {
|
|
96
|
-
* return str
|
|
97
|
-
* .split('')
|
|
98
|
-
* .reduce((a, b) => {
|
|
99
|
-
* a = ((a << 5) - a) + b.charCodeAt(0)
|
|
100
|
-
* return a & a
|
|
101
|
-
* }, 0)
|
|
102
|
-
* .toString(36)
|
|
103
|
-
* }
|
|
104
|
-
*/
|
|
105
|
-
hashFn?: (str: string) => string;
|
|
106
|
-
/**
|
|
107
|
-
* **CSS Resets—Preset**
|
|
108
|
-
*
|
|
109
|
-
* Define a standard of reset CSS stylesheets. By default, the Tailwind
|
|
110
|
-
* reset styles are utilized. You may set this value to `null`
|
|
111
|
-
* if you prefer not applying any default stylesheets.
|
|
112
|
-
*
|
|
113
|
-
* @url https://www.npmjs.com/package/@unocss/reset
|
|
114
|
-
* @todo preset needs to be added via a Vite plugin on development & build
|
|
115
|
-
* @example
|
|
116
|
-
* ```ts
|
|
117
|
-
* reset: 'tailwind'
|
|
118
|
-
* ```
|
|
119
|
-
*/
|
|
120
|
-
reset?: ResetPreset;
|
|
121
|
-
/**
|
|
122
|
-
* **Fonts**
|
|
123
|
-
*
|
|
124
|
-
* Define the fonts you want to use. By default, Stacks provides support
|
|
125
|
-
* for several local font providers. You may set this value to
|
|
126
|
-
* `null` if you prefer not utilize any local fonts.
|
|
127
|
-
*
|
|
128
|
-
* @see https://stacksjs.org/docs/fonts
|
|
129
|
-
* ```
|
|
130
|
-
*/
|
|
131
|
-
fonts?: any;
|
|
132
|
-
useWebFonts?: boolean | WebFontsProviders;
|
|
133
|
-
/**
|
|
134
|
-
* **Icon Sets**
|
|
135
|
-
*
|
|
136
|
-
* This value defines the icon sets you want to use. When using icons, they
|
|
137
|
-
* are displayed utilizing a technique called "icons in pure css."
|
|
138
|
-
* Learn more here https://antfu.me/posts/icons-in-pure-css.
|
|
139
|
-
*
|
|
140
|
-
* @see https://stacks.ow3.org/config/icons — list of available icon sets
|
|
141
|
-
* @todo implement this into Vite build flow
|
|
142
|
-
* @example
|
|
143
|
-
* ```ts
|
|
144
|
-
* icons: ['heroicons']
|
|
145
|
-
* ```
|
|
146
|
-
* @example
|
|
147
|
-
* ```html
|
|
148
|
-
* <i class="i-heroicons-outline-book-open w-8 h-8 text-gray-500" aria-hidden="true" />
|
|
149
|
-
* ```
|
|
150
|
-
*/
|
|
151
|
-
icons: Icon | Icon[];
|
|
152
|
-
theme: UserConfig["theme"];
|
|
153
|
-
variants: UserConfig["variants"];
|
|
154
|
-
layers: UserConfig["layers"];
|
|
18
|
+
export declare interface UiOptions {
|
|
19
|
+
shortcuts: Shortcuts
|
|
20
|
+
|
|
21
|
+
safelist: string
|
|
22
|
+
|
|
23
|
+
trigger?: string
|
|
24
|
+
|
|
25
|
+
classPrefix?: string
|
|
26
|
+
|
|
27
|
+
hashFn?: (str: string) => string
|
|
28
|
+
|
|
29
|
+
reset?: ResetPreset
|
|
30
|
+
|
|
31
|
+
fonts?: any
|
|
32
|
+
|
|
33
|
+
useWebFonts?: boolean | WebFontsProviders
|
|
34
|
+
|
|
35
|
+
icons: Icon | Icon[]
|
|
36
|
+
|
|
37
|
+
theme: UserConfig['theme']
|
|
38
|
+
variants: UserConfig['variants']
|
|
39
|
+
layers: UserConfig['layers']
|
|
155
40
|
}
|
|
156
|
-
export type UiConfig = Partial<UiOptions
|
|
157
|
-
|
|
158
|
-
* **Style Reset — Preset**
|
|
159
|
-
*
|
|
160
|
-
* This value sets the "reset preset." A preset defines certain
|
|
161
|
-
* CSS defaults to be applied.
|
|
162
|
-
*
|
|
163
|
-
* @default "tailwind"
|
|
164
|
-
*/
|
|
165
|
-
export type ResetPreset = "tailwind" | "normalize" | "sanitize" | "eric-meyer" | "antfu" | null;
|
|
41
|
+
export declare type UiConfig = Partial<UiOptions>
|
|
42
|
+
export declare type ResetPreset = 'tailwind' | 'normalize' | 'sanitize' | 'eric-meyer' | 'antfu' | null
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* @returns U items intersected
|
|
22
|
-
* @see https://stackoverflow.com/a/50375286/9259330
|
|
23
|
-
*/
|
|
24
|
-
export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
25
|
-
export type MergeInsertions<T> = T extends object ? { [K in keyof T] : MergeInsertions<T[K]> } : T;
|
|
26
|
-
export type DeepMerge<
|
|
27
|
-
F,
|
|
28
|
-
S
|
|
29
|
-
> = MergeInsertions<{ [K in keyof F | keyof S] : K extends keyof S & keyof F ? DeepMerge<F[K], S[K]> : K extends keyof S ? S[K] : K extends keyof F ? F[K] : never }>;
|
|
30
|
-
export type DeepPartial<T> = { [P in keyof T]? : DeepPartial<T[P]> };
|
|
1
|
+
export declare type Nullable<T> = T | null | undefined
|
|
2
|
+
export declare type Fn<T = void> = () => T
|
|
3
|
+
export declare type Arrayable<T> = T | Array<T>
|
|
4
|
+
export declare type Constructor<T = void> = new (...args: any[]) => T
|
|
5
|
+
export declare type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void
|
|
6
|
+
? I
|
|
7
|
+
: never
|
|
8
|
+
export declare type MergeInsertions<T> = T extends object ? { [K in keyof T]: MergeInsertions<T[K]> } : T
|
|
9
|
+
export declare type DeepMerge<F, S> = MergeInsertions<{
|
|
10
|
+
[K in keyof F | keyof S]: K extends keyof S & keyof F
|
|
11
|
+
? DeepMerge<F[K], S[K]>
|
|
12
|
+
: K extends keyof S
|
|
13
|
+
? S[K]
|
|
14
|
+
: K extends keyof F
|
|
15
|
+
? F[K]
|
|
16
|
+
: never
|
|
17
|
+
}>
|
|
18
|
+
export declare type DeepPartial<T> = {
|
|
19
|
+
[P in keyof T]?: DeepPartial<T[P]>
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.68.0",
|
|
5
5
|
"description": "The Stacks framework types.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": [
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"@mdit-vue/plugin-component": "^2.1.3",
|
|
48
48
|
"@mdit-vue/plugin-frontmatter": "^2.1.3",
|
|
49
49
|
"@mdit-vue/types": "^2.1.0",
|
|
50
|
-
"@rollup/pluginutils": "^5.1.
|
|
50
|
+
"@rollup/pluginutils": "^5.1.3",
|
|
51
51
|
"@stacksjs/validation": "0.67.0",
|
|
52
52
|
"@types/aws4": "^1.11.6",
|
|
53
|
-
"@types/bun": "^1.1.
|
|
53
|
+
"@types/bun": "^1.1.12",
|
|
54
54
|
"@types/crypto-js": "^4.2.2",
|
|
55
55
|
"@types/fs-extra": "^11.0.4",
|
|
56
56
|
"@types/markdown-it-link-attributes": "^3.0.5",
|
|
@@ -60,20 +60,20 @@
|
|
|
60
60
|
"cac": "^6.7.14",
|
|
61
61
|
"markdown-it": "^14.1.0",
|
|
62
62
|
"meilisearch": "^0.44.1",
|
|
63
|
-
"neverthrow": "^8.
|
|
63
|
+
"neverthrow": "^8.1.1",
|
|
64
64
|
"ora": "^8.1.0",
|
|
65
65
|
"unocss": "0.61.0",
|
|
66
66
|
"unplugin-auto-import": "^0.18.3",
|
|
67
67
|
"unplugin-vue-components": "^0.27.4",
|
|
68
|
-
"vite": "^5.4.
|
|
68
|
+
"vite": "^5.4.10",
|
|
69
69
|
"vite-plugin-inspect": "^0.8.7",
|
|
70
70
|
"vite-plugin-pwa": "^0.20.5",
|
|
71
71
|
"vite-ssg": "^0.23.8",
|
|
72
|
-
"vitepress": "1.4.
|
|
73
|
-
"vue": "^3.5.
|
|
72
|
+
"vitepress": "1.4.1",
|
|
73
|
+
"vue": "^3.5.12"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"aws-cdk-lib": "^2.
|
|
76
|
+
"aws-cdk-lib": "^2.164.1",
|
|
77
77
|
"typescript": "^5.6.3"
|
|
78
78
|
}
|
|
79
79
|
}
|
package/src/cli.ts
CHANGED
|
@@ -362,6 +362,8 @@ export type DomainsOptions = CliOptions & {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
export interface CleanOptions extends CliOptions {}
|
|
365
|
+
|
|
366
|
+
export interface SaasOptions extends CliOptions {}
|
|
365
367
|
export interface CloudCliOptions extends CliOptions {
|
|
366
368
|
ssh?: boolean
|
|
367
369
|
connect?: boolean
|
package/src/cloud.ts
CHANGED
|
@@ -254,13 +254,15 @@ export type CountryCode =
|
|
|
254
254
|
|
|
255
255
|
type Environment = 'development' | 'staging' | 'production'
|
|
256
256
|
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
interface SiteConfig {
|
|
258
|
+
domain: string
|
|
259
|
+
path: string
|
|
260
|
+
}
|
|
259
261
|
|
|
262
|
+
type InfrastuctureOptions = Partial<{
|
|
263
|
+
type: 'serverless' // | 'server' coming soon
|
|
260
264
|
driver: 'aws'
|
|
261
|
-
|
|
262
265
|
api: ApiConfig
|
|
263
|
-
|
|
264
266
|
storage: object
|
|
265
267
|
|
|
266
268
|
/**
|
|
@@ -325,6 +327,16 @@ export interface CloudOptions {
|
|
|
325
327
|
cli: boolean
|
|
326
328
|
docs: boolean
|
|
327
329
|
fileSystem: boolean
|
|
330
|
+
}>
|
|
331
|
+
|
|
332
|
+
export interface CloudOptions {
|
|
333
|
+
sites: {
|
|
334
|
+
root: string
|
|
335
|
+
path: string
|
|
336
|
+
[site: string]: string | SiteConfig
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
infrastructure: InfrastuctureOptions
|
|
328
340
|
}
|
|
329
341
|
|
|
330
342
|
export type CloudConfig = Partial<CloudOptions>
|
package/src/errors.ts
CHANGED
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
|
|
10
10
|
export type CommandError = Error
|
|
11
11
|
|
|
12
|
+
export interface ErrorResponse {
|
|
13
|
+
status: number // HTTP status code
|
|
14
|
+
errors: string | object // Error message(s), which can be a string or an object
|
|
15
|
+
stack?: string // Optional stack trace
|
|
16
|
+
name: string
|
|
17
|
+
message: string
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
export interface ErrorOptions {
|
|
13
21
|
messages: {
|
|
14
22
|
'string': string
|
package/src/index.ts
CHANGED
package/src/model-names.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ModelNames = 'Project' | 'SubscriberEmail' | 'AccessToken' | 'Team' | 'Subscriber' | 'Deployment' | 'Release' | 'User' | 'Post'
|
|
1
|
+
export type ModelNames = 'Project' | 'SubscriberEmail' | 'AccessToken' | 'Team' | 'Subscriber' | 'Deployment' | 'Release' | 'User' | 'Post' | 'Subscription' | 'Error'
|
package/src/model.ts
CHANGED
|
@@ -110,6 +110,7 @@ export interface ModelOptions extends Base {
|
|
|
110
110
|
searchable?: boolean | SearchOptions // useSearch alias
|
|
111
111
|
useApi?: ApiOptions | boolean
|
|
112
112
|
observe?: string[] | boolean
|
|
113
|
+
billable?: boolean
|
|
113
114
|
useActivityLog?: boolean | ActivityLogOption
|
|
114
115
|
}
|
|
115
116
|
|
|
@@ -146,6 +147,10 @@ export interface ModelOptions extends Base {
|
|
|
146
147
|
relationName?: string
|
|
147
148
|
}[]
|
|
148
149
|
|
|
150
|
+
scopes?: {
|
|
151
|
+
[key: string]: (value: any) => any
|
|
152
|
+
}
|
|
153
|
+
|
|
149
154
|
get?: {
|
|
150
155
|
[key: string]: (value: any) => any
|
|
151
156
|
}
|
|
@@ -181,6 +186,7 @@ export interface RelationConfig {
|
|
|
181
186
|
relationModel?: string
|
|
182
187
|
relationTable?: string
|
|
183
188
|
foreignKey: string
|
|
189
|
+
modelKey: string
|
|
184
190
|
relationName?: string
|
|
185
191
|
throughModel?: string
|
|
186
192
|
throughForeignKey?: string
|
package/src/payments.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
import type Stripe from 'stripe'
|
|
2
|
+
|
|
1
3
|
export interface PaymentOptions {
|
|
2
4
|
driver: 'stripe'
|
|
5
|
+
|
|
6
|
+
stripe: {
|
|
7
|
+
publishableKey: string
|
|
8
|
+
secretKey: string
|
|
9
|
+
}
|
|
3
10
|
}
|
|
4
11
|
|
|
5
12
|
export type PaymentConfig = Partial<PaymentOptions>
|
|
@@ -17,6 +24,21 @@ export interface ChargeOptions {
|
|
|
17
24
|
}
|
|
18
25
|
}
|
|
19
26
|
|
|
27
|
+
export interface StripeCustomerOptions {
|
|
28
|
+
address?: {
|
|
29
|
+
line1?: string
|
|
30
|
+
city?: string
|
|
31
|
+
state?: string
|
|
32
|
+
postal_code?: string
|
|
33
|
+
country?: string
|
|
34
|
+
}
|
|
35
|
+
name?: string
|
|
36
|
+
phone?: string
|
|
37
|
+
metadata?: Stripe.Emptyable<Stripe.MetadataParam>
|
|
38
|
+
email?: string
|
|
39
|
+
preferred_locales?: string[]
|
|
40
|
+
}
|
|
41
|
+
|
|
20
42
|
export interface CustomerOptions {
|
|
21
43
|
description?: string
|
|
22
44
|
address?: string
|
|
@@ -63,3 +85,13 @@ export interface EventOptions {
|
|
|
63
85
|
type?: string
|
|
64
86
|
}
|
|
65
87
|
}
|
|
88
|
+
|
|
89
|
+
export interface CheckoutLineItem {
|
|
90
|
+
priceId: string
|
|
91
|
+
quantity: number
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface CheckoutOptions extends Partial<Stripe.Checkout.SessionCreateParams> {
|
|
95
|
+
enableTax?: boolean
|
|
96
|
+
allowPromotions?: boolean
|
|
97
|
+
}
|
package/src/saas.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface SaasOption {
|
|
2
|
+
plans: {
|
|
3
|
+
productName: string
|
|
4
|
+
description: string
|
|
5
|
+
pricing: {
|
|
6
|
+
key: string
|
|
7
|
+
price: number
|
|
8
|
+
interval: 'day' | 'month' | 'week' | 'year'
|
|
9
|
+
currency: string
|
|
10
|
+
}[]
|
|
11
|
+
metadata: {
|
|
12
|
+
createdBy: string
|
|
13
|
+
version: string
|
|
14
|
+
}
|
|
15
|
+
}[]
|
|
16
|
+
webhook: {
|
|
17
|
+
endpoint: string
|
|
18
|
+
secret: string
|
|
19
|
+
}
|
|
20
|
+
currencies: string[]
|
|
21
|
+
coupons: {
|
|
22
|
+
code: string
|
|
23
|
+
amountOff: number
|
|
24
|
+
duration: 'once' | 'repeating' | 'forever'
|
|
25
|
+
}[]
|
|
26
|
+
products: {
|
|
27
|
+
name: string
|
|
28
|
+
description: string
|
|
29
|
+
images: string[]
|
|
30
|
+
}[]
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type SaasConfig = Partial<SaasOption>
|