edsger 0.82.0 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -2
- package/assets/README.md +31 -18
- package/assets/audit/base.yaml +187 -0
- package/assets/audit/csharp.yaml +46 -0
- package/assets/audit/dart.yaml +46 -0
- package/assets/audit/go.yaml +46 -0
- package/assets/audit/java.yaml +46 -0
- package/assets/audit/python.yaml +49 -0
- package/assets/audit/typescript.yaml +51 -0
- package/assets/audit-viewer/assets/audit--os0TXXZ.css +1 -0
- package/assets/audit-viewer/assets/audit-CSblYELs.js +2 -0
- package/assets/audit-viewer/audit.html +31 -0
- package/assets/audit-viewer-single.html +32 -0
- package/assets/diagrams/base.yaml +351 -0
- package/assets/diagrams/csharp.yaml +48 -0
- package/assets/diagrams/dart.yaml +41 -0
- package/assets/diagrams/go.yaml +44 -0
- package/assets/diagrams/java.yaml +43 -0
- package/assets/diagrams/python.yaml +41 -0
- package/assets/diagrams/typescript.yaml +45 -0
- package/assets/diagrams-viewer/assets/abnfDiagram-VRR7QNED-CWLpbgGU.js +1 -0
- package/assets/diagrams-viewer/assets/arc-B4VipCr_.js +1 -0
- package/assets/diagrams-viewer/assets/architectureDiagram-ZJ3FMSHR-BMDodQXV.js +36 -0
- package/assets/diagrams-viewer/assets/blockDiagram-677ZJIJ3-DbHoVVH-.js +132 -0
- package/assets/diagrams-viewer/assets/c4Diagram-LMCZKHZV-CyUEj98S.js +10 -0
- package/assets/diagrams-viewer/assets/channel-DWh7ErxY.js +1 -0
- package/assets/diagrams-viewer/assets/chunk-2Q5K7J3B-CWu0p0os.js +1 -0
- package/assets/diagrams-viewer/assets/chunk-32BRIVSS-BhVWSCoK.js +1 -0
- package/assets/diagrams-viewer/assets/chunk-5VM5RSS4-B_2wZBAn.js +15 -0
- package/assets/diagrams-viewer/assets/chunk-EX3LRPZG-D_MRgtfL.js +231 -0
- package/assets/diagrams-viewer/assets/chunk-JWPE2WC7-dsh1qiy0.js +1 -0
- package/assets/diagrams-viewer/assets/chunk-MOJQB5TN-BvLm4a6B.js +88 -0
- package/assets/diagrams-viewer/assets/chunk-RYQCIY6F-gJyPbIpx.js +1 -0
- package/assets/diagrams-viewer/assets/chunk-V7JOEXUC-BMvj0zJM.js +206 -0
- package/assets/diagrams-viewer/assets/chunk-VR4S4FIN-Di2iBUXs.js +1 -0
- package/assets/diagrams-viewer/assets/chunk-XXDRQBXY-Cfajbd4I.js +1 -0
- package/assets/diagrams-viewer/assets/classDiagram-OUVF2IWQ-winWhRce.js +1 -0
- package/assets/diagrams-viewer/assets/classDiagram-v2-EOCWNBFH-winWhRce.js +1 -0
- package/assets/diagrams-viewer/assets/cose-bilkent-JH36ORCC-ClE2EhTL.js +1 -0
- package/assets/diagrams-viewer/assets/cynefin-VYW2F7L2-nm5z0Jwc.js +178 -0
- package/assets/diagrams-viewer/assets/cynefinDiagram-TSTJHNR4-CGhnRh5V.js +62 -0
- package/assets/diagrams-viewer/assets/cytoscape.esm-CUqq0XTU.js +331 -0
- package/assets/diagrams-viewer/assets/dagre-VKFMJZFB-COlahHKk.js +4 -0
- package/assets/diagrams-viewer/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/assets/diagrams-viewer/assets/diagram-FQU43EPY-DsUclBK0.js +3 -0
- package/assets/diagrams-viewer/assets/diagram-G47NLZAW-CnjT9SvX.js +24 -0
- package/assets/diagrams-viewer/assets/diagram-NH7WQ7WH-DiGoGOyA.js +24 -0
- package/assets/diagrams-viewer/assets/diagram-OA4YK3LP-qi8nz9qe.js +30 -0
- package/assets/diagrams-viewer/assets/diagram-WEI45ONY-BV3PGzwL.js +41 -0
- package/assets/diagrams-viewer/assets/diagrams-8nCc1utO.css +1 -0
- package/assets/diagrams-viewer/assets/diagrams-CF48btj0.js +314 -0
- package/assets/diagrams-viewer/assets/ebnfDiagram-CCIWWBDH-CtKWe-dh.js +1 -0
- package/assets/diagrams-viewer/assets/erDiagram-Q63AITRT-Aajee3Fz.js +85 -0
- package/assets/diagrams-viewer/assets/flowDiagram-23GEKE2U-N3Xe2K9t.js +156 -0
- package/assets/diagrams-viewer/assets/ganttDiagram-NO4QXBWP-Bjicdg8S.js +292 -0
- package/assets/diagrams-viewer/assets/gitGraphDiagram-IHSO6WYX-CacIXKIe.js +106 -0
- package/assets/diagrams-viewer/assets/graph-C2PyVmSI.js +1 -0
- package/assets/diagrams-viewer/assets/infoDiagram-FWYZ7A6U-CVmDapTx.js +2 -0
- package/assets/diagrams-viewer/assets/init-Gi6I4Gst.js +1 -0
- package/assets/diagrams-viewer/assets/ishikawaDiagram-FXEZZL3T-DMJf1YQN.js +70 -0
- package/assets/diagrams-viewer/assets/journeyDiagram-5HDEW3XC-Bk_U6MPk.js +139 -0
- package/assets/diagrams-viewer/assets/kanban-definition-HUTT4EX6-n05wGXiD.js +89 -0
- package/assets/diagrams-viewer/assets/katex-C5jXJg4s.js +257 -0
- package/assets/diagrams-viewer/assets/layout-HEHzrzvT.js +1 -0
- package/assets/diagrams-viewer/assets/linear-DD_zky65.js +1 -0
- package/assets/diagrams-viewer/assets/map-BQHxRNoK.js +1 -0
- package/assets/diagrams-viewer/assets/mindmap-definition-LN4V7U3C-BWt_I9vr.js +96 -0
- package/assets/diagrams-viewer/assets/ordinal-Cboi1Yqb.js +1 -0
- package/assets/diagrams-viewer/assets/pegDiagram-2B236MQR-CCZTIXBZ.js +1 -0
- package/assets/diagrams-viewer/assets/pieDiagram-ENE6RG2P-BmIQql1w.js +39 -0
- package/assets/diagrams-viewer/assets/quadrantDiagram-ABIIQ3AL-BPvOH5QN.js +7 -0
- package/assets/diagrams-viewer/assets/railroadDiagram-RFXS5EU6-DpgVbjSl.js +1 -0
- package/assets/diagrams-viewer/assets/requirementDiagram-TGXJPOKE-CDVpI3MH.js +84 -0
- package/assets/diagrams-viewer/assets/sankeyDiagram-HTMAVEWB-DU2J23Xy.js +40 -0
- package/assets/diagrams-viewer/assets/sequenceDiagram-DBY2YBRQ-BIVlCWU4.js +162 -0
- package/assets/diagrams-viewer/assets/sizeCapture-X5ZJPWSS-C9KxyKN2.js +1 -0
- package/assets/diagrams-viewer/assets/stateDiagram-2N3HPSRC-Ba5mRI9d.js +1 -0
- package/assets/diagrams-viewer/assets/stateDiagram-v2-6OUMAXLB-Dw-0OG6b.js +1 -0
- package/assets/diagrams-viewer/assets/swimlanes-5IMT3BWC-aOsD2O80.js +2 -0
- package/assets/diagrams-viewer/assets/swimlanesDiagram-G3AALYLV-KujklZml.js +8 -0
- package/assets/diagrams-viewer/assets/timeline-definition-FHXFAJF6-CmYd84Hc.js +120 -0
- package/assets/diagrams-viewer/assets/vennDiagram-L72KCM5P-CDiMK-z9.js +34 -0
- package/assets/diagrams-viewer/assets/wardleyDiagram-EHGQE667-BKLsv25u.js +78 -0
- package/assets/diagrams-viewer/assets/xychartDiagram-FW5EYKEG-Bpj6Ub-a.js +7 -0
- package/assets/diagrams-viewer/diagrams.html +31 -0
- package/assets/diagrams-viewer-single.html +3593 -0
- package/assets/manifest.yaml +13 -1
- package/assets/mindmap/base.yaml +115 -0
- package/assets/mindmap/csharp.yaml +32 -0
- package/assets/mindmap/dart.yaml +42 -0
- package/assets/mindmap/go.yaml +33 -0
- package/assets/mindmap/java.yaml +40 -0
- package/assets/mindmap/python.yaml +43 -0
- package/assets/mindmap/typescript.yaml +47 -0
- package/assets/mindmap-viewer/assets/mindmap-D7KMR9EM.css +1 -0
- package/assets/mindmap-viewer/assets/mindmap-Di5RM-4N.js +4 -0
- package/assets/mindmap-viewer/mindmap.html +31 -0
- package/assets/mindmap-viewer-single.html +34 -0
- package/assets/schema/audit.schema.json +66 -0
- package/assets/schema/diagrams.schema.json +100 -0
- package/assets/schema/mindmap.schema.json +69 -0
- package/assets/skills/audit/SKILL.md +76 -0
- package/assets/skills/diagram/SKILL.md +70 -0
- package/assets/skills/mindmap/SKILL.md +69 -0
- package/assets/viewer/assets/index-BFtGar9N.css +1 -0
- package/assets/viewer/assets/index-XOKyyudT.js +3 -0
- package/assets/viewer/index.html +19 -2
- package/assets/viewer-single.html +21 -4
- package/dist/index.js +1720 -318
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/assets/viewer/assets/index-C7hwGkuU.js +0 -3
- package/assets/viewer/assets/index-Dhc-7q5o.css +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
id: csharp
|
|
2
|
+
name: C# / .NET Overlay
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
kind: diagrams
|
|
5
|
+
extends: base
|
|
6
|
+
appliesTo: [csharp]
|
|
7
|
+
|
|
8
|
+
groups:
|
|
9
|
+
- id: architecture
|
|
10
|
+
name: Architecture & Structure
|
|
11
|
+
diagrams:
|
|
12
|
+
- id: aspnet-layers
|
|
13
|
+
title: ASP.NET Layered Architecture
|
|
14
|
+
type: flowchart
|
|
15
|
+
appliesWhen: >
|
|
16
|
+
An ASP.NET Core web API/app (Controllers or Minimal APIs) with services
|
|
17
|
+
and EF Core. Shows the request path through the layers and DI.
|
|
18
|
+
detect:
|
|
19
|
+
[
|
|
20
|
+
"ControllerBase",
|
|
21
|
+
"[ApiController]",
|
|
22
|
+
"MapGet",
|
|
23
|
+
"MapPost",
|
|
24
|
+
"AddScoped",
|
|
25
|
+
"IServiceCollection"
|
|
26
|
+
]
|
|
27
|
+
guidance: >
|
|
28
|
+
Read the controllers/endpoints, registered services, and DbContext to
|
|
29
|
+
map Endpoints → Services → Repositories/DbContext → Database as a
|
|
30
|
+
`flowchart TB` with layers in `subgraph`s. Reflect the real
|
|
31
|
+
dependency-injection wiring where you can see it.
|
|
32
|
+
references:
|
|
33
|
+
- "https://learn.microsoft.com/aspnet/core/fundamentals/"
|
|
34
|
+
|
|
35
|
+
- id: data
|
|
36
|
+
name: Data & Persistence
|
|
37
|
+
diagrams:
|
|
38
|
+
- id: efcore-model
|
|
39
|
+
title: EF Core Model
|
|
40
|
+
type: classDiagram
|
|
41
|
+
appliesWhen: >
|
|
42
|
+
Entity Framework Core models / a DbContext are present. Shows the
|
|
43
|
+
entity classes and their navigation-property relationships.
|
|
44
|
+
detect: ["DbContext", "DbSet<", "[Key]", "HasMany", "WithOne", "EntityFramework"]
|
|
45
|
+
guidance: >
|
|
46
|
+
Model the entity POCOs and their navigation properties as a
|
|
47
|
+
`classDiagram`, using the DbContext `DbSet`s and fluent/attribute
|
|
48
|
+
configuration to get the relationships and multiplicities right.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
id: dart
|
|
2
|
+
name: Dart / Flutter Overlay
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
kind: diagrams
|
|
5
|
+
extends: base
|
|
6
|
+
appliesTo: [dart]
|
|
7
|
+
|
|
8
|
+
groups:
|
|
9
|
+
- id: architecture
|
|
10
|
+
name: Architecture & Structure
|
|
11
|
+
diagrams:
|
|
12
|
+
- id: flutter-widget-tree
|
|
13
|
+
title: Flutter Widget Tree
|
|
14
|
+
type: flowchart
|
|
15
|
+
appliesWhen: >
|
|
16
|
+
A Flutter app. Shows the widget composition for the main screens —
|
|
17
|
+
the Flutter equivalent of a component tree.
|
|
18
|
+
detect:
|
|
19
|
+
["flutter", "StatelessWidget", "StatefulWidget", "MaterialApp", "Scaffold", "*.dart"]
|
|
20
|
+
guidance: >
|
|
21
|
+
From `main.dart` and the routed screens, map the important widgets and
|
|
22
|
+
their build-tree composition as a `flowchart TD`. Focus on the screen
|
|
23
|
+
scaffolds and reusable widgets; note where state is injected
|
|
24
|
+
(Provider/InheritedWidget) rather than every layout widget.
|
|
25
|
+
references:
|
|
26
|
+
- "https://docs.flutter.dev/ui/widgets-intro"
|
|
27
|
+
|
|
28
|
+
- id: behavioral
|
|
29
|
+
name: Behaviour & Control Flow
|
|
30
|
+
diagrams:
|
|
31
|
+
- id: bloc-state
|
|
32
|
+
title: State Management (BLoC / Cubit)
|
|
33
|
+
type: stateDiagram-v2
|
|
34
|
+
appliesWhen: >
|
|
35
|
+
The app uses BLoC/Cubit (or Riverpod/Provider) state management. Shows
|
|
36
|
+
the states a feature moves through and the events driving them.
|
|
37
|
+
detect: ["bloc", "cubit", "riverpod", "provider", "emit(", "StateNotifier"]
|
|
38
|
+
guidance: >
|
|
39
|
+
Pick a representative feature's BLoC/Cubit and model its states and the
|
|
40
|
+
events/transitions between them as a `stateDiagram-v2`, tracing each
|
|
41
|
+
transition to an `emit`/event handler in the code.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
id: go
|
|
2
|
+
name: Go Overlay
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
kind: diagrams
|
|
5
|
+
extends: base
|
|
6
|
+
appliesTo: [go]
|
|
7
|
+
|
|
8
|
+
groups:
|
|
9
|
+
- id: behavioral
|
|
10
|
+
name: Behaviour & Control Flow
|
|
11
|
+
diagrams:
|
|
12
|
+
- id: goroutine-concurrency
|
|
13
|
+
title: Goroutine / Channel Concurrency
|
|
14
|
+
type: flowchart
|
|
15
|
+
appliesWhen: >
|
|
16
|
+
The program uses goroutines and channels for a concurrent pipeline,
|
|
17
|
+
fan-out/fan-in, or worker pool. One of Go's most illuminating and
|
|
18
|
+
hardest-to-read-from-source structures.
|
|
19
|
+
detect: ["go func", "chan ", "make(chan", "sync.WaitGroup", "errgroup", "worker pool"]
|
|
20
|
+
guidance: >
|
|
21
|
+
Identify the concurrent structure (producers, worker pool, fan-in
|
|
22
|
+
collector) and render it as a `flowchart LR` where goroutines are nodes
|
|
23
|
+
and channels are the edges between them (label edges with the channel's
|
|
24
|
+
element type). Show closing/cancellation (context) where it matters.
|
|
25
|
+
references:
|
|
26
|
+
- "https://go.dev/blog/pipelines"
|
|
27
|
+
|
|
28
|
+
- id: architecture
|
|
29
|
+
name: Architecture & Structure
|
|
30
|
+
diagrams:
|
|
31
|
+
- id: go-package-layout
|
|
32
|
+
title: Package Layout (cmd / internal / pkg)
|
|
33
|
+
type: flowchart
|
|
34
|
+
appliesWhen: >
|
|
35
|
+
A multi-package Go module, especially one using the standard
|
|
36
|
+
cmd/internal/pkg layout. Shows the import direction between packages.
|
|
37
|
+
detect: ["cmd/", "internal/", "pkg/", "go.mod"]
|
|
38
|
+
guidance: >
|
|
39
|
+
Read go.mod and the package imports to map the top-level packages and
|
|
40
|
+
their import edges as a `flowchart LR`, keeping the dependency direction
|
|
41
|
+
faithful (binaries in cmd/ depend inward on internal/pkg, never the
|
|
42
|
+
reverse). Flag any import cycle you find.
|
|
43
|
+
references:
|
|
44
|
+
- "https://go.dev/doc/modules/layout"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
id: java
|
|
2
|
+
name: Java Overlay
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
kind: diagrams
|
|
5
|
+
extends: base
|
|
6
|
+
appliesTo: [java]
|
|
7
|
+
|
|
8
|
+
groups:
|
|
9
|
+
- id: architecture
|
|
10
|
+
name: Architecture & Structure
|
|
11
|
+
diagrams:
|
|
12
|
+
- id: spring-layered-architecture
|
|
13
|
+
title: Spring Layered Architecture
|
|
14
|
+
type: flowchart
|
|
15
|
+
appliesWhen: >
|
|
16
|
+
A Spring / Spring Boot application (or similar layered JVM app). Shows
|
|
17
|
+
the Controller → Service → Repository layering and the beans wired
|
|
18
|
+
between them.
|
|
19
|
+
detect:
|
|
20
|
+
["@RestController", "@Controller", "@Service", "@Repository", "spring-boot", "@Component"]
|
|
21
|
+
guidance: >
|
|
22
|
+
Read the annotated components and map the layers (Controller, Service,
|
|
23
|
+
Repository/Mapper, plus config/clients) and their dependency edges as a
|
|
24
|
+
`flowchart TB`, grouping each layer in a `subgraph`. Show the datasource
|
|
25
|
+
and any external clients the repositories/services call.
|
|
26
|
+
references:
|
|
27
|
+
- "https://docs.spring.io/spring-boot/reference/using/structuring-your-code.html"
|
|
28
|
+
|
|
29
|
+
- id: data
|
|
30
|
+
name: Data & Persistence
|
|
31
|
+
diagrams:
|
|
32
|
+
- id: jpa-entity-model
|
|
33
|
+
title: JPA Entity Model
|
|
34
|
+
type: classDiagram
|
|
35
|
+
appliesWhen: >
|
|
36
|
+
JPA/Hibernate entities are present (@Entity). Complements the ER diagram
|
|
37
|
+
by showing the object model and its relationship annotations.
|
|
38
|
+
detect:
|
|
39
|
+
["@Entity", "@Table", "@OneToMany", "@ManyToOne", "hibernate", "jakarta.persistence"]
|
|
40
|
+
guidance: >
|
|
41
|
+
Model the @Entity classes as a `classDiagram` with fields and the JPA
|
|
42
|
+
relationships (@OneToMany/@ManyToOne/@ManyToMany) rendered with correct
|
|
43
|
+
multiplicity. Keep to the core aggregate roots and their neighbours.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
id: python
|
|
2
|
+
name: Python Overlay
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
kind: diagrams
|
|
5
|
+
extends: base
|
|
6
|
+
appliesTo: [python]
|
|
7
|
+
|
|
8
|
+
groups:
|
|
9
|
+
- id: data
|
|
10
|
+
name: Data & Persistence
|
|
11
|
+
diagrams:
|
|
12
|
+
- id: etl-dag
|
|
13
|
+
title: Workflow / ETL DAG
|
|
14
|
+
type: flowchart
|
|
15
|
+
appliesWhen: >
|
|
16
|
+
A data-orchestration or pipeline framework is used (Airflow, Dagster,
|
|
17
|
+
Prefect, Luigi, dbt) or there is an explicit multi-stage data pipeline.
|
|
18
|
+
Shows tasks and their dependency DAG.
|
|
19
|
+
detect: ["airflow", "dagster", "prefect", "luigi", "dbt", "dag", "@task", "pipeline"]
|
|
20
|
+
guidance: >
|
|
21
|
+
Read the DAG/flow definitions and render the tasks and their upstream
|
|
22
|
+
dependencies as a `flowchart LR` that mirrors the real DAG edges. Label
|
|
23
|
+
nodes with the operator/task name and group by stage where it helps.
|
|
24
|
+
references:
|
|
25
|
+
- "https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dags.html"
|
|
26
|
+
|
|
27
|
+
- id: behavioral
|
|
28
|
+
name: Behaviour & Control Flow
|
|
29
|
+
diagrams:
|
|
30
|
+
- id: async-task-flow
|
|
31
|
+
title: Background Task Flow
|
|
32
|
+
type: sequenceDiagram
|
|
33
|
+
appliesWhen: >
|
|
34
|
+
A task queue or async worker system is used (Celery, RQ, Dramatiq,
|
|
35
|
+
arq). Shows how a job is enqueued, brokered, and processed.
|
|
36
|
+
detect: ["celery", "rq", "dramatiq", "arq", "broker", "worker", "@shared_task"]
|
|
37
|
+
guidance: >
|
|
38
|
+
Trace one representative job from the producer through the broker
|
|
39
|
+
(Redis/RabbitMQ) to the worker and any result backend. Emit a
|
|
40
|
+
`sequenceDiagram` across Client, Producer, Broker, Worker (and Result
|
|
41
|
+
store), including retry/failure branches with `alt`.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
id: typescript
|
|
2
|
+
name: TypeScript / JavaScript Overlay
|
|
3
|
+
version: 0.1.0
|
|
4
|
+
kind: diagrams
|
|
5
|
+
extends: base
|
|
6
|
+
appliesTo: [typescript]
|
|
7
|
+
|
|
8
|
+
# Adds JS/TS-idiomatic diagrams. New diagram ids are appended to the base groups
|
|
9
|
+
# of the same id; base diagrams are unchanged.
|
|
10
|
+
groups:
|
|
11
|
+
- id: architecture
|
|
12
|
+
name: Architecture & Structure
|
|
13
|
+
diagrams:
|
|
14
|
+
- id: react-component-tree
|
|
15
|
+
title: Frontend Component Tree
|
|
16
|
+
type: flowchart
|
|
17
|
+
appliesWhen: >
|
|
18
|
+
A component-based frontend is present (React, Next.js, Vue, Svelte, or
|
|
19
|
+
Angular). Shows the component hierarchy and the main data/props flow.
|
|
20
|
+
detect: ["react", "next", "vue", "svelte", "@angular", "*.tsx", "*.vue", "*.svelte"]
|
|
21
|
+
guidance: >
|
|
22
|
+
Starting from the root/App and route entry points, map the important
|
|
23
|
+
components and their parent→child composition as a `flowchart TD`.
|
|
24
|
+
Annotate edges with the key props/state passed down and mark
|
|
25
|
+
container/smart components vs presentational ones. Focus on the routed
|
|
26
|
+
screens and shared components, not every leaf.
|
|
27
|
+
references:
|
|
28
|
+
- "https://react.dev/learn/thinking-in-react"
|
|
29
|
+
|
|
30
|
+
- id: behavioral
|
|
31
|
+
name: Behaviour & Control Flow
|
|
32
|
+
diagrams:
|
|
33
|
+
- id: middleware-chain
|
|
34
|
+
title: HTTP Middleware / Handler Chain
|
|
35
|
+
type: flowchart
|
|
36
|
+
appliesWhen: >
|
|
37
|
+
A Node HTTP framework with a middleware pipeline is used (Express, Koa,
|
|
38
|
+
Fastify, NestJS). Shows the order requests pass through middleware to a
|
|
39
|
+
handler and back.
|
|
40
|
+
detect: ["express", "koa", "fastify", "@nestjs", "middleware", "app.use"]
|
|
41
|
+
guidance: >
|
|
42
|
+
Read the server bootstrap and route registration to reconstruct the
|
|
43
|
+
ordered middleware pipeline (logging, auth, body-parsing, validation,
|
|
44
|
+
the route handler, error handler). Emit a `flowchart LR` in the real
|
|
45
|
+
registration order, showing the error-handling branch.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-BvLm4a6B.js";import{p as f}from"./chunk-JWPE2WC7-dsh1qiy0.js";import{_ as n,l as o}from"./diagrams-CF48btj0.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-nm5z0Jwc.js";var v=d().RailroadAbnf.parser.LangiumParser,l=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),i=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:i,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return l(e.element);case"AbnfOptionalGroup":return{type:"optional",element:l(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:l(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},w={parser:R,db:a,renderer:u,styles:p};export{w as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Y as ln,$ as an,a0 as y,a1 as tn,a2 as F,a3 as q,a4 as _,a5 as un,a6 as rn,a7 as J,a8 as o,a9 as j,aa as sn,ab as on,ac as fn}from"./diagrams-CF48btj0.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,z,a){var O=I-l,i=D-h,n=z-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function U(l,h,I,D,v,A,z){var a=l-I,O=h-D,i=(z?A:-A)/J(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,B=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*J(fn(0,T*T*R-P*P)),Y=(P*g-m*S)/R,$=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=Y-B,e=$-t,r=w-B,C=p-t;return x*x+e*e>r*r+C*C&&(Y=w,$=p),{cx:Y,cy:$,x01:-n,y01:-d,x11:Y*(v/T-1),y11:$*(v/T-1)}}function hn(){var l=cn,h=yn,I=j(0),D=null,v=gn,A=dn,z=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,B=un(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(B>tn-y)a.moveTo(s*F(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*F(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=B,S=B,Y=z.apply(this,arguments)/2,$=Y>y&&(D?+D.apply(this,arguments):J(u*u+s*s)),w=_(un(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if($>y){var C=sn($/u*q(Y)),K=sn($/s*q(Y));(P-=C*2)>y?(C*=t?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(S-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(S=0,m=g=(f+c)/2)}var G=s*F(m),H=s*q(m),L=u*F(T),M=u*q(T);if(w>y){var N=s*F(g),Q=s*q(g),V=u*F(R),W=u*q(R),E;if(B<rn)if(E=pn(G,H,V,W,N,Q,L,M)){var X=G-E[0],Z=H-E[1],b=N-E[0],k=Q-E[1],nn=1/q(on((X*b+Z*k)/(J(X*X+Z*Z)*J(b*b+k*k)))/2),en=J(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=U(V,W,G,H,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(G,H),a.arc(0,0,s,m,g,!t)):a.moveTo(G,H),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(G,H,V,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-rn/2;return[F(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:j(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:j(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:j(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:j(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:j(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:j(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:j(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|