@salesforce/plugin-community 2.4.9 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -26
- package/lib/commands/community/create.d.ts +8 -8
- package/lib/commands/community/create.js +52 -55
- package/lib/commands/community/create.js.map +1 -1
- package/lib/commands/community/list/template.d.ts +4 -4
- package/lib/commands/community/list/template.js +21 -23
- package/lib/commands/community/list/template.js.map +1 -1
- package/lib/commands/community/publish.d.ts +5 -5
- package/lib/commands/community/publish.js +26 -28
- package/lib/commands/community/publish.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/shared/community/connect/CommunityCreateResource.d.ts +3 -3
- package/lib/shared/community/connect/CommunityCreateResource.js +13 -8
- package/lib/shared/community/connect/CommunityCreateResource.js.map +1 -1
- package/lib/shared/community/connect/CommunityPublishResource.d.ts +2 -2
- package/lib/shared/community/connect/CommunityPublishResource.js +11 -12
- package/lib/shared/community/connect/CommunityPublishResource.js.map +1 -1
- package/lib/shared/community/connect/CommunityTemplatesResource.d.ts +2 -2
- package/lib/shared/community/connect/CommunityTemplatesResource.js +1 -5
- package/lib/shared/community/connect/CommunityTemplatesResource.js.map +1 -1
- package/lib/shared/community/defs/CommunityCreateParams.js +1 -2
- package/lib/shared/community/defs/CommunityCreateParams.js.map +1 -1
- package/lib/shared/community/defs/CommunityCreateResponse.js +1 -2
- package/lib/shared/community/defs/CommunityCreateResponse.js.map +1 -1
- package/lib/shared/community/defs/CommunityInfo.d.ts +1 -1
- package/lib/shared/community/defs/CommunityInfo.js +1 -2
- package/lib/shared/community/defs/CommunityPublishResponse.d.ts +1 -1
- package/lib/shared/community/defs/CommunityPublishResponse.js +1 -2
- package/lib/shared/community/defs/CommunityPublishResponse.js.map +1 -1
- package/lib/shared/community/defs/CommunityStatusEnum.js +1 -2
- package/lib/shared/community/defs/CommunityStatusEnum.js.map +1 -1
- package/lib/shared/community/defs/CommunityTemplates.js +1 -2
- package/lib/shared/community/defs/CommunityTemplates.js.map +1 -1
- package/lib/shared/community/defs/CommunityTemplatesListResponse.d.ts +1 -1
- package/lib/shared/community/defs/CommunityTemplatesListResponse.js +1 -2
- package/lib/shared/community/defs/CommunityTemplatesListResponse.js.map +1 -1
- package/lib/shared/community/service/CommunitiesServices.d.ts +3 -3
- package/lib/shared/community/service/CommunitiesServices.js +5 -8
- package/lib/shared/community/service/CommunitiesServices.js.map +1 -1
- package/lib/shared/connect/services/ConnectExecutor.d.ts +1 -1
- package/lib/shared/connect/services/ConnectExecutor.js +15 -9
- package/lib/shared/connect/services/ConnectExecutor.js.map +1 -1
- package/lib/shared/connect/services/ConnectResource.js +1 -2
- package/oclif.lock +476 -591
- package/oclif.manifest.json +222 -125
- package/package.json +31 -49
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import { dirname } from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import { Messages } from '@salesforce/core';
|
|
10
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
|
11
|
+
const messages = Messages.loadMessages('@salesforce/plugin-community', 'create');
|
|
7
12
|
const NAME_KEY = 'name';
|
|
8
13
|
const JOBID_KEY = 'jobId';
|
|
9
14
|
/**
|
|
10
15
|
* A connect api resource for creating a community
|
|
11
16
|
*/
|
|
12
|
-
class CommunityCreateResource {
|
|
17
|
+
export class CommunityCreateResource {
|
|
18
|
+
options;
|
|
13
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
20
|
constructor(options) {
|
|
15
21
|
this.options = options;
|
|
@@ -47,5 +53,4 @@ class CommunityCreateResource {
|
|
|
47
53
|
return Promise.resolve(JSON.stringify(params));
|
|
48
54
|
}
|
|
49
55
|
}
|
|
50
|
-
exports.CommunityCreateResource = CommunityCreateResource;
|
|
51
56
|
//# sourceMappingURL=CommunityCreateResource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityCreateResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityCreateResource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityCreateResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityCreateResource.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAM5C,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,QAAQ,CAAC,CAAC;AAEjF,MAAM,QAAQ,GAAG,MAAM,CAAC;AACxB,MAAM,SAAS,GAAG,OAAO,CAAC;AAE1B;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAEP;IAD3B,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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JsonCollection } from '@salesforce/ts-types';
|
|
2
2
|
import { Org } from '@salesforce/core';
|
|
3
3
|
import { HttpMethods } from 'jsforce';
|
|
4
|
-
import { CommunityPublishResponse } from '../defs/CommunityPublishResponse';
|
|
5
|
-
import { ConnectResource } from '../../connect/services/ConnectResource';
|
|
4
|
+
import { CommunityPublishResponse } from '../defs/CommunityPublishResponse.js';
|
|
5
|
+
import { ConnectResource } from '../../connect/services/ConnectResource.js';
|
|
6
6
|
/**
|
|
7
7
|
* A connect api resource for publishing a community
|
|
8
8
|
*/
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommunityPublishResource = void 0;
|
|
4
1
|
/*
|
|
5
2
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
6
3
|
* All rights reserved.
|
|
7
4
|
* Licensed under the BSD 3-Clause license.
|
|
8
5
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
6
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
import { URL, fileURLToPath } from 'node:url';
|
|
8
|
+
import { dirname } from 'node:path';
|
|
9
|
+
import { Messages } from '@salesforce/core';
|
|
10
|
+
import CommunitiesServices from '../service/CommunitiesServices.js';
|
|
11
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
|
12
|
+
const messages = Messages.loadMessages('@salesforce/plugin-community', 'publish');
|
|
13
|
+
export class CommunityPublishResource {
|
|
14
|
+
options;
|
|
15
|
+
info;
|
|
16
16
|
constructor(options) {
|
|
17
17
|
this.options = options;
|
|
18
18
|
}
|
|
@@ -33,7 +33,7 @@ class CommunityPublishResource {
|
|
|
33
33
|
message: messages.getMessage('response.message'),
|
|
34
34
|
name: result.name,
|
|
35
35
|
status: this.info?.status,
|
|
36
|
-
url: new
|
|
36
|
+
url: new URL(result.url).toString(),
|
|
37
37
|
jobId: result.jobId,
|
|
38
38
|
};
|
|
39
39
|
}
|
|
@@ -42,12 +42,11 @@ class CommunityPublishResource {
|
|
|
42
42
|
throw error;
|
|
43
43
|
}
|
|
44
44
|
async fetchCommunityId() {
|
|
45
|
-
this.info = await
|
|
45
|
+
this.info = await CommunitiesServices.fetchCommunityInfoFromName(this.options.org, this.options.name);
|
|
46
46
|
if (!this.info) {
|
|
47
47
|
throw messages.createError('error.communityNotExists', [this.options.name]);
|
|
48
48
|
}
|
|
49
49
|
return this.info.id;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
exports.CommunityPublishResource = CommunityPublishResource;
|
|
53
52
|
//# sourceMappingURL=CommunityPublishResource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityPublishResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityPublishResource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityPublishResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityPublishResource.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AAIjD,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AAGpE,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,SAAS,CAAC,CAAC;AAWlF,MAAM,OAAO,wBAAwB;IAGR;IAFnB,IAAI,CAAiB;IAE7B,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,GAAG,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,mBAAmB,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpMethods } from 'jsforce';
|
|
2
|
-
import { ConnectResource } from '../../connect/services/ConnectResource';
|
|
3
|
-
import { CommunityTemplatesListResponse } from '../defs/CommunityTemplatesListResponse';
|
|
2
|
+
import { ConnectResource } from '../../connect/services/ConnectResource.js';
|
|
3
|
+
import { CommunityTemplatesListResponse } from '../defs/CommunityTemplatesListResponse.js';
|
|
4
4
|
/**
|
|
5
5
|
* A connect api resource for fetching community templates available to context user
|
|
6
6
|
*/
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommunityTemplatesResource = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* A connect api resource for fetching community templates available to context user
|
|
6
3
|
*/
|
|
7
|
-
class CommunityTemplatesResource {
|
|
4
|
+
export class CommunityTemplatesResource {
|
|
8
5
|
// eslint-disable-next-line class-methods-use-this
|
|
9
6
|
fetchRelativeConnectUrl() {
|
|
10
7
|
return Promise.resolve('/connect/communities/templates');
|
|
@@ -26,5 +23,4 @@ class CommunityTemplatesResource {
|
|
|
26
23
|
throw error;
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
|
-
exports.CommunityTemplatesResource = CommunityTemplatesResource;
|
|
30
26
|
//# sourceMappingURL=CommunityTemplatesResource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityTemplatesResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityTemplatesResource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityTemplatesResource.js","sourceRoot":"","sources":["../../../../src/shared/community/connect/CommunityTemplatesResource.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,OAAO,0BAA0B;IACrC,kDAAkD;IAC3C,uBAAuB;QAC5B,OAAO,OAAO,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC3D,CAAC;IAED,kDAAkD;IAC3C,eAAe;QACpB,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,kDAAkD;IAC3C,gBAAgB;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,kDAAkD;IAC3C,aAAa,CAAC,MAAsC;QACzD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,kDAAkD;IAC3C,WAAW,CAAC,KAAY;QAC7B,MAAM,KAAK,CAAC;IACd,CAAC;CACF"}
|
|
@@ -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
|
-
|
|
7
|
+
export {};
|
|
9
8
|
//# sourceMappingURL=CommunityCreateParams.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityCreateParams.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityCreateParams.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityCreateParams.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityCreateParams.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -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
|
-
|
|
7
|
+
export {};
|
|
9
8
|
//# sourceMappingURL=CommunityCreateResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityCreateResponse.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityCreateResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityCreateResponse.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityCreateResponse.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -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
|
-
|
|
7
|
+
export {};
|
|
9
8
|
//# sourceMappingURL=CommunityPublishResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityPublishResponse.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityPublishResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityPublishResponse.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityPublishResponse.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -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
|
-
|
|
7
|
+
export {};
|
|
9
8
|
//# sourceMappingURL=CommunityStatusEnum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityStatusEnum.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityStatusEnum.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityStatusEnum.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityStatusEnum.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -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
|
-
|
|
7
|
+
export {};
|
|
9
8
|
//# sourceMappingURL=CommunityTemplates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityTemplates.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityTemplates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityTemplates.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityTemplates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SFDX command output when listing available community templates
|
|
3
3
|
*/
|
|
4
|
-
import { CommunityTemplates } from './CommunityTemplates';
|
|
4
|
+
import { CommunityTemplates } from './CommunityTemplates.js';
|
|
5
5
|
export type CommunityTemplatesListResponse = {
|
|
6
6
|
/**
|
|
7
7
|
* list of templates
|
|
@@ -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
|
-
|
|
7
|
+
export {};
|
|
9
8
|
//# sourceMappingURL=CommunityTemplatesListResponse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunityTemplatesListResponse.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityTemplatesListResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunityTemplatesListResponse.js","sourceRoot":"","sources":["../../../../src/shared/community/defs/CommunityTemplatesListResponse.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Org } from '@salesforce/core';
|
|
2
2
|
import { QueryResult, Record } from 'jsforce';
|
|
3
|
-
import { CommunityInfo } from '../defs/CommunityInfo';
|
|
3
|
+
import { CommunityInfo } from '../defs/CommunityInfo.js';
|
|
4
4
|
/**
|
|
5
5
|
* Helper services for Communities
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export default class CommunitiesServices {
|
|
8
8
|
/**
|
|
9
9
|
* Get community name from the given id
|
|
10
10
|
*
|
|
@@ -14,5 +14,5 @@ export declare class CommunitiesServices {
|
|
|
14
14
|
* @returns - the community id for the given name
|
|
15
15
|
*/
|
|
16
16
|
static fetchCommunityInfoFromName(org: Org, name?: string): Promise<CommunityInfo | undefined>;
|
|
17
|
+
static runQuery<T extends Record>(org: Org, query: string): Promise<QueryResult<T>>;
|
|
17
18
|
}
|
|
18
|
-
export declare const runQuery: <T extends Record>(org: Org, query: string) => Promise<QueryResult<T>>;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runQuery = exports.CommunitiesServices = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Helper services for Communities
|
|
6
3
|
*/
|
|
7
|
-
class CommunitiesServices {
|
|
4
|
+
export default class CommunitiesServices {
|
|
8
5
|
/**
|
|
9
6
|
* Get community name from the given id
|
|
10
7
|
*
|
|
@@ -17,7 +14,7 @@ class CommunitiesServices {
|
|
|
17
14
|
if (!name) {
|
|
18
15
|
return undefined;
|
|
19
16
|
}
|
|
20
|
-
const result = await
|
|
17
|
+
const result = await CommunitiesServices.runQuery(org, `SELECT Id, Status FROM NETWORK WHERE NAME = '${name}'`);
|
|
21
18
|
if (result.totalSize > 0) {
|
|
22
19
|
const record = result.records[0];
|
|
23
20
|
return {
|
|
@@ -27,8 +24,8 @@ class CommunitiesServices {
|
|
|
27
24
|
};
|
|
28
25
|
}
|
|
29
26
|
}
|
|
27
|
+
static async runQuery(org, query) {
|
|
28
|
+
return org.getConnection().query(query);
|
|
29
|
+
}
|
|
30
30
|
}
|
|
31
|
-
exports.CommunitiesServices = CommunitiesServices;
|
|
32
|
-
const runQuery = async (org, query) => org.getConnection().query(query);
|
|
33
|
-
exports.runQuery = runQuery;
|
|
34
31
|
//# sourceMappingURL=CommunitiesServices.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommunitiesServices.js","sourceRoot":"","sources":["../../../../src/shared/community/service/CommunitiesServices.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommunitiesServices.js","sourceRoot":"","sources":["../../../../src/shared/community/service/CommunitiesServices.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC;;;;;;;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,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,CAAmB,GAAQ,EAAE,KAAa;QACpE,OAAO,GAAG,CAAC,aAAa,EAAE,CAAC,KAAK,CAAI,KAAK,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection } from '@salesforce/core';
|
|
2
2
|
import { HttpRequest } from 'jsforce';
|
|
3
|
-
import { ConnectResource } from './ConnectResource';
|
|
3
|
+
import { ConnectResource } from './ConnectResource.js';
|
|
4
4
|
/**
|
|
5
5
|
* An executor which calls a connect api for the given org
|
|
6
6
|
*/
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import { dirname } from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
10
|
+
Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
|
|
11
|
+
const messages = Messages.loadMessages('@salesforce/plugin-community', 'connect-executor');
|
|
7
12
|
/**
|
|
8
13
|
* An executor which calls a connect api for the given org
|
|
9
14
|
*/
|
|
10
|
-
class ConnectExecutor {
|
|
15
|
+
export class ConnectExecutor {
|
|
16
|
+
connectService;
|
|
17
|
+
connection;
|
|
11
18
|
constructor(connectService, connection) {
|
|
12
19
|
this.connectService = connectService;
|
|
13
20
|
this.connection = connection;
|
|
@@ -39,9 +46,8 @@ class ConnectExecutor {
|
|
|
39
46
|
};
|
|
40
47
|
}
|
|
41
48
|
else {
|
|
42
|
-
throw new
|
|
49
|
+
throw new SfError(messages.getMessage('unsupportedOperation', [method]), 'UNSUPPORTED_OPERATION');
|
|
43
50
|
}
|
|
44
51
|
}
|
|
45
52
|
}
|
|
46
|
-
exports.ConnectExecutor = ConnectExecutor;
|
|
47
53
|
//# sourceMappingURL=ConnectExecutor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectExecutor.js","sourceRoot":"","sources":["../../../../src/shared/connect/services/ConnectExecutor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConnectExecutor.js","sourceRoot":"","sources":["../../../../src/shared/connect/services/ConnectExecutor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAc,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAIjE,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAAC;AAE3F;;GAEG;AACH,MAAM,OAAO,eAAe;IACC;IAA4C;IAAvE,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,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,uBAAuB,CAAC,CAAC;SACnG;IACH,CAAC;CACF"}
|