@regressionproof/cli 0.2.23 → 0.2.25
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/.vscode/launch.json +58 -0
- package/.vscode/settings.json +58 -6
- package/.vscode/tasks.json +112 -0
- package/CHANGELOG.md +16 -0
- package/package.json +26 -3
- package/src/.spruce/settings.json +7 -1
- package/src/components/Init.tsx +9 -12
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"type": "node",
|
|
6
|
+
"request": "attach",
|
|
7
|
+
"name": "attach.tests",
|
|
8
|
+
"port": 5200,
|
|
9
|
+
"restart": true,
|
|
10
|
+
"timeout": 10000
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "node",
|
|
14
|
+
"request": "launch",
|
|
15
|
+
"name": "test.file",
|
|
16
|
+
"runtimeExecutable": "node",
|
|
17
|
+
"runtimeArgs": [
|
|
18
|
+
"--inspect-brk",
|
|
19
|
+
"--trace-warnings",
|
|
20
|
+
"${workspaceFolder}/node_modules/.bin/jest",
|
|
21
|
+
"${fileBasenameNoExtension}",
|
|
22
|
+
"--detectOpenHandles"
|
|
23
|
+
],
|
|
24
|
+
"cwd": "${workspaceFolder}",
|
|
25
|
+
"console": "integratedTerminal",
|
|
26
|
+
"internalConsoleOptions": "neverOpen"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "node",
|
|
30
|
+
"request": "launch",
|
|
31
|
+
"name": "test.all",
|
|
32
|
+
"runtimeExecutable": "node",
|
|
33
|
+
"runtimeArgs": [
|
|
34
|
+
"--inspect-brk",
|
|
35
|
+
"--trace-warnings",
|
|
36
|
+
"${workspaceFolder}/node_modules/.bin/jest"
|
|
37
|
+
],
|
|
38
|
+
"cwd": "${workspaceFolder}",
|
|
39
|
+
"console": "integratedTerminal",
|
|
40
|
+
"internalConsoleOptions": "neverOpen"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "node",
|
|
44
|
+
"request": "launch",
|
|
45
|
+
"name": "boot",
|
|
46
|
+
"runtimeExecutable": "yarn",
|
|
47
|
+
"runtimeArgs": [
|
|
48
|
+
"run",
|
|
49
|
+
"--inspect-brk",
|
|
50
|
+
"--trace-warnings",
|
|
51
|
+
"boot"
|
|
52
|
+
],
|
|
53
|
+
"cwd": "${workspaceFolder}",
|
|
54
|
+
"console": "integratedTerminal",
|
|
55
|
+
"internalConsoleOptions": "neverOpen"
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
package/.vscode/settings.json
CHANGED
|
@@ -1,9 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
|
|
2
|
+
"debug.node.autoAttach": "on",
|
|
3
|
+
"git.ignoreLimitWarning": true,
|
|
4
|
+
"javascript.validate.enable": false,
|
|
5
|
+
"files.watcherExclude": {
|
|
6
|
+
"**/.git/objects/**": true,
|
|
7
|
+
"**/.git/subtree-cache/**": true,
|
|
8
|
+
"**/build/**": true,
|
|
9
|
+
"**/node_modules/**": true,
|
|
10
|
+
},
|
|
11
|
+
"search.exclude": {
|
|
12
|
+
"**/build/**": true,
|
|
13
|
+
"**/node_modules/**": true,
|
|
14
|
+
"**/.next/**": true
|
|
15
|
+
},
|
|
16
|
+
"editor.maxTokenizationLineLength": 20000000,
|
|
17
|
+
"[javascript]": {
|
|
18
|
+
"editor.formatOnSave": false
|
|
19
|
+
},
|
|
20
|
+
"[javascriptreact]": {
|
|
21
|
+
"editor.formatOnSave": false
|
|
22
|
+
},
|
|
23
|
+
"[typescript]": {
|
|
24
|
+
"editor.formatOnSave": false
|
|
25
|
+
},
|
|
26
|
+
"[typescriptreact]": {
|
|
27
|
+
"editor.formatOnSave": false
|
|
5
28
|
},
|
|
6
|
-
"
|
|
29
|
+
"[handlebars]": {
|
|
30
|
+
"editor.formatOnSave": false
|
|
31
|
+
},
|
|
32
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
33
|
+
"cSpell.ignorePaths": [
|
|
34
|
+
"**/package-lock.json",
|
|
35
|
+
"**/node_modules/**",
|
|
36
|
+
"**/build/**",
|
|
37
|
+
"**/vscode-extension/**",
|
|
38
|
+
"**/.git/objects/**",
|
|
39
|
+
".vscode",
|
|
40
|
+
".spruce"
|
|
41
|
+
],
|
|
42
|
+
"cSpell.words": [
|
|
43
|
+
"arkit",
|
|
44
|
+
"autogenerated",
|
|
45
|
+
"scrollable",
|
|
46
|
+
"serializable"
|
|
47
|
+
],
|
|
48
|
+
"debug.javascript.unmapMissingSources": true,
|
|
49
|
+
"javascript.preferences.importModuleSpecifier": "relative",
|
|
50
|
+
"typescript.preferences.importModuleSpecifier": "relative",
|
|
51
|
+
"eslint.useFlatConfig": true,
|
|
7
52
|
"eslint.enable": true,
|
|
8
53
|
"eslint.validate": [
|
|
9
54
|
"javascript",
|
|
@@ -11,5 +56,12 @@
|
|
|
11
56
|
"typescript",
|
|
12
57
|
"typescriptreact"
|
|
13
58
|
],
|
|
14
|
-
"
|
|
15
|
-
|
|
59
|
+
"eslint.workingDirectories": [
|
|
60
|
+
"./"
|
|
61
|
+
],
|
|
62
|
+
"typescript.validate.enable": true,
|
|
63
|
+
"editor.formatOnSave": false,
|
|
64
|
+
"editor.codeActionsOnSave": {
|
|
65
|
+
"source.fixAll.eslint": "always"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"type": "npm",
|
|
6
|
+
"script": "watch.build.dev",
|
|
7
|
+
"group": "build",
|
|
8
|
+
"label": "watch.build.dev & problem.watcher",
|
|
9
|
+
"isBackground": true,
|
|
10
|
+
"runOptions": {
|
|
11
|
+
"runOn": "folderOpen"
|
|
12
|
+
},
|
|
13
|
+
"promptOnClose": false,
|
|
14
|
+
"presentation": {
|
|
15
|
+
"focus": false,
|
|
16
|
+
"reveal": "never"
|
|
17
|
+
},
|
|
18
|
+
"problemMatcher": {
|
|
19
|
+
"base": "$tsc-watch",
|
|
20
|
+
"applyTo": "allDocuments"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"label": "test.file",
|
|
25
|
+
"command": "spruce",
|
|
26
|
+
"args": [
|
|
27
|
+
"test",
|
|
28
|
+
"--inspect",
|
|
29
|
+
"5200",
|
|
30
|
+
"--pattern",
|
|
31
|
+
"${fileBasenameNoExtension}",
|
|
32
|
+
"--watchMode",
|
|
33
|
+
"standard"
|
|
34
|
+
],
|
|
35
|
+
"promptOnClose": false,
|
|
36
|
+
"group": {
|
|
37
|
+
"kind": "test",
|
|
38
|
+
"isDefault": true
|
|
39
|
+
},
|
|
40
|
+
"presentation": {
|
|
41
|
+
"reveal": "always",
|
|
42
|
+
"panel": "dedicated",
|
|
43
|
+
},
|
|
44
|
+
"problemMatcher": []
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"label": "test.reporter",
|
|
48
|
+
"command": "spruce",
|
|
49
|
+
"args": [
|
|
50
|
+
"test",
|
|
51
|
+
"--shouldHoldAtStart",
|
|
52
|
+
"true",
|
|
53
|
+
"--watchMode",
|
|
54
|
+
"smart"
|
|
55
|
+
],
|
|
56
|
+
"promptOnClose": false,
|
|
57
|
+
"group": "test",
|
|
58
|
+
"runOptions": {
|
|
59
|
+
"runOn": "folderOpen"
|
|
60
|
+
},
|
|
61
|
+
"presentation": {
|
|
62
|
+
"panel": "shared",
|
|
63
|
+
"focus": true,
|
|
64
|
+
"reveal": "always"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"label": "spruce",
|
|
69
|
+
"type": "shell",
|
|
70
|
+
"command": "spruce ${input:spruceCommand}",
|
|
71
|
+
"problemMatcher": [],
|
|
72
|
+
"presentation": {
|
|
73
|
+
"reveal": "always",
|
|
74
|
+
"focus": true,
|
|
75
|
+
"panel": "new",
|
|
76
|
+
"clear": false
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"label": "shell",
|
|
81
|
+
"type": "shell",
|
|
82
|
+
"command": "${input:command} ${input:optionsCommand}",
|
|
83
|
+
"problemMatcher": [],
|
|
84
|
+
"presentation": {
|
|
85
|
+
"reveal": "always",
|
|
86
|
+
"focus": true,
|
|
87
|
+
"panel": "new",
|
|
88
|
+
"clear": false
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"inputs": [
|
|
93
|
+
{
|
|
94
|
+
"id": "spruceCommand",
|
|
95
|
+
"description": "spruce command",
|
|
96
|
+
"default": "create.test",
|
|
97
|
+
"type": "promptString"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "command",
|
|
101
|
+
"description": "command",
|
|
102
|
+
"default": "yarn",
|
|
103
|
+
"type": "promptString"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "optionsCommand",
|
|
107
|
+
"description": "optionsCommand",
|
|
108
|
+
"default": "add",
|
|
109
|
+
"type": "promptString"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.2.25](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.24...v0.2.25) (2026-01-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @regressionproof/cli
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.2.24](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.23...v0.2.24) (2026-01-12)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @regressionproof/cli
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.2.23](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.22...v0.2.23) (2026-01-12)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @regressionproof/cli
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regressionproof/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.25",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"watch.tsc": "tsc -w"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@regressionproof/client": "^0.2.
|
|
36
|
+
"@regressionproof/client": "^0.2.25",
|
|
37
37
|
"dotenv": "^17.2.3",
|
|
38
38
|
"ink": "^5.1.0",
|
|
39
39
|
"ink-big-text": "^2.0.0",
|
|
@@ -41,12 +41,17 @@
|
|
|
41
41
|
"react": "^18.3.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@sprucelabs/jest-json-reporter": "^10.0.19",
|
|
44
45
|
"@sprucelabs/resolve-path-aliases": "^4.0.12",
|
|
46
|
+
"@sprucelabs/test": "^11.1.0",
|
|
47
|
+
"@sprucelabs/test-utils": "^7.2.3",
|
|
45
48
|
"@types/node": "^25.0.3",
|
|
46
49
|
"@types/react": "^18.3.18",
|
|
47
50
|
"chokidar-cli": "^3.0.0",
|
|
48
51
|
"eslint": "^9.39.2",
|
|
49
52
|
"eslint-config-spruce": "^11.2.26",
|
|
53
|
+
"jest": "^30.2.0",
|
|
54
|
+
"jest-circus": "^30.2.0",
|
|
50
55
|
"prettier": "^3.7.4",
|
|
51
56
|
"ts-node": "^10.9.2",
|
|
52
57
|
"tsc-watch": "^7.2.0",
|
|
@@ -56,5 +61,23 @@
|
|
|
56
61
|
"skill": {
|
|
57
62
|
"namespace": "regressionproof-cli"
|
|
58
63
|
},
|
|
59
|
-
"
|
|
64
|
+
"jest": {
|
|
65
|
+
"testRunner": "jest-circus/runner",
|
|
66
|
+
"maxWorkers": 4,
|
|
67
|
+
"testTimeout": 120000,
|
|
68
|
+
"testEnvironment": "node",
|
|
69
|
+
"testPathIgnorePatterns": [
|
|
70
|
+
"<rootDir>/tmp/",
|
|
71
|
+
"<rootDir>/src/",
|
|
72
|
+
"<rootDir>/node_modules/",
|
|
73
|
+
"<rootDir>/build/__tests__/testDirsAndFiles/"
|
|
74
|
+
],
|
|
75
|
+
"testMatch": [
|
|
76
|
+
"**/__tests__/**/*.test.js?(x)"
|
|
77
|
+
],
|
|
78
|
+
"moduleNameMapper": {
|
|
79
|
+
"^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"gitHead": "5538b60f0f015d0b25bba3dc1ff298878f547093"
|
|
60
83
|
}
|
package/src/components/Init.tsx
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process'
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs'
|
|
1
3
|
import client from '@regressionproof/client'
|
|
2
|
-
const RegressionProofClient = client.default ?? client
|
|
3
4
|
import { Box, Text, useApp } from 'ink'
|
|
4
5
|
import BigText from 'ink-big-text'
|
|
5
6
|
import TextInput from 'ink-text-input'
|
|
6
7
|
import React from 'react'
|
|
7
|
-
import { spawnSync } from 'node:child_process'
|
|
8
|
-
import { existsSync, readFileSync } from 'node:fs'
|
|
9
8
|
import ConfigManager, { Credentials } from '../config/ConfigManager.js'
|
|
10
9
|
import JestConfigurator, { JestConfigResult } from '../jest/JestConfigurator.js'
|
|
11
10
|
import { getRepoNameFromGit, toSlug } from '../utilities/slug.js'
|
|
11
|
+
const RegressionProofClient = client.default ?? client
|
|
12
12
|
|
|
13
13
|
const API_URL =
|
|
14
14
|
process.env.REGRESSIONPROOF_API_URL ?? 'https://api.regressionproof.ai'
|
|
@@ -151,8 +151,7 @@ class InitComponent extends React.Component<Props, State> {
|
|
|
151
151
|
this.setState({
|
|
152
152
|
step: 'error',
|
|
153
153
|
errorMessage:
|
|
154
|
-
installResult.message ??
|
|
155
|
-
'Failed to install dependencies.',
|
|
154
|
+
installResult.message ?? 'Failed to install dependencies.',
|
|
156
155
|
})
|
|
157
156
|
return
|
|
158
157
|
}
|
|
@@ -180,9 +179,7 @@ class InitComponent extends React.Component<Props, State> {
|
|
|
180
179
|
}
|
|
181
180
|
|
|
182
181
|
try {
|
|
183
|
-
packageJson = JSON.parse(
|
|
184
|
-
readFileSync('package.json', 'utf8')
|
|
185
|
-
) as {
|
|
182
|
+
packageJson = JSON.parse(readFileSync('package.json', 'utf8')) as {
|
|
186
183
|
dependencies?: Record<string, string>
|
|
187
184
|
devDependencies?: Record<string, string>
|
|
188
185
|
}
|
|
@@ -196,9 +193,7 @@ class InitComponent extends React.Component<Props, State> {
|
|
|
196
193
|
|
|
197
194
|
const hasReporter = Boolean(
|
|
198
195
|
packageJson.dependencies?.['@regressionproof/jest-reporter'] ??
|
|
199
|
-
|
|
200
|
-
'@regressionproof/jest-reporter'
|
|
201
|
-
]
|
|
196
|
+
packageJson.devDependencies?.['@regressionproof/jest-reporter']
|
|
202
197
|
)
|
|
203
198
|
if (hasReporter) {
|
|
204
199
|
return { success: true }
|
|
@@ -400,7 +395,9 @@ class InitComponent extends React.Component<Props, State> {
|
|
|
400
395
|
}
|
|
401
396
|
}
|
|
402
397
|
|
|
403
|
-
export default function Init(props: {
|
|
398
|
+
export default function Init(props: {
|
|
399
|
+
projectName?: string
|
|
400
|
+
}): React.ReactElement {
|
|
404
401
|
const { exit } = useApp()
|
|
405
402
|
return <InitComponent exit={exit} projectName={props.projectName} />
|
|
406
403
|
}
|