@sharinpix/sharinpix-sf-cli 1.10.0 → 1.11.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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/@sharinpix/sharinpix-sf-cli.svg?label=@sharinpix/sharinpix-sf-cli)](https://www.npmjs.com/package/@sharinpix/sharinpix-sf-cli) [![Downloads/week](https://img.shields.io/npm/dw/@sharinpix/sharinpix-sf-cli.svg)](https://npmjs.org/package/@sharinpix/sharinpix-sf-cli) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/sharinpix/sharinpix-sf-cli/main/LICENSE.txt)
4
4
 
5
- The SharinPix Salesforce CLI plugin provides tools to interact with SharinPix form templates and permissions in your Salesforce orgs. This plugin allows you to pull and push form templates and permissions from/to your Salesforce org, saving them as local JSON files for version control and deployment management.
5
+ The SharinPix Salesforce CLI plugin provides tools to interact with SharinPix organization configuration, form templates, and permissions in your Salesforce orgs. This plugin allows you to pull and push configs, form templates, and permissions from/to your Salesforce org, saving them as local JSON files for version control and deployment management.
6
6
 
7
7
  ## Learn about `sf` plugins
8
8
 
@@ -40,15 +40,24 @@ We always recommend using the latest version of these commands bundled with the
40
40
  sf org login web
41
41
  sf plugins install @sharinpix/sharinpix-sf-cli
42
42
 
43
- # Pull form templates and permissions from Salesforce
43
+ # Pull all (configs, forms, and permissions) from Salesforce
44
+ sf sharinpix pull -o yourusername@salesforce.com
45
+
46
+ # Push all (configs, forms, and permissions) to Salesforce
47
+ sf sharinpix push -o yourusername@salesforce.com
48
+
49
+ # Pull individual components
50
+ sf sharinpix config pull -o yourusername@salesforce.com
44
51
  sf sharinpix form pull -o yourusername@salesforce.com
45
52
  sf sharinpix permission pull -o yourusername@salesforce.com
46
53
 
47
- # Push form templates and permissions to Salesforce
54
+ # Push individual components
55
+ sf sharinpix config push -o yourusername@salesforce.com
48
56
  sf sharinpix form push -o yourusername@salesforce.com
49
57
  sf sharinpix permission push -o yourusername@salesforce.com
50
58
 
51
- # Push with deletion of orphaned records (records that exist in Salesforce but have no corresponding local files)
59
+ # Push with deletion of orphaned records (for forms and permissions only)
60
+ sf sharinpix push -o yourusername@salesforce.com --delete
52
61
  sf sharinpix form push -o yourusername@salesforce.com --delete
53
62
  sf sharinpix permission push -o yourusername@salesforce.com -d
54
63
  ```
@@ -92,6 +101,8 @@ To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file.
92
101
 
93
102
  ```bash
94
103
  # Run using local run file.
104
+ ./bin/dev sharinpix pull --target-org myorg@example.com
105
+ ./bin/dev sharinpix config pull --target-org myorg@example.com
95
106
  ./bin/dev sharinpix form pull --target-org myorg@example.com
96
107
  ./bin/dev sharinpix permission pull --target-org myorg@example.com
97
108
  ```
@@ -127,6 +138,8 @@ Both `form push` and `permission push` commands support a `--delete/-d` flag tha
127
138
  ## Commands
128
139
 
129
140
  <!-- commands -->
141
+ * [`sf sharinpix config pull`](#sf-sharinpix-config-pull)
142
+ * [`sf sharinpix config push`](#sf-sharinpix-config-push)
130
143
  * [`sf sharinpix form csv2json`](#sf-sharinpix-form-csv2json)
131
144
  * [`sf sharinpix form json2csv`](#sf-sharinpix-form-json2csv)
132
145
  * [`sf sharinpix form pull`](#sf-sharinpix-form-pull)
@@ -135,6 +148,80 @@ Both `form push` and `permission push` commands support a `--delete/-d` flag tha
135
148
  * [`sf sharinpix permission push`](#sf-sharinpix-permission-push)
136
149
  * [`sf sharinpix pull`](#sf-sharinpix-pull)
137
150
  * [`sf sharinpix push`](#sf-sharinpix-push)
151
+ * [`sf sharinpix settings`](#sf-sharinpix-settings)
152
+
153
+ ## `sf sharinpix config pull`
154
+
155
+ Pull organization config from SharinPix API.
156
+
157
+ ```
158
+ USAGE
159
+ $ sf sharinpix config pull -o <value> [--json] [--flags-dir <value>]
160
+
161
+ FLAGS
162
+ -o, --org=<value> (required) The Salesforce org to authenticate with.
163
+
164
+ GLOBAL FLAGS
165
+ --flags-dir=<value> Import flag values from a directory.
166
+ --json Format output as json.
167
+
168
+ DESCRIPTION
169
+ Pull organization config from SharinPix API.
170
+
171
+ Downloads the organization configuration from the SharinPix API and saves it to a local JSON file. This command
172
+ connects to your Salesforce org to obtain an authentication token, then fetches the config from the SharinPix API
173
+ endpoint.
174
+
175
+ EXAMPLES
176
+ Pull organization config using the default org:
177
+
178
+ $ sf sharinpix config pull
179
+
180
+ Pull organization config from a specific org:
181
+
182
+ $ sf sharinpix config pull --target-org myorg@example.com
183
+
184
+ FLAG DESCRIPTIONS
185
+ -o, --org=<value> The Salesforce org to authenticate with.
186
+
187
+ The Salesforce org used to obtain the authentication token for accessing the SharinPix API.
188
+ ```
189
+
190
+ ## `sf sharinpix config push`
191
+
192
+ Push organization config to SharinPix API.
193
+
194
+ ```
195
+ USAGE
196
+ $ sf sharinpix config push -o <value> [--json] [--flags-dir <value>]
197
+
198
+ FLAGS
199
+ -o, --org=<value> (required) The Salesforce org to authenticate with.
200
+
201
+ GLOBAL FLAGS
202
+ --flags-dir=<value> Import flag values from a directory.
203
+ --json Format output as json.
204
+
205
+ DESCRIPTION
206
+ Push organization config to SharinPix API.
207
+
208
+ Uploads the organization configuration from a local JSON file to the SharinPix API. This command connects to your
209
+ Salesforce org to obtain an authentication token, then pushes the config to the SharinPix API endpoint.
210
+
211
+ EXAMPLES
212
+ Push organization config using the default org:
213
+
214
+ $ sf sharinpix config push
215
+
216
+ Push organization config to a specific org:
217
+
218
+ $ sf sharinpix config push --target-org myorg@example.com
219
+
220
+ FLAG DESCRIPTIONS
221
+ -o, --org=<value> The Salesforce org to authenticate with.
222
+
223
+ The Salesforce org used to obtain the authentication token for accessing the SharinPix API.
224
+ ```
138
225
 
139
226
  ## `sf sharinpix form csv2json`
140
227
 
@@ -454,4 +541,36 @@ FLAG DESCRIPTIONS
454
541
 
455
542
  The target Salesforce org where the SharinPix assets will be pushed.
456
543
  ```
544
+
545
+ ## `sf sharinpix settings`
546
+
547
+ Open the SharinPix settings page in a Salesforce org.
548
+
549
+ ```
550
+ USAGE
551
+ $ sf sharinpix settings -o <value> [--json] [--flags-dir <value>]
552
+
553
+ FLAGS
554
+ -o, --org=<value> (required) The Salesforce org to open.
555
+
556
+ GLOBAL FLAGS
557
+ --flags-dir=<value> Import flag values from a directory.
558
+ --json Format output as json.
559
+
560
+ DESCRIPTION
561
+ Open the SharinPix settings page in a Salesforce org.
562
+
563
+ Opens the SharinPix settings Lightning page in your default browser for the specified Salesforce org. This command is
564
+ a convenience wrapper around `sf org open` with the path set to `/lightning/n/sharinpix__SharinPix_setting`.
565
+
566
+ EXAMPLES
567
+ Open the SharinPix settings page for a specific org:
568
+
569
+ $ sf sharinpix settings --target-org myorg@example.com
570
+
571
+ FLAG DESCRIPTIONS
572
+ -o, --org=<value> The Salesforce org to open.
573
+
574
+ The target Salesforce org (username or alias) where the SharinPix settings page should be opened.
575
+ ```
457
576
  <!-- commandsstop -->
@@ -0,0 +1,18 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ import { Org } from '@salesforce/core';
3
+ export type PullResult = {
4
+ name: string;
5
+ success?: boolean;
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<Org, import("@oclif/core/interfaces").CustomOptions>;
13
+ };
14
+ run(): Promise<PullResult>;
15
+ runWithFlags(flags: {
16
+ org: Org;
17
+ }): Promise<PullResult>;
18
+ }
@@ -0,0 +1,60 @@
1
+ /* eslint-disable no-console */
2
+ import fs from 'node:fs';
3
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
4
+ import { Messages } from '@salesforce/core';
5
+ import { formatErrorMessage } from '../../../helpers/utils.js';
6
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
7
+ const messages = Messages.loadMessages('@sharinpix/sharinpix-sf-cli', 'sharinpix.config.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
+ return this.runWithFlags(flags);
22
+ }
23
+ async runWithFlags(flags) {
24
+ const connection = flags.org.getConnection('63.0');
25
+ fs.mkdirSync('sharinpix/configs', { recursive: true });
26
+ try {
27
+ // Get authentication token
28
+ const body = {
29
+ // eslint-disable-next-line camelcase
30
+ form_template_create: true,
31
+ };
32
+ const responseToken = await connection.apex.post('/sharinpix/Token', {
33
+ payload: JSON.stringify(body),
34
+ });
35
+ // Fetch config from API
36
+ const response = await fetch(`${responseToken.host}/api/v1/organization/config`, {
37
+ method: 'GET',
38
+ headers: {
39
+ Accept: 'application/json',
40
+ Authorization: `Bearer ${responseToken.token}`,
41
+ },
42
+ });
43
+ if (!response.ok) {
44
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
45
+ }
46
+ const config = await response.json();
47
+ // Save to local file
48
+ fs.writeFileSync('sharinpix/config.json', JSON.stringify(config, null, 2));
49
+ this.log(messages.getMessage('info.success'));
50
+ return {
51
+ name: 'OK',
52
+ success: true,
53
+ };
54
+ }
55
+ catch (error) {
56
+ this.error(messages.getMessage('error.failed', [formatErrorMessage(error)]));
57
+ }
58
+ }
59
+ }
60
+ //# sourceMappingURL=pull.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pull.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/config/pull.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE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: boolean;
6
+ };
7
+ export default class Push extends SfCommand<PushResult> {
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<Org, import("@oclif/core/interfaces").CustomOptions>;
13
+ };
14
+ run(): Promise<PushResult>;
15
+ runWithFlags(flags: {
16
+ org: Org;
17
+ }): Promise<PushResult>;
18
+ }
@@ -0,0 +1,59 @@
1
+ /* eslint-disable no-console */
2
+ import fs from 'node:fs';
3
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
4
+ import { Messages } from '@salesforce/core';
5
+ import { formatErrorMessage } from '../../../helpers/utils.js';
6
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
7
+ const messages = Messages.loadMessages('@sharinpix/sharinpix-sf-cli', 'sharinpix.config.push');
8
+ export default class Push 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(Push);
21
+ return this.runWithFlags(flags);
22
+ }
23
+ async runWithFlags(flags) {
24
+ const connection = flags.org.getConnection('63.0');
25
+ try {
26
+ // Read local config file
27
+ if (!fs.existsSync('sharinpix/config.json')) {
28
+ this.error(messages.getMessage('error.notFound'));
29
+ }
30
+ const configContent = fs.readFileSync('sharinpix/config.json', 'utf-8');
31
+ const config = JSON.parse(configContent);
32
+ const responseToken = await connection.apex.post('/sharinpix/Token', {
33
+ payload: JSON.stringify({}),
34
+ });
35
+ // Push config to API
36
+ const response = await fetch(`${responseToken.host}/api/v1/organization/config`, {
37
+ method: 'PUT',
38
+ body: JSON.stringify(config),
39
+ headers: {
40
+ 'Content-Type': 'application/json',
41
+ Accept: '*/*',
42
+ Authorization: `Token token="${responseToken.token}"`,
43
+ },
44
+ });
45
+ if (!response.ok) {
46
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
47
+ }
48
+ this.log(messages.getMessage('info.success'));
49
+ return {
50
+ name: 'OK',
51
+ success: true,
52
+ };
53
+ }
54
+ catch (error) {
55
+ this.error(messages.getMessage('error.failed', [formatErrorMessage(error)]));
56
+ }
57
+ }
58
+ }
59
+ //# sourceMappingURL=push.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/config/push.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,uBAAuB,CAAC,CAAC;AAO/F,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,SAAqB;IAC9C,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC;YACrB,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC;YACjD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CA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Q,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;YACrE,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;YAE9C,OAAO;gBACL,IAAI,EAAE,IAAI;gBACV,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { SfCommand } from '@salesforce/sf-plugins-core';
2
2
  export type PullResult = {
3
+ configs: unknown;
3
4
  forms: unknown;
4
5
  permissions: unknown;
5
6
  };
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable no-console */
2
2
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
3
3
  import { Messages } from '@salesforce/core';
4
+ import ConfigPull from './config/pull.js';
4
5
  import FormPull from './form/pull.js';
5
6
  import PermissionPull from './permission/pull.js';
6
7
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
@@ -18,13 +19,18 @@ export default class Pull extends SfCommand {
18
19
  };
19
20
  async run() {
20
21
  const { flags } = await this.parse(Pull);
21
- this.log('Pulling forms...');
22
+ this.log('Pulling configs...');
23
+ const configPull = new ConfigPull(this.argv, this.config);
24
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
25
+ const configsResult = await configPull.runWithFlags(flags);
26
+ this.log('\nPulling forms...');
22
27
  const formPull = new FormPull(this.argv, this.config);
23
28
  const formsResult = await formPull.runWithFlags(flags);
24
29
  this.log('\nPulling permissions...');
25
30
  const permissionPull = new PermissionPull(this.argv, this.config);
26
31
  const permissionsResult = await permissionPull.runWithFlags(flags);
27
32
  return {
33
+ configs: configsResult,
28
34
  forms: formsResult,
29
35
  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
1
1
  /* eslint-disable no-console */
2
2
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
3
3
  import { Messages } from '@salesforce/core';
4
+ import ConfigPush from './config/push.js';
4
5
  import FormPush from './form/push.js';
5
6
  import PermissionPush from './permission/push.js';
6
7
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
@@ -24,7 +25,11 @@ export default class Push extends SfCommand {
24
25
  };
25
26
  async run() {
26
27
  const { flags } = await this.parse(Push);
27
- this.log('Pushing forms...');
28
+ this.log('Pushing configs...');
29
+ const configPush = new ConfigPush(this.argv, this.config);
30
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
31
+ const configsResult = await configPush.runWithFlags(flags);
32
+ this.log('\nPushing forms...');
28
33
  const formPush = new FormPush(this.argv, this.config);
29
34
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
30
35
  const formsResult = await formPush.runWithFlags(flags);
@@ -33,6 +38,7 @@ export default class Push extends SfCommand {
33
38
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
34
39
  const permissionsResult = await permissionPush.runWithFlags(flags);
35
40
  return {
41
+ configs: configsResult,
36
42
  forms: formsResult,
37
43
  permissions: permissionsResult,
38
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"push.js","sourceRoot":"","sources":["../../../src/commands/sharinpix/push.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,cAAc,MAAM,sBAAsB,CAAC;AAElD,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,gBAAgB,CAAC,CAA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O,EAAE,QAAQ,CAAC,UAAU,CAAC,sBAAsB,CAAC;YACpD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;YAC5D,OAAO,EAAE,KAAK;SACf,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEzC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAC/B,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1D,sGAAsG;QACtG,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAE3D,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAC/B,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACtD,mEAAmE;QACnE,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAEvD,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;QACrC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAClE,mEAAmE;QACnE,MAAM,iBAAiB,GAAG,MAAM,cAAc,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QAEnE,OAAO;YACL,OAAO,EAAE,aAAa;YACtB,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,iBAAiB;SAC/B,CAAC;IACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export default class Settings extends SfCommand<void> {
3
+ static readonly summary: string;
4
+ static readonly description: string;
5
+ static readonly examples: string[];
6
+ static readonly flags: {
7
+ org: import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
8
+ };
9
+ run(): Promise<void>;
10
+ }
@@ -0,0 +1,24 @@
1
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
2
+ import { Messages } from '@salesforce/core';
3
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
4
+ const messages = Messages.loadMessages('@sharinpix/sharinpix-sf-cli', 'sharinpix.settings');
5
+ const SHARINPIX_SETTINGS_PATH = '/lightning/n/sharinpix__SharinPix_setting';
6
+ export default class Settings extends SfCommand {
7
+ static summary = messages.getMessage('summary');
8
+ static description = messages.getMessage('description');
9
+ static examples = messages.getMessages('examples');
10
+ static flags = {
11
+ org: Flags.requiredOrg({
12
+ char: 'o',
13
+ summary: messages.getMessage('flags.org.summary'),
14
+ description: messages.getMessage('flags.org.description'),
15
+ }),
16
+ };
17
+ async run() {
18
+ const { flags } = await this.parse(Settings);
19
+ const targetOrg = flags.org.getUsername();
20
+ if (targetOrg)
21
+ await this.config.runCommand('org:open', ['--target-org', targetOrg, '--path', SHARINPIX_SETTINGS_PATH]);
22
+ }
23
+ }
24
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/commands/sharinpix/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,oBAAoB,CAAC,CAAC;AAE5F,MAAM,uBAAuB,GAAG,2CAA2C,CAAC;AAE5E,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAe;IAC5C,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC;YACrB,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC;YACjD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC;SAC1D,CAAC;KACH,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAC1C,IAAI,SAAS;YACX,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAC7G,CAAC"}
@@ -0,0 +1,37 @@
1
+ # summary
2
+
3
+ Pull organization config from SharinPix API.
4
+
5
+ # description
6
+
7
+ Downloads the organization configuration from the SharinPix API and saves it to a local JSON file. This command connects to your Salesforce org to obtain an authentication token, then fetches the config from the SharinPix API endpoint.
8
+
9
+ # flags.org.summary
10
+
11
+ The Salesforce org to authenticate with.
12
+
13
+ # flags.org.description
14
+
15
+ The Salesforce org used to obtain the authentication token for accessing the SharinPix API.
16
+
17
+ # examples
18
+
19
+ - Pull organization config using the default org:
20
+
21
+ <%= config.bin %> <%= command.id %>
22
+
23
+ - Pull organization config from a specific org:
24
+
25
+ <%= config.bin %> <%= command.id %> --target-org myorg@example.com
26
+
27
+ # info.success
28
+
29
+ Successfully pulled organization config to sharinpix/config.json
30
+
31
+ # error.failed
32
+
33
+ Failed to pull organization config: %s
34
+
35
+ # error.notFound
36
+
37
+ Config file not found at sharinpix/config.json
@@ -0,0 +1,37 @@
1
+ # summary
2
+
3
+ Push organization config to SharinPix API.
4
+
5
+ # description
6
+
7
+ Uploads the organization configuration from a local JSON file to the SharinPix API. This command connects to your Salesforce org to obtain an authentication token, then pushes the config to the SharinPix API endpoint.
8
+
9
+ # flags.org.summary
10
+
11
+ The Salesforce org to authenticate with.
12
+
13
+ # flags.org.description
14
+
15
+ The Salesforce org used to obtain the authentication token for accessing the SharinPix API.
16
+
17
+ # examples
18
+
19
+ - Push organization config using the default org:
20
+
21
+ <%= config.bin %> <%= command.id %>
22
+
23
+ - Push organization config to a specific org:
24
+
25
+ <%= config.bin %> <%= command.id %> --target-org myorg@example.com
26
+
27
+ # info.success
28
+
29
+ Successfully pushed organization config to SharinPix API
30
+
31
+ # error.failed
32
+
33
+ Failed to push organization config: %s
34
+
35
+ # error.notFound
36
+
37
+ Config file not found at sharinpix/config.json. Run 'sharinpix:config:pull' first or create the file manually.
@@ -0,0 +1,22 @@
1
+ # summary
2
+
3
+ Open the SharinPix settings page in a Salesforce org.
4
+
5
+ # description
6
+
7
+ Opens the SharinPix settings Lightning page in your default browser for the specified Salesforce org. This command is a convenience wrapper around `sf org open` with the path set to `/lightning/n/sharinpix__SharinPix_setting`.
8
+
9
+ # flags.org.summary
10
+
11
+ The Salesforce org to open.
12
+
13
+ # flags.org.description
14
+
15
+ The target Salesforce org (username or alias) where the SharinPix settings page should be opened.
16
+
17
+ # examples
18
+
19
+ - Open the SharinPix settings page for a specific org:
20
+
21
+ <%= config.bin %> <%= command.id %> --target-org myorg@example.com
22
+
@@ -125,12 +125,12 @@
125
125
  "push:sharinpix"
126
126
  ]
127
127
  },
128
- "sharinpix:form:csv2json": {
128
+ "sharinpix:settings": {
129
129
  "aliases": [],
130
130
  "args": {},
131
- "description": "Scans the local `sharinpix/forms` directory for SharinPix form CSV definition files and generates corresponding JSON files. Each CSV file is expected to have a header row of element keys and one row per element, as produced by the json2csv command.",
131
+ "description": "Opens the SharinPix settings Lightning page in your default browser for the specified Salesforce org. This command is a convenience wrapper around `sf org open` with the path set to `/lightning/n/sharinpix__SharinPix_setting`.",
132
132
  "examples": [
133
- "Generate JSON files for all local SharinPix form CSV definitions:\n<%= config.bin %> <%= command.id %>"
133
+ "Open the SharinPix settings page for a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com"
134
134
  ],
135
135
  "flags": {
136
136
  "json": {
@@ -147,41 +147,48 @@
147
147
  "hasDynamicHelp": false,
148
148
  "multiple": false,
149
149
  "type": "option"
150
+ },
151
+ "org": {
152
+ "char": "o",
153
+ "description": "The target Salesforce org (username or alias) where the SharinPix settings page should be opened.",
154
+ "name": "org",
155
+ "noCacheDefault": true,
156
+ "required": true,
157
+ "summary": "The Salesforce org to open.",
158
+ "hasDynamicHelp": true,
159
+ "multiple": false,
160
+ "type": "option"
150
161
  }
151
162
  },
152
- "hasDynamicHelp": false,
163
+ "hasDynamicHelp": true,
153
164
  "hiddenAliases": [],
154
- "id": "sharinpix:form:csv2json",
165
+ "id": "sharinpix:settings",
155
166
  "pluginAlias": "@sharinpix/sharinpix-sf-cli",
156
167
  "pluginName": "@sharinpix/sharinpix-sf-cli",
157
168
  "pluginType": "core",
158
169
  "strict": true,
159
- "summary": "Generate JSON files from SharinPix form CSV definitions.",
170
+ "summary": "Open the SharinPix settings page in a Salesforce org.",
160
171
  "enableJsonFlag": true,
161
172
  "isESM": true,
162
173
  "relativePath": [
163
174
  "lib",
164
175
  "commands",
165
176
  "sharinpix",
166
- "form",
167
- "csv2json.js"
177
+ "settings.js"
168
178
  ],
169
179
  "aliasPermutations": [],
170
180
  "permutations": [
171
- "sharinpix:form:csv2json",
172
- "form:sharinpix:csv2json",
173
- "form:csv2json:sharinpix",
174
- "sharinpix:csv2json:form",
175
- "csv2json:sharinpix:form",
176
- "csv2json:form:sharinpix"
181
+ "sharinpix:settings",
182
+ "settings:sharinpix"
177
183
  ]
178
184
  },
179
- "sharinpix:form:json2csv": {
185
+ "sharinpix:config:pull": {
180
186
  "aliases": [],
181
187
  "args": {},
182
- "description": "Scans the local `sharinpix/forms` directory for SharinPix form JSON definition files and generates corresponding CSV files. The CSV files contain a header row built from all element keys and one row per element. Nested values are stringified.",
188
+ "description": "Downloads the organization configuration from the SharinPix API and saves it to a local JSON file. This command connects to your Salesforce org to obtain an authentication token, then fetches the config from the SharinPix API endpoint.",
183
189
  "examples": [
184
- "Generate CSV files for all local SharinPix form JSON definitions:\n<%= config.bin %> <%= command.id %>"
190
+ "Pull organization config using the default org:\n<%= config.bin %> <%= command.id %>",
191
+ "Pull organization config from a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com"
185
192
  ],
186
193
  "flags": {
187
194
  "json": {
@@ -198,43 +205,53 @@
198
205
  "hasDynamicHelp": false,
199
206
  "multiple": false,
200
207
  "type": "option"
208
+ },
209
+ "org": {
210
+ "char": "o",
211
+ "description": "The Salesforce org used to obtain the authentication token for accessing the SharinPix API.",
212
+ "name": "org",
213
+ "noCacheDefault": true,
214
+ "required": true,
215
+ "summary": "The Salesforce org to authenticate with.",
216
+ "hasDynamicHelp": true,
217
+ "multiple": false,
218
+ "type": "option"
201
219
  }
202
220
  },
203
- "hasDynamicHelp": false,
221
+ "hasDynamicHelp": true,
204
222
  "hiddenAliases": [],
205
- "id": "sharinpix:form:json2csv",
223
+ "id": "sharinpix:config:pull",
206
224
  "pluginAlias": "@sharinpix/sharinpix-sf-cli",
207
225
  "pluginName": "@sharinpix/sharinpix-sf-cli",
208
226
  "pluginType": "core",
209
227
  "strict": true,
210
- "summary": "Generate CSV files from SharinPix form JSON definitions.",
228
+ "summary": "Pull organization config from SharinPix API.",
211
229
  "enableJsonFlag": true,
212
230
  "isESM": true,
213
231
  "relativePath": [
214
232
  "lib",
215
233
  "commands",
216
234
  "sharinpix",
217
- "form",
218
- "json2csv.js"
235
+ "config",
236
+ "pull.js"
219
237
  ],
220
238
  "aliasPermutations": [],
221
239
  "permutations": [
222
- "sharinpix:form:json2csv",
223
- "form:sharinpix:json2csv",
224
- "form:json2csv:sharinpix",
225
- "sharinpix:json2csv:form",
226
- "json2csv:sharinpix:form",
227
- "json2csv:form:sharinpix"
240
+ "sharinpix:config:pull",
241
+ "config:sharinpix:pull",
242
+ "config:pull:sharinpix",
243
+ "sharinpix:pull:config",
244
+ "pull:sharinpix:config",
245
+ "pull:config:sharinpix"
228
246
  ]
229
247
  },
230
- "sharinpix:form:pull": {
248
+ "sharinpix:config:push": {
231
249
  "aliases": [],
232
250
  "args": {},
233
- "description": "Retrieves all SharinPix form templates from the connected Salesforce org and saves them as JSON files in the local sharinpix/forms directory. This command fetches the form template metadata and downloads the actual form definition files.",
251
+ "description": "Uploads the organization configuration from a local JSON file to the SharinPix API. This command connects to your Salesforce org to obtain an authentication token, then pushes the config to the SharinPix API endpoint.",
234
252
  "examples": [
235
- "Pull all form templates from the default org:\n<%= config.bin %> <%= command.id %>",
236
- "Pull form templates from a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com",
237
- "Pull form templates and also generate CSV files:\n<%= config.bin %> <%= command.id %> --csv"
253
+ "Push organization config using the default org:\n<%= config.bin %> <%= command.id %>",
254
+ "Push organization config to a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com"
238
255
  ],
239
256
  "flags": {
240
257
  "json": {
@@ -254,60 +271,114 @@
254
271
  },
255
272
  "org": {
256
273
  "char": "o",
257
- "description": "The target Salesforce org containing the SharinPix form templates to be pulled.",
274
+ "description": "The Salesforce org used to obtain the authentication token for accessing the SharinPix API.",
258
275
  "name": "org",
259
276
  "noCacheDefault": true,
260
277
  "required": true,
261
- "summary": "The Salesforce org to pull form templates from.",
278
+ "summary": "The Salesforce org to authenticate with.",
262
279
  "hasDynamicHelp": true,
263
280
  "multiple": false,
264
281
  "type": "option"
265
- },
266
- "csv": {
267
- "char": "c",
268
- "description": "When enabled, after downloading all form templates as JSON into `sharinpix/forms`, the command runs the JSON-to-CSV conversion (same as `sharinpix:form:json2csv`).",
269
- "name": "csv",
270
- "summary": "Also generate CSV files from the downloaded JSON form definitions.",
282
+ }
283
+ },
284
+ "hasDynamicHelp": true,
285
+ "hiddenAliases": [],
286
+ "id": "sharinpix:config:push",
287
+ "pluginAlias": "@sharinpix/sharinpix-sf-cli",
288
+ "pluginName": "@sharinpix/sharinpix-sf-cli",
289
+ "pluginType": "core",
290
+ "strict": true,
291
+ "summary": "Push organization config to SharinPix API.",
292
+ "enableJsonFlag": true,
293
+ "isESM": true,
294
+ "relativePath": [
295
+ "lib",
296
+ "commands",
297
+ "sharinpix",
298
+ "config",
299
+ "push.js"
300
+ ],
301
+ "aliasPermutations": [],
302
+ "permutations": [
303
+ "sharinpix:config:push",
304
+ "config:sharinpix:push",
305
+ "config:push:sharinpix",
306
+ "sharinpix:push:config",
307
+ "push:sharinpix:config",
308
+ "push:config:sharinpix"
309
+ ]
310
+ },
311
+ "sharinpix:permission:pull": {
312
+ "aliases": [],
313
+ "args": {},
314
+ "description": "Retrieves all SharinPix permissions from the connected Salesforce org and saves them as JSON files in the local sharinpix/permissions directory. This command fetches the permission metadata and the JSON configuration data stored in the sharinpix**Json**c field.",
315
+ "examples": [
316
+ "Pull all SharinPix permissions from the default org:\n<%= config.bin %> <%= command.id %>",
317
+ "Pull SharinPix permissions from a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com"
318
+ ],
319
+ "flags": {
320
+ "json": {
321
+ "description": "Format output as json.",
322
+ "helpGroup": "GLOBAL",
323
+ "name": "json",
271
324
  "allowNo": false,
272
325
  "type": "boolean"
326
+ },
327
+ "flags-dir": {
328
+ "helpGroup": "GLOBAL",
329
+ "name": "flags-dir",
330
+ "summary": "Import flag values from a directory.",
331
+ "hasDynamicHelp": false,
332
+ "multiple": false,
333
+ "type": "option"
334
+ },
335
+ "org": {
336
+ "char": "o",
337
+ "description": "The target Salesforce org containing the SharinPix permissions to be pulled.",
338
+ "name": "org",
339
+ "noCacheDefault": true,
340
+ "required": true,
341
+ "summary": "The Salesforce org to pull SharinPix permissions from.",
342
+ "hasDynamicHelp": true,
343
+ "multiple": false,
344
+ "type": "option"
273
345
  }
274
346
  },
275
347
  "hasDynamicHelp": true,
276
348
  "hiddenAliases": [],
277
- "id": "sharinpix:form:pull",
349
+ "id": "sharinpix:permission:pull",
278
350
  "pluginAlias": "@sharinpix/sharinpix-sf-cli",
279
351
  "pluginName": "@sharinpix/sharinpix-sf-cli",
280
352
  "pluginType": "core",
281
353
  "strict": true,
282
- "summary": "Pull SharinPix form templates from Salesforce org.",
354
+ "summary": "Pull SharinPix permissions from Salesforce org.",
283
355
  "enableJsonFlag": true,
284
356
  "isESM": true,
285
357
  "relativePath": [
286
358
  "lib",
287
359
  "commands",
288
360
  "sharinpix",
289
- "form",
361
+ "permission",
290
362
  "pull.js"
291
363
  ],
292
364
  "aliasPermutations": [],
293
365
  "permutations": [
294
- "sharinpix:form:pull",
295
- "form:sharinpix:pull",
296
- "form:pull:sharinpix",
297
- "sharinpix:pull:form",
298
- "pull:sharinpix:form",
299
- "pull:form:sharinpix"
366
+ "sharinpix:permission:pull",
367
+ "permission:sharinpix:pull",
368
+ "permission:pull:sharinpix",
369
+ "sharinpix:pull:permission",
370
+ "pull:sharinpix:permission",
371
+ "pull:permission:sharinpix"
300
372
  ]
301
373
  },
302
- "sharinpix:form:push": {
374
+ "sharinpix:permission:push": {
303
375
  "aliases": [],
304
376
  "args": {},
305
- "description": "Uploads SharinPix form templates from local JSON files to the connected Salesforce org. This command reads form templates from the local directory and creates or updates corresponding records in Salesforce. Existing forms will be updated unless the force flag is used to skip them.",
377
+ "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.",
306
378
  "examples": [
307
- "Push all form templates to the default org:\n<%= config.bin %> <%= command.id %>",
308
- "Push form templates to a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com",
309
- "Push form templates and delete orphaned records:\n<%= config.bin %> <%= command.id %> --delete",
310
- "Convert CSV to JSON, then push:\n<%= config.bin %> <%= command.id %> --csv"
379
+ "Push all SharinPix permissions to the default org:\n<%= config.bin %> <%= command.id %>",
380
+ "Push SharinPix permissions to a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com",
381
+ "Push SharinPix permissions and delete orphaned records:\n<%= config.bin %> <%= command.id %> --delete"
311
382
  ],
312
383
  "flags": {
313
384
  "json": {
@@ -327,40 +398,134 @@
327
398
  },
328
399
  "org": {
329
400
  "char": "o",
330
- "description": "The target Salesforce org where the SharinPix form templates will be uploaded and stored.",
401
+ "description": "The target Salesforce org where the SharinPix permissions will be uploaded and stored.",
331
402
  "name": "org",
332
403
  "noCacheDefault": true,
333
404
  "required": true,
334
- "summary": "The Salesforce org to push form templates to.",
405
+ "summary": "The Salesforce org to push SharinPix permissions to.",
335
406
  "hasDynamicHelp": true,
336
407
  "multiple": false,
337
408
  "type": "option"
338
409
  },
339
410
  "delete": {
340
411
  "char": "d",
341
- "description": "When enabled, this flag will delete form template records from the Salesforce org if their corresponding local JSON files are missing. Use with caution as this operation cannot be undone.",
412
+ "description": "When enabled, this flag will delete SharinPix permission records from the Salesforce org if their corresponding local JSON files are missing. Use with caution as this operation cannot be undone.",
342
413
  "name": "delete",
343
- "summary": "Delete form templates from org that no longer have corresponding local files.",
414
+ "summary": "Delete SharinPix permissions from org that no longer have corresponding local files.",
415
+ "allowNo": false,
416
+ "type": "boolean"
417
+ }
418
+ },
419
+ "hasDynamicHelp": true,
420
+ "hiddenAliases": [],
421
+ "id": "sharinpix:permission:push",
422
+ "pluginAlias": "@sharinpix/sharinpix-sf-cli",
423
+ "pluginName": "@sharinpix/sharinpix-sf-cli",
424
+ "pluginType": "core",
425
+ "strict": true,
426
+ "summary": "Push SharinPix permissions to Salesforce org.",
427
+ "enableJsonFlag": true,
428
+ "isESM": true,
429
+ "relativePath": [
430
+ "lib",
431
+ "commands",
432
+ "sharinpix",
433
+ "permission",
434
+ "push.js"
435
+ ],
436
+ "aliasPermutations": [],
437
+ "permutations": [
438
+ "sharinpix:permission:push",
439
+ "permission:sharinpix:push",
440
+ "permission:push:sharinpix",
441
+ "sharinpix:push:permission",
442
+ "push:sharinpix:permission",
443
+ "push:permission:sharinpix"
444
+ ]
445
+ },
446
+ "sharinpix:form:csv2json": {
447
+ "aliases": [],
448
+ "args": {},
449
+ "description": "Scans the local `sharinpix/forms` directory for SharinPix form CSV definition files and generates corresponding JSON files. Each CSV file is expected to have a header row of element keys and one row per element, as produced by the json2csv command.",
450
+ "examples": [
451
+ "Generate JSON files for all local SharinPix form CSV definitions:\n<%= config.bin %> <%= command.id %>"
452
+ ],
453
+ "flags": {
454
+ "json": {
455
+ "description": "Format output as json.",
456
+ "helpGroup": "GLOBAL",
457
+ "name": "json",
344
458
  "allowNo": false,
345
459
  "type": "boolean"
346
460
  },
347
- "csv": {
348
- "char": "c",
349
- "description": "When enabled, the command first runs the CSV-to-JSON conversion (same as `sharinpix:form:csv2json`) on files in `sharinpix/forms`, then proceeds to push the resulting JSON files.",
350
- "name": "csv",
351
- "summary": "Convert local CSV files to JSON before pushing.",
461
+ "flags-dir": {
462
+ "helpGroup": "GLOBAL",
463
+ "name": "flags-dir",
464
+ "summary": "Import flag values from a directory.",
465
+ "hasDynamicHelp": false,
466
+ "multiple": false,
467
+ "type": "option"
468
+ }
469
+ },
470
+ "hasDynamicHelp": false,
471
+ "hiddenAliases": [],
472
+ "id": "sharinpix:form:csv2json",
473
+ "pluginAlias": "@sharinpix/sharinpix-sf-cli",
474
+ "pluginName": "@sharinpix/sharinpix-sf-cli",
475
+ "pluginType": "core",
476
+ "strict": true,
477
+ "summary": "Generate JSON files from SharinPix form CSV definitions.",
478
+ "enableJsonFlag": true,
479
+ "isESM": true,
480
+ "relativePath": [
481
+ "lib",
482
+ "commands",
483
+ "sharinpix",
484
+ "form",
485
+ "csv2json.js"
486
+ ],
487
+ "aliasPermutations": [],
488
+ "permutations": [
489
+ "sharinpix:form:csv2json",
490
+ "form:sharinpix:csv2json",
491
+ "form:csv2json:sharinpix",
492
+ "sharinpix:csv2json:form",
493
+ "csv2json:sharinpix:form",
494
+ "csv2json:form:sharinpix"
495
+ ]
496
+ },
497
+ "sharinpix:form:json2csv": {
498
+ "aliases": [],
499
+ "args": {},
500
+ "description": "Scans the local `sharinpix/forms` directory for SharinPix form JSON definition files and generates corresponding CSV files. The CSV files contain a header row built from all element keys and one row per element. Nested values are stringified.",
501
+ "examples": [
502
+ "Generate CSV files for all local SharinPix form JSON definitions:\n<%= config.bin %> <%= command.id %>"
503
+ ],
504
+ "flags": {
505
+ "json": {
506
+ "description": "Format output as json.",
507
+ "helpGroup": "GLOBAL",
508
+ "name": "json",
352
509
  "allowNo": false,
353
510
  "type": "boolean"
511
+ },
512
+ "flags-dir": {
513
+ "helpGroup": "GLOBAL",
514
+ "name": "flags-dir",
515
+ "summary": "Import flag values from a directory.",
516
+ "hasDynamicHelp": false,
517
+ "multiple": false,
518
+ "type": "option"
354
519
  }
355
520
  },
356
- "hasDynamicHelp": true,
521
+ "hasDynamicHelp": false,
357
522
  "hiddenAliases": [],
358
- "id": "sharinpix:form:push",
523
+ "id": "sharinpix:form:json2csv",
359
524
  "pluginAlias": "@sharinpix/sharinpix-sf-cli",
360
525
  "pluginName": "@sharinpix/sharinpix-sf-cli",
361
526
  "pluginType": "core",
362
527
  "strict": true,
363
- "summary": "Push SharinPix form templates to Salesforce org.",
528
+ "summary": "Generate CSV files from SharinPix form JSON definitions.",
364
529
  "enableJsonFlag": true,
365
530
  "isESM": true,
366
531
  "relativePath": [
@@ -368,25 +533,26 @@
368
533
  "commands",
369
534
  "sharinpix",
370
535
  "form",
371
- "push.js"
536
+ "json2csv.js"
372
537
  ],
373
538
  "aliasPermutations": [],
374
539
  "permutations": [
375
- "sharinpix:form:push",
376
- "form:sharinpix:push",
377
- "form:push:sharinpix",
378
- "sharinpix:push:form",
379
- "push:sharinpix:form",
380
- "push:form:sharinpix"
540
+ "sharinpix:form:json2csv",
541
+ "form:sharinpix:json2csv",
542
+ "form:json2csv:sharinpix",
543
+ "sharinpix:json2csv:form",
544
+ "json2csv:sharinpix:form",
545
+ "json2csv:form:sharinpix"
381
546
  ]
382
547
  },
383
- "sharinpix:permission:pull": {
548
+ "sharinpix:form:pull": {
384
549
  "aliases": [],
385
550
  "args": {},
386
- "description": "Retrieves all SharinPix permissions from the connected Salesforce org and saves them as JSON files in the local sharinpix/permissions directory. This command fetches the permission metadata and the JSON configuration data stored in the sharinpix**Json**c field.",
551
+ "description": "Retrieves all SharinPix form templates from the connected Salesforce org and saves them as JSON files in the local sharinpix/forms directory. This command fetches the form template metadata and downloads the actual form definition files.",
387
552
  "examples": [
388
- "Pull all SharinPix permissions from the default org:\n<%= config.bin %> <%= command.id %>",
389
- "Pull SharinPix permissions from a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com"
553
+ "Pull all form templates from the default org:\n<%= config.bin %> <%= command.id %>",
554
+ "Pull form templates from a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com",
555
+ "Pull form templates and also generate CSV files:\n<%= config.bin %> <%= command.id %> --csv"
390
556
  ],
391
557
  "flags": {
392
558
  "json": {
@@ -406,51 +572,60 @@
406
572
  },
407
573
  "org": {
408
574
  "char": "o",
409
- "description": "The target Salesforce org containing the SharinPix permissions to be pulled.",
575
+ "description": "The target Salesforce org containing the SharinPix form templates to be pulled.",
410
576
  "name": "org",
411
577
  "noCacheDefault": true,
412
578
  "required": true,
413
- "summary": "The Salesforce org to pull SharinPix permissions from.",
579
+ "summary": "The Salesforce org to pull form templates from.",
414
580
  "hasDynamicHelp": true,
415
581
  "multiple": false,
416
582
  "type": "option"
583
+ },
584
+ "csv": {
585
+ "char": "c",
586
+ "description": "When enabled, after downloading all form templates as JSON into `sharinpix/forms`, the command runs the JSON-to-CSV conversion (same as `sharinpix:form:json2csv`).",
587
+ "name": "csv",
588
+ "summary": "Also generate CSV files from the downloaded JSON form definitions.",
589
+ "allowNo": false,
590
+ "type": "boolean"
417
591
  }
418
592
  },
419
593
  "hasDynamicHelp": true,
420
594
  "hiddenAliases": [],
421
- "id": "sharinpix:permission:pull",
595
+ "id": "sharinpix:form:pull",
422
596
  "pluginAlias": "@sharinpix/sharinpix-sf-cli",
423
597
  "pluginName": "@sharinpix/sharinpix-sf-cli",
424
598
  "pluginType": "core",
425
599
  "strict": true,
426
- "summary": "Pull SharinPix permissions from Salesforce org.",
600
+ "summary": "Pull SharinPix form templates from Salesforce org.",
427
601
  "enableJsonFlag": true,
428
602
  "isESM": true,
429
603
  "relativePath": [
430
604
  "lib",
431
605
  "commands",
432
606
  "sharinpix",
433
- "permission",
607
+ "form",
434
608
  "pull.js"
435
609
  ],
436
610
  "aliasPermutations": [],
437
611
  "permutations": [
438
- "sharinpix:permission:pull",
439
- "permission:sharinpix:pull",
440
- "permission:pull:sharinpix",
441
- "sharinpix:pull:permission",
442
- "pull:sharinpix:permission",
443
- "pull:permission:sharinpix"
612
+ "sharinpix:form:pull",
613
+ "form:sharinpix:pull",
614
+ "form:pull:sharinpix",
615
+ "sharinpix:pull:form",
616
+ "pull:sharinpix:form",
617
+ "pull:form:sharinpix"
444
618
  ]
445
619
  },
446
- "sharinpix:permission:push": {
620
+ "sharinpix:form:push": {
447
621
  "aliases": [],
448
622
  "args": {},
449
- "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.",
623
+ "description": "Uploads SharinPix form templates from local JSON files to the connected Salesforce org. This command reads form templates from the local directory and creates or updates corresponding records in Salesforce. Existing forms will be updated unless the force flag is used to skip them.",
450
624
  "examples": [
451
- "Push all SharinPix permissions to the default org:\n<%= config.bin %> <%= command.id %>",
452
- "Push SharinPix permissions to a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com",
453
- "Push SharinPix permissions and delete orphaned records:\n<%= config.bin %> <%= command.id %> --delete"
625
+ "Push all form templates to the default org:\n<%= config.bin %> <%= command.id %>",
626
+ "Push form templates to a specific org:\n<%= config.bin %> <%= command.id %> --target-org myorg@example.com",
627
+ "Push form templates and delete orphaned records:\n<%= config.bin %> <%= command.id %> --delete",
628
+ "Convert CSV to JSON, then push:\n<%= config.bin %> <%= command.id %> --csv"
454
629
  ],
455
630
  "flags": {
456
631
  "json": {
@@ -470,51 +645,59 @@
470
645
  },
471
646
  "org": {
472
647
  "char": "o",
473
- "description": "The target Salesforce org where the SharinPix permissions will be uploaded and stored.",
648
+ "description": "The target Salesforce org where the SharinPix form templates will be uploaded and stored.",
474
649
  "name": "org",
475
650
  "noCacheDefault": true,
476
651
  "required": true,
477
- "summary": "The Salesforce org to push SharinPix permissions to.",
652
+ "summary": "The Salesforce org to push form templates to.",
478
653
  "hasDynamicHelp": true,
479
654
  "multiple": false,
480
655
  "type": "option"
481
656
  },
482
657
  "delete": {
483
658
  "char": "d",
484
- "description": "When enabled, this flag will delete SharinPix permission records from the Salesforce org if their corresponding local JSON files are missing. Use with caution as this operation cannot be undone.",
659
+ "description": "When enabled, this flag will delete form template records from the Salesforce org if their corresponding local JSON files are missing. Use with caution as this operation cannot be undone.",
485
660
  "name": "delete",
486
- "summary": "Delete SharinPix permissions from org that no longer have corresponding local files.",
661
+ "summary": "Delete form templates from org that no longer have corresponding local files.",
662
+ "allowNo": false,
663
+ "type": "boolean"
664
+ },
665
+ "csv": {
666
+ "char": "c",
667
+ "description": "When enabled, the command first runs the CSV-to-JSON conversion (same as `sharinpix:form:csv2json`) on files in `sharinpix/forms`, then proceeds to push the resulting JSON files.",
668
+ "name": "csv",
669
+ "summary": "Convert local CSV files to JSON before pushing.",
487
670
  "allowNo": false,
488
671
  "type": "boolean"
489
672
  }
490
673
  },
491
674
  "hasDynamicHelp": true,
492
675
  "hiddenAliases": [],
493
- "id": "sharinpix:permission:push",
676
+ "id": "sharinpix:form:push",
494
677
  "pluginAlias": "@sharinpix/sharinpix-sf-cli",
495
678
  "pluginName": "@sharinpix/sharinpix-sf-cli",
496
679
  "pluginType": "core",
497
680
  "strict": true,
498
- "summary": "Push SharinPix permissions to Salesforce org.",
681
+ "summary": "Push SharinPix form templates to Salesforce org.",
499
682
  "enableJsonFlag": true,
500
683
  "isESM": true,
501
684
  "relativePath": [
502
685
  "lib",
503
686
  "commands",
504
687
  "sharinpix",
505
- "permission",
688
+ "form",
506
689
  "push.js"
507
690
  ],
508
691
  "aliasPermutations": [],
509
692
  "permutations": [
510
- "sharinpix:permission:push",
511
- "permission:sharinpix:push",
512
- "permission:push:sharinpix",
513
- "sharinpix:push:permission",
514
- "push:sharinpix:permission",
515
- "push:permission:sharinpix"
693
+ "sharinpix:form:push",
694
+ "form:sharinpix:push",
695
+ "form:push:sharinpix",
696
+ "sharinpix:push:form",
697
+ "push:sharinpix:form",
698
+ "push:form:sharinpix"
516
699
  ]
517
700
  }
518
701
  },
519
- "version": "1.10.0"
702
+ "version": "1.11.0"
520
703
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sharinpix/sharinpix-sf-cli",
3
3
  "description": "SharinPix salesforce cli plugin",
4
- "version": "1.10.0",
4
+ "version": "1.11.0",
5
5
  "dependencies": {
6
6
  "@oclif/core": "^4",
7
7
  "@salesforce/core": "^8",