MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / publish

Function publish

modules/code-generator/src/publisher/disk/index.ts:43–63  ·  view source on GitHub ↗
(options: IDiskFactoryParams = {})

Source from the content-addressed store, hash-verified

41 };
42
43 const publish = async (options: IDiskFactoryParams = {}) => {
44 const projectToPublish = options.project || project;
45 if (!projectToPublish) {
46 throw new PublisherError('MissingProject');
47 }
48
49 const projectOutputPath = options.outputPath || outputPath;
50 const overrideProjectSlug = options.projectSlug || params.projectSlug;
51 const createProjectFolder = options.createProjectFolder ?? params.createProjectFolder;
52
53 if (overrideProjectSlug) {
54 projectToPublish.name = overrideProjectSlug;
55 }
56
57 try {
58 await writeFolder(projectToPublish, projectOutputPath, createProjectFolder, fs);
59 return { success: true, payload: projectOutputPath };
60 } catch (error) {
61 throw new PublisherError(getErrorMessage(error) || 'UnknownError');
62 }
63 };
64
65 return {
66 publish,

Callers

nothing calls this directly

Calls 2

writeFolderFunction · 0.90
getErrorMessageFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…