@sap-ux/project-access
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -49,2 +49,10 @@ import type { Editor } from 'mem-fs-editor'; | ||
export declare function findFileUp(fileName: string, startPath: string, fs?: Editor): Promise<string | undefined>; | ||
/** | ||
* @description Returns a flat list of all file paths under a directory tree, | ||
* recursing through all subdirectories | ||
* @param {string} dir - the directory to walk | ||
* @returns {string[]} - array of file path strings | ||
* @throws if an error occurs reading a file path | ||
*/ | ||
export declare function getFilePaths(dir: string): Promise<string[] | []>; | ||
//# sourceMappingURL=file-search.d.ts.map |
@@ -15,6 +15,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findFileUp = exports.findFilesByExtension = exports.findFiles = exports.findBy = void 0; | ||
exports.getFilePaths = exports.findFileUp = exports.findFilesByExtension = exports.findFiles = exports.findBy = void 0; | ||
const path_1 = require("path"); | ||
const findit2_1 = __importDefault(require("findit2")); | ||
const file_access_1 = require("./file-access"); | ||
const fs_1 = require("fs"); | ||
/** | ||
@@ -135,2 +136,22 @@ * Get deleted and modified files from mem-fs editor filtered by query and 'by' (name|extension). | ||
exports.findFileUp = findFileUp; | ||
/** | ||
* @description Returns a flat list of all file paths under a directory tree, | ||
* recursing through all subdirectories | ||
* @param {string} dir - the directory to walk | ||
* @returns {string[]} - array of file path strings | ||
* @throws if an error occurs reading a file path | ||
*/ | ||
function getFilePaths(dir) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const entries = yield fs_1.promises.readdir(dir); | ||
const filePathsPromises = entries.map((entry) => __awaiter(this, void 0, void 0, function* () { | ||
const entryPath = (0, path_1.join)(dir, entry); | ||
const isDirectory = (yield fs_1.promises.stat(entryPath)).isDirectory(); | ||
return isDirectory ? getFilePaths(entryPath) : entryPath; | ||
})); | ||
const filePaths = yield Promise.all(filePathsPromises); | ||
return [].concat(...filePaths); | ||
}); | ||
} | ||
exports.getFilePaths = getFilePaths; | ||
//# sourceMappingURL=file-search.js.map |
export { fileExists, readFile, readJSON } from './file-access'; | ||
export { findBy, findFiles, findFilesByExtension, findFileUp } from './file-search'; | ||
export { findBy, findFiles, findFilesByExtension, findFileUp, getFilePaths } from './file-search'; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findFileUp = exports.findFilesByExtension = exports.findFiles = exports.findBy = exports.readJSON = exports.readFile = exports.fileExists = void 0; | ||
exports.getFilePaths = exports.findFileUp = exports.findFilesByExtension = exports.findFiles = exports.findBy = exports.readJSON = exports.readFile = exports.fileExists = void 0; | ||
var file_access_1 = require("./file-access"); | ||
@@ -13,2 +13,3 @@ Object.defineProperty(exports, "fileExists", { enumerable: true, get: function () { return file_access_1.fileExists; } }); | ||
Object.defineProperty(exports, "findFileUp", { enumerable: true, get: function () { return file_search_1.findFileUp; } }); | ||
Object.defineProperty(exports, "getFilePaths", { enumerable: true, get: function () { return file_search_1.getFilePaths; } }); | ||
//# sourceMappingURL=index.js.map |
export { FileName } from './constants'; | ||
export { findAllApps, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, getAppProgrammingLanguage, getCapEnvironment, getCapModelAndServices, getCapProjectType, getWebappPath, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject, readUi5Yaml } from './project'; | ||
export { getFilePaths } from './file'; | ||
export * from './types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readUi5Yaml = exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getWebappPath = exports.getCapProjectType = exports.getCapModelAndServices = exports.getCapEnvironment = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findAllApps = exports.FileName = void 0; | ||
exports.getFilePaths = exports.readUi5Yaml = exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getWebappPath = exports.getCapProjectType = exports.getCapModelAndServices = exports.getCapEnvironment = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findFioriArtifacts = exports.findAllApps = exports.FileName = void 0; | ||
var constants_1 = require("./constants"); | ||
@@ -35,3 +35,5 @@ Object.defineProperty(exports, "FileName", { enumerable: true, get: function () { return constants_1.FileName; } }); | ||
Object.defineProperty(exports, "readUi5Yaml", { enumerable: true, get: function () { return project_1.readUi5Yaml; } }); | ||
var file_1 = require("./file"); | ||
Object.defineProperty(exports, "getFilePaths", { enumerable: true, get: function () { return file_1.getFilePaths; } }); | ||
__exportStar(require("./types"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sap-ux/project-access", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Library to access SAP Fiori tools projects", | ||
@@ -27,6 +27,6 @@ "repository": { | ||
"dependencies": { | ||
"@sap-ux/ui5-config": "0.16.6", | ||
"findit2": "2.2.3", | ||
"mem-fs": "2.1.0", | ||
"mem-fs-editor": "9.4.0" | ||
"mem-fs-editor": "9.4.0", | ||
"@sap-ux/ui5-config": "0.17.0" | ||
}, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105245
2125
4
+ Added@sap-ux/ui5-config@0.17.0(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addedsemver@7.3.5(transitive)
+ Addedyallist@4.0.0(transitive)
- Removed@sap-ux/ui5-config@0.16.6(transitive)
Updated@sap-ux/ui5-config@0.17.0