Skip to content

Commit

Permalink
fix: Dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Blu-J committed Nov 11, 2024
1 parent c088ab7 commit 280fa27
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions container-runtime/src/Adapters/Systems/SystemForEmbassy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,22 +682,34 @@ export class SystemForEmbassy implements System {
dependsOn: { [x: string]: readonly string[] },
) {
await effects.setDependencies({
dependencies: Object.entries(dependsOn).flatMap(([key, value]) => {
const dependency = this.manifest.dependencies?.[key]
if (!dependency) return []
const versionRange = dependency.version
const registryUrl = DEFAULT_REGISTRY
const kind = "running"
return [
{
id: key,
versionRange,
registryUrl,
kind,
healthChecks: [...value],
},
]
}),
dependencies: Object.entries(dependsOn).flatMap(
([key, value]): T.Dependencies => {
const dependency = this.manifest.dependencies?.[key]
if (!dependency) return []
if (dependency.requirement.type === "required") {
const versionRange = dependency.version
const kind = "running"
return [
{
id: key,
versionRange,
kind,
healthChecks: [...value],
},
]
}

const versionRange = dependency.version
const kind = "exists"
return [
{
id: key,
versionRange,
kind,
},
]
},
),
})
}

Expand Down

0 comments on commit 280fa27

Please sign in to comment.