@regressionproof/client 0.2.21 → 0.2.22

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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.22](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.21...v0.2.22) (2026-01-12)
7
+
8
+ **Note:** Version bump only for package @regressionproof/client
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.2.21](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.20...v0.2.21) (2026-01-12)
7
15
 
8
16
  **Note:** Version bump only for package @regressionproof/client
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regressionproof/client",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -45,15 +45,23 @@
45
45
  "watch.tsc": "tsc -w"
46
46
  },
47
47
  "dependencies": {
48
- "@regressionproof/api": "^0.2.21"
48
+ "@sprucelabs/error": "^8.1.2",
49
+ "@sprucelabs/schema": "^33.1.3",
50
+ "@sprucelabs/spruce-core-schemas": "^42.1.3",
51
+ "@sprucelabs/spruce-skill-utils": "^34.0.3"
49
52
  },
50
53
  "devDependencies": {
51
54
  "@sprucelabs/esm-postbuild": "^9.0.13",
52
- "@sprucelabs/resolve-path-aliases": "^4.0.12",
55
+ "@sprucelabs/jest-json-reporter": "^10.0.19",
56
+ "@sprucelabs/resolve-path-aliases": "^4.0.13",
57
+ "@sprucelabs/test": "^11.1.0",
58
+ "@sprucelabs/test-utils": "^7.2.3",
53
59
  "@types/node": "^25.0.3",
54
60
  "chokidar-cli": "^3.0.0",
55
61
  "eslint": "^9.39.2",
56
62
  "eslint-config-spruce": "^11.2.26",
63
+ "jest": "^30.2.0",
64
+ "jest-circus": "^30.2.0",
57
65
  "prettier": "^3.7.4",
58
66
  "ts-node": "^10.9.2",
59
67
  "tsc-watch": "^7.2.0",
@@ -63,5 +71,23 @@
63
71
  "skill": {
64
72
  "namespace": "regressionproof-client"
65
73
  },
66
- "gitHead": "f1e0b6fe0cd549e9374a0d8129ed8eab1b734d7d"
74
+ "jest": {
75
+ "testRunner": "jest-circus/runner",
76
+ "maxWorkers": 4,
77
+ "testTimeout": 120000,
78
+ "testEnvironment": "node",
79
+ "testPathIgnorePatterns": [
80
+ "<rootDir>/tmp/",
81
+ "<rootDir>/src/",
82
+ "<rootDir>/node_modules/",
83
+ "<rootDir>/build/__tests__/testDirsAndFiles/"
84
+ ],
85
+ "testMatch": [
86
+ "**/__tests__/**/*.test.js?(x)"
87
+ ],
88
+ "moduleNameMapper": {
89
+ "^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
90
+ }
91
+ },
92
+ "gitHead": "fed9f41ff0509504e3d80a43b1de3848ae5e7ac7"
67
93
  }
@@ -0,0 +1,37 @@
1
+ import { default as SchemaEntity } from '@sprucelabs/schema'
2
+ import * as SpruceSchema from '@sprucelabs/schema'
3
+
4
+
5
+
6
+
7
+
8
+ export declare namespace SpruceErrors.RegressionproofClient {
9
+
10
+
11
+ export interface GitServerError {
12
+
13
+
14
+ 'statusText': string
15
+ }
16
+
17
+ export interface GitServerErrorSchema extends SpruceSchema.Schema {
18
+ id: 'gitServerError',
19
+ namespace: 'RegressionproofClient',
20
+ name: 'git server error',
21
+ fields: {
22
+ /** . */
23
+ 'statusText': {
24
+ type: 'text',
25
+ isRequired: true,
26
+ options: undefined
27
+ },
28
+ }
29
+ }
30
+
31
+ export type GitServerErrorEntity = SchemaEntity<SpruceErrors.RegressionproofClient.GitServerErrorSchema>
32
+
33
+ }
34
+
35
+
36
+
37
+
@@ -0,0 +1,10 @@
1
+ import { SpruceErrors } from "#spruce/errors/errors.types"
2
+ import { ErrorOptions as ISpruceErrorOptions} from "@sprucelabs/error"
3
+
4
+ export interface GitServerErrorErrorOptions extends SpruceErrors.RegressionproofClient.GitServerError, ISpruceErrorOptions {
5
+ code: 'GIT_SERVER_ERROR'
6
+ }
7
+
8
+ type ErrorOptions = | GitServerErrorErrorOptions
9
+
10
+ export default ErrorOptions
@@ -0,0 +1,22 @@
1
+ import { SchemaRegistry } from '@sprucelabs/schema'
2
+ import { SpruceErrors } from '../errors.types'
3
+
4
+
5
+
6
+ const gitServerErrorSchema: SpruceErrors.RegressionproofClient.GitServerErrorSchema = {
7
+ id: 'gitServerError',
8
+ namespace: 'RegressionproofClient',
9
+ name: 'git server error',
10
+ fields: {
11
+ /** . */
12
+ 'statusText': {
13
+ type: 'text',
14
+ isRequired: true,
15
+ options: undefined
16
+ },
17
+ }
18
+ }
19
+
20
+ SchemaRegistry.getInstance().trackSchema(gitServerErrorSchema)
21
+
22
+ export default gitServerErrorSchema
@@ -0,0 +1,6 @@
1
+ import { fieldClassMap } from '@sprucelabs/schema'
2
+
3
+
4
+
5
+
6
+ export default fieldClassMap
@@ -0,0 +1 @@
1
+ export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap } from '@sprucelabs/schema'
@@ -6,5 +6,13 @@
6
6
  "skipped": [
7
7
  "tsconfig.json"
8
8
  ]
9
- }
9
+ },
10
+ "skipped": [
11
+ "skill"
12
+ ],
13
+ "installed": [
14
+ "test",
15
+ "schema",
16
+ "error"
17
+ ]
10
18
  }
@@ -1,4 +1,4 @@
1
- import { SpruceError } from '@regressionproof/api'
1
+ import SpruceError from './errors/SpruceError'
2
2
 
3
3
  export default class RegressionProofClient {
4
4
  private baseUrl: string
@@ -57,12 +57,12 @@ export default class RegressionProofClient {
57
57
  }
58
58
  return new SpruceError({
59
59
  code: 'GIT_SERVER_ERROR',
60
- message: `Request failed: ${response.statusText}`,
60
+ statusText: `${response.statusText}`,
61
61
  })
62
62
  } catch {
63
63
  return new SpruceError({
64
64
  code: 'GIT_SERVER_ERROR',
65
- message: `Request failed: ${response.statusText}`,
65
+ statusText: `${response.statusText}`,
66
66
  })
67
67
  }
68
68
  }
@@ -0,0 +1,23 @@
1
+ import BaseSpruceError from '@sprucelabs/error'
2
+ import ErrorOptions from '#spruce/errors/options.types'
3
+
4
+ export default class SpruceError extends BaseSpruceError<ErrorOptions> {
5
+ /** an easy to understand version of the errors */
6
+ public friendlyMessage(): string {
7
+ const { options } = this
8
+ let message
9
+ switch (options?.code) {
10
+ case 'GIT_SERVER_ERROR':
11
+ message = `A request to the Git server failed: ${options.statusText}!`
12
+ break
13
+ default:
14
+ message = super.friendlyMessage()
15
+ }
16
+
17
+ const fullMessage = options.friendlyMessage
18
+ ? options.friendlyMessage
19
+ : message
20
+
21
+ return fullMessage
22
+ }
23
+ }
@@ -0,0 +1,12 @@
1
+ import { buildErrorSchema } from '@sprucelabs/schema'
2
+
3
+ export default buildErrorSchema({
4
+ id: 'gitServerError',
5
+ name: 'git server error',
6
+ fields: {
7
+ statusText: {
8
+ type: 'text',
9
+ isRequired: true,
10
+ },
11
+ },
12
+ })