stacks 0.52.0 → 0.52.1
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/auto-imports.d.ts +1595 -651
- package/components.d.ts +4 -2
- package/core/actions/build.config.ts +2 -0
- package/core/actions/package.json +14 -2
- package/core/actions/src/clean.ts +9 -12
- package/core/actions/src/deploy/domains.ts +1 -1
- package/core/actions/src/helpers/package-json.ts +1 -2
- package/core/actions/src/helpers/utils.ts +1 -2
- package/core/actions/src/release.ts +1 -1
- package/core/actions/src/tinker.ts +1 -0
- package/core/ai/build.config.ts +2 -0
- package/core/ai/package.json +1 -1
- package/core/alias/build.config.ts +2 -0
- package/core/alias/package.json +1 -2
- package/core/analytics/build.config.ts +2 -0
- package/core/analytics/package.json +1 -1
- package/core/arrays/build.config.ts +2 -0
- package/core/arrays/package.json +1 -1
- package/core/auth/build.config.ts +2 -0
- package/core/auth/package.json +1 -1
- package/core/auth/src/index.ts +1 -3
- package/core/buddy/README.md +1 -1
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/commands/clean.ts +2 -3
- package/core/buddy/src/commands/dev.ts +2 -1
- package/core/buddy/src/commands/fresh.ts +2 -2
- package/core/buddy/src/commands/release.ts +4 -12
- package/core/buddy/src/commands/seed.ts +14 -14
- package/core/buddy/src/commands/test.ts +25 -25
- package/core/buddy/src/commands/upgrade.ts +5 -5
- package/core/buddy/src/commands/version.ts +25 -16
- package/core/build/build.config.ts +2 -0
- package/core/build/node_modules/.bin/vite +4 -4
- package/core/build/node_modules/.bin/vite-ssg +4 -4
- package/core/build/node_modules/.bin/vue-docgen-web-types +4 -4
- package/core/build/package.json +5 -5
- package/core/build/src/stacks.ts +8 -14
- package/core/build/src/vue-components.ts +6 -4
- package/core/cache/build.config.ts +2 -0
- package/core/cache/package.json +2 -2
- package/core/chat/build.config.ts +2 -0
- package/core/chat/package.json +6 -6
- package/core/cli/package.json +1 -1
- package/core/cli/src/actions/install.ts +20 -2
- package/core/cli/src/helpers.ts +6 -1
- package/core/cli/src/run.ts +5 -8
- package/core/cloud/build.config.ts +2 -0
- package/core/cloud/package.json +1 -1
- package/core/collections/build.config.ts +2 -0
- package/core/collections/package.json +1 -1
- package/core/config/package.json +1 -1
- package/core/config/src/defaults.ts +0 -2
- package/core/config/src/stacks.ts +9 -2
- package/core/database/package.json +1 -1
- package/core/database/src/migrations/index.ts +2 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/build.config.ts +2 -0
- package/core/desktop/package.json +2 -2
- package/core/development/build.config.ts +2 -0
- package/core/development/package.json +6 -6
- package/core/docs/build.config.ts +1 -0
- package/core/docs/node_modules/.bin/vitepress +4 -4
- package/core/docs/package.json +2 -2
- package/core/domains/build.config.ts +2 -0
- package/core/domains/package.json +1 -1
- package/core/email/package.json +12 -12
- package/core/email/src/drivers/mailjet.ts +1 -0
- package/core/email/src/tailwind.config.ts +1 -1
- package/core/error-handling/package.json +2 -2
- package/core/events/package.json +1 -1
- package/core/faker/build.config.ts +2 -0
- package/core/faker/package.json +1 -1
- package/core/git/build.config.ts +2 -0
- package/core/git/package.json +1 -1
- package/core/health/build.config.ts +2 -0
- package/core/health/package.json +1 -1
- package/core/lint/build.config.ts +2 -0
- package/core/lint/node_modules/.bin/eslint +4 -4
- package/core/lint/package.json +3 -3
- package/core/lint/src/index.ts +1 -1
- package/core/logging/package.json +5 -5
- package/core/modules/build.config.ts +2 -0
- package/core/modules/package.json +1 -1
- package/core/notifications/package.json +22 -22
- package/core/notifications/src/index.ts +5 -8
- package/core/objects/build.config.ts +2 -0
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +1 -1
- package/core/pages/build.config.ts +2 -0
- package/core/pages/package.json +1 -1
- package/core/path/build.config.ts +1 -0
- package/core/path/package.json +1 -1
- package/core/payments/build.config.ts +2 -0
- package/core/payments/package.json +2 -2
- package/core/push/build.config.ts +2 -0
- package/core/push/package.json +3 -3
- package/core/query-builder/build.config.ts +2 -0
- package/core/query-builder/package.json +1 -1
- package/core/queue/build.config.ts +2 -0
- package/core/queue/package.json +1 -1
- package/core/realtime/build.config.ts +2 -0
- package/core/realtime/package.json +1 -1
- package/core/router/build.config.ts +2 -0
- package/core/router/package.json +2 -2
- package/core/router/src/index.ts +114 -11
- package/core/scheduler/build.config.ts +2 -0
- package/core/scheduler/package.json +1 -1
- package/core/search-engine/build.config.ts +1 -0
- package/core/search-engine/package.json +1 -1
- package/core/search-engine/src/index.ts +1 -22
- package/core/security/build.config.ts +2 -0
- package/core/security/package.json +1 -1
- package/core/server/build.config.ts +2 -0
- package/core/server/node_modules/.bin/nitro +4 -4
- package/core/server/node_modules/.bin/nitropack +4 -4
- package/core/server/node_modules/.bin/vite +4 -4
- package/core/server/package.json +3 -3
- package/core/signals/build.config.ts +2 -0
- package/core/signals/package.json +1 -1
- package/core/slug/build.config.ts +2 -0
- package/core/slug/package.json +1 -1
- package/core/sms/build.config.ts +2 -0
- package/core/sms/package.json +11 -11
- package/core/storage/build.config.ts +2 -0
- package/core/storage/package.json +1 -1
- package/core/storage/src/index.ts +11 -1
- package/core/strings/package.json +1 -1
- package/core/strings/src/index.ts +0 -1
- package/core/testing/build.config.ts +2 -0
- package/core/testing/node_modules/.bin/vitest +4 -4
- package/core/testing/package.json +4 -4
- package/core/testing/src/index.ts +1 -0
- package/core/tinker/package.json +1 -1
- package/core/types/build.config.ts +2 -0
- package/core/types/node_modules/.bin/vite +4 -4
- package/core/types/node_modules/.bin/vite-ssg +4 -4
- package/core/types/node_modules/.bin/vitepress +4 -4
- package/core/types/package.json +7 -7
- package/core/types/src/cli.ts +10 -9
- package/core/types/src/fs.ts +8 -0
- package/core/types/src/router.ts +22 -0
- package/core/types/src/stacks.ts +3 -3
- package/core/ui/build.config.ts +2 -0
- package/core/ui/package.json +3 -3
- package/core/ui/src/index.ts +1 -1
- package/core/utils/build.config.ts +2 -0
- package/core/utils/node_modules/.bin/rimraf +4 -4
- package/core/utils/package.json +3 -3
- package/core/utils/src/base.ts +6 -5
- package/core/utils/src/config.ts +2 -3
- package/core/utils/src/currency.ts +26 -0
- package/core/utils/src/delete.ts +3 -0
- package/core/utils/src/helpers.ts +2 -2
- package/core/utils/src/index.ts +7 -9
- package/core/utils/src/math.ts +30 -0
- package/core/utils/src/throttle.ts +3 -6
- package/core/utils/src/vendors.ts +221 -0
- package/core/utils/src/versions.ts +1 -0
- package/core/validation/build.config.ts +2 -0
- package/core/validation/package.json +1 -1
- package/core/validation/src/index.ts +2 -29
- package/core/{strings/src/validation.ts → validation/src/is.ts} +83 -8
- package/core/validation/src/validate.ts +29 -0
- package/docs/node_modules/.bin/rimraf +4 -4
- package/docs/node_modules/.bin/vitepress +4 -4
- package/docs/package.json +2 -2
- package/package.json +93 -46
- package/vitest.config.ts +25 -17
- package/core/utils/src/is.ts +0 -83
- package/tests/feature/example.spec.ts +0 -20
- package/tests/unit/example.test.ts +0 -7
package/components.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// Generated by unplugin-vue-components
|
|
3
5
|
// Read more: https://github.com/vuejs/core/pull/3399
|
|
4
6
|
import '@vue/runtime-core'
|
|
5
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/actions",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.1",
|
|
5
5
|
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks actions.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -259,9 +259,21 @@
|
|
|
259
259
|
"vue-component-meta": "^1.6.5"
|
|
260
260
|
},
|
|
261
261
|
"dependencies": {
|
|
262
|
+
"@stacksjs/cli": "workspace:*",
|
|
263
|
+
"@stacksjs/config": "workspace:*",
|
|
264
|
+
"@stacksjs/database": "workspace:*",
|
|
265
|
+
"@stacksjs/error-handling": "workspace:*",
|
|
266
|
+
"@stacksjs/logging": "workspace:*",
|
|
267
|
+
"@stacksjs/pages": "workspace:*",
|
|
268
|
+
"@stacksjs/path": "workspace:*",
|
|
269
|
+
"@stacksjs/security": "workspace:*",
|
|
270
|
+
"@stacksjs/storage": "workspace:*",
|
|
262
271
|
"@stacksjs/strings": "workspace:*",
|
|
272
|
+
"@stacksjs/utils": "workspace:*",
|
|
263
273
|
"fast-glob": "^3.2.12",
|
|
264
|
-
"fs-extra": "^11.1.1"
|
|
274
|
+
"fs-extra": "^11.1.1",
|
|
275
|
+
"markdown-it": "^13.0.1",
|
|
276
|
+
"vue-component-meta": "^1.6.5"
|
|
265
277
|
},
|
|
266
278
|
"devDependencies": {
|
|
267
279
|
"@stacksjs/development": "workspace:*",
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import { log
|
|
1
|
+
import { log } from '@stacksjs/cli'
|
|
2
2
|
import { projectPath } from '@stacksjs/path'
|
|
3
|
-
import {
|
|
3
|
+
import { del } from '@stacksjs/utils'
|
|
4
4
|
|
|
5
|
-
log.info('Running clean command...')
|
|
5
|
+
log.info('Running clean command...', projectPath())
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
log.error(result.error)
|
|
15
|
-
process.exit(ExitCode.FatalError)
|
|
7
|
+
await del([
|
|
8
|
+
projectPath('pnpm-lock.yaml'),
|
|
9
|
+
projectPath('node_modules/'),
|
|
10
|
+
projectPath('.stacks/**/dist'),
|
|
11
|
+
projectPath('.stacks/**/node_modules'),
|
|
12
|
+
])
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { log } from '@stacksjs/logging'
|
|
2
2
|
import { writeTextFile } from '@stacksjs/storage'
|
|
3
3
|
import { packageJsonPath } from '@stacksjs/path'
|
|
4
|
-
import { library } from '@stacksjs/config'
|
|
5
|
-
import { packageManager } from '../../package.json' assert { type: 'json' }
|
|
4
|
+
import { library, packageManager } from '@stacksjs/config'
|
|
6
5
|
|
|
7
6
|
export async function generatePackageJson(type: 'vue-components' | 'web-components' | 'functions') {
|
|
8
7
|
let name, description, directory, keywords, config, prettyName
|
|
@@ -10,7 +10,7 @@ function parseOptions(options?: ActionOptions) {
|
|
|
10
10
|
|
|
11
11
|
const parsedOptions = Object.entries(options).map(([key, value]) => {
|
|
12
12
|
if (key.length === 1)
|
|
13
|
-
return
|
|
13
|
+
return `-${key}=${value}`
|
|
14
14
|
if (typeof value === 'boolean' && value) // if the value is a boolean and true, just return the key
|
|
15
15
|
return `--${key}`
|
|
16
16
|
else
|
|
@@ -37,7 +37,6 @@ export async function runAction(action: string, options?: ActionOptions): Promis
|
|
|
37
37
|
// we need to parse options here because they need to bw passed to the action
|
|
38
38
|
const opts = parseOptions(options)
|
|
39
39
|
const cmd = `npx tsx ${actionsPath(`${action}.ts ${opts}`)}`
|
|
40
|
-
|
|
41
40
|
// eslint-disable-next-line no-console
|
|
42
41
|
console.log('cmd', cmd)
|
|
43
42
|
|
|
@@ -3,7 +3,7 @@ import { frameworkPath } from '@stacksjs/path'
|
|
|
3
3
|
import { runActions } from '@stacksjs/actions'
|
|
4
4
|
import { Action } from '@stacksjs/types'
|
|
5
5
|
|
|
6
|
-
// import { log } from '@
|
|
6
|
+
// import { log } from '@stacksjs/cli'
|
|
7
7
|
|
|
8
8
|
await runActions([
|
|
9
9
|
// Action.GeneratePackageJsons, // generate the package.json's for each package
|
package/core/ai/build.config.ts
CHANGED
package/core/ai/package.json
CHANGED
package/core/alias/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/alias",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.1",
|
|
5
5
|
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks aliases.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"import": "./dist/index.mjs"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
"main": "dist/index.mjs",
|
|
30
29
|
"module": "dist/index.mjs",
|
|
31
30
|
"types": "dist/index.d.ts",
|
|
32
31
|
"contributors": [
|
package/core/arrays/package.json
CHANGED
package/core/auth/package.json
CHANGED
package/core/auth/src/index.ts
CHANGED
package/core/buddy/README.md
CHANGED
|
@@ -72,7 +72,7 @@ _Create your personal or professional Vercel-like cloud, based on MIT-licensed O
|
|
|
72
72
|
- ⛅️ **Serverless** _on-demand, auto-scaling, zero maintenance_
|
|
73
73
|
- 🚏 **CDN** _zero-config low-latency CDN, including request life-cycle hooks & optimized request compressions (Brotli & gzip)_
|
|
74
74
|
- 🔀 **Domain** _version-controlled & zero-config domain management (e.g. DNS)_
|
|
75
|
-
- 📧 **Email** _secure & simplistic easy-peasy@custom-domains.com mail_
|
|
75
|
+
- 📧 **Email** _secure & simplistic <easy-peasy@custom-domains.com> mail_
|
|
76
76
|
- 🔐 **Firewall** _native web application firewall support_
|
|
77
77
|
- 🚜 **Maintenance** _handles your cloud infrastructure via the Stacks & Serverless framework_
|
|
78
78
|
- 🤖 **Infrastructure as Code** _create & maintain your cloud infrastructure with ease_
|
package/core/buddy/package.json
CHANGED
|
@@ -13,16 +13,15 @@ async function clean(buddy: CLI) {
|
|
|
13
13
|
.command('clean', descriptions.clean)
|
|
14
14
|
.option('--verbose', descriptions.verbose, { default: false })
|
|
15
15
|
.action(async (options: CleanOptions) => {
|
|
16
|
-
// { shell: true, verbose: true }
|
|
17
16
|
const perf = await intro('buddy clean')
|
|
18
|
-
const result = await runAction(Action.
|
|
17
|
+
const result = await runAction(Action.Clean, { ...options, verbose: true })
|
|
19
18
|
|
|
20
19
|
if (result.isErr()) {
|
|
21
20
|
outro('While running the clean command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
22
21
|
process.exit(ExitCode.FatalError)
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
outro('Cleaned
|
|
24
|
+
outro('Cleaned up', { startTime: perf, useSeconds: true })
|
|
26
25
|
process.exit(ExitCode.Success)
|
|
27
26
|
})
|
|
28
27
|
}
|
|
@@ -81,7 +81,8 @@ async function dev(buddy: CLI) {
|
|
|
81
81
|
process.exit()
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
console.log('')
|
|
85
|
+
outro('Exited', { startTime: perf, useSeconds: true })
|
|
85
86
|
process.exit(ExitCode.Success)
|
|
86
87
|
})
|
|
87
88
|
|
|
@@ -14,10 +14,10 @@ async function fresh(buddy: CLI) {
|
|
|
14
14
|
.option('--verbose', descriptions.verbose, { default: false })
|
|
15
15
|
.action(async (options: FreshOptions) => {
|
|
16
16
|
const perf = await intro('buddy fresh')
|
|
17
|
-
const result = await runAction(Action.Fresh, { verbose: true })
|
|
17
|
+
const result = await runAction(Action.Fresh, { ...options, verbose: true })
|
|
18
18
|
|
|
19
19
|
if (result.isErr()) {
|
|
20
|
-
outro('While running the fresh command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
20
|
+
outro('While running the `fresh` command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
21
21
|
process.exit(ExitCode.FatalError)
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Action } from '@stacksjs/types'
|
|
2
2
|
import type { CLI, ReleaseOptions } from '@stacksjs/types'
|
|
3
|
-
import { intro, outro } from '@stacksjs/cli'
|
|
3
|
+
import { intro, log, outro } from '@stacksjs/cli'
|
|
4
4
|
import { runAction } from '@stacksjs/actions'
|
|
5
5
|
|
|
6
6
|
const descriptions = {
|
|
@@ -14,22 +14,14 @@ async function release(buddy: CLI) {
|
|
|
14
14
|
.option('--verbose', descriptions.verbose, { default: true }) // it's on by default because it requires manual input
|
|
15
15
|
.action(async (options: ReleaseOptions) => {
|
|
16
16
|
const startTime = await intro('buddy release')
|
|
17
|
-
const result = await runAction(Action.Release, { shell: true })
|
|
18
|
-
|
|
19
|
-
console.log('result', result)
|
|
20
|
-
|
|
21
|
-
// check if any element of the array is an error
|
|
22
|
-
if (Array.isArray(result) && result.some(r => r.isErr())) {
|
|
23
|
-
log.error('Failed to trigger the CI/CD release workflow.', result)
|
|
24
|
-
process.exit()
|
|
25
|
-
}
|
|
17
|
+
const result = await runAction(Action.Release, { ...options, shell: true })
|
|
26
18
|
|
|
27
19
|
if (result.isErr()) {
|
|
28
|
-
log.error('Failed to
|
|
20
|
+
log.error('Failed to release', result.error)
|
|
29
21
|
process.exit()
|
|
30
22
|
}
|
|
31
23
|
|
|
32
|
-
outro('Triggered CI/CD release workflow', { startTime, useSeconds: true })
|
|
24
|
+
outro('Triggered your CI/CD release workflow', { startTime, useSeconds: true })
|
|
33
25
|
})
|
|
34
26
|
}
|
|
35
27
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { CLI,
|
|
2
|
-
import {
|
|
1
|
+
import type { CLI, SeedOptions } from '@stacksjs/types'
|
|
2
|
+
import { runAction } from '@stacksjs/actions'
|
|
3
|
+
import { intro, outro } from '@stacksjs/cli'
|
|
4
|
+
import { Action, ExitCode } from '@stacksjs/types'
|
|
3
5
|
|
|
4
6
|
async function seed(buddy: CLI) {
|
|
5
7
|
const descriptions = {
|
|
@@ -10,21 +12,19 @@ async function seed(buddy: CLI) {
|
|
|
10
12
|
buddy
|
|
11
13
|
.command('seed', descriptions.seed)
|
|
12
14
|
.option('--verbose', descriptions.verbose, { default: false })
|
|
13
|
-
.action(async (options:
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
.action(async (options: SeedOptions) => {
|
|
16
|
+
const perf = await intro('buddy seed')
|
|
17
|
+
const result = await runAction(Action.Seed, { ...options, showSpinner: true, spinnerText: 'Seeding...' })
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
if (result.isErr()) {
|
|
20
|
+
outro('While running the seed command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
21
|
+
process.exit(ExitCode.FatalError)
|
|
22
|
+
}
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
const APP_ENV = process.env.APP_ENV || 'local'
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
await seeder()
|
|
26
|
+
outro(`Seeded your ${APP_ENV} database.`, { startTime: perf, useSeconds: true })
|
|
27
|
+
process.exit(ExitCode.Success)
|
|
28
28
|
})
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -41,10 +41,10 @@ async function test(buddy: CLI) {
|
|
|
41
41
|
const result = await runAction(Action.TestUnit, { ...options, verbose: true, cwd: projectPath() })
|
|
42
42
|
console.log('result', result)
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
if (result.isErr()) {
|
|
45
|
+
outro('While running `buddy test:unit`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
46
|
+
process.exit()
|
|
47
|
+
}
|
|
48
48
|
|
|
49
49
|
outro('Finished running unit tests', { startTime: perf, useSeconds: true })
|
|
50
50
|
})
|
|
@@ -55,17 +55,17 @@ async function test(buddy: CLI) {
|
|
|
55
55
|
.option('--verbose', descriptions.verbose, { default: false })
|
|
56
56
|
.action(async (options: TestOptions) => {
|
|
57
57
|
const perf = await intro('buddy test:feature')
|
|
58
|
-
|
|
58
|
+
let result
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
if (options.showReport)
|
|
61
|
+
result = await runAction(Action.ShowFeatureTestReport, { ...options, verbose: true, cwd: projectPath() })
|
|
62
|
+
else
|
|
63
|
+
result = await runAction(Action.TestFeature, { ...options, verbose: true, cwd: projectPath() })
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
if (result.isErr()) {
|
|
66
|
+
outro('While running `buddy test:feature`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
67
|
+
process.exit()
|
|
68
|
+
}
|
|
69
69
|
|
|
70
70
|
outro('Finished running feature tests', { startTime: perf, useSeconds: true })
|
|
71
71
|
})
|
|
@@ -78,10 +78,10 @@ async function test(buddy: CLI) {
|
|
|
78
78
|
const result = await runAction(Action.TestUi, { ...options, verbose: true, cwd: projectPath() })
|
|
79
79
|
console.log('result', result)
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
if (result.isErr()) {
|
|
82
|
+
outro('While running `buddy test:ui`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
83
|
+
process.exit()
|
|
84
|
+
}
|
|
85
85
|
|
|
86
86
|
outro('Finished running tests in the browser', { startTime: perf, useSeconds: true })
|
|
87
87
|
})
|
|
@@ -95,10 +95,10 @@ async function test(buddy: CLI) {
|
|
|
95
95
|
const result = await runAction(Action.Typecheck, { ...options, verbose: true, cwd: projectPath() })
|
|
96
96
|
console.log('result', result)
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
if (result.isErr()) {
|
|
99
|
+
outro('While running `buddy test:types`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
100
|
+
process.exit()
|
|
101
|
+
}
|
|
102
102
|
|
|
103
103
|
outro('Finished running typecheck', { startTime: perf, useSeconds: true })
|
|
104
104
|
})
|
|
@@ -110,10 +110,10 @@ async function test(buddy: CLI) {
|
|
|
110
110
|
const result = await runAction(Action.TestCoverage, { ...options, cwd: projectPath(), verbose: true })
|
|
111
111
|
console.log('result', result)
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
if (result.isErr()) {
|
|
114
|
+
outro('While running `buddy test:coverage`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
115
|
+
process.exit()
|
|
116
|
+
}
|
|
117
117
|
|
|
118
118
|
outro('Generated the test coverage report', { startTime: perf, useSeconds: true })
|
|
119
119
|
process.exit()
|
|
@@ -118,10 +118,10 @@ async function upgrade(buddy: CLI) {
|
|
|
118
118
|
const result = await runAction(Action.UpgradeNode, options)
|
|
119
119
|
console.log('result', result, perf)
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
if (result.isErr()) {
|
|
122
|
+
outro('While running the buddy upgrade:node command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error) // FIXME: should not have to cast
|
|
123
|
+
process.exit()
|
|
124
|
+
}
|
|
125
125
|
|
|
126
126
|
process.exit(ExitCode.Success)
|
|
127
127
|
})
|
|
@@ -130,7 +130,7 @@ async function upgrade(buddy: CLI) {
|
|
|
130
130
|
.command('upgrade:all', descriptions.all)
|
|
131
131
|
.option('--verbose', descriptions.verbose, { default: false })
|
|
132
132
|
.action(async (options: UpgradeOptions) => {
|
|
133
|
-
|
|
133
|
+
await runAction(Action.Upgrade, options)
|
|
134
134
|
})
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import type { CLI
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// import { frameworkPath } from '@stacksjs/path'
|
|
1
|
+
import type { CLI } from '@stacksjs/types'
|
|
2
|
+
import { bold, dim, green, intro } from '@stacksjs/cli'
|
|
3
|
+
import { filesystem } from '@stacksjs/storage'
|
|
4
|
+
import { log } from '@stacksjs/logging'
|
|
5
|
+
import { frameworkPath } from '@stacksjs/path'
|
|
7
6
|
|
|
8
7
|
async function version(buddy: CLI) {
|
|
9
|
-
//
|
|
8
|
+
// maybe use type-fest?
|
|
9
|
+
interface PackageJson {
|
|
10
|
+
engines: {
|
|
11
|
+
node: string
|
|
12
|
+
pnpm: string
|
|
13
|
+
}
|
|
14
|
+
version: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const { fs } = filesystem
|
|
10
18
|
|
|
11
19
|
const descriptions = {
|
|
12
20
|
version: 'Retrieving Stacks build version',
|
|
@@ -14,17 +22,18 @@ async function version(buddy: CLI) {
|
|
|
14
22
|
|
|
15
23
|
buddy
|
|
16
24
|
.command('version', descriptions.version)
|
|
17
|
-
.action(async (
|
|
18
|
-
|
|
25
|
+
.action(async () => {
|
|
26
|
+
await intro('buddy version')
|
|
19
27
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
const depVersions = JSON.parse(fs.readFileSync('./package.json', 'utf8')) as PackageJson
|
|
29
|
+
const nodeVersion = depVersions.engines.node.replace('>=v', '')
|
|
30
|
+
const pnpmVersion = depVersions.engines.pnpm.replace('>=', '')
|
|
31
|
+
const stacksVersion = JSON.parse(fs.readFileSync(frameworkPath('/package.json'), 'utf8')) as PackageJson
|
|
24
32
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
log.info(green(bold('Stacks: ')) + dim(` ${stacksVersion.version}`))
|
|
34
|
+
log.info(green(bold('node: ')) + dim(` ${nodeVersion}`))
|
|
35
|
+
log.info(green(bold('pnpm: ')) + dim(` ${pnpmVersion}`))
|
|
36
|
+
// redis (or other cache/s), mysql (or other database/s),
|
|
28
37
|
})
|
|
29
38
|
}
|
|
30
39
|
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.
|
|
11
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@4.3.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/vite.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vite@4.3.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/vite.js" "$@"
|
|
17
17
|
fi
|
|
@@ -6,12 +6,12 @@ case `uname` in
|
|
|
6
6
|
esac
|
|
7
7
|
|
|
8
8
|
if [ -z "$NODE_PATH" ]; then
|
|
9
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
10
|
else
|
|
11
|
-
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.
|
|
11
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
|
|
17
17
|
fi
|