@dxatscale/sfpowerscripts.core
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -13,3 +13,3 @@ { | ||
"homepage": "https://github.com/azlamsalam/sfpowerscripts#readme", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"scripts": { | ||
@@ -25,3 +25,3 @@ "build": "node buildpackage.js", | ||
}, | ||
"devDependencies": { | ||
"devDependencies": { | ||
"glob": "~7.1.2", | ||
@@ -28,0 +28,0 @@ "node": "^11.0.0", |
@@ -1,2 +0,2 @@ | ||
export interface DeploySourceResult { | ||
export default interface DeploySourceResult { | ||
deploy_id: string; | ||
@@ -3,0 +3,0 @@ result: boolean; |
@@ -1,8 +0,8 @@ | ||
export declare class ExportSourceFromAnOrgImpl { | ||
export default class ExportSourceFromAnOrgImpl { | ||
private target_org; | ||
private source_directory; | ||
private filter; | ||
private isManagedPAackageToBeExclued; | ||
private isManagedPackageToBeExclued; | ||
private isUnzipEnabled; | ||
constructor(target_org: string, source_directory: string, filter: string, isManagedPAackageToBeExclued: boolean, isUnzipEnabled: boolean); | ||
constructor(target_org: string, source_directory: string, filter: string, isManagedPackageToBeExclued: boolean, isUnzipEnabled: boolean); | ||
exec(): Promise<string>; | ||
@@ -9,0 +9,0 @@ private buildManifestBuildCommand; |
@@ -17,7 +17,7 @@ "use strict"; | ||
class ExportSourceFromAnOrgImpl { | ||
constructor(target_org, source_directory, filter, isManagedPAackageToBeExclued, isUnzipEnabled) { | ||
constructor(target_org, source_directory, filter, isManagedPackageToBeExclued, isUnzipEnabled) { | ||
this.target_org = target_org; | ||
this.source_directory = source_directory; | ||
this.filter = filter; | ||
this.isManagedPAackageToBeExclued = isManagedPAackageToBeExclued; | ||
this.isManagedPackageToBeExclued = isManagedPackageToBeExclued; | ||
this.isUnzipEnabled = isUnzipEnabled; | ||
@@ -64,3 +64,3 @@ } | ||
let command = `npx sfdx sfpowerkit:org:manifest:build -u ${this.target_org}`; | ||
if (this.isManagedPAackageToBeExclued) | ||
if (this.isManagedPackageToBeExclued) | ||
command += ` -x`; | ||
@@ -84,3 +84,3 @@ if (this.filter) | ||
} | ||
exports.ExportSourceFromAnOrgImpl = ExportSourceFromAnOrgImpl; | ||
exports.default = ExportSourceFromAnOrgImpl; | ||
//# sourceMappingURL=ExportSourceFromAnOrgImpl.js.map |
@@ -1,1 +0,1 @@ | ||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,o){return new(r||(r=Promise))(function(i,n){function s(e){try{a(o.next(e))}catch(e){n(e)}}function c(e){try{a(o.throw(e))}catch(e){n(e)}}function a(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(s,c)}a((o=o.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0});const child_process=require("child_process"),OnExit_1=require("../OnExit"),Extract_1=require("../Extract"),path=require("path"),fs=require("fs-extra");class ExportSourceFromAnOrgImpl{constructor(e,t,r,o,i){this.target_org=e,this.source_directory=t,this.filter=r,this.isManagedPAackageToBeExclued=o,this.isUnzipEnabled=i}exec(){return __awaiter(this,void 0,void 0,function*(){fs.ensureDirSync(this.source_directory);let e=yield this.buildManifestBuildCommand(),t=child_process.exec(e,{encoding:"utf8"});return t.stdout.on("data",e=>{console.log(e.toString())}),t.stderr.on("data",e=>{console.log(e.toString())}),yield OnExit_1.onExit(t),e=yield this.buildMDAPIRetrieveCommand(),(t=child_process.exec(e,{encoding:"utf8"})).stdout.on("data",e=>{console.log(e.toString())}),t.stderr.on("data",e=>{console.log(e.toString())}),yield OnExit_1.onExit(t),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:!0}),fs.removeSync(path.join(this.source_directory,"unpackaged")),this.source_directory):path.resolve(this.source_directory,"unpackaged.zip")})}buildManifestBuildCommand(){let e=`npx sfdx sfpowerkit:org:manifest:build -u ${this.target_org}`;return this.isManagedPAackageToBeExclued&&(e+=" -x"),this.filter&&(e+=` -q ${this.filter}`),this.source_directory&&(e+=` -o ${path.join(this.source_directory,"package.xml")}`),console.log("Generated Command"),console.log(e),e}buildMDAPIRetrieveCommand(){let e=`sfdx force:mdapi:retrieve -u ${this.target_org}`;return e+=` -k ${path.join(this.source_directory,"package.xml")}`,e+=` -r ${path.join(this.source_directory)}`,console.log("Generated Command"),console.log(e),e}}exports.ExportSourceFromAnOrgImpl=ExportSourceFromAnOrgImpl; | ||
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,i){return new(r||(r=Promise))(function(o,n){function s(e){try{a(i.next(e))}catch(e){n(e)}}function c(e){try{a(i.throw(e))}catch(e){n(e)}}function a(e){e.done?o(e.value):new r(function(t){t(e.value)}).then(s,c)}a((i=i.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0});const child_process=require("child_process"),OnExit_1=require("../OnExit"),Extract_1=require("../Extract"),path=require("path"),fs=require("fs-extra");class ExportSourceFromAnOrgImpl{constructor(e,t,r,i,o){this.target_org=e,this.source_directory=t,this.filter=r,this.isManagedPackageToBeExclued=i,this.isUnzipEnabled=o}exec(){return __awaiter(this,void 0,void 0,function*(){fs.ensureDirSync(this.source_directory);let e=yield this.buildManifestBuildCommand(),t=child_process.exec(e,{encoding:"utf8"});return t.stdout.on("data",e=>{console.log(e.toString())}),t.stderr.on("data",e=>{console.log(e.toString())}),yield OnExit_1.onExit(t),e=yield this.buildMDAPIRetrieveCommand(),(t=child_process.exec(e,{encoding:"utf8"})).stdout.on("data",e=>{console.log(e.toString())}),t.stderr.on("data",e=>{console.log(e.toString())}),yield OnExit_1.onExit(t),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:!0}),fs.removeSync(path.join(this.source_directory,"unpackaged")),this.source_directory):path.resolve(this.source_directory,"unpackaged.zip")})}buildManifestBuildCommand(){let e=`npx sfdx sfpowerkit:org:manifest:build -u ${this.target_org}`;return this.isManagedPackageToBeExclued&&(e+=" -x"),this.filter&&(e+=` -q ${this.filter}`),this.source_directory&&(e+=` -o ${path.join(this.source_directory,"package.xml")}`),console.log("Generated Command"),console.log(e),e}buildMDAPIRetrieveCommand(){let e=`sfdx force:mdapi:retrieve -u ${this.target_org}`;return e+=` -k ${path.join(this.source_directory,"package.xml")}`,e+=` -r ${path.join(this.source_directory)}`,console.log("Generated Command"),console.log(e),e}}exports.default=ExportSourceFromAnOrgImpl; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123225