From 632a3ac82fb17b58c3dee11071a07673ea1d158a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Fri, 3 May 2024 20:57:21 +0200 Subject: [PATCH] chore: move plugin --- .changeset/blue-moons-occur.md | 7 +++++ packages/app/package.json | 2 +- packages/backend/package.json | 2 +- packages/backend/src/plugins/humanitec.ts | 2 +- plugins/humanitec-backend/package.json | 4 +-- .../src/actions/create-app.ts | 4 +-- .../src/service/app-info-service.test.ts | 4 +-- .../src/service/app-info-service.ts | 2 +- plugins/humanitec-common/package.json | 2 +- plugins/humanitec/package.json | 4 +-- plugins/humanitec/src/hooks/useAppInfo.ts | 2 +- yarn.lock | 27 +++---------------- 12 files changed, 24 insertions(+), 38 deletions(-) create mode 100644 .changeset/blue-moons-occur.md diff --git a/.changeset/blue-moons-occur.md b/.changeset/blue-moons-occur.md new file mode 100644 index 00000000..8a1edc63 --- /dev/null +++ b/.changeset/blue-moons-occur.md @@ -0,0 +1,7 @@ +--- +'@humanitec/backstage-plugin-backend': minor +'@humanitec/backstage-plugin-common': minor +'@humanitec/backstage-plugin': minor +--- + +moved plugin into humanitec organization diff --git a/packages/app/package.json b/packages/app/package.json index f5015a9f..e5f09fd5 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -39,7 +39,7 @@ "@backstage/plugin-techdocs-react": "^1.2.3", "@backstage/plugin-user-settings": "^0.8.5", "@backstage/theme": "^0.5.3", - "@frontside/backstage-plugin-humanitec": "^0.3.15", + "@humanitec/backstage-plugin": "^0.3.15", "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "history": "^5.0.0", diff --git a/packages/backend/package.json b/packages/backend/package.json index da795147..c65d0277 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -38,7 +38,7 @@ "@backstage/plugin-search-backend-module-techdocs": "^0.1.22", "@backstage/plugin-search-backend-node": "^1.2.21", "@backstage/plugin-techdocs-backend": "^1.10.4", - "@frontside/backstage-plugin-humanitec-backend": "^0.3.17", + "@humanitec/backstage-plugin-backend": "^0.3.17", "app": "link:../app", "better-sqlite3": "^9.0.0", "dockerode": "^3.3.1", diff --git a/packages/backend/src/plugins/humanitec.ts b/packages/backend/src/plugins/humanitec.ts index 6e4fab3f..85edc3ac 100644 --- a/packages/backend/src/plugins/humanitec.ts +++ b/packages/backend/src/plugins/humanitec.ts @@ -1,4 +1,4 @@ -import { createRouter } from '@frontside/backstage-plugin-humanitec-backend'; +import { createRouter } from '@humanitec/backstage-plugin-backend'; import { Router } from 'express'; import { PluginEnvironment } from '../types'; diff --git a/plugins/humanitec-backend/package.json b/plugins/humanitec-backend/package.json index d9cfc939..d5f8986f 100644 --- a/plugins/humanitec-backend/package.json +++ b/plugins/humanitec-backend/package.json @@ -1,5 +1,5 @@ { - "name": "@frontside/backstage-plugin-humanitec-backend", + "name": "@humanitec/backstage-plugin-backend", "version": "0.3.17", "main": "src/index.ts", "types": "src/index.ts", @@ -25,7 +25,7 @@ "@backstage/backend-common": "^0.21.3", "@backstage/config": "^1.1.1", "@backstage/plugin-scaffolder-backend": "^1.19.1", - "@frontside/backstage-plugin-humanitec-common": "^0.3.13", + "@humanitec/backstage-plugin-common": "^0.3.13", "@types/express": "*", "cross-fetch": "3.1.5", "express": "^4.17.1", diff --git a/plugins/humanitec-backend/src/actions/create-app.ts b/plugins/humanitec-backend/src/actions/create-app.ts index 5166b811..1d468380 100644 --- a/plugins/humanitec-backend/src/actions/create-app.ts +++ b/plugins/humanitec-backend/src/actions/create-app.ts @@ -2,7 +2,7 @@ import { createTemplateAction } from '@backstage/plugin-scaffolder-backend'; import { stat, readFile } from 'fs/promises'; import { join, resolve } from 'path'; import { loadAll } from 'js-yaml'; -import { SetupFileSchema, createHumanitecClient } from '@frontside/backstage-plugin-humanitec-common'; +import { SetupFileSchema, createHumanitecClient } from '@humanitec/backstage-plugin-common'; interface HumanitecCreateApp { orgId: string; @@ -130,4 +130,4 @@ async function loadSetupFile(filePath: string) { } } return null; -} \ No newline at end of file +} diff --git a/plugins/humanitec-backend/src/service/app-info-service.test.ts b/plugins/humanitec-backend/src/service/app-info-service.test.ts index 37263e95..35e36549 100644 --- a/plugins/humanitec-backend/src/service/app-info-service.test.ts +++ b/plugins/humanitec-backend/src/service/app-info-service.test.ts @@ -1,5 +1,5 @@ import { setTimeout } from 'node:timers/promises'; -import * as common from '@frontside/backstage-plugin-humanitec-common'; +import * as common from '@humanitec/backstage-plugin-common'; import { AppInfoService } from './app-info-service'; @@ -11,7 +11,7 @@ let slowFetch = false const fakeAppInfo = { fake: 'res' } const fakeError = new Error('fake error'); -jest.mock('@frontside/backstage-plugin-humanitec-common', () => ({ +jest.mock('@humanitec/backstage-plugin-common', () => ({ createHumanitecClient: jest.fn(), fetchAppInfo: jest.fn(async () => { if (returnError) { diff --git a/plugins/humanitec-backend/src/service/app-info-service.ts b/plugins/humanitec-backend/src/service/app-info-service.ts index 8882a241..3cf88cbb 100644 --- a/plugins/humanitec-backend/src/service/app-info-service.ts +++ b/plugins/humanitec-backend/src/service/app-info-service.ts @@ -1,6 +1,6 @@ import { EventEmitter } from 'events'; -import { createHumanitecClient, fetchAppInfo } from '@frontside/backstage-plugin-humanitec-common'; +import { createHumanitecClient, fetchAppInfo } from '@humanitec/backstage-plugin-common'; const defaultFetchInterval = 10000; diff --git a/plugins/humanitec-common/package.json b/plugins/humanitec-common/package.json index 6a8c26e5..9747de64 100644 --- a/plugins/humanitec-common/package.json +++ b/plugins/humanitec-common/package.json @@ -1,5 +1,5 @@ { - "name": "@frontside/backstage-plugin-humanitec-common", + "name": "@humanitec/backstage-plugin-common", "description": "Humanitec API Client", "version": "0.3.13", "main": "src/index.ts", diff --git a/plugins/humanitec/package.json b/plugins/humanitec/package.json index a3b212e0..c291f563 100644 --- a/plugins/humanitec/package.json +++ b/plugins/humanitec/package.json @@ -1,5 +1,5 @@ { - "name": "@frontside/backstage-plugin-humanitec", + "name": "@humanitec/backstage-plugin", "version": "0.3.15", "main": "src/index.ts", "types": "src/index.ts", @@ -43,7 +43,7 @@ "@backstage/core-app-api": "^1.11.1", "@backstage/dev-utils": "^1.0.27", "@backstage/test-utils": "^1.5.0", - "@frontside/backstage-plugin-humanitec-common": "^0.3.13", + "@humanitec/backstage-plugin-common": "^0.3.13", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.5.1", diff --git a/plugins/humanitec/src/hooks/useAppInfo.ts b/plugins/humanitec/src/hooks/useAppInfo.ts index 65422bd5..9acaf100 100644 --- a/plugins/humanitec/src/hooks/useAppInfo.ts +++ b/plugins/humanitec/src/hooks/useAppInfo.ts @@ -1,6 +1,6 @@ import { EventSourcePolyfill } from "event-source-polyfill"; import { configApiRef, discoveryApiRef, useApi, identityApiRef } from '@backstage/core-plugin-api'; -import type { FetchAppInfoResponse } from '@frontside/backstage-plugin-humanitec-common'; +import type { FetchAppInfoResponse } from '@humanitec/backstage-plugin-common'; import { useEffect, useState } from 'react'; import { HUMANITEC_MISSING_ANNOTATION_ERROR } from '../annotations'; diff --git a/yarn.lock b/yarn.lock index 5bf1a805..5c3b1ee2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9502,20 +9502,13 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== -"@types/react-dom@*", "@types/react-dom@^18.0.0": +"@types/react-dom@*", "@types/react-dom@<18.0.0", "@types/react-dom@^18", "@types/react-dom@^18.0.0": version "18.3.0" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0" integrity sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg== dependencies: "@types/react" "*" -"@types/react-dom@<18.0.0": - version "17.0.25" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.25.tgz#e0e5b3571e1069625b3a3da2b279379aa33a0cb5" - integrity sha512-urx7A7UxkZQmThYA4So0NelOVjx3V4rNFVJwp0WZlbIK5eM4rNJDiN3R/E9ix0MBh6kAEojk/9YL+Te6D9zHNA== - dependencies: - "@types/react" "^17" - "@types/react-redux@^7.1.20": version "7.1.33" resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.33.tgz#53c5564f03f1ded90904e3c90f77e4bd4dc20b15" @@ -9547,7 +9540,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^16.13.1 || ^17.0.0 || ^18.0.0": +"@types/react@*", "@types/react@^16.13.1 || ^17.0.0", "@types/react@^16.13.1 || ^17.0.0 || ^18.0.0", "@types/react@^18": version "18.3.1" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.1.tgz#fed43985caa834a2084d002e4771e15dfcbdbe8e" integrity sha512-V0kuGBX3+prX+DQ/7r2qsv1NsdfnCLnTgnRJ1pYnxykBhGMz+qj+box5lq7XsO5mtZsBqpjwwTu/7wszPfMBcw== @@ -9555,15 +9548,6 @@ "@types/prop-types" "*" csstype "^3.0.2" -"@types/react@^16.13.1 || ^17.0.0", "@types/react@^17": - version "17.0.80" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.80.tgz#a5dfc351d6a41257eb592d73d3a85d3b7dbcbb41" - integrity sha512-LrgHIu2lEtIo8M7d1FcI3BdwXWoRQwMoXOZ7+dPTW0lYREjmlHl3P0U1VD0i/9tppOuv8/sam7sOjx34TxSFbA== - dependencies: - "@types/prop-types" "*" - "@types/scheduler" "^0.16" - csstype "^3.0.2" - "@types/request@^2.47.1", "@types/request@^2.48.8": version "2.48.12" resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.12.tgz#0f590f615a10f87da18e9790ac94c29ec4c5ef30" @@ -9601,11 +9585,6 @@ resolved "https://registry.yarnpkg.com/@types/sarif/-/sarif-2.1.7.tgz#dab4d16ba7568e9846c454a8764f33c5d98e5524" integrity sha512-kRz0VEkJqWLf1LLVN4pT1cg1Z9wAuvI6L97V3m2f5B76Tg8d413ddvLBPTEHAZJlnn4XSvu0FkZtViCQGVyrXQ== -"@types/scheduler@^0.16": - version "0.16.8" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff" - integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== - "@types/semver@^7.3.12", "@types/semver@^7.5.0": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" @@ -10419,7 +10398,7 @@ anymatch@^3.0.3, anymatch@~3.1.2: "@backstage/plugin-techdocs-react" "^1.2.3" "@backstage/plugin-user-settings" "^0.8.5" "@backstage/theme" "^0.5.3" - "@frontside/backstage-plugin-humanitec" "^0.3.15" + "@humanitec/backstage-plugin" "^0.3.15" "@material-ui/core" "^4.12.2" "@material-ui/icons" "^4.9.1" history "^5.0.0"