@salesforce/plugin-limits 2.3.41 → 3.0.2
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/README.md +22 -22
- package/lib/commands/org/list/limits.d.ts +20 -0
- package/lib/commands/org/list/limits.js +44 -0
- package/lib/commands/org/list/limits.js.map +1 -0
- package/lib/commands/org/list/sobject/record-counts.d.ts +19 -0
- package/lib/commands/org/list/sobject/record-counts.js +53 -0
- package/lib/commands/org/list/sobject/record-counts.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/messages/display.md +0 -4
- package/messages/recordcounts.md +1 -5
- package/oclif.lock +7698 -0
- package/oclif.manifest.json +204 -70
- package/package.json +43 -60
- package/lib/commands/limits/api/display.d.ts +0 -20
- package/lib/commands/limits/api/display.js +0 -46
- package/lib/commands/limits/api/display.js.map +0 -1
- package/lib/commands/limits/recordcounts/display.d.ts +0 -19
- package/lib/commands/limits/recordcounts/display.js +0 -55
- package/lib/commands/limits/recordcounts/display.js.map +0 -1
- /package/schemas/{limits-api-display.json → org-list-limits.json} +0 -0
- /package/schemas/{limits-recordcounts-display.json → org-list-sobject-record__counts.json} +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LimitsRecordCountsDisplayCommand = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
|
-
* All rights reserved.
|
|
7
|
-
* Licensed under the BSD 3-Clause license.
|
|
8
|
-
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
|
-
*/
|
|
10
|
-
const core_1 = require("@salesforce/core");
|
|
11
|
-
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
12
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
13
|
-
const messages = core_1.Messages.loadMessages('@salesforce/plugin-limits', 'recordcounts');
|
|
14
|
-
class LimitsRecordCountsDisplayCommand extends sf_plugins_core_1.SfCommand {
|
|
15
|
-
async run() {
|
|
16
|
-
try {
|
|
17
|
-
const { flags } = await this.parse(LimitsRecordCountsDisplayCommand);
|
|
18
|
-
const conn = flags['target-org'].getConnection(flags['api-version']);
|
|
19
|
-
const sobjectsQuery = flags.sobject.length > 0 ? `=${flags.sobject.join()}` : '';
|
|
20
|
-
const geturl = `/limits/recordCount?sObjects${sobjectsQuery}`;
|
|
21
|
-
const result = await conn.request(geturl);
|
|
22
|
-
const recordCounts = result.sObjects
|
|
23
|
-
.filter((record) => (flags.sobject.length > 0 ? flags.sobject.includes(record.name) : result.sObjects))
|
|
24
|
-
.sort((a, b) => a.name.localeCompare(b.name));
|
|
25
|
-
this.table(recordCounts, {
|
|
26
|
-
name: { header: 'sObject' },
|
|
27
|
-
count: { header: 'Record Count' },
|
|
28
|
-
});
|
|
29
|
-
return recordCounts;
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
if (err instanceof Error || typeof err === 'string') {
|
|
33
|
-
throw core_1.SfError.wrap(err);
|
|
34
|
-
}
|
|
35
|
-
throw err;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.LimitsRecordCountsDisplayCommand = LimitsRecordCountsDisplayCommand;
|
|
40
|
-
LimitsRecordCountsDisplayCommand.aliases = ['force:limits:recordcounts:display', 'org:list:sobject:record-counts'];
|
|
41
|
-
LimitsRecordCountsDisplayCommand.summary = messages.getMessage('summary');
|
|
42
|
-
LimitsRecordCountsDisplayCommand.description = messages.getMessage('description');
|
|
43
|
-
LimitsRecordCountsDisplayCommand.examples = messages.getMessages('examples');
|
|
44
|
-
LimitsRecordCountsDisplayCommand.flags = {
|
|
45
|
-
sobject: (0, sf_plugins_core_1.arrayWithDeprecation)({
|
|
46
|
-
char: 's',
|
|
47
|
-
summary: messages.getMessage('sobjectFlagDescription'),
|
|
48
|
-
aliases: ['sobjecttype'],
|
|
49
|
-
default: [],
|
|
50
|
-
}),
|
|
51
|
-
'target-org': sf_plugins_core_1.requiredOrgFlagWithDeprecations,
|
|
52
|
-
'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
|
|
53
|
-
loglevel: sf_plugins_core_1.loglevel,
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=display.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/limits/recordcounts/display.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAAqD;AACrD,iEAMqC;AAErC,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,2BAA2B,EAAE,cAAc,CAAC,CAAC;AAapF,MAAa,gCAAiC,SAAQ,2BAAuB;IAkBpE,KAAK,CAAC,GAAG;QACd,IAAI;YACF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACrE,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;YACrE,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjF,MAAM,MAAM,GAAG,+BAA+B,aAAa,EAAE,CAAC;YAC9D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAS,MAAM,CAAC,CAAC;YAElD,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ;iBACjC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,M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