Skip to content

Commit 923517d

Browse files
author
kevanmoothien
committed
validation added
1 parent 143e72d commit 923517d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sharinpix/spx-connected-app",
33
"description": "Allow creating connected app from CLI on Salesforce.",
4-
"version": "0.0.6-beta",
4+
"version": "0.0.7-beta",
55
"dependencies": {
66
"@oclif/core": "^2.8.2",
77
"@salesforce/core": "^3.34.8",

src/commands/create.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,22 @@ export default class ConnectedAppCreate extends SfCommand<CreateResult> {
9797
const consumerSecret = flags.consumersecret;
9898
const namespace = flags.namespace;
9999

100-
let metadata: object = {
100+
let metadata: Record<string, unknown> = {
101101
contactEmail,
102102
description,
103103
fullName,
104104
label,
105105
oauthConfig: { callbackUrl, consumerSecret, scopes },
106-
canvasConfig: {
106+
};
107+
108+
if (canvasUrl) {
109+
metadata.canvasConfig = {
107110
canvasUrl,
108111
accessMethod,
109112
locations: locations?.split(','),
110113
options: options?.split(',')
111114
}
112-
};
115+
}
113116

114117
metadata = getValuable(metadata);
115118

0 commit comments

Comments
 (0)