Skip to content

Commit

Permalink
refactor!: move to App.run
Browse files Browse the repository at this point in the history
  • Loading branch information
bb010g committed Dec 11, 2024
1 parent 474d1ab commit a200ac4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion packages/architect-core/src/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Reflect } from "@dx/reflect";

import * as fs from 'node:fs/promises';
import path from 'node:path';
import { App } from './cli/index.mts';
import { PluginRegistry } from './plugin.mts';
import { Target, TargetResolveParams } from './target.mts';
import winston from 'winston';
Expand Down Expand Up @@ -148,5 +149,5 @@ export class ArchitectCoreProject extends Project {
};

if (import.meta.main) {
await Project.run(ArchitectCoreProject);
await App.run(ArchitectCoreProject);
};
4 changes: 0 additions & 4 deletions packages/architect-core/src/project.mts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ export abstract class Project {
public static decorate<T extends object>(model: ProjectConfig): (target: T) => void {
return (target: T) => { new ProjectMetadata(model).assign(target); };
};

public static async run(ctor: ProjectClass): Promise<void> {
await App.run(ctor);
};
}

export class ProjectMetadata<TModel extends ProjectConfig = ProjectConfig> {
Expand Down
4 changes: 2 additions & 2 deletions packages/architect-k8s/src/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export * from './component.mts';
export * from './plugin.mts';
export * from './target.mts';

import { Project, PluginClass } from "@perdition/architect-core";
import { App, Project, PluginClass } from "@perdition/architect-core";
import * as components from "./components/index.mts";

import model from './../architect.json' with { type: 'json' };
Expand All @@ -26,5 +26,5 @@ export class ArchitectK8SProject extends Project {
};

if (import.meta.main) {
await Project.run(ArchitectK8SProject);
await App.run(ArchitectK8SProject);
};

0 comments on commit a200ac4

Please sign in to comment.