-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Viktor Pasynok
committed
Nov 3, 2024
1 parent
63fc82e
commit 8e6d984
Showing
2 changed files
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
import { type AnyContainer } from '../createContainer'; | ||
|
||
// todo: avoid cycle deps | ||
// todo: compose fn to wrap em all | like basic compose fn + passing api (no need to save em all. just reverse pipe) | ||
// todo: think about dynamic feature stop | ||
// todo: clearNode $strictDepsResolvingStatus after start | ||
// // // compose.up -> wait for all deps -> check enable -> set status -> start if pending | ||
// compose.up -> wait for all deps -> check enable -> set status -> start if pending | ||
|
||
const upFn = (list: AnyContainer[]) => { | ||
const upFn = (containers: AnyContainer[]) => { | ||
const CONTAINER_IDS = new Set(); | ||
|
||
for (const container of list) { | ||
for (const container of containers) { | ||
if (CONTAINER_IDS.has(container.id)) { | ||
throw new Error(`Duplicate container ID found: ${container.id}`); | ||
} | ||
CONTAINER_IDS.add(container.id); | ||
} | ||
|
||
for (const container of list) { | ||
} | ||
}; | ||
|
||
const compose = { up: upFn }; | ||
|
||
export { compose }; | ||
// todo: think about dynamic feature stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters