adds schema view and schema generating command
This commit is contained in:
@@ -10,15 +10,18 @@ public struct WorkspaceServices {
|
||||
public var symbols: SymbolServicing
|
||||
public var config: ConfigServicing
|
||||
public var recentFiles: RecentFilesStoring
|
||||
/// The Schema view's dump reading and `helder:schema` runs.
|
||||
public var schema: SchemaServicing
|
||||
|
||||
public init(git: GitServicing, files: FileServicing, search: SearchServicing, symbols: SymbolServicing,
|
||||
config: ConfigServicing, recentFiles: RecentFilesStoring) {
|
||||
config: ConfigServicing, recentFiles: RecentFilesStoring, schema: SchemaServicing) {
|
||||
self.git = git
|
||||
self.files = files
|
||||
self.search = search
|
||||
self.symbols = symbols
|
||||
self.config = config
|
||||
self.recentFiles = recentFiles
|
||||
self.schema = schema
|
||||
}
|
||||
|
||||
public static func live(root: URL) -> WorkspaceServices {
|
||||
@@ -30,7 +33,8 @@ public struct WorkspaceServices {
|
||||
search: search,
|
||||
symbols: SymbolService(root: root, config: config),
|
||||
config: config,
|
||||
recentFiles: RecentFilesStore(root: root)
|
||||
recentFiles: RecentFilesStore(root: root),
|
||||
schema: SchemaService(root: root)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -41,6 +45,8 @@ public struct AppServices {
|
||||
public var session: SessionStoring
|
||||
/// Column widths and toggles, per project.
|
||||
public var layouts: LayoutPersisting
|
||||
/// Schema card positions, per project.
|
||||
public var schemaLayouts: SchemaLayoutPersisting
|
||||
/// Dialogs, pasteboard, Finder.
|
||||
public var system: SystemActing
|
||||
public var speech: SpeechServicing
|
||||
@@ -49,11 +55,12 @@ public struct AppServices {
|
||||
public var makeWatcher: () -> FileWatching
|
||||
|
||||
/// Every store is passed in, so a test can never reach the user's real recents, sessions or layouts.
|
||||
public init(recentProjects: RecentProjectsStoring, session: SessionStoring, layouts: LayoutPersisting, system: SystemActing,
|
||||
speech: SpeechServicing, makeWorkspace: @escaping (URL) -> WorkspaceServices, makeWatcher: @escaping () -> FileWatching) {
|
||||
public init(recentProjects: RecentProjectsStoring, session: SessionStoring, layouts: LayoutPersisting,
|
||||
schemaLayouts: SchemaLayoutPersisting, system: SystemActing, speech: SpeechServicing, makeWorkspace: @escaping (URL) -> WorkspaceServices, makeWatcher: @escaping () -> FileWatching) {
|
||||
self.recentProjects = recentProjects
|
||||
self.session = session
|
||||
self.layouts = layouts
|
||||
self.schemaLayouts = schemaLayouts
|
||||
self.system = system
|
||||
self.speech = speech
|
||||
self.makeWorkspace = makeWorkspace
|
||||
@@ -64,6 +71,7 @@ public struct AppServices {
|
||||
recentProjects: RecentProjectsStore(),
|
||||
session: SessionStore(),
|
||||
layouts: UserDefaultsLayoutStore(),
|
||||
schemaLayouts: UserDefaultsSchemaLayoutStore(),
|
||||
system: LiveSystemActions(),
|
||||
speech: SpeechService(),
|
||||
makeWorkspace: WorkspaceServices.live(root:),
|
||||
|
||||
Reference in New Issue
Block a user