# @qshift/plugin-quarkus-backend

> This plugin proposes 2 actions able to:

Latest version **0.1.28** (published 2024-03-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @qshift/plugin-quarkus-backend
pnpm add @qshift/plugin-quarkus-backend
yarn add @qshift/plugin-quarkus-backend
bun add @qshift/plugin-quarkus-backend
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.28 |
| Published | 2024-03-27 |
| First published | 2024-01-10 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 49.1 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | cmoulliard |

## Links

- npm: https://www.npmjs.com/package/@qshift/plugin-quarkus-backend
- npm.io page: https://npm.io/package/@qshift/plugin-quarkus-backend

## Dependencies (13)

- [yn](https://npm.io/package/yn.md) ^4.0.0
- [path](https://npm.io/package/path.md) ^0.12.7
- [axios](https://npm.io/package/axios.md) ^1.6.5
- [jszip](https://npm.io/package/jszip.md) ^3.10.1
- [express](https://npm.io/package/express.md) ^4.17.1
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.2.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.7
- [@types/express](https://npm.io/package/@types/express.md) *
- [@backstage/config](https://npm.io/package/@backstage/config.md) ^1.1.1
- [express-promise-router](https://npm.io/package/express-promise-router.md) ^4.1.0
- [@backstage/backend-common](https://npm.io/package/@backstage/backend-common.md) ^0.21.3
- [@backstage/plugin-scaffolder-node](https://npm.io/package/@backstage/plugin-scaffolder-node.md) ^0.3.3

## Recent versions

- 0.1.28 (latest) — 2024-03-27
- 0.1.27 — 2024-03-11
- 0.1.26 — 2024-03-11
- 0.1.25 — 2024-03-05
- 0.1.24 — 2024-03-04
- 0.1.23 — 2024-02-20
- 0.1.22 — 2024-02-20
- 0.1.21 — 2024-02-20
- 0.1.20 — 2024-02-08
- 0.1.19 — 2024-02-08
- 0.1.18 — 2024-02-01
- 0.1.17 — 2024-01-30
- 0.1.16 — 2024-01-26
- 0.1.15 — 2024-01-22
- 0.1.14 — 2024-01-22
- … 11 more at https://npm.io/package/@qshift/plugin-quarkus-backend/versions

## README

## Quarkus Scaffolder Backend

This plugin proposes 2 actions able to:

- Clone a Quarkus "Quickstart" repository. Action: `quarkus:quickstart:clone`
- Create a Quarkus using the website `code.quarkus.io` able to generate a zip file of a Quarkus project and extensions selected (using extension list field). Action: `quarkus:app:create`

To use the scaffolder backend, import the package under the following path:
```bash
cd packages/backend
yarn add "@qshift/plugin-quarkus-backend"
yarn add "@backstage/integration"
```

### quickstart:clone action

To use the Quarkus action able to clone a quarkus quickstart from this [repository](https://github.com/quarkusio/quarkus-quickstarts), then edit the file `packages/backend/src/plugins/scaffolder.ts` to register the action: `cloneQuarkusQuickstart`.

Here is a snippet example of code changed
```typescript
import { ScmIntegrations } from '@backstage/integration';
import {createBuiltinActions, createRouter} from '@backstage/plugin-scaffolder-backend';
import { cloneQuarkusQuickstart } from '@internal/plugin-quarkus-backend';
...
  const integrations = ScmIntegrations.fromConfig(env.config);

  const builtInActions = createBuiltinActions({
    integrations,
    catalogClient,
    config: env.config,
    reader: env.reader,
  });

  const actions = [...builtInActions, cloneQuarkusQuickstart()];

  return await createRouter({
    actions,
```

The following table details the fields that you can use to use this action:

| Input               | Description                                   | Type          | Required |
|---------------------|-----------------------------------------------|---------------|----------|
| quickstartName      | The name of the quickstart project to be used | string        | Yes      |
| groupId             | Maven GroupID                                     | No    |
| artifactId          | Maven ArtifactID                                  | No    |
| targetPath          | Target Path to access the code within the workspace | No    |
| additionalProperties | Quarkus properties                                | No    |
| database            | Quarkus backend database (PostgreSQL, etc)        | No    |
| infoEndpoint        | Quarkus API endpoint                              | No    |
| healthEndpoint      | Kubernetes Health ednpoint                        | No    |
| metricsEndpoint     | Enpoint exposing the Quarkus metrics              | No    |

Example of action:
```yaml
  steps:
    - id: template
      name: Generating the Source Code Component
      action: quarkus:quickstart:clone
      input:
        values:
          groupId: ${{ parameters.groupId }}
          artifactId: ${{ parameters.artifactId }}
          version: ${{ parameters.version }}
          quickstartName: ${{ parameters.quickstartName }}
          additionalProperties: ${{ parameters.additionalProperties }}
```

### app:create action

To use the Quarkus action able to create a quarkus application using `code.quarkus.io`, then edit the file `packages/backend/src/plugins/scaffolder.ts` to register the action: `createQuarkusApp`.

Here is a snippet example of code changed
```typescript
import { ScmIntegrations } from '@backstage/integration';
import {createBuiltinActions, createRouter} from '@backstage/plugin-scaffolder-backend';
import { createQuarkusApp } from '@internal/plugin-quarkus-backend';
...
  const integrations = ScmIntegrations.fromConfig(env.config);

  const builtInActions = createBuiltinActions({
    integrations,
    catalogClient,
    config: env.config,
    reader: env.reader,
  });

  const actions = [...builtInActions, createQuarkusApp()];

  return await createRouter({
    actions,
```
The following table details the fields that you can use to use this action:

| Input                | Description                                                      | Type    | Required |
|----------------------|------------------------------------------------------------------|---------|----------|
| quarkusVersion       | Quarkus version                                                  | string  | No       |
| groupId              | Maven GroupID                                                    | string  | No       |
| artifactId           | Maven ArtifactID                                                 | string  | No       |
| version              | Maven Version                                                    | string  | No       |
| buildTool            | Tool to be used to build: 'MAVEN', 'GRADLE', 'GRADLE_KOTLIN_DSL' | string  | No       |
| extensions           | List of the Quarkus extensions                                   | array   | No       |
| javaVersion          | JDK version                                                      | string  | No       |
| starterCode          | Generate for the project some code to start ?                    | boolean | No       |
| targetPath           | Target Path to access the code within the workspace              | string  | No       |
| additionalProperties | Quarkus properties                                               | string  | No       |
| database             | Quarkus backend database (PostgreSQL, etc)                       | string  | No       |
| infoEndpoint         | Has a Quarkus API endpoint ?                                     | boolean | No       |
| healthEndpoint       | Has a Kubernetes Health endpoint ?                               | boolean | No       |
| metricsEndpoint      | Has a Quarkus metrics endpoint ?                                 | boolean | No       |

Example of action:
```yaml
  steps:
    - id: template
      name: Generating the Source Code Component
      action: quarkus:app:create
      input:
        values:
          quarkusVersion: ${{ parameters.quarkusVersion[0] }}
          groupId: ${{ parameters.groupId }}
          artifactId: ${{ parameters.artifactId }}
          version: ${{ parameters.version }}
          buildTool: ${{ parameters.buildTool }}
          javaVersion: ${{ parameters.javaVersion }}
          extensions: ${{ parameters.extensions }}
          database: ${{ parameters.database }}
          infoEndpoint: ${{ parameters.infoEndpoint }}
          healthEndpoint: ${{ parameters.healthEndpoint }}
          metricsEndpoint: ${{ parameters.metricsEndpoint }}
          additionalProperties: ${{ parameters.additionalProperties }}
          starterCode: true
```

---
_Source: https://npm.io/package/@qshift/plugin-quarkus-backend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
