@sharinpix/sharinpix-sf-cli 1.9.2 → 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 +206 -4
- package/lib/commands/sharinpix/config/pull.d.ts +18 -0
- package/lib/commands/sharinpix/config/pull.js +60 -0
- package/lib/commands/sharinpix/config/pull.js.map +1 -0
- package/lib/commands/sharinpix/config/push.d.ts +18 -0
- package/lib/commands/sharinpix/config/push.js +59 -0
- package/lib/commands/sharinpix/config/push.js.map +1 -0
- package/lib/commands/sharinpix/form/pull.d.ts +6 -1
- package/lib/commands/sharinpix/form/pull.js +5 -1
- package/lib/commands/sharinpix/form/pull.js.map +1 -1
- package/lib/commands/sharinpix/form/push.d.ts +7 -1
- package/lib/commands/sharinpix/form/push.js +3 -0
- package/lib/commands/sharinpix/form/push.js.map +1 -1
- package/lib/commands/sharinpix/permission/pull.d.ts +5 -1
- package/lib/commands/sharinpix/permission/pull.js +5 -1
- package/lib/commands/sharinpix/permission/pull.js.map +1 -1
- package/lib/commands/sharinpix/permission/push.d.ts +6 -1
- package/lib/commands/sharinpix/permission/push.js +3 -0
- package/lib/commands/sharinpix/permission/push.js.map +1 -1
- package/lib/commands/sharinpix/pull.d.ts +15 -0
- package/lib/commands/sharinpix/pull.js +39 -0
- package/lib/commands/sharinpix/pull.js.map +1 -0
- package/lib/commands/sharinpix/push.d.ts +16 -0
- package/lib/commands/sharinpix/push.js +47 -0
- package/lib/commands/sharinpix/push.js.map +1 -0
- package/lib/commands/sharinpix/settings.d.ts +10 -0
- package/lib/commands/sharinpix/settings.js +24 -0
- package/lib/commands/sharinpix/settings.js.map +1 -0
- package/messages/sharinpix.config.pull.md +37 -0
- package/messages/sharinpix.config.push.md +37 -0
- package/messages/sharinpix.pull.md +25 -0
- package/messages/sharinpix.push.md +37 -0
- package/messages/sharinpix.settings.md +22 -0
- package/oclif.lock +1042 -971
- package/oclif.manifest.json +392 -84
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@sharinpix/sharinpix-sf-cli) [](https://npmjs.org/package/@sharinpix/sharinpix-sf-cli) [](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
|
|
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
|
|
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 (
|
|
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,12 +138,90 @@ 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)
|
|
133
146
|
* [`sf sharinpix form push`](#sf-sharinpix-form-push)
|
|
134
147
|
* [`sf sharinpix permission pull`](#sf-sharinpix-permission-pull)
|
|
135
148
|
* [`sf sharinpix permission push`](#sf-sharinpix-permission-push)
|
|
149
|
+
* [`sf sharinpix pull`](#sf-sharinpix-pull)
|
|
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
|
+
```
|
|
136
225
|
|
|
137
226
|
## `sf sharinpix form csv2json`
|
|
138
227
|
|
|
@@ -371,4 +460,117 @@ FLAG DESCRIPTIONS
|
|
|
371
460
|
|
|
372
461
|
The target Salesforce org where the SharinPix permissions will be uploaded and stored.
|
|
373
462
|
```
|
|
463
|
+
|
|
464
|
+
## `sf sharinpix pull`
|
|
465
|
+
|
|
466
|
+
Pull all SharinPix assets (forms and permissions) from Salesforce org.
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
USAGE
|
|
470
|
+
$ sf sharinpix pull -o <value> [--json] [--flags-dir <value>]
|
|
471
|
+
|
|
472
|
+
FLAGS
|
|
473
|
+
-o, --org=<value> (required) The Salesforce org to pull assets from.
|
|
474
|
+
|
|
475
|
+
GLOBAL FLAGS
|
|
476
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
477
|
+
--json Format output as json.
|
|
478
|
+
|
|
479
|
+
DESCRIPTION
|
|
480
|
+
Pull all SharinPix assets (forms and permissions) from Salesforce org.
|
|
481
|
+
|
|
482
|
+
Retrieves all SharinPix form templates and permissions from the connected Salesforce org. This is a convenience
|
|
483
|
+
command that executes both sharinpix:form:pull and sharinpix:permission:pull.
|
|
484
|
+
|
|
485
|
+
EXAMPLES
|
|
486
|
+
Pull all assets from the default org:
|
|
487
|
+
|
|
488
|
+
$ sf sharinpix pull
|
|
489
|
+
|
|
490
|
+
Pull all assets from a specific org:
|
|
491
|
+
|
|
492
|
+
$ sf sharinpix pull --target-org myorg@example.com
|
|
493
|
+
|
|
494
|
+
FLAG DESCRIPTIONS
|
|
495
|
+
-o, --org=<value> The Salesforce org to pull assets from.
|
|
496
|
+
|
|
497
|
+
The target Salesforce org containing the SharinPix assets to be pulled.
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
## `sf sharinpix push`
|
|
501
|
+
|
|
502
|
+
Push all SharinPix assets (forms and permissions) to Salesforce org.
|
|
503
|
+
|
|
504
|
+
```
|
|
505
|
+
USAGE
|
|
506
|
+
$ sf sharinpix push -o <value> [--json] [--flags-dir <value>] [-d]
|
|
507
|
+
|
|
508
|
+
FLAGS
|
|
509
|
+
-d, --delete Delete assets in the org that do not exist locally.
|
|
510
|
+
-o, --org=<value> (required) The Salesforce org to push assets to.
|
|
511
|
+
|
|
512
|
+
GLOBAL FLAGS
|
|
513
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
514
|
+
--json Format output as json.
|
|
515
|
+
|
|
516
|
+
DESCRIPTION
|
|
517
|
+
Push all SharinPix assets (forms and permissions) to Salesforce org.
|
|
518
|
+
|
|
519
|
+
Uploads all local SharinPix form templates and permissions to the connected Salesforce org. This is a convenience
|
|
520
|
+
command that executes both sharinpix:form:push and sharinpix:permission:push.
|
|
521
|
+
|
|
522
|
+
EXAMPLES
|
|
523
|
+
Push all assets to the default org:
|
|
524
|
+
|
|
525
|
+
$ sf sharinpix push
|
|
526
|
+
|
|
527
|
+
Push all assets to a specific org:
|
|
528
|
+
|
|
529
|
+
$ sf sharinpix push --target-org myorg@example.com
|
|
530
|
+
|
|
531
|
+
Push all assets and delete missing ones from the org:
|
|
532
|
+
|
|
533
|
+
$ sf sharinpix push --delete
|
|
534
|
+
|
|
535
|
+
FLAG DESCRIPTIONS
|
|
536
|
+
-d, --delete Delete assets in the org that do not exist locally.
|
|
537
|
+
|
|
538
|
+
If specified, any form templates or permissions that exist in the org but not in the local project will be deleted.
|
|
539
|
+
|
|
540
|
+
-o, --org=<value> The Salesforce org to push assets to.
|
|
541
|
+
|
|
542
|
+
The target Salesforce org where the SharinPix assets will be pushed.
|
|
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
|
+
```
|
|
374
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,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,CA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AG,MAAM,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,6BAA6B,EAAE;gBAC/E,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE;oBACP,MAAM,EAAE,kBAAkB;oBAC1B,aAAa,EAAE,UAAU,aAAa,CAAC,KAAK,EAAE;iBAC/C;aACF,CAAC,CAAC;YAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,QAAQ,QAAQ,CAAC,MAAM,KAAK,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;YACrE,CAAC;YAED,MAAM,MAAM,GAAY,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YAE9C,qBAAqB;YACrB,EAAE,CAAC,aAAa,CAAC,uBAAuB,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3E,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Org } from '@salesforce/core';
|
|
3
|
+
export type PushResult = {
|
|
4
|
+
name: string;
|
|
5
|
+
success?: 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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,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,6BAA6B,EAAE;gBAC/E,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;gBAC5B,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,MAAM,EAAE,KAAK;oBACb,aAAa,EAAE,gBAAgB,aAAa,CAAC,KAAK,GAAG;iBACtD;aACF,CAAC,CAAC;YAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,QAAQ,QAAQ,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,4 +1,5 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Org } from '@salesforce/core';
|
|
2
3
|
export type PullResult = {
|
|
3
4
|
name: string;
|
|
4
5
|
formsDownloaded?: number;
|
|
@@ -9,8 +10,12 @@ export default class Pull extends SfCommand<PullResult> {
|
|
|
9
10
|
static readonly description: string;
|
|
10
11
|
static readonly examples: string[];
|
|
11
12
|
static readonly flags: {
|
|
12
|
-
org: import("@oclif/core/interfaces").OptionFlag<
|
|
13
|
+
org: import("@oclif/core/interfaces").OptionFlag<Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
csv: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<PullResult>;
|
|
17
|
+
runWithFlags(flags: {
|
|
18
|
+
org: Org;
|
|
19
|
+
csv?: boolean;
|
|
20
|
+
}): Promise<PullResult>;
|
|
16
21
|
}
|
|
@@ -25,9 +25,13 @@ export default class Pull extends SfCommand {
|
|
|
25
25
|
};
|
|
26
26
|
async run() {
|
|
27
27
|
const { flags } = await this.parse(Pull);
|
|
28
|
+
return this.runWithFlags(flags);
|
|
29
|
+
}
|
|
30
|
+
async runWithFlags(flags) {
|
|
28
31
|
const connection = flags.org.getConnection('63.0');
|
|
29
32
|
fs.mkdirSync('sharinpix/forms', { recursive: true });
|
|
30
|
-
const
|
|
33
|
+
const result = await connection.query('SELECT Id, sharinpix__FormUrl__c, Name, sharinpix__Description__c FROM sharinpix__FormTemplate__c order by LastModifiedDate desc');
|
|
34
|
+
const records = result.records;
|
|
31
35
|
let formsDownloaded = 0;
|
|
32
36
|
let formsFailed = 0;
|
|
33
37
|
for (const record of records) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/form/pull.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,qCAAqC;AACrC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/form/pull.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,qCAAqC;AACrC,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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C;gBACF,WAAW,EAAE,CAAC;YAChB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,2BAA2B,eAAe,sBAAsB,WAAW,UAAU,CAAC,CAAC;QAEhG,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;YACd,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO;YACL,IAAI,EAAE,IAAI;YACV,eAAe;YACf,WAAW;SACZ,CAAC;IACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Org } from '@salesforce/core';
|
|
2
3
|
export type PushResult = {
|
|
3
4
|
name: string;
|
|
4
5
|
uploaded?: number;
|
|
@@ -11,9 +12,14 @@ export default class Push extends SfCommand<PushResult> {
|
|
|
11
12
|
static readonly description: string;
|
|
12
13
|
static readonly examples: string[];
|
|
13
14
|
static readonly flags: {
|
|
14
|
-
org: import("@oclif/core/interfaces").OptionFlag<
|
|
15
|
+
org: import("@oclif/core/interfaces").OptionFlag<Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
delete: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
csv: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
18
19
|
run(): Promise<PushResult>;
|
|
20
|
+
runWithFlags(flags: {
|
|
21
|
+
org: Org;
|
|
22
|
+
delete: boolean;
|
|
23
|
+
csv?: boolean;
|
|
24
|
+
}): Promise<PushResult>;
|
|
19
25
|
}
|
|
@@ -30,6 +30,9 @@ export default class Push extends SfCommand {
|
|
|
30
30
|
};
|
|
31
31
|
async run() {
|
|
32
32
|
const { flags } = await this.parse(Push);
|
|
33
|
+
return this.runWithFlags(flags);
|
|
34
|
+
}
|
|
35
|
+
async runWithFlags(flags) {
|
|
33
36
|
const connection = flags.org.getConnection('63.0');
|
|
34
37
|
if (flags.csv) {
|
|
35
38
|
await this.config.runCommand('sharinpix:form:csv2json', []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/form/push.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qCAAqC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/form/push.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qCAAqC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,SAAS,EACT,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAEnC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,qBAAqB,CAAC,CAAC;AAiB7F,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,WAA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AC,kCAAkC,UAAU,KAAK,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;wBACxF,MAAM,EAAE,CAAC;oBACX,CAAC,CAAC,CAAC;gBACP,CAAC;YACH,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAEpF,OAAO;YACL,IAAI,EAAE,IAAI;YACV,QAAQ;YACR,MAAM;YACN,OAAO;YACP,OAAO;SACR,CAAC;IACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Org } from '@salesforce/core';
|
|
2
3
|
export type PullResult = {
|
|
3
4
|
name: string;
|
|
4
5
|
permissionsDownloaded?: number;
|
|
@@ -9,7 +10,10 @@ export default class Pull extends SfCommand<PullResult> {
|
|
|
9
10
|
static readonly description: string;
|
|
10
11
|
static readonly examples: string[];
|
|
11
12
|
static readonly flags: {
|
|
12
|
-
org: import("@oclif/core/interfaces").OptionFlag<
|
|
13
|
+
org: import("@oclif/core/interfaces").OptionFlag<Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
};
|
|
14
15
|
run(): Promise<PullResult>;
|
|
16
|
+
runWithFlags(flags: {
|
|
17
|
+
org: Org;
|
|
18
|
+
}): Promise<PullResult>;
|
|
15
19
|
}
|
|
@@ -19,9 +19,13 @@ export default class Pull extends SfCommand {
|
|
|
19
19
|
};
|
|
20
20
|
async run() {
|
|
21
21
|
const { flags } = await this.parse(Pull);
|
|
22
|
+
return this.runWithFlags(flags);
|
|
23
|
+
}
|
|
24
|
+
async runWithFlags(flags) {
|
|
22
25
|
const connection = flags.org.getConnection('63.0');
|
|
23
26
|
fs.mkdirSync('sharinpix/permissions', { recursive: true });
|
|
24
|
-
const
|
|
27
|
+
const result = await connection.query('SELECT Id, Name, sharinpix__Description__c, sharinpix__Json__c FROM sharinpix__SharinPixPermission__c order by LastModifiedDate desc');
|
|
28
|
+
const records = result.records;
|
|
25
29
|
let permissionsDownloaded = 0;
|
|
26
30
|
let permissionsFailed = 0;
|
|
27
31
|
for (const record of records) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/permission/pull.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,qCAAqC;AACrC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"pull.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/permission/pull.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,qCAAqC;AACrC,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,2BAA2B,CAAC,CAAC;AAenG,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,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,GAAG,CACN,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,yBAAyB,IAAI,gBAAgB,CAAC,CAAC,CACvG,CAAC;gBACF,qBAAqB,EAAE,CAAC;YAC1B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,8EAA8E;gBAC9E,IAAI,CAAC,IAAI,CACP,wCAAwC,MAAM,CAAC,IAAI,KACjD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAC3C,EAAE,CACH,CAAC;gBACF,iBAAiB,EAAE,CAAC;YACtB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,2BAA2B,qBAAqB,6BAA6B,iBAAiB,UAAU,CAAC,CAAC;QAEnH,OAAO;YACL,IAAI,EAAE,IAAI;YACV,qBAAqB;YACrB,iBAAiB;SAClB,CAAC;IACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Org } from '@salesforce/core';
|
|
2
3
|
export type PushResult = {
|
|
3
4
|
name: string;
|
|
4
5
|
uploaded?: number;
|
|
@@ -11,8 +12,12 @@ export default class Push extends SfCommand<PushResult> {
|
|
|
11
12
|
static readonly description: string;
|
|
12
13
|
static readonly examples: string[];
|
|
13
14
|
static readonly flags: {
|
|
14
|
-
org: import("@oclif/core/interfaces").OptionFlag<
|
|
15
|
+
org: import("@oclif/core/interfaces").OptionFlag<Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
delete: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
};
|
|
17
18
|
run(): Promise<PushResult>;
|
|
19
|
+
runWithFlags(flags: {
|
|
20
|
+
org: Org;
|
|
21
|
+
delete: boolean;
|
|
22
|
+
}): Promise<PushResult>;
|
|
18
23
|
}
|
|
@@ -24,6 +24,9 @@ export default class Push extends SfCommand {
|
|
|
24
24
|
};
|
|
25
25
|
async run() {
|
|
26
26
|
const { flags } = await this.parse(Push);
|
|
27
|
+
return this.runWithFlags(flags);
|
|
28
|
+
}
|
|
29
|
+
async runWithFlags(flags) {
|
|
27
30
|
const connection = flags.org.getConnection('63.0');
|
|
28
31
|
const files = getJsonFiles('sharinpix/permissions');
|
|
29
32
|
const existingRecords = (await connection.query('SELECT Id, Name, sharinpix__Description__c, sharinpix__Json__c FROM sharinpix__SharinPixPermission__c')).records;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/permission/push.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qCAAqC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"push.js","sourceRoot":"","sources":["../../../../src/commands/sharinpix/permission/push.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,qCAAqC;AACrC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AAEnC,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,CAAC;AAiBnG,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,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