@intuitionrobotics/github 0.46.0 → 0.47.1
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/GithubModule.d.ts +3 -3
- package/app-backend/modules/GithubModule.js +43 -27
- package/app-backend/modules/GithubModule.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +17 -0
- package/index.js.map +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Backend_ModulePack_Github: import("../modules/GithubModule").GithubModule_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_Github = void 0;
|
|
22
|
+
const GithubModule_1 = require("../modules/GithubModule");
|
|
23
|
+
exports.Backend_ModulePack_Github = [
|
|
24
|
+
GithubModule_1.GithubModule
|
|
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,0DAAqD;AAExC,QAAA,yBAAyB,GAAG;IACxC,2BAAY;CACZ,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Module } from "@intuitionrobotics/ts-common";
|
|
1
2
|
import { RestEndpointMethodTypes } from '@octokit/rest';
|
|
2
3
|
import { ReposGetContentResponseData } from "@octokit/types";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
declare type Config = {
|
|
4
|
+
import { ExpressRequest } from "@intuitionrobotics/thunderstorm/backend";
|
|
5
|
+
type Config = {
|
|
6
6
|
appId: string;
|
|
7
7
|
privateKey: string;
|
|
8
8
|
userAgent: string;
|
|
@@ -10,15 +10,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.GithubModule = exports.GithubModule_Class = void 0;
|
|
13
|
+
/*
|
|
14
|
+
* A backend boilerplate with example apis
|
|
15
|
+
*
|
|
16
|
+
* Copyright (C) 2018 Intuition Robotics
|
|
17
|
+
*
|
|
18
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
|
+
* you may not use this file except in compliance with the License.
|
|
20
|
+
* You may obtain a copy of the License at
|
|
21
|
+
*
|
|
22
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
25
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
26
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
|
+
* See the License for the specific language governing permissions and
|
|
28
|
+
* limitations under the License.
|
|
29
|
+
*/
|
|
30
|
+
const ts_common_1 = require("@intuitionrobotics/ts-common");
|
|
13
31
|
const jws = require("jws");
|
|
14
32
|
const rest_1 = require("@octokit/rest");
|
|
15
33
|
const path = require("path");
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const promisify_request_1 = require("@intuitionrobotics/thunderstorm/app-backend/utils/promisify-request");
|
|
19
|
-
const exceptions_2 = require("@intuitionrobotics/thunderstorm/app-backend/exceptions");
|
|
20
|
-
const tools_1 = require("@intuitionrobotics/ts-common/utils/tools");
|
|
21
|
-
class GithubModule_Class extends module_1.Module {
|
|
34
|
+
const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
|
|
35
|
+
class GithubModule_Class extends ts_common_1.Module {
|
|
22
36
|
constructor() {
|
|
23
37
|
super("GithubModule");
|
|
24
38
|
}
|
|
@@ -73,14 +87,14 @@ class GithubModule_Class extends module_1.Module {
|
|
|
73
87
|
this.logError('Could not create installation access token for the Github App.');
|
|
74
88
|
this.logError(`Error: No installation matches owner "${this.config.gitOwner}."`);
|
|
75
89
|
this.logError(`Installations were: ${JSON.stringify(installations, null, 2)}`);
|
|
76
|
-
throw new
|
|
90
|
+
throw new ts_common_1.BadImplementationException(`No installations for owner ${this.config.gitOwner}`);
|
|
77
91
|
}
|
|
78
92
|
// Create an "Installation access token". Expires in one hour. Identifies actions
|
|
79
93
|
// as performed by the Github App.
|
|
80
94
|
const installationToken = yield client.apps.createInstallationAccessToken({ installation_id: filteredInstallations[0].id });
|
|
81
95
|
if (!installationToken.data || !installationToken.data.token) {
|
|
82
96
|
this.logError(`Invalid structure of installation token object.`);
|
|
83
|
-
throw new
|
|
97
|
+
throw new ts_common_1.Exception(`Invalid structure of installation token object.`);
|
|
84
98
|
}
|
|
85
99
|
return installationToken.data.token;
|
|
86
100
|
});
|
|
@@ -106,8 +120,11 @@ class GithubModule_Class extends module_1.Module {
|
|
|
106
120
|
ref: branch
|
|
107
121
|
});
|
|
108
122
|
}
|
|
109
|
-
catch (
|
|
110
|
-
this.logError(
|
|
123
|
+
catch (e) {
|
|
124
|
+
this.logError(e);
|
|
125
|
+
if (!(e instanceof Error))
|
|
126
|
+
throw new ts_common_1.Exception("Failed to get file from Github \n" + JSON.stringify(e));
|
|
127
|
+
const error = e;
|
|
111
128
|
if (error.status === 403 && error.errors && error.errors.length === 1 &&
|
|
112
129
|
error.errors[0].code === 'too_large') {
|
|
113
130
|
this.logWarning(`File ${filePath} is too large, will attempt to get as Blob.`);
|
|
@@ -115,22 +132,21 @@ class GithubModule_Class extends module_1.Module {
|
|
|
115
132
|
}
|
|
116
133
|
else if (error.status === 404) {
|
|
117
134
|
this.logError(`File ${filePath} was not found.`);
|
|
118
|
-
throw new
|
|
135
|
+
throw new ts_common_1.Exception(`File ${filePath} was not found`);
|
|
119
136
|
}
|
|
120
137
|
else {
|
|
121
|
-
throw new
|
|
138
|
+
throw new ts_common_1.Exception('Failed to get file from Github');
|
|
122
139
|
}
|
|
123
140
|
}
|
|
124
141
|
// Check that if contents.data is not an array.
|
|
125
142
|
if (Array.isArray(contents.data)) {
|
|
126
|
-
throw new
|
|
143
|
+
throw new ts_common_1.BadImplementationException('Invalid response of method repos.getContent');
|
|
127
144
|
}
|
|
128
145
|
if (!contents || !contents.data || !contents.data.content) {
|
|
129
|
-
throw new
|
|
146
|
+
throw new ts_common_1.Exception('Failed to get file contents from Github');
|
|
130
147
|
}
|
|
131
148
|
const buffer = Buffer.from(contents.data.content, 'base64');
|
|
132
|
-
|
|
133
|
-
return decodedContent;
|
|
149
|
+
return buffer.toString('utf8');
|
|
134
150
|
});
|
|
135
151
|
}
|
|
136
152
|
getLargeFile(client, repo, filePath, branch) {
|
|
@@ -143,7 +159,7 @@ class GithubModule_Class extends module_1.Module {
|
|
|
143
159
|
};
|
|
144
160
|
const response = yield client.git.getBlob(request);
|
|
145
161
|
if (!response || !response.data || !response.data.content)
|
|
146
|
-
throw new
|
|
162
|
+
throw new ts_common_1.Exception('Failed to get file contents from Github');
|
|
147
163
|
const buffer = Buffer.from(response.data.content, 'base64');
|
|
148
164
|
return buffer.toString('utf8');
|
|
149
165
|
});
|
|
@@ -162,13 +178,13 @@ class GithubModule_Class extends module_1.Module {
|
|
|
162
178
|
parentDirectoryResponse = yield client.repos.getContent(request);
|
|
163
179
|
}
|
|
164
180
|
catch (error) {
|
|
165
|
-
throw new
|
|
181
|
+
throw new ts_common_1.Exception(`Failed to fetch parent directory contents of file ${filePath}` + "\n" + JSON.stringify(error));
|
|
166
182
|
}
|
|
167
183
|
if (!parentDirectoryResponse || !parentDirectoryResponse.data)
|
|
168
|
-
throw new
|
|
184
|
+
throw new ts_common_1.Exception(`Failed to fetch parent directory contents of file ${filePath}`);
|
|
169
185
|
// Check that if parentDirectoryResponse.data is an array.
|
|
170
186
|
if (!Array.isArray(parentDirectoryResponse.data))
|
|
171
|
-
throw new
|
|
187
|
+
throw new ts_common_1.BadImplementationException("File's parent directory is not an array");
|
|
172
188
|
let fileSha = '';
|
|
173
189
|
for (const responseEntry of parentDirectoryResponse.data) {
|
|
174
190
|
if (responseEntry.path === filePath) {
|
|
@@ -177,7 +193,7 @@ class GithubModule_Class extends module_1.Module {
|
|
|
177
193
|
}
|
|
178
194
|
}
|
|
179
195
|
if (!fileSha)
|
|
180
|
-
throw new
|
|
196
|
+
throw new ts_common_1.Exception(`File ${filePath} was not found`);
|
|
181
197
|
return fileSha;
|
|
182
198
|
});
|
|
183
199
|
}
|
|
@@ -214,7 +230,7 @@ class GithubModule_Class extends module_1.Module {
|
|
|
214
230
|
}
|
|
215
231
|
catch (error) {
|
|
216
232
|
this.logError(error);
|
|
217
|
-
throw new
|
|
233
|
+
throw new ts_common_1.Exception(`Failed to list ${repo} branches`);
|
|
218
234
|
}
|
|
219
235
|
// Response includes (besides branch name) extra information about the branch.
|
|
220
236
|
return branches;
|
|
@@ -232,7 +248,7 @@ class GithubModule_Class extends module_1.Module {
|
|
|
232
248
|
archive_format: "zipball"
|
|
233
249
|
});
|
|
234
250
|
if (!response || !response.url) {
|
|
235
|
-
throw new
|
|
251
|
+
throw new ts_common_1.Exception(`Invalid response while getting archive url for branch ${branch} of repo ${repo}`);
|
|
236
252
|
}
|
|
237
253
|
this.logInfo(`Got archive url: ${response.url}.`);
|
|
238
254
|
return response.url;
|
|
@@ -240,13 +256,13 @@ class GithubModule_Class extends module_1.Module {
|
|
|
240
256
|
}
|
|
241
257
|
downloadArchive(url, branch, request) {
|
|
242
258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
-
const response = yield
|
|
259
|
+
const response = yield (0, backend_1.promisifyRequest)({ url: url, responseType: 'arraybuffer' });
|
|
244
260
|
if (!response || !response.data)
|
|
245
|
-
throw new
|
|
261
|
+
throw new ts_common_1.Exception(`Failed to download archive for branch ${branch} of product ${url}`);
|
|
246
262
|
const statusCode = response.status;
|
|
247
263
|
// TODO: need to handle 1XX and 3XX
|
|
248
264
|
if (statusCode < 200 || statusCode >= 300)
|
|
249
|
-
throw new
|
|
265
|
+
throw new backend_1.ApiException(statusCode, `Failed to download archive for branch ${branch} of product ${url}. Error: ${(0, ts_common_1.__stringify)(response.data)}`);
|
|
250
266
|
this.logDebug(`Got archive in zip format.`);
|
|
251
267
|
// Returns a buffer.
|
|
252
268
|
return response.data;
|
|
@@ -273,7 +289,7 @@ class GithubModule_Class extends module_1.Module {
|
|
|
273
289
|
if (!response || !response.data)
|
|
274
290
|
return;
|
|
275
291
|
if (!Array.isArray(response.data)) {
|
|
276
|
-
throw new
|
|
292
|
+
throw new ts_common_1.Exception(`Invalid response from octokit's repos.getContent`);
|
|
277
293
|
}
|
|
278
294
|
return response.data;
|
|
279
295
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GithubModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/GithubModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAA2B;AAC3B,wCAA+D;AAE/D,6BAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"GithubModule.js","sourceRoot":"","sources":["../../../src/main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,QAAQ;gBAC3B,IAAI;gBACJ,IAAI,EAAE,KAAK;gBACX,GAAG,EAAE,MAAM;aACd,CAAC,CAAC;YAEP,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI;gBAC3B,OAAO;YAEX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;gBAChC,MAAM,IAAI,qBAAS,CAAC,kDAAkD,CAAC,CAAC;YAC5E,CAAC;YAED,OAAO,QAAQ,CAAC,IAAI,CAAC;QACzB,CAAC;KAAA;CAEJ;AA3RD,gDA2RC;AAEY,QAAA,YAAY,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./app-backend/core/module-pack"), exports);
|
|
18
|
+
__exportStar(require("./app-backend/modules/GithubModule"), exports);
|
|
2
19
|
//# 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,iEAA+C;AAC/C,qEAAmD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuitionrobotics/github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"description": "Github api Module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"IR",
|
|
@@ -17,9 +17,12 @@
|
|
|
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/thunderstorm": "~0.
|
|
22
|
-
"@intuitionrobotics/ts-common": "~0.
|
|
24
|
+
"@intuitionrobotics/thunderstorm": "~0.47.0",
|
|
25
|
+
"@intuitionrobotics/ts-common": "~0.47.0",
|
|
23
26
|
"@octokit/rest": "18.0.9",
|
|
24
27
|
"@octokit/plugin-paginate-rest": "2.2.1",
|
|
25
28
|
"jws": "^4.0.0"
|
|
@@ -27,9 +30,9 @@
|
|
|
27
30
|
"devDependencies": {
|
|
28
31
|
"@octokit/types": "^5.5.0",
|
|
29
32
|
"@types/jws": "^3.0.0",
|
|
30
|
-
"@types/node": "^
|
|
33
|
+
"@types/node": "^18.0.0",
|
|
31
34
|
"ts-node": "^8.10.1",
|
|
32
|
-
"typescript": "
|
|
35
|
+
"typescript": "^5.3.0"
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
|