@sap-ux/adp-tooling 0.19.11 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/abap/client.d.ts +1 -1
  2. package/dist/abap/client.js +8 -13
  3. package/dist/abap/config.js +5 -8
  4. package/dist/abap/index.d.ts +3 -3
  5. package/dist/abap/index.js +3 -19
  6. package/dist/abap/provider.js +5 -8
  7. package/dist/base/abap/manifest-service.d.ts +1 -1
  8. package/dist/base/abap/manifest-service.js +9 -18
  9. package/dist/base/cf.js +8 -11
  10. package/dist/base/change-utils.d.ts +1 -1
  11. package/dist/base/change-utils.js +49 -62
  12. package/dist/base/constants/index.js +12 -15
  13. package/dist/base/credentials.d.ts +2 -2
  14. package/dist/base/credentials.js +6 -9
  15. package/dist/base/helper.d.ts +1 -1
  16. package/dist/base/helper.js +40 -57
  17. package/dist/base/project-builder.js +3 -6
  18. package/dist/base/prompt.d.ts +1 -1
  19. package/dist/base/prompt.js +19 -25
  20. package/dist/btp/api.d.ts +1 -1
  21. package/dist/btp/api.js +10 -18
  22. package/dist/btp/index.d.ts +1 -1
  23. package/dist/btp/index.js +1 -17
  24. package/dist/cf/app/discovery.d.ts +1 -1
  25. package/dist/cf/app/discovery.js +11 -18
  26. package/dist/cf/app/html5-repo.d.ts +1 -1
  27. package/dist/cf/app/html5-repo.js +24 -32
  28. package/dist/cf/app/index.d.ts +2 -2
  29. package/dist/cf/app/index.js +2 -18
  30. package/dist/cf/core/auth.d.ts +1 -1
  31. package/dist/cf/core/auth.js +4 -8
  32. package/dist/cf/core/config.d.ts +1 -1
  33. package/dist/cf/core/config.js +9 -15
  34. package/dist/cf/core/index.d.ts +2 -2
  35. package/dist/cf/core/index.js +2 -18
  36. package/dist/cf/deploy.d.ts +1 -1
  37. package/dist/cf/deploy.js +33 -44
  38. package/dist/cf/index.d.ts +6 -6
  39. package/dist/cf/index.js +6 -22
  40. package/dist/cf/project/index.d.ts +3 -3
  41. package/dist/cf/project/index.js +3 -19
  42. package/dist/cf/project/mta.d.ts +1 -1
  43. package/dist/cf/project/mta.js +23 -66
  44. package/dist/cf/project/yaml-loader.d.ts +1 -1
  45. package/dist/cf/project/yaml-loader.js +8 -16
  46. package/dist/cf/project/yaml.d.ts +2 -2
  47. package/dist/cf/project/yaml.js +28 -72
  48. package/dist/cf/services/api.d.ts +1 -1
  49. package/dist/cf/services/api.js +46 -93
  50. package/dist/cf/services/cli.d.ts +1 -1
  51. package/dist/cf/services/cli.js +31 -42
  52. package/dist/cf/services/destinations.js +12 -48
  53. package/dist/cf/services/index.d.ts +5 -5
  54. package/dist/cf/services/index.js +5 -21
  55. package/dist/cf/services/manifest.d.ts +1 -1
  56. package/dist/cf/services/manifest.js +9 -13
  57. package/dist/cf/services/ssh.js +14 -22
  58. package/dist/cf/utils/index.d.ts +1 -1
  59. package/dist/cf/utils/index.js +1 -17
  60. package/dist/cf/utils/validation.d.ts +1 -1
  61. package/dist/cf/utils/validation.js +12 -18
  62. package/dist/common/flp-parameters.d.ts +1 -1
  63. package/dist/common/flp-parameters.js +1 -4
  64. package/dist/common/index.d.ts +1 -1
  65. package/dist/common/index.js +1 -17
  66. package/dist/i18n.js +8 -16
  67. package/dist/index.d.ts +23 -23
  68. package/dist/index.js +23 -46
  69. package/dist/preview/adp-preview.d.ts +1 -1
  70. package/dist/preview/adp-preview.js +41 -39
  71. package/dist/preview/change-handler.d.ts +1 -1
  72. package/dist/preview/change-handler.js +51 -59
  73. package/dist/preview/descriptor-change-handler.d.ts +1 -1
  74. package/dist/preview/descriptor-change-handler.js +18 -21
  75. package/dist/preview/ovp-routes-handler.js +11 -13
  76. package/dist/preview/routes-handler.js +36 -71
  77. package/dist/preview/utils.d.ts +1 -1
  78. package/dist/preview/utils.js +5 -8
  79. package/dist/prompts/add-annotations-to-odata/index.d.ts +1 -1
  80. package/dist/prompts/add-annotations-to-odata/index.js +24 -26
  81. package/dist/prompts/add-component-usages/index.d.ts +1 -1
  82. package/dist/prompts/add-component-usages/index.js +41 -43
  83. package/dist/prompts/add-new-model/index.d.ts +1 -1
  84. package/dist/prompts/add-new-model/index.js +75 -80
  85. package/dist/prompts/change-data-source/index.d.ts +1 -1
  86. package/dist/prompts/change-data-source/index.js +19 -22
  87. package/dist/prompts/change-inbound/index.d.ts +1 -1
  88. package/dist/prompts/change-inbound/index.js +11 -14
  89. package/dist/prompts/index.d.ts +5 -5
  90. package/dist/prompts/index.js +5 -15
  91. package/dist/source/applications.d.ts +2 -2
  92. package/dist/source/applications.js +7 -11
  93. package/dist/source/index.d.ts +3 -3
  94. package/dist/source/index.js +3 -19
  95. package/dist/source/manifest.d.ts +1 -1
  96. package/dist/source/manifest.js +15 -25
  97. package/dist/source/systems.d.ts +1 -1
  98. package/dist/source/systems.js +20 -27
  99. package/dist/types.d.ts +1 -1
  100. package/dist/types.js +64 -17
  101. package/dist/ui5/fetch.d.ts +1 -1
  102. package/dist/ui5/fetch.js +8 -12
  103. package/dist/ui5/format.d.ts +1 -1
  104. package/dist/ui5/format.js +17 -29
  105. package/dist/ui5/index.d.ts +4 -4
  106. package/dist/ui5/index.js +4 -20
  107. package/dist/ui5/network.d.ts +1 -1
  108. package/dist/ui5/network.js +1 -4
  109. package/dist/ui5/validator.js +14 -20
  110. package/dist/ui5/version-info.d.ts +1 -1
  111. package/dist/ui5/version-info.js +25 -36
  112. package/dist/writer/cf.d.ts +1 -1
  113. package/dist/writer/cf.js +35 -43
  114. package/dist/writer/changes/writer-factory.d.ts +2 -2
  115. package/dist/writer/changes/writer-factory.js +10 -13
  116. package/dist/writer/changes/writers/annotations-writer.d.ts +1 -1
  117. package/dist/writer/changes/writers/annotations-writer.js +11 -46
  118. package/dist/writer/changes/writers/component-usages-writer.d.ts +1 -1
  119. package/dist/writer/changes/writers/component-usages-writer.js +9 -12
  120. package/dist/writer/changes/writers/data-source-writer.d.ts +1 -1
  121. package/dist/writer/changes/writers/data-source-writer.js +7 -10
  122. package/dist/writer/changes/writers/inbound-writer.d.ts +1 -1
  123. package/dist/writer/changes/writers/inbound-writer.js +10 -13
  124. package/dist/writer/changes/writers/index.d.ts +5 -5
  125. package/dist/writer/changes/writers/index.js +5 -21
  126. package/dist/writer/changes/writers/new-model-writer.d.ts +1 -1
  127. package/dist/writer/changes/writers/new-model-writer.js +16 -20
  128. package/dist/writer/editors.d.ts +1 -1
  129. package/dist/writer/editors.js +6 -9
  130. package/dist/writer/i18n/index.d.ts +1 -1
  131. package/dist/writer/i18n/index.js +13 -17
  132. package/dist/writer/i18n/key-user-translations.js +9 -14
  133. package/dist/writer/inbound-navigation.d.ts +1 -1
  134. package/dist/writer/inbound-navigation.js +18 -27
  135. package/dist/writer/index.d.ts +1 -1
  136. package/dist/writer/index.js +36 -37
  137. package/dist/writer/manifest/descriptor-content.d.ts +2 -2
  138. package/dist/writer/manifest/descriptor-content.js +9 -15
  139. package/dist/writer/manifest/index.d.ts +1 -1
  140. package/dist/writer/manifest/index.js +1 -17
  141. package/dist/writer/options.d.ts +1 -1
  142. package/dist/writer/options.js +16 -27
  143. package/dist/writer/project-utils.d.ts +1 -1
  144. package/dist/writer/project-utils.js +49 -57
  145. package/dist/writer/writer-config.d.ts +2 -2
  146. package/dist/writer/writer-config.js +25 -30
  147. package/package.json +19 -17
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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}.${project_access_1.DirName.Changes}.${project_access_1.DirName.Fragments}.`);
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 (0, node_path_1.join)(project_access_1.DirName.Changes, project_access_1.DirName.Fragments, fileName);
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPrompts = getPrompts;
4
- const i18n_1 = require("../../i18n");
5
- const project_access_1 = require("@sap-ux/project-access");
6
- const node_fs_1 = require("node:fs");
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((0, project_access_1.filterDataSourcesByType)(dataSources, 'OData'));
14
+ export function getPrompts(basePath, dataSources) {
15
+ const dataSourceIds = Object.keys(filterDataSourcesByType(dataSources, 'OData'));
18
16
  const annotationFileSelectOptions = [
19
- { name: (0, i18n_1.t)('choices.annotationFile.selectFromWorkspace'), value: 1 /* AnnotationFileSelectType.ExistingFile */ },
20
- { name: (0, i18n_1.t)('choices.annotationFile.createTemplateFile'), value: 2 /* AnnotationFileSelectType.NewEmptyFile */ }
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: (0, i18n_1.t)('prompts.oDataSourceLabel'),
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: (0, i18n_1.t)('prompts.addAnnotationOdataSourceTooltip')
30
+ hint: t('prompts.addAnnotationOdataSourceTooltip')
33
31
  }
34
32
  },
35
33
  {
36
34
  type: 'list',
37
35
  name: 'fileSelectOption',
38
- message: (0, i18n_1.t)('prompts.fileSelectOptionLabel'),
36
+ message: t('prompts.fileSelectOptionLabel'),
39
37
  choices: annotationFileSelectOptions,
40
38
  default: 0,
41
39
  guiOptions: {
42
40
  mandatory: true,
43
- hint: (0, i18n_1.t)('prompts.fileSelectOptionTooltip')
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: (0, i18n_1.t)('prompts.filePathLabel'),
48
+ message: t('prompts.filePathLabel'),
51
49
  guiType: 'file-browser',
52
50
  guiOptions: {
53
51
  mandatory: true,
54
- hint: (0, i18n_1.t)('prompts.filePathTooltip')
52
+ hint: t('prompts.filePathTooltip')
55
53
  },
56
54
  default: '',
57
- when: (answers) => answers.id !== '' && answers.fileSelectOption === 1 /* AnnotationFileSelectType.ExistingFile */,
55
+ when: (answers) => answers.id !== '' && answers.fileSelectOption === AnnotationFileSelectType.ExistingFile,
58
56
  validate: async (value) => {
59
- const validationResult = (0, project_input_validator_1.validateEmptyString)(value);
57
+ const validationResult = validateEmptyString(value);
60
58
  if (typeof validationResult === 'string') {
61
59
  return validationResult;
62
60
  }
63
- const filePath = (0, node_path_1.isAbsolute)(value) ? value : (0, node_path_1.join)(basePath, value);
64
- if (!(0, node_fs_1.existsSync)(filePath)) {
65
- return (0, i18n_1.t)('validators.fileDoesNotExist');
61
+ const filePath = isAbsolute(value) ? value : join(basePath, value);
62
+ if (!existsSync(filePath)) {
63
+ return t('validators.fileDoesNotExist');
66
64
  }
67
- const annotationFilePath = (0, node_path_1.join)(await (0, project_access_1.getWebappPath)(basePath), project_access_1.DirName.Changes, project_access_1.DirName.Annotations, (0, node_path_1.basename)(filePath));
68
- if ((0, node_fs_1.existsSync)(annotationFilePath)) {
69
- return (0, i18n_1.t)('validators.annotationFileAlreadyExists');
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPrompts = getPrompts;
4
- const change_utils_1 = require("../../base/change-utils");
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 = [project_input_validator_1.validateEmptyString, project_input_validator_1.validateEmptySpaces, project_input_validator_1.validateSpecialChars];
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 (!(0, project_input_validator_1.hasCustomerPrefix)(value)) {
38
- return (0, i18n_1.t)('validators.errorInputInvalidValuePrefix', {
39
- value: (0, i18n_1.t)('prompts.component.usageIdLabel'),
40
- prefix: "customer." /* NamespacePrefix.CUSTOMER */
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 (0, i18n_1.t)('validators.errorCustomerEmptyValue', {
45
- value: (0, i18n_1.t)('prompts.component.usageIdLabel'),
46
- prefix: "customer." /* NamespacePrefix.CUSTOMER */
42
+ return t('validators.errorCustomerEmptyValue', {
43
+ value: t('prompts.component.usageIdLabel'),
44
+ prefix: NamespacePrefix.CUSTOMER
47
45
  });
48
46
  }
49
47
  }
50
- if ((0, project_input_validator_1.hasContentDuplication)(value, 'componentUsages', changeFiles)) {
51
- return (0, i18n_1.t)('validators.errorDuplicateValueComponentId');
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 ((0, project_input_validator_1.hasContentDuplication)(value, 'libraries', changeFiles)) {
68
- return (0, i18n_1.t)('validators.errorDuplicateValueLibrary');
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 = (0, project_input_validator_1.validateEmptyString)(value);
77
+ const validationResult = validateEmptyString(value);
80
78
  if (typeof validationResult === 'string') {
81
79
  return true;
82
80
  }
83
- return (0, project_input_validator_1.validateJSON)(value);
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 = (0, change_utils_1.getChangesByType)(basePath, "appdescr_ui5_addComponentUsages" /* ChangeType.ADD_COMPONENT_USAGES */, 'manifest');
94
- const libraryChangeFiles = (0, change_utils_1.getChangesByType)(basePath, "appdescr_ui5_addLibraries" /* ChangeType.ADD_LIBRARY_REFERENCE */, 'manifest');
95
- const isCustomerBase = layer === "CUSTOMER_BASE" /* FlexLayer.CUSTOMER_BASE */;
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: (0, i18n_1.t)('choices.true'), value: 'true' },
98
- { name: (0, i18n_1.t)('choices.false'), value: 'false' }
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: (0, i18n_1.t)('prompts.component.usageIdLabel'),
102
+ message: t('prompts.component.usageIdLabel'),
105
103
  validate: (value) => validatePromptId(value, componentUsageChangeFiles, isCustomerBase),
106
- default: isCustomerBase ? "customer." /* NamespacePrefix.CUSTOMER */ : "" /* NamespacePrefix.EMPTY */,
104
+ default: isCustomerBase ? NamespacePrefix.CUSTOMER : NamespacePrefix.EMPTY,
107
105
  store: false,
108
106
  guiOptions: {
109
107
  mandatory: true,
110
- hint: (0, i18n_1.t)('prompts.component.usageIdTooltip')
108
+ hint: t('prompts.component.usageIdTooltip')
111
109
  }
112
110
  },
113
111
  {
114
112
  type: 'input',
115
113
  name: 'name',
116
- message: (0, i18n_1.t)('prompts.component.nameLabel'),
114
+ message: t('prompts.component.nameLabel'),
117
115
  validate: validatePromptInput,
118
116
  store: false,
119
117
  guiOptions: {
120
118
  mandatory: true,
121
- hint: (0, i18n_1.t)('prompts.component.nameTooltip')
119
+ hint: t('prompts.component.nameTooltip')
122
120
  }
123
121
  },
124
122
  {
125
123
  type: 'list',
126
124
  name: 'isLazy',
127
- message: (0, i18n_1.t)('prompts.component.isLazyLabel'),
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: (0, i18n_1.t)('prompts.component.isLazyTooltip')
131
+ hint: t('prompts.component.isLazyTooltip')
134
132
  }
135
133
  },
136
134
  {
137
135
  type: 'editor',
138
136
  name: 'settings',
139
- message: (0, i18n_1.t)('prompts.component.settingsLabel'),
137
+ message: t('prompts.component.settingsLabel'),
140
138
  validate: validatePromptJSON,
141
139
  store: false,
142
140
  guiOptions: {
143
- hint: (0, i18n_1.t)('prompts.component.tooltip', { input: (0, i18n_1.t)('prompts.component.settingsLabel') })
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: (0, i18n_1.t)('prompts.component.dataLabel'),
147
+ message: t('prompts.component.dataLabel'),
150
148
  validate: validatePromptJSON,
151
149
  store: false,
152
150
  guiOptions: {
153
- hint: (0, i18n_1.t)('prompts.component.tooltip', { input: (0, i18n_1.t)('prompts.component.dataLabel') })
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: (0, i18n_1.t)('prompts.component.shouldAddLibraryLabel'),
157
+ message: t('prompts.component.shouldAddLibraryLabel'),
160
158
  default: false,
161
159
  guiOptions: {
162
- hint: (0, i18n_1.t)('prompts.component.shouldAddLibraryTooltip')
160
+ hint: t('prompts.component.shouldAddLibraryTooltip')
163
161
  }
164
162
  },
165
163
  {
166
164
  type: 'input',
167
165
  name: 'library',
168
- message: (0, i18n_1.t)('prompts.component.libraryLabel'),
166
+ message: t('prompts.component.libraryLabel'),
169
167
  guiOptions: {
170
168
  mandatory: true,
171
- hint: (0, i18n_1.t)('prompts.component.libraryTooltip')
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: (0, i18n_1.t)('prompts.component.libraryIsLazyLabel'),
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: (0, i18n_1.t)('prompts.component.libraryIsLazyTooltip')
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.