@xpack/doxygen2docusaurus 2.0.0 → 2.1.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/LICENSE +1 -1
- package/README.md +2 -1
- package/bin/doxygen2docusaurus.js +1 -1
- package/dist/cli/main.d.ts +0 -14
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +0 -34
- package/dist/cli/main.js.map +1 -1
- package/dist/docusaurus/cli-options.d.ts +3 -292
- package/dist/docusaurus/cli-options.d.ts.map +1 -1
- package/dist/docusaurus/cli-options.js +6 -290
- package/dist/docusaurus/cli-options.js.map +1 -1
- package/dist/docusaurus/generator.d.ts +0 -172
- package/dist/docusaurus/generator.d.ts.map +1 -1
- package/dist/docusaurus/generator.js +20 -280
- package/dist/docusaurus/generator.js.map +1 -1
- package/dist/docusaurus/renderers/descriptiontype.d.ts +0 -417
- package/dist/docusaurus/renderers/descriptiontype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/descriptiontype.js +11 -555
- package/dist/docusaurus/renderers/descriptiontype.js.map +1 -1
- package/dist/docusaurus/renderers/docinternalstype.d.ts +0 -132
- package/dist/docusaurus/renderers/docinternalstype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docinternalstype.js +0 -156
- package/dist/docusaurus/renderers/docinternalstype.js.map +1 -1
- package/dist/docusaurus/renderers/doclisttype.d.ts +0 -22
- package/dist/docusaurus/renderers/doclisttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doclisttype.js +0 -42
- package/dist/docusaurus/renderers/doclisttype.js.map +1 -1
- package/dist/docusaurus/renderers/doctabletype.d.ts +0 -88
- package/dist/docusaurus/renderers/doctabletype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doctabletype.js +1 -113
- package/dist/docusaurus/renderers/doctabletype.js.map +1 -1
- package/dist/docusaurus/renderers/doctitletype.d.ts +0 -22
- package/dist/docusaurus/renderers/doctitletype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/doctitletype.js +0 -42
- package/dist/docusaurus/renderers/doctitletype.js.map +1 -1
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts +0 -44
- package/dist/docusaurus/renderers/docvariablelisttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docvariablelisttype.js +1 -69
- package/dist/docusaurus/renderers/docvariablelisttype.js.map +1 -1
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts +0 -22
- package/dist/docusaurus/renderers/docxrefsecttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/docxrefsecttype.js +0 -38
- package/dist/docusaurus/renderers/docxrefsecttype.js.map +1 -1
- package/dist/docusaurus/renderers/element-renderer-base.d.ts +0 -74
- package/dist/docusaurus/renderers/element-renderer-base.d.ts.map +1 -1
- package/dist/docusaurus/renderers/element-renderer-base.js +0 -64
- package/dist/docusaurus/renderers/element-renderer-base.js.map +1 -1
- package/dist/docusaurus/renderers/inctype.d.ts +0 -23
- package/dist/docusaurus/renderers/inctype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/inctype.js +0 -41
- package/dist/docusaurus/renderers/inctype.js.map +1 -1
- package/dist/docusaurus/renderers/linkedtexttype.d.ts +0 -22
- package/dist/docusaurus/renderers/linkedtexttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/linkedtexttype.js +0 -45
- package/dist/docusaurus/renderers/linkedtexttype.js.map +1 -1
- package/dist/docusaurus/renderers/listingtype.d.ts +0 -52
- package/dist/docusaurus/renderers/listingtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/listingtype.js +1 -88
- package/dist/docusaurus/renderers/listingtype.js.map +1 -1
- package/dist/docusaurus/renderers/paramtype.d.ts +0 -22
- package/dist/docusaurus/renderers/paramtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/paramtype.js +2 -51
- package/dist/docusaurus/renderers/paramtype.js.map +1 -1
- package/dist/docusaurus/renderers/referencetype.d.ts +0 -23
- package/dist/docusaurus/renderers/referencetype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/referencetype.js +0 -38
- package/dist/docusaurus/renderers/referencetype.js.map +1 -1
- package/dist/docusaurus/renderers/reftexttype.d.ts +0 -22
- package/dist/docusaurus/renderers/reftexttype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/reftexttype.js +0 -38
- package/dist/docusaurus/renderers/reftexttype.js.map +1 -1
- package/dist/docusaurus/renderers/reftype.d.ts +0 -22
- package/dist/docusaurus/renderers/reftype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/reftype.js +0 -38
- package/dist/docusaurus/renderers/reftype.js.map +1 -1
- package/dist/docusaurus/renderers/renderers.d.ts +0 -151
- package/dist/docusaurus/renderers/renderers.d.ts.map +1 -1
- package/dist/docusaurus/renderers/renderers.js +4 -184
- package/dist/docusaurus/renderers/renderers.js.map +1 -1
- package/dist/docusaurus/renderers/substringtype.d.ts +0 -22
- package/dist/docusaurus/renderers/substringtype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/substringtype.js +0 -39
- package/dist/docusaurus/renderers/substringtype.js.map +1 -1
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts +0 -22
- package/dist/docusaurus/renderers/tableofcontentstype.d.ts.map +1 -1
- package/dist/docusaurus/renderers/tableofcontentstype.js +0 -39
- package/dist/docusaurus/renderers/tableofcontentstype.js.map +1 -1
- package/dist/docusaurus/types.d.ts +0 -110
- package/dist/docusaurus/types.d.ts.map +1 -1
- package/dist/docusaurus/types.js +0 -11
- package/dist/docusaurus/types.js.map +1 -1
- package/dist/docusaurus/utils.d.ts +0 -214
- package/dist/docusaurus/utils.d.ts.map +1 -1
- package/dist/docusaurus/utils.js +0 -296
- package/dist/docusaurus/utils.js.map +1 -1
- package/dist/docusaurus/view-model/classes-vm.d.ts +0 -137
- package/dist/docusaurus/view-model/classes-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/classes-vm.js +9 -225
- package/dist/docusaurus/view-model/classes-vm.js.map +1 -1
- package/dist/docusaurus/view-model/collection-base.d.ts +0 -120
- package/dist/docusaurus/view-model/collection-base.d.ts.map +1 -1
- package/dist/docusaurus/view-model/collection-base.js +11 -101
- package/dist/docusaurus/view-model/collection-base.js.map +1 -1
- package/dist/docusaurus/view-model/compound-base-vm.d.ts +2 -147
- package/dist/docusaurus/view-model/compound-base-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/compound-base-vm.js +47 -225
- package/dist/docusaurus/view-model/compound-base-vm.js.map +1 -1
- package/dist/docusaurus/view-model/concepts-vm.d.ts +26 -0
- package/dist/docusaurus/view-model/concepts-vm.d.ts.map +1 -0
- package/dist/docusaurus/view-model/concepts-vm.js +329 -0
- package/dist/docusaurus/view-model/concepts-vm.js.map +1 -0
- package/dist/docusaurus/view-model/description-anchors.d.ts +0 -58
- package/dist/docusaurus/view-model/description-anchors.d.ts.map +1 -1
- package/dist/docusaurus/view-model/description-anchors.js +0 -71
- package/dist/docusaurus/view-model/description-anchors.js.map +1 -1
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts +0 -247
- package/dist/docusaurus/view-model/files-and-folders-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/files-and-folders-vm.js +61 -353
- package/dist/docusaurus/view-model/files-and-folders-vm.js.map +1 -1
- package/dist/docusaurus/view-model/groups-vm.d.ts +0 -148
- package/dist/docusaurus/view-model/groups-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/groups-vm.js +2 -223
- package/dist/docusaurus/view-model/groups-vm.js.map +1 -1
- package/dist/docusaurus/view-model/members-vm.d.ts +0 -552
- package/dist/docusaurus/view-model/members-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/members-vm.js +17 -702
- package/dist/docusaurus/view-model/members-vm.js.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.d.ts +4 -199
- package/dist/docusaurus/view-model/namespaces-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/namespaces-vm.js +79 -284
- package/dist/docusaurus/view-model/namespaces-vm.js.map +1 -1
- package/dist/docusaurus/view-model/options.d.ts +0 -43
- package/dist/docusaurus/view-model/options.d.ts.map +1 -1
- package/dist/docusaurus/view-model/options.js +0 -57
- package/dist/docusaurus/view-model/options.js.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.d.ts +0 -115
- package/dist/docusaurus/view-model/pages-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/pages-vm.js +0 -162
- package/dist/docusaurus/view-model/pages-vm.js.map +1 -1
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts +8 -142
- package/dist/docusaurus/view-model/tree-entries-vm.d.ts.map +1 -1
- package/dist/docusaurus/view-model/tree-entries-vm.js +54 -174
- package/dist/docusaurus/view-model/tree-entries-vm.js.map +1 -1
- package/dist/docusaurus/view-model/view-model.d.ts +0 -125
- package/dist/docusaurus/view-model/view-model.d.ts.map +1 -1
- package/dist/docusaurus/view-model/view-model.js +20 -182
- package/dist/docusaurus/view-model/view-model.js.map +1 -1
- package/dist/docusaurus/workspace.d.ts +1 -126
- package/dist/docusaurus/workspace.d.ts.map +1 -1
- package/dist/docusaurus/workspace.js +8 -221
- package/dist/docusaurus/workspace.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts +5 -492
- package/dist/doxygen/data-model/compounds/compounddef-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compounddef-dm.js +23 -672
- package/dist/doxygen/data-model/compounds/compounddef-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts +0 -129
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js +1 -145
- package/dist/doxygen/data-model/compounds/compoundreftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts +104 -2848
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js +73 -3975
- package/dist/doxygen/data-model/compounds/descriptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts +0 -165
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js +0 -229
- package/dist/doxygen/data-model/compounds/docvarlistentrytype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts +0 -70
- package/dist/doxygen/data-model/compounds/doxygentype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js +0 -105
- package/dist/doxygen/data-model/compounds/doxygentype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts +0 -84
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js +1 -122
- package/dist/doxygen/data-model/compounds/enumvaluetype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts +0 -116
- package/dist/doxygen/data-model/compounds/inctype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/inctype-dm.js +3 -155
- package/dist/doxygen/data-model/compounds/inctype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts +3 -138
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js +5 -180
- package/dist/doxygen/data-model/compounds/linkedtexttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts +0 -76
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js +0 -107
- package/dist/doxygen/data-model/compounds/listofallmemberstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts +0 -162
- package/dist/doxygen/data-model/compounds/locationtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/locationtype-dm.js +4 -203
- package/dist/doxygen/data-model/compounds/locationtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts +2 -443
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js +19 -475
- package/dist/doxygen/data-model/compounds/memberdeftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts +0 -141
- package/dist/doxygen/data-model/compounds/memberreftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js +0 -176
- package/dist/doxygen/data-model/compounds/memberreftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts +0 -101
- package/dist/doxygen/data-model/compounds/membertype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/membertype-dm.js +0 -115
- package/dist/doxygen/data-model/compounds/membertype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts +0 -164
- package/dist/doxygen/data-model/compounds/paramtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/paramtype-dm.js +0 -208
- package/dist/doxygen/data-model/compounds/paramtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts +0 -139
- package/dist/doxygen/data-model/compounds/referencetype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/referencetype-dm.js +2 -175
- package/dist/doxygen/data-model/compounds/referencetype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts +0 -120
- package/dist/doxygen/data-model/compounds/reftexttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js +2 -141
- package/dist/doxygen/data-model/compounds/reftexttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts +0 -268
- package/dist/doxygen/data-model/compounds/reftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reftype-dm.js +4 -326
- package/dist/doxygen/data-model/compounds/reftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts +0 -105
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js +1 -139
- package/dist/doxygen/data-model/compounds/reimplementtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts +0 -168
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js +0 -209
- package/dist/doxygen/data-model/compounds/sectiondeftype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts +0 -267
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js +0 -354
- package/dist/doxygen/data-model/compounds/tableofcontentstype-dm.js.map +1 -1
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts +0 -66
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js +0 -97
- package/dist/doxygen/data-model/compounds/templateparamlisttype-dm.js.map +1 -1
- package/dist/doxygen/data-model/data-model.d.ts +0 -149
- package/dist/doxygen/data-model/data-model.d.ts.map +1 -1
- package/dist/doxygen/data-model/data-model.js +4 -197
- package/dist/doxygen/data-model/data-model.js.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts +0 -115
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js +4 -129
- package/dist/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.js.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts +0 -87
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js +0 -118
- package/dist/doxygen/data-model/doxyfile/doxyfiletype-dm.js.map +1 -1
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts +0 -253
- package/dist/doxygen/data-model/doxygen-xml-parser.d.ts.map +1 -1
- package/dist/doxygen/data-model/doxygen-xml-parser.js +0 -291
- package/dist/doxygen/data-model/doxygen-xml-parser.js.map +1 -1
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts +0 -98
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js +2 -122
- package/dist/doxygen/data-model/index/indexcompoundtype-dm.js.map +1 -1
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts +0 -82
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js +0 -114
- package/dist/doxygen/data-model/index/indexdoxygentype-dm.js.map +1 -1
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts +0 -85
- package/dist/doxygen/data-model/index/indexmembertype-dm.d.ts.map +1 -1
- package/dist/doxygen/data-model/index/indexmembertype-dm.js +1 -107
- package/dist/doxygen/data-model/index/indexmembertype-dm.js.map +1 -1
- package/dist/doxygen/data-model/types.d.ts +0 -104
- package/dist/doxygen/data-model/types.d.ts.map +1 -1
- package/dist/doxygen/data-model/types.js +0 -52
- package/dist/doxygen/data-model/types.js.map +1 -1
- package/dist/index.d.ts +4 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -42
- package/dist/index.js.map +1 -1
- package/package.json +45 -51
- package/src/cli/main.ts +122 -0
- package/src/docusaurus/cli-options.ts +560 -0
- package/src/docusaurus/generator.ts +788 -0
- package/src/docusaurus/renderers/descriptiontype.ts +1299 -0
- package/src/docusaurus/renderers/docinternalstype.ts +354 -0
- package/src/docusaurus/renderers/doclisttype.ts +134 -0
- package/src/docusaurus/renderers/doctabletype.ts +220 -0
- package/src/docusaurus/renderers/doctitletype.ts +77 -0
- package/src/docusaurus/renderers/docvariablelisttype.ts +123 -0
- package/src/docusaurus/renderers/docxrefsecttype.ts +84 -0
- package/src/docusaurus/renderers/element-renderer-base.ts +112 -0
- package/src/docusaurus/renderers/inctype.ts +75 -0
- package/src/docusaurus/renderers/linkedtexttype.ts +64 -0
- package/src/docusaurus/renderers/listingtype.ts +235 -0
- package/src/docusaurus/renderers/paramtype.ts +116 -0
- package/src/docusaurus/renderers/referencetype.ts +83 -0
- package/src/docusaurus/renderers/reftexttype.ts +81 -0
- package/src/docusaurus/renderers/reftype.ts +77 -0
- package/src/docusaurus/renderers/renderers.ts +756 -0
- package/src/docusaurus/renderers/substringtype.ts +53 -0
- package/src/docusaurus/renderers/tableofcontentstype.ts +74 -0
- package/src/docusaurus/types.ts +187 -0
- package/src/docusaurus/utils.ts +409 -0
- package/src/docusaurus/view-model/README.md +12 -0
- package/src/docusaurus/view-model/classes-vm.ts +1088 -0
- package/src/docusaurus/view-model/collection-base.ts +352 -0
- package/src/docusaurus/view-model/compound-base-vm.ts +1340 -0
- package/src/docusaurus/view-model/concepts-vm.ts +719 -0
- package/src/docusaurus/view-model/description-anchors.ts +107 -0
- package/src/docusaurus/view-model/files-and-folders-vm.ts +1293 -0
- package/src/docusaurus/view-model/groups-vm.ts +548 -0
- package/src/docusaurus/view-model/members-vm.ts +1943 -0
- package/src/docusaurus/view-model/namespaces-vm.ts +1018 -0
- package/src/docusaurus/view-model/options.ts +95 -0
- package/src/docusaurus/view-model/pages-vm.ts +342 -0
- package/src/docusaurus/view-model/tree-entries-vm.ts +376 -0
- package/src/docusaurus/view-model/view-model.ts +513 -0
- package/src/docusaurus/workspace.ts +588 -0
- package/src/doxygen/data-model/README.md +13 -0
- package/src/doxygen/data-model/compounds/compounddef-dm.ts +1156 -0
- package/src/doxygen/data-model/compounds/compoundreftype-dm.ts +266 -0
- package/src/doxygen/data-model/compounds/descriptiontype-dm.ts +10107 -0
- package/src/doxygen/data-model/compounds/docvarlistentrytype-dm.ts +354 -0
- package/src/doxygen/data-model/compounds/doxygentype-dm.ts +187 -0
- package/src/doxygen/data-model/compounds/enumvaluetype-dm.ts +218 -0
- package/src/doxygen/data-model/compounds/inctype-dm.ts +217 -0
- package/src/doxygen/data-model/compounds/linkedtexttype-dm.ts +288 -0
- package/src/doxygen/data-model/compounds/listofallmemberstype-dm.ts +160 -0
- package/src/doxygen/data-model/compounds/locationtype-dm.ts +284 -0
- package/src/doxygen/data-model/compounds/memberdeftype-dm.ts +874 -0
- package/src/doxygen/data-model/compounds/memberreftype-dm.ts +270 -0
- package/src/doxygen/data-model/compounds/membertype-dm.ts +239 -0
- package/src/doxygen/data-model/compounds/paramtype-dm.ts +302 -0
- package/src/doxygen/data-model/compounds/referencetype-dm.ts +248 -0
- package/src/doxygen/data-model/compounds/reftexttype-dm.ts +234 -0
- package/src/doxygen/data-model/compounds/reftype-dm.ts +430 -0
- package/src/doxygen/data-model/compounds/reimplementtype-dm.ts +201 -0
- package/src/doxygen/data-model/compounds/sectiondeftype-dm.ts +330 -0
- package/src/doxygen/data-model/compounds/tableofcontentstype-dm.ts +563 -0
- package/src/doxygen/data-model/compounds/templateparamlisttype-dm.ts +150 -0
- package/src/doxygen/data-model/data-model.ts +377 -0
- package/src/doxygen/data-model/doxyfile/doxyfileoptiontype-dm.ts +271 -0
- package/src/doxygen/data-model/doxyfile/doxyfiletype-dm.ts +200 -0
- package/src/doxygen/data-model/doxygen-xml-parser.ts +522 -0
- package/src/doxygen/data-model/index/indexcompoundtype-dm.ts +256 -0
- package/src/doxygen/data-model/index/indexdoxygentype-dm.ts +196 -0
- package/src/doxygen/data-model/index/indexmembertype-dm.ts +230 -0
- package/src/doxygen/data-model/types.ts +175 -0
- package/src/doxygen/data-model/xsds/README.md +6 -0
- package/src/doxygen/data-model/xsds/compound.xsd +1699 -0
- package/src/doxygen/data-model/xsds/doxyfile.xsd +355 -0
- package/src/doxygen/data-model/xsds/index.xsd +72 -0
- package/src/doxygen/data-model/xsds/xml.xsd +23 -0
- package/src/index.ts +261 -0
- package/src/tsconfig.json +10 -0
- package/dist/doxygen2docusaurus.d.ts +0 -4774
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/tsdoc-metadata.json +0 -11
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of the xPack project (http://xpack.github.io).
|
|
3
|
+
* Copyright (c) 2025-2026 Liviu Ionescu. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Permission to use, copy, modify, and/or distribute this software
|
|
6
|
+
* for any purpose is hereby granted, under the terms of the MIT license.
|
|
7
|
+
*
|
|
8
|
+
* If a copy of the license was not distributed with this file, it can
|
|
9
|
+
* be obtained from https://opensource.org/licenses/MIT.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// ----------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
// import * as util from 'node:util'
|
|
15
|
+
import assert from 'node:assert'
|
|
16
|
+
import path from 'node:path'
|
|
17
|
+
import * as fs from 'node:fs/promises'
|
|
18
|
+
|
|
19
|
+
import { Workspace } from './workspace.js'
|
|
20
|
+
import { CliOptions, maxParallelPromises } from './cli-options.js'
|
|
21
|
+
import type { SidebarCategory, FrontMatter, NavbarItem } from './types.js'
|
|
22
|
+
import { folderExists } from './utils.js'
|
|
23
|
+
import { Page } from './view-model/pages-vm.js'
|
|
24
|
+
import type { Pages } from './view-model/pages-vm.js'
|
|
25
|
+
import type { Groups } from './view-model/groups-vm.js'
|
|
26
|
+
import type { CompoundBase } from './view-model/compound-base-vm.js'
|
|
27
|
+
// import type { File } from '../view-model/files-and-folders-vm.js'
|
|
28
|
+
|
|
29
|
+
// ----------------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Generates Docusaurus-compatible Markdown files and configuration from
|
|
33
|
+
* Doxygen XML output.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* This class orchestrates the conversion process, creating documentation pages,
|
|
37
|
+
* navigation structures, and associated assets for integration with Docusaurus
|
|
38
|
+
* websites. It handles parallel processing for performance optimisation and
|
|
39
|
+
* manages the complete workflow from XML parsing to final site generation.
|
|
40
|
+
*
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
export class DocusaurusGenerator {
|
|
44
|
+
/** The workspace containing the data model and configuration options. */
|
|
45
|
+
workspace: Workspace
|
|
46
|
+
|
|
47
|
+
/** CLI options that control the generation process. */
|
|
48
|
+
options: CliOptions
|
|
49
|
+
|
|
50
|
+
// --------------------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Constructs a new Docusaurus generator instance.
|
|
54
|
+
*
|
|
55
|
+
* @remarks
|
|
56
|
+
* Initialises the generator with the provided workspace, which contains
|
|
57
|
+
* the parsed Doxygen data model and configuration options required for
|
|
58
|
+
* the generation process.
|
|
59
|
+
*
|
|
60
|
+
* @param workspace - The workspace containing the data model and
|
|
61
|
+
* configuration.
|
|
62
|
+
*/
|
|
63
|
+
constructor(workspace: Workspace) {
|
|
64
|
+
this.workspace = workspace
|
|
65
|
+
|
|
66
|
+
this.options = workspace.options
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// --------------------------------------------------------------------------
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Executes the complete generation process.
|
|
73
|
+
*
|
|
74
|
+
* @remarks
|
|
75
|
+
* Orchestrates the creation of all Docusaurus assets including Markdown
|
|
76
|
+
* files, navigation structures, redirect files, and static assets. The
|
|
77
|
+
* process follows a specific sequence to ensure proper dependencies and
|
|
78
|
+
* optimal performance through parallel processing where appropriate.
|
|
79
|
+
*
|
|
80
|
+
* @returns A promise that resolves to the exit code (0 for success).
|
|
81
|
+
*/
|
|
82
|
+
async run(): Promise<number> {
|
|
83
|
+
console.log()
|
|
84
|
+
|
|
85
|
+
await this.prepareOutputFolder()
|
|
86
|
+
// No longer used with CommonMarkdown output.
|
|
87
|
+
// await this.generateConfigurationFile()
|
|
88
|
+
|
|
89
|
+
console.log()
|
|
90
|
+
if (this.options.verbose) {
|
|
91
|
+
console.log('Writing Docusaurus .md pages (object -> url)...')
|
|
92
|
+
} else {
|
|
93
|
+
console.log('Writing Docusaurus .md pages...')
|
|
94
|
+
}
|
|
95
|
+
await this.generateMdFiles()
|
|
96
|
+
|
|
97
|
+
if (this.options.verbose) {
|
|
98
|
+
console.log()
|
|
99
|
+
}
|
|
100
|
+
await this.generateTopIndexDotMdFile()
|
|
101
|
+
await this.generateCollectionsIndexDotMdFiles()
|
|
102
|
+
await this.generatePerInitialsIndexDotMdFiles()
|
|
103
|
+
console.log(this.workspace.writtenMdFilesCounter, '.md files written')
|
|
104
|
+
|
|
105
|
+
console.log()
|
|
106
|
+
const sidebarCategory = this.generateSidebarCategory()
|
|
107
|
+
await this.writeSidebarFile(sidebarCategory)
|
|
108
|
+
|
|
109
|
+
// await this.generateSidebarFile()
|
|
110
|
+
|
|
111
|
+
if (this.options.navbarDropdownFilePath.trim().length > 0) {
|
|
112
|
+
const navbarItem = this.generateNavbarItem()
|
|
113
|
+
await this.writeNavbarFile(navbarItem)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// await this.generateMenuFile()
|
|
117
|
+
|
|
118
|
+
// await this.generateManualRedirectFiles()
|
|
119
|
+
await this.generateCompatibilityRedirectFiles()
|
|
120
|
+
|
|
121
|
+
await this.copyFiles()
|
|
122
|
+
await this.copyImageFiles()
|
|
123
|
+
|
|
124
|
+
return 0
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// --------------------------------------------------------------------------
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Prepares the output folder for generated content.
|
|
131
|
+
*
|
|
132
|
+
* @remarks
|
|
133
|
+
* Removes any existing output folder and creates a new empty directory
|
|
134
|
+
* structure for the generated Docusaurus files. This ensures a clean
|
|
135
|
+
* starting state for each generation run and prevents conflicts with
|
|
136
|
+
* previous builds.
|
|
137
|
+
*/
|
|
138
|
+
// https://nodejs.org/en/learn/manipulating-files/working-with-folders-in-nodejs
|
|
139
|
+
async prepareOutputFolder(): Promise<void> {
|
|
140
|
+
const { outputFolderPath } = this.workspace
|
|
141
|
+
try {
|
|
142
|
+
await fs.access(outputFolderPath)
|
|
143
|
+
// Remove the folder if it exist.
|
|
144
|
+
console.log(`Removing existing folder '${outputFolderPath}'...`)
|
|
145
|
+
await fs.rm(outputFolderPath, { recursive: true, force: true })
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
147
|
+
} catch (err) {
|
|
148
|
+
// The folder does not exist, nothing to remove.
|
|
149
|
+
}
|
|
150
|
+
// Create the folder as empty.
|
|
151
|
+
await fs.mkdir(outputFolderPath, { recursive: true })
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// --------------------------------------------------------------------------
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Generates the sidebar category structure for Docusaurus navigation.
|
|
158
|
+
*
|
|
159
|
+
* @remarks
|
|
160
|
+
* Creates a hierarchical category structure that organises all generated
|
|
161
|
+
* documentation pages into a logical navigation tree. The structure includes
|
|
162
|
+
* top-level pages and follows the configured collection ordering to maintain
|
|
163
|
+
* consistent navigation patterns.
|
|
164
|
+
*
|
|
165
|
+
* @returns The complete sidebar category configuration object.
|
|
166
|
+
*/
|
|
167
|
+
generateSidebarCategory(): SidebarCategory {
|
|
168
|
+
const sidebarTopCategory: SidebarCategory = {
|
|
169
|
+
type: 'category',
|
|
170
|
+
label: this.options.sidebarCategoryLabel,
|
|
171
|
+
link: {
|
|
172
|
+
type: 'doc',
|
|
173
|
+
id: `${this.workspace.sidebarBaseId}index`,
|
|
174
|
+
},
|
|
175
|
+
collapsed: false,
|
|
176
|
+
items: [],
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const pages = this.workspace.viewModel.collections.get('pages') as Pages
|
|
180
|
+
pages.createTopPagesSidebarItems(sidebarTopCategory)
|
|
181
|
+
|
|
182
|
+
// The order in sidebarCollectionNames also gives the the order
|
|
183
|
+
// of items in the sidebar.
|
|
184
|
+
for (const collectionName of this.workspace.sidebarCollectionNames) {
|
|
185
|
+
// console.log(collectionName)
|
|
186
|
+
const collection =
|
|
187
|
+
this.workspace.viewModel.collections.get(collectionName)
|
|
188
|
+
if (collection?.isVisibleInSidebar() === true) {
|
|
189
|
+
collection.addSidebarItems(sidebarTopCategory)
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return sidebarTopCategory
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// --------------------------------------------------------------------------
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Writes the sidebar configuration to a JSON file.
|
|
199
|
+
*
|
|
200
|
+
* @remarks
|
|
201
|
+
* Serialises the sidebar category structure and writes it to the configured
|
|
202
|
+
* output path for integration with Docusaurus. The resulting JSON file
|
|
203
|
+
* provides the complete navigation structure for the documentation site.
|
|
204
|
+
*
|
|
205
|
+
* @param sidebarCategory - The sidebar configuration to write.
|
|
206
|
+
*/
|
|
207
|
+
async writeSidebarFile(sidebarCategory: SidebarCategory): Promise<void> {
|
|
208
|
+
// console.log(util.inspect(sidebar, { compact: false, depth: 999 }));
|
|
209
|
+
// Write the sidebar to file.
|
|
210
|
+
|
|
211
|
+
const sidebarFilePath = this.workspace.options.sidebarCategoryFilePath
|
|
212
|
+
console.log(`Writing sidebar file '${sidebarFilePath}'...`)
|
|
213
|
+
const sidebarJson = JSON.stringify(sidebarCategory, null, 2)
|
|
214
|
+
await fs.writeFile(sidebarFilePath, sidebarJson)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// --------------------------------------------------------------------------
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Generates the navbar dropdown configuration for the top navigation.
|
|
221
|
+
*
|
|
222
|
+
* @remarks
|
|
223
|
+
* Creates a navigation menu structure that provides quick access to
|
|
224
|
+
* different sections of the generated documentation. When no items are
|
|
225
|
+
* available, falls back to a simple link format for consistency.
|
|
226
|
+
*
|
|
227
|
+
* @returns The navbar item configuration for Docusaurus.
|
|
228
|
+
*/
|
|
229
|
+
generateNavbarItem(): NavbarItem {
|
|
230
|
+
let navbarEntry: NavbarItem = {
|
|
231
|
+
type: 'dropdown',
|
|
232
|
+
label: this.options.navbarDropdownLabel,
|
|
233
|
+
to: this.workspace.menuBaseUrl,
|
|
234
|
+
position: this.options.navbarDropdownPosition,
|
|
235
|
+
items: [],
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
let hasItems = false
|
|
239
|
+
// This is the order of items in the sidebar.
|
|
240
|
+
for (const collectionName of this.workspace.sidebarCollectionNames) {
|
|
241
|
+
// console.log(collectionName)
|
|
242
|
+
const collection =
|
|
243
|
+
this.workspace.viewModel.collections.get(collectionName)
|
|
244
|
+
if (collection?.isVisibleInSidebar() === true) {
|
|
245
|
+
assert(navbarEntry.items !== undefined)
|
|
246
|
+
const items = collection.createNavbarItems()
|
|
247
|
+
if (items.length > 0) {
|
|
248
|
+
navbarEntry.items.push(...collection.createNavbarItems())
|
|
249
|
+
hasItems = true
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (!hasItems) {
|
|
255
|
+
navbarEntry = {
|
|
256
|
+
label: this.options.navbarDropdownLabel,
|
|
257
|
+
to: this.workspace.menuBaseUrl,
|
|
258
|
+
position: this.options.navbarDropdownPosition,
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return navbarEntry
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Writes the navbar configuration to a JSON file.
|
|
267
|
+
*
|
|
268
|
+
* @remarks
|
|
269
|
+
* Serialises the navbar item structure and writes it to the configured
|
|
270
|
+
* output path for integration with Docusaurus navigation. The resulting
|
|
271
|
+
* JSON file provides the top-level navigation menu configuration.
|
|
272
|
+
*
|
|
273
|
+
* @param navbarItem - The navbar configuration to write.
|
|
274
|
+
*/
|
|
275
|
+
async writeNavbarFile(navbarItem: NavbarItem): Promise<void> {
|
|
276
|
+
// console.log(util.inspect(navbarItem, { compact: false, depth: 999 }));
|
|
277
|
+
// Write the sidebar to file.
|
|
278
|
+
|
|
279
|
+
const navbarFilePath = this.workspace.options.navbarDropdownFilePath
|
|
280
|
+
console.log(`Writing navbar file '${navbarFilePath}'...`)
|
|
281
|
+
|
|
282
|
+
const navbarJson = JSON.stringify(navbarItem, null, 2)
|
|
283
|
+
await fs.writeFile(navbarFilePath, navbarJson)
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// --------------------------------------------------------------------------
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Generates index Markdown files for all collections.
|
|
290
|
+
*
|
|
291
|
+
* @remarks
|
|
292
|
+
* Creates overview pages for each documentation collection (classes, files,
|
|
293
|
+
* namespaces, etc.) that provide organised access to the content. These
|
|
294
|
+
* index files serve as entry points for navigating large documentation
|
|
295
|
+
* collections efficiently.
|
|
296
|
+
*/
|
|
297
|
+
async generateCollectionsIndexDotMdFiles(): Promise<void> {
|
|
298
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
299
|
+
for (const [collectionName, collection] of this.workspace.viewModel
|
|
300
|
+
.collections) {
|
|
301
|
+
// console.log(collectionName)
|
|
302
|
+
await collection.generateIndexDotMdFile()
|
|
303
|
+
}
|
|
304
|
+
// TODO: parallelize
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// --------------------------------------------------------------------------
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Generates the main index Markdown file for the API documentation.
|
|
311
|
+
*
|
|
312
|
+
* @remarks
|
|
313
|
+
* Creates the landing page that serves as the entry point to the generated
|
|
314
|
+
* documentation, including topics overview and main page content. This
|
|
315
|
+
* combines the Doxygen @mainpage content with a structured topics table
|
|
316
|
+
* for comprehensive navigation.
|
|
317
|
+
*/
|
|
318
|
+
async generateTopIndexDotMdFile(): Promise<void> {
|
|
319
|
+
const { outputFolderPath } = this.workspace
|
|
320
|
+
const filePath = `${outputFolderPath}index.md`
|
|
321
|
+
|
|
322
|
+
const projectBrief =
|
|
323
|
+
this.workspace.doxygenOptions.getOptionCdataValue('PROJECT_BRIEF')
|
|
324
|
+
const title =
|
|
325
|
+
this.options.mainPageTitle.length > 0
|
|
326
|
+
? this.options.mainPageTitle
|
|
327
|
+
: `${projectBrief} API Reference`
|
|
328
|
+
const permalink = '' // The root of the API sub-site.
|
|
329
|
+
|
|
330
|
+
// This is the top index.md file (@mainpage)
|
|
331
|
+
const frontMatter: FrontMatter = {
|
|
332
|
+
title,
|
|
333
|
+
slug: `${this.workspace.slugBaseUrl}${permalink}`,
|
|
334
|
+
description: 'The main page of the API documentation',
|
|
335
|
+
custom_edit_url: null,
|
|
336
|
+
keywords: ['doxygen', 'reference'],
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const lines: string[] = []
|
|
340
|
+
|
|
341
|
+
const groups = this.workspace.viewModel.collections.get('groups') as Groups
|
|
342
|
+
|
|
343
|
+
const topicsLines = groups.generateTopicsTable()
|
|
344
|
+
lines.push(...topicsLines)
|
|
345
|
+
|
|
346
|
+
const { mainPage } = this.workspace
|
|
347
|
+
|
|
348
|
+
if (mainPage !== undefined) {
|
|
349
|
+
if (topicsLines.length > 0) {
|
|
350
|
+
lines.push('')
|
|
351
|
+
lines.push('## Description')
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const { detailedDescriptionHtmlLines, briefDescriptionHtmlString } =
|
|
355
|
+
mainPage
|
|
356
|
+
|
|
357
|
+
if (
|
|
358
|
+
detailedDescriptionHtmlLines !== undefined &&
|
|
359
|
+
detailedDescriptionHtmlLines.length > 0
|
|
360
|
+
) {
|
|
361
|
+
lines.push('')
|
|
362
|
+
lines.push(
|
|
363
|
+
...mainPage.renderDetailedDescriptionToHtmlLines({
|
|
364
|
+
briefDescriptionHtmlString,
|
|
365
|
+
detailedDescriptionHtmlLines,
|
|
366
|
+
showHeader: false,
|
|
367
|
+
showBrief: false,
|
|
368
|
+
})
|
|
369
|
+
)
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (this.options.originalPagesNote.length > 0) {
|
|
374
|
+
lines.push('')
|
|
375
|
+
lines.push(':::note')
|
|
376
|
+
lines.push(this.options.originalPagesNote)
|
|
377
|
+
lines.push(':::')
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
if (this.options.verbose) {
|
|
381
|
+
console.log(`Writing top index file '${filePath}'...`)
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
await this.workspace.writeOutputMdFile({
|
|
385
|
+
filePath,
|
|
386
|
+
frontMatter,
|
|
387
|
+
bodyLines: lines,
|
|
388
|
+
})
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// --------------------------------------------------------------------------
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Generates alphabetical index files organised by initial letters.
|
|
395
|
+
*
|
|
396
|
+
* @remarks
|
|
397
|
+
* Creates index pages that group documentation items by their first letter,
|
|
398
|
+
* facilitating alphabetical navigation through large sets of documentation.
|
|
399
|
+
* This approach improves usability when dealing with extensive API
|
|
400
|
+
* documentation containing numerous items.
|
|
401
|
+
*/
|
|
402
|
+
async generatePerInitialsIndexDotMdFiles(): Promise<void> {
|
|
403
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
404
|
+
for (const [collectionName, collection] of this.workspace.viewModel
|
|
405
|
+
.collections) {
|
|
406
|
+
// console.log(collectionName)
|
|
407
|
+
await collection.generatePerInitialsIndexMdFiles()
|
|
408
|
+
}
|
|
409
|
+
// TODO: parallelize
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// --------------------------------------------------------------------------
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Generates all individual Markdown files for documentation compounds.
|
|
416
|
+
*
|
|
417
|
+
* @remarks
|
|
418
|
+
* Processes all compounds (classes, files, namespaces, etc.) from the
|
|
419
|
+
* Doxygen XML and converts them into Docusaurus-compatible Markdown pages.
|
|
420
|
+
* Supports parallel processing for improved performance whilst maintaining
|
|
421
|
+
* proper error handling and resource management.
|
|
422
|
+
*/
|
|
423
|
+
async generateMdFiles(): Promise<void> {
|
|
424
|
+
const promises: Promise<void>[] = []
|
|
425
|
+
|
|
426
|
+
for (const [, compound] of this.workspace.viewModel.compoundsById) {
|
|
427
|
+
if (compound instanceof Page) {
|
|
428
|
+
if (compound.id === 'indexpage') {
|
|
429
|
+
// This is the @mainpage. We diverge from Doxygen and generate
|
|
430
|
+
// the API main page differently, with the list of topics and
|
|
431
|
+
// this page detailed description. Therefore it is not generated
|
|
432
|
+
// as a regular page and must be skipped at this stage.
|
|
433
|
+
continue
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
const permalink: string | undefined = compound.relativePermalink
|
|
438
|
+
const { sidebarId } = compound
|
|
439
|
+
if (permalink === undefined || sidebarId === undefined) {
|
|
440
|
+
if (this.options.verbose) {
|
|
441
|
+
console.warn('Skip', compound.id, 'no permalink')
|
|
442
|
+
}
|
|
443
|
+
continue
|
|
444
|
+
}
|
|
445
|
+
// assert(permalink !== undefined)
|
|
446
|
+
|
|
447
|
+
if (this.options.verbose) {
|
|
448
|
+
console.log(
|
|
449
|
+
`${compound.kind}: ${compound.compoundName.replaceAll(/[ ]*/g, '')}`,
|
|
450
|
+
'->',
|
|
451
|
+
`${this.workspace.absoluteBaseUrl}${permalink}...`
|
|
452
|
+
)
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
if (this.options.debug) {
|
|
456
|
+
await this.generatePage(compound)
|
|
457
|
+
} else {
|
|
458
|
+
if (promises.length > maxParallelPromises) {
|
|
459
|
+
await Promise.all(promises)
|
|
460
|
+
promises.length = 0
|
|
461
|
+
}
|
|
462
|
+
promises.push(this.generatePage(compound))
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
if (promises.length > 0) {
|
|
466
|
+
await Promise.all(promises)
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Generates a single Markdown page for a documentation compound.
|
|
472
|
+
*
|
|
473
|
+
* @remarks
|
|
474
|
+
* Converts an individual compound (class, file, namespace, etc.) into a
|
|
475
|
+
* properly formatted Docusaurus Markdown file with appropriate front matter
|
|
476
|
+
* and content. The method handles permalink generation, metadata creation,
|
|
477
|
+
* and content rendering for optimal integration with Docusaurus.
|
|
478
|
+
*
|
|
479
|
+
* @param compound - The compound to generate a page for.
|
|
480
|
+
*/
|
|
481
|
+
async generatePage(compound: CompoundBase): Promise<void> {
|
|
482
|
+
const { sidebarId } = compound
|
|
483
|
+
assert(sidebarId !== undefined)
|
|
484
|
+
const fileName = `${sidebarId}.md`
|
|
485
|
+
// console.log('fileName:', fileName)
|
|
486
|
+
const filePath = `${this.workspace.outputFolderPath}${fileName}`
|
|
487
|
+
const permalink: string | undefined = compound.relativePermalink
|
|
488
|
+
assert(permalink !== undefined)
|
|
489
|
+
const slug = `${this.workspace.slugBaseUrl}${permalink}`
|
|
490
|
+
|
|
491
|
+
const frontMatter: FrontMatter = {
|
|
492
|
+
// title: `${dataObject.pageTitle ?? compound.compoundName}`,
|
|
493
|
+
slug,
|
|
494
|
+
// description: '...', // TODO
|
|
495
|
+
custom_edit_url: null,
|
|
496
|
+
toc_max_heading_level: 4,
|
|
497
|
+
keywords: ['doxygen', 'reference', compound.kind],
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
const bodyLines = compound.renderToLines(frontMatter)
|
|
501
|
+
assert(compound.relativePermalink !== undefined)
|
|
502
|
+
const pagePermalink =
|
|
503
|
+
this.workspace.pageBaseUrl + compound.relativePermalink
|
|
504
|
+
|
|
505
|
+
await this.workspace.writeOutputMdFile({
|
|
506
|
+
filePath,
|
|
507
|
+
frontMatter,
|
|
508
|
+
bodyLines,
|
|
509
|
+
title: compound.pageTitle,
|
|
510
|
+
pagePermalink,
|
|
511
|
+
})
|
|
512
|
+
}
|
|
513
|
+
// --------------------------------------------------------------------------
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Generates HTML redirect files for backwards compatibility.
|
|
517
|
+
*
|
|
518
|
+
* @remarks
|
|
519
|
+
* Creates redirect files that map original Doxygen URLs to the new
|
|
520
|
+
* Docusaurus URLs, maintaining compatibility with existing bookmarks
|
|
521
|
+
* and external links. This ensures a smooth transition when migrating
|
|
522
|
+
* from Doxygen-generated documentation to Docusaurus.
|
|
523
|
+
*/
|
|
524
|
+
async generateCompatibilityRedirectFiles(): Promise<void> {
|
|
525
|
+
const redirectsOutputFolderPath = (
|
|
526
|
+
this.options.compatibilityRedirectsOutputFolderPath ?? ''
|
|
527
|
+
).trim()
|
|
528
|
+
if (redirectsOutputFolderPath === '') {
|
|
529
|
+
return
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
console.log(
|
|
533
|
+
`Removing existing folder 'static/${redirectsOutputFolderPath}'...`
|
|
534
|
+
)
|
|
535
|
+
await fs.rm(`static/${redirectsOutputFolderPath}`, {
|
|
536
|
+
recursive: true,
|
|
537
|
+
force: true,
|
|
538
|
+
})
|
|
539
|
+
|
|
540
|
+
console.log('Writing redirect files...')
|
|
541
|
+
const compoundIds: string[] = Array.from(
|
|
542
|
+
this.workspace.viewModel.compoundsById.keys()
|
|
543
|
+
).sort()
|
|
544
|
+
for (const compoundId of compoundIds) {
|
|
545
|
+
const compound = this.workspace.viewModel.compoundsById.get(compoundId)
|
|
546
|
+
assert(compound !== undefined)
|
|
547
|
+
|
|
548
|
+
const filePathBase = `static/${redirectsOutputFolderPath}/${compoundId}`
|
|
549
|
+
const filePath = `${filePathBase}.html`
|
|
550
|
+
|
|
551
|
+
if (compound.relativePermalink === undefined) {
|
|
552
|
+
continue
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
const { absoluteBaseUrl } = this.workspace
|
|
556
|
+
const permalink = `${absoluteBaseUrl}${compound.relativePermalink}/`
|
|
557
|
+
|
|
558
|
+
await this.generateRedirectFile({
|
|
559
|
+
filePath,
|
|
560
|
+
permalink,
|
|
561
|
+
})
|
|
562
|
+
|
|
563
|
+
if (compound.kind === 'file') {
|
|
564
|
+
const filePath = `${filePathBase}_source.html`
|
|
565
|
+
await this.generateRedirectFile({
|
|
566
|
+
filePath,
|
|
567
|
+
permalink,
|
|
568
|
+
})
|
|
569
|
+
} else if (compound.kind === 'class' || compound.kind === 'struct') {
|
|
570
|
+
const filePath = `${filePathBase}-members.html`
|
|
571
|
+
await this.generateRedirectFile({
|
|
572
|
+
filePath,
|
|
573
|
+
permalink,
|
|
574
|
+
})
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
const indexFilesMap = new Map<string, string>()
|
|
579
|
+
indexFilesMap.set('classes.html', 'classes')
|
|
580
|
+
indexFilesMap.set('concepts.html', 'concepts')
|
|
581
|
+
indexFilesMap.set('files.html', 'files')
|
|
582
|
+
indexFilesMap.set('index.html', '')
|
|
583
|
+
indexFilesMap.set('namespaces.html', 'namespaces')
|
|
584
|
+
indexFilesMap.set('pages.html', 'pages')
|
|
585
|
+
indexFilesMap.set('topics.html', 'groups')
|
|
586
|
+
|
|
587
|
+
// Not redirectd:
|
|
588
|
+
// annotated
|
|
589
|
+
// doxygen_crawl
|
|
590
|
+
// functions, _[a-z~], _func, _type, _vars
|
|
591
|
+
// hierarchy
|
|
592
|
+
// namespacemembers, _enum, _func, type, _vars
|
|
593
|
+
|
|
594
|
+
for (const [from, to] of indexFilesMap) {
|
|
595
|
+
const filePath = path.join('static', redirectsOutputFolderPath, from)
|
|
596
|
+
const permalink = `${this.workspace.absoluteBaseUrl}${to}/`
|
|
597
|
+
|
|
598
|
+
await this.generateRedirectFile({
|
|
599
|
+
filePath,
|
|
600
|
+
permalink,
|
|
601
|
+
})
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
if (this.options.verbose) {
|
|
605
|
+
console.log(this.workspace.writtenHtmlFilesCounter, 'html files written')
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// async generateManualRedirectFiles(): Promise<void> {
|
|
610
|
+
// if (this.workspace.pluginOptions.redirects === undefined) {
|
|
611
|
+
// return
|
|
612
|
+
// }
|
|
613
|
+
|
|
614
|
+
// const redirectsOutputFolderPath = path.join('static')
|
|
615
|
+
|
|
616
|
+
// for (const entry of this.workspace.pluginOptions.redirects) {
|
|
617
|
+
// const fromArray = Array.isArray(entry.from) ? entry.from : [entry.from]
|
|
618
|
+
// for (const from of fromArray) {
|
|
619
|
+
// const filePath = path.join(redirectsOutputFolderPath, from)
|
|
620
|
+
// const permalink = `${this.workspace.siteConfig.baseUrl}${entry.to}/`
|
|
621
|
+
|
|
622
|
+
// await this.generateRedirectFile({
|
|
623
|
+
// filePath,
|
|
624
|
+
// permalink
|
|
625
|
+
// })
|
|
626
|
+
// }
|
|
627
|
+
// }
|
|
628
|
+
// }
|
|
629
|
+
|
|
630
|
+
// --------------------------------------------------------------------------
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Generates an HTML redirect file for URL redirection.
|
|
634
|
+
*
|
|
635
|
+
* @remarks
|
|
636
|
+
* Creates a client-side redirect page that automatically forwards visitors
|
|
637
|
+
* from old Doxygen URLs to the corresponding Docusaurus pages. The redirect
|
|
638
|
+
* preserves query parameters and hash fragments to maintain deep linking
|
|
639
|
+
* functionality across the migration.
|
|
640
|
+
*
|
|
641
|
+
* @param filePath - The path where the redirect file should be created.
|
|
642
|
+
* @param permalink - The target URL to redirect to.
|
|
643
|
+
*/
|
|
644
|
+
// If `trailingSlash` is true, Docusaurus redirects do not generate
|
|
645
|
+
// .html files, therefore we have to do it manually.
|
|
646
|
+
private async generateRedirectFile({
|
|
647
|
+
filePath,
|
|
648
|
+
permalink,
|
|
649
|
+
}: {
|
|
650
|
+
filePath: string
|
|
651
|
+
permalink: string
|
|
652
|
+
}): Promise<void> {
|
|
653
|
+
// console.log(filePath)
|
|
654
|
+
|
|
655
|
+
const lines: string[] = []
|
|
656
|
+
|
|
657
|
+
lines.push('<!DOCTYPE html>')
|
|
658
|
+
lines.push('<html>')
|
|
659
|
+
lines.push(' <head>')
|
|
660
|
+
lines.push(' <meta charset="UTF-8">')
|
|
661
|
+
lines.push(` <meta http-equiv="refresh" content="0; url=${permalink}">`)
|
|
662
|
+
lines.push(` <link rel="canonical" href="${permalink}" />`)
|
|
663
|
+
lines.push(' </head>')
|
|
664
|
+
lines.push(' <script>')
|
|
665
|
+
lines.push(
|
|
666
|
+
` window.location.href = '${permalink}'` +
|
|
667
|
+
' + window.location.search + window.location.hash;'
|
|
668
|
+
)
|
|
669
|
+
lines.push(' </script>')
|
|
670
|
+
lines.push('</html>')
|
|
671
|
+
lines.push('')
|
|
672
|
+
|
|
673
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true })
|
|
674
|
+
const fileHandle = await fs.open(filePath, 'w')
|
|
675
|
+
|
|
676
|
+
await fileHandle.write(lines.join('\n'))
|
|
677
|
+
|
|
678
|
+
await fileHandle.close()
|
|
679
|
+
|
|
680
|
+
this.workspace.writtenHtmlFilesCounter += 1
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
// --------------------------------------------------------------------------
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Copies required static files to the output directory.
|
|
687
|
+
*
|
|
688
|
+
* @remarks
|
|
689
|
+
* Transfers essential template files including SVG icons and CSS
|
|
690
|
+
* stylesheets to the appropriate locations in the static directory
|
|
691
|
+
* for use by the generated documentation. These assets provide the
|
|
692
|
+
* visual styling and iconography for the documentation site.
|
|
693
|
+
*/
|
|
694
|
+
async copyFiles(): Promise<void> {
|
|
695
|
+
const destImgFolderPath = path.join('static', 'img', 'doxygen2docusaurus')
|
|
696
|
+
await fs.mkdir(destImgFolderPath, { recursive: true })
|
|
697
|
+
|
|
698
|
+
let fromFilePath = path.join(
|
|
699
|
+
this.workspace.projectPath,
|
|
700
|
+
'templates',
|
|
701
|
+
'img',
|
|
702
|
+
'document-svgrepo-com.svg'
|
|
703
|
+
)
|
|
704
|
+
let toFilePath = path.join(destImgFolderPath, 'document-svgrepo-com.svg')
|
|
705
|
+
console.log(`Copying image file '${toFilePath}'...`)
|
|
706
|
+
await fs.copyFile(fromFilePath, toFilePath)
|
|
707
|
+
|
|
708
|
+
fromFilePath = path.join(
|
|
709
|
+
this.workspace.projectPath,
|
|
710
|
+
'templates',
|
|
711
|
+
'img',
|
|
712
|
+
'folder-svgrepo-com.svg'
|
|
713
|
+
)
|
|
714
|
+
toFilePath = path.join(destImgFolderPath, 'folder-svgrepo-com.svg')
|
|
715
|
+
console.log(`Copying image file '${toFilePath}'...`)
|
|
716
|
+
await fs.copyFile(fromFilePath, toFilePath)
|
|
717
|
+
|
|
718
|
+
fromFilePath = path.join(
|
|
719
|
+
this.workspace.projectPath,
|
|
720
|
+
'templates',
|
|
721
|
+
'css',
|
|
722
|
+
'custom.css'
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
toFilePath = this.options.customCssFilePath
|
|
726
|
+
if (!(await folderExists(path.dirname(toFilePath)))) {
|
|
727
|
+
await fs.mkdir(path.dirname(toFilePath), { recursive: true })
|
|
728
|
+
}
|
|
729
|
+
console.log(`Copying css file '${toFilePath}'...`)
|
|
730
|
+
await fs.copyFile(fromFilePath, toFilePath)
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
// --------------------------------------------------------------------------
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* Copies image files referenced in the documentation.
|
|
737
|
+
*
|
|
738
|
+
* @remarks
|
|
739
|
+
* Transfers all image files that are referenced within the Doxygen
|
|
740
|
+
* documentation to the appropriate static directory, ensuring they
|
|
741
|
+
* remain accessible in the generated Docusaurus site. Duplicate
|
|
742
|
+
* image names are automatically deduplicated for efficiency.
|
|
743
|
+
*/
|
|
744
|
+
async copyImageFiles(): Promise<void> {
|
|
745
|
+
if (this.workspace.dataModel.xml.images.length > 0) {
|
|
746
|
+
return
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
if (!this.options.verbose) {
|
|
750
|
+
if (this.workspace.dataModel.xml.images.length > 0) {
|
|
751
|
+
console.log(
|
|
752
|
+
'Copying',
|
|
753
|
+
this.workspace.dataModel.xml.images.length,
|
|
754
|
+
'image files...'
|
|
755
|
+
)
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
const destImgFolderPath = path.join(
|
|
760
|
+
'static',
|
|
761
|
+
...this.options.imagesFolderPath.split('/')
|
|
762
|
+
)
|
|
763
|
+
await fs.mkdir(destImgFolderPath, { recursive: true })
|
|
764
|
+
|
|
765
|
+
const images = new Set<string>()
|
|
766
|
+
for (const image of this.workspace.dataModel.xml.images) {
|
|
767
|
+
if (image.name !== undefined && image.name.length > 0) {
|
|
768
|
+
images.add(image.name)
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
const uniqueNames = Array.from(images).sort()
|
|
773
|
+
|
|
774
|
+
let fromFilePath = ''
|
|
775
|
+
let toFilePath = ''
|
|
776
|
+
|
|
777
|
+
for (const name of uniqueNames) {
|
|
778
|
+
fromFilePath = path.join(this.options.doxygenXmlInputFolderPath, name)
|
|
779
|
+
toFilePath = path.join(destImgFolderPath, name)
|
|
780
|
+
if (this.options.verbose) {
|
|
781
|
+
console.log(`Copying image file '${toFilePath}'...`)
|
|
782
|
+
}
|
|
783
|
+
await fs.copyFile(fromFilePath, toFilePath)
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// ----------------------------------------------------------------------------
|