diff --git a/ui/src/cli/cli.ts b/ui/src/cli/cli.ts index 9f6359a..63ac5c4 100644 --- a/ui/src/cli/cli.ts +++ b/ui/src/cli/cli.ts @@ -17,9 +17,9 @@ import { Credentials } from '../api/schemas/login' export const lkar = { login: (repo?: string, creds?: Credentials) => `lkar login -u ${creds?.user ?? '$USER'} -p ${creds?.password ?? '$PASSWORD'} ${window.location.host}${repo ? '/' + repo : ''}`, - setup: (type: RepositoryType, repo: string, sub?: string, _?: Credentials) => `lkar ${type} setup ${window.location.host}/${repo} ${(sub ? `${sub.split('/')[0]} ${sub.split('/')[1]}` : '')}`, - push: (type: RepositoryType, repo: string, sub?: string, _?: Credentials) => `lkar ${type} push ${window.location.host}/${repo} ${(sub ? `${sub.split('/')[0]} ${sub.split('/')[1]} ` : '')}# my-package.${type}`, - delete: (type: RepositoryType, repo: string, filePath: string, creds?: Credentials) => `lkar ${type} delete ${window.location.host}/${repo} ${filePath}`, + setup: (type: RepositoryType, repo: string, sub?: string, _?: Credentials) => `lkar ${type} setup ${window.location.protocol === 'http:' && '--plain-http '}${window.location.host}/${repo} ${(sub ? `${sub.split('/')[0]} ${sub.split('/')[1]}` : '')}`, + push: (type: RepositoryType, repo: string, sub?: string, _?: Credentials) => `lkar ${type} push ${window.location.protocol === 'http:' && '--plain-http '}${window.location.host}/${repo} ${(sub ? `${sub.split('/')[0]} ${sub.split('/')[1]} ` : '')}# my-package.${type}`, + delete: (type: RepositoryType, repo: string, filePath: string, creds?: Credentials) => `lkar ${type} delete ${window.location.protocol === 'http:' && '--plain-http '}${window.location.host}/${repo} ${filePath}`, } export const curl = {