Skip to content

Commit 21e5846

Browse files
authored
Merge pull request #11 from salesforcecli/jo/inconsisten_examples
fix: consistent help menu verbiage
2 parents 1038291 + 673b1e9 commit 21e5846

File tree

7 files changed

+48
-32
lines changed

7 files changed

+48
-32
lines changed

messages/deploy.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@ Deploys an initialized and packaged Data Cloud code extension to a Salesforce or
1010

1111
- Deploy a %s package to the org with alias "myorg":
1212

13-
<%= config.bin %> data-code-extension %s deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg
13+
<%= config.bin %> data-code-extension %s deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-%s-package --target-org myorg
1414

1515
- Deploy with a specific CPU size:
1616

17-
<%= config.bin %> data-code-extension %s deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg --cpu-size CPU_4XL
17+
<%= config.bin %> data-code-extension %s deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-%s-package --target-org myorg --cpu-size CPU_4XL
1818

1919
# examples.script
2020

2121
- Deploy a script package to the org with alias "myorg":
2222

23-
<%= config.bin %> data-code-extension script deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg
23+
<%= config.bin %> data-code-extension script deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-script-package --target-org myorg
2424

2525
- Deploy with a specific CPU size:
2626

27-
<%= config.bin %> data-code-extension script deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg --cpu-size CPU_4XL
27+
<%= config.bin %> data-code-extension script deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-script-package --target-org myorg --cpu-size CPU_4XL
2828

2929
# examples.function
3030

3131
- Deploy a function package to the org with alias "myorg":
3232

33-
<%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg --function-invoke-opt UnstructuredChunking
33+
<%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-function-package --target-org myorg --function-invoke-opt UnstructuredChunking
3434

3535
- Deploy with a specific CPU size:
3636

37-
<%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./package --target-org myorg --cpu-size CPU_4XL --function-invoke-opt UnstructuredChunking
37+
<%= config.bin %> data-code-extension function deploy --name my-package --package-version 1.0.0 --description "My package" --package-dir ./my-function-package --target-org myorg --cpu-size CPU_4XL --function-invoke-opt UnstructuredChunking
3838

3939
# info.checkingPython
4040

messages/run.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,25 @@ Run a Data Code Extension %s package locally using data from your Salesforce Org
66

77
Executes an initialized Data Cloud custom code package against a Salesforce org. The package must be initialized before running. Supports both script and function packages with optional config file and dependencies overrides.
88

9-
# examples
9+
# examples.script
1010

11-
- Run a %s package against the org with alias "myorg":
11+
- Run a script package against the org with alias "myorg":
1212

13-
<%= config.bin %> data-code-extension %s run --entrypoint ./my-package/entrypoint.py --target-org myorg
13+
<%= config.bin %> data-code-extension script run --entrypoint ./my-script-package/entrypoint.py --target-org myorg
1414

1515
- Run with a custom config file:
1616

17-
<%= config.bin %> data-code-extension %s run --entrypoint ./my-package/entrypoint.py --target-org myorg --config-file ./payload/config.json
17+
<%= config.bin %> data-code-extension script run --entrypoint ./my-script-package/entrypoint.py --target-org myorg --config-file ./my-script-package/payload/config.json
18+
19+
# examples.function
20+
21+
- Run a function package against the org with alias "myorg":
22+
23+
<%= config.bin %> data-code-extension function run --entrypoint ./my-function-package/entrypoint.py --target-org myorg
24+
25+
- Run with a custom config file:
26+
27+
<%= config.bin %> data-code-extension function run --entrypoint ./my-function-package/entrypoint.py --target-org myorg --config-file ./my-function-package/payload/config.json
1828

1929
# info.checkingPython
2030

messages/scan.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,41 @@ Scan the Data Code Extension %s package for permissions and dependencies.
66

77
Scans Python files in an initialized Data Code Extension package directory to identify required permissions and dependencies. Updates the config.json and requirements.txt files based on the code analysis.
88

9-
# examples
9+
# examples.script
1010

11-
- Scan a %s package in the current directory:
11+
- Scan a script package in the current directory:
1212

13-
<%= config.bin %> data-code-extension %s scan
13+
<%= config.bin %> data-code-extension script scan
1414

1515
- Scan with a custom entrypoint file:
1616

17-
<%= config.bin %> data-code-extension %s scan --entrypoint payload/entrypoint.py
17+
<%= config.bin %> data-code-extension script scan --entrypoint ./payload/entrypoint.py
1818

1919
- Perform a dry run to see what would be changed:
2020

21-
<%= config.bin %> data-code-extension %s scan --dry-run
21+
<%= config.bin %> data-code-extension script scan --dry-run
2222

2323
- Scan without updating the requirements.txt file:
2424

25-
<%= config.bin %> data-code-extension %s scan --no-requirements
25+
<%= config.bin %> data-code-extension script scan --no-requirements
26+
27+
# examples.function
28+
29+
- Scan a function package in the current directory:
30+
31+
<%= config.bin %> data-code-extension function scan
32+
33+
- Scan with a custom entrypoint file:
34+
35+
<%= config.bin %> data-code-extension function scan --entrypoint ./payload/entrypoint.py
36+
37+
- Perform a dry run to see what would be changed:
38+
39+
<%= config.bin %> data-code-extension function scan --dry-run
40+
41+
- Scan without updating the requirements.txt file:
42+
43+
<%= config.bin %> data-code-extension function scan --no-requirements
2644

2745
# info.checkingPython
2846

src/commands/data-code-extension/function/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class Run extends RunBase {
2424
public static readonly state = 'beta';
2525
public static readonly summary = messages.getMessage('summary', ['function']);
2626
public static readonly description = messages.getMessage('description');
27-
public static readonly examples = messages.getMessages('examples', ['function', 'function', 'function']);
27+
public static readonly examples = messages.getMessages('examples.function');
2828

2929
public static readonly flags = {
3030
entrypoint: Flags.file({

src/commands/data-code-extension/function/scan.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ export default class Scan extends ScanBase {
2424
public static readonly state = 'beta';
2525
public static readonly summary = messages.getMessage('summary', ['function']);
2626
public static readonly description = messages.getMessage('description');
27-
public static readonly examples = messages.getMessages('examples', [
28-
'function',
29-
'function',
30-
'function',
31-
'function',
32-
'function',
33-
]);
27+
public static readonly examples = messages.getMessages('examples.function');
3428

3529
public static readonly flags = {
3630
entrypoint: Flags.string({

src/commands/data-code-extension/script/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class Run extends RunBase {
2424
public static readonly state = 'beta';
2525
public static readonly summary = messages.getMessage('summary', ['script']);
2626
public static readonly description = messages.getMessage('description');
27-
public static readonly examples = messages.getMessages('examples', ['script', 'script', 'script']);
27+
public static readonly examples = messages.getMessages('examples.script');
2828

2929
public static readonly flags = {
3030
entrypoint: Flags.file({

src/commands/data-code-extension/script/scan.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ export default class Scan extends ScanBase {
2424
public static readonly state = 'beta';
2525
public static readonly summary = messages.getMessage('summary', ['script']);
2626
public static readonly description = messages.getMessage('description');
27-
public static readonly examples = messages.getMessages('examples', [
28-
'script',
29-
'script',
30-
'script',
31-
'script',
32-
'script',
33-
]);
27+
public static readonly examples = messages.getMessages('examples.script');
3428

3529
public static readonly flags = {
3630
entrypoint: Flags.string({

0 commit comments

Comments
 (0)