@salesforce/plugin-orchestrator 1.0.0 → 1.0.7
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/LICENSE.txt +200 -6
- package/README.md +6 -6
- package/lib/commands/orchestrator/{create/app.js → app/create.js} +14 -5
- package/lib/commands/orchestrator/app/create.js.map +1 -0
- package/lib/commands/orchestrator/{delete/app.js → app/delete.js} +14 -5
- package/lib/commands/orchestrator/app/delete.js.map +1 -0
- package/lib/commands/orchestrator/{display/app.js → app/display.js} +14 -5
- package/lib/commands/orchestrator/app/display.js.map +1 -0
- package/lib/commands/orchestrator/{list/app.js → app/list.js} +14 -5
- package/lib/commands/orchestrator/app/list.js.map +1 -0
- package/lib/commands/orchestrator/{update/app.js → app/update.js} +14 -5
- package/lib/commands/orchestrator/app/update.js.map +1 -0
- package/lib/commands/orchestrator/template/create.d.ts +1 -1
- package/lib/commands/orchestrator/template/create.js +16 -7
- package/lib/commands/orchestrator/template/create.js.map +1 -1
- package/lib/commands/orchestrator/template/delete.d.ts +1 -1
- package/lib/commands/orchestrator/template/delete.js +16 -7
- package/lib/commands/orchestrator/template/delete.js.map +1 -1
- package/lib/commands/orchestrator/template/display.d.ts +1 -1
- package/lib/commands/orchestrator/template/display.js +16 -7
- package/lib/commands/orchestrator/template/display.js.map +1 -1
- package/lib/commands/orchestrator/template/list.d.ts +2 -1
- package/lib/commands/orchestrator/template/list.js +18 -7
- package/lib/commands/orchestrator/template/list.js.map +1 -1
- package/lib/commands/orchestrator/template/update.d.ts +1 -1
- package/lib/commands/orchestrator/template/update.js +16 -7
- package/lib/commands/orchestrator/template/update.js.map +1 -1
- package/lib/index.js +13 -4
- package/lib/index.js.map +1 -1
- package/lib/utils/app/appDisplayUtil.js +14 -5
- package/lib/utils/app/appDisplayUtil.js.map +1 -1
- package/lib/utils/app/appListUtils.js.map +1 -1
- package/lib/utils/app/appTypes.js +13 -4
- package/lib/utils/app/appTypes.js.map +1 -1
- package/lib/utils/app/appframeworkapp.js.map +1 -1
- package/lib/utils/display/displayUtil.js +13 -4
- package/lib/utils/display/displayUtil.js.map +1 -1
- package/lib/utils/request.js.map +1 -1
- package/lib/utils/template/appframeworktemplate.js.map +1 -1
- package/lib/utils/template/templateDisplayUtil.js +14 -5
- package/lib/utils/template/templateDisplayUtil.js.map +1 -1
- package/lib/utils/template/templateHighlighter.js +13 -4
- package/lib/utils/template/templateHighlighter.js.map +1 -1
- package/lib/utils/template/templateListUtils.js.map +1 -1
- package/lib/utils/template/templateTypes.js +13 -4
- package/lib/utils/template/templateTypes.js.map +1 -1
- package/lib/utils/utils.js +13 -4
- package/lib/utils/utils.js.map +1 -1
- package/messages/appframework.list.template.md +1 -1
- package/messages/appframework.template.list.md +1 -1
- package/npm-shrinkwrap.json +217 -218
- package/oclif.lock +215 -205
- package/oclif.manifest.json +238 -851
- package/package.json +15 -28
- package/LICENSE +0 -28
- package/lib/commands/orchestrator/create/app.js.map +0 -1
- package/lib/commands/orchestrator/create/template.d.ts +0 -17
- package/lib/commands/orchestrator/create/template.js +0 -96
- package/lib/commands/orchestrator/create/template.js.map +0 -1
- package/lib/commands/orchestrator/decouple/app.d.ts +0 -14
- package/lib/commands/orchestrator/decouple/app.js +0 -106
- package/lib/commands/orchestrator/decouple/app.js.map +0 -1
- package/lib/commands/orchestrator/delete/app.js.map +0 -1
- package/lib/commands/orchestrator/delete/template.d.ts +0 -15
- package/lib/commands/orchestrator/delete/template.js +0 -108
- package/lib/commands/orchestrator/delete/template.js.map +0 -1
- package/lib/commands/orchestrator/display/app.js.map +0 -1
- package/lib/commands/orchestrator/display/template.d.ts +0 -15
- package/lib/commands/orchestrator/display/template.js +0 -105
- package/lib/commands/orchestrator/display/template.js.map +0 -1
- package/lib/commands/orchestrator/list/app.js.map +0 -1
- package/lib/commands/orchestrator/list/template.d.ts +0 -14
- package/lib/commands/orchestrator/list/template.js +0 -64
- package/lib/commands/orchestrator/list/template.js.map +0 -1
- package/lib/commands/orchestrator/update/app.js.map +0 -1
- package/lib/commands/orchestrator/update/template.d.ts +0 -17
- package/lib/commands/orchestrator/update/template.js +0 -107
- package/lib/commands/orchestrator/update/template.js.map +0 -1
- /package/lib/commands/orchestrator/{create/app.d.ts → app/create.d.ts} +0 -0
- /package/lib/commands/orchestrator/{delete/app.d.ts → app/delete.d.ts} +0 -0
- /package/lib/commands/orchestrator/{display/app.d.ts → app/display.d.ts} +0 -0
- /package/lib/commands/orchestrator/{list/app.d.ts → app/list.d.ts} +0 -0
- /package/lib/commands/orchestrator/{update/app.d.ts → app/update.d.ts} +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025, 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 { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
8
|
-
import { Messages, SfError } from '@salesforce/core';
|
|
9
|
-
import AppFrameworkTemplate from '../../../utils/template/appframeworktemplate.js';
|
|
10
|
-
import { TemplateDisplayUtil } from '../../../utils/template/templateDisplayUtil.js';
|
|
11
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
|
-
const messages = Messages.loadMessages('@salesforce/plugin-orchestrator', 'appframework.display.template');
|
|
13
|
-
export default class DisplayTemplate extends SfCommand {
|
|
14
|
-
static summary = messages.getMessage('summary');
|
|
15
|
-
static description = messages.getMessage('description');
|
|
16
|
-
static examples = messages.getMessages('examples');
|
|
17
|
-
static state = 'preview';
|
|
18
|
-
static flags = {
|
|
19
|
-
'target-org': Flags.requiredOrg({
|
|
20
|
-
summary: messages.getMessage('flags.target-org.summary'),
|
|
21
|
-
description: messages.getMessage('flags.target-org.description'),
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
'api-version': Flags.orgApiVersion({
|
|
25
|
-
summary: messages.getMessage('flags.api-version.summary'),
|
|
26
|
-
description: messages.getMessage('flags.api-version.description'),
|
|
27
|
-
}),
|
|
28
|
-
'template-id': Flags.string({
|
|
29
|
-
char: 'i',
|
|
30
|
-
summary: messages.getMessage('flags.template-id.summary'),
|
|
31
|
-
description: messages.getMessage('flags.template-id.description'),
|
|
32
|
-
exclusive: ['template-name'],
|
|
33
|
-
}),
|
|
34
|
-
'template-name': Flags.string({
|
|
35
|
-
char: 'n',
|
|
36
|
-
summary: messages.getMessage('flags.template-name.summary'),
|
|
37
|
-
description: messages.getMessage('flags.template-name.description'),
|
|
38
|
-
exclusive: ['template-id'],
|
|
39
|
-
}),
|
|
40
|
-
};
|
|
41
|
-
async run() {
|
|
42
|
-
const { flags } = await this.parse(DisplayTemplate);
|
|
43
|
-
if (!flags['template-id'] && !flags['template-name']) {
|
|
44
|
-
throw new SfError(messages.getMessage('error.MissingRequiredFlag'), 'MissingRequiredFlag', messages.getMessages('error.MissingRequiredFlag.Actions'));
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
this.spinner.start(messages.getMessage('fetchingTemplate'));
|
|
48
|
-
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
49
|
-
const appFrameworkTemplate = new AppFrameworkTemplate(connection);
|
|
50
|
-
const identifier = flags['template-id'] ?? flags['template-name'];
|
|
51
|
-
const rawTemplate = await appFrameworkTemplate.getTemplate(identifier);
|
|
52
|
-
if (!rawTemplate) {
|
|
53
|
-
throw new SfError(`Template ${String(identifier)} not found, 'TemplateNotFound'`);
|
|
54
|
-
}
|
|
55
|
-
const template = {
|
|
56
|
-
id: rawTemplate.id,
|
|
57
|
-
name: rawTemplate.name,
|
|
58
|
-
label: rawTemplate.label,
|
|
59
|
-
description: rawTemplate.description,
|
|
60
|
-
templateType: rawTemplate.templateType,
|
|
61
|
-
templateSubtype: rawTemplate.templateSubtype,
|
|
62
|
-
templateId: rawTemplate.templateId,
|
|
63
|
-
folderId: rawTemplate.folderId,
|
|
64
|
-
namespace: rawTemplate.namespace,
|
|
65
|
-
templateVersion: rawTemplate.releaseInfo?.templateVersion,
|
|
66
|
-
assetVersion: rawTemplate.assetVersion,
|
|
67
|
-
maxAppCount: rawTemplate.maxAppCount,
|
|
68
|
-
variableDefinition: rawTemplate.variableDefinition,
|
|
69
|
-
layoutDefinition: rawTemplate.layoutDefinition,
|
|
70
|
-
rules: rawTemplate.rules,
|
|
71
|
-
created: rawTemplate.createdDate ? new Date(rawTemplate.createdDate).toLocaleString() : 'n/a',
|
|
72
|
-
modified: rawTemplate.lastModifiedDate ? new Date(rawTemplate.lastModifiedDate).toLocaleString() : 'n/a',
|
|
73
|
-
industries: rawTemplate.tags?.industries?.join(', ') ?? 'n/a',
|
|
74
|
-
audience: rawTemplate.tags?.targetAudience?.join(', ') ?? 'n/a',
|
|
75
|
-
icons: rawTemplate.icons,
|
|
76
|
-
chainDefinitions: rawTemplate.chainDefinitions,
|
|
77
|
-
applicationSourceId: rawTemplate.applicationSourceId,
|
|
78
|
-
url: rawTemplate.url,
|
|
79
|
-
configurationUrl: rawTemplate.configurationUrl,
|
|
80
|
-
readinessUrl: rawTemplate.readinessUrl,
|
|
81
|
-
};
|
|
82
|
-
this.spinner.stop();
|
|
83
|
-
TemplateDisplayUtil.displayTemplateDetail(this, template);
|
|
84
|
-
return template;
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
this.spinner.stop();
|
|
88
|
-
const errorMsg = error.message;
|
|
89
|
-
if (errorMsg.includes('certificate') || errorMsg.includes('altnames')) {
|
|
90
|
-
throw new SfError(messages.getMessage('error.CertificateError'), 'TemplateDisplayError', messages.getMessages('error.CertificateError.Actions'));
|
|
91
|
-
}
|
|
92
|
-
else if (errorMsg.includes('Unauthorized') || errorMsg.includes('401')) {
|
|
93
|
-
throw new SfError(messages.getMessage('error.AuthenticationError'), 'TemplateDisplayError', messages.getMessages('error.AuthenticationError.Actions'));
|
|
94
|
-
}
|
|
95
|
-
else if (errorMsg.includes('Not Found') || errorMsg.includes('404')) {
|
|
96
|
-
const identifier = String(flags['template-id'] ?? flags['template-name'] ?? '');
|
|
97
|
-
throw new SfError(messages.getMessage('error.TemplateNotFound', [identifier]), 'TemplateDisplayError', messages.getMessages('error.TemplateNotFound.Actions'));
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
throw new SfError(messages.getMessage('error.GenericError', [errorMsg]), 'TemplateDisplayError', messages.getMessages('error.GenericError.Actions'));
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
//# sourceMappingURL=template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/commands/orchestrator/display/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAC;AAEjE,OAAO,oBAAoB,MAAM,iDAAiD,CAAC;AAEnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAErF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,iCAAiC,EAAE,+BAA+B,CAAC,CAAC;AAE3G,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,SAAuB;IAC3D,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,KAAK,GAAG,SAAS,CAAC;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QAAQ,CAAC,CAAC,EACrD,cAAc,EACd,QAAQ,CAAC,WAAW,CAAC,4BAA4B,CAAC,CACnD,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { TemplateData } from '../../../utils/template/templateTypes.js';
|
|
3
|
-
export default class ListTemplate extends SfCommand<TemplateData[]> {
|
|
4
|
-
static readonly summary: string;
|
|
5
|
-
static readonly description: string;
|
|
6
|
-
static readonly examples: string[];
|
|
7
|
-
static readonly state = "preview";
|
|
8
|
-
static readonly aliases: string[];
|
|
9
|
-
static readonly flags: {
|
|
10
|
-
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
};
|
|
13
|
-
run(): Promise<TemplateData[]>;
|
|
14
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025, 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 { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
8
|
-
import { Messages, SfError } from '@salesforce/core';
|
|
9
|
-
import AppFrameworkTemplate from '../../../utils/template/appframeworktemplate.js';
|
|
10
|
-
import { TemplateListUtil } from '../../../utils/template/templateListUtils.js';
|
|
11
|
-
import { TemplateDisplayUtil } from '../../../utils/template/templateDisplayUtil.js';
|
|
12
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
|
-
const messages = Messages.loadMessages('@salesforce/plugin-orchestrator', 'appframework.list.template');
|
|
14
|
-
export default class ListTemplate extends SfCommand {
|
|
15
|
-
static summary = messages.getMessage('summary');
|
|
16
|
-
static description = messages.getMessage('description');
|
|
17
|
-
static examples = messages.getMessages('examples');
|
|
18
|
-
static state = 'preview';
|
|
19
|
-
// Add alias for backward compatibility
|
|
20
|
-
static aliases = ['orchestrator template list'];
|
|
21
|
-
static flags = {
|
|
22
|
-
'target-org': Flags.requiredOrg({
|
|
23
|
-
summary: messages.getMessage('flags.target-org.summary'),
|
|
24
|
-
description: messages.getMessage('flags.target-org.description'),
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
'api-version': Flags.orgApiVersion({
|
|
28
|
-
summary: messages.getMessage('flags.api-version.summary'),
|
|
29
|
-
description: messages.getMessage('flags.api-version.description'),
|
|
30
|
-
}),
|
|
31
|
-
};
|
|
32
|
-
async run() {
|
|
33
|
-
const { flags } = await this.parse(ListTemplate);
|
|
34
|
-
try {
|
|
35
|
-
this.spinner.start(messages.getMessage('fetchingTemplates'));
|
|
36
|
-
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
37
|
-
const appFrameworkTemplate = new AppFrameworkTemplate(connection);
|
|
38
|
-
const rawTemplates = await appFrameworkTemplate.list();
|
|
39
|
-
this.spinner.stop();
|
|
40
|
-
const templates = TemplateListUtil.processTemplates(rawTemplates);
|
|
41
|
-
if (templates.length > 0) {
|
|
42
|
-
TemplateDisplayUtil.displayTemplateList(this, templates);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this.log(messages.getMessage('noResultsFound'));
|
|
46
|
-
}
|
|
47
|
-
return templates;
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
this.spinner.stop();
|
|
51
|
-
const errorMsg = error.message;
|
|
52
|
-
if (errorMsg.includes('certificate') || errorMsg.includes('altnames')) {
|
|
53
|
-
throw new SfError(messages.getMessage('error.CertificateError'), 'TemplateListError', messages.getMessages('error.CertificateError.Actions'));
|
|
54
|
-
}
|
|
55
|
-
else if (errorMsg.includes('Unauthorized') || errorMsg.includes('401')) {
|
|
56
|
-
throw new SfError(messages.getMessage('error.AuthenticationError'), 'TemplateListError', messages.getMessages('error.AuthenticationError.Actions'));
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
throw new SfError(messages.getMessage('error.GenericError', [errorMsg]), 'TemplateListError', messages.getMessages('error.GenericError.Actions'));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/commands/orchestrator/list/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAC;AAEjE,OAAO,oBAAoB,MAAM,iDAAiD,CAAC;AAEnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAErF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,iCAAiC,EAAE,4BAA4B,CAAC,CAAC;AAExG,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAyB;IAC1D,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,KAAK,GAAG,SAAS,CAAC;IAEzC,uCAAuC;IAChC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ClD,CAAC;QACJ,CAAC;IACH,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
-
import { TemplateData } from '../../../utils/template/templateTypes.js';
|
|
3
|
-
export default class UpdateTemplate extends SfCommand<TemplateData> {
|
|
4
|
-
static readonly summary: string;
|
|
5
|
-
static readonly description: string;
|
|
6
|
-
static readonly examples: string[];
|
|
7
|
-
static readonly state = "preview";
|
|
8
|
-
static readonly flags: {
|
|
9
|
-
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
-
'template-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
'template-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
-
label: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
-
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
-
};
|
|
16
|
-
run(): Promise<TemplateData>;
|
|
17
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025, 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 { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
8
|
-
import { Messages, SfError } from '@salesforce/core';
|
|
9
|
-
import AppFrameworkTemplate from '../../../utils/template/appframeworktemplate.js';
|
|
10
|
-
import { TemplateDisplayUtil } from '../../../utils/template/templateDisplayUtil.js';
|
|
11
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
12
|
-
const messages = Messages.loadMessages('@salesforce/plugin-orchestrator', 'appframework.update.template');
|
|
13
|
-
export default class UpdateTemplate extends SfCommand {
|
|
14
|
-
static summary = messages.getMessage('summary');
|
|
15
|
-
static description = messages.getMessage('description');
|
|
16
|
-
static examples = messages.getMessages('examples');
|
|
17
|
-
static state = 'preview';
|
|
18
|
-
static flags = {
|
|
19
|
-
'target-org': Flags.requiredOrg({
|
|
20
|
-
summary: messages.getMessage('flags.target-org.summary'),
|
|
21
|
-
description: messages.getMessage('flags.target-org.description'),
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
'api-version': Flags.orgApiVersion({
|
|
25
|
-
summary: messages.getMessage('flags.api-version.summary'),
|
|
26
|
-
description: messages.getMessage('flags.api-version.description'),
|
|
27
|
-
}),
|
|
28
|
-
'template-id': Flags.string({
|
|
29
|
-
char: 'i',
|
|
30
|
-
summary: messages.getMessage('flags.template-id.summary'),
|
|
31
|
-
description: messages.getMessage('flags.template-id.description'),
|
|
32
|
-
exclusive: ['template-name'],
|
|
33
|
-
}),
|
|
34
|
-
'template-name': Flags.string({
|
|
35
|
-
char: 'n',
|
|
36
|
-
summary: messages.getMessage('flags.template-name.summary'),
|
|
37
|
-
description: messages.getMessage('flags.template-name.description'),
|
|
38
|
-
exclusive: ['template-id'],
|
|
39
|
-
}),
|
|
40
|
-
label: Flags.string({
|
|
41
|
-
char: 'l',
|
|
42
|
-
summary: messages.getMessage('flags.label.summary'),
|
|
43
|
-
description: messages.getMessage('flags.label.description'),
|
|
44
|
-
}),
|
|
45
|
-
description: Flags.string({
|
|
46
|
-
char: 'd',
|
|
47
|
-
summary: messages.getMessage('flags.description.summary'),
|
|
48
|
-
description: messages.getMessage('flags.description.description'),
|
|
49
|
-
}),
|
|
50
|
-
};
|
|
51
|
-
async run() {
|
|
52
|
-
const { flags } = await this.parse(UpdateTemplate);
|
|
53
|
-
if (!flags['template-id'] && !flags['template-name']) {
|
|
54
|
-
throw new SfError(messages.getMessage('missingRequiredField'), 'MissingRequiredFlag');
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
this.spinner.start(messages.getMessage('fetchingTemplate'));
|
|
58
|
-
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
59
|
-
const appFrameworkTemplate = new AppFrameworkTemplate(connection);
|
|
60
|
-
const identifier = flags['template-id'] ?? flags['template-name'];
|
|
61
|
-
this.spinner.stop();
|
|
62
|
-
this.spinner.start(messages.getMessage('updatingTemplate'));
|
|
63
|
-
const updateOptions = {
|
|
64
|
-
label: flags.label,
|
|
65
|
-
description: flags.description,
|
|
66
|
-
};
|
|
67
|
-
const rawTemplate = await appFrameworkTemplate.update(identifier, updateOptions);
|
|
68
|
-
this.spinner.stop();
|
|
69
|
-
this.log(messages.getMessage('updateSuccess', [rawTemplate.name, rawTemplate.id]));
|
|
70
|
-
const updatedTemplate = {
|
|
71
|
-
id: rawTemplate.id,
|
|
72
|
-
name: rawTemplate.name,
|
|
73
|
-
label: rawTemplate.label,
|
|
74
|
-
description: rawTemplate.description,
|
|
75
|
-
templateType: rawTemplate.templateType,
|
|
76
|
-
templateSubtype: rawTemplate.templateSubtype,
|
|
77
|
-
templateId: rawTemplate.templateId,
|
|
78
|
-
folderId: rawTemplate.folderId,
|
|
79
|
-
namespace: rawTemplate.namespace,
|
|
80
|
-
templateVersion: rawTemplate.releaseInfo?.templateVersion,
|
|
81
|
-
assetVersion: rawTemplate.assetVersion,
|
|
82
|
-
maxAppCount: rawTemplate.maxAppCount,
|
|
83
|
-
variableDefinition: rawTemplate.variableDefinition,
|
|
84
|
-
layoutDefinition: rawTemplate.layoutDefinition,
|
|
85
|
-
rules: rawTemplate.rules,
|
|
86
|
-
created: rawTemplate.createdDate ? new Date(rawTemplate.createdDate).toLocaleDateString() : 'n/a',
|
|
87
|
-
modified: rawTemplate.lastModifiedDate ? new Date(rawTemplate.lastModifiedDate).toLocaleDateString() : 'n/a',
|
|
88
|
-
industries: rawTemplate.tags?.industries?.join(', ') ?? 'n/a',
|
|
89
|
-
audience: rawTemplate.tags?.targetAudience?.join(', ') ?? 'n/a',
|
|
90
|
-
icons: rawTemplate.icons,
|
|
91
|
-
chainDefinitions: rawTemplate.chainDefinitions,
|
|
92
|
-
applicationSourceId: rawTemplate.applicationSourceId,
|
|
93
|
-
url: rawTemplate.url,
|
|
94
|
-
configurationUrl: rawTemplate.configurationUrl,
|
|
95
|
-
readinessUrl: rawTemplate.readinessUrl,
|
|
96
|
-
};
|
|
97
|
-
TemplateDisplayUtil.displayTemplateDetail(this, updatedTemplate);
|
|
98
|
-
return updatedTemplate;
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
this.spinner.stop();
|
|
102
|
-
const errorMsg = error.message;
|
|
103
|
-
throw new SfError(`Error updating template: ${errorMsg}`, 'TemplateUpdateError');
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/commands/orchestrator/update/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAC;AAEjE,OAAO,oBAAoB,MAAM,iDAAiD,CAAC;AAEnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAErF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,iCAAiC,EAAE,8BAA8B,CAAC,CAAC;AAE1G,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAA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