Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/project-access

Package Overview
Dependencies
Maintainers
3
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/project-access - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

8

dist/file/file-search.d.ts

@@ -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

23

dist/file/file-search.js

@@ -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

2

dist/file/index.d.ts
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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc