@sap-ux/project-access 1.27.6 → 1.28.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 +1 -1
- package/dist/index.js +1 -2
- package/dist/project/index.d.ts +1 -1
- package/dist/project/index.js +1 -2
- package/dist/project/search.d.ts +2 -9
- package/dist/project/search.js +4 -15
- package/package.json +1 -1
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,
|
|
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';
|
|
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.
|
|
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;
|
|
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,7 +26,6 @@ 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; } });
|
|
30
29
|
Object.defineProperty(exports, "deleteCapApp", { enumerable: true, get: function () { return project_1.deleteCapApp; } });
|
|
31
30
|
Object.defineProperty(exports, "filterDataSourcesByType", { enumerable: true, get: function () { return project_1.filterDataSourcesByType; } });
|
|
32
31
|
Object.defineProperty(exports, "findAllApps", { enumerable: true, get: function () { return project_1.findAllApps; } });
|
package/dist/project/index.d.ts
CHANGED
|
@@ -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
|
|
7
|
+
export { findAllApps, findCapProjects, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, findCapProjectRoot, findRootsForPath } from './search';
|
|
8
8
|
export { getWebappPath, readUi5Yaml } from './ui5-config';
|
|
9
9
|
export { getMtaPath } from './mta';
|
|
10
10
|
export { createApplicationAccess, createProjectAccess } from './access';
|
package/dist/project/index.js
CHANGED
|
@@ -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.
|
|
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;
|
|
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,7 +43,6 @@ 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; } });
|
|
47
46
|
var ui5_config_1 = require("./ui5-config");
|
|
48
47
|
Object.defineProperty(exports, "getWebappPath", { enumerable: true, get: function () { return ui5_config_1.getWebappPath; } });
|
|
49
48
|
Object.defineProperty(exports, "readUi5Yaml", { enumerable: true, get: function () { return ui5_config_1.readUi5Yaml; } });
|
package/dist/project/search.d.ts
CHANGED
|
@@ -38,9 +38,10 @@ export declare function findRootsForPath(path: string): Promise<{
|
|
|
38
38
|
* Find CAP project root path.
|
|
39
39
|
*
|
|
40
40
|
* @param path - path inside CAP project
|
|
41
|
+
* @param checkForAppRouter - if true, checks for app router in CAP project app folder
|
|
41
42
|
* @returns - CAP project root path
|
|
42
43
|
*/
|
|
43
|
-
export declare function findCapProjectRoot(path: string): Promise<string | null>;
|
|
44
|
+
export declare function findCapProjectRoot(path: string, checkForAppRouter?: boolean): Promise<string | null>;
|
|
44
45
|
/**
|
|
45
46
|
* Find all app that are supported by Fiori tools for a given list of roots (workspace folders).
|
|
46
47
|
* This is a convenient function to retrieve all apps. Same result can be achieved with call
|
|
@@ -72,12 +73,4 @@ export declare function findFioriArtifacts(options: {
|
|
|
72
73
|
export declare function findCapProjects(options: {
|
|
73
74
|
readonly wsFolders: WorkspaceFolder[] | string[];
|
|
74
75
|
}): 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>;
|
|
83
76
|
//# sourceMappingURL=search.d.ts.map
|
package/dist/project/search.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.findCapProjectRoot = findCapProjectRoot;
|
|
|
7
7
|
exports.findAllApps = findAllApps;
|
|
8
8
|
exports.findFioriArtifacts = findFioriArtifacts;
|
|
9
9
|
exports.findCapProjects = findCapProjects;
|
|
10
|
-
exports.isPathForCapApp = isPathForCapApp;
|
|
11
10
|
const path_1 = require("path");
|
|
12
11
|
const constants_1 = require("../constants");
|
|
13
12
|
const file_1 = require("../file");
|
|
@@ -195,9 +194,10 @@ async function findRootsForPath(path) {
|
|
|
195
194
|
* Find CAP project root path.
|
|
196
195
|
*
|
|
197
196
|
* @param path - path inside CAP project
|
|
197
|
+
* @param checkForAppRouter - if true, checks for app router in CAP project app folder
|
|
198
198
|
* @returns - CAP project root path
|
|
199
199
|
*/
|
|
200
|
-
async function findCapProjectRoot(path) {
|
|
200
|
+
async function findCapProjectRoot(path, checkForAppRouter = true) {
|
|
201
201
|
try {
|
|
202
202
|
if (!(0, path_1.isAbsolute)(path)) {
|
|
203
203
|
return null;
|
|
@@ -208,7 +208,8 @@ async function findCapProjectRoot(path) {
|
|
|
208
208
|
if (await (0, cap_1.getCapProjectType)(projectRoot)) {
|
|
209
209
|
// We have found a CAP project as root. Check if the found app is not directly in CAP's 'app/' folder.
|
|
210
210
|
// Sometime there is a <CAP_ROOT>/app/package.json file that is used for app router (not an app)
|
|
211
|
-
|
|
211
|
+
// or skip app router check if checkForAppRouter is false and return the project root.
|
|
212
|
+
if ((checkForAppRouter && (0, path_1.join)(projectRoot, 'app') !== path) || !checkForAppRouter) {
|
|
212
213
|
return projectRoot;
|
|
213
214
|
}
|
|
214
215
|
}
|
|
@@ -455,16 +456,4 @@ async function findCapProjects(options) {
|
|
|
455
456
|
}
|
|
456
457
|
return Array.from(result);
|
|
457
458
|
}
|
|
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
|
-
}
|
|
470
459
|
//# sourceMappingURL=search.js.map
|