Skip to content

Commit

Permalink
feat: add org and flow commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jayree committed May 22, 2023
1 parent 5bb464f commit 3d507fe
Show file tree
Hide file tree
Showing 21 changed files with 1,420 additions and 50 deletions.
106 changes: 97 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,62 @@ sfdx plugins:install @jayree/sfdx-plugin-org
## Commands

<!-- commands -->
* [`sfdx jayree:flow:get:coverage`](#sfdx-jayreeflowgetcoverage)
* [`sfdx jayree:org:configure`](#sfdx-jayreeorgconfigure)
* [`sfdx jayree:org:configure:country`](#sfdx-jayreeorgconfigurecountry)
* [`sfdx jayree:org:configure:state`](#sfdx-jayreeorgconfigurestate)
* [`sfdx jayree:org:get:settings`](#sfdx-jayreeorggetsettings)
* [`sfdx jayree:org:stream`](#sfdx-jayreeorgstream)

### `sfdx jayree:flow:get:coverage`

Check the flow test coverage of an Org.

```
USAGE
$ sfdx jayree:flow:get:coverage -o <value> [--json] [--api-version <value>]
FLAGS
-o, --target-org=<value> (required) Username or alias of the target org.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
ALIASES
$ sfdx jayree:flowtestcoverage
EXAMPLES
$ sfdx jayree:flowtestcoverage
=== Flow Test Coverage
Coverage: 82%
...
```

_See code: [src/commands/jayree/flow/get/coverage.ts](https://github.com/jayree/sfdx-plugin-org/blob/v1.0.4/src/commands/jayree/flow/get/coverage.ts)_

### `sfdx jayree:org:configure`

make configuration changes that are not covered by the metadata API
Make configuration changes that are not covered by the metadata API.

```
USAGE
$ sfdx jayree:org:configure -o <value> [--json] [--api-version <value>] [-t <value>] [--concurrent]
FLAGS
-o, --target-org=<value> (required) Username or alias of the target org.
-t, --tasks=<value>... list of task titles, if no tasks are specified, all tasks marked as active will be executed
-t, --tasks=<value>... List of task titles, if no tasks are specified, all tasks marked as active will be executed.
--api-version=<value> Override the api version used for api requests made by this command
--concurrent execute tasks in parallel
--concurrent Execute tasks in parallel.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
make configuration changes that are not covered by the metadata API
Make configuration changes that are not covered by the metadata API.
See example configuration on how to define tasks
make configuration changes that are not covered by the metadata API
Make configuration changes that are not covered by the metadata API.
See example configuration on how to define tasks
EXAMPLES
Expand Down Expand Up @@ -89,10 +119,10 @@ USAGE
FLAGS
-o, --target-org=<value> (required) Username or alias of the target org.
--api-version=<value> Override the api version used for api requests made by this command
--category=<value> Subdivision category
--concurrent=<value> [default: 1] execute tasks in parallel
--country-code=<value> Alpha-2 code
--language=<value> Language code
--category=<value> Subdivision category.
--concurrent=<value> [default: 1] execute tasks in parallel.
--country-code=<value> Alpha-2 code.
--language=<value> Language code.
GLOBAL FLAGS
--json Format output as json.
Expand All @@ -104,4 +134,62 @@ DESCRIPTION
```

_See code: [src/commands/jayree/org/configure/state.ts](https://github.com/jayree/sfdx-plugin-org/blob/v1.0.4/src/commands/jayree/org/configure/state.ts)_

### `sfdx jayree:org:get:settings`

Write the current settings from an Org to a scratch org def file.

```
USAGE
$ sfdx jayree:org:get:settings -o <value> [--json] [--api-version <value>] [-w] [-f <value>]
FLAGS
-f, --file=<value> Write to 'file' instead of project-scratch-def.json.
-o, --target-org=<value> (required) Username or alias of the target org.
-w, --writetoprojectscratchdeffile Write output to project-scratch-def.json file.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
ALIASES
$ sfdx jayree:org:settings
EXAMPLES
$ sfdx jayree:org:settings
$ sfdx jayree:org:settings -u me@my.org
$ sfdx jayree:org:settings -u MyTestOrg1 -w
```

_See code: [src/commands/jayree/org/get/settings.ts](https://github.com/jayree/sfdx-plugin-org/blob/v1.0.4/src/commands/jayree/org/get/settings.ts)_

### `sfdx jayree:org:stream`

Listen to streaming api and platform events.

```
USAGE
$ sfdx jayree:org:stream -o <value> -c <value> [--json] [--api-version <value>] [-r <value>]
FLAGS
-c, --channel=<value> (required) The event name.
-o, --target-org=<value> (required) Username or alias of the target org.
-r, --replay-id=<value> Receive all stored events after the event specified by the replayId value and new events.
[default: -1] Receive new events that are broadcast after the command subscribes. [-2]
Receive all event, including past events that are within the retention window and new
events.
--api-version=<value> Override the api version used for api requests made by this command
GLOBAL FLAGS
--json Format output as json.
ALIASES
$ sfdx jayree:org:streaming
EXAMPLES
$ sfdx jayree org stream --channel=/event/eventName__e
...
```

_See code: [src/commands/jayree/org/stream.ts](https://github.com/jayree/sfdx-plugin-org/blob/v1.0.4/src/commands/jayree/org/stream.ts)_
<!-- commandsstop -->
18 changes: 18 additions & 0 deletions command-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[
{
"command": "jayree:flow:get:coverage",
"plugin": "@jayree/sfdx-plugin-org",
"flags": ["api-version", "json", "target-org"],
"alias": ["jayree:flowtestcoverage"]
},
{
"command": "jayree:org:configure",
"plugin": "@jayree/sfdx-plugin-org",
Expand All @@ -16,5 +22,17 @@
"plugin": "@jayree/sfdx-plugin-org",
"flags": ["api-version", "category", "concurrent", "country-code", "json", "language", "target-org"],
"alias": []
},
{
"command": "jayree:org:get:settings",
"plugin": "@jayree/sfdx-plugin-org",
"flags": ["api-version", "file", "json", "target-org", "writetoprojectscratchdeffile"],
"alias": ["jayree:org:settings"]
},
{
"command": "jayree:org:stream",
"plugin": "@jayree/sfdx-plugin-org",
"flags": ["api-version", "channel", "json", "replay-id", "target-org"],
"alias": ["jayree:org:streaming"]
}
]
13 changes: 13 additions & 0 deletions lib/commands/jayree/flow/get/coverage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { SfCommand } from '@salesforce/sf-plugins-core';
import { AnyJson } from '@salesforce/ts-types';
export default class FlowTestCoverage extends SfCommand<AnyJson> {
static readonly summary: string;
static readonly examples: string[];
static readonly flags: {
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
};
static readonly deprecateAliases = true;
static readonly aliases: string[];
run(): Promise<AnyJson>;
}
82 changes: 82 additions & 0 deletions lib/commands/jayree/flow/get/coverage.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/commands/jayree/flow/get/coverage.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions lib/commands/jayree/org/get/settings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { SfCommand } from '@salesforce/sf-plugins-core';
import { AnyJson } from '@salesforce/ts-types';
export default class ScratchOrgSettings extends SfCommand<AnyJson> {
static readonly summary: string;
static readonly examples: string[];
static readonly flags: {
'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
writetoprojectscratchdeffile: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
};
static readonly requiresProject = true;
static readonly deprecateAliases = true;
static readonly aliases: string[];
run(): Promise<AnyJson>;
}
Loading

0 comments on commit 3d507fe

Please sign in to comment.