1 | "use strict";
|
2 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3 | return new (P || (P = Promise))(function (resolve, reject) {
|
4 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
7 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8 | });
|
9 | };
|
10 | function __export(m) {
|
11 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
12 | }
|
13 | Object.defineProperty(exports, "__esModule", { value: true });
|
14 | __export(require("./types"));
|
15 | const commit_1 = require("./commit");
|
16 | function main(options) {
|
17 | return __awaiter(this, void 0, void 0, function* () {
|
18 | const repositoryPath = options.repositoryPath ? options.repositoryPath : process.argv[1];
|
19 | const originalWorkingDirector = process.cwd();
|
20 | let result;
|
21 | process.chdir(repositoryPath);
|
22 | result = yield commit_1.default(options);
|
23 | return result;
|
24 | });
|
25 | }
|
26 | exports.default = main;
|
27 | ;
|
28 |
|
\ | No newline at end of file |