UNPKG

decocms

Version:

CLI for managing deco.chat apps & projects

15 lines 572 B
const SEPARATOR = "::"; export const parser = { fromBindingToolToScope: ({ bindingName, toolName, }) => { const parts = [bindingName, toolName]; if (parts.some((part) => part.includes(SEPARATOR))) { throw new Error(`binding name or tool name includes ${SEPARATOR} is not allowed`); } return parts.join(SEPARATOR); }, fromScopeToBindingTool: (scope) => { const [bindingName, toolName] = scope.split(SEPARATOR); return { bindingName, toolName }; }, }; //# sourceMappingURL=parse-binding-tool.js.map