From 2a0ca0acc1744b2b090d5c7b3d3a196d127061c9 Mon Sep 17 00:00:00 2001 From: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Date: Tue, 14 Sep 2021 15:59:06 -0700 Subject: [PATCH 1/6] fix: update template files for sf --- templates/base_ditamap.hbs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/templates/base_ditamap.hbs b/templates/base_ditamap.hbs index b619e93b..c0a38989 100644 --- a/templates/base_ditamap.hbs +++ b/templates/base_ditamap.hbs @@ -19,9 +19,5 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D {{#if []}}{{/if}} {{/each}} - - From ac76b57925540d0558a2041d32cd785c80552510 Mon Sep 17 00:00:00 2001 From: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:03:37 -0700 Subject: [PATCH 2/6] update help file for "sf" --- templates/cli_reference_help.hbs | 89 ++++++++++++++------------------ 1 file changed, 38 insertions(+), 51 deletions(-) diff --git a/templates/cli_reference_help.hbs b/templates/cli_reference_help.hbs index 47b37d05..0f89e53f 100644 --- a/templates/cli_reference_help.hbs +++ b/templates/cli_reference_help.hbs @@ -9,10 +9,10 @@ THIS FILE IS AUTOGENERATED. DON’T MAKE CHANGES TO THIS FILE IN PERFORCE! YOUR IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR DETAILS. --> - Help for Salesforce CLI Commands - The -h | --help parameter shows details about Salesforce CLI topics and their - commands. +Help for <codeph otherprops="nolang">sf</codeph> Commands + The -h and --help flags show details about sf topics and + their commands. @@ -23,56 +23,43 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D -

For namespaces, the -h | --help parameter lists all topics in the namespace. For example, to see names and - descriptions of all topics in the force namespace, run - sfdx force -h.

-

For topics, the -h | --help parameter lists the commands and their descriptions. For example, to see - all commands in the org topic, run sfdx force:org -h.

-

For commands, adding the -h | --help parameter shows parameters and usage information. For example, to see help for - the org:create command, run sfdx - force:org:create -h.

-

Help for commands has four parts.

    +

    The short -h flag shows a subset of the command-line + help and is meant for quick reference. The long --help + flag shows the complete command-line help.

    +

    The short help (-h) for commands has these parts.

    1. Short Description of Command

      At the top of the --help output (with no heading), a short description of the command is - shown. For longer descriptions, see the Salesforce CLI Command - Reference.

    2. + >-h output (with no heading), a short description of the command is shown. +

    3. Usage

      The command signature on the Usage line uses the docopt format.

        -
      • All available parameters are listed. Parameters that have short names are listed - using their short names.
      • -
      • Parameters that take a value show the value’s type (for example, <string>) in angle brackets immediately after the - parameter’s name.
      • -
      • Optional parameters are in square brackets ([ … - ]).
      • -
      • Required parameters have no annotation.
      • -
      • For parameters that accept a limited set of values, the values are shown after the - parameter name, separated by pipes (--parametername +
      • All available flags are listed. Flags that have short names are listed using their + short names.
      • +
      • Flags that take a value show <value> + immediately after the flag’s name.
      • +
      • Optional flags are in square brackets ([ … + ]).
      • +
      • Required flags have no annotation.
      • +
      • For flags that accept a limited set of values, the values are shown after the flag + name, separated by pipes (--flagname value1|value2|value3).
      • -
      • Mutually exclusive options are shown in parentheses, separated by a pipe (( … | … )).
      • -

      If the command takes varargs (name-value pairs that aren’t parameters), the - usage signature includes name=value....

      To see all Salesforce CLI commands, run sfdx - commands.
    4. -
    5. Options

      The Options section lists all the command’s parameters, including their - short name, long name, and purpose. For parameters that accept a value, the value name - is written after an equals sign (=). The equals - sign is optional when you run the command—for example, you could run sfdx force:org:create - -f=config/enterprise-scratch-def.json -a TestOrg1 or - sfdx force:org:create -f - config/enterprise-scratch-def.json -a TestOrg1 with the same - results.

      Parameters that accept a limited list of values include the values in - parentheses, with the default value indicated by an asterisk (*).

      For more information about the parameters, see - the Salesforce CLI Command Reference.

    6. -
    7. Description

      Usage notes and examples are below the list of parameters, in the - Description section. This information is also available in the Salesforce CLI - Command Reference.

    8. +

      +
    9. Flags

      The Flags section lists all the command’s flags, including their short + name, long name, and purpose. Flags are grouped for easier reading, such as global flags + and other groups relevant to a specific command.

      For flags that take multiple + values, you have two ways to specify the values:

        +
      • Specify the flag multiple times, where each flag takes a different single + value.
      • +
      • Specify the flag one time, but separate all the values with a space.
      • +

      For example, the following commands are + equivalent:sf deploy metadata --metadata ApexClass --metadata CustomObject --metadata AnotherCustomObject +sf deploy metadata --metadata ApexClass CustomObject AnotherCustomObject

      Flags + that accept a limited list of values include the values in parentheses, with the default + value specified with the default keyword.

    10. +

    +

    The long help (--help) for commands has the same parts + as the preceding short help -h) and these additional parts.

      +
    1. Description

      Usage notes.

    2. +
    3. Examples

      All examples include a brief description.

    4. +
    5. Flag Descriptions

      Some flags have optional additional usage notes.

    From a63a950796e1c65aeeebcfcdc0e2c768d8d1b548 Mon Sep 17 00:00:00 2001 From: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:05:06 -0700 Subject: [PATCH 3/6] update sf page that lists the plugin versions --- templates/cli_reference_xml.hbs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/templates/cli_reference_xml.hbs b/templates/cli_reference_xml.hbs index 5938b952..07265218 100644 --- a/templates/cli_reference_xml.hbs +++ b/templates/cli_reference_xml.hbs @@ -10,9 +10,8 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D --> - Salesforce CLI Command Reference - The command reference contains information about the Salesforce CLI commands and - their parameters. + sf + This section contains information about the sf commands and their parameters. @@ -24,8 +23,8 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
    -

    This version of the command reference includes details about version - {{cliVersion}} of Salesforce CLI and the following plug-in versions:

    +

    This version of the sf command reference includes details about version + {{cliVersion}} of the sf executable of Salesforce CLI and the following plug-in versions:

      {{#each pluginVersions}}
    • {{name}} version {{version}}
    • From fcb3d47ec57868c5e756547df22ab6f8abf8c088 Mon Sep 17 00:00:00 2001 From: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:07:10 -0700 Subject: [PATCH 4/6] tweaks to command topics for "sf" --- templates/command.hbs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/command.hbs b/templates/command.hbs index b49ddebb..0f3f2434 100644 --- a/templates/command.hbs +++ b/templates/command.hbs @@ -39,6 +39,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D format="html" scope="external" type="new-window:HTML">{{trailblazerCommunityName}} group in the Trailblazer Community.
    {{/if}}{{#if isOpenPilotCommand}} + {{/if}}{{#if isOpenPilotCommand}}
    We provide the {{name}} command to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate @@ -58,7 +59,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
    {{/if}} {{#if help}}
    - <ph>Help for <codeph otherprops="nolang">{{name}}</codeph></ph> + <ph>Description for <codeph otherprops="nolang">{{name}}</codeph></ph> {{#each help}} {{#isCodeBlock this}}{{this}}{{else}}

    {{this}}

    {{/isCodeBlock}} {{/each}} @@ -78,7 +79,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
    {{/if}}
    - <ph>Command Syntax</ph> + <ph>Usage</ph>
    {{binary}} {{name}}
    @@ -90,7 +91,7 @@ IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR D
    {{#if parameters}}
    - <ph>Parameters</ph> + <ph>Flags</ph>
    {{#each parameters}} From 533aaea572f884675f672ffc75387d9f51a1c4d9 Mon Sep 17 00:00:00 2001 From: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:08:01 -0700 Subject: [PATCH 5/6] tweaks to topic ditamaps for "sf" --- templates/topic_ditamap.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/topic_ditamap.hbs b/templates/topic_ditamap.hbs index 15e08b5e..0849e1e5 100644 --- a/templates/topic_ditamap.hbs +++ b/templates/topic_ditamap.hbs @@ -8,7 +8,7 @@ THIS FILE IS AUTOGENERATED. DON’T MAKE CHANGES TO THIS FILE IN PERFORCE! YOUR IF YOU WANT TO CHANGE THIS CONTENT, CONTACT juliet.shackell@salesforce.com FOR DETAILS. --> - <codeph otherprops="nolang">{{topic}}</codeph> Namespace + <codeph otherprops="nolang">{{topic}}</codeph> Commands {{#each commands}} From b9b14ea2a8505d153a244ebc0d1e7759e2803a40 Mon Sep 17 00:00:00 2001 From: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com> Date: Wed, 15 Sep 2021 09:03:15 -0700 Subject: [PATCH 6/6] fix: update test with new title in command XML file --- test/unit/endtoend.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/endtoend.test.ts b/test/unit/endtoend.test.ts index 1e272ce4..2482563e 100644 --- a/test/unit/endtoend.test.ts +++ b/test/unit/endtoend.test.ts @@ -46,6 +46,6 @@ describe('plugin-login', () => { }); it('creates parameters', async () => { const dita = loadTestDitamapFile(join('login', 'cli_reference_login_org_jwt_unified.xml')); - expect(/<ph>Parameters<\/ph><\/title>/.test(dita)).to.be.true; + expect(/<title><ph>Flags<\/ph><\/title>/.test(dita)).to.be.true; }); });