open-index/open-npm huggingface dataset:
npm package: @rm3l/plugin-scaffolder-frontend-module-devfile-field
Description: Devfile Field Extensions (Frontend Plugin)
Author: rm3l
Latest version: 0.16.7

# devfile-field-extension

This plugin is a Custom Field Extension for Backstage. It allows you to add a set of drop-down lists to pick a Devfile Stack version, a version, and a starter project.
It interacts with the configured [Devfile registry](https://registry.devfile.io/viewer) to load the list of available Devfile Stacks.

## Preview

![Devfile Selector Custom Field Extension Preview](https://github.com/rm3l/backstage-odo-devfile-plugin/assets/593208/e7fcc998-dc87-4603-977b-76f510fed3aa)

## Installation

From your Backstage instance root folder:
```shell
yarn add --cwd packages/app @rm3l/plugin-scaffolder-frontend-module-devfile-field
```

## Configuration

1. Add the import to your `packages/app/src/App.tsx` on the frontend package of your Backstage instance:

```js
// packages/app/src/App.tsx

import { DevfileSelectorFieldExtension } from '@rm3l/plugin-scaffolder-frontend-module-devfile-field';
import { ScaffolderFieldExtensions } from '@backstage/plugin-scaffolder-react';
```

2. Then add the imported field extension as a child of `ScaffolderFieldExtensions` inside `Route`, like so:

```js
// packages/app/src/App.tsx

<Route path="/create" element={<ScaffolderPage />}>
  <ScaffolderFieldExtensions>
    <DevfileSelectorFieldExtension />
  </ScaffolderFieldExtensions>
</Route>
```

3. This custom field extension populates the dropdown lists from a Devfile Registry, which is expected to be proxied by Backstage at the following path: `/devfile-registry`. As such, you need to add the appropriate configuration to your `app-config.yaml` file under the `proxy.endpoints` field, like so:

```yaml
# app-config.yaml

proxy:
  endpoints:
    '/devfile-registry':
      target: 'https://registry.devfile.io'
```

You should now see the custom field `DevfileSelectorExtension` and its dropdown lists populated if you navigate to the Template Editor page at http://localhost:3000/create/edit.

## Usage

To use the extension in a Backstage Software Template, you can add the `ui:field` field to the parameter. The output of the extension is an object made up of the following fields:
- `devfile`: the Devfile Stack selected by the user.
- `version`: the Devfile Stack version selected by the user
- `starter_project`: the Devfile Starter Project selected by the user. Optional.

```yaml
parameters:
    - title: Provide details about the Devfile
      required:
        - devfile_data
      properties:
        devfile_data:
          type: object
          required:
            - devfile
            - version
          properties:
            devfile:
              type: string
            version:
              type: string
            starter_project:
              type: string
          ui:field: DevfileSelectorExtension
          ui:autofocus: true
          ui:options:
            rows: 5
```
npm package: @rm98/polaris-cli
Description: This is the CLI for the Polaris SLO Cloud project.
Author: Polaris SLO Cloud Authors
Latest version: 0.5.3

# Polaris CLI

This is the CLI for the Polaris SLO Cloud project.

For more information, please have a look at the [Polaris CLI documentation](https://polaris-slo-cloud.github.io/polaris/features/cli.html).

## Debugging the CLI:

To debug the Polaris CLI, follow these steps:

1. Build the CLI:
    ```sh
    nx build polaris-cli --skip-nx-cache=true --sourceMap=true
    ```

2. Run the polaris-nx E2E tests:
    ```sh
    nx e2e polaris-nx-e2e
    ```

3. Open a JavaScript Debug Terminal in VS Code and navigate to the folder `tmp/nx-e2e/proj`.

4. Set breakpoints in the Polaris CLI code and run the command you want to debug:
    ```sh
    node ../../../dist/apps/polaris-cli/src/main.js <cmd>
    ```
npm package: @rm98/polaris-common-mappings
Description: This library was contains commonly used Polaris mappings and interfaces.
Author: Polaris SLO Cloud Authors
Latest version: 0.5.3

# @rm98/polaris-common-mappings

This library was contains commonly used Polaris mappings and interfaces.

For more information, please visit the Polaris framework's [website](https://polaris-slo-cloud.github.io).
npm package: @rm98/polaris-core
Description: This is the orchestrator-independent core library of the Polaris framework.
Author: Polaris SLO Cloud Authors
Latest version: 0.5.3

# @rm98/polaris-core

This is the orchestrator-independent core library of the Polaris framework.

For more information, please visit the Polaris framework's [website](https://polaris-slo-cloud.github.io).
npm package: @rm98/polaris-cost-efficiency
Description: This library contains [Polaris](https://polaris-slo-cloud.github.io) composed metric for cost efficiency.
Author: Polaris SLO Cloud Authors
Latest version: 0.5.3

# @rm98/polaris-cost-efficiency

This library contains [Polaris](https://polaris-slo-cloud.github.io) composed metric for cost efficiency.
npm package: @rm98/polaris-kubernetes
Description: This library provides Kubernetes-specific implementations of the interfaces provided by @rm98/polaris-core.
Author: Polaris SLO Cloud Authors
Latest version: 0.5.3

# @rm98/polaris-kubernetes

This library provides Kubernetes-specific implementations of the interfaces provided by @rm98/polaris-core.

For more information, please visit the Polaris framework's [website](https://polaris-slo-cloud.github.io).
npm package: @rm98/polaris-polaris-nx
Description: This library is a plugin for the [Nx](https://nx.dev) CLI. It is wrapped by the *Polaris CLI*.
Author: Polaris SLO Cloud Authors
Latest version: 0.5.3

# Polaris Plugin for Nx CLI

This library is a plugin for the [Nx](https://nx.dev) CLI.
It is wrapped by the *Polaris CLI*.

For more information, please have a look at the [Polaris CLI documentation](https://polaris-slo-cloud.github.io/polaris/features/cli.html).


## Running E2E Tests and Manual Testing

Run `nx e2e polaris-nx-e2e` to execute the E2E tests.
This will generate a temporary workspace in the `tmp` subfolder of this workspace, which can also be used for manually testing the plugin.

Running the E2E tests in a JavaScript Debug Terminal in VS Code often makes the tests run into a timeout.
Thus, it seems to be a better strategy to run a test command in the debugger.
To set breakpoints inside polaris-nx, they must be set in the files in the `dist/libs/polaris-nx` directory.
To set breakpoints inside a third-party library, they must be set in the files in the `dist/libs/polaris-nx/node_modules` directory.

If files without an extension should be included by a generator (e.g., Dockerfile), they must be explicitly added to the `assets` of the `polaris-nx` project in `angular.json`.

To test the Polaris CLI wrapper around the Nx plugin, please see the [README](../../apps/cli/polaris-cli/README.md) of the Polaris CLI.
npm package: @rm98/polaris-prometheus
Description: This library contains the [Polaris framework's](https://polaris-slo-cloud.github.io) query backend for Prometheus.
Author: Polaris SLO Cloud Authors
Latest version: 0.5.3

# @rm98/polaris-prometheus

This library contains the [Polaris framework's](https://polaris-slo-cloud.github.io) query backend for Prometheus.
npm package: @rm98/polaris-schema-gen
Description: This library supports the generation of various schemas from TypeScript code.
Author: Polaris SLO Cloud Authors
Latest version: 0.5.3

# @rm98/polaris-schema-gen

This library supports the generation of various schemas from TypeScript code.

For more information, please visit the Polaris framework's [website](https://polaris-slo-cloud.github.io).


## JSON Schema Generation

This library relies on the [ts-json-schema-generator](https://www.npmjs.com/package/ts-json-schema-generator) package, which leverages the TypeScript compiler API to generate a JSON Schema.
@rm98/polaris-schema-gen then applies transformations to that orchestrator-independent schema to match the needs of a specific orchestrator.


## OpenAPI v3 Specification Generation

To generate an OpenAPI v3 schema, we first generate a JSON schema and then transform it to an OpenAPI v3 schema using the [@openapi-contrib/json-schema-to-openapi-schema](https://www.npmjs.com/package/@openapi-contrib/json-schema-to-openapi-schema) package.
If an OpenAPI v3.1 schema is needed, the JSON Schema can be used directly.