@regressionproof/client 0.3.6 → 0.3.7
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/build/.spruce/errors/errors.types.d.ts +21 -0
- package/build/.spruce/errors/errors.types.js +2 -0
- package/build/.spruce/errors/options.types.d.ts +7 -0
- package/build/.spruce/errors/options.types.js +2 -0
- package/build/.spruce/errors/regressionproofClient/gitServerError.schema.d.ts +3 -0
- package/build/.spruce/errors/regressionproofClient/gitServerError.schema.js +18 -0
- package/build/.spruce/schemas/fields/fieldClassMap.d.ts +2 -0
- package/build/.spruce/schemas/fields/fieldClassMap.js +4 -0
- package/{src/.spruce/schemas/fields/fields.types.ts → build/.spruce/schemas/fields/fields.types.d.ts} +1 -1
- package/build/.spruce/schemas/fields/fields.types.js +2 -0
- package/build/RegressionProofClient.d.ts +15 -0
- package/build/RegressionProofClient.js +64 -0
- package/build/errors/SpruceError.d.ts +6 -0
- package/build/errors/SpruceError.js +25 -0
- package/build/errors/gitServerError.builder.d.ts +11 -0
- package/build/errors/gitServerError.builder.js +13 -0
- package/build/esm/.spruce/errors/errors.types.d.ts +21 -0
- package/build/esm/.spruce/errors/errors.types.js +1 -0
- package/build/esm/.spruce/errors/options.types.d.ts +7 -0
- package/build/esm/.spruce/errors/options.types.js +1 -0
- package/build/esm/RegressionProofClient.d.ts +15 -0
- package/build/esm/RegressionProofClient.js +76 -0
- package/build/esm/errors/SpruceError.d.ts +6 -0
- package/build/esm/errors/SpruceError.js +19 -0
- package/build/esm/errors/gitServerError.builder.d.ts +11 -0
- package/{src/errors/gitServerError.builder.ts → build/esm/errors/gitServerError.builder.js} +2 -3
- package/build/esm/index.d.ts +2 -0
- package/build/esm/index.js +2 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +10 -0
- package/package.json +5 -2
- package/.nvmrc +0 -1
- package/.vscode/launch.json +0 -58
- package/.vscode/settings.json +0 -67
- package/.vscode/tasks.json +0 -112
- package/CHANGELOG.md +0 -325
- package/eslint.config.mjs +0 -3
- package/src/.spruce/errors/errors.types.ts +0 -37
- package/src/.spruce/errors/options.types.ts +0 -10
- package/src/.spruce/errors/regressionproofClient/gitServerError.schema.ts +0 -22
- package/src/.spruce/schemas/fields/fieldClassMap.ts +0 -6
- package/src/RegressionProofClient.ts +0 -81
- package/src/errors/SpruceError.ts +0 -24
- package/src/index.ts +0 -6
- package/tsconfig.dist.json +0 -26
- package/tsconfig.json +0 -27
- /package/{src → build}/.spruce/settings.json +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as SchemaEntity } from '@sprucelabs/schema';
|
|
2
|
+
import * as SpruceSchema from '@sprucelabs/schema';
|
|
3
|
+
export declare namespace SpruceErrors.RegressionproofClient {
|
|
4
|
+
interface GitServerError {
|
|
5
|
+
'message': string;
|
|
6
|
+
}
|
|
7
|
+
interface GitServerErrorSchema extends SpruceSchema.Schema {
|
|
8
|
+
id: 'gitServerError';
|
|
9
|
+
namespace: 'RegressionproofClient';
|
|
10
|
+
name: 'git server error';
|
|
11
|
+
fields: {
|
|
12
|
+
/** . */
|
|
13
|
+
'message': {
|
|
14
|
+
type: 'text';
|
|
15
|
+
isRequired: true;
|
|
16
|
+
options: undefined;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
type GitServerErrorEntity = SchemaEntity<SpruceErrors.RegressionproofClient.GitServerErrorSchema>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SpruceErrors } from "./errors.types";
|
|
2
|
+
import { ErrorOptions as ISpruceErrorOptions } from "@sprucelabs/error";
|
|
3
|
+
export interface GitServerErrorErrorOptions extends SpruceErrors.RegressionproofClient.GitServerError, ISpruceErrorOptions {
|
|
4
|
+
code: 'GIT_SERVER_ERROR';
|
|
5
|
+
}
|
|
6
|
+
type ErrorOptions = GitServerErrorErrorOptions;
|
|
7
|
+
export default ErrorOptions;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
4
|
+
const gitServerErrorSchema = {
|
|
5
|
+
id: 'gitServerError',
|
|
6
|
+
namespace: 'RegressionproofClient',
|
|
7
|
+
name: 'git server error',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'message': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(gitServerErrorSchema);
|
|
18
|
+
exports.default = gitServerErrorSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap } from '@sprucelabs/schema'
|
|
1
|
+
export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap } from '@sprucelabs/schema';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default class RegressionProofClient {
|
|
2
|
+
private baseUrl;
|
|
3
|
+
constructor(baseUrl: string);
|
|
4
|
+
checkNameAvailability(name: string): Promise<boolean>;
|
|
5
|
+
registerProject(options: RegisterProjectOptions): Promise<ProjectCredentials>;
|
|
6
|
+
refreshCredentials(options: RegisterProjectOptions): Promise<ProjectCredentials>;
|
|
7
|
+
private parseErrorResponse;
|
|
8
|
+
}
|
|
9
|
+
export interface RegisterProjectOptions {
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ProjectCredentials {
|
|
13
|
+
url: string;
|
|
14
|
+
token: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const SpruceError_1 = __importDefault(require("./errors/SpruceError"));
|
|
7
|
+
class RegressionProofClient {
|
|
8
|
+
constructor(baseUrl) {
|
|
9
|
+
this.baseUrl = baseUrl;
|
|
10
|
+
}
|
|
11
|
+
async checkNameAvailability(name) {
|
|
12
|
+
const response = await fetch(`${this.baseUrl}/check-name/${name}`);
|
|
13
|
+
const { available } = (await response.json());
|
|
14
|
+
return available;
|
|
15
|
+
}
|
|
16
|
+
async registerProject(options) {
|
|
17
|
+
const response = await fetch(`${this.baseUrl}/register`, {
|
|
18
|
+
method: 'POST',
|
|
19
|
+
headers: {
|
|
20
|
+
'Content-Type': 'application/json',
|
|
21
|
+
},
|
|
22
|
+
body: JSON.stringify(options),
|
|
23
|
+
});
|
|
24
|
+
if (!response.ok) {
|
|
25
|
+
throw await this.parseErrorResponse(response);
|
|
26
|
+
}
|
|
27
|
+
return response.json();
|
|
28
|
+
}
|
|
29
|
+
async refreshCredentials(options) {
|
|
30
|
+
const response = await fetch(`${this.baseUrl}/refresh`, {
|
|
31
|
+
method: 'POST',
|
|
32
|
+
headers: {
|
|
33
|
+
'Content-Type': 'application/json',
|
|
34
|
+
},
|
|
35
|
+
body: JSON.stringify(options),
|
|
36
|
+
});
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
throw await this.parseErrorResponse(response);
|
|
39
|
+
}
|
|
40
|
+
return response.json();
|
|
41
|
+
}
|
|
42
|
+
async parseErrorResponse(response) {
|
|
43
|
+
try {
|
|
44
|
+
const body = await response.json();
|
|
45
|
+
if (body.error?.options) {
|
|
46
|
+
return SpruceError_1.default.parse(body.error, SpruceError_1.default);
|
|
47
|
+
}
|
|
48
|
+
if (body.error?.code) {
|
|
49
|
+
return new SpruceError_1.default(body.error);
|
|
50
|
+
}
|
|
51
|
+
return new SpruceError_1.default({
|
|
52
|
+
code: 'GIT_SERVER_ERROR',
|
|
53
|
+
message: `${response.statusText}`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return new SpruceError_1.default({
|
|
58
|
+
code: 'GIT_SERVER_ERROR',
|
|
59
|
+
message: `${response.statusText}`,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.default = RegressionProofClient;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BaseSpruceError from '@sprucelabs/error';
|
|
2
|
+
import ErrorOptions from './../.spruce/errors/options.types';
|
|
3
|
+
export default class SpruceError extends BaseSpruceError<ErrorOptions> {
|
|
4
|
+
/** an easy to understand version of the errors */
|
|
5
|
+
friendlyMessage(): string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const error_1 = __importDefault(require("@sprucelabs/error"));
|
|
7
|
+
class SpruceError extends error_1.default {
|
|
8
|
+
/** an easy to understand version of the errors */
|
|
9
|
+
friendlyMessage() {
|
|
10
|
+
const { options } = this;
|
|
11
|
+
let message;
|
|
12
|
+
switch (options?.code) {
|
|
13
|
+
case 'GIT_SERVER_ERROR':
|
|
14
|
+
message = `A request to the Git server failed: ${options.message}!`;
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
message = super.friendlyMessage();
|
|
18
|
+
}
|
|
19
|
+
const fullMessage = options.friendlyMessage
|
|
20
|
+
? options.friendlyMessage
|
|
21
|
+
: message;
|
|
22
|
+
return fullMessage;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = SpruceError;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
4
|
+
exports.default = (0, schema_1.buildErrorSchema)({
|
|
5
|
+
id: 'gitServerError',
|
|
6
|
+
name: 'git server error',
|
|
7
|
+
fields: {
|
|
8
|
+
message: {
|
|
9
|
+
type: 'text',
|
|
10
|
+
isRequired: true,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as SchemaEntity } from '@sprucelabs/schema';
|
|
2
|
+
import * as SpruceSchema from '@sprucelabs/schema';
|
|
3
|
+
export declare namespace SpruceErrors.RegressionproofClient {
|
|
4
|
+
interface GitServerError {
|
|
5
|
+
'message': string;
|
|
6
|
+
}
|
|
7
|
+
interface GitServerErrorSchema extends SpruceSchema.Schema {
|
|
8
|
+
id: 'gitServerError';
|
|
9
|
+
namespace: 'RegressionproofClient';
|
|
10
|
+
name: 'git server error';
|
|
11
|
+
fields: {
|
|
12
|
+
/** . */
|
|
13
|
+
'message': {
|
|
14
|
+
type: 'text';
|
|
15
|
+
isRequired: true;
|
|
16
|
+
options: undefined;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
type GitServerErrorEntity = SchemaEntity<SpruceErrors.RegressionproofClient.GitServerErrorSchema>;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SpruceErrors } from "./errors.types";
|
|
2
|
+
import { ErrorOptions as ISpruceErrorOptions } from "@sprucelabs/error";
|
|
3
|
+
export interface GitServerErrorErrorOptions extends SpruceErrors.RegressionproofClient.GitServerError, ISpruceErrorOptions {
|
|
4
|
+
code: 'GIT_SERVER_ERROR';
|
|
5
|
+
}
|
|
6
|
+
type ErrorOptions = GitServerErrorErrorOptions;
|
|
7
|
+
export default ErrorOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default class RegressionProofClient {
|
|
2
|
+
private baseUrl;
|
|
3
|
+
constructor(baseUrl: string);
|
|
4
|
+
checkNameAvailability(name: string): Promise<boolean>;
|
|
5
|
+
registerProject(options: RegisterProjectOptions): Promise<ProjectCredentials>;
|
|
6
|
+
refreshCredentials(options: RegisterProjectOptions): Promise<ProjectCredentials>;
|
|
7
|
+
private parseErrorResponse;
|
|
8
|
+
}
|
|
9
|
+
export interface RegisterProjectOptions {
|
|
10
|
+
name: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ProjectCredentials {
|
|
13
|
+
url: string;
|
|
14
|
+
token: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import SpruceError from './errors/SpruceError.js';
|
|
11
|
+
export default class RegressionProofClient {
|
|
12
|
+
constructor(baseUrl) {
|
|
13
|
+
this.baseUrl = baseUrl;
|
|
14
|
+
}
|
|
15
|
+
checkNameAvailability(name) {
|
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
const response = yield fetch(`${this.baseUrl}/check-name/${name}`);
|
|
18
|
+
const { available } = (yield response.json());
|
|
19
|
+
return available;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
registerProject(options) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const response = yield fetch(`${this.baseUrl}/register`, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
headers: {
|
|
27
|
+
'Content-Type': 'application/json',
|
|
28
|
+
},
|
|
29
|
+
body: JSON.stringify(options),
|
|
30
|
+
});
|
|
31
|
+
if (!response.ok) {
|
|
32
|
+
throw yield this.parseErrorResponse(response);
|
|
33
|
+
}
|
|
34
|
+
return response.json();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
refreshCredentials(options) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const response = yield fetch(`${this.baseUrl}/refresh`, {
|
|
40
|
+
method: 'POST',
|
|
41
|
+
headers: {
|
|
42
|
+
'Content-Type': 'application/json',
|
|
43
|
+
},
|
|
44
|
+
body: JSON.stringify(options),
|
|
45
|
+
});
|
|
46
|
+
if (!response.ok) {
|
|
47
|
+
throw yield this.parseErrorResponse(response);
|
|
48
|
+
}
|
|
49
|
+
return response.json();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
parseErrorResponse(response) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
try {
|
|
56
|
+
const body = yield response.json();
|
|
57
|
+
if ((_a = body.error) === null || _a === void 0 ? void 0 : _a.options) {
|
|
58
|
+
return SpruceError.parse(body.error, SpruceError);
|
|
59
|
+
}
|
|
60
|
+
if ((_b = body.error) === null || _b === void 0 ? void 0 : _b.code) {
|
|
61
|
+
return new SpruceError(body.error);
|
|
62
|
+
}
|
|
63
|
+
return new SpruceError({
|
|
64
|
+
code: 'GIT_SERVER_ERROR',
|
|
65
|
+
message: `${response.statusText}`,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
catch (_c) {
|
|
69
|
+
return new SpruceError({
|
|
70
|
+
code: 'GIT_SERVER_ERROR',
|
|
71
|
+
message: `${response.statusText}`,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import BaseSpruceError from '@sprucelabs/error';
|
|
2
|
+
import ErrorOptions from './../.spruce/errors/options.types';
|
|
3
|
+
export default class SpruceError extends BaseSpruceError<ErrorOptions> {
|
|
4
|
+
/** an easy to understand version of the errors */
|
|
5
|
+
friendlyMessage(): string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import BaseSpruceError from '@sprucelabs/error';
|
|
2
|
+
export default class SpruceError extends BaseSpruceError {
|
|
3
|
+
/** an easy to understand version of the errors */
|
|
4
|
+
friendlyMessage() {
|
|
5
|
+
const { options } = this;
|
|
6
|
+
let message;
|
|
7
|
+
switch (options === null || options === void 0 ? void 0 : options.code) {
|
|
8
|
+
case 'GIT_SERVER_ERROR':
|
|
9
|
+
message = `A request to the Git server failed: ${options.message}!`;
|
|
10
|
+
break;
|
|
11
|
+
default:
|
|
12
|
+
message = super.friendlyMessage();
|
|
13
|
+
}
|
|
14
|
+
const fullMessage = options.friendlyMessage
|
|
15
|
+
? options.friendlyMessage
|
|
16
|
+
: message;
|
|
17
|
+
return fullMessage;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { buildErrorSchema } from '@sprucelabs/schema'
|
|
2
|
-
|
|
1
|
+
import { buildErrorSchema } from '@sprucelabs/schema';
|
|
3
2
|
export default buildErrorSchema({
|
|
4
3
|
id: 'gitServerError',
|
|
5
4
|
name: 'git server error',
|
|
@@ -9,4 +8,4 @@ export default buildErrorSchema({
|
|
|
9
8
|
isRequired: true,
|
|
10
9
|
},
|
|
11
10
|
},
|
|
12
|
-
})
|
|
11
|
+
});
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = exports.RegressionProofClient = void 0;
|
|
7
|
+
var RegressionProofClient_js_1 = require("./RegressionProofClient.js");
|
|
8
|
+
Object.defineProperty(exports, "RegressionProofClient", { enumerable: true, get: function () { return __importDefault(RegressionProofClient_js_1).default; } });
|
|
9
|
+
var RegressionProofClient_js_2 = require("./RegressionProofClient.js");
|
|
10
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(RegressionProofClient_js_2).default; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regressionproof/client",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"types": "./build/index.d.ts",
|
|
9
9
|
"module": "./build/esm/index.js",
|
|
10
10
|
"sideEffects": false,
|
|
11
|
+
"files": [
|
|
12
|
+
"build/**/*"
|
|
13
|
+
],
|
|
11
14
|
"exports": {
|
|
12
15
|
".": {
|
|
13
16
|
"import": {
|
|
@@ -89,5 +92,5 @@
|
|
|
89
92
|
"^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
|
|
90
93
|
}
|
|
91
94
|
},
|
|
92
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "3be8fab3761ebce6f07d9243be8379eb1af82ea8"
|
|
93
96
|
}
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
lts/*
|
package/.vscode/launch.json
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
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
|
|
28
|
-
},
|
|
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,
|
|
52
|
-
"eslint.enable": true,
|
|
53
|
-
"eslint.validate": [
|
|
54
|
-
"javascript",
|
|
55
|
-
"javascriptreact",
|
|
56
|
-
"typescript",
|
|
57
|
-
"typescriptreact"
|
|
58
|
-
],
|
|
59
|
-
"eslint.workingDirectories": [
|
|
60
|
-
"./"
|
|
61
|
-
],
|
|
62
|
-
"typescript.validate.enable": true,
|
|
63
|
-
"editor.formatOnSave": false,
|
|
64
|
-
"editor.codeActionsOnSave": {
|
|
65
|
-
"source.fixAll.eslint": "always"
|
|
66
|
-
}
|
|
67
|
-
}
|
package/.vscode/tasks.json
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [0.3.6](https://github.com/sprucelabsai-community/regressionproof/compare/v0.3.5...v0.3.6) (2026-01-13)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [0.3.5](https://github.com/sprucelabsai-community/regressionproof/compare/v0.3.4...v0.3.5) (2026-01-13)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [0.3.4](https://github.com/sprucelabsai-community/regressionproof/compare/v0.3.3...v0.3.4) (2026-01-13)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## [0.3.3](https://github.com/sprucelabsai-community/regressionproof/compare/v0.3.2...v0.3.3) (2026-01-13)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
## [0.3.2](https://github.com/sprucelabsai-community/regressionproof/compare/v0.3.1...v0.3.2) (2026-01-13)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
## [0.3.1](https://github.com/sprucelabsai-community/regressionproof/compare/v0.3.0...v0.3.1) (2026-01-13)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
# [0.3.0](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.25...v0.3.0) (2026-01-12)
|
|
55
|
-
|
|
56
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
## [0.2.25](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.24...v0.2.25) (2026-01-12)
|
|
63
|
-
|
|
64
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## [0.2.24](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.23...v0.2.24) (2026-01-12)
|
|
71
|
-
|
|
72
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
## [0.2.23](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.22...v0.2.23) (2026-01-12)
|
|
79
|
-
|
|
80
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
## [0.2.22](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.21...v0.2.22) (2026-01-12)
|
|
87
|
-
|
|
88
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
## [0.2.21](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.20...v0.2.21) (2026-01-12)
|
|
95
|
-
|
|
96
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
## [0.2.20](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.19...v0.2.20) (2026-01-12)
|
|
103
|
-
|
|
104
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
## [0.2.19](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.18...v0.2.19) (2026-01-12)
|
|
111
|
-
|
|
112
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
## [0.2.18](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.17...v0.2.18) (2026-01-12)
|
|
119
|
-
|
|
120
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
## [0.2.17](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.16...v0.2.17) (2026-01-12)
|
|
127
|
-
|
|
128
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
## [0.2.16](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.15...v0.2.16) (2026-01-12)
|
|
135
|
-
|
|
136
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
## [0.2.15](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.14...v0.2.15) (2026-01-12)
|
|
143
|
-
|
|
144
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
## [0.2.14](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.13...v0.2.14) (2026-01-12)
|
|
151
|
-
|
|
152
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
## [0.2.13](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.12...v0.2.13) (2026-01-12)
|
|
159
|
-
|
|
160
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
## [0.2.12](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.11...v0.2.12) (2026-01-12)
|
|
167
|
-
|
|
168
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
## [0.2.11](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.10...v0.2.11) (2026-01-12)
|
|
175
|
-
|
|
176
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
## [0.2.10](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.9...v0.2.10) (2026-01-12)
|
|
183
|
-
|
|
184
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
## [0.2.9](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.8...v0.2.9) (2026-01-12)
|
|
191
|
-
|
|
192
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
## [0.2.8](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.7...v0.2.8) (2026-01-12)
|
|
199
|
-
|
|
200
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
## [0.2.7](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.6...v0.2.7) (2026-01-12)
|
|
207
|
-
|
|
208
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
## [0.2.6](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.5...v0.2.6) (2026-01-12)
|
|
215
|
-
|
|
216
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
## [0.2.5](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.4...v0.2.5) (2026-01-12)
|
|
223
|
-
|
|
224
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
## [0.2.4](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.3...v0.2.4) (2026-01-12)
|
|
231
|
-
|
|
232
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
## [0.2.3](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.2...v0.2.3) (2026-01-12)
|
|
239
|
-
|
|
240
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
## [0.2.2](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.1...v0.2.2) (2026-01-12)
|
|
247
|
-
|
|
248
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
## [0.2.1](https://github.com/sprucelabsai-community/regressionproof/compare/v0.2.0...v0.2.1) (2026-01-12)
|
|
255
|
-
|
|
256
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
# [0.2.0](https://github.com/sprucelabsai-community/regressionproof/compare/v0.1.3...v0.2.0) (2026-01-12)
|
|
263
|
-
|
|
264
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
## [0.1.3](https://github.com/sprucelabsai-community/regressionproof/compare/v0.1.2...v0.1.3) (2026-01-12)
|
|
271
|
-
|
|
272
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
## [0.1.2](https://github.com/sprucelabsai-community/regressionproof/compare/v0.1.1...v0.1.2) (2026-01-12)
|
|
279
|
-
|
|
280
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
## [0.1.1](https://github.com/sprucelabsai-community/regressionproof/compare/v0.1.0...v0.1.1) (2026-01-12)
|
|
287
|
-
|
|
288
|
-
**Note:** Version bump only for package @regressionproof/client
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
# 0.1.0 (2026-01-12)
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
### Breaking Changes
|
|
298
|
-
|
|
299
|
-
* restructure to [@regressionproof](https://github.com/regressionproof) workspace ([c24c447](https://github.com/sprucelabsai-community/regressionproof/commit/c24c447))
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
### Bug Fixes
|
|
303
|
-
|
|
304
|
-
* configure package publishing ([fe9f0ca](https://github.com/sprucelabsai-community/regressionproof/commit/fe9f0ca))
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
### Documentation
|
|
308
|
-
|
|
309
|
-
* simplify README, add ARCHITECTURE.md ([8246e6e](https://github.com/sprucelabsai-community/regressionproof/commit/8246e6e))
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
### Features
|
|
313
|
-
|
|
314
|
-
* add helpful error handling when git server is unreachable ([1e2b2c7](https://github.com/sprucelabsai-community/regressionproof/commit/1e2b2c7))
|
|
315
|
-
* add tests package with E2E test infrastructure ([397f3c6](https://github.com/sprucelabsai-community/regressionproof/commit/397f3c6))
|
|
316
|
-
* ESM support and CLI init component ([d60a534](https://github.com/sprucelabsai-community/regressionproof/commit/d60a534))
|
|
317
|
-
* implement SpruceError with typed error codes ([1696b3f](https://github.com/sprucelabsai-community/regressionproof/commit/1696b3f))
|
|
318
|
-
* lerna, CJS builds, slug validation, jest-reporter scaffold ([2516cac](https://github.com/sprucelabsai-community/regressionproof/commit/2516cac))
|
|
319
|
-
* persist project state in Gitea instead of in-memory ([94dbdcc](https://github.com/sprucelabsai-community/regressionproof/commit/94dbdcc))
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
### Refactoring
|
|
323
|
-
|
|
324
|
-
* align with platform conventions ([8b9d5bf](https://github.com/sprucelabsai-community/regressionproof/commit/8b9d5bf))
|
|
325
|
-
* extract CLI business logic into dedicated modules ([dadd01c](https://github.com/sprucelabsai-community/regressionproof/commit/dadd01c))
|
package/eslint.config.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
'message': 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
|
-
'message': {
|
|
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
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
'message': {
|
|
13
|
-
type: 'text',
|
|
14
|
-
isRequired: true,
|
|
15
|
-
options: undefined
|
|
16
|
-
},
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
SchemaRegistry.getInstance().trackSchema(gitServerErrorSchema)
|
|
21
|
-
|
|
22
|
-
export default gitServerErrorSchema
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import SpruceError from './errors/SpruceError'
|
|
2
|
-
|
|
3
|
-
export default class RegressionProofClient {
|
|
4
|
-
private baseUrl: string
|
|
5
|
-
|
|
6
|
-
public constructor(baseUrl: string) {
|
|
7
|
-
this.baseUrl = baseUrl
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public async checkNameAvailability(name: string): Promise<boolean> {
|
|
11
|
-
const response = await fetch(`${this.baseUrl}/check-name/${name}`)
|
|
12
|
-
const { available } = (await response.json()) as { available: boolean }
|
|
13
|
-
return available
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public async registerProject(
|
|
17
|
-
options: RegisterProjectOptions
|
|
18
|
-
): Promise<ProjectCredentials> {
|
|
19
|
-
const response = await fetch(`${this.baseUrl}/register`, {
|
|
20
|
-
method: 'POST',
|
|
21
|
-
headers: {
|
|
22
|
-
'Content-Type': 'application/json',
|
|
23
|
-
},
|
|
24
|
-
body: JSON.stringify(options),
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
if (!response.ok) {
|
|
28
|
-
throw await this.parseErrorResponse(response)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return response.json()
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public async refreshCredentials(
|
|
35
|
-
options: RegisterProjectOptions
|
|
36
|
-
): Promise<ProjectCredentials> {
|
|
37
|
-
const response = await fetch(`${this.baseUrl}/refresh`, {
|
|
38
|
-
method: 'POST',
|
|
39
|
-
headers: {
|
|
40
|
-
'Content-Type': 'application/json',
|
|
41
|
-
},
|
|
42
|
-
body: JSON.stringify(options),
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
if (!response.ok) {
|
|
46
|
-
throw await this.parseErrorResponse(response)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return response.json()
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private async parseErrorResponse(response: Response): Promise<SpruceError> {
|
|
53
|
-
try {
|
|
54
|
-
const body = await response.json()
|
|
55
|
-
if (body.error?.options) {
|
|
56
|
-
return SpruceError.parse(body.error, SpruceError)
|
|
57
|
-
}
|
|
58
|
-
if (body.error?.code) {
|
|
59
|
-
return new SpruceError(body.error)
|
|
60
|
-
}
|
|
61
|
-
return new SpruceError({
|
|
62
|
-
code: 'GIT_SERVER_ERROR',
|
|
63
|
-
message: `${response.statusText}`,
|
|
64
|
-
})
|
|
65
|
-
} catch {
|
|
66
|
-
return new SpruceError({
|
|
67
|
-
code: 'GIT_SERVER_ERROR',
|
|
68
|
-
message: `${response.statusText}`,
|
|
69
|
-
})
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface RegisterProjectOptions {
|
|
75
|
-
name: string
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface ProjectCredentials {
|
|
79
|
-
url: string
|
|
80
|
-
token: string
|
|
81
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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.message}!`
|
|
12
|
-
break
|
|
13
|
-
|
|
14
|
-
default:
|
|
15
|
-
message = super.friendlyMessage()
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const fullMessage = options.friendlyMessage
|
|
19
|
-
? options.friendlyMessage
|
|
20
|
-
: message
|
|
21
|
-
|
|
22
|
-
return fullMessage
|
|
23
|
-
}
|
|
24
|
-
}
|
package/src/index.ts
DELETED
package/tsconfig.dist.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "ES2020",
|
|
4
|
-
"target": "ES6",
|
|
5
|
-
"lib": ["ES2020", "DOM"],
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"declaration": true,
|
|
10
|
-
"noImplicitAny": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"noImplicitReturns": true,
|
|
13
|
-
"strict": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"sourceMap": false,
|
|
17
|
-
"outDir": "./build",
|
|
18
|
-
"baseUrl": "src",
|
|
19
|
-
"experimentalDecorators": true,
|
|
20
|
-
"paths": {
|
|
21
|
-
"#spruce/*": [".spruce/*"]
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"include": ["./src/*.ts", "./src/**/*.ts"],
|
|
25
|
-
"exclude": ["**/node_modules/*", "build/*", "esm/*"]
|
|
26
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"skipLibCheck": true,
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"target": "ES2020",
|
|
7
|
-
"lib": ["DOM", "ES2022"],
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"noImplicitAny": true,
|
|
10
|
-
"allowJs": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"noImplicitReturns": true,
|
|
13
|
-
"strict": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"moduleResolution": "node",
|
|
17
|
-
"sourceMap": false,
|
|
18
|
-
"outDir": "build",
|
|
19
|
-
"baseUrl": "src",
|
|
20
|
-
"experimentalDecorators": true,
|
|
21
|
-
"paths": {
|
|
22
|
-
"#spruce/*": [".spruce/*"]
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"include": ["./src/*.ts", "./src/**/*.ts", "./src/.spruce/**/*"],
|
|
26
|
-
"exclude": ["build", "esm"]
|
|
27
|
-
}
|
|
File without changes
|