@salesforce/plugin-orchestrator 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +28 -0
- package/LICENSE.txt +12 -0
- package/README.md +145 -0
- package/lib/commands/orchestrator/create/app.d.ts +19 -0
- package/lib/commands/orchestrator/create/app.js +144 -0
- package/lib/commands/orchestrator/create/app.js.map +1 -0
- package/lib/commands/orchestrator/create/template.d.ts +17 -0
- package/lib/commands/orchestrator/create/template.js +96 -0
- package/lib/commands/orchestrator/create/template.js.map +1 -0
- package/lib/commands/orchestrator/decouple/app.d.ts +14 -0
- package/lib/commands/orchestrator/decouple/app.js +106 -0
- package/lib/commands/orchestrator/decouple/app.js.map +1 -0
- package/lib/commands/orchestrator/delete/app.d.ts +15 -0
- package/lib/commands/orchestrator/delete/app.js +102 -0
- package/lib/commands/orchestrator/delete/app.js.map +1 -0
- package/lib/commands/orchestrator/delete/template.d.ts +15 -0
- package/lib/commands/orchestrator/delete/template.js +108 -0
- package/lib/commands/orchestrator/delete/template.js.map +1 -0
- package/lib/commands/orchestrator/display/app.d.ts +15 -0
- package/lib/commands/orchestrator/display/app.js +85 -0
- package/lib/commands/orchestrator/display/app.js.map +1 -0
- package/lib/commands/orchestrator/display/template.d.ts +15 -0
- package/lib/commands/orchestrator/display/template.js +105 -0
- package/lib/commands/orchestrator/display/template.js.map +1 -0
- package/lib/commands/orchestrator/list/app.d.ts +13 -0
- package/lib/commands/orchestrator/list/app.js +62 -0
- package/lib/commands/orchestrator/list/app.js.map +1 -0
- package/lib/commands/orchestrator/list/template.d.ts +14 -0
- package/lib/commands/orchestrator/list/template.js +64 -0
- package/lib/commands/orchestrator/list/template.js.map +1 -0
- package/lib/commands/orchestrator/template/create.d.ts +17 -0
- package/lib/commands/orchestrator/template/create.js +96 -0
- package/lib/commands/orchestrator/template/create.js.map +1 -0
- package/lib/commands/orchestrator/template/delete.d.ts +15 -0
- package/lib/commands/orchestrator/template/delete.js +108 -0
- package/lib/commands/orchestrator/template/delete.js.map +1 -0
- package/lib/commands/orchestrator/template/display.d.ts +15 -0
- package/lib/commands/orchestrator/template/display.js +105 -0
- package/lib/commands/orchestrator/template/display.js.map +1 -0
- package/lib/commands/orchestrator/template/list.d.ts +13 -0
- package/lib/commands/orchestrator/template/list.js +62 -0
- package/lib/commands/orchestrator/template/list.js.map +1 -0
- package/lib/commands/orchestrator/template/update.d.ts +17 -0
- package/lib/commands/orchestrator/template/update.js +107 -0
- package/lib/commands/orchestrator/template/update.js.map +1 -0
- package/lib/commands/orchestrator/update/app.d.ts +20 -0
- package/lib/commands/orchestrator/update/app.js +145 -0
- package/lib/commands/orchestrator/update/app.js.map +1 -0
- package/lib/commands/orchestrator/update/template.d.ts +17 -0
- package/lib/commands/orchestrator/update/template.js +107 -0
- package/lib/commands/orchestrator/update/template.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -0
- package/lib/utils/app/appDisplayUtil.d.ts +26 -0
- package/lib/utils/app/appDisplayUtil.js +153 -0
- package/lib/utils/app/appDisplayUtil.js.map +1 -0
- package/lib/utils/app/appListUtils.d.ts +34 -0
- package/lib/utils/app/appListUtils.js +81 -0
- package/lib/utils/app/appListUtils.js.map +1 -0
- package/lib/utils/app/appTypes.d.ts +44 -0
- package/lib/utils/app/appTypes.js +8 -0
- package/lib/utils/app/appTypes.js.map +1 -0
- package/lib/utils/app/appframeworkapp.d.ts +64 -0
- package/lib/utils/app/appframeworkapp.js +175 -0
- package/lib/utils/app/appframeworkapp.js.map +1 -0
- package/lib/utils/display/displayUtil.d.ts +27 -0
- package/lib/utils/display/displayUtil.js +80 -0
- package/lib/utils/display/displayUtil.js.map +1 -0
- package/lib/utils/request.d.ts +15 -0
- package/lib/utils/request.js +18 -0
- package/lib/utils/request.js.map +1 -0
- package/lib/utils/template/appframeworktemplate.d.ts +67 -0
- package/lib/utils/template/appframeworktemplate.js +114 -0
- package/lib/utils/template/appframeworktemplate.js.map +1 -0
- package/lib/utils/template/templateDisplayUtil.d.ts +42 -0
- package/lib/utils/template/templateDisplayUtil.js +142 -0
- package/lib/utils/template/templateDisplayUtil.js.map +1 -0
- package/lib/utils/template/templateHighlighter.d.ts +23 -0
- package/lib/utils/template/templateHighlighter.js +68 -0
- package/lib/utils/template/templateHighlighter.js.map +1 -0
- package/lib/utils/template/templateListUtils.d.ts +40 -0
- package/lib/utils/template/templateListUtils.js +126 -0
- package/lib/utils/template/templateListUtils.js.map +1 -0
- package/lib/utils/template/templateTypes.d.ts +114 -0
- package/lib/utils/template/templateTypes.js +15 -0
- package/lib/utils/template/templateTypes.js.map +1 -0
- package/lib/utils/utils.d.ts +21 -0
- package/lib/utils/utils.js +49 -0
- package/lib/utils/utils.js.map +1 -0
- package/messages/appframework.create.app.md +124 -0
- package/messages/appframework.create.template.md +82 -0
- package/messages/appframework.decouple.app.md +82 -0
- package/messages/appframework.delete.app.md +94 -0
- package/messages/appframework.delete.template.md +162 -0
- package/messages/appframework.display.app.md +70 -0
- package/messages/appframework.display.template.md +101 -0
- package/messages/appframework.list.app.md +126 -0
- package/messages/appframework.list.template.md +78 -0
- package/messages/appframework.template.create.md +82 -0
- package/messages/appframework.template.delete.md +162 -0
- package/messages/appframework.template.display.md +101 -0
- package/messages/appframework.template.list.md +78 -0
- package/messages/appframework.template.update.md +78 -0
- package/messages/appframework.update.app.md +142 -0
- package/messages/appframework.update.template.md +78 -0
- package/npm-shrinkwrap.json +14309 -0
- package/oclif.lock +7751 -0
- package/oclif.manifest.json +1731 -0
- package/package.json +226 -0
|
@@ -0,0 +1,107 @@
|
|
|
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.template.update');
|
|
13
|
+
export default class Update 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(Update);
|
|
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=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/orchestrator/template/update.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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AgB,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,KAAK;gBAC5G,UAAU,EAAE,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK;gBAC7D,QAAQ,EAAE,WAAW,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK;gBAC/D,KAAK,EAAE,WAAW,CAAC,KAAK;gBACxB,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;gBAC9C,mBAAmB,EAAE,WAAW,CAAC,mBAAmB;gBACpD,GAAG,EAAE,WAAW,CAAC,GAAG;gBACpB,gBAAgB,EAAE,WAAW,CAAC,gBAAgB;gBAC9C,YAAY,EAAE,WAAW,CAAC,YAAY;aACvC,CAAC;YAEF,mBAAmB,CAAC,qBAAqB,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;YAEjE,OAAO,eAAe,CAAC;QACzB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,MAAM,QAAQ,GAAI,KAAe,CAAC,OAAO,CAAC;YAE1C,MAAM,IAAI,OAAO,CAAC,4BAA4B,QAAQ,EAAE,EAAE,qBAAqB,CAAC,CAAC;QACnF,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
export default class UpdateApp extends SfCommand<string> {
|
|
3
|
+
static readonly summary: string;
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly examples: string[];
|
|
6
|
+
static readonly state = "preview";
|
|
7
|
+
static readonly flags: {
|
|
8
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'app-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'app-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'template-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'template-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
label: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'runtime-method': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'log-level': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<string>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
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 AppFrameworkApp from '../../../utils/app/appframeworkapp.js';
|
|
10
|
+
import { AppListUtil } from '../../../utils/app/appListUtils.js';
|
|
11
|
+
import { AppDisplayUtil } from '../../../utils/app/appDisplayUtil.js';
|
|
12
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
|
+
const messages = Messages.loadMessages('@salesforce/plugin-orchestrator', 'appframework.update.app');
|
|
14
|
+
export default class UpdateApp 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
|
+
static flags = {
|
|
20
|
+
'target-org': Flags.requiredOrg({
|
|
21
|
+
summary: messages.getMessage('flags.target-org.summary'),
|
|
22
|
+
description: messages.getMessage('flags.target-org.description'),
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
'api-version': Flags.orgApiVersion({
|
|
26
|
+
summary: messages.getMessage('flags.api-version.summary'),
|
|
27
|
+
description: messages.getMessage('flags.api-version.description'),
|
|
28
|
+
}),
|
|
29
|
+
'app-id': Flags.string({
|
|
30
|
+
char: 'i',
|
|
31
|
+
summary: messages.getMessage('flags.app-id.summary'),
|
|
32
|
+
description: messages.getMessage('flags.app-id.description'),
|
|
33
|
+
exclusive: ['app-name'],
|
|
34
|
+
}),
|
|
35
|
+
'app-name': Flags.string({
|
|
36
|
+
char: 'n',
|
|
37
|
+
summary: messages.getMessage('flags.app-name.summary'),
|
|
38
|
+
description: messages.getMessage('flags.app-name.description'),
|
|
39
|
+
exclusive: ['app-id'],
|
|
40
|
+
}),
|
|
41
|
+
'template-id': Flags.string({
|
|
42
|
+
char: 't',
|
|
43
|
+
summary: messages.getMessage('flags.template-id.summary'),
|
|
44
|
+
description: messages.getMessage('flags.template-id.description'),
|
|
45
|
+
exclusive: ['template-name'],
|
|
46
|
+
}),
|
|
47
|
+
'template-name': Flags.string({
|
|
48
|
+
char: 'm',
|
|
49
|
+
summary: messages.getMessage('flags.template-name.summary'),
|
|
50
|
+
description: messages.getMessage('flags.template-name.description'),
|
|
51
|
+
exclusive: ['template-id'],
|
|
52
|
+
}),
|
|
53
|
+
label: Flags.string({
|
|
54
|
+
char: 'l',
|
|
55
|
+
summary: messages.getMessage('flags.label.summary'),
|
|
56
|
+
description: messages.getMessage('flags.label.description'),
|
|
57
|
+
}),
|
|
58
|
+
description: Flags.string({
|
|
59
|
+
char: 'd',
|
|
60
|
+
summary: messages.getMessage('flags.description.summary'),
|
|
61
|
+
description: messages.getMessage('flags.description.description'),
|
|
62
|
+
}),
|
|
63
|
+
'runtime-method': Flags.string({
|
|
64
|
+
char: 'r',
|
|
65
|
+
summary: messages.getMessage('flags.runtime-method.summary'),
|
|
66
|
+
description: messages.getMessage('flags.runtime-method.description'),
|
|
67
|
+
options: ['sync', 'async'],
|
|
68
|
+
}),
|
|
69
|
+
'log-level': Flags.string({
|
|
70
|
+
char: 'g',
|
|
71
|
+
summary: messages.getMessage('flags.log-level.summary'),
|
|
72
|
+
description: messages.getMessage('flags.log-level.description'),
|
|
73
|
+
options: ['debug', 'info', 'warn', 'error'],
|
|
74
|
+
}),
|
|
75
|
+
};
|
|
76
|
+
async run() {
|
|
77
|
+
const { flags } = await this.parse(UpdateApp);
|
|
78
|
+
// Check that at least one of app-id or app-name is provided
|
|
79
|
+
if (!flags['app-id'] && !flags['app-name']) {
|
|
80
|
+
throw new SfError(messages.getMessage('noAppSpecified'), 'AppUpdateError', messages.getMessages('error.UpdateError.Actions'));
|
|
81
|
+
}
|
|
82
|
+
// Check that at least one of template-id or template-name is provided
|
|
83
|
+
if (!flags['template-id'] && !flags['template-name']) {
|
|
84
|
+
throw new SfError(messages.getMessage('noTemplateSpecified'), 'AppUpdateError', messages.getMessages('error.UpdateError.Actions'));
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
const connection = flags['target-org'].getConnection(flags['api-version']);
|
|
88
|
+
const appFrameworkApp = new AppFrameworkApp(connection);
|
|
89
|
+
let appId = '';
|
|
90
|
+
// Get app ID if app name was provided
|
|
91
|
+
if (flags['app-name']) {
|
|
92
|
+
this.spinner.start(messages.getMessage('fetchingApp'));
|
|
93
|
+
const apps = await appFrameworkApp.list();
|
|
94
|
+
const app = apps.find((a) => a.name === flags['app-name']);
|
|
95
|
+
if (!app) {
|
|
96
|
+
this.spinner.stop();
|
|
97
|
+
throw new SfError(messages.getMessage('noAppFound'), 'AppUpdateError', messages.getMessages('error.UpdateError.Actions'));
|
|
98
|
+
}
|
|
99
|
+
appId = app.id ?? '';
|
|
100
|
+
this.spinner.stop();
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
appId = flags['app-id'] ?? '';
|
|
104
|
+
}
|
|
105
|
+
let templateId = '';
|
|
106
|
+
// Get template ID if template name was provided
|
|
107
|
+
if (flags['template-name']) {
|
|
108
|
+
this.spinner.start(messages.getMessage('fetchingTemplate'));
|
|
109
|
+
// Since we don't have a direct way to list templates,
|
|
110
|
+
// we need to get the template by name from a different utility class
|
|
111
|
+
// For now, we'll throw an error and suggest using template-id instead
|
|
112
|
+
this.spinner.stop();
|
|
113
|
+
throw new SfError(messages.getMessage('noTemplateFound'), 'AppUpdateError', messages.getMessages('error.UpdateError.Actions'));
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
templateId = flags['template-id'] ?? '';
|
|
117
|
+
}
|
|
118
|
+
// Update the app
|
|
119
|
+
this.spinner.start(messages.getMessage('updatingApp'));
|
|
120
|
+
const updatedAppId = await appFrameworkApp.updateApp(appId, {
|
|
121
|
+
templateSourceId: templateId,
|
|
122
|
+
label: flags.label,
|
|
123
|
+
description: flags.description,
|
|
124
|
+
runtimeMethod: flags['runtime-method'],
|
|
125
|
+
logLevel: flags['log-level'],
|
|
126
|
+
});
|
|
127
|
+
this.spinner.stop();
|
|
128
|
+
this.log(messages.getMessage('updateSuccess', [updatedAppId]));
|
|
129
|
+
// Fetch the updated app and display its details
|
|
130
|
+
const updatedApp = await appFrameworkApp.getApp(updatedAppId);
|
|
131
|
+
if (updatedApp) {
|
|
132
|
+
const processedApps = AppListUtil.processApps([updatedApp]);
|
|
133
|
+
if (processedApps.length > 0) {
|
|
134
|
+
AppDisplayUtil.displayAppDetails(this, processedApps[0]);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return updatedAppId;
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
this.spinner.stop();
|
|
141
|
+
throw new SfError(messages.getMessage('error.UpdateError', [error.message]), 'AppUpdateError', messages.getMessages('error.UpdateError.Actions'));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../../src/commands/orchestrator/update/app.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;AACjE,OAAO,eAAe,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,iCAAiC,EAAE,yBAAyB,CAAC,CAAC;AAErG,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAiB;IAC/C,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;IAElC,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC;YAC9B,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC;YACxD,WAAW,EAAE,QAAQ,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AAC,WAAW,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;gBAC5D,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC7B,cAAc,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;YAED,OAAO,YAAY,CAAC;QACtB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAEpB,MAAM,IAAI,OAAO,CACf,QAAQ,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC,EACpE,gBAAgB,EAChB,QAAQ,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAClD,CAAC;QACJ,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2021, 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
|
+
export default {};
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { AppData } from './appTypes.js';
|
|
3
|
+
export declare class AppDisplayUtil {
|
|
4
|
+
/**
|
|
5
|
+
* Get color formatting function based on app template type
|
|
6
|
+
*
|
|
7
|
+
* @param templateType - The template type of the app
|
|
8
|
+
* @returns Function to format text with appropriate color
|
|
9
|
+
*/
|
|
10
|
+
static getAppTypeColor(templateType: string): (text: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Display a list of apps in a table format
|
|
13
|
+
*
|
|
14
|
+
* @param command - The SfCommand instance
|
|
15
|
+
* @param apps - The app data to display
|
|
16
|
+
* @param title - Optional title for the table
|
|
17
|
+
*/
|
|
18
|
+
static displayAppList(command: SfCommand<unknown>, apps: AppData[], title?: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Display detailed information about an app in sections
|
|
21
|
+
*
|
|
22
|
+
* @param command - The SfCommand instance
|
|
23
|
+
* @param app - The app data to display
|
|
24
|
+
*/
|
|
25
|
+
static displayAppDetails(command: SfCommand<unknown>, app: AppData): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
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 ansis from 'ansis';
|
|
8
|
+
export class AppDisplayUtil {
|
|
9
|
+
/**
|
|
10
|
+
* Get color formatting function based on app template type
|
|
11
|
+
*
|
|
12
|
+
* @param templateType - The template type of the app
|
|
13
|
+
* @returns Function to format text with appropriate color
|
|
14
|
+
*/
|
|
15
|
+
static getAppTypeColor(templateType) {
|
|
16
|
+
switch (templateType.toLowerCase()) {
|
|
17
|
+
case 'app':
|
|
18
|
+
return ansis.green;
|
|
19
|
+
case 'component':
|
|
20
|
+
return ansis.blue;
|
|
21
|
+
default:
|
|
22
|
+
return ansis.yellow;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Display a list of apps in a table format
|
|
27
|
+
*
|
|
28
|
+
* @param command - The SfCommand instance
|
|
29
|
+
* @param apps - The app data to display
|
|
30
|
+
* @param title - Optional title for the table
|
|
31
|
+
*/
|
|
32
|
+
static displayAppList(command, apps, title = 'AppFramework Apps') {
|
|
33
|
+
if (apps.length === 0) {
|
|
34
|
+
command.log('No apps found.');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
command.styledHeader(`Found ${apps.length} app(s)`);
|
|
38
|
+
const tableData = apps.map((app) => {
|
|
39
|
+
const typeString = String(app.templateType ?? 'n/a');
|
|
40
|
+
const typeWithColor = this.getAppTypeColor(typeString)(typeString);
|
|
41
|
+
return {
|
|
42
|
+
Id: app.id ?? 'n/a',
|
|
43
|
+
Type: typeWithColor,
|
|
44
|
+
Version: app.templateVersion ?? 'n/a',
|
|
45
|
+
Subtype: app.templateSubtype ?? 'n/a',
|
|
46
|
+
Name: app.name ?? 'n/a',
|
|
47
|
+
Label: app.label ?? 'n/a',
|
|
48
|
+
Status: app.status ?? 'n/a',
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
command.table({
|
|
52
|
+
data: tableData,
|
|
53
|
+
title,
|
|
54
|
+
columns: [
|
|
55
|
+
{ key: 'Id', width: '30%' },
|
|
56
|
+
{ key: 'Name', width: '20%' },
|
|
57
|
+
{ key: 'Label', width: '20%' },
|
|
58
|
+
{ key: 'Type', width: '10%' },
|
|
59
|
+
{ key: 'Subtype', width: '5%' },
|
|
60
|
+
{ key: 'Status', width: '10%' },
|
|
61
|
+
{ key: 'Version', width: '5%' },
|
|
62
|
+
],
|
|
63
|
+
overflow: 'truncate-end',
|
|
64
|
+
sort: {
|
|
65
|
+
Label: 'asc',
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
command.log('');
|
|
69
|
+
command.log(`Legend: ${ansis.green('app')} - Application apps, ${ansis.blue('component')} - Component apps, ${ansis.yellow('other')} - Other app types`);
|
|
70
|
+
command.log('');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Display detailed information about an app in sections
|
|
74
|
+
*
|
|
75
|
+
* @param command - The SfCommand instance
|
|
76
|
+
* @param app - The app data to display
|
|
77
|
+
*/
|
|
78
|
+
static displayAppDetails(command, app) {
|
|
79
|
+
if (!app) {
|
|
80
|
+
command.log('No app data to display.');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
command.styledHeader(`App Details: ${app.name ?? 'n/a'}`);
|
|
84
|
+
// Basic Information
|
|
85
|
+
command.styledHeader('Basic Information');
|
|
86
|
+
command.table({
|
|
87
|
+
data: [
|
|
88
|
+
{ Property: 'ID', Value: app.id ?? 'n/a' },
|
|
89
|
+
{ Property: 'Name', Value: app.name ?? 'n/a' },
|
|
90
|
+
{ Property: 'Label', Value: app.label ?? 'n/a' },
|
|
91
|
+
{ Property: 'Description', Value: app.description ?? 'n/a' },
|
|
92
|
+
{ Property: 'Status', Value: app.status ?? 'n/a' },
|
|
93
|
+
],
|
|
94
|
+
columns: [
|
|
95
|
+
{ key: 'Property', width: '30%' },
|
|
96
|
+
{ key: 'Value', width: '70%' },
|
|
97
|
+
],
|
|
98
|
+
});
|
|
99
|
+
// Template Information
|
|
100
|
+
command.styledHeader('Template Information');
|
|
101
|
+
command.table({
|
|
102
|
+
data: [
|
|
103
|
+
{ Property: 'Template ID', Value: app.templateSourceId ?? 'n/a' },
|
|
104
|
+
{ Property: 'Template Type', Value: app.templateType ?? 'n/a' },
|
|
105
|
+
{ Property: 'Template Subtype', Value: app.templateSubtype ?? 'n/a' },
|
|
106
|
+
{ Property: 'Template Version', Value: app.templateVersion ?? 'n/a' },
|
|
107
|
+
],
|
|
108
|
+
columns: [
|
|
109
|
+
{ key: 'Property', width: '30%' },
|
|
110
|
+
{ key: 'Value', width: '70%' },
|
|
111
|
+
],
|
|
112
|
+
});
|
|
113
|
+
// Runtime Information
|
|
114
|
+
command.styledHeader('Runtime Information');
|
|
115
|
+
command.table({
|
|
116
|
+
data: [
|
|
117
|
+
{ Property: 'Runtime Method', Value: app.runtimeMethod ?? 'n/a' },
|
|
118
|
+
{ Property: 'Log Level', Value: app.logLevel ?? 'n/a' },
|
|
119
|
+
{ Property: 'Namespace', Value: app.namespace ?? 'n/a' },
|
|
120
|
+
],
|
|
121
|
+
columns: [
|
|
122
|
+
{ key: 'Property', width: '30%' },
|
|
123
|
+
{ key: 'Value', width: '70%' },
|
|
124
|
+
],
|
|
125
|
+
});
|
|
126
|
+
// Date Information
|
|
127
|
+
command.styledHeader('Date Information');
|
|
128
|
+
command.table({
|
|
129
|
+
data: [
|
|
130
|
+
{ Property: 'Created', Value: app.created ?? 'n/a' },
|
|
131
|
+
{ Property: 'Modified', Value: app.modified ?? 'n/a' },
|
|
132
|
+
],
|
|
133
|
+
columns: [
|
|
134
|
+
{ key: 'Property', width: '30%' },
|
|
135
|
+
{ key: 'Value', width: '70%' },
|
|
136
|
+
],
|
|
137
|
+
});
|
|
138
|
+
// URLs
|
|
139
|
+
command.styledHeader('URLs');
|
|
140
|
+
command.table({
|
|
141
|
+
data: [
|
|
142
|
+
{ Property: 'URL', Value: app.url ?? 'n/a' },
|
|
143
|
+
{ Property: 'Configuration URL', Value: app.configurationUrl ?? 'n/a' },
|
|
144
|
+
{ Property: 'Readiness URL', Value: app.readinessUrl ?? 'n/a' },
|
|
145
|
+
],
|
|
146
|
+
columns: [
|
|
147
|
+
{ key: 'Property', width: '30%' },
|
|
148
|
+
{ key: 'Value', width: '70%' },
|
|
149
|
+
],
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=appDisplayUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appDisplayUtil.js","sourceRoot":"","sources":["../../../src/utils/app/appDisplayUtil.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,OAAO,cAAc;IACzB;;;;;OAKG;IACI,MAAM,CAAC,eAAe,CAAC,YAAoB;QAChD,QAAQ,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC;YACnC,KAAK,KAAK;gBACR,OAAO,KAAK,CAAC,KAAK,CAAC;YACrB,KAAK,WAAW;gBACd,OAAO,KAAK,CAAC,IAAI,CAAC;YACpB;gBACE,OAAO,KAAK,CAAC,MAAM,CAAC;QACxB,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,cAAc,CAAC,OAA2B,EAAE,IAAe,EAAE,KAAK,GAAG,mBAAmB;QACpG,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;YAC9B,OAAO;QACT,CAAC;QAED,OAAO,CAAC,YAAY,CAAC,SAAS,IAAI,CAAC,MAAM,SAAS,CAAC,CAAC;QAEpD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACjC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,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