@sharinpix/sharinpix-sf-cli 1.3.0 → 1.4.0
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 +76 -0
- package/lib/commands/sharinpix/permission/pull.d.ts +15 -0
- package/lib/commands/sharinpix/permission/pull.js +47 -0
- package/lib/commands/sharinpix/permission/pull.js.map +1 -0
- package/lib/commands/sharinpix/permission/push.d.ts +16 -0
- package/lib/commands/sharinpix/permission/push.js +104 -0
- package/lib/commands/sharinpix/permission/push.js.map +1 -0
- package/lib/index.d.ts +4 -2
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/messages/sharinpix.permission.pull.md +29 -0
- package/messages/sharinpix.permission.push.md +41 -0
- package/oclif.manifest.json +127 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,6 +98,8 @@ sf plugins
|
|
|
98
98
|
<!-- commands -->
|
|
99
99
|
* [`sf sharinpix form pull`](#sf-sharinpix-form-pull)
|
|
100
100
|
* [`sf sharinpix form push`](#sf-sharinpix-form-push)
|
|
101
|
+
* [`sf sharinpix permission pull`](#sf-sharinpix-permission-pull)
|
|
102
|
+
* [`sf sharinpix permission push`](#sf-sharinpix-permission-push)
|
|
101
103
|
|
|
102
104
|
## `sf sharinpix form pull`
|
|
103
105
|
|
|
@@ -172,4 +174,78 @@ FLAG DESCRIPTIONS
|
|
|
172
174
|
|
|
173
175
|
The target Salesforce org where the SharinPix form templates will be uploaded and stored.
|
|
174
176
|
```
|
|
177
|
+
|
|
178
|
+
## `sf sharinpix permission pull`
|
|
179
|
+
|
|
180
|
+
Pull SharinPix permissions from Salesforce org.
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
USAGE
|
|
184
|
+
$ sf sharinpix permission pull -o <value> [--json] [--flags-dir <value>]
|
|
185
|
+
|
|
186
|
+
FLAGS
|
|
187
|
+
-o, --org=<value> (required) The Salesforce org to pull SharinPix permissions from.
|
|
188
|
+
|
|
189
|
+
GLOBAL FLAGS
|
|
190
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
191
|
+
--json Format output as json.
|
|
192
|
+
|
|
193
|
+
DESCRIPTION
|
|
194
|
+
Pull SharinPix permissions from Salesforce org.
|
|
195
|
+
|
|
196
|
+
Retrieves all SharinPix permissions from the connected Salesforce org and saves them as JSON files in the local
|
|
197
|
+
sharinpix/permission directory. This command fetches the permission metadata and the JSON configuration data stored in
|
|
198
|
+
the sharinpix**Json**c field.
|
|
199
|
+
|
|
200
|
+
EXAMPLES
|
|
201
|
+
Pull all SharinPix permissions from the default org:
|
|
202
|
+
|
|
203
|
+
$ sf sharinpix permission pull
|
|
204
|
+
|
|
205
|
+
Pull SharinPix permissions from a specific org:
|
|
206
|
+
|
|
207
|
+
$ sf sharinpix permission pull --target-org myorg@example.com
|
|
208
|
+
|
|
209
|
+
FLAG DESCRIPTIONS
|
|
210
|
+
-o, --org=<value> The Salesforce org to pull SharinPix permissions from.
|
|
211
|
+
|
|
212
|
+
The target Salesforce org containing the SharinPix permissions to be pulled.
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## `sf sharinpix permission push`
|
|
216
|
+
|
|
217
|
+
Push SharinPix permissions to Salesforce org.
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
USAGE
|
|
221
|
+
$ sf sharinpix permission push -o <value> [--json] [--flags-dir <value>]
|
|
222
|
+
|
|
223
|
+
FLAGS
|
|
224
|
+
-o, --org=<value> (required) The Salesforce org to push SharinPix permissions to.
|
|
225
|
+
|
|
226
|
+
GLOBAL FLAGS
|
|
227
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
228
|
+
--json Format output as json.
|
|
229
|
+
|
|
230
|
+
DESCRIPTION
|
|
231
|
+
Push SharinPix permissions to Salesforce org.
|
|
232
|
+
|
|
233
|
+
Uploads SharinPix permissions from local JSON files to the connected Salesforce org. This command reads permission
|
|
234
|
+
configurations from the local directory and creates or updates corresponding records in Salesforce. The
|
|
235
|
+
sharinpix**Json**c field will be updated with the JSON configuration data.
|
|
236
|
+
|
|
237
|
+
EXAMPLES
|
|
238
|
+
Push all SharinPix permissions to the default org:
|
|
239
|
+
|
|
240
|
+
$ sf sharinpix permission push
|
|
241
|
+
|
|
242
|
+
Push SharinPix permissions to a specific org:
|
|
243
|
+
|
|
244
|
+
$ sf sharinpix permission push --target-org myorg@example.com
|
|
245
|
+
|
|
246
|
+
FLAG DESCRIPTIONS
|
|
247
|
+
-o, --org=<value> The Salesforce org to push SharinPix permissions to.
|
|
248
|
+
|
|
249
|
+
The target Salesforce org where the SharinPix permissions will be uploaded and stored.
|
|
250
|
+
```
|
|
175
251
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export type PullResult = {
|
|
3
|
+
name: string;
|
|
4
|
+
permissionsDownloaded?: number;
|
|
5
|
+
permissionsFailed?: number;
|
|
6
|
+
};
|
|
7
|
+
export default class Pull extends SfCommand<PullResult> {
|
|
8
|
+
static readonly summary: string;
|
|
9
|
+
static readonly description: string;
|
|
10
|
+
static readonly examples: string[];
|
|
11
|
+
static readonly flags: {
|
|
12
|
+
org: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<PullResult>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
/* eslint-disable no-await-in-loop */
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
5
|
+
import { Messages } from '@salesforce/core';
|
|
6
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
7
|
+
const messages = Messages.loadMessages('@sharinpix/sharinpix-sf-cli', 'sharinpix.permission.pull');
|
|
8
|
+
export default class Pull extends SfCommand {
|
|
9
|
+
static summary = messages.getMessage('summary');
|
|
10
|
+
static description = messages.getMessage('description');
|
|
11
|
+
static examples = messages.getMessages('examples');
|
|
12
|
+
static flags = {
|
|
13
|
+
org: Flags.requiredOrg({
|
|
14
|
+
char: 'o',
|
|
15
|
+
summary: messages.getMessage('flags.org.summary'),
|
|
16
|
+
description: messages.getMessage('flags.org.description'),
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
async run() {
|
|
20
|
+
const { flags } = await this.parse(Pull);
|
|
21
|
+
const connection = flags.org.getConnection('63.0');
|
|
22
|
+
fs.mkdirSync('sharinpix/permission', { recursive: true });
|
|
23
|
+
const records = (await connection.query('SELECT Id, Name, sharinpix__Description__c, sharinpix__ID__c, sharinpix__Json__c FROM sharinpix__SharinPixPermission__c order by LastModifiedDate desc')).records;
|
|
24
|
+
let permissionsDownloaded = 0;
|
|
25
|
+
let permissionsFailed = 0;
|
|
26
|
+
for (const record of records) {
|
|
27
|
+
try {
|
|
28
|
+
const permissionData = JSON.parse(record.sharinpix__Json__c);
|
|
29
|
+
fs.writeFileSync(`sharinpix/permission/${record.Name}.json`, JSON.stringify(permissionData, null, 2));
|
|
30
|
+
this.log(messages.getMessage('info.hello', [record.Name, record.sharinpix__Description__c || 'No description']));
|
|
31
|
+
permissionsDownloaded++;
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
// Skip permissions that can't be fetched (e.g., network errors, invalid data)
|
|
35
|
+
this.warn(`Failed to fetch SharinPix permission ${record.Name}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
36
|
+
permissionsFailed++;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
this.log(`Successfully downloaded ${permissionsDownloaded} SharinPix permission(s). ${permissionsFailed} failed.`);
|
|
40
|
+
return {
|
|
41
|
+
name: 'OK',
|
|
42
|
+
permissionsDownloaded,
|
|
43
|
+
permissionsFailed,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMapp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
|
+
uploaded?: number;
|
|
5
|
+
failed?: number;
|
|
6
|
+
skipped?: number;
|
|
7
|
+
};
|
|
8
|
+
export default class Push extends SfCommand<PushResult> {
|
|
9
|
+
static readonly summary: string;
|
|
10
|
+
static readonly description: string;
|
|
11
|
+
static readonly examples: string[];
|
|
12
|
+
static readonly flags: {
|
|
13
|
+
org: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<PushResult>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
/* eslint-disable no-await-in-loop */
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
6
|
+
import { Messages } from '@salesforce/core';
|
|
7
|
+
import { isJsonEqual } from '../../../helpers/json-utils.js';
|
|
8
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
9
|
+
const messages = Messages.loadMessages('@sharinpix/sharinpix-sf-cli', 'sharinpix.permission.push');
|
|
10
|
+
export default class Push extends SfCommand {
|
|
11
|
+
static summary = messages.getMessage('summary');
|
|
12
|
+
static description = messages.getMessage('description');
|
|
13
|
+
static examples = messages.getMessages('examples');
|
|
14
|
+
static flags = {
|
|
15
|
+
org: Flags.requiredOrg({
|
|
16
|
+
char: 'o',
|
|
17
|
+
summary: messages.getMessage('flags.org.summary'),
|
|
18
|
+
description: messages.getMessage('flags.org.description'),
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
async run() {
|
|
22
|
+
const { flags } = await this.parse(Push);
|
|
23
|
+
const connection = flags.org.getConnection('63.0');
|
|
24
|
+
const files = fs
|
|
25
|
+
.readdirSync('sharinpix/permission')
|
|
26
|
+
.filter((file) => file.endsWith('.json'))
|
|
27
|
+
.map((file) => path.join('sharinpix/permission', file));
|
|
28
|
+
if (files.length === 0) {
|
|
29
|
+
this.log('No SharinPix permission files found in the specified directory.');
|
|
30
|
+
return {
|
|
31
|
+
name: 'OK',
|
|
32
|
+
uploaded: 0,
|
|
33
|
+
failed: 0,
|
|
34
|
+
skipped: 0,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const existingRecords = (await connection.query('SELECT Id, Name, sharinpix__Description__c, sharinpix__ID__c, sharinpix__Json__c FROM sharinpix__SharinPixPermission__c')).records;
|
|
38
|
+
const existingMap = new Map(existingRecords.map((record) => [record.Name, record]));
|
|
39
|
+
let uploaded = 0;
|
|
40
|
+
let failed = 0;
|
|
41
|
+
let skipped = 0;
|
|
42
|
+
for (const file of files) {
|
|
43
|
+
try {
|
|
44
|
+
const fileName = path.basename(file, '.json');
|
|
45
|
+
const fileContent = fs.readFileSync(file, 'utf8');
|
|
46
|
+
const json = JSON.parse(fileContent);
|
|
47
|
+
const existingRecord = existingMap.get(fileName);
|
|
48
|
+
const existingId = existingRecord?.Id ?? null;
|
|
49
|
+
if (existingRecord) {
|
|
50
|
+
// Check if permission has changed by comparing with stored JSON
|
|
51
|
+
try {
|
|
52
|
+
const existingJson = JSON.parse(existingRecord.sharinpix__Json__c);
|
|
53
|
+
if (isJsonEqual(json, existingJson)) {
|
|
54
|
+
this.log(messages.getMessage('info.skipped', [fileName]));
|
|
55
|
+
skipped++;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch (parseError) {
|
|
60
|
+
this.warn(`Failed to parse stored JSON for ${fileName}, proceeding with update`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Update or create the permission record
|
|
64
|
+
const permissionData = {
|
|
65
|
+
Name: fileName,
|
|
66
|
+
// eslint-disable-next-line camelcase
|
|
67
|
+
sharinpix__Json__c: JSON.stringify(json),
|
|
68
|
+
...(existingRecord?.sharinpix__Description__c && {
|
|
69
|
+
// eslint-disable-next-line camelcase
|
|
70
|
+
sharinpix__Description__c: existingRecord.sharinpix__Description__c,
|
|
71
|
+
}),
|
|
72
|
+
};
|
|
73
|
+
if (existingId) {
|
|
74
|
+
// Update existing record
|
|
75
|
+
await connection.sobject('sharinpix__SharinPixPermission__c').update({
|
|
76
|
+
...permissionData,
|
|
77
|
+
Id: existingId,
|
|
78
|
+
});
|
|
79
|
+
this.log(messages.getMessage('info.updated', [fileName]));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
// Create new record
|
|
83
|
+
await connection.sobject('sharinpix__SharinPixPermission__c').create(permissionData);
|
|
84
|
+
this.log(messages.getMessage('info.created', [fileName]));
|
|
85
|
+
}
|
|
86
|
+
uploaded++;
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
const fileName = path.basename(file, '.json');
|
|
90
|
+
this.warn(`Failed to push SharinPix permission ${fileName}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
91
|
+
failed++;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
this.log(messages.getMessage('info.summary', [uploaded, failed, skipped]));
|
|
96
|
+
return {
|
|
97
|
+
name: 'OK',
|
|
98
|
+
uploaded,
|
|
99
|
+
failed,
|
|
100
|
+
skipped,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=push.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/permission/push.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,qCAAqC;AACrC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,QA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,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAC/G,CAAC;gBACF,MAAM,EAAE,CAAC;gBACT,SAAS;YACX,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAE3E,OAAO;YACL,IAAI,EAAE,IAAI;YACV,QAAQ;YACR,MAAM;YACN,OAAO;SACR,CAAC;IACJ,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as
|
|
1
|
+
export { default as formPull } from './commands/sharinpix/form/pull.js';
|
|
2
|
+
export { default as formPush } from './commands/sharinpix/form/push.js';
|
|
3
|
+
export { default as permissionPull } from './commands/sharinpix/permission/pull.js';
|
|
4
|
+
export { default as permissionPush } from './commands/sharinpix/permission/push.js';
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { default as
|
|
2
|
-
export { default as
|
|
1
|
+
export { default as formPull } from './commands/sharinpix/form/pull.js';
|
|
2
|
+
export { default as formPush } from './commands/sharinpix/form/push.js';
|
|
3
|
+
export { default as permissionPull } from './commands/sharinpix/permission/pull.js';
|
|
4
|
+
export { default as permissionPush } from './commands/sharinpix/permission/push.js';
|
|
3
5
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Pull SharinPix permissions from Salesforce org.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Retrieves all SharinPix permissions from the connected Salesforce org and saves them as JSON files in the local sharinpix/permission directory. This command fetches the permission metadata and the JSON configuration data stored in the sharinpix**Json**c field.
|
|
8
|
+
|
|
9
|
+
# flags.org.summary
|
|
10
|
+
|
|
11
|
+
The Salesforce org to pull SharinPix permissions from.
|
|
12
|
+
|
|
13
|
+
# flags.org.description
|
|
14
|
+
|
|
15
|
+
The target Salesforce org containing the SharinPix permissions to be pulled.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Pull all SharinPix permissions from the default org:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %>
|
|
22
|
+
|
|
23
|
+
- Pull SharinPix permissions from a specific org:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> --target-org myorg@example.com
|
|
26
|
+
|
|
27
|
+
# info.hello
|
|
28
|
+
|
|
29
|
+
Pulled SharinPix permission %s (%s)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Push SharinPix permissions to Salesforce org.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Uploads SharinPix permissions from local JSON files to the connected Salesforce org. This command reads permission configurations from the local directory and creates or updates corresponding records in Salesforce. The sharinpix**Json**c field will be updated with the JSON configuration data.
|
|
8
|
+
|
|
9
|
+
# flags.org.summary
|
|
10
|
+
|
|
11
|
+
The Salesforce org to push SharinPix permissions to.
|
|
12
|
+
|
|
13
|
+
# flags.org.description
|
|
14
|
+
|
|
15
|
+
The target Salesforce org where the SharinPix permissions will be uploaded and stored.
|
|
16
|
+
|
|
17
|
+
# examples
|
|
18
|
+
|
|
19
|
+
- Push all SharinPix permissions to the default org:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %>
|
|
22
|
+
|
|
23
|
+
- Push SharinPix permissions to a specific org:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> --target-org myorg@example.com
|
|
26
|
+
|
|
27
|
+
# info.created
|
|
28
|
+
|
|
29
|
+
Created SharinPix permission %s
|
|
30
|
+
|
|
31
|
+
# info.updated
|
|
32
|
+
|
|
33
|
+
Updated SharinPix permission %s
|
|
34
|
+
|
|
35
|
+
# info.skipped
|
|
36
|
+
|
|
37
|
+
Skipped SharinPix permission %s (no changes detected)
|
|
38
|
+
|
|
39
|
+
# info.summary
|
|
40
|
+
|
|
41
|
+
Push completed: %d permissions uploaded, %d permissions failed, %d permissions skipped
|
package/oclif.manifest.json
CHANGED
|
@@ -125,7 +125,133 @@
|
|
|
125
125
|
"push:sharinpix:form",
|
|
126
126
|
"push:form:sharinpix"
|
|
127
127
|
]
|
|
128
|
+
},
|
|
129
|
+
"sharinpix:permission:pull": {
|
|
130
|
+
"aliases": [],
|
|
131
|
+
"args": {},
|
|
132
|
+
"description": "Retrieves all SharinPix permissions from the connected Salesforce org and saves them as JSON files in the local sharinpix/permission directory. This command fetches the permission metadata and the JSON configuration data stored in the sharinpix**Json**c field.",
|
|
133
|
+
"examples": [
|
|
134
|
+
"Pull all SharinPix permissions from the default org:\n<%= config.bin %> <%= command.id %>",
|
|
135
|
+
"Pull SharinPix permissions from a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com"
|
|
136
|
+
],
|
|
137
|
+
"flags": {
|
|
138
|
+
"json": {
|
|
139
|
+
"description": "Format output as json.",
|
|
140
|
+
"helpGroup": "GLOBAL",
|
|
141
|
+
"name": "json",
|
|
142
|
+
"allowNo": false,
|
|
143
|
+
"type": "boolean"
|
|
144
|
+
},
|
|
145
|
+
"flags-dir": {
|
|
146
|
+
"helpGroup": "GLOBAL",
|
|
147
|
+
"name": "flags-dir",
|
|
148
|
+
"summary": "Import flag values from a directory.",
|
|
149
|
+
"hasDynamicHelp": false,
|
|
150
|
+
"multiple": false,
|
|
151
|
+
"type": "option"
|
|
152
|
+
},
|
|
153
|
+
"org": {
|
|
154
|
+
"char": "o",
|
|
155
|
+
"description": "The target Salesforce org containing the SharinPix permissions to be pulled.",
|
|
156
|
+
"name": "org",
|
|
157
|
+
"noCacheDefault": true,
|
|
158
|
+
"required": true,
|
|
159
|
+
"summary": "The Salesforce org to pull SharinPix permissions from.",
|
|
160
|
+
"hasDynamicHelp": true,
|
|
161
|
+
"multiple": false,
|
|
162
|
+
"type": "option"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"hasDynamicHelp": true,
|
|
166
|
+
"hiddenAliases": [],
|
|
167
|
+
"id": "sharinpix:permission:pull",
|
|
168
|
+
"pluginAlias": "@sharinpix/sharinpix-sf-cli",
|
|
169
|
+
"pluginName": "@sharinpix/sharinpix-sf-cli",
|
|
170
|
+
"pluginType": "core",
|
|
171
|
+
"strict": true,
|
|
172
|
+
"summary": "Pull SharinPix permissions from Salesforce org.",
|
|
173
|
+
"enableJsonFlag": true,
|
|
174
|
+
"isESM": true,
|
|
175
|
+
"relativePath": [
|
|
176
|
+
"lib",
|
|
177
|
+
"commands",
|
|
178
|
+
"sharinpix",
|
|
179
|
+
"permission",
|
|
180
|
+
"pull.js"
|
|
181
|
+
],
|
|
182
|
+
"aliasPermutations": [],
|
|
183
|
+
"permutations": [
|
|
184
|
+
"sharinpix:permission:pull",
|
|
185
|
+
"permission:sharinpix:pull",
|
|
186
|
+
"permission:pull:sharinpix",
|
|
187
|
+
"sharinpix:pull:permission",
|
|
188
|
+
"pull:sharinpix:permission",
|
|
189
|
+
"pull:permission:sharinpix"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"sharinpix:permission:push": {
|
|
193
|
+
"aliases": [],
|
|
194
|
+
"args": {},
|
|
195
|
+
"description": "Uploads SharinPix permissions from local JSON files to the connected Salesforce org. This command reads permission configurations from the local directory and creates or updates corresponding records in Salesforce. The sharinpix**Json**c field will be updated with the JSON configuration data.",
|
|
196
|
+
"examples": [
|
|
197
|
+
"Push all SharinPix permissions to the default org:\n<%= config.bin %> <%= command.id %>",
|
|
198
|
+
"Push SharinPix permissions to a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com"
|
|
199
|
+
],
|
|
200
|
+
"flags": {
|
|
201
|
+
"json": {
|
|
202
|
+
"description": "Format output as json.",
|
|
203
|
+
"helpGroup": "GLOBAL",
|
|
204
|
+
"name": "json",
|
|
205
|
+
"allowNo": false,
|
|
206
|
+
"type": "boolean"
|
|
207
|
+
},
|
|
208
|
+
"flags-dir": {
|
|
209
|
+
"helpGroup": "GLOBAL",
|
|
210
|
+
"name": "flags-dir",
|
|
211
|
+
"summary": "Import flag values from a directory.",
|
|
212
|
+
"hasDynamicHelp": false,
|
|
213
|
+
"multiple": false,
|
|
214
|
+
"type": "option"
|
|
215
|
+
},
|
|
216
|
+
"org": {
|
|
217
|
+
"char": "o",
|
|
218
|
+
"description": "The target Salesforce org where the SharinPix permissions will be uploaded and stored.",
|
|
219
|
+
"name": "org",
|
|
220
|
+
"noCacheDefault": true,
|
|
221
|
+
"required": true,
|
|
222
|
+
"summary": "The Salesforce org to push SharinPix permissions to.",
|
|
223
|
+
"hasDynamicHelp": true,
|
|
224
|
+
"multiple": false,
|
|
225
|
+
"type": "option"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"hasDynamicHelp": true,
|
|
229
|
+
"hiddenAliases": [],
|
|
230
|
+
"id": "sharinpix:permission:push",
|
|
231
|
+
"pluginAlias": "@sharinpix/sharinpix-sf-cli",
|
|
232
|
+
"pluginName": "@sharinpix/sharinpix-sf-cli",
|
|
233
|
+
"pluginType": "core",
|
|
234
|
+
"strict": true,
|
|
235
|
+
"summary": "Push SharinPix permissions to Salesforce org.",
|
|
236
|
+
"enableJsonFlag": true,
|
|
237
|
+
"isESM": true,
|
|
238
|
+
"relativePath": [
|
|
239
|
+
"lib",
|
|
240
|
+
"commands",
|
|
241
|
+
"sharinpix",
|
|
242
|
+
"permission",
|
|
243
|
+
"push.js"
|
|
244
|
+
],
|
|
245
|
+
"aliasPermutations": [],
|
|
246
|
+
"permutations": [
|
|
247
|
+
"sharinpix:permission:push",
|
|
248
|
+
"permission:sharinpix:push",
|
|
249
|
+
"permission:push:sharinpix",
|
|
250
|
+
"sharinpix:push:permission",
|
|
251
|
+
"push:sharinpix:permission",
|
|
252
|
+
"push:permission:sharinpix"
|
|
253
|
+
]
|
|
128
254
|
}
|
|
129
255
|
},
|
|
130
|
-
"version": "1.
|
|
256
|
+
"version": "1.4.0"
|
|
131
257
|
}
|