@stacksjs/types 0.70.86 → 0.70.87

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 (76) hide show
  1. package/package.json +19 -5
  2. package/src/ai.ts +0 -41
  3. package/src/analytics.ts +0 -58
  4. package/src/api.ts +0 -77
  5. package/src/app.ts +0 -189
  6. package/src/attributes.ts +0 -5
  7. package/src/auth.ts +0 -161
  8. package/src/auto-imports.ts +0 -8
  9. package/src/binary.ts +0 -13
  10. package/src/cache.ts +0 -325
  11. package/src/cdn.ts +0 -17
  12. package/src/chat.ts +0 -193
  13. package/src/cli.ts +0 -445
  14. package/src/cloud.ts +0 -381
  15. package/src/cms.ts +0 -14
  16. package/src/commerce.ts +0 -18
  17. package/src/components.ts +0 -62
  18. package/src/configure.ts +0 -13
  19. package/src/cors.ts +0 -86
  20. package/src/cron-jobs.ts +0 -146
  21. package/src/dashboard.ts +0 -218
  22. package/src/database.ts +0 -117
  23. package/src/dependencies.ts +0 -69
  24. package/src/deploy.ts +0 -17
  25. package/src/dns.ts +0 -470
  26. package/src/docs.ts +0 -27
  27. package/src/email.ts +0 -511
  28. package/src/env.ts +0 -1
  29. package/src/errors.ts +0 -110
  30. package/src/events.ts +0 -37
  31. package/src/exit-code.ts +0 -10
  32. package/src/file-systems.ts +0 -70
  33. package/src/git.ts +0 -133
  34. package/src/hashing.ts +0 -127
  35. package/src/helpers.ts +0 -9
  36. package/src/i18n.ts +0 -121
  37. package/src/index.ts +0 -80
  38. package/src/library.ts +0 -911
  39. package/src/logging.ts +0 -62
  40. package/src/manifest.ts +0 -9
  41. package/src/marketing.ts +0 -14
  42. package/src/model-dashboard-augmentation.ts +0 -51
  43. package/src/model-names.ts +0 -1
  44. package/src/model.ts +0 -353
  45. package/src/monitoring.ts +0 -14
  46. package/src/native.ts +0 -0
  47. package/src/notifications.ts +0 -153
  48. package/src/oauth.ts +0 -488
  49. package/src/pages.ts +0 -10
  50. package/src/payments.ts +0 -440
  51. package/src/phone.ts +0 -78
  52. package/src/ports.ts +0 -20
  53. package/src/promise.ts +0 -1
  54. package/src/push.ts +0 -143
  55. package/src/queue.ts +0 -413
  56. package/src/reactivity.ts +0 -1
  57. package/src/realtime.ts +0 -584
  58. package/src/request.ts +0 -541
  59. package/src/response.ts +0 -16
  60. package/src/router.ts +0 -124
  61. package/src/saas.ts +0 -33
  62. package/src/scheduler.ts +0 -1
  63. package/src/search-engine.ts +0 -251
  64. package/src/security.ts +0 -23
  65. package/src/server.ts +0 -16
  66. package/src/services.ts +0 -211
  67. package/src/settings-config.ts +0 -10
  68. package/src/sms.ts +0 -265
  69. package/src/stack-extensions.ts +0 -184
  70. package/src/stacks.ts +0 -339
  71. package/src/storage.ts +0 -173
  72. package/src/table-names.ts +0 -1
  73. package/src/tables.ts +0 -57
  74. package/src/team.ts +0 -8
  75. package/src/ui.ts +0 -197
  76. package/src/utils.ts +0 -46
@@ -1,70 +0,0 @@
1
- /**
2
- * Describes a plain-text file.
3
- */
4
- export interface TextFile {
5
- path: string
6
- data: string
7
- }
8
-
9
- /**
10
- * Describes a JSON file.
11
- */
12
- export interface JsonFile {
13
- path: string
14
- data: unknown
15
- indent: string
16
- newline: string | undefined
17
- }
18
-
19
- /**
20
- * Describes a package.json file.
21
- */
22
- export interface PackageJson {
23
- engines: {
24
- node: string
25
- pnpm: string
26
- }
27
- version: string
28
- packageManager: string
29
- // wip
30
- }
31
-
32
- export interface FileSystemOptions {
33
- default: string
34
- disks: {
35
- local: {
36
- driver: 'local'
37
- root: string
38
- }
39
-
40
- public: {
41
- driver: 'public'
42
- root: string
43
- visibility?: 'public'
44
- }
45
-
46
- private: {
47
- driver: 'private'
48
- root: string
49
- visibility?: 'private'
50
- }
51
-
52
- efs: {
53
- driver: 'local'
54
- root: string
55
- }
56
-
57
- s3: {
58
- driver: 's3'
59
- root: string
60
- }
61
-
62
- [key: string]: {
63
- driver: string
64
- root: string
65
- visibility?: 'public' | 'private'
66
- }
67
- }
68
- }
69
-
70
- export type FileSystemConfig = Partial<FileSystemOptions>
package/src/git.ts DELETED
@@ -1,133 +0,0 @@
1
- /**
2
- * **Git Options**
3
- *
4
- * This configuration defines all of your git options. Because Stacks is fully-typed, you may
5
- * hover any of the options below and the definitions will be provided. In case you
6
- * have any questions, feel free to reach out via Discord or GitHub Discussions.
7
- */
8
- export interface GitOptions {
9
- /**
10
- * **Git Hooks**
11
- *
12
- * The git hooks to use.
13
- *
14
- * @see https://git-scm.com/docs/githooks
15
- * @example
16
- * ```ts
17
- * git: {
18
- * hooks: {
19
- * 'pre-commit': 'lint-staged',
20
- * }
21
- * }
22
- * ```
23
- */
24
- hooks: GitHooks
25
-
26
- /**
27
- * **Git Commit Scopes**
28
- *
29
- * The git commit scopes to use.
30
- *
31
- * @see https://stacksjs.com/docs/git/scopes
32
- * @example
33
- * git: [
34
- * scopes: [
35
- * '', 'ci', 'deps', 'dx', 'release', 'readme', 'test', 'actions', 'build', 'cli',
36
- * 'config', 'examples', 'functions', 'modules', 'views', 'router', 'scripts',
37
- * 'ui', 'utils', 'arrays', 'collections', 'fs', 'objects', 'strings',
38
- * ]
39
- * ]
40
- */
41
- scopes: string[]
42
-
43
- /**
44
- * **Git Commit Types**
45
- *
46
- * The git commit types to use.
47
- *
48
- * @default array
49
- * @see https://stacksjs.com/docs/git/types
50
- * @see https://www.conventionalcommits.org/en/v1.0.0/
51
- * @example
52
- * ```ts
53
- * git: [
54
- * types: [
55
- * 'build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test',
56
- * ]
57
- * ]
58
- * ```
59
- */
60
- types: {
61
- value: string
62
- name: string
63
- emoji: string
64
- }[]
65
-
66
- /**
67
- * **Messages—Options**
68
- *
69
- * The git messages/prompts to use.
70
- *
71
- * @default object
72
- * @example
73
- * ```ts
74
- * messages: {
75
- * type: 'Select the type of change that you’re committing:',
76
- * scope: 'Denote the SCOPE of this change:',
77
- * subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
78
- * body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
79
- * breaking: 'List any BREAKING CHANGES (optional):\n',
80
- * footer: 'List any ISSUES CLOSED by this change (optional). E.g.: #31, #34:\n',
81
- * confirmCommit: 'Are you sure you want to proceed with the commit above?',
82
- * }
83
- * ```
84
- * @see https://stacksjs.com/docs/git/messages
85
- */
86
- messages: {
87
- type: string
88
- scope: string
89
- customScope: string
90
- subject: string
91
- body: string
92
- breaking: string
93
- footerPrefixesSelect: string
94
- customFooterPrefixes: string
95
- footer: string
96
- confirmCommit: string
97
- }
98
- }
99
-
100
- interface Hooks {
101
- 'applypatch-msg'?: string
102
- 'pre-applypatch'?: string
103
- 'post-applypatch'?: string
104
- 'pre-commit'?: string
105
- 'pre-merge-commit'?: string
106
- 'prepare-commit-msg'?: string
107
- 'commit-msg'?: string
108
- 'post-commit'?: string
109
- 'pre-rebase'?: string
110
- 'post-checkout'?: string
111
- 'post-merge'?: string
112
- 'pre-push'?: string
113
- 'pre-receive'?: string
114
- 'update'?: string
115
- 'proc-receive'?: string
116
- 'post-receive'?: string
117
- 'post-update'?: string
118
- 'reference-transaction'?: string
119
- 'push-to-checkout'?: string
120
- 'pre-auto-gc'?: string
121
- 'post-rewrite'?: string
122
- 'sendemail-validate'?: string
123
- 'fsmonitor-watchman'?: string
124
- 'p4-changelist'?: string
125
- 'p4-prepare-changelist'?: string
126
- 'p4-post-changelist'?: string
127
- 'p4-pre-submit'?: string
128
- 'post-index-change'?: string
129
- }
130
-
131
- export type GitConfig = Partial<GitOptions>
132
-
133
- export interface GitHooks extends Hooks {}
package/src/hashing.ts DELETED
@@ -1,127 +0,0 @@
1
- /**
2
- * The Stacks runtime provides secure Bcrypt & Argon2 hashing for storing user passwords.
3
- * If you are using one of the Laravel application starter kits, Bcrypt will be used for
4
- * registration and authentication by default.
5
- *
6
- * Bcrypt is a great choice for hashing passwords because its "work factor" is adjustable, which
7
- * means that the time it takes to generate a hash can be increased as hardware power increases.
8
- * When hashing passwords, slow is good. The longer an algorithm takes to hash a password, the
9
- * longer it takes malicious users to generate "rainbow tables" of all possible string hash
10
- * values that may be used in brute force attacks against applications.
11
- *
12
- * @see https://stacksjs.com/docs/hashing
13
- */
14
- export interface HashingOptions {
15
- /**
16
- * **Hashing Driver**
17
- *
18
- * This option controls the default hash driver that will be used to hash
19
- * passwords for your application. By default, the bcrypt algorithm is
20
- * used; however, you remain free to modify this option if you wish.
21
- *
22
- * @see https://stacksjs.com/docs/hashing
23
- */
24
- driver: 'argon2' | 'argon2id' | 'argon2i' | 'argon2d' | 'bcrypt'
25
-
26
- /**
27
- * **Bcrypt Option**
28
- *
29
- * Here you may specify the configuration options that should be used when
30
- * passwords are hashed using the Bcrypt algorithm. This will allow you
31
- * to control the amount of time it takes to hash the given password.
32
- *
33
- * @see https://stacksjs.com/docs/hashing
34
- */
35
- bcrypt?: BcryptOptions
36
-
37
- /**
38
- * **Argon Options**
39
- *
40
- * Here you may specify the configuration options that should be used when
41
- * passwords are hashed using the Argon algorithm. These will allow you
42
- * to control the amount of time it takes to hash the given password.
43
- *
44
- * @see https://stacksjs.com/docs/hashing
45
- */
46
- argon2?: ArgonOptions
47
- }
48
-
49
- export type HashingConfig = Partial<HashingOptions>
50
-
51
- /**
52
- * **Bcrypt Options**
53
- *
54
- * Here you may specify the configuration options that should be used when
55
- * passwords are hashed using the Bcrypt algorithm. This will allow you
56
- * to control the amount of time it takes to hash the given password.
57
- *
58
- * @see https://stacksjs.com/docs/hashing
59
- */
60
- export interface BcryptOptions {
61
- /**
62
- * Bcrypt rounds (cost factor).
63
- * This is a number between 4-31.
64
- * Higher values = more secure but slower.
65
- * Laravel default: 10-12
66
- *
67
- * @default 12
68
- * @see https://stacksjs.com/docs/hashing
69
- */
70
- rounds: number
71
- }
72
-
73
- /**
74
- * **Argon Options**
75
- *
76
- * Here you may specify the configuration options that should be used when
77
- * passwords are hashed using the Argon algorithm. These will allow you
78
- * to control the amount of time it takes to hash the given password.
79
- *
80
- * @see https://stacksjs.com/docs/hashing
81
- */
82
- export interface ArgonOptions {
83
- /**
84
- * **Argon Memory**
85
- *
86
- * Amount of memory (in kibibytes) to use.
87
- *
88
- * @default number 65536
89
- * @see https://stacksjs.com/docs/hashing
90
- */
91
- memory?: number
92
-
93
- // /**
94
- // * **Argon Parallelism**
95
- // *
96
- // * Degree of parallelism (i.e. number of threads).
97
- // *
98
- // * @default number 1
99
- // * @see https://stacksjs.com/docs/hashing
100
- // */
101
- // threads?: number
102
-
103
- /**
104
- * **Argon time**
105
- *
106
- * Execution time.
107
- *
108
- * @default number 1
109
- * @see https://stacksjs.com/docs/hashing
110
- */
111
- time?: number
112
- }
113
-
114
- export type HashAlgorithm =
115
- | 'md4'
116
- | 'md5'
117
- | 'sha1'
118
- | 'sha256'
119
- | 'sha384'
120
- | 'sha512'
121
- | 'ripemd128'
122
- | 'ripemd160'
123
- | 'tiger128'
124
- | 'tiger160'
125
- | 'tiger192'
126
- | 'crc32'
127
- | 'crc32b'
package/src/helpers.ts DELETED
@@ -1,9 +0,0 @@
1
- import { toString } from '@stacksjs/strings'
2
-
3
- export function getTypeName(v: any): string {
4
- if (v === null)
5
- return 'null'
6
- const type = toString(v).slice(8, -1).toLowerCase()
7
-
8
- return typeof v === 'object' || typeof v === 'function' ? type : typeof v
9
- }
package/src/i18n.ts DELETED
@@ -1,121 +0,0 @@
1
- /**
2
- * Vite plugin options for Vue I18n
3
- */
4
- interface VitePluginVueI18nOptions {
5
- forceStringify?: boolean
6
- runtimeOnly?: boolean
7
- compositionOnly?: boolean
8
- fullInstall?: boolean
9
- include?: string | string[]
10
- defaultSFCLang?: 'json' | 'json5' | 'yml' | 'yaml'
11
- globalSFCScope?: boolean
12
- useVueI18nImportName?: boolean
13
- }
14
-
15
- /**
16
- * Translation messages - can be nested objects or strings
17
- */
18
- export type TranslationMessages = {
19
- [key: string]: string | TranslationMessages
20
- }
21
-
22
- /**
23
- * All translations keyed by locale
24
- */
25
- export type Translations = {
26
- [locale: string]: TranslationMessages
27
- }
28
-
29
- /**
30
- * Date/time format configurations per locale
31
- */
32
- export type DateTimeFormats = {
33
- [locale: string]: {
34
- [formatName: string]: Intl.DateTimeFormatOptions
35
- }
36
- }
37
-
38
- /**
39
- * Number format configurations per locale
40
- */
41
- export type NumberFormats = {
42
- [locale: string]: {
43
- [formatName: string]: Intl.NumberFormatOptions
44
- }
45
- }
46
-
47
- /**
48
- * **Internationalization Options**
49
- *
50
- * Configuration for the i18n system.
51
- */
52
- export interface I18nOptions {
53
- /**
54
- * Default locale
55
- * @default 'en'
56
- */
57
- locale: string
58
-
59
- /**
60
- * Fallback locale when translation is not found
61
- * @default 'en'
62
- */
63
- fallbackLocale: string
64
-
65
- /**
66
- * Available locales
67
- */
68
- availableLocales?: string[]
69
-
70
- /**
71
- * Directory containing translation files
72
- * @default 'lang'
73
- */
74
- langDir?: string
75
-
76
- /**
77
- * Initial translations
78
- */
79
- messages?: Translations
80
-
81
- /**
82
- * Whether to warn about missing translations in development
83
- * @default true
84
- */
85
- warnMissing?: boolean
86
-
87
- /**
88
- * Separator for nested keys
89
- * @default '.'
90
- */
91
- keySeparator?: string
92
-
93
- /**
94
- * Plural separator
95
- * @default '|'
96
- */
97
- pluralSeparator?: string
98
-
99
- /**
100
- * Date/time formatting options
101
- */
102
- dateTimeFormats?: DateTimeFormats
103
-
104
- /**
105
- * Number formatting options
106
- */
107
- numberFormats?: NumberFormats
108
-
109
- /**
110
- * Vite plugin options
111
- */
112
- vite?: VitePluginVueI18nOptions
113
- }
114
-
115
- export type I18nConfig = Partial<I18nOptions>
116
-
117
- /**
118
- * Legacy alias
119
- * @deprecated Use I18nOptions instead
120
- */
121
- export type i18nOptions = VitePluginVueI18nOptions
package/src/index.ts DELETED
@@ -1,80 +0,0 @@
1
- export * from './ai'
2
- export * from './analytics'
3
- export * from './api'
4
- export * from './app'
5
- export * from './attributes'
6
- export * from './auth'
7
- export * from './oauth'
8
- export * from './auto-imports'
9
- export * from './binary'
10
- // `./build` removed — exposed `vite` / `vite-ssg` types we no longer use
11
- // (Stacks builds with Bun). The same applies to `./inspect`, `./pwa`,
12
- // `./ssg`, and `./layout` which all wrapped vite-* plugins.
13
- export * from './cache'
14
- export * from './cdn'
15
- export * from './chat'
16
- export * from './cli'
17
- export * from './cloud'
18
- export * from './cms'
19
- export * from './commerce'
20
- export * from './components'
21
- export * from './configure'
22
- export * from './cors'
23
- export * from './cron-jobs'
24
- export * from './dashboard'
25
- // Module-augments bun-query-builder's BrowserModelDefinition with the
26
- // stacks `dashboard` slot. Importing this file (transitively via the
27
- // barrel) is what makes `defineModel({ dashboard: {...} })` typecheck.
28
- export * from './model-dashboard-augmentation'
29
- export * from './database'
30
- export * from './dependencies'
31
- export * from './deploy'
32
- export * from './dns'
33
- export * from './docs'
34
- export * from './email'
35
- export * from './env'
36
- export * from './errors'
37
- export * from './events'
38
- export * from './exit-code'
39
- export * from './file-systems'
40
- export * from './git'
41
- export * from './hashing'
42
- export * from './helpers'
43
- export * from './i18n'
44
- export * from './library'
45
- export * from './logging'
46
- export * from './manifest'
47
- export * from './marketing'
48
- export * from './model'
49
- export * from './model-names'
50
- export * from './monitoring'
51
- export * from './notifications'
52
- export * from './pages'
53
- export * from './payments'
54
- export * from './phone'
55
- export * from './ports'
56
- export * from './promise'
57
- export * from './push'
58
- export * from './queue'
59
- export * from './reactivity'
60
- export * from './realtime'
61
- export * from './request'
62
- export * from './response'
63
- export * from './router'
64
- export * from './saas'
65
- export * from './scheduler'
66
- export * from './search-engine'
67
- export * from './security'
68
- export * from './server'
69
- export * from './services'
70
- export * from './settings-config.ts'
71
- export * from './sms'
72
- export * from './stack-extensions'
73
- export * from './stacks'
74
- export * from './storage'
75
- export * from './table-names'
76
- export * from './tables'
77
- export * from './team'
78
- export * from './ui'
79
-
80
- export * from './utils'