Skip to content

Commit

Permalink
Sm/command-renaming (#673)
Browse files Browse the repository at this point in the history
* feat: finish sf-ification

* chore: github cleanup
  • Loading branch information
mshanemc authored Oct 27, 2023
1 parent e18b42e commit d301718
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .git2gus/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"productTag": "a1aB00000004Bx8IAE",
"defaultBuild": "offcore.tooling.56",
"defaultBuild": "offcore.tooling.59",
"issueTypeLabels": {
"feature": "USER STORY",
"regression": "BUG P1",
Expand Down
39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/Bug_report.md

This file was deleted.

16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/Feature_request.md

This file was deleted.

9 changes: 0 additions & 9 deletions .github/no-response.yml

This file was deleted.

20 changes: 10 additions & 10 deletions command-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[
{
"command": "limits:api:display",
"plugin": "@salesforce/plugin-limits",
"flags": ["api-version", "json", "loglevel", "target-org"],
"alias": ["force:limits:api:display", "org:list:limits"],
"alias": ["force:limits:api:display", "limits:api:display"],
"command": "org:list:limits",
"flagAliases": ["apiversion", "targetusername", "u"],
"flagChars": ["o"],
"flagAliases": ["apiversion", "targetusername", "u"]
"flags": ["api-version", "json", "loglevel", "target-org"],
"plugin": "@salesforce/plugin-limits"
},
{
"command": "limits:recordcounts:display",
"plugin": "@salesforce/plugin-limits",
"flags": ["api-version", "json", "loglevel", "sobject", "target-org"],
"alias": ["force:limits:recordcounts:display", "org:list:sobject:record-counts"],
"alias": ["force:limits:recordcounts:display", "limits:recordcounts:display"],
"command": "org:list:sobject:record-counts",
"flagAliases": ["apiversion", "sobjecttype", "targetusername", "u"],
"flagChars": ["o", "s"],
"flagAliases": ["apiversion", "sobjecttype", "targetusername", "u"]
"flags": ["api-version", "json", "loglevel", "sobject", "target-org"],
"plugin": "@salesforce/plugin-limits"
}
]
4 changes: 0 additions & 4 deletions messages/display.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,3 @@ For each limit, this command returns the maximum allocation and the remaining al
- Display limits in the org with alias "my-scratch-org":

<%= config.bin %> <%= command.id %> --target-org my-scratch-org

# targetOrg

Login username or alias for the target org.
6 changes: 1 addition & 5 deletions messages/recordcounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ Use this command to get an approximate count of the records in standard or custo

<%= config.bin %> <%= command.id %> --sobject Account --sobject Lead --target-org my-scratch-org

# sobjectFlagDescription
# flags.sobject.summary

API name of the standard or custom object for which to display record counts.

# targetOrg

Login username or alias for the target org.
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-sf-plugin": "^1.16.9",
"eslint-plugin-sf-plugin": "^1.16.12",
"husky": "^7.0.4",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
Expand Down Expand Up @@ -78,14 +78,16 @@
"@salesforce/plugin-command-reference"
],
"topics": {
"limits": {
"description": "Display an org’s limits.",
"org": {
"external": true,
"subtopics": {
"api": {
"description": "Display an org’s API limits."
"list": {
"external": true
},
"recordcounts": {
"description": "Display record counts for an org."
"subtopics": {
"sobject": {
"external": true
}
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface Result {
export type ApiLimits = ApiLimit[];

export class LimitsApiDisplayCommand extends SfCommand<ApiLimits> {
public static readonly aliases = ['force:limits:api:display', 'org:list:limits'];
public static readonly aliases = ['force:limits:api:display', 'limits:api:display'];
public static readonly summary = messages.getMessage('summary');
public static readonly description = messages.getMessage('description');
public static readonly examples = messages.getMessages('examples');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ interface Result {
}

export class LimitsRecordCountsDisplayCommand extends SfCommand<RecordCounts> {
public static readonly aliases = ['force:limits:recordcounts:display', 'org:list:sobject:record-counts'];
public static readonly aliases = ['force:limits:recordcounts:display', 'limits:recordcounts:display'];
public static readonly summary = messages.getMessage('summary');
public static readonly description = messages.getMessage('description');
public static readonly examples = messages.getMessages('examples');

public static readonly flags = {
sobject: arrayWithDeprecation({
char: 's',
summary: messages.getMessage('sobjectFlagDescription'),
summary: messages.getMessage('flags.sobject.summary'),
aliases: ['sobjecttype'],
default: [],
}),
Expand Down
2 changes: 1 addition & 1 deletion test/commands/display.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { test } from '@oclif/test';
import { expect } from 'chai';

import { parseJson } from '@salesforce/kit';
import { ApiLimits } from '../../src/commands/limits/api/display.js';
import { ApiLimits } from '../../src/commands/org/list/limits.js';

describe('force:limits:api:display', () => {
const $$ = new TestContext();
Expand Down
2 changes: 1 addition & 1 deletion test/commands/recordcounts.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { expect } from 'chai';
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';
import { Env } from '@salesforce/kit';
import { ensureString, getString } from '@salesforce/ts-types';
import { RecordCount } from '../../src/commands/limits/recordcounts/display.js';
import { RecordCount } from '../../src/commands/org/list/sobject/record-counts.js';

describe('recordcounts:display', () => {
const env = new Env();
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3120,12 +3120,12 @@ eslint-plugin-prefer-arrow@^1.2.1:
resolved "https://registry.yarnpkg.com/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz#e7fbb3fa4cd84ff1015b9c51ad86550e55041041"
integrity sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==

eslint-plugin-sf-plugin@^1.16.9:
version "1.16.9"
resolved "https://registry.yarnpkg.com/eslint-plugin-sf-plugin/-/eslint-plugin-sf-plugin-1.16.9.tgz#0c8bfa7b51b52c716bf8cecbb271237931bffa3b"
integrity sha512-VOAA1OEieGCzimavNvI1OP2AnlR5SZfxi4Q+WDahxJcedh5/SP0DEynW8ww+begy4Nt0APdLzwXN1JJTZQCemA==
eslint-plugin-sf-plugin@^1.16.12:
version "1.16.12"
resolved "https://registry.yarnpkg.com/eslint-plugin-sf-plugin/-/eslint-plugin-sf-plugin-1.16.12.tgz#053e27f75df4e5b2d350c43aca2ddcfee4239109"
integrity sha512-iW7kFN7qEx9iqhRUcWNUqO2jkdRDX8m/wOfLXFkoq9b+6QuOnhmV4sD5G6GUvPrKP9Sv7A/Ke2hQdXT8wxfm8Q==
dependencies:
"@salesforce/core" "^5.3.5"
"@salesforce/core" "^5.3.10"
"@typescript-eslint/utils" "^5.59.11"

eslint-plugin-unicorn@^48.0.1:
Expand Down

0 comments on commit d301718

Please sign in to comment.