@salesforce/plugin-limits 1.2.3 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,62 +2,79 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.0.1](https://github.com/salesforcecli/plugin-limits/compare/v2.0.0...v2.0.1) (2022-05-20)
6
+
7
+ ### Bug Fixes
8
+
9
+ - add prompt to examples ([e7c575f](https://github.com/salesforcecli/plugin-limits/commit/e7c575f6ba3504032a82ae60a978987522d7c10f))
10
+ - add prompt to examples ([b58d728](https://github.com/salesforcecli/plugin-limits/commit/b58d72884976e734a22d4bf00f7f71438cbd9671))
11
+
12
+ ## [2.0.0](https://github.com/salesforcecli/plugin-limits/compare/v1.3.0...v2.0.0) (2022-04-01)
13
+
14
+ ### Features
15
+
16
+ - display all record counts ([2e905ce](https://github.com/salesforcecli/plugin-limits/commit/2e905ceaef69865680b1cdfb5a9cd0468302f753))
17
+
18
+ ### Bug Fixes
19
+
20
+ - parking orbit plugin-limits ([e870115](https://github.com/salesforcecli/plugin-limits/commit/e870115b61bb8d6201787bf2d74e2ae3de5b13e2))
21
+ - parking orbit plugin-limits ([ce77180](https://github.com/salesforcecli/plugin-limits/commit/ce77180d05176f6f1016762a06356210d6bf46d3))
22
+
23
+ ## [1.3.0](https://github.com/salesforcecli/plugin-limits/compare/v1.2.3...v1.3.0) (2021-12-02)
24
+
25
+ ### Features
26
+
27
+ - bump deps ([1df1fef](https://github.com/salesforcecli/plugin-limits/commit/1df1fef17d0fc6655fa1db79f525948e893d557c))
28
+
5
29
  ### [1.2.3](https://github.com/salesforcecli/plugin-limits/compare/v1.2.2...v1.2.3) (2021-11-02)
6
30
 
7
31
  ### [1.2.2](https://github.com/salesforcecli/plugin-limits/compare/v1.2.1...v1.2.2) (2021-10-05)
8
32
 
9
-
10
33
  ### Bug Fixes
11
34
 
12
- * update deps ([2f291d9](https://github.com/salesforcecli/plugin-limits/commit/2f291d9b20ae5d37bac285fb3964d97219d52526))
35
+ - update deps ([2f291d9](https://github.com/salesforcecli/plugin-limits/commit/2f291d9b20ae5d37bac285fb3964d97219d52526))
13
36
 
14
37
  ### [1.2.1](https://github.com/salesforcecli/plugin-limits/compare/v1.2.0...v1.2.1) (2021-05-10)
15
38
 
16
39
  ## [1.2.0](https://github.com/salesforcecli/plugin-limits/compare/v1.1.0...v1.2.0) (2021-04-29)
17
40
 
18
-
19
41
  ### Features
20
42
 
21
- * add recordcounts command ([7628eaa](https://github.com/salesforcecli/plugin-limits/commit/7628eaab70a6b1fc9b015f22b4040de198d53745))
22
-
43
+ - add recordcounts command ([7628eaa](https://github.com/salesforcecli/plugin-limits/commit/7628eaab70a6b1fc9b015f22b4040de198d53745))
23
44
 
24
45
  ### Bug Fixes
25
46
 
26
- * add 0 count response output ([14ede94](https://github.com/salesforcecli/plugin-limits/commit/14ede94c39dfc7cca008a22b2bd2fcecee3e0c5c))
27
- * arg in test ([b56ad46](https://github.com/salesforcecli/plugin-limits/commit/b56ad4687d59dc4272b4a6c770d4f81b059ace74))
28
- * update message ([3e5c28f](https://github.com/salesforcecli/plugin-limits/commit/3e5c28f118caceaff6acaace3e0ed5f94cf1bca9))
47
+ - add 0 count response output ([14ede94](https://github.com/salesforcecli/plugin-limits/commit/14ede94c39dfc7cca008a22b2bd2fcecee3e0c5c))
48
+ - arg in test ([b56ad46](https://github.com/salesforcecli/plugin-limits/commit/b56ad4687d59dc4272b4a6c770d4f81b059ace74))
49
+ - update message ([3e5c28f](https://github.com/salesforcecli/plugin-limits/commit/3e5c28f118caceaff6acaace3e0ed5f94cf1bca9))
29
50
 
30
51
  ## [1.1.0](https://github.com/salesforcecli/plugin-limits/compare/v1.0.6...v1.1.0) (2021-04-26)
31
52
 
32
-
33
53
  ### Features
34
54
 
35
- * add nut test ([#77](https://github.com/salesforcecli/plugin-limits/issues/77)) ([fa87c17](https://github.com/salesforcecli/plugin-limits/commit/fa87c172384d09e5a1c677743b20d9c2096fa445))
55
+ - add nut test ([#77](https://github.com/salesforcecli/plugin-limits/issues/77)) ([fa87c17](https://github.com/salesforcecli/plugin-limits/commit/fa87c172384d09e5a1c677743b20d9c2096fa445))
36
56
 
37
57
  ### [1.0.6](https://github.com/salesforcecli/plugin-limits/compare/v1.0.5...v1.0.6) (2021-04-13)
38
58
 
39
-
40
59
  ### Bug Fixes
41
60
 
42
- * update help for force:limit:api:display ([86f3f51](https://github.com/salesforcecli/plugin-limits/commit/86f3f519e91fff81e5a1478a0c963e8ce011ce0d))
61
+ - update help for force:limit:api:display ([86f3f51](https://github.com/salesforcecli/plugin-limits/commit/86f3f519e91fff81e5a1478a0c963e8ce011ce0d))
43
62
 
44
63
  ### [1.0.5](https://github.com/salesforcecli/plugin-limits/compare/v1.0.4...v1.0.5) (2021-04-01)
45
64
 
46
-
47
65
  ### Bug Fixes
48
66
 
49
- * jobs names [skip-validate-pr] ([4103421](https://github.com/salesforcecli/plugin-limits/commit/4103421091618625c08cec33a98682194d43e589))
50
- * leif .yml merge [skip-validate-pr] ([bdbf265](https://github.com/salesforcecli/plugin-limits/commit/bdbf2658b369ad3053cca3ed50cc3c0cafffcbb1))
51
- * leif .yml merge [skip-validate-pr] ([42dc4b1](https://github.com/salesforcecli/plugin-limits/commit/42dc4b1ae9308f54efcbe24fab564b135a287e24))
67
+ - jobs names [skip-validate-pr] ([4103421](https://github.com/salesforcecli/plugin-limits/commit/4103421091618625c08cec33a98682194d43e589))
68
+ - leif .yml merge [skip-validate-pr] ([bdbf265](https://github.com/salesforcecli/plugin-limits/commit/bdbf2658b369ad3053cca3ed50cc3c0cafffcbb1))
69
+ - leif .yml merge [skip-validate-pr] ([42dc4b1](https://github.com/salesforcecli/plugin-limits/commit/42dc4b1ae9308f54efcbe24fab564b135a287e24))
52
70
 
53
71
  ### [1.0.4](https://github.com/salesforcecli/plugin-limits/compare/v1.0.3...v1.0.4) (2021-02-19)
54
72
 
55
73
  ### [1.0.3](https://github.com/salesforcecli/plugin-limits/compare/v1.0.2...v1.0.3) (2021-01-21)
56
74
 
57
-
58
75
  ### Bug Fixes
59
76
 
60
- * add force topic ([970113e](https://github.com/salesforcecli/plugin-limits/commit/970113e53651ee63481ce9060e15e36352bbe493))
77
+ - add force topic ([970113e](https://github.com/salesforcecli/plugin-limits/commit/970113e53651ee63481ce9060e15e36352bbe493))
61
78
 
62
79
  ### [1.0.2](https://github.com/salesforcecli/plugin-limits/compare/v1.0.1...v1.0.2) (2020-12-16)
63
80
 
@@ -65,8 +82,7 @@ All notable changes to this project will be documented in this file. See [standa
65
82
 
66
83
  ## 1.0.0 (2020-11-16)
67
84
 
68
-
69
85
  ### Bug Fixes
70
86
 
71
- * add command, test, config/readme housekeeping ([8273060](https://github.com/salesforcecli/plugin-limits/commit/82730609c6eb3c6c294fc3b16096a7ebc354b2f4))
72
- * bumped release-orb to 4 ([bcdc288](https://github.com/salesforcecli/plugin-limits/commit/bcdc288aa6b41f0ca3c93dc00fa5270390248069))
87
+ - add command, test, config/readme housekeeping ([8273060](https://github.com/salesforcecli/plugin-limits/commit/82730609c6eb3c6c294fc3b16096a7ebc354b2f4))
88
+ - bumped release-orb to 4 ([bcdc288](https://github.com/salesforcecli/plugin-limits/commit/bcdc288aa6b41f0ca3c93dc00fa5270390248069))
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2018, Salesforce.com, Inc.
1
+ Copyright (c) 2022, Salesforce.com, Inc.
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
package/README.md CHANGED
@@ -67,20 +67,19 @@ sfdx plugins
67
67
  ```
68
68
 
69
69
  ## Commands
70
+
70
71
  <!-- commands -->
71
- * [`sfdx force:limits:api:display [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcelimitsapidisplay--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
72
- * [`sfdx force:limits:recordcounts:display -s <array> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcelimitsrecordcountsdisplay--s-array--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
72
+
73
+ - [`sfdx force:limits:api:display [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcelimitsapidisplay--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
74
+ - [`sfdx force:limits:recordcounts:display [-s <array>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcelimitsrecordcountsdisplay--s-array--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
73
75
 
74
76
  ## `sfdx force:limits:api:display [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
75
77
 
76
78
  display current org’s limits
77
79
 
78
80
  ```
79
- display current org’s limits
80
- When you execute this command in a project, it provides limit information for your default scratch org.
81
-
82
81
  USAGE
83
- $ sfdx force:limits:api:display [-u <string>] [--apiversion <string>] [--json] [--loglevel
82
+ $ sfdx force:limits:api:display [-u <string>] [--apiversion <string>] [--json] [--loglevel
84
83
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
85
84
 
86
85
  OPTIONS
@@ -99,29 +98,25 @@ DESCRIPTION
99
98
  When you execute this command in a project, it provides limit information for your default scratch org.
100
99
 
101
100
  EXAMPLES
102
- sfdx force:limits:api:display
103
- sfdx force:limits:api:display -u me@my.org
101
+ $ sfdx force:limits:api:display
102
+ $ sfdx force:limits:api:display -u me@my.org
104
103
  ```
105
104
 
106
- _See code: [src/commands/force/limits/api/display.ts](https://github.com/salesforcecli/plugin-limits/blob/v1.2.2/src/commands/force/limits/api/display.ts)_
105
+ _See code: [src/commands/force/limits/api/display.ts](https://github.com/salesforcecli/plugin-limits/blob/v2.0.0/src/commands/force/limits/api/display.ts)_
107
106
 
108
- ## `sfdx force:limits:recordcounts:display -s <array> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
107
+ ## `sfdx force:limits:recordcounts:display [-s <array>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
109
108
 
110
109
  display record counts for the specified standard and custom objects
111
110
 
112
111
  ```
113
- display record counts for the specified standard and custom objects
114
- Use this command to get an approximate count of the records in standard or custom objects in your org. These record counts are the same as the counts listed in the Storage Usage page in Setup. The record counts are approximate because they're calculated asynchronously and your org’s storage usage isn’t updated immediately.
115
-
116
112
  USAGE
117
- $ sfdx force:limits:recordcounts:display -s <array> [-u <string>] [--apiversion <string>] [--json] [--loglevel
113
+ $ sfdx force:limits:recordcounts:display [-s <array>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
118
114
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
119
115
 
120
116
  OPTIONS
121
- -s, --sobjecttype=sobjecttype (required) comma-separated list of
122
- API names of standard or custom
123
- objects for which to display record
124
- counts
117
+ -s, --sobjecttype=sobjecttype comma-separated list of API names of
118
+ standard or custom objects for which
119
+ to display record counts
125
120
 
126
121
  -u, --targetusername=targetusername username or alias for the target
127
122
  org; overrides default target org
@@ -135,14 +130,17 @@ OPTIONS
135
130
  this command invocation
136
131
 
137
132
  DESCRIPTION
138
- Use this command to get an approximate count of the records in standard or custom objects in your org. These record
139
- counts are the same as the counts listed in the Storage Usage page in Setup. The record counts are approximate because
140
- they're calculated asynchronously and your orgs storage usage isnt updated immediately.
133
+ Use this command to get an approximate count of the records in standard or custom objects in your org. These record
134
+ counts are the same as the counts listed in the Storage Usage page in Setup. The record counts are approximate because
135
+ they're calculated asynchronously and your org's storage usage isn't updated immediately. To display all available
136
+ record counts, run the command without the '--sobjecttype' parameter.
141
137
 
142
138
  EXAMPLES
143
- sfdx force:limits:recordcounts:display -s Account,Contact,Lead,Opportunity
144
- sfdx force:limits:recordcounts:display -s Account,Contact -u me@my.org
139
+ $ sfdx force:limits:recordcounts:display
140
+ $ sfdx force:limits:recordcounts:display -s Account,Contact,Lead,Opportunity
141
+ $ sfdx force:limits:recordcounts:display -s Account,Contact -u me@my.org
145
142
  ```
146
143
 
147
- _See code: [src/commands/force/limits/recordcounts/display.ts](https://github.com/salesforcecli/plugin-limits/blob/v1.2.2/src/commands/force/limits/recordcounts/display.ts)_
144
+ _See code: [src/commands/force/limits/recordcounts/display.ts](https://github.com/salesforcecli/plugin-limits/blob/v2.0.0/src/commands/force/limits/recordcounts/display.ts)_
145
+
148
146
  <!-- commandsstop -->
@@ -26,17 +26,11 @@ class LimitsApiDisplayCommand extends command_1.SfdxCommand {
26
26
  remaining: result[limitName].Remaining,
27
27
  });
28
28
  });
29
- this.ux.table(limits, {
30
- columns: [
31
- { key: 'name', label: 'Name' },
32
- { key: 'remaining', label: 'Remaining' },
33
- { key: 'max', label: 'Max' },
34
- ],
35
- });
29
+ this.ux.table(limits, { name: { header: 'Name' }, remaining: { header: 'Remaining' }, max: { header: 'Max' } });
36
30
  return limits;
37
31
  }
38
32
  catch (err) {
39
- throw core_1.SfdxError.wrap(err);
33
+ throw core_1.SfError.wrap(err);
40
34
  }
41
35
  }
42
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../../src/commands/force/limits/api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,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YAEhH,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,cAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzB;IACH,CAAC;;AA1BH,0DA2BC;AA1BwB,mCAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,gCAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACzD,wCAAgB,GAAG,IAAI,CAAC"}
@@ -15,20 +15,23 @@ const messages = core_1.Messages.loadMessages('@salesforce/plugin-limits', 'reco
15
15
  class LimitsRecordCountsDisplayCommand extends command_1.SfdxCommand {
16
16
  async run() {
17
17
  try {
18
- const sobjecttypeString = this.flags.sobjecttype.join();
18
+ const sobjectsPassed = this.flags.sobjecttype;
19
+ const sobjectsQuery = sobjectsPassed ? `=${sobjectsPassed.join()}` : '';
19
20
  const conn = this.org.getConnection();
20
- const geturl = `${conn.baseUrl()}/limits/recordCount?sObjects=${sobjecttypeString}`;
21
- const result = (await conn.request(geturl));
21
+ const geturl = `${conn.baseUrl()}/limits/recordCount?sObjects${sobjectsQuery}`;
22
+ const result = await conn.request(geturl);
22
23
  // if an object is requested, but there's 0 of them on the server, append that object to the result
23
- sobjecttypeString.split(',').forEach((name) => {
24
- if (!result.sObjects.find((record) => record.name === name)) {
25
- result.sObjects.push({ name, count: 0 });
26
- }
27
- });
24
+ if (sobjectsPassed) {
25
+ sobjectsPassed.forEach((name) => {
26
+ if (!result.sObjects.find((record) => record.name === name)) {
27
+ result.sObjects.push({ name, count: 0 });
28
+ }
29
+ });
30
+ }
28
31
  return result.sObjects;
29
32
  }
30
33
  catch (err) {
31
- throw core_1.SfdxError.wrap(err);
34
+ throw core_1.SfError.wrap(err);
32
35
  }
33
36
  }
34
37
  }
@@ -38,10 +41,8 @@ LimitsRecordCountsDisplayCommand.examples = messages.getMessage('examples').spli
38
41
  LimitsRecordCountsDisplayCommand.requiresUsername = true;
39
42
  LimitsRecordCountsDisplayCommand.result = {
40
43
  tableColumnData: {
41
- columns: [
42
- { key: 'name', label: 'sObject' },
43
- { key: 'count', label: 'Record Count' },
44
- ],
44
+ name: { header: 'sObject' },
45
+ count: { header: 'Record Count' },
45
46
  },
46
47
  display() {
47
48
  if (Array.isArray(this.data) && this.data.length) {
@@ -52,7 +53,6 @@ LimitsRecordCountsDisplayCommand.result = {
52
53
  LimitsRecordCountsDisplayCommand.flagsConfig = {
53
54
  sobjecttype: command_1.flags.array({
54
55
  char: 's',
55
- required: true,
56
56
  description: messages.getMessage('sobjecttypeFlagDescription'),
57
57
  }),
58
58
  };
@@ -1 +1 @@
1
- {"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../../src/commands/force/limits/recordcounts/display.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,iDAAkF;AAClF,2CAAuD;AAEvD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,2BAA2B,EAAE,cAAc,CAAC,CAAC;AAWpF,MAAa,gCAAiC,SAAQ,qBAAW;IA0BxD,KAAK,CAAC,GAAG;QACd,IAAI;YACF,MAAM,iBAAiB,GAAI,IAAI,CAAC,KAAK,CAAC,WAAwB,CAAC,IAAI,EAAE,CAAC;YACtE,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YACtC,MAAM,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,gCAAgC,iBAAiB,EAAE,CAAC;YACpF,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC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ACJ;YAED,OAAO,MAAM,CAAC,QAAQ,CAAC;SACxB;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,cAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACzB;IACH,CAAC;;AA7CH,4EA8CC;AA7CwB,4CAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AACxD,yCAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACzD,iDAAgB,GAAG,IAAI,CAAC;AACxB,uCAAM,GAAe;IAC1C,eAAe,EAAE;QACf,IAAI,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;QAC3B,KAAK,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;KAClC;IACD,OAAO;QACL,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YAChD,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;SAChD;IACH,CAAC;CACF,CAAC;AAEwB,4CAAW,GAAgB;IACnD,WAAW,EAAE,eAAK,CAAC,KAAK,CAAC;QACvB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC;KAC/D,CAAC;CACH,CAAC"}
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "description": "display current org’s limits\nWhen you execute this command in a project, it provides limit information for your default scratch org.",
3
- "examples": ["sfdx force:limits:api:display", "sfdx force:limits:api:display -u me@my.org"]
3
+ "examples": ["$ sfdx force:limits:api:display", "$ sfdx force:limits:api:display -u me@my.org"]
4
4
  }
@@ -1,8 +1,9 @@
1
1
  {
2
- "commandDescription": "display record counts for the specified standard and custom objects\nUse this command to get an approximate count of the records in standard or custom objects in your org. These record counts are the same as the counts listed in the Storage Usage page in Setup. The record counts are approximate because they're calculated asynchronously and your orgs storage usage isnt updated immediately.",
2
+ "commandDescription": "display record counts for the specified standard and custom objects\nUse this command to get an approximate count of the records in standard or custom objects in your org. These record counts are the same as the counts listed in the Storage Usage page in Setup. The record counts are approximate because they're calculated asynchronously and your org's storage usage isn't updated immediately. To display all available record counts, run the command without the '--sobjecttype' parameter.",
3
3
  "examples": [
4
- "sfdx force:limits:recordcounts:display -s Account,Contact,Lead,Opportunity",
5
- "sfdx force:limits:recordcounts:display -s Account,Contact -u me@my.org"
4
+ "$ sfdx force:limits:recordcounts:display",
5
+ "$ sfdx force:limits:recordcounts:display -s Account,Contact,Lead,Opportunity",
6
+ "$ sfdx force:limits:recordcounts:display -s Account,Contact -u me@my.org"
6
7
  ],
7
8
  "sobjecttypeFlagDescription": "comma-separated list of API names of standard or custom objects for which to display record counts"
8
9
  }
@@ -1 +1 @@
1
- {"version":"1.2.3","commands":{"force:limits:api:display":{"id":"force:limits:api:display","description":"display current org’s limits\nWhen you execute this command in a project, it provides limit information for your default scratch org.","usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-limits","pluginType":"core","aliases":[],"examples":["sfdx force:limits:api:display","sfdx force:limits:api:display -u me@my.org"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"}},"args":[]},"force:limits:recordcounts:display":{"id":"force:limits:recordcounts:display","description":"display record counts for the specified standard and custom objects\nUse this command to get an approximate count of the records in standard or custom objects in your org. These record counts are the same as the counts listed in the Storage Usage page in Setup. The record counts are approximate because they're calculated asynchronously and your orgs storage usage isnt updated immediately.","usage":"<%= command.id %> -s <array> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-limits","pluginType":"core","aliases":[],"examples":["sfdx force:limits:recordcounts:display -s Account,Contact,Lead,Opportunity","sfdx force:limits:recordcounts:display -s Account,Contact -u me@my.org"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"sobjecttype":{"name":"sobjecttype","type":"option","char":"s","description":"comma-separated list of API names of standard or custom objects for which to display record counts","required":true}},"args":[]}}}
1
+ {"version":"2.0.1","commands":{"force:limits:api:display":{"id":"force:limits:api:display","description":"display current org’s limits\nWhen you execute this command in a project, it provides limit information for your default scratch org.","usage":"<%= command.id %> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-limits","pluginType":"core","aliases":[],"examples":["$ sfdx force:limits:api:display","$ sfdx force:limits:api:display -u me@my.org"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"}},"args":[]},"force:limits:recordcounts:display":{"id":"force:limits:recordcounts:display","description":"display record counts for the specified standard and custom objects\nUse this command to get an approximate count of the records in standard or custom objects in your org. These record counts are the same as the counts listed in the Storage Usage page in Setup. The record counts are approximate because they're calculated asynchronously and your org's storage usage isn't updated immediately. To display all available record counts, run the command without the '--sobjecttype' parameter.","usage":"<%= command.id %> [-s <array>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-limits","pluginType":"core","aliases":[],"examples":["$ sfdx force:limits:recordcounts:display","$ sfdx force:limits:recordcounts:display -s Account,Contact,Lead,Opportunity","$ sfdx force:limits:recordcounts:display -s Account,Contact -u me@my.org"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"sobjecttype":{"name":"sobjecttype","type":"option","char":"s","description":"comma-separated list of API names of standard or custom objects for which to display record counts"}},"args":[]}}}
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-limits",
3
3
  "description": "commands to display api limits to your org",
4
- "version": "1.2.3",
4
+ "version": "2.0.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
+ "main": "lib/index.js",
7
8
  "dependencies": {
8
- "@oclif/config": "^1",
9
- "@salesforce/command": "^4.1.3",
10
- "@salesforce/core": "^2.28.0",
9
+ "@oclif/core": "^1.6.3",
10
+ "@salesforce/command": "^5.0.4",
11
+ "@salesforce/core": "^3.10.1",
11
12
  "tslib": "^2"
12
13
  },
13
14
  "devDependencies": {
14
15
  "@oclif/dev-cli": "^1",
15
- "@oclif/plugin-command-snapshot": "^2.0.0",
16
+ "@oclif/plugin-command-snapshot": "^3",
16
17
  "@salesforce/cli-plugins-testkit": "^1.4.10",
17
- "@salesforce/dev-config": "^2.1.2",
18
- "@salesforce/dev-scripts": "^0.9.18",
18
+ "@salesforce/dev-config": "^3.0.0",
19
+ "@salesforce/dev-scripts": "^2.0.0",
19
20
  "@salesforce/plugin-command-reference": "^1.3.0",
20
21
  "@salesforce/prettier-config": "^0.0.2",
21
22
  "@salesforce/ts-sinon": "1.3.21",
@@ -29,16 +30,16 @@
29
30
  "eslint-config-salesforce-license": "^0.1.6",
30
31
  "eslint-config-salesforce-typescript": "^0.2.7",
31
32
  "eslint-plugin-header": "^3.0.0",
32
- "eslint-plugin-import": "2.24.2",
33
+ "eslint-plugin-import": "2.26.0",
33
34
  "eslint-plugin-jsdoc": "^35.1.2",
34
35
  "eslint-plugin-prettier": "^3.1.3",
35
- "husky": "^4.3.8",
36
+ "husky": "^7.0.4",
36
37
  "lint-staged": "^11.0.0",
37
- "mocha": "^8.4.0",
38
+ "mocha": "^9.1.3",
38
39
  "nyc": "^15.1.0",
39
40
  "prettier": "^2.4.1",
40
41
  "pretty-quick": "^3.1.0",
41
- "shx": "0.3.3",
42
+ "shx": "0.3.4",
42
43
  "sinon": "10.0.0",
43
44
  "ts-node": "^10.0.0",
44
45
  "typescript": "^4.1.3"
@@ -49,7 +50,7 @@
49
50
  }
50
51
  },
51
52
  "engines": {
52
- "node": ">=12.0.0"
53
+ "node": ">=14.0.0"
53
54
  },
54
55
  "files": [
55
56
  "/lib",
@@ -67,6 +68,9 @@
67
68
  "license": "BSD-3-Clause",
68
69
  "oclif": {
69
70
  "commands": "./lib/commands",
71
+ "additionalHelpFlags": [
72
+ "-h"
73
+ ],
70
74
  "bin": "sfdx",
71
75
  "devPlugins": [
72
76
  "@oclif/plugin-help",
@@ -110,18 +114,11 @@
110
114
  "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
111
115
  "version": "oclif-dev readme"
112
116
  },
113
- "husky": {
114
- "hooks": {
115
- "pre-commit": "sf-husky-pre-commit",
116
- "commit-msg": "sf-husky-commit-msg",
117
- "pre-push": "sf-husky-pre-push"
118
- }
119
- },
120
117
  "publishConfig": {
121
118
  "access": "public"
122
119
  },
123
120
  "sfdx": {
124
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-limits/1.2.3.crt",
125
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-limits/1.2.3.sig"
121
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-limits/2.0.1.crt",
122
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-limits/2.0.1.sig"
126
123
  }
127
124
  }