You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository provides a template for creating a plugin for the Salesforce CLI. To convert this template to a working plugin:
14
-
15
-
1. Clone this repo
16
-
2. Delete the .git folder
17
-
3. Replace filler values
18
-
a) Every instance of `<REPLACE_ME>` can be directly substitued for the name of the new plugin. However beware, things like github paths are for the salesforcecli Github organization
19
-
b) Search for case-matching `REPLACE` to find other filler values, such as for the plugin description
20
-
4. Use `git init` to set up the desired git information
21
-
5. Follow the getting started steps below until the `sfdx hello:org` commmand is functioning
22
-
23
-
<REPLACE ME DESCRIPTION END>
24
-
25
-
## Learn about the plugin-omnistudio-migration-tool
26
-
27
-
Salesforce CLI plugins are based on the [oclif plugin framework](<(https://oclif.io/docs/introduction.html)>). Read the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm) to learn about Salesforce CLI plugin development.
28
-
29
-
This repository contains a lot of additional scripts and tools to help with general Salesforce node development and enforce coding standards. You should familiarize yourself with some of the [node developer packages](https://github.com/forcedotcom/sfdx-dev-packages/) used by Salesforce. There is also a default circleci config using the [release management orb](https://github.com/forcedotcom/npm-release-management-orb) standards.
30
-
31
-
Additionally, there are some additional tests that the Salesforce CLI will enforce if this plugin is ever bundled with the CLI. These test are included by default under the `posttest` script and it is recommended to keep these tests active in your plugin, regardless if you plan to have it bundled.
32
-
33
-
# Everything past here is only a suggestion as to what should be in your specific plugin's description
34
-
35
-
This plugin is bundled with the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli). For more information on the CLI, read the [getting started guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm).
36
-
37
-
We always recommend using the latest version of these commands bundled with the CLI, however, you can install a specific version or tag if needed.
38
-
39
-
## Install
40
-
41
-
```bash
42
-
sfdx plugins:install <REPLACE_ME>@x.y.z
8
+
1. Install SFDX cli using the official documentation located [here](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm).
9
+
2. Authenticate your SFDX cli into the org you are going to use for development. You can follow authentication steps [here](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_auth_web.htm).
10
+
3. Clone this repository into your local machine.
11
+
4. Open the migration tool code folder in VSCode or your prefered editor.
12
+
5. In a new command line tool, run the following command:
43
13
```
44
-
45
-
## Issues
46
-
47
-
Please report any issues at https://github.com/forcedotcom/cli/issues
48
-
49
-
## Contributing
50
-
51
-
1. Please read our [Code of Conduct](CODE_OF_CONDUCT.md)
52
-
2. Create a new issue before starting your project so that we can keep track of
53
-
what you are trying to add/fix. That way, we can also offer suggestions or
54
-
let you know if there is already an effort in progress.
55
-
3. Fork this repository.
56
-
4.[Build the plugin locally](#build)
57
-
5. Create a _topic_ branch in your fork. Note, this step is recommended but technically not required if contributing using a fork.
58
-
6. Edit the code in your fork.
59
-
7. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests.
60
-
8. Sign CLA (see [CLA](#cla) below).
61
-
9. Send us a pull request when you are done. We'll review your code, suggest any needed changes, and merge it in.
62
-
63
-
### CLA
64
-
65
-
External contributors will be required to sign a Contributor's License
66
-
Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
67
-
68
-
### Build
69
-
70
-
To build the plugin locally, make sure to have yarn installed and run the following commands:
There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine.
We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the `.vscode` directory of this plugin is a `launch.json` config file, which allows you to attach a debugger to the node process when running your commands.
63
+
64
+
To debug the `hello:org` command:
65
+
1. Start the inspector
66
+
67
+
If you linked your plugin to the sfdx cli, call your command with the `dev-suspend` switch:
Alternatively, to call your command using the `bin/run` script, set the `NODE_OPTIONS` environment variable to `--inspect-brk` when starting the debugger:
3. Click on the Debug icon in the Activity Bar on the side of VS Code to open up the Debug view.
79
+
4. In the upper left hand corner of VS Code, verify that the "Attach to Remote" launch configuration has been chosen.
80
+
5. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program.
81
+
6. Hit the green play button at the top middle of VS Code (this play button will be to the right of the play button that you clicked in step #5).
0 commit comments