MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / generateNodeSchema

Function generateNodeSchema

modules/code-generator/src/utils/nodeToJSX.ts:221–241  ·  view source on GitHub ↗
(
  nodeItem: IPublicTypeNodeSchema,
  scope: IScope,
  config?: NodeGeneratorConfig,
)

Source from the content-addressed store, hash-verified

219}
220
221function generateNodeSchema(
222 nodeItem: IPublicTypeNodeSchema,
223 scope: IScope,
224 config?: NodeGeneratorConfig,
225): string {
226 const pieces: CodePiece[] = [];
227 if (config?.nodePlugins) {
228 const res = executeFunctionStack<IPublicTypeNodeSchema, CodePiece[], NodeGeneratorConfig>(
229 nodeItem,
230 scope,
231 config.nodePlugins,
232 generateSimpleNode,
233 config,
234 );
235 pieces.push(...res);
236 } else {
237 pieces.push(...generateSimpleNode(nodeItem, scope, config));
238 }
239
240 return linkPieces(pieces);
241}
242
243// TODO: 生成文档
244// 为包裹的代码片段生成子上下文,集成父级上下文,并传入子级上下文新增内容。(如果存在多级上下文怎么处理?)

Callers 1

generateNodeFunction · 0.85

Calls 4

executeFunctionStackFunction · 0.90
generateSimpleNodeFunction · 0.85
linkPiecesFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…