@sap-ux/adp-tooling 0.19.11 → 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/dist/abap/client.d.ts +1 -1
- package/dist/abap/client.js +8 -13
- package/dist/abap/config.js +5 -8
- package/dist/abap/index.d.ts +3 -3
- package/dist/abap/index.js +3 -19
- package/dist/abap/provider.js +5 -8
- package/dist/base/abap/manifest-service.d.ts +1 -1
- package/dist/base/abap/manifest-service.js +9 -18
- package/dist/base/cf.js +8 -11
- package/dist/base/change-utils.d.ts +1 -1
- package/dist/base/change-utils.js +49 -62
- package/dist/base/constants/index.js +12 -15
- package/dist/base/credentials.d.ts +2 -2
- package/dist/base/credentials.js +6 -9
- package/dist/base/helper.d.ts +1 -1
- package/dist/base/helper.js +40 -57
- package/dist/base/project-builder.js +3 -6
- package/dist/base/prompt.d.ts +1 -1
- package/dist/base/prompt.js +19 -25
- package/dist/btp/api.d.ts +1 -1
- package/dist/btp/api.js +10 -18
- package/dist/btp/index.d.ts +1 -1
- package/dist/btp/index.js +1 -17
- package/dist/cf/app/discovery.d.ts +1 -1
- package/dist/cf/app/discovery.js +11 -18
- package/dist/cf/app/html5-repo.d.ts +1 -1
- package/dist/cf/app/html5-repo.js +24 -32
- package/dist/cf/app/index.d.ts +2 -2
- package/dist/cf/app/index.js +2 -18
- package/dist/cf/core/auth.d.ts +1 -1
- package/dist/cf/core/auth.js +4 -8
- package/dist/cf/core/config.d.ts +1 -1
- package/dist/cf/core/config.js +9 -15
- package/dist/cf/core/index.d.ts +2 -2
- package/dist/cf/core/index.js +2 -18
- package/dist/cf/deploy.d.ts +1 -1
- package/dist/cf/deploy.js +33 -44
- package/dist/cf/index.d.ts +6 -6
- package/dist/cf/index.js +6 -22
- package/dist/cf/project/index.d.ts +3 -3
- package/dist/cf/project/index.js +3 -19
- package/dist/cf/project/mta.d.ts +1 -1
- package/dist/cf/project/mta.js +23 -66
- package/dist/cf/project/yaml-loader.d.ts +1 -1
- package/dist/cf/project/yaml-loader.js +8 -16
- package/dist/cf/project/yaml.d.ts +2 -2
- package/dist/cf/project/yaml.js +28 -72
- package/dist/cf/services/api.d.ts +1 -1
- package/dist/cf/services/api.js +46 -93
- package/dist/cf/services/cli.d.ts +1 -1
- package/dist/cf/services/cli.js +31 -42
- package/dist/cf/services/destinations.js +12 -48
- package/dist/cf/services/index.d.ts +5 -5
- package/dist/cf/services/index.js +5 -21
- package/dist/cf/services/manifest.d.ts +1 -1
- package/dist/cf/services/manifest.js +9 -13
- package/dist/cf/services/ssh.js +14 -22
- package/dist/cf/utils/index.d.ts +1 -1
- package/dist/cf/utils/index.js +1 -17
- package/dist/cf/utils/validation.d.ts +1 -1
- package/dist/cf/utils/validation.js +12 -18
- package/dist/common/flp-parameters.d.ts +1 -1
- package/dist/common/flp-parameters.js +1 -4
- package/dist/common/index.d.ts +1 -1
- package/dist/common/index.js +1 -17
- package/dist/i18n.js +8 -16
- package/dist/index.d.ts +23 -23
- package/dist/index.js +23 -46
- package/dist/preview/adp-preview.d.ts +1 -1
- package/dist/preview/adp-preview.js +41 -39
- package/dist/preview/change-handler.d.ts +1 -1
- package/dist/preview/change-handler.js +51 -59
- package/dist/preview/descriptor-change-handler.d.ts +1 -1
- package/dist/preview/descriptor-change-handler.js +18 -21
- package/dist/preview/ovp-routes-handler.js +11 -13
- package/dist/preview/routes-handler.js +36 -71
- package/dist/preview/utils.d.ts +1 -1
- package/dist/preview/utils.js +5 -8
- package/dist/prompts/add-annotations-to-odata/index.d.ts +1 -1
- package/dist/prompts/add-annotations-to-odata/index.js +24 -26
- package/dist/prompts/add-component-usages/index.d.ts +1 -1
- package/dist/prompts/add-component-usages/index.js +41 -43
- package/dist/prompts/add-new-model/index.d.ts +1 -1
- package/dist/prompts/add-new-model/index.js +75 -80
- package/dist/prompts/change-data-source/index.d.ts +1 -1
- package/dist/prompts/change-data-source/index.js +19 -22
- package/dist/prompts/change-inbound/index.d.ts +1 -1
- package/dist/prompts/change-inbound/index.js +11 -14
- package/dist/prompts/index.d.ts +5 -5
- package/dist/prompts/index.js +5 -15
- package/dist/source/applications.d.ts +2 -2
- package/dist/source/applications.js +7 -11
- package/dist/source/index.d.ts +3 -3
- package/dist/source/index.js +3 -19
- package/dist/source/manifest.d.ts +1 -1
- package/dist/source/manifest.js +15 -25
- package/dist/source/systems.d.ts +1 -1
- package/dist/source/systems.js +20 -27
- package/dist/types.d.ts +1 -1
- package/dist/types.js +64 -17
- package/dist/ui5/fetch.d.ts +1 -1
- package/dist/ui5/fetch.js +8 -12
- package/dist/ui5/format.d.ts +1 -1
- package/dist/ui5/format.js +17 -29
- package/dist/ui5/index.d.ts +4 -4
- package/dist/ui5/index.js +4 -20
- package/dist/ui5/network.d.ts +1 -1
- package/dist/ui5/network.js +1 -4
- package/dist/ui5/validator.js +14 -20
- package/dist/ui5/version-info.d.ts +1 -1
- package/dist/ui5/version-info.js +25 -36
- package/dist/writer/cf.d.ts +1 -1
- package/dist/writer/cf.js +35 -43
- package/dist/writer/changes/writer-factory.d.ts +2 -2
- package/dist/writer/changes/writer-factory.js +10 -13
- package/dist/writer/changes/writers/annotations-writer.d.ts +1 -1
- package/dist/writer/changes/writers/annotations-writer.js +11 -46
- package/dist/writer/changes/writers/component-usages-writer.d.ts +1 -1
- package/dist/writer/changes/writers/component-usages-writer.js +9 -12
- package/dist/writer/changes/writers/data-source-writer.d.ts +1 -1
- package/dist/writer/changes/writers/data-source-writer.js +7 -10
- package/dist/writer/changes/writers/inbound-writer.d.ts +1 -1
- package/dist/writer/changes/writers/inbound-writer.js +10 -13
- package/dist/writer/changes/writers/index.d.ts +5 -5
- package/dist/writer/changes/writers/index.js +5 -21
- package/dist/writer/changes/writers/new-model-writer.d.ts +1 -1
- package/dist/writer/changes/writers/new-model-writer.js +16 -20
- package/dist/writer/editors.d.ts +1 -1
- package/dist/writer/editors.js +6 -9
- package/dist/writer/i18n/index.d.ts +1 -1
- package/dist/writer/i18n/index.js +13 -17
- package/dist/writer/i18n/key-user-translations.js +9 -14
- package/dist/writer/inbound-navigation.d.ts +1 -1
- package/dist/writer/inbound-navigation.js +18 -27
- package/dist/writer/index.d.ts +1 -1
- package/dist/writer/index.js +36 -37
- package/dist/writer/manifest/descriptor-content.d.ts +2 -2
- package/dist/writer/manifest/descriptor-content.js +9 -15
- package/dist/writer/manifest/index.d.ts +1 -1
- package/dist/writer/manifest/index.js +1 -17
- package/dist/writer/options.d.ts +1 -1
- package/dist/writer/options.js +16 -27
- package/dist/writer/project-utils.d.ts +1 -1
- package/dist/writer/project-utils.js +49 -57
- package/dist/writer/writer-config.d.ts +2 -2
- package/dist/writer/writer-config.js +25 -30
- package/package.json +19 -17
package/dist/preview/utils.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getFragmentPathFromTemplate = getFragmentPathFromTemplate;
|
|
4
|
-
const project_access_1 = require("@sap-ux/project-access");
|
|
5
|
-
const node_path_1 = require("node:path");
|
|
1
|
+
import { DirName } from '@sap-ux/project-access';
|
|
2
|
+
import { join } from 'node:path';
|
|
6
3
|
/**
|
|
7
4
|
* Generates the fragment path from the given template string and change object.
|
|
8
5
|
*
|
|
@@ -10,11 +7,11 @@ const node_path_1 = require("node:path");
|
|
|
10
7
|
* @param change - The AppDescriptorV4Change object containing change details.
|
|
11
8
|
* @returns The computed fragment path as a string.
|
|
12
9
|
*/
|
|
13
|
-
function getFragmentPathFromTemplate(template, change) {
|
|
14
|
-
const segments = template.split(`${change.projectId}.${
|
|
10
|
+
export function getFragmentPathFromTemplate(template, change) {
|
|
11
|
+
const segments = template.split(`${change.projectId}.${DirName.Changes}.${DirName.Fragments}.`);
|
|
15
12
|
const [namespace, fileName] = segments;
|
|
16
13
|
if (segments.length === 2 && namespace === '') {
|
|
17
|
-
return
|
|
14
|
+
return join(DirName.Changes, DirName.Fragments, fileName);
|
|
18
15
|
}
|
|
19
16
|
return undefined;
|
|
20
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { YUIQuestion } from '@sap-ux/inquirer-common';
|
|
2
2
|
import type { ManifestNamespace } from '@sap-ux/project-access';
|
|
3
|
-
import { type AddAnnotationsAnswers } from '../../types';
|
|
3
|
+
import { type AddAnnotationsAnswers } from '../../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Gets the prompts for adding annotations to OData service.
|
|
6
6
|
*
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const project_input_validator_1 = require("@sap-ux/project-input-validator");
|
|
8
|
-
const node_path_1 = require("node:path");
|
|
1
|
+
import { AnnotationFileSelectType } from '../../types.js';
|
|
2
|
+
import { t } from '../../i18n.js';
|
|
3
|
+
import { filterDataSourcesByType, getWebappPath, DirName } from '@sap-ux/project-access';
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
5
|
+
import { validateEmptyString } from '@sap-ux/project-input-validator';
|
|
6
|
+
import { join, isAbsolute, basename } from 'node:path';
|
|
9
7
|
/**
|
|
10
8
|
* Gets the prompts for adding annotations to OData service.
|
|
11
9
|
*
|
|
@@ -13,60 +11,60 @@ const node_path_1 = require("node:path");
|
|
|
13
11
|
* @param {Record<string, ManifestNamespace.DataSource>} dataSources - Data sources from the manifest.
|
|
14
12
|
* @returns {YUIQuestion<AddAnnotationsAnswers>[]} The questions/prompts.
|
|
15
13
|
*/
|
|
16
|
-
function getPrompts(basePath, dataSources) {
|
|
17
|
-
const dataSourceIds = Object.keys(
|
|
14
|
+
export function getPrompts(basePath, dataSources) {
|
|
15
|
+
const dataSourceIds = Object.keys(filterDataSourcesByType(dataSources, 'OData'));
|
|
18
16
|
const annotationFileSelectOptions = [
|
|
19
|
-
{ name:
|
|
20
|
-
{ name:
|
|
17
|
+
{ name: t('choices.annotationFile.selectFromWorkspace'), value: AnnotationFileSelectType.ExistingFile },
|
|
18
|
+
{ name: t('choices.annotationFile.createTemplateFile'), value: AnnotationFileSelectType.NewEmptyFile }
|
|
21
19
|
];
|
|
22
20
|
return [
|
|
23
21
|
{
|
|
24
22
|
type: 'list',
|
|
25
23
|
name: 'id',
|
|
26
|
-
message:
|
|
24
|
+
message: t('prompts.oDataSourceLabel'),
|
|
27
25
|
choices: dataSourceIds,
|
|
28
26
|
default: dataSourceIds[0],
|
|
29
27
|
store: false,
|
|
30
28
|
guiOptions: {
|
|
31
29
|
mandatory: true,
|
|
32
|
-
hint:
|
|
30
|
+
hint: t('prompts.addAnnotationOdataSourceTooltip')
|
|
33
31
|
}
|
|
34
32
|
},
|
|
35
33
|
{
|
|
36
34
|
type: 'list',
|
|
37
35
|
name: 'fileSelectOption',
|
|
38
|
-
message:
|
|
36
|
+
message: t('prompts.fileSelectOptionLabel'),
|
|
39
37
|
choices: annotationFileSelectOptions,
|
|
40
38
|
default: 0,
|
|
41
39
|
guiOptions: {
|
|
42
40
|
mandatory: true,
|
|
43
|
-
hint:
|
|
41
|
+
hint: t('prompts.fileSelectOptionTooltip')
|
|
44
42
|
},
|
|
45
43
|
when: (answers) => answers.id !== ''
|
|
46
44
|
},
|
|
47
45
|
{
|
|
48
46
|
type: 'input',
|
|
49
47
|
name: 'filePath',
|
|
50
|
-
message:
|
|
48
|
+
message: t('prompts.filePathLabel'),
|
|
51
49
|
guiType: 'file-browser',
|
|
52
50
|
guiOptions: {
|
|
53
51
|
mandatory: true,
|
|
54
|
-
hint:
|
|
52
|
+
hint: t('prompts.filePathTooltip')
|
|
55
53
|
},
|
|
56
54
|
default: '',
|
|
57
|
-
when: (answers) => answers.id !== '' && answers.fileSelectOption ===
|
|
55
|
+
when: (answers) => answers.id !== '' && answers.fileSelectOption === AnnotationFileSelectType.ExistingFile,
|
|
58
56
|
validate: async (value) => {
|
|
59
|
-
const validationResult =
|
|
57
|
+
const validationResult = validateEmptyString(value);
|
|
60
58
|
if (typeof validationResult === 'string') {
|
|
61
59
|
return validationResult;
|
|
62
60
|
}
|
|
63
|
-
const filePath =
|
|
64
|
-
if (!
|
|
65
|
-
return
|
|
61
|
+
const filePath = isAbsolute(value) ? value : join(basePath, value);
|
|
62
|
+
if (!existsSync(filePath)) {
|
|
63
|
+
return t('validators.fileDoesNotExist');
|
|
66
64
|
}
|
|
67
|
-
const annotationFilePath =
|
|
68
|
-
if (
|
|
69
|
-
return
|
|
65
|
+
const annotationFilePath = join(await getWebappPath(basePath), DirName.Changes, DirName.Annotations, basename(filePath));
|
|
66
|
+
if (existsSync(annotationFilePath)) {
|
|
67
|
+
return t('validators.annotationFileAlreadyExists');
|
|
70
68
|
}
|
|
71
69
|
return true;
|
|
72
70
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { YUIQuestion } from '@sap-ux/inquirer-common';
|
|
2
2
|
import type { UI5FlexLayer } from '@sap-ux/project-access';
|
|
3
|
-
import { type AddComponentUsageAnswers } from '../../types';
|
|
3
|
+
import { type AddComponentUsageAnswers } from '../../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Gets the prompts for adding a component usage.
|
|
6
6
|
*
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const i18n_1 = require("../../i18n");
|
|
6
|
-
const project_input_validator_1 = require("@sap-ux/project-input-validator");
|
|
1
|
+
import { FlexLayer, ChangeType, NamespacePrefix } from '../../types.js';
|
|
2
|
+
import { getChangesByType } from '../../base/change-utils.js';
|
|
3
|
+
import { t } from '../../i18n.js';
|
|
4
|
+
import { validateEmptyString, validateEmptySpaces, validateSpecialChars, hasContentDuplication, hasCustomerPrefix, validateJSON } from '@sap-ux/project-input-validator';
|
|
7
5
|
/**
|
|
8
6
|
* Exucute generic validation for input.
|
|
9
7
|
*
|
|
@@ -11,7 +9,7 @@ const project_input_validator_1 = require("@sap-ux/project-input-validator");
|
|
|
11
9
|
* @returns {string | boolean} An error message if the value is an empty string, or true if it is not.
|
|
12
10
|
*/
|
|
13
11
|
function validatePromptInput(value) {
|
|
14
|
-
const validators = [
|
|
12
|
+
const validators = [validateEmptyString, validateEmptySpaces, validateSpecialChars];
|
|
15
13
|
for (const validator of validators) {
|
|
16
14
|
const validationResult = validator(value);
|
|
17
15
|
if (typeof validationResult === 'string') {
|
|
@@ -34,21 +32,21 @@ function validatePromptId(value, changeFiles, isCustomerBase) {
|
|
|
34
32
|
return validationResult;
|
|
35
33
|
}
|
|
36
34
|
if (isCustomerBase) {
|
|
37
|
-
if (!
|
|
38
|
-
return
|
|
39
|
-
value:
|
|
40
|
-
prefix:
|
|
35
|
+
if (!hasCustomerPrefix(value)) {
|
|
36
|
+
return t('validators.errorInputInvalidValuePrefix', {
|
|
37
|
+
value: t('prompts.component.usageIdLabel'),
|
|
38
|
+
prefix: NamespacePrefix.CUSTOMER
|
|
41
39
|
});
|
|
42
40
|
}
|
|
43
41
|
if (!value.replace('customer.', '').length) {
|
|
44
|
-
return
|
|
45
|
-
value:
|
|
46
|
-
prefix:
|
|
42
|
+
return t('validators.errorCustomerEmptyValue', {
|
|
43
|
+
value: t('prompts.component.usageIdLabel'),
|
|
44
|
+
prefix: NamespacePrefix.CUSTOMER
|
|
47
45
|
});
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
|
-
if (
|
|
51
|
-
return
|
|
48
|
+
if (hasContentDuplication(value, 'componentUsages', changeFiles)) {
|
|
49
|
+
return t('validators.errorDuplicateValueComponentId');
|
|
52
50
|
}
|
|
53
51
|
return true;
|
|
54
52
|
}
|
|
@@ -64,8 +62,8 @@ function validatePromptLibrary(value, changeFiles) {
|
|
|
64
62
|
if (typeof validationResult === 'string') {
|
|
65
63
|
return validationResult;
|
|
66
64
|
}
|
|
67
|
-
if (
|
|
68
|
-
return
|
|
65
|
+
if (hasContentDuplication(value, 'libraries', changeFiles)) {
|
|
66
|
+
return t('validators.errorDuplicateValueLibrary');
|
|
69
67
|
}
|
|
70
68
|
return true;
|
|
71
69
|
}
|
|
@@ -76,11 +74,11 @@ function validatePromptLibrary(value, changeFiles) {
|
|
|
76
74
|
* @returns {boolean | string} True if the JSON is valid, or an error message if validation fails.
|
|
77
75
|
*/
|
|
78
76
|
function validatePromptJSON(value) {
|
|
79
|
-
const validationResult =
|
|
77
|
+
const validationResult = validateEmptyString(value);
|
|
80
78
|
if (typeof validationResult === 'string') {
|
|
81
79
|
return true;
|
|
82
80
|
}
|
|
83
|
-
return
|
|
81
|
+
return validateJSON(value);
|
|
84
82
|
}
|
|
85
83
|
/**
|
|
86
84
|
* Gets the prompts for adding a component usage.
|
|
@@ -89,86 +87,86 @@ function validatePromptJSON(value) {
|
|
|
89
87
|
* @param {UI5FlexLayer} layer - The layer of the project.
|
|
90
88
|
* @returns {YUIQuestion<AddComponentUsageAnswers>[]} The questions/prompts.
|
|
91
89
|
*/
|
|
92
|
-
function getPrompts(basePath, layer) {
|
|
93
|
-
const componentUsageChangeFiles =
|
|
94
|
-
const libraryChangeFiles =
|
|
95
|
-
const isCustomerBase = layer ===
|
|
90
|
+
export function getPrompts(basePath, layer) {
|
|
91
|
+
const componentUsageChangeFiles = getChangesByType(basePath, ChangeType.ADD_COMPONENT_USAGES, 'manifest');
|
|
92
|
+
const libraryChangeFiles = getChangesByType(basePath, ChangeType.ADD_LIBRARY_REFERENCE, 'manifest');
|
|
93
|
+
const isCustomerBase = layer === FlexLayer.CUSTOMER_BASE;
|
|
96
94
|
const isLazyDropDownOptions = [
|
|
97
|
-
{ name:
|
|
98
|
-
{ name:
|
|
95
|
+
{ name: t('choices.true'), value: 'true' },
|
|
96
|
+
{ name: t('choices.false'), value: 'false' }
|
|
99
97
|
];
|
|
100
98
|
return [
|
|
101
99
|
{
|
|
102
100
|
type: 'input',
|
|
103
101
|
name: 'usageId',
|
|
104
|
-
message:
|
|
102
|
+
message: t('prompts.component.usageIdLabel'),
|
|
105
103
|
validate: (value) => validatePromptId(value, componentUsageChangeFiles, isCustomerBase),
|
|
106
|
-
default: isCustomerBase ?
|
|
104
|
+
default: isCustomerBase ? NamespacePrefix.CUSTOMER : NamespacePrefix.EMPTY,
|
|
107
105
|
store: false,
|
|
108
106
|
guiOptions: {
|
|
109
107
|
mandatory: true,
|
|
110
|
-
hint:
|
|
108
|
+
hint: t('prompts.component.usageIdTooltip')
|
|
111
109
|
}
|
|
112
110
|
},
|
|
113
111
|
{
|
|
114
112
|
type: 'input',
|
|
115
113
|
name: 'name',
|
|
116
|
-
message:
|
|
114
|
+
message: t('prompts.component.nameLabel'),
|
|
117
115
|
validate: validatePromptInput,
|
|
118
116
|
store: false,
|
|
119
117
|
guiOptions: {
|
|
120
118
|
mandatory: true,
|
|
121
|
-
hint:
|
|
119
|
+
hint: t('prompts.component.nameTooltip')
|
|
122
120
|
}
|
|
123
121
|
},
|
|
124
122
|
{
|
|
125
123
|
type: 'list',
|
|
126
124
|
name: 'isLazy',
|
|
127
|
-
message:
|
|
125
|
+
message: t('prompts.component.isLazyLabel'),
|
|
128
126
|
choices: isLazyDropDownOptions,
|
|
129
127
|
default: isLazyDropDownOptions[1].value,
|
|
130
128
|
store: false,
|
|
131
129
|
guiOptions: {
|
|
132
130
|
mandatory: true,
|
|
133
|
-
hint:
|
|
131
|
+
hint: t('prompts.component.isLazyTooltip')
|
|
134
132
|
}
|
|
135
133
|
},
|
|
136
134
|
{
|
|
137
135
|
type: 'editor',
|
|
138
136
|
name: 'settings',
|
|
139
|
-
message:
|
|
137
|
+
message: t('prompts.component.settingsLabel'),
|
|
140
138
|
validate: validatePromptJSON,
|
|
141
139
|
store: false,
|
|
142
140
|
guiOptions: {
|
|
143
|
-
hint:
|
|
141
|
+
hint: t('prompts.component.tooltip', { input: t('prompts.component.settingsLabel') })
|
|
144
142
|
}
|
|
145
143
|
},
|
|
146
144
|
{
|
|
147
145
|
type: 'editor',
|
|
148
146
|
name: `data`,
|
|
149
|
-
message:
|
|
147
|
+
message: t('prompts.component.dataLabel'),
|
|
150
148
|
validate: validatePromptJSON,
|
|
151
149
|
store: false,
|
|
152
150
|
guiOptions: {
|
|
153
|
-
hint:
|
|
151
|
+
hint: t('prompts.component.tooltip', { input: t('prompts.component.dataLabel') })
|
|
154
152
|
}
|
|
155
153
|
},
|
|
156
154
|
{
|
|
157
155
|
type: 'confirm',
|
|
158
156
|
name: 'shouldAddLibrary',
|
|
159
|
-
message:
|
|
157
|
+
message: t('prompts.component.shouldAddLibraryLabel'),
|
|
160
158
|
default: false,
|
|
161
159
|
guiOptions: {
|
|
162
|
-
hint:
|
|
160
|
+
hint: t('prompts.component.shouldAddLibraryTooltip')
|
|
163
161
|
}
|
|
164
162
|
},
|
|
165
163
|
{
|
|
166
164
|
type: 'input',
|
|
167
165
|
name: 'library',
|
|
168
|
-
message:
|
|
166
|
+
message: t('prompts.component.libraryLabel'),
|
|
169
167
|
guiOptions: {
|
|
170
168
|
mandatory: true,
|
|
171
|
-
hint:
|
|
169
|
+
hint: t('prompts.component.libraryTooltip')
|
|
172
170
|
},
|
|
173
171
|
validate: (value) => validatePromptLibrary(value, libraryChangeFiles),
|
|
174
172
|
store: false,
|
|
@@ -177,13 +175,13 @@ function getPrompts(basePath, layer) {
|
|
|
177
175
|
{
|
|
178
176
|
type: 'list',
|
|
179
177
|
name: 'libraryIsLazy',
|
|
180
|
-
message:
|
|
178
|
+
message: t('prompts.component.libraryIsLazyLabel'),
|
|
181
179
|
choices: isLazyDropDownOptions,
|
|
182
180
|
default: isLazyDropDownOptions[1].value,
|
|
183
181
|
store: false,
|
|
184
182
|
guiOptions: {
|
|
185
183
|
mandatory: true,
|
|
186
|
-
hint:
|
|
184
|
+
hint: t('prompts.component.libraryIsLazyTooltip')
|
|
187
185
|
},
|
|
188
186
|
when: (answers) => answers.shouldAddLibrary
|
|
189
187
|
}
|
|
@@ -2,7 +2,7 @@ import type { YUIQuestion } from '@sap-ux/inquirer-common';
|
|
|
2
2
|
import type { UI5FlexLayer } from '@sap-ux/project-access';
|
|
3
3
|
import { type AppWizard } from '@sap-devx/yeoman-ui-types';
|
|
4
4
|
import type { ToolsLogger } from '@sap-ux/logger';
|
|
5
|
-
import { ServiceType, type DescriptorVariant, type NewModelAnswers, type NewModelData } from '../../types';
|
|
5
|
+
import { ServiceType, type DescriptorVariant, type NewModelAnswers, type NewModelData } from '../../types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Returns the OData version string for use in change content based on the selected service type.
|
|
8
8
|
* Returns undefined for HTTP service type as it has no OData version.
|