MCPcopy Index your code
hub / github.com/hcengineering/platform / exportProcesses

Function exportProcesses

plugins/process-resources/src/exporter.ts:189–203  ·  view source on GitHub ↗
(_id: Ref<MasterTag>)

Source from the content-addressed store, hash-verified

187
188/** Exports all processes associated with a MasterTag. */
189export function exportProcesses (_id: Ref<MasterTag>): ExportResult {
190 const docs: Doc[] = []
191 const required: Array<Ref<Class<Doc>>> = []
192 const client = getClient()
193 const m = client.getModel()
194 const processes = m.findAllSync(processPlugin.class.Process, { masterTag: _id })
195 for (const proc of processes) {
196 const res = exportProcess(proc, false)
197 docs.push(...res.docs)
198 for (const req of res.required) {
199 if (!required.includes(req)) required.push(req)
200 }
201 }
202 return { docs, required }
203}
204
205/**
206 * Exports a single process into a portable template.

Callers

nothing calls this directly

Calls 4

getClientFunction · 0.90
exportProcessFunction · 0.85
getModelMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected