Skip to content
Merged
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
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,15 @@
},
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"biome.enabled": false,
"eslint.enable": true,
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"rewrap.wrappingColumn": 80
}
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.6.0] - 2025-12-03

### Added

- `prodly:deploy` and `prodly:checkin` now support `--'metadata-quick-select-components` (`-m`) flag.

## [1.5.9] - 2025-11-19

### Changed
Expand All @@ -10,7 +16,6 @@
- Updated `@salesforce/sf-plugins-core` to v12.2.5
- Updated `oclif` to v4.22.47


## [1.5.8] - 2025-10-21

### Changed
Expand All @@ -30,7 +35,6 @@
- Updated `oclif` to v4.22.29
- Updated `typescript` to v5.9.3


## [1.5.6] - 2025-09-08

### Changed
Expand Down
82 changes: 43 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ EXAMPLES
Lists all branch folders
```

_See code: [src/commands/prodly/branch-folders.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/branch-folders.ts)_
_See code: [src/commands/prodly/branch-folders.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/branch-folders.ts)_

## `sf prodly change-types`

Expand Down Expand Up @@ -120,30 +120,32 @@ EXAMPLES
Creates a scratch org based on a change type
```

_See code: [src/commands/prodly/change-types.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/change-types.ts)_
_See code: [src/commands/prodly/change-types.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/change-types.ts)_

## `sf prodly checkin`

prodly:checkin command

```
USAGE
$ sf prodly checkin -v <value> -o <value> -c <value> [--json] [--flags-dir <value>] [-f <value>] [-b <value>] [-t
<value>] [-q <value>] [-i <value>] [-z <value>] [-p <value>]
$ sf prodly checkin -v <value> -o <value> -c <value> [--json] [--flags-dir <value>] [-f <value>] [-m <value>] [-b
<value>] [-q <value> -t <value>] [-i <value>] [-z <value>] [-p <value>]

FLAGS
-b, --branch=<value> branch name for deployment
-c, --comment=<value> (required) comment for the command versioning commit
-f, --data-folder=<value> data branch folder id to use
-i, --instance=<value> managed instance ID on which to perform the action
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
configuration variable is already set.
-p, --plan=<value> name or record ID of the deployment plan to deploy
-q, --filter=<value> query filter override for a data set deployment
-t, --dataset=<value> name or record ID of the data set to deploy
-v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org. Not required if the `target-dev-hub`
configuration variable is already set.
-z, --notes=<value> notes for the deployment
-b, --branch=<value> branch name for deployment
-c, --comment=<value> (required) comment for the command versioning commit
-f, --data-folder=<value> data branch folder id to use
-i, --instance=<value> managed instance ID on which to perform the action
-m, --metadata-quick-select-components=<value> JSON string of metadata quick select components array, e.g.,
'[{"type":"Profile","ids":["Profile1","Profile2"]}]'
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the
`target-org` configuration variable is already set.
-p, --plan=<value> name or record ID of the deployment plan to deploy
-q, --filter=<value> query filter override for a data set deployment
-t, --dataset=<value> name or record ID of the data set to deploy
-v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org. Not required if the
`target-dev-hub` configuration variable is already set.
-z, --notes=<value> notes for the deployment

GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
Expand All @@ -168,7 +170,7 @@ EXAMPLES
The instance should be managed by the Prodly account associated with the default DevHub control org.
```

_See code: [src/commands/prodly/checkin.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/checkin.ts)_
_See code: [src/commands/prodly/checkin.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/checkin.ts)_

## `sf prodly checkout`

Expand Down Expand Up @@ -217,32 +219,34 @@ EXAMPLES
The instance should be managed by the Prodly account associated with the default DevHub control org.
```

_See code: [src/commands/prodly/checkout.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/checkout.ts)_
_See code: [src/commands/prodly/checkout.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/checkout.ts)_

## `sf prodly deploy`

prodly:deploy command

```
USAGE
$ sf prodly deploy -v <value> -o <value> [--json] [--flags-dir <value>] [-t <value>] [-e] [-d <value>] [-q
<value>] [-b <value>] [-n <value>] [-z <value>] [-p <value>] [-l] [-s <value>]
$ sf prodly deploy -v <value> -o <value> -n <value> [--json] [--flags-dir <value>] [-m <value>] [-e] [-d <value>]
[-q <value> -t <value>] [-b <value>] [-z <value>] [-p <value>] [-l] [-s <value>]

FLAGS
-b, --label=<value> connection and managed instance name
-d, --destination=<value> destination managed instance ID
-e, --deactivate deactivate all events for the deployment
-l, --simulation perform a data simulation
-n, --name=<value> name for the deployment
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
configuration variable is already set.
-p, --plan=<value> name or record ID of the deployment plan to deploy
-q, --filter=<value> query filter override for a data set deployment
-s, --source=<value> source managed instance ID
-t, --dataset=<value> name or record ID of the data set to deploy
-v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org. Not required if the `target-dev-hub`
configuration variable is already set.
-z, --notes=<value> notes for the deployment
-b, --label=<value> connection and managed instance name
-d, --destination=<value> destination managed instance ID
-e, --deactivate deactivate all events for the deployment
-l, --simulation perform a data simulation
-m, --metadata-quick-select-components=<value> JSON string of metadata quick select components array, e.g.,
'[{"type":"Profile","ids":["Profile1","Profile2"]}]'
-n, --name=<value> (required) name for the deployment
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the
`target-org` configuration variable is already set.
-p, --plan=<value> name or record ID of the deployment plan to deploy
-q, --filter=<value> query filter override for a data set deployment
-s, --source=<value> source managed instance ID
-t, --dataset=<value> name or record ID of the data set to deploy
-v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org. Not required if the
`target-dev-hub` configuration variable is already set.
-z, --notes=<value> notes for the deployment

GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
Expand All @@ -267,7 +271,7 @@ EXAMPLES
Command output... deploying to the scratch org from the UAT sandbox, using the named connection record in the dev hub, control org. Long param names.
```

_See code: [src/commands/prodly/deploy.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/deploy.ts)_
_See code: [src/commands/prodly/deploy.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/deploy.ts)_

## `sf prodly jobs`

Expand Down Expand Up @@ -296,7 +300,7 @@ EXAMPLES
Print the job status for the provided job Id.
```

_See code: [src/commands/prodly/jobs.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/jobs.ts)_
_See code: [src/commands/prodly/jobs.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/jobs.ts)_

## `sf prodly manage`

Expand Down Expand Up @@ -344,7 +348,7 @@ EXAMPLES
Manage and version the org associated with the target username under the Prodly account associated with the default DevHub control org.
```

_See code: [src/commands/prodly/manage.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/manage.ts)_
_See code: [src/commands/prodly/manage.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/manage.ts)_

## `sf prodly releases`

Expand Down Expand Up @@ -384,7 +388,7 @@ EXAMPLES
The instance should be managed by the Prodly account associated with the default DevHub control org.
```

_See code: [src/commands/prodly/releases.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/releases.ts)_
_See code: [src/commands/prodly/releases.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/releases.ts)_

## `sf prodly version`

Expand Down Expand Up @@ -429,7 +433,7 @@ EXAMPLES
The instance should be managed by the Prodly account associated with the default DevHub control org.
```

_See code: [src/commands/prodly/version.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.5.0/src/commands/prodly/version.ts)_
_See code: [src/commands/prodly/version.ts](https://github.com/prodly/prodly-sf-cli/blob/v1.6.0/src/commands/prodly/version.ts)_
<!-- commandsstop -->

<!-- debugging-your-plugin -->
Expand Down
1 change: 1 addition & 0 deletions messages/prodly.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"listFlagDescription": "list all managed instances",
"listReleasesFlagDescription": "list all releases",
"manageFlagDescription": "manage a new instance",
"metadataQuickSelectComponentsFlagDescription": "JSON string of metadata quick select components array, e.g., '[{\"type\":\"Profile\",\"ids\":[\"Profile1\",\"Profile2\"]}]'",
"newBranchFlagSummary": "if provided it creates a new branch based on the source branch that will be used for version control",
"notesFlagDescription": "notes for the deployment",
"printFlagDescription": "print the managed instances in a standard format in addition to returning structured data",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "prodlysfcli",
"description": "A plugin which provides Prodly application commands on top of the Salesforce CLI.",
"version": "1.5.9",
"version": "1.6.0",
"author": "Prodly Inc.",
"repository": {
"type": "git",
Expand Down
41 changes: 37 additions & 4 deletions src/commands/prodly/checkin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ export default class ProdlyCheckin extends SfCommand<JSONObject> {
'data-folder': Flags.string({ char: 'f', summary: prodlyMessages.getMessage('dataBranchFolderFlagDescription') }),
'target-dev-hub': Flags.requiredHub(),
'target-org': Flags.requiredOrg(),
'metadata-quick-select-components': Flags.string({
char: 'm',
summary: prodlyMessages.getMessage('metadataQuickSelectComponentsFlagDescription'),
}),
branch: Flags.string({ char: 'b', summary: prodlyMessages.getMessage('branchFlagDescription') }),
comment: Flags.string({ char: 'c', required: true, summary: prodlyMessages.getMessage('commentFlagDescription') }),
dataset: Flags.string({ char: 't', summary: prodlyMessages.getMessage('dataSetFlagDescription') }),
filter: Flags.string({ char: 'q', summary: prodlyMessages.getMessage('queryFilterFlagDescription') }),
filter: Flags.string({
char: 'q',
dependsOn: ['dataset'],
summary: prodlyMessages.getMessage('queryFilterFlagDescription'),
}),
instance: Flags.string({ char: 'i', summary: prodlyMessages.getMessage('instanceFlagDescription') }),
notes: Flags.string({ char: 'z', summary: prodlyMessages.getMessage('notesFlagDescription') }),
plan: Flags.string({ char: 'p', summary: prodlyMessages.getMessage('deploymentPlanFlagDescription') }),
Expand All @@ -33,6 +41,7 @@ export default class ProdlyCheckin extends SfCommand<JSONObject> {
const { flags } = await this.parse(ProdlyCheckin);

const {
'metadata-quick-select-components': metadataQuickSelectComponentsFlag,
branch: branchFlag,
comment: commentFlag,
dataset: datasetFlag,
Expand All @@ -50,13 +59,16 @@ export default class ProdlyCheckin extends SfCommand<JSONObject> {
this.log('Data set flag: ' + datasetFlag);
this.log('Deployment plan flag: ' + planFlag);
this.log('Query filter flag: ' + queryFilterFlag);
this.log('Metadata quick select components flag: ' + metadataQuickSelectComponentsFlag);

if (!datasetFlag && !planFlag) {
const hasMetadataQuickSelectComponents = metadataQuickSelectComponentsFlag !== undefined;

if (!hasMetadataQuickSelectComponents && !datasetFlag && !planFlag) {
throw new SfError(prodlyMessages.getMessage('errorNoDatasetAndPlanFlags', []));
}

if (!datasetFlag && queryFilterFlag) {
throw new SfError(prodlyMessages.getMessage('errorQueryFilterFlag', []));
if (datasetFlag && planFlag) {
throw new SfError(prodlyMessages.getMessage('errorDatasetAndPlanFlags', []));
}

const org = flags['target-org'];
Expand Down Expand Up @@ -90,6 +102,24 @@ export default class ProdlyCheckin extends SfCommand<JSONObject> {
this.log(`Data set ID: ${dataSetId ?? ''}`);
this.log(`Deployment plan ID: ${deploymentPlanId ?? ''}`);

// Parse metadata quick select components if provided
let quickDeploymentComponents;
if (metadataQuickSelectComponentsFlag) {
try {
quickDeploymentComponents = JSON.parse(metadataQuickSelectComponentsFlag) as Array<{
type: string;
ids: string[];
}>;
this.log(`Parsed metadata quick select components: ${JSON.stringify(quickDeploymentComponents)}`);
} catch (error) {
throw new SfError(
`Invalid JSON format for metadata-quick-select-components flag: ${
error instanceof Error ? error.message : String(error)
}`
);
}
}

// Check if instance is provided
if (instanceFlag) {
// Use provided managed instance
Expand Down Expand Up @@ -128,6 +158,7 @@ export default class ProdlyCheckin extends SfCommand<JSONObject> {
filter: queryFilterFlag,
hubConn,
mangedInstanceId,
quickDeploymentComponents,
});

this.log(`Checkin launched with Job ID: ${jobId}`);
Expand All @@ -144,6 +175,7 @@ export default class ProdlyCheckin extends SfCommand<JSONObject> {
filter,
hubConn,
mangedInstanceId,
quickDeploymentComponents,
}: CheckinOptions): Promise<string> {
this.log(`Performing checkin for managed instance with id ${mangedInstanceId}.`);

Expand All @@ -155,6 +187,7 @@ export default class ProdlyCheckin extends SfCommand<JSONObject> {
datasetId: dataSetId,
deploymentNotes,
deploymentPlanId,
metadata: quickDeploymentComponents ? { quickDeploymentComponents } : {},
options: { commitMessage: comment },
queryFilter: constructQueryFilter(filter),
};
Expand Down
Loading