stacks 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/core/actions/dist/src/build.js +18 -26
- package/core/actions/dist/src/bump.js +9 -3
- package/core/actions/dist/src/changelog.js +11 -3
- package/core/actions/dist/src/dev/index.js +18 -26
- package/core/actions/dist/src/generate/index.js +18 -26
- package/core/actions/dist/src/helpers/index.js +18 -26
- package/core/actions/dist/src/helpers/utils.js +18 -26
- package/core/actions/dist/src/index.js +35 -37
- package/core/actions/dist/src/lint/fix.js +3 -2
- package/core/actions/dist/src/release.js +39 -38
- package/core/actions/dist/src/upgrade/index.js +18 -26
- package/core/actions/dist/src/upgrade.js +1 -1
- package/core/actions/package.json +1 -1
- package/core/actions/src/action.ts +11 -3
- package/core/actions/src/bump.ts +13 -6
- package/core/actions/src/changelog.ts +14 -4
- package/core/actions/src/helpers/utils.ts +24 -36
- package/core/actions/src/lint/fix.ts +3 -2
- package/core/actions/src/release.ts +4 -1
- package/core/ai/dist/index.js +31 -29
- package/core/ai/package.json +3 -3
- package/core/alias/package.json +1 -1
- package/core/analytics/package.json +1 -1
- package/core/api/dist/index.js +6 -3
- package/core/api/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/buddy/dist/chunk-59a9de11428ba763.js +993 -0
- package/core/buddy/dist/{chunk-e9c0ec1a3b7be088.js → chunk-7b24d1e3e585766e.js} +594 -563
- package/core/buddy/dist/cli.js +3916 -19
- package/core/buddy/dist/index.js +2 -5
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/cli.ts +91 -17
- package/core/buddy/src/commands/add.ts +3 -0
- package/core/buddy/src/commands/build.ts +42 -27
- package/core/buddy/src/commands/changelog.ts +13 -6
- package/core/buddy/src/commands/clean.ts +3 -1
- package/core/buddy/src/commands/cloud.ts +14 -2
- package/core/buddy/src/commands/commit.ts +2 -0
- package/core/buddy/src/commands/configure.ts +6 -3
- package/core/buddy/src/commands/create.ts +3 -1
- package/core/buddy/src/commands/deploy.ts +3 -1
- package/core/buddy/src/commands/dev.ts +50 -36
- package/core/buddy/src/commands/dns.ts +7 -1
- package/core/buddy/src/commands/domains.ts +7 -1
- package/core/buddy/src/commands/fresh.ts +4 -2
- package/core/buddy/src/commands/generate.ts +36 -26
- package/core/buddy/src/commands/http.ts +6 -4
- package/core/buddy/src/commands/index.ts +0 -2
- package/core/buddy/src/commands/install.ts +3 -1
- package/core/buddy/src/commands/key.ts +2 -0
- package/core/buddy/src/commands/lint.ts +4 -0
- package/core/buddy/src/commands/list.ts +6 -2
- package/core/buddy/src/commands/make.ts +52 -30
- package/core/buddy/src/commands/migrate.ts +6 -2
- package/core/buddy/src/commands/prepublish.ts +3 -0
- package/core/buddy/src/commands/release.ts +12 -2
- package/core/buddy/src/commands/seed.ts +3 -1
- package/core/buddy/src/commands/setup.ts +16 -8
- package/core/buddy/src/commands/tinker.ts +3 -1
- package/core/buddy/src/commands/types.ts +4 -2
- package/core/buddy/src/commands/upgrade.ts +37 -25
- package/core/buddy/src/commands/version.ts +7 -0
- package/core/build/package.json +1 -1
- package/core/bun-create/bud/package.json +1 -1
- package/core/bun-create/buddy/package.json +1 -1
- package/core/bun-create/stack/package.json +1 -1
- package/core/bun-create/stacks/package.json +1 -1
- package/core/bun-create/stx/package.json +1 -1
- package/core/bun-plugin-yaml/package.json +1 -1
- package/core/cache/package.json +2 -2
- package/core/chat/package.json +8 -8
- package/core/cli/dist/index.js +462 -87
- package/core/cli/package.json +1 -1
- package/core/cli/src/cli.ts +9 -31
- package/core/cli/src/console.ts +1 -1
- package/core/cli/src/exec.ts +28 -14
- package/core/cli/src/helpers.ts +3 -3
- package/core/cli/src/index.ts +1 -1
- package/core/cli/src/parse.ts +95 -17
- package/core/cli/src/run.ts +7 -7
- package/core/cli/src/utils.ts +62 -0
- package/core/cloud/dist/index.js +70 -41
- package/core/cloud/package.json +32 -32
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package-lock.json +6 -6
- package/core/cloud/src/cloud/aws-sdk-layer/nodejs/package.json +2 -2
- package/core/cloud/src/cloud/queue.ts +96 -55
- package/core/cloud/src/cloud/router-layer/nodejs/package.json +2 -2
- package/core/collections/package.json +1 -1
- package/core/config/dist/index.js +49 -27
- package/core/config/package.json +1 -1
- package/core/config/src/config.ts +1 -1
- package/core/config/src/defaults.ts +28 -14
- package/core/config/src/overrides.ts +2 -0
- package/core/database/package.json +1 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/package.json +9 -9
- package/core/development/package.json +1 -1
- package/core/dns/package.json +7 -7
- package/core/docs/package.json +1 -1
- package/core/email/package.json +14 -14
- package/core/enums/dist/index.js +2 -2
- package/core/enums/package.json +1 -1
- package/core/enums/src/index.ts +2 -2
- package/core/env/package.json +3 -2
- package/core/env/src/utils.ts +1 -0
- package/core/error-handling/package.json +1 -1
- package/core/eslint-config/package.json +10 -10
- package/core/events/package.json +1 -1
- package/core/faker/package.json +2 -2
- package/core/git/package.json +1 -1
- package/core/health/package.json +1 -1
- package/core/http/package.json +1 -1
- package/core/lint/package.json +1 -1
- package/core/logging/build.ts +1 -1
- package/core/logging/dist/index.js +10932 -1773
- package/core/logging/package.json +1 -1
- package/core/logging/src/index.ts +79 -13
- package/core/notifications/package.json +23 -23
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +1 -1
- package/core/path/dist/index.js +10 -0
- package/core/path/package.json +1 -1
- package/core/path/src/index.ts +10 -0
- package/core/payments/dist/index.js +34 -10
- package/core/payments/package.json +2 -2
- package/core/push/package.json +5 -5
- package/core/query-builder/package.json +1 -1
- package/core/queue/dist/index.js +3 -1
- package/core/queue/package.json +1 -1
- package/core/queue/src/index.ts +3 -1
- package/core/raycast/package.json +1 -1
- package/core/realtime/package.json +1 -1
- package/core/repl/package.json +1 -1
- package/core/router/dist/index.js +517 -14
- package/core/router/package.json +1 -1
- package/core/router/src/router.ts +10 -3
- package/core/scheduler/dist/index.js +4 -0
- package/core/scheduler/package.json +1 -1
- package/core/scheduler/src/index.ts +1 -0
- package/core/scheduler/src/schedule.ts +5 -0
- package/core/search-engine/package.json +1 -1
- package/core/security/package.json +1 -1
- package/core/server/package.json +2 -2
- package/core/signals/package.json +1 -1
- package/core/slug/package.json +1 -1
- package/core/sms/package.json +11 -11
- package/core/storage/package.json +1 -1
- package/core/strings/package.json +1 -1
- package/core/tables/package.json +2 -2
- package/core/testing/package.json +1 -1
- package/core/tinker/package.json +1 -1
- package/core/tunnel/package.json +1 -1
- package/core/types/dist/index.js +1787 -6
- package/core/types/package.json +7 -7
- package/core/types/src/ai.ts +1 -0
- package/core/types/src/binary.ts +1 -0
- package/core/types/src/cli.ts +13 -3
- package/core/types/src/cron-jobs.ts +6 -1
- package/core/types/src/docs.ts +5 -1
- package/core/types/src/index.ts +1 -0
- package/core/types/src/logger.ts +54 -0
- package/core/types/src/router.ts +2 -1
- package/core/types/src/stacks.ts +10 -0
- package/core/types/src/team.ts +1 -1
- package/core/ui/package.json +6 -6
- package/core/utils/dist/index.js +39 -2
- package/core/utils/package.json +2 -2
- package/core/utils/src/hash.ts +10 -1
- package/core/utils/src/index.ts +1 -0
- package/core/utils/src/retry.ts +33 -0
- package/core/validation/package.json +1 -1
- package/core/vite/dist/index.js +1 -1
- package/core/vite/package.json +4 -4
- package/core/whois/package.json +1 -1
- package/core/x-ray/package.json +1 -1
- package/core/zsh-buddy/buddy.plugin.zsh +4 -0
- package/core/zsh-buddy/package.json +1 -1
- package/ide/dictionary.txt +1 -0
- package/ide/vscode/package.json +1 -1
- package/package.json +1 -1
- package/core/buddy/src/commands/example.ts +0 -66
- package/core/buddy/src/commands/inspire.ts +0 -24
- package/core/cli/src/utilities.ts +0 -2
package/core/types/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",
|
|
@@ -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.
|
|
54
|
+
"@novu/stateless": "^0.23.1",
|
|
55
55
|
"@rollup/pluginutils": "^5.1.0",
|
|
56
56
|
"@stacksjs/validation": "workspace:*",
|
|
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.
|
|
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/core/types/src/ai.ts
CHANGED
package/core/types/src/binary.ts
CHANGED
package/core/types/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 { }
|
|
@@ -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
|
-
|
|
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/core/types/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/core/types/src/index.ts
CHANGED
|
@@ -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/core/types/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/core/types/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/core/types/src/team.ts
CHANGED
package/core/ui/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.59",
|
|
5
5
|
"description": "The Stacks UI engine.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -58,22 +58,22 @@
|
|
|
58
58
|
"prepublishOnly": "bun --bun run build"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@headlessui/vue": "^1.7.
|
|
61
|
+
"@headlessui/vue": "^1.7.19",
|
|
62
62
|
"@stacksjs/build": "workspace:*",
|
|
63
63
|
"@stacksjs/config": "workspace:*",
|
|
64
64
|
"@stacksjs/router": "workspace:*",
|
|
65
65
|
"pinia": "^2.1.7",
|
|
66
66
|
"unocss": "^0.58.5",
|
|
67
67
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
68
|
-
"vue": "^3.4.
|
|
68
|
+
"vue": "^3.4.18",
|
|
69
69
|
"vue-tsc": "^1.8.27"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@headlessui/vue": "^1.7.
|
|
72
|
+
"@headlessui/vue": "^1.7.19",
|
|
73
73
|
"@iconify-json/heroicons": "^1.1.19",
|
|
74
74
|
"@iconify-json/heroicons-outline": "^1.1.10",
|
|
75
75
|
"@iconify-json/heroicons-solid": "^1.1.11",
|
|
76
|
-
"@iconify/json": "^2.2.
|
|
76
|
+
"@iconify/json": "^2.2.181",
|
|
77
77
|
"@julr/unocss-preset-forms": "^0.1.0",
|
|
78
78
|
"@stacksjs/build": "workspace:*",
|
|
79
79
|
"@stacksjs/config": "workspace:*",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"unocss": "^0.58.5",
|
|
85
85
|
"unocss-preset-primitives": "0.0.2-beta.0",
|
|
86
86
|
"vite-plugin-vue-layouts": "^0.11.0",
|
|
87
|
-
"vue": "^3.4.
|
|
87
|
+
"vue": "^3.4.18",
|
|
88
88
|
"vue-tsc": "^1.8.27"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
package/core/utils/dist/index.js
CHANGED
|
@@ -147,7 +147,13 @@ function isTruthy(v) {
|
|
|
147
147
|
import {hashPaths} from "@stacksjs/storage";
|
|
148
148
|
import {path as p2} from "@stacksjs/path";
|
|
149
149
|
import {config as config2} from "@stacksjs/config";
|
|
150
|
-
var originRequestFunctionHash
|
|
150
|
+
var originRequestFunctionHash;
|
|
151
|
+
try {
|
|
152
|
+
originRequestFunctionHash = hashPaths(p2.cloudPath("src/edge"));
|
|
153
|
+
} catch (error) {
|
|
154
|
+
console.error("Are we in a Docker container? Failed to hash paths:", error);
|
|
155
|
+
originRequestFunctionHash = null;
|
|
156
|
+
}
|
|
151
157
|
var docsSrc = [
|
|
152
158
|
p2.projectPath("docs"),
|
|
153
159
|
p2.projectPath("config/docs.ts")
|
|
@@ -487,6 +493,36 @@ var createRegExp = (...inputs) => {
|
|
|
487
493
|
const flags = inputs.length > 1 && (Array.isArray(inputs[inputs.length - 1]) || inputs[inputs.length - 1] instanceof Set) ? inputs.pop() : undefined;
|
|
488
494
|
return new RegExp(exactly(...inputs).toString(), [...flags || ""].join(""));
|
|
489
495
|
};
|
|
496
|
+
// src/retry.ts
|
|
497
|
+
function retry(fn, options) {
|
|
498
|
+
const { retries = 3, initialDelay = 1000, backoffFactor = 2, jitter = true } = options;
|
|
499
|
+
return new Promise((resolve, reject) => {
|
|
500
|
+
let attemptCount = 0;
|
|
501
|
+
const attempt = async () => {
|
|
502
|
+
try {
|
|
503
|
+
resolve(await fn());
|
|
504
|
+
} catch (err2) {
|
|
505
|
+
if (attemptCount >= retries) {
|
|
506
|
+
reject(err2);
|
|
507
|
+
} else {
|
|
508
|
+
const delay = calculateDelay(attemptCount, initialDelay, backoffFactor, jitter);
|
|
509
|
+
setTimeout(() => attempt(), delay);
|
|
510
|
+
attemptCount++;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
attempt();
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
var calculateDelay = function(attemptCount, initialDelay, backoffFactor, jitter) {
|
|
518
|
+
let delay = initialDelay * backoffFactor ** attemptCount;
|
|
519
|
+
if (jitter) {
|
|
520
|
+
const random = Math.random();
|
|
521
|
+
const jitterValue = delay * 0.3;
|
|
522
|
+
delay = delay + jitterValue * (random - 0.5) * 2;
|
|
523
|
+
}
|
|
524
|
+
return delay;
|
|
525
|
+
};
|
|
490
526
|
// src/sleep.ts
|
|
491
527
|
function sleep(ms) {
|
|
492
528
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -884,7 +920,7 @@ function prettyBytes(number, options) {
|
|
|
884
920
|
return prefix + numberString + separator + unit;
|
|
885
921
|
}
|
|
886
922
|
// package.json
|
|
887
|
-
var version = "0.58.
|
|
923
|
+
var version = "0.58.59";
|
|
888
924
|
export {
|
|
889
925
|
wordChar,
|
|
890
926
|
wordBoundary,
|
|
@@ -1102,6 +1138,7 @@ export {
|
|
|
1102
1138
|
setEnvValue,
|
|
1103
1139
|
runNpmScript,
|
|
1104
1140
|
rimraf,
|
|
1141
|
+
retry,
|
|
1105
1142
|
resolveUnref,
|
|
1106
1143
|
resolveRef,
|
|
1107
1144
|
renderHeadToString,
|
package/core/utils/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.59",
|
|
5
5
|
"description": "The Stacks helper functions.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"build": "bun --bun build.ts",
|
|
50
50
|
"typecheck": "bun --bun tsc --noEmit",
|
|
51
51
|
"prepublishOnly": "bun --bun run build",
|
|
52
|
-
"size": "
|
|
52
|
+
"size": "bun scripts/export-size.ts"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@stacksjs/actions": "workspace:*",
|
package/core/utils/src/hash.ts
CHANGED
|
@@ -2,7 +2,16 @@ import { hashPaths } from '@stacksjs/storage'
|
|
|
2
2
|
import { path as p } from '@stacksjs/path'
|
|
3
3
|
import { config } from '@stacksjs/config'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// eslint-disable-next-line import/no-mutable-exports
|
|
6
|
+
let originRequestFunctionHash
|
|
7
|
+
try {
|
|
8
|
+
originRequestFunctionHash = hashPaths(p.cloudPath('src/edge'))
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
console.error('Are we in a Docker container? Failed to hash paths:', error)
|
|
12
|
+
originRequestFunctionHash = null // or some default/fallback value
|
|
13
|
+
}
|
|
14
|
+
export { originRequestFunctionHash }
|
|
6
15
|
|
|
7
16
|
const docsSrc = [
|
|
8
17
|
p.projectPath('docs'),
|
package/core/utils/src/index.ts
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function retry(fn, options) {
|
|
2
|
+
const { retries = 3, initialDelay = 1000, backoffFactor = 2, jitter = true } = options
|
|
3
|
+
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
let attemptCount = 0
|
|
6
|
+
const attempt = async () => {
|
|
7
|
+
try {
|
|
8
|
+
resolve(await fn())
|
|
9
|
+
}
|
|
10
|
+
catch (err) {
|
|
11
|
+
if (attemptCount >= retries) {
|
|
12
|
+
reject(err)
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
const delay = calculateDelay(attemptCount, initialDelay, backoffFactor, jitter)
|
|
16
|
+
setTimeout(() => attempt(), delay)
|
|
17
|
+
attemptCount++
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
attempt()
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function calculateDelay(attemptCount, initialDelay, backoffFactor, jitter) {
|
|
26
|
+
let delay = initialDelay * backoffFactor ** attemptCount
|
|
27
|
+
if (jitter) {
|
|
28
|
+
const random = Math.random() // Generates a number between 0 and 1
|
|
29
|
+
const jitterValue = delay * 0.3 // Jitter will be up to 30% of the delay
|
|
30
|
+
delay = delay + jitterValue * (random - 0.5) * 2 // Adjust delay randomly within ±30%
|
|
31
|
+
}
|
|
32
|
+
return delay
|
|
33
|
+
}
|
package/core/vite/dist/index.js
CHANGED
|
@@ -609,7 +609,7 @@ var web_components_default = defineConfig6(({ command }) => {
|
|
|
609
609
|
// src/plugin/docs.ts
|
|
610
610
|
import {kolorist as c2} from "@stacksjs/cli";
|
|
611
611
|
// package.json
|
|
612
|
-
var version = "0.58.
|
|
612
|
+
var version = "0.58.59";
|
|
613
613
|
|
|
614
614
|
// src/plugin/docs.ts
|
|
615
615
|
var docsEngine = {
|
package/core/vite/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.59",
|
|
5
5
|
"description": "The Stacks Vite plugin.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -101,16 +101,16 @@
|
|
|
101
101
|
"@stacksjs/storage": "workspace:*",
|
|
102
102
|
"@stacksjs/types": "workspace:*",
|
|
103
103
|
"@stacksjs/utils": "workspace:*",
|
|
104
|
-
"@vitejs/plugin-vue": "^5.0.
|
|
104
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
105
105
|
"markdown-it-link-attributes": "^4.0.1",
|
|
106
106
|
"markdown-it-shiki": "^0.9.0",
|
|
107
107
|
"unplugin-auto-import": "^0.17.5",
|
|
108
108
|
"unplugin-vue-components": "^0.26.0",
|
|
109
|
-
"vite": "^5.
|
|
109
|
+
"vite": "^5.1.1",
|
|
110
110
|
"vite-plugin-full-reload": "^1.1.0",
|
|
111
111
|
"vite-plugin-inspect": "^0.8.3",
|
|
112
112
|
"vite-plugin-pages": "^0.32.0",
|
|
113
|
-
"vite-plugin-pwa": "^0.
|
|
113
|
+
"vite-plugin-pwa": "^0.18.1",
|
|
114
114
|
"vite-plugin-vue-markdown": "^0.23.8",
|
|
115
115
|
"vite-ssg": "^0.23.6",
|
|
116
116
|
"vite-ssg-sitemap": "^0.6.1"
|
package/core/whois/package.json
CHANGED
package/core/x-ray/package.json
CHANGED
package/ide/dictionary.txt
CHANGED
package/ide/vscode/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import process from 'node:process'
|
|
2
|
-
import { ExitCode } from '@stacksjs/types'
|
|
3
|
-
import type { CLI, ExamplesOptions } from '@stacksjs/types'
|
|
4
|
-
import { runExample } from '@stacksjs/actions'
|
|
5
|
-
|
|
6
|
-
export function example(buddy: CLI) {
|
|
7
|
-
const descriptions = {
|
|
8
|
-
example: 'Which example do you want to see?',
|
|
9
|
-
components: 'Test your libraries against your built bundle',
|
|
10
|
-
vue: 'Test your Vue component library',
|
|
11
|
-
webComponents: 'Test your web component library',
|
|
12
|
-
select: 'Which example are you trying to view?',
|
|
13
|
-
project: 'Target a specific project',
|
|
14
|
-
verbose: 'Enable verbose output',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
buddy
|
|
18
|
-
.command('example', descriptions.example)
|
|
19
|
-
.option('-c, --components', descriptions.components)
|
|
20
|
-
.option('-v, --vue', descriptions.vue)
|
|
21
|
-
.option('-w, --web-components', descriptions.webComponents)
|
|
22
|
-
.option('-p, --project', descriptions.project, { default: false })
|
|
23
|
-
.option('--verbose', descriptions.verbose, { default: false })
|
|
24
|
-
.action(async (options: ExamplesOptions) => {
|
|
25
|
-
// const answer = await prompt.require()
|
|
26
|
-
// .select(descriptions.select, {
|
|
27
|
-
// options: [
|
|
28
|
-
// { value: 'components', label: 'Vue Components' },
|
|
29
|
-
// { value: 'web-components', label: 'Web Components' },
|
|
30
|
-
// ],
|
|
31
|
-
// })
|
|
32
|
-
|
|
33
|
-
// if (answer === 'components')
|
|
34
|
-
// await componentExample(options)
|
|
35
|
-
// else if (answer === 'web-components')
|
|
36
|
-
// await webComponentExample(options)
|
|
37
|
-
// else process.exit(ExitCode.InvalidArgument)
|
|
38
|
-
|
|
39
|
-
await runExample(options)
|
|
40
|
-
process.exit(ExitCode.Success)
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
buddy
|
|
44
|
-
.command('example:vue', descriptions.vue)
|
|
45
|
-
.option('-v, --vue', descriptions.verbose, { default: true })
|
|
46
|
-
.option('-p, --project', descriptions.project, { default: false })
|
|
47
|
-
.option('--verbose', descriptions.verbose, { default: false })
|
|
48
|
-
.alias('example:components')
|
|
49
|
-
.action(async (options: ExamplesOptions) => {
|
|
50
|
-
await runExample(options)
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
buddy
|
|
54
|
-
.command('example:web-components', 'Test your Web Component library.')
|
|
55
|
-
.option('-w, --web-components', descriptions.verbose, { default: true })
|
|
56
|
-
.option('-p, --project', descriptions.project, { default: false })
|
|
57
|
-
.option('--verbose', descriptions.verbose, { default: false })
|
|
58
|
-
.action(async (options: ExamplesOptions) => {
|
|
59
|
-
await runExample(options)
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
buddy.on('example:*', () => {
|
|
63
|
-
console.error('Invalid command: %s\nSee --help for a list of available commands.', buddy.args.join(' '))
|
|
64
|
-
process.exit(1)
|
|
65
|
-
})
|
|
66
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import process from 'node:process'
|
|
2
|
-
import { ExitCode } from '@stacksjs/types'
|
|
3
|
-
import type { CLI } from '@stacksjs/types'
|
|
4
|
-
import { runAction } from '@stacksjs/actions'
|
|
5
|
-
import { intro, outro } from '@stacksjs/cli'
|
|
6
|
-
import { Action } from '@stacksjs/enums'
|
|
7
|
-
|
|
8
|
-
export function inspire(buddy: CLI) {
|
|
9
|
-
buddy
|
|
10
|
-
.command('inspire', 'Inspire yourself with a random quote')
|
|
11
|
-
.option('--two', 'Show two quotes', { default: false })
|
|
12
|
-
.action(async () => {
|
|
13
|
-
const perf = await intro('buddy inspire')
|
|
14
|
-
const result = await runAction(Action.Inspire)
|
|
15
|
-
|
|
16
|
-
if (result.isErr()) {
|
|
17
|
-
await outro('While running the inspire command, there was an issue', { startTime: perf, useSeconds: true }, result.error)
|
|
18
|
-
process.exit()
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
await outro('Your quote is: ...', { startTime: perf, useSeconds: true })
|
|
22
|
-
process.exit(ExitCode.Success)
|
|
23
|
-
})
|
|
24
|
-
}
|