@sap-ux/repo-app-import-sub-generator 0.3.115 → 0.3.117

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.
@@ -13,7 +13,7 @@ const constants_1 = require("../utils/constants");
13
13
  const prompt_state_1 = require("../prompts/prompt-state");
14
14
  const logger_1 = __importDefault(require("../utils/logger"));
15
15
  const project_access_1 = require("@sap-ux/project-access");
16
- const path_1 = require("path");
16
+ const node_path_1 = require("node:path");
17
17
  const ui5_info_1 = require("@sap-ux/ui5-info");
18
18
  /**
19
19
  * Generates the deployment configuration for an ABAP application.
@@ -68,7 +68,7 @@ const fetchServiceMetadata = async (provider, serviceUrl) => {
68
68
  */
69
69
  async function getAppConfig(app, extractedProjectPath, qfaJson, systemSelection, fs) {
70
70
  try {
71
- const manifest = (0, file_helpers_1.readManifest)((0, path_1.join)(extractedProjectPath, project_access_1.FileName.Manifest), fs);
71
+ const manifest = (0, file_helpers_1.readManifest)((0, node_path_1.join)(extractedProjectPath, project_access_1.FileName.Manifest), fs);
72
72
  const serviceProvider = prompt_state_1.PromptState.systemSelection?.connectedSystem?.serviceProvider;
73
73
  if (!manifest?.['sap.app']?.dataSources) {
74
74
  logger_1.default.logger?.error((0, i18n_1.t)('error.dataSourcesNotFound'));
@@ -15,8 +15,8 @@ const telemetryEvents_1 = require("../telemetryEvents");
15
15
  const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
16
16
  const prompts_1 = require("../prompts/prompts");
17
17
  const fiori_elements_writer_1 = require("@sap-ux/fiori-elements-writer");
18
- const path_1 = require("path");
19
- const os_1 = require("os");
18
+ const node_path_1 = require("node:path");
19
+ const node_os_1 = require("node:os");
20
20
  const event_hook_1 = require("../utils/event-hook");
21
21
  const ui5_info_1 = require("@sap-ux/ui5-info");
22
22
  const launch_config_1 = require("@sap-ux/launch-config");
@@ -109,8 +109,8 @@ class default_1 extends yeoman_generator_1.default {
109
109
  Object.assign(this.answers, answers);
110
110
  }
111
111
  if ((0, validators_1.isValidPromptState)(this.answers.targetFolder, this.answers.selectedApp.appId)) {
112
- this.projectPath = (0, path_1.join)(this.answers.targetFolder, this.answers.selectedApp.appId);
113
- this.extractedProjectPath = (0, path_1.join)(this.projectPath, constants_1.extractedFilePath);
112
+ this.projectPath = (0, node_path_1.join)(this.answers.targetFolder, this.answers.selectedApp.appId);
113
+ this.extractedProjectPath = (0, node_path_1.join)(this.projectPath, constants_1.extractedFilePath);
114
114
  }
115
115
  }
116
116
  /**
@@ -119,7 +119,7 @@ class default_1 extends yeoman_generator_1.default {
119
119
  async writing() {
120
120
  await (0, download_utils_1.extractZip)(this.extractedProjectPath, this.fs);
121
121
  // Check if the qfa.json file
122
- const qfaJsonFilePath = (0, path_1.join)(this.extractedProjectPath, constants_1.qfaJsonFileName);
122
+ const qfaJsonFilePath = (0, node_path_1.join)(this.extractedProjectPath, constants_1.qfaJsonFileName);
123
123
  const qfaJson = (0, file_helpers_1.makeValidJson)(qfaJsonFilePath, this.fs);
124
124
  // Generate project files
125
125
  (0, validators_1.validateQfaJsonFile)(qfaJson);
@@ -141,7 +141,7 @@ class default_1 extends yeoman_generator_1.default {
141
141
  (0, fiori_generator_shared_1.generateAppGenInfo)(this.projectPath, readMeConfig, this.fs);
142
142
  // Replace webapp files with downloaded app files
143
143
  await (0, updates_1.replaceWebappFiles)(this.projectPath, this.extractedProjectPath, this.fs);
144
- await (0, updates_1.validateAndUpdateManifestUI5Version)((0, path_1.join)(this.projectPath, project_access_1.DirName.Webapp, project_access_1.FileName.Manifest), this.fs);
144
+ await (0, updates_1.validateAndUpdateManifestUI5Version)((0, node_path_1.join)(this.projectPath, project_access_1.DirName.Webapp, project_access_1.FileName.Manifest), this.fs);
145
145
  // Clean up extracted project files
146
146
  this.fs.delete(this.extractedProjectPath);
147
147
  }
@@ -221,7 +221,7 @@ class default_1 extends yeoman_generator_1.default {
221
221
  * @param path - The path to run npm install.
222
222
  */
223
223
  async _runNpmInstall(path) {
224
- const npm = (0, os_1.platform)() === 'win32' ? 'npm.cmd' : 'npm';
224
+ const npm = (0, node_os_1.platform)() === 'win32' ? 'npm.cmd' : 'npm';
225
225
  // install dependencies
226
226
  await this.spawnCommand(npm, ['install', '--no-audit', '--no-fund', '--silent', '--prefer-offline', '--no-progress'], {
227
227
  cwd: path
@@ -256,7 +256,7 @@ class default_1 extends yeoman_generator_1.default {
256
256
  const updateWorkspaceFolders = workspaceFolderUri
257
257
  ? {
258
258
  uri: workspaceFolderUri,
259
- projectName: (0, path_1.basename)(rootFolder),
259
+ projectName: (0, node_path_1.basename)(rootFolder),
260
260
  vscode: this.debugOptions.vscode
261
261
  }
262
262
  : undefined;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.hasQfaJson = hasQfaJson;
7
7
  exports.extractZip = extractZip;
8
8
  exports.downloadApp = downloadApp;
9
- const path_1 = require("path");
9
+ const node_path_1 = require("node:path");
10
10
  const prompt_state_1 = require("../prompts/prompt-state");
11
11
  const i18n_1 = require("./i18n");
12
12
  const logger_1 = __importDefault(require("../utils/logger"));
@@ -33,10 +33,10 @@ async function extractZip(extractedProjectPath, fs) {
33
33
  if (!zipEntry.isDirectory) {
34
34
  // Extract the file content
35
35
  const fileContent = zipEntry.getData().toString('utf8');
36
- const filePath = (0, path_1.join)(extractedProjectPath, zipEntry.entryName);
36
+ const filePath = (0, node_path_1.join)(extractedProjectPath, zipEntry.entryName);
37
37
  logger_1.default.logger?.debug(`extractZip: Extracting file: "${filePath}" with contents: "${fileContent}" .`);
38
38
  // Load the file content into mem-fs for use in the temporary extracted project directory
39
- fs.write((0, path_1.join)(extractedProjectPath, zipEntry.entryName), fileContent);
39
+ fs.write((0, node_path_1.join)(extractedProjectPath, zipEntry.entryName), fileContent);
40
40
  }
41
41
  });
42
42
  }
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.validateAndUpdateManifestUI5Version = validateAndUpdateManifestUI5Version;
7
7
  exports.replaceWebappFiles = replaceWebappFiles;
8
- const path_1 = require("path");
8
+ const node_path_1 = require("node:path");
9
9
  const project_access_1 = require("@sap-ux/project-access");
10
10
  const i18n_1 = require("./i18n");
11
11
  const logger_1 = __importDefault(require("./logger"));
@@ -61,18 +61,18 @@ async function validateAndUpdateManifestUI5Version(manifestFilePath, fs) {
61
61
  */
62
62
  async function replaceWebappFiles(projectPath, extractedPath, fs) {
63
63
  try {
64
- const webappPath = (0, path_1.join)(projectPath, project_access_1.DirName.Webapp);
64
+ const webappPath = (0, node_path_1.join)(projectPath, project_access_1.DirName.Webapp);
65
65
  // Define the paths of the files to be replaced
66
66
  const filesToReplace = [
67
67
  { webappFile: project_access_1.FileName.Manifest, extractedFile: project_access_1.FileName.Manifest },
68
- { webappFile: (0, path_1.join)('i18n', 'i18n.properties'), extractedFile: (0, path_1.join)('i18n', 'i18n.properties') },
68
+ { webappFile: (0, node_path_1.join)('i18n', 'i18n.properties'), extractedFile: (0, node_path_1.join)('i18n', 'i18n.properties') },
69
69
  { webappFile: 'index.html', extractedFile: 'index.html' },
70
70
  { webappFile: 'Component.js', extractedFile: 'component.js' }
71
71
  ];
72
72
  // Loop through each file and perform the replacement
73
73
  for (const { webappFile, extractedFile } of filesToReplace) {
74
- const webappFilePath = (0, path_1.join)(webappPath, webappFile);
75
- const extractedFilePath = (0, path_1.join)(extractedPath, extractedFile);
74
+ const webappFilePath = (0, node_path_1.join)(webappPath, webappFile);
75
+ const extractedFilePath = (0, node_path_1.join)(extractedPath, extractedFile);
76
76
  // Check if the extracted file exists before replacing
77
77
  if (fs.exists(extractedFilePath)) {
78
78
  if (extractedFile === project_access_1.FileName.Manifest) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/repo-app-import-sub-generator",
3
3
  "description": "Generator to download LROP Fiori applications deployed from an ABAP repository.",
4
- "version": "0.3.115",
4
+ "version": "0.3.117",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -25,21 +25,21 @@
25
25
  "inquirer": "8.2.6",
26
26
  "yeoman-generator": "5.10.0",
27
27
  "@sap-ux/feature-toggle": "0.3.1",
28
- "@sap-ux/fiori-generator-shared": "0.13.19",
29
- "@sap-ux/inquirer-common": "0.7.46",
30
- "@sap-ux/project-access": "1.32.2",
31
- "@sap-ux/odata-service-inquirer": "2.8.7",
32
- "@sap-ux/fiori-elements-writer": "2.7.15",
28
+ "@sap-ux/fiori-generator-shared": "0.13.21",
29
+ "@sap-ux/inquirer-common": "0.7.48",
30
+ "@sap-ux/project-access": "1.32.3",
31
+ "@sap-ux/odata-service-inquirer": "2.8.9",
32
+ "@sap-ux/fiori-elements-writer": "2.7.17",
33
33
  "@sap-ux/logger": "0.7.0",
34
- "@sap-ux/project-input-validator": "0.6.23",
35
- "@sap-ux/launch-config": "0.10.26",
36
- "@sap-ux/fiori-tools-settings": "0.2.0",
37
- "@sap-ux/abap-deploy-config-writer": "0.2.19",
38
- "@sap-ux/btp-utils": "1.1.3",
39
- "@sap-ux/ui5-info": "0.12.3",
40
- "@sap-ux/axios-extension": "1.22.9",
41
- "@sap-ux/store": "1.1.4",
42
- "@sap-ux/system-access": "0.6.18",
34
+ "@sap-ux/project-input-validator": "0.6.24",
35
+ "@sap-ux/launch-config": "0.10.27",
36
+ "@sap-ux/fiori-tools-settings": "0.2.1",
37
+ "@sap-ux/btp-utils": "1.1.4",
38
+ "@sap-ux/abap-deploy-config-writer": "0.2.20",
39
+ "@sap-ux/ui5-info": "0.12.4",
40
+ "@sap-ux/axios-extension": "1.22.10",
41
+ "@sap-ux/system-access": "0.6.19",
42
+ "@sap-ux/store": "1.1.5",
43
43
  "@sap-ux/guided-answers-helper": "0.4.0"
44
44
  },
45
45
  "devDependencies": {
@@ -64,9 +64,9 @@
64
64
  "unionfs": "4.4.0",
65
65
  "yeoman-environment": "3.8.0",
66
66
  "yeoman-test": "6.3.0",
67
- "@sap-ux/nodejs-utils": "0.2.5",
68
- "@sap-ux/store": "1.1.4",
69
- "@sap-ux/ui5-config": "0.29.6"
67
+ "@sap-ux/nodejs-utils": "0.2.7",
68
+ "@sap-ux/store": "1.1.5",
69
+ "@sap-ux/ui5-config": "0.29.7"
70
70
  },
71
71
  "engines": {
72
72
  "node": ">=20.x"