@teleporthq/teleport-github-gateway 0.19.9 → 0.19.17
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/dist/cjs/github-instance.d.ts +3 -2
- package/dist/cjs/github-instance.js +29 -11
- package/dist/cjs/github-instance.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +9 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/types.d.ts +9 -1
- package/dist/esm/github-instance.d.ts +3 -2
- package/dist/esm/github-instance.js +29 -11
- package/dist/esm/github-instance.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +9 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/types.d.ts +9 -1
- package/package.json +3 -3
- package/src/github-instance.ts +24 -8
- package/src/index.ts +10 -3
- package/src/types.ts +10 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ServiceAuth } from '@teleporthq/teleport-types';
|
|
2
|
-
import { RepositoryContentResponse, GithubRepositoryData, NewRepository, GithubCommitMeta, RepositoryIdentity, RepositoryCommitsListMeta, RepositoryCommitMeta } from './types';
|
|
2
|
+
import { RepositoryContentResponse, GithubRepositoryData, NewRepository, GithubCommitMeta, RepositoryIdentity, RepositoryCommitsListMeta, RepositoryCommitMeta, CreateBranchMeta } from './types';
|
|
3
3
|
export default class GithubInstance {
|
|
4
4
|
private githubApi;
|
|
5
5
|
private auth;
|
|
6
6
|
constructor(auth?: ServiceAuth);
|
|
7
7
|
authorize(auth?: ServiceAuth): void;
|
|
8
8
|
getRepoContent(repoIdentity: RepositoryIdentity): Promise<RepositoryContentResponse>;
|
|
9
|
-
getUserRepositories(
|
|
9
|
+
getUserRepositories(): Promise<GithubRepositoryData[]>;
|
|
10
|
+
createBranch(meta: CreateBranchMeta): Promise<any>;
|
|
10
11
|
createRepository(repository: NewRepository): Promise<GithubRepositoryData>;
|
|
11
12
|
getRepositoryCommits(meta: RepositoryCommitsListMeta): Promise<any>;
|
|
12
13
|
getCommitData(meta: RepositoryCommitMeta): Promise<any>;
|
|
@@ -91,12 +91,12 @@ var GithubInstance = /** @class */ (function () {
|
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
|
-
GithubInstance.prototype.getUserRepositories = function (
|
|
94
|
+
GithubInstance.prototype.getUserRepositories = function () {
|
|
95
95
|
return __awaiter(this, void 0, void 0, function () {
|
|
96
96
|
var user, data;
|
|
97
97
|
return __generator(this, function (_a) {
|
|
98
98
|
switch (_a.label) {
|
|
99
|
-
case 0: return [4 /*yield*/, this.githubApi.getUser(
|
|
99
|
+
case 0: return [4 /*yield*/, this.githubApi.getUser()];
|
|
100
100
|
case 1:
|
|
101
101
|
user = _a.sent();
|
|
102
102
|
return [4 /*yield*/, user.listRepos()];
|
|
@@ -107,14 +107,32 @@ var GithubInstance = /** @class */ (function () {
|
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
|
+
GithubInstance.prototype.createBranch = function (meta) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
+
var repo, owner, sourceBranch, newBranch, repository;
|
|
113
|
+
return __generator(this, function (_a) {
|
|
114
|
+
switch (_a.label) {
|
|
115
|
+
case 0:
|
|
116
|
+
repo = meta.repo, owner = meta.owner, sourceBranch = meta.sourceBranch, newBranch = meta.newBranch;
|
|
117
|
+
return [4 /*yield*/, this.githubApi.getRepo(owner, repo)];
|
|
118
|
+
case 1:
|
|
119
|
+
repository = _a.sent();
|
|
120
|
+
if (!repository) {
|
|
121
|
+
throw new Error('Repository does not exist');
|
|
122
|
+
}
|
|
123
|
+
return [2 /*return*/, repository.createBranch(sourceBranch, newBranch)];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
};
|
|
110
128
|
GithubInstance.prototype.createRepository = function (repository) {
|
|
111
129
|
return __awaiter(this, void 0, void 0, function () {
|
|
112
|
-
var
|
|
130
|
+
var meta, user, data;
|
|
113
131
|
return __generator(this, function (_a) {
|
|
114
132
|
switch (_a.label) {
|
|
115
133
|
case 0:
|
|
116
|
-
|
|
117
|
-
return [4 /*yield*/, this.githubApi.getUser(
|
|
134
|
+
meta = repository.meta;
|
|
135
|
+
return [4 /*yield*/, this.githubApi.getUser()
|
|
118
136
|
// Auto initialize repository by creating an initial commit with empty README
|
|
119
137
|
];
|
|
120
138
|
case 1:
|
|
@@ -208,11 +226,11 @@ var GithubInstance = /** @class */ (function () {
|
|
|
208
226
|
};
|
|
209
227
|
GithubInstance.prototype.commitFilesToRepo = function (commitMeta) {
|
|
210
228
|
return __awaiter(this, void 0, void 0, function () {
|
|
211
|
-
var branchName, files, repositoryIdentity, _a, commitMessage, repo, _b, ref, username, user, profile, repository, commitSHA, treeSHA, filesForGithub, newTreeSHA, newCommit, newCommitSHA;
|
|
229
|
+
var branchName, isPrivate, files, repositoryIdentity, _a, commitMessage, repo, _b, ref, username, user, profile, repository, commitSHA, treeSHA, filesForGithub, newTreeSHA, newCommit, newCommitSHA;
|
|
212
230
|
return __generator(this, function (_c) {
|
|
213
231
|
switch (_c.label) {
|
|
214
232
|
case 0:
|
|
215
|
-
branchName = commitMeta.branchName, files = commitMeta.files, repositoryIdentity = commitMeta.repositoryIdentity, _a = commitMeta.commitMessage, commitMessage = _a === void 0 ? constants_1.DEFAULT_COMMIT_MESSAGE : _a;
|
|
233
|
+
branchName = commitMeta.branchName, isPrivate = commitMeta.isPrivate, files = commitMeta.files, repositoryIdentity = commitMeta.repositoryIdentity, _a = commitMeta.commitMessage, commitMessage = _a === void 0 ? constants_1.DEFAULT_COMMIT_MESSAGE : _a;
|
|
216
234
|
repo = repositoryIdentity.repo, _b = repositoryIdentity.ref, ref = _b === void 0 ? constants_1.DEFAULT_REF : _b;
|
|
217
235
|
username = repositoryIdentity.username;
|
|
218
236
|
if (!!username) return [3 /*break*/, 3];
|
|
@@ -226,7 +244,7 @@ var GithubInstance = /** @class */ (function () {
|
|
|
226
244
|
_c.label = 3;
|
|
227
245
|
case 3:
|
|
228
246
|
// Step 0: Create repository if it does not exist
|
|
229
|
-
return [4 /*yield*/, this.ensureRepoExists(username, repo)];
|
|
247
|
+
return [4 /*yield*/, this.ensureRepoExists(username, repo, isPrivate)];
|
|
230
248
|
case 4:
|
|
231
249
|
// Step 0: Create repository if it does not exist
|
|
232
250
|
_c.sent();
|
|
@@ -276,17 +294,17 @@ var GithubInstance = /** @class */ (function () {
|
|
|
276
294
|
});
|
|
277
295
|
});
|
|
278
296
|
};
|
|
279
|
-
GithubInstance.prototype.ensureRepoExists = function (username, repo) {
|
|
297
|
+
GithubInstance.prototype.ensureRepoExists = function (username, repo, isPrivate) {
|
|
280
298
|
return __awaiter(this, void 0, void 0, function () {
|
|
281
299
|
var repositories, repoExists;
|
|
282
300
|
return __generator(this, function (_a) {
|
|
283
301
|
switch (_a.label) {
|
|
284
|
-
case 0: return [4 /*yield*/, this.getUserRepositories(
|
|
302
|
+
case 0: return [4 /*yield*/, this.getUserRepositories()];
|
|
285
303
|
case 1:
|
|
286
304
|
repositories = _a.sent();
|
|
287
305
|
repoExists = repositories.some(function (repoMeta) { return repoMeta.name === repo; });
|
|
288
306
|
if (!!repoExists) return [3 /*break*/, 3];
|
|
289
|
-
return [4 /*yield*/, this.createRepository({ username: username, meta: { name: repo } })];
|
|
307
|
+
return [4 /*yield*/, this.createRepository({ username: username, meta: { name: repo, private: isPrivate } })];
|
|
290
308
|
case 2:
|
|
291
309
|
_a.sent();
|
|
292
310
|
_a.label = 3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-instance.js","sourceRoot":"","sources":["../../src/github-instance.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,0DAA+B;AAC/B,4DAA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.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GithubGatewayFactory, RepositoryIdentity, GithubFile, GithubCommitMeta, RepositoryCommitMeta } from './types';
|
|
1
|
+
import { GithubGatewayFactory, RepositoryIdentity, GithubFile, GithubCommitMeta, RepositoryCommitMeta, CreateBranchMeta } from './types';
|
|
2
2
|
export declare const createGithubGateway: GithubGatewayFactory;
|
|
3
|
-
export { GithubFile, RepositoryIdentity, GithubCommitMeta, RepositoryCommitMeta };
|
|
3
|
+
export { GithubFile, RepositoryIdentity, GithubCommitMeta, CreateBranchMeta, RepositoryCommitMeta };
|
package/dist/cjs/index.js
CHANGED
|
@@ -61,10 +61,10 @@ var createGithubGateway = function (auth) {
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
}); };
|
|
64
|
-
var getUserRepositories = function (
|
|
64
|
+
var getUserRepositories = function (authData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
65
|
return __generator(this, function (_a) {
|
|
66
66
|
authorizeGithubInstance(authData);
|
|
67
|
-
return [2 /*return*/, githubInstance.getUserRepositories(
|
|
67
|
+
return [2 /*return*/, githubInstance.getUserRepositories()];
|
|
68
68
|
});
|
|
69
69
|
}); };
|
|
70
70
|
var createRepository = function (repository, authData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -85,6 +85,12 @@ var createGithubGateway = function (auth) {
|
|
|
85
85
|
return [2 /*return*/, githubInstance.getRepositoryCommits(meta)];
|
|
86
86
|
});
|
|
87
87
|
}); };
|
|
88
|
+
var createBranch = function (meta, authData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
|
+
return __generator(this, function (_a) {
|
|
90
|
+
authorizeGithubInstance(authData);
|
|
91
|
+
return [2 /*return*/, githubInstance.createBranch(meta)];
|
|
92
|
+
});
|
|
93
|
+
}); };
|
|
88
94
|
var getRepositoryBranches = function (owner, repo, authData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
95
|
return __generator(this, function (_a) {
|
|
90
96
|
authorizeGithubInstance(authData);
|
|
@@ -108,6 +114,7 @@ var createGithubGateway = function (auth) {
|
|
|
108
114
|
getUserRepositories: getUserRepositories,
|
|
109
115
|
createRepository: createRepository,
|
|
110
116
|
getRepositoryCommits: getRepositoryCommits,
|
|
117
|
+
createBranch: createBranch,
|
|
111
118
|
getRepositoryBranches: getRepositoryBranches,
|
|
112
119
|
commitFilesToRepo: commitFilesToRepo,
|
|
113
120
|
getCommitData: getCommitData,
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sEAA8C;AAC9C,iCAA8D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,sEAA8C;AAC9C,iCAA8D;AAavD,IAAM,mBAAmB,GAAyB,UAAC,IAAsB;IAAtB,qBAAA,EAAA,SAAsB;IAC9E,IAAM,cAAc,GAAG,IAAI,yBAAc,CAAC,IAAI,CAAC,CAAA;IAE/C,IAAM,aAAa,GAAG,UAAO,YAAgC,EAAE,QAAsB;;;;;oBACnF,uBAAuB,CAAC,QAAQ,CAAC,CAAA;oBAEhB,qBAAM,cAAc,CAAC,cAAc,CAAC,YAAY,CAAC,EAAA;;oBAA1D,IAAI,GAAK,CAAA,SAAiD,CAAA,KAAtD;oBAEJ,IAAI,GAAK,YAAY,KAAjB,CAAiB;oBACvB,WAAW,GAAG,yBAAiB,CAAC,IAAI,CAAC,CAAA;oBAErC,gBAAgB,GAAG,EAAE,cAAc,gBAAA,EAAE,sBAAsB,EAAE,YAAY,EAAE,CAAA;oBACjF,sBAAO,yBAAiB,CAAC,IAAoB,EAAE,WAAW,EAAE,gBAAgB,CAAC,EAAA;;;SAC9E,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D,cAAc,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;IACpC,CAAC,CAAA;IAED,OAAO;QACL,aAAa,eAAA;QACb,mBAAmB,qBAAA;QACnB,gBAAgB,kBAAA;QAChB,oBAAoB,sBAAA;QACpB,YAAY,cAAA;QACZ,qBAAqB,uBAAA;QACrB,iBAAiB,mBAAA;QACjB,aAAa,eAAA;QACb,uBAAuB,yBAAA;KACxB,CAAA;AACH,CAAC,CAAA;AApEY,QAAA,mBAAmB,uBAoE/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/constants.ts","../../../../node_modules/cross-fetch/index.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/types.ts","../../src/utils.ts","../../src/github-instance.ts","../../src/index.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostic_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/util/types.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/ts3.6/base.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/base.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"68fbca858449d8fb6cdbe13f81b8fe5e5ca5997dbf65e2bc9dd29f415a278348",{"version":"409cf8770fbb9f099124e9ca744282ebfd85df2fd3650ae05c4ee3d03af66714","affectsGlobalScope":true},"d1e076bd03d792a96993f458172927e0c5ac3cb8e1b566f54f925e6ef19bbebb","a163038908c6bfe2f8aaf9d1febce33fba0bd85863c0f56439cc196c962be918","d49a625c30294f92976c954fffb2bcc2faeb81957148a363969ee742a43e2913","75ecadee387dde7be130c85ed277fdfcee3923e452260ffaf217ebaefe7bd305","cd619820771edb23926bb084906215ab9c491255fa707488d15748b38909b747","bddeb59cc3c5ac19ebc28b8baad0495d5d91efb13f47e3309f9941260af4bd99","a0532076a08dce21da0ceafd005bf333cf48856bc185c4381bf23dc50c0a7fc4","044cda984ab7bfb0b542585a4de19f9bc1464d7929f2dc884a4d9e2435ff733f","3a1b23734fc5aab14ec812b113709907f725eb06e6230802ca31a8931642dee9","c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3",{"version":"d1c92b66c4105659fcad4eb76a1481f7311033e117d0678a1ec545e8ddb8d4c6","affectsGlobalScope":true},"e23424b97418eca3226fd24de079f1203eb70360622e4e093af2aff14d4be6ec","dee93c07b4df5e26010dc9ec4cdf4d6e4076bb4474d2a8371529217c8b2740a4","d55bc773f71c50f55decb39b64a5d8b9889a7c9e94305b36656ebf30e4f47469","04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef",{"version":"c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870","affectsGlobalScope":true},"45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491","dfc747ab8dd5f623055a4c26fd35e8cceca869fd3f1cf09701c941ca3679665a","c9f5f2920ff61d7158417b8440d5181ddc34a3dfef811a5677dd8a9fb91471e9","5cc0a492da3602510b8f5ed1852b1e0390002780d8758fbc8c0cd023ca7085f8","ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28","64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753",{"version":"2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5","affectsGlobalScope":true},{"version":"a5782d6cea81fe43d2db7ed41e789458c933ab3ab60602f7b5b14c4da3370496","affectsGlobalScope":true},"b86b7ff709a82ef3cba2184136c025989958bad483ffb13e4ca35d720245adf4","6194335ee3353f7226ba31f31d6301d0c6be87228419c0a08976ccd9d4f1213e","5a173b7da4e6d073f9c18a02f387816a934614e7af306193995935fbb95f10b8","b447e123210c68f205f67b20c996c04a1eb64b0e591c5e06e164cd3d3a869b28","13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452","42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8","0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d","c55776aa1db2b963a5fb820c0650362e721cba51ebf83b069696f2501378c0f3","e2236264a811ed1d09a2487a433e8f5216ae62378cf233954ae220cf886f6717","3ec1e108d587a5661ec790db607f482605ba9f3830e118ce578e3ffa3c42e22b","100b3bb9d39d2b1b5340f1bf45a52e94ef1692b45232b4ba00fac5c3cc56d331",{"version":"ec1a29ddaecb683aa360df0bd98ab5d4171d2d549554f7c5ab2a5c183a3dcb67","affectsGlobalScope":true},"7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6","992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58","2597718d91e306949d89e285bf34c44192014ef541c3bd7cbb825c022749e974","a6b0abdb67d63ebe964ba5fee31bc3daf10c12eecd46b24d778426010c04c67e","ac4801ebc2355ba32329070123b1cd15891bf71b41dcaf9e75b4744832126a59","fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6","4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50","71ddd49185b68f27bfac127ef5d22cb2672c278e53e5370d9020ef50ca9c377d","b1ea7a6eaa7608e0e0529aebd323b526a79c6c05a4e519ae5c779675004dcdf1","9fcb033a6208485d8f3fadde31eb5cbcaf99149cff3e40c0dc53ebc6d0dff4e9","7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4","9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5","dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9","f4149f1aa299474c7040a35fe8f8ac2ad078cc1b190415adc1fff3ed52d490ea","3730099ed008776216268a97771de31753ef71e0a7d0ec650f588cba2a06ce44","8d649dbc429d7139a1d9a14ea2bf8af1dc089e0a879447539587463d4b6c248c","60c9e27816ec8ac8df7240598bb086e95b47edfb454c5cbf4003c812e0ed6e39","e361aecf17fc4034b4c122a1564471cdcd22ef3a51407803cb5a5fc020c04d02","4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"fc0ae4a8ad3c762b96f9d2c3700cb879a373458cb0bf3175478e3b4f85f7ef2f","fabbec378e1ddd86fcf2662e716c2b8318acedb664ee3a4cba6f9e8ee8269cf1","b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","efd55e8ca79171bf26c0d0e30221cb8ee1f5a31dd0c791ec4b2e886f42bab124","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[96,98],[92,93],[92,93,94,95],[97],[99],[89],[88,89],[43,48],[54,55,62,71],[44,54,62],[80],[48,55,63],[71,76],[51,54,62],[52],[51],[54],[54,56,71,79],[54,55,71],[62,71,79],[54,55,57,62,71,76,79],[57,76,79],[90],[79],[51,54,71],[64],[42],[78],[69,80,83],[54,72],[71],[74],[48,62],[40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],[62],[68],[81],[43,48,54,56,65,71,79,83],[29,30,35,36,37],[35,36,37,38],[35,38],[29,30,35,36],[31],[31,32,33,34]],"referencedMap":[[99,1],[94,2],[96,3],[95,2],[98,4],[100,5],[40,6],[90,7],[43,8],[44,9],[45,10],[46,11],[47,12],[48,13],[49,14],[51,15],[52,16],[53,17],[54,17],[55,18],[56,19],[57,20],[58,21],[59,22],[91,23],[60,17],[61,24],[62,25],[64,26],[65,27],[66,28],[69,17],[70,29],[71,30],[72,31],[74,17],[75,32],[76,33],[88,34],[78,35],[79,36],[80,37],[82,31],[84,38],[85,31],[38,39],[39,40],[36,41],[37,42],[32,43],[35,44],[34,43]],"exportedModulesMap":[[99,1],[94,2],[96,3],[95,2],[98,4],[100,5],[40,6],[90,7],[43,8],[44,9],[45,10],[46,11],[47,12],[48,13],[49,14],[51,15],[52,16],[53,17],[54,17],[55,18],[56,19],[57,20],[58,21],[59,22],[91,23],[60,17],[61,24],[62,25],[64,26],[65,27],[66,28],[69,17],[70,29],[71,30],[72,31],[74,17],[75,32],[76,33],[88,34],[78,35],[79,36],[80,37],[82,31],[84,38],[85,31],[38,39],[39,40],[36,41],[37,42],[32,43],[35,44],[34,43]],"semanticDiagnosticsPerFile":[99,92,94,96,95,93,98,97,100,89,40,42,90,43,44,45,46,47,48,49,50,51,52,53,54,55,56,41,86,57,58,59,91,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,88,78,79,80,81,82,83,87,84,85,30,6,8,7,2,9,10,11,12,13,14,15,16,3,4,20,17,18,19,21,22,23,5,24,25,26,27,1,28,29,38,39,36,37,33,32,35,31,34]},"version":"4.3.5"}
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/constants.ts","../../../../node_modules/cross-fetch/index.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/types.ts","../../src/utils.ts","../../src/github-instance.ts","../../src/index.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostic_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/util/types.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/ts3.6/base.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/base.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"68fbca858449d8fb6cdbe13f81b8fe5e5ca5997dbf65e2bc9dd29f415a278348",{"version":"409cf8770fbb9f099124e9ca744282ebfd85df2fd3650ae05c4ee3d03af66714","affectsGlobalScope":true},"576f47fdfa3466a45c1a95ce3623eefefe5526d29ac747e133036472032f4b01","a163038908c6bfe2f8aaf9d1febce33fba0bd85863c0f56439cc196c962be918","d49a625c30294f92976c954fffb2bcc2faeb81957148a363969ee742a43e2913","75ecadee387dde7be130c85ed277fdfcee3923e452260ffaf217ebaefe7bd305","cd619820771edb23926bb084906215ab9c491255fa707488d15748b38909b747","957fdf4c749b6f4a689c97b34b3cbed46d2894c89332363b4c71e2ba0da52566","a0532076a08dce21da0ceafd005bf333cf48856bc185c4381bf23dc50c0a7fc4","3a1d693fe5ae310d25ae3a3448c99522d03aba073db81457e56e04d2c7bb3c71","175650ed3467ea25532c49f562e87d6180a18555390360951b054f8503223c28","c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3",{"version":"d1c92b66c4105659fcad4eb76a1481f7311033e117d0678a1ec545e8ddb8d4c6","affectsGlobalScope":true},"e23424b97418eca3226fd24de079f1203eb70360622e4e093af2aff14d4be6ec","dee93c07b4df5e26010dc9ec4cdf4d6e4076bb4474d2a8371529217c8b2740a4","d55bc773f71c50f55decb39b64a5d8b9889a7c9e94305b36656ebf30e4f47469","04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef",{"version":"c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870","affectsGlobalScope":true},"45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491","dfc747ab8dd5f623055a4c26fd35e8cceca869fd3f1cf09701c941ca3679665a","c9f5f2920ff61d7158417b8440d5181ddc34a3dfef811a5677dd8a9fb91471e9","5cc0a492da3602510b8f5ed1852b1e0390002780d8758fbc8c0cd023ca7085f8","ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28","64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753",{"version":"2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5","affectsGlobalScope":true},{"version":"a5782d6cea81fe43d2db7ed41e789458c933ab3ab60602f7b5b14c4da3370496","affectsGlobalScope":true},"b86b7ff709a82ef3cba2184136c025989958bad483ffb13e4ca35d720245adf4","6194335ee3353f7226ba31f31d6301d0c6be87228419c0a08976ccd9d4f1213e","5a173b7da4e6d073f9c18a02f387816a934614e7af306193995935fbb95f10b8","b447e123210c68f205f67b20c996c04a1eb64b0e591c5e06e164cd3d3a869b28","13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452","42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8","0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d","c55776aa1db2b963a5fb820c0650362e721cba51ebf83b069696f2501378c0f3","e2236264a811ed1d09a2487a433e8f5216ae62378cf233954ae220cf886f6717","3ec1e108d587a5661ec790db607f482605ba9f3830e118ce578e3ffa3c42e22b","100b3bb9d39d2b1b5340f1bf45a52e94ef1692b45232b4ba00fac5c3cc56d331",{"version":"ec1a29ddaecb683aa360df0bd98ab5d4171d2d549554f7c5ab2a5c183a3dcb67","affectsGlobalScope":true},"7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6","992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58","2597718d91e306949d89e285bf34c44192014ef541c3bd7cbb825c022749e974","a6b0abdb67d63ebe964ba5fee31bc3daf10c12eecd46b24d778426010c04c67e","ac4801ebc2355ba32329070123b1cd15891bf71b41dcaf9e75b4744832126a59","fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6","4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50","71ddd49185b68f27bfac127ef5d22cb2672c278e53e5370d9020ef50ca9c377d","b1ea7a6eaa7608e0e0529aebd323b526a79c6c05a4e519ae5c779675004dcdf1","9fcb033a6208485d8f3fadde31eb5cbcaf99149cff3e40c0dc53ebc6d0dff4e9","7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4","9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5","dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9","f4149f1aa299474c7040a35fe8f8ac2ad078cc1b190415adc1fff3ed52d490ea","3730099ed008776216268a97771de31753ef71e0a7d0ec650f588cba2a06ce44","8d649dbc429d7139a1d9a14ea2bf8af1dc089e0a879447539587463d4b6c248c","60c9e27816ec8ac8df7240598bb086e95b47edfb454c5cbf4003c812e0ed6e39","e361aecf17fc4034b4c122a1564471cdcd22ef3a51407803cb5a5fc020c04d02","4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"fc0ae4a8ad3c762b96f9d2c3700cb879a373458cb0bf3175478e3b4f85f7ef2f","fabbec378e1ddd86fcf2662e716c2b8318acedb664ee3a4cba6f9e8ee8269cf1","b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","efd55e8ca79171bf26c0d0e30221cb8ee1f5a31dd0c791ec4b2e886f42bab124","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[96,98],[92,93],[92,93,94,95],[97],[99],[89],[88,89],[43,48],[54,55,62,71],[44,54,62],[80],[48,55,63],[71,76],[51,54,62],[52],[51],[54],[54,56,71,79],[54,55,71],[62,71,79],[54,55,57,62,71,76,79],[57,76,79],[90],[79],[51,54,71],[64],[42],[78],[69,80,83],[54,72],[71],[74],[48,62],[40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],[62],[68],[81],[43,48,54,56,65,71,79,83],[29,30,35,36,37],[35,36,37,38],[35,38],[29,30,35,36],[31],[31,32,33,34]],"referencedMap":[[99,1],[94,2],[96,3],[95,2],[98,4],[100,5],[40,6],[90,7],[43,8],[44,9],[45,10],[46,11],[47,12],[48,13],[49,14],[51,15],[52,16],[53,17],[54,17],[55,18],[56,19],[57,20],[58,21],[59,22],[91,23],[60,17],[61,24],[62,25],[64,26],[65,27],[66,28],[69,17],[70,29],[71,30],[72,31],[74,17],[75,32],[76,33],[88,34],[78,35],[79,36],[80,37],[82,31],[84,38],[85,31],[38,39],[39,40],[36,41],[37,42],[32,43],[35,44],[34,43]],"exportedModulesMap":[[99,1],[94,2],[96,3],[95,2],[98,4],[100,5],[40,6],[90,7],[43,8],[44,9],[45,10],[46,11],[47,12],[48,13],[49,14],[51,15],[52,16],[53,17],[54,17],[55,18],[56,19],[57,20],[58,21],[59,22],[91,23],[60,17],[61,24],[62,25],[64,26],[65,27],[66,28],[69,17],[70,29],[71,30],[72,31],[74,17],[75,32],[76,33],[88,34],[78,35],[79,36],[80,37],[82,31],[84,38],[85,31],[38,39],[39,40],[36,41],[37,42],[32,43],[35,44],[34,43]],"semanticDiagnosticsPerFile":[99,92,94,96,95,93,98,97,100,89,40,42,90,43,44,45,46,47,48,49,50,51,52,53,54,55,56,41,86,57,58,59,91,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,88,78,79,80,81,82,83,87,84,85,30,6,8,7,2,9,10,11,12,13,14,15,16,3,4,20,17,18,19,21,22,23,5,24,25,26,27,1,28,29,38,39,36,37,33,32,35,31,34]},"version":"4.3.5"}
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import GithubInstance from './github-instance';
|
|
|
3
3
|
export declare type GithubGatewayFactory = (auth?: ServiceAuth) => GithubGateway;
|
|
4
4
|
export interface GithubGateway {
|
|
5
5
|
getRepository: (repo: RepositoryIdentity, auth?: ServiceAuth) => Promise<GeneratedFolder>;
|
|
6
|
-
getUserRepositories: (
|
|
6
|
+
getUserRepositories: (auth?: ServiceAuth) => Promise<GithubRepositoryData[]>;
|
|
7
7
|
commitFilesToRepo: (commitMeta: GithubCommitMeta, auth?: ServiceAuth) => Promise<string>;
|
|
8
8
|
createRepository: (repository: NewRepository, auth?: ServiceAuth) => Promise<GithubRepositoryData>;
|
|
9
9
|
getRepositoryCommits: (meta: RepositoryCommitsListMeta, authData: ServiceAuth) => Promise<any>;
|
|
10
|
+
createBranch: (meta: CreateBranchMeta, authData: ServiceAuth) => Promise<any>;
|
|
10
11
|
getRepositoryBranches: (owner: string, repo: string, authData: ServiceAuth) => Promise<any>;
|
|
11
12
|
getCommitData: (meta: RepositoryCommitMeta, authData: ServiceAuth) => Promise<any>;
|
|
12
13
|
authorizeGithubInstance: (authData?: ServiceAuth) => void;
|
|
@@ -22,6 +23,13 @@ export interface GithubCommitMeta {
|
|
|
22
23
|
repositoryIdentity: RepositoryIdentity;
|
|
23
24
|
branchName: string;
|
|
24
25
|
commitMessage?: string;
|
|
26
|
+
isPrivate?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface CreateBranchMeta {
|
|
29
|
+
repo: string;
|
|
30
|
+
owner: string;
|
|
31
|
+
sourceBranch: string;
|
|
32
|
+
newBranch: string;
|
|
25
33
|
}
|
|
26
34
|
export interface RepositoryCommitMeta {
|
|
27
35
|
repo: string;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ServiceAuth } from '@teleporthq/teleport-types';
|
|
2
|
-
import { RepositoryContentResponse, GithubRepositoryData, NewRepository, GithubCommitMeta, RepositoryIdentity, RepositoryCommitsListMeta, RepositoryCommitMeta } from './types';
|
|
2
|
+
import { RepositoryContentResponse, GithubRepositoryData, NewRepository, GithubCommitMeta, RepositoryIdentity, RepositoryCommitsListMeta, RepositoryCommitMeta, CreateBranchMeta } from './types';
|
|
3
3
|
export default class GithubInstance {
|
|
4
4
|
private githubApi;
|
|
5
5
|
private auth;
|
|
6
6
|
constructor(auth?: ServiceAuth);
|
|
7
7
|
authorize(auth?: ServiceAuth): void;
|
|
8
8
|
getRepoContent(repoIdentity: RepositoryIdentity): Promise<RepositoryContentResponse>;
|
|
9
|
-
getUserRepositories(
|
|
9
|
+
getUserRepositories(): Promise<GithubRepositoryData[]>;
|
|
10
|
+
createBranch(meta: CreateBranchMeta): Promise<any>;
|
|
10
11
|
createRepository(repository: NewRepository): Promise<GithubRepositoryData>;
|
|
11
12
|
getRepositoryCommits(meta: RepositoryCommitsListMeta): Promise<any>;
|
|
12
13
|
getCommitData(meta: RepositoryCommitMeta): Promise<any>;
|
|
@@ -86,12 +86,12 @@ var GithubInstance = /** @class */ (function () {
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
};
|
|
89
|
-
GithubInstance.prototype.getUserRepositories = function (
|
|
89
|
+
GithubInstance.prototype.getUserRepositories = function () {
|
|
90
90
|
return __awaiter(this, void 0, void 0, function () {
|
|
91
91
|
var user, data;
|
|
92
92
|
return __generator(this, function (_a) {
|
|
93
93
|
switch (_a.label) {
|
|
94
|
-
case 0: return [4 /*yield*/, this.githubApi.getUser(
|
|
94
|
+
case 0: return [4 /*yield*/, this.githubApi.getUser()];
|
|
95
95
|
case 1:
|
|
96
96
|
user = _a.sent();
|
|
97
97
|
return [4 /*yield*/, user.listRepos()];
|
|
@@ -102,14 +102,32 @@ var GithubInstance = /** @class */ (function () {
|
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
|
+
GithubInstance.prototype.createBranch = function (meta) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
+
var repo, owner, sourceBranch, newBranch, repository;
|
|
108
|
+
return __generator(this, function (_a) {
|
|
109
|
+
switch (_a.label) {
|
|
110
|
+
case 0:
|
|
111
|
+
repo = meta.repo, owner = meta.owner, sourceBranch = meta.sourceBranch, newBranch = meta.newBranch;
|
|
112
|
+
return [4 /*yield*/, this.githubApi.getRepo(owner, repo)];
|
|
113
|
+
case 1:
|
|
114
|
+
repository = _a.sent();
|
|
115
|
+
if (!repository) {
|
|
116
|
+
throw new Error('Repository does not exist');
|
|
117
|
+
}
|
|
118
|
+
return [2 /*return*/, repository.createBranch(sourceBranch, newBranch)];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
};
|
|
105
123
|
GithubInstance.prototype.createRepository = function (repository) {
|
|
106
124
|
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
-
var
|
|
125
|
+
var meta, user, data;
|
|
108
126
|
return __generator(this, function (_a) {
|
|
109
127
|
switch (_a.label) {
|
|
110
128
|
case 0:
|
|
111
|
-
|
|
112
|
-
return [4 /*yield*/, this.githubApi.getUser(
|
|
129
|
+
meta = repository.meta;
|
|
130
|
+
return [4 /*yield*/, this.githubApi.getUser()
|
|
113
131
|
// Auto initialize repository by creating an initial commit with empty README
|
|
114
132
|
];
|
|
115
133
|
case 1:
|
|
@@ -203,11 +221,11 @@ var GithubInstance = /** @class */ (function () {
|
|
|
203
221
|
};
|
|
204
222
|
GithubInstance.prototype.commitFilesToRepo = function (commitMeta) {
|
|
205
223
|
return __awaiter(this, void 0, void 0, function () {
|
|
206
|
-
var branchName, files, repositoryIdentity, _a, commitMessage, repo, _b, ref, username, user, profile, repository, commitSHA, treeSHA, filesForGithub, newTreeSHA, newCommit, newCommitSHA;
|
|
224
|
+
var branchName, isPrivate, files, repositoryIdentity, _a, commitMessage, repo, _b, ref, username, user, profile, repository, commitSHA, treeSHA, filesForGithub, newTreeSHA, newCommit, newCommitSHA;
|
|
207
225
|
return __generator(this, function (_c) {
|
|
208
226
|
switch (_c.label) {
|
|
209
227
|
case 0:
|
|
210
|
-
branchName = commitMeta.branchName, files = commitMeta.files, repositoryIdentity = commitMeta.repositoryIdentity, _a = commitMeta.commitMessage, commitMessage = _a === void 0 ? DEFAULT_COMMIT_MESSAGE : _a;
|
|
228
|
+
branchName = commitMeta.branchName, isPrivate = commitMeta.isPrivate, files = commitMeta.files, repositoryIdentity = commitMeta.repositoryIdentity, _a = commitMeta.commitMessage, commitMessage = _a === void 0 ? DEFAULT_COMMIT_MESSAGE : _a;
|
|
211
229
|
repo = repositoryIdentity.repo, _b = repositoryIdentity.ref, ref = _b === void 0 ? DEFAULT_REF : _b;
|
|
212
230
|
username = repositoryIdentity.username;
|
|
213
231
|
if (!!username) return [3 /*break*/, 3];
|
|
@@ -221,7 +239,7 @@ var GithubInstance = /** @class */ (function () {
|
|
|
221
239
|
_c.label = 3;
|
|
222
240
|
case 3:
|
|
223
241
|
// Step 0: Create repository if it does not exist
|
|
224
|
-
return [4 /*yield*/, this.ensureRepoExists(username, repo)];
|
|
242
|
+
return [4 /*yield*/, this.ensureRepoExists(username, repo, isPrivate)];
|
|
225
243
|
case 4:
|
|
226
244
|
// Step 0: Create repository if it does not exist
|
|
227
245
|
_c.sent();
|
|
@@ -271,17 +289,17 @@ var GithubInstance = /** @class */ (function () {
|
|
|
271
289
|
});
|
|
272
290
|
});
|
|
273
291
|
};
|
|
274
|
-
GithubInstance.prototype.ensureRepoExists = function (username, repo) {
|
|
292
|
+
GithubInstance.prototype.ensureRepoExists = function (username, repo, isPrivate) {
|
|
275
293
|
return __awaiter(this, void 0, void 0, function () {
|
|
276
294
|
var repositories, repoExists;
|
|
277
295
|
return __generator(this, function (_a) {
|
|
278
296
|
switch (_a.label) {
|
|
279
|
-
case 0: return [4 /*yield*/, this.getUserRepositories(
|
|
297
|
+
case 0: return [4 /*yield*/, this.getUserRepositories()];
|
|
280
298
|
case 1:
|
|
281
299
|
repositories = _a.sent();
|
|
282
300
|
repoExists = repositories.some(function (repoMeta) { return repoMeta.name === repo; });
|
|
283
301
|
if (!!repoExists) return [3 /*break*/, 3];
|
|
284
|
-
return [4 /*yield*/, this.createRepository({ username: username, meta: { name: repo } })];
|
|
302
|
+
return [4 /*yield*/, this.createRepository({ username: username, meta: { name: repo, private: isPrivate } })];
|
|
285
303
|
case 2:
|
|
286
304
|
_a.sent();
|
|
287
305
|
_a.label = 3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-instance.js","sourceRoot":"","sources":["../../src/github-instance.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,OAAO,MAAM,MAAM,YAAY,CAAA;AAC/B,OAAO,KAAK,MAAM,aAAa,CAAA;AAI/B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"github-instance.js","sourceRoot":"","sources":["../../src/github-instance.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,OAAO,MAAM,MAAM,YAAY,CAAA;AAC/B,OAAO,KAAK,MAAM,aAAa,CAAA;AAI/B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,sBAAsB,EACtB,0BAA0B,GAC3B,MAAM,a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I;oBAC9B,OAAO,KAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;gBACpC,CAAC,CAAC,CAAA;gBAEF,sBAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAA;;;KAC7B;IAEa,mCAAU,GAAxB,UAAyB,IAAsB,EAAE,IAAgB;;;;;;6BAE7D,CAAA,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAA,EAA1B,wBAA0B;wBACtB,qBAAM,0BAA0B,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,EAAA;;wBAAlE,KAAA,SAAkE,CAAA;;4BAClE,qBAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAA;;wBAAnC,KAAA,SAAmC,CAAA;;;wBAHjC,IAAI,GACV,IAEuC,KAH7B;wBAKZ,sBAAO;gCACL,GAAG,EAAE,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG;gCAChD,IAAI,EAAE,IAAI,CAAC,IAAI;gCACf,IAAI,EAAE,QAAQ;gCACd,IAAI,EAAE,MAAM;6BACb,EAAA;;;;KACF;IAEa,mCAAU,GAAxB,UACE,IAAsB,EACtB,KAAuB,EACvB,OAAgB;;;;;4BAEH,qBAAM,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,EAAA;;wBAA5C,IAAI,GAAG,SAAqC;wBAClD,sBAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAA;;;;KACrB;IACH,qBAAC;AAAD,CAAC,AAhOD,IAgOC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GithubGatewayFactory, RepositoryIdentity, GithubFile, GithubCommitMeta, RepositoryCommitMeta } from './types';
|
|
1
|
+
import { GithubGatewayFactory, RepositoryIdentity, GithubFile, GithubCommitMeta, RepositoryCommitMeta, CreateBranchMeta } from './types';
|
|
2
2
|
export declare const createGithubGateway: GithubGatewayFactory;
|
|
3
|
-
export { GithubFile, RepositoryIdentity, GithubCommitMeta, RepositoryCommitMeta };
|
|
3
|
+
export { GithubFile, RepositoryIdentity, GithubCommitMeta, CreateBranchMeta, RepositoryCommitMeta };
|
package/dist/esm/index.js
CHANGED
|
@@ -55,10 +55,10 @@ export var createGithubGateway = function (auth) {
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
}); };
|
|
58
|
-
var getUserRepositories = function (
|
|
58
|
+
var getUserRepositories = function (authData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
59
|
return __generator(this, function (_a) {
|
|
60
60
|
authorizeGithubInstance(authData);
|
|
61
|
-
return [2 /*return*/, githubInstance.getUserRepositories(
|
|
61
|
+
return [2 /*return*/, githubInstance.getUserRepositories()];
|
|
62
62
|
});
|
|
63
63
|
}); };
|
|
64
64
|
var createRepository = function (repository, authData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -79,6 +79,12 @@ export var createGithubGateway = function (auth) {
|
|
|
79
79
|
return [2 /*return*/, githubInstance.getRepositoryCommits(meta)];
|
|
80
80
|
});
|
|
81
81
|
}); };
|
|
82
|
+
var createBranch = function (meta, authData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
83
|
+
return __generator(this, function (_a) {
|
|
84
|
+
authorizeGithubInstance(authData);
|
|
85
|
+
return [2 /*return*/, githubInstance.createBranch(meta)];
|
|
86
|
+
});
|
|
87
|
+
}); };
|
|
82
88
|
var getRepositoryBranches = function (owner, repo, authData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
83
89
|
return __generator(this, function (_a) {
|
|
84
90
|
authorizeGithubInstance(authData);
|
|
@@ -102,6 +108,7 @@ export var createGithubGateway = function (auth) {
|
|
|
102
108
|
getUserRepositories: getUserRepositories,
|
|
103
109
|
createRepository: createRepository,
|
|
104
110
|
getRepositoryCommits: getRepositoryCommits,
|
|
111
|
+
createBranch: createBranch,
|
|
105
112
|
getRepositoryBranches: getRepositoryBranches,
|
|
106
113
|
commitFilesToRepo: commitFilesToRepo,
|
|
107
114
|
getCommitData: getCommitData,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,cAAc,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAa9D,MAAM,CAAC,IAAM,mBAAmB,GAAyB,UAAC,IAAsB;IAAtB,qBAAA,EAAA,SAAsB;IAC9E,IAAM,cAAc,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAA;IAE/C,IAAM,aAAa,GAAG,UAAO,YAAgC,EAAE,QAAsB;;;;;oBACnF,uBAAuB,CAAC,QAAQ,CAAC,CAAA;oBAEhB,qBAAM,cAAc,CAAC,cAAc,CAAC,YAAY,CAAC,EAAA;;oBAA1D,IAAI,GAAK,CAAA,SAAiD,CAAA,KAAtD;oBAEJ,IAAI,GAAK,YAAY,KAAjB,CAAiB;oBACvB,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAA;oBAErC,gBAAgB,GAAG,EAAE,cAAc,gBAAA,EAAE,sBAAsB,EAAE,YAAY,EAAE,CAAA;oBACjF,sBAAO,iBAAiB,CAAC,IAAoB,EAAE,WAAW,EAAE,gBAAgB,CAAC,EAAA;;;SAC9E,CAAA;IAED,IAAM,mBAAmB,GAAG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Q,CAAC,CAAA;IACpC,CAAC,CAAA;IAED,OAAO;QACL,aAAa,eAAA;QACb,mBAAmB,qBAAA;QACnB,gBAAgB,kBAAA;QAChB,oBAAoB,sBAAA;QACpB,YAAY,cAAA;QACZ,qBAAqB,uBAAA;QACrB,iBAAiB,mBAAA;QACjB,aAAa,eAAA;QACb,uBAAuB,yBAAA;KACxB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/constants.ts","../../../../node_modules/cross-fetch/index.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/types.ts","../../src/utils.ts","../../src/github-instance.ts","../../src/index.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostic_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/util/types.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/ts3.6/base.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/base.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"68fbca858449d8fb6cdbe13f81b8fe5e5ca5997dbf65e2bc9dd29f415a278348",{"version":"409cf8770fbb9f099124e9ca744282ebfd85df2fd3650ae05c4ee3d03af66714","affectsGlobalScope":true},"d1e076bd03d792a96993f458172927e0c5ac3cb8e1b566f54f925e6ef19bbebb","a163038908c6bfe2f8aaf9d1febce33fba0bd85863c0f56439cc196c962be918","d49a625c30294f92976c954fffb2bcc2faeb81957148a363969ee742a43e2913","75ecadee387dde7be130c85ed277fdfcee3923e452260ffaf217ebaefe7bd305","cd619820771edb23926bb084906215ab9c491255fa707488d15748b38909b747","bddeb59cc3c5ac19ebc28b8baad0495d5d91efb13f47e3309f9941260af4bd99","a0532076a08dce21da0ceafd005bf333cf48856bc185c4381bf23dc50c0a7fc4","044cda984ab7bfb0b542585a4de19f9bc1464d7929f2dc884a4d9e2435ff733f","3a1b23734fc5aab14ec812b113709907f725eb06e6230802ca31a8931642dee9","c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3",{"version":"d1c92b66c4105659fcad4eb76a1481f7311033e117d0678a1ec545e8ddb8d4c6","affectsGlobalScope":true},"e23424b97418eca3226fd24de079f1203eb70360622e4e093af2aff14d4be6ec","dee93c07b4df5e26010dc9ec4cdf4d6e4076bb4474d2a8371529217c8b2740a4","d55bc773f71c50f55decb39b64a5d8b9889a7c9e94305b36656ebf30e4f47469","04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef",{"version":"c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870","affectsGlobalScope":true},"45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491","dfc747ab8dd5f623055a4c26fd35e8cceca869fd3f1cf09701c941ca3679665a","c9f5f2920ff61d7158417b8440d5181ddc34a3dfef811a5677dd8a9fb91471e9","5cc0a492da3602510b8f5ed1852b1e0390002780d8758fbc8c0cd023ca7085f8","ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28","64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753",{"version":"2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5","affectsGlobalScope":true},{"version":"a5782d6cea81fe43d2db7ed41e789458c933ab3ab60602f7b5b14c4da3370496","affectsGlobalScope":true},"b86b7ff709a82ef3cba2184136c025989958bad483ffb13e4ca35d720245adf4","6194335ee3353f7226ba31f31d6301d0c6be87228419c0a08976ccd9d4f1213e","5a173b7da4e6d073f9c18a02f387816a934614e7af306193995935fbb95f10b8","b447e123210c68f205f67b20c996c04a1eb64b0e591c5e06e164cd3d3a869b28","13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452","42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8","0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d","c55776aa1db2b963a5fb820c0650362e721cba51ebf83b069696f2501378c0f3","e2236264a811ed1d09a2487a433e8f5216ae62378cf233954ae220cf886f6717","3ec1e108d587a5661ec790db607f482605ba9f3830e118ce578e3ffa3c42e22b","100b3bb9d39d2b1b5340f1bf45a52e94ef1692b45232b4ba00fac5c3cc56d331",{"version":"ec1a29ddaecb683aa360df0bd98ab5d4171d2d549554f7c5ab2a5c183a3dcb67","affectsGlobalScope":true},"7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6","992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58","2597718d91e306949d89e285bf34c44192014ef541c3bd7cbb825c022749e974","a6b0abdb67d63ebe964ba5fee31bc3daf10c12eecd46b24d778426010c04c67e","ac4801ebc2355ba32329070123b1cd15891bf71b41dcaf9e75b4744832126a59","fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6","4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50","71ddd49185b68f27bfac127ef5d22cb2672c278e53e5370d9020ef50ca9c377d","b1ea7a6eaa7608e0e0529aebd323b526a79c6c05a4e519ae5c779675004dcdf1","9fcb033a6208485d8f3fadde31eb5cbcaf99149cff3e40c0dc53ebc6d0dff4e9","7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4","9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5","dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9","f4149f1aa299474c7040a35fe8f8ac2ad078cc1b190415adc1fff3ed52d490ea","3730099ed008776216268a97771de31753ef71e0a7d0ec650f588cba2a06ce44","8d649dbc429d7139a1d9a14ea2bf8af1dc089e0a879447539587463d4b6c248c","60c9e27816ec8ac8df7240598bb086e95b47edfb454c5cbf4003c812e0ed6e39","e361aecf17fc4034b4c122a1564471cdcd22ef3a51407803cb5a5fc020c04d02","4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"fc0ae4a8ad3c762b96f9d2c3700cb879a373458cb0bf3175478e3b4f85f7ef2f","fabbec378e1ddd86fcf2662e716c2b8318acedb664ee3a4cba6f9e8ee8269cf1","b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","efd55e8ca79171bf26c0d0e30221cb8ee1f5a31dd0c791ec4b2e886f42bab124","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[96,98],[92,93],[92,93,94,95],[97],[99],[89],[88,89],[43,48],[54,55,62,71],[44,54,62],[80],[48,55,63],[71,76],[51,54,62],[52],[51],[54],[54,56,71,79],[54,55,71],[62,71,79],[54,55,57,62,71,76,79],[57,76,79],[90],[79],[51,54,71],[64],[42],[78],[69,80,83],[54,72],[71],[74],[48,62],[40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],[62],[68],[81],[43,48,54,56,65,71,79,83],[29,30,35,36,37],[35,36,37,38],[35,38],[29,30,35,36],[31],[31,32,33,34]],"referencedMap":[[99,1],[94,2],[96,3],[95,2],[98,4],[100,5],[40,6],[90,7],[43,8],[44,9],[45,10],[46,11],[47,12],[48,13],[49,14],[51,15],[52,16],[53,17],[54,17],[55,18],[56,19],[57,20],[58,21],[59,22],[91,23],[60,17],[61,24],[62,25],[64,26],[65,27],[66,28],[69,17],[70,29],[71,30],[72,31],[74,17],[75,32],[76,33],[88,34],[78,35],[79,36],[80,37],[82,31],[84,38],[85,31],[38,39],[39,40],[36,41],[37,42],[32,43],[35,44],[34,43]],"exportedModulesMap":[[99,1],[94,2],[96,3],[95,2],[98,4],[100,5],[40,6],[90,7],[43,8],[44,9],[45,10],[46,11],[47,12],[48,13],[49,14],[51,15],[52,16],[53,17],[54,17],[55,18],[56,19],[57,20],[58,21],[59,22],[91,23],[60,17],[61,24],[62,25],[64,26],[65,27],[66,28],[69,17],[70,29],[71,30],[72,31],[74,17],[75,32],[76,33],[88,34],[78,35],[79,36],[80,37],[82,31],[84,38],[85,31],[38,39],[39,40],[36,41],[37,42],[32,43],[35,44],[34,43]],"semanticDiagnosticsPerFile":[99,92,94,96,95,93,98,97,100,89,40,42,90,43,44,45,46,47,48,49,50,51,52,53,54,55,56,41,86,57,58,59,91,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,88,78,79,80,81,82,83,87,84,85,30,6,8,7,2,9,10,11,12,13,14,15,16,3,4,20,17,18,19,21,22,23,5,24,25,26,27,1,28,29,38,39,36,37,33,32,35,31,34]},"version":"4.3.5"}
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/constants.ts","../../../../node_modules/cross-fetch/index.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/types.ts","../../src/utils.ts","../../src/github-instance.ts","../../src/index.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostic_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/util/types.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/ts3.6/base.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/base.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"68fbca858449d8fb6cdbe13f81b8fe5e5ca5997dbf65e2bc9dd29f415a278348",{"version":"409cf8770fbb9f099124e9ca744282ebfd85df2fd3650ae05c4ee3d03af66714","affectsGlobalScope":true},"576f47fdfa3466a45c1a95ce3623eefefe5526d29ac747e133036472032f4b01","a163038908c6bfe2f8aaf9d1febce33fba0bd85863c0f56439cc196c962be918","d49a625c30294f92976c954fffb2bcc2faeb81957148a363969ee742a43e2913","75ecadee387dde7be130c85ed277fdfcee3923e452260ffaf217ebaefe7bd305","cd619820771edb23926bb084906215ab9c491255fa707488d15748b38909b747","957fdf4c749b6f4a689c97b34b3cbed46d2894c89332363b4c71e2ba0da52566","a0532076a08dce21da0ceafd005bf333cf48856bc185c4381bf23dc50c0a7fc4","3a1d693fe5ae310d25ae3a3448c99522d03aba073db81457e56e04d2c7bb3c71","175650ed3467ea25532c49f562e87d6180a18555390360951b054f8503223c28","c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3",{"version":"d1c92b66c4105659fcad4eb76a1481f7311033e117d0678a1ec545e8ddb8d4c6","affectsGlobalScope":true},"e23424b97418eca3226fd24de079f1203eb70360622e4e093af2aff14d4be6ec","dee93c07b4df5e26010dc9ec4cdf4d6e4076bb4474d2a8371529217c8b2740a4","d55bc773f71c50f55decb39b64a5d8b9889a7c9e94305b36656ebf30e4f47469","04eaa93bd75f937f9184dcb95a7983800c5770cf8ddd8ac0f3734dc02f5b20ef",{"version":"c8155caf28fc7b0a564156a5df28ad8a844a3bd32d331d148d8f3ce88025c870","affectsGlobalScope":true},"45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491","dfc747ab8dd5f623055a4c26fd35e8cceca869fd3f1cf09701c941ca3679665a","c9f5f2920ff61d7158417b8440d5181ddc34a3dfef811a5677dd8a9fb91471e9","5cc0a492da3602510b8f5ed1852b1e0390002780d8758fbc8c0cd023ca7085f8","ec7dafafe751a5121f8f1c80201ebe7e7238c47e6329280a73c4d1ca4bb7fa28","64debeb10e4b7ae4ec9e89bfb4e04c6101ab98c3cc806d14e5488607cfec2753",{"version":"2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5","affectsGlobalScope":true},{"version":"a5782d6cea81fe43d2db7ed41e789458c933ab3ab60602f7b5b14c4da3370496","affectsGlobalScope":true},"b86b7ff709a82ef3cba2184136c025989958bad483ffb13e4ca35d720245adf4","6194335ee3353f7226ba31f31d6301d0c6be87228419c0a08976ccd9d4f1213e","5a173b7da4e6d073f9c18a02f387816a934614e7af306193995935fbb95f10b8","b447e123210c68f205f67b20c996c04a1eb64b0e591c5e06e164cd3d3a869b28","13257840c0850d4ebd7c2b17604a9e006f752de76c2400ebc752bc465c330452","42176966283d3835c34278b9b5c0f470d484c0c0c6a55c20a2c916a1ce69b6e8","0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d","c55776aa1db2b963a5fb820c0650362e721cba51ebf83b069696f2501378c0f3","e2236264a811ed1d09a2487a433e8f5216ae62378cf233954ae220cf886f6717","3ec1e108d587a5661ec790db607f482605ba9f3830e118ce578e3ffa3c42e22b","100b3bb9d39d2b1b5340f1bf45a52e94ef1692b45232b4ba00fac5c3cc56d331",{"version":"ec1a29ddaecb683aa360df0bd98ab5d4171d2d549554f7c5ab2a5c183a3dcb67","affectsGlobalScope":true},"7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6","992c6f6be16c0a1d2eec13ece33adeea2c747ba27fcd078353a8f4bb5b4fea58","2597718d91e306949d89e285bf34c44192014ef541c3bd7cbb825c022749e974","a6b0abdb67d63ebe964ba5fee31bc3daf10c12eecd46b24d778426010c04c67e","ac4801ebc2355ba32329070123b1cd15891bf71b41dcaf9e75b4744832126a59","fd2298fba0640e7295e7bd545e2dfbfcccbb00c27019e501c87965a02bbdebf6","4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50","71ddd49185b68f27bfac127ef5d22cb2672c278e53e5370d9020ef50ca9c377d","b1ea7a6eaa7608e0e0529aebd323b526a79c6c05a4e519ae5c779675004dcdf1","9fcb033a6208485d8f3fadde31eb5cbcaf99149cff3e40c0dc53ebc6d0dff4e9","7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4","9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5","dcc6910d95a3625fd2b0487fda055988e46ab46c357a1b3618c27b4a8dd739c9","f4149f1aa299474c7040a35fe8f8ac2ad078cc1b190415adc1fff3ed52d490ea","3730099ed008776216268a97771de31753ef71e0a7d0ec650f588cba2a06ce44","8d649dbc429d7139a1d9a14ea2bf8af1dc089e0a879447539587463d4b6c248c","60c9e27816ec8ac8df7240598bb086e95b47edfb454c5cbf4003c812e0ed6e39","e361aecf17fc4034b4c122a1564471cdcd22ef3a51407803cb5a5fc020c04d02","4926467de88a92a4fc9971d8c6f21b91eca1c0e7fc2a46cc4638ab9440c73875",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"fc0ae4a8ad3c762b96f9d2c3700cb879a373458cb0bf3175478e3b4f85f7ef2f","fabbec378e1ddd86fcf2662e716c2b8318acedb664ee3a4cba6f9e8ee8269cf1","b3593bd345ebea5e4d0a894c03251a3774b34df3d6db57075c18e089a599ba76","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","efd55e8ca79171bf26c0d0e30221cb8ee1f5a31dd0c791ec4b2e886f42bab124","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[96,98],[92,93],[92,93,94,95],[97],[99],[89],[88,89],[43,48],[54,55,62,71],[44,54,62],[80],[48,55,63],[71,76],[51,54,62],[52],[51],[54],[54,56,71,79],[54,55,71],[62,71,79],[54,55,57,62,71,76,79],[57,76,79],[90],[79],[51,54,71],[64],[42],[78],[69,80,83],[54,72],[71],[74],[48,62],[40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],[62],[68],[81],[43,48,54,56,65,71,79,83],[29,30,35,36,37],[35,36,37,38],[35,38],[29,30,35,36],[31],[31,32,33,34]],"referencedMap":[[99,1],[94,2],[96,3],[95,2],[98,4],[100,5],[40,6],[90,7],[43,8],[44,9],[45,10],[46,11],[47,12],[48,13],[49,14],[51,15],[52,16],[53,17],[54,17],[55,18],[56,19],[57,20],[58,21],[59,22],[91,23],[60,17],[61,24],[62,25],[64,26],[65,27],[66,28],[69,17],[70,29],[71,30],[72,31],[74,17],[75,32],[76,33],[88,34],[78,35],[79,36],[80,37],[82,31],[84,38],[85,31],[38,39],[39,40],[36,41],[37,42],[32,43],[35,44],[34,43]],"exportedModulesMap":[[99,1],[94,2],[96,3],[95,2],[98,4],[100,5],[40,6],[90,7],[43,8],[44,9],[45,10],[46,11],[47,12],[48,13],[49,14],[51,15],[52,16],[53,17],[54,17],[55,18],[56,19],[57,20],[58,21],[59,22],[91,23],[60,17],[61,24],[62,25],[64,26],[65,27],[66,28],[69,17],[70,29],[71,30],[72,31],[74,17],[75,32],[76,33],[88,34],[78,35],[79,36],[80,37],[82,31],[84,38],[85,31],[38,39],[39,40],[36,41],[37,42],[32,43],[35,44],[34,43]],"semanticDiagnosticsPerFile":[99,92,94,96,95,93,98,97,100,89,40,42,90,43,44,45,46,47,48,49,50,51,52,53,54,55,56,41,86,57,58,59,91,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,88,78,79,80,81,82,83,87,84,85,30,6,8,7,2,9,10,11,12,13,14,15,16,3,4,20,17,18,19,21,22,23,5,24,25,26,27,1,28,29,38,39,36,37,33,32,35,31,34]},"version":"4.3.5"}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -3,10 +3,11 @@ import GithubInstance from './github-instance';
|
|
|
3
3
|
export declare type GithubGatewayFactory = (auth?: ServiceAuth) => GithubGateway;
|
|
4
4
|
export interface GithubGateway {
|
|
5
5
|
getRepository: (repo: RepositoryIdentity, auth?: ServiceAuth) => Promise<GeneratedFolder>;
|
|
6
|
-
getUserRepositories: (
|
|
6
|
+
getUserRepositories: (auth?: ServiceAuth) => Promise<GithubRepositoryData[]>;
|
|
7
7
|
commitFilesToRepo: (commitMeta: GithubCommitMeta, auth?: ServiceAuth) => Promise<string>;
|
|
8
8
|
createRepository: (repository: NewRepository, auth?: ServiceAuth) => Promise<GithubRepositoryData>;
|
|
9
9
|
getRepositoryCommits: (meta: RepositoryCommitsListMeta, authData: ServiceAuth) => Promise<any>;
|
|
10
|
+
createBranch: (meta: CreateBranchMeta, authData: ServiceAuth) => Promise<any>;
|
|
10
11
|
getRepositoryBranches: (owner: string, repo: string, authData: ServiceAuth) => Promise<any>;
|
|
11
12
|
getCommitData: (meta: RepositoryCommitMeta, authData: ServiceAuth) => Promise<any>;
|
|
12
13
|
authorizeGithubInstance: (authData?: ServiceAuth) => void;
|
|
@@ -22,6 +23,13 @@ export interface GithubCommitMeta {
|
|
|
22
23
|
repositoryIdentity: RepositoryIdentity;
|
|
23
24
|
branchName: string;
|
|
24
25
|
commitMessage?: string;
|
|
26
|
+
isPrivate?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface CreateBranchMeta {
|
|
29
|
+
repo: string;
|
|
30
|
+
owner: string;
|
|
31
|
+
sourceBranch: string;
|
|
32
|
+
newBranch: string;
|
|
25
33
|
}
|
|
26
34
|
export interface RepositoryCommitMeta {
|
|
27
35
|
repo: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teleporthq/teleport-github-gateway",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.17",
|
|
4
4
|
"description": "Teleport github gateway - use this package if you require a github integration",
|
|
5
5
|
"author": "teleportHQ",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"build": "tsc -p tsconfig.json && tsc -p tsconfig.json --module commonjs --outDir dist/cjs"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@teleporthq/teleport-types": "^0.19.
|
|
27
|
+
"@teleporthq/teleport-types": "^0.19.17",
|
|
28
28
|
"cross-fetch": "^3.0.4",
|
|
29
29
|
"github-api": "^3.2.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "4af7375f20235273eeabb48ef109cab2a02ddceb"
|
|
32
32
|
}
|
package/src/github-instance.ts
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
GithubFile,
|
|
23
23
|
RepositoryCommitsListMeta,
|
|
24
24
|
RepositoryCommitMeta,
|
|
25
|
+
CreateBranchMeta,
|
|
25
26
|
} from './types'
|
|
26
27
|
import { createBase64GithubFileBlob } from './utils'
|
|
27
28
|
|
|
@@ -59,15 +60,25 @@ export default class GithubInstance {
|
|
|
59
60
|
return repository.getContents(ref, path)
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
public async getUserRepositories(
|
|
63
|
-
const user = await this.githubApi.getUser(
|
|
63
|
+
public async getUserRepositories(): Promise<GithubRepositoryData[]> {
|
|
64
|
+
const user = await this.githubApi.getUser()
|
|
64
65
|
const { data } = await user.listRepos()
|
|
65
66
|
return data
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
public async createBranch(meta: CreateBranchMeta) {
|
|
70
|
+
const { repo, owner, sourceBranch, newBranch } = meta
|
|
71
|
+
const repository = await this.githubApi.getRepo(owner, repo)
|
|
72
|
+
if (!repository) {
|
|
73
|
+
throw new Error('Repository does not exist')
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return repository.createBranch(sourceBranch, newBranch)
|
|
77
|
+
}
|
|
78
|
+
|
|
68
79
|
public async createRepository(repository: NewRepository): Promise<GithubRepositoryData> {
|
|
69
|
-
const {
|
|
70
|
-
const user = await this.githubApi.getUser(
|
|
80
|
+
const { meta } = repository
|
|
81
|
+
const user = await this.githubApi.getUser()
|
|
71
82
|
|
|
72
83
|
// Auto initialize repository by creating an initial commit with empty README
|
|
73
84
|
if (typeof meta.auto_init === 'undefined' || meta.auto_init === null) {
|
|
@@ -126,6 +137,7 @@ export default class GithubInstance {
|
|
|
126
137
|
public async commitFilesToRepo(commitMeta: GithubCommitMeta): Promise<string> {
|
|
127
138
|
const {
|
|
128
139
|
branchName,
|
|
140
|
+
isPrivate,
|
|
129
141
|
files,
|
|
130
142
|
repositoryIdentity,
|
|
131
143
|
commitMessage = DEFAULT_COMMIT_MESSAGE,
|
|
@@ -141,7 +153,7 @@ export default class GithubInstance {
|
|
|
141
153
|
}
|
|
142
154
|
|
|
143
155
|
// Step 0: Create repository if it does not exist
|
|
144
|
-
await this.ensureRepoExists(username, repo)
|
|
156
|
+
await this.ensureRepoExists(username, repo, isPrivate)
|
|
145
157
|
const repository: GithubRepository = await this.githubApi.getRepo(username, repo)
|
|
146
158
|
|
|
147
159
|
// Step 1: Create branch if it does not exist
|
|
@@ -169,12 +181,16 @@ export default class GithubInstance {
|
|
|
169
181
|
return `${GITHUB_REPOSITORY_BASE_URL}/${repository.__fullname}`
|
|
170
182
|
}
|
|
171
183
|
|
|
172
|
-
private async ensureRepoExists(
|
|
173
|
-
|
|
184
|
+
private async ensureRepoExists(
|
|
185
|
+
username: string,
|
|
186
|
+
repo: string,
|
|
187
|
+
isPrivate: boolean
|
|
188
|
+
): Promise<void> {
|
|
189
|
+
const repositories = await this.getUserRepositories()
|
|
174
190
|
const repoExists = repositories.some((repoMeta: GithubRepositoryData) => repoMeta.name === repo)
|
|
175
191
|
|
|
176
192
|
if (!repoExists) {
|
|
177
|
-
await this.createRepository({ username, meta: { name: repo } })
|
|
193
|
+
await this.createRepository({ username, meta: { name: repo, private: isPrivate } })
|
|
178
194
|
}
|
|
179
195
|
}
|
|
180
196
|
|
package/src/index.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
GithubCommitMeta,
|
|
12
12
|
RepositoryCommitsListMeta,
|
|
13
13
|
RepositoryCommitMeta,
|
|
14
|
+
CreateBranchMeta,
|
|
14
15
|
} from './types'
|
|
15
16
|
|
|
16
17
|
export const createGithubGateway: GithubGatewayFactory = (auth: ServiceAuth = {}) => {
|
|
@@ -28,9 +29,9 @@ export const createGithubGateway: GithubGatewayFactory = (auth: ServiceAuth = {}
|
|
|
28
29
|
return fetchFilesContent(data as GithubFile[], emptyFolder, filesFetcherMeta)
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
const getUserRepositories = async (
|
|
32
|
+
const getUserRepositories = async (authData?: ServiceAuth) => {
|
|
32
33
|
authorizeGithubInstance(authData)
|
|
33
|
-
return githubInstance.getUserRepositories(
|
|
34
|
+
return githubInstance.getUserRepositories()
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
const createRepository = async (repository: NewRepository, authData?: ServiceAuth) => {
|
|
@@ -48,6 +49,11 @@ export const createGithubGateway: GithubGatewayFactory = (auth: ServiceAuth = {}
|
|
|
48
49
|
return githubInstance.getRepositoryCommits(meta)
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
const createBranch = async (meta: CreateBranchMeta, authData: ServiceAuth) => {
|
|
53
|
+
authorizeGithubInstance(authData)
|
|
54
|
+
return githubInstance.createBranch(meta)
|
|
55
|
+
}
|
|
56
|
+
|
|
51
57
|
const getRepositoryBranches = async (owner: string, repo: string, authData: ServiceAuth) => {
|
|
52
58
|
authorizeGithubInstance(authData)
|
|
53
59
|
return githubInstance.getRepositoryBranches(owner, repo)
|
|
@@ -70,6 +76,7 @@ export const createGithubGateway: GithubGatewayFactory = (auth: ServiceAuth = {}
|
|
|
70
76
|
getUserRepositories,
|
|
71
77
|
createRepository,
|
|
72
78
|
getRepositoryCommits,
|
|
79
|
+
createBranch,
|
|
73
80
|
getRepositoryBranches,
|
|
74
81
|
commitFilesToRepo,
|
|
75
82
|
getCommitData,
|
|
@@ -77,4 +84,4 @@ export const createGithubGateway: GithubGatewayFactory = (auth: ServiceAuth = {}
|
|
|
77
84
|
}
|
|
78
85
|
}
|
|
79
86
|
|
|
80
|
-
export { GithubFile, RepositoryIdentity, GithubCommitMeta, RepositoryCommitMeta }
|
|
87
|
+
export { GithubFile, RepositoryIdentity, GithubCommitMeta, CreateBranchMeta, RepositoryCommitMeta }
|
package/src/types.ts
CHANGED
|
@@ -6,10 +6,11 @@ export type GithubGatewayFactory = (auth?: ServiceAuth) => GithubGateway
|
|
|
6
6
|
|
|
7
7
|
export interface GithubGateway {
|
|
8
8
|
getRepository: (repo: RepositoryIdentity, auth?: ServiceAuth) => Promise<GeneratedFolder>
|
|
9
|
-
getUserRepositories: (
|
|
9
|
+
getUserRepositories: (auth?: ServiceAuth) => Promise<GithubRepositoryData[]>
|
|
10
10
|
commitFilesToRepo: (commitMeta: GithubCommitMeta, auth?: ServiceAuth) => Promise<string>
|
|
11
11
|
createRepository: (repository: NewRepository, auth?: ServiceAuth) => Promise<GithubRepositoryData>
|
|
12
12
|
getRepositoryCommits: (meta: RepositoryCommitsListMeta, authData: ServiceAuth) => Promise<any>
|
|
13
|
+
createBranch: (meta: CreateBranchMeta, authData: ServiceAuth) => Promise<any>
|
|
13
14
|
getRepositoryBranches: (owner: string, repo: string, authData: ServiceAuth) => Promise<any>
|
|
14
15
|
getCommitData: (meta: RepositoryCommitMeta, authData: ServiceAuth) => Promise<any>
|
|
15
16
|
authorizeGithubInstance: (authData?: ServiceAuth) => void
|
|
@@ -27,6 +28,14 @@ export interface GithubCommitMeta {
|
|
|
27
28
|
repositoryIdentity: RepositoryIdentity
|
|
28
29
|
branchName: string
|
|
29
30
|
commitMessage?: string
|
|
31
|
+
isPrivate?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface CreateBranchMeta {
|
|
35
|
+
repo: string
|
|
36
|
+
owner: string
|
|
37
|
+
sourceBranch: string
|
|
38
|
+
newBranch: string
|
|
30
39
|
}
|
|
31
40
|
|
|
32
41
|
export interface RepositoryCommitMeta {
|