@salesforce/plugin-community 2.2.12 → 2.3.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.
Files changed (35) hide show
  1. package/README.md +31 -23
  2. package/lib/commands/community/create.d.ts +4 -6
  3. package/lib/commands/community/create.js +20 -29
  4. package/lib/commands/community/create.js.map +1 -1
  5. package/lib/commands/community/list/template.d.ts +2 -2
  6. package/lib/commands/community/list/template.js +1 -2
  7. package/lib/commands/community/list/template.js.map +1 -1
  8. package/lib/commands/community/publish.d.ts +2 -2
  9. package/lib/commands/community/publish.js +2 -2
  10. package/lib/commands/community/publish.js.map +1 -1
  11. package/lib/shared/community/connect/CommunityCreateResource.d.ts +3 -1
  12. package/lib/shared/community/connect/CommunityCreateResource.js +3 -2
  13. package/lib/shared/community/connect/CommunityCreateResource.js.map +1 -1
  14. package/lib/shared/community/connect/CommunityPublishResource.d.ts +5 -4
  15. package/lib/shared/community/connect/CommunityPublishResource.js +2 -1
  16. package/lib/shared/community/connect/CommunityPublishResource.js.map +1 -1
  17. package/lib/shared/community/defs/CommunityCreateParams.d.ts +1 -1
  18. package/lib/shared/community/defs/CommunityCreateResponse.d.ts +4 -0
  19. package/lib/shared/community/defs/CommunityPublishResponse.d.ts +4 -0
  20. package/lib/shared/community/service/CommunitiesServices.d.ts +3 -3
  21. package/lib/shared/community/service/CommunitiesServices.js +4 -8
  22. package/lib/shared/community/service/CommunitiesServices.js.map +1 -1
  23. package/lib/shared/connect/services/ConnectExecutor.d.ts +3 -3
  24. package/lib/shared/connect/services/ConnectExecutor.js +3 -4
  25. package/lib/shared/connect/services/ConnectExecutor.js.map +1 -1
  26. package/messages/create.md +10 -8
  27. package/messages/publish.md +4 -4
  28. package/oclif.manifest.json +3 -10
  29. package/package.json +22 -21
  30. package/lib/shared/community/commands/CommunityNameValueParser.d.ts +0 -32
  31. package/lib/shared/community/commands/CommunityNameValueParser.js +0 -83
  32. package/lib/shared/community/commands/CommunityNameValueParser.js.map +0 -1
  33. package/lib/shared/utils.d.ts +0 -2
  34. package/lib/shared/utils.js +0 -13
  35. package/lib/shared/utils.js.map +0 -1
package/README.md CHANGED
@@ -110,25 +110,31 @@ OPTIONS
110
110
  this command invocation
111
111
 
112
112
  DESCRIPTION
113
- See 'Which Experience Cloud Template Should I Use?' in Salesforce Help for more information about the different
114
- template types available for Experience Cloud.
113
+ Run the "community list template" command to see the templates available in your org. See 'Which Experience Cloud
114
+ Template Should I Use?' in Salesforce Help for more information about the different template types available.
115
+
116
+ When you create a site with the Build Your Own (LWR) template, you must also specify the AuthenticationType value
117
+ using the format templateParams.AuthenticationType=value, where value is AUTHENTICATED or
118
+ AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED. Name and values are case-sensitive. See 'DigitalExperienceBundle' in the
119
+ Metadata API Developer Guide for more information.
120
+
121
+ The site creation process is an async job that generates a jobId. To check the site creation status, query the
122
+ BackgroundOperation object and enter the jobId as the Id. See ‘BackgroundOperation’ in the Object Reference for the
123
+ Salesforce Platform for more information.
115
124
 
116
- When creating a site with the Build Your Own (LWR) template, you must also specify the AuthenticationType value using
117
- the format templateParams.AuthenticationType=value, where value is AUTHENTICATED, UNAUTHENTICATED, or
118
- AUTHENTICATED_WITH_PUBLIC_ACCESS. Name and values are case-sensitive. See 'ExperienceBundle' in the Metadata API
119
- Developer Guide for more information.
125
+ If the job doesn’t complete within 10 minutes, it times out. You receive an error message and must restart the site
126
+ creation process. Completed jobs expire after 24 hours and are removed from the database.
120
127
 
121
- When you execute this command, it creates the site in preview status, which means that it isn't yet live. After you
128
+ When you run this command, it creates the site in preview status, which means that the site isn't yet live. After you
122
129
  finish building your site, you can make it live.
123
130
 
124
- If you have an Experience Builder site, publish the site using the sfdx force:community:publish command to make it
125
- live.
131
+ If you have an Experience Builder site, publish the site using the "community publish" command to make it live.
126
132
 
127
- If you have a Salesforce Tabs + Visualforce site, activate the site to make it live by updating the status field of
128
- the Network type in the Metadata API. Alternatively, in Experience Workspaces, go to Administration | Settings, and
129
- click Activate.
133
+ If you have a Salesforce Tabs + Visualforce site, to activate the site and make it live, update the status field of
134
+ the Network type in Metadata API. Alternatively, in Experience Workspaces, go to Administration | Settings, and click
135
+ Activate.
130
136
 
131
- For Experience Builder sites, activating the site just sends out a welcome email to site members.
137
+ For Experience Builder sites, activating the site sends a welcome email to site members.
132
138
 
133
139
  EXAMPLES
134
140
  $ sfdx force:community:create --name 'My Customer Site' --templatename 'Customer Service' --urlpathprefix customers
@@ -165,19 +171,21 @@ OPTIONS
165
171
  this command invocation
166
172
 
167
173
  DESCRIPTION
168
- Each time you publish it, you update the live site with the most recent updates.
169
- When you publish an Experience Builder site for the first time, you make the site's URL live and enable login access
170
- for site members.
174
+ Each time you publish a site, you update the live site with the most recent updates. When you publish an Experience
175
+ Builder site for the first time, you make the site's URL live and enable login access for site members.
171
176
 
172
- Additionally, to send a welcome email to all site members, you must activate the site. (Activation is also required to
173
- successfully set up SEO for Experience Builder sites.) To activate a site, update the status field of the Network
174
- type in the Metadata API. Alternatively, in Experience Workspaces, go to Administration | Settings, and click
175
- Activate.
177
+ In addition to publishing, you must activate a site to send a welcome email to all site members. Activation is also
178
+ required to set up SEO for Experience Builder sites. To activate a site, update the status field of the Network type
179
+ in Metadata API. Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.
180
+
181
+ An email notification informs you when your changes are live on the published site. The site publish process is an
182
+ async job that generates a jobId. To check the site publish status manually, query the BackgroundOperation object and
183
+ enter the jobId as the Id. See ‘BackgroundOperation’ in the Object Reference for the Salesforce Platform for more
184
+ information.
176
185
 
177
- Subsequently, each time you publish the site, you update the live site with all changes made to the site since it was
178
- last published.
186
+ If the job doesn’t complete within 15 minutes, it times out. You receive an error message and must restart the site
187
+ publish process. Completed jobs expire after 24 hours and are removed from the database.
179
188
 
180
- An email notification informs you when your changes are live.
181
189
 
182
190
  EXAMPLE
183
191
  $ sfdx force:community:publish --name 'My Customer Site'
@@ -16,14 +16,12 @@ export declare class CommunityCreateCommand extends SfCommand<CommunityCreateRes
16
16
  name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
17
17
  'template-name': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
18
18
  'url-path-prefix': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
19
- description: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
19
+ description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
20
20
  'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
21
- loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
22
- 'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
21
+ loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
22
+ 'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
23
23
  };
24
- static readonly validationPatterns: string[];
25
- private logger;
26
24
  run(): Promise<CommunityCreateResponse>;
27
- protected parseVarargs(args?: string[]): JsonMap;
28
25
  private displayResults;
29
26
  }
27
+ export declare const getTemplateParamObjectFromArgs: (args: Record<string, string | undefined>) => JsonMap;
@@ -6,17 +6,16 @@
6
6
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CommunityCreateCommand = void 0;
9
+ exports.getTemplateParamObjectFromArgs = exports.CommunityCreateCommand = void 0;
10
10
  const core_1 = require("@salesforce/core");
11
11
  const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
12
- const CommunityNameValueParser_1 = require("../../shared/community/commands/CommunityNameValueParser");
13
12
  const ConnectExecutor_1 = require("../../shared/connect/services/ConnectExecutor");
14
13
  const CommunityCreateResource_1 = require("../../shared/community/connect/CommunityCreateResource");
15
- const utils_1 = require("../../shared/utils");
16
14
  core_1.Messages.importMessagesDirectory(__dirname);
17
15
  const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'create');
18
16
  const MESSAGE_KEY = 'message';
19
17
  const NAME_KEY = 'name';
18
+ const JOBID_KEY = 'jobId';
20
19
  const ACTION_KEY = 'action';
21
20
  /**
22
21
  * A command to create a community.
@@ -24,39 +23,27 @@ const ACTION_KEY = 'action';
24
23
  */
25
24
  class CommunityCreateCommand extends sf_plugins_core_1.SfCommand {
26
25
  async run() {
27
- this.logger = core_1.Logger.childFromRoot(this.constructor.name);
28
- const { flags, argv } = await this.parse(CommunityCreateCommand);
29
- const varargs = this.parseVarargs(argv);
26
+ const { flags, argv, args } = await this.parse(CommunityCreateCommand);
27
+ const templateParams = (0, exports.getTemplateParamObjectFromArgs)((0, sf_plugins_core_1.parseVarArgs)(args, argv));
30
28
  const createCommand = new CommunityCreateResource_1.CommunityCreateResource({
31
29
  name: flags.name,
32
30
  urlPathPrefix: flags['url-path-prefix'],
33
31
  templateName: flags['template-name'],
34
32
  description: flags.description,
35
- templateParams: varargs['templateParams'],
33
+ templateParams,
36
34
  });
37
- return new ConnectExecutor_1.ConnectExecutor(createCommand, await (0, utils_1.applyApiVersionToOrg)(flags['target-org'], flags['api-version']))
35
+ return new ConnectExecutor_1.ConnectExecutor(createCommand, flags['target-org'].getConnection(flags['api-version']))
38
36
  .callConnectApi()
39
37
  .then((results) => {
40
38
  this.displayResults(results);
41
39
  return results;
42
40
  });
43
41
  }
44
- parseVarargs(args) {
45
- this.logger.debug(`parseVarargs([${args.join(', ')}])`);
46
- // It never looks like args is ever undefined as long as varargs is turned on for the command...
47
- // But since the signature says it's optional, we should probably gate this even though it's unnecessary right now.
48
- if (args === undefined) {
49
- return {};
50
- }
51
- const parser = new CommunityNameValueParser_1.CommunityNameValueParser(CommunityCreateCommand.validationPatterns);
52
- const values = parser.parse(args);
53
- this.logger.debug('parseVarargs result:' + JSON.stringify(values));
54
- return values;
55
- }
56
42
  displayResults(results) {
57
43
  const columns = {
58
44
  [NAME_KEY]: { header: 'Name' },
59
45
  [MESSAGE_KEY]: { header: 'Message' },
46
+ [JOBID_KEY]: { header: 'JobId' },
60
47
  [ACTION_KEY]: { header: 'Action' },
61
48
  };
62
49
  this.styledHeader(messages.getMessage('response.styleHeader'));
@@ -102,13 +89,17 @@ CommunityCreateCommand.flags = {
102
89
  loglevel: sf_plugins_core_1.loglevel,
103
90
  'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
104
91
  };
105
- CommunityCreateCommand.validationPatterns = [
106
- // Exact matches
107
- 'name',
108
- 'urlPathPrefix',
109
- 'templateName',
110
- 'description',
111
- // templateParams.*, but must be only word characters (e.g. no spaces, special chars)
112
- 'templateParams(\\.\\w+)+',
113
- ];
92
+ const getTemplateParamObjectFromArgs = (args) => {
93
+ // make sure there's nothing bad
94
+ const badArgs = Object.keys(args).filter((key) => !key.startsWith('templateParams'));
95
+ if (badArgs.length) {
96
+ throw new core_1.SfError(`Invalid argument(s): ${badArgs.join(', ')}`, 'InvalidArgument', [
97
+ 'Arguments should start with templateParams, like templateParams.AuthenticationType=UNAUTHENTICATED',
98
+ ]);
99
+ }
100
+ // construct the return object
101
+ const templateParams = Object.fromEntries(Object.entries(args).map(([key, value]) => [key.replace('templateParams.', ''), value]));
102
+ return templateParams;
103
+ };
104
+ exports.getTemplateParamObjectFromArgs = getTemplateParamObjectFromArgs;
114
105
  //# sourceMappingURL=create.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/community/create.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,2CAAoD;A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OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CACxF,CAAC;IAEF,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAdW,QAAA,8BAA8B,kCAczC"}
@@ -12,8 +12,8 @@ export declare class CommunityListTemplatesCommand extends SfCommand<CommunityTe
12
12
  static readonly examples: string[];
13
13
  static readonly flags: {
14
14
  'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
15
- 'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
16
- loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
15
+ 'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
16
+ loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
17
17
  };
18
18
  run(): Promise<CommunityTemplatesListResponse>;
19
19
  private displayResults;
@@ -11,7 +11,6 @@ const core_1 = require("@salesforce/core");
11
11
  const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
12
12
  const CommunityTemplatesResource_1 = require("../../../shared/community/connect/CommunityTemplatesResource");
13
13
  const ConnectExecutor_1 = require("../../../shared/connect/services/ConnectExecutor");
14
- const utils_1 = require("../../../shared/utils");
15
14
  core_1.Messages.importMessagesDirectory(__dirname);
16
15
  const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'template.list');
17
16
  /**
@@ -22,7 +21,7 @@ class CommunityListTemplatesCommand extends sf_plugins_core_1.SfCommand {
22
21
  async run() {
23
22
  const { flags } = await this.parse(CommunityListTemplatesCommand);
24
23
  const listTemplateCommand = new CommunityTemplatesResource_1.CommunityTemplatesResource();
25
- return new ConnectExecutor_1.ConnectExecutor(listTemplateCommand, await (0, utils_1.applyApiVersionToOrg)(flags['target-org'], flags['api-version']))
24
+ return new ConnectExecutor_1.ConnectExecutor(listTemplateCommand, flags['target-org'].getConnection(flags['api-version']))
26
25
  .callConnectApi()
27
26
  .then((results) => {
28
27
  this.displayResults(results);
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/commands/community/list/template.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA4C;AAC5C,iEAKqC;AACrC,6GAA0G;AAC1G,sFAAmF;AAEnF,iDAA6D;AAE7D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,eAAe,CAAC,CAAC;AAExF;;;GAGG;AACH,MAAa,6BAA8B,SAAQ,2BAAyC;IAYnF,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;QAClE,MAAM,mBAAmB,GAAG,IAAI,uDAA0B,EAAE,CAAC;QAC7D,OAAO,IAAI,iCAAe,CACxB,mBAAmB,EACnB,MAAM,IAAA,4BAAoB,EAAC,KAAK,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CACtE;aACE,cAAc,EAAE;aAChB,IAAI,CAAC,CAAC,OAAuC,EAAE,EAAE;YAChD,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YAC7B,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,cAAc,CAAC,OAAuC;QAC5D,MAAM,OAAO,GAAG;YACd,YAAY,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE;YACzC,SAAS,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;SACnC,CAAC;QACF,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;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a,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;aACrG,cAAc,EAAE;aAChB,IAAI,CAAC,CAAC,OAAuC,EAAE,EAAE;YAChD,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YAC7B,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,cAAc,CAAC,OAAuC;QAC5D,MAAM,OAAO,GAAG;YACd,YAAY,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE;YACzC,SAAS,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;SACnC,CAAC;QACF,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;QAChE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,EAAE,CAAC;QACX,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjF,CAAC;;AAhCH,sEAiCC;AAhCwB,8CAAgB,GAAG,IAAI,CAAC;AACxB,qCAAO,GAAG,CAAC,+BAA+B,CAAC,CAAC;AAC5C,qCAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACzC,yCAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AACjD,sCAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AAC5C,mCAAK,GAAG;IAC7B,YAAY,EAAE,iDAA+B;IAC7C,aAAa,EAAE,mDAAiC;IAChD,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
@@ -13,8 +13,8 @@ export declare class CommunityPublishCommand extends SfCommand<CommunityPublishR
13
13
  static readonly flags: {
14
14
  name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
15
15
  'target-org': import("@oclif/core/lib/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
16
- 'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
17
- loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
16
+ 'api-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
17
+ loglevel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
18
18
  };
19
19
  run(): Promise<CommunityPublishResponse>;
20
20
  private displayResults;
@@ -11,7 +11,6 @@ const core_1 = require("@salesforce/core");
11
11
  const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
12
12
  const CommunityPublishResource_1 = require("../../shared/community/connect/CommunityPublishResource");
13
13
  const ConnectExecutor_1 = require("../../shared/connect/services/ConnectExecutor");
14
- const utils_1 = require("../../shared/utils");
15
14
  core_1.Messages.importMessagesDirectory(__dirname);
16
15
  const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'publish');
17
16
  /**
@@ -25,7 +24,7 @@ class CommunityPublishCommand extends sf_plugins_core_1.SfCommand {
25
24
  name: flags.name,
26
25
  org: flags['target-org'],
27
26
  });
28
- return new ConnectExecutor_1.ConnectExecutor(publishCommand, await (0, utils_1.applyApiVersionToOrg)(flags['target-org'], flags['api-version']))
27
+ return new ConnectExecutor_1.ConnectExecutor(publishCommand, flags['target-org'].getConnection(flags['api-version']))
29
28
  .callConnectApi()
30
29
  .then((results) => {
31
30
  this.displayResults(results);
@@ -39,6 +38,7 @@ class CommunityPublishCommand extends sf_plugins_core_1.SfCommand {
39
38
  name: { header: 'Name' },
40
39
  status: { header: 'Status' },
41
40
  url: { header: 'Url' },
41
+ jobId: { header: 'JobId' },
42
42
  };
43
43
  this.styledHeader(messages.getMessage('response.styleHeader'));
44
44
  this.table([results], columns);
@@ -1 +1 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../src/commands/community/publish.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA4C;AAC5C,iEAMqC;AACrC,sGAAmG;AACnG,mFAAgF;AAEhF,8CAA0D;AAE1D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,SAAS,CAAC,CAAC;AAElF;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,2BAAmC;IAiBvE,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC5D,MAAM,cAAc,GAAG,IAAI,mDAAwB,CAAC;YAClD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,GAAG,EAAE,KAAK,CAAC,YAAY,CAAC;SACzB,CAAC,CAAC;QACH,OAAO,IAAI,iCAAe,CAAC,cAAc,EAAE,MAAM,IAAA,4BAAoB,EAAC,KAAK,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;aAC9G,cAAc,EAAE;aAChB,IAAI,CAAC,CAAC,OAAiC,EAAE,EAAE;YAC1C,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YAC7B,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,cAAc,CAAC,OAAiC;QACtD,MAAM,OAAO,GAAG;YACd,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;YACpB,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE;YAC9B,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;YACxB,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;YAC5B,GAA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C;AAC5C,6BAAK,GAAG;IAC7B,IAAI,EAAE,uBAAK,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;QAClD,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,YAAY,EAAE,iDAA+B;IAC7C,aAAa,EAAE,mDAAiC;IAChD,QAAQ,EAAR,0BAAQ;CACT,CAAC"}
@@ -4,6 +4,7 @@ import { CommunityCreateResponse } from '../defs/CommunityCreateResponse';
4
4
  import { CommunityCreateParams } from '../defs/CommunityCreateParams';
5
5
  import { ConnectResource } from '../../connect/services/ConnectResource';
6
6
  declare const NAME_KEY = "name";
7
+ declare const JOBID_KEY = "jobId";
7
8
  /**
8
9
  * A connect api resource for creating a community
9
10
  */
@@ -11,7 +12,8 @@ export declare class CommunityCreateResource implements ConnectResource<Communit
11
12
  private options;
12
13
  constructor(options: CommunityCreateParams);
13
14
  handleSuccess(result: JsonCollection & {
14
- [NAME_KEY]?: string;
15
+ [NAME_KEY]: string;
16
+ [JOBID_KEY]: string;
15
17
  }): CommunityCreateResponse;
16
18
  handleError(error: Error): CommunityCreateResponse;
17
19
  fetchRelativeConnectUrl(): Promise<string>;
@@ -5,6 +5,7 @@ const core_1 = require("@salesforce/core");
5
5
  core_1.Messages.importMessagesDirectory(__dirname);
6
6
  const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'create');
7
7
  const NAME_KEY = 'name';
8
+ const JOBID_KEY = 'jobId';
8
9
  /**
9
10
  * A connect api resource for creating a community
10
11
  */
@@ -18,6 +19,7 @@ class CommunityCreateResource {
18
19
  const response = {
19
20
  message: messages.getMessage('response.createMessage'),
20
21
  name: result[NAME_KEY],
22
+ jobId: result[JOBID_KEY],
21
23
  action: messages.getMessage('response.action'),
22
24
  };
23
25
  return response;
@@ -34,7 +36,6 @@ class CommunityCreateResource {
34
36
  getRequestMethod() {
35
37
  return 'POST';
36
38
  }
37
- // eslint-disable-next-line @typescript-eslint/require-await
38
39
  async fetchPostParams() {
39
40
  const params = {
40
41
  name: this.options.name,
@@ -43,7 +44,7 @@ class CommunityCreateResource {
43
44
  description: this.options.description,
44
45
  templateParams: this.options['templateParams'],
45
46
  };
46
- return JSON.stringify(params);
47
+ return Promise.resolve(JSON.stringify(params));
47
48
  }
48
49
  }
49
50
  exports.CommunityCreateResource = CommunityCreateResource;
@@ -1 +1 @@
1
- {"version":3,"file":"CommunityCreateResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityCreateResource.ts"],"names":[],"mappings":";;;AAOA,2CAA4C;AAM5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,QAAQ,CAAC,CAAC;AAEjF,MAAM,QAAQ,GAAG,MAAM,CAAC;AAExB;;GAEG;AACH,MAAa,uBAAuB;IAClC,8DAA8D;IAC9D,YAA2B,OAA8B;QAA9B,YAAO,GAAP,OAAO,CAAuB;IAAG,CAAC;IAE7D,kDAAkD;IAC3C,aAAa,CAAC,MAAgD;QACnE,MAAM,QAAQ,GAA4B;YACxC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;YACtD,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC;YACtB,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;SAC/C,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,kDAAkD;IAC3C,WAAW,CAAC,KAAY;QAC7B,MAAM,KAAK,CAAC;IACd,CAAC;IAED,kDAAkD;IAC3C,uBAAuB;QAC5B,OAAO,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACjD,CAAC;IAED,kDAAkD;IAC3C,gBAAgB;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,4DAA4D;IACrD,KAAK,CAAC,eAAe;QAC1B,MAAM,MAAM,GAA0B;YACpC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;YACvB,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;YACzC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY;YACvC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAqB;YAC/C,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;SAC/C,CAAC;QAEF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;CACF;AAzCD,0DAyCC"}
1
+ {"version":3,"file":"CommunityCreateResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityCreateResource.ts"],"names":[],"mappings":";;;AAOA,2CAA4C;AAM5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,QAAQ,CAAC,CAAC;AAEjF,MAAM,QAAQ,GAAG,MAAM,CAAC;AACxB,MAAM,SAAS,GAAG,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAa,uBAAuB;IAClC,8DAA8D;IAC9D,YAA2B,OAA8B;QAA9B,YAAO,GAAP,OAAO,CAAuB;IAAG,CAAC;IAE7D,kDAAkD;IAC3C,aAAa,CAAC,MAAoE;QACvF,MAAM,QAAQ,GAA4B;YACxC,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC;YACtD,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC;YACtB,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC;YACxB,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;SAC/C,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,kDAAkD;IAC3C,WAAW,CAAC,KAAY;QAC7B,MAAM,KAAK,CAAC;IACd,CAAC;IAED,kDAAkD;IAC3C,uBAAuB;QAC5B,OAAO,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACjD,CAAC;IAED,kDAAkD;IAC3C,gBAAgB;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,eAAe;QAC1B,MAAM,MAAM,GAA0B;YACpC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;YACvB,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;YACzC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY;YACvC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW;YACrC,cAAc,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC;SAC/C,CAAC;QAEF,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,CAAC;CACF;AAzCD,0DAyCC"}
@@ -12,15 +12,16 @@ export type CommunityPublishResourceOptions = {
12
12
  };
13
13
  export declare class CommunityPublishResource implements ConnectResource<CommunityPublishResponse> {
14
14
  private options;
15
- private info;
15
+ private info?;
16
16
  constructor(options: CommunityPublishResourceOptions);
17
17
  fetchRelativeConnectUrl(): Promise<string>;
18
18
  getRequestMethod(): HttpMethods;
19
19
  fetchPostParams(): Promise<string>;
20
20
  handleSuccess(result: JsonCollection & {
21
- id?: string;
22
- name?: string;
23
- url?: string;
21
+ id: string;
22
+ name: string;
23
+ url: string;
24
+ jobId: string;
24
25
  }): CommunityPublishResponse;
25
26
  handleError(error: Error): CommunityPublishResponse;
26
27
  fetchCommunityId(): Promise<string>;
@@ -32,8 +32,9 @@ class CommunityPublishResource {
32
32
  id: result.id,
33
33
  message: messages.getMessage('response.message'),
34
34
  name: result.name,
35
- status: this.info.status,
35
+ status: this.info?.status,
36
36
  url: new url_1.URL(result.url).toString(),
37
+ jobId: result.jobId,
37
38
  };
38
39
  }
39
40
  // eslint-disable-next-line class-methods-use-this
@@ -1 +1 @@
1
- {"version":3,"file":"CommunityPublishResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityPublishResource.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA0B;AAE1B,2CAAiD;AAIjD,wEAAqE;AAGrE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,SAAS,CAAC,CAAC;AAWlF,MAAa,wBAAwB;IAGnC,YAA2B,OAAwC;QAAxC,YAAO,GAAP,OAAO,CAAiC;IAAG,CAAC;IAEhE,KAAK,CAAC,uBAAuB;QAClC,OAAO,wBAAwB,MAAM,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IACzE,CAAC;IAED,kDAAkD;IAC3C,gBAAgB;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,kDAAkD;IAC3C,eAAe;QACpB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IAEM,aAAa,CAClB,MAAqE;QAErE,OAAO;YACL,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,kBAAkB,CAAC;YAChD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM;YACxB,GAAG,EAAE,IAAI,SAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;SACpC,CAAC;IACJ,CAAC;IAED,kDAAkD;IAC3C,WAAW,CAAC,KAAY;QAC7B,MAAM,KAAK,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC3B,IAAI,CAAC,IAAI,GAAG,MAAM,yCAAmB,CAAC,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACd,MAAM,QAAQ,CAAC,WAAW,CAAC,0BAA0B,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;SAC7E;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACtB,CAAC;CACF;AA3CD,4DA2CC"}
1
+ {"version":3,"file":"CommunityPublishResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityPublishResource.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA0B;AAE1B,2CAAiD;AAIjD,wEAAqE;AAGrE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,SAAS,CAAC,CAAC;AAWlF,MAAa,wBAAwB;IAGnC,YAA2B,OAAwC;QAAxC,YAAO,GAAP,OAAO,CAAiC;IAAG,CAAC;IAEhE,KAAK,CAAC,uBAAuB;QAClC,OAAO,wBAAwB,MAAM,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC;IACzE,CAAC;IAED,kDAAkD;IAC3C,gBAAgB;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,kDAAkD;IAC3C,eAAe;QACpB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IAEM,aAAa,CAClB,MAAiF;QAEjF,OAAO;YACL,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,kBAAkB,CAAC;YAChD,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM;YACzB,GAAG,EAAE,IAAI,SAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YACnC,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC;IACJ,CAAC;IAED,kDAAkD;IAC3C,WAAW,CAAC,KAAY;QAC7B,MAAM,KAAK,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC3B,IAAI,CAAC,IAAI,GAAG,MAAM,yCAAmB,CAAC,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACtG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACd,MAAM,QAAQ,CAAC,WAAW,CAAC,0BAA0B,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;SAC7E;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACtB,CAAC;CACF;AA5CD,4DA4CC"}
@@ -18,7 +18,7 @@ export type CommunityCreateParams = {
18
18
  /**
19
19
  * the description for the community
20
20
  */
21
- description: any;
21
+ description?: string;
22
22
  /**
23
23
  * template parameters for the template used to create the community
24
24
  */
@@ -10,6 +10,10 @@ export type CommunityCreateResponse = {
10
10
  * name of the community
11
11
  */
12
12
  name: string;
13
+ /**
14
+ * id of the BackgroundOperation that runs the create job
15
+ */
16
+ jobId?: string;
13
17
  /**
14
18
  * the next actions that user can do to check, if community is created or not.
15
19
  */
@@ -23,4 +23,8 @@ export type CommunityPublishResponse = {
23
23
  * url to access the community
24
24
  */
25
25
  url: string;
26
+ /**
27
+ * id of the BackgroundOperation that runs the publish job
28
+ */
29
+ jobId?: string;
26
30
  };
@@ -1,5 +1,5 @@
1
1
  import { Org } from '@salesforce/core';
2
- import { QueryResult } from 'jsforce';
2
+ import { QueryResult, Record } from 'jsforce';
3
3
  import { CommunityInfo } from '../defs/CommunityInfo';
4
4
  /**
5
5
  * Helper services for Communities
@@ -13,6 +13,6 @@ export declare class CommunitiesServices {
13
13
  *
14
14
  * @returns - the community id for the given name
15
15
  */
16
- static fetchCommunityInfoFromName(org: Org, name: string): Promise<CommunityInfo | undefined>;
17
- static runQuery<T>(org: Org, query: string): Promise<QueryResult<T>>;
16
+ static fetchCommunityInfoFromName(org: Org, name?: string): Promise<CommunityInfo | undefined>;
18
17
  }
18
+ export declare const runQuery: <T extends Record>(org: Org, query: string) => Promise<QueryResult<T>>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommunitiesServices = void 0;
3
+ exports.runQuery = exports.CommunitiesServices = void 0;
4
4
  /**
5
5
  * Helper services for Communities
6
6
  */
@@ -17,7 +17,7 @@ class CommunitiesServices {
17
17
  if (!name) {
18
18
  return undefined;
19
19
  }
20
- const result = await CommunitiesServices.runQuery(org, `SELECT Id, Status FROM NETWORK WHERE NAME = '${name}'`);
20
+ const result = await (0, exports.runQuery)(org, `SELECT Id, Status FROM NETWORK WHERE NAME = '${name}'`);
21
21
  if (result.totalSize > 0) {
22
22
  const record = result.records[0];
23
23
  return {
@@ -27,12 +27,8 @@ class CommunitiesServices {
27
27
  };
28
28
  }
29
29
  }
30
- static async runQuery(org, query) {
31
- if (!query) {
32
- return;
33
- }
34
- return org.getConnection().query(query);
35
- }
36
30
  }
37
31
  exports.CommunitiesServices = CommunitiesServices;
32
+ const runQuery = async (org, query) => org.getConnection().query(query);
33
+ exports.runQuery = runQuery;
38
34
  //# sourceMappingURL=CommunitiesServices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommunitiesServices.js","sourceRoot":"","sources":["../../../../src/shared/community/service/CommunitiesServices.ts"],"names":[],"mappings":";;;AAWA;;GAEG;AACH,MAAa,mBAAmB;IAC9B;;;;;;;OAOG;IACI,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,GAAQ,EAAE,IAAY;QACnE,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,MAAM,GAAyD,MAAM,mBAAmB,CAAC,QAAQ,CACrG,GAAG,EACH,gDAAgD,IAAI,GAAG,CACxD,CAAC;QACF,IAAI,MAAM,CAAC,SAAS,GAAG,CAAC,EAAE;YACxB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACjC,OAAO;gBACL,IAAI;gBACJ,EAAE,EAAE,MAAM,CAAC,EAAE;gBACb,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC;SACH;IACH,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAI,GAAQ,EAAE,KAAa;QACrD,IAAI,CAAC,KAAK,EAAE;YACV,OAAO;SACR;QACD,OAAO,GAAG,CAAC,aAAa,EAAE,CAAC,KAAK,CAAI,KAAK,CAAC,CAAC;IAC7C,CAAC;CACF;AAlCD,kDAkCC"}
1
+ {"version":3,"file":"CommunitiesServices.js","sourceRoot":"","sources":["../../../../src/shared/community/service/CommunitiesServices.ts"],"names":[],"mappings":";;;AAWA;;GAEG;AACH,MAAa,mBAAmB;IAC9B;;;;;;;OAOG;IACI,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,GAAQ,EAAE,IAAa;QACpE,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,MAAM,GAAyD,MAAM,IAAA,gBAAQ,EACjF,GAAG,EACH,gDAAgD,IAAI,GAAG,CACxD,CAAC;QACF,IAAI,MAAM,CAAC,SAAS,GAAG,CAAC,EAAE;YACxB,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACjC,OAAO;gBACL,IAAI;gBACJ,EAAE,EAAE,MAAM,CAAC,EAAE;gBACb,MAAM,EAAE,MAAM,CAAC,MAAM;aACtB,CAAC;SACH;IACH,CAAC;CACF;AA3BD,kDA2BC;AAEM,MAAM,QAAQ,GAAG,KAAK,EAAoB,GAAQ,EAAE,KAAa,EAA2B,EAAE,CACnG,GAAG,CAAC,aAAa,EAAE,CAAC,KAAK,CAAI,KAAK,CAAC,CAAC;AADzB,QAAA,QAAQ,YACiB"}
@@ -1,4 +1,4 @@
1
- import { Org } from '@salesforce/core';
1
+ import { Connection } from '@salesforce/core';
2
2
  import { HttpRequest } from 'jsforce';
3
3
  import { ConnectResource } from './ConnectResource';
4
4
  /**
@@ -6,8 +6,8 @@ import { ConnectResource } from './ConnectResource';
6
6
  */
7
7
  export declare class ConnectExecutor<T> {
8
8
  private connectService;
9
- private org;
10
- constructor(connectService: ConnectResource<T>, org: Org);
9
+ private connection;
10
+ constructor(connectService: ConnectResource<T>, connection: Connection);
11
11
  /**
12
12
  * Call the connect resource as defined by the given ConnectResource for the given org
13
13
  */
@@ -8,16 +8,15 @@ const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'c
8
8
  * An executor which calls a connect api for the given org
9
9
  */
10
10
  class ConnectExecutor {
11
- constructor(connectService, org) {
11
+ constructor(connectService, connection) {
12
12
  this.connectService = connectService;
13
- this.org = org;
13
+ this.connection = connection;
14
14
  }
15
15
  /**
16
16
  * Call the connect resource as defined by the given ConnectResource for the given org
17
17
  */
18
18
  async callConnectApi() {
19
- return this.org
20
- .getConnection()
19
+ return this.connection
21
20
  .request(await this.fetchRequestInfo())
22
21
  .then((result) => this.connectService.handleSuccess(result))
23
22
  .catch((err) => this.connectService.handleError(err));
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectExecutor.js","sourceRoot":"","sources":["../../../../src/shared/connect/services/ConnectExecutor.ts"],"names":[],"mappings":";;;AAOA,2CAA0D;AAI1D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAAC;AAE3F;;GAEG;AACH,MAAa,eAAe;IAC1B,YAA2B,cAAkC,EAAU,GAAQ;QAApD,mBAAc,GAAd,cAAc,CAAoB;QAAU,QAAG,GAAH,GAAG,CAAK;IAAG,CAAC;IAEnF;;OAEG;IACI,KAAK,CAAC,cAAc;QACzB,OAAO,IAA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IAC1B,YAA2B,cAAkC,EAAU,UAAsB;QAAlE,mBAAc,GAAd,cAAc,CAAoB;QAAU,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAEjG;;OAEG;IACI,KAAK,CAAC,cAAc;QACzB,OAAO,IAAI,CAAC,UAAU;aACnB,OAAO,CAAC,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;aACtC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,MAAwB,CAAC,CAAC;aAC7E,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,GAAY,CAAC,CAAC,CAAC;IACnE,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC3B,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,uBAAuB,EAAE,CAAC,CAAC;QAClF,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC;QACtD,IAAI,MAAM,KAAK,KAAK,EAAE;YACpB,OAAO;gBACL,GAAG,EAAE,UAAU;gBACf,MAAM;gBACN,IAAI,EAAE,IAAI;aACX,CAAC;SACH;aAAM,IAAI,MAAM,KAAK,MAAM,EAAE;YAC5B,OAAO;gBACL,GAAG,EAAE,UAAU;gBACf,MAAM;gBACN,IAAI,EAAE,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE;aAClD,CAAC;SACH;aAAM;YACL,MAAM,IAAI,cAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC;SACnG;IACH,CAAC;CACF;AAhCD,0CAgCC"}
@@ -4,18 +4,21 @@ Create an Experience Cloud site using a template.
4
4
 
5
5
  # description
6
6
 
7
- See 'Which Experience Cloud Template Should I Use?' (https://help.salesforce.com/s/articleView?id=sf.siteforce_commtemp_intro.htm&type=5) in Salesforce Help for more information about the different template
8
- types available for Experience Cloud.
7
+ Run the "community list template" command to see the templates available in your org. See 'Which Experience Cloud Template Should I Use?' in Salesforce Help for more information about the different template types available. (https://help.salesforce.com/s/articleView?id=sf.siteforce_commtemp_intro.htm&type=5)
9
8
 
10
- When creating a site with the Build Your Own (LWR) template, you must also specify the AuthenticationType value using the format templateParams.AuthenticationType=value, where value is AUTHENTICATED, UNAUTHENTICATED, or AUTHENTICATED_WITH_PUBLIC_ACCESS. Name and values are case-sensitive. See 'ExperienceBundle' in the Metadata API Developer Guide for more information. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_experiencebundle.htm)
9
+ When you create a site with the Build Your Own (LWR) template, you must also specify the AuthenticationType value using the format templateParams.AuthenticationType=value, where value is AUTHENTICATED or AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED. Name and values are case-sensitive. See 'DigitalExperienceBundle' in the Metadata API Developer Guide for more information. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_digitalexperiencebundle.htm)
11
10
 
12
- When you execute this command, it creates the site in preview status, which means that it isn't yet live. After you finish building your site, you can make it live.
11
+ The site creation process is an async job that generates a jobId. To check the site creation status, query the BackgroundOperation object and enter the jobId as the Id. See ‘BackgroundOperation’ in the Object Reference for the Salesforce Platform for more information. (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_backgroundoperation.htm)
12
+
13
+ If the job doesn’t complete within 10 minutes, it times out. You receive an error message and must restart the site creation process. Completed jobs expire after 24 hours and are removed from the database.
14
+
15
+ When you run this command, it creates the site in preview status, which means that the site isn't yet live. After you finish building your site, you can make it live.
13
16
 
14
17
  If you have an Experience Builder site, publish the site using the "community publish" command to make it live.
15
18
 
16
- If you have a Salesforce Tabs + Visualforce site, activate the site to make it live by updating the status field of the Network type in the Metadata API. Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.
19
+ If you have a Salesforce Tabs + Visualforce site, to activate the site and make it live, update the status field of the Network type in Metadata API. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm) Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.
17
20
 
18
- For Experience Builder sites, activating the site just sends out a welcome email to site members.
21
+ For Experience Builder sites, activating the site sends a welcome email to site members.
19
22
 
20
23
  # examples
21
24
 
@@ -61,8 +64,7 @@ The description displays in Digital Experiences - All Sites in Setup and helps w
61
64
 
62
65
  # response.action
63
66
 
64
- We’re creating your site. Run sfdx force:org:open -p \_ui/networks/setup/SetupNetworksPage to view a list of your sites,
65
- and to confirm when this site is ready.
67
+ Site creation is under way. To track its status, query the BackgroundOperation object and include the jobId.
66
68
 
67
69
  # response.styleHeader
68
70
 
@@ -4,13 +4,13 @@ Publish an Experience Builder site to make it live.
4
4
 
5
5
  # description
6
6
 
7
- Each time you publish it, you update the live site with the most recent updates. When you publish an Experience Builder site for the first time, you make the site's URL live and enable login access for site members.
7
+ Each time you publish a site, you update the live site with the most recent updates. When you publish an Experience Builder site for the first time, you make the site's URL live and enable login access for site members.
8
8
 
9
- Additionally, to send a welcome email to all site members, you must activate the site. (Activation is also required to successfully set up SEO for Experience Builder sites.) To activate a site, update the status field of the Network type in the Metadata API. Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.
9
+ In addition to publishing, you must activate a site to send a welcome email to all site members. Activation is also required to set up SEO for Experience Builder sites. To activate a site, update the status field of the Network type in Metadata API. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm)Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.
10
10
 
11
- Subsequently, each time you publish the site, you update the live site with all changes made to the site since it was last published.
11
+ An email notification informs you when your changes are live on the published site. The site publish process is an async job that generates a jobId. To check the site publish status manually, query the BackgroundOperation object and enter the jobId as the Id. See ‘BackgroundOperation’ in the Object Reference for the Salesforce Platform for more information. (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_backgroundoperation.htm)
12
12
 
13
- An email notification informs you when your changes are live.
13
+ If the job doesn’t complete within 15 minutes, it times out. You receive an error message and must restart the site publish process. Completed jobs expire after 24 hours and are removed from the database.
14
14
 
15
15
  # examples
16
16
 
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "2.2.12",
2
+ "version": "2.3.0",
3
3
  "commands": {
4
4
  "community:create": {
5
5
  "id": "community:create",
6
6
  "summary": "Create an Experience Cloud site using a template.",
7
- "description": "See 'Which Experience Cloud Template Should I Use?' (https://help.salesforce.com/s/articleView?id=sf.siteforce_commtemp_intro.htm&type=5) in Salesforce Help for more information about the different template\ntypes available for Experience Cloud.\n\nWhen creating a site with the Build Your Own (LWR) template, you must also specify the AuthenticationType value using the format templateParams.AuthenticationType=value, where value is AUTHENTICATED, UNAUTHENTICATED, or AUTHENTICATED_WITH_PUBLIC_ACCESS. Name and values are case-sensitive. See 'ExperienceBundle' in the Metadata API Developer Guide for more information. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_experiencebundle.htm)\n\nWhen you execute this command, it creates the site in preview status, which means that it isn't yet live. After you finish building your site, you can make it live.\n\nIf you have an Experience Builder site, publish the site using the \"community publish\" command to make it live.\n\nIf you have a Salesforce Tabs + Visualforce site, activate the site to make it live by updating the status field of the Network type in the Metadata API. Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.\n\nFor Experience Builder sites, activating the site just sends out a welcome email to site members.",
7
+ "description": "Run the \"community list template\" command to see the templates available in your org. See 'Which Experience Cloud Template Should I Use?' in Salesforce Help for more information about the different template types available. (https://help.salesforce.com/s/articleView?id=sf.siteforce_commtemp_intro.htm&type=5)\n\nWhen you create a site with the Build Your Own (LWR) template, you must also specify the AuthenticationType value using the format templateParams.AuthenticationType=value, where value is AUTHENTICATED or AUTHENTICATED_WITH_PUBLIC_ACCESS_ENABLED. Name and values are case-sensitive. See 'DigitalExperienceBundle' in the Metadata API Developer Guide for more information. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_digitalexperiencebundle.htm)\n\nThe site creation process is an async job that generates a jobId. To check the site creation status, query the BackgroundOperation object and enter the jobId as the Id. See ‘BackgroundOperation’ in the Object Reference for the Salesforce Platform for more information. (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_backgroundoperation.htm)\n\nIf the job doesn’t complete within 10 minutes, it times out. You receive an error message and must restart the site creation process. Completed jobs expire after 24 hours and are removed from the database.\n\nWhen you run this command, it creates the site in preview status, which means that the site isn't yet live. After you finish building your site, you can make it live.\n\nIf you have an Experience Builder site, publish the site using the \"community publish\" command to make it live.\n\nIf you have a Salesforce Tabs + Visualforce site, to activate the site and make it live, update the status field of the Network type in Metadata API. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm) Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.\n\nFor Experience Builder sites, activating the site sends a welcome email to site members.",
8
8
  "strict": false,
9
9
  "pluginName": "@salesforce/plugin-community",
10
10
  "pluginAlias": "@salesforce/plugin-community",
@@ -106,19 +106,12 @@
106
106
  }
107
107
  },
108
108
  "args": {},
109
- "validationPatterns": [
110
- "name",
111
- "urlPathPrefix",
112
- "templateName",
113
- "description",
114
- "templateParams(\\.\\w+)+"
115
- ],
116
109
  "hasDynamicHelp": true
117
110
  },
118
111
  "community:publish": {
119
112
  "id": "community:publish",
120
113
  "summary": "Publish an Experience Builder site to make it live.",
121
- "description": "Each time you publish it, you update the live site with the most recent updates. When you publish an Experience Builder site for the first time, you make the site's URL live and enable login access for site members.\n\nAdditionally, to send a welcome email to all site members, you must activate the site. (Activation is also required to successfully set up SEO for Experience Builder sites.) To activate a site, update the status field of the Network type in the Metadata API. Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.\n\nSubsequently, each time you publish the site, you update the live site with all changes made to the site since it was last published.\n\nAn email notification informs you when your changes are live.",
114
+ "description": "Each time you publish a site, you update the live site with the most recent updates. When you publish an Experience Builder site for the first time, you make the site's URL live and enable login access for site members.\n\nIn addition to publishing, you must activate a site to send a welcome email to all site members. Activation is also required to set up SEO for Experience Builder sites. To activate a site, update the status field of the Network type in Metadata API. (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_network.htm)Alternatively, in Experience Workspaces, go to Administration | Settings, and click Activate.\n\nAn email notification informs you when your changes are live on the published site. The site publish process is an async job that generates a jobId. To check the site publish status manually, query the BackgroundOperation object and enter the jobId as the Id. See ‘BackgroundOperation’ in the Object Reference for the Salesforce Platform for more information. (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_backgroundoperation.htm)\n\nIf the job doesn’t complete within 15 minutes, it times out. You receive an error message and must restart the site publish process. Completed jobs expire after 24 hours and are removed from the database.",
122
115
  "strict": true,
123
116
  "pluginName": "@salesforce/plugin-community",
124
117
  "pluginAlias": "@salesforce/plugin-community",
package/package.json CHANGED
@@ -1,40 +1,41 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-community",
3
3
  "description": "Community commands to create and publish an Experience Cloud site, and view a list of available templates in you org.",
4
- "version": "2.2.12",
4
+ "version": "2.3.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
8
- "@oclif/core": "^2.6.4",
9
- "@salesforce/core": "^3.34.1",
10
- "@salesforce/kit": "^1.9.0",
11
- "@salesforce/sf-plugins-core": "^2.2.9",
8
+ "@oclif/core": "^2.8.2",
9
+ "@salesforce/core": "^4.0.1",
10
+ "@salesforce/kit": "^3.0.2",
11
+ "@salesforce/sf-plugins-core": "^3.0.2",
12
12
  "tslib": "^2"
13
13
  },
14
14
  "devDependencies": {
15
- "@oclif/plugin-command-snapshot": "^3.3.14",
16
- "@salesforce/cli-plugins-testkit": "^3.3.1",
17
- "@salesforce/dev-config": "^3.0.1",
18
- "@salesforce/dev-scripts": "^4.3.1",
15
+ "@oclif/plugin-command-snapshot": "^3.3.15",
16
+ "@salesforce/cli-plugins-testkit": "^3.4.0",
17
+ "@salesforce/dev-config": "^4.0.1",
18
+ "@salesforce/dev-scripts": "^5.3.0",
19
19
  "@salesforce/plugin-command-reference": "^2.4.4",
20
- "@salesforce/prettier-config": "^0.0.2",
20
+ "@salesforce/prettier-config": "^0.0.3",
21
21
  "@salesforce/ts-sinon": "1.4.6",
22
- "@salesforce/ts-types": "^1.7.3",
22
+ "@salesforce/ts-types": "^2.0.2",
23
23
  "@swc/core": "^1.3.39",
24
- "@typescript-eslint/eslint-plugin": "5.44.0",
25
- "@typescript-eslint/parser": "^5.59.6",
24
+ "@types/inquirer": "^9.0.3",
25
+ "@typescript-eslint/eslint-plugin": "5.59.7",
26
+ "@typescript-eslint/parser": "^5.59.7",
26
27
  "chai": "^4.3.7",
27
- "eslint": "^8.40.0",
28
+ "eslint": "^8.41.0",
28
29
  "eslint-config-prettier": "^8.8.0",
29
- "eslint-config-salesforce": "^1.2.0",
30
+ "eslint-config-salesforce": "^2.0.1",
30
31
  "eslint-config-salesforce-license": "^0.2.0",
31
32
  "eslint-config-salesforce-typescript": "^1.1.1",
32
33
  "eslint-plugin-header": "^3.1.1",
33
34
  "eslint-plugin-import": "^2.27.4",
34
- "eslint-plugin-jsdoc": "^39.9.1",
35
- "eslint-plugin-sf-plugin": "^1.15.1",
35
+ "eslint-plugin-jsdoc": "^43.0.5",
36
+ "eslint-plugin-sf-plugin": "^1.15.5",
36
37
  "husky": "^7.0.4",
37
- "jsforce": "^2.0.0-beta.20",
38
+ "jsforce": "^2.0.0-beta.23",
38
39
  "mocha": "^9.2.2",
39
40
  "nyc": "^15.1.0",
40
41
  "oclif": "^3.9.0",
@@ -48,7 +49,7 @@
48
49
  },
49
50
  "config": {},
50
51
  "engines": {
51
- "node": ">=14.0.0"
52
+ "node": ">=16.0.0"
52
53
  },
53
54
  "files": [
54
55
  "/lib",
@@ -210,7 +211,7 @@
210
211
  }
211
212
  },
212
213
  "sfdx": {
213
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-community/2.2.12.crt",
214
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-community/2.2.12.sig"
214
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-community/2.3.0.crt",
215
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-community/2.3.0.sig"
215
216
  }
216
217
  }
@@ -1,32 +0,0 @@
1
- import { JsonMap } from '@salesforce/ts-types';
2
- /**
3
- * A parser for the CommunityCreateCommand varargs.
4
- */
5
- export declare class CommunityNameValueParser {
6
- private patterns;
7
- /**
8
- * The caller/creator of the parser needs to pass in some patterns to validate.
9
- *
10
- * These patterns are joined together in a RegExp and matched against the "name" portion of the vararg.
11
- *
12
- * e.g.
13
- * let parser = new CommunityNameValueParser([ "name", "template" ]);
14
- * parser.parse([ "name=Demo", "template=\"Customer Service\"" ]); // passes
15
- * parser.parse([ "name=Demo", "urlpathprefix=pathToDemo" ]); // fails
16
- * parser.parse([ "nameOne=Demo" ]); // fails
17
- * parser.parse([ "thename=Demo" ]); // fails
18
- * parser.parse([ "Name=Demo" ]); // fails
19
- *
20
- * The patterns are joined between a /^(...)$/ RegExp enclosure, so it only accepts exact matches that are case sensitive. (See validate().)
21
- *
22
- * However, you can use regular expressions to allow for pattern matches.
23
- *
24
- * let parser = new CommunityNameValueParser([ "name", "template\\.\\w+" ]);
25
- * parser.parse([ "template.anything=substance" ]); // passes
26
- * parser.parse([ "name=Demo", "template=\"Customer Service\"" ]); // fails
27
- * parser.parse([ "name=Demo", "template.=templateOne" ]); // fails
28
- */
29
- constructor(patterns?: string[]);
30
- parse(args: string[]): JsonMap;
31
- private validate;
32
- }
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2020, salesforce.com, inc.
4
- * All rights reserved.
5
- * Licensed under the BSD 3-Clause license.
6
- * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CommunityNameValueParser = void 0;
10
- const core_1 = require("@salesforce/core");
11
- core_1.Messages.importMessagesDirectory(__dirname);
12
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'create');
13
- /**
14
- * A parser for the CommunityCreateCommand varargs.
15
- */
16
- class CommunityNameValueParser {
17
- /**
18
- * The caller/creator of the parser needs to pass in some patterns to validate.
19
- *
20
- * These patterns are joined together in a RegExp and matched against the "name" portion of the vararg.
21
- *
22
- * e.g.
23
- * let parser = new CommunityNameValueParser([ "name", "template" ]);
24
- * parser.parse([ "name=Demo", "template=\"Customer Service\"" ]); // passes
25
- * parser.parse([ "name=Demo", "urlpathprefix=pathToDemo" ]); // fails
26
- * parser.parse([ "nameOne=Demo" ]); // fails
27
- * parser.parse([ "thename=Demo" ]); // fails
28
- * parser.parse([ "Name=Demo" ]); // fails
29
- *
30
- * The patterns are joined between a /^(...)$/ RegExp enclosure, so it only accepts exact matches that are case sensitive. (See validate().)
31
- *
32
- * However, you can use regular expressions to allow for pattern matches.
33
- *
34
- * let parser = new CommunityNameValueParser([ "name", "template\\.\\w+" ]);
35
- * parser.parse([ "template.anything=substance" ]); // passes
36
- * parser.parse([ "name=Demo", "template=\"Customer Service\"" ]); // fails
37
- * parser.parse([ "name=Demo", "template.=templateOne" ]); // fails
38
- */
39
- constructor(patterns = ['.+']) {
40
- this.patterns = patterns;
41
- }
42
- parse(args) {
43
- const mappings = parseKeyValuePairs(args);
44
- this.validate(mappings);
45
- const values = buildJsonMapFromKeyValues(mappings);
46
- return values;
47
- }
48
- validate(parsedArgs) {
49
- const pattern = new RegExp('^(' + this.patterns.join('|') + ')$');
50
- const errors = parsedArgs
51
- .filter(([key]) => !pattern.test(key))
52
- .map(([key, value]) => `${key}="${value}"`);
53
- if (errors.length) {
54
- throw messages.createError('error.invalidVarargs', errors);
55
- }
56
- }
57
- }
58
- exports.CommunityNameValueParser = CommunityNameValueParser;
59
- const parseKeyValuePairs = (args) => {
60
- const keyValues = args.reduce((collection, terms) => {
61
- const [key, value] = terms.split(/=(.*)/);
62
- collection.push([key, value]);
63
- return collection;
64
- }, []);
65
- return keyValues;
66
- };
67
- const setValue = (hyperKey, value, json = {}) => {
68
- const keys = hyperKey.split('.');
69
- const lastKey = keys[keys.length - 1];
70
- const last = keys
71
- .slice(0, -1)
72
- .reduce((map, index) => (map[index] = map[index] === undefined ? {} : map[index]), json);
73
- last[lastKey] = value;
74
- return json;
75
- };
76
- const buildJsonMapFromKeyValues = (keyValues) => {
77
- let results = {};
78
- keyValues.forEach(([key, value]) => {
79
- results = setValue(key, value, results);
80
- });
81
- return results;
82
- };
83
- //# sourceMappingURL=CommunityNameValueParser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommunityNameValueParser.js","sourceRoot":"","sources":["../../../../src/shared/community/commands/CommunityNameValueParser.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,2CAA4C;AAE5C,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,QAAQ,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAa,wBAAwB;IACnC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,YAA2B,WAAqB,CAAC,IAAI,CAAC;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAAG,CAAC;IAEnD,KAAK,CAAC,IAAc;QACzB,MAAM,QAAQ,GAA4B,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAExB,MAAM,MAAM,GAAY,yBAAyB,CAAC,QAAQ,CAAC,CAAC;QAE5D,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,QAAQ,CAAC,UAAmC;QAClD,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,IAA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AAC,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3F,IAAI,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IAEtB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,SAAkC,EAAW,EAAE;IAChF,IAAI,OAAO,GAAY,EAAE,CAAC;IAC1B,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACjC,OAAO,GAAG,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import { Org } from '@salesforce/core';
2
- export declare const applyApiVersionToOrg: (org: Org, apiVersion: string) => Promise<Org>;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyApiVersionToOrg = void 0;
4
- /*
5
- * Copyright (c) 2020, salesforce.com, inc.
6
- * All rights reserved.
7
- * Licensed under the BSD 3-Clause license.
8
- * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
- */
10
- const core_1 = require("@salesforce/core");
11
- const applyApiVersionToOrg = (org, apiVersion) => core_1.Org.create({ connection: org.getConnection(apiVersion) });
12
- exports.applyApiVersionToOrg = applyApiVersionToOrg;
13
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/shared/utils.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAAuC;AAEhC,MAAM,oBAAoB,GAAG,CAAC,GAAQ,EAAE,UAAkB,EAAgB,EAAE,CACjF,UAAG,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;AAD/C,QAAA,oBAAoB,wBAC2B"}