{"_id":"@antoniobergas/scaffolder-backend-module-azure-repositories","_rev":"3-7ee7493260aa4ca1dfc89f2f2538f20a","name":"@antoniobergas/scaffolder-backend-module-azure-repositories","dist-tags":{"latest":"0.2.8"},"versions":{"0.2.5":{"name":"@antoniobergas/scaffolder-backend-module-azure-repositories","version":"0.2.5","description":"A collection of Backstage scaffolder backend modules for Azure repositories.","main":"dist/index.cjs.js","types":"dist/index.d.ts","publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"backstage":{"role":"backend-plugin-module"},"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","update":"backstage-cli versions:bump"},"repository":{"type":"git","url":"git+https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories.git"},"keywords":["backstage","azure-devops","azure-repositories","backstage-plugin","backstage-template"],"author":{"name":"Parfümerie Douglas GmbH"},"license":"Apache-2.0","bugs":{"url":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories/issues"},"homepage":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories#readme","dependencies":{"@backstage/backend-common":"^0.19.7","@backstage/config":"^1.1.0","@backstage/errors":"^1.2.2","@backstage/integration":"^1.7.0","@backstage/plugin-scaffolder-backend":"^1.17.3","@backstage/plugin-scaffolder-node":"^0.2.5","@backstage/types":"^1.1.1","azure-devops-node-api":"^12.1.0","winston":"^3.2.1"},"devDependencies":{"@backstage/cli":"^0.22.13"},"gitHead":"254fbccf412c58c36c496d6e202bc78b88a15b22","_id":"@antoniobergas/scaffolder-backend-module-azure-repositories@0.2.5","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-w8+NBrJ4mN8XEpMxd336za3ZVpVpIrE7KIEnSg75sm+1IA2YtDDNTBsKsoYkoJw8q9Pmp3LhUTEwk3Cv+JJjqQ==","shasum":"5680217d49cb4966c75463fab30ff0b23f123254","tarball":"https://registry.npmjs.org/@antoniobergas/scaffolder-backend-module-azure-repositories/-/scaffolder-backend-module-azure-repositories-0.2.5.tgz","fileCount":6,"unpackedSize":60996,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBBdXQlFwyFSz/yRXSje1Mu+YgUHoOLew0Nc2mvcn6JbAiEAzOXqO9heXvxsjJ6suXwqiBUUWwO3uvYnTtQJ9IekWf4="}]},"_npmUser":{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"},"directories":{},"maintainers":[{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scaffolder-backend-module-azure-repositories_0.2.5_1697206558826_0.19545742269034783"},"_hasShrinkwrap":false},"0.2.6":{"name":"@antoniobergas/scaffolder-backend-module-azure-repositories","version":"0.2.6","description":"A collection of Backstage scaffolder backend modules for Azure repositories.","main":"dist/index.cjs.js","types":"dist/index.d.ts","publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"backstage":{"role":"backend-plugin-module"},"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","update":"backstage-cli versions:bump"},"repository":{"type":"git","url":"git+https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories.git"},"keywords":["backstage","azure-devops","azure-repositories","backstage-plugin","backstage-template"],"author":{"name":"Parfümerie Douglas GmbH"},"license":"Apache-2.0","bugs":{"url":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories/issues"},"homepage":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories#readme","dependencies":{"@backstage/backend-common":"^0.19.7","@backstage/config":"^1.1.0","@backstage/errors":"^1.2.2","@backstage/integration":"^1.7.0","@backstage/plugin-scaffolder-backend":"^1.17.3","@backstage/plugin-scaffolder-node":"^0.2.5","@backstage/types":"^1.1.1","azure-devops-node-api":"^12.1.0","winston":"^3.2.1"},"devDependencies":{"@backstage/cli":"^0.22.13"},"gitHead":"7421939658451013fedc4060c43f18e0b8c429d5","_id":"@antoniobergas/scaffolder-backend-module-azure-repositories@0.2.6","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-AW3YTxxf4T0Et5MNiFstMymayO68dvpEuw5HzICAWgycdCLLbB6+fMY7iVuRke46+4RHIH8Twc9S0m5w2HdcGA==","shasum":"4ae83a02369560e074907a0b33a088aaa85fd2cc","tarball":"https://registry.npmjs.org/@antoniobergas/scaffolder-backend-module-azure-repositories/-/scaffolder-backend-module-azure-repositories-0.2.6.tgz","fileCount":6,"unpackedSize":60990,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDltPthUxh2tp6mA1EmlbnAeixRjilztBK5Bwyw0+AR5AiBQ5SFGsBL8sYWFs1kF5JiEQE1Bq26llYz5E6nMOScSZQ=="}]},"_npmUser":{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"},"directories":{},"maintainers":[{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scaffolder-backend-module-azure-repositories_0.2.6_1697209342681_0.06385041120120638"},"_hasShrinkwrap":false},"0.2.7":{"name":"@antoniobergas/scaffolder-backend-module-azure-repositories","version":"0.2.7","description":"A collection of Backstage scaffolder backend modules for Azure repositories.","main":"dist/index.cjs.js","types":"dist/index.d.ts","publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"backstage":{"role":"backend-plugin-module"},"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","update":"backstage-cli versions:bump"},"repository":{"type":"git","url":"git+https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories.git"},"keywords":["backstage","azure-devops","azure-repositories","backstage-plugin","backstage-template"],"author":{"name":"Parfümerie Douglas GmbH"},"license":"Apache-2.0","bugs":{"url":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories/issues"},"homepage":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories#readme","dependencies":{"@backstage/backend-common":"^0.19.7","@backstage/config":"^1.1.0","@backstage/errors":"^1.2.2","@backstage/integration":"^1.7.0","@backstage/plugin-scaffolder-backend":"^1.17.3","@backstage/plugin-scaffolder-node":"^0.2.5","@backstage/types":"^1.1.1","azure-devops-node-api":"^12.1.0","winston":"^3.2.1"},"devDependencies":{"@backstage/cli":"^0.22.13"},"gitHead":"e2e1c85b2c064f077190ec11c18a5d21166b815d","_id":"@antoniobergas/scaffolder-backend-module-azure-repositories@0.2.7","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-OAS0vDMAO+bFy5/qmSm+in41W8VqRps2ze/ATe8Oaim50DzjjmT0J7jWW15G8SFDGRef6fUP6qydwSgabb3ghw==","shasum":"3c0654251d1a733bf9ecbf86f69e1f149e7b0712","tarball":"https://registry.npmjs.org/@antoniobergas/scaffolder-backend-module-azure-repositories/-/scaffolder-backend-module-azure-repositories-0.2.7.tgz","fileCount":6,"unpackedSize":64292,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0BjeRhh3PAObwPp4iHaMBaGF1ODDLNcUjp2jmIoulXAiBDpk6XKMgFSB/IENVNUzrvTQrI8gFqgTQRXdevtKSCNA=="}]},"_npmUser":{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"},"directories":{},"maintainers":[{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scaffolder-backend-module-azure-repositories_0.2.7_1697218147099_0.09054061814873915"},"_hasShrinkwrap":false},"0.2.8":{"name":"@antoniobergas/scaffolder-backend-module-azure-repositories","version":"0.2.8","description":"A collection of Backstage scaffolder backend modules for Azure repositories.","main":"dist/index.cjs.js","types":"dist/index.d.ts","publishConfig":{"access":"public","main":"dist/index.cjs.js","types":"dist/index.d.ts"},"backstage":{"role":"backend-plugin-module"},"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","update":"backstage-cli versions:bump"},"repository":{"type":"git","url":"git+https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories.git"},"keywords":["backstage","azure-devops","azure-repositories","backstage-plugin","backstage-template"],"author":{"name":"Parfümerie Douglas GmbH"},"license":"Apache-2.0","bugs":{"url":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories/issues"},"homepage":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories#readme","dependencies":{"@backstage/backend-common":"^0.19.7","@backstage/config":"^1.1.0","@backstage/errors":"^1.2.2","@backstage/integration":"^1.7.0","@backstage/plugin-scaffolder-backend":"^1.17.3","@backstage/plugin-scaffolder-node":"^0.2.5","@backstage/types":"^1.1.1","azure-devops-node-api":"^12.1.0","winston":"^3.2.1"},"devDependencies":{"@backstage/cli":"^0.22.13"},"gitHead":"85f770743b1694eaede7d93838b9266434a413c8","_id":"@antoniobergas/scaffolder-backend-module-azure-repositories@0.2.8","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-OGJmJW7FFQBL5Kw5UPoamOEc6vTx/8yxrse47YTvWMzbs2rBU76Leswt7OeDUlITJ2l6xV8kQZB/PkiJA+PAKA==","shasum":"2ad4061cb9865ca1fc77c633b7154cb6beb6f80e","tarball":"https://registry.npmjs.org/@antoniobergas/scaffolder-backend-module-azure-repositories/-/scaffolder-backend-module-azure-repositories-0.2.8.tgz","fileCount":6,"unpackedSize":64312,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGlMY/mm2RwPeNgGGN2LKmTwajQvl4QUEOUyM6jqNTUAiA5ZI2pR475BtSL6zhT9VDsRubBOb8ALNaPVU1Ryw6isQ=="}]},"_npmUser":{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"},"directories":{},"maintainers":[{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scaffolder-backend-module-azure-repositories_0.2.8_1697218927799_0.3912279059438346"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-13T14:15:58.694Z","0.2.5":"2023-10-13T14:15:59.047Z","modified":"2023-10-13T17:42:08.278Z","0.2.6":"2023-10-13T15:02:22.951Z","0.2.7":"2023-10-13T17:29:07.379Z","0.2.8":"2023-10-13T17:42:08.091Z"},"maintainers":[{"name":"antoniobergas","email":"anthonyprincedom@hotmail.com"}],"description":"A collection of Backstage scaffolder backend modules for Azure repositories.","homepage":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories#readme","keywords":["backstage","azure-devops","azure-repositories","backstage-plugin","backstage-template"],"repository":{"type":"git","url":"git+https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories.git"},"author":{"name":"Parfümerie Douglas GmbH"},"bugs":{"url":"https://github.com/antoniobergas/scaffolder-backend-module-azure-repositories/issues"},"license":"Apache-2.0","readme":"# scaffolder-backend-module-azure-repositories\n\nWelcome to the Microsoft Azure repository actions for the `scaffolder-backend`.\n\nThis plugin contains a collection of actions:\n\n- `azure:repo:clone`\n- `azure:repo:push`\n- `azure:repo:pr`\n\n## Getting started\n\nCreate your Backstage application using the Backstage CLI as described here:\n[https://backstage.io/docs/getting-started/create-an-app](https://backstage.io/docs/getting-started/create-an-app).\n\n> Note: If you are using this plugin in a Backstage monorepo that contains the\n> code for `@backstage/plugin-scaffolder-backend`, you need to modify your\n> internal build processes to transpile files from the `node_modules` folder as\n> well.\n\nYou need to configure the actions in your backend:\n\n## From your Backstage root directory\n\n```sh\n# From your Backstage root directory\nyarn add --cwd packages/backend @antoniobergas/scaffolder-backend-module-azure-repositories\n```\n\nConfigure the actions (you can check the\n[docs](https://backstage.io/docs/features/software-templates/writing-custom-actions#registering-custom-actions)\nto see all options):\n\n```typescript\n// packages/backend/src/plugins/scaffolder.ts\n\nimport { CatalogClient } from '@backstage/catalog-client';\nimport { ScmIntegrations } from \"@backstage/integration\";\n\nimport {\n  cloneAzureRepoAction,\n  pushAzureRepoAction,\n  pullRequestAzureRepoAction,\n} from \"@parfuemerie-douglas/scaffolder-backend-module-azure-repositories\";\n\nimport { Router } from 'express';\n\nimport type { PluginEnvironment } from '../types';\n\nexport default async function createPlugin(\n  env: PluginEnvironment,\n): Promise<Router> {\n  const catalogClient = new CatalogClient({\n    discoveryApi: env.discovery,\n  });\n\nconst integrations = ScmIntegrations.fromConfig(env.config);\n\nconst actions = [\n  cloneAzureRepoAction({ integrations }),\n  pushAzureRepoAction({ integrations, config: env.config }),\n  pullRequestAzureRepoAction({ integrations }),\n  ...createBuiltInActions({\n    containerRunner,\n    catalogClient,\n    integrations,\n    config: env.config,\n    reader: env.reader,\n  }),\n];\n\nreturn await createRouter({\n  containerRunner,\n  catalogClient,\n  actions,\n  logger: env.logger,\n  config: env.config,\n  database: env.database,\n  reader: env.reader,\n});\n```\n\nThe Azure repository actions use an [Azure PAT (personal access\ntoken)](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate)\nfor authorization. The PAT requires `Read` permission for `Code` for the\n`azure:repo:clone` action. For the `azure:repo:push` action the PAT requires\n`Read & write` permission for `Code`. Simply add the PAT to your\n`app-config.yaml`:\n\n```yaml\n# app-config.yaml\n\nintegrations:\n  azure:\n    - host: dev.azure.com\n      credentials:\n        - personalAccessToken: ${      token: ${AZURE_TOKEN}\n}\n```\n\nRead more on integrations in Backstage in the [Integrations\ndocumentation](https://backstage.io/docs/integrations/).\n\n## Using the template\n\nAfter loading and configuring the Azure repository template actions, you can use\nthe actions in your template:\n\n```yaml\n# template.yaml\n\napiVersion: scaffolder.backstage.io/v1beta3\nkind: Template\nmetadata:\n  name: azure-repo-demo\n  title: Azure Repository Test\n  description: Clone and push to an Azure repository example.\nspec:\n  owner: parfuemerie-douglas\n  type: service\n\n  parameters:\n    - title: Fill in some steps\n      required:\n        - name\n        - owner\n      properties:\n        name:\n          title: Project name\n          type: string\n          description: Choose a unique project name.\n          ui:field: EntityNamePicker\n          ui:autofocus: true\n        owner:\n          title: Owner\n          type: string\n          description: Select an owner for the Backstage component.\n          ui:field: OwnerPicker\n          ui:options:\n            allowedKinds:\n              - Group\n\n  steps:\n    - id: cloneAzureRepo\n      name: Clone Azure Repo\n      action: azure:repo:clone\n      input:\n        remoteUrl: \"https://<MY_AZURE_ORGANIZATION>@dev.azure.com/<MY_AZURE_ORGANIZATION>/<MY_AZURE_PROJECT>/_git/<MY_AZURE_REPOSITORY>\"\n        branch: \"main\"\n        targetPath: ./sub-directory\n\n    - id: fetch\n      name: Template Skeleton\n      action: fetch:template\n      input:\n        url: ./skeleton\n        targetPath: ./sub-directory\n        values:\n          name: ${{ parameters.name }}\n          owner: ${{ parameters.owner }}\n\n    - id: pushAzureRepo\n      name: Push to Remote Azure Repo\n      action: azure:repo:push\n      input:\n        branch: <MY_AZURE_REPOSITORY_BRANCH>\n        sourcePath: ./sub-directory\n        gitCommitMessage: Add ${{ parameters.name }} project files\n\n    - id: pullRequestAzureRepo\n      name: Create a Pull Request to Azure Repo\n      action: azure:repo:pr\n      input:\n        sourceBranch: <MY_AZURE_REPOSITORY_BRANCH>\n        targetBranch: \"main\"\n        repoId: <MY_AZURE_REPOSITORY>\n        title: ${{ parameters.name }}\n        project: <MY_AZURE_PROJECT>\n        supportsIterations: false\n\n    - id: register\n      name: Register\n      action: catalog:register\n      input:\n        repoContentsUrl: \"dev.azure.com?owner=<MY_AZURE_PROJECT>&repo=<MY_AZURE_REPOSITORY>&organization=<MY_AZURE_ORGANIZATION>&version=<MY_AZURE_REPOSITORY_BRANCH>\"\n        catalogInfoPath: \"/catalog-info.yaml\"\n\n  output:\n    links:\n      - title: Repository\n        url: \"dev.azure.com?owner=<MY_AZURE_PROJECT>&repo=<MY_AZURE_REPOSITORY>&organization=<MY_AZURE_ORGANIZATION>\"\n      - title: Open in catalog\n        icon: catalog\n        entityRef: ${{ steps.register.output.entityRef }}\n```\n\nReplace `<MY_AZURE_ORGANIZATION>` with the name of your Azure DevOps\norganization, `<MY_AZURE_PROJECT>` with the name of your Azure DevOps project,\n`<MY_AZURE_REPOSITORY_BRANCH` with the name of the desired Azure DevOps repository branch,\nand `<MY_AZURE_REPOSITORY>` with the name of your Azure DevOps repository.\n\nNOTE: You will not be able to register the Pull Request since the file will not exist from the main branch!\n\nYou can find a list of all registred actions including their parameters at the\n`/create/actions` route in your Backstage application.\n","readmeFilename":"README.md"}