|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
|
};
|
|
};
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
|
+exports.exec = void 0;
|
|
|
const child_process_1 = require("child_process");
|
|
const child_process_1 = require("child_process");
|
|
|
const fs_1 = __importDefault(require("fs"));
|
|
const fs_1 = __importDefault(require("fs"));
|
|
|
const path_1 = __importDefault(require("path"));
|
|
const path_1 = __importDefault(require("path"));
|
|
@@ -23,7 +24,7 @@ function exec(command, stdout, stderr) {
|
|
|
let stdoutbuf = '';
|
|
let stdoutbuf = '';
|
|
|
let stderrbuf = '';
|
|
let stderrbuf = '';
|
|
|
// EXEC CHILD PROCESS
|
|
// EXEC CHILD PROCESS
|
|
|
- const p = child_process_1.exec(command, { maxBuffer: MAX_BUFFER }, (err, out) => {
|
|
|
|
|
|
|
+ const p = (0, child_process_1.exec)(command, { maxBuffer: MAX_BUFFER }, (err, out) => {
|
|
|
if (err)
|
|
if (err)
|
|
|
return reject(err);
|
|
return reject(err);
|
|
|
if (stdoutbuf.length > 0 && typeof stdout === 'function')
|
|
if (stdoutbuf.length > 0 && typeof stdout === 'function')
|
|
@@ -119,8 +120,8 @@ function readJsonFile(path, encoding = 'utf8') {
|
|
|
console.log(cli.blue('[WARNING]'), `There's an old .clone directory. Removing first...`);
|
|
console.log(cli.blue('[WARNING]'), `There's an old .clone directory. Removing first...`);
|
|
|
yield util_1.default.promisify(fs_1.default.rm)(cloneDir, { force: true, recursive: true });
|
|
yield util_1.default.promisify(fs_1.default.rm)(cloneDir, { force: true, recursive: true });
|
|
|
}
|
|
}
|
|
|
- console.log(cli.blue('[INFO]'), 'Cloning boilerplate repository (via SSH)...');
|
|
|
|
|
- yield exec(`git clone ssh://git@bitbucket.siriusonline.de:7999/tsc/express-starter.git "${cloneDir}"`, process.stdout, process.stderr);
|
|
|
|
|
|
|
+ console.log(cli.blue('[INFO]'), 'Cloning boilerplate repository (via HTTPS)...');
|
|
|
|
|
+ yield exec(`git clone https://gogs.hostbbq.com/hostbbq/express-starter.git "${cloneDir}"`, process.stdout, process.stderr);
|
|
|
let pkgJson = yield readJsonFile(path_1.default.resolve(cloneDir, 'package.json'));
|
|
let pkgJson = yield readJsonFile(path_1.default.resolve(cloneDir, 'package.json'));
|
|
|
console.log(cli.blue('[INFO]'), 'Installing module dependencies...');
|
|
console.log(cli.blue('[INFO]'), 'Installing module dependencies...');
|
|
|
let dependencies = Object.keys(pkgJson.dependencies).join('" "');
|
|
let dependencies = Object.keys(pkgJson.dependencies).join('" "');
|