@intuitionrobotics/github 0.47.58 → 1.0.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/LICENSE +3 -0
- package/dist/app-backend/core/module-pack.d.ts +2 -0
- package/dist/app-backend/core/module-pack.d.ts.map +1 -0
- package/dist/app-backend/core/module-pack.js +5 -0
- package/{app-backend → dist/app-backend}/core/module-pack.js.map +1 -1
- package/{app-backend → dist/app-backend}/modules/GithubModule.d.ts +6 -5
- package/dist/app-backend/modules/GithubModule.d.ts.map +1 -0
- package/dist/app-backend/modules/GithubModule.js +265 -0
- package/dist/app-backend/modules/GithubModule.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +26 -13
- package/app-backend/core/module-pack.d.ts +0 -1
- package/app-backend/core/module-pack.js +0 -8
- package/app-backend/modules/GithubModule.js +0 -300
- package/app-backend/modules/GithubModule.js.map +0 -1
- package/index.d.ts +0 -2
- package/index.js +0 -19
- package/index.js.map +0 -1
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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");
|
|
31
|
-
const jws = require("jws");
|
|
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
|
-
constructor() {
|
|
37
|
-
super("GithubModule");
|
|
38
|
-
}
|
|
39
|
-
createClient(token, prefix) {
|
|
40
|
-
const auth = `${prefix || "token"} ${token}`;
|
|
41
|
-
const client = new rest_1.Octokit({
|
|
42
|
-
userAgent: this.config.userAgent,
|
|
43
|
-
log: {
|
|
44
|
-
debug: this.logDebug.bind(this),
|
|
45
|
-
info: this.logInfo.bind(this),
|
|
46
|
-
warn: this.logWarning.bind(this),
|
|
47
|
-
error: this.logError.bind(this)
|
|
48
|
-
},
|
|
49
|
-
auth: auth
|
|
50
|
-
});
|
|
51
|
-
return client;
|
|
52
|
-
}
|
|
53
|
-
;
|
|
54
|
-
createClientWithJWT() {
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const ts = Math.floor(Date.now() / 1000.0);
|
|
57
|
-
const payload = {
|
|
58
|
-
// issued at time
|
|
59
|
-
iat: ts,
|
|
60
|
-
// JWT expiration time (10 minute maximum)
|
|
61
|
-
exp: ts + (10 * 60),
|
|
62
|
-
// GitHub App's identifier
|
|
63
|
-
iss: parseInt(this.config.appId)
|
|
64
|
-
};
|
|
65
|
-
const signedToken = jws.sign({
|
|
66
|
-
header: { alg: "RS256" },
|
|
67
|
-
payload,
|
|
68
|
-
privateKey: this.config.privateKey
|
|
69
|
-
});
|
|
70
|
-
return this.createClient(signedToken, 'Bearer');
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
getInstallationTokenFromClient(client) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
const installations = yield client.apps.listInstallations();
|
|
76
|
-
// Get installations that match GIT_OWNER.
|
|
77
|
-
const filteredInstallations = installations.data.filter((installation) => {
|
|
78
|
-
return installation.account.login === this.config.gitOwner;
|
|
79
|
-
});
|
|
80
|
-
// Handle/log cases where the number of matching installations of the Github App is different than one.
|
|
81
|
-
if (filteredInstallations.length > 1) {
|
|
82
|
-
let message = `Warning: more than one installations of the Github app with owner ${this.config.gitOwner} found.`;
|
|
83
|
-
message += ` Picking the first one...`;
|
|
84
|
-
this.logInfo(message);
|
|
85
|
-
}
|
|
86
|
-
else if (!filteredInstallations.length) {
|
|
87
|
-
this.logError('Could not create installation access token for the Github App.');
|
|
88
|
-
this.logError(`Error: No installation matches owner "${this.config.gitOwner}."`);
|
|
89
|
-
this.logError(`Installations were: ${JSON.stringify(installations, null, 2)}`);
|
|
90
|
-
throw new ts_common_1.BadImplementationException(`No installations for owner ${this.config.gitOwner}`);
|
|
91
|
-
}
|
|
92
|
-
// Create an "Installation access token". Expires in one hour. Identifies actions
|
|
93
|
-
// as performed by the Github App.
|
|
94
|
-
const installationToken = yield client.apps.createInstallationAccessToken({ installation_id: filteredInstallations[0].id });
|
|
95
|
-
if (!installationToken.data || !installationToken.data.token) {
|
|
96
|
-
this.logError(`Invalid structure of installation token object.`);
|
|
97
|
-
throw new ts_common_1.Exception(`Invalid structure of installation token object.`);
|
|
98
|
-
}
|
|
99
|
-
return installationToken.data.token;
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
getGithubInstallationToken() {
|
|
103
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
-
const client = yield this.createClientWithJWT();
|
|
105
|
-
const token = yield this.getInstallationTokenFromClient(client);
|
|
106
|
-
this.logInfo('Got github installation token successfully.');
|
|
107
|
-
return token;
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
getFile(repo, filePath, branch, request) {
|
|
111
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
-
const token = yield this.getGithubInstallationToken();
|
|
113
|
-
const client = this.createClient(token);
|
|
114
|
-
let contents;
|
|
115
|
-
try {
|
|
116
|
-
contents = yield client.repos.getContent({
|
|
117
|
-
owner: this.config.gitOwner,
|
|
118
|
-
repo,
|
|
119
|
-
path: filePath,
|
|
120
|
-
ref: branch
|
|
121
|
-
});
|
|
122
|
-
}
|
|
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;
|
|
128
|
-
if (error.status === 403 && error.errors && error.errors.length === 1 &&
|
|
129
|
-
error.errors[0].code === 'too_large') {
|
|
130
|
-
this.logWarning(`File ${filePath} is too large, will attempt to get as Blob.`);
|
|
131
|
-
return this.getLargeFile(client, repo, filePath, branch);
|
|
132
|
-
}
|
|
133
|
-
else if (error.status === 404) {
|
|
134
|
-
this.logError(`File ${filePath} was not found.`);
|
|
135
|
-
throw new ts_common_1.Exception(`File ${filePath} was not found`);
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
throw new ts_common_1.Exception('Failed to get file from Github');
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
// Check that if contents.data is not an array.
|
|
142
|
-
if (Array.isArray(contents.data)) {
|
|
143
|
-
throw new ts_common_1.BadImplementationException('Invalid response of method repos.getContent');
|
|
144
|
-
}
|
|
145
|
-
if (!contents || !contents.data || !contents.data.content) {
|
|
146
|
-
throw new ts_common_1.Exception('Failed to get file contents from Github');
|
|
147
|
-
}
|
|
148
|
-
const buffer = Buffer.from(contents.data.content, 'base64');
|
|
149
|
-
return buffer.toString('utf8');
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
getLargeFile(client, repo, filePath, branch) {
|
|
153
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
-
const fileSha = yield this.getFileBySha(client, repo, filePath, branch);
|
|
155
|
-
const request = {
|
|
156
|
-
owner: this.config.gitOwner,
|
|
157
|
-
repo,
|
|
158
|
-
file_sha: fileSha
|
|
159
|
-
};
|
|
160
|
-
const response = yield client.git.getBlob(request);
|
|
161
|
-
if (!response || !response.data || !response.data.content)
|
|
162
|
-
throw new ts_common_1.Exception('Failed to get file contents from Github');
|
|
163
|
-
const buffer = Buffer.from(response.data.content, 'base64');
|
|
164
|
-
return buffer.toString('utf8');
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
getFileBySha(client, repo, filePath, branch) {
|
|
168
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
-
const parentPath = path.dirname(filePath);
|
|
170
|
-
let parentDirectoryResponse;
|
|
171
|
-
try {
|
|
172
|
-
const request = {
|
|
173
|
-
owner: this.config.gitOwner,
|
|
174
|
-
repo,
|
|
175
|
-
path: parentPath,
|
|
176
|
-
ref: branch
|
|
177
|
-
};
|
|
178
|
-
parentDirectoryResponse = yield client.repos.getContent(request);
|
|
179
|
-
}
|
|
180
|
-
catch (error) {
|
|
181
|
-
throw new ts_common_1.Exception(`Failed to fetch parent directory contents of file ${filePath}` + "\n" + JSON.stringify(error));
|
|
182
|
-
}
|
|
183
|
-
if (!parentDirectoryResponse || !parentDirectoryResponse.data)
|
|
184
|
-
throw new ts_common_1.Exception(`Failed to fetch parent directory contents of file ${filePath}`);
|
|
185
|
-
// Check that if parentDirectoryResponse.data is an array.
|
|
186
|
-
if (!Array.isArray(parentDirectoryResponse.data))
|
|
187
|
-
throw new ts_common_1.BadImplementationException("File's parent directory is not an array");
|
|
188
|
-
let fileSha = '';
|
|
189
|
-
for (const responseEntry of parentDirectoryResponse.data) {
|
|
190
|
-
if (responseEntry.path === filePath) {
|
|
191
|
-
fileSha = responseEntry.sha;
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
if (!fileSha)
|
|
196
|
-
throw new ts_common_1.Exception(`File ${filePath} was not found`);
|
|
197
|
-
return fileSha;
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
getReleaseBranches(product) {
|
|
201
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
const branches = yield this.listBranches(product);
|
|
203
|
-
if (!branches || !branches.length) {
|
|
204
|
-
return [];
|
|
205
|
-
}
|
|
206
|
-
// Response includes (besides branch name) extra information about the branch.
|
|
207
|
-
const releaseBranches = branches.map(branch => branch.name).filter(name => {
|
|
208
|
-
return name.startsWith(`release/`);
|
|
209
|
-
}).reverse();
|
|
210
|
-
// Return master with the release branches.
|
|
211
|
-
releaseBranches.unshift('master');
|
|
212
|
-
return releaseBranches;
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
listBranches(repo) {
|
|
216
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
-
const token = yield this.getGithubInstallationToken();
|
|
218
|
-
const client = this.createClient(token);
|
|
219
|
-
let branches;
|
|
220
|
-
try {
|
|
221
|
-
// Returns all the branches using the paginate method.
|
|
222
|
-
// Maximum allowed page size is 100.
|
|
223
|
-
branches = yield client.paginate(
|
|
224
|
-
// Equivalent to 'GET /repos/:owner/:repo/branches?per_page=100'
|
|
225
|
-
client.repos.listBranches, {
|
|
226
|
-
owner: this.config.gitOwner,
|
|
227
|
-
repo,
|
|
228
|
-
per_page: 100
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
catch (error) {
|
|
232
|
-
this.logError(error);
|
|
233
|
-
throw new ts_common_1.Exception(`Failed to list ${repo} branches`);
|
|
234
|
-
}
|
|
235
|
-
// Response includes (besides branch name) extra information about the branch.
|
|
236
|
-
return branches;
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
;
|
|
240
|
-
getArchiveUrl(repo, branch) {
|
|
241
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
-
const token = yield this.getGithubInstallationToken();
|
|
243
|
-
const client = this.createClient(token);
|
|
244
|
-
const response = yield client.repos.downloadArchive({
|
|
245
|
-
owner: this.config.gitOwner,
|
|
246
|
-
repo,
|
|
247
|
-
ref: branch,
|
|
248
|
-
archive_format: "zipball"
|
|
249
|
-
});
|
|
250
|
-
if (!response || !response.url) {
|
|
251
|
-
throw new ts_common_1.Exception(`Invalid response while getting archive url for branch ${branch} of repo ${repo}`);
|
|
252
|
-
}
|
|
253
|
-
this.logInfo(`Got archive url: ${response.url}.`);
|
|
254
|
-
return response.url;
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
downloadArchive(url, branch, request) {
|
|
258
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
259
|
-
const response = yield (0, backend_1.promisifyRequest)({ url: url, responseType: 'arraybuffer' });
|
|
260
|
-
if (!response || !response.data)
|
|
261
|
-
throw new ts_common_1.Exception(`Failed to download archive for branch ${branch} of product ${url}`);
|
|
262
|
-
const statusCode = response.status;
|
|
263
|
-
// TODO: need to handle 1XX and 3XX
|
|
264
|
-
if (statusCode < 200 || statusCode >= 300)
|
|
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)}`);
|
|
266
|
-
this.logDebug(`Got archive in zip format.`);
|
|
267
|
-
// Returns a buffer.
|
|
268
|
-
return response.data;
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
273
|
-
* @param repo The name of the repo.
|
|
274
|
-
* @param branch The name of the branch.
|
|
275
|
-
*
|
|
276
|
-
* This API has an upper limit of 1,000 files for a directory.
|
|
277
|
-
*/
|
|
278
|
-
listDirectoryContents(repo, branch, _path) {
|
|
279
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
280
|
-
const token = yield this.getGithubInstallationToken();
|
|
281
|
-
const client = this.createClient(token);
|
|
282
|
-
let response;
|
|
283
|
-
response = yield client.repos.getContent({
|
|
284
|
-
owner: this.config.gitOwner,
|
|
285
|
-
repo,
|
|
286
|
-
path: _path,
|
|
287
|
-
ref: branch
|
|
288
|
-
});
|
|
289
|
-
if (!response || !response.data)
|
|
290
|
-
return;
|
|
291
|
-
if (!Array.isArray(response.data)) {
|
|
292
|
-
throw new ts_common_1.Exception(`Invalid response from octokit's repos.getContent`);
|
|
293
|
-
}
|
|
294
|
-
return response.data;
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
exports.GithubModule_Class = GithubModule_Class;
|
|
299
|
-
exports.GithubModule = new GithubModule_Class();
|
|
300
|
-
//# sourceMappingURL=GithubModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GithubModule.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/GithubModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,4DAAwG;AACxG,2BAA2B;AAC3B,wCAA+D;AAE/D,6BAA6B;AAC7B,qEAAuG;AASvG,MAAa,kBACT,SAAQ,kBAAc;IAEtB;QACI,KAAK,CAAC,cAAc,CAAC,CAAC;IAC1B,CAAC;IAEO,YAAY,CAAC,KAAa,EAAE,MAAe;QAC/C,MAAM,IAAI,GAAG,GAAG,MAAM,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;QAC7C,MAAM,MAAM,GAAY,IAAI,cAAO,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AAA,YAAY,GAAG,IAAI,kBAAkB,EAAE,CAAC"}
|
package/index.d.ts
DELETED
package/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/main/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,qEAAmD"}
|