mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
refactor: split api into api, api-cli & api-plugin
This commit is contained in:
@@ -30,7 +30,6 @@ import {writeFile} from 'fs/promises';
|
||||
* Converts the lightweight class/enum definitions according to the configuration,
|
||||
* to valid PlantUML Code, which will then be encoded, converted by the plantuml server
|
||||
* and saved as a .svg file in directory, in which this method was called
|
||||
*
|
||||
* @param definitions all type definitions of the project
|
||||
* @param config contains information on how the PlantUML should be generated
|
||||
* @param plantUmlBaseURL Hostname of the PlantUML-Server
|
||||
@@ -71,7 +70,6 @@ export async function createDiagram(
|
||||
/**
|
||||
* This will encode the plantuml code and post the code to the plantuml server
|
||||
* The server will then parse the code and create a corresponding diagram
|
||||
*
|
||||
* @param modelPlantUMLCode raw PlantUML code
|
||||
* @param plantUmlBaseURL PlantUML server address that shall be used
|
||||
* @param outputFile filename of the output file without file extension
|
||||
@@ -100,7 +98,7 @@ export async function createDiagramFromString(
|
||||
throw error;
|
||||
}
|
||||
// attach file extension
|
||||
const fileName = `${outputFile.replace(/[^\w-]/g, '_')}.svg`;
|
||||
const fileName = `${outputFile.replaceAll(/[^\w-]/g, '_')}.svg`;
|
||||
|
||||
await writeFile(fileName, response.body);
|
||||
Logger.log(`Writen data to file: ${fileName}`);
|
||||
@@ -110,7 +108,6 @@ export async function createDiagramFromString(
|
||||
|
||||
/**
|
||||
* Recursively iterates over all types, to find implemented generic types and parents
|
||||
*
|
||||
* @param definitions all type definitions of the project
|
||||
* @param abstractionNames currently known string values of inherited classes
|
||||
*/
|
||||
@@ -143,7 +140,6 @@ export async function createDiagramFromString(
|
||||
* Collects all reference information of this type.
|
||||
*
|
||||
* Reference information is everything that is indirectly referencing a type or class by name.
|
||||
*
|
||||
* @param type Type with references to other types
|
||||
*/
|
||||
function getReferenceTypes(type: LightweightType): string[] {
|
||||
@@ -173,7 +169,6 @@ function getReferenceTypes(type: LightweightType): string[] {
|
||||
|
||||
/**
|
||||
* Creates Plant UML code according to the config for the provided class
|
||||
*
|
||||
* @param config Configuration for how the UML should be tweaked
|
||||
* @param readerClass Class or interface representation
|
||||
*/
|
||||
@@ -235,7 +230,6 @@ function createPlantUMLCodeForClass(config: UMLConfig, readerClass: LightweightC
|
||||
|
||||
/**
|
||||
* Creates PlantUML code according to the config for the provided enum/-like definition
|
||||
*
|
||||
* @param config Configuration for how the UML should be tweaked
|
||||
* @param readerEnum Enum/-like representation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user