@sap-ux/project-access 1.17.6 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { FileName } from './constants';
2
2
  export { getFilePaths } from './file';
3
- export { createApplicationAccess, createProjectAccess, findAllApps, findCapProjects, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, getAppProgrammingLanguage, getAppType, getCapCustomPaths, getCapEnvironment, getCapModelAndServices, getCapProjectType, getCdsFiles, getCdsRoots, getCdsServices, getCapI18nFolderNames, getI18nPropertiesPaths, getMtaPath, getNodeModulesPath, getProject, getProjectType, getWebappPath, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject, readCapServiceMetadataEdmx, readUi5Yaml, toReferenceUri } from './project';
3
+ export { createApplicationAccess, createProjectAccess, findAllApps, findCapProjects, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, getAppProgrammingLanguage, getAppType, getCapCustomPaths, getCapEnvironment, getCapModelAndServices, getCapProjectType, getCdsFiles, getCdsRoots, getCdsServices, getCapI18nFolderNames, getI18nPropertiesPaths, getMtaPath, getNodeModulesPath, getProject, getProjectType, getWebappPath, isCapProject, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject, readCapServiceMetadataEdmx, readUi5Yaml, toReferenceUri } from './project';
4
4
  export * from './types';
5
5
  //# 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.toReferenceUri = exports.readUi5Yaml = exports.readCapServiceMetadataEdmx = exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getWebappPath = exports.getProjectType = exports.getProject = exports.getNodeModulesPath = exports.getMtaPath = exports.getI18nPropertiesPaths = exports.getCapI18nFolderNames = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapProjectType = exports.getCapModelAndServices = exports.getCapEnvironment = exports.getCapCustomPaths = exports.getAppType = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findCapProjects = exports.findAllApps = exports.createProjectAccess = exports.createApplicationAccess = exports.getFilePaths = exports.FileName = void 0;
17
+ exports.toReferenceUri = exports.readUi5Yaml = exports.readCapServiceMetadataEdmx = exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.isCapProject = exports.getWebappPath = exports.getProjectType = exports.getProject = exports.getNodeModulesPath = exports.getMtaPath = exports.getI18nPropertiesPaths = exports.getCapI18nFolderNames = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapProjectType = exports.getCapModelAndServices = exports.getCapEnvironment = exports.getCapCustomPaths = exports.getAppType = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findCapProjects = exports.findAllApps = exports.createProjectAccess = exports.createApplicationAccess = exports.getFilePaths = 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
  var file_1 = require("./file");
@@ -43,6 +43,7 @@ Object.defineProperty(exports, "getNodeModulesPath", { enumerable: true, get: fu
43
43
  Object.defineProperty(exports, "getProject", { enumerable: true, get: function () { return project_1.getProject; } });
44
44
  Object.defineProperty(exports, "getProjectType", { enumerable: true, get: function () { return project_1.getProjectType; } });
45
45
  Object.defineProperty(exports, "getWebappPath", { enumerable: true, get: function () { return project_1.getWebappPath; } });
46
+ Object.defineProperty(exports, "isCapProject", { enumerable: true, get: function () { return project_1.isCapProject; } });
46
47
  Object.defineProperty(exports, "isCapJavaProject", { enumerable: true, get: function () { return project_1.isCapJavaProject; } });
47
48
  Object.defineProperty(exports, "isCapNodeJsProject", { enumerable: true, get: function () { return project_1.isCapNodeJsProject; } });
48
49
  Object.defineProperty(exports, "loadModuleFromProject", { enumerable: true, get: function () { return project_1.loadModuleFromProject; } });
@@ -27,6 +27,13 @@ export declare function isCapJavaProject(projectRoot: string, capCustomPaths?: C
27
27
  * @returns - CAPJava for Java based CAP projects; CAPNodejs for node.js based CAP projects; undefined if it is no CAP project
28
28
  */
29
29
  export declare function getCapProjectType(projectRoot: string): Promise<CapProjectType | undefined>;
30
+ /**
31
+ * Returns true if the project is either a CAP Node.js or a CAP Java project.
32
+ *
33
+ * @param projectRoot - the root path of the project
34
+ * @returns - true if the project is a CAP project
35
+ */
36
+ export declare function isCapProject(projectRoot: string): Promise<boolean>;
30
37
  /**
31
38
  * Get CAP CDS project custom paths for project root.
32
39
  *
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.toReferenceUri = exports.toAbsoluteUri = exports.getCapEnvironment = exports.readCapServiceMetadataEdmx = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapModelAndServices = exports.getCapCustomPaths = exports.getCapProjectType = exports.isCapJavaProject = exports.isCapNodeJsProject = void 0;
12
+ exports.toReferenceUri = exports.toAbsoluteUri = exports.getCapEnvironment = exports.readCapServiceMetadataEdmx = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapModelAndServices = exports.getCapCustomPaths = exports.isCapProject = exports.getCapProjectType = exports.isCapJavaProject = exports.isCapNodeJsProject = void 0;
13
13
  const child_process_1 = require("child_process");
14
14
  const path_1 = require("path");
15
15
  const constants_1 = require("../constants");
@@ -70,6 +70,18 @@ function getCapProjectType(projectRoot) {
70
70
  });
71
71
  }
72
72
  exports.getCapProjectType = getCapProjectType;
73
+ /**
74
+ * Returns true if the project is either a CAP Node.js or a CAP Java project.
75
+ *
76
+ * @param projectRoot - the root path of the project
77
+ * @returns - true if the project is a CAP project
78
+ */
79
+ function isCapProject(projectRoot) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ return !!(yield getCapProjectType(projectRoot));
82
+ });
83
+ }
84
+ exports.isCapProject = isCapProject;
73
85
  /**
74
86
  * Get CAP CDS project custom paths for project root.
75
87
  *
@@ -1,4 +1,4 @@
1
- export { getCapCustomPaths, getCapModelAndServices, getCapProjectType, getCdsFiles, getCdsRoots, getCdsServices, isCapJavaProject, isCapNodeJsProject, getCapEnvironment, readCapServiceMetadataEdmx, toReferenceUri } from './cap';
1
+ export { getCapCustomPaths, getCapModelAndServices, getCapProjectType, getCdsFiles, getCdsRoots, getCdsServices, isCapProject, isCapJavaProject, isCapNodeJsProject, getCapEnvironment, readCapServiceMetadataEdmx, toReferenceUri } from './cap';
2
2
  export { getNodeModulesPath } from './dependencies';
3
3
  export { getCapI18nFolderNames, getI18nPropertiesPaths } from './i18n';
4
4
  export { getAppProgrammingLanguage, getAppType, getProject, getProjectType } from './info';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createProjectAccess = exports.createApplicationAccess = exports.getMtaPath = exports.readUi5Yaml = exports.getWebappPath = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findCapProjects = exports.findAllApps = exports.loadModuleFromProject = exports.getProjectType = exports.getProject = exports.getAppType = exports.getAppProgrammingLanguage = exports.getI18nPropertiesPaths = exports.getCapI18nFolderNames = exports.getNodeModulesPath = exports.toReferenceUri = exports.readCapServiceMetadataEdmx = exports.getCapEnvironment = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapProjectType = exports.getCapModelAndServices = exports.getCapCustomPaths = void 0;
3
+ exports.createProjectAccess = exports.createApplicationAccess = exports.getMtaPath = exports.readUi5Yaml = exports.getWebappPath = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findCapProjects = exports.findAllApps = exports.loadModuleFromProject = exports.getProjectType = exports.getProject = exports.getAppType = exports.getAppProgrammingLanguage = exports.getI18nPropertiesPaths = exports.getCapI18nFolderNames = exports.getNodeModulesPath = exports.toReferenceUri = exports.readCapServiceMetadataEdmx = exports.getCapEnvironment = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.isCapProject = exports.getCdsServices = exports.getCdsRoots = exports.getCdsFiles = exports.getCapProjectType = exports.getCapModelAndServices = exports.getCapCustomPaths = void 0;
4
4
  var cap_1 = require("./cap");
5
5
  Object.defineProperty(exports, "getCapCustomPaths", { enumerable: true, get: function () { return cap_1.getCapCustomPaths; } });
6
6
  Object.defineProperty(exports, "getCapModelAndServices", { enumerable: true, get: function () { return cap_1.getCapModelAndServices; } });
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "getCapProjectType", { enumerable: true, get: fun
8
8
  Object.defineProperty(exports, "getCdsFiles", { enumerable: true, get: function () { return cap_1.getCdsFiles; } });
9
9
  Object.defineProperty(exports, "getCdsRoots", { enumerable: true, get: function () { return cap_1.getCdsRoots; } });
10
10
  Object.defineProperty(exports, "getCdsServices", { enumerable: true, get: function () { return cap_1.getCdsServices; } });
11
+ Object.defineProperty(exports, "isCapProject", { enumerable: true, get: function () { return cap_1.isCapProject; } });
11
12
  Object.defineProperty(exports, "isCapJavaProject", { enumerable: true, get: function () { return cap_1.isCapJavaProject; } });
12
13
  Object.defineProperty(exports, "isCapNodeJsProject", { enumerable: true, get: function () { return cap_1.isCapNodeJsProject; } });
13
14
  Object.defineProperty(exports, "getCapEnvironment", { enumerable: true, get: function () { return cap_1.getCapEnvironment; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-ux/project-access",
3
- "version": "1.17.6",
3
+ "version": "1.18.0",
4
4
  "description": "Library to access SAP Fiori tools projects",
5
5
  "repository": {
6
6
  "type": "git",