stacks 0.46.2 → 0.46.4
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/buddy/package.json +2 -2
- package/buddy/src/commands/fresh.ts +1 -1
- package/buddy/src/commands/test.ts +45 -6
- package/core/actions/package.json +1 -1
- package/core/actions/src/bump.ts +1 -1
- package/core/actions/src/lint-fix.ts +3 -3
- package/core/actions/src/release.ts +2 -1
- package/core/actions/src/test-coverage.ts +5 -0
- package/core/actions/src/test-ui.ts +5 -0
- package/core/actions/src/test.ts +3 -59
- package/core/actions/src/typecheck.ts +5 -0
- package/core/ai/package.json +1 -1
- package/core/alias/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/build/package.json +2 -2
- package/core/cache/package.json +2 -2
- package/core/cli/package.json +1 -1
- package/core/cloud/package.json +1 -1
- package/core/collections/package.json +1 -1
- package/core/config/package.json +1 -1
- package/core/dashboard/package.json +1 -1
- package/core/database/package.json +1 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/package.json +1 -1
- package/core/docs/package.json +1 -1
- package/core/domains/package.json +1 -1
- package/core/drivers/package.json +1 -1
- package/core/email/package.json +1 -1
- package/core/error-handling/package.json +1 -1
- package/core/git/package.json +1 -1
- package/core/health/package.json +1 -1
- package/core/lint/package.json +1 -1
- package/core/logging/package.json +1 -1
- package/core/modules/package.json +1 -1
- package/core/notifications/package.json +1 -1
- package/core/objects/package.json +1 -1
- package/core/path/package.json +1 -1
- package/core/payments/package.json +1 -1
- package/core/realtime/package.json +1 -1
- package/core/router/package.json +1 -1
- package/core/search-engine/package.json +1 -1
- package/core/security/package.json +1 -1
- package/core/server/package.json +2 -2
- package/core/storage/package.json +1 -1
- package/core/strings/package.json +1 -1
- package/core/testing/package.json +1 -1
- package/core/types/package.json +1 -1
- package/core/types/src/cli.ts +7 -4
- package/core/types/src/utils.ts +5 -0
- package/core/ui/package.json +1 -1
- package/core/utils/package.json +2 -1
- package/core/x-ray/package.json +1 -1
- package/package.json +3 -3
package/buddy/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/buddy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.4",
|
|
5
5
|
"packageManager": "pnpm@7.19.0",
|
|
6
6
|
"description": "Meet Buddy. The Stacks runtime.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"types:generate": "vue-tsc --declaration --emitDeclarationOnly && esno ./core/actions/src/copy-types.ts",
|
|
138
138
|
"types:fix": "esno actions/src/fix-types.ts",
|
|
139
139
|
"add": "pnpm buddy add",
|
|
140
|
-
"test": "
|
|
140
|
+
"test": "pnpm buddy test",
|
|
141
141
|
"test:ui": "pnpm buddy test:ui",
|
|
142
142
|
"test:coverage": "pnpm buddy test:coverage",
|
|
143
143
|
"test:types": "pnpm buddy test:types"
|
|
@@ -14,7 +14,7 @@ async function fresh(buddy: CLI) {
|
|
|
14
14
|
.option('--debug', descriptions.debug, { default: false })
|
|
15
15
|
.action(async (options: FreshOptions) => {
|
|
16
16
|
const perf = intro('buddy fresh')
|
|
17
|
-
const result = await runAction(Action.Fresh, { ...options, shouldShowSpinner: true, spinnerText: 'Reinstalling
|
|
17
|
+
const result = await runAction(Action.Fresh, { ...options, shouldShowSpinner: true, spinnerText: 'Reinstalling dependencies...' })
|
|
18
18
|
|
|
19
19
|
if (result.isErr()) {
|
|
20
20
|
outro('While running the fresh command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
@@ -1,40 +1,79 @@
|
|
|
1
1
|
import type { CLI, TestOptions } from '@stacksjs/types'
|
|
2
|
-
import {
|
|
2
|
+
import { runAction } from '@stacksjs/actions'
|
|
3
|
+
import { intro, outro } from '@stacksjs/cli'
|
|
4
|
+
import { projectPath } from '@stacksjs/path'
|
|
5
|
+
import { Action } from '@stacksjs/types'
|
|
3
6
|
|
|
4
7
|
async function test(buddy: CLI) {
|
|
5
8
|
const descriptions = {
|
|
6
9
|
command: 'Runs your test suite',
|
|
7
10
|
types: 'Typechecks your codebase',
|
|
8
11
|
coverage: 'Generates a test coverage report',
|
|
12
|
+
ui: 'Runs your test suite in the browser',
|
|
9
13
|
debug: 'Enable debug mode',
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
buddy
|
|
13
17
|
.command('test', descriptions.command)
|
|
14
|
-
.option('--
|
|
18
|
+
.option('--ui', descriptions.ui, { default: false })
|
|
19
|
+
.option('--debug', descriptions.debug, { default: true })
|
|
15
20
|
.action(async (options: TestOptions) => {
|
|
16
|
-
|
|
21
|
+
const perf = intro('buddy test')
|
|
22
|
+
const result = await runAction(Action.Test, { ...options, cwd: projectPath() })
|
|
23
|
+
|
|
24
|
+
if (result.isErr()) {
|
|
25
|
+
outro('While running `buddy test`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
26
|
+
process.exit()
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
outro('Finished running tests', { startTime: perf, useSeconds: true })
|
|
17
30
|
})
|
|
18
31
|
|
|
19
32
|
buddy
|
|
20
33
|
.command('test:ui', descriptions.command)
|
|
21
34
|
.option('--debug', descriptions.debug, { default: false })
|
|
22
35
|
.action(async (options: TestOptions) => {
|
|
23
|
-
|
|
36
|
+
const perf = intro('buddy test:ui')
|
|
37
|
+
const result = await runAction(Action.TestUi, { ...options, debug: true, cwd: projectPath() })
|
|
38
|
+
|
|
39
|
+
if (result.isErr()) {
|
|
40
|
+
outro('While running `buddy test:ui`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
41
|
+
process.exit()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
outro('Finished running tests in the browser', { startTime: perf, useSeconds: true })
|
|
24
45
|
})
|
|
25
46
|
|
|
26
47
|
buddy
|
|
27
48
|
.command('test:types', descriptions.types)
|
|
49
|
+
.alias('typecheck')
|
|
28
50
|
.option('--debug', descriptions.debug, { default: false })
|
|
29
51
|
.action(async (options: TestOptions) => {
|
|
30
|
-
|
|
52
|
+
const perf = intro('buddy test:types')
|
|
53
|
+
const result = await runAction(Action.Typecheck, { ...options, debug: true, cwd: projectPath() })
|
|
54
|
+
|
|
55
|
+
if (result.isErr()) {
|
|
56
|
+
outro('While running `buddy test:types`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
57
|
+
process.exit()
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
outro('Finished running typecheck', { startTime: perf, useSeconds: true })
|
|
31
61
|
})
|
|
32
62
|
|
|
33
63
|
buddy
|
|
34
64
|
.command('test:coverage', descriptions.coverage)
|
|
35
65
|
.option('--debug', descriptions.debug, { default: false })
|
|
36
66
|
.action(async (options: TestOptions) => {
|
|
37
|
-
|
|
67
|
+
const perf = intro('buddy test:coverage')
|
|
68
|
+
const result = await runAction(Action.TestCoverage, options)
|
|
69
|
+
|
|
70
|
+
if (result.isErr()) {
|
|
71
|
+
outro('While running `buddy test:coverage`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
72
|
+
process.exit()
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
outro('Generated the test coverage report', { startTime: perf, useSeconds: true })
|
|
76
|
+
process.exit()
|
|
38
77
|
})
|
|
39
78
|
}
|
|
40
79
|
|
package/core/actions/src/bump.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { runCommand } from '@stacksjs/cli'
|
|
|
2
2
|
import { frameworkPath } from '@stacksjs/path'
|
|
3
3
|
|
|
4
4
|
await runCommand(
|
|
5
|
-
'npx bumpp ./package.json ./buddy/package.json ./core/**/package.json ./vscode/package.json --execute
|
|
5
|
+
'npx bumpp ./package.json ./buddy/package.json ./core/**/package.json ./vscode/package.json --execute "pnpm buddy changelog" --all',
|
|
6
6
|
{ debug: true, cwd: frameworkPath(), shell: true },
|
|
7
7
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { runCommands } from '@stacksjs/cli'
|
|
2
2
|
import { projectPath } from '@stacksjs/path'
|
|
3
|
-
import {
|
|
3
|
+
import { NpmScript } from '@stacksjs/types'
|
|
4
4
|
|
|
5
|
-
await
|
|
5
|
+
await runCommands([NpmScript.LintFix], { cwd: projectPath(), shouldShowSpinner: true, spinnerText: 'Linting...' })
|
|
@@ -7,7 +7,8 @@ import { Action } from '@stacksjs/types'
|
|
|
7
7
|
await runActions([
|
|
8
8
|
Action.GeneratePackageJsons, // generate the package.json's for each package
|
|
9
9
|
Action.LintFix, // ensure there are no lint errors
|
|
10
|
-
Action.
|
|
10
|
+
// Action.Test, // run the tests
|
|
11
|
+
Action.Bump, // bump the versions, create the git (version) tag, generate the changelog, commit & push the changes
|
|
11
12
|
], { debug: true, cwd: frameworkPath() }) // debug mode needs to be enabled to see the output due to the interactive prompts
|
|
12
13
|
|
|
13
14
|
// log.success('Successfully released the Stacks framework')
|
package/core/actions/src/test.ts
CHANGED
|
@@ -1,61 +1,5 @@
|
|
|
1
|
-
import type { TestOptions } from '@stacksjs/types'
|
|
2
1
|
import { NpmScript } from '@stacksjs/types'
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { runCommand } from '@stacksjs/cli'
|
|
3
|
+
import { frameworkPath } from '@stacksjs/path'
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
const perf = intro('buddy test')
|
|
8
|
-
const result = await runCommand(NpmScript.Test, { ...options, debug: true, cwd: projectPath() })
|
|
9
|
-
|
|
10
|
-
if (result.isErr()) {
|
|
11
|
-
outro('While running `buddy test`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
12
|
-
process.exit()
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
outro('Finished running tests', { startTime: perf, useSeconds: true })
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export async function testUi(options: TestOptions) {
|
|
19
|
-
const perf = intro('buddy test:ui')
|
|
20
|
-
const result = await runCommand(NpmScript.TestUi, { ...options, debug: true })
|
|
21
|
-
|
|
22
|
-
if (result.isErr()) {
|
|
23
|
-
outro('While running `buddy test:ui`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
24
|
-
process.exit()
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* An alias of the invoke method.
|
|
30
|
-
* @param options
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
export async function test(options: TestOptions) {
|
|
34
|
-
return invoke(options)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export async function typecheck(options: TestOptions) {
|
|
38
|
-
const perf = intro('buddy test:types')
|
|
39
|
-
const result = await runCommand(NpmScript.TestTypes, options)
|
|
40
|
-
|
|
41
|
-
if (result.isErr()) {
|
|
42
|
-
outro('While running `buddy test:types`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
43
|
-
process.exit()
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
outro('Finished typecheck', { startTime: perf, useSeconds: true })
|
|
47
|
-
process.exit()
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export async function testCoverageReport(options: TestOptions) {
|
|
51
|
-
const perf = intro('buddy test:coverage')
|
|
52
|
-
const result = await runCommand(NpmScript.TestCoverage, options)
|
|
53
|
-
|
|
54
|
-
if (result.isErr()) {
|
|
55
|
-
outro('While running `buddy test:coverage`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
56
|
-
process.exit()
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
outro('Generated the test coverage report', { startTime: perf, useSeconds: true })
|
|
60
|
-
process.exit()
|
|
61
|
-
}
|
|
5
|
+
await runCommand(NpmScript.Test, { debug: true, cwd: frameworkPath() })
|
package/core/ai/package.json
CHANGED
package/core/alias/package.json
CHANGED
package/core/arrays/package.json
CHANGED
package/core/auth/package.json
CHANGED
package/core/build/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/build",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.4",
|
|
5
5
|
"packageManager": "pnpm@7.19.0",
|
|
6
6
|
"description": "The Stacks framework build tools and configurations.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"unbuild": "^1.0.2",
|
|
58
58
|
"unplugin-auto-import": "^0.12.1",
|
|
59
59
|
"unplugin-vue-components": "^0.22.12",
|
|
60
|
-
"vite": "^4.0.
|
|
60
|
+
"vite": "^4.0.3",
|
|
61
61
|
"vite-plugin-inspect": "^0.7.11",
|
|
62
62
|
"vite-plugin-pages": "^0.28.0",
|
|
63
63
|
"vite-plugin-pwa": "^0.14.0",
|
package/core/cache/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/cache",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.4",
|
|
5
5
|
"packageManager": "pnpm@7.19.0",
|
|
6
6
|
"description": "The Stacks way to test.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"typecheck": "tsc --noEmit"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
48
|
+
"@aws-sdk/client-dynamodb": "^3.236.0",
|
|
49
49
|
"@stacksjs/config": "workspace:*",
|
|
50
50
|
"@types/memjs": "^1.2.4",
|
|
51
51
|
"memcached": "^2.2.2",
|
package/core/cli/package.json
CHANGED
package/core/cloud/package.json
CHANGED
package/core/config/package.json
CHANGED
package/core/docs/package.json
CHANGED
package/core/email/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/email",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.4",
|
|
5
5
|
"packageManager": "pnpm@7.19.0",
|
|
6
6
|
"description": "The Stacks Email integration. Painlessly create & manage your inboxes, templates, and send emails.",
|
|
7
7
|
"author": "Chris Breuer",
|
package/core/git/package.json
CHANGED
package/core/health/package.json
CHANGED
package/core/lint/package.json
CHANGED
package/core/path/package.json
CHANGED
package/core/router/package.json
CHANGED
package/core/server/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.4",
|
|
5
5
|
"packageManager": "pnpm@7.19.0",
|
|
6
6
|
"description": "Local development and production-ready.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@stacksjs/config": "workspace:*",
|
|
50
50
|
"@stacksjs/path": "workspace:*",
|
|
51
51
|
"nitropack": "^1.0.0",
|
|
52
|
-
"vite": "^4.0.
|
|
52
|
+
"vite": "^4.0.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@stacksjs/testing": "workspace:*",
|
package/core/types/package.json
CHANGED
package/core/types/src/cli.ts
CHANGED
|
@@ -189,9 +189,9 @@ export const enum NpmScript {
|
|
|
189
189
|
Lint = 'eslint .',
|
|
190
190
|
LintFix = 'eslint . --fix',
|
|
191
191
|
MakeStack = 'make:stack',
|
|
192
|
-
Test = 'vitest --config
|
|
193
|
-
TestUi = 'vitest --config
|
|
194
|
-
TestCoverage = 'vitest --config
|
|
192
|
+
Test = 'vitest --config vitest.config.ts',
|
|
193
|
+
TestUi = 'vitest --config vitest.config.ts --ui',
|
|
194
|
+
TestCoverage = 'vitest --config vitest.config.ts --coverage',
|
|
195
195
|
TestTypes = 'vue-tsc --noEmit',
|
|
196
196
|
Generate = 'generate',
|
|
197
197
|
GenerateTypes = 'generate:types',
|
|
@@ -231,7 +231,10 @@ export const enum Action {
|
|
|
231
231
|
GeneratePackageJsons = 'generate-package-jsons', // ✅
|
|
232
232
|
Lint = 'lint', // ✅
|
|
233
233
|
LintFix = 'lint-fix', // ✅
|
|
234
|
-
|
|
234
|
+
Test = 'test', // ✅
|
|
235
|
+
TestUi = 'test-ui', // ✅
|
|
236
|
+
TestCoverage = 'test-coverage', // ✅
|
|
237
|
+
Typecheck = 'typecheck', // wip
|
|
235
238
|
}
|
|
236
239
|
|
|
237
240
|
export type { CAC as CLI } from 'cac'
|
package/core/types/src/utils.ts
CHANGED
package/core/ui/package.json
CHANGED
package/core/utils/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.4",
|
|
5
5
|
"packageManager": "pnpm@7.19.0",
|
|
6
6
|
"description": "The Stacks helper functions.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@stacksjs/testing": "workspace:*",
|
|
74
|
+
"@types/throttle-debounce": "^5.0.0",
|
|
74
75
|
"mkdist": "^1.0.0",
|
|
75
76
|
"typescript": "^4.9.4"
|
|
76
77
|
}
|
package/core/x-ray/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stacks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.46.
|
|
4
|
+
"version": "0.46.4",
|
|
5
5
|
"packageManager": "pnpm@7.19.0",
|
|
6
6
|
"description": "The Stacks framework.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"web-types": "./web-types.json",
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@stacksjs/buddy": "0.46.
|
|
68
|
+
"@stacksjs/buddy": "0.46.4"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"buddy": "esno ./buddy/src/cli.ts",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"generate:all": "pnpm buddy generate:all",
|
|
146
146
|
"types:generate": "vue-tsc --declaration --emitDeclarationOnly && esno ./core/actions/src/copy-types.ts",
|
|
147
147
|
"types:fix": "esno actions/src/fix-types.ts",
|
|
148
|
-
"test": "
|
|
148
|
+
"test": "pnpm buddy test",
|
|
149
149
|
"test:ui": "pnpm buddy test:ui",
|
|
150
150
|
"test:coverage": "pnpm buddy test:coverage",
|
|
151
151
|
"test:types": "vue-tsc --noEmit"
|