UNPKG

sfdx-experiences-plugin

Version:
19 lines 755 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const fs_1 = require("fs"); const core_1 = require("./core"); /** * Returns the names of all route files in the given bundle path. * * @param {string} bundlePath Path to the bundle. * @returns {string[]} Names of all route files in the bundle path. */ function getRoutesFileNames(bundlePath) { const routesPath = core_1.getRoutesPath(bundlePath); if (!fs_1.existsSync(routesPath)) { throw new Error(`Routes directory does not exist: ${routesPath}`); } return fs_1.readdirSync(routesPath).filter(file => file.toLowerCase().endsWith('.json')); } exports.default = getRoutesFileNames; //# sourceMappingURL=get-routes-file-names.js.map