UNPKG

boostr

Version:
32 lines 1.16 kB
export function findBackgroundMethods(rootComponent) { const backgroundMethods = []; const find = (component) => { for (const method of component.getMethods()) { const scheduling = method.getScheduling(); const queueing = method.getQueueing(); if (!scheduling && !queueing) { continue; } const maximumDuration = method.getMaximumDuration(); const backgroundMethod = { path: component.describeComponentProperty(method.getName()), scheduling, queueing, maximumDuration }; if (scheduling) { backgroundMethod.query = { '<=': { __component: component.getComponentType() }, [`${method.getName()}=>`]: { '()': [] } }; } backgroundMethods.push(backgroundMethod); } }; for (const component of rootComponent.traverseComponents()) { find(component); find(component.prototype); } return backgroundMethods; } //# sourceMappingURL=component.js.map