Skip to content

Commit

Permalink
fix(sfp): revert file locations to use .sfpowerscripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sfopsbot committed Dec 19, 2023
1 parent 028a179 commit 28c7642
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/sfp-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@flxblio/sfp",
"description": "Flxbl Toolkit",
"version": "30.0.4",
"version": "30.0.5",
"license": "MIT",
"author": "flxblio",
"release": "January 24",
Expand Down
2 changes: 1 addition & 1 deletion packages/sfp-cli/src/InstallPackageCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ export default abstract class InstallPackageCommand extends sfpCommand {
*/
private postInstall(): void {
// Delete temp directory containing unzipped artifacts
rimraf.sync('.sfp/unzippedArtifacts');
rimraf.sync('.sfpowerscripts/unzippedArtifacts');
}
}
4 changes: 2 additions & 2 deletions packages/sfp-cli/src/core/artifacts/ArtifactFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class ArtifactFetcher {
* @param artifact
*/
private static fetchArtifactFilePathsFromZipFile(artifact: string): Artifact {
let unzippedArtifactsDirectory: string = `.sfp/unzippedArtifacts/${this.makefolderid(8)}`;
let unzippedArtifactsDirectory: string = `.sfpowerscripts/unzippedArtifacts/${this.makefolderid(8)}`;

fs.mkdirpSync(unzippedArtifactsDirectory);
let zip = new AdmZip(artifact);
Expand Down Expand Up @@ -99,7 +99,7 @@ export default class ArtifactFetcher {
* @param artifact
*/
private static fetchArtifactFilePathsFromTarball(artifact: string): Artifact {
let unzippedArtifactsDirectory: string = `.sfp/unzippedArtifacts/${this.makefolderid(8)}`;
let unzippedArtifactsDirectory: string = `.sfpowerscripts/unzippedArtifacts/${this.makefolderid(8)}`;
fs.mkdirpSync(unzippedArtifactsDirectory);

tar.x({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class ChangedComponentsFetcher {
private getComponentSuccessesFromReports(): any[] {
let componentSuccesses: any[] = [];

const reportsDir: string = '.sfp/mdapiDeployReports';
const reportsDir: string = '.sfpowerscripts/mdapiDeployReports';
if (fs.existsSync(reportsDir)) {
let reports = fs.readdirSync(reportsDir);
reports.forEach((report) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class DeploySourceToOrgImpl implements DeploymentExecutor {
}

private writeResultToReport(result: DeployResult) {
let deploymentReports = `.sfp/mdapiDeployReports`;
let deploymentReports = `.sfpowerscripts/mdapiDeployReports`;
fs.mkdirpSync(deploymentReports);
fs.writeFileSync(
path.join(deploymentReports, `${result.response.id}.json`),
Expand Down
2 changes: 1 addition & 1 deletion packages/sfp-cli/src/core/metadata/MetadataFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class MetadataFetcher {
if (!metadata_retrieve_result.zipFile)
SFPLogger.log('Unable to find the requested metadata', LoggerLevel.ERROR, this.logger);

let retriveLocation = `.sfp/retrieved/${retrievedId.id}`;
let retriveLocation = `.sfpowerscripts/retrieved/${retrievedId.id}`;
//Extract Security
let zipFileName = `${retriveLocation}/unpackaged_${makeRandomId(8)}.zip`;
fs.mkdirpSync(retriveLocation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class SfpPackageContentGenerator {
revisionFrom?: string,
revisionTo?: string
): Promise<string> {
let artifactDirectory: string = `.sfp/${this.makefolderid(5)}_source`,
let artifactDirectory: string = `.sfpowerscripts/${this.makefolderid(5)}_source`,
rootDirectory: string;

if (projectDirectory) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default class SourceToMDAPIConvertor {
) {}

public async convert() {
let mdapiDir = `.sfp/${this.makefolderid(5)}_mdapi`;
let mdapiDir = `.sfpowerscripts/${this.makefolderid(5)}_mdapi`;
//Create destination directory
if (this.projectDirectory != null) mdapiDir = path.resolve(this.projectDirectory, mdapiDir);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export default class PoolCreateImpl extends PoolBaseImpl {
function addDescriptionToScratchOrg(pool: PoolConfig) {

const configClonePath = path.join('.sfp','scratchorg-configs',`${ makeFileId(8)}.json`);
fs.mkdirpSync('.sfp/scratchorg-configs');
fs.mkdirpSync('.sfpowerscripts/scratchorg-configs');
fs.copyFileSync(pool.configFilePath,configClonePath);

const scratchOrgDefn = fs.readJSONSync(configClonePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default abstract class PoolJobExecutor {
hubOrg: Org,
logLevel: LoggerLevel
): Promise<Result<ScriptExecutionResult, JobError>> {
this.logToFilePath = `.sfp/prepare_logs/${scratchOrg.alias}.log`;
this.logToFilePath = `.sfpowerscripts/prepare_logs/${scratchOrg.alias}.log`;
//Create file logger
fs.outputFileSync(this.logToFilePath, `sfp--log${EOL}`);
SFPLogger.log(`Preparation Log files for ${scratchOrg.username} written to ${this.logToFilePath}`);
Expand Down
10 changes: 5 additions & 5 deletions packages/sfp-cli/src/impl/parallelBuilder/BuildImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,11 @@ export default class BuildImpl {
SFPLogger.log(COLOR_ERROR(`Package Creation Failed for ${pkg}, Here are the details:`));
try {
// Append error to log file
fs.appendFileSync(`.sfp/logs/${pkg}`, reason.message, "utf8");
let data = fs.readFileSync(`.sfp/logs/${pkg}`, "utf8");
fs.appendFileSync(`.sfpowerscripts/logs/${pkg}`, reason.message, "utf8");
let data = fs.readFileSync(`.sfpowerscripts/logs/${pkg}`, "utf8");

const pathToMarkDownFile = `.sfp/outputs/build-error-info.md`;
fs.mkdirpSync(".sfp/outputs");
const pathToMarkDownFile = `.sfpowerscripts/outputs/build-error-info.md`;
fs.mkdirpSync(".sfpowerscripts/outputs");
fs.createFileSync(pathToMarkDownFile);
fs.appendFileSync(pathToMarkDownFile, `\nPlease find the errors observed during build\n\n`);
fs.appendFileSync(pathToMarkDownFile, `## ${pkg}\n\n`);
Expand Down Expand Up @@ -755,7 +755,7 @@ export default class BuildImpl {


return SfpPackageBuilder.buildPackageFromProjectDirectory(
new FileLogger(`.sfp/logs/${sfdx_package}`),
new FileLogger(`.sfpowerscripts/logs/${sfdx_package}`),
this.props.projectDirectory,
sfdx_package,
{
Expand Down
2 changes: 1 addition & 1 deletion packages/sfp-cli/src/outputs/FileOutputHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class FileOutputHandler {

public static getInstance() {
if (!FileOutputHandler.instance)
FileOutputHandler.instance = new FileOutputHandler('.sfp/outputs');
FileOutputHandler.instance = new FileOutputHandler('.sfpowerscripts/outputs');

return FileOutputHandler.instance;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jest.mock('../../../src/core/package/generators/SfpPackageContentGenerator', ()
configFilePath?: string,
pathToReplacementForceIgnore?: string
): Promise<string> {
return '.sfp/3sIRD_source';
return '.sfpowerscripts/3sIRD_source';
}
}

Expand Down

0 comments on commit 28c7642

Please sign in to comment.