Skip to content

Commit

Permalink
feat(scaffolder): add @roadiehq/scaffolder-backend-module-http-request (
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare authored Jul 9, 2023
1 parent 600260b commit 2b60f0e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.30",
"@backstage/plugin-techdocs-backend": "^1.6.3",
"@janus-idp/backstage-plugin-keycloak-backend": "^1.3.10",
"@roadiehq/scaffolder-backend-module-http-request": "^4.0.9",
"app": "link:../app",
"better-sqlite3": "^8.0.0",
"dockerode": "^3.3.1",
Expand Down
14 changes: 14 additions & 0 deletions packages/backend/src/plugins/scaffolder.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { createBuiltinActions } from '@backstage/plugin-scaffolder-backend';
import { ScmIntegrations } from '@backstage/integration';
import { CatalogClient } from '@backstage/catalog-client';
import { createRouter } from '@backstage/plugin-scaffolder-backend';
import { createHttpBackstageAction } from '@roadiehq/scaffolder-backend-module-http-request';
import { Router } from 'express';
import type { PluginEnvironment } from '../types';

Expand All @@ -9,8 +12,19 @@ export default async function createPlugin(
const catalogClient = new CatalogClient({
discoveryApi: env.discovery,
});
const integrations = ScmIntegrations.fromConfig(env.config);

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

const actions = [...builtInActions, createHttpBackstageAction({ discovery: env.discovery })];

return await createRouter({
actions,
logger: env.logger,
config: env.config,
database: env.database,
Expand Down
35 changes: 34 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6138,6 +6138,18 @@
react-use "^17.2.4"
zustand "3.6.9"

"@roadiehq/scaffolder-backend-module-http-request@^4.0.9":
version "4.0.9"
resolved "https://registry.yarnpkg.com/@roadiehq/scaffolder-backend-module-http-request/-/scaffolder-backend-module-http-request-4.0.9.tgz#74c615ca48a14cecee475b94874f56a8151e864a"
integrity sha512-P1kiDsHbNGj71zxwnJ9f/LVirnnh3yw4R3LrDf0ADKhwlscnbt5l8h2VsJ2caa7xZtxSDFJoh12VNugCF5vGOQ==
dependencies:
"@backstage/backend-common" "^0.19.0"
"@backstage/core-app-api" "^1.8.1"
"@backstage/core-plugin-api" "^1.5.2"
"@backstage/plugin-scaffolder-backend" "^1.15.0"
cross-fetch "^3.1.4"
winston "^3.2.1"

"@rollup/plugin-commonjs@^23.0.0":
version "23.0.7"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.7.tgz#7d26d879caa54283086de1974b66f512ef60abdc"
Expand Down Expand Up @@ -7581,13 +7593,20 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc"
integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==

"@types/react-dom@<18.0.0", "@types/react-dom@^17", "@types/react-dom@^18.0.0", "@types/react-dom@^18.2.5":
"@types/react-dom@<18.0.0", "@types/react-dom@^17":
version "17.0.20"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.20.tgz#e0c8901469d732b36d8473b40b679ad899da1b53"
integrity sha512-4pzIjSxDueZZ90F52mU3aPoogkHIoSIDG+oQ+wQK7Cy2B9S+MvOqY0uEA/qawKz381qrEDkvpwyt8Bm31I8sbA==
dependencies:
"@types/react" "^17"

"@types/react-dom@^18.0.0", "@types/react-dom@^18.2.5":
version "18.2.6"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.6.tgz#ad621fa71a8db29af7c31b41b2ea3d8a6f4144d1"
integrity sha512-2et4PDvg6PVCyS7fuTc4gPoksV58bW0RwSxWKcPRcHZf0PRUGq03TKcD/rUHe3azfV6/5/biUBJw+HhCQjaP0A==
dependencies:
"@types/react" "*"

"@types/react-is@^18.2.0":
version "18.2.0"
resolved "https://registry.yarnpkg.com/@types/react-is/-/react-is-18.2.0.tgz#2f5137853a46017b3d56447940fb3eb92bbf24a5"
Expand Down Expand Up @@ -10193,6 +10212,13 @@ cross-env@^7.0.0:
dependencies:
cross-spawn "^7.0.1"

cross-fetch@^3.1.4:
version "3.1.8"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82"
integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==
dependencies:
node-fetch "^2.6.12"

cross-fetch@^3.1.5:
version "3.1.6"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.6.tgz#bae05aa31a4da760969756318feeee6e70f15d6c"
Expand Down Expand Up @@ -16583,6 +16609,13 @@ node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.11, node-fetch@^2.6.7:
dependencies:
whatwg-url "^5.0.0"

node-fetch@^2.6.12:
version "2.6.12"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba"
integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==
dependencies:
whatwg-url "^5.0.0"

node-forge@^1, node-forge@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3"
Expand Down

0 comments on commit 2b60f0e

Please sign in to comment.