@sap-ux/adp-tooling 0.16.13 → 0.17.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.
@@ -1,6 +1,7 @@
1
1
  import { type AbapServiceProvider } from '@sap-ux/axios-extension';
2
2
  import type { ManifestNamespace } from '@sap-ux/project-access';
3
3
  import type { FlexUISupportedSystem } from '../types';
4
+ import type { ToolsLogger } from '@sap-ux/logger';
4
5
  /**
5
6
  * Fetches system supports Flex UI features.
6
7
  *
@@ -10,12 +11,14 @@ import type { FlexUISupportedSystem } from '../types';
10
11
  */
11
12
  export declare function getFlexUISupportedSystem(provider: AbapServiceProvider, isCustomerBase: boolean): Promise<FlexUISupportedSystem>;
12
13
  /**
13
- * Fetches system UI5 Version from UI5RtVersionService.
14
+ * Fetches system UI5 Version from the UI5VersionService, if the request throws
15
+ * fallback to the legacy api introduced in the UI5RtVersionService.
14
16
  *
15
17
  * @param {AbapServiceProvider} provider - Instance of the ABAP provider.
18
+ * @param {ToolsLogger} logger - The logger instance.
16
19
  * @returns {string | undefined} System UI5 version.
17
20
  */
18
- export declare function getSystemUI5Version(provider: AbapServiceProvider): Promise<string | undefined>;
21
+ export declare function getSystemUI5Version(provider: AbapServiceProvider, logger: ToolsLogger): Promise<string | undefined>;
19
22
  /**
20
23
  * Retrieves the list of tile inbounds of the application.
21
24
  *
@@ -33,14 +33,23 @@ async function getFlexUISupportedSystem(provider, isCustomerBase) {
33
33
  return { isOnPremise, isUIFlex };
34
34
  }
35
35
  /**
36
- * Fetches system UI5 Version from UI5RtVersionService.
36
+ * Fetches system UI5 Version from the UI5VersionService, if the request throws
37
+ * fallback to the legacy api introduced in the UI5RtVersionService.
37
38
  *
38
39
  * @param {AbapServiceProvider} provider - Instance of the ABAP provider.
40
+ * @param {ToolsLogger} logger - The logger instance.
39
41
  * @returns {string | undefined} System UI5 version.
40
42
  */
41
- async function getSystemUI5Version(provider) {
42
- const service = await provider.getAdtService(axios_extension_1.UI5RtVersionService);
43
- return service?.getUI5Version();
43
+ async function getSystemUI5Version(provider, logger) {
44
+ try {
45
+ const ui5VersionService = provider.getUI5VersionService();
46
+ return await ui5VersionService.getUI5Version();
47
+ }
48
+ catch (error) {
49
+ logger.debug(`Could not fetch the system UI5 version: ${error.message}. Try to fetch the UI5 version with the adt api.`);
50
+ const ui5RtVersionService = await provider.getAdtService(axios_extension_1.UI5RtVersionService);
51
+ return ui5RtVersionService?.getUI5Version();
52
+ }
44
53
  }
45
54
  /**
46
55
  * Retrieves the list of tile inbounds of the application.
@@ -27,7 +27,7 @@ export declare function getFDCRequestArguments(cfConfig: CfConfig): RequestArgum
27
27
  * @param {string[]} appHostIds - The app host ids.
28
28
  * @param {CfConfig} cfConfig - The CF config.
29
29
  * @param {ToolsLogger} logger - The logger.
30
- * @returns {Promise<FDCResponse>} The FDC apps.
30
+ * @returns {Promise<CFApp[]>} The FDC apps.
31
31
  */
32
32
  export declare function getFDCApps(appHostIds: string[], cfConfig: CfConfig, logger: ToolsLogger): Promise<CFApp[]>;
33
33
  /**
@@ -119,7 +119,7 @@ function getFDCRequestArguments(cfConfig) {
119
119
  * @param {string[]} appHostIds - The app host ids.
120
120
  * @param {CfConfig} cfConfig - The CF config.
121
121
  * @param {ToolsLogger} logger - The logger.
122
- * @returns {Promise<FDCResponse>} The FDC apps.
122
+ * @returns {Promise<CFApp[]>} The FDC apps.
123
123
  */
124
124
  async function getFDCApps(appHostIds, cfConfig, logger) {
125
125
  const requestArguments = getFDCRequestArguments(cfConfig);
@@ -71,12 +71,11 @@
71
71
  "appDoesNotSupportManifest": "The selected application is not supported by SAPUI5 Adaptation Project because it does not have a `manifest.json` file. Please select a different application.",
72
72
  "ui5VersionNotReachableError": "The URL of the SAPUI5 version you have selected is not reachable. The <URL> URL must be made accessible through the cloud connector and the destination configuration so it can be consumed within the SAPUI5 adaptation project and its SAPUI5 Adaptation Editor.",
73
73
  "ui5VersionOutdatedError": "The SAPUI5 version you have selected is not compatible with the SAPUI5 Adaptation Editor. Please select a different version.",
74
- "ui5VersionDoesNotExistGeneric": "An error occurred when validating the SAPUI5 version: {{error}}. Please select a different version.",
75
- "ui5VersionNotDetectedError": "The SAPUI5 version of the selected system cannot be determined. You will be able to create and edit adaptation projects using the newest version but it will not be usable on this system until the system`s SAPUI5 version is upgraded to version 1.71 or higher."
74
+ "ui5VersionDoesNotExistGeneric": "An error occurred when validating the SAPUI5 version: {{error}}. Please select a different version."
76
75
  },
77
76
  "error": {
78
77
  "appDoesNotSupportFlexibility": "The selected application does not support flexibility because it has `flexEnabled=false`. SAPUI5 Adaptation Project only supports applications that support flexibility. Please select a different application.",
79
- "failedToParseXsAppJson": "Failed to parse `xs-app.json`. Error: {{error}}",
78
+ "failedToParseXsAppJson": "Failed to parse the `xs-app.json` file. Error: {{error}}",
80
79
  "failedToParseManifestJson": "Failed to parse the `manifest.json` file. Error: {{error}}",
81
80
  "oDataEndpointsValidationFailed": "Validation for the OData endpoints has failed. For more information, check the logs.",
82
81
  "adpDoesNotSupportSelectedApp": "Adaptation project doesn't support the selected application. Please select a different application.",
@@ -47,6 +47,21 @@ export declare function removeMicroPart(version: string): string;
47
47
  * @returns {string} The version string without the timestamp, including only the major, minor, and micro version numbers.
48
48
  */
49
49
  export declare function removeTimestampFromVersion(version: string): string;
50
+ /**
51
+ * Removes the '-snapshot' suffix from a version string's patch number.
52
+ * Converts version strings like '1.96.0-snapshot' to '1.96.0' by cleaning
53
+ * the patch part of any snapshot designation.
54
+ *
55
+ * @param {string} version - The version string that may include '-snapshot' in the patch number.
56
+ * @returns {string} The version string with the snapshot suffix removed from the patch number.
57
+ * @example
58
+ * ```typescript
59
+ * removeSnapshotFromVersion('1.96.0-snapshot'); // Returns '1.96.0'
60
+ * removeSnapshotFromVersion('1.87.3-SNAPSHOT'); // Returns '1.87.3' (case-insensitive)
61
+ * removeSnapshotFromVersion('1.120.1'); // Returns '1.120.1' (no change)
62
+ * ```
63
+ */
64
+ export declare function removeSnapshotFromVersion(version: string): string;
50
65
  /**
51
66
  * Conditionally appends a '-snapshot' suffix to a version string if certain criteria are met.
52
67
  * The suffix is added only if the version string includes an unreleased snapshot version.
@@ -6,6 +6,7 @@ exports.buildSystemVersionLabel = buildSystemVersionLabel;
6
6
  exports.removeBracketsFromVersion = removeBracketsFromVersion;
7
7
  exports.removeMicroPart = removeMicroPart;
8
8
  exports.removeTimestampFromVersion = removeTimestampFromVersion;
9
+ exports.removeSnapshotFromVersion = removeSnapshotFromVersion;
9
10
  exports.addSnapshot = addSnapshot;
10
11
  exports.parseUI5Version = parseUI5Version;
11
12
  exports.isFeatureSupportedVersion = isFeatureSupportedVersion;
@@ -82,6 +83,25 @@ function removeTimestampFromVersion(version) {
82
83
  const versionParts = version.split('.');
83
84
  return `${versionParts[0]}.${versionParts[1]}.${versionParts[2]}`;
84
85
  }
86
+ /**
87
+ * Removes the '-snapshot' suffix from a version string's patch number.
88
+ * Converts version strings like '1.96.0-snapshot' to '1.96.0' by cleaning
89
+ * the patch part of any snapshot designation.
90
+ *
91
+ * @param {string} version - The version string that may include '-snapshot' in the patch number.
92
+ * @returns {string} The version string with the snapshot suffix removed from the patch number.
93
+ * @example
94
+ * ```typescript
95
+ * removeSnapshotFromVersion('1.96.0-snapshot'); // Returns '1.96.0'
96
+ * removeSnapshotFromVersion('1.87.3-SNAPSHOT'); // Returns '1.87.3' (case-insensitive)
97
+ * removeSnapshotFromVersion('1.120.1'); // Returns '1.120.1' (no change)
98
+ * ```
99
+ */
100
+ function removeSnapshotFromVersion(version) {
101
+ const versionParts = version.split('.');
102
+ const patchNumber = versionParts[2].toLowerCase().replace('-snapshot', '');
103
+ return `${versionParts[0]}.${versionParts[1]}.${patchNumber}`;
104
+ }
85
105
  /**
86
106
  * Conditionally appends a '-snapshot' suffix to a version string if certain criteria are met.
87
107
  * The suffix is added only if the version string includes an unreleased snapshot version.
@@ -96,7 +96,12 @@ function getVersionLabels(version, publicVersions) {
96
96
  */
97
97
  function checkSystemVersionPattern(version) {
98
98
  const pattern = /^[1-9]\.\d{1,3}\.\d{1,2}\.*/;
99
- return version && pattern.test(version) ? (0, format_1.removeTimestampFromVersion)(version) : undefined;
99
+ if (!version || !pattern.test(version)) {
100
+ return undefined;
101
+ }
102
+ let normalizedVersion = (0, format_1.removeTimestampFromVersion)(version);
103
+ normalizedVersion = (0, format_1.removeSnapshotFromVersion)(normalizedVersion);
104
+ return normalizedVersion;
100
105
  }
101
106
  /**
102
107
  * Retrieves and filters internal UI5 versions.
package/dist/writer/cf.js CHANGED
@@ -36,6 +36,8 @@ async function generateCf(basePath, config, logger, fs) {
36
36
  const variant = (0, project_utils_1.getCfVariant)(fullConfig);
37
37
  (0, manifest_1.fillDescriptorContent)(variant.content, app.appType, ui5.version, app.i18nModels);
38
38
  await (0, project_utils_1.writeCfTemplates)(basePath, variant, fullConfig, fs);
39
+ await (0, project_utils_1.writeCfUI5Yaml)(fullConfig.project.folder, fullConfig, fs);
40
+ await (0, project_utils_1.writeCfUI5BuildYaml)(fullConfig.project.folder, fullConfig, fs);
39
41
  return fs;
40
42
  }
41
43
  /**
@@ -1,5 +1,5 @@
1
1
  import type { UI5Config } from '@sap-ux/ui5-config';
2
- import type { AdpWriterConfig, Content, CloudApp, InternalInboundNavigation } from '../types';
2
+ import type { AdpWriterConfig, Content, CloudApp, InternalInboundNavigation, CfAdpWriterConfig } from '../types';
3
3
  /**
4
4
  * Generate the configuration for the middlewares required for the ui5.yaml.
5
5
  *
@@ -61,5 +61,18 @@ export declare function enhanceUI5DeployYaml(ui5Config: UI5Config, config: AdpWr
61
61
  * @param manifestChangeContent Application variant change content
62
62
  */
63
63
  export declare function enhanceManifestChangeContentWithFlpConfig(flpConfiguration: InternalInboundNavigation, appId: string, manifestChangeContent?: Content[]): void;
64
+ /**
65
+ * Generate custom configuration required for the ui5.yaml.
66
+ *
67
+ * @param {UI5Config} ui5Config - Configuration representing the ui5.yaml.
68
+ * @param {CfAdpWriterConfig} config - Full project configuration.
69
+ */
70
+ export declare function enhanceUI5YamlWithCfCustomTask(ui5Config: UI5Config, config: CfAdpWriterConfig): void;
71
+ /**
72
+ * Generate custom configuration required for the ui5.yaml.
73
+ *
74
+ * @param {UI5Config} ui5Config - Configuration representing the ui5.yaml.
75
+ */
76
+ export declare function enhanceUI5YamlWithCfCustomMiddleware(ui5Config: UI5Config): void;
64
77
  export {};
65
78
  //# sourceMappingURL=options.d.ts.map
@@ -7,6 +7,9 @@ exports.enhanceUI5YamlWithTranspileMiddleware = enhanceUI5YamlWithTranspileMiddl
7
7
  exports.hasDeployConfig = hasDeployConfig;
8
8
  exports.enhanceUI5DeployYaml = enhanceUI5DeployYaml;
9
9
  exports.enhanceManifestChangeContentWithFlpConfig = enhanceManifestChangeContentWithFlpConfig;
10
+ exports.enhanceUI5YamlWithCfCustomTask = enhanceUI5YamlWithCfCustomTask;
11
+ exports.enhanceUI5YamlWithCfCustomMiddleware = enhanceUI5YamlWithCfCustomMiddleware;
12
+ const constants_1 = require("../base/constants");
10
13
  const VSCODE_URL = 'https://REQUIRED_FOR_VSCODE.example';
11
14
  /**
12
15
  * Generate the configuration for the middlewares required for the ui5.yaml.
@@ -289,4 +292,55 @@ function enhanceManifestChangeContentWithFlpConfig(flpConfiguration, appId, mani
289
292
  manifestChangeContent.push(removeOtherInboundsChange);
290
293
  }
291
294
  }
295
+ /**
296
+ * Generate custom configuration required for the ui5.yaml.
297
+ *
298
+ * @param {UI5Config} ui5Config - Configuration representing the ui5.yaml.
299
+ * @param {CfAdpWriterConfig} config - Full project configuration.
300
+ */
301
+ function enhanceUI5YamlWithCfCustomTask(ui5Config, config) {
302
+ const { baseApp, cf, project } = config;
303
+ ui5Config.addCustomTasks([
304
+ {
305
+ name: 'app-variant-bundler-build',
306
+ beforeTask: 'escapeNonAsciiCharacters',
307
+ configuration: {
308
+ module: project.name,
309
+ appHostId: baseApp.appHostId,
310
+ appName: baseApp.appName,
311
+ appVersion: baseApp.appVersion,
312
+ html5RepoRuntime: cf.html5RepoRuntimeGuid,
313
+ org: cf.org.GUID,
314
+ space: cf.space.GUID,
315
+ sapCloudService: cf.businessSolutionName ?? '',
316
+ serviceInstanceName: cf.businessService
317
+ }
318
+ }
319
+ ]);
320
+ }
321
+ /**
322
+ * Generate custom configuration required for the ui5.yaml.
323
+ *
324
+ * @param {UI5Config} ui5Config - Configuration representing the ui5.yaml.
325
+ */
326
+ function enhanceUI5YamlWithCfCustomMiddleware(ui5Config) {
327
+ const ui5ConfigOptions = {
328
+ url: constants_1.UI5_CDN_URL
329
+ };
330
+ ui5Config.addFioriToolsProxyMiddleware({
331
+ ui5: ui5ConfigOptions,
332
+ backend: []
333
+ }, 'compression');
334
+ ui5Config.addCustomMiddleware([
335
+ {
336
+ name: 'fiori-tools-preview',
337
+ afterMiddleware: 'fiori-tools-proxy',
338
+ configuration: {
339
+ flp: {
340
+ theme: 'sap_horizon'
341
+ }
342
+ }
343
+ }
344
+ ]);
345
+ }
292
346
  //# sourceMappingURL=options.js.map
@@ -36,13 +36,6 @@ export declare function getCustomConfig(environment: OperationsType, { name: id,
36
36
  * @returns {DescriptorVariant} The variant for the CF project.
37
37
  */
38
38
  export declare function getCfVariant(config: CfAdpWriterConfig): DescriptorVariant;
39
- /**
40
- * Get the ADP config for the CF project.
41
- *
42
- * @param {CfAdpWriterConfig} config - The CF configuration.
43
- * @returns {Record<string, unknown>} The ADP config for the CF project.
44
- */
45
- export declare function getCfAdpConfig(config: CfAdpWriterConfig): Record<string, unknown>;
46
39
  /**
47
40
  * Writes a given project template files within a specified folder in the project directory.
48
41
  *
@@ -62,6 +55,24 @@ export declare function writeTemplateToFolder(baseTmplPath: string, projectPath:
62
55
  * @returns {void}
63
56
  */
64
57
  export declare function writeUI5Yaml(projectPath: string, data: AdpWriterConfig, fs: Editor): Promise<void>;
58
+ /**
59
+ * Writes a ui5.yaml file for CF project within a specified folder in the project directory.
60
+ *
61
+ * @param {string} projectPath - The root path of the project.
62
+ * @param {CfAdpWriterConfig} data - The data to be populated in the template file.
63
+ * @param {Editor} fs - The `mem-fs-editor` instance used for file operations.
64
+ * @returns {void}
65
+ */
66
+ export declare function writeCfUI5Yaml(projectPath: string, data: CfAdpWriterConfig, fs: Editor): Promise<void>;
67
+ /**
68
+ * Writes a ui5-build.yaml file for CF project within a specified folder in the project directory.
69
+ *
70
+ * @param {string} projectPath - The root path of the project.
71
+ * @param {CfAdpWriterConfig} data - The data to be populated in the template file.
72
+ * @param {Editor} fs - The `mem-fs-editor` instance used for file operations.
73
+ * @returns {void}
74
+ */
75
+ export declare function writeCfUI5BuildYaml(projectPath: string, data: CfAdpWriterConfig, fs: Editor): Promise<void>;
65
76
  /**
66
77
  * Writes a ui5-deploy.yaml file within a specified folder in the project directory.
67
78
  *
@@ -4,15 +4,15 @@ exports.getPackageJSONInfo = getPackageJSONInfo;
4
4
  exports.getTypes = getTypes;
5
5
  exports.getCustomConfig = getCustomConfig;
6
6
  exports.getCfVariant = getCfVariant;
7
- exports.getCfAdpConfig = getCfAdpConfig;
8
7
  exports.writeTemplateToFolder = writeTemplateToFolder;
9
8
  exports.writeUI5Yaml = writeUI5Yaml;
9
+ exports.writeCfUI5Yaml = writeCfUI5Yaml;
10
+ exports.writeCfUI5BuildYaml = writeCfUI5BuildYaml;
10
11
  exports.writeUI5DeployYaml = writeUI5DeployYaml;
11
12
  exports.writeCfTemplates = writeCfTemplates;
12
13
  const node_path_1 = require("node:path");
13
14
  const node_fs_1 = require("node:fs");
14
15
  const uuid_1 = require("uuid");
15
- const types_1 = require("../types");
16
16
  const options_1 = require("./options");
17
17
  const ui5_config_1 = require("@sap-ux/ui5-config");
18
18
  /**
@@ -109,28 +109,6 @@ function getCfVariant(config) {
109
109
  };
110
110
  return variant;
111
111
  }
112
- /**
113
- * Get the ADP config for the CF project.
114
- *
115
- * @param {CfAdpWriterConfig} config - The CF configuration.
116
- * @returns {Record<string, unknown>} The ADP config for the CF project.
117
- */
118
- function getCfAdpConfig(config) {
119
- const { app, project, ui5, cf } = config;
120
- const configJson = {
121
- componentname: app.namespace,
122
- appvariant: project.name,
123
- layer: app.layer,
124
- isOVPApp: app.appType === types_1.ApplicationType.FIORI_ELEMENTS_OVP,
125
- isFioriElement: app.appType === types_1.ApplicationType.FIORI_ELEMENTS,
126
- environment: 'CF',
127
- ui5Version: ui5.version,
128
- cfApiUrl: cf.url,
129
- cfSpace: cf.space.GUID,
130
- cfOrganization: cf.org.GUID
131
- };
132
- return configJson;
133
- }
134
112
  /**
135
113
  * Writes a given project template files within a specified folder in the project directory.
136
114
  *
@@ -185,6 +163,50 @@ async function writeUI5Yaml(projectPath, data, fs) {
185
163
  throw new Error(`Could not write ui5.yaml file. Reason: ${e.message}`);
186
164
  }
187
165
  }
166
+ /**
167
+ * Writes a ui5.yaml file for CF project within a specified folder in the project directory.
168
+ *
169
+ * @param {string} projectPath - The root path of the project.
170
+ * @param {CfAdpWriterConfig} data - The data to be populated in the template file.
171
+ * @param {Editor} fs - The `mem-fs-editor` instance used for file operations.
172
+ * @returns {void}
173
+ */
174
+ async function writeCfUI5Yaml(projectPath, data, fs) {
175
+ try {
176
+ const ui5ConfigPath = (0, node_path_1.join)(projectPath, 'ui5.yaml');
177
+ const baseUi5ConfigContent = fs.read(ui5ConfigPath);
178
+ const ui5Config = await ui5_config_1.UI5Config.newInstance(baseUi5ConfigContent);
179
+ ui5Config.setConfiguration({ propertiesFileSourceEncoding: 'UTF-8', paths: { webapp: 'dist' } });
180
+ /** Middlewares */
181
+ (0, options_1.enhanceUI5YamlWithCfCustomMiddleware)(ui5Config);
182
+ fs.write(ui5ConfigPath, ui5Config.toString());
183
+ }
184
+ catch (e) {
185
+ throw new Error(`Could not write ui5.yaml file. Reason: ${e.message}`);
186
+ }
187
+ }
188
+ /**
189
+ * Writes a ui5-build.yaml file for CF project within a specified folder in the project directory.
190
+ *
191
+ * @param {string} projectPath - The root path of the project.
192
+ * @param {CfAdpWriterConfig} data - The data to be populated in the template file.
193
+ * @param {Editor} fs - The `mem-fs-editor` instance used for file operations.
194
+ * @returns {void}
195
+ */
196
+ async function writeCfUI5BuildYaml(projectPath, data, fs) {
197
+ try {
198
+ const ui5ConfigPath = (0, node_path_1.join)(projectPath, 'ui5-build.yaml');
199
+ const baseUi5ConfigContent = fs.read(ui5ConfigPath);
200
+ const ui5Config = await ui5_config_1.UI5Config.newInstance(baseUi5ConfigContent);
201
+ ui5Config.setConfiguration({ propertiesFileSourceEncoding: 'UTF-8' });
202
+ /** Builder task */
203
+ (0, options_1.enhanceUI5YamlWithCfCustomTask)(ui5Config, data);
204
+ fs.write(ui5ConfigPath, ui5Config.toString());
205
+ }
206
+ catch (e) {
207
+ throw new Error(`Could not write ui5-build.yaml file. Reason: ${e.message}`);
208
+ }
209
+ }
188
210
  /**
189
211
  * Writes a ui5-deploy.yaml file within a specified folder in the project directory.
190
212
  *
@@ -218,23 +240,17 @@ async function writeUI5DeployYaml(projectPath, data, fs) {
218
240
  async function writeCfTemplates(basePath, variant, config, fs) {
219
241
  const baseTmplPath = (0, node_path_1.join)(__dirname, '../../templates');
220
242
  const templatePath = config.options?.templatePathOverwrite ?? baseTmplPath;
221
- const { app, baseApp, cf, project, options } = config;
243
+ const { app, project, options } = config;
222
244
  fs.copyTpl((0, node_path_1.join)(templatePath, 'project/webapp/manifest.appdescr_variant'), (0, node_path_1.join)(project.folder, 'webapp', 'manifest.appdescr_variant'), { app: variant });
223
245
  fs.copyTpl((0, node_path_1.join)(templatePath, 'cf/package.json'), (0, node_path_1.join)(project.folder, 'package.json'), {
224
246
  module: project.name
225
247
  });
226
248
  fs.copyTpl((0, node_path_1.join)(templatePath, 'cf/ui5.yaml'), (0, node_path_1.join)(project.folder, 'ui5.yaml'), {
227
- appHostId: baseApp.appHostId,
228
- appName: baseApp.appName,
229
- appVersion: baseApp.appVersion,
230
- module: project.name,
231
- html5RepoRuntime: cf.html5RepoRuntimeGuid,
232
- org: cf.org.GUID,
233
- space: cf.space.GUID,
234
- sapCloudService: cf.businessSolutionName ?? '',
235
- instanceName: cf.businessService
249
+ module: project.name
250
+ });
251
+ fs.copyTpl((0, node_path_1.join)(templatePath, 'cf/ui5-build.yaml'), (0, node_path_1.join)(project.folder, 'ui5-build.yaml'), {
252
+ module: project.name
236
253
  });
237
- fs.writeJSON((0, node_path_1.join)(project.folder, '.adp/config.json'), getCfAdpConfig(config));
238
254
  fs.copyTpl((0, node_path_1.join)(templatePath, 'cf/i18n/i18n.properties'), (0, node_path_1.join)(project.folder, 'webapp/i18n/i18n.properties'), {
239
255
  module: project.name,
240
256
  moduleTitle: app.title,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
11
11
  },
12
- "version": "0.16.13",
12
+ "version": "0.17.0",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "prompts": "2.4.2",
37
37
  "sanitize-filename": "1.6.3",
38
38
  "uuid": "10.0.0",
39
- "@sap-ux/axios-extension": "1.23.1",
39
+ "@sap-ux/axios-extension": "1.24.0",
40
40
  "@sap-ux/btp-utils": "1.1.4",
41
41
  "@sap-ux/i18n": "0.3.4",
42
42
  "@sap-ux/inquirer-common": "0.8.7",
@@ -46,7 +46,7 @@
46
46
  "@sap-ux/project-access": "1.32.7",
47
47
  "@sap-ux/project-input-validator": "0.6.29",
48
48
  "@sap-ux/store": "1.2.1",
49
- "@sap-ux/system-access": "0.6.22",
49
+ "@sap-ux/system-access": "0.6.23",
50
50
  "@sap-ux/ui5-config": "0.29.8",
51
51
  "@sap-ux/ui5-info": "0.13.0"
52
52
  },
@@ -4,7 +4,9 @@
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "build": "npm run clean && ui5 build --include-task=generateCachebusterInfo && npm run zip",
7
+ "prestart": "npm run build",
8
+ "start": "fiori run --open /test/flp.html#app-preview",
9
+ "build": "npm run clean && ui5 build --config ui5-build.yaml --include-task=generateCachebusterInfo && npm run zip",
8
10
  "zip": "cd dist && npx bestzip ../<%= module %>.zip *",
9
11
  "clean": "npx rimraf <%= module %>.zip dist",
10
12
  "build-ui5": "npm explore @ui5/task-adaptation -- npm run rollup"
@@ -20,11 +22,12 @@
20
22
  ]
21
23
  },
22
24
  "devDependencies": {
23
- "@sap/ui5-builder-webide-extension": "1.0.x",
24
- "@sapui5/ts-types": "^1.85.1",
25
- "@ui5/cli": "^3.0.0",
26
- "@ui5/task-adaptation": "^1.0.x",
27
- "bestzip": "2.1.4",
28
- "rimraf": "3.0.2"
25
+ "@sap/ui5-builder-webide-extension": "^1.1.9",
26
+ "@sapui5/ts-types": "^1.141.2",
27
+ "@sap/ux-ui5-tooling": "1",
28
+ "@ui5/cli": "^4.0.16",
29
+ "@ui5/task-adaptation": "^1.5.3",
30
+ "bestzip": "^2.2.1",
31
+ "rimraf": "^5.0.5"
29
32
  }
30
33
  }
@@ -0,0 +1,5 @@
1
+ ---
2
+ specVersion: "2.2"
3
+ type: application
4
+ metadata:
5
+ name: <%= module %>
@@ -3,17 +3,3 @@ specVersion: "2.2"
3
3
  type: application
4
4
  metadata:
5
5
  name: <%= module %>
6
- builder:
7
- customTasks:
8
- - name: app-variant-bundler-build
9
- beforeTask: escapeNonAsciiCharacters
10
- configuration:
11
- appHostId: <%= appHostId %>
12
- appName: <%= appName %>
13
- appVersion: <%= appVersion %>
14
- moduleName: <%= module %>
15
- org: <%= org %>
16
- space: <%= space %>
17
- html5RepoRuntime: <%= html5RepoRuntime %>
18
- sapCloudService: <%= sapCloudService %>
19
- serviceInstanceName: <%= instanceName %>