@salesforce/plugin-community 2.4.8 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +26 -26
  2. package/lib/commands/community/create.d.ts +8 -8
  3. package/lib/commands/community/create.js +52 -55
  4. package/lib/commands/community/create.js.map +1 -1
  5. package/lib/commands/community/list/template.d.ts +4 -4
  6. package/lib/commands/community/list/template.js +21 -23
  7. package/lib/commands/community/list/template.js.map +1 -1
  8. package/lib/commands/community/publish.d.ts +5 -5
  9. package/lib/commands/community/publish.js +26 -28
  10. package/lib/commands/community/publish.js.map +1 -1
  11. package/lib/index.d.ts +1 -1
  12. package/lib/index.js +1 -2
  13. package/lib/index.js.map +1 -1
  14. package/lib/shared/community/connect/CommunityCreateResource.d.ts +3 -3
  15. package/lib/shared/community/connect/CommunityCreateResource.js +13 -8
  16. package/lib/shared/community/connect/CommunityCreateResource.js.map +1 -1
  17. package/lib/shared/community/connect/CommunityPublishResource.d.ts +2 -2
  18. package/lib/shared/community/connect/CommunityPublishResource.js +11 -12
  19. package/lib/shared/community/connect/CommunityPublishResource.js.map +1 -1
  20. package/lib/shared/community/connect/CommunityTemplatesResource.d.ts +2 -2
  21. package/lib/shared/community/connect/CommunityTemplatesResource.js +1 -5
  22. package/lib/shared/community/connect/CommunityTemplatesResource.js.map +1 -1
  23. package/lib/shared/community/defs/CommunityCreateParams.js +1 -2
  24. package/lib/shared/community/defs/CommunityCreateParams.js.map +1 -1
  25. package/lib/shared/community/defs/CommunityCreateResponse.js +1 -2
  26. package/lib/shared/community/defs/CommunityCreateResponse.js.map +1 -1
  27. package/lib/shared/community/defs/CommunityInfo.d.ts +1 -1
  28. package/lib/shared/community/defs/CommunityInfo.js +1 -2
  29. package/lib/shared/community/defs/CommunityPublishResponse.d.ts +1 -1
  30. package/lib/shared/community/defs/CommunityPublishResponse.js +1 -2
  31. package/lib/shared/community/defs/CommunityPublishResponse.js.map +1 -1
  32. package/lib/shared/community/defs/CommunityStatusEnum.js +1 -2
  33. package/lib/shared/community/defs/CommunityStatusEnum.js.map +1 -1
  34. package/lib/shared/community/defs/CommunityTemplates.js +1 -2
  35. package/lib/shared/community/defs/CommunityTemplates.js.map +1 -1
  36. package/lib/shared/community/defs/CommunityTemplatesListResponse.d.ts +1 -1
  37. package/lib/shared/community/defs/CommunityTemplatesListResponse.js +1 -2
  38. package/lib/shared/community/defs/CommunityTemplatesListResponse.js.map +1 -1
  39. package/lib/shared/community/service/CommunitiesServices.d.ts +3 -3
  40. package/lib/shared/community/service/CommunitiesServices.js +5 -8
  41. package/lib/shared/community/service/CommunitiesServices.js.map +1 -1
  42. package/lib/shared/connect/services/ConnectExecutor.d.ts +1 -1
  43. package/lib/shared/connect/services/ConnectExecutor.js +15 -9
  44. package/lib/shared/connect/services/ConnectExecutor.js.map +1 -1
  45. package/lib/shared/connect/services/ConnectResource.js +1 -2
  46. package/messages/create.md +4 -4
  47. package/oclif.lock +759 -792
  48. package/oclif.manifest.json +222 -125
  49. package/package.json +31 -49
package/README.md CHANGED
@@ -72,17 +72,17 @@ sfdx plugins
72
72
 
73
73
  <!-- commands -->
74
74
 
75
- - [`sfdx community:create`](#sfdx-communitycreate)
76
- - [`sfdx community:list:template`](#sfdx-communitylisttemplate)
77
- - [`sfdx community:publish`](#sfdx-communitypublish)
75
+ - [`sf community create`](#sf-community-create)
76
+ - [`sf community list template`](#sf-community-list-template)
77
+ - [`sf community publish`](#sf-community-publish)
78
78
 
79
- ## `sfdx community:create`
79
+ ## `sf community create`
80
80
 
81
81
  Create an Experience Cloud site using a template.
82
82
 
83
83
  ```
84
84
  USAGE
85
- $ sfdx community:create -n <value> -t <value> -o <value> [--json] [-p <value>] [-d <value>] [--api-version <value>]
85
+ $ sf community create -n <value> -t <value> -o <value> [--json] [-p <value>] [-d <value>] [--api-version <value>]
86
86
 
87
87
  FLAGS
88
88
  -d, --description=<value> Description of the site.
@@ -90,7 +90,7 @@ FLAGS
90
90
  -o, --target-org=<value> (required) Username or alias of the target org.
91
91
  -p, --url-path-prefix=<value> URL to append to the domain created when Digital Experiences was enabled for this org.
92
92
  -t, --template-name=<value> (required) Template to use to create a site.
93
- --api-version=<value> Override the api version used for api requests made by this command
93
+ --api-version=<value> Override the api version used for api requests made by this command
94
94
 
95
95
  GLOBAL FLAGS
96
96
  --json Format output as json.
@@ -129,21 +129,21 @@ DESCRIPTION
129
129
  For Experience Builder sites, activating the site sends a welcome email to site members.
130
130
 
131
131
  ALIASES
132
- $ sfdx force:community:create
132
+ $ sf force community create
133
133
 
134
134
  EXAMPLES
135
135
  Create an Experience Cloud site using template 'Customer Service' and URL path prefix 'customers':
136
136
 
137
- $ sfdx community:create --name 'My Customer Site' --template-name 'Customer Service' --url-path-prefix customers \
137
+ $ sf community create --name 'My Customer Site' --template-name 'Customer Service' --url-path-prefix customers \
138
138
  --description 'My customer site'
139
139
 
140
140
  Create a site using 'Partner Central' template:
141
141
 
142
- $ sfdx community:create --name partnercentral --template-name 'Partner Central' --url-path-prefix partners
142
+ $ sf community create --name partnercentral --template-name 'Partner Central' --url-path-prefix partners
143
143
 
144
144
  Create a site using the 'Build Your Own (LWR)' template with authentication type of UNAUTHENTICATED:
145
145
 
146
- $ sfdx community:create --name lwrsite --template-name 'Build Your Own (LWR)' --url-path-prefix lwrsite \
146
+ $ sf community create --name lwrsite --template-name 'Build Your Own (LWR)' --url-path-prefix lwrsite \
147
147
  templateParams.AuthenticationType=UNAUTHENTICATED
148
148
 
149
149
  FLAG DESCRIPTIONS
@@ -162,19 +162,19 @@ FLAG DESCRIPTIONS
162
162
  available in your org.
163
163
  ```
164
164
 
165
- _See code: [src/commands/community/create.ts](https://github.com/salesforcecli/plugin-community/blob/2.4.8/src/commands/community/create.ts)_
165
+ _See code: [src/commands/community/create.ts](https://github.com/salesforcecli/plugin-community/blob/2.4.10/src/commands/community/create.ts)_
166
166
 
167
- ## `sfdx community:list:template`
167
+ ## `sf community list template`
168
168
 
169
169
  Retrieve the list of templates available in your org.
170
170
 
171
171
  ```
172
172
  USAGE
173
- $ sfdx community:list:template -o <value> [--json] [--api-version <value>]
173
+ $ sf community list template -o <value> [--json] [--api-version <value>]
174
174
 
175
175
  FLAGS
176
- -o, --target-org=<value> (required) Username or alias of the target org.
177
- --api-version=<value> Override the api version used for api requests made by this command
176
+ -o, --target-org=<value> (required) Username or alias of the target org.
177
+ --api-version=<value> Override the api version used for api requests made by this command
178
178
 
179
179
  GLOBAL FLAGS
180
180
  --json Format output as json.
@@ -187,28 +187,28 @@ DESCRIPTION
187
187
  information about the different template types available for Experience Cloud.
188
188
 
189
189
  ALIASES
190
- $ sfdx force:community:template:list
190
+ $ sf force community template list
191
191
 
192
192
  EXAMPLES
193
193
  Retrieve the template list from an org with alias my-scratch-org:
194
194
 
195
- $ sfdx community:list:template --target-org my-scratch-org
195
+ $ sf community list template --target-org my-scratch-org
196
196
  ```
197
197
 
198
- _See code: [src/commands/community/list/template.ts](https://github.com/salesforcecli/plugin-community/blob/2.4.8/src/commands/community/list/template.ts)_
198
+ _See code: [src/commands/community/list/template.ts](https://github.com/salesforcecli/plugin-community/blob/2.4.10/src/commands/community/list/template.ts)_
199
199
 
200
- ## `sfdx community:publish`
200
+ ## `sf community publish`
201
201
 
202
202
  Publish an Experience Builder site to make it live.
203
203
 
204
204
  ```
205
205
  USAGE
206
- $ sfdx community:publish -n <value> -o <value> [--json] [--api-version <value>]
206
+ $ sf community publish -n <value> -o <value> [--json] [--api-version <value>]
207
207
 
208
208
  FLAGS
209
- -n, --name=<value> (required) Name of the Experience Builder site to publish.
210
- -o, --target-org=<value> (required) Username or alias of the target org.
211
- --api-version=<value> Override the api version used for api requests made by this command
209
+ -n, --name=<value> (required) Name of the Experience Builder site to publish.
210
+ -o, --target-org=<value> (required) Username or alias of the target org.
211
+ --api-version=<value> Override the api version used for api requests made by this command
212
212
 
213
213
  GLOBAL FLAGS
214
214
  --json Format output as json.
@@ -235,14 +235,14 @@ DESCRIPTION
235
235
  publish process. Completed jobs expire after 24 hours and are removed from the database.
236
236
 
237
237
  ALIASES
238
- $ sfdx force:community:publish
238
+ $ sf force community publish
239
239
 
240
240
  EXAMPLES
241
241
  Publish the Experience Builder site with name "My Customer Site':
242
242
 
243
- $ sfdx community:publish --name 'My Customer Site'
243
+ $ sf community publish --name 'My Customer Site'
244
244
  ```
245
245
 
246
- _See code: [src/commands/community/publish.ts](https://github.com/salesforcecli/plugin-community/blob/2.4.8/src/commands/community/publish.ts)_
246
+ _See code: [src/commands/community/publish.ts](https://github.com/salesforcecli/plugin-community/blob/2.4.10/src/commands/community/publish.ts)_
247
247
 
248
248
  <!-- commandsstop -->
@@ -1,6 +1,6 @@
1
1
  import { JsonMap } from '@salesforce/ts-types';
2
2
  import { SfCommand } from '@salesforce/sf-plugins-core';
3
- import { CommunityCreateResponse } from '../../shared/community/defs/CommunityCreateResponse';
3
+ import { CommunityCreateResponse } from '../../shared/community/defs/CommunityCreateResponse.js';
4
4
  /**
5
5
  * A command to create a community.
6
6
  * This is just an sfdx wrapper around the community create connect endpoint
@@ -13,13 +13,13 @@ export declare class CommunityCreateCommand extends SfCommand<CommunityCreateRes
13
13
  static readonly examples: string[];
14
14
  static readonly strict = false;
15
15
  static readonly flags: {
16
- name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
17
- 'template-name': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
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 | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
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 | 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>;
16
+ name: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
17
+ 'template-name': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
18
+ 'url-path-prefix': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
19
+ description: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
20
+ 'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
21
+ loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
22
+ 'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
23
23
  };
24
24
  run(): Promise<CommunityCreateResponse>;
25
25
  private displayResults;
@@ -1,18 +1,17 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2020, salesforce.com, inc.
4
3
  * All rights reserved.
5
4
  * Licensed under the BSD 3-Clause license.
6
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
6
  */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.getTemplateParamObjectFromArgs = exports.CommunityCreateCommand = void 0;
10
- const core_1 = require("@salesforce/core");
11
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
12
- const ConnectExecutor_1 = require("../../shared/connect/services/ConnectExecutor");
13
- const CommunityCreateResource_1 = require("../../shared/community/connect/CommunityCreateResource");
14
- core_1.Messages.importMessagesDirectory(__dirname);
15
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'create');
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { Messages, SfError } from '@salesforce/core';
10
+ import { Flags, loglevel, orgApiVersionFlagWithDeprecations, requiredOrgFlagWithDeprecations, SfCommand, parseVarArgs, } from '@salesforce/sf-plugins-core';
11
+ import { ConnectExecutor } from '../../shared/connect/services/ConnectExecutor.js';
12
+ import { CommunityCreateResource } from '../../shared/community/connect/CommunityCreateResource.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const messages = Messages.loadMessages('@salesforce/plugin-community', 'create');
16
15
  const MESSAGE_KEY = 'message';
17
16
  const NAME_KEY = 'name';
18
17
  const JOBID_KEY = 'jobId';
@@ -21,18 +20,56 @@ const ACTION_KEY = 'action';
21
20
  * A command to create a community.
22
21
  * This is just an sfdx wrapper around the community create connect endpoint
23
22
  */
24
- class CommunityCreateCommand extends sf_plugins_core_1.SfCommand {
23
+ export class CommunityCreateCommand extends SfCommand {
24
+ static deprecateAliases = true;
25
+ static aliases = ['force:community:create'];
26
+ static summary = messages.getMessage('summary');
27
+ static description = messages.getMessage('description');
28
+ static examples = messages.getMessages('examples');
29
+ static strict = false;
30
+ static flags = {
31
+ name: Flags.string({
32
+ char: 'n',
33
+ summary: messages.getMessage('flags.name.summary'),
34
+ required: true,
35
+ }),
36
+ 'template-name': Flags.string({
37
+ char: 't',
38
+ summary: messages.getMessage('flags.template-name.summary'),
39
+ description: messages.getMessage('flags.template-name.description'),
40
+ required: true,
41
+ deprecateAliases: true,
42
+ aliases: ['templatename'],
43
+ }),
44
+ 'url-path-prefix': Flags.string({
45
+ char: 'p',
46
+ summary: messages.getMessage('flags.url-path-prefix.summary'),
47
+ description: messages.getMessage('flags.url-path-prefix.description'),
48
+ // The api requires you to pass this, it accepts an empty string
49
+ default: '',
50
+ deprecateAliases: true,
51
+ aliases: ['urlpathprefix'],
52
+ }),
53
+ description: Flags.string({
54
+ char: 'd',
55
+ summary: messages.getMessage('flags.description.summary'),
56
+ description: messages.getMessage('flags.description.description'),
57
+ }),
58
+ 'target-org': requiredOrgFlagWithDeprecations,
59
+ loglevel,
60
+ 'api-version': orgApiVersionFlagWithDeprecations,
61
+ };
25
62
  async run() {
26
63
  const { flags, argv, args } = await this.parse(CommunityCreateCommand);
27
- const templateParams = (0, exports.getTemplateParamObjectFromArgs)((0, sf_plugins_core_1.parseVarArgs)(args, argv));
28
- const createCommand = new CommunityCreateResource_1.CommunityCreateResource({
64
+ const templateParams = getTemplateParamObjectFromArgs(parseVarArgs(args, argv));
65
+ const createCommand = new CommunityCreateResource({
29
66
  name: flags.name,
30
67
  urlPathPrefix: flags['url-path-prefix'],
31
68
  templateName: flags['template-name'],
32
69
  description: flags.description,
33
70
  templateParams,
34
71
  });
35
- return new ConnectExecutor_1.ConnectExecutor(createCommand, flags['target-org'].getConnection(flags['api-version']))
72
+ return new ConnectExecutor(createCommand, flags['target-org'].getConnection(flags['api-version']))
36
73
  .callConnectApi()
37
74
  .then((results) => {
38
75
  this.displayResults(results);
@@ -50,50 +87,11 @@ class CommunityCreateCommand extends sf_plugins_core_1.SfCommand {
50
87
  this.table([results], columns, { 'no-truncate': true });
51
88
  }
52
89
  }
53
- exports.CommunityCreateCommand = CommunityCreateCommand;
54
- CommunityCreateCommand.deprecateAliases = true;
55
- CommunityCreateCommand.aliases = ['force:community:create'];
56
- CommunityCreateCommand.summary = messages.getMessage('summary');
57
- CommunityCreateCommand.description = messages.getMessage('description');
58
- CommunityCreateCommand.examples = messages.getMessages('examples');
59
- CommunityCreateCommand.strict = false;
60
- CommunityCreateCommand.flags = {
61
- name: sf_plugins_core_1.Flags.string({
62
- char: 'n',
63
- summary: messages.getMessage('flags.name.summary'),
64
- required: true,
65
- }),
66
- 'template-name': sf_plugins_core_1.Flags.string({
67
- char: 't',
68
- summary: messages.getMessage('flags.templateName.summary'),
69
- description: messages.getMessage('flags.templateName.description'),
70
- required: true,
71
- deprecateAliases: true,
72
- aliases: ['templatename'],
73
- }),
74
- 'url-path-prefix': sf_plugins_core_1.Flags.string({
75
- char: 'p',
76
- summary: messages.getMessage('flags.urlPathPrefix.summary'),
77
- description: messages.getMessage('flags.urlPathPrefix.description'),
78
- // The api requires you to pass this, it accepts an empty string
79
- default: '',
80
- deprecateAliases: true,
81
- aliases: ['urlpathprefix'],
82
- }),
83
- description: sf_plugins_core_1.Flags.string({
84
- char: 'd',
85
- summary: messages.getMessage('flags.description.summary'),
86
- description: messages.getMessage('flags.description.description'),
87
- }),
88
- 'target-org': sf_plugins_core_1.requiredOrgFlagWithDeprecations,
89
- loglevel: sf_plugins_core_1.loglevel,
90
- 'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
91
- };
92
- const getTemplateParamObjectFromArgs = (args) => {
90
+ export const getTemplateParamObjectFromArgs = (args) => {
93
91
  // make sure there's nothing bad
94
92
  const badArgs = Object.keys(args).filter((key) => !key.startsWith('templateParams'));
95
93
  if (badArgs.length) {
96
- throw new core_1.SfError(`Invalid argument(s): ${badArgs.join(', ')}`, 'InvalidArgument', [
94
+ throw new SfError(`Invalid argument(s): ${badArgs.join(', ')}`, 'InvalidArgument', [
97
95
  'Arguments should start with templateParams, like templateParams.AuthenticationType=UNAUTHENTICATED',
98
96
  ]);
99
97
  }
@@ -101,5 +99,4 @@ const getTemplateParamObjectFromArgs = (args) => {
101
99
  const templateParams = Object.fromEntries(Object.entries(args).map(([key, value]) => [key.replace('templateParams.', ''), value]));
102
100
  return templateParams;
103
101
  };
104
- exports.getTemplateParamObjectFromArgs = getTemplateParamObjectFromArgs;
105
102
  //# sourceMappingURL=create.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/community/create.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,2CAAqD;AACrD,iEAOqC;AACrC,mFAAgF;AAChF,oGAAiG;AAGjG,eAAQ,CAAC,u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,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACrF,IAAI,OAAO,CAAC,MAAM,EAAE;QAClB,MAAM,IAAI,OAAO,CAAC,wBAAwB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,iBAAiB,EAAE;YACjF,oGAAoG;SACrG,CAAC,CAAC;KACJ;IACD,8BAA8B;IAC9B,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,CACvC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CACxF,CAAC;IAEF,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { SfCommand } from '@salesforce/sf-plugins-core';
2
- import { CommunityTemplatesListResponse } from '../../../shared/community/defs/CommunityTemplatesListResponse';
2
+ import { CommunityTemplatesListResponse } from '../../../shared/community/defs/CommunityTemplatesListResponse.js';
3
3
  /**
4
4
  * A command to fetch available community templates a community. This is just an sfdx wrapper around
5
5
  * the get available community templates connect endpoint
@@ -11,9 +11,9 @@ export declare class CommunityListTemplatesCommand extends SfCommand<CommunityTe
11
11
  static readonly description: string;
12
12
  static readonly examples: string[];
13
13
  static readonly flags: {
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 | 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>;
14
+ 'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
15
+ 'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
16
+ loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
17
17
  };
18
18
  run(): Promise<CommunityTemplatesListResponse>;
19
19
  private displayResults;
@@ -1,27 +1,36 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2020, salesforce.com, inc.
4
3
  * All rights reserved.
5
4
  * Licensed under the BSD 3-Clause license.
6
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
6
  */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CommunityListTemplatesCommand = void 0;
10
- const core_1 = require("@salesforce/core");
11
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
12
- const CommunityTemplatesResource_1 = require("../../../shared/community/connect/CommunityTemplatesResource");
13
- const ConnectExecutor_1 = require("../../../shared/connect/services/ConnectExecutor");
14
- core_1.Messages.importMessagesDirectory(__dirname);
15
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'template.list');
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { Messages } from '@salesforce/core';
10
+ import { loglevel, orgApiVersionFlagWithDeprecations, requiredOrgFlagWithDeprecations, SfCommand, } from '@salesforce/sf-plugins-core';
11
+ import { CommunityTemplatesResource } from '../../../shared/community/connect/CommunityTemplatesResource.js';
12
+ import { ConnectExecutor } from '../../../shared/connect/services/ConnectExecutor.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const messages = Messages.loadMessages('@salesforce/plugin-community', 'template.list');
16
15
  /**
17
16
  * A command to fetch available community templates a community. This is just an sfdx wrapper around
18
17
  * the get available community templates connect endpoint
19
18
  */
20
- class CommunityListTemplatesCommand extends sf_plugins_core_1.SfCommand {
19
+ export class CommunityListTemplatesCommand extends SfCommand {
20
+ static deprecateAliases = true;
21
+ static aliases = ['force:community:template:list'];
22
+ static summary = messages.getMessage('summary');
23
+ static description = messages.getMessage('description');
24
+ static examples = messages.getMessages('examples');
25
+ static flags = {
26
+ 'target-org': requiredOrgFlagWithDeprecations,
27
+ 'api-version': orgApiVersionFlagWithDeprecations,
28
+ loglevel,
29
+ };
21
30
  async run() {
22
31
  const { flags } = await this.parse(CommunityListTemplatesCommand);
23
- const listTemplateCommand = new CommunityTemplatesResource_1.CommunityTemplatesResource();
24
- return new ConnectExecutor_1.ConnectExecutor(listTemplateCommand, flags['target-org'].getConnection(flags['api-version']))
32
+ const listTemplateCommand = new CommunityTemplatesResource();
33
+ return new ConnectExecutor(listTemplateCommand, flags['target-org'].getConnection(flags['api-version']))
25
34
  .callConnectApi()
26
35
  .then((results) => {
27
36
  this.displayResults(results);
@@ -39,15 +48,4 @@ class CommunityListTemplatesCommand extends sf_plugins_core_1.SfCommand {
39
48
  this.log(messages.getMessage('response.TotalField'), results.total.toString());
40
49
  }
41
50
  }
42
- exports.CommunityListTemplatesCommand = CommunityListTemplatesCommand;
43
- CommunityListTemplatesCommand.deprecateAliases = true;
44
- CommunityListTemplatesCommand.aliases = ['force:community:template:list'];
45
- CommunityListTemplatesCommand.summary = messages.getMessage('summary');
46
- CommunityListTemplatesCommand.description = messages.getMessage('description');
47
- CommunityListTemplatesCommand.examples = messages.getMessages('examples');
48
- CommunityListTemplatesCommand.flags = {
49
- 'target-org': sf_plugins_core_1.requiredOrgFlagWithDeprecations,
50
- 'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
51
- loglevel: sf_plugins_core_1.loglevel,
52
- };
53
51
  //# sourceMappingURL=template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/commands/community/list/template.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA4C;AAC5C,iEAKqC;AACr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'../../shared/community/defs/CommunityPublishResponse';
2
+ import { CommunityPublishResponse } from '../../shared/community/defs/CommunityPublishResponse.js';
3
3
  /**
4
4
  * A command to publish a community. This is just an sfdx wrapper around
5
5
  * the community publish connect endpoint
@@ -11,10 +11,10 @@ export declare class CommunityPublishCommand extends SfCommand<CommunityPublishR
11
11
  static readonly description: string;
12
12
  static readonly examples: string[];
13
13
  static readonly flags: {
14
- name: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
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 | 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>;
14
+ name: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
15
+ 'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
16
+ 'api-version': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
17
+ loglevel: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
18
18
  };
19
19
  run(): Promise<CommunityPublishResponse>;
20
20
  private displayResults;
@@ -1,30 +1,44 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2020, salesforce.com, inc.
4
3
  * All rights reserved.
5
4
  * Licensed under the BSD 3-Clause license.
6
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
6
  */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.CommunityPublishCommand = void 0;
10
- const core_1 = require("@salesforce/core");
11
- const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
12
- const CommunityPublishResource_1 = require("../../shared/community/connect/CommunityPublishResource");
13
- const ConnectExecutor_1 = require("../../shared/connect/services/ConnectExecutor");
14
- core_1.Messages.importMessagesDirectory(__dirname);
15
- const messages = core_1.Messages.loadMessages('@salesforce/plugin-community', 'publish');
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { Messages } from '@salesforce/core';
10
+ import { Flags, loglevel, orgApiVersionFlagWithDeprecations, requiredOrgFlagWithDeprecations, SfCommand, } from '@salesforce/sf-plugins-core';
11
+ import { CommunityPublishResource } from '../../shared/community/connect/CommunityPublishResource.js';
12
+ import { ConnectExecutor } from '../../shared/connect/services/ConnectExecutor.js';
13
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
14
+ const messages = Messages.loadMessages('@salesforce/plugin-community', 'publish');
16
15
  /**
17
16
  * A command to publish a community. This is just an sfdx wrapper around
18
17
  * the community publish connect endpoint
19
18
  */
20
- class CommunityPublishCommand extends sf_plugins_core_1.SfCommand {
19
+ export class CommunityPublishCommand extends SfCommand {
20
+ static deprecateAliases = true;
21
+ static aliases = ['force:community:publish'];
22
+ static summary = messages.getMessage('summary');
23
+ static description = messages.getMessage('description');
24
+ static examples = messages.getMessages('examples');
25
+ static flags = {
26
+ name: Flags.string({
27
+ char: 'n',
28
+ summary: messages.getMessage('flags.name.summary'),
29
+ required: true,
30
+ }),
31
+ 'target-org': requiredOrgFlagWithDeprecations,
32
+ 'api-version': orgApiVersionFlagWithDeprecations,
33
+ loglevel,
34
+ };
21
35
  async run() {
22
36
  const { flags } = await this.parse(CommunityPublishCommand);
23
- const publishCommand = new CommunityPublishResource_1.CommunityPublishResource({
37
+ const publishCommand = new CommunityPublishResource({
24
38
  name: flags.name,
25
39
  org: flags['target-org'],
26
40
  });
27
- return new ConnectExecutor_1.ConnectExecutor(publishCommand, flags['target-org'].getConnection(flags['api-version']))
41
+ return new ConnectExecutor(publishCommand, flags['target-org'].getConnection(flags['api-version']))
28
42
  .callConnectApi()
29
43
  .then((results) => {
30
44
  this.displayResults(results);
@@ -44,20 +58,4 @@ class CommunityPublishCommand extends sf_plugins_core_1.SfCommand {
44
58
  this.table([results], columns);
45
59
  }
46
60
  }
47
- exports.CommunityPublishCommand = CommunityPublishCommand;
48
- CommunityPublishCommand.deprecateAliases = true;
49
- CommunityPublishCommand.aliases = ['force:community:publish'];
50
- CommunityPublishCommand.summary = messages.getMessage('summary');
51
- CommunityPublishCommand.description = messages.getMessage('description');
52
- CommunityPublishCommand.examples = messages.getMessages('examples');
53
- CommunityPublishCommand.flags = {
54
- name: sf_plugins_core_1.Flags.string({
55
- char: 'n',
56
- summary: messages.getMessage('flags.name.summary'),
57
- required: true,
58
- }),
59
- 'target-org': sf_plugins_core_1.requiredOrgFlagWithDeprecations,
60
- 'api-version': sf_plugins_core_1.orgApiVersionFlagWithDeprecations,
61
- loglevel: sf_plugins_core_1.loglevel,
62
- };
63
61
  //# sourceMappingURL=publish.js.map
@@ -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;AAGhF,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,G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AI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC"}
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  declare const _default: {};
2
- export = _default;
2
+ export default _default;
package/lib/index.js CHANGED
@@ -1,9 +1,8 @@
1
- "use strict";
2
1
  /*
3
2
  * Copyright (c) 2020, salesforce.com, inc.
4
3
  * All rights reserved.
5
4
  * Licensed under the BSD 3-Clause license.
6
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
6
  */
8
- module.exports = {};
7
+ export default {};
9
8
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;AAEH,iBAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,EAAE,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { JsonCollection } from '@salesforce/ts-types';
2
2
  import { HttpMethods } from 'jsforce';
3
- import { CommunityCreateResponse } from '../defs/CommunityCreateResponse';
4
- import { CommunityCreateParams } from '../defs/CommunityCreateParams';
5
- import { ConnectResource } from '../../connect/services/ConnectResource';
3
+ import { CommunityCreateResponse } from '../defs/CommunityCreateResponse.js';
4
+ import { CommunityCreateParams } from '../defs/CommunityCreateParams.js';
5
+ import { ConnectResource } from '../../connect/services/ConnectResource.js';
6
6
  declare const NAME_KEY = "name";
7
7
  declare const JOBID_KEY = "jobId";
8
8
  /**