sfdx-hardis 5.4.0 → 5.4.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
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta`
|
|
6
6
|
|
|
7
|
+
## [5.4.1] 2024-11-02
|
|
8
|
+
|
|
9
|
+
- hardis:org:multi-org-query enhancements
|
|
10
|
+
- Improve documentation
|
|
11
|
+
- Allow to use --query-template as option to use one of the predefined templates via command line
|
|
12
|
+
- Handle errors if issues when the command is called via a CI/CD job
|
|
13
|
+
- Upgrade dependencies
|
|
14
|
+
|
|
7
15
|
## [5.4.0] 2024-11-02
|
|
8
16
|
|
|
9
17
|
- New command hardis:org:multi-org-query allowing to execute a SOQL Bulk Query in multiple orgs and aggregate the results in a single CSV / XLS report
|
|
@@ -5,7 +5,9 @@ export default class MultiOrgQuery extends SfCommand<any> {
|
|
|
5
5
|
static description: string;
|
|
6
6
|
static examples: string[];
|
|
7
7
|
static flags: any;
|
|
8
|
+
protected allQueryTemplates: any;
|
|
8
9
|
protected query: string;
|
|
10
|
+
protected queryTemplate: string;
|
|
9
11
|
protected targetOrgsIds: string[];
|
|
10
12
|
protected targetOrgs: any[];
|
|
11
13
|
protected outputFile: any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* jscpd:ignore-start */
|
|
2
2
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
3
|
-
import { AuthInfo, Connection, Messages } from '@salesforce/core';
|
|
3
|
+
import { AuthInfo, Connection, Messages, SfError } from '@salesforce/core';
|
|
4
4
|
import c from "chalk";
|
|
5
5
|
import { makeSureOrgIsConnected, promptOrgList } from '../../../common/utils/orgUtils.js';
|
|
6
|
-
import { uxLog } from '../../../common/utils/index.js';
|
|
6
|
+
import { isCI, uxLog } from '../../../common/utils/index.js';
|
|
7
7
|
import { bulkQuery } from '../../../common/utils/apiUtils.js';
|
|
8
8
|
import { generateCsvFile, generateReportPath } from '../../../common/utils/filesUtils.js';
|
|
9
9
|
import { prompts } from '../../../common/utils/prompts.js';
|
|
@@ -11,16 +11,34 @@ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
|
11
11
|
const messages = Messages.loadMessages('sfdx-hardis', 'org');
|
|
12
12
|
export default class MultiOrgQuery extends SfCommand {
|
|
13
13
|
static title = 'Multiple Orgs SOQL Query';
|
|
14
|
-
static description = `Executes a SOQL query in multiple orgs and generate a single report from it
|
|
14
|
+
static description = `Executes a SOQL query in multiple orgs and generate a single report from it
|
|
15
|
+
|
|
16
|
+
You can send a custom query using --query, or use one of the predefined queries using --query-template.
|
|
17
|
+
|
|
18
|
+
If you use the command from a CI/CD job, you must previously authenticate to the usernames present in --target-orgs.
|
|
19
|
+
|
|
20
|
+
[](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis)
|
|
21
|
+
`;
|
|
15
22
|
static examples = [
|
|
16
23
|
'$ sf hardis:org:multi-org-query',
|
|
17
24
|
'$ sf hardis:org:multi-org-query --query "SELECT Id,Username FROM User"',
|
|
18
|
-
'$ sf hardis:org:multi-org-query --query "SELECT Id,Username FROM User" --target-orgs nico@cloudity.com nico@cloudity.com.preprod nico@cloudity.com.uat'
|
|
25
|
+
'$ sf hardis:org:multi-org-query --query "SELECT Id,Username FROM User" --target-orgs nico@cloudity.com nico@cloudity.com.preprod nico@cloudity.com.uat',
|
|
26
|
+
'$ sf hardis:org:multi-org-query --query-template active-users --target-orgs nico@cloudity.com nico@cloudity.com.preprod nico@cloudity.com.uat',
|
|
19
27
|
];
|
|
20
28
|
static flags = {
|
|
21
29
|
query: Flags.string({
|
|
22
30
|
char: 'q',
|
|
23
31
|
description: 'SOQL Query to run on multiple orgs',
|
|
32
|
+
exclusive: ["query-template"]
|
|
33
|
+
}),
|
|
34
|
+
"query-template": Flags.string({
|
|
35
|
+
char: "t",
|
|
36
|
+
description: "Use one of predefined SOQL Query templates",
|
|
37
|
+
options: [
|
|
38
|
+
"active-users",
|
|
39
|
+
"all-users"
|
|
40
|
+
],
|
|
41
|
+
exclusive: ["query"]
|
|
24
42
|
}),
|
|
25
43
|
"target-orgs": Flags.string({
|
|
26
44
|
char: "x",
|
|
@@ -43,7 +61,18 @@ export default class MultiOrgQuery extends SfCommand {
|
|
|
43
61
|
description: 'Skip authentication check when a default username is required',
|
|
44
62
|
}),
|
|
45
63
|
};
|
|
64
|
+
allQueryTemplates = {
|
|
65
|
+
"active-users": {
|
|
66
|
+
label: "Active users",
|
|
67
|
+
query: `SELECT Id, LastLoginDate, User.LastName, User.Firstname, Profile.UserLicense.Name, Profile.Name, Username, Profile.UserLicense.LicenseDefinitionKey, IsActive, CreatedDate FROM User WHERE IsActive = true ORDER BY Username ASC`,
|
|
68
|
+
},
|
|
69
|
+
"all-users": {
|
|
70
|
+
label: "All users (including inactive)",
|
|
71
|
+
query: `SELECT Id, LastLoginDate, User.LastName, User.Firstname, Profile.UserLicense.Name, Profile.Name, Username, Profile.UserLicense.LicenseDefinitionKey, IsActive, CreatedDate FROM User ORDER BY Username ASC`,
|
|
72
|
+
}
|
|
73
|
+
};
|
|
46
74
|
query;
|
|
75
|
+
queryTemplate;
|
|
47
76
|
targetOrgsIds = [];
|
|
48
77
|
targetOrgs = [];
|
|
49
78
|
outputFile;
|
|
@@ -55,6 +84,7 @@ export default class MultiOrgQuery extends SfCommand {
|
|
|
55
84
|
async run() {
|
|
56
85
|
const { flags } = await this.parse(MultiOrgQuery);
|
|
57
86
|
this.query = flags.query || null;
|
|
87
|
+
this.queryTemplate = flags["query-template"] || null;
|
|
58
88
|
this.targetOrgsIds = flags["target-orgs"] || [];
|
|
59
89
|
this.outputFile = flags.outputfile || null;
|
|
60
90
|
this.debugMode = flags.debug || false;
|
|
@@ -102,7 +132,7 @@ export default class MultiOrgQuery extends SfCommand {
|
|
|
102
132
|
const username = matchOrgs[0].username;
|
|
103
133
|
const instanceUrl = matchOrgs[0].instanceUrl;
|
|
104
134
|
const loginUrl = matchOrgs[0].loginUrl || instanceUrl;
|
|
105
|
-
uxLog(this, c.
|
|
135
|
+
uxLog(this, c.cyan(`Performing query on ${c.bold(orgId)}...`));
|
|
106
136
|
try {
|
|
107
137
|
const authInfo = await AuthInfo.create({
|
|
108
138
|
username: username
|
|
@@ -132,6 +162,9 @@ export default class MultiOrgQuery extends SfCommand {
|
|
|
132
162
|
}
|
|
133
163
|
async manageSelectOrgs() {
|
|
134
164
|
if (this.targetOrgsIds.length === 0) {
|
|
165
|
+
if (isCI) {
|
|
166
|
+
throw new SfError("You must provide a list of org usernames or aliases in --target-orgs");
|
|
167
|
+
}
|
|
135
168
|
this.targetOrgs = await promptOrgList();
|
|
136
169
|
this.targetOrgsIds = this.targetOrgs.map(org => org.alias || org.username);
|
|
137
170
|
}
|
|
@@ -139,23 +172,34 @@ export default class MultiOrgQuery extends SfCommand {
|
|
|
139
172
|
for (const orgId of this.targetOrgsIds) {
|
|
140
173
|
const matchOrgs = this.targetOrgs.filter(org => (org.username === orgId || org.alias === orgId) && org.accessToken && org.connectedStatus === 'Connected');
|
|
141
174
|
if (matchOrgs.length === 0) {
|
|
175
|
+
if (isCI) {
|
|
176
|
+
throw new SfError(`${orgId} must be authenticated using Salesforce CLI before calling this command`);
|
|
177
|
+
}
|
|
142
178
|
const orgRes = await makeSureOrgIsConnected(orgId);
|
|
143
179
|
this.targetOrgs.push(orgRes);
|
|
144
180
|
}
|
|
145
181
|
}
|
|
146
182
|
}
|
|
147
183
|
async defineSoqlQuery() {
|
|
184
|
+
// Template is sent as input
|
|
185
|
+
if (this.queryTemplate) {
|
|
186
|
+
this.query = this.allQueryTemplates[this.queryTemplate].query;
|
|
187
|
+
}
|
|
148
188
|
if (this.query == null) {
|
|
149
|
-
|
|
189
|
+
if (isCI) {
|
|
190
|
+
throw new SfError("You must provide a valid value in --query or --query-template");
|
|
191
|
+
}
|
|
150
192
|
const baseQueryPromptRes = await prompts({
|
|
151
193
|
type: "select",
|
|
152
|
-
message: "Please select a predefined query, or custom option",
|
|
194
|
+
message: "Please select a predefined query, or custom SOQL option",
|
|
153
195
|
choices: [
|
|
154
|
-
{
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
196
|
+
...Object.keys(this.allQueryTemplates).map(templateId => {
|
|
197
|
+
return {
|
|
198
|
+
title: this.allQueryTemplates[templateId].label,
|
|
199
|
+
description: this.allQueryTemplates[templateId].query,
|
|
200
|
+
value: this.allQueryTemplates[templateId].query
|
|
201
|
+
};
|
|
202
|
+
}),
|
|
159
203
|
{
|
|
160
204
|
title: "Custom SOQL Query",
|
|
161
205
|
description: "Enter a custom SOQL query to run",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-org-query.js","sourceRoot":"","sources":["../../../../src/commands/hardis/org/multi-org-query.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"multi-org-query.js","sourceRoot":"","sources":["../../../../src/commands/hardis/org/multi-org-query.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3E,OAAO,CAAC,MAAM,OAAO,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAA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MAAM,IAAI,OAAO,CAAC,+DAA+D,CAAC,CAAC;YACrF,CAAC;YACD,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC;gBACvC,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,yDAAyD;gBAClE,OAAO,EAAE;oBACP,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;wBACtD,OAAO;4BACL,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,KAAK;4BAC/C,WAAW,EAAE,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,KAAK;4BACrD,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,KAAK;yBAChD,CAAA;oBACH,CAAC,CAAC;oBACF;wBACE,KAAK,EAAE,mBAAmB;wBAC1B,WAAW,EAAE,kCAAkC;wBAC/C,KAAK,EAAE,QAAQ;qBAChB;iBACF;aACF,CAAC,CAAC;YACH,IAAI,kBAAkB,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC1C,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC;oBACnC,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE,qDAAqD;iBAC/D,CAAC,CAAC;gBACH,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC;YACpC,CAAC;iBACI,CAAC;gBACJ,IAAI,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC"}
|
package/oclif.lock
CHANGED
|
@@ -1644,10 +1644,10 @@
|
|
|
1644
1644
|
proc-log "^4.0.0"
|
|
1645
1645
|
which "^4.0.0"
|
|
1646
1646
|
|
|
1647
|
-
"@oclif/core@^4", "@oclif/core@^4.0.
|
|
1648
|
-
version "4.0.
|
|
1649
|
-
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-4.0.
|
|
1650
|
-
integrity sha512-
|
|
1647
|
+
"@oclif/core@^4", "@oclif/core@^4.0.27", "@oclif/core@^4.0.28":
|
|
1648
|
+
version "4.0.31"
|
|
1649
|
+
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-4.0.31.tgz#3f7ac806f27de6a87a7ee7caab8826687ce50412"
|
|
1650
|
+
integrity sha512-7oyIZv/C1TP+fPc2tSzVPYqG1zU+nel1QvJxjAWyVhud0J8B5SpKZnryedxs3nlSVPJ6K1MT31C9esupCBYgZw==
|
|
1651
1651
|
dependencies:
|
|
1652
1652
|
ansi-escapes "^4.3.2"
|
|
1653
1653
|
ansis "^3.3.2"
|
|
@@ -1658,7 +1658,7 @@
|
|
|
1658
1658
|
get-package-type "^0.1.0"
|
|
1659
1659
|
globby "^11.1.0"
|
|
1660
1660
|
indent-string "^4.0.0"
|
|
1661
|
-
is-wsl "^
|
|
1661
|
+
is-wsl "^2.2.0"
|
|
1662
1662
|
lilconfig "^3.1.2"
|
|
1663
1663
|
minimatch "^9.0.5"
|
|
1664
1664
|
semver "^7.6.3"
|
|
@@ -1668,10 +1668,10 @@
|
|
|
1668
1668
|
wordwrap "^1.0.0"
|
|
1669
1669
|
wrap-ansi "^7.0.0"
|
|
1670
1670
|
|
|
1671
|
-
"@oclif/plugin-command-snapshot@^5.2.
|
|
1672
|
-
version "5.2.
|
|
1673
|
-
resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-5.2.
|
|
1674
|
-
integrity sha512-
|
|
1671
|
+
"@oclif/plugin-command-snapshot@^5.2.20":
|
|
1672
|
+
version "5.2.20"
|
|
1673
|
+
resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-5.2.20.tgz#6735aa12be24ad6f14698f1b60b172f9d6420d07"
|
|
1674
|
+
integrity sha512-Kh9qrIawE0fjdZ8ttHsPlFA29D8tqsJXhneceBX/rJFMWebd8jT5G6PXVwtH9LYT5ZTSy2bQY70RIKtGvuVxPg==
|
|
1675
1675
|
dependencies:
|
|
1676
1676
|
"@oclif/core" "^4"
|
|
1677
1677
|
ansis "^3.3.2"
|
|
@@ -2070,16 +2070,16 @@
|
|
|
2070
2070
|
resolved "https://registry.npmjs.org/@salesforce/schemas/-/schemas-1.9.0.tgz"
|
|
2071
2071
|
integrity sha512-LiN37zG5ODT6z70sL1fxF7BQwtCX9JOWofSU8iliSNIM+WDEeinnoFtVqPInRSNt8I0RiJxIKCrqstsmQRBNvA==
|
|
2072
2072
|
|
|
2073
|
-
"@salesforce/sf-plugins-core@^11.3.
|
|
2074
|
-
version "11.3.
|
|
2075
|
-
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-11.3.
|
|
2076
|
-
integrity sha512-
|
|
2073
|
+
"@salesforce/sf-plugins-core@^11.3.12":
|
|
2074
|
+
version "11.3.12"
|
|
2075
|
+
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-11.3.12.tgz#18b3a553688428bcffea9d36abc72847497f06ae"
|
|
2076
|
+
integrity sha512-hi8EcSoRHRxj4sm/V5YDtzq9bPr/cKpM4fC6abo/jRzpXygwizinc2gVQkXfVdhjK7NGMskVRQB1N+0TThG7bA==
|
|
2077
2077
|
dependencies:
|
|
2078
2078
|
"@inquirer/confirm" "^3.1.22"
|
|
2079
2079
|
"@inquirer/password" "^2.2.0"
|
|
2080
|
-
"@oclif/core" "^4.0.
|
|
2080
|
+
"@oclif/core" "^4.0.27"
|
|
2081
2081
|
"@salesforce/core" "^8.5.1"
|
|
2082
|
-
"@salesforce/kit" "^3.2.
|
|
2082
|
+
"@salesforce/kit" "^3.2.3"
|
|
2083
2083
|
"@salesforce/ts-types" "^2.0.12"
|
|
2084
2084
|
ansis "^3.3.2"
|
|
2085
2085
|
cli-progress "^3.12.0"
|
|
@@ -2826,10 +2826,10 @@
|
|
|
2826
2826
|
resolved "https://registry.npmjs.org/@types/configstore/-/configstore-6.0.2.tgz"
|
|
2827
2827
|
integrity sha512-OS//b51j9uyR3zvwD04Kfs5kHpve2qalQ18JhY/ho3voGYUTPLEG90/ocfKPI48hyHH8T04f7KEEbK6Ue60oZQ==
|
|
2828
2828
|
|
|
2829
|
-
"@types/cosmiconfig@^6.0.
|
|
2830
|
-
version "6.0.
|
|
2831
|
-
resolved "https://registry.
|
|
2832
|
-
integrity sha512-
|
|
2829
|
+
"@types/cosmiconfig@^6.0.3":
|
|
2830
|
+
version "6.0.3"
|
|
2831
|
+
resolved "https://registry.yarnpkg.com/@types/cosmiconfig/-/cosmiconfig-6.0.3.tgz#03e26eb39c438ff7949ad950f887baf49aa383b8"
|
|
2832
|
+
integrity sha512-SiTm0f1L6hGrhqAE1bb5GSC9Ay9v9lCSA2mYUH91p6kBMdkbDfuXIyCBmhD6PmSJTiF7ZHS95BTPc0HPqlnWgw==
|
|
2833
2833
|
dependencies:
|
|
2834
2834
|
cosmiconfig "*"
|
|
2835
2835
|
|
|
@@ -7226,7 +7226,7 @@ is-wsl@^2.2.0:
|
|
|
7226
7226
|
dependencies:
|
|
7227
7227
|
is-docker "^2.0.0"
|
|
7228
7228
|
|
|
7229
|
-
is-wsl@^3
|
|
7229
|
+
is-wsl@^3.1.0:
|
|
7230
7230
|
version "3.1.0"
|
|
7231
7231
|
resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz"
|
|
7232
7232
|
integrity sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==
|
|
@@ -8951,10 +8951,10 @@ open@^10.0.2, open@^10.1.0:
|
|
|
8951
8951
|
is-inside-container "^1.0.0"
|
|
8952
8952
|
is-wsl "^3.1.0"
|
|
8953
8953
|
|
|
8954
|
-
openai@^4.
|
|
8955
|
-
version "4.
|
|
8956
|
-
resolved "https://registry.yarnpkg.com/openai/-/openai-4.
|
|
8957
|
-
integrity sha512-
|
|
8954
|
+
openai@^4.70.2:
|
|
8955
|
+
version "4.70.2"
|
|
8956
|
+
resolved "https://registry.yarnpkg.com/openai/-/openai-4.70.2.tgz#dfe54b2b13996b76d93f2aaac07203d2660d6e65"
|
|
8957
|
+
integrity sha512-Q2ymi/KPUYv+LJ9rFxeYxpkVAhcrZFTVvnJbdF1pUHg9eMC6lY8PU4TO1XOK5UZzOZuuVicouRwVMi1iDrT4qw==
|
|
8958
8958
|
dependencies:
|
|
8959
8959
|
"@types/node" "^18.11.18"
|
|
8960
8960
|
"@types/node-fetch" "^2.6.4"
|
|
@@ -9684,10 +9684,10 @@ pupa@^3.1.0:
|
|
|
9684
9684
|
dependencies:
|
|
9685
9685
|
escape-goat "^4.0.0"
|
|
9686
9686
|
|
|
9687
|
-
puppeteer-core@^23.6.
|
|
9688
|
-
version "23.6.
|
|
9689
|
-
resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-23.6.
|
|
9690
|
-
integrity sha512-
|
|
9687
|
+
puppeteer-core@^23.6.1:
|
|
9688
|
+
version "23.6.1"
|
|
9689
|
+
resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-23.6.1.tgz#0f74d74ba02fbec79606b0b112b6dd930395cea4"
|
|
9690
|
+
integrity sha512-DoNLAzQfGklPauEn33N4h9cM9GubJSINEn+AUMwAXwW159Y9JLk5y34Jsbv4c7kG8P0puOYWV9leu2siMZ/QpQ==
|
|
9691
9691
|
dependencies:
|
|
9692
9692
|
"@puppeteer/browsers" "2.4.0"
|
|
9693
9693
|
chromium-bidi "0.8.0"
|
package/oclif.manifest.json
CHANGED
|
@@ -1315,11 +1315,12 @@
|
|
|
1315
1315
|
"hardis:org:multi-org-query": {
|
|
1316
1316
|
"aliases": [],
|
|
1317
1317
|
"args": {},
|
|
1318
|
-
"description": "Executes a SOQL query in multiple orgs and generate a single report from it",
|
|
1318
|
+
"description": "Executes a SOQL query in multiple orgs and generate a single report from it\n \nYou can send a custom query using --query, or use one of the predefined queries using --query-template.\n\nIf you use the command from a CI/CD job, you must previously authenticate to the usernames present in --target-orgs.\n\n[](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis)\n",
|
|
1319
1319
|
"examples": [
|
|
1320
1320
|
"$ sf hardis:org:multi-org-query",
|
|
1321
1321
|
"$ sf hardis:org:multi-org-query --query \"SELECT Id,Username FROM User\"",
|
|
1322
|
-
"$ sf hardis:org:multi-org-query --query \"SELECT Id,Username FROM User\" --target-orgs nico@cloudity.com nico@cloudity.com.preprod nico@cloudity.com.uat"
|
|
1322
|
+
"$ sf hardis:org:multi-org-query --query \"SELECT Id,Username FROM User\" --target-orgs nico@cloudity.com nico@cloudity.com.preprod nico@cloudity.com.uat",
|
|
1323
|
+
"$ sf hardis:org:multi-org-query --query-template active-users --target-orgs nico@cloudity.com nico@cloudity.com.preprod nico@cloudity.com.uat"
|
|
1323
1324
|
],
|
|
1324
1325
|
"flags": {
|
|
1325
1326
|
"json": {
|
|
@@ -1340,11 +1341,29 @@
|
|
|
1340
1341
|
"query": {
|
|
1341
1342
|
"char": "q",
|
|
1342
1343
|
"description": "SOQL Query to run on multiple orgs",
|
|
1344
|
+
"exclusive": [
|
|
1345
|
+
"query-template"
|
|
1346
|
+
],
|
|
1343
1347
|
"name": "query",
|
|
1344
1348
|
"hasDynamicHelp": false,
|
|
1345
1349
|
"multiple": false,
|
|
1346
1350
|
"type": "option"
|
|
1347
1351
|
},
|
|
1352
|
+
"query-template": {
|
|
1353
|
+
"char": "t",
|
|
1354
|
+
"description": "Use one of predefined SOQL Query templates",
|
|
1355
|
+
"exclusive": [
|
|
1356
|
+
"query"
|
|
1357
|
+
],
|
|
1358
|
+
"name": "query-template",
|
|
1359
|
+
"hasDynamicHelp": false,
|
|
1360
|
+
"multiple": false,
|
|
1361
|
+
"options": [
|
|
1362
|
+
"active-users",
|
|
1363
|
+
"all-users"
|
|
1364
|
+
],
|
|
1365
|
+
"type": "option"
|
|
1366
|
+
},
|
|
1348
1367
|
"target-orgs": {
|
|
1349
1368
|
"char": "x",
|
|
1350
1369
|
"description": "List of org usernames or aliases.",
|
|
@@ -12972,5 +12991,5 @@
|
|
|
12972
12991
|
]
|
|
12973
12992
|
}
|
|
12974
12993
|
},
|
|
12975
|
-
"version": "5.4.
|
|
12994
|
+
"version": "5.4.1"
|
|
12976
12995
|
}
|
package/package.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"description": "Swiss-army-knife Toolbox for Salesforce.\n Allows you to define a complete CD/CD Pipeline.\n Orchestrate base commands and assist users with interactive wizards",
|
|
4
4
|
"author": "NicolasVuillamy @nvuillam",
|
|
5
5
|
"bugs": "https://github.com/hardisgroupcom/sfdx-hardis/issues",
|
|
6
|
-
"version": "5.4.
|
|
6
|
+
"version": "5.4.1",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@actions/github": "^6.0.0",
|
|
9
9
|
"@gitbeaker/node": "^35.8.1",
|
|
10
10
|
"@oclif/core": "^4.0.28",
|
|
11
11
|
"@salesforce/core": "^8.6.2",
|
|
12
|
-
"@salesforce/sf-plugins-core": "^11.3.
|
|
12
|
+
"@salesforce/sf-plugins-core": "^11.3.12",
|
|
13
13
|
"@slack/types": "^2.14.0",
|
|
14
14
|
"@slack/web-api": "^7.7.0",
|
|
15
15
|
"@supercharge/promise-pool": "^3.2.0",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"mega-linter-runner": "^8.0.0",
|
|
42
42
|
"moment": "^2.30.1",
|
|
43
43
|
"open": "^10.1.0",
|
|
44
|
-
"openai": "^4.
|
|
44
|
+
"openai": "^4.70.2",
|
|
45
45
|
"ora": "^8.1.0",
|
|
46
46
|
"papaparse": "^5.4.1",
|
|
47
47
|
"pascalcase": "^2.0.0",
|
|
48
48
|
"psl": "^1.9.0",
|
|
49
|
-
"puppeteer-core": "^23.6.
|
|
49
|
+
"puppeteer-core": "^23.6.1",
|
|
50
50
|
"read-package-up": "^11.0.0",
|
|
51
51
|
"semver": "^7.6.3",
|
|
52
52
|
"set-value": "^4.1.0",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"xpath": "^0.0.34"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@oclif/plugin-command-snapshot": "^5.2.
|
|
64
|
+
"@oclif/plugin-command-snapshot": "^5.2.20",
|
|
65
65
|
"@salesforce/cli-plugins-testkit": "^5.3.32",
|
|
66
66
|
"@salesforce/dev-config": "^4.3.1",
|
|
67
67
|
"@salesforce/dev-scripts": "^10",
|
|
68
68
|
"@types/columnify": "^1.5.4",
|
|
69
|
-
"@types/cosmiconfig": "^6.0.
|
|
69
|
+
"@types/cosmiconfig": "^6.0.3",
|
|
70
70
|
"@types/cross-spawn": "^6.0.6",
|
|
71
71
|
"@types/extract-zip": "^2.0.1",
|
|
72
72
|
"@types/fs-extra": "^11.0.4",
|