@cto.ai/ops
Version:
💻 CTO.ai Ops - The CLI built for Teams 🚀
19 lines (18 loc) • 721 B
JavaScript
;
/**
* @author: JP Lew (jp@cto.ai)
* @date: Friday, 26th April 2019 4:03:30 pm
* @lastModifiedBy: JP Lew (jp@cto.ai)
* @lastModifiedTime: Monday, 29th April 2019 9:59:13 am
* @copyright (c) 2019 CTO.ai
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.PUBLIC_OPS_PREFIX = 'public.';
exports.getOpUrl = (registryHost, opImageTag) => {
const host = registryHost.replace(/https:\/\//, '');
return `${host}/${opImageTag}`;
};
// opIdentifier is either the op.name for buils or op.id for published ops
exports.getOpImageTag = (teamName, opIdentifier, tag, isPublic = false) => {
return `${isPublic ? exports.PUBLIC_OPS_PREFIX : ''}${teamName}/${opIdentifier}:${tag}`;
};