chore: and more cleanups
This commit is contained in:
@@ -3,6 +3,15 @@
|
||||
-- Scope: core (Wave 1)
|
||||
-- Distilled from: src/main/engine/ProjectEngine.ts, schema.ts
|
||||
|
||||
surface ProjectControlSurface {
|
||||
facing _: ProjectOperator
|
||||
|
||||
provides:
|
||||
CreateProjectRequested(name, data_path)
|
||||
SetActiveProjectRequested(project)
|
||||
DeleteProjectRequested(project)
|
||||
}
|
||||
|
||||
entity Project {
|
||||
name: String
|
||||
slug: String
|
||||
@@ -25,6 +34,24 @@ entity Project {
|
||||
-- Custom data path overrides default
|
||||
}
|
||||
|
||||
surface ProjectSurface {
|
||||
context project: Project
|
||||
|
||||
exposes:
|
||||
project.name
|
||||
project.slug
|
||||
project.description when project.description != null
|
||||
project.data_path when project.data_path != null
|
||||
project.is_active
|
||||
project.created_at
|
||||
project.updated_at
|
||||
project.posts.count
|
||||
project.media.count
|
||||
project.tags.count
|
||||
project.internal_base_dir
|
||||
project.effective_data_dir
|
||||
}
|
||||
|
||||
invariant SingleActiveProject {
|
||||
-- Exactly one project is active at any time
|
||||
let active = Projects where is_active
|
||||
|
||||
Reference in New Issue
Block a user