Expand description
Reads a Laravel app that uses nwidart/laravel-modules from its files.
Nothing here draws or writes into the app folder. It runs PHP only when asked,
with the run feature (see test_php). The entry point is
read_app, which turns a folder into an AppSnapshot: plain data that an
interface, a command line tool or a service can show.
Modules§
- ansi
- Command output with its escape sequences read into four styles.
- catalog_
cache - The generators read from an app (P3), kept in Mortise’s data folder.
- history
- The last runs of each app, kept on disk.
Structs§
- Accepted
Surface - The accepted public surface of a module: the
surfacekey of itsmodule.json. - Allowed
Use - The rule allowed use: the
allowed-useobject ofmortise.json. nwidart/larch reads the same key. - AppEntry
- An app Mortise knows.
- AppSnapshot
- Everything Mortise knows about an app from one read of its folder.
- Argument
- An argument of a generator, in the order artisan reads it.
- Catalog
- The generators of the package, as P3 describes them.
- Check
Result - A check that ran, with how many things it looked at and how many findings it gave.
- Churn
- How often a folder changed.
- Command
Line - A program and its arguments, started without a shell.
- Component
- One health indicator of the app.
- Context
- What
planneeds to know about the app. - Coverage
- Covered and total statements.
- Coverage
Report - The coverage report an app’s coverage figures come from.
- Coverage
Settings - The coverage limit and report of an app: the
coverageobject ofmortise.json, or the flags ofmortise check. A value that is set wins over the settings of the window. - Cycle
- Modules that are on and use each other, directly or through others.
- Difference
- One difference between a later scan and the accepted surface (S5.9).
- Editor
Error - The editor did not start.
programis the first word of the command andmessageis the operating system’s own text. - Environment
- A running copy of an app that Mortise can ask for its runtime status.
- Failed
Migration - The migration at which a run failed.
- Figures
- The figures of a scope over a range.
- Filled
- What the user filled in on the form of a generator.
- Finding
- Findings
- The findings of an app and the checks they came from.
- General
- What applies to Mortise as a whole, not to one app.
- Generated
File - One file of a generator run.
- Generator
- One generator, such as
module:make-model. - Generator
Option - An option of a generator.
- Generator
Report - The document of a generator and of
module:make, for a run and for a dry run. - Info
- What
infosays. Every part is absent when the app does not give it. - Kind
Count - How many files of one kind a module has.
- Lang
Module - The translations of one module in a
LangReport. - Lang
Report - The document of
module:lang --json, and the report Mortise keeps of it. - Layout
- Where the modules of an app live and how their state is kept.
- Line
- Requests per minute over a range.
- Link
- One module uses another.
- LiveApp
- An app folder with a worker thread that reads it.
- Live
Metrics - The reads of one environment, shared between the worker and the interface.
- Live
Runtime - An environment with a worker thread that asks it.
- Locale
- What one locale of a module lacks.
- Metrics
State - What the reads of an environment gave so far.
- Migration
Count - The migrations that a run ran and rolled back.
- Migration
Row - One migration of a
ModuleStatus. - Migration
Status - The document of
module:migrate-status --json. - Module
- One module of an app.
- Module
Migrations - The migration state of one module.
- Module
Runtime - What the running app reports about one module.
- Module
Status - The migrations of one module in a
MigrationStatus. - Module
Tests - The tests of one module in a
TestReport. The counts areNonewhen the module has no tests folder or the runner wrote no report. - Option
Set - The options an action takes, as S10.2 draws them.
- Options
- The options the user set for an action. An option that the action does not take is ignored.
- Pace
- How often things are asked.
- Package
Data - What the package said about an app, from the reads the user started.
- PhpSettings
- How PHP runs for one app.
- Point
- A rate between two neighbouring kept reads.
- Progress
- How far a read of an app is: how many of its PHP files are read.
- Proposal
- What a scan found, as a list the developer can change.
- RanMigration
- A migration that ran.
- Rates
- What one row of the table counts over the range.
- Read
- A read that runs.
- Read
Cache - The facts of the files read so far, by path.
- ReadEnd
- How a read ended, with its lines.
- Read
Options - What the user set for an app in Mortise, as far as reading it is concerned.
- Recent
Run - A run that was an action or a generator, and when it started.
- Reference
- One file of a module that names one class of another module.
- Reported
File - One file of a
GeneratorReport. - Route
- One route of the app, from
mappings. - Row
- One row of the table.
- Rules
- The rules of this version, and whether a broken one fails CI.
- Run
- A command that started. Its owner thread sends what happens to it.
- Runs
- The commands that run now, one per app at most. A clone shares the same list.
- Runtime
- What a running app answered.
- Runtime
ByModule - The components of an answer, split between the app and its modules.
- Runtime
State - What a
LiveRuntimeholds at this moment. - Scan
Counts - How far a scan is, for the lines of the scanning view.
- Secrets
- The secrets Mortise keeps, by app folder and environment name.
- Settings
- Everything Mortise keeps between runs.
- Surface
Answer - What
module:surface --jsonprints: the surface it stored, or why it stored nothing. - Surface
Entry - One thing a module offers to the outside.
- Surface
Problem - One reason
module:surfacestored nothing. - Surface
Scan - A scan in progress. It reads the files of one module, a few at each step, so that the interface can show how far it is and stop it.
- Task
- One scheduled task of the app, from
scheduledtasks. - Test
Report - The document of
module:test --json. - Todo
- Work in progress on a module. It is not a finding: it changes no mark and no count.
- Version
- A package version as
composer.lockrecords it.
Enums§
- Action
- An action that Mortise can run for a module or for all modules.
- Answer
- What asking an environment gave. “No answer” and “Not authorized” are Mortise’s words for the connection, not statuses of the app.
- Ask
- The question Mortise asks before it runs a command.
- Check
- What Mortise checks. The first three are the boundary rules of the app.
- Credentials
- What the app’s middleware asks for.
- Data
Error - Why a run gave no document.
- Detail
- What exactly was found.
- Detected
- A runner that the folder of an app points to.
- Editor
- The editor that opens files.
- Failure
- Why a test failed. The interface writes the text; this is data only.
- File
Action - What a generator means to do with a file.
- File
Outcome - What a generator run did with one file.
- File
Result - What a generator did with a file.
- Finding
State - The finding state of a module: its worst finding.
- Git
- The git state of an app folder.
- Group
- The groups of the picker, in the order of S9.1.
- Index
Rows - How high the rows of the module index are.
- Kept
- Where a secret went.
- Layout
Key - A setting of
config/modules.phpthat Mortise needs. - Live
State - What a
LiveAppholds at this moment. - Manifest
- What reading a module’s
module.jsongave. - Module
State - Whether a module is turned on.
- Motion
- Whether things move.
- Name
Rule - How Mortise checks a name the user types for an argument.
- NoMetrics
- Why a read of
prometheusgave no metrics. - NotKept
- Why a read added nothing to the store.
- Plan
- What happens when the user runs an action.
- Ran
- What a run of the history was.
- Range
- The time the figures of the tab cover.
- Read
Error - Why a folder could not be read as an app.
- RowOf
- What a row is about. Rows of one kind sort by name: a route by its route, then its method.
- Rules
Error - Rules
Source - Where the rules of a snapshot came from.
- RunEnd
- How a run ended.
- RunEvent
- What a run sends, in order.
RunEvent::Endedcomes last. - Runner
Kind - The program through which PHP runs artisan for an app.
- Scope
- What the rows of the table are.
- Settings
Error - Severity
- Start
Error - Why a command did not start.
- Status
- The status the actuator reports, for the app or for one component.
- Stream
- The pipe a line came from.
- Surface
Kind - What an entry of a public surface is.
- Target
- What an action runs on.
- Test
Outcome - What came of a test of the runner of an app.
- Theme
Choice - The theme of the interface.
- Typed
- What a name typed by hand turned out to be.
- Under
- The 95% figure: a bucket bound, in seconds.
Constants§
- ALL_
CODE - The code of the “All modules” row. No module can have it.
- CHURN_
DAYS - The window for “commits in 30 days”.
- DEFAULT_
COVERAGE_ LIMIT - The coverage limit of an app until it is changed: a module under it is a warning.
- METRICS_
BODY_ LIMIT - The most text Mortise reads from one
prometheusanswer, after decompression. - MODULE_
MAKE - The artisan name of the generator of a new module.
- OTHER
- The kind of files that are in none of the generator folders.
- OUTPUT_
LIMIT - The most bytes of output one run keeps. A line counts as its length plus one for its newline.
- RULES_
FILE - The name of the rules file in the app folder.
- STOP_
WAIT - The longest a stop takes to end a run, from
Run::stoptoRunEvent::Ended:STOP_GRACEto the kill,GRACEandDETACHfor the readers, and a margin for a fewTICKs and, on Windows,taskkill. A stop that comes while a child that outlived the program still writes takesSTOP_GRACEandDETACH. - TESTS
- The kind of test files.
- TEST_
LIMIT - How long “Test” waits for
artisan --versionbefore it stops it.
Functions§
- app_
relative - A path the package printed, relative to the app folder
rootwith/between its parts, orNonewhen Mortise cannot place it. The package prints absolute paths with/on every platform, from the real folder of the app, sorootis compared as given and with its links resolved. - ask
- Asks an environment for everything Mortise reads: what is exposed,
health, andinfo,mappingsandscheduledtaskswhere they are exposed. - ask_
metrics - Asks an environment for
prometheus.Okis the text of a 200 that is not empty. - ask_
status - Asks an environment for
healthonly, which is what the regular check does. The rest is taken over fromearlier, the last full answer. - asks_
again - True when Mortise asks before
argsrun: a command with--force, a roll back or a reset that is not a dry run, and refresh, fresh and delete. Run again asks first for these too, because the question was about this very line. - autoload_
failed - True when the output says that
composer dump-autoloadfailed. - by_
module - Splits the components of an answer between the app and its modules.
- class_
name_ ok - True for a class name: one or more segments split on
/or\, each an ASCII letter, then ASCII letters, digits or_.create_posts_tablepasses. - columns
- Places modules in columns from left to right: a module sits to the left of what it uses, and the modules of a circle share a column. A circle through a module that is off counts here too.
- detect
- What the folder points to, the best first. Reads files only.
- document
- The last non-empty line of standard output, read as
T. - editor_
arguments - Splits a command into its program and arguments, with the file and the line put in.
- failed_
migration - The first migration that failed, or
Nonewhen no migration line failed. - fuzzy
- How well a query matches a text. Lower is better.
Nonewhen it does not match. - generated_
files - The files of a generator run, in output order.
forceis true when the run carried--force. - generator_
gives_ data - True when Mortise lists the files of
generatorby a dry run and reads the result of its run from its answer (design D5, D6): the package gives data (gives_data) and ships the generator (ships). An app’s own generator runs as before 13.4. - gives_
data - True when the app’s package gives P2 to P8: a released 13.4.0 or later.
- has_
option - True when the artisan words hold
optionbefore a--. A word after--is a name, such as a module named--json. - herd_
config_ dir - The valet folder of Herd on this platform.
Noneon Linux. - migrate_
status_ args - The words of a read of the migration state of
targetondatabase:module:migrate-status Checkout --database=testing --json, or--all. An emptydatabaseis the default connection and is left out. A module name that starts with-goes after--, ascrate::planputs it. - migration_
count - What the migration lines of a run say it ran and rolled back.
- migration_
file - The file of a migration in the default folder of the package,
database/migrations, when it exists. - migrations_
changed_ by - The migration state that a run of the artisan words
argsmay have changed, when it ends, whatever its exit code (design D7): a migrate, roll back, reset, refresh or fresh that is not a dry run (--pretend). Every module for--all, for a fresh or for words that name no module; else the module the words name, the second word or the word after--.Nonefor other words. - model_
flag_ of - The flag of
module:make-modelwhose call writes the file atpath, for the model typed asmodel:policyfor<Model>Policy.php.Nonefor the model’s own file, for a migration, whose file name carries the time, and for any other file. - module_
name_ ok - True for a module name: an ASCII letter, then ASCII letters, digits,
-or_. The package also takes a leading_; Mortise does not. - module_
of - The module a class belongs to: the one whose namespace the class name starts with.
- module_
of_ task - The module a scheduled task belongs to. The module its
moduletag names wins, compared without case. Without the tag, or when the tag names no module of the app, it is the module of its class, or the module that declares the command ofphp artisan <name>. Then a task with a description, a closure or a shell command belongs to none. - open_
in_ editor - Starts the editor on a file at a line. Does not wait for it to close.
- plan
- The plan for an action: its words, and whether Mortise asks first.
- prohibited
- True when the output says that the app prohibits the command. Laravel’s warn
component prints the sentence after
WARN. - propose_
codes - Proposes a code for every name, in the order given. Each code is three capital
letters or digits, differs from all the others and is never
ALL_CODE. - propose_
monogram - Proposes the two letter monogram of an app from the name of its folder: the initials of its first two words, or its first two letters. If that is taken, the first two letters; if that is taken too, the first letter and the next free letter.
- read_
app - Reads the app in
root. Reads only: nothing in the folder is changed and nothing is run. - read_
app_ cached - Reads the app in
root. Files that did not change since they were put incacheare not read again. - read_
app_ env APP_ENVfrom the.envfile of the app inroot, read now. A confirmation checks it again just before a destructive command starts.- read_
app_ with - Reads the app in
root, keeping the codes its modules already have. - read_
layout - Reads the layout of the app in
rootfromconfig/modules.phpnow, without the rest of the app. A confirmation checks it again just before a delete. - recent_
runs - The distinct actions and generators of
runs, which hold the latest first: at mostlimit, the latest first. A run is the action ofAction::from_artisanor a generator ofcatalog, by its first word, with the module of its words. A run that is neither, whose module is not inapp, or whose action the Actions tab does not list for the module as it is now (Turn off of a module that is off), is left out. Of two runs of the same action or generator on the same module, the latest stays. - refuses
- True when Mortise does not run
action, and its line can only be copied: reset, refresh, fresh and delete in production, and delete when the modules folder is assumed. - replace_
words - The words that write
leftagain with--force, if Mortise knows the generator that wrote it.runholds the words of the run that left the file. - reported_
files - The files of a generator run from its document (P5), in write order. The folder
that
module:make --forcedeletes is not a file. A path is made relative to the app folderroot, as the output lines print it, throughapp_relativewith the modules foldermodules; a path it cannot place stays as printed. - routes_
by_ module - How many routes each module has, most first, and how many are in no module: closures and the routes of other packages.
- routes_
of - The routes of one module: those whose action is a class of the module.
- shipped_
mark - The version that
Catalog::shippeddescribes, when it is not the app’s own major and minor version:13.4for 13.5.0,13.3for 13.2.0 or a dev version.Nonewhen the shipped catalog is of the app’s version. - stop_
asks_ first - Whether a stop of the command with these artisan words asks first. A migration that stops half way can leave the database between two states.
- stores_
surface - True when the app’s package stores a public surface (P6):
module:surface, in a released 13.5.0 or later. The version is read as forgives_data. - surface_
args - The package command that stores
surfaceas the accepted surface ofmodule. Its standard input isAcceptedSurface::to_stdin. - tasks_
of - The scheduled tasks of one module.
- test_
php - Runs
artisan --versionthroughrunnerinfolder, for at mostlimit. It blocks, so an interface calls it off its drawing thread. - typed_
name_ matches - True when
typedisnameexactly: same case, no space trimmed. An empty text never matches. - whole_
document document, unless the last non-empty line ofstdoutwas cut (cut): thenDataError::Cut, since the start of a line may parse as a whole document.- with_
dry_ run - The artisan words with
--dry-run --json, before a--when the words hold one. A flag the words hold already is not added again. - with_
json - The artisan words with
--json, before a--when the words hold one. Words that hold it already stay as they are.
Type Aliases§
- Metrics
Clock - The clock of the reads: the time since any fixed start.
- Secret
- The secret that goes with
Credentials: a token, a password or a header value.