Skip to content

Commit

Permalink
Refactored to eliminate modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhaufe committed Jun 27, 2024
1 parent 02faa43 commit d88d492
Show file tree
Hide file tree
Showing 91 changed files with 210 additions and 361 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion modules/goals/domain/Limit.ts → domain/Limit.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Requirement from "../../../domain/Requirement";
import Requirement from "./Requirement";

/**
* Exclusion from scope of requirements
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion domain/Scenario.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Example from "../modules/system/domain/Example";
import Example from "./Example";
import type { Properties } from "~/domain/Properties";
import type { Uuid } from "~/domain/Uuid";

Expand Down
4 changes: 2 additions & 2 deletions modules/solution/domain/Solution.ts → domain/Solution.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Entity from "~/domain/Entity.js";
import type { Properties } from "../../../domain/Properties.js";
import type { Uuid } from "../../../domain/Uuid.js";
import type { Properties } from "./Properties.js";
import type { Uuid } from "./Uuid.js";
import slugify from "~/lib/slugify.js";

/**
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion modules/system/domain/UseCase.ts → domain/UseCase.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Scenario from "../../../domain/Scenario";
import Scenario from "./Scenario";
import type { Uuid } from "~/domain/Uuid";
import type { Properties } from "~/domain/Properties";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import SolutionInteractor from "~/modules/solution/application/SolutionInteractor"
import SolutionRepository from "~/modules/solution/data/SolutionRepository"
import SolutionInteractor from "~/application/SolutionInteractor"
import SolutionRepository from "~/data/SolutionRepository"

export default defineNuxtRouteMiddleware(async (to, from) => {
const slug = to.params.solutionSlug
const slug = to.params.slug

if (slug) {
solutionInteractor = new SolutionInteractor(new SolutionRepository()),
const solutionInteractor = new SolutionInteractor(new SolutionRepository()),
solution = (await solutionInteractor.getAll({
slug: typeof slug === 'string' ? slug : slug[0]
}))[0]
Expand Down
42 changes: 0 additions & 42 deletions modules/environment/index.ts

This file was deleted.

42 changes: 0 additions & 42 deletions modules/goals/index.ts

This file was deleted.

22 changes: 0 additions & 22 deletions modules/project/index.ts

This file was deleted.

30 changes: 0 additions & 30 deletions modules/solution/index.ts

This file was deleted.

3 changes: 0 additions & 3 deletions modules/solution/ui/pages/solution.vue

This file was deleted.

30 changes: 0 additions & 30 deletions modules/system/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"//preview": "nuxt preview",
"generate-pwa-assets": "pwa-assets-generator",
"generate": "nuxt generate",
"dev": "nuxt dev --no-fork --https",
"dev": "nuxt dev --no-fork",
"serve": "npx serve .output/public",
"postinstall": "nuxt prepare",
"typecheck": "nuxi typecheck"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<script lang="ts" setup>
import slugify from '~/lib/slugify';
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
import Solution from '../solution.vue';
import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
import SolutionRepository from '~/data/SolutionRepository';
import SolutionInteractor from '~/application/SolutionInteractor';
import Solution from '~/domain/Solution';
useHead({ title: 'Edit Solution' })
definePageMeta({ name: 'Edit Solution' })
const slug = useRoute().params.solutionSlug as string,
const router = useRouter(),
slug = useRoute().params.slug as string,
solutionInteractor = new SolutionInteractor(new SolutionRepository()),
solution = (await solutionInteractor.getAll({ slug }))[0],
name = ref(solution.name),
Expand All @@ -21,7 +23,7 @@ const updateSolution = async () => {
slug: newSlug.value
});
router.push({ name: 'Solution', params: { solutionSlug: newSlug.value } });
router.push({ name: 'Solution', params: { slug: newSlug.value } });
}
const cancel = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script lang="ts" setup>
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
import AssumptionRepository from '../../data/AssumptionRepository';
import type Assumption from '../../domain/Assumption';
import { FilterMatchMode } from 'primevue/api';
import type Assumption from '~/domain/Assumption';
import { emptyUuid, type Uuid } from '~/domain/Uuid';
import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
import AssumptionInteractor from '../../application/AssumptionInteractor';
import SolutionRepository from '~/data/SolutionRepository';
import AssumptionRepository from '~/data/AssumptionRepository';
import SolutionInteractor from '~/application/SolutionInteractor';
import AssumptionInteractor from '~/application/AssumptionInteractor';
import { FilterMatchMode } from 'primevue/api';
useHead({ title: 'Assumptions' })
definePageMeta({ name: 'Assumptions' })
const slug = useRoute().params.solutionSlug as string,
const slug = useRoute().params.slug as string,
solutionInteractor = new SolutionInteractor(new SolutionRepository()),
solution = (await solutionInteractor.getAll({ slug }))[0],
solutionId = solution.id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script lang="ts" setup>
import { FilterMatchMode } from 'primevue/api';
import { emptyUuid, type Uuid } from '~/domain/Uuid';
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
import SolutionRepository from '~/data/SolutionRepository';
import type Component from '~/domain/Component';
import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
import SolutionInteractor from '~/application/SolutionInteractor';
import ComponentRepository from '~/data/ComponentRepository';
import ComponentInteractor from '~/application/ComponentInteractor';
useHead({ title: 'Components' })
definePageMeta({ name: 'Components' })
const slug = useRoute().params.solutionSlug as string,
const slug = useRoute().params.slug as string,
solutionInteractor = new SolutionInteractor(new SolutionRepository()),
componentInteractor = new ComponentInteractor(new ComponentRepository()),
solution = (await solutionInteractor.getAll({ slug }))[0],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<script lang="ts" setup>
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
import SolutionRepository from '~/data/SolutionRepository';
import { FilterMatchMode } from 'primevue/api';
import { emptyUuid, type Uuid } from '~/domain/Uuid';
import ConstraintRepository from '../../data/ConstraintRepository';
import type Constraint from '../../domain/Constraint';
import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
import ConstraintCategoryRepository from '../../data/ConstraintCategoryRepository';
import ConstraintInteractor from '../../application/ConstraintInteractor';
import type ConstraintCategory from '../../domain/ConstraintCategory';
import ConstraintCategoryInteractor from '../../application/ConstraintCategoryInteractor';
import ConstraintRepository from '~/data/ConstraintRepository';
import type Constraint from '~/domain/Constraint';
import SolutionInteractor from '~/application/SolutionInteractor';
import ConstraintCategoryRepository from '~/data/ConstraintCategoryRepository';
import ConstraintInteractor from '~/application/ConstraintInteractor';
import type ConstraintCategory from '~/domain/ConstraintCategory';
import ConstraintCategoryInteractor from '~/application/ConstraintCategoryInteractor';
useHead({ title: 'Constraints' })
definePageMeta({ name: 'Constraints' })
const slug = useRoute().params.solutionSlug as string,
const slug = useRoute().params.slug as string,
solutionInteractor = new SolutionInteractor(new SolutionRepository()),
solution = (await solutionInteractor.getAll({ slug }))[0],
solutionId = solution.id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script lang="ts" setup>
import { FilterMatchMode } from 'primevue/api';
import { emptyUuid, type Uuid } from '~/domain/Uuid';
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
import EffectRepository from '../../data/EffectRepository';
import type Effect from '../../domain/Effect';
import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
import EffectInteractor from '../../application/EffectInteractor';
import SolutionRepository from '~/data/SolutionRepository';
import EffectRepository from '~/data/EffectRepository';
import type Effect from '~/domain/Effect';
import SolutionInteractor from '~/application/SolutionInteractor';
import EffectInteractor from '~/application/EffectInteractor';
useHead({ title: 'Effects' })
definePageMeta({ name: 'Effects' })
const slug = useRoute().params.solutionSlug as string,
const slug = useRoute().params.slug as string,
solutionInteractor = new SolutionInteractor(new SolutionRepository()),
solution = (await solutionInteractor.getAll({ slug }))[0],
solutionId = solution.id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script lang="ts" setup>
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
import GlossaryTermRepository from '../../data/GlossaryTermRepository';
import type GlossaryTerm from '../../domain/GlossaryTerm';
import SolutionRepository from '~/data/SolutionRepository';
import GlossaryTermRepository from '~/data/GlossaryTermRepository';
import type GlossaryTerm from '~/domain/GlossaryTerm';
import { FilterMatchMode } from 'primevue/api';
import { emptyUuid, type Uuid } from '~/domain/Uuid';
import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
import GlossaryTermInteractor from '../../application/GlossaryTermInteractor';
import SolutionInteractor from '~/application/SolutionInteractor';
import GlossaryTermInteractor from '~/application/GlossaryTermInteractor';
useHead({ title: 'Glossary' })
definePageMeta({ name: 'Glossary' })
const slug = useRoute().params.solutionSlug as string,
const slug = useRoute().params.slug as string,
glossaryTermRepository = new GlossaryTermRepository(),
solutionInteractor = new SolutionInteractor(new SolutionRepository()),
glossaryTermInteractor = new GlossaryTermInteractor(glossaryTermRepository),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<script lang="ts" setup>
import { FilterMatchMode } from 'primevue/api';
import { emptyUuid, type Uuid } from '~/domain/Uuid';
import SolutionRepository from '~/modules/solution/data/SolutionRepository';
import InvariantRepository from '../../data/InvariantRepository';
import type Invariant from '../../domain/Invariant';
import SolutionInteractor from '~/modules/solution/application/SolutionInteractor';
import InvariantInteractor from '../../application/InvariantInteractor';
import SolutionRepository from '~/data/SolutionRepository';
import InvariantRepository from '~/data/InvariantRepository';
import type Invariant from '~/domain/Invariant';
import SolutionInteractor from '~/application/SolutionInteractor';
import InvariantInteractor from '~/application/InvariantInteractor';
useHead({ title: 'Invariants' })
definePageMeta({ name: 'Invariants' })
const slug = useRoute().params.solutionSlug as string,
const slug = useRoute().params.slug as string,
solutionInteractor = new SolutionInteractor(new SolutionRepository()),
solution = (await solutionInteractor.getAll({ slug }))[0],
solutionId = solution.id,
Expand Down
Loading

0 comments on commit d88d492

Please sign in to comment.