Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dxatscale/sfpowerscripts.core

Package Overview
Dependencies
Maintainers
11
Versions
623
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dxatscale/sfpowerscripts.core - npm Package Compare versions

Comparing version 0.0.23 to 0.0.26

17

lib/Delay.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
async function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
function delay(ms) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise(resolve => setTimeout(resolve, ms));
});
}
exports.delay = delay;
//# sourceMappingURL=Delay.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVsYXkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvRGVsYXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFDQSxTQUFzQixLQUFLLENBQUMsRUFBVTs7UUFDbEMsT0FBTyxJQUFJLE9BQU8sQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLFVBQVUsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQztJQUN6RCxDQUFDO0NBQUE7QUFGSCxzQkFFRyJ9

29

lib/Extract.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs-extra");
var unzipper = require("unzip-stream");
async function extract(path, location) {
return new Promise((resolve, reject) => {
fs.createReadStream(path)
.pipe(unzipper.Extract({ path: `${location}` }))
.on("close", () => {
resolve();
})
.on("error", (error) => reject(error));
function extract(path, location) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
fs.createReadStream(path)
.pipe(unzipper.Extract({ path: `${location}` }))
.on("close", () => {
resolve();
})
.on("error", (error) => reject(error));
});
});
}
exports.extract = extract;
//# sourceMappingURL=Extract.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXh0cmFjdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9FeHRyYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsK0JBQWdDO0FBQ2hDLElBQUksUUFBUSxHQUFHLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0FBQztBQUV2QyxTQUFzQixPQUFPLENBQUMsSUFBWSxFQUFFLFFBQWdCOztRQUMxRCxPQUFPLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLE1BQU0sRUFBRSxFQUFFO1lBQ3JDLEVBQUUsQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUM7aUJBQ3RCLElBQUksQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFDLEVBQUUsSUFBSSxFQUFFLEdBQUcsUUFBUSxFQUFFLEVBQUUsQ0FBQyxDQUFDO2lCQUMvQyxFQUFFLENBQUMsT0FBTyxFQUFFLEdBQUcsRUFBRTtnQkFDaEIsT0FBTyxFQUFFLENBQUM7WUFDWixDQUFDLENBQUM7aUJBQ0QsRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUFDLEtBQVUsRUFBRSxFQUFFLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7UUFDaEQsQ0FBQyxDQUFDLENBQUM7SUFDTCxDQUFDO0NBQUE7QUFURCwwQkFTQyJ9
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {};
//# sourceMappingURL=index.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxrQkFBZSxFQUFFLENBQUMifQ==
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
async function onExit(childProcess) {
return new Promise((resolve, reject) => {
childProcess.once('exit', (code, signal) => {
if (code === 0) {
resolve(undefined);
}
else {
reject(new Error('Exit with error code: ' + code));
}
function onExit(childProcess) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise((resolve, reject) => {
childProcess.once('exit', (code, signal) => {
if (code === 0) {
resolve(undefined);
}
else {
reject(new Error('Exit with error code: ' + code));
}
});
childProcess.once('error', (err) => {
reject(err);
});
});
childProcess.once('error', (err) => {
reject(err);
});
});
}
exports.onExit = onExit;
//# sourceMappingURL=OnExit.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT25FeGl0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL09uRXhpdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUVBLFNBQXNCLE1BQU0sQ0FBQyxZQUEwQjs7UUFDbkQsT0FBTyxJQUFJLE9BQU8sQ0FBQyxDQUFDLE9BQU8sRUFBRSxNQUFNLEVBQUUsRUFBRTtZQUVyQyxZQUFZLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLElBQVksRUFBRSxNQUFjLEVBQUUsRUFBRTtnQkFDekQsSUFBSSxJQUFJLEtBQUssQ0FBQyxFQUFFO29CQUNkLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztpQkFDcEI7cUJBQU07b0JBQ0wsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLHdCQUF3QixHQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7aUJBQ2xEO1lBQ0gsQ0FBQyxDQUFDLENBQUM7WUFHSCxZQUFZLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDLEdBQVUsRUFBRSxFQUFFO2dCQUN4QyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUM7WUFDZCxDQUFDLENBQUMsQ0FBQztRQUVMLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztDQUFBO0FBakJILHdCQWlCRyJ9
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -15,30 +24,34 @@ const child_process = require("child_process");

}
async exec(command) {
let child = child_process.exec(command, { encoding: "utf8", maxBuffer: 1024 * 1024 * 5, cwd: this.project_directory }, (error, stdout, stderr) => {
if (error)
throw error;
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let child = child_process.exec(command, { encoding: "utf8", maxBuffer: 1024 * 1024 * 5, cwd: this.project_directory }, (error, stdout, stderr) => {
if (error)
throw error;
});
child.stdout.on("data", data => { console.log(data.toString()); });
child.stderr.on("data", data => { console.log(data.toString()); });
yield OnExit_1.onExit(child);
});
child.stdout.on("data", data => { console.log(data.toString()); });
child.stderr.on("data", data => { console.log(data.toString()); });
await OnExit_1.onExit(child);
}
async buildExecCommand() {
let command;
command = `npx sfdx sfpowerkit:source:pmd`;
if (!util_1.isNullOrUndefined(this.directory))
command += ` -d ${this.directory}`;
if (!util_1.isNullOrUndefined(this.format))
command += ` -f ${this.format}`;
if (!util_1.isNullOrUndefined(this.ouputPath))
command += ` -o ${this.ouputPath}`;
if (!util_1.isNullOrUndefined(this.ruleset) && this.ruleset.length > 0)
command += ` -r ${this.ruleset}`;
if (!util_1.isNullOrUndefined(this.version))
command += ` --version=${this.version}`;
command += ` --loglevel INFO`;
console.log(command);
return command;
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command;
command = `npx sfdx sfpowerkit:source:pmd`;
if (!util_1.isNullOrUndefined(this.directory))
command += ` -d ${this.directory}`;
if (!util_1.isNullOrUndefined(this.format))
command += ` -f ${this.format}`;
if (!util_1.isNullOrUndefined(this.ouputPath))
command += ` -o ${this.ouputPath}`;
if (!util_1.isNullOrUndefined(this.ruleset) && this.ruleset.length > 0)
command += ` -r ${this.ruleset}`;
if (!util_1.isNullOrUndefined(this.version))
command += ` --version=${this.version}`;
command += ` --loglevel INFO`;
console.log(command);
return command;
});
}
}
exports.default = AnalyzeWithPMDImpl;
//# sourceMappingURL=AnalyzeWithPMDImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQW5hbHl6ZVdpdGhQTURJbXBsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NmZHh3cmFwcGVycy9BbmFseXplV2l0aFBNREltcGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQSwrQ0FBZ0Q7QUFDaEQsc0NBQW1DO0FBQ25DLCtCQUF5QztBQUd6QyxNQUFxQixrQkFBa0I7SUFHckMsWUFBMkIsaUJBQXdCLEVBQVUsU0FBaUIsRUFBVSxPQUFjLEVBQVUsTUFBYSxFQUFVLFNBQWlCLEVBQVUsT0FBYztRQUFySixzQkFBaUIsR0FBakIsaUJBQWlCLENBQU87UUFBVSxjQUFTLEdBQVQsU0FBUyxDQUFRO1FBQVUsWUFBTyxHQUFQLE9BQU8sQ0FBTztRQUFVLFdBQU0sR0FBTixNQUFNLENBQU87UUFBVSxjQUFTLEdBQVQsU0FBUyxDQUFRO1FBQVUsWUFBTyxHQUFQLE9BQU8sQ0FBTztJQUFHLENBQUM7SUFFdkssSUFBSSxDQUFDLE9BQWU7O1lBRS9CLElBQUksS0FBSyxHQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFHLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBQyxTQUFTLEVBQUUsSUFBSSxHQUFHLElBQUksR0FBQyxDQUFDLEVBQUUsR0FBRyxFQUFDLElBQUksQ0FBQyxpQkFBaUIsRUFBRSxFQUFDLENBQUMsS0FBSyxFQUFDLE1BQU0sRUFBQyxNQUFNLEVBQUMsRUFBRTtnQkFFdEksSUFBRyxLQUFLO29CQUNMLE1BQU0sS0FBSyxDQUFDO1lBQ2pCLENBQUMsQ0FBQyxDQUFD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sSUFBSSxDQUFDLE9BQU8sRUFBRSxDQUFDO1lBRWhDLElBQUcsQ0FBQyx3QkFBaUIsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDO2dCQUNuQyxPQUFPLElBQUUsY0FBYyxJQUFJLENBQUMsT0FBTyxFQUFFLENBQUM7WUFFdEMsT0FBTyxJQUFFLGtCQUFrQixDQUFBO1lBRTNCLE9BQU8sQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLENBQUM7WUFDckIsT0FBTyxPQUFPLENBQUM7UUFDakIsQ0FBQztLQUFBO0NBR0Y7QUFsREQscUNBa0RDIn0=
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -15,35 +24,39 @@ const child_process = require("child_process");

}
async exec(command) {
let child = child_process.exec(command, { encoding: "utf8", cwd: this.projectDirectory }, (error, stdout, stderr) => {
if (error)
throw error;
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let child = child_process.exec(command, { encoding: "utf8", cwd: this.projectDirectory }, (error, stdout, stderr) => {
if (error)
throw error;
});
child.stdout.on("data", data => {
console.log(data.toString());
});
child.stderr.on("data", data => {
console.log(data.toString());
});
yield OnExit_1.onExit(child);
});
child.stdout.on("data", data => {
console.log(data.toString());
}
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command;
command = `npx sfdx sfpowerkit:project:diff`;
if (!util_1.isNullOrUndefined(this.revisionTo))
command += ` -t ${this.revisionTo}`;
if (!util_1.isNullOrUndefined(this.revisionFrom))
command += ` -r ${this.revisionFrom}`;
if (this.generateDestructiveManifest)
command += ` -x`;
command += ` -d ${this.sfdx_package}_src_delta`;
if (!util_1.isNullOrUndefined(this.options['bypass_directories']))
command += ` -b ${this.options['bypass_directories']}`;
if (!util_1.isNullOrUndefined(this.options['only_diff_for']))
command += ` -p ${this.options['only_diff_for']}`;
if (!util_1.isNullOrUndefined(this.options['apiversion']))
command += ` --apiversion ${this.options['apiversion']}`;
return command;
});
child.stderr.on("data", data => {
console.log(data.toString());
});
await OnExit_1.onExit(child);
}
async buildExecCommand() {
let command;
command = `npx sfdx sfpowerkit:project:diff`;
if (!util_1.isNullOrUndefined(this.revisionTo))
command += ` -t ${this.revisionTo}`;
if (!util_1.isNullOrUndefined(this.revisionFrom))
command += ` -r ${this.revisionFrom}`;
if (this.generateDestructiveManifest)
command += ` -x`;
command += ` -d ${this.sfdx_package}_src_delta`;
if (!util_1.isNullOrUndefined(this.options['bypass_directories']))
command += ` -b ${this.options['bypass_directories']}`;
if (!util_1.isNullOrUndefined(this.options['only_diff_for']))
command += ` -p ${this.options['only_diff_for']}`;
if (!util_1.isNullOrUndefined(this.options['apiversion']))
command += ` --apiversion ${this.options['apiversion']}`;
return command;
}
}
exports.default = CreateDeltaPackageImpl;
//# sourceMappingURL=CreateDeltaPackageImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3JlYXRlRGVsdGFQYWNrYWdlSW1wbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZmR4d3JhcHBlcnMvQ3JlYXRlRGVsdGFQYWNrYWdlSW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLCtDQUFnRDtBQUNoRCxzQ0FBbUM7QUFDbkMsK0JBQXlDO0FBRXpDLE1BQXFCLHNCQUFzQjtJQUN6QyxZQUNVLGdCQUF3QixFQUN4QixZQUFvQixFQUNwQixZQ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use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -13,26 +22,30 @@ const child_process = require("child_process");

}
async exec(command) {
let child = child_process.exec(command, { cwd: this.working_directory, encoding: "utf8" }, (error, stdout, stderr) => {
if (error) {
child.stderr.on("data", data => {
console.log(data.toString());
});
throw error;
}
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let child = child_process.exec(command, { cwd: this.working_directory, encoding: "utf8" }, (error, stdout, stderr) => {
if (error) {
child.stderr.on("data", data => {
console.log(data.toString());
});
throw error;
}
});
let output = "";
child.stdout.on("data", data => {
console.log(data.toString());
output += data.toString();
});
yield OnExit_1.onExit(child);
let result = JSON.parse(output);
return result;
});
let output = "";
child.stdout.on("data", data => {
console.log(data.toString());
output += data.toString();
}
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command = `npx sfdx force:org:create -v ${this.devhub} -s -f ${this.config_file_path} --json -a ${this.alias} -d ${this.daysToMaintain}`;
return command;
});
await OnExit_1.onExit(child);
let result = JSON.parse(output);
return result;
}
async buildExecCommand() {
let command = `npx sfdx force:org:create -v ${this.devhub} -s -f ${this.config_file_path} --json -a ${this.alias} -d ${this.daysToMaintain}`;
return command;
}
}
exports.default = CreateScratchOrgImpl;
//# sourceMappingURL=CreateScratchOrgImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3JlYXRlU2NyYXRjaE9yZ0ltcGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6Wy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NQUFNLENBQUMsRUFBRSxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsRUFBRTtnQkFDN0IsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQztnQkFDN0IsTUFBTSxJQUFJLElBQUksQ0FBQyxRQUFRLEVBQUUsQ0FBQztZQUM1QixDQUFDLENBQUMsQ0FBQztZQUtILE1BQU0sZUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO1lBRXBCLElBQUksTUFBTSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUM7WUFFaEMsT0FBTyxNQUFNLENBQUM7UUFDaEIsQ0FBQztLQUFBO0lBRVksZ0JBQWdCOztZQUMzQixJQUFJLE9BQU8sR0FBRyxnQ0FBZ0MsSUFBSSxDQUFDLE1BQU0sVUFBVSxJQUFJLENBQUMsZ0JBQWdCLGNBQWMsSUFBSSxDQUFDLEtBQUssT0FBTyxJQUFJLENBQUMsY0FBYyxFQUFFLENBQUM7WUFDN0ksT0FBTyxPQUFPLENBQUM7UUFDakIsQ0FBQztLQUFBO0NBQ0Y7QUE1Q0QsdUNBNENDIn0=
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -20,35 +29,39 @@ const child_process = require("child_process");

}
async exec(command) {
let child = child_process.exec(command, { cwd: this.project_directory, encoding: "utf8" }, (error, stdout, stderr) => {
if (error)
throw error;
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let child = child_process.exec(command, { cwd: this.project_directory, encoding: "utf8" }, (error, stdout, stderr) => {
if (error)
throw error;
});
let output = "";
child.stdout.on("data", data => {
console.log(data.toString());
output += data.toString();
});
yield OnExit_1.onExit(child);
let result = JSON.parse(output);
return result.result.SubscriberPackageVersionId;
});
let output = "";
child.stdout.on("data", data => {
console.log(data.toString());
output += data.toString();
}
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command = `npx sfdx force:package:version:create -p ${this.sfdx_package} -w ${this.wait_time} --definitionfile ${this.config_file_path} --json`;
if (!util_1.isNullOrUndefined(this.version_number))
command += ` --versionnumber ${this.version_number}`;
if (this.installationkeybypass)
command += ` -x`;
else
command += ` -k ${this.installationkey}`;
if (!util_1.isNullOrUndefined(this.tag))
command += ` -t ${this.tag}`;
if (this.isCoverageEnabled)
command += ` -c`;
if (this.isSkipValidation)
command += ` --skipvalidation`;
command += ` -v ${this.devhub_alias}`;
return command;
});
await OnExit_1.onExit(child);
let result = JSON.parse(output);
return result.result.SubscriberPackageVersionId;
}
async buildExecCommand() {
let command = `npx sfdx force:package:version:create -p ${this.sfdx_package} -w ${this.wait_time} --definitionfile ${this.config_file_path} --json`;
if (!util_1.isNullOrUndefined(this.version_number))
command += ` --versionnumber ${this.version_number}`;
if (this.installationkeybypass)
command += ` -x`;
else
command += ` -k ${this.installationkey}`;
if (!util_1.isNullOrUndefined(this.tag))
command += ` -t ${this.tag}`;
if (this.isCoverageEnabled)
command += ` -c`;
if (this.isSkipValidation)
command += ` --skipvalidation`;
command += ` -v ${this.devhub_alias}`;
return command;
}
}
exports.default = CreateUnlockedPackageImpl;
//# sourceMappingURL=CreateUnlockedPackageImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3JlYXRlVW5sb2NrZWRQYWNrYWdlSW1wbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZmR4d3JhcHBlcnM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UFDLEdBQUcsRUFBRSxDQUFDO1lBRS9ELElBQUksSUFBSSxDQUFDLGlCQUFpQjtnQkFBRSxPQUFPLElBQUksS0FBSyxDQUFDO1lBRTdDLElBQUksSUFBSSxDQUFDLGdCQUFnQjtnQkFBRSxPQUFPLElBQUksbUJBQW1CLENBQUM7WUFFMUQsT0FBTyxJQUFJLE9BQU8sSUFBSSxDQUFDLFlBQVksRUFBRSxDQUFDO1lBRXRDLE9BQU8sT0FBTyxDQUFDO1FBQ2pCLENBQUM7S0FBQTtDQUNGO0FBeERELDRDQXdEQyJ9
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,14 +18,18 @@ const child_process = require("child_process");

}
async exec(command) {
let result = child_process.execSync(command, {
encoding: "utf8"
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let result = child_process.execSync(command, {
encoding: "utf8"
});
console.log(result);
});
console.log(result);
}
async buildExecCommand() {
let command = `npx sfdx force:org:delete -u ${this.target_org} -v ${this.devhub} -p`;
return command;
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command = `npx sfdx force:org:delete -u ${this.target_org} -v ${this.devhub} -p`;
return command;
});
}
}
exports.default = DeleteScratchOrgImpl;
//# sourceMappingURL=DeleteScratchOrgImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVsZXRlU2NyYXRjaE9yZ0ltcGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2ZkeHdyYXBwZXJzL0RlbGV0ZVNjcmF0Y2hPcmdJbXBsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsK0NBQWdEO0FBRWhELE1BQXFCLG9CQUFvQjtJQUV2QyxZQUEyQixVQUFrQixFQUFVLE1BQWM7UUFBMUMsZUFBVSxHQUFWLFVBQVUsQ0FBUTtRQUFVLFdBQU0sR0FBTixNQUFNLENBQVE7SUFBRyxDQUFDO0lBRTVELElBQUksQ0FBQyxPQUFlOztZQUMvQixJQUFJLE1BQU0sR0FBRyxhQUFhLENBQUMsUUFBUSxDQUFDLE9BQU8sRUFBRTtnQkFDM0MsUUFBUSxFQUFFLE1BQU07YUFFakIsQ0FBQyxDQUFDO1lBQ0osT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUNyQixDQUFDO0tBQUE7SUFFWSxnQkFBZ0I7O1lBQzNCLElBQUksT0FBTyxHQUFHLGlDQUFpQyxJQUFJLENBQUMsVUFBVSxPQUFPLElBQUksQ0FBQyxNQUFNLEtBQUssQ0FBQztZQUN0RixPQUFPLE9BQU8sQ0FBQztRQUNqQixDQUFDO0tBQUE7Q0FHRjtBQWxCRCx1Q0FrQkMifQ==
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -10,21 +19,25 @@ const child_process = require("child_process");

}
async exec(command) {
let child = child_process.exec(command, { encoding: "utf8" }, (error, stdout, stderr) => {
if (error)
throw error;
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let child = child_process.exec(command, { encoding: "utf8" }, (error, stdout, stderr) => {
if (error)
throw error;
});
child.stdout.on("data", data => {
console.log(data.toString());
});
child.stderr.on("data", data => {
console.log(data.toString());
});
yield OnExit_1.onExit(child);
});
child.stdout.on("data", data => {
console.log(data.toString());
}
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command = `npx sfdx sfpowerkit:org:destruct -u ${this.target_org} -m ${this.destructiveManifestPath}`;
return command;
});
child.stderr.on("data", data => {
console.log(data.toString());
});
await OnExit_1.onExit(child);
}
async buildExecCommand() {
let command = `npx sfdx sfpowerkit:org:destruct -u ${this.target_org} -m ${this.destructiveManifestPath}`;
return command;
}
}
exports.default = DeployDestructiveManifestToOrgImpl;
//# sourceMappingURL=DeployDestructiveManifestToOrgImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVwbG95RGVzdHJ1Y3RpdmVNYW5pZmVzdFRvT3JnSW1wbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZmR4d3JhcHBlcnMvRGVwbG95RGVzdHJ1Y3RpdmVNYW5pZmVzdFRvT3JnSW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLCtDQUFnRDtBQUNoRCxzQ0FBbUM7QUFFbkMsTUFBcUIsa0NBQWtDO0lBQ3JELFlBQ1UsVUFBa0IsRUFDbEIsdUJBQStCO1FBRC9CLGVBQVUsR0FBVixVQUFVLENBQVE7UUFDbEIsNEJBQXVCLEdBQXZCLHVCQUF1QixDQUFRO0lBQ3RDLENBQUM7SUFFUyxJQUFJLENBQUMsT0FBZTs7WUFDL0IsSUFBSSxLQUFLLEdBQUcsYUFBYSxDQUFDLElBQUksQ0FDNUIsT0FBTyxFQUNQLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxFQUNwQixDQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLEVBQUU7Z0JBQ3hCLElBQUksS0FBSztvQkFBRSxNQUFNLEtBQUssQ0FBQztZQUN6QixDQUFDLENBQ0YsQ0FBQztZQUVGLEtBQUssQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsRUFBRTtnQkFDN0IsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQztZQUMvQixDQUFDLENBQUMsQ0FBQztZQUNILEtBQUssQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsRUFBRTtnQkFDN0IsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQztZQUMvQixDQUFDLENBQUMsQ0FBQztZQUVILE1BQU0sZUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3RCLENBQUM7S0FBQTtJQUVZLGdCQUFnQjs7WUFDM0IsSUFBSSxPQUFPLEdBQUcsdUNBQXVDLElBQUksQ0FBQyxVQUFVLE9BQU8sSUFBSSxDQUFDLHVCQUF1QixFQUFFLENBQUM7WUFHMUcsT0FBTyxPQUFPLENBQUM7UUFDakIsQ0FBQztLQUFBO0NBQ0Y7QUEvQkQscURBK0JDIn0=
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=DeploySourceResult.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVwbG95U291cmNlUmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NmZHh3cmFwcGVycy9EZXBsb3lTb3VyY2VSZXN1bHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9

@@ -1,2 +0,6 @@

import DeploySourceResult from "./DeploySourceResult";
export interface DeploySourceResult {
deploy_id: string;
result: boolean;
message: string;
}
export default class DeploySourceToOrgImpl {

@@ -8,2 +12,3 @@ private target_org;

private isToBreakBuildIfEmpty;
temp_folder: string;
constructor(target_org: string, project_directory: string, source_directory: string, deployment_options: any, isToBreakBuildIfEmpty: boolean);

@@ -17,2 +22,3 @@ exec(): Promise<DeploySourceResult>;

private isEmptyFolder;
private makefolderid;
}
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -17,90 +26,92 @@ const child_process = require("child_process");

this.isToBreakBuildIfEmpty = isToBreakBuildIfEmpty;
this.temp_folder = `${this.makefolderid(5)}_mdapi`;
}
async exec() {
let commandExecStatus = false;
let deploySourceResult = {};
//Clean mdapi directory
rimraf.sync("sfpowerscripts_mdapi");
//Check empty conditions
let status = this.isToBreakBuildForEmptyDirectory();
if (status.result == "break") {
deploySourceResult.result = false;
deploySourceResult.message = status.message;
return deploySourceResult;
}
else if (status.result == "skip") {
deploySourceResult.result = true;
deploySourceResult.message = status.message;
return deploySourceResult;
}
console.log("Converting source to mdapi");
await this.convertSourceToMDAPI();
try {
if (this.deployment_options["checkonly"])
fs_1.copyFileSync(this.deployment_options["validation_ignore"], path.join(this.project_directory, '.forceignore'));
}
catch (err) {
//Do something here
console.error(err);
console.log("Validation Ignore not found, using .forceignore");
}
//Get Deploy ID
let deploy_id = "";
try {
let command = await this.buildExecCommand();
console.log(command);
let result = child_process.execSync(command, {
cwd: this.project_directory,
encoding: "utf8"
});
let resultAsJSON = JSON.parse(result);
deploy_id = resultAsJSON.result.id;
}
catch (error) {
deploySourceResult.result = false;
deploySourceResult.message = JSON.parse(error.stdout).message;
return deploySourceResult;
}
if (this.deployment_options["checkonly"])
console.log(`Validation is in progress.... Unleashing the power of your code!`);
else
console.log(`Deployment is in progress.... Unleashing the power of your code!`);
// Loop till deployment completes to show status
let result;
while (true) {
exec() {
return __awaiter(this, void 0, void 0, function* () {
let commandExecStatus = false;
let deploySourceResult = {};
//Clean mdapi directory
rimraf.sync(this.temp_folder);
//Check empty conditions
let status = this.isToBreakBuildForEmptyDirectory();
if (status.result == "break") {
deploySourceResult.result = false;
deploySourceResult.message = status.message;
return deploySourceResult;
}
else if (status.result == "skip") {
deploySourceResult.result = true;
deploySourceResult.message = status.message;
return deploySourceResult;
}
console.log("Converting source to mdapi");
yield this.convertSourceToMDAPI();
try {
result = child_process.execSync(`npx sfdx force:mdapi:deploy:report --json -i ${deploy_id} -u ${this.target_org}`, {
if (this.deployment_options["checkonly"])
fs_1.copyFileSync(this.deployment_options["validation_ignore"], path.join(this.project_directory, ".forceignore"));
}
catch (err) {
//Do something here
console.log("Validation Ignore not found, using .forceignore");
}
//Get Deploy ID
let deploy_id = "";
try {
let command = yield this.buildExecCommand();
console.log(command);
let result = child_process.execSync(command, {
cwd: this.project_directory,
encoding: "utf8",
stdio: ["pipe", "pipe", "ignore"]
});
let resultAsJSON = JSON.parse(result);
deploy_id = resultAsJSON.result.id;
}
catch (err) {
if (this.deployment_options["checkonly"])
console.log(`Validation Failed`);
else
console.log(`Deployment Failed`);
break;
catch (error) {
deploySourceResult.result = false;
deploySourceResult.message = JSON.parse(error.stdout).message;
return deploySourceResult;
}
let resultAsJSON = JSON.parse(result);
if (resultAsJSON["status"] == 1) {
console.log("Validation/Deployment Failed");
commandExecStatus = false;
break;
if (this.deployment_options["checkonly"])
console.log(`Validation is in progress.... Unleashing the power of your code!`);
else
console.log(`Deployment is in progress.... Unleashing the power of your code!`);
// Loop till deployment completes to show status
let result;
while (true) {
try {
result = child_process.execSync(`npx sfdx force:mdapi:deploy:report --json -i ${deploy_id} -u ${this.target_org}`, {
cwd: this.project_directory,
encoding: "utf8",
stdio: ["pipe", "pipe", "ignore"],
});
}
catch (err) {
if (this.deployment_options["checkonly"])
console.log(`Validation Failed`);
else
console.log(`Deployment Failed`);
break;
}
let resultAsJSON = JSON.parse(result);
if (resultAsJSON["status"] == 1) {
console.log("Validation/Deployment Failed");
commandExecStatus = false;
break;
}
else if (resultAsJSON["result"]["status"] == "InProgress" ||
resultAsJSON["result"]["status"] == "Pending") {
console.log(`Processing ${resultAsJSON.result.numberComponentsDeployed} out of ${resultAsJSON.result.numberComponentsTotal}`);
}
else if (resultAsJSON["result"]["status"] == "Succeeded") {
console.log("Validation/Deployment Succeeded");
commandExecStatus = true;
break;
}
yield Delay_1.delay(30000);
}
else if (resultAsJSON["result"]["status"] == "InProgress" ||
resultAsJSON["result"]["status"] == "Pending") {
console.log(`Processing ${resultAsJSON.result.numberComponentsDeployed} out of ${resultAsJSON.result.numberComponentsTotal}`);
}
else if (resultAsJSON["result"]["status"] == "Succeeded") {
console.log("Validation/Deployment Succeeded");
commandExecStatus = true;
break;
}
await Delay_1.delay(30000);
}
deploySourceResult.message = await this.getFinalDeploymentStatus(deploy_id);
deploySourceResult.result = commandExecStatus;
deploySourceResult.deploy_id = deploy_id;
return deploySourceResult;
deploySourceResult.message = yield this.getFinalDeploymentStatus(deploy_id);
deploySourceResult.result = commandExecStatus;
deploySourceResult.deploy_id = deploy_id;
return deploySourceResult;
});
}

@@ -111,3 +122,3 @@ isToBreakBuildForEmptyDirectory() {

message: "",
result: ""
result: "",
};

@@ -158,66 +169,74 @@ if (!util_1.isNullOrUndefined(this.project_directory)) {

}
async getFinalDeploymentStatus(deploy_id) {
let messageString = "";
try {
//Print final output
let child = child_process.exec(`npx sfdx force:mdapi:deploy:report -i ${deploy_id} -u ${this.target_org}`, { cwd: this.project_directory, encoding: "utf8" }, (error, stdout, stderr) => { });
child.stdout.on("data", data => {
messageString += data.toString();
});
await OnExit_1.onExit(child);
return messageString;
}
catch (err) {
return messageString;
}
getFinalDeploymentStatus(deploy_id) {
return __awaiter(this, void 0, void 0, function* () {
let messageString = "";
try {
//Print final output
let child = child_process.exec(`npx sfdx force:mdapi:deploy:report -i ${deploy_id} -u ${this.target_org}`, { cwd: this.project_directory, encoding: "utf8" }, (error, stdout, stderr) => { });
child.stdout.on("data", (data) => {
messageString += data.toString();
});
yield OnExit_1.onExit(child);
return messageString;
}
catch (err) {
return messageString;
}
});
}
async buildExecCommand() {
let apexclasses;
let command = `npx sfdx force:mdapi:deploy -u ${this.target_org}`;
if (this.deployment_options["checkonly"])
command += ` -c`;
//directory
command += ` -d sfpowerscripts_mdapi`;
//add json
command += ` --json`;
if (this.deployment_options["testlevel"] == "RunApexTestSuite") {
//testlevel
command += ` -l RunSpecifiedTests`;
apexclasses = await this.convertApexTestSuiteToListOfApexClasses(this.deployment_options["apextestsuite"]);
command += ` -r ${apexclasses}`;
}
else if (this.deployment_options["testlevel"] == "RunSpecifiedTests") {
command += ` -l RunSpecifiedTests`;
apexclasses = this.deployment_options["specified_tests"];
command += ` -r ${apexclasses}`;
}
else {
command += ` -l ${this.deployment_options["testlevel"]}`;
}
return command;
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let apexclasses;
let command = `npx sfdx force:mdapi:deploy -u ${this.target_org}`;
if (this.deployment_options["checkonly"])
command += ` -c`;
//directory
command += ` -d ${this.temp_folder}`;
//add json
command += ` --json`;
if (this.deployment_options["testlevel"] == "RunApexTestSuite") {
//testlevel
command += ` -l RunSpecifiedTests`;
apexclasses = yield this.convertApexTestSuiteToListOfApexClasses(this.deployment_options["apextestsuite"]);
command += ` -r ${apexclasses}`;
}
else if (this.deployment_options["testlevel"] == "RunSpecifiedTests") {
command += ` -l RunSpecifiedTests`;
apexclasses = this.deployment_options["specified_tests"];
command += ` -r ${apexclasses}`;
}
else {
command += ` -l ${this.deployment_options["testlevel"]}`;
}
return command;
});
}
async convertApexTestSuiteToListOfApexClasses(apextestsuite) {
console.log(`Converting an apex test suite ${apextestsuite} to its consituent apex test classes`);
let result = child_process.execSync(`npx sfdx sfpowerkit:source:apextestsuite:convert -n ${apextestsuite} --json`, { cwd: this.project_directory, encoding: "utf8" });
let resultAsJSON = JSON.parse(result);
if (resultAsJSON["status"] == 0) {
return resultAsJSON["result"];
}
else {
throw new Error(`Unable to convert apex test suite ${apextestsuite} ${resultAsJSON["message"]}`);
}
convertApexTestSuiteToListOfApexClasses(apextestsuite) {
return __awaiter(this, void 0, void 0, function* () {
console.log(`Converting an apex test suite ${apextestsuite} to its consituent apex test classes`);
let result = child_process.execSync(`npx sfdx sfpowerkit:source:apextestsuite:convert -n ${apextestsuite} --json`, { cwd: this.project_directory, encoding: "utf8" });
let resultAsJSON = JSON.parse(result);
if (resultAsJSON["status"] == 0) {
return resultAsJSON["result"];
}
else {
throw new Error(`Unable to convert apex test suite ${apextestsuite} ${resultAsJSON["message"]}`);
}
});
}
async convertSourceToMDAPI() {
try {
if (!util_1.isNullOrUndefined(this.project_directory))
console.log(`Converting to Source Format ${this.source_directory} in project directory ${this.project_directory}`);
else
console.log(`Converting to Source Format ${this.source_directory} in project directory`);
child_process.execSync(`npx sfdx force:source:convert -r ${this.source_directory} -d sfpowerscripts_mdapi`, { cwd: this.project_directory, encoding: "utf8" });
console.log("Converting to Source Format Completed");
}
catch (error) {
console.log("Unable to convert source, exiting" + error.code);
throw error;
}
convertSourceToMDAPI() {
return __awaiter(this, void 0, void 0, function* () {
try {
if (!util_1.isNullOrUndefined(this.project_directory))
console.log(`Converting to Source Format ${this.source_directory} in project directory ${this.project_directory}`);
else
console.log(`Converting to Source Format ${this.source_directory} in project directory`);
child_process.execSync(`npx sfdx force:source:convert -r ${this.source_directory} -d ${this.temp_folder}`, { cwd: this.project_directory, encoding: "utf8" });
console.log("Converting to Source Format Completed");
}
catch (error) {
console.log("Unable to convert source, exiting" + error.code);
throw error;
}
});
}

@@ -231,4 +250,13 @@ isEmptyFolder(source_directory) {

}
makefolderid(length) {
var result = "";
var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
}
exports.default = DeploySourceToOrgImpl;
//# sourceMappingURL=DeploySourceToOrgImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVwbG95U291cmNlVG9PcmdJbXBsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NmZHh3cmFwcGVycy9EZXBsb3lTb3VyY2VUb09yZ0ltcGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQSwrQ0FBZ0Q7QUFDaEQsb0NBQWlDO0FBQ2pDLGlDQUFrQztBQUNsQywyQkFPWTtBQUNaLCtCQUF5QztBQUN6QyxzQ0FBbUM7QUFDbkMsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0FBUTNCLE1BQXFCLHFCQUFxQjtJQUd4QyxZQUNVLFVBQWtCLEVBQ2xCLGlCQUF5QixFQUN6QixnQkFBd0IsRUFDeEIsa0JBQXVCLEVBQ3ZCLHFCQUE4QjtRQUo5QixlQUFVLEdBQVYsVUFBVSxDQUFRO1FBQ2xCLHNCQUFpQixHQUFqQixpQkFBaUIsQ0FBUTtRQUN6QixxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQVE7UUFDeEIsdUJBQWtCLEdBQWxCLGtCQUFrQixDQUFLO1FBQ3ZCLDBCQUFxQixHQUFyQixxQkFBcUIsQ0FBUztRQUV0QyxJQUFJLENBQUMsV0FBVyxHQUFHLEdBQUcsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQU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NBQXVDLENBQUMsQ0FBQzthQUN0RDtZQUFDLE9BQU8sS0FBSyxFQUFFO2dCQUNkLE9BQU8sQ0FBQyxHQUFHLENBQUMsbUNBQW1DLEdBQUcsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDO2dCQUM5RCxNQUFNLEtBQUssQ0FBQzthQUNiO1FBQ0gsQ0FBQztLQUFBO0lBRU8sYUFBYSxDQUFDLGdCQUFnQjtRQUNwQyxJQUFJLEtBQUssR0FBYSxnQkFBVyxDQUFDLGdCQUFnQixDQUFDLENBQUM7UUFDcEQsSUFBSSxLQUFLLElBQUksSUFBSSxJQUFJLEtBQUssQ0FBQyxNQUFNLEtBQUssQ0FBQztZQUFFLE9BQU8sSUFBSSxDQUFDOztZQUNoRCxPQUFPLEtBQUssQ0FBQztJQUNwQixDQUFDO0lBRU8sWUFBWSxDQUFDLE1BQU07UUFDekIsSUFBSSxNQUFNLEdBQUcsRUFBRSxDQUFDO1FBQ2hCLElBQUksVUFBVSxHQUNaLGdFQUFnRSxDQUFDO1FBQ25FLElBQUksZ0JBQWdCLEdBQUcsVUFBVSxDQUFDLE1BQU0sQ0FBQztRQUN6QyxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFO1lBQy9CLE1BQU0sSUFBSSxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLGdCQUFnQixDQUFDLENBQUMsQ0FBQztTQUMzRTtRQUNELE9BQU8sTUFBTSxDQUFDO0lBQ2hCLENBQUM7Q0FDRjtBQXpSRCx3Q0F5UkMifQ==
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -16,36 +25,38 @@ const child_process = require("child_process");

}
async exec() {
//Create directory if not exists
fs.ensureDirSync(this.source_directory);
//Generate Package.xml
let command = await this.buildManifestBuildCommand();
let child = child_process.exec(command, { encoding: "utf8" });
child.stdout.on("data", data => {
console.log(data.toString());
exec() {
return __awaiter(this, void 0, void 0, function* () {
//Create directory if not exists
fs.ensureDirSync(this.source_directory);
//Generate Package.xml
let command = yield this.buildManifestBuildCommand();
let child = child_process.exec(command, { encoding: "utf8" });
child.stdout.on("data", data => {
console.log(data.toString());
});
child.stderr.on("data", data => {
console.log(data.toString());
});
yield OnExit_1.onExit(child);
//Retrive Package.xml
command = yield this.buildMDAPIRetrieveCommand();
child = child_process.exec(command, { encoding: "utf8" });
child.stdout.on("data", data => {
console.log(data.toString());
});
child.stderr.on("data", data => {
console.log(data.toString());
});
yield OnExit_1.onExit(child);
//Unzip the downloaded unpackaged.zip
if (this.isUnzipEnabled) {
yield Extract_1.extract(path.join(this.source_directory, "unpackaged.zip"), this.source_directory);
fs.unlinkSync(path.join(this.source_directory, "unpackaged.zip"));
fs.copySync(path.join(this.source_directory, "unpackaged"), this.source_directory, { overwrite: true });
fs.removeSync(path.join(this.source_directory, "unpackaged"));
return this.source_directory;
}
else {
return path.resolve(this.source_directory, "unpackaged.zip");
}
});
child.stderr.on("data", data => {
console.log(data.toString());
});
await OnExit_1.onExit(child);
//Retrive Package.xml
command = await this.buildMDAPIRetrieveCommand();
child = child_process.exec(command, { encoding: "utf8" });
child.stdout.on("data", data => {
console.log(data.toString());
});
child.stderr.on("data", data => {
console.log(data.toString());
});
await OnExit_1.onExit(child);
//Unzip the downloaded unpackaged.zip
if (this.isUnzipEnabled) {
await Extract_1.extract(path.join(this.source_directory, "unpackaged.zip"), this.source_directory);
fs.unlinkSync(path.join(this.source_directory, "unpackaged.zip"));
fs.copySync(path.join(this.source_directory, "unpackaged"), this.source_directory, { overwrite: true });
fs.removeSync(path.join(this.source_directory, "unpackaged"));
return this.source_directory;
}
else {
return path.resolve(this.source_directory, "unpackaged.zip");
}
}

@@ -74,2 +85,2 @@ buildManifestBuildCommand() {

exports.default = ExportSourceFromAnOrgImpl;
//# sourceMappingURL=ExportSourceFromAnOrgImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXhwb3J0U291cmNlRnJvbUFuT3JnSW1wbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZmR4d3JhcHBlcnMvRXhwb3J0U291cmNlRnJvbUFuT3JnSW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLCtDQUFnRDtBQUVoRCxzQ0FBbUM7QUFDbkMsd0NBQXFDO0FBRXJDLDZCQUE4QjtBQUM5QiwrQkFBZ0M7QUFFaEMsTUFBcUIseUJBQXlCO0lBQzVDLFlBQ1UsVUFBa0IsRUFDbEIsZ0JBQXdCLEVBQ3hCLE1BQWMsRUFDZCwyQkFBb0MsRUFDcEMsY0FBdUI7UUFKdkIsZUFBVSxHQUFWLFVBQVUsQ0FBUTtRQUNsQixxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQVE7UUFDeEIsV0FBTSxHQUFOLE1BQU0sQ0FBUTtRQUNkLGdDQUEyQixHQUEzQiwyQkFBMkIsQ0FBUztRQUNwQyxtQkFBYyxHQUFkLGNBQWMsQ0FBUztJQUM5QixDQUFDO0lBRVMsSUFBSTs7WUFDZixnQ0FBZ0M7WUFDaEMsRUFBRSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztZQUV4QyxzQkFBc0I7WUFDd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sVUFBVSxFQUFFLENBQUM7UUFFN0UsSUFBSSxJQUFJLENBQUMsMkJBQTJCO1lBQUUsT0FBTyxJQUFJLEtBQUssQ0FBQztRQUV2RCxJQUFJLElBQUksQ0FBQyxNQUFNO1lBQUUsT0FBTyxJQUFJLE9BQU8sSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDO1FBRWpELElBQUksSUFBSSxDQUFDLGdCQUFnQjtZQUN2QixPQUFPLElBQUksT0FBTyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsRUFBRSxhQUFhLENBQUMsRUFBRSxDQUFDO1FBRXRFLE9BQU8sQ0FBQyxHQUFHLENBQUMsbUJBQW1CLENBQUMsQ0FBQztRQUNqQyxPQUFPLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBRXJCLE9BQU8sT0FBTyxDQUFDO0lBQ2pCLENBQUM7SUFFTyx5QkFBeUI7UUFDL0IsSUFBSSxPQUFPLEdBQUcsZ0NBQWdDLElBQUksQ0FBQyxVQUFVLEVBQUUsQ0FBQztRQUVoRSxPQUFPLElBQUksUUFBUSxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsRUFBRSxhQUFhLENBQUMsRUFBRSxDQUFDO1FBRXJFLE9BQU8sSUFBSSxRQUFRLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLEVBQUUsQ0FBQztRQUV0RCxPQUFPLENBQUMsR0FBRyxDQUFDLG1CQUFtQixDQUFDLENBQUM7UUFDakMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUVyQixPQUFPLE9BQU8sQ0FBQztJQUNqQixDQUFDO0NBQ0Y7QUF4RkQsNENBd0ZDIn0=
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -14,55 +23,59 @@ const util_1 = require("util");

}
async exec() {
let project_config_path;
if (!util_1.isNullOrUndefined(this.project_directory))
project_config_path = path.join(this.project_directory, "sfdx-project.json");
else
project_config_path = "sfdx-project.json";
let project_json = JSON.parse(fs.readFileSync(project_config_path));
if (util_1.isNullOrUndefined(this.sfdx_package))
this.sfdx_package = "default";
let selected_package;
project_json["packageDirectories"].forEach(element => {
if (this.sfdx_package == "default" && element["default"] == true) {
selected_package = element;
return;
exec() {
return __awaiter(this, void 0, void 0, function* () {
let project_config_path;
if (!util_1.isNullOrUndefined(this.project_directory))
project_config_path = path.join(this.project_directory, "sfdx-project.json");
else
project_config_path = "sfdx-project.json";
let project_json = JSON.parse(fs.readFileSync(project_config_path));
if (util_1.isNullOrUndefined(this.sfdx_package))
this.sfdx_package = "default";
let selected_package;
project_json["packageDirectories"].forEach(element => {
if (this.sfdx_package == "default" && element["default"] == true) {
selected_package = element;
return;
}
else if (this.sfdx_package == element["package"]) {
selected_package = element;
return;
}
});
console.log(`Package : ${selected_package["package"]}`);
console.log(`Version : ${selected_package["versionNumber"]}`);
let segments = selected_package["versionNumber"].split(".");
if (this.segment == "Major")
segments[0] += String(Number(segments[0]) + 1);
if (this.segment == "Minor")
segments[1] += String(Number(segments[1]) + 1);
if (this.segment == "Patch")
segments[2] = String(Number(segments[2]) + 1);
if (segments[3] == "NEXT") {
throw new Error("NEXT not supported for this task, Please keep as the build version, which then this task can manipulate");
}
else if (this.sfdx_package == element["package"]) {
selected_package = element;
return;
if (this.segment == "BuildNumber" && !this.appendBuildNumber)
segments[3] = String(Number(segments[3]) + 1);
if (this.appendBuildNumber) {
let numberToBeAppended = parseInt(this.buildNumber);
if (isNaN(numberToBeAppended))
throw new Error("BuildNumber should be a number");
else if (numberToBeAppended > 999)
throw new Error("BuildNumber should be less than 999");
else
segments[3] = this.buildNumber;
}
selected_package["versionNumber"] = `${segments[0]}.${segments[1]}.${segments[2]}.${segments[3]}`;
console.log(`Updated Version : ${selected_package["versionNumber"]}`);
if (!this.appendBuildNumber) {
fs.writeFileSync(project_config_path, JSON.stringify(project_json, null, 4));
}
return selected_package["versionNumber"];
});
console.log(`Package : ${selected_package["package"]}`);
console.log(`Version : ${selected_package["versionNumber"]}`);
let segments = selected_package["versionNumber"].split(".");
if (this.segment == "Major")
segments[0] += String(Number(segments[0]) + 1);
if (this.segment == "Minor")
segments[1] += String(Number(segments[1]) + 1);
if (this.segment == "Patch")
segments[2] = String(Number(segments[2]) + 1);
if (segments[3] == "NEXT") {
throw new Error("NEXT not supported for this task, Please keep as the build version, which then this task can manipulate");
}
if (this.segment == "BuildNumber" && !this.appendBuildNumber)
segments[3] = String(Number(segments[3]) + 1);
if (this.appendBuildNumber) {
let numberToBeAppended = parseInt(this.buildNumber);
if (isNaN(numberToBeAppended))
throw new Error("BuildNumber should be a number");
else if (numberToBeAppended > 999)
throw new Error("BuildNumber should be less than 999");
else
segments[3] = this.buildNumber;
}
selected_package["versionNumber"] = `${segments[0]}.${segments[1]}.${segments[2]}.${segments[3]}`;
console.log(`Updated Version : ${selected_package["versionNumber"]}`);
if (!this.appendBuildNumber) {
fs.writeFileSync(project_config_path, JSON.stringify(project_json, null, 4));
}
return selected_package["versionNumber"];
}
async buildExecCommand() { }
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () { });
}
}
exports.default = IncrementProjectBuildNumberImpl;
//# sourceMappingURL=IncrementProjectBuildNumberImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5jcmVtZW50UHJvamVjdEJ1aWxkTnVtYmVySW1wbC5qc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BQUV4QyxpREFBMkMifQ==
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -14,25 +23,29 @@ const child_process = require("child_process");

}
async exec() {
let command = await this.buildExecCommand();
let child = child_process.exec(command, (error, stdout, stderr) => {
if (error)
throw error;
exec() {
return __awaiter(this, void 0, void 0, function* () {
let command = yield this.buildExecCommand();
let child = child_process.exec(command, (error, stdout, stderr) => {
if (error)
throw error;
});
child.stdout.on("data", data => { console.log(data.toString()); });
yield OnExit_1.onExit(child);
});
child.stdout.on("data", data => { console.log(data.toString()); });
await OnExit_1.onExit(child);
}
async buildExecCommand() {
let command = `npx sfdx force:package:install --package ${this.package_version_id} -u ${this.targetusername} --noprompt`;
command += ` --publishwait=${this.publish_wait_time}`;
command += ` --wait=${this.wait_time}`;
command += ` --securitytype=${this.options['securitytype']}`;
command += ` --upgradetype=${this.options['upgradetype']}`;
command += ` --apexcompile=${this.options['apexcompile']}`;
if (!util_1.isNullOrUndefined(this.options['installationkey']))
command += ` --installationkey=${this.options['installationkey']}`;
console.log(`Generated Command ${command}`);
return command;
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command = `npx sfdx force:package:install --package ${this.package_version_id} -u ${this.targetusername} --noprompt`;
command += ` --publishwait=${this.publish_wait_time}`;
command += ` --wait=${this.wait_time}`;
command += ` --securitytype=${this.options['securitytype']}`;
command += ` --upgradetype=${this.options['upgradetype']}`;
command += ` --apexcompile=${this.options['apexcompile']}`;
if (!util_1.isNullOrUndefined(this.options['installationkey']))
command += ` --installationkey=${this.options['installationkey']}`;
console.log(`Generated Command ${command}`);
return command;
});
}
}
exports.default = InstallUnlockedPackageImpl;
//# sourceMappingURL=InstallUnlockedPackageImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5zdGFsbFVubG9ja2VkUGFja2FnZUltcGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2ZkeHdyYXBwZXJzL0luc3RhbGxVbmxvY2tlZFBhY2thZ2VJbXBsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsK0NBQWdEO0FBQ2hELCtCQUF5QztBQUN6QyxzQ0FBbUM7QUFJbkMsTUFBcUIsMEJBQTBCO0lBQzdDLFlBQ1Usa0JBQXlCLEVBQ3pCLGNBQXFCLEVBQ3JCLE9BQVcsRUFDWCxTQUFnQixFQUNoQixpQkFBd0I7UUFKeEIsdUJBQWtCLEdBQWxCLGtCQUFrQixDQUFPO1FBQ3pCLG1CQUFjLEdBQWQsY0FBYyxDQUFPO1FBQ3JCLFlBQU8sR0FBUCxPQUFPLENBQUk7UUFDWCxjQUFTLEdBQVQsU0FBUyxDQUFPO1FBQ2hCLHNCQUFpQixHQUFqQixpQkFBaUIsQ0FBTztJQUMvQixDQUFDO0lBRVMsSUFBSTs7WUFDaEIsSUFBSSxPQUFPLEdBQUcsTUFBTSxJQUFJLENBQUMsZ0JBQWdCLEVBQUUsQ0FBQztZQUU1QyxJQUFJLEtBQUssR0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBQyxDQUFDLEtBQUssRUFBQyxNQUFNLEVBQUMsTUFBTSxFQUFDLEVBQUU7Z0JBRTNELElBQUcsS0FBSztvQkFDTCxNQUFNLEtBQUssQ0FBQztZQUNqQixDQUFDLENBQUMsQ0FBQztZQUVILEtBQUssQ0FBQyxNQUFNLENBQUMsRUFBRSxDQU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";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -10,24 +19,28 @@ const child_process = require("child_process");

}
async exec() {
let command = await this.buildExecCommand();
console.log(`Triggering Command: ${command}`);
let child = child_process.exec(command, (error, stdout, stderr) => {
if (error)
throw error;
exec() {
return __awaiter(this, void 0, void 0, function* () {
let command = yield this.buildExecCommand();
console.log(`Triggering Command: ${command}`);
let child = child_process.exec(command, (error, stdout, stderr) => {
if (error)
throw error;
});
child.stdout.on("data", data => {
console.log(data.toString());
});
yield OnExit_1.onExit(child);
});
child.stdout.on("data", data => {
console.log(data.toString());
}
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command = `npx sfdx force:package:version:promote -v ${this.devhub_alias}`;
//package
command += ` -p ${this.package_version_id}`;
//noprompt
command += ` -n`;
return command;
});
await OnExit_1.onExit(child);
}
async buildExecCommand() {
let command = `npx sfdx force:package:version:promote -v ${this.devhub_alias}`;
//package
command += ` -p ${this.package_version_id}`;
//noprompt
command += ` -n`;
return command;
}
}
exports.default = PromoteUnlockedPackageImpl;
//# sourceMappingURL=PromoteUnlockedPackageImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvbW90ZVVubG9ja2VkUGFja2FnZUltcGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2ZkeHdyYXBwZXJzL1Byb21vdGVVbmxvY2tlZFBhY2thZ2VJbXBsLnRzIl0sIm5hbWVzIjpbX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ztZQUVqQixPQUFPLE9BQU8sQ0FBQztRQUNqQixDQUFDO0tBQUE7Q0FDRjtBQTVCRCw2Q0E0QkMifQ==
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -12,61 +21,63 @@ const child_process = require("child_process");

}
async exec() {
let test_result = {
id: "",
result: false,
message: ""
};
let output = "";
let error = "";
try {
//Print final output
let child = child_process.exec(this.buildExecCommand(), {
maxBuffer: 1024 * 1024 * 5,
encoding: "utf8"
}, (error, stdout, stderr) => { });
child.stdout.on("data", data => {
output += data.toString();
});
child.stderr.on("data", data => {
error += data.toString();
});
await OnExit_1.onExit(child);
}
catch (err) {
}
console.log(output);
try {
let test_id = fs
.readFileSync(path.join(this.test_options["outputdir"], "test-run-id.txt"))
.toString();
console.log('test_id', test_id);
let test_report_json_file = fs
.readFileSync(path.join(this.test_options["outputdir"], `test-result-${test_id}.json`))
.toString();
let test_report_json = JSON.parse(test_report_json_file);
test_result.id = test_id;
//Print human readable output to console
if ((test_report_json.summary.outcome = "Failed")) {
test_result.message = `${test_report_json.summary.failing} Tests failed with overall Test Run Coverage of ${test_report_json.summary.testRunCoverage}`;
test_result.message += "\nFailed Test Cases:";
test_report_json.tests.forEach(element => {
if (element.Outcome == "Fail") {
test_result.message += "\n" + `${element.MethodName} ${element.Message} ${element.StackTrace}`;
}
exec() {
return __awaiter(this, void 0, void 0, function* () {
let test_result = {
id: "",
result: false,
message: ""
};
let output = "";
let error = "";
try {
//Print final output
let child = child_process.exec(this.buildExecCommand(), {
maxBuffer: 1024 * 1024 * 5,
encoding: "utf8"
}, (error, stdout, stderr) => { });
child.stdout.on("data", data => {
output += data.toString();
});
child.stderr.on("data", data => {
error += data.toString();
});
yield OnExit_1.onExit(child);
}
catch (err) {
}
console.log(output);
try {
let test_id = fs
.readFileSync(path.join(this.test_options["outputdir"], "test-run-id.txt"))
.toString();
console.log('test_id', test_id);
let test_report_json_file = fs
.readFileSync(path.join(this.test_options["outputdir"], `test-result-${test_id}.json`))
.toString();
let test_report_json = JSON.parse(test_report_json_file);
test_result.id = test_id;
//Print human readable output to console
if ((test_report_json.summary.outcome = "Failed")) {
test_result.message = `${test_report_json.summary.failing} Tests failed with overall Test Run Coverage of ${test_report_json.summary.testRunCoverage}`;
test_result.message += "\nFailed Test Cases:";
test_report_json.tests.forEach(element => {
if (element.Outcome == "Fail") {
test_result.message += "\n" + `${element.MethodName} ${element.Message} ${element.StackTrace}`;
}
});
test_result.result = false;
console.error(output);
}
else {
test_result.message = `${test_report_json.summary.passing} Tests passed with overall Test Run Coverage of ${test_report_json.summary.testRunCoverage}`;
test_result.result = true;
console.log(output);
}
return test_result;
}
catch (err) {
test_result.result = false;
console.error(output);
test_result.message = error;
return test_result;
}
else {
test_result.message = `${test_report_json.summary.passing} Tests passed with overall Test Run Coverage of ${test_report_json.summary.testRunCoverage}`;
test_result.result = true;
console.log(output);
}
return test_result;
}
catch (err) {
test_result.result = false;
test_result.message = error;
return test_result;
}
});
}

@@ -99,2 +110,2 @@ buildExecCommand() {

exports.default = TriggerApexTestImpl;
//# sourceMappingURL=TriggerApexTestImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHJpZ2dlckFwZXhUZXN0SW1wbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZmR4d3JhcHBlcnMvVHJpZ2dlckFwZXhUZXN0SW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIj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lBQ2pCLENBQUM7Q0FDRjtBQXhIRCxzQ0F3SEMifQ==
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -9,17 +18,21 @@ const child_process = require("child_process");

}
async exec(command) {
let result = child_process.execSync(command, {
encoding: "utf8"
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let result = child_process.execSync(command, {
encoding: "utf8"
});
let resultAsJSON = JSON.parse(result);
if (Number(resultAsJSON.result.coverage) < this.required_coverage)
throw new Error(`Org Coverage is currently at ${resultAsJSON.result.coverage}, which is less than the required coverage ${this.required_coverage} `);
console.log(`Org Coverage is currently at ${resultAsJSON.result.coverage}`);
});
let resultAsJSON = JSON.parse(result);
if (Number(resultAsJSON.result.coverage) < this.required_coverage)
throw new Error(`Org Coverage is currently at ${resultAsJSON.result.coverage}, which is less than the required coverage ${this.required_coverage} `);
console.log(`Org Coverage is currently at ${resultAsJSON.result.coverage}`);
}
async buildExecCommand() {
let command = `npx sfdx sfpowerkit:org:orgcoverage -u ${this.target_org} --json`;
return command;
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command = `npx sfdx sfpowerkit:org:orgcoverage -u ${this.target_org} --json`;
return command;
});
}
}
exports.default = ValidateApexCoverageImpl;
//# sourceMappingURL=ValidateApexCoverageImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmFsaWRhdGVBcGV4Q292ZXJhZ2VJbXBsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZ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(this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -12,22 +21,26 @@ const child_process = require("child_process");

}
async exec(command) {
let child = child_process.exec(command, { encoding: "utf8", cwd: this.project_directory }, (error, stdout, stderr) => {
if (error)
throw error;
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let child = child_process.exec(command, { encoding: "utf8", cwd: this.project_directory }, (error, stdout, stderr) => {
if (error)
throw error;
});
child.stdout.on("data", data => { console.log(data.toString()); });
child.stderr.on("data", data => { console.log(data.toString()); });
yield OnExit_1.onExit(child);
});
child.stdout.on("data", data => { console.log(data.toString()); });
child.stderr.on("data", data => { console.log(data.toString()); });
await OnExit_1.onExit(child);
}
async buildExecCommand() {
let command;
command = `npx sfdx sfpowerkit:package:valid`;
if (!util_1.isNullOrUndefined(this.validate_package))
command += ` -n ${this.validate_package}`;
if (!util_1.isNullOrUndefined(this.bypass))
command += ` -b ${this.bypass}`;
return command;
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command;
command = `npx sfdx sfpowerkit:package:valid`;
if (!util_1.isNullOrUndefined(this.validate_package))
command += ` -n ${this.validate_package}`;
if (!util_1.isNullOrUndefined(this.bypass))
command += ` -b ${this.bypass}`;
return command;
});
}
}
exports.default = ValidateDXUnlockedPackageImpl;
//# sourceMappingURL=ValidateDXUnlockedPackageImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmFsaWRhdGVEWFVubG9ja2VkUGFja2FnZUltcGwuanMiLCJzb3VyY2VS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LENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBRy9ELE1BQU0sZUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBRXRCLENBQUM7S0FBQTtJQUVZLGdCQUFnQjs7WUFFM0IsSUFBSSxPQUFPLENBQUM7WUFDUixPQUFPLEdBQUcsbUNBQW1DLENBQUM7WUFHbEQsSUFBRyxDQUFDLHdCQUFpQixDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQztnQkFDNUMsT0FBTyxJQUFFLFFBQVEsSUFBSSxDQUFDLGdCQUFnQixFQUFFLENBQUM7WUFFekMsSUFBRyxDQUFDLHdCQUFpQixDQUFDLElBQUksQ0FBQyxNQUFNLENBQUM7Z0JBQ2xDLE9BQU8sSUFBRSxRQUFRLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQztZQUcvQixPQUFPLE9BQU8sQ0FBQztRQUNqQixDQUFDO0tBQUE7Q0FHRjtBQXBDRCxnREFvQ0MifQ==
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -10,18 +19,22 @@ const child_process = require("child_process");

}
async exec(command) {
let result = child_process.execSync(command, {
encoding: "utf8"
exec(command) {
return __awaiter(this, void 0, void 0, function* () {
let result = child_process.execSync(command, {
encoding: "utf8"
});
let resultAsJSON = JSON.parse(result);
console.log(resultAsJSON);
if (Number(resultAsJSON.result.coverage) < this.required_coverage)
throw new Error(`Package Code Coverage is currently at ${resultAsJSON.result.coverage}, which is less than the required coverage ${this.required_coverage} `);
console.log(`Package Code Coverage is currently at ${resultAsJSON.result.coverage}`);
});
let resultAsJSON = JSON.parse(result);
console.log(resultAsJSON);
if (Number(resultAsJSON.result.coverage) < this.required_coverage)
throw new Error(`Package Code Coverage is currently at ${resultAsJSON.result.coverage}, which is less than the required coverage ${this.required_coverage} `);
console.log(`Package Code Coverage is currently at ${resultAsJSON.result.coverage}`);
}
async buildExecCommand() {
let command = `npx sfdx sfpowerkit:package:version:codecoverage -u ${this.target_org} -i ${this.package_version_id} --json`;
return command;
buildExecCommand() {
return __awaiter(this, void 0, void 0, function* () {
let command = `npx sfdx sfpowerkit:package:version:codecoverage -u ${this.target_org} -i ${this.package_version_id} --json`;
return command;
});
}
}
exports.default = ValidateTestCoveragePackageImpl;
//# sourceMappingURL=ValidateTestCoveragePackageImpl.js.map
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmFsaWRhdGVUZXN0Q292ZXJhZ2VQYWNrYWdlSW1wbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zZmR4d3JhcHBlcnMvVmFsaWRhdGVUZXN0Q292ZXJhZ2VQYWNrYWdlSW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLCtDQUFnRDtBQUVoRCxNQUFxQiwrQkFBK0I7SUFHbEQsWUFBMkIsVUFBa0IsRUFBVSxpQkFBeUIsRUFBVSxrQkFBeUI7UUFBeEYsZUFBVSxHQUFWLFVBQVUsQ0FBUTtRQUFVLHNCQUFpQixHQUFqQixpQkFBaUIsQ0FBUTtRQUFVLHVCQUFrQixHQUFsQixrQkFBa0IsQ0FBTztJQUFHLENBQUM7SUFFMUcsSUFBSSxDQUFDLE9BQWU7O1lBQy9CLElBQUksTUFBTSxHQUFHLGFBQWEsQ0FBQyxRQUFRLENBQUMsT0FBTyxFQUFFO2dCQUMzQyxRQUFRLEVBQUUsTUFBTTthQUVqQixDQUFDLENBQUM7WUFFSCxJQUFJLFlBQVksR0FBRyxJQUFJLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1lBRXRDLE9BQU8sQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLENBQUM7WUFFMUIsSUFBSSxNQUFNLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsR0FBRyxJQUFJLENBQUMsaUJBQWlCO2dCQUNoRSxNQUFNLElBQUksS0FBSyxDQUFDLHlDQUF5QyxZQUFZLENBQUMsTUFBTSxDQUFDLFFBQVEsOENBQStDLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxDQUFDLENBQUM7WUFFaEssT0FBTyxDQUFDLEdBQUcsQ0FBQyx5Q0FBeUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFDO1FBQ3ZGLENBQUM7S0FBQTtJQUVZLGdCQUFnQjs7WUFDM0IsSUFBSSxPQUFPLEdBQUcsd0RBQXdELElBQUksQ0FBQyxVQUFVLE9BQU8sSUFBSSxDQUFDLGtCQUFrQixTQUFTLENBQUM7WUFFN0gsT0FBTyxPQUFPLENBQUM7UUFDakIsQ0FBQztLQUFBO0NBR0Y7QUE1QkQsa0RBNEJDIn0=
{
"name": "@dxatscale/sfpowerscripts.core",
"version": "0.0.26",
"description": "Core Module used by sfpowerscripts",
"repository": {
"type": "git",
"url": "git+https://github.com/azlamsalam/sfpowerscripts.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/azlamsalam/sfpowerscripts/issues"
},
"main": "lib/index",
"types": "lib/index",
"files": [
"/lib"
"lib"
],
"homepage": "https://github.com/azlamsalam/sfpowerscripts#readme",
"version": "0.0.23",
"scripts": {
"prepare": "rimraf lib && tsc -b ",
"build": "rimraf lib && tsc -b ",
"postpublish": "echo published"
"build": "npm run clean && npm run compile",
"clean": "rimraf ./lib && rimraf tsconfig.tsbuildinfo",
"compile": "tsc -b tsconfig.json"
},

@@ -27,9 +20,21 @@ "dependencies": {

},
"repository": {
"type": "git",
"url": "git+https://github.com/Accenture/sfpowerscripts.git"
},
"keywords": [
"sfpowerscripts",
"salesforce",
"sfdx",
"cli",
"ci/cd"
],
"author": "dxatscale",
"gitHead": "913823daa863464cee7d75c319871dd7c0b4497d"
"license": "MIT",
"bugs": {
"url": "https://github.com/Accenture/sfpowerscripts/issues"
},
"homepage": "https://github.com/Accenture/sfpowerscripts#readme",
"devDependencies": {
"@types/node": "^13.13.0"
},
"gitHead": "dd72783d6118b66a5c155db2f3623194862e1ea8"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc