Files
twenty/packages/twenty-sdk/src/cli/utilities/build/functions/function-paths.ts
T

11 lines
322 B
TypeScript

export const computeFunctionOutputPath = (handlerPath: string): string => {
const normalizedPath = handlerPath.replace(/\\/g, '/');
let relativePath = normalizedPath;
if (relativePath.startsWith('src/')) {
relativePath = relativePath.slice('src/'.length);
}
return relativePath.replace(/\.ts$/, '.js');
};