@intuitionrobotics/jira 0.46.0 → 0.47.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/core/module-pack.d.ts +1 -0
- package/app-backend/core/module-pack.js +26 -0
- package/app-backend/core/module-pack.js.map +1 -0
- package/app-backend/modules/JiraModule.d.ts +19 -20
- package/app-backend/modules/JiraModule.js +33 -20
- package/app-backend/modules/JiraModule.js.map +1 -1
- package/app-backend/modules/utils.d.ts +1 -1
- package/app-backend/modules/utils.js +20 -2
- package/app-backend/modules/utils.js.map +1 -1
- package/index.d.ts +3 -0
- package/index.js +36 -0
- package/index.js.map +1 -1
- package/package.json +7 -4
- package/shared/version.d.ts +3 -3
- package/shared/version.js +18 -0
- package/shared/version.js.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Backend_ModulePack_Jira: import("../..").JiraModule_Class[];
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import { Module, TypedMap } from "@intuitionrobotics/ts-common";
|
|
2
3
|
import { JiraIssueText } from "./utils";
|
|
3
4
|
import { JiraVersion } from "../../shared/version";
|
|
4
|
-
|
|
5
|
-
import { Module } from "@intuitionrobotics/ts-common/core/module";
|
|
6
|
-
declare type Config = {
|
|
5
|
+
type Config = {
|
|
7
6
|
auth: JiraAuth;
|
|
8
7
|
defaultAssignee: JiraUser;
|
|
9
8
|
baseUrl?: string;
|
|
10
9
|
};
|
|
11
|
-
|
|
10
|
+
type JiraAuth = {
|
|
12
11
|
email: string;
|
|
13
12
|
apiKey: string;
|
|
14
13
|
};
|
|
15
|
-
|
|
14
|
+
type JiraUser = {
|
|
16
15
|
accountId: string;
|
|
17
16
|
name?: string;
|
|
18
17
|
email?: string;
|
|
19
18
|
};
|
|
20
|
-
|
|
19
|
+
type JiraMark = {
|
|
21
20
|
type: string;
|
|
22
21
|
attrs: {
|
|
23
22
|
href: string;
|
|
24
23
|
};
|
|
25
24
|
};
|
|
26
|
-
|
|
25
|
+
type JiraContent = {
|
|
27
26
|
type: "paragraph" | string;
|
|
28
27
|
text?: string;
|
|
29
28
|
marks?: JiraMark[];
|
|
30
29
|
content?: JiraContent[];
|
|
31
30
|
};
|
|
32
|
-
|
|
31
|
+
type JiraDescription = string | {
|
|
33
32
|
type: "doc" | string;
|
|
34
33
|
version: number;
|
|
35
34
|
content: JiraContent[];
|
|
36
35
|
};
|
|
37
|
-
export
|
|
36
|
+
export type JiraIssue_Fields = {
|
|
38
37
|
project: JiraProject;
|
|
39
38
|
issuetype: IssueType;
|
|
40
39
|
description: JiraDescription;
|
|
@@ -43,50 +42,50 @@ export declare type JiraIssue_Fields = {
|
|
|
43
42
|
id: string;
|
|
44
43
|
};
|
|
45
44
|
} & TypedMap<any>;
|
|
46
|
-
export
|
|
45
|
+
export type IssueType = {
|
|
47
46
|
id?: string;
|
|
48
47
|
name: string;
|
|
49
48
|
};
|
|
50
|
-
export
|
|
49
|
+
export type LabelType = {
|
|
51
50
|
label: string[];
|
|
52
51
|
};
|
|
53
|
-
export
|
|
52
|
+
export type JiraProject = {
|
|
54
53
|
id: string;
|
|
55
54
|
name: string;
|
|
56
55
|
key: string;
|
|
57
56
|
};
|
|
58
|
-
export
|
|
57
|
+
export type BaseIssue = {
|
|
59
58
|
id: string;
|
|
60
59
|
key: string;
|
|
61
60
|
self: string;
|
|
62
61
|
url: string;
|
|
63
62
|
};
|
|
64
|
-
export
|
|
63
|
+
export type JiraIssue = BaseIssue & {
|
|
65
64
|
expand: string;
|
|
66
65
|
fields: JiraIssue_Fields;
|
|
67
66
|
};
|
|
68
|
-
export
|
|
67
|
+
export type FixVersionType = {
|
|
69
68
|
fixVersions: {
|
|
70
69
|
name: string;
|
|
71
70
|
}[];
|
|
72
71
|
};
|
|
73
|
-
export
|
|
72
|
+
export type QueryItemWithOperator = {
|
|
74
73
|
value: string;
|
|
75
74
|
operator: string;
|
|
76
75
|
};
|
|
77
|
-
export
|
|
76
|
+
export type JiraQuery = TypedMap<string | string[] | QueryItemWithOperator> & {
|
|
78
77
|
status?: string | string[];
|
|
79
78
|
project?: string | string[];
|
|
80
79
|
fixVersion?: string | string[];
|
|
81
80
|
};
|
|
82
|
-
export
|
|
81
|
+
export type JiraResponse_IssuesQuery = {
|
|
83
82
|
expand: string;
|
|
84
83
|
startAt: number;
|
|
85
84
|
maxResults: number;
|
|
86
85
|
total: number;
|
|
87
86
|
issues: JiraIssue[];
|
|
88
87
|
};
|
|
89
|
-
export
|
|
88
|
+
export type ResponsePostIssue = BaseIssue;
|
|
90
89
|
export declare class JiraModule_Class extends Module<Config> {
|
|
91
90
|
private projects;
|
|
92
91
|
private versions;
|
|
@@ -111,7 +110,7 @@ export declare class JiraModule_Class extends Module<Config> {
|
|
|
111
110
|
comment: {
|
|
112
111
|
add: (issueKey: string, comment: string) => Promise<unknown>;
|
|
113
112
|
};
|
|
114
|
-
create: (project: JiraProject, issueType: IssueType, summary: string, descriptions: JiraIssueText[], label?: string[]
|
|
113
|
+
create: (project: JiraProject, issueType: IssueType, summary: string, descriptions: JiraIssueText[], label?: string[]) => Promise<ResponsePostIssue>;
|
|
115
114
|
update: (issueKey: string, fields: Partial<JiraIssue_Fields>) => Promise<unknown>;
|
|
116
115
|
resolve: (issueKey: string, projectKey: string, versionName: string, status: string) => Promise<unknown>;
|
|
117
116
|
};
|
|
@@ -10,14 +10,30 @@ 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");
|
|
13
34
|
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");
|
|
19
35
|
const createFormData = (filename, buffer) => ({ file: { value: buffer, options: { filename } } });
|
|
20
|
-
class JiraModule_Class extends
|
|
36
|
+
class JiraModule_Class extends ts_common_1.Module {
|
|
21
37
|
constructor() {
|
|
22
38
|
super("JiraModule");
|
|
23
39
|
this.versions = {};
|
|
@@ -41,7 +57,7 @@ class JiraModule_Class extends module_1.Module {
|
|
|
41
57
|
this.projects = yield this.executeGetRequest(`/project`);
|
|
42
58
|
const project = this.projects.find(_project => _project.key === projectKey);
|
|
43
59
|
if (!project)
|
|
44
|
-
throw new
|
|
60
|
+
throw new ts_common_1.BadImplementationException(`Could not find project: ${projectKey}`);
|
|
45
61
|
return project;
|
|
46
62
|
})
|
|
47
63
|
};
|
|
@@ -52,10 +68,7 @@ class JiraModule_Class extends module_1.Module {
|
|
|
52
68
|
return this.versions[projectId].find(version => version.name === versionName);
|
|
53
69
|
}),
|
|
54
70
|
create: (projectId, versionName) => __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
const version = yield this.executePostRequest(`/version`, {
|
|
56
|
-
projectId,
|
|
57
|
-
name: versionName
|
|
58
|
-
});
|
|
71
|
+
const version = yield this.executePostRequest(`/version`, { projectId, name: versionName });
|
|
59
72
|
this.versions[projectId].push(version);
|
|
60
73
|
return version;
|
|
61
74
|
})
|
|
@@ -117,24 +130,24 @@ class JiraModule_Class extends module_1.Module {
|
|
|
117
130
|
headers: this.getHeadersForm(),
|
|
118
131
|
url: `${this.getRestUrl()}${url}`,
|
|
119
132
|
data: createFormData('logs.zip', buffer),
|
|
120
|
-
method:
|
|
133
|
+
method: thunderstorm_1.HttpMethod.POST
|
|
121
134
|
};
|
|
122
135
|
return this.executeRequest(request);
|
|
123
136
|
});
|
|
124
137
|
}
|
|
125
138
|
getHeadersJson() {
|
|
126
139
|
if (!this.config.auth || !this.config.auth.apiKey || !this.config.auth.email)
|
|
127
|
-
throw new
|
|
140
|
+
throw new ts_common_1.ImplementationMissingException('Missing auth config variables for JiraModule');
|
|
128
141
|
return this.buildHeaders(this.config.auth, true);
|
|
129
142
|
}
|
|
130
143
|
getHeadersForm() {
|
|
131
144
|
if (!this.config.auth || !this.config.auth.apiKey || !this.config.auth.email)
|
|
132
|
-
throw new
|
|
145
|
+
throw new ts_common_1.ImplementationMissingException('Missing auth config variables for JiraModule');
|
|
133
146
|
return this.buildHeaders(this.config.auth, false);
|
|
134
147
|
}
|
|
135
148
|
getRestUrl() {
|
|
136
149
|
if (!this.config.baseUrl)
|
|
137
|
-
throw new
|
|
150
|
+
throw new ts_common_1.ImplementationMissingException("Missing Jira baseUrl for JiraModule, please add the key baseUrl to the config");
|
|
138
151
|
return this.config.baseUrl + '/rest/api/3';
|
|
139
152
|
}
|
|
140
153
|
executePostRequest(url, body, label) {
|
|
@@ -143,7 +156,7 @@ class JiraModule_Class extends module_1.Module {
|
|
|
143
156
|
headers: this.getHeadersJson(),
|
|
144
157
|
url: `${this.getRestUrl()}${url}`,
|
|
145
158
|
data: body,
|
|
146
|
-
method:
|
|
159
|
+
method: thunderstorm_1.HttpMethod.POST,
|
|
147
160
|
responseType: 'json'
|
|
148
161
|
};
|
|
149
162
|
return this.executeRequest(request);
|
|
@@ -155,7 +168,7 @@ class JiraModule_Class extends module_1.Module {
|
|
|
155
168
|
headers: this.getHeadersJson(),
|
|
156
169
|
url: `${this.getRestUrl()}${url}`,
|
|
157
170
|
data: body,
|
|
158
|
-
method:
|
|
171
|
+
method: thunderstorm_1.HttpMethod.PUT,
|
|
159
172
|
responseType: 'json'
|
|
160
173
|
};
|
|
161
174
|
return this.executeRequest(request);
|
|
@@ -172,7 +185,7 @@ class JiraModule_Class extends module_1.Module {
|
|
|
172
185
|
const request = {
|
|
173
186
|
headers: this.getHeadersJson(),
|
|
174
187
|
url: `${this.getRestUrl()}${url}${urlParams}`,
|
|
175
|
-
method:
|
|
188
|
+
method: thunderstorm_1.HttpMethod.GET,
|
|
176
189
|
responseType: "json"
|
|
177
190
|
};
|
|
178
191
|
return this.executeRequest(request);
|
|
@@ -180,11 +193,11 @@ class JiraModule_Class extends module_1.Module {
|
|
|
180
193
|
}
|
|
181
194
|
executeRequest(request) {
|
|
182
195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
-
const response = yield
|
|
196
|
+
const response = yield (0, backend_1.promisifyRequest)(request);
|
|
184
197
|
const statusCode = response.status;
|
|
185
198
|
// TODO: need to handle 1XX and 3XX
|
|
186
199
|
if (statusCode < 200 || statusCode >= 300)
|
|
187
|
-
throw new
|
|
200
|
+
throw new backend_1.ApiException(statusCode, response.data);
|
|
188
201
|
return response.data;
|
|
189
202
|
});
|
|
190
203
|
}
|
|
@@ -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","sourceRoot":"","sources":["../../../src/main/app-backend/modules/JiraModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,4DAMsC;AACtC,qEAGiD;AACjD,kEAA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OAA2B;;YAC1D,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAgB,EAAC,OAAO,CAAC,CAAC;YACjD,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;YACnC,mCAAmC;YACnC,IAAI,UAAU,GAAG,GAAG,IAAI,UAAU,IAAI,GAAG;gBACxC,MAAM,IAAI,sBAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;YAEnD,OAAO,QAAQ,CAAC,IAAS,CAAA;QAC1B,CAAC;KAAA;CACD;AA/LD,4CA+LC;AAEY,QAAA,UAAU,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,7 +1,25 @@
|
|
|
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
|
+
*/
|
|
2
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
21
|
exports.JiraUtils = void 0;
|
|
4
|
-
const
|
|
22
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
5
23
|
function createText(...texts) {
|
|
6
24
|
return {
|
|
7
25
|
type: "doc",
|
|
@@ -33,7 +51,7 @@ function createText(...texts) {
|
|
|
33
51
|
};
|
|
34
52
|
}
|
|
35
53
|
function buildJQL(query) {
|
|
36
|
-
const params =
|
|
54
|
+
const params = (0, ts_common_1._keys)(query).map((key) => {
|
|
37
55
|
let queryValue;
|
|
38
56
|
let operator = '=';
|
|
39
57
|
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;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,4DAAmD;AAQnD,SAAS,UAAU,CAAC,GAAG,KAAsB;IAC5C,OAAO;QACN,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC;QACV,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;oBACzB,IAAI,OAAO,IAAI,KAAK,QAAQ;wBAC3B,OAAO;4BACN,IAAI,EAAE,MAAM;4BACZ,IAAI;yBACJ,CAAC;oBAEH,OAAQ;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,KAAK,EAAE;4BACN;gCACC,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE;oCACN,IAAI,EAAE,IAAI,CAAC,IAAI;iCACf;6BACD;yBACD;qBACD,CAAA;gBAEF,CAAC,CAAC;aACF;SACD;KACD,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,KAAgB;IACjC,MAAM,MAAM,GAAG,IAAA,iBAAK,EAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACvC,IAAI,UAAU,CAAC;QACf,IAAI,QAAQ,GAAG,GAAG,CAAC;QACnB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YAC/B,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;QAChC,CAAC;aAAM,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC3C,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;QAC3C,CAAC;;YACA,UAAU,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;QAEhC,OAAO,GAAG,GAAG,GAAG,QAAQ,GAAG,UAAU,EAAE,CAAC;IACzC,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7B,CAAC;AAAA,CAAC;AAEW,QAAA,SAAS,GAAG;IACxB,UAAU;IACV,QAAQ;CACR,CAAC"}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,2 +1,38 @@
|
|
|
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
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
__exportStar(require("./app-backend/core/module-pack"), exports);
|
|
36
|
+
__exportStar(require("./app-backend/modules/JiraModule"), exports);
|
|
37
|
+
__exportStar(require("./app-backend/modules/utils"), exports);
|
|
2
38
|
//# 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":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;AAEH,iEAA+C;AAE/C,mEAAiD;AACjD,8DAA4C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuitionrobotics/jira",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Jira api Module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"IR",
|
|
@@ -17,16 +17,19 @@
|
|
|
17
17
|
"author": "IR",
|
|
18
18
|
"main": "./index.js",
|
|
19
19
|
"types": "./index.d.ts",
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc -v && tsc -p src/main/tsconfig.json --rootDir ./src/main --outDir dist"
|
|
22
|
+
},
|
|
20
23
|
"dependencies": {
|
|
21
|
-
"@intuitionrobotics/ts-common": "~0.
|
|
22
|
-
"@intuitionrobotics/thunderstorm": "~0.
|
|
24
|
+
"@intuitionrobotics/ts-common": "~0.47.0",
|
|
25
|
+
"@intuitionrobotics/thunderstorm": "~0.47.0",
|
|
23
26
|
"axios": "^1.4.0"
|
|
24
27
|
},
|
|
25
28
|
"devDependencies": {
|
|
26
29
|
"@types/node": "^16.0.0",
|
|
27
30
|
"module-alias": "^2.2.0",
|
|
28
31
|
"ts-node": "^8.6.2",
|
|
29
|
-
"typescript": "
|
|
32
|
+
"typescript": "^5.3.0"
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
|
package/shared/version.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type JiraVersion_Create = {
|
|
2
2
|
archive?: boolean;
|
|
3
3
|
released?: boolean;
|
|
4
4
|
name: string;
|
|
5
5
|
projectId: string;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type JiraVersion = JiraVersion_Create & {
|
|
8
8
|
self: string;
|
|
9
9
|
archive: boolean;
|
|
10
10
|
released: boolean;
|
|
11
11
|
id: string;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type JiraVersion_Update = Omit<JiraVersion, "self">;
|
package/shared/version.js
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
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
|
+
*/
|
|
2
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
21
|
//# 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":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
|