@omnia/tooling-composers
Version:
Provide tooling to work with manifest things.
28 lines (27 loc) • 1.25 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DependencyComposer = void 0;
const LoadableManifestRegistry_1 = require("./LoadableManifestRegistry");
class DependencyComposer {
constructor(currentManifestId, composerForDone) {
this.currentManifestId = currentManifestId;
this.composerForDone = composerForDone;
this.done = () => {
return this.composerForDone;
};
this.withNoDependency = () => {
LoadableManifestRegistry_1.LoadableManifestRegistry.withNoDependency(this.currentManifestId.toString());
//Stop fluent
return this.composerForDone;
};
this.withDependency = (manifestId) => {
LoadableManifestRegistry_1.LoadableManifestRegistry.addManifestDependency(this.currentManifestId.toString(), manifestId.toString());
return this;
};
this.withExternalDependency = (omniaServiceId, manifestId) => {
LoadableManifestRegistry_1.LoadableManifestRegistry.addManifestDependency(this.currentManifestId.toString(), manifestId.toString(), omniaServiceId.toString());
return this;
};
}
}
exports.DependencyComposer = DependencyComposer;