(path, managedSet)
| 2556 | * @returns {boolean} true when managed |
| 2557 | */ |
| 2558 | const checkManaged = (path, managedSet) => { |
| 2559 | for (const unmanagedPath of this.unmanagedPathsRegExps) { |
| 2560 | if (unmanagedPath.test(path)) return false; |
| 2561 | } |
| 2562 | for (const unmanagedPath of this.unmanagedPathsWithSlash) { |
| 2563 | if (path.startsWith(unmanagedPath)) return false; |
| 2564 | } |
| 2565 | for (const immutablePath of this.immutablePathsRegExps) { |
| 2566 | if (immutablePath.test(path)) { |
| 2567 | managedSet.add(path); |
| 2568 | return true; |
| 2569 | } |
| 2570 | } |
| 2571 | for (const immutablePath of this.immutablePathsWithSlash) { |
| 2572 | if (path.startsWith(immutablePath)) { |
| 2573 | managedSet.add(path); |
| 2574 | return true; |
| 2575 | } |
| 2576 | } |
| 2577 | for (const managedPath of this.managedPathsRegExps) { |
| 2578 | const match = managedPath.exec(path); |
| 2579 | if (match) { |
| 2580 | const managedItem = getManagedItem(match[1], path); |
| 2581 | if (managedItem) { |
| 2582 | managedItems.add(managedItem); |
| 2583 | managedSet.add(path); |
| 2584 | return true; |
| 2585 | } |
| 2586 | } |
| 2587 | } |
| 2588 | for (const managedPath of this.managedPathsWithSlash) { |
| 2589 | if (path.startsWith(managedPath)) { |
| 2590 | const managedItem = getManagedItem(managedPath, path); |
| 2591 | if (managedItem) { |
| 2592 | managedItems.add(managedItem); |
| 2593 | managedSet.add(path); |
| 2594 | return true; |
| 2595 | } |
| 2596 | } |
| 2597 | } |
| 2598 | return false; |
| 2599 | }; |
| 2600 | /** |
| 2601 | * Capture non managed. |
| 2602 | * @param {Iterable<string>} items items |
nothing calls this directly
no test coverage detected