UNPKG

732 BJavaScriptView Raw
1"use strict";
2/**
3 * @author: JP Lew (jp@cto.ai)
4 * @date: Friday, 26th April 2019 4:03:30 pm
5 * @lastModifiedBy: JP Lew (jp@cto.ai)
6 * @lastModifiedTime: Monday, 29th April 2019 9:59:13 am
7 * @copyright (c) 2019 CTO.ai
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.PUBLIC_OPS_PREFIX = 'public.';
11exports.getOpUrl = (registryHost, opImageTag) => {
12 const host = registryHost.replace(/https:\/\//, '');
13 return `${host}/${opImageTag}`;
14};
15// opIdentifier is either the op.name for buils or op.id for published ops
16exports.getOpImageTag = (teamName, opIdentifier, tag = 'latest', isPublic = false) => {
17 return `${isPublic ? exports.PUBLIC_OPS_PREFIX : ''}${teamName}/${opIdentifier}:${tag}`;
18};