Skip to content

Commit

Permalink
web: cli: add --plain-http if using http
Browse files Browse the repository at this point in the history
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
  • Loading branch information
Adphi committed Oct 12, 2023
1 parent 1d82801 commit 1534885
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 1534885

Please sign in to comment.