@intuitionrobotics/github 0.41.69 → 0.41.70

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.
@@ -19,7 +19,7 @@
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.Backend_ModulePack_Github = void 0;
22
- var GithubModule_1 = require("../modules/GithubModule");
22
+ const GithubModule_1 = require("../modules/GithubModule");
23
23
  exports.Backend_ModulePack_Github = [
24
24
  GithubModule_1.GithubModule
25
25
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-backend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,wDAAqD;AAExC,QAAA,yBAAyB,GAAG;IACxC,2BAAY;CACZ,CAAC"}
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,17 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
2
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
3
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
4
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -21,33 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
22
9
  });
23
10
  };
24
- var __generator = (this && this.__generator) || function (thisArg, body) {
25
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
26
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
27
- function verb(n) { return function (v) { return step([n, v]); }; }
28
- function step(op) {
29
- if (f) throw new TypeError("Generator is already executing.");
30
- while (_) try {
31
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
32
- if (y = 0, t) op = [op[0] & 2, t.value];
33
- switch (op[0]) {
34
- case 0: case 1: t = op; break;
35
- case 4: _.label++; return { value: op[1], done: false };
36
- case 5: _.label++; y = op[1]; op = [0]; continue;
37
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
38
- default:
39
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
40
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
41
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
42
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
43
- if (t[2]) _.ops.pop();
44
- _.trys.pop(); continue;
45
- }
46
- op = body.call(thisArg, _);
47
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
48
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
49
- }
50
- };
51
11
  Object.defineProperty(exports, "__esModule", { value: true });
52
12
  exports.GithubModule = exports.GithubModule_Class = void 0;
53
13
  /*
@@ -67,19 +27,15 @@ exports.GithubModule = exports.GithubModule_Class = void 0;
67
27
  * See the License for the specific language governing permissions and
68
28
  * limitations under the License.
69
29
  */
70
- var ts_common_1 = require("@intuitionrobotics/ts-common");
71
- var jwt = require("jsonwebtoken");
72
- var rest_1 = require("@octokit/rest");
73
- var path = require("path");
74
- var backend_1 = require("@intuitionrobotics/thunderstorm/backend");
75
- var GithubModule_Class = /** @class */ (function (_super) {
76
- __extends(GithubModule_Class, _super);
77
- function GithubModule_Class() {
78
- return _super !== null && _super.apply(this, arguments) || this;
79
- }
80
- GithubModule_Class.prototype.createClient = function (token, prefix) {
81
- var auth = (prefix || "token") + " " + token;
82
- var client = new rest_1.Octokit({
30
+ const ts_common_1 = require("@intuitionrobotics/ts-common");
31
+ const jwt = require("jsonwebtoken");
32
+ const rest_1 = require("@octokit/rest");
33
+ const path = require("path");
34
+ const backend_1 = require("@intuitionrobotics/thunderstorm/backend");
35
+ class GithubModule_Class extends ts_common_1.Module {
36
+ createClient(token, prefix) {
37
+ const auth = `${prefix || "token"} ${token}`;
38
+ const client = new rest_1.Octokit({
83
39
  userAgent: this.config.userAgent,
84
40
  log: {
85
41
  debug: this.logDebug.bind(this),
@@ -90,305 +46,216 @@ var GithubModule_Class = /** @class */ (function (_super) {
90
46
  auth: auth
91
47
  });
92
48
  return client;
93
- };
49
+ }
94
50
  ;
95
- GithubModule_Class.prototype.createClientWithJWT = function () {
96
- return __awaiter(this, void 0, void 0, function () {
97
- var ts, payload, signedToken;
98
- return __generator(this, function (_a) {
99
- switch (_a.label) {
100
- case 0:
101
- ts = Math.floor(Date.now() / 1000.0);
102
- payload = {
103
- // issued at time
104
- iat: ts,
105
- // JWT expiration time (10 minute maximum)
106
- exp: ts + (10 * 60),
107
- // GitHub App's identifier
108
- iss: parseInt(this.config.appId)
109
- };
110
- return [4 /*yield*/, jwt.sign(payload, this.config.privateKey, { algorithm: "RS256" })];
111
- case 1:
112
- signedToken = _a.sent();
113
- return [2 /*return*/, this.createClient(signedToken, 'Bearer')];
114
- }
115
- });
51
+ createClientWithJWT() {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const ts = Math.floor(Date.now() / 1000.0);
54
+ const payload = {
55
+ // issued at time
56
+ iat: ts,
57
+ // JWT expiration time (10 minute maximum)
58
+ exp: ts + (10 * 60),
59
+ // GitHub App's identifier
60
+ iss: parseInt(this.config.appId)
61
+ };
62
+ const signedToken = yield jwt.sign(payload, this.config.privateKey, { algorithm: "RS256" });
63
+ return this.createClient(signedToken, 'Bearer');
116
64
  });
117
- };
118
- GithubModule_Class.prototype.getInstallationTokenFromClient = function (client) {
119
- return __awaiter(this, void 0, void 0, function () {
120
- var installations, filteredInstallations, message, installationToken;
121
- var _this = this;
122
- return __generator(this, function (_a) {
123
- switch (_a.label) {
124
- case 0: return [4 /*yield*/, client.apps.listInstallations()];
125
- case 1:
126
- installations = _a.sent();
127
- filteredInstallations = installations.data.filter(function (installation) {
128
- return installation.account.login === _this.config.gitOwner;
129
- });
130
- // Handle/log cases where the number of matching installations of the Github App is different than one.
131
- if (filteredInstallations.length > 1) {
132
- message = "Warning: more than one installations of the Github app with owner " + this.config.gitOwner + " found.";
133
- message += " Picking the first one...";
134
- this.logInfo(message);
135
- }
136
- else if (!filteredInstallations.length) {
137
- this.logError('Could not create installation access token for the Github App.');
138
- this.logError("Error: No installation matches owner \"" + this.config.gitOwner + ".\"");
139
- this.logError("Installations were: " + JSON.stringify(installations, null, 2));
140
- throw new ts_common_1.BadImplementationException("No installations for owner " + this.config.gitOwner);
141
- }
142
- return [4 /*yield*/, client.apps.createInstallationAccessToken({ installation_id: filteredInstallations[0].id })];
143
- case 2:
144
- installationToken = _a.sent();
145
- if (!installationToken.data || !installationToken.data.token) {
146
- this.logError("Invalid structure of installation token object.");
147
- throw new ts_common_1.Exception("Invalid structure of installation token object.");
148
- }
149
- return [2 /*return*/, installationToken.data.token];
150
- }
65
+ }
66
+ getInstallationTokenFromClient(client) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const installations = yield client.apps.listInstallations();
69
+ // Get installations that match GIT_OWNER.
70
+ const filteredInstallations = installations.data.filter((installation) => {
71
+ return installation.account.login === this.config.gitOwner;
151
72
  });
73
+ // Handle/log cases where the number of matching installations of the Github App is different than one.
74
+ if (filteredInstallations.length > 1) {
75
+ let message = `Warning: more than one installations of the Github app with owner ${this.config.gitOwner} found.`;
76
+ message += ` Picking the first one...`;
77
+ this.logInfo(message);
78
+ }
79
+ else if (!filteredInstallations.length) {
80
+ this.logError('Could not create installation access token for the Github App.');
81
+ this.logError(`Error: No installation matches owner "${this.config.gitOwner}."`);
82
+ this.logError(`Installations were: ${JSON.stringify(installations, null, 2)}`);
83
+ throw new ts_common_1.BadImplementationException(`No installations for owner ${this.config.gitOwner}`);
84
+ }
85
+ // Create an "Installation access token". Expires in one hour. Identifies actions
86
+ // as performed by the Github App.
87
+ const installationToken = yield client.apps.createInstallationAccessToken({ installation_id: filteredInstallations[0].id });
88
+ if (!installationToken.data || !installationToken.data.token) {
89
+ this.logError(`Invalid structure of installation token object.`);
90
+ throw new ts_common_1.Exception(`Invalid structure of installation token object.`);
91
+ }
92
+ return installationToken.data.token;
152
93
  });
153
- };
154
- GithubModule_Class.prototype.getGithubInstallationToken = function () {
155
- return __awaiter(this, void 0, void 0, function () {
156
- var client, token;
157
- return __generator(this, function (_a) {
158
- switch (_a.label) {
159
- case 0: return [4 /*yield*/, this.createClientWithJWT()];
160
- case 1:
161
- client = _a.sent();
162
- return [4 /*yield*/, this.getInstallationTokenFromClient(client)];
163
- case 2:
164
- token = _a.sent();
165
- this.logInfo('Got github installation token successfully.');
166
- return [2 /*return*/, token];
167
- }
168
- });
94
+ }
95
+ getGithubInstallationToken() {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const client = yield this.createClientWithJWT();
98
+ const token = yield this.getInstallationTokenFromClient(client);
99
+ this.logInfo('Got github installation token successfully.');
100
+ return token;
169
101
  });
170
- };
171
- GithubModule_Class.prototype.getFile = function (repo, filePath, branch, request) {
172
- return __awaiter(this, void 0, void 0, function () {
173
- var token, client, contents, error_1, buffer, decodedContent;
174
- return __generator(this, function (_a) {
175
- switch (_a.label) {
176
- case 0: return [4 /*yield*/, this.getGithubInstallationToken()];
177
- case 1:
178
- token = _a.sent();
179
- client = this.createClient(token);
180
- _a.label = 2;
181
- case 2:
182
- _a.trys.push([2, 4, , 5]);
183
- return [4 /*yield*/, client.repos.getContent({
184
- owner: this.config.gitOwner,
185
- repo: repo,
186
- path: filePath,
187
- ref: branch
188
- })];
189
- case 3:
190
- contents = _a.sent();
191
- return [3 /*break*/, 5];
192
- case 4:
193
- error_1 = _a.sent();
194
- this.logError(error_1);
195
- if (error_1.status === 403 && error_1.errors && error_1.errors.length === 1 &&
196
- error_1.errors[0].code === 'too_large') {
197
- this.logWarning("File " + filePath + " is too large, will attempt to get as Blob.");
198
- return [2 /*return*/, this.getLargeFile(client, repo, filePath, branch)];
199
- }
200
- else if (error_1.status === 404) {
201
- this.logError("File " + filePath + " was not found.");
202
- throw new ts_common_1.Exception("File " + filePath + " was not found");
203
- }
204
- else {
205
- throw new ts_common_1.Exception('Failed to get file from Github');
206
- }
207
- return [3 /*break*/, 5];
208
- case 5:
209
- // Check that if contents.data is not an array.
210
- if (Array.isArray(contents.data)) {
211
- throw new ts_common_1.BadImplementationException('Invalid response of method repos.getContent');
212
- }
213
- if (!contents || !contents.data || !contents.data.content) {
214
- throw new ts_common_1.Exception('Failed to get file contents from Github');
215
- }
216
- buffer = Buffer.from(contents.data.content, 'base64');
217
- decodedContent = buffer.toString('utf8');
218
- return [2 /*return*/, decodedContent];
102
+ }
103
+ getFile(repo, filePath, branch, request) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ const token = yield this.getGithubInstallationToken();
106
+ const client = this.createClient(token);
107
+ let contents;
108
+ try {
109
+ contents = yield client.repos.getContent({
110
+ owner: this.config.gitOwner,
111
+ repo,
112
+ path: filePath,
113
+ ref: branch
114
+ });
115
+ }
116
+ catch (error) {
117
+ this.logError(error);
118
+ if (error.status === 403 && error.errors && error.errors.length === 1 &&
119
+ error.errors[0].code === 'too_large') {
120
+ this.logWarning(`File ${filePath} is too large, will attempt to get as Blob.`);
121
+ return this.getLargeFile(client, repo, filePath, branch);
219
122
  }
220
- });
221
- });
222
- };
223
- GithubModule_Class.prototype.getLargeFile = function (client, repo, filePath, branch) {
224
- return __awaiter(this, void 0, void 0, function () {
225
- var fileSha, request, response, buffer;
226
- return __generator(this, function (_a) {
227
- switch (_a.label) {
228
- case 0: return [4 /*yield*/, this.getFileBySha(client, repo, filePath, branch)];
229
- case 1:
230
- fileSha = _a.sent();
231
- request = {
232
- owner: this.config.gitOwner,
233
- repo: repo,
234
- file_sha: fileSha
235
- };
236
- return [4 /*yield*/, client.git.getBlob(request)];
237
- case 2:
238
- response = _a.sent();
239
- if (!response || !response.data || !response.data.content)
240
- throw new ts_common_1.Exception('Failed to get file contents from Github');
241
- buffer = Buffer.from(response.data.content, 'base64');
242
- return [2 /*return*/, buffer.toString('utf8')];
123
+ else if (error.status === 404) {
124
+ this.logError(`File ${filePath} was not found.`);
125
+ throw new ts_common_1.Exception(`File ${filePath} was not found`);
243
126
  }
244
- });
245
- });
246
- };
247
- GithubModule_Class.prototype.getFileBySha = function (client, repo, filePath, branch) {
248
- return __awaiter(this, void 0, void 0, function () {
249
- var parentPath, parentDirectoryResponse, request, error_2, fileSha, _i, _a, responseEntry;
250
- return __generator(this, function (_b) {
251
- switch (_b.label) {
252
- case 0:
253
- parentPath = path.dirname(filePath);
254
- _b.label = 1;
255
- case 1:
256
- _b.trys.push([1, 3, , 4]);
257
- request = {
258
- owner: this.config.gitOwner,
259
- repo: repo,
260
- path: parentPath,
261
- ref: branch
262
- };
263
- return [4 /*yield*/, client.repos.getContent(request)];
264
- case 2:
265
- parentDirectoryResponse = _b.sent();
266
- return [3 /*break*/, 4];
267
- case 3:
268
- error_2 = _b.sent();
269
- throw new ts_common_1.Exception("Failed to fetch parent directory contents of file " + filePath, error_2);
270
- case 4:
271
- if (!parentDirectoryResponse || !parentDirectoryResponse.data)
272
- throw new ts_common_1.Exception("Failed to fetch parent directory contents of file " + filePath);
273
- // Check that if parentDirectoryResponse.data is an array.
274
- if (!Array.isArray(parentDirectoryResponse.data))
275
- throw new ts_common_1.BadImplementationException("File's parent directory is not an array");
276
- fileSha = '';
277
- for (_i = 0, _a = parentDirectoryResponse.data; _i < _a.length; _i++) {
278
- responseEntry = _a[_i];
279
- if (responseEntry.path === filePath) {
280
- fileSha = responseEntry.sha;
281
- break;
282
- }
283
- }
284
- if (!fileSha)
285
- throw new ts_common_1.Exception("File " + filePath + " was not found");
286
- return [2 /*return*/, fileSha];
127
+ else {
128
+ throw new ts_common_1.Exception('Failed to get file from Github');
287
129
  }
288
- });
130
+ }
131
+ // Check that if contents.data is not an array.
132
+ if (Array.isArray(contents.data)) {
133
+ throw new ts_common_1.BadImplementationException('Invalid response of method repos.getContent');
134
+ }
135
+ if (!contents || !contents.data || !contents.data.content) {
136
+ throw new ts_common_1.Exception('Failed to get file contents from Github');
137
+ }
138
+ const buffer = Buffer.from(contents.data.content, 'base64');
139
+ const decodedContent = buffer.toString('utf8');
140
+ return decodedContent;
289
141
  });
290
- };
291
- GithubModule_Class.prototype.getReleaseBranches = function (product) {
292
- return __awaiter(this, void 0, void 0, function () {
293
- var branches, releaseBranches;
294
- return __generator(this, function (_a) {
295
- switch (_a.label) {
296
- case 0: return [4 /*yield*/, this.listBranches(product)];
297
- case 1:
298
- branches = _a.sent();
299
- if (!branches || !branches.length) {
300
- return [2 /*return*/, []];
301
- }
302
- releaseBranches = branches.map(function (branch) { return branch.name; }).filter(function (name) {
303
- return name.startsWith("release/");
304
- }).reverse();
305
- // Return master with the release branches.
306
- releaseBranches.unshift('master');
307
- return [2 /*return*/, releaseBranches];
308
- }
309
- });
142
+ }
143
+ getLargeFile(client, repo, filePath, branch) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ const fileSha = yield this.getFileBySha(client, repo, filePath, branch);
146
+ const request = {
147
+ owner: this.config.gitOwner,
148
+ repo,
149
+ file_sha: fileSha
150
+ };
151
+ const response = yield client.git.getBlob(request);
152
+ if (!response || !response.data || !response.data.content)
153
+ throw new ts_common_1.Exception('Failed to get file contents from Github');
154
+ const buffer = Buffer.from(response.data.content, 'base64');
155
+ return buffer.toString('utf8');
310
156
  });
311
- };
312
- GithubModule_Class.prototype.listBranches = function (repo) {
313
- return __awaiter(this, void 0, void 0, function () {
314
- var token, client, branches, error_3;
315
- return __generator(this, function (_a) {
316
- switch (_a.label) {
317
- case 0: return [4 /*yield*/, this.getGithubInstallationToken()];
318
- case 1:
319
- token = _a.sent();
320
- client = this.createClient(token);
321
- _a.label = 2;
322
- case 2:
323
- _a.trys.push([2, 4, , 5]);
324
- return [4 /*yield*/, client.paginate(
325
- // Equivalent to 'GET /repos/:owner/:repo/branches?per_page=100'
326
- client.repos.listBranches, {
327
- owner: this.config.gitOwner,
328
- repo: repo,
329
- per_page: 100
330
- })];
331
- case 3:
332
- // Returns all the branches using the paginate method.
333
- // Maximum allowed page size is 100.
334
- branches = _a.sent();
335
- return [3 /*break*/, 5];
336
- case 4:
337
- error_3 = _a.sent();
338
- this.logError(error_3);
339
- throw new ts_common_1.Exception("Failed to list " + repo + " branches");
340
- case 5:
341
- // Response includes (besides branch name) extra information about the branch.
342
- return [2 /*return*/, branches];
157
+ }
158
+ getFileBySha(client, repo, filePath, branch) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ const parentPath = path.dirname(filePath);
161
+ let parentDirectoryResponse;
162
+ try {
163
+ const request = {
164
+ owner: this.config.gitOwner,
165
+ repo,
166
+ path: parentPath,
167
+ ref: branch
168
+ };
169
+ parentDirectoryResponse = yield client.repos.getContent(request);
170
+ }
171
+ catch (error) {
172
+ throw new ts_common_1.Exception(`Failed to fetch parent directory contents of file ${filePath}`, error);
173
+ }
174
+ if (!parentDirectoryResponse || !parentDirectoryResponse.data)
175
+ throw new ts_common_1.Exception(`Failed to fetch parent directory contents of file ${filePath}`);
176
+ // Check that if parentDirectoryResponse.data is an array.
177
+ if (!Array.isArray(parentDirectoryResponse.data))
178
+ throw new ts_common_1.BadImplementationException("File's parent directory is not an array");
179
+ let fileSha = '';
180
+ for (const responseEntry of parentDirectoryResponse.data) {
181
+ if (responseEntry.path === filePath) {
182
+ fileSha = responseEntry.sha;
183
+ break;
343
184
  }
344
- });
185
+ }
186
+ if (!fileSha)
187
+ throw new ts_common_1.Exception(`File ${filePath} was not found`);
188
+ return fileSha;
345
189
  });
346
- };
190
+ }
191
+ getReleaseBranches(product) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const branches = yield this.listBranches(product);
194
+ if (!branches || !branches.length) {
195
+ return [];
196
+ }
197
+ // Response includes (besides branch name) extra information about the branch.
198
+ const releaseBranches = branches.map(branch => branch.name).filter(name => {
199
+ return name.startsWith(`release/`);
200
+ }).reverse();
201
+ // Return master with the release branches.
202
+ releaseBranches.unshift('master');
203
+ return releaseBranches;
204
+ });
205
+ }
206
+ listBranches(repo) {
207
+ return __awaiter(this, void 0, void 0, function* () {
208
+ const token = yield this.getGithubInstallationToken();
209
+ const client = this.createClient(token);
210
+ let branches;
211
+ try {
212
+ // Returns all the branches using the paginate method.
213
+ // Maximum allowed page size is 100.
214
+ branches = yield client.paginate(
215
+ // Equivalent to 'GET /repos/:owner/:repo/branches?per_page=100'
216
+ client.repos.listBranches, {
217
+ owner: this.config.gitOwner,
218
+ repo,
219
+ per_page: 100
220
+ });
221
+ }
222
+ catch (error) {
223
+ this.logError(error);
224
+ throw new ts_common_1.Exception(`Failed to list ${repo} branches`);
225
+ }
226
+ // Response includes (besides branch name) extra information about the branch.
227
+ return branches;
228
+ });
229
+ }
347
230
  ;
348
- GithubModule_Class.prototype.getArchiveUrl = function (repo, branch) {
349
- return __awaiter(this, void 0, void 0, function () {
350
- var token, client, response;
351
- return __generator(this, function (_a) {
352
- switch (_a.label) {
353
- case 0: return [4 /*yield*/, this.getGithubInstallationToken()];
354
- case 1:
355
- token = _a.sent();
356
- client = this.createClient(token);
357
- return [4 /*yield*/, client.repos.downloadArchive({
358
- owner: this.config.gitOwner,
359
- repo: repo,
360
- ref: branch,
361
- archive_format: "zipball"
362
- })];
363
- case 2:
364
- response = _a.sent();
365
- if (!response || !response.url) {
366
- throw new ts_common_1.Exception("Invalid response while getting archive url for branch " + branch + " of repo " + repo);
367
- }
368
- this.logInfo("Got archive url: " + response.url + ".");
369
- return [2 /*return*/, response.url];
370
- }
231
+ getArchiveUrl(repo, branch) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ const token = yield this.getGithubInstallationToken();
234
+ const client = this.createClient(token);
235
+ const response = yield client.repos.downloadArchive({
236
+ owner: this.config.gitOwner,
237
+ repo,
238
+ ref: branch,
239
+ archive_format: "zipball"
371
240
  });
241
+ if (!response || !response.url) {
242
+ throw new ts_common_1.Exception(`Invalid response while getting archive url for branch ${branch} of repo ${repo}`);
243
+ }
244
+ this.logInfo(`Got archive url: ${response.url}.`);
245
+ return response.url;
372
246
  });
373
- };
374
- GithubModule_Class.prototype.downloadArchive = function (url, branch, request) {
375
- return __awaiter(this, void 0, void 0, function () {
376
- var response;
377
- return __generator(this, function (_a) {
378
- switch (_a.label) {
379
- case 0: return [4 /*yield*/, backend_1.promisifyRequest({ uri: url, encoding: null })];
380
- case 1:
381
- response = _a.sent();
382
- if (!response || !response.body) {
383
- throw new ts_common_1.Exception("Failed to download archive for branch " + branch + " of product " + url);
384
- }
385
- this.logDebug("Got archive in zip format.");
386
- // Returns a buffer.
387
- return [2 /*return*/, response.body];
388
- }
389
- });
247
+ }
248
+ downloadArchive(url, branch, request) {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ const response = yield backend_1.promisifyRequest({ uri: url, encoding: null });
251
+ if (!response || !response.body) {
252
+ throw new ts_common_1.Exception(`Failed to download archive for branch ${branch} of product ${url}`);
253
+ }
254
+ this.logDebug(`Got archive in zip format.`);
255
+ // Returns a buffer.
256
+ return response.body;
390
257
  });
391
- };
258
+ }
392
259
  /**
393
260
  *
394
261
  * @param repo The name of the repo.
@@ -396,35 +263,26 @@ var GithubModule_Class = /** @class */ (function (_super) {
396
263
  *
397
264
  * This API has an upper limit of 1,000 files for a directory.
398
265
  */
399
- GithubModule_Class.prototype.listDirectoryContents = function (repo, branch, _path) {
400
- return __awaiter(this, void 0, void 0, function () {
401
- var token, client, response;
402
- return __generator(this, function (_a) {
403
- switch (_a.label) {
404
- case 0: return [4 /*yield*/, this.getGithubInstallationToken()];
405
- case 1:
406
- token = _a.sent();
407
- client = this.createClient(token);
408
- return [4 /*yield*/, client.repos.getContent({
409
- owner: this.config.gitOwner,
410
- repo: repo,
411
- path: _path,
412
- ref: branch,
413
- })];
414
- case 2:
415
- response = _a.sent();
416
- if (!response || !response.data)
417
- return [2 /*return*/];
418
- if (!Array.isArray(response.data)) {
419
- throw new ts_common_1.Exception("Invalid response from octokit's repos.getContent");
420
- }
421
- return [2 /*return*/, response.data];
422
- }
266
+ listDirectoryContents(repo, branch, _path) {
267
+ return __awaiter(this, void 0, void 0, function* () {
268
+ const token = yield this.getGithubInstallationToken();
269
+ const client = this.createClient(token);
270
+ let response;
271
+ response = yield client.repos.getContent({
272
+ owner: this.config.gitOwner,
273
+ repo,
274
+ path: _path,
275
+ ref: branch,
423
276
  });
277
+ if (!response || !response.data)
278
+ return;
279
+ if (!Array.isArray(response.data)) {
280
+ throw new ts_common_1.Exception(`Invalid response from octokit's repos.getContent`);
281
+ }
282
+ return response.data;
424
283
  });
425
- };
426
- return GithubModule_Class;
427
- }(ts_common_1.Module));
284
+ }
285
+ }
428
286
  exports.GithubModule_Class = GithubModule_Class;
429
287
  exports.GithubModule = new GithubModule_Class();
430
288
  //# sourceMappingURL=GithubModule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GithubModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/GithubModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;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G,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC;YACtD,MAAM,MAAM,GAAY,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YAEjD,IAAI,QAAoE,CAAC;YAEzE,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,UAAU,CACvC;gBACC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;gBAC3B,IAAI;gBACJ,IAAI,EAAE,KAAK;gBACX,GAAG,EAAE,MAAM;aACX,CAAC,CAAC;YAEJ,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI;gBAC9B,OAAO;YAER,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAClC,MAAM,IAAI,qBAAS,CAAC,kDAAkD,CAAC,CAAC;aACxE;YAED,OAAO,QAAQ,CAAC,IAAI,CAAC;QACtB,CAAC;KAAA;CAED;AA5QD,gDA4QC;AAEY,QAAA,YAAY,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuitionrobotics/github",
3
- "version": "0.41.69",
3
+ "version": "0.41.70",
4
4
  "description": "Github api Module",
5
5
  "keywords": [
6
6
  "IR",