1.6.1 • Published 2 months ago

@adobe-apimesh/mesh-builder v1.6.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 months ago

Mesh Builder

Package with mesh artifacts building and compiling logic

Exports

validateMesh

validateMesh(meshConfig: MeshConfig) => Promise

Validate Mesh function takes the meshConfig as argument and validates if the mesh confines with the CLI rules. Upon a successful validation the function resolves the returned promise. If validation fails, all reasons for invalidation will be thrown in the rejected promise.

buildMesh

buildMesh(meshId: string, meshConfig: MeshConfig) => Promise<boolean | undefined>

Build Mesh function takes the meshId and meshConfig as arguments and builds the mesh artifacts under the mesh-artifact folder in the current working directory under the meshId sub directory.

Upon a successful build, buildMesh returns a Promise that resolves to true and false for a failure. buildMesh will throw MeshBuildError if there is a bulid error.

compileMesh

compileMesh(meshId: string) => Promise<string[]>

Compile Mesh function takes the meshId to find the built TypeScript mesh artifacts under the mesh-artifact folder and compiles them to JavaScript using the typescript package. It returns a Promise of JavaScript file paths that have been compiled and written to file system.

Types

validateMesh(meshConfig: MeshConfig) => Promise<boolean>

buildMesh(meshId: string, meshConfig: MeshConfig) => Promise<boolean | undefined>

compileMesh(meshId: string) => Promise<string[]>

type MeshBuildError {
    name: string;
    stack?: string;
    cause?: unknown;
    requestId?: string;
}
1.6.1

2 months ago

1.6.0

2 months ago

1.5.0

4 months ago

1.4.4

7 months ago

1.4.2

8 months ago

1.4.1

8 months ago

1.3.4-beta.0

10 months ago

1.3.7

10 months ago

1.3.4

10 months ago

1.3.3

10 months ago

1.4.0

10 months ago

1.4.0-beta.7

10 months ago

1.3.2

11 months ago

1.4.0-beta.6

11 months ago

1.4.0-beta.5

11 months ago

1.4.0-beta.4

11 months ago

1.4.0-beta.3

11 months ago

1.4.0-beta.2

11 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago