Skip to content

Commit

Permalink
feat: bump sf-plugins-core (#493)
Browse files Browse the repository at this point in the history
* feat: bump sf-plugins-core

* chore: format
  • Loading branch information
mdonnalley committed Mar 25, 2024
1 parent fbcc986 commit 44a8ae5
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 94 deletions.
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,16 @@ Audit messages in a plugin's messages directory to locate unused messages and mi

```
USAGE
$ sf dev audit messages [--json] [-p <value>] [-m <value>] [-s <value>]
$ sf dev audit messages [--json] [--flags-dir <value>] [-p <value>] [-m <value>] [-s <value>]
FLAGS
-m, --messages-dir=<value> [default: messages] Directory that contains the plugin's message files.
-p, --project-dir=<value> [default: .] Location of the project where messages are to be audited.
-s, --source-dir=<value> [default: src] Directory that contains the plugin's source code.
GLOBAL FLAGS
--json Format output as json.
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
EXAMPLES
Audit messages using default directories:
Expand Down Expand Up @@ -163,14 +164,15 @@ Convert a .json messages file into Markdown.

```
USAGE
$ sf dev convert messages -f <value> [--json] [-p <value>]
$ sf dev convert messages -f <value> [--json] [--flags-dir <value>] [-p <value>]
FLAGS
-f, --file-name=<value>... (required) Filename to convert.
-p, --project-dir=<value> [default: .] Location of the project whose messages are to be converted.
GLOBAL FLAGS
--json Format output as json.
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Convert a .json messages file into Markdown.
Expand All @@ -197,13 +199,14 @@ Convert a script file that contains deprecated sfdx-style commands to use the ne

```
USAGE
$ sf dev convert script -s <value> [--json]
$ sf dev convert script -s <value> [--json] [--flags-dir <value>]
FLAGS
-s, --script=<value> (required) Filepath to the script you want to convert.
GLOBAL FLAGS
--json Format output as json.
--flags-dir=<value> Import flag values from a directory.
--json Format output as json.
DESCRIPTION
Convert a script file that contains deprecated sfdx-style commands to use the new sf-style commands instead.
Expand Down Expand Up @@ -240,14 +243,17 @@ Generate a new sf command.

```
USAGE
$ sf dev generate command -n <value> [--force] [--nuts] [--unit]
$ sf dev generate command -n <value> [--flags-dir <value>] [--force] [--nuts] [--unit]
FLAGS
-n, --name=<value> (required) Name of the new command. Use colons to separate the topic and command names.
--force Overwrite existing files.
--[no-]nuts Generate a NUT test file for the command.
--[no-]unit Generate a unit test file for the command.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
DESCRIPTION
Generate a new sf command.
Expand Down Expand Up @@ -277,11 +283,14 @@ Generate a flag for an existing command.

```
USAGE
$ sf dev generate flag [-d]
$ sf dev generate flag [--flags-dir <value>] [-d]
FLAGS
-d, --dry-run Print new flag code instead of adding it to the command file.
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
DESCRIPTION
Generate a flag for an existing command.
Expand Down Expand Up @@ -314,7 +323,10 @@ Generate a new sf plugin.

```
USAGE
$ sf dev generate plugin
$ sf dev generate plugin [--flags-dir <value>]
GLOBAL FLAGS
--flags-dir=<value> Import flag values from a directory.
DESCRIPTION
Generate a new sf plugin.
Expand Down
72 changes: 36 additions & 36 deletions command-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
[
{
"command": "dev:audit:messages",
"plugin": "@salesforce/plugin-dev",
"flags": ["json", "messages-dir", "project-dir", "source-dir"],
"alias": [],
"command": "dev:audit:messages",
"flagAliases": ["messagesdir", "projectdir", "sourcedir"],
"flagChars": ["m", "p", "s"],
"flagAliases": ["messagesdir", "projectdir", "sourcedir"]
"flags": ["flags-dir", "json", "messages-dir", "project-dir", "source-dir"],
"plugin": "@salesforce/plugin-dev"
},
{
"command": "dev:configure:repo",
"plugin": "@salesforce/plugin-dev",
"flags": ["bot", "dry-run", "json", "repository"],
"alias": [],
"command": "dev:configure:repo",
"flagAliases": ["dryrun"],
"flagChars": ["b", "d", "r"],
"flagAliases": ["dryrun"]
"flags": ["bot", "dry-run", "flags-dir", "json", "repository"],
"plugin": "@salesforce/plugin-dev"
},
{
"command": "dev:configure:secrets",
"plugin": "@salesforce/plugin-dev",
"flags": ["dry-run", "json", "repository"],
"alias": [],
"command": "dev:configure:secrets",
"flagAliases": ["dryrun"],
"flagChars": ["d", "r"],
"flagAliases": ["dryrun"]
"flags": ["dry-run", "flags-dir", "json", "repository"],
"plugin": "@salesforce/plugin-dev"
},
{
"command": "dev:convert:messages",
"plugin": "@salesforce/plugin-dev",
"flags": ["file-name", "json", "project-dir"],
"alias": [],
"command": "dev:convert:messages",
"flagAliases": ["filename", "projectdir"],
"flagChars": ["f", "p"],
"flagAliases": ["filename", "projectdir"]
"flags": ["file-name", "flags-dir", "json", "project-dir"],
"plugin": "@salesforce/plugin-dev"
},
{
"command": "dev:convert:script",
"plugin": "@salesforce/plugin-dev",
"flags": ["json", "no-prompt", "script"],
"alias": [],
"command": "dev:convert:script",
"flagAliases": [],
"flagChars": ["s"],
"flagAliases": []
"flags": ["flags-dir", "json", "no-prompt", "script"],
"plugin": "@salesforce/plugin-dev"
},
{
"command": "dev:generate:command",
"plugin": "@salesforce/plugin-dev",
"flags": ["force", "name", "nuts", "unit"],
"alias": [],
"command": "dev:generate:command",
"flagAliases": [],
"flagChars": ["n"],
"flagAliases": []
"flags": ["flags-dir", "force", "name", "nuts", "unit"],
"plugin": "@salesforce/plugin-dev"
},
{
"command": "dev:generate:flag",
"plugin": "@salesforce/plugin-dev",
"flags": ["dry-run"],
"alias": [],
"command": "dev:generate:flag",
"flagAliases": ["dryrun"],
"flagChars": ["d"],
"flagAliases": ["dryrun"]
"flags": ["dry-run", "flags-dir"],
"plugin": "@salesforce/plugin-dev"
},
{
"command": "dev:generate:library",
"plugin": "@salesforce/plugin-dev",
"flags": [],
"alias": [],
"command": "dev:generate:library",
"flagAliases": [],
"flagChars": [],
"flagAliases": []
"flags": ["flags-dir"],
"plugin": "@salesforce/plugin-dev"
},
{
"command": "dev:generate:plugin",
"plugin": "@salesforce/plugin-dev",
"flags": [],
"alias": ["plugins:generate"],
"command": "dev:generate:plugin",
"flagAliases": [],
"flagChars": [],
"flagAliases": []
"flags": ["flags-dir"],
"plugin": "@salesforce/plugin-dev"
}
]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@octokit/rest": "^19.0.13",
"@salesforce/core": "^6.5.1",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^7.1.4",
"@salesforce/sf-plugins-core": "^8.0.1",
"@salesforce/ts-types": "^2.0.9",
"change-case": "^5.4.2",
"fast-glob": "^3.3.2",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev/convert/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import path from 'node:path';
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
import { Messages } from '@salesforce/core';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-dev', 'dev.convert.messages');

export type DevConvertMessagesResult = {
Expand Down
3 changes: 1 addition & 2 deletions src/commands/dev/generate/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/


import { Messages } from '@salesforce/core';
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
import { fileExists, generate } from '../../../util.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-dev', 'dev.generate.command');

export default class GenerateCommand extends SfCommand<void> {
Expand Down
3 changes: 1 addition & 2 deletions src/commands/dev/generate/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/


import { Messages } from '@salesforce/core';
import { SfCommand } from '@salesforce/sf-plugins-core';
import { generate } from '../../../util.js';

Messages.importMessagesDirectoryFromMetaUrl(import.meta.url)
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-dev', 'dev.generate.plugin');

export default class GeneratePlugin extends SfCommand<void> {
Expand Down
Loading

0 comments on commit 44a8ae5

Please sign in to comment.