Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/profiler #55

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions messages/generate.profiler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# summary

Use this command to enable multi step deploys for a Salesforce project.

# description

With this command you can fetch all your project profiles in a consistent way. You can specify to only fetch current project definitions or perform the data fetch based on what's on your org.

# flags.project-only.summary

Specify if the profiles will be fetched based on the current project or the whole org.

# flags.path.summary

Specify project path when only fetching current project definitions (i.e: force-app/).

# flags.username.summary

You can use this argument to indicate from which org or username fetch the data. By default we use the current connected org if no value passed.

# examples

- <%= config.bin %> <%= command.id %>
55 changes: 29 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,47 @@
"description": "A sf plugin enabling deploy of releases that requires multi steps in order to be deployed. It supports deploy of metadata, datapacks (SFI) and shell commnads. ",
"version": "1.1.0",
"dependencies": {
"@oclif/core": "^2.9.3",
"@salesforce/core": "^3.34.8",
"@salesforce/kit": "^3.0.6",
"@salesforce/sf-plugins-core": "^2.4.3",
"@oclif/core": "^2.15.0",
"@salesforce/core": "^5.2.9",
"@salesforce/kit": "^3.0.11",
"@salesforce/sf-plugins-core": "^3.1.22",
"npm": "^10.1.0",
"pinst": "^3.0.0",
"swc": "^1.0.11",
"tslib": "^2"
},
"devDependencies": {
"@oclif/test": "^2.5.1",
"@salesforce/cli-plugins-testkit": "^3.4.0",
"@oclif/test": "^2.5.4",
"@salesforce/cli-plugins-testkit": "^4.3.5",
"@salesforce/dev-config": "^4.0.1",
"@salesforce/dev-scripts": "^5.0.1",
"@salesforce/dev-scripts": "^5.10.0",
"@salesforce/prettier-config": "^0.0.3",
"@salesforce/ts-sinon": "^1.4.15",
"@swc/core": "^1.3.69",
"@swc/core": "^1.3.84",
"@types/inquirer": "^9.0.3",
"@types/xml2js": "^0.4.11",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"chai": "^4.3.6",
"eslint": "^8.48.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-salesforce": "^2.0.1",
"@types/xml2js": "^0.4.12",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^6.7.0",
"chai": "^4.3.8",
"eslint": "^8.49.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-salesforce": "^2.0.2",
"eslint-config-salesforce-typescript": "^1.1.2",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jsdoc": "^44.2.4",
"eslint-plugin-sf-plugin": "^1.15.3",
"husky": "^7.0.4",
"mocha": "^9.2.2",
"eslint-plugin-jsdoc": "^46.8.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-sf-plugin": "^1.16.5",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"oclif": "^3.14.0",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"oclif": "^3.16.0",
"prettier": "^3.0.3",
"shx": "0.3.4",
"sinon": "10.0.0",
"sinon": "16.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.7.3",
"wireit": "^0.9.5"
"typescript": "4.8.4",
"wireit": "^0.14.0"
},
"engines": {
"node": ">=16.0.0"
Expand Down Expand Up @@ -197,4 +200,4 @@
}
},
"author": "Tiago Nascimento"
}
}
5 changes: 3 additions & 2 deletions src/commands/builds/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/restrict-plus-operands */
import * as fs from 'fs';
import { spawnSync, SpawnSyncReturns } from 'child_process';
import * as xml2js from 'xml2js';
Expand Down Expand Up @@ -97,14 +98,14 @@ export const execCommand = function (command: string, args: string[], workingFol
}
console.log(`Output: ${spawnOut}`);

if (spawn.error || spawn.status !== 0) {
if (spawn.error ?? spawn.status !== 0) {
let errorMessage = 'Error executing command!';
if (spawn.error) {
errorMessage += spawn.error;
}

if (spawn.stderr) {
errorMessage += ' ' + spawn.stderr.toString();
errorMessage += ' '.concat(spawn.stderr.toString());
}
console.error(errorMessage);
throw new Error(errorMessage);
Expand Down
Loading