@sprucelabs/jest-jira-reporter 1.0.5 → 1.0.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 +9 -12
- package/build/.spruce/errors/jestJiraReporter/transitionNotFound.schema.js +3 -8
- package/build/.spruce/errors/options.types.d.ts +2 -2
- package/build/.spruce/schemas/fields/fields.types.d.ts +1 -1
- package/build/JestReporter.js +5 -9
- package/build/errors/SpruceError.js +1 -1
- package/build/esm/.spruce/errors/errors.types.d.ts +9 -12
- package/build/esm/.spruce/errors/options.types.d.ts +2 -2
- package/package.json +9 -9
|
@@ -3,7 +3,7 @@ import * as SpruceSchema from '@sprucelabs/schema';
|
|
|
3
3
|
export declare namespace SpruceErrors.JestJiraReporter {
|
|
4
4
|
interface TransitionNotFound {
|
|
5
5
|
/** Transition. */
|
|
6
|
-
transition:
|
|
6
|
+
'transition': ("In Progress" | "Done");
|
|
7
7
|
}
|
|
8
8
|
interface TransitionNotFoundSchema extends SpruceSchema.Schema {
|
|
9
9
|
id: 'transitionNotFound';
|
|
@@ -11,21 +11,18 @@ export declare namespace SpruceErrors.JestJiraReporter {
|
|
|
11
11
|
name: 'Transition not found';
|
|
12
12
|
fields: {
|
|
13
13
|
/** Transition. */
|
|
14
|
-
transition: {
|
|
14
|
+
'transition': {
|
|
15
15
|
label: 'Transition';
|
|
16
16
|
type: 'select';
|
|
17
17
|
isRequired: true;
|
|
18
18
|
options: {
|
|
19
|
-
choices: [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
label: 'Done';
|
|
27
|
-
}
|
|
28
|
-
];
|
|
19
|
+
choices: [{
|
|
20
|
+
"value": "In Progress";
|
|
21
|
+
"label": "In Progress";
|
|
22
|
+
}, {
|
|
23
|
+
"value": "Done";
|
|
24
|
+
"label": "Done";
|
|
25
|
+
}];
|
|
29
26
|
};
|
|
30
27
|
};
|
|
31
28
|
};
|
|
@@ -7,18 +7,13 @@ const transitionNotFoundSchema = {
|
|
|
7
7
|
name: 'Transition not found',
|
|
8
8
|
fields: {
|
|
9
9
|
/** Transition. */
|
|
10
|
-
transition: {
|
|
10
|
+
'transition': {
|
|
11
11
|
label: 'Transition',
|
|
12
12
|
type: 'select',
|
|
13
13
|
isRequired: true,
|
|
14
|
-
options: {
|
|
15
|
-
choices: [
|
|
16
|
-
{ value: 'In Progress', label: 'In Progress' },
|
|
17
|
-
{ value: 'Done', label: 'Done' },
|
|
18
|
-
],
|
|
19
|
-
},
|
|
14
|
+
options: { choices: [{ "value": "In Progress", "label": "In Progress" }, { "value": "Done", "label": "Done" }], }
|
|
20
15
|
},
|
|
21
|
-
}
|
|
16
|
+
}
|
|
22
17
|
};
|
|
23
18
|
schema_1.SchemaRegistry.getInstance().trackSchema(transitionNotFoundSchema);
|
|
24
19
|
exports.default = transitionNotFoundSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SpruceErrors } from "./errors.types";
|
|
2
|
+
import { ErrorOptions as ISpruceErrorOptions } from "@sprucelabs/error";
|
|
3
3
|
export interface TransitionNotFoundErrorOptions extends SpruceErrors.JestJiraReporter.TransitionNotFound, ISpruceErrorOptions {
|
|
4
4
|
code: 'TRANSITION_NOT_FOUND';
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap
|
|
1
|
+
export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap } from '@sprucelabs/schema';
|
package/build/JestReporter.js
CHANGED
|
@@ -7,16 +7,11 @@ const schema_1 = require("@sprucelabs/schema");
|
|
|
7
7
|
const jira_client_1 = __importDefault(require("jira-client"));
|
|
8
8
|
const SpruceError_1 = __importDefault(require("./errors/SpruceError"));
|
|
9
9
|
class JestReporter {
|
|
10
|
-
client;
|
|
11
|
-
static JiraApi = jira_client_1.default;
|
|
12
|
-
testMap;
|
|
13
|
-
statusMap = {
|
|
14
|
-
passed: 'Done',
|
|
15
|
-
failed: 'In Progress',
|
|
16
|
-
};
|
|
17
|
-
transitions;
|
|
18
|
-
transitionLoadPromise;
|
|
19
10
|
constructor(options) {
|
|
11
|
+
this.statusMap = {
|
|
12
|
+
passed: 'Done',
|
|
13
|
+
failed: 'In Progress',
|
|
14
|
+
};
|
|
20
15
|
const username = process.env.JIRA_USERNAME;
|
|
21
16
|
const password = process.env.JIRA_PASSWORD;
|
|
22
17
|
const { protocol, host, apiVersion, strictSSL, testMap } = (0, schema_1.assertOptions)({ ...options, env: process.env }, [
|
|
@@ -80,4 +75,5 @@ class JestReporter {
|
|
|
80
75
|
return this.testMap[title];
|
|
81
76
|
}
|
|
82
77
|
}
|
|
78
|
+
JestReporter.JiraApi = jira_client_1.default;
|
|
83
79
|
exports.default = JestReporter;
|
|
@@ -9,7 +9,7 @@ class SpruceError extends error_1.default {
|
|
|
9
9
|
friendlyMessage() {
|
|
10
10
|
const { options } = this;
|
|
11
11
|
let message;
|
|
12
|
-
switch (options
|
|
12
|
+
switch (options === null || options === void 0 ? void 0 : options.code) {
|
|
13
13
|
case 'TRANSITION_NOT_FOUND':
|
|
14
14
|
message = 'A Transition not found just happened!';
|
|
15
15
|
break;
|
|
@@ -3,7 +3,7 @@ import * as SpruceSchema from '@sprucelabs/schema';
|
|
|
3
3
|
export declare namespace SpruceErrors.JestJiraReporter {
|
|
4
4
|
interface TransitionNotFound {
|
|
5
5
|
/** Transition. */
|
|
6
|
-
transition:
|
|
6
|
+
'transition': ("In Progress" | "Done");
|
|
7
7
|
}
|
|
8
8
|
interface TransitionNotFoundSchema extends SpruceSchema.Schema {
|
|
9
9
|
id: 'transitionNotFound';
|
|
@@ -11,21 +11,18 @@ export declare namespace SpruceErrors.JestJiraReporter {
|
|
|
11
11
|
name: 'Transition not found';
|
|
12
12
|
fields: {
|
|
13
13
|
/** Transition. */
|
|
14
|
-
transition: {
|
|
14
|
+
'transition': {
|
|
15
15
|
label: 'Transition';
|
|
16
16
|
type: 'select';
|
|
17
17
|
isRequired: true;
|
|
18
18
|
options: {
|
|
19
|
-
choices: [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
label: 'Done';
|
|
27
|
-
}
|
|
28
|
-
];
|
|
19
|
+
choices: [{
|
|
20
|
+
"value": "In Progress";
|
|
21
|
+
"label": "In Progress";
|
|
22
|
+
}, {
|
|
23
|
+
"value": "Done";
|
|
24
|
+
"label": "Done";
|
|
25
|
+
}];
|
|
29
26
|
};
|
|
30
27
|
};
|
|
31
28
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SpruceErrors } from "./errors.types";
|
|
2
|
+
import { ErrorOptions as ISpruceErrorOptions } from "@sprucelabs/error";
|
|
3
3
|
export interface TransitionNotFoundErrorOptions extends SpruceErrors.JestJiraReporter.TransitionNotFound, ISpruceErrorOptions {
|
|
4
4
|
code: 'TRANSITION_NOT_FOUND';
|
|
5
5
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sprucelabs/jest-jira-reporter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"files": [
|
|
5
5
|
"build"
|
|
6
6
|
],
|
|
@@ -51,20 +51,20 @@
|
|
|
51
51
|
"watch.tsc": "tsc -w"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@sprucelabs/esm-postbuild": "^6.0.
|
|
55
|
-
"@sprucelabs/jest-json-reporter": "^8.0.
|
|
56
|
-
"@sprucelabs/resolve-path-aliases": "^2.0.
|
|
54
|
+
"@sprucelabs/esm-postbuild": "^6.0.9",
|
|
55
|
+
"@sprucelabs/jest-json-reporter": "^8.0.8",
|
|
56
|
+
"@sprucelabs/resolve-path-aliases": "^2.0.11",
|
|
57
57
|
"@sprucelabs/semantic-release": "^5.0.1",
|
|
58
58
|
"@sprucelabs/spruce-test-fixtures": "^61.1.35",
|
|
59
|
-
"@sprucelabs/test": "^9.0.
|
|
60
|
-
"@sprucelabs/test-utils": "^5.0.
|
|
59
|
+
"@sprucelabs/test": "^9.0.8",
|
|
60
|
+
"@sprucelabs/test-utils": "^5.0.10",
|
|
61
61
|
"@types/jira-client": "^7.1.9",
|
|
62
62
|
"@types/node": "^20.12.7",
|
|
63
63
|
"@types/photoshop": "^25.0.4",
|
|
64
64
|
"chokidar-cli": "^3.0.0",
|
|
65
65
|
"concurrently": "^8.2.2",
|
|
66
66
|
"eslint": "^9.1.1",
|
|
67
|
-
"eslint-config-spruce": "^11.2.
|
|
67
|
+
"eslint-config-spruce": "^11.2.13",
|
|
68
68
|
"jest": "^29.7.0",
|
|
69
69
|
"jest-circus": "^29.7.0",
|
|
70
70
|
"prettier": "^3.2.5",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@sprucelabs/error": "^6.0.
|
|
96
|
-
"@sprucelabs/schema": "^30.0.
|
|
95
|
+
"@sprucelabs/error": "^6.0.10",
|
|
96
|
+
"@sprucelabs/schema": "^30.0.14",
|
|
97
97
|
"@sprucelabs/spruce-core-schemas": "^39.0.294",
|
|
98
98
|
"@sprucelabs/spruce-skill-utils": "^30.4.29",
|
|
99
99
|
"jira-client": "^8.2.2"
|