(section)
| 618 | // module in the next file. This will also duplicate its dependency definition if we do not filter. |
| 619 | #depCacheSet = new Set(); |
| 620 | async writeDepCache(section) { |
| 621 | let hasDepCache = false; |
| 622 | |
| 623 | const sequence = section.modules.slice().sort(); |
| 624 | |
| 625 | if (sequence.length > 0) { |
| 626 | for (const module of sequence) { |
| 627 | if (this.#depCacheSet.has(module)) { |
| 628 | continue; |
| 629 | } |
| 630 | |
| 631 | this.#depCacheSet.add(module); |
| 632 | let resource = null; |
| 633 | try { |
| 634 | resource = await this.pool.findResourceWithInfo(module); |
| 635 | } catch { |
| 636 | log.error(` couldn't find ${module}`); |
| 637 | } |
| 638 | |
| 639 | if (resource != null) { |
| 640 | const deps = resource.info.dependencies.filter( |
| 641 | (dep) => |
| 642 | !resource.info.isConditionalDependency(dep) && |
| 643 | !resource.info.isImplicitDependency(dep) |
| 644 | ); |
| 645 | if (deps.length > 0) { |
| 646 | if (!hasDepCache) { |
| 647 | hasDepCache = true; |
| 648 | this.outW.ensureNewLine(); |
| 649 | this.outW.writeln(`sap.ui.loader.config({depCacheUI5:{`); |
| 650 | } |
| 651 | |
| 652 | this.outW.writeln( |
| 653 | `"${module}": [${deps.map((dep) => `"${dep}"`).join(",")}],` |
| 654 | ); |
| 655 | } else { |
| 656 | log.verbose(` skipped ${module}, no dependencies`); |
| 657 | } |
| 658 | } |
| 659 | } |
| 660 | |
| 661 | if (hasDepCache) { |
| 662 | this.outW.writeln(`}});`); |
| 663 | } |
| 664 | } |
| 665 | } |
| 666 | |
| 667 | async getSourceMapForModule({moduleName, moduleContent, resourcePath}) { |
| 668 | let moduleSourceMap = null; |
no test coverage detected