Discovery
Discovery in BeDoc
Section titled “Discovery in BeDoc”Discovery in BeDoc is the process of locating the right actions to handle your request. Instead of requiring you to manually specify a parser or printer, BeDoc allows you to define what you need in terms of language and format, and it will take care of how that need is fulfilled.
However, if you prefer to be explicit, you can still specify a particular parser or printer—Discovery won’t stand in your way.
How It Works
Section titled “How It Works”During the Discovery process, BeDoc will:
- accept your input, which may include:
- a
mockdirectory, or - any configuration expression specifying:
- language and/or format directives
- parser and/or printer directives
- a
- search for applicable actions within:
- the global NPM
node_modules - the local project’s
node_modules
- the global NPM
- validate all findings, ensuring that each:
The Discovery Flowchart
Section titled “The Discovery Flowchart”Also, here’s a Mermaid diagram representing the Discovery process. (That there are no actual mermaids involved remains a source of deep disappointment.)
---config: look: classic layout: elk---flowchart TD A["💡 Discovery Process"] -- User Request --> B["📥 Accept Input"] B -- Uses Mock --> M["📂 Mock Directory"] B -- Search Needed --> S["🔍 Search global/local node_modules"] S --> MA["📑 Identify Matching Actions"] MA -- Language/Format Criteria --> C1["📝 Language/Format"] MA -- Specific Actions --> C2["⚙️ Specific Actions"] M -- Skip Search --> V["🏗️ Validate & Verify"] C1 --> V C2 --> V V -- Check Required Fields --> V1["🔍 Check Meta Info"] V -- Check Structure --> V2["🛠️ Check Action Object"] V -- Check Terms --> V3["📜 Check Contract Terms"] V1 --> AOK["✅ Action Approved"] V2 --> AOK V3 --> AOK B@{ shape: decision}