Welcome to mirror list, hosted at ThFree Co, Russian Federation.

installation_commands.vue « details « components « package_registry « packages_and_registries « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 122d444e859c0bc33b26b3b4b8de6bbd7d1aec2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script>
import {
  PACKAGE_TYPE_CONAN,
  PACKAGE_TYPE_MAVEN,
  PACKAGE_TYPE_NPM,
  PACKAGE_TYPE_NUGET,
  PACKAGE_TYPE_PYPI,
  PACKAGE_TYPE_COMPOSER,
} from '~/packages_and_registries/package_registry/constants';
import ComposerInstallation from './composer_installation.vue';
import ConanInstallation from './conan_installation.vue';
import MavenInstallation from './maven_installation.vue';
import NpmInstallation from './npm_installation.vue';
import NugetInstallation from './nuget_installation.vue';
import PypiInstallation from './pypi_installation.vue';

export default {
  name: 'InstallationCommands',
  components: {
    [PACKAGE_TYPE_CONAN]: ConanInstallation,
    [PACKAGE_TYPE_MAVEN]: MavenInstallation,
    [PACKAGE_TYPE_NPM]: NpmInstallation,
    [PACKAGE_TYPE_NUGET]: NugetInstallation,
    [PACKAGE_TYPE_PYPI]: PypiInstallation,
    [PACKAGE_TYPE_COMPOSER]: ComposerInstallation,
  },
  props: {
    packageEntity: {
      type: Object,
      required: true,
    },
  },
  computed: {
    installationComponent() {
      return this.$options.components[this.packageEntity.packageType];
    },
  },
};
</script>

<template>
  <div v-if="installationComponent">
    <component :is="installationComponent" :package-entity="packageEntity" />
  </div>
</template>