diff --git a/.eslintrc.js b/.eslintrc.js index a710d04b5..c456b2910 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -56,7 +56,7 @@ module.exports = { "jsdoc/require-returns": 0, "jsdoc/require-returns-description": 0, "jsdoc/require-returns-type": 2, - "jsdoc/valid-types": 2 + "jsdoc/valid-types": 0 }, "settings": { "jsdoc": { diff --git a/index.js b/index.js index be372dc67..59f3eaf65 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,8 @@ module.exports = { builder: require("./lib/builder/builder"), /** * @public - * @see @ui5/builder.processors + * @see module:@ui5/builder.processors + * @namespace */ processors: { flexChangesBundler: require("./lib/processors/bundlers/flexChangesBundler"), @@ -22,7 +23,8 @@ module.exports = { }, /** * @public - * @see @ui5/builder.tasks + * @see module:@ui5/builder.tasks + * @namespace */ tasks: { generateComponentPreload: require("./lib/tasks/bundlers/generateComponentPreload"), @@ -42,7 +44,8 @@ module.exports = { }, /** * @private - * @see @ui5/builder.types + * @see module:@ui5/builder.types + * @namespace */ types: { AbstractBuilder: require("./lib/types/AbstractBuilder"), @@ -53,15 +56,3 @@ module.exports = { } }; -/** - * @public - * @namespace @ui5/builder.processors - */ -/** - * @public - * @namespace @ui5/builder.tasks - */ -/** - * @private - * @namespace @ui5/builder.types - */ diff --git a/lib/builder/builder.js b/lib/builder/builder.js index 0012447a8..01307c6e0 100644 --- a/lib/builder/builder.js +++ b/lib/builder/builder.js @@ -25,121 +25,6 @@ function getElapsedTime(startTime) { return prettyHrtime(timeDiff); } -/** - * Configures the project build and starts it. - * - * @public - * @alias @ui5/builder.builder - * @param {Object} parameters Parameters - * @param {Object} parameters.tree Dependency tree - * @param {string} parameters.destPath Target path - * @param {boolean} [parameters.buildDependencies=false] Decides whether project dependencies are built as well - * @param {boolean} [parameters.dev=false] Decides whether a development build should be activated (skips non-essential and time-intensive tasks) - * @param {boolean} [parameters.selfContained=false] Flag to activate self contained build - * @param {Array} [parameters.includedTasks=[]] List of tasks to be included - * @param {Array} [parameters.excludedTasks=[]] List of tasks to be excluded. If the wildcard '*' is provided, only the included tasks will be executed. - * @param {Array} [parameters.devExcludeProject=[]] List of projects to be excluded from development build - * @returns {Promise} Promise resolving to undefined once build has finished - */ -function build({tree, destPath, buildDependencies = false, dev = false, selfContained = false, includedTasks = [], excludedTasks = [], devExcludeProject = []}) { - const startTime = process.hrtime(); - log.info(`Building project ${tree.metadata.name}` + (buildDependencies ? "" : " not") + - " including dependencies..." + (dev ? " [dev mode]" : "")); - log.verbose(`Building to ${destPath}...`); - - const selectedTasks = composeTaskList({dev, selfContained, includedTasks, excludedTasks}); - - const fsTarget = resourceFactory.createAdapter({ - fsBasePath: destPath, - virBasePath: "/" - }); - - - const projects = {}; // Unique project index to prevent building the same project multiple times - - const projectCountMarker = {}; - function projectCount(project, count = 0) { - if (buildDependencies) { - count = project.dependencies.reduce((depCount, depProject) => { - return projectCount(depProject, depCount); - }, count); - } - if (!projectCountMarker[project.metadata.name]) { - count++; - projectCountMarker[project.metadata.name] = true; - } - return count; - } - const iProjectCount = projectCount(tree); - const buildLogger = log.createTaskLogger("🛠 ", iProjectCount); - - function buildProject(project) { - let depPromise; - let projectTasks = selectedTasks; - if (buildDependencies) { - // Build dependencies in sequence as it is far easier to detect issues and reduces - // side effects or other issues such as too many open files - depPromise = project.dependencies.reduce(function(p, depProject) { - return p.then(() => buildProject(depProject)); - }, Promise.resolve()); - } else { - depPromise = Promise.resolve(); - } - // Build the project after all dependencies have been built - return depPromise.then(() => { - if (projects[project.metadata.name]) { - return Promise.resolve(); - } else { - projects[project.metadata.name] = true; - } - buildLogger.startWork(`Building project ${project.metadata.name}`); - - const projectType = typeRepository.getType(project.type); - const resourceCollections = resourceFactory.createCollectionsForTree(project, { - useNamespaces: true - }); - - const workspace = resourceFactory.createWorkspace({ - reader: resourceCollections.source, - name: project.metadata.name - }); - - if (dev && devExcludeProject.indexOf(project.metadata.name) !== -1) { - projectTasks = composeTaskList({dev: false, selfContained, includedTasks, excludedTasks}); - } - return projectType.build({ - resourceCollections: { - workspace, - dependencies: resourceCollections.dependencies - }, - tasks: projectTasks, - project, - parentLogger: log - }).then(() => { - log.verbose("Finished building project %s. Writing out files...", project.metadata.name); - buildLogger.completeWork(1); - - return workspace.byGlob("/**/*.*").then((resources) => { - return Promise.all(resources.map((resource) => { - if (project === tree && project.metadata.namespace) { - // Root-project only: Remove namespace prefix if given - resource.setPath(resource.getPath().replace( - new RegExp(`^/resources/${project.metadata.namespace}`), "")); - } - return fsTarget.write(resource); - })); - }); - }); - }); - } - - return buildProject(tree).then(() => { - log.info(`Build succeeded in ${getElapsedTime(startTime)}`); - }, (err) => { - log.error(`Build failed in ${getElapsedTime(startTime)}`); - throw err; - }); -} /** * Creates the list of tasks to be executed by the build process * @@ -218,7 +103,132 @@ function composeTaskList({dev, selfContained, includedTasks, excludedTasks}) { return selectedTasks; } +/** + * Builder + * + * @public + * @namespace + * @alias module:@ui5/builder.builder + */ module.exports = { - build: build, - tasks: definedTasks + tasks: definedTasks, + + /** + * Configures the project build and starts it. + * + * @public + * @param {Object} parameters Parameters + * @param {Object} parameters.tree Dependency tree + * @param {string} parameters.destPath Target path + * @param {boolean} [parameters.buildDependencies=false] Decides whether project dependencies are built as well + * @param {boolean} [parameters.dev=false] Decides whether a development build should be activated (skips non-essential and time-intensive tasks) + * @param {boolean} [parameters.selfContained=false] Flag to activate self contained build + * @param {Array} [parameters.includedTasks=[]] List of tasks to be included + * @param {Array} [parameters.excludedTasks=[]] List of tasks to be excluded. If the wildcard '*' is provided, only the included tasks will be executed. + * @param {Array} [parameters.devExcludeProject=[]] List of projects to be excluded from development build + * @returns {Promise} Promise resolving to undefined once build has finished + */ + build({ + tree, destPath, + buildDependencies = false, dev = false, selfContained = false, + includedTasks = [], excludedTasks = [], devExcludeProject = [] + }) { + const startTime = process.hrtime(); + log.info(`Building project ${tree.metadata.name}` + (buildDependencies ? "" : " not") + + " including dependencies..." + (dev ? " [dev mode]" : "")); + log.verbose(`Building to ${destPath}...`); + + const selectedTasks = composeTaskList({dev, selfContained, includedTasks, excludedTasks}); + + const fsTarget = resourceFactory.createAdapter({ + fsBasePath: destPath, + virBasePath: "/" + }); + + + const projects = {}; // Unique project index to prevent building the same project multiple times + + const projectCountMarker = {}; + function projectCount(project, count = 0) { + if (buildDependencies) { + count = project.dependencies.reduce((depCount, depProject) => { + return projectCount(depProject, depCount); + }, count); + } + if (!projectCountMarker[project.metadata.name]) { + count++; + projectCountMarker[project.metadata.name] = true; + } + return count; + } + const iProjectCount = projectCount(tree); + const buildLogger = log.createTaskLogger("🛠 ", iProjectCount); + + function buildProject(project) { + let depPromise; + let projectTasks = selectedTasks; + if (buildDependencies) { + // Build dependencies in sequence as it is far easier to detect issues and reduces + // side effects or other issues such as too many open files + depPromise = project.dependencies.reduce(function(p, depProject) { + return p.then(() => buildProject(depProject)); + }, Promise.resolve()); + } else { + depPromise = Promise.resolve(); + } + // Build the project after all dependencies have been built + return depPromise.then(() => { + if (projects[project.metadata.name]) { + return Promise.resolve(); + } else { + projects[project.metadata.name] = true; + } + buildLogger.startWork(`Building project ${project.metadata.name}`); + + const projectType = typeRepository.getType(project.type); + const resourceCollections = resourceFactory.createCollectionsForTree(project, { + useNamespaces: true + }); + + const workspace = resourceFactory.createWorkspace({ + reader: resourceCollections.source, + name: project.metadata.name + }); + + if (dev && devExcludeProject.indexOf(project.metadata.name) !== -1) { + projectTasks = composeTaskList({dev: false, selfContained, includedTasks, excludedTasks}); + } + return projectType.build({ + resourceCollections: { + workspace, + dependencies: resourceCollections.dependencies + }, + tasks: projectTasks, + project, + parentLogger: log + }).then(() => { + log.verbose("Finished building project %s. Writing out files...", project.metadata.name); + buildLogger.completeWork(1); + + return workspace.byGlob("/**/*.*").then((resources) => { + return Promise.all(resources.map((resource) => { + if (project === tree && project.metadata.namespace) { + // Root-project only: Remove namespace prefix if given + resource.setPath(resource.getPath().replace( + new RegExp(`^/resources/${project.metadata.namespace}`), "")); + } + return fsTarget.write(resource); + })); + }); + }); + }); + } + + return buildProject(tree).then(() => { + log.info(`Build succeeded in ${getElapsedTime(startTime)}`); + }, (err) => { + log.error(`Build failed in ${getElapsedTime(startTime)}`); + throw err; + }); + } }; diff --git a/lib/lbt/analyzer/analyzeLibraryJS.js b/lib/lbt/analyzer/analyzeLibraryJS.js index 45bb12f26..364d0625f 100644 --- a/lib/lbt/analyzer/analyzeLibraryJS.js +++ b/lib/lbt/analyzer/analyzeLibraryJS.js @@ -83,7 +83,7 @@ async function analyze(resource) { * * Note: only the first initLibrary() call that is found with a DFS on the AST, will be evaluated. * - * @param {Resource} resource library.js resource whose content should be analyzed + * @param {module:@ui5/fs.Resource} resource library.js resource whose content should be analyzed * @returns {Promise} A Promise on the extract info object */ module.exports = function(resource) { diff --git a/lib/processors/bundlers/flexChangesBundler.js b/lib/processors/bundlers/flexChangesBundler.js index 1f5e22ba9..c17e3f391 100644 --- a/lib/processors/bundlers/flexChangesBundler.js +++ b/lib/processors/bundlers/flexChangesBundler.js @@ -5,12 +5,12 @@ const resourceFactory = require("@ui5/fs").resourceFactory; * Bundles all supplied changes. * * @public - * @alias @ui5/builder.processors.flexChangesBundler + * @alias module:@ui5/builder.processors.flexChangesBundler * @param {Object} parameters Parameters - * @param {Resource[]} parameters.resources List of resources to be processed + * @param {module:@ui5/fs.Resource[]} parameters.resources List of resources to be processed * @param {Object} parameters.options Options * @param {string} parameters.options.pathPrefix Prefix for bundle path - * @returns {Promise} Promise resolving with flexchange bundle resources + * @returns {Promise} Promise resolving with flexchange bundle resources */ module.exports = function({resources, options}) { const layers = { diff --git a/lib/processors/bundlers/manifestBundler.js b/lib/processors/bundlers/manifestBundler.js index b722338db..7dda9098c 100644 --- a/lib/processors/bundlers/manifestBundler.js +++ b/lib/processors/bundlers/manifestBundler.js @@ -19,7 +19,7 @@ class I18nResourceList { * Adds a i18n resource to the repository * * @param {string} directory Path to the i18n resource - * @param {Resource} resource i18n resource + * @param {module:@ui5/fs.Resource} resource i18n resource */ add(directory, resource) { const normalizedDirectory = path.normalize(directory); @@ -43,16 +43,16 @@ class I18nResourceList { /** * Creates a manifest bundle from the provided resources. * - * @alias @ui5/builder.processors.manifestBundler + * @alias module:@ui5/builder.processors.manifestBundler * @public * @param {Object} parameters Parameters - * @param {Resource[]} parameters.resources List of resources to be processed + * @param {module:@ui5/fs.Resource[]} parameters.resources List of resources to be processed * @param {Object} parameters.options Options * @param {string} parameters.options.namespace Namespace of the project * @param {string} parameters.options.bundleName Name of the bundled zip file * @param {string} parameters.options.propertiesExtension Extension name of the properties files * @param {string} parameters.options.descriptor Descriptor name - * @returns {Promise} Promise resolving with manifest bundle resources + * @returns {Promise} Promise resolving with manifest bundle resources */ module.exports = ({resources, options}) => { function getDescriptorI18nInfo(manifest) { diff --git a/lib/processors/bundlers/moduleBundler.js b/lib/processors/bundlers/moduleBundler.js index 7e39b5a9d..aef847673 100644 --- a/lib/processors/bundlers/moduleBundler.js +++ b/lib/processors/bundlers/moduleBundler.js @@ -41,13 +41,13 @@ class LocatorResourcePool extends ResourcePool { * Legacy preload bundler. * * @public - * @alias @ui5/builder.processors.moduleBundler + * @alias module:@ui5/builder.processors.moduleBundler * @param {Object} parameters Parameters - * @param {Resource[]} parameters.resources Resources + * @param {module:@ui5/fs.Resource[]} parameters.resources Resources * @param {Object} parameters.options Options * @param {Object} parameters.options.bundleDefinition Module bundle definition * @param {Object} parameters.options.bundleOptions Module bundle options - * @returns {Promise} Promise resolving with module bundle resources + * @returns {Promise} Promise resolving with module bundle resources */ module.exports = function({resources, options}) { // console.log("preloadBundler bundleDefinition:"); diff --git a/lib/processors/debugFileCreator.js b/lib/processors/debugFileCreator.js index 91660c428..d6be6d50c 100644 --- a/lib/processors/debugFileCreator.js +++ b/lib/processors/debugFileCreator.js @@ -5,10 +5,10 @@ const util = require("util"); * Creates *-dbg.js files for all supplied resources. * * @public - * @alias @ui5/builder.processors.debugFileCreator + * @alias module:@ui5/builder.processors.debugFileCreator * @param {Object} parameters Parameters - * @param {Resource[]} parameters.resources List of resources to be processed - * @returns {Promise} Promise resolving with debug resources + * @param {module:@ui5/fs.Resource[]} parameters.resources List of resources to be processed + * @returns {Promise} Promise resolving with debug resources */ module.exports = function({resources, fs}) { const options = { diff --git a/lib/processors/resourceCopier.js b/lib/processors/resourceCopier.js index a36913ce2..baee5be96 100644 --- a/lib/processors/resourceCopier.js +++ b/lib/processors/resourceCopier.js @@ -2,13 +2,13 @@ * Copy files to a different path. * * @public - * @alias @ui5/builder.processors.resourceCopier + * @alias module:@ui5/builder.processors.resourceCopier * @param {Object} parameters Parameters - * @param {Resource[]} parameters.resources List of resources to be processed + * @param {module:@ui5/fs.Resource[]} parameters.resources List of resources to be processed * @param {Object} [parameters.options] Options * @param {string} [parameters.options.pattern] Search pattern for path * @param {string} [parameters.options.replacement] Replacement string for path - * @returns {Promise} Promise resolving with the cloned resources + * @returns {Promise} Promise resolving with the cloned resources */ module.exports = function({resources, options}) { if (!options.pattern || typeof options.replacement !== "string") { diff --git a/lib/processors/stringReplacer.js b/lib/processors/stringReplacer.js index 2ea6f03e4..a18916636 100644 --- a/lib/processors/stringReplacer.js +++ b/lib/processors/stringReplacer.js @@ -4,13 +4,13 @@ const replaceStream = require("replacestream"); * Replaces placeholders with corresponding values. * * @public - * @alias @ui5/builder.processors.stringReplacer + * @alias module:@ui5/builder.processors.stringReplacer * @param {Object} parameters Parameters - * @param {Resource[]} parameters.resources List of resources to be processed + * @param {module:@ui5/fs.Resource[]} parameters.resources List of resources to be processed * @param {Object} parameters.options Options * @param {string} parameters.options.pattern Pattern of placeholders * @param {string} parameters.options.replacement Replacement for placeholders - * @returns {Promise} Promise resolving with modified resources + * @returns {Promise} Promise resolving with modified resources */ module.exports = function({resources, options}) { return Promise.all(resources.map((resource) => { diff --git a/lib/processors/themeBuilder.js b/lib/processors/themeBuilder.js index 84beb18ba..4a5d1999b 100644 --- a/lib/processors/themeBuilder.js +++ b/lib/processors/themeBuilder.js @@ -9,13 +9,15 @@ const libraryMatchPattern = /^\/resources\/(.*)\/themes\/[^/]*\/library\.source\ * Builds a library theme * * @public - * @memberof @ui5/builder.processors + * @memberof module:@ui5/builder.processors */ class ThemeBuilder { /** * Constructor * - * @param {fs|fsInterface} fs Node fs or custom [fs interface]{@link module:resources/fsInterface} + * @public + * @param {fs|module:@ui5/fs.fsInterface} fs Node fs or custom + * [fs interface]{@link module:resources/module:@ui5/fs.fsInterface} */ constructor({fs}) { this.builder = new less.Builder({fs}); @@ -24,8 +26,9 @@ class ThemeBuilder { /** * Starts the theme build * - * @param {Resource[]} resources Library files - * @returns {Promise} Resolving with array of created files + * @public + * @param {module:@ui5/fs.Resource[]} resources Library files + * @returns {Promise} Resolving with array of created files */ build(resources) { const files = []; @@ -74,6 +77,7 @@ class ThemeBuilder { /** * Clears all cached build results * + * @public * Use this method to prevent high memory consumption when building many themes within the same process. */ clearCache() { @@ -85,11 +89,11 @@ class ThemeBuilder { * Builds a library theme. * * @public - * @alias @ui5/builder.processors/themeBuilder + * @alias module:@ui5/builder.processors.themeBuilder * @param {Object} parameters Parameters - * @param {Resource[]} parameters.resources List of library.source.less resources to be processed - * @param {fs|fsInterface} parameters.fs Node fs or custom [fs interface]{@link module:resources/fsInterface} - * @returns {Promise} Promise resolving with theme resources + * @param {module:@ui5/fs.Resource[]} parameters.resources List of library.source.less resources to be processed + * @param {fs|module:@ui5/fs.fsInterface} parameters.fs Node fs or custom [fs interface]{@link module:resources/module:@ui5/fs.fsInterface} + * @returns {Promise} Promise resolving with theme resources */ module.exports = ({resources, fs}) => { const themeBuilder = new ThemeBuilder({fs}); diff --git a/lib/processors/uglifier.js b/lib/processors/uglifier.js index c5c3a4b8c..51a3b61e6 100644 --- a/lib/processors/uglifier.js +++ b/lib/processors/uglifier.js @@ -5,10 +5,10 @@ const copyrightCommentsPattern = /copyright|\(c\)(?:[0-9]+|\s+[0-9A-za-z])|relea * Minifies the supplied resources. * * @public - * @alias @ui5/builder.processors.uglifier + * @alias module:@ui5/builder.processors.uglifier * @param {Object} parameters Parameters - * @param {Resource[]} parameters.resources List of resources to be processed - * @returns {Promise} Promise resolving with uglified resources + * @param {module:@ui5/fs.Resource[]} parameters.resources List of resources to be processed + * @returns {Promise} Promise resolving with uglified resources */ module.exports = function({resources}) { return Promise.all(resources.map((resource) => { diff --git a/lib/processors/versionInfoGenerator.js b/lib/processors/versionInfoGenerator.js index 2e7d717b0..17807463a 100644 --- a/lib/processors/versionInfoGenerator.js +++ b/lib/processors/versionInfoGenerator.js @@ -4,13 +4,13 @@ const resourceFactory = require("@ui5/fs").resourceFactory; * Creates sap-ui-version.json. * * @public - * @alias @ui5/builder.processors.versionInfoGenerator + * @alias module:@ui5/builder.processors.versionInfoGenerator * @param {Object} parameters Parameters * @param {Object} parameters.options Options * @param {string} parameters.options.rootProjectName Name of the root project * @param {string} parameters.options.rootProjectVersion Version of the root project * @param {Array} parameters.options.libraryInfos Array of objects representing libraries, e.g. {name: "library.xy", version: "1.0.0"} - * @returns {Promise} Promise resolving with an array containing the versioninfo resource + * @returns {Promise} Promise resolving with an array containing the versioninfo resource */ module.exports = async function({options}) { diff --git a/lib/tasks/buildThemes.js b/lib/tasks/buildThemes.js index c20529ec0..dad1dc271 100644 --- a/lib/tasks/buildThemes.js +++ b/lib/tasks/buildThemes.js @@ -6,10 +6,10 @@ const fsInterface = require("@ui5/fs").fsInterface; * Task to build a library theme. * * @public - * @alias @ui5/builder.tasks.buildThemes + * @alias module:@ui5/builder.tasks.buildThemes * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files - * @param {AbstractReader} parameters.dependencies Reader or Collection to read dependency files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.AbstractReader} parameters.dependencies Reader or Collection to read dependency files * @param {Object} parameters.options Options * @param {string} parameters.options.pattern Pattern to locate the files to be processed * @returns {Promise} Promise resolving with undefined once data has been written diff --git a/lib/tasks/bundlers/generateBundle.js b/lib/tasks/bundlers/generateBundle.js index 513a736e4..be920d042 100644 --- a/lib/tasks/bundlers/generateBundle.js +++ b/lib/tasks/bundlers/generateBundle.js @@ -5,9 +5,9 @@ const ReaderCollectionPrioritized = require("@ui5/fs").ReaderCollectionPrioritiz * Generates a bundle based on the given bundle definition * * @public - * @alias @ui5/builder.tasks.generateBundle + * @alias module:@ui5/builder.tasks.generateBundle * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files * @param {Collection} parameters.dependencies Collection to read dependency files * @param {Object} parameters.options Options * @param {string} parameters.options.projectName Project name diff --git a/lib/tasks/bundlers/generateComponentPreload.js b/lib/tasks/bundlers/generateComponentPreload.js index 6627139bc..07600e0ef 100644 --- a/lib/tasks/bundlers/generateComponentPreload.js +++ b/lib/tasks/bundlers/generateComponentPreload.js @@ -6,10 +6,10 @@ const ReaderCollectionPrioritized = require("@ui5/fs").ReaderCollectionPrioritiz * Task to for application bundling. * * @public - * @alias @ui5/builder.tasks.generateComponentPreload + * @alias module:@ui5/builder.tasks.generateComponentPreload * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files - * @param {AbstractReader} parameters.dependencies Reader or Collection to read dependency files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.AbstractReader} parameters.dependencies Reader or Collection to read dependency files * @param {Object} parameters.options Options * @param {string} parameters.options.projectName Project name * @param {Array} [parameters.options.paths] Array of paths (or glob patterns) for component files diff --git a/lib/tasks/bundlers/generateFlexChangesBundle.js b/lib/tasks/bundlers/generateFlexChangesBundle.js index 32ab166ea..ad245b8c4 100644 --- a/lib/tasks/bundlers/generateFlexChangesBundle.js +++ b/lib/tasks/bundlers/generateFlexChangesBundle.js @@ -5,9 +5,9 @@ const flexChangesBundler = require("../../processors/bundlers/flexChangesBundler * Task to create changesBundle.json file containing all changes stored in the /changes folder for easier consumption at runtime. * * @public - * @alias @ui5/builder.tasks.generateFlexChangesBundle + * @alias module:@ui5/builder.tasks.generateFlexChangesBundle * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files * @param {Object} [parameters.options] Options * @param {string} [parameters.options.namespace] Application Namespace * @returns {Promise} Promise resolving with undefined once data has been written diff --git a/lib/tasks/bundlers/generateLibraryPreload.js b/lib/tasks/bundlers/generateLibraryPreload.js index 1f9c44425..5bce9165d 100644 --- a/lib/tasks/bundlers/generateLibraryPreload.js +++ b/lib/tasks/bundlers/generateLibraryPreload.js @@ -71,10 +71,10 @@ function getBundleDefinition(namespace) { * Task for library bundling. * * @public - * @alias @ui5/builder.tasks.generateLibraryPreload + * @alias module:@ui5/builder.tasks.generateLibraryPreload * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files - * @param {AbstractReader} parameters.dependencies Reader or Collection to read dependency files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.AbstractReader} parameters.dependencies Reader or Collection to read dependency files * @param {Object} parameters.options Options * @param {string} parameters.options.projectName Project name * @returns {Promise} Promise resolving with undefined once data has been written diff --git a/lib/tasks/bundlers/generateManifestBundle.js b/lib/tasks/bundlers/generateManifestBundle.js index 5eb3d2672..27edb020e 100644 --- a/lib/tasks/bundlers/generateManifestBundle.js +++ b/lib/tasks/bundlers/generateManifestBundle.js @@ -7,9 +7,9 @@ const BUNDLE_NAME = "manifest-bundle.zip"; * Task for manifestBundler. * * @public - * @alias @ui5/builder.tasks.generateManifestBundle + * @alias module:@ui5/builder.tasks.generateManifestBundle * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files * @param {Object} parameters.options Options * @param {string} parameters.options.namespace Namespace of the application * @returns {Promise} Promise resolving with undefined once data has been written diff --git a/lib/tasks/bundlers/generateStandaloneAppBundle.js b/lib/tasks/bundlers/generateStandaloneAppBundle.js index 380ce0c35..2fb4404e2 100644 --- a/lib/tasks/bundlers/generateStandaloneAppBundle.js +++ b/lib/tasks/bundlers/generateStandaloneAppBundle.js @@ -5,10 +5,10 @@ const ReaderCollectionPrioritized = require("@ui5/fs").ReaderCollectionPrioritiz * Task for bundling standalone applications. * * @public - * @alias @ui5/builder.tasks.generateStandaloneAppBundle + * @alias module:@ui5/builder.tasks.generateStandaloneAppBundle * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files - * @param {AbstractReader} parameters.dependencies Reader or Collection to read dependency files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.AbstractReader} parameters.dependencies Reader or Collection to read dependency files * @param {Object} parameters.options Options * @param {string} parameters.options.projectName Project name * @param {string} parameters.options.namespace Project namespace diff --git a/lib/tasks/createDebugFiles.js b/lib/tasks/createDebugFiles.js index bf5601441..b2e1274b7 100644 --- a/lib/tasks/createDebugFiles.js +++ b/lib/tasks/createDebugFiles.js @@ -5,9 +5,9 @@ const fsInterface = require("@ui5/fs").fsInterface; * Task to create dbg files. * * @public - * @alias @ui5/builder.tasks.createDebugFiles + * @alias module:@ui5/builder.tasks.createDebugFiles * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files * @param {Object} [parameters.options] Options * @param {string} [parameters.options.pattern] Pattern to locate the files to be processed * @returns {Promise} Promise resolving with undefined once data has been written diff --git a/lib/tasks/generateLibraryManifest.js b/lib/tasks/generateLibraryManifest.js index f2ef3cf45..3e46eb820 100644 --- a/lib/tasks/generateLibraryManifest.js +++ b/lib/tasks/generateLibraryManifest.js @@ -9,10 +9,10 @@ const ReaderCollectionPrioritized = require("@ui5/fs").ReaderCollectionPrioritiz * Task for creating a library manifest.json from its .library file. * * @public - * @alias @ui5/builder.tasks.generateLibraryManifest + * @alias module:@ui5/builder.tasks.generateLibraryManifest * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files - * @param {AbstractReader} parameters.dependencies Reader or Collection to read dependency files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.AbstractReader} parameters.dependencies Reader or Collection to read dependency files * @param {Object} parameters.options Options * @param {string} parameters.options.projectName Project name * @returns {Promise} Promise resolving with undefined once data has been written diff --git a/lib/tasks/generateVersionInfo.js b/lib/tasks/generateVersionInfo.js index f72ae8313..c74045669 100644 --- a/lib/tasks/generateVersionInfo.js +++ b/lib/tasks/generateVersionInfo.js @@ -4,10 +4,10 @@ const versionInfoGenerator = require("../processors/versionInfoGenerator"); * Task to create sap-ui-version.json * * @public - * @alias @ui5/builder.tasks.generateVersionInfo + * @alias module:@ui5/builder.tasks.generateVersionInfo * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files - * @param {AbstractReader} parameters.dependencies Reader or Collection to read dependency files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.AbstractReader} parameters.dependencies Reader or Collection to read dependency files * @param {Object} parameters.options Options * @param {Object} parameters.options.rootProject DuplexCollection to read and write files * @returns {Promise} Promise resolving with undefined once data has been written diff --git a/lib/tasks/replaceCopyright.js b/lib/tasks/replaceCopyright.js index fa0d9eeb3..d97d452bc 100644 --- a/lib/tasks/replaceCopyright.js +++ b/lib/tasks/replaceCopyright.js @@ -14,9 +14,9 @@ const stringReplacer = require("../processors/stringReplacer"); * If no copyright string is given, no replacement is being done. * * @public - * @alias @ui5/builder.tasks.replaceCopyright + * @alias module:@ui5/builder.tasks.replaceCopyright * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files * @param {Object} parameters.options Options * @param {string} parameters.options.copyright Replacement copyright * @param {string} parameters.options.pattern Pattern to locate the files to be processed diff --git a/lib/tasks/replaceVersion.js b/lib/tasks/replaceVersion.js index c32c0ffb1..add78b23b 100644 --- a/lib/tasks/replaceVersion.js +++ b/lib/tasks/replaceVersion.js @@ -4,9 +4,9 @@ const stringReplacer = require("../processors/stringReplacer"); * Task to replace the version ${version}. * * @public - * @alias @ui5/builder.tasks.replaceVersion + * @alias module:@ui5/builder.tasks.replaceVersion * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files * @param {Object} parameters.options Options * @param {string} parameters.options.pattern Pattern to locate the files to be processed * @param {string} parameters.options.version Replacement version diff --git a/lib/tasks/uglify.js b/lib/tasks/uglify.js index 97b8cb506..7bcf79114 100644 --- a/lib/tasks/uglify.js +++ b/lib/tasks/uglify.js @@ -4,9 +4,9 @@ const uglifyProcessor = require("../processors/uglifier"); * Task to minify resources. * * @public - * @alias @ui5/builder.tasks.uglify + * @alias module:@ui5/builder.tasks.uglify * @param {Object} parameters Parameters - * @param {DuplexCollection} parameters.workspace DuplexCollection to read and write files + * @param {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files * @param {Object} parameters.options Options * @param {string} parameters.options.pattern Pattern to locate the files to be processed * @returns {Promise} Promise resolving with undefined once data has been written diff --git a/lib/types/AbstractBuilder.js b/lib/types/AbstractBuilder.js index d4587499f..ee65b91cf 100644 --- a/lib/types/AbstractBuilder.js +++ b/lib/types/AbstractBuilder.js @@ -9,7 +9,7 @@ class AbstractBuilder { * * @param {Object} parameters * @param {Object} parameters.resourceCollections Resource collections - * @param {DuplexCollection} parameters.resourceCollections.workspace Workspace Resource + * @param {module:@ui5/fs.DuplexCollection} parameters.resourceCollections.workspace Workspace Resource * @param {ReaderCollection} parameters.resourceCollections.dependencies Workspace Resource * @param {Object} parameters.project Project configuration * @param {GroupLogger} parameters.parentLogger Logger to use @@ -37,7 +37,7 @@ class AbstractBuilder { * @protected * @param {Object} parameters * @param {Object} parameters.resourceCollections Resource collections - * @param {DuplexCollection} parameters.resourceCollections.workspace Workspace Resource + * @param {module:@ui5/fs.DuplexCollection} parameters.resourceCollections.workspace Workspace Resource * @param {ReaderCollection} parameters.resourceCollections.dependencies Workspace Resource * @param {Object} parameters.project Project configuration */ @@ -51,7 +51,7 @@ class AbstractBuilder { * @private * @param {Object} parameters * @param {Object} parameters.resourceCollections Resource collections - * @param {DuplexCollection} parameters.resourceCollections.workspace Workspace Resource + * @param {module:@ui5/fs.DuplexCollection} parameters.resourceCollections.workspace Workspace Resource * @param {ReaderCollection} parameters.resourceCollections.dependencies Workspace Resource * @param {Object} parameters.project Project configuration */ @@ -92,8 +92,8 @@ class AbstractBuilder { /* Custom Task Interface Parameters: {Object} parameters Parameters - {DuplexCollection} parameters.workspace DuplexCollection to read and write files - {AbstractReader} parameters.dependencies Reader or Collection to read dependency files + {module:@ui5/fs.DuplexCollection} parameters.workspace DuplexCollection to read and write files + {module:@ui5/fs.AbstractReader} parameters.dependencies Reader or Collection to read dependency files {Object} parameters.options Options {string} parameters.options.projectName Project name {string} [parameters.options.configuration] Task configuration if given in ui5.yaml