{"_id":"@digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli","name":"@digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli","dist-tags":{"latest":"0.0.1-alpha.0"},"versions":{"0.0.1-alpha.0":{"name":"@digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli","description":"xlcli custom action for @backstage/plugin-scaffolder-backend","version":"0.0.1-alpha.0","main":"dist/index.cjs.js","types":"dist/index.d.ts","license":"MIT","publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"backstage":{"role":"backend-plugin-module","pluginId":"scaffolder-backend-module-digitalai-xlcli","pluginPackage":["@digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli"]},"repository":{"type":"git","url":"git+https://github.com/digital-ai/backstage-software-template.git"},"bugs":{"url":"https://github.com/digital-ai/backstage-software-template/issues"},"keywords":["backstage","backend-plugin","custom-actions","digitalai","xlcli"],"author":{"name":"Digital.ai"},"homepage":"https://digital.ai/","scripts":{"start":"backstage-cli package start","build":"backstage-cli package build","lint":"backstage-cli package lint","test":"backstage-cli package test","clean":"backstage-cli package clean","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","postinstall":"node scripts/post-install.js"},"dependencies":{"@backstage/backend-plugin-api":"^1.2.0","@backstage/config":"^1.3.2","@backstage/plugin-scaffolder-node":"^0.7.0","@types/fs-extra":"^11.0.4","fs-extra":"^11.3.0","got":"^14.4.7","package-config":"^5.0.0","zod":"^3.22.4"},"resolutions":{"@types/react":"^18.0.2","@types/react-dom":"^18.0.2"},"devDependencies":{"@backstage/cli":"^0.30.0","@backstage/plugin-scaffolder-node-test-utils":"^0.1.19","@types/react":"^18.0.2","@types/react-dom":"^18.0.2","typescript":"^5.8.2"},"configSchema":"config.d.ts","_id":"@digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli@0.0.1-alpha.0","dist":{"shasum":"4781d8cbe3cdeba82b9dbf8e1a15cfe31ff3e918","integrity":"sha512-mAHvrQBzfqhyqGUHlIDCubemFPcifsx8CN1UZ/lblBtcuYqcRcl1jcJVOo5ucckanUVzcLmBetLrgTbqqZTjIA==","tarball":"https://registry.npmjs.org/@digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli/-/plugin-scaffolder-backend-module-digitalai-xlcli-0.0.1-alpha.0.tgz","fileCount":21,"unpackedSize":33859,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICChqhcHk3VljdCkQ4nQ9J+epRmiBrH20jQJcbe4ONx+AiEA5kAANetihs6CQjnnUo1R3q9st3y41wBkMKkccGaIhUw="}]},"_npmUser":{"name":"dai-npmjs-bot","email":"ops+dai-npmjs@digital.ai"},"directories":{},"maintainers":[{"name":"gvolarevic-dai","email":"glorija.volarevic@digital.ai"},{"name":"agavaldas","email":"angel.gavalda@gmail.com"},{"name":"msnively","email":"msnively@gmail.com"},{"name":"jcaldas","email":"john.caldas@digital.ai"},{"name":"geekzoo-dai","email":"rex.matthews@digital.ai"},{"name":"dai-npmjs-bot","email":"ops+dai-npmjs@digital.ai"},{"name":"grantcroker-dai","email":"grant.croker@digital.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-scaffolder-backend-module-digitalai-xlcli_0.0.1-alpha.0_1744694093585_0.11231301132111171"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-15T05:14:53.478Z","0.0.1-alpha.0":"2025-04-15T05:14:53.776Z","modified":"2025-04-15T05:14:54.249Z"},"maintainers":[{"name":"gvolarevic-dai","email":"glorija.volarevic@digital.ai"},{"name":"agavaldas","email":"angel.gavalda@gmail.com"},{"name":"msnively","email":"msnively@gmail.com"},{"name":"jcaldas","email":"john.caldas@digital.ai"},{"name":"geekzoo-dai","email":"rex.matthews@digital.ai"},{"name":"dai-npmjs-bot","email":"ops+dai-npmjs@digital.ai"},{"name":"grantcroker-dai","email":"grant.croker@digital.ai"}],"description":"xlcli custom action for @backstage/plugin-scaffolder-backend","homepage":"https://digital.ai/","keywords":["backstage","backend-plugin","custom-actions","digitalai","xlcli"],"repository":{"type":"git","url":"git+https://github.com/digital-ai/backstage-software-template.git"},"author":{"name":"Digital.ai"},"bugs":{"url":"https://github.com/digital-ai/backstage-software-template/issues"},"license":"MIT","readme":"# @digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli\n# 🚀 Digital.ai XL CLI Apply Actions\n\nThis Backstage software template actions enables applying configuration files to \n**Digital.ai XL Deploy** or **XL Release** using the `xl apply` command via the **XL CLI**.\n\n---\n\n## 🧩 What It Does\n\nBased on user input, the template:\n\n- Determines whether to use **XL Deploy** or **XL Release**\n- Applies the specified configuration YAML file using the `xl` CLI\n- Uses credentials and host information from backstage app-config.yaml\n- Outputs the target environment URL after command success. \n\n---\n\n## ⚙️ How It Works\n\nThis template uses a custom Backstage scaffolder action called `xlcli:apply`. The action:\n\n1. Locates the `xl` CLI binary\n2. Reads configuration values (host, username, password) using `readValues`\n3. Constructs the `xl apply` command dynamically\n4. Executes it and reports the result via Backstage scaffolder outputs\n\n---\n\n## 📝 Input Parameters\n\n| Name       | Description                                           | Required |\n|------------|-------------------------------------------------------|----------|\n| `product`  | Target product: `xl-deploy` or `xl-release`           | ✅ Yes   |\n| `filePath` | Path to the configuration YAML file to be applied     | ✅ Yes   |\n\n## Installation\n\nFrom your Backstage instance root folder:\n```shell\nyarn add --cwd packages/backend @digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli\n```\n\nThis will download the right `xl` cli binary for the current operating system and architecture from the dist at https://dist.xebialabs.com/public/xl-cli/\n\nThis behavior can be customized by adding a new `\"xlcli\"` field in your `packages/backend/package.json` file, like so:\n\n```json\n//packages/backend/package.json\n{\n  \"xlcli\": {   \n    \"version\": \"24.3.4\",\n    \"skipDownload\": false\n  }\n}\n```\nThe custom actions used in this template require the xl CLI binary to function correctly.\n\nIf you choose to skip automatic downloading (using the xl.skipDownload option), make sure to satisfy one of the following conditions:\n\na. The path to the xl binary is explicitly configured in your app-config.yaml. (See configuration details below)\n```yaml\nxlcli:\n# When adding this plugin to your Backstage instance, it will automatically try to download the latest xl-cli binary and use it.\n# But if you already have xl cli installed, you can override the path below.\n  binaryPath: '/home/ishwarya/backstage/xl_test'\n```\nb. The xl CLI is already installed and available in the system’s global PATH on the machine running Backstage.\n\n## Configuration\n1. Import the actions into your `packages/backend/src/index.ts` Backend Plugin of your Backstage instance: \n```ts\n// packages/backend/src/index.ts\nimport scaffolderxlcliModule from \"@digital-ai/plugin-scaffolder-backend-module-digitalai-xlcli\";\nconst backend = createBackend();\n// ....\nbackend.add(scaffolderxlcliModule);\n```\n## Preview\n![Preview the xl-cli apply action in backstage.](img/previewxlcliapply.png)\n\n## Usage\n  Please refer the template [xl-cli-github](templates/xl-cli-github/README.md) and [xl-cli-yaml-inline](templates/xl-cli-yaml-inline/README.md)  for more details on how to use the xlcli apply action in the backstage template.\n\n```yaml\n\n    - id: xlcliApply\n      name: Apply xl-cli\n      action: digitalai:xlcli:apply\n      input:\n        product: ${{ parameters.product }}\n        releaseInstance: ${{ parameters.releaseInstance }}\n        filePath: ${{ parameters.filePath }}\n\n```\n","readmeFilename":"README.md","_rev":"1-8db86882911917dbc295b58dfe862dc6"}