@intuitionrobotics/jira 0.43.4 → 0.44.0
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/app-backend/modules/JiraModule.d.ts +2 -1
- package/app-backend/modules/JiraModule.js +20 -33
- package/app-backend/modules/JiraModule.js.map +1 -1
- package/app-backend/modules/utils.js +2 -20
- package/app-backend/modules/utils.js.map +1 -1
- package/index.d.ts +0 -3
- package/index.js +0 -32
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/shared/version.js +0 -18
- package/shared/version.js.map +1 -1
- package/app-backend/core/module-pack.d.ts +0 -1
- package/app-backend/core/module-pack.js +0 -26
- package/app-backend/core/module-pack.js.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Module, TypedMap } from "@intuitionrobotics/ts-common";
|
|
3
2
|
import { JiraIssueText } from "./utils";
|
|
4
3
|
import { JiraVersion } from "../../shared/version";
|
|
4
|
+
import { TypedMap } from "@intuitionrobotics/ts-common/utils/types";
|
|
5
|
+
import { Module } from "@intuitionrobotics/ts-common/core/module";
|
|
5
6
|
declare type Config = {
|
|
6
7
|
auth: JiraAuth;
|
|
7
8
|
defaultAssignee: JiraUser;
|
|
@@ -10,30 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.JiraModule = exports.JiraModule_Class = void 0;
|
|
13
|
-
/*
|
|
14
|
-
* Permissions management system, define access level for each of
|
|
15
|
-
* your server apis, and restrict users by giving them access levels
|
|
16
|
-
*
|
|
17
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
18
|
-
*
|
|
19
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
20
|
-
* you may not use this file except in compliance with the License.
|
|
21
|
-
* You may obtain a copy of the License at
|
|
22
|
-
*
|
|
23
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
24
|
-
*
|
|
25
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
26
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
27
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
28
|
-
* See the License for the specific language governing permissions and
|
|
29
|
-
* limitations under the License.
|
|
30
|
-
*/
|
|
31
|
-
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
32
|
-
const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
|
|
33
|
-
const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
|
|
34
13
|
const utils_1 = require("./utils");
|
|
14
|
+
const module_1 = require("@intuitionrobotics/ts-common/core/module");
|
|
15
|
+
const exceptions_1 = require("@intuitionrobotics/ts-common/core/exceptions");
|
|
16
|
+
const types_1 = require("@intuitionrobotics/thunderstorm/shared/types");
|
|
17
|
+
const promisify_request_1 = require("@intuitionrobotics/thunderstorm/app-backend/utils/promisify-request");
|
|
18
|
+
const exceptions_2 = require("@intuitionrobotics/thunderstorm/app-backend/exceptions");
|
|
35
19
|
const createFormData = (filename, buffer) => ({ file: { value: buffer, options: { filename } } });
|
|
36
|
-
class JiraModule_Class extends
|
|
20
|
+
class JiraModule_Class extends module_1.Module {
|
|
37
21
|
constructor() {
|
|
38
22
|
super("JiraModule");
|
|
39
23
|
this.versions = {};
|
|
@@ -57,7 +41,7 @@ class JiraModule_Class extends ts_common_1.Module {
|
|
|
57
41
|
this.projects = yield this.executeGetRequest(`/project`);
|
|
58
42
|
const project = this.projects.find(_project => _project.key === projectKey);
|
|
59
43
|
if (!project)
|
|
60
|
-
throw new
|
|
44
|
+
throw new exceptions_1.BadImplementationException(`Could not find project: ${projectKey}`);
|
|
61
45
|
return project;
|
|
62
46
|
})
|
|
63
47
|
};
|
|
@@ -68,7 +52,10 @@ class JiraModule_Class extends ts_common_1.Module {
|
|
|
68
52
|
return this.versions[projectId].find(version => version.name === versionName);
|
|
69
53
|
}),
|
|
70
54
|
create: (projectId, versionName) => __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
const version = yield this.executePostRequest(`/version`, {
|
|
55
|
+
const version = yield this.executePostRequest(`/version`, {
|
|
56
|
+
projectId,
|
|
57
|
+
name: versionName
|
|
58
|
+
});
|
|
72
59
|
this.versions[projectId].push(version);
|
|
73
60
|
return version;
|
|
74
61
|
})
|
|
@@ -130,24 +117,24 @@ class JiraModule_Class extends ts_common_1.Module {
|
|
|
130
117
|
headers: this.getHeadersForm(),
|
|
131
118
|
url: `${this.getRestUrl()}${url}`,
|
|
132
119
|
data: createFormData('logs.zip', buffer),
|
|
133
|
-
method:
|
|
120
|
+
method: types_1.HttpMethod.POST
|
|
134
121
|
};
|
|
135
122
|
return this.executeRequest(request);
|
|
136
123
|
});
|
|
137
124
|
}
|
|
138
125
|
getHeadersJson() {
|
|
139
126
|
if (!this.config.auth || !this.config.auth.apiKey || !this.config.auth.email)
|
|
140
|
-
throw new
|
|
127
|
+
throw new exceptions_1.ImplementationMissingException('Missing auth config variables for JiraModule');
|
|
141
128
|
return this.buildHeaders(this.config.auth, true);
|
|
142
129
|
}
|
|
143
130
|
getHeadersForm() {
|
|
144
131
|
if (!this.config.auth || !this.config.auth.apiKey || !this.config.auth.email)
|
|
145
|
-
throw new
|
|
132
|
+
throw new exceptions_1.ImplementationMissingException('Missing auth config variables for JiraModule');
|
|
146
133
|
return this.buildHeaders(this.config.auth, false);
|
|
147
134
|
}
|
|
148
135
|
getRestUrl() {
|
|
149
136
|
if (!this.config.baseUrl)
|
|
150
|
-
throw new
|
|
137
|
+
throw new exceptions_1.ImplementationMissingException("Missing Jira baseUrl for JiraModule, please add the key baseUrl to the config");
|
|
151
138
|
return this.config.baseUrl + '/rest/api/3';
|
|
152
139
|
}
|
|
153
140
|
executePostRequest(url, body, label) {
|
|
@@ -156,7 +143,7 @@ class JiraModule_Class extends ts_common_1.Module {
|
|
|
156
143
|
headers: this.getHeadersJson(),
|
|
157
144
|
url: `${this.getRestUrl()}${url}`,
|
|
158
145
|
data: body,
|
|
159
|
-
method:
|
|
146
|
+
method: types_1.HttpMethod.POST,
|
|
160
147
|
responseType: 'json'
|
|
161
148
|
};
|
|
162
149
|
return this.executeRequest(request);
|
|
@@ -168,7 +155,7 @@ class JiraModule_Class extends ts_common_1.Module {
|
|
|
168
155
|
headers: this.getHeadersJson(),
|
|
169
156
|
url: `${this.getRestUrl()}${url}`,
|
|
170
157
|
data: body,
|
|
171
|
-
method:
|
|
158
|
+
method: types_1.HttpMethod.PUT,
|
|
172
159
|
responseType: 'json'
|
|
173
160
|
};
|
|
174
161
|
return this.executeRequest(request);
|
|
@@ -185,7 +172,7 @@ class JiraModule_Class extends ts_common_1.Module {
|
|
|
185
172
|
const request = {
|
|
186
173
|
headers: this.getHeadersJson(),
|
|
187
174
|
url: `${this.getRestUrl()}${url}${urlParams}`,
|
|
188
|
-
method:
|
|
175
|
+
method: types_1.HttpMethod.GET,
|
|
189
176
|
responseType: "json"
|
|
190
177
|
};
|
|
191
178
|
return this.executeRequest(request);
|
|
@@ -193,11 +180,11 @@ class JiraModule_Class extends ts_common_1.Module {
|
|
|
193
180
|
}
|
|
194
181
|
executeRequest(request) {
|
|
195
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
-
const response = yield
|
|
183
|
+
const response = yield promisify_request_1.promisifyRequest(request);
|
|
197
184
|
const statusCode = response.status;
|
|
198
185
|
// TODO: need to handle 1XX and 3XX
|
|
199
186
|
if (statusCode < 200 || statusCode >= 300)
|
|
200
|
-
throw new
|
|
187
|
+
throw new exceptions_2.ApiException(statusCode, response.data);
|
|
201
188
|
return response.data;
|
|
202
189
|
});
|
|
203
190
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JiraModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/JiraModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"JiraModule.js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,YAAY,EAAE,MAAM;aACvB,CAAC;YAEF,OAAO,IAAI,CAAC,cAAc,CAAI,OAAO,CAAC,CAAC;QAC3C,CAAC;KAAA;IAEa,cAAc,CAAI,OAA2B;;YACvD,MAAM,QAAQ,GAAG,MAAM,oCAAgB,CAAC,OAAO,CAAC,CAAC;YACjD,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;YACnC,mCAAmC;YACnC,IAAI,UAAU,GAAG,GAAG,IAAI,UAAU,IAAI,GAAG;gBACrC,MAAM,IAAI,yBAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;YAEtD,OAAO,QAAQ,CAAC,IAAS,CAAA;QAC7B,CAAC;KAAA;CACJ;AAtMD,4CAsMC;AAEY,QAAA,UAAU,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
3
|
exports.JiraUtils = void 0;
|
|
22
|
-
const
|
|
4
|
+
const object_tools_1 = require("@intuitionrobotics/ts-common/utils/object-tools");
|
|
23
5
|
function createText(...texts) {
|
|
24
6
|
return {
|
|
25
7
|
type: "doc",
|
|
@@ -51,7 +33,7 @@ function createText(...texts) {
|
|
|
51
33
|
};
|
|
52
34
|
}
|
|
53
35
|
function buildJQL(query) {
|
|
54
|
-
const params =
|
|
36
|
+
const params = object_tools_1._keys(query).map((key) => {
|
|
55
37
|
let queryValue;
|
|
56
38
|
let operator = '=';
|
|
57
39
|
if (Array.isArray(query[key])) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/utils.ts"],"names":[],"mappings":";;;AAAA,kFAAsE;AAKtE,SAAS,UAAU,CAAC,GAAG,KAAsB;IACzC,OAAO;QACH,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC;QACV,OAAO,EAAE;YACL;gBACI,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBACtB,IAAI,OAAO,IAAI,KAAK,QAAQ;wBACxB,OAAO;4BACH,IAAI,EAAE,MAAM;4BACZ,IAAI;yBACP,CAAC;oBAEN,OAAO;wBACH,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,KAAK,EAAE;4BACH;gCACI,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE;oCACH,IAAI,EAAE,IAAI,CAAC,IAAI;iCAClB;6BACJ;yBACJ;qBACJ,CAAA;gBAEL,CAAC,CAAC;aACL;SACJ;KACJ,CAAC;AACN,CAAC;AAED,SAAS,QAAQ,CAAC,KAAgB;IAC9B,MAAM,MAAM,GAAG,oBAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACpC,IAAI,UAAU,CAAC;QACf,IAAI,QAAQ,GAAG,GAAG,CAAC;QACnB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE;YAC3B,UAAU,GAAI,KAAK,CAAC,GAAG,CAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC3E,UAAU,GAAG,IAAI,UAAU,GAAG,CAAC;SAClC;aAAM,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE;YACvC,MAAM,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAA0B,CAAC;YAClE,UAAU,GAAG,IAAI,qBAAqB,CAAC,KAAK,GAAG,CAAA;YAC/C,QAAQ,GAAG,qBAAqB,CAAC,QAAQ,CAAC;SAC7C;;YACG,UAAU,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;QAEnC,OAAO,GAAG,GAAG,GAAG,QAAQ,GAAG,UAAU,EAAE,CAAC;IAC5C,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAAA,CAAC;AAEW,QAAA,SAAS,GAAG;IACrB,UAAU;IACV,QAAQ;CACX,CAAC"}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,34 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
23
|
-
}) : (function(o, m, k, k2) {
|
|
24
|
-
if (k2 === undefined) k2 = k;
|
|
25
|
-
o[k2] = m[k];
|
|
26
|
-
}));
|
|
27
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
|
-
};
|
|
30
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
__exportStar(require("./app-backend/core/module-pack"), exports);
|
|
32
|
-
__exportStar(require("./app-backend/modules/JiraModule"), exports);
|
|
33
|
-
__exportStar(require("./app-backend/modules/utils"), exports);
|
|
34
2
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuitionrobotics/jira",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"description": "Jira api Module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"IR",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"main": "./index.js",
|
|
19
19
|
"types": "./index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@intuitionrobotics/ts-common": "~0.
|
|
22
|
-
"@intuitionrobotics/thunderstorm": "~0.
|
|
21
|
+
"@intuitionrobotics/ts-common": "~0.44.0",
|
|
22
|
+
"@intuitionrobotics/thunderstorm": "~0.44.0",
|
|
23
23
|
"axios": "^1.4.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
package/shared/version.js
CHANGED
|
@@ -1,21 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
3
|
//# sourceMappingURL=version.js.map
|
package/shared/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/main/shared/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/main/shared/version.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Backend_ModulePack_Jira: import("../..").JiraModule_Class[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Permissions management system, define access level for each of
|
|
4
|
-
* your server apis, and restrict users by giving them access levels
|
|
5
|
-
*
|
|
6
|
-
* Copyright (C) 2020 Intuition Robotics
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.Backend_ModulePack_Jira = void 0;
|
|
22
|
-
const __1 = require("../..");
|
|
23
|
-
exports.Backend_ModulePack_Jira = [
|
|
24
|
-
__1.JiraModule
|
|
25
|
-
];
|
|
26
|
-
//# sourceMappingURL=module-pack.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,6BAAiC;AAEpB,QAAA,uBAAuB,GAAG;IACtC,cAAU;CACV,CAAC"}
|