@sap-ux/project-access 1.27.4 → 1.27.6

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,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.execNpmCommand = void 0;
3
+ exports.execNpmCommand = execNpmCommand;
4
4
  const child_process_1 = require("child_process");
5
5
  /**
6
6
  * Execute an npm command.
@@ -48,5 +48,4 @@ async function execNpmCommand(commandArguments, options) {
48
48
  });
49
49
  });
50
50
  }
51
- exports.execNpmCommand = execNpmCommand;
52
51
  //# sourceMappingURL=npm-command.js.map
@@ -3,7 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.deleteDirectory = exports.readDirectory = exports.deleteFile = exports.updateManifestJSON = exports.updatePackageJSON = exports.fileExists = exports.writeFile = exports.readJSON = exports.readFile = void 0;
6
+ exports.readFile = readFile;
7
+ exports.readJSON = readJSON;
8
+ exports.writeFile = writeFile;
9
+ exports.fileExists = fileExists;
10
+ exports.updatePackageJSON = updatePackageJSON;
11
+ exports.updateManifestJSON = updateManifestJSON;
12
+ exports.deleteFile = deleteFile;
13
+ exports.readDirectory = readDirectory;
14
+ exports.deleteDirectory = deleteDirectory;
7
15
  const fs_1 = require("fs");
8
16
  const json_parse_even_better_errors_1 = __importDefault(require("json-parse-even-better-errors"));
9
17
  /**
@@ -21,7 +29,6 @@ async function readFile(path, memFs) {
21
29
  return fs_1.promises.readFile(path, { encoding: 'utf8' });
22
30
  }
23
31
  }
24
- exports.readFile = readFile;
25
32
  /**
26
33
  * Read JSON file asynchronously. Throws error if file does not exist or is malformatted.
27
34
  *
@@ -37,7 +44,6 @@ async function readJSON(path, memFs) {
37
44
  return JSON.parse(await readFile(path));
38
45
  }
39
46
  }
40
- exports.readJSON = readJSON;
41
47
  /**
42
48
  * Write file asynchronously. Throws error if file does not exist.
43
49
  *
@@ -52,7 +58,6 @@ async function writeFile(path, content, memFs) {
52
58
  }
53
59
  return fs_1.promises.writeFile(path, content, { encoding: 'utf8' });
54
60
  }
55
- exports.writeFile = writeFile;
56
61
  /**
57
62
  * Checks if the provided file exists in the file system.
58
63
  *
@@ -74,7 +79,6 @@ async function fileExists(path, memFs) {
74
79
  return false;
75
80
  }
76
81
  }
77
- exports.fileExists = fileExists;
78
82
  /**
79
83
  * Updates package.json file asynchronously by keeping the previous indentation.
80
84
  *
@@ -85,7 +89,6 @@ exports.fileExists = fileExists;
85
89
  async function updatePackageJSON(path, packageJson, memFs) {
86
90
  await updateJSON(path, packageJson, memFs);
87
91
  }
88
- exports.updatePackageJSON = updatePackageJSON;
89
92
  /**
90
93
  * Updates manifest.json file asynchronously by keeping the previous indentation.
91
94
  *
@@ -96,7 +99,6 @@ exports.updatePackageJSON = updatePackageJSON;
96
99
  async function updateManifestJSON(path, manifest, memFs) {
97
100
  await updateJSON(path, manifest, memFs);
98
101
  }
99
- exports.updateManifestJSON = updateManifestJSON;
100
102
  /**
101
103
  * Updates JSON file asynchronously by keeping the indentation from previous content with new content for given path.
102
104
  *
@@ -126,7 +128,6 @@ async function deleteFile(path, memFs) {
126
128
  }
127
129
  return fs_1.promises.unlink(path);
128
130
  }
129
- exports.deleteFile = deleteFile;
130
131
  /**
131
132
  * Read array of files from folder asynchronously.
132
133
  *
@@ -136,7 +137,6 @@ exports.deleteFile = deleteFile;
136
137
  async function readDirectory(path) {
137
138
  return fs_1.promises.readdir(path, { encoding: 'utf8' });
138
139
  }
139
- exports.readDirectory = readDirectory;
140
140
  /**
141
141
  * Deletes folder asynchronously.
142
142
  *
@@ -150,5 +150,4 @@ async function deleteDirectory(path, memFs) {
150
150
  }
151
151
  return fs_1.promises.rm(path, { recursive: true, force: true });
152
152
  }
153
- exports.deleteDirectory = deleteDirectory;
154
153
  //# sourceMappingURL=file-access.js.map
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getFilePaths = exports.findFileUp = exports.findFilesByExtension = exports.findFiles = exports.findBy = void 0;
6
+ exports.findBy = findBy;
7
+ exports.findFiles = findFiles;
8
+ exports.findFilesByExtension = findFilesByExtension;
9
+ exports.findFileUp = findFileUp;
10
+ exports.getFilePaths = getFilePaths;
7
11
  const path_1 = require("path");
8
12
  const findit2_1 = __importDefault(require("findit2"));
9
13
  const file_access_1 = require("./file-access");
@@ -73,7 +77,6 @@ function findBy(options) {
73
77
  });
74
78
  });
75
79
  }
76
- exports.findBy = findBy;
77
80
  /**
78
81
  * Search for 'filename' starting from 'root'. Returns array of paths that contain the file.
79
82
  *
@@ -87,7 +90,6 @@ async function findFiles(filename, root, excludeFolders, memFs) {
87
90
  const results = await findBy({ fileNames: [filename], root, excludeFolders, memFs });
88
91
  return results.map((f) => (0, path_1.dirname)(f));
89
92
  }
90
- exports.findFiles = findFiles;
91
93
  /**
92
94
  * Search for 'filename' starting from 'root'. Returns array of paths that contain the file.
93
95
  *
@@ -100,7 +102,6 @@ exports.findFiles = findFiles;
100
102
  function findFilesByExtension(extension, root, excludeFolders, memFs) {
101
103
  return findBy({ extensionNames: [extension], root, excludeFolders, memFs });
102
104
  }
103
- exports.findFilesByExtension = findFilesByExtension;
104
105
  /**
105
106
  * Find a file by name in parent folders starting from 'startPath'.
106
107
  *
@@ -118,7 +119,6 @@ async function findFileUp(fileName, startPath, fs) {
118
119
  return (0, path_1.dirname)(startPath) !== startPath ? findFileUp(fileName, (0, path_1.dirname)(startPath), fs) : undefined;
119
120
  }
120
121
  }
121
- exports.findFileUp = findFileUp;
122
122
  /**
123
123
  * @description Returns a flat list of all file paths under a directory tree,
124
124
  * recursing through all subdirectories.
@@ -136,5 +136,4 @@ async function getFilePaths(dir) {
136
136
  const filePaths = await Promise.all(filePathsPromises);
137
137
  return [].concat(...filePaths);
138
138
  }
139
- exports.getFilePaths = getFilePaths;
140
139
  //# sourceMappingURL=file-search.js.map
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { FileName, DirName, FioriToolsSettings } from './constants';
2
2
  export { getFilePaths } from './file';
3
- export { addPackageDevDependency, clearCdsModuleCache, createApplicationAccess, createProjectAccess, deleteCapApp, filterDataSourcesByType, findAllApps, findCapProjectRoot, findCapProjects, findFioriArtifacts, findProjectRoot, findRootsForPath, getAppRootFromWebappPath, getAppProgrammingLanguage, getAppType, getCapCustomPaths, getCapEnvironment, getCapModelAndServices, getCapServiceName, getCapProjectType, getCdsFiles, getCdsRoots, getCdsServices, getCapI18nFolderNames, getSpecification, getSpecificationPath, getI18nPropertiesPaths, getMinUI5VersionFromManifest, getMinUI5VersionAsArray, getMinimumUI5Version, getMtaPath, getNodeModulesPath, getProject, getProjectType, getWebappPath, hasUI5CliV3, isCapProject, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject, readCapServiceMetadataEdmx, readUi5Yaml, refreshSpecificationDistTags, toReferenceUri, updatePackageScript } from './project';
3
+ export { addPackageDevDependency, clearCdsModuleCache, createApplicationAccess, createProjectAccess, isPathForCapApp, deleteCapApp, filterDataSourcesByType, findAllApps, findCapProjectRoot, findCapProjects, findFioriArtifacts, findProjectRoot, findRootsForPath, getAppRootFromWebappPath, getAppProgrammingLanguage, getAppType, getCapCustomPaths, getCapEnvironment, getCapModelAndServices, getCapServiceName, getCapProjectType, getCdsFiles, getCdsRoots, getCdsServices, getCapI18nFolderNames, getSpecification, getSpecificationPath, getI18nPropertiesPaths, getMinUI5VersionFromManifest, getMinUI5VersionAsArray, getMinimumUI5Version, getMtaPath, getNodeModulesPath, getProject, getProjectType, getWebappPath, hasUI5CliV3, isCapProject, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject, readCapServiceMetadataEdmx, readUi5Yaml, refreshSpecificationDistTags, toReferenceUri, updatePackageScript } from './project';
4
4
  export * from './types';
5
5
  export * from './library';
6
6
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.updatePackageScript = exports.toReferenceUri = exports.refreshSpecificationDistTags = exports.readUi5Yaml = exports.readCapServiceMetadataEdmx = exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.isCapProject = exports.hasUI5CliV3 = exports.getWebappPath = exports.getProjectType = exports.getProject = exports.getNodeModulesPath = exports.getMtaPath = exports.getMinimumUI5Version = exports.getMinUI5VersionAsArray = exports.getMinUI5VersionFromManifest = exports.getI18nPropertiesPaths = exports.getSpecificationPath = exports.getSpecification = exports.getCapI18nFolderNames = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapProjectType = exports.getCapServiceName = exports.getCapModelAndServices = exports.getCapEnvironment = exports.getCapCustomPaths = exports.getAppType = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findRootsForPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findCapProjects = exports.findCapProjectRoot = exports.findAllApps = exports.filterDataSourcesByType = exports.deleteCapApp = exports.createProjectAccess = exports.createApplicationAccess = exports.clearCdsModuleCache = exports.addPackageDevDependency = exports.getFilePaths = exports.FioriToolsSettings = exports.DirName = exports.FileName = void 0;
17
+ exports.updatePackageScript = exports.toReferenceUri = exports.refreshSpecificationDistTags = exports.readUi5Yaml = exports.readCapServiceMetadataEdmx = exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.isCapProject = exports.hasUI5CliV3 = exports.getWebappPath = exports.getProjectType = exports.getProject = exports.getNodeModulesPath = exports.getMtaPath = exports.getMinimumUI5Version = exports.getMinUI5VersionAsArray = exports.getMinUI5VersionFromManifest = exports.getI18nPropertiesPaths = exports.getSpecificationPath = exports.getSpecification = exports.getCapI18nFolderNames = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapProjectType = exports.getCapServiceName = exports.getCapModelAndServices = exports.getCapEnvironment = exports.getCapCustomPaths = exports.getAppType = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findRootsForPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findCapProjects = exports.findCapProjectRoot = exports.findAllApps = exports.filterDataSourcesByType = exports.deleteCapApp = exports.isPathForCapApp = exports.createProjectAccess = exports.createApplicationAccess = exports.clearCdsModuleCache = exports.addPackageDevDependency = exports.getFilePaths = exports.FioriToolsSettings = exports.DirName = exports.FileName = void 0;
18
18
  var constants_1 = require("./constants");
19
19
  Object.defineProperty(exports, "FileName", { enumerable: true, get: function () { return constants_1.FileName; } });
20
20
  Object.defineProperty(exports, "DirName", { enumerable: true, get: function () { return constants_1.DirName; } });
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "addPackageDevDependency", { enumerable: true, ge
26
26
  Object.defineProperty(exports, "clearCdsModuleCache", { enumerable: true, get: function () { return project_1.clearCdsModuleCache; } });
27
27
  Object.defineProperty(exports, "createApplicationAccess", { enumerable: true, get: function () { return project_1.createApplicationAccess; } });
28
28
  Object.defineProperty(exports, "createProjectAccess", { enumerable: true, get: function () { return project_1.createProjectAccess; } });
29
+ Object.defineProperty(exports, "isPathForCapApp", { enumerable: true, get: function () { return project_1.isPathForCapApp; } });
29
30
  Object.defineProperty(exports, "deleteCapApp", { enumerable: true, get: function () { return project_1.deleteCapApp; } });
30
31
  Object.defineProperty(exports, "filterDataSourcesByType", { enumerable: true, get: function () { return project_1.filterDataSourcesByType; } });
31
32
  Object.defineProperty(exports, "findAllApps", { enumerable: true, get: function () { return project_1.findAllApps; } });
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getManifestDependencies = exports.getManifestDesc = exports.getLibraryDependencies = exports.getLibraryDesc = exports.checkDependencies = exports.getReuseLibs = void 0;
3
+ exports.getReuseLibs = void 0;
4
+ exports.checkDependencies = checkDependencies;
5
+ exports.getLibraryDesc = getLibraryDesc;
6
+ exports.getLibraryDependencies = getLibraryDependencies;
7
+ exports.getManifestDesc = getManifestDesc;
8
+ exports.getManifestDependencies = getManifestDependencies;
4
9
  const path_1 = require("path");
5
10
  const constants_1 = require("./constants");
6
11
  const file_1 = require("../file");
@@ -155,7 +160,6 @@ function checkDependencies(answers, reuseLibs) {
155
160
  });
156
161
  return missingDeps.join();
157
162
  }
158
- exports.checkDependencies = checkDependencies;
159
163
  /**
160
164
  * Returns the library description.
161
165
  *
@@ -171,7 +175,6 @@ async function getLibraryDesc(library, libraryPath) {
171
175
  }
172
176
  return libraryDesc.toString();
173
177
  }
174
- exports.getLibraryDesc = getLibraryDesc;
175
178
  /**
176
179
  * Returns the library dependencies.
177
180
  *
@@ -196,7 +199,6 @@ function getLibraryDependencies(library) {
196
199
  }
197
200
  return result;
198
201
  }
199
- exports.getLibraryDependencies = getLibraryDependencies;
200
202
  /**
201
203
  * Returns the i18n property value.
202
204
  *
@@ -234,7 +236,6 @@ async function getManifestDesc(manifest, manifestPath) {
234
236
  }
235
237
  return (manifestDesc ?? '').toString();
236
238
  }
237
- exports.getManifestDesc = getManifestDesc;
238
239
  /**
239
240
  * Returns the manifest dependencies.
240
241
  *
@@ -261,5 +262,4 @@ function getManifestDependencies(manifest) {
261
262
  });
262
263
  return result;
263
264
  }
264
- exports.getManifestDependencies = getManifestDependencies;
265
265
  //# sourceMappingURL=helpers.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createProjectAccess = exports.createApplicationAccess = void 0;
3
+ exports.createApplicationAccess = createApplicationAccess;
4
+ exports.createProjectAccess = createProjectAccess;
4
5
  const path_1 = require("path");
5
6
  const i18n_1 = require("./i18n");
6
7
  const info_1 = require("./info");
@@ -286,7 +287,6 @@ async function createApplicationAccess(appRoot, fs) {
286
287
  throw Error(`Error when creating application access for ${appRoot}: ${error}`);
287
288
  }
288
289
  }
289
- exports.createApplicationAccess = createApplicationAccess;
290
290
  /**
291
291
  * Create an instance of ProjectAccess that contains information about the project, like applications, paths, services.
292
292
  *
@@ -304,5 +304,4 @@ async function createProjectAccess(root, options) {
304
304
  throw Error(`Error when creating project access for ${root}: ${error}`);
305
305
  }
306
306
  }
307
- exports.createProjectAccess = createProjectAccess;
308
307
  //# sourceMappingURL=access.js.map
@@ -1,6 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteCapApp = exports.getCapServiceName = exports.clearGlobalCdsModulePromiseCache = exports.toReferenceUri = exports.toAbsoluteUri = exports.clearCdsModuleCache = exports.getCapEnvironment = exports.readCapServiceMetadataEdmx = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapModelAndServices = exports.getCapCustomPaths = exports.isCapProject = exports.getCapProjectType = exports.isCapJavaProject = exports.isCapNodeJsProject = void 0;
3
+ exports.toReferenceUri = exports.toAbsoluteUri = void 0;
4
+ exports.isCapNodeJsProject = isCapNodeJsProject;
5
+ exports.isCapJavaProject = isCapJavaProject;
6
+ exports.getCapProjectType = getCapProjectType;
7
+ exports.isCapProject = isCapProject;
8
+ exports.getCapCustomPaths = getCapCustomPaths;
9
+ exports.getCapModelAndServices = getCapModelAndServices;
10
+ exports.getCdsFiles = getCdsFiles;
11
+ exports.getCdsRoots = getCdsRoots;
12
+ exports.getCdsServices = getCdsServices;
13
+ exports.readCapServiceMetadataEdmx = readCapServiceMetadataEdmx;
14
+ exports.getCapEnvironment = getCapEnvironment;
15
+ exports.clearCdsModuleCache = clearCdsModuleCache;
16
+ exports.clearGlobalCdsModulePromiseCache = clearGlobalCdsModulePromiseCache;
17
+ exports.getCapServiceName = getCapServiceName;
18
+ exports.deleteCapApp = deleteCapApp;
4
19
  const child_process_1 = require("child_process");
5
20
  const path_1 = require("path");
6
21
  const constants_1 = require("../constants");
@@ -16,7 +31,6 @@ const search_1 = require("./search");
16
31
  function isCapNodeJsProject(packageJson) {
17
32
  return !!(packageJson.cds ?? packageJson.dependencies?.['@sap/cds']);
18
33
  }
19
- exports.isCapNodeJsProject = isCapNodeJsProject;
20
34
  /**
21
35
  * Returns true if the project is a CAP Java project.
22
36
  *
@@ -28,7 +42,6 @@ async function isCapJavaProject(projectRoot, capCustomPaths) {
28
42
  const srv = capCustomPaths?.srv ?? (await getCapCustomPaths(projectRoot)).srv;
29
43
  return (0, file_1.fileExists)((0, path_1.join)(projectRoot, srv, 'src', 'main', 'resources', constants_1.FileName.CapJavaApplicationYaml));
30
44
  }
31
- exports.isCapJavaProject = isCapJavaProject;
32
45
  /**
33
46
  * Returns the CAP project type, undefined if it is not a CAP project.
34
47
  *
@@ -55,7 +68,6 @@ async function getCapProjectType(projectRoot) {
55
68
  }
56
69
  return undefined;
57
70
  }
58
- exports.getCapProjectType = getCapProjectType;
59
71
  /**
60
72
  * Returns true if the project is either a CAP Node.js or a CAP Java project.
61
73
  *
@@ -65,7 +77,6 @@ exports.getCapProjectType = getCapProjectType;
65
77
  async function isCapProject(projectRoot) {
66
78
  return !!(await getCapProjectType(projectRoot));
67
79
  }
68
- exports.isCapProject = isCapProject;
69
80
  /**
70
81
  * Get CAP CDS project custom paths for project root.
71
82
  *
@@ -91,7 +102,6 @@ async function getCapCustomPaths(capProjectPath) {
91
102
  }
92
103
  return result;
93
104
  }
94
- exports.getCapCustomPaths = getCapCustomPaths;
95
105
  /**
96
106
  * Return the CAP model and all services. The cds.root will be set to the provided project root path.
97
107
  *
@@ -143,7 +153,6 @@ async function getCapModelAndServices(projectRoot) {
143
153
  }
144
154
  };
145
155
  }
146
- exports.getCapModelAndServices = getCapModelAndServices;
147
156
  /**
148
157
  * Returns a list of cds file paths (layers). By default return list of all, but you can also restrict it to one envRoot.
149
158
  *
@@ -176,7 +185,6 @@ async function getCdsFiles(projectRoot, ignoreErrors = false, envRoot) {
176
185
  }
177
186
  return cdsFiles;
178
187
  }
179
- exports.getCdsFiles = getCdsFiles;
180
188
  /**
181
189
  * Returns a list of filepaths to CDS files in root folders. Same what is done if you execute cds.resolve('*') on command line in a project.
182
190
  *
@@ -203,7 +211,6 @@ async function getCdsRoots(projectRoot, clearCache = false) {
203
211
  }
204
212
  return roots;
205
213
  }
206
- exports.getCdsRoots = getCdsRoots;
207
214
  /**
208
215
  * Return a list of services in a CAP project.
209
216
  *
@@ -243,7 +250,6 @@ async function getCdsServices(projectRoot, ignoreErrors = true) {
243
250
  }
244
251
  return cdsServices;
245
252
  }
246
- exports.getCdsServices = getCdsServices;
247
253
  /**
248
254
  * When an error occurs while trying to read cds files, the error object contains the source file
249
255
  * information. This function extracts this file paths.
@@ -300,7 +306,6 @@ async function readCapServiceMetadataEdmx(root, uri, version = 'v4') {
300
306
  throw Error(`Error while reading CAP service metadata. Path: '${root}', service uri: '${uri}', error: '${error.toString()}'}`);
301
307
  }
302
308
  }
303
- exports.readCapServiceMetadataEdmx = readCapServiceMetadataEdmx;
304
309
  /**
305
310
  * Find a service in a list of services ignoring leading and trailing slashes.
306
311
  *
@@ -322,7 +327,6 @@ async function getCapEnvironment(capProjectPath) {
322
327
  const cds = await loadCdsModuleFromProject(capProjectPath);
323
328
  return cds.env.for('cds', capProjectPath);
324
329
  }
325
- exports.getCapEnvironment = getCapEnvironment;
326
330
  /**
327
331
  * Load CAP CDS module. First attempt loads @sap/cds for a project based on its root.
328
332
  * Second attempt loads @sap/cds from global installed @sap/cds-dk.
@@ -396,7 +400,6 @@ async function clearCdsModuleCache(projectRoot) {
396
400
  }
397
401
  return result;
398
402
  }
399
- exports.clearCdsModuleCache = clearCdsModuleCache;
400
403
  /**
401
404
  * Method to clear CAP CDS module cache for passed cds module.
402
405
  *
@@ -528,7 +531,6 @@ async function loadGlobalCdsModule() {
528
531
  function clearGlobalCdsModulePromiseCache() {
529
532
  globalCdsModulePromise = undefined;
530
533
  }
531
- exports.clearGlobalCdsModulePromiseCache = clearGlobalCdsModulePromiseCache;
532
534
  /**
533
535
  * Get cds information, which includes versions and also the home path of cds module.
534
536
  *
@@ -604,7 +606,6 @@ async function getCapServiceName(projectRoot, datasourceUri) {
604
606
  }
605
607
  return service.name;
606
608
  }
607
- exports.getCapServiceName = getCapServiceName;
608
609
  /**
609
610
  * Method cleans up cds files after deletion of passed appName.
610
611
  *
@@ -680,5 +681,4 @@ async function deleteCapApp(appPath, memFs, logger) {
680
681
  await (0, file_1.deleteDirectory)((0, path_1.dirname)(appPath), memFs);
681
682
  }
682
683
  }
683
- exports.deleteCapApp = deleteCapApp;
684
684
  //# sourceMappingURL=cap.js.map
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addPackageDevDependency = exports.getNodeModulesPath = exports.hasDependency = void 0;
3
+ exports.hasDependency = void 0;
4
+ exports.getNodeModulesPath = getNodeModulesPath;
5
+ exports.addPackageDevDependency = addPackageDevDependency;
4
6
  const fs_1 = require("fs");
5
7
  const path_1 = require("path");
6
8
  const constants_1 = require("../constants");
@@ -43,7 +45,6 @@ function getNodeModulesPath(projectRoot, module) {
43
45
  }
44
46
  return modulesPath;
45
47
  }
46
- exports.getNodeModulesPath = getNodeModulesPath;
47
48
  /**
48
49
  * Adds a new dev dependency to the package.json.
49
50
  *
@@ -61,5 +62,4 @@ async function addPackageDevDependency(basePath, depName, depVersion, fs) {
61
62
  }
62
63
  await (0, file_1.updatePackageJSON)(filePath, packageJson, fs);
63
64
  }
64
- exports.addPackageDevDependency = addPackageDevDependency;
65
65
  //# sourceMappingURL=dependencies.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRelativeI18nPropertiesPaths = exports.getI18nPropertiesPaths = void 0;
3
+ exports.getI18nPropertiesPaths = getI18nPropertiesPaths;
4
+ exports.getRelativeI18nPropertiesPaths = getRelativeI18nPropertiesPaths;
4
5
  const path_1 = require("path");
5
6
  const file_1 = require("../../file");
6
7
  /**
@@ -25,7 +26,6 @@ async function getI18nPropertiesPaths(manifestPath, manifest) {
25
26
  }
26
27
  return i18nPropertiesPaths;
27
28
  }
28
- exports.getI18nPropertiesPaths = getI18nPropertiesPaths;
29
29
  /**
30
30
  * Return paths to i18n.properties files from manifest,
31
31
  * relative to the manifest.json.
@@ -39,7 +39,6 @@ function getRelativeI18nPropertiesPaths(manifest) {
39
39
  models: getI18nModelPaths(manifest)
40
40
  };
41
41
  }
42
- exports.getRelativeI18nPropertiesPaths = getRelativeI18nPropertiesPaths;
43
42
  /**
44
43
  * Get the i18n path from sap.app.i18n part of the manifest.
45
44
  *
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCapI18nFolderNames = exports.getI18nBundles = void 0;
3
+ exports.getI18nBundles = getI18nBundles;
4
+ exports.getCapI18nFolderNames = getCapI18nFolderNames;
4
5
  const i18n_1 = require("@sap-ux/i18n");
5
6
  const __1 = require("..");
6
7
  /**
@@ -61,7 +62,6 @@ async function getI18nBundles(root, i18nPropertiesPaths, projectType, fs) {
61
62
  }
62
63
  return result;
63
64
  }
64
- exports.getI18nBundles = getI18nBundles;
65
65
  /**
66
66
  * Retrieves a list of potential folder names for i18n files.
67
67
  *
@@ -72,5 +72,4 @@ async function getCapI18nFolderNames(root) {
72
72
  const environment = await (0, __1.getCapEnvironment)(root);
73
73
  return (0, i18n_1.getI18nFolderNames)(environment);
74
74
  }
75
- exports.getCapI18nFolderNames = getCapI18nFolderNames;
76
75
  //# sourceMappingURL=read.js.map
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createManifestI18nEntries = exports.createAnnotationI18nEntries = exports.createUI5I18nEntries = exports.createCapI18nEntries = void 0;
3
+ exports.createCapI18nEntries = createCapI18nEntries;
4
+ exports.createUI5I18nEntries = createUI5I18nEntries;
5
+ exports.createAnnotationI18nEntries = createAnnotationI18nEntries;
6
+ exports.createManifestI18nEntries = createManifestI18nEntries;
4
7
  const i18n_1 = require("@sap-ux/i18n");
5
8
  const __1 = require("..");
6
9
  const path_1 = require("path");
@@ -21,7 +24,6 @@ async function createCapI18nEntries(root, filePath, newI18nEntries, fs) {
21
24
  const env = await (0, __1.getCapEnvironment)(root);
22
25
  return (0, i18n_1.createCapI18nEntries)(root, filePath, newI18nEntries, env, fs);
23
26
  }
24
- exports.createCapI18nEntries = createCapI18nEntries;
25
27
  /**
26
28
  * Maintains new translation entries in an existing i18n file or in a new i18n properties file if it does not exist for given model key.
27
29
  *
@@ -95,7 +97,6 @@ async function createUI5I18nEntriesBase(root, manifestPath, i18nPropertiesPaths,
95
97
  async function createUI5I18nEntries(root, manifestPath, i18nPropertiesPaths, newEntries, modelKey, fs) {
96
98
  return createUI5I18nEntriesBase(root, manifestPath, i18nPropertiesPaths, newEntries, modelKey, fs);
97
99
  }
98
- exports.createUI5I18nEntries = createUI5I18nEntries;
99
100
  /**
100
101
  * Maintains new translation entries in an existing i18n file or in a new i18n properties file if it does not exist.
101
102
  *
@@ -123,7 +124,6 @@ exports.createUI5I18nEntries = createUI5I18nEntries;
123
124
  async function createAnnotationI18nEntries(root, manifestPath, i18nPropertiesPaths, newEntries, fs) {
124
125
  return createUI5I18nEntriesBase(root, manifestPath, i18nPropertiesPaths, newEntries, '@i18n', fs);
125
126
  }
126
- exports.createAnnotationI18nEntries = createAnnotationI18nEntries;
127
127
  /**
128
128
  * Maintains new translation entries in an existing i18n file or in a new i18n properties file if it does not exist.
129
129
  *
@@ -144,5 +144,4 @@ async function createManifestI18nEntries(root, i18nPropertiesPaths, newEntries,
144
144
  }
145
145
  return (0, i18n_1.createPropertiesI18nEntries)(i18nFilePath, newEntries, root, fs);
146
146
  }
147
- exports.createManifestI18nEntries = createManifestI18nEntries;
148
147
  //# sourceMappingURL=write.js.map
@@ -4,7 +4,7 @@ export { addPackageDevDependency, getNodeModulesPath } from './dependencies';
4
4
  export { getCapI18nFolderNames, getI18nPropertiesPaths } from './i18n';
5
5
  export { getAppProgrammingLanguage, getAppType, getMinUI5VersionFromManifest, getMinUI5VersionAsArray, getMinimumUI5Version, getProject, getProjectType } from './info';
6
6
  export { loadModuleFromProject } from './module-loader';
7
- export { findAllApps, findCapProjects, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, findCapProjectRoot, findRootsForPath } from './search';
7
+ export { findAllApps, findCapProjects, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, findCapProjectRoot, findRootsForPath, isPathForCapApp } from './search';
8
8
  export { getWebappPath, readUi5Yaml } from './ui5-config';
9
9
  export { getMtaPath } from './mta';
10
10
  export { createApplicationAccess, createProjectAccess } from './access';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.refreshSpecificationDistTags = exports.getSpecificationPath = exports.getSpecification = exports.hasUI5CliV3 = exports.updatePackageScript = exports.createProjectAccess = exports.createApplicationAccess = exports.getMtaPath = exports.readUi5Yaml = exports.getWebappPath = exports.findRootsForPath = exports.findCapProjectRoot = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findCapProjects = exports.findAllApps = exports.loadModuleFromProject = exports.getProjectType = exports.getProject = exports.getMinimumUI5Version = exports.getMinUI5VersionAsArray = exports.getMinUI5VersionFromManifest = exports.getAppType = exports.getAppProgrammingLanguage = exports.getI18nPropertiesPaths = exports.getCapI18nFolderNames = exports.getNodeModulesPath = exports.addPackageDevDependency = exports.filterDataSourcesByType = exports.toReferenceUri = exports.readCapServiceMetadataEdmx = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.isCapProject = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapServiceName = exports.getCapProjectType = exports.getCapModelAndServices = exports.getCapEnvironment = exports.getCapCustomPaths = exports.deleteCapApp = exports.clearCdsModuleCache = void 0;
3
+ exports.refreshSpecificationDistTags = exports.getSpecificationPath = exports.getSpecification = exports.hasUI5CliV3 = exports.updatePackageScript = exports.createProjectAccess = exports.createApplicationAccess = exports.getMtaPath = exports.readUi5Yaml = exports.getWebappPath = exports.isPathForCapApp = exports.findRootsForPath = exports.findCapProjectRoot = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findCapProjects = exports.findAllApps = exports.loadModuleFromProject = exports.getProjectType = exports.getProject = exports.getMinimumUI5Version = exports.getMinUI5VersionAsArray = exports.getMinUI5VersionFromManifest = exports.getAppType = exports.getAppProgrammingLanguage = exports.getI18nPropertiesPaths = exports.getCapI18nFolderNames = exports.getNodeModulesPath = exports.addPackageDevDependency = exports.filterDataSourcesByType = exports.toReferenceUri = exports.readCapServiceMetadataEdmx = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.isCapProject = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapServiceName = exports.getCapProjectType = exports.getCapModelAndServices = exports.getCapEnvironment = exports.getCapCustomPaths = exports.deleteCapApp = exports.clearCdsModuleCache = void 0;
4
4
  var cap_1 = require("./cap");
5
5
  Object.defineProperty(exports, "clearCdsModuleCache", { enumerable: true, get: function () { return cap_1.clearCdsModuleCache; } });
6
6
  Object.defineProperty(exports, "deleteCapApp", { enumerable: true, get: function () { return cap_1.deleteCapApp; } });
@@ -43,6 +43,7 @@ Object.defineProperty(exports, "findProjectRoot", { enumerable: true, get: funct
43
43
  Object.defineProperty(exports, "getAppRootFromWebappPath", { enumerable: true, get: function () { return search_1.getAppRootFromWebappPath; } });
44
44
  Object.defineProperty(exports, "findCapProjectRoot", { enumerable: true, get: function () { return search_1.findCapProjectRoot; } });
45
45
  Object.defineProperty(exports, "findRootsForPath", { enumerable: true, get: function () { return search_1.findRootsForPath; } });
46
+ Object.defineProperty(exports, "isPathForCapApp", { enumerable: true, get: function () { return search_1.isPathForCapApp; } });
46
47
  var ui5_config_1 = require("./ui5-config");
47
48
  Object.defineProperty(exports, "getWebappPath", { enumerable: true, get: function () { return ui5_config_1.getWebappPath; } });
48
49
  Object.defineProperty(exports, "readUi5Yaml", { enumerable: true, get: function () { return ui5_config_1.readUi5Yaml; } });
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMinimumUI5Version = exports.getMinUI5VersionAsArray = exports.getMinUI5VersionFromManifest = exports.getProjectType = exports.getAppType = exports.getAppProgrammingLanguage = exports.getProject = void 0;
3
+ exports.getProject = getProject;
4
+ exports.getAppProgrammingLanguage = getAppProgrammingLanguage;
5
+ exports.getAppType = getAppType;
6
+ exports.getProjectType = getProjectType;
7
+ exports.getMinUI5VersionFromManifest = getMinUI5VersionFromManifest;
8
+ exports.getMinUI5VersionAsArray = getMinUI5VersionAsArray;
9
+ exports.getMinimumUI5Version = getMinimumUI5Version;
4
10
  const path_1 = require("path");
5
11
  const constants_1 = require("../constants");
6
12
  const file_1 = require("../file");
@@ -30,7 +36,6 @@ async function getProject(root) {
30
36
  apps
31
37
  };
32
38
  }
33
- exports.getProject = getProject;
34
39
  /**
35
40
  * Returns the applications for the project. For single app
36
41
  * projects, this is just an array with one empty string. For CAP projects, this is an
@@ -117,7 +122,6 @@ async function getAppProgrammingLanguage(appRoot, memFs) {
117
122
  }
118
123
  return appLanguage;
119
124
  }
120
- exports.getAppProgrammingLanguage = getAppProgrammingLanguage;
121
125
  /**
122
126
  * Get the type of application or Fiori artifact.
123
127
  *
@@ -155,7 +159,6 @@ async function getAppType(appRoot) {
155
159
  }
156
160
  return appType;
157
161
  }
158
- exports.getAppType = getAppType;
159
162
  /**
160
163
  * Get the application type from search results.
161
164
  *
@@ -194,7 +197,6 @@ async function getProjectType(projectRoot) {
194
197
  }
195
198
  return capType;
196
199
  }
197
- exports.getProjectType = getProjectType;
198
200
  /**
199
201
  * Returns the minUI5Version, as defined in manifest.
200
202
  *
@@ -208,7 +210,6 @@ function getMinUI5VersionFromManifest(manifest) {
208
210
  }
209
211
  return undefined;
210
212
  }
211
- exports.getMinUI5VersionFromManifest = getMinUI5VersionFromManifest;
212
213
  /**
213
214
  * Returns the valid minUI5Version(s) as string[].
214
215
  *
@@ -229,7 +230,6 @@ function getMinUI5VersionAsArray(manifest, noValidation = false) {
229
230
  }
230
231
  return result;
231
232
  }
232
- exports.getMinUI5VersionAsArray = getMinUI5VersionAsArray;
233
233
  /**
234
234
  * Returns the minUI5Version in string format (if valid).
235
235
  * If it is defined as an array, returns the minimum valid version from it.
@@ -249,5 +249,4 @@ function getMinimumUI5Version(manifest) {
249
249
  }
250
250
  return result;
251
251
  }
252
- exports.getMinimumUI5Version = getMinimumUI5Version;
253
252
  //# sourceMappingURL=info.js.map
@@ -23,7 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.deleteModule = exports.getModule = exports.loadModuleFromProject = exports.getModulePath = void 0;
26
+ exports.getModulePath = getModulePath;
27
+ exports.loadModuleFromProject = loadModuleFromProject;
28
+ exports.getModule = getModule;
29
+ exports.deleteModule = deleteModule;
27
30
  const fs_1 = require("fs");
28
31
  const promises_1 = require("fs/promises");
29
32
  const path_1 = require("path");
@@ -43,7 +46,6 @@ async function getModulePath(projectRoot, moduleName) {
43
46
  }
44
47
  return require.resolve(moduleName, { paths: [projectRoot] });
45
48
  }
46
- exports.getModulePath = getModulePath;
47
49
  /**
48
50
  * Load module from project or app. Throws error if module is not installed.
49
51
  *
@@ -68,7 +70,6 @@ async function loadModuleFromProject(projectRoot, moduleName) {
68
70
  }
69
71
  return module;
70
72
  }
71
- exports.loadModuleFromProject = loadModuleFromProject;
72
73
  /**
73
74
  * Get a module, if it is not cached it will be installed and returned.
74
75
  *
@@ -92,7 +93,6 @@ async function getModule(module, version, options) {
92
93
  }
93
94
  return loadModuleFromProject(moduleDirectory, module);
94
95
  }
95
- exports.getModule = getModule;
96
96
  /**
97
97
  * Delete a module from cache.
98
98
  *
@@ -105,5 +105,4 @@ async function deleteModule(module, version) {
105
105
  await (0, promises_1.rm)(moduleDirectory, { recursive: true });
106
106
  }
107
107
  }
108
- exports.deleteModule = deleteModule;
109
108
  //# sourceMappingURL=module-loader.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMtaPath = void 0;
3
+ exports.getMtaPath = getMtaPath;
4
4
  const file_search_1 = require("../file/file-search");
5
5
  const constants_1 = require("../constants");
6
6
  const path_1 = require("path");
@@ -28,5 +28,4 @@ async function getMtaPath(projectPath, fs) {
28
28
  };
29
29
  }
30
30
  }
31
- exports.getMtaPath = getMtaPath;
32
31
  //# sourceMappingURL=mta.js.map
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.hasUI5CliV3 = exports.updatePackageScript = void 0;
6
+ exports.updatePackageScript = updatePackageScript;
7
+ exports.hasUI5CliV3 = hasUI5CliV3;
7
8
  const path_1 = require("path");
8
9
  const constants_1 = require("../constants");
9
10
  const file_1 = require("../file");
@@ -25,7 +26,6 @@ async function updatePackageScript(basePath, scriptName, script, fs) {
25
26
  packageJson.scripts[scriptName] = script;
26
27
  await (0, file_1.updatePackageJSON)(filePath, packageJson, fs);
27
28
  }
28
- exports.updatePackageScript = updatePackageScript;
29
29
  /**
30
30
  * Check if dev dependencies contains @ui5/cli version greater than 2.
31
31
  *
@@ -40,5 +40,4 @@ function hasUI5CliV3(devDependencies) {
40
40
  }
41
41
  return isV3;
42
42
  }
43
- exports.hasUI5CliV3 = hasUI5CliV3;
44
43
  //# sourceMappingURL=script.js.map
@@ -72,4 +72,12 @@ export declare function findFioriArtifacts(options: {
72
72
  export declare function findCapProjects(options: {
73
73
  readonly wsFolders: WorkspaceFolder[] | string[];
74
74
  }): Promise<string[]>;
75
+ /**
76
+ * Returns true if the specified target path contains a CAP project.
77
+ * Checks sub and root directories.
78
+ *
79
+ * @param targetDir the target directory path.
80
+ * @returns true if CAP Project is in the directory or false if not.
81
+ */
82
+ export declare function isPathForCapApp(targetDir: string): Promise<string | boolean>;
75
83
  //# sourceMappingURL=search.d.ts.map
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findCapProjects = exports.findFioriArtifacts = exports.findAllApps = exports.findCapProjectRoot = exports.findRootsForPath = exports.getAppRootFromWebappPath = exports.findProjectRoot = void 0;
3
+ exports.findProjectRoot = findProjectRoot;
4
+ exports.getAppRootFromWebappPath = getAppRootFromWebappPath;
5
+ exports.findRootsForPath = findRootsForPath;
6
+ exports.findCapProjectRoot = findCapProjectRoot;
7
+ exports.findAllApps = findAllApps;
8
+ exports.findFioriArtifacts = findFioriArtifacts;
9
+ exports.findCapProjects = findCapProjects;
10
+ exports.isPathForCapApp = isPathForCapApp;
4
11
  const path_1 = require("path");
5
12
  const constants_1 = require("../constants");
6
13
  const file_1 = require("../file");
@@ -79,7 +86,6 @@ async function findProjectRoot(path, sapuxRequired = true, silent = false) {
79
86
  }
80
87
  return root;
81
88
  }
82
- exports.findProjectRoot = findProjectRoot;
83
89
  /**
84
90
  * Find app root and project root from given paths and sapux entry.
85
91
  *
@@ -129,7 +135,6 @@ async function getAppRootFromWebappPath(webappPath) {
129
135
  }
130
136
  return appRoot;
131
137
  }
132
- exports.getAppRootFromWebappPath = getAppRootFromWebappPath;
133
138
  /**
134
139
  * Find the app root and project root folder for a given path. In case of apps in non CAP projects they are the same.
135
140
  * This function also validates if an app is supported by tools considering Fiori elements apps and SAPUI5
@@ -186,7 +191,6 @@ async function findRootsForPath(path) {
186
191
  }
187
192
  return null;
188
193
  }
189
- exports.findRootsForPath = findRootsForPath;
190
194
  /**
191
195
  * Find CAP project root path.
192
196
  *
@@ -204,7 +208,7 @@ async function findCapProjectRoot(path) {
204
208
  if (await (0, cap_1.getCapProjectType)(projectRoot)) {
205
209
  // We have found a CAP project as root. Check if the found app is not directly in CAP's 'app/' folder.
206
210
  // Sometime there is a <CAP_ROOT>/app/package.json file that is used for app router (not an app)
207
- if ((0, path_1.join)(projectRoot, 'app') !== path) {
211
+ if ((0, path_1.join)(projectRoot, 'app') !== path || (0, path_1.join)(projectRoot, 'app', path_1.sep) !== path) {
208
212
  return projectRoot;
209
213
  }
210
214
  }
@@ -216,7 +220,6 @@ async function findCapProjectRoot(path) {
216
220
  }
217
221
  return null;
218
222
  }
219
- exports.findCapProjectRoot = findCapProjectRoot;
220
223
  /**
221
224
  * Find all app that are supported by Fiori tools for a given list of roots (workspace folders).
222
225
  * This is a convenient function to retrieve all apps. Same result can be achieved with call
@@ -229,7 +232,6 @@ async function findAllApps(wsFolders) {
229
232
  const findResults = await findFioriArtifacts({ wsFolders, artifacts: ['applications'] });
230
233
  return findResults.applications ?? [];
231
234
  }
232
- exports.findAllApps = findAllApps;
233
235
  /**
234
236
  * Filter Fiori apps from a list of files.
235
237
  *
@@ -415,7 +417,6 @@ async function findFioriArtifacts(options) {
415
417
  }
416
418
  return results;
417
419
  }
418
- exports.findFioriArtifacts = findFioriArtifacts;
419
420
  /**
420
421
  * Find all CAP project roots by locating pom.xml or package.json in a given workspace.
421
422
  *
@@ -454,5 +455,16 @@ async function findCapProjects(options) {
454
455
  }
455
456
  return Array.from(result);
456
457
  }
457
- exports.findCapProjects = findCapProjects;
458
+ /**
459
+ * Returns true if the specified target path contains a CAP project.
460
+ * Checks sub and root directories.
461
+ *
462
+ * @param targetDir the target directory path.
463
+ * @returns true if CAP Project is in the directory or false if not.
464
+ */
465
+ async function isPathForCapApp(targetDir) {
466
+ // Check if targetDir is a CAP project
467
+ // If not a CAP project root, check if the CAP root is in the subdirectories
468
+ return !!(await (0, cap_1.getCapProjectType)(targetDir)) || !!(await findCapProjectRoot(targetDir));
469
+ }
458
470
  //# sourceMappingURL=search.js.map
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.filterDataSourcesByType = exports.getServicesAndAnnotations = exports.getMainService = void 0;
3
+ exports.getMainService = getMainService;
4
+ exports.getServicesAndAnnotations = getServicesAndAnnotations;
5
+ exports.filterDataSourcesByType = filterDataSourcesByType;
4
6
  const path_1 = require("path");
5
7
  const file_1 = require("../file");
6
8
  /**
@@ -17,7 +19,6 @@ function getMainService(manifest) {
17
19
  ? manifest['sap.ui5'].models[model].dataSource
18
20
  : undefined;
19
21
  }
20
- exports.getMainService = getMainService;
21
22
  /**
22
23
  * Return the service annotation specification for a specific app.
23
24
  *
@@ -38,7 +39,6 @@ async function getServicesAndAnnotations(manifestPath, manifest) {
38
39
  }
39
40
  return services;
40
41
  }
41
- exports.getServicesAndAnnotations = getServicesAndAnnotations;
42
42
  /**
43
43
  * Get the service specification for a given service.
44
44
  *
@@ -84,5 +84,4 @@ function getServiceSpecification(webappFolder, name, dataSources) {
84
84
  function filterDataSourcesByType(dataSources, type) {
85
85
  return Object.fromEntries(Object.entries(dataSources).filter(([, data]) => data.type === type));
86
86
  }
87
- exports.filterDataSourcesByType = filterDataSourcesByType;
88
87
  //# sourceMappingURL=service.js.map
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSpecificationPath = exports.refreshSpecificationDistTags = exports.getSpecification = void 0;
3
+ exports.getSpecification = getSpecification;
4
+ exports.refreshSpecificationDistTags = refreshSpecificationDistTags;
5
+ exports.getSpecificationPath = getSpecificationPath;
4
6
  const fs_1 = require("fs");
5
7
  const promises_1 = require("fs/promises");
6
8
  const path_1 = require("path");
@@ -92,7 +94,6 @@ async function getSpecification(root, options) {
92
94
  }
93
95
  return await getSpecificationModule(root, { logger });
94
96
  }
95
- exports.getSpecification = getSpecification;
96
97
  /**
97
98
  * Refreshes the specification dist-tags cache. Also cleans specification modules in cache that are not required anymore.
98
99
  *
@@ -126,7 +127,6 @@ async function refreshSpecificationDistTags(options) {
126
127
  logger?.error(`Error refreshing specification dist-tags: ${error}`);
127
128
  }
128
129
  }
129
- exports.refreshSpecificationDistTags = refreshSpecificationDistTags;
130
130
  /**
131
131
  * Loads and return specification from cache by version.
132
132
  *
@@ -195,5 +195,4 @@ async function getSpecificationPath(root, options) {
195
195
  const modulePath = await (0, module_loader_1.getModulePath)(moduleRoot, moduleName);
196
196
  return modulePath.slice(0, modulePath.lastIndexOf((0, path_1.join)(moduleName)) + (0, path_1.join)(moduleName).length);
197
197
  }
198
- exports.getSpecificationPath = getSpecificationPath;
199
198
  //# sourceMappingURL=specification.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readUi5Yaml = exports.getWebappPath = void 0;
3
+ exports.getWebappPath = getWebappPath;
4
+ exports.readUi5Yaml = readUi5Yaml;
4
5
  const path_1 = require("path");
5
6
  const ui5_config_1 = require("@sap-ux/ui5-config");
6
7
  const constants_1 = require("../constants");
@@ -25,7 +26,6 @@ async function getWebappPath(projectRoot, memFs) {
25
26
  }
26
27
  return webappPath;
27
28
  }
28
- exports.getWebappPath = getWebappPath;
29
29
  /**
30
30
  * Checks if UI5 config yaml file exists and returns its content.
31
31
  *
@@ -42,5 +42,4 @@ async function readUi5Yaml(projectRoot, fileName, memFs) {
42
42
  }
43
43
  throw Error(`File '${fileName}' not found in project '${projectRoot}'`);
44
44
  }
45
- exports.readUi5Yaml = readUi5Yaml;
46
45
  //# sourceMappingURL=ui5-config.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-ux/project-access",
3
- "version": "1.27.4",
3
+ "version": "1.27.6",
4
4
  "description": "Library to access SAP Fiori tools projects",
5
5
  "repository": {
6
6
  "type": "git",