Skip to content

Commit

Permalink
Merge branch 'main' into bb010g/fix-consistent-casing
Browse files Browse the repository at this point in the history
  • Loading branch information
RealityAnomaly authored Dec 11, 2024
2 parents 08d1e1d + 9d88618 commit adf9eb1
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 11 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test
on:
push: {}
pull_request: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install dependencies
run: deno install
- name: Lint files
run: deno lint
- name: Typecheck files
run: deno task check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Install dependencies
run: deno install
- name: Run tests
run: deno task test
1 change: 1 addition & 0 deletions packages/architect-core/src/component.mts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface ComponentArgs<TInput = unknown> {
export abstract class Component<
TResult extends object = object,
TArgs extends ComponentArgs = ComponentArgs,
// deno-lint-ignore no-explicit-any
TParent extends Component = any,
> {
public context: Context;
Expand Down
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
1 change: 1 addition & 0 deletions packages/architect-core/src/utils/modules.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface ModulePackageEntry {
}

export class ModuleUtilities {
// deno-lint-ignore no-explicit-any
public static collectClasses<T>(module: any, matcher: (clazz: constructor<T>) => boolean): constructor<T>[] {
const result: constructor<T>[] = [];

Expand Down
1 change: 1 addition & 0 deletions packages/architect-core/src/utils/types.mts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const NAMED_SYMBOL = Symbol.for('architect.Named');
* Constructor type, ported from tsyringe
*/
export type constructor<T> = {
// deno-lint-ignore no-explicit-any
new (...args: any[]): T;
};

Expand Down
8 changes: 4 additions & 4 deletions packages/architect-k8s/src/components/crds/index.mts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fs from 'node:fs/promises';
import path from 'node:path';
import { GVK, notEmpty } from '@perdition/architect-core';
import * as fg from 'fast-glob';
// import * as fs from 'node:fs/promises';
// import path from 'node:path';
import { GVK } from '@perdition/architect-core';
// import * as fg from 'fast-glob';
import * as api from 'kubernetes-models';
import { KubeComponent, KubeComponentGenericResources } from '../../component.mts';

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 adf9eb1

Please sign in to comment.