Skip to main content

mortise_core/
lib.rs

1//! Reads a Laravel app that uses `nwidart/laravel-modules` from its files.
2//!
3//! Nothing here draws or writes into the app folder. It runs PHP only when asked,
4//! with the `run` feature (see [`test_php`]). The entry point is
5//! [`read_app`], which turns a folder into an [`AppSnapshot`]: plain data that an
6//! interface, a command line tool or a service can show.
7
8mod actions;
9mod app;
10mod boundary;
11mod editor;
12mod findings;
13mod generate;
14#[cfg(feature = "actuator")]
15mod metrics;
16mod modules;
17mod package;
18mod palette;
19mod php;
20mod program;
21#[cfg(feature = "push")]
22mod push;
23mod run;
24mod runtime;
25mod settings;
26mod surface;
27#[cfg(feature = "testing")]
28pub mod testing;
29
30#[cfg(feature = "run")]
31pub use actions::output::{
32    FailedMigration, MigrationCount, failed_migration, migration_count, prohibited,
33};
34pub use actions::plan::{
35    Action, Ask, Context, OptionSet, Options, Plan, asks_again, plan, refuses, typed_name_matches,
36};
37#[cfg(feature = "watch")]
38pub use app::live::{LiveApp, LiveState};
39pub use app::{
40    AppSnapshot, CoverageReport, ReadError, ReadOptions, read_app, read_app_cached, read_app_env,
41    read_app_with,
42};
43pub use boundary::links::{Cycle, Link, Reference, columns};
44pub use boundary::rules::{
45    AllowedUse, CoverageSettings, RULES_FILE, Rules, RulesError, RulesSource,
46};
47pub use editor::{Editor, EditorError, editor_arguments, open_in_editor};
48pub use findings::{
49    Check, CheckResult, DEFAULT_COVERAGE_LIMIT, Detail, Finding, FindingState, Findings, Severity,
50    Todo,
51};
52#[cfg(feature = "run")]
53pub use generate::cache as catalog_cache;
54pub use generate::catalog::{
55    Argument, Catalog, Filled, Generator, GeneratorOption, Group, MODULE_MAKE, NameRule,
56    class_name_ok, generator_gives_data, model_flag_of, module_name_ok, replace_words,
57    shipped_mark,
58};
59#[cfg(feature = "run")]
60pub use generate::output::{
61    FileOutcome, GeneratedFile, app_relative, autoload_failed, generated_files, reported_files,
62};
63#[cfg(feature = "actuator")]
64pub use metrics::figures::{Figures, Line, Point, Range, Rates, Row, RowOf, Scope, Under};
65#[cfg(feature = "actuator")]
66pub use metrics::sample::{LiveMetrics, MetricsClock, MetricsState, NotKept};
67pub use modules::clover::Coverage;
68pub use modules::code::{ALL_CODE, propose_codes, propose_monogram};
69pub use modules::composer::Version;
70pub use modules::git::{CHURN_DAYS, Churn, Git};
71pub use modules::kind::{OTHER, TESTS};
72pub use modules::layout::{Layout, LayoutKey, read_layout};
73pub use modules::module::{KindCount, Manifest, Module, ModuleState, Progress, ReadCache};
74pub use modules::target::Target;
75pub use package::{
76    DataError, FileAction, FileResult, GeneratorReport, LangModule, LangReport, Locale,
77    MigrationRow, MigrationStatus, ModuleMigrations, ModuleStatus, ModuleTests, PackageData,
78    RanMigration, ReportedFile, TestReport, document, gives_data, has_option, migrate_status_args,
79    migration_file, migrations_changed_by, stores_surface, whole_document, with_dry_run, with_json,
80};
81pub use palette::matcher::fuzzy;
82#[cfg(feature = "run")]
83pub use palette::recent::{Ran, RecentRun, recent_runs};
84#[cfg(feature = "push")]
85pub use push::{
86    Counted, MAX_TEXT, PushCi, PushContext, PushDocument, PushGit, PushLimit, PushSnapshot,
87    PushTool, Repository, SCHEMA_VERSION, byte_limit, push_document, read_repository,
88};
89#[cfg(feature = "run")]
90pub use run::ansi;
91#[cfg(feature = "run")]
92pub use run::history;
93#[cfg(feature = "run")]
94pub use run::history::OUTPUT_LIMIT;
95#[cfg(feature = "run")]
96pub use run::{
97    CommandLine, Detected, Failure, Read, ReadEnd, Run, RunEnd, RunEvent, Runs, STOP_WAIT,
98    StartError, Stream, TEST_LIMIT, TestOutcome, detect, herd_config_dir, stop_asks_first,
99    test_php,
100};
101pub use run::{PhpSettings, RunnerKind};
102#[cfg(feature = "actuator")]
103pub use runtime::actuator::{
104    Answer, Component, Info, METRICS_BODY_LIMIT, NoMetrics, Route, Runtime, Secret, Status, Task,
105    ask, ask_metrics, ask_status,
106};
107pub use runtime::environment::{Credentials, Environment};
108#[cfg(feature = "actuator")]
109pub use runtime::live::{
110    LiveRuntime, Pace, RuntimeState, module_of, module_of_task, routes_by_module, routes_of,
111    tasks_of,
112};
113#[cfg(feature = "actuator")]
114pub use runtime::modules::{ModuleRuntime, RuntimeByModule, by_module};
115pub use runtime::secrets::{Kept, Secrets};
116pub use settings::{AppEntry, General, IndexRows, Motion, Settings, SettingsError, ThemeChoice};
117pub use surface::{
118    AcceptedSurface, Difference, Proposal, ScanCounts, SurfaceAnswer, SurfaceEntry, SurfaceKind,
119    SurfaceProblem, SurfaceScan, Typed, surface_args,
120};