Add gRPC support (#5148)

This commit is contained in:
sanish chirayath
2025-08-20 16:24:49 +05:30
committed by GitHub
parent e5a608f962
commit efb2e83ad9
102 changed files with 7756 additions and 841 deletions

View File

@@ -9,4 +9,32 @@ const isWindowsOS = () => {
const brunoPath = isWindowsOS() ? path.win32 : path.posix;
const getRelativePath = (absolutePath, collectionPath) => {
try {
const relativePath = brunoPath.relative(collectionPath, absolutePath);
return relativePath || absolutePath;
} catch (error) {
return absolutePath;
}
};
const getBasename = (filePath) => {
if (!filePath) {
return '';
}
const parts = filePath.split(path.sep);
return parts[parts.length - 1];
};
const getDirPath = (filePath) => {
const parts = filePath.split(path.sep);
parts.pop();
return parts.join(path.sep);
};
const getAbsoluteFilePath = (filePath, collectionPath) => {
return brunoPath.resolve(collectionPath, filePath);
};
export default brunoPath;
export { getRelativePath, getBasename, getDirPath, getAbsoluteFilePath };